@expressots/studio 4.0.0-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,522 @@
1
+ var TE=e=>{throw TypeError(e)};var q0=(e,t,n)=>t.has(e)||TE("Cannot "+n);var ue=(e,t,n)=>(q0(e,t,"read from private field"),n?n.call(e):t.get(e)),Ye=(e,t,n)=>t.has(e)?TE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Re=(e,t,n,r)=>(q0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),un=(e,t,n)=>(q0(e,t,"access private method"),n);var xh=(e,t,n,r)=>({set _(i){Re(e,t,i,n)},get _(){return ue(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var wh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L0={exports:{}},ac={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var CE;function Lz(){if(CE)return ac;CE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return ac.Fragment=t,ac.jsx=n,ac.jsxs=n,ac}var ME;function zz(){return ME||(ME=1,L0.exports=Lz()),L0.exports}var m=zz(),z0={exports:{}},De={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var kE;function Bz(){if(kE)return De;kE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function b(z){return z===null||typeof z!="object"?null:(z=g&&z[g]||z["@@iterator"],typeof z=="function"?z:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,x={};function A(z,G,Z){this.props=z,this.context=G,this.refs=x,this.updater=Z||_}A.prototype.isReactComponent={},A.prototype.setState=function(z,G){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,G,"setState")},A.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function j(){}j.prototype=A.prototype;function O(z,G,Z){this.props=z,this.context=G,this.refs=x,this.updater=Z||_}var N=O.prototype=new j;N.constructor=O,S(N,A.prototype),N.isPureReactComponent=!0;var E=Array.isArray;function T(){}var C={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function q(z,G,Z){var ee=Z.ref;return{$$typeof:e,type:z,key:G,ref:ee!==void 0?ee:null,props:Z}}function F(z,G){return q(z.type,G,z.props)}function L(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function P(z){var G={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(Z){return G[Z]})}var Y=/\/+/g;function R(z,G){return typeof z=="object"&&z!==null&&z.key!=null?P(""+z.key):G.toString(36)}function $(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(T,T):(z.status="pending",z.then(function(G){z.status==="pending"&&(z.status="fulfilled",z.value=G)},function(G){z.status==="pending"&&(z.status="rejected",z.reason=G)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function k(z,G,Z,ee,fe){var pe=typeof z;(pe==="undefined"||pe==="boolean")&&(z=null);var ye=!1;if(z===null)ye=!0;else switch(pe){case"bigint":case"string":case"number":ye=!0;break;case"object":switch(z.$$typeof){case e:case t:ye=!0;break;case y:return ye=z._init,k(ye(z._payload),G,Z,ee,fe)}}if(ye)return fe=fe(z),ye=ee===""?"."+R(z,0):ee,E(fe)?(Z="",ye!=null&&(Z=ye.replace(Y,"$&/")+"/"),k(fe,G,Z,"",function(ve){return ve})):fe!=null&&(L(fe)&&(fe=F(fe,Z+(fe.key==null||z&&z.key===fe.key?"":(""+fe.key).replace(Y,"$&/")+"/")+ye)),G.push(fe)),1;ye=0;var he=ee===""?".":ee+":";if(E(z))for(var ae=0;ae<z.length;ae++)ee=z[ae],pe=he+R(ee,ae),ye+=k(ee,G,Z,pe,fe);else if(ae=b(z),typeof ae=="function")for(z=ae.call(z),ae=0;!(ee=z.next()).done;)ee=ee.value,pe=he+R(ee,ae++),ye+=k(ee,G,Z,pe,fe);else if(pe==="object"){if(typeof z.then=="function")return k($(z),G,Z,ee,fe);throw G=String(z),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return ye}function I(z,G,Z){if(z==null)return z;var ee=[],fe=0;return k(z,ee,"","",function(pe){return G.call(Z,pe,fe++)}),ee}function H(z){if(z._status===-1){var G=z._result;G=G(),G.then(function(Z){(z._status===0||z._status===-1)&&(z._status=1,z._result=Z)},function(Z){(z._status===0||z._status===-1)&&(z._status=2,z._result=Z)}),z._status===-1&&(z._status=0,z._result=G)}if(z._status===1)return z._result.default;throw z._result}var V=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},K={map:I,forEach:function(z,G,Z){I(z,function(){G.apply(this,arguments)},Z)},count:function(z){var G=0;return I(z,function(){G++}),G},toArray:function(z){return I(z,function(G){return G})||[]},only:function(z){if(!L(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return De.Activity=p,De.Children=K,De.Component=A,De.Fragment=n,De.Profiler=i,De.PureComponent=O,De.StrictMode=r,De.Suspense=f,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,De.__COMPILER_RUNTIME={__proto__:null,c:function(z){return C.H.useMemoCache(z)}},De.cache=function(z){return function(){return z.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(z,G,Z){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ee=S({},z.props),fe=z.key;if(G!=null)for(pe in G.key!==void 0&&(fe=""+G.key),G)!D.call(G,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&G.ref===void 0||(ee[pe]=G[pe]);var pe=arguments.length-2;if(pe===1)ee.children=Z;else if(1<pe){for(var ye=Array(pe),he=0;he<pe;he++)ye[he]=arguments[he+2];ee.children=ye}return q(z.type,fe,ee)},De.createContext=function(z){return z={$$typeof:l,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:o,_context:z},z},De.createElement=function(z,G,Z){var ee,fe={},pe=null;if(G!=null)for(ee in G.key!==void 0&&(pe=""+G.key),G)D.call(G,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(fe[ee]=G[ee]);var ye=arguments.length-2;if(ye===1)fe.children=Z;else if(1<ye){for(var he=Array(ye),ae=0;ae<ye;ae++)he[ae]=arguments[ae+2];fe.children=he}if(z&&z.defaultProps)for(ee in ye=z.defaultProps,ye)fe[ee]===void 0&&(fe[ee]=ye[ee]);return q(z,pe,fe)},De.createRef=function(){return{current:null}},De.forwardRef=function(z){return{$$typeof:c,render:z}},De.isValidElement=L,De.lazy=function(z){return{$$typeof:y,_payload:{_status:-1,_result:z},_init:H}},De.memo=function(z,G){return{$$typeof:d,type:z,compare:G===void 0?null:G}},De.startTransition=function(z){var G=C.T,Z={};C.T=Z;try{var ee=z(),fe=C.S;fe!==null&&fe(Z,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(T,V)}catch(pe){V(pe)}finally{G!==null&&Z.types!==null&&(G.types=Z.types),C.T=G}},De.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},De.use=function(z){return C.H.use(z)},De.useActionState=function(z,G,Z){return C.H.useActionState(z,G,Z)},De.useCallback=function(z,G){return C.H.useCallback(z,G)},De.useContext=function(z){return C.H.useContext(z)},De.useDebugValue=function(){},De.useDeferredValue=function(z,G){return C.H.useDeferredValue(z,G)},De.useEffect=function(z,G){return C.H.useEffect(z,G)},De.useEffectEvent=function(z){return C.H.useEffectEvent(z)},De.useId=function(){return C.H.useId()},De.useImperativeHandle=function(z,G,Z){return C.H.useImperativeHandle(z,G,Z)},De.useInsertionEffect=function(z,G){return C.H.useInsertionEffect(z,G)},De.useLayoutEffect=function(z,G){return C.H.useLayoutEffect(z,G)},De.useMemo=function(z,G){return C.H.useMemo(z,G)},De.useOptimistic=function(z,G){return C.H.useOptimistic(z,G)},De.useReducer=function(z,G,Z){return C.H.useReducer(z,G,Z)},De.useRef=function(z){return C.H.useRef(z)},De.useState=function(z){return C.H.useState(z)},De.useSyncExternalStore=function(z,G,Z){return C.H.useSyncExternalStore(z,G,Z)},De.useTransition=function(){return C.H.useTransition()},De.version="19.2.3",De}var RE;function Rf(){return RE||(RE=1,z0.exports=Bz()),z0.exports}var U=Rf();const W=nt(U);var B0={exports:{}},oc={},I0={exports:{}},U0={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var PE;function Iz(){return PE||(PE=1,(function(e){function t(k,I){var H=k.length;k.push(I);e:for(;0<H;){var V=H-1>>>1,K=k[V];if(0<i(K,I))k[V]=I,k[H]=K,H=V;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var I=k[0],H=k.pop();if(H!==I){k[0]=H;e:for(var V=0,K=k.length,z=K>>>1;V<z;){var G=2*(V+1)-1,Z=k[G],ee=G+1,fe=k[ee];if(0>i(Z,H))ee<K&&0>i(fe,Z)?(k[V]=fe,k[ee]=H,V=ee):(k[V]=Z,k[G]=H,V=G);else if(ee<K&&0>i(fe,H))k[V]=fe,k[ee]=H,V=ee;else break e}}return I}function i(k,I){var H=k.sortIndex-I.sortIndex;return H!==0?H:k.id-I.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],y=1,p=null,g=3,b=!1,_=!1,S=!1,x=!1,A=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function N(k){for(var I=n(d);I!==null;){if(I.callback===null)r(d);else if(I.startTime<=k)r(d),I.sortIndex=I.expirationTime,t(f,I);else break;I=n(d)}}function E(k){if(S=!1,N(k),!_)if(n(f)!==null)_=!0,T||(T=!0,P());else{var I=n(d);I!==null&&$(E,I.startTime-k)}}var T=!1,C=-1,D=5,q=-1;function F(){return x?!0:!(e.unstable_now()-q<D)}function L(){if(x=!1,T){var k=e.unstable_now();q=k;var I=!0;try{e:{_=!1,S&&(S=!1,j(C),C=-1),b=!0;var H=g;try{t:{for(N(k),p=n(f);p!==null&&!(p.expirationTime>k&&F());){var V=p.callback;if(typeof V=="function"){p.callback=null,g=p.priorityLevel;var K=V(p.expirationTime<=k);if(k=e.unstable_now(),typeof K=="function"){p.callback=K,N(k),I=!0;break t}p===n(f)&&r(f),N(k)}else r(f);p=n(f)}if(p!==null)I=!0;else{var z=n(d);z!==null&&$(E,z.startTime-k),I=!1}}break e}finally{p=null,g=H,b=!1}I=void 0}}finally{I?P():T=!1}}}var P;if(typeof O=="function")P=function(){O(L)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,R=Y.port2;Y.port1.onmessage=L,P=function(){R.postMessage(null)}}else P=function(){A(L,0)};function $(k,I){C=A(function(){k(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(k){switch(g){case 1:case 2:case 3:var I=3;break;default:I=g}var H=g;g=I;try{return k()}finally{g=H}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(k,I){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var H=g;g=k;try{return I()}finally{g=H}},e.unstable_scheduleCallback=function(k,I,H){var V=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?V+H:V):H=V,k){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=H+K,k={id:y++,callback:I,priorityLevel:k,startTime:H,expirationTime:K,sortIndex:-1},H>V?(k.sortIndex=H,t(d,k),n(f)===null&&k===n(d)&&(S?(j(C),C=-1):S=!0,$(E,H-V))):(k.sortIndex=K,t(f,k),_||b||(_=!0,T||(T=!0,P()))),k},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(k){var I=g;return function(){var H=g;g=I;try{return k.apply(this,arguments)}finally{g=H}}}})(U0)),U0}var DE;function Uz(){return DE||(DE=1,I0.exports=Iz()),I0.exports}var H0={exports:{}},cn={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var $E;function Hz(){if($E)return cn;$E=1;var e=Rf();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)d+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,d,y){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:f,containerInfo:d,implementation:y}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return cn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,cn.createPortal=function(f,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return o(f,d,null,y)},cn.flushSync=function(f){var d=l.T,y=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=y,r.d.f()}},cn.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},cn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},cn.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var y=d.as,p=c(y,d.crossOrigin),g=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;y==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:b}):y==="script"&&r.d.X(f,{crossOrigin:p,integrity:g,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},cn.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var y=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:y,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},cn.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var y=d.as,p=c(y,d.crossOrigin);r.d.L(f,y,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},cn.preloadModule=function(f,d){if(typeof f=="string")if(d){var y=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:y,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},cn.requestFormReset=function(f){r.d.r(f)},cn.unstable_batchedUpdates=function(f,d){return f(d)},cn.useFormState=function(f,d,y){return l.H.useFormState(f,d,y)},cn.useFormStatus=function(){return l.H.useHostTransitionStatus()},cn.version="19.2.3",cn}var qE;function _P(){if(qE)return H0.exports;qE=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(),H0.exports=Hz(),H0.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var LE;function Vz(){if(LE)return oc;LE=1;var e=Uz(),t=Rf(),n=_P();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,u=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(u=s.return),a=s.return;while(a)}return s.tag===3?u:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(r(188))}function d(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var u=a,h=s;;){var v=u.return;if(v===null)break;var w=v.alternate;if(w===null){if(h=v.return,h!==null){u=h;continue}break}if(v.child===w.child){for(w=v.child;w;){if(w===u)return f(v),a;if(w===h)return f(v),s;w=w.sibling}throw Error(r(188))}if(u.return!==h.return)u=v,h=w;else{for(var M=!1,B=v.child;B;){if(B===u){M=!0,u=v,h=w;break}if(B===h){M=!0,h=v,u=w;break}B=B.sibling}if(!M){for(B=w.child;B;){if(B===u){M=!0,u=w,h=v;break}if(B===h){M=!0,h=w,u=v;break}B=B.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:s}function y(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=y(a),s!==null)return s;a=a.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),O=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function P(a){return a===null||typeof a!="object"?null:(a=L&&a[L]||a["@@iterator"],typeof a=="function"?a:null)}var Y=Symbol.for("react.client.reference");function R(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===Y?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case A:return"Profiler";case x:return"StrictMode";case E:return"Suspense";case T:return"SuspenseList";case q:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case _:return"Portal";case O:return a.displayName||"Context";case j:return(a._context.displayName||"Context")+".Consumer";case N:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case C:return s=a.displayName||null,s!==null?s:R(a.type)||"Memo";case D:s=a._payload,a=a._init;try{return R(a(s))}catch{}}return null}var $=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},V=[],K=-1;function z(a){return{current:a}}function G(a){0>K||(a.current=V[K],V[K]=null,K--)}function Z(a,s){K++,V[K]=a.current,a.current=s}var ee=z(null),fe=z(null),pe=z(null),ye=z(null);function he(a,s){switch(Z(pe,s),Z(fe,a),Z(ee,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?Zj(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=Zj(s),a=Jj(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}G(ee),Z(ee,a)}function ae(){G(ee),G(fe),G(pe)}function ve(a){a.memoizedState!==null&&Z(ye,a);var s=ee.current,u=Jj(s,a.type);s!==u&&(Z(fe,a),Z(ee,u))}function me(a){fe.current===a&&(G(ee),G(fe)),ye.current===a&&(G(ye),tc._currentValue=H)}var ie,xe;function we(a){if(ie===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ie=s&&s[1]||"",xe=-1<u.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ie+a+xe}var Me=!1;function Ee(a,s){if(!a||Me)return"";Me=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(oe){var re=oe}Reflect.construct(a,[],de)}else{try{de.call()}catch(oe){re=oe}a.call(de.prototype)}}else{try{throw Error()}catch(oe){re=oe}(de=a())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(oe){if(oe&&re&&typeof oe.stack=="string")return[oe.stack,re.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=h.DetermineComponentFrameRoot(),M=w[0],B=w[1];if(M&&B){var X=M.split(`
44
+ `),ne=B.split(`
45
+ `);for(v=h=0;h<X.length&&!X[h].includes("DetermineComponentFrameRoot");)h++;for(;v<ne.length&&!ne[v].includes("DetermineComponentFrameRoot");)v++;if(h===X.length||v===ne.length)for(h=X.length-1,v=ne.length-1;1<=h&&0<=v&&X[h]!==ne[v];)v--;for(;1<=h&&0<=v;h--,v--)if(X[h]!==ne[v]){if(h!==1||v!==1)do if(h--,v--,0>v||X[h]!==ne[v]){var se=`
46
+ `+X[h].replace(" at new "," at ");return a.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",a.displayName)),se}while(1<=h&&0<=v);break}}}finally{Me=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?we(u):""}function Ke(a,s){switch(a.tag){case 26:case 27:case 5:return we(a.type);case 16:return we("Lazy");case 13:return a.child!==s&&s!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return Ee(a.type,!1);case 11:return Ee(a.type.render,!1);case 1:return Ee(a.type,!0);case 31:return we("Activity");default:return""}}function Ct(a){try{var s="",u=null;do s+=Ke(a,u),u=a,a=a.return;while(a);return s}catch(h){return`
47
+ Error generating stack: `+h.message+`
48
+ `+h.stack}}var Mt=Object.prototype.hasOwnProperty,sn=e.unstable_scheduleCallback,en=e.unstable_cancelCallback,pn=e.unstable_shouldYield,fr=e.unstable_requestPaint,kt=e.unstable_now,Zr=e.unstable_getCurrentPriorityLevel,Jr=e.unstable_ImmediatePriority,Fi=e.unstable_UserBlockingPriority,Xa=e.unstable_NormalPriority,xm=e.unstable_LowPriority,is=e.unstable_IdlePriority,wm=e.log,Sm=e.unstable_setDisableYieldValue,Ka=null,yn=null;function Mr(a){if(typeof wm=="function"&&Sm(a),yn&&typeof yn.setStrictMode=="function")try{yn.setStrictMode(Ka,a)}catch{}}var mn=Math.clz32?Math.clz32:Om,_m=Math.log,Am=Math.LN2;function Om(a){return a>>>=0,a===0?32:31-(_m(a)/Am|0)|0}var as=256,os=262144,ss=4194304;function ei(a){var s=a&42;if(s!==0)return s;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function ls(a,s,u){var h=a.pendingLanes;if(h===0)return 0;var v=0,w=a.suspendedLanes,M=a.pingedLanes;a=a.warmLanes;var B=h&134217727;return B!==0?(h=B&~w,h!==0?v=ei(h):(M&=B,M!==0?v=ei(M):u||(u=B&~a,u!==0&&(v=ei(u))))):(B=h&~w,B!==0?v=ei(B):M!==0?v=ei(M):u||(u=h&~a,u!==0&&(v=ei(u)))),v===0?0:s!==0&&s!==v&&(s&w)===0&&(w=v&-v,u=s&-s,w>=u||w===32&&(u&4194048)!==0)?s:v}function Wa(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function jm(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 Qf(){var a=ss;return ss<<=1,(ss&62914560)===0&&(ss=4194304),a}function du(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function Qa(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Em(a,s,u,h,v,w){var M=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var B=a.entanglements,X=a.expirationTimes,ne=a.hiddenUpdates;for(u=M&~u;0<u;){var se=31-mn(u),de=1<<se;B[se]=0,X[se]=-1;var re=ne[se];if(re!==null)for(ne[se]=null,se=0;se<re.length;se++){var oe=re[se];oe!==null&&(oe.lane&=-536870913)}u&=~de}h!==0&&Zf(a,h,0),w!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=w&~(M&~s))}function Zf(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var h=31-mn(s);a.entangledLanes|=s,a.entanglements[h]=a.entanglements[h]|1073741824|u&261930}function Jf(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var h=31-mn(u),v=1<<h;v&s|a[h]&s&&(a[h]|=s),u&=~v}}function ed(a,s){var u=s&-s;return u=(u&42)!==0?1:hu(u),(u&(a.suspendedLanes|s))!==0?0:u}function hu(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function pu(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function td(){var a=I.p;return a!==0?a:(a=window.event,a===void 0?32:SE(a.type))}function nd(a,s){var u=I.p;try{return I.p=a,s()}finally{I.p=u}}var kr=Math.random().toString(36).slice(2),Ut="__reactFiber$"+kr,ln="__reactProps$"+kr,ti="__reactContainer$"+kr,us="__reactEvents$"+kr,rd="__reactListeners$"+kr,Nm="__reactHandles$"+kr,id="__reactResources$"+kr,Za="__reactMarker$"+kr;function yu(a){delete a[Ut],delete a[ln],delete a[us],delete a[rd],delete a[Nm]}function Yi(a){var s=a[Ut];if(s)return s;for(var u=a.parentNode;u;){if(s=u[ti]||u[Ut]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=oE(a);a!==null;){if(u=a[Ut])return u;a=oE(a)}return s}a=u,u=a.parentNode}return null}function Xi(a){if(a=a[Ut]||a[ti]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function Ki(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function Wi(a){var s=a[id];return s||(s=a[id]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Rt(a){a[Za]=!0}var ad=new Set,od={};function ni(a,s){Qi(a,s),Qi(a+"Capture",s)}function Qi(a,s){for(od[a]=s,a=0;a<s.length;a++)ad.add(s[a])}var Tm=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]*$"),mu={},sd={};function Cm(a){return Mt.call(sd,a)?!0:Mt.call(mu,a)?!1:Tm.test(a)?sd[a]=!0:(mu[a]=!0,!1)}function cs(a,s,u){if(Cm(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function fs(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function dr(a,s,u,h){if(h===null)a.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+h)}}function _n(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ld(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Mm(a,s,u){var h=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var v=h.get,w=h.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return v.call(this)},set:function(M){u=""+M,w.call(this,M)}}),Object.defineProperty(a,s,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Zi(a){if(!a._valueTracker){var s=ld(a)?"checked":"value";a._valueTracker=Mm(a,s,""+a[s])}}function ud(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),h="";return a&&(h=ld(a)?a.checked?"true":"false":a.value),a=h,a!==u?(s.setValue(a),!0):!1}function Ja(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var km=/[\n"\\]/g;function An(a){return a.replace(km,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function eo(a,s,u,h,v,w,M,B){a.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?a.type=M:a.removeAttribute("type"),s!=null?M==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+_n(s)):a.value!==""+_n(s)&&(a.value=""+_n(s)):M!=="submit"&&M!=="reset"||a.removeAttribute("value"),s!=null?gu(a,M,_n(s)):u!=null?gu(a,M,_n(u)):h!=null&&a.removeAttribute("value"),v==null&&w!=null&&(a.defaultChecked=!!w),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?a.name=""+_n(B):a.removeAttribute("name")}function cd(a,s,u,h,v,w,M,B){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(a.type=w),s!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||s!=null)){Zi(a);return}u=u!=null?""+_n(u):"",s=s!=null?""+_n(s):u,B||s===a.value||(a.value=s),a.defaultValue=s}h=h??v,h=typeof h!="function"&&typeof h!="symbol"&&!!h,a.checked=B?a.checked:!!h,a.defaultChecked=!!h,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(a.name=M),Zi(a)}function gu(a,s,u){s==="number"&&Ja(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function ri(a,s,u,h){if(a=a.options,s){s={};for(var v=0;v<u.length;v++)s["$"+u[v]]=!0;for(u=0;u<a.length;u++)v=s.hasOwnProperty("$"+a[u].value),a[u].selected!==v&&(a[u].selected=v),v&&h&&(a[u].defaultSelected=!0)}else{for(u=""+_n(u),s=null,v=0;v<a.length;v++){if(a[v].value===u){a[v].selected=!0,h&&(a[v].defaultSelected=!0);return}s!==null||a[v].disabled||(s=a[v])}s!==null&&(s.selected=!0)}}function Y2(a,s,u){if(s!=null&&(s=""+_n(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+_n(u):""}function X2(a,s,u,h){if(s==null){if(h!=null){if(u!=null)throw Error(r(92));if($(h)){if(1<h.length)throw Error(r(93));h=h[0]}u=h}u==null&&(u=""),s=u}u=_n(s),a.defaultValue=u,h=a.textContent,h===u&&h!==""&&h!==null&&(a.value=h),Zi(a)}function ds(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var R6=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 K2(a,s,u){var h=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":h?a.setProperty(s,u):typeof u!="number"||u===0||R6.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function W2(a,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?a.setProperty(h,""):h==="float"?a.cssFloat="":a[h]="");for(var v in s)h=s[v],s.hasOwnProperty(v)&&u[v]!==h&&K2(a,v,h)}else for(var w in s)s.hasOwnProperty(w)&&K2(a,w,s[w])}function Rm(a){if(a.indexOf("-")===-1)return!1;switch(a){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 P6=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"]]),D6=/^[\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 fd(a){return D6.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ii(){}var Pm=null;function Dm(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var hs=null,ps=null;function Q2(a){var s=Xi(a);if(s&&(a=s.stateNode)){var u=a[ln]||null;e:switch(a=s.stateNode,s.type){case"input":if(eo(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+An(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var h=u[s];if(h!==a&&h.form===a.form){var v=h[ln]||null;if(!v)throw Error(r(90));eo(h,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<u.length;s++)h=u[s],h.form===a.form&&ud(h)}break e;case"textarea":Y2(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&ri(a,!!u.multiple,s,!1)}}}var $m=!1;function Z2(a,s,u){if($m)return a(s,u);$m=!0;try{var h=a(s);return h}finally{if($m=!1,(hs!==null||ps!==null)&&(Zd(),hs&&(s=hs,a=ps,ps=hs=null,Q2(s),a)))for(s=0;s<a.length;s++)Q2(a[s])}}function vu(a,s){var u=a.stateNode;if(u===null)return null;var h=u[ln]||null;if(h===null)return null;u=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(a=a.type,h=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!h;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var ai=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),qm=!1;if(ai)try{var bu={};Object.defineProperty(bu,"passive",{get:function(){qm=!0}}),window.addEventListener("test",bu,bu),window.removeEventListener("test",bu,bu)}catch{qm=!1}var Ji=null,Lm=null,dd=null;function J2(){if(dd)return dd;var a,s=Lm,u=s.length,h,v="value"in Ji?Ji.value:Ji.textContent,w=v.length;for(a=0;a<u&&s[a]===v[a];a++);var M=u-a;for(h=1;h<=M&&s[u-h]===v[w-h];h++);return dd=v.slice(a,1<h?1-h:void 0)}function hd(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function pd(){return!0}function eA(){return!1}function On(a){function s(u,h,v,w,M){this._reactName=u,this._targetInst=v,this.type=h,this.nativeEvent=w,this.target=M,this.currentTarget=null;for(var B in a)a.hasOwnProperty(B)&&(u=a[B],this[B]=u?u(w):w[B]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?pd:eA,this.isPropagationStopped=eA,this}return p(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd}),s}var to={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yd=On(to),xu=p({},to,{view:0,detail:0}),$6=On(xu),zm,Bm,wu,md=p({},xu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Um,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==wu&&(wu&&a.type==="mousemove"?(zm=a.screenX-wu.screenX,Bm=a.screenY-wu.screenY):Bm=zm=0,wu=a),zm)},movementY:function(a){return"movementY"in a?a.movementY:Bm}}),tA=On(md),q6=p({},md,{dataTransfer:0}),L6=On(q6),z6=p({},xu,{relatedTarget:0}),Im=On(z6),B6=p({},to,{animationName:0,elapsedTime:0,pseudoElement:0}),I6=On(B6),U6=p({},to,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),H6=On(U6),V6=p({},to,{data:0}),nA=On(V6),G6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},F6={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"},Y6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function X6(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=Y6[a])?!!s[a]:!1}function Um(){return X6}var K6=p({},xu,{key:function(a){if(a.key){var s=G6[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=hd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?F6[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Um,charCode:function(a){return a.type==="keypress"?hd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?hd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),W6=On(K6),Q6=p({},md,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rA=On(Q6),Z6=p({},xu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Um}),J6=On(Z6),eL=p({},to,{propertyName:0,elapsedTime:0,pseudoElement:0}),tL=On(eL),nL=p({},md,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),rL=On(nL),iL=p({},to,{newState:0,oldState:0}),aL=On(iL),oL=[9,13,27,32],Hm=ai&&"CompositionEvent"in window,Su=null;ai&&"documentMode"in document&&(Su=document.documentMode);var sL=ai&&"TextEvent"in window&&!Su,iA=ai&&(!Hm||Su&&8<Su&&11>=Su),aA=" ",oA=!1;function sA(a,s){switch(a){case"keyup":return oL.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lA(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var ys=!1;function lL(a,s){switch(a){case"compositionend":return lA(s);case"keypress":return s.which!==32?null:(oA=!0,aA);case"textInput":return a=s.data,a===aA&&oA?null:a;default:return null}}function uL(a,s){if(ys)return a==="compositionend"||!Hm&&sA(a,s)?(a=J2(),dd=Lm=Ji=null,ys=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return iA&&s.locale!=="ko"?null:s.data;default:return null}}var cL={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 uA(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!cL[a.type]:s==="textarea"}function cA(a,s,u,h){hs?ps?ps.push(h):ps=[h]:hs=h,s=ah(s,"onChange"),0<s.length&&(u=new yd("onChange","change",null,u,h),a.push({event:u,listeners:s}))}var _u=null,Au=null;function fL(a){Fj(a,0)}function gd(a){var s=Ki(a);if(ud(s))return a}function fA(a,s){if(a==="change")return s}var dA=!1;if(ai){var Vm;if(ai){var Gm="oninput"in document;if(!Gm){var hA=document.createElement("div");hA.setAttribute("oninput","return;"),Gm=typeof hA.oninput=="function"}Vm=Gm}else Vm=!1;dA=Vm&&(!document.documentMode||9<document.documentMode)}function pA(){_u&&(_u.detachEvent("onpropertychange",yA),Au=_u=null)}function yA(a){if(a.propertyName==="value"&&gd(Au)){var s=[];cA(s,Au,a,Dm(a)),Z2(fL,s)}}function dL(a,s,u){a==="focusin"?(pA(),_u=s,Au=u,_u.attachEvent("onpropertychange",yA)):a==="focusout"&&pA()}function hL(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return gd(Au)}function pL(a,s){if(a==="click")return gd(s)}function yL(a,s){if(a==="input"||a==="change")return gd(s)}function mL(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Rn=typeof Object.is=="function"?Object.is:mL;function Ou(a,s){if(Rn(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),h=Object.keys(s);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var v=u[h];if(!Mt.call(s,v)||!Rn(a[v],s[v]))return!1}return!0}function mA(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function gA(a,s){var u=mA(a);a=0;for(var h;u;){if(u.nodeType===3){if(h=a+u.textContent.length,a<=s&&h>=s)return{node:u,offset:s-a};a=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=mA(u)}}function vA(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?vA(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function bA(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Ja(a.document);s instanceof a.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)a=s.contentWindow;else break;s=Ja(a.document)}return s}function Fm(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var gL=ai&&"documentMode"in document&&11>=document.documentMode,ms=null,Ym=null,ju=null,Xm=!1;function xA(a,s,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Xm||ms==null||ms!==Ja(h)||(h=ms,"selectionStart"in h&&Fm(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),ju&&Ou(ju,h)||(ju=h,h=ah(Ym,"onSelect"),0<h.length&&(s=new yd("onSelect","select",null,s,u),a.push({event:s,listeners:h}),s.target=ms)))}function no(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var gs={animationend:no("Animation","AnimationEnd"),animationiteration:no("Animation","AnimationIteration"),animationstart:no("Animation","AnimationStart"),transitionrun:no("Transition","TransitionRun"),transitionstart:no("Transition","TransitionStart"),transitioncancel:no("Transition","TransitionCancel"),transitionend:no("Transition","TransitionEnd")},Km={},wA={};ai&&(wA=document.createElement("div").style,"AnimationEvent"in window||(delete gs.animationend.animation,delete gs.animationiteration.animation,delete gs.animationstart.animation),"TransitionEvent"in window||delete gs.transitionend.transition);function ro(a){if(Km[a])return Km[a];if(!gs[a])return a;var s=gs[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in wA)return Km[a]=s[u];return a}var SA=ro("animationend"),_A=ro("animationiteration"),AA=ro("animationstart"),vL=ro("transitionrun"),bL=ro("transitionstart"),xL=ro("transitioncancel"),OA=ro("transitionend"),jA=new Map,Wm="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(" ");Wm.push("scrollEnd");function hr(a,s){jA.set(a,s),ni(s,[a])}var vd=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Yn=[],vs=0,Qm=0;function bd(){for(var a=vs,s=Qm=vs=0;s<a;){var u=Yn[s];Yn[s++]=null;var h=Yn[s];Yn[s++]=null;var v=Yn[s];Yn[s++]=null;var w=Yn[s];if(Yn[s++]=null,h!==null&&v!==null){var M=h.pending;M===null?v.next=v:(v.next=M.next,M.next=v),h.pending=v}w!==0&&EA(u,v,w)}}function xd(a,s,u,h){Yn[vs++]=a,Yn[vs++]=s,Yn[vs++]=u,Yn[vs++]=h,Qm|=h,a.lanes|=h,a=a.alternate,a!==null&&(a.lanes|=h)}function Zm(a,s,u,h){return xd(a,s,u,h),wd(a)}function io(a,s){return xd(a,null,null,s),wd(a)}function EA(a,s,u){a.lanes|=u;var h=a.alternate;h!==null&&(h.lanes|=u);for(var v=!1,w=a.return;w!==null;)w.childLanes|=u,h=w.alternate,h!==null&&(h.childLanes|=u),w.tag===22&&(a=w.stateNode,a===null||a._visibility&1||(v=!0)),a=w,w=w.return;return a.tag===3?(w=a.stateNode,v&&s!==null&&(v=31-mn(u),a=w.hiddenUpdates,h=a[v],h===null?a[v]=[s]:h.push(s),s.lane=u|536870912),w):null}function wd(a){if(50<Xu)throw Xu=0,s0=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var bs={};function wL(a,s,u,h){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pn(a,s,u,h){return new wL(a,s,u,h)}function Jm(a){return a=a.prototype,!(!a||!a.isReactComponent)}function oi(a,s){var u=a.alternate;return u===null?(u=Pn(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function NA(a,s){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,s=u.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function Sd(a,s,u,h,v,w){var M=0;if(h=a,typeof a=="function")Jm(a)&&(M=1);else if(typeof a=="string")M=jz(a,u,ee.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case q:return a=Pn(31,u,s,v),a.elementType=q,a.lanes=w,a;case S:return ao(u.children,v,w,s);case x:M=8,v|=24;break;case A:return a=Pn(12,u,s,v|2),a.elementType=A,a.lanes=w,a;case E:return a=Pn(13,u,s,v),a.elementType=E,a.lanes=w,a;case T:return a=Pn(19,u,s,v),a.elementType=T,a.lanes=w,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case O:M=10;break e;case j:M=9;break e;case N:M=11;break e;case C:M=14;break e;case D:M=16,h=null;break e}M=29,u=Error(r(130,a===null?"null":typeof a,"")),h=null}return s=Pn(M,u,s,v),s.elementType=a,s.type=h,s.lanes=w,s}function ao(a,s,u,h){return a=Pn(7,a,h,s),a.lanes=u,a}function eg(a,s,u){return a=Pn(6,a,null,s),a.lanes=u,a}function TA(a){var s=Pn(18,null,null,0);return s.stateNode=a,s}function tg(a,s,u){return s=Pn(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var CA=new WeakMap;function Xn(a,s){if(typeof a=="object"&&a!==null){var u=CA.get(a);return u!==void 0?u:(s={value:a,source:s,stack:Ct(s)},CA.set(a,s),s)}return{value:a,source:s,stack:Ct(s)}}var xs=[],ws=0,_d=null,Eu=0,Kn=[],Wn=0,ea=null,Rr=1,Pr="";function si(a,s){xs[ws++]=Eu,xs[ws++]=_d,_d=a,Eu=s}function MA(a,s,u){Kn[Wn++]=Rr,Kn[Wn++]=Pr,Kn[Wn++]=ea,ea=a;var h=Rr;a=Pr;var v=32-mn(h)-1;h&=~(1<<v),u+=1;var w=32-mn(s)+v;if(30<w){var M=v-v%5;w=(h&(1<<M)-1).toString(32),h>>=M,v-=M,Rr=1<<32-mn(s)+v|u<<v|h,Pr=w+a}else Rr=1<<w|u<<v|h,Pr=a}function ng(a){a.return!==null&&(si(a,1),MA(a,1,0))}function rg(a){for(;a===_d;)_d=xs[--ws],xs[ws]=null,Eu=xs[--ws],xs[ws]=null;for(;a===ea;)ea=Kn[--Wn],Kn[Wn]=null,Pr=Kn[--Wn],Kn[Wn]=null,Rr=Kn[--Wn],Kn[Wn]=null}function kA(a,s){Kn[Wn++]=Rr,Kn[Wn++]=Pr,Kn[Wn++]=ea,Rr=s.id,Pr=s.overflow,ea=a}var tn=null,yt=null,Fe=!1,ta=null,Qn=!1,ig=Error(r(519));function na(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Nu(Xn(s,a)),ig}function RA(a){var s=a.stateNode,u=a.type,h=a.memoizedProps;switch(s[Ut]=a,s[ln]=h,u){case"dialog":He("cancel",s),He("close",s);break;case"iframe":case"object":case"embed":He("load",s);break;case"video":case"audio":for(u=0;u<Wu.length;u++)He(Wu[u],s);break;case"source":He("error",s);break;case"img":case"image":case"link":He("error",s),He("load",s);break;case"details":He("toggle",s);break;case"input":He("invalid",s),cd(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":He("invalid",s);break;case"textarea":He("invalid",s),X2(s,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||h.suppressHydrationWarning===!0||Wj(s.textContent,u)?(h.popover!=null&&(He("beforetoggle",s),He("toggle",s)),h.onScroll!=null&&He("scroll",s),h.onScrollEnd!=null&&He("scrollend",s),h.onClick!=null&&(s.onclick=ii),s=!0):s=!1,s||na(a,!0)}function PA(a){for(tn=a.return;tn;)switch(tn.tag){case 5:case 31:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:tn=tn.return}}function Ss(a){if(a!==tn)return!1;if(!Fe)return PA(a),Fe=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||S0(a.type,a.memoizedProps)),u=!u),u&&yt&&na(a),PA(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));yt=aE(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));yt=aE(a)}else s===27?(s=yt,ma(a.type)?(a=E0,E0=null,yt=a):yt=s):yt=tn?Jn(a.stateNode.nextSibling):null;return!0}function oo(){yt=tn=null,Fe=!1}function ag(){var a=ta;return a!==null&&(Tn===null?Tn=a:Tn.push.apply(Tn,a),ta=null),a}function Nu(a){ta===null?ta=[a]:ta.push(a)}var og=z(null),so=null,li=null;function ra(a,s,u){Z(og,s._currentValue),s._currentValue=u}function ui(a){a._currentValue=og.current,G(og)}function sg(a,s,u){for(;a!==null;){var h=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),a===u)break;a=a.return}}function lg(a,s,u,h){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var w=v.dependencies;if(w!==null){var M=v.child;w=w.firstContext;e:for(;w!==null;){var B=w;w=v;for(var X=0;X<s.length;X++)if(B.context===s[X]){w.lanes|=u,B=w.alternate,B!==null&&(B.lanes|=u),sg(w.return,u,a),h||(M=null);break e}w=B.next}}else if(v.tag===18){if(M=v.return,M===null)throw Error(r(341));M.lanes|=u,w=M.alternate,w!==null&&(w.lanes|=u),sg(M,u,a),M=null}else M=v.child;if(M!==null)M.return=v;else for(M=v;M!==null;){if(M===a){M=null;break}if(v=M.sibling,v!==null){v.return=M.return,M=v;break}M=M.return}v=M}}function _s(a,s,u,h){a=null;for(var v=s,w=!1;v!==null;){if(!w){if((v.flags&524288)!==0)w=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var M=v.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var B=v.type;Rn(v.pendingProps.value,M.value)||(a!==null?a.push(B):a=[B])}}else if(v===ye.current){if(M=v.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push(tc):a=[tc])}v=v.return}a!==null&&lg(s,a,u,h),s.flags|=262144}function Ad(a){for(a=a.firstContext;a!==null;){if(!Rn(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function lo(a){so=a,li=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function nn(a){return DA(so,a)}function Od(a,s){return so===null&&lo(a),DA(a,s)}function DA(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},li===null){if(a===null)throw Error(r(308));li=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else li=li.next=s;return u}var SL=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,h){a.push(h)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},_L=e.unstable_scheduleCallback,AL=e.unstable_NormalPriority,Pt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ug(){return{controller:new SL,data:new Map,refCount:0}}function Tu(a){a.refCount--,a.refCount===0&&_L(AL,function(){a.controller.abort()})}var Cu=null,cg=0,As=0,Os=null;function OL(a,s){if(Cu===null){var u=Cu=[];cg=0,As=h0(),Os={status:"pending",value:void 0,then:function(h){u.push(h)}}}return cg++,s.then($A,$A),s}function $A(){if(--cg===0&&Cu!==null){Os!==null&&(Os.status="fulfilled");var a=Cu;Cu=null,As=0,Os=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function jL(a,s){var u=[],h={status:"pending",value:null,reason:null,then:function(v){u.push(v)}};return a.then(function(){h.status="fulfilled",h.value=s;for(var v=0;v<u.length;v++)(0,u[v])(s)},function(v){for(h.status="rejected",h.reason=v,v=0;v<u.length;v++)(0,u[v])(void 0)}),h}var qA=k.S;k.S=function(a,s){xj=kt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&OL(a,s),qA!==null&&qA(a,s)};var uo=z(null);function fg(){var a=uo.current;return a!==null?a:ct.pooledCache}function jd(a,s){s===null?Z(uo,uo.current):Z(uo,s.pool)}function LA(){var a=fg();return a===null?null:{parent:Pt._currentValue,pool:a}}var js=Error(r(460)),dg=Error(r(474)),Ed=Error(r(542)),Nd={then:function(){}};function zA(a){return a=a.status,a==="fulfilled"||a==="rejected"}function BA(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(ii,ii),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,UA(a),a;default:if(typeof s.status=="string")s.then(ii,ii);else{if(a=ct,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(h){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=h}},function(h){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,UA(a),a}throw fo=s,js}}function co(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(fo=u,js):u}}var fo=null;function IA(){if(fo===null)throw Error(r(459));var a=fo;return fo=null,a}function UA(a){if(a===js||a===Ed)throw Error(r(483))}var Es=null,Mu=0;function Td(a){var s=Mu;return Mu+=1,Es===null&&(Es=[]),BA(Es,a,s)}function ku(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Cd(a,s){throw s.$$typeof===g?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function HA(a){function s(J,Q){if(a){var te=J.deletions;te===null?(J.deletions=[Q],J.flags|=16):te.push(Q)}}function u(J,Q){if(!a)return null;for(;Q!==null;)s(J,Q),Q=Q.sibling;return null}function h(J){for(var Q=new Map;J!==null;)J.key!==null?Q.set(J.key,J):Q.set(J.index,J),J=J.sibling;return Q}function v(J,Q){return J=oi(J,Q),J.index=0,J.sibling=null,J}function w(J,Q,te){return J.index=te,a?(te=J.alternate,te!==null?(te=te.index,te<Q?(J.flags|=67108866,Q):te):(J.flags|=67108866,Q)):(J.flags|=1048576,Q)}function M(J){return a&&J.alternate===null&&(J.flags|=67108866),J}function B(J,Q,te,ce){return Q===null||Q.tag!==6?(Q=eg(te,J.mode,ce),Q.return=J,Q):(Q=v(Q,te),Q.return=J,Q)}function X(J,Q,te,ce){var Ne=te.type;return Ne===S?se(J,Q,te.props.children,ce,te.key):Q!==null&&(Q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===D&&co(Ne)===Q.type)?(Q=v(Q,te.props),ku(Q,te),Q.return=J,Q):(Q=Sd(te.type,te.key,te.props,null,J.mode,ce),ku(Q,te),Q.return=J,Q)}function ne(J,Q,te,ce){return Q===null||Q.tag!==4||Q.stateNode.containerInfo!==te.containerInfo||Q.stateNode.implementation!==te.implementation?(Q=tg(te,J.mode,ce),Q.return=J,Q):(Q=v(Q,te.children||[]),Q.return=J,Q)}function se(J,Q,te,ce,Ne){return Q===null||Q.tag!==7?(Q=ao(te,J.mode,ce,Ne),Q.return=J,Q):(Q=v(Q,te),Q.return=J,Q)}function de(J,Q,te){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Q=eg(""+Q,J.mode,te),Q.return=J,Q;if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return te=Sd(Q.type,Q.key,Q.props,null,J.mode,te),ku(te,Q),te.return=J,te;case _:return Q=tg(Q,J.mode,te),Q.return=J,Q;case D:return Q=co(Q),de(J,Q,te)}if($(Q)||P(Q))return Q=ao(Q,J.mode,te,null),Q.return=J,Q;if(typeof Q.then=="function")return de(J,Td(Q),te);if(Q.$$typeof===O)return de(J,Od(J,Q),te);Cd(J,Q)}return null}function re(J,Q,te,ce){var Ne=Q!==null?Q.key:null;if(typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint")return Ne!==null?null:B(J,Q,""+te,ce);if(typeof te=="object"&&te!==null){switch(te.$$typeof){case b:return te.key===Ne?X(J,Q,te,ce):null;case _:return te.key===Ne?ne(J,Q,te,ce):null;case D:return te=co(te),re(J,Q,te,ce)}if($(te)||P(te))return Ne!==null?null:se(J,Q,te,ce,null);if(typeof te.then=="function")return re(J,Q,Td(te),ce);if(te.$$typeof===O)return re(J,Q,Od(J,te),ce);Cd(J,te)}return null}function oe(J,Q,te,ce,Ne){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return J=J.get(te)||null,B(Q,J,""+ce,Ne);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case b:return J=J.get(ce.key===null?te:ce.key)||null,X(Q,J,ce,Ne);case _:return J=J.get(ce.key===null?te:ce.key)||null,ne(Q,J,ce,Ne);case D:return ce=co(ce),oe(J,Q,te,ce,Ne)}if($(ce)||P(ce))return J=J.get(te)||null,se(Q,J,ce,Ne,null);if(typeof ce.then=="function")return oe(J,Q,te,Td(ce),Ne);if(ce.$$typeof===O)return oe(J,Q,te,Od(Q,ce),Ne);Cd(Q,ce)}return null}function Ae(J,Q,te,ce){for(var Ne=null,We=null,Oe=Q,qe=Q=0,Ge=null;Oe!==null&&qe<te.length;qe++){Oe.index>qe?(Ge=Oe,Oe=null):Ge=Oe.sibling;var Qe=re(J,Oe,te[qe],ce);if(Qe===null){Oe===null&&(Oe=Ge);break}a&&Oe&&Qe.alternate===null&&s(J,Oe),Q=w(Qe,Q,qe),We===null?Ne=Qe:We.sibling=Qe,We=Qe,Oe=Ge}if(qe===te.length)return u(J,Oe),Fe&&si(J,qe),Ne;if(Oe===null){for(;qe<te.length;qe++)Oe=de(J,te[qe],ce),Oe!==null&&(Q=w(Oe,Q,qe),We===null?Ne=Oe:We.sibling=Oe,We=Oe);return Fe&&si(J,qe),Ne}for(Oe=h(Oe);qe<te.length;qe++)Ge=oe(Oe,J,qe,te[qe],ce),Ge!==null&&(a&&Ge.alternate!==null&&Oe.delete(Ge.key===null?qe:Ge.key),Q=w(Ge,Q,qe),We===null?Ne=Ge:We.sibling=Ge,We=Ge);return a&&Oe.forEach(function(wa){return s(J,wa)}),Fe&&si(J,qe),Ne}function Te(J,Q,te,ce){if(te==null)throw Error(r(151));for(var Ne=null,We=null,Oe=Q,qe=Q=0,Ge=null,Qe=te.next();Oe!==null&&!Qe.done;qe++,Qe=te.next()){Oe.index>qe?(Ge=Oe,Oe=null):Ge=Oe.sibling;var wa=re(J,Oe,Qe.value,ce);if(wa===null){Oe===null&&(Oe=Ge);break}a&&Oe&&wa.alternate===null&&s(J,Oe),Q=w(wa,Q,qe),We===null?Ne=wa:We.sibling=wa,We=wa,Oe=Ge}if(Qe.done)return u(J,Oe),Fe&&si(J,qe),Ne;if(Oe===null){for(;!Qe.done;qe++,Qe=te.next())Qe=de(J,Qe.value,ce),Qe!==null&&(Q=w(Qe,Q,qe),We===null?Ne=Qe:We.sibling=Qe,We=Qe);return Fe&&si(J,qe),Ne}for(Oe=h(Oe);!Qe.done;qe++,Qe=te.next())Qe=oe(Oe,J,qe,Qe.value,ce),Qe!==null&&(a&&Qe.alternate!==null&&Oe.delete(Qe.key===null?qe:Qe.key),Q=w(Qe,Q,qe),We===null?Ne=Qe:We.sibling=Qe,We=Qe);return a&&Oe.forEach(function(qz){return s(J,qz)}),Fe&&si(J,qe),Ne}function lt(J,Q,te,ce){if(typeof te=="object"&&te!==null&&te.type===S&&te.key===null&&(te=te.props.children),typeof te=="object"&&te!==null){switch(te.$$typeof){case b:e:{for(var Ne=te.key;Q!==null;){if(Q.key===Ne){if(Ne=te.type,Ne===S){if(Q.tag===7){u(J,Q.sibling),ce=v(Q,te.props.children),ce.return=J,J=ce;break e}}else if(Q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===D&&co(Ne)===Q.type){u(J,Q.sibling),ce=v(Q,te.props),ku(ce,te),ce.return=J,J=ce;break e}u(J,Q);break}else s(J,Q);Q=Q.sibling}te.type===S?(ce=ao(te.props.children,J.mode,ce,te.key),ce.return=J,J=ce):(ce=Sd(te.type,te.key,te.props,null,J.mode,ce),ku(ce,te),ce.return=J,J=ce)}return M(J);case _:e:{for(Ne=te.key;Q!==null;){if(Q.key===Ne)if(Q.tag===4&&Q.stateNode.containerInfo===te.containerInfo&&Q.stateNode.implementation===te.implementation){u(J,Q.sibling),ce=v(Q,te.children||[]),ce.return=J,J=ce;break e}else{u(J,Q);break}else s(J,Q);Q=Q.sibling}ce=tg(te,J.mode,ce),ce.return=J,J=ce}return M(J);case D:return te=co(te),lt(J,Q,te,ce)}if($(te))return Ae(J,Q,te,ce);if(P(te)){if(Ne=P(te),typeof Ne!="function")throw Error(r(150));return te=Ne.call(te),Te(J,Q,te,ce)}if(typeof te.then=="function")return lt(J,Q,Td(te),ce);if(te.$$typeof===O)return lt(J,Q,Od(J,te),ce);Cd(J,te)}return typeof te=="string"&&te!==""||typeof te=="number"||typeof te=="bigint"?(te=""+te,Q!==null&&Q.tag===6?(u(J,Q.sibling),ce=v(Q,te),ce.return=J,J=ce):(u(J,Q),ce=eg(te,J.mode,ce),ce.return=J,J=ce),M(J)):u(J,Q)}return function(J,Q,te,ce){try{Mu=0;var Ne=lt(J,Q,te,ce);return Es=null,Ne}catch(Oe){if(Oe===js||Oe===Ed)throw Oe;var We=Pn(29,Oe,null,J.mode);return We.lanes=ce,We.return=J,We}finally{}}}var ho=HA(!0),VA=HA(!1),ia=!1;function hg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pg(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function aa(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function oa(a,s,u){var h=a.updateQueue;if(h===null)return null;if(h=h.shared,(Je&2)!==0){var v=h.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),h.pending=s,s=wd(a),EA(a,null,u),s}return xd(a,h,s,u),wd(a)}function Ru(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var h=s.lanes;h&=a.pendingLanes,u|=h,s.lanes=u,Jf(a,u)}}function yg(a,s){var u=a.updateQueue,h=a.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var v=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?v=w=M:w=w.next=M,u=u.next}while(u!==null);w===null?v=w=s:w=w.next=s}else v=w=s;u={baseState:h.baseState,firstBaseUpdate:v,lastBaseUpdate:w,shared:h.shared,callbacks:h.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var mg=!1;function Pu(){if(mg){var a=Os;if(a!==null)throw a}}function Du(a,s,u,h){mg=!1;var v=a.updateQueue;ia=!1;var w=v.firstBaseUpdate,M=v.lastBaseUpdate,B=v.shared.pending;if(B!==null){v.shared.pending=null;var X=B,ne=X.next;X.next=null,M===null?w=ne:M.next=ne,M=X;var se=a.alternate;se!==null&&(se=se.updateQueue,B=se.lastBaseUpdate,B!==M&&(B===null?se.firstBaseUpdate=ne:B.next=ne,se.lastBaseUpdate=X))}if(w!==null){var de=v.baseState;M=0,se=ne=X=null,B=w;do{var re=B.lane&-536870913,oe=re!==B.lane;if(oe?(Ve&re)===re:(h&re)===re){re!==0&&re===As&&(mg=!0),se!==null&&(se=se.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var Ae=a,Te=B;re=s;var lt=u;switch(Te.tag){case 1:if(Ae=Te.payload,typeof Ae=="function"){de=Ae.call(lt,de,re);break e}de=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Te.payload,re=typeof Ae=="function"?Ae.call(lt,de,re):Ae,re==null)break e;de=p({},de,re);break e;case 2:ia=!0}}re=B.callback,re!==null&&(a.flags|=64,oe&&(a.flags|=8192),oe=v.callbacks,oe===null?v.callbacks=[re]:oe.push(re))}else oe={lane:re,tag:B.tag,payload:B.payload,callback:B.callback,next:null},se===null?(ne=se=oe,X=de):se=se.next=oe,M|=re;if(B=B.next,B===null){if(B=v.shared.pending,B===null)break;oe=B,B=oe.next,oe.next=null,v.lastBaseUpdate=oe,v.shared.pending=null}}while(!0);se===null&&(X=de),v.baseState=X,v.firstBaseUpdate=ne,v.lastBaseUpdate=se,w===null&&(v.shared.lanes=0),fa|=M,a.lanes=M,a.memoizedState=de}}function GA(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function FA(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)GA(u[a],s)}var Ns=z(null),Md=z(0);function YA(a,s){a=vi,Z(Md,a),Z(Ns,s),vi=a|s.baseLanes}function gg(){Z(Md,vi),Z(Ns,Ns.current)}function vg(){vi=Md.current,G(Ns),G(Md)}var Dn=z(null),Zn=null;function sa(a){var s=a.alternate;Z(Nt,Nt.current&1),Z(Dn,a),Zn===null&&(s===null||Ns.current!==null||s.memoizedState!==null)&&(Zn=a)}function bg(a){Z(Nt,Nt.current),Z(Dn,a),Zn===null&&(Zn=a)}function XA(a){a.tag===22?(Z(Nt,Nt.current),Z(Dn,a),Zn===null&&(Zn=a)):la()}function la(){Z(Nt,Nt.current),Z(Dn,Dn.current)}function $n(a){G(Dn),Zn===a&&(Zn=null),G(Nt)}var Nt=z(0);function kd(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||O0(u)||j0(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ci=0,$e=null,ot=null,Dt=null,Rd=!1,Ts=!1,po=!1,Pd=0,$u=0,Cs=null,EL=0;function At(){throw Error(r(321))}function xg(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Rn(a[u],s[u]))return!1;return!0}function wg(a,s,u,h,v,w){return ci=w,$e=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,k.H=a===null||a.memoizedState===null?MO:$g,po=!1,w=u(h,v),po=!1,Ts&&(w=WA(s,u,h,v)),KA(a),w}function KA(a){k.H=zu;var s=ot!==null&&ot.next!==null;if(ci=0,Dt=ot=$e=null,Rd=!1,$u=0,Cs=null,s)throw Error(r(300));a===null||$t||(a=a.dependencies,a!==null&&Ad(a)&&($t=!0))}function WA(a,s,u,h){$e=a;var v=0;do{if(Ts&&(Cs=null),$u=0,Ts=!1,25<=v)throw Error(r(301));if(v+=1,Dt=ot=null,a.updateQueue!=null){var w=a.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}k.H=kO,w=s(u,h)}while(Ts);return w}function NL(){var a=k.H,s=a.useState()[0];return s=typeof s.then=="function"?qu(s):s,a=a.useState()[0],(ot!==null?ot.memoizedState:null)!==a&&($e.flags|=1024),s}function Sg(){var a=Pd!==0;return Pd=0,a}function _g(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function Ag(a){if(Rd){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Rd=!1}ci=0,Dt=ot=$e=null,Ts=!1,$u=Pd=0,Cs=null}function gn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?$e.memoizedState=Dt=a:Dt=Dt.next=a,Dt}function Tt(){if(ot===null){var a=$e.alternate;a=a!==null?a.memoizedState:null}else a=ot.next;var s=Dt===null?$e.memoizedState:Dt.next;if(s!==null)Dt=s,ot=a;else{if(a===null)throw $e.alternate===null?Error(r(467)):Error(r(310));ot=a,a={memoizedState:ot.memoizedState,baseState:ot.baseState,baseQueue:ot.baseQueue,queue:ot.queue,next:null},Dt===null?$e.memoizedState=Dt=a:Dt=Dt.next=a}return Dt}function Dd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qu(a){var s=$u;return $u+=1,Cs===null&&(Cs=[]),a=BA(Cs,a,s),s=$e,(Dt===null?s.memoizedState:Dt.next)===null&&(s=s.alternate,k.H=s===null||s.memoizedState===null?MO:$g),a}function $d(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return qu(a);if(a.$$typeof===O)return nn(a)}throw Error(r(438,String(a)))}function Og(a){var s=null,u=$e.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var h=$e.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=Dd(),$e.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),h=0;h<a;h++)u[h]=F;return s.index++,u}function fi(a,s){return typeof s=="function"?s(a):s}function qd(a){var s=Tt();return jg(s,ot,a)}function jg(a,s,u){var h=a.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=u;var v=a.baseQueue,w=h.pending;if(w!==null){if(v!==null){var M=v.next;v.next=w.next,w.next=M}s.baseQueue=v=w,h.pending=null}if(w=a.baseState,v===null)a.memoizedState=w;else{s=v.next;var B=M=null,X=null,ne=s,se=!1;do{var de=ne.lane&-536870913;if(de!==ne.lane?(Ve&de)===de:(ci&de)===de){var re=ne.revertLane;if(re===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),de===As&&(se=!0);else if((ci&re)===re){ne=ne.next,re===As&&(se=!0);continue}else de={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},X===null?(B=X=de,M=w):X=X.next=de,$e.lanes|=re,fa|=re;de=ne.action,po&&u(w,de),w=ne.hasEagerState?ne.eagerState:u(w,de)}else re={lane:de,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},X===null?(B=X=re,M=w):X=X.next=re,$e.lanes|=de,fa|=de;ne=ne.next}while(ne!==null&&ne!==s);if(X===null?M=w:X.next=B,!Rn(w,a.memoizedState)&&($t=!0,se&&(u=Os,u!==null)))throw u;a.memoizedState=w,a.baseState=M,a.baseQueue=X,h.lastRenderedState=w}return v===null&&(h.lanes=0),[a.memoizedState,h.dispatch]}function Eg(a){var s=Tt(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var h=u.dispatch,v=u.pending,w=s.memoizedState;if(v!==null){u.pending=null;var M=v=v.next;do w=a(w,M.action),M=M.next;while(M!==v);Rn(w,s.memoizedState)||($t=!0),s.memoizedState=w,s.baseQueue===null&&(s.baseState=w),u.lastRenderedState=w}return[w,h]}function QA(a,s,u){var h=$e,v=Tt(),w=Fe;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=s();var M=!Rn((ot||v).memoizedState,u);if(M&&(v.memoizedState=u,$t=!0),v=v.queue,Cg(eO.bind(null,h,v,a),[a]),v.getSnapshot!==s||M||Dt!==null&&Dt.memoizedState.tag&1){if(h.flags|=2048,Ms(9,{destroy:void 0},JA.bind(null,h,v,u,s),null),ct===null)throw Error(r(349));w||(ci&127)!==0||ZA(h,s,u)}return u}function ZA(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=$e.updateQueue,s===null?(s=Dd(),$e.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function JA(a,s,u,h){s.value=u,s.getSnapshot=h,tO(s)&&nO(a)}function eO(a,s,u){return u(function(){tO(s)&&nO(a)})}function tO(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Rn(a,u)}catch{return!0}}function nO(a){var s=io(a,2);s!==null&&Cn(s,a,2)}function Ng(a){var s=gn();if(typeof a=="function"){var u=a;if(a=u(),po){Mr(!0);try{u()}finally{Mr(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:a},s}function rO(a,s,u,h){return a.baseState=u,jg(a,ot,typeof h=="function"?h:fi)}function TL(a,s,u,h,v){if(Bd(a))throw Error(r(485));if(a=s.action,a!==null){var w={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){w.listeners.push(M)}};k.T!==null?u(!0):w.isTransition=!1,h(w),u=s.pending,u===null?(w.next=s.pending=w,iO(s,w)):(w.next=u.next,s.pending=u.next=w)}}function iO(a,s){var u=s.action,h=s.payload,v=a.state;if(s.isTransition){var w=k.T,M={};k.T=M;try{var B=u(v,h),X=k.S;X!==null&&X(M,B),aO(a,s,B)}catch(ne){Tg(a,s,ne)}finally{w!==null&&M.types!==null&&(w.types=M.types),k.T=w}}else try{w=u(v,h),aO(a,s,w)}catch(ne){Tg(a,s,ne)}}function aO(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){oO(a,s,h)},function(h){return Tg(a,s,h)}):oO(a,s,u)}function oO(a,s,u){s.status="fulfilled",s.value=u,sO(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,iO(a,u)))}function Tg(a,s,u){var h=a.pending;if(a.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=u,sO(s),s=s.next;while(s!==h)}a.action=null}function sO(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function lO(a,s){return s}function uO(a,s){if(Fe){var u=ct.formState;if(u!==null){e:{var h=$e;if(Fe){if(yt){t:{for(var v=yt,w=Qn;v.nodeType!==8;){if(!w){v=null;break t}if(v=Jn(v.nextSibling),v===null){v=null;break t}}w=v.data,v=w==="F!"||w==="F"?v:null}if(v){yt=Jn(v.nextSibling),h=v.data==="F!";break e}}na(h)}h=!1}h&&(s=u[0])}}return u=gn(),u.memoizedState=u.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:lO,lastRenderedState:s},u.queue=h,u=NO.bind(null,$e,h),h.dispatch=u,h=Ng(!1),w=Dg.bind(null,$e,!1,h.queue),h=gn(),v={state:s,dispatch:null,action:a,pending:null},h.queue=v,u=TL.bind(null,$e,v,w,u),v.dispatch=u,h.memoizedState=a,[s,u,!1]}function cO(a){var s=Tt();return fO(s,ot,a)}function fO(a,s,u){if(s=jg(a,s,lO)[0],a=qd(fi)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=qu(s)}catch(M){throw M===js?Ed:M}else h=s;s=Tt();var v=s.queue,w=v.dispatch;return u!==s.memoizedState&&($e.flags|=2048,Ms(9,{destroy:void 0},CL.bind(null,v,u),null)),[h,w,a]}function CL(a,s){a.action=s}function dO(a){var s=Tt(),u=ot;if(u!==null)return fO(s,u,a);Tt(),s=s.memoizedState,u=Tt();var h=u.queue.dispatch;return u.memoizedState=a,[s,h,!1]}function Ms(a,s,u,h){return a={tag:a,create:u,deps:h,inst:s,next:null},s=$e.updateQueue,s===null&&(s=Dd(),$e.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(h=u.next,u.next=a,a.next=h,s.lastEffect=a),a}function hO(){return Tt().memoizedState}function Ld(a,s,u,h){var v=gn();$e.flags|=a,v.memoizedState=Ms(1|s,{destroy:void 0},u,h===void 0?null:h)}function zd(a,s,u,h){var v=Tt();h=h===void 0?null:h;var w=v.memoizedState.inst;ot!==null&&h!==null&&xg(h,ot.memoizedState.deps)?v.memoizedState=Ms(s,w,u,h):($e.flags|=a,v.memoizedState=Ms(1|s,w,u,h))}function pO(a,s){Ld(8390656,8,a,s)}function Cg(a,s){zd(2048,8,a,s)}function ML(a){$e.flags|=4;var s=$e.updateQueue;if(s===null)s=Dd(),$e.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function yO(a){var s=Tt().memoizedState;return ML({ref:s,nextImpl:a}),function(){if((Je&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function mO(a,s){return zd(4,2,a,s)}function gO(a,s){return zd(4,4,a,s)}function vO(a,s){if(typeof s=="function"){a=a();var u=s(a);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function bO(a,s,u){u=u!=null?u.concat([a]):null,zd(4,4,vO.bind(null,s,a),u)}function Mg(){}function xO(a,s){var u=Tt();s=s===void 0?null:s;var h=u.memoizedState;return s!==null&&xg(s,h[1])?h[0]:(u.memoizedState=[a,s],a)}function wO(a,s){var u=Tt();s=s===void 0?null:s;var h=u.memoizedState;if(s!==null&&xg(s,h[1]))return h[0];if(h=a(),po){Mr(!0);try{a()}finally{Mr(!1)}}return u.memoizedState=[h,s],h}function kg(a,s,u){return u===void 0||(ci&1073741824)!==0&&(Ve&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=Sj(),$e.lanes|=a,fa|=a,u)}function SO(a,s,u,h){return Rn(u,s)?u:Ns.current!==null?(a=kg(a,u,h),Rn(a,s)||($t=!0),a):(ci&42)===0||(ci&1073741824)!==0&&(Ve&261930)===0?($t=!0,a.memoizedState=u):(a=Sj(),$e.lanes|=a,fa|=a,s)}function _O(a,s,u,h,v){var w=I.p;I.p=w!==0&&8>w?w:8;var M=k.T,B={};k.T=B,Dg(a,!1,s,u);try{var X=v(),ne=k.S;if(ne!==null&&ne(B,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var se=jL(X,h);Lu(a,s,se,zn(a))}else Lu(a,s,h,zn(a))}catch(de){Lu(a,s,{then:function(){},status:"rejected",reason:de},zn())}finally{I.p=w,M!==null&&B.types!==null&&(M.types=B.types),k.T=M}}function kL(){}function Rg(a,s,u,h){if(a.tag!==5)throw Error(r(476));var v=AO(a).queue;_O(a,v,s,H,u===null?kL:function(){return OO(a),u(h)})}function AO(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:H,baseState:H,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:H},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fi,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function OO(a){var s=AO(a);s.next===null&&(s=a.alternate.memoizedState),Lu(a,s.next.queue,{},zn())}function Pg(){return nn(tc)}function jO(){return Tt().memoizedState}function EO(){return Tt().memoizedState}function RL(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=zn();a=aa(u);var h=oa(s,a,u);h!==null&&(Cn(h,s,u),Ru(h,s,u)),s={cache:ug()},a.payload=s;return}s=s.return}}function PL(a,s,u){var h=zn();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Bd(a)?TO(s,u):(u=Zm(a,s,u,h),u!==null&&(Cn(u,a,h),CO(u,s,h)))}function NO(a,s,u){var h=zn();Lu(a,s,u,h)}function Lu(a,s,u,h){var v={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Bd(a))TO(s,v);else{var w=a.alternate;if(a.lanes===0&&(w===null||w.lanes===0)&&(w=s.lastRenderedReducer,w!==null))try{var M=s.lastRenderedState,B=w(M,u);if(v.hasEagerState=!0,v.eagerState=B,Rn(B,M))return xd(a,s,v,0),ct===null&&bd(),!1}catch{}finally{}if(u=Zm(a,s,v,h),u!==null)return Cn(u,a,h),CO(u,s,h),!0}return!1}function Dg(a,s,u,h){if(h={lane:2,revertLane:h0(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},Bd(a)){if(s)throw Error(r(479))}else s=Zm(a,u,h,2),s!==null&&Cn(s,a,2)}function Bd(a){var s=a.alternate;return a===$e||s!==null&&s===$e}function TO(a,s){Ts=Rd=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function CO(a,s,u){if((u&4194048)!==0){var h=s.lanes;h&=a.pendingLanes,u|=h,s.lanes=u,Jf(a,u)}}var zu={readContext:nn,use:$d,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};zu.useEffectEvent=At;var MO={readContext:nn,use:$d,useCallback:function(a,s){return gn().memoizedState=[a,s===void 0?null:s],a},useContext:nn,useEffect:pO,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,Ld(4194308,4,vO.bind(null,s,a),u)},useLayoutEffect:function(a,s){return Ld(4194308,4,a,s)},useInsertionEffect:function(a,s){Ld(4,2,a,s)},useMemo:function(a,s){var u=gn();s=s===void 0?null:s;var h=a();if(po){Mr(!0);try{a()}finally{Mr(!1)}}return u.memoizedState=[h,s],h},useReducer:function(a,s,u){var h=gn();if(u!==void 0){var v=u(s);if(po){Mr(!0);try{u(s)}finally{Mr(!1)}}}else v=s;return h.memoizedState=h.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},h.queue=a,a=a.dispatch=PL.bind(null,$e,a),[h.memoizedState,a]},useRef:function(a){var s=gn();return a={current:a},s.memoizedState=a},useState:function(a){a=Ng(a);var s=a.queue,u=NO.bind(null,$e,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:Mg,useDeferredValue:function(a,s){var u=gn();return kg(u,a,s)},useTransition:function(){var a=Ng(!1);return a=_O.bind(null,$e,a.queue,!0,!1),gn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var h=$e,v=gn();if(Fe){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),ct===null)throw Error(r(349));(Ve&127)!==0||ZA(h,s,u)}v.memoizedState=u;var w={value:u,getSnapshot:s};return v.queue=w,pO(eO.bind(null,h,w,a),[a]),h.flags|=2048,Ms(9,{destroy:void 0},JA.bind(null,h,w,u,s),null),u},useId:function(){var a=gn(),s=ct.identifierPrefix;if(Fe){var u=Pr,h=Rr;u=(h&~(1<<32-mn(h)-1)).toString(32)+u,s="_"+s+"R_"+u,u=Pd++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=EL++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Pg,useFormState:uO,useActionState:uO,useOptimistic:function(a){var s=gn();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=Dg.bind(null,$e,!0,u),u.dispatch=s,[a,s]},useMemoCache:Og,useCacheRefresh:function(){return gn().memoizedState=RL.bind(null,$e)},useEffectEvent:function(a){var s=gn(),u={impl:a};return s.memoizedState=u,function(){if((Je&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},$g={readContext:nn,use:$d,useCallback:xO,useContext:nn,useEffect:Cg,useImperativeHandle:bO,useInsertionEffect:mO,useLayoutEffect:gO,useMemo:wO,useReducer:qd,useRef:hO,useState:function(){return qd(fi)},useDebugValue:Mg,useDeferredValue:function(a,s){var u=Tt();return SO(u,ot.memoizedState,a,s)},useTransition:function(){var a=qd(fi)[0],s=Tt().memoizedState;return[typeof a=="boolean"?a:qu(a),s]},useSyncExternalStore:QA,useId:jO,useHostTransitionStatus:Pg,useFormState:cO,useActionState:cO,useOptimistic:function(a,s){var u=Tt();return rO(u,ot,a,s)},useMemoCache:Og,useCacheRefresh:EO};$g.useEffectEvent=yO;var kO={readContext:nn,use:$d,useCallback:xO,useContext:nn,useEffect:Cg,useImperativeHandle:bO,useInsertionEffect:mO,useLayoutEffect:gO,useMemo:wO,useReducer:Eg,useRef:hO,useState:function(){return Eg(fi)},useDebugValue:Mg,useDeferredValue:function(a,s){var u=Tt();return ot===null?kg(u,a,s):SO(u,ot.memoizedState,a,s)},useTransition:function(){var a=Eg(fi)[0],s=Tt().memoizedState;return[typeof a=="boolean"?a:qu(a),s]},useSyncExternalStore:QA,useId:jO,useHostTransitionStatus:Pg,useFormState:dO,useActionState:dO,useOptimistic:function(a,s){var u=Tt();return ot!==null?rO(u,ot,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Og,useCacheRefresh:EO};kO.useEffectEvent=yO;function qg(a,s,u,h){s=a.memoizedState,u=u(h,s),u=u==null?s:p({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var Lg={enqueueSetState:function(a,s,u){a=a._reactInternals;var h=zn(),v=aa(h);v.payload=s,u!=null&&(v.callback=u),s=oa(a,v,h),s!==null&&(Cn(s,a,h),Ru(s,a,h))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var h=zn(),v=aa(h);v.tag=1,v.payload=s,u!=null&&(v.callback=u),s=oa(a,v,h),s!==null&&(Cn(s,a,h),Ru(s,a,h))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=zn(),h=aa(u);h.tag=2,s!=null&&(h.callback=s),s=oa(a,h,u),s!==null&&(Cn(s,a,u),Ru(s,a,u))}};function RO(a,s,u,h,v,w,M){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(h,w,M):s.prototype&&s.prototype.isPureReactComponent?!Ou(u,h)||!Ou(v,w):!0}function PO(a,s,u,h){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,h),s.state!==a&&Lg.enqueueReplaceState(s,s.state,null)}function yo(a,s){var u=s;if("ref"in s){u={};for(var h in s)h!=="ref"&&(u[h]=s[h])}if(a=a.defaultProps){u===s&&(u=p({},u));for(var v in a)u[v]===void 0&&(u[v]=a[v])}return u}function DO(a){vd(a)}function $O(a){console.error(a)}function qO(a){vd(a)}function Id(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function LO(a,s,u){try{var h=a.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function zg(a,s,u){return u=aa(u),u.tag=3,u.payload={element:null},u.callback=function(){Id(a,s)},u}function zO(a){return a=aa(a),a.tag=3,a}function BO(a,s,u,h){var v=u.type.getDerivedStateFromError;if(typeof v=="function"){var w=h.value;a.payload=function(){return v(w)},a.callback=function(){LO(s,u,h)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(a.callback=function(){LO(s,u,h),typeof v!="function"&&(da===null?da=new Set([this]):da.add(this));var B=h.stack;this.componentDidCatch(h.value,{componentStack:B!==null?B:""})})}function DL(a,s,u,h,v){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=u.alternate,s!==null&&_s(s,u,v,!0),u=Dn.current,u!==null){switch(u.tag){case 31:case 13:return Zn===null?Jd():u.alternate===null&&Ot===0&&(Ot=3),u.flags&=-257,u.flags|=65536,u.lanes=v,h===Nd?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([h]):s.add(h),c0(a,h,v)),!1;case 22:return u.flags|=65536,h===Nd?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([h]):u.add(h)),c0(a,h,v)),!1}throw Error(r(435,u.tag))}return c0(a,h,v),Jd(),!1}if(Fe)return s=Dn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,h!==ig&&(a=Error(r(422),{cause:h}),Nu(Xn(a,u)))):(h!==ig&&(s=Error(r(423),{cause:h}),Nu(Xn(s,u))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,h=Xn(h,u),v=zg(a.stateNode,h,v),yg(a,v),Ot!==4&&(Ot=2)),!1;var w=Error(r(520),{cause:h});if(w=Xn(w,u),Yu===null?Yu=[w]:Yu.push(w),Ot!==4&&(Ot=2),s===null)return!0;h=Xn(h,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=v&-v,u.lanes|=a,a=zg(u.stateNode,h,a),yg(u,a),!1;case 1:if(s=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(da===null||!da.has(w))))return u.flags|=65536,v&=-v,u.lanes|=v,v=zO(v),BO(v,a,u,h),yg(u,v),!1}u=u.return}while(u!==null);return!1}var Bg=Error(r(461)),$t=!1;function rn(a,s,u,h){s.child=a===null?VA(s,null,u,h):ho(s,a.child,u,h)}function IO(a,s,u,h,v){u=u.render;var w=s.ref;if("ref"in h){var M={};for(var B in h)B!=="ref"&&(M[B]=h[B])}else M=h;return lo(s),h=wg(a,s,u,M,w,v),B=Sg(),a!==null&&!$t?(_g(a,s,v),di(a,s,v)):(Fe&&B&&ng(s),s.flags|=1,rn(a,s,h,v),s.child)}function UO(a,s,u,h,v){if(a===null){var w=u.type;return typeof w=="function"&&!Jm(w)&&w.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=w,HO(a,s,w,h,v)):(a=Sd(u.type,null,h,s,s.mode,v),a.ref=s.ref,a.return=s,s.child=a)}if(w=a.child,!Xg(a,v)){var M=w.memoizedProps;if(u=u.compare,u=u!==null?u:Ou,u(M,h)&&a.ref===s.ref)return di(a,s,v)}return s.flags|=1,a=oi(w,h),a.ref=s.ref,a.return=s,s.child=a}function HO(a,s,u,h,v){if(a!==null){var w=a.memoizedProps;if(Ou(w,h)&&a.ref===s.ref)if($t=!1,s.pendingProps=h=w,Xg(a,v))(a.flags&131072)!==0&&($t=!0);else return s.lanes=a.lanes,di(a,s,v)}return Ig(a,s,u,h,v)}function VO(a,s,u,h){var v=h.children,w=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,a!==null){for(h=s.child=a.child,v=0;h!==null;)v=v|h.lanes|h.childLanes,h=h.sibling;h=v&~w}else h=0,s.child=null;return GO(a,s,w,u,h)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&jd(s,w!==null?w.cachePool:null),w!==null?YA(s,w):gg(),XA(s);else return h=s.lanes=536870912,GO(a,s,w!==null?w.baseLanes|u:u,u,h)}else w!==null?(jd(s,w.cachePool),YA(s,w),la(),s.memoizedState=null):(a!==null&&jd(s,null),gg(),la());return rn(a,s,v,u),s.child}function Bu(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function GO(a,s,u,h,v){var w=fg();return w=w===null?null:{parent:Pt._currentValue,pool:w},s.memoizedState={baseLanes:u,cachePool:w},a!==null&&jd(s,null),gg(),XA(s),a!==null&&_s(a,s,h,!0),s.childLanes=v,null}function Ud(a,s){return s=Vd({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function FO(a,s,u){return ho(s,a.child,null,u),a=Ud(s,s.pendingProps),a.flags|=2,$n(s),s.memoizedState=null,a}function $L(a,s,u){var h=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Fe){if(h.mode==="hidden")return a=Ud(s,h),s.lanes=536870912,Bu(null,a);if(bg(s),(a=yt)?(a=iE(a,Qn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:ea!==null?{id:Rr,overflow:Pr}:null,retryLane:536870912,hydrationErrors:null},u=TA(a),u.return=s,s.child=u,tn=s,yt=null)):a=null,a===null)throw na(s);return s.lanes=536870912,null}return Ud(s,h)}var w=a.memoizedState;if(w!==null){var M=w.dehydrated;if(bg(s),v)if(s.flags&256)s.flags&=-257,s=FO(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if($t||_s(a,s,u,!1),v=(u&a.childLanes)!==0,$t||v){if(h=ct,h!==null&&(M=ed(h,u),M!==0&&M!==w.retryLane))throw w.retryLane=M,io(a,M),Cn(h,a,M),Bg;Jd(),s=FO(a,s,u)}else a=w.treeContext,yt=Jn(M.nextSibling),tn=s,Fe=!0,ta=null,Qn=!1,a!==null&&kA(s,a),s=Ud(s,h),s.flags|=4096;return s}return a=oi(a.child,{mode:h.mode,children:h.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Hd(a,s){var u=s.ref;if(u===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(s.flags|=4194816)}}function Ig(a,s,u,h,v){return lo(s),u=wg(a,s,u,h,void 0,v),h=Sg(),a!==null&&!$t?(_g(a,s,v),di(a,s,v)):(Fe&&h&&ng(s),s.flags|=1,rn(a,s,u,v),s.child)}function YO(a,s,u,h,v,w){return lo(s),s.updateQueue=null,u=WA(s,h,u,v),KA(a),h=Sg(),a!==null&&!$t?(_g(a,s,w),di(a,s,w)):(Fe&&h&&ng(s),s.flags|=1,rn(a,s,u,w),s.child)}function XO(a,s,u,h,v){if(lo(s),s.stateNode===null){var w=bs,M=u.contextType;typeof M=="object"&&M!==null&&(w=nn(M)),w=new u(h,w),s.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=Lg,s.stateNode=w,w._reactInternals=s,w=s.stateNode,w.props=h,w.state=s.memoizedState,w.refs={},hg(s),M=u.contextType,w.context=typeof M=="object"&&M!==null?nn(M):bs,w.state=s.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(qg(s,u,M,h),w.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(M=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),M!==w.state&&Lg.enqueueReplaceState(w,w.state,null),Du(s,h,w,v),Pu(),w.state=s.memoizedState),typeof w.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(a===null){w=s.stateNode;var B=s.memoizedProps,X=yo(u,B);w.props=X;var ne=w.context,se=u.contextType;M=bs,typeof se=="object"&&se!==null&&(M=nn(se));var de=u.getDerivedStateFromProps;se=typeof de=="function"||typeof w.getSnapshotBeforeUpdate=="function",B=s.pendingProps!==B,se||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(B||ne!==M)&&PO(s,w,h,M),ia=!1;var re=s.memoizedState;w.state=re,Du(s,h,w,v),Pu(),ne=s.memoizedState,B||re!==ne||ia?(typeof de=="function"&&(qg(s,u,de,h),ne=s.memoizedState),(X=ia||RO(s,u,X,h,re,ne,M))?(se||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(s.flags|=4194308)):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=ne),w.props=h,w.state=ne,w.context=M,h=X):(typeof w.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{w=s.stateNode,pg(a,s),M=s.memoizedProps,se=yo(u,M),w.props=se,de=s.pendingProps,re=w.context,ne=u.contextType,X=bs,typeof ne=="object"&&ne!==null&&(X=nn(ne)),B=u.getDerivedStateFromProps,(ne=typeof B=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==de||re!==X)&&PO(s,w,h,X),ia=!1,re=s.memoizedState,w.state=re,Du(s,h,w,v),Pu();var oe=s.memoizedState;M!==de||re!==oe||ia||a!==null&&a.dependencies!==null&&Ad(a.dependencies)?(typeof B=="function"&&(qg(s,u,B,h),oe=s.memoizedState),(se=ia||RO(s,u,se,h,re,oe,X)||a!==null&&a.dependencies!==null&&Ad(a.dependencies))?(ne||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(h,oe,X),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(h,oe,X)),typeof w.componentDidUpdate=="function"&&(s.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===a.memoizedProps&&re===a.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===a.memoizedProps&&re===a.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=oe),w.props=h,w.state=oe,w.context=X,h=se):(typeof w.componentDidUpdate!="function"||M===a.memoizedProps&&re===a.memoizedState||(s.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===a.memoizedProps&&re===a.memoizedState||(s.flags|=1024),h=!1)}return w=h,Hd(a,s),h=(s.flags&128)!==0,w||h?(w=s.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:w.render(),s.flags|=1,a!==null&&h?(s.child=ho(s,a.child,null,v),s.child=ho(s,null,u,v)):rn(a,s,u,v),s.memoizedState=w.state,a=s.child):a=di(a,s,v),a}function KO(a,s,u,h){return oo(),s.flags|=256,rn(a,s,u,h),s.child}var Ug={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Hg(a){return{baseLanes:a,cachePool:LA()}}function Vg(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Ln),a}function WO(a,s,u){var h=s.pendingProps,v=!1,w=(s.flags&128)!==0,M;if((M=w)||(M=a!==null&&a.memoizedState===null?!1:(Nt.current&2)!==0),M&&(v=!0,s.flags&=-129),M=(s.flags&32)!==0,s.flags&=-33,a===null){if(Fe){if(v?sa(s):la(),(a=yt)?(a=iE(a,Qn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:ea!==null?{id:Rr,overflow:Pr}:null,retryLane:536870912,hydrationErrors:null},u=TA(a),u.return=s,s.child=u,tn=s,yt=null)):a=null,a===null)throw na(s);return j0(a)?s.lanes=32:s.lanes=536870912,null}var B=h.children;return h=h.fallback,v?(la(),v=s.mode,B=Vd({mode:"hidden",children:B},v),h=ao(h,v,u,null),B.return=s,h.return=s,B.sibling=h,s.child=B,h=s.child,h.memoizedState=Hg(u),h.childLanes=Vg(a,M,u),s.memoizedState=Ug,Bu(null,h)):(sa(s),Gg(s,B))}var X=a.memoizedState;if(X!==null&&(B=X.dehydrated,B!==null)){if(w)s.flags&256?(sa(s),s.flags&=-257,s=Fg(a,s,u)):s.memoizedState!==null?(la(),s.child=a.child,s.flags|=128,s=null):(la(),B=h.fallback,v=s.mode,h=Vd({mode:"visible",children:h.children},v),B=ao(B,v,u,null),B.flags|=2,h.return=s,B.return=s,h.sibling=B,s.child=h,ho(s,a.child,null,u),h=s.child,h.memoizedState=Hg(u),h.childLanes=Vg(a,M,u),s.memoizedState=Ug,s=Bu(null,h));else if(sa(s),j0(B)){if(M=B.nextSibling&&B.nextSibling.dataset,M)var ne=M.dgst;M=ne,h=Error(r(419)),h.stack="",h.digest=M,Nu({value:h,source:null,stack:null}),s=Fg(a,s,u)}else if($t||_s(a,s,u,!1),M=(u&a.childLanes)!==0,$t||M){if(M=ct,M!==null&&(h=ed(M,u),h!==0&&h!==X.retryLane))throw X.retryLane=h,io(a,h),Cn(M,a,h),Bg;O0(B)||Jd(),s=Fg(a,s,u)}else O0(B)?(s.flags|=192,s.child=a.child,s=null):(a=X.treeContext,yt=Jn(B.nextSibling),tn=s,Fe=!0,ta=null,Qn=!1,a!==null&&kA(s,a),s=Gg(s,h.children),s.flags|=4096);return s}return v?(la(),B=h.fallback,v=s.mode,X=a.child,ne=X.sibling,h=oi(X,{mode:"hidden",children:h.children}),h.subtreeFlags=X.subtreeFlags&65011712,ne!==null?B=oi(ne,B):(B=ao(B,v,u,null),B.flags|=2),B.return=s,h.return=s,h.sibling=B,s.child=h,Bu(null,h),h=s.child,B=a.child.memoizedState,B===null?B=Hg(u):(v=B.cachePool,v!==null?(X=Pt._currentValue,v=v.parent!==X?{parent:X,pool:X}:v):v=LA(),B={baseLanes:B.baseLanes|u,cachePool:v}),h.memoizedState=B,h.childLanes=Vg(a,M,u),s.memoizedState=Ug,Bu(a.child,h)):(sa(s),u=a.child,a=u.sibling,u=oi(u,{mode:"visible",children:h.children}),u.return=s,u.sibling=null,a!==null&&(M=s.deletions,M===null?(s.deletions=[a],s.flags|=16):M.push(a)),s.child=u,s.memoizedState=null,u)}function Gg(a,s){return s=Vd({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function Vd(a,s){return a=Pn(22,a,null,s),a.lanes=0,a}function Fg(a,s,u){return ho(s,a.child,null,u),a=Gg(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function QO(a,s,u){a.lanes|=s;var h=a.alternate;h!==null&&(h.lanes|=s),sg(a.return,s,u)}function Yg(a,s,u,h,v,w){var M=a.memoizedState;M===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:v,treeForkCount:w}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=h,M.tail=u,M.tailMode=v,M.treeForkCount=w)}function ZO(a,s,u){var h=s.pendingProps,v=h.revealOrder,w=h.tail;h=h.children;var M=Nt.current,B=(M&2)!==0;if(B?(M=M&1|2,s.flags|=128):M&=1,Z(Nt,M),rn(a,s,h,u),h=Fe?Eu:0,!B&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&QO(a,u,s);else if(a.tag===19)QO(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(u=s.child,v=null;u!==null;)a=u.alternate,a!==null&&kd(a)===null&&(v=u),u=u.sibling;u=v,u===null?(v=s.child,s.child=null):(v=u.sibling,u.sibling=null),Yg(s,!1,v,u,w,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,v=s.child,s.child=null;v!==null;){if(a=v.alternate,a!==null&&kd(a)===null){s.child=v;break}a=v.sibling,v.sibling=u,u=v,v=a}Yg(s,!0,u,null,w,h);break;case"together":Yg(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function di(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),fa|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(_s(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,u=oi(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=oi(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function Xg(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&Ad(a)))}function qL(a,s,u){switch(s.tag){case 3:he(s,s.stateNode.containerInfo),ra(s,Pt,a.memoizedState.cache),oo();break;case 27:case 5:ve(s);break;case 4:he(s,s.stateNode.containerInfo);break;case 10:ra(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,bg(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(sa(s),s.flags|=128,null):(u&s.child.childLanes)!==0?WO(a,s,u):(sa(s),a=di(a,s,u),a!==null?a.sibling:null);sa(s);break;case 19:var v=(a.flags&128)!==0;if(h=(u&s.childLanes)!==0,h||(_s(a,s,u,!1),h=(u&s.childLanes)!==0),v){if(h)return ZO(a,s,u);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),Z(Nt,Nt.current),h)break;return null;case 22:return s.lanes=0,VO(a,s,u,s.pendingProps);case 24:ra(s,Pt,a.memoizedState.cache)}return di(a,s,u)}function JO(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)$t=!0;else{if(!Xg(a,u)&&(s.flags&128)===0)return $t=!1,qL(a,s,u);$t=(a.flags&131072)!==0}else $t=!1,Fe&&(s.flags&1048576)!==0&&MA(s,Eu,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(a=co(s.elementType),s.type=a,typeof a=="function")Jm(a)?(h=yo(a,h),s.tag=1,s=XO(null,s,a,h,u)):(s.tag=0,s=Ig(null,s,a,h,u));else{if(a!=null){var v=a.$$typeof;if(v===N){s.tag=11,s=IO(null,s,a,h,u);break e}else if(v===C){s.tag=14,s=UO(null,s,a,h,u);break e}}throw s=R(a)||a,Error(r(306,s,""))}}return s;case 0:return Ig(a,s,s.type,s.pendingProps,u);case 1:return h=s.type,v=yo(h,s.pendingProps),XO(a,s,h,v,u);case 3:e:{if(he(s,s.stateNode.containerInfo),a===null)throw Error(r(387));h=s.pendingProps;var w=s.memoizedState;v=w.element,pg(a,s),Du(s,h,null,u);var M=s.memoizedState;if(h=M.cache,ra(s,Pt,h),h!==w.cache&&lg(s,[Pt],u,!0),Pu(),h=M.element,w.isDehydrated)if(w={element:h,isDehydrated:!1,cache:M.cache},s.updateQueue.baseState=w,s.memoizedState=w,s.flags&256){s=KO(a,s,h,u);break e}else if(h!==v){v=Xn(Error(r(424)),s),Nu(v),s=KO(a,s,h,u);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(yt=Jn(a.firstChild),tn=s,Fe=!0,ta=null,Qn=!0,u=VA(s,null,h,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(oo(),h===v){s=di(a,s,u);break e}rn(a,s,h,u)}s=s.child}return s;case 26:return Hd(a,s),a===null?(u=cE(s.type,null,s.pendingProps,null))?s.memoizedState=u:Fe||(u=s.type,a=s.pendingProps,h=oh(pe.current).createElement(u),h[Ut]=s,h[ln]=a,an(h,u,a),Rt(h),s.stateNode=h):s.memoizedState=cE(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return ve(s),a===null&&Fe&&(h=s.stateNode=sE(s.type,s.pendingProps,pe.current),tn=s,Qn=!0,v=yt,ma(s.type)?(E0=v,yt=Jn(h.firstChild)):yt=v),rn(a,s,s.pendingProps.children,u),Hd(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Fe&&((v=h=yt)&&(h=hz(h,s.type,s.pendingProps,Qn),h!==null?(s.stateNode=h,tn=s,yt=Jn(h.firstChild),Qn=!1,v=!0):v=!1),v||na(s)),ve(s),v=s.type,w=s.pendingProps,M=a!==null?a.memoizedProps:null,h=w.children,S0(v,w)?h=null:M!==null&&S0(v,M)&&(s.flags|=32),s.memoizedState!==null&&(v=wg(a,s,NL,null,null,u),tc._currentValue=v),Hd(a,s),rn(a,s,h,u),s.child;case 6:return a===null&&Fe&&((a=u=yt)&&(u=pz(u,s.pendingProps,Qn),u!==null?(s.stateNode=u,tn=s,yt=null,a=!0):a=!1),a||na(s)),null;case 13:return WO(a,s,u);case 4:return he(s,s.stateNode.containerInfo),h=s.pendingProps,a===null?s.child=ho(s,null,h,u):rn(a,s,h,u),s.child;case 11:return IO(a,s,s.type,s.pendingProps,u);case 7:return rn(a,s,s.pendingProps,u),s.child;case 8:return rn(a,s,s.pendingProps.children,u),s.child;case 12:return rn(a,s,s.pendingProps.children,u),s.child;case 10:return h=s.pendingProps,ra(s,s.type,h.value),rn(a,s,h.children,u),s.child;case 9:return v=s.type._context,h=s.pendingProps.children,lo(s),v=nn(v),h=h(v),s.flags|=1,rn(a,s,h,u),s.child;case 14:return UO(a,s,s.type,s.pendingProps,u);case 15:return HO(a,s,s.type,s.pendingProps,u);case 19:return ZO(a,s,u);case 31:return $L(a,s,u);case 22:return VO(a,s,u,s.pendingProps);case 24:return lo(s),h=nn(Pt),a===null?(v=fg(),v===null&&(v=ct,w=ug(),v.pooledCache=w,w.refCount++,w!==null&&(v.pooledCacheLanes|=u),v=w),s.memoizedState={parent:h,cache:v},hg(s),ra(s,Pt,v)):((a.lanes&u)!==0&&(pg(a,s),Du(s,null,null,u),Pu()),v=a.memoizedState,w=s.memoizedState,v.parent!==h?(v={parent:h,cache:h},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),ra(s,Pt,h)):(h=w.cache,ra(s,Pt,h),h!==v.cache&&lg(s,[Pt],u,!0))),rn(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function hi(a){a.flags|=4}function Kg(a,s,u,h,v){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(jj())a.flags|=8192;else throw fo=Nd,dg}else a.flags&=-16777217}function ej(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!yE(s))if(jj())a.flags|=8192;else throw fo=Nd,dg}function Gd(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?Qf():536870912,a.lanes|=s,Ds|=s)}function Iu(a,s){if(!Fe)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:h.sibling=null}}function mt(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,h=0;if(s)for(var v=a.child;v!==null;)u|=v.lanes|v.childLanes,h|=v.subtreeFlags&65011712,h|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)u|=v.lanes|v.childLanes,h|=v.subtreeFlags,h|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=h,a.childLanes=u,s}function LL(a,s,u){var h=s.pendingProps;switch(rg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return mt(s),null;case 1:return mt(s),null;case 3:return u=s.stateNode,h=null,a!==null&&(h=a.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),ui(Pt),ae(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Ss(s)?hi(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,ag())),mt(s),null;case 26:var v=s.type,w=s.memoizedState;return a===null?(hi(s),w!==null?(mt(s),ej(s,w)):(mt(s),Kg(s,v,null,h,u))):w?w!==a.memoizedState?(hi(s),mt(s),ej(s,w)):(mt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==h&&hi(s),mt(s),Kg(s,v,a,h,u)),null;case 27:if(me(s),u=pe.current,v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==h&&hi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return mt(s),null}a=ee.current,Ss(s)?RA(s):(a=sE(v,h,u),s.stateNode=a,hi(s))}return mt(s),null;case 5:if(me(s),v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==h&&hi(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return mt(s),null}if(w=ee.current,Ss(s))RA(s);else{var M=oh(pe.current);switch(w){case 1:w=M.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:w=M.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":w=M.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":w=M.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":w=M.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof h.is=="string"?M.createElement("select",{is:h.is}):M.createElement("select"),h.multiple?w.multiple=!0:h.size&&(w.size=h.size);break;default:w=typeof h.is=="string"?M.createElement(v,{is:h.is}):M.createElement(v)}}w[Ut]=s,w[ln]=h;e:for(M=s.child;M!==null;){if(M.tag===5||M.tag===6)w.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===s)break e;for(;M.sibling===null;){if(M.return===null||M.return===s)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}s.stateNode=w;e:switch(an(w,v,h),v){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&hi(s)}}return mt(s),Kg(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==h&&hi(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(a=pe.current,Ss(s)){if(a=s.stateNode,u=s.memoizedProps,h=null,v=tn,v!==null)switch(v.tag){case 27:case 5:h=v.memoizedProps}a[Ut]=s,a=!!(a.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||Wj(a.nodeValue,u)),a||na(s,!0)}else a=oh(a).createTextNode(h),a[Ut]=s,s.stateNode=a}return mt(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(h=Ss(s),u!==null){if(a===null){if(!h)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Ut]=s}else oo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;mt(s),a=!1}else u=ag(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?($n(s),s):($n(s),null);if((s.flags&128)!==0)throw Error(r(558))}return mt(s),null;case 13:if(h=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=Ss(s),h!==null&&h.dehydrated!==null){if(a===null){if(!v)throw Error(r(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(r(317));v[Ut]=s}else oo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;mt(s),v=!1}else v=ag(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?($n(s),s):($n(s),null)}return $n(s),(s.flags&128)!==0?(s.lanes=u,s):(u=h!==null,a=a!==null&&a.memoizedState!==null,u&&(h=s.child,v=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(v=h.alternate.memoizedState.cachePool.pool),w=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(w=h.memoizedState.cachePool.pool),w!==v&&(h.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),Gd(s,s.updateQueue),mt(s),null);case 4:return ae(),a===null&&g0(s.stateNode.containerInfo),mt(s),null;case 10:return ui(s.type),mt(s),null;case 19:if(G(Nt),h=s.memoizedState,h===null)return mt(s),null;if(v=(s.flags&128)!==0,w=h.rendering,w===null)if(v)Iu(h,!1);else{if(Ot!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(w=kd(a),w!==null){for(s.flags|=128,Iu(h,!1),a=w.updateQueue,s.updateQueue=a,Gd(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)NA(u,a),u=u.sibling;return Z(Nt,Nt.current&1|2),Fe&&si(s,h.treeForkCount),s.child}a=a.sibling}h.tail!==null&&kt()>Wd&&(s.flags|=128,v=!0,Iu(h,!1),s.lanes=4194304)}else{if(!v)if(a=kd(w),a!==null){if(s.flags|=128,v=!0,a=a.updateQueue,s.updateQueue=a,Gd(s,a),Iu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!w.alternate&&!Fe)return mt(s),null}else 2*kt()-h.renderingStartTime>Wd&&u!==536870912&&(s.flags|=128,v=!0,Iu(h,!1),s.lanes=4194304);h.isBackwards?(w.sibling=s.child,s.child=w):(a=h.last,a!==null?a.sibling=w:s.child=w,h.last=w)}return h.tail!==null?(a=h.tail,h.rendering=a,h.tail=a.sibling,h.renderingStartTime=kt(),a.sibling=null,u=Nt.current,Z(Nt,v?u&1|2:u&1),Fe&&si(s,h.treeForkCount),a):(mt(s),null);case 22:case 23:return $n(s),vg(),h=s.memoizedState!==null,a!==null?a.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(u&536870912)!==0&&(s.flags&128)===0&&(mt(s),s.subtreeFlags&6&&(s.flags|=8192)):mt(s),u=s.updateQueue,u!==null&&Gd(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==u&&(s.flags|=2048),a!==null&&G(uo),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),ui(Pt),mt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function zL(a,s){switch(rg(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return ui(Pt),ae(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return me(s),null;case 31:if(s.memoizedState!==null){if($n(s),s.alternate===null)throw Error(r(340));oo()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if($n(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));oo()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return G(Nt),null;case 4:return ae(),null;case 10:return ui(s.type),null;case 22:case 23:return $n(s),vg(),a!==null&&G(uo),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return ui(Pt),null;case 25:return null;default:return null}}function tj(a,s){switch(rg(s),s.tag){case 3:ui(Pt),ae();break;case 26:case 27:case 5:me(s);break;case 4:ae();break;case 31:s.memoizedState!==null&&$n(s);break;case 13:$n(s);break;case 19:G(Nt);break;case 10:ui(s.type);break;case 22:case 23:$n(s),vg(),a!==null&&G(uo);break;case 24:ui(Pt)}}function Uu(a,s){try{var u=s.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var v=h.next;u=v;do{if((u.tag&a)===a){h=void 0;var w=u.create,M=u.inst;h=w(),M.destroy=h}u=u.next}while(u!==v)}}catch(B){it(s,s.return,B)}}function ua(a,s,u){try{var h=s.updateQueue,v=h!==null?h.lastEffect:null;if(v!==null){var w=v.next;h=w;do{if((h.tag&a)===a){var M=h.inst,B=M.destroy;if(B!==void 0){M.destroy=void 0,v=s;var X=u,ne=B;try{ne()}catch(se){it(v,X,se)}}}h=h.next}while(h!==w)}}catch(se){it(s,s.return,se)}}function nj(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{FA(s,u)}catch(h){it(a,a.return,h)}}}function rj(a,s,u){u.props=yo(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(h){it(a,s,h)}}function Hu(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var h=a.stateNode;break;case 30:h=a.stateNode;break;default:h=a.stateNode}typeof u=="function"?a.refCleanup=u(h):u.current=h}}catch(v){it(a,s,v)}}function Dr(a,s){var u=a.ref,h=a.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(v){it(a,s,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(v){it(a,s,v)}else u.current=null}function ij(a){var s=a.type,u=a.memoizedProps,h=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(v){it(a,a.return,v)}}function Wg(a,s,u){try{var h=a.stateNode;sz(h,a.type,u,s),h[ln]=s}catch(v){it(a,a.return,v)}}function aj(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&ma(a.type)||a.tag===4}function Qg(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||aj(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&ma(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Zg(a,s,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ii));else if(h!==4&&(h===27&&ma(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(Zg(a,s,u),a=a.sibling;a!==null;)Zg(a,s,u),a=a.sibling}function Fd(a,s,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(h!==4&&(h===27&&ma(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(Fd(a,s,u),a=a.sibling;a!==null;)Fd(a,s,u),a=a.sibling}function oj(a){var s=a.stateNode,u=a.memoizedProps;try{for(var h=a.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);an(s,h,u),s[Ut]=a,s[ln]=u}catch(w){it(a,a.return,w)}}var pi=!1,qt=!1,Jg=!1,sj=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function BL(a,s){if(a=a.containerInfo,x0=hh,a=bA(a),Fm(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var v=h.anchorOffset,w=h.focusNode;h=h.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var M=0,B=-1,X=-1,ne=0,se=0,de=a,re=null;t:for(;;){for(var oe;de!==u||v!==0&&de.nodeType!==3||(B=M+v),de!==w||h!==0&&de.nodeType!==3||(X=M+h),de.nodeType===3&&(M+=de.nodeValue.length),(oe=de.firstChild)!==null;)re=de,de=oe;for(;;){if(de===a)break t;if(re===u&&++ne===v&&(B=M),re===w&&++se===h&&(X=M),(oe=de.nextSibling)!==null)break;de=re,re=de.parentNode}de=oe}u=B===-1||X===-1?null:{start:B,end:X}}else u=null}u=u||{start:0,end:0}}else u=null;for(w0={focusedElem:a,selectionRange:u},hh=!1,Xt=s;Xt!==null;)if(s=Xt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Xt=a;else for(;Xt!==null;){switch(s=Xt,w=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)v=a[u],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&w!==null){a=void 0,u=s,v=w.memoizedProps,w=w.memoizedState,h=u.stateNode;try{var Ae=yo(u.type,v);a=h.getSnapshotBeforeUpdate(Ae,w),h.__reactInternalSnapshotBeforeUpdate=a}catch(Te){it(u,u.return,Te)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)A0(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":A0(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,Xt=a;break}Xt=s.return}}function lj(a,s,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:mi(a,u),h&4&&Uu(5,u);break;case 1:if(mi(a,u),h&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(M){it(u,u.return,M)}else{var v=yo(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(v,s,a.__reactInternalSnapshotBeforeUpdate)}catch(M){it(u,u.return,M)}}h&64&&nj(u),h&512&&Hu(u,u.return);break;case 3:if(mi(a,u),h&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{FA(a,s)}catch(M){it(u,u.return,M)}}break;case 27:s===null&&h&4&&oj(u);case 26:case 5:mi(a,u),s===null&&h&4&&ij(u),h&512&&Hu(u,u.return);break;case 12:mi(a,u);break;case 31:mi(a,u),h&4&&fj(a,u);break;case 13:mi(a,u),h&4&&dj(a,u),h&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=KL.bind(null,u),yz(a,u))));break;case 22:if(h=u.memoizedState!==null||pi,!h){s=s!==null&&s.memoizedState!==null||qt,v=pi;var w=qt;pi=h,(qt=s)&&!w?gi(a,u,(u.subtreeFlags&8772)!==0):mi(a,u),pi=v,qt=w}break;case 30:break;default:mi(a,u)}}function uj(a){var s=a.alternate;s!==null&&(a.alternate=null,uj(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&yu(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var bt=null,jn=!1;function yi(a,s,u){for(u=u.child;u!==null;)cj(a,s,u),u=u.sibling}function cj(a,s,u){if(yn&&typeof yn.onCommitFiberUnmount=="function")try{yn.onCommitFiberUnmount(Ka,u)}catch{}switch(u.tag){case 26:qt||Dr(u,s),yi(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:qt||Dr(u,s);var h=bt,v=jn;ma(u.type)&&(bt=u.stateNode,jn=!1),yi(a,s,u),Zu(u.stateNode),bt=h,jn=v;break;case 5:qt||Dr(u,s);case 6:if(h=bt,v=jn,bt=null,yi(a,s,u),bt=h,jn=v,bt!==null)if(jn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(u.stateNode)}catch(w){it(u,s,w)}else try{bt.removeChild(u.stateNode)}catch(w){it(u,s,w)}break;case 18:bt!==null&&(jn?(a=bt,nE(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Hs(a)):nE(bt,u.stateNode));break;case 4:h=bt,v=jn,bt=u.stateNode.containerInfo,jn=!0,yi(a,s,u),bt=h,jn=v;break;case 0:case 11:case 14:case 15:ua(2,u,s),qt||ua(4,u,s),yi(a,s,u);break;case 1:qt||(Dr(u,s),h=u.stateNode,typeof h.componentWillUnmount=="function"&&rj(u,s,h)),yi(a,s,u);break;case 21:yi(a,s,u);break;case 22:qt=(h=qt)||u.memoizedState!==null,yi(a,s,u),qt=h;break;default:yi(a,s,u)}}function fj(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Hs(a)}catch(u){it(s,s.return,u)}}}function dj(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Hs(a)}catch(u){it(s,s.return,u)}}function IL(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new sj),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new sj),s;default:throw Error(r(435,a.tag))}}function Yd(a,s){var u=IL(a);s.forEach(function(h){if(!u.has(h)){u.add(h);var v=WL.bind(null,a,h);h.then(v,v)}})}function En(a,s){var u=s.deletions;if(u!==null)for(var h=0;h<u.length;h++){var v=u[h],w=a,M=s,B=M;e:for(;B!==null;){switch(B.tag){case 27:if(ma(B.type)){bt=B.stateNode,jn=!1;break e}break;case 5:bt=B.stateNode,jn=!1;break e;case 3:case 4:bt=B.stateNode.containerInfo,jn=!0;break e}B=B.return}if(bt===null)throw Error(r(160));cj(w,M,v),bt=null,jn=!1,w=v.alternate,w!==null&&(w.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)hj(s,a),s=s.sibling}var pr=null;function hj(a,s){var u=a.alternate,h=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:En(s,a),Nn(a),h&4&&(ua(3,a,a.return),Uu(3,a),ua(5,a,a.return));break;case 1:En(s,a),Nn(a),h&512&&(qt||u===null||Dr(u,u.return)),h&64&&pi&&(a=a.updateQueue,a!==null&&(h=a.callbacks,h!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var v=pr;if(En(s,a),Nn(a),h&512&&(qt||u===null||Dr(u,u.return)),h&4){var w=u!==null?u.memoizedState:null;if(h=a.memoizedState,u===null)if(h===null)if(a.stateNode===null){e:{h=a.type,u=a.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":w=v.getElementsByTagName("title")[0],(!w||w[Za]||w[Ut]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=v.createElement(h),v.head.insertBefore(w,v.querySelector("head > title"))),an(w,h,u),w[Ut]=a,Rt(w),h=w;break e;case"link":var M=hE("link","href",v).get(h+(u.href||""));if(M){for(var B=0;B<M.length;B++)if(w=M[B],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(B,1);break t}}w=v.createElement(h),an(w,h,u),v.head.appendChild(w);break;case"meta":if(M=hE("meta","content",v).get(h+(u.content||""))){for(B=0;B<M.length;B++)if(w=M[B],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(B,1);break t}}w=v.createElement(h),an(w,h,u),v.head.appendChild(w);break;default:throw Error(r(468,h))}w[Ut]=a,Rt(w),h=w}a.stateNode=h}else pE(v,a.type,a.stateNode);else a.stateNode=dE(v,h,a.memoizedProps);else w!==h?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,h===null?pE(v,a.type,a.stateNode):dE(v,h,a.memoizedProps)):h===null&&a.stateNode!==null&&Wg(a,a.memoizedProps,u.memoizedProps)}break;case 27:En(s,a),Nn(a),h&512&&(qt||u===null||Dr(u,u.return)),u!==null&&h&4&&Wg(a,a.memoizedProps,u.memoizedProps);break;case 5:if(En(s,a),Nn(a),h&512&&(qt||u===null||Dr(u,u.return)),a.flags&32){v=a.stateNode;try{ds(v,"")}catch(Ae){it(a,a.return,Ae)}}h&4&&a.stateNode!=null&&(v=a.memoizedProps,Wg(a,v,u!==null?u.memoizedProps:v)),h&1024&&(Jg=!0);break;case 6:if(En(s,a),Nn(a),h&4){if(a.stateNode===null)throw Error(r(162));h=a.memoizedProps,u=a.stateNode;try{u.nodeValue=h}catch(Ae){it(a,a.return,Ae)}}break;case 3:if(uh=null,v=pr,pr=sh(s.containerInfo),En(s,a),pr=v,Nn(a),h&4&&u!==null&&u.memoizedState.isDehydrated)try{Hs(s.containerInfo)}catch(Ae){it(a,a.return,Ae)}Jg&&(Jg=!1,pj(a));break;case 4:h=pr,pr=sh(a.stateNode.containerInfo),En(s,a),Nn(a),pr=h;break;case 12:En(s,a),Nn(a);break;case 31:En(s,a),Nn(a),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,Yd(a,h)));break;case 13:En(s,a),Nn(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Kd=kt()),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,Yd(a,h)));break;case 22:v=a.memoizedState!==null;var X=u!==null&&u.memoizedState!==null,ne=pi,se=qt;if(pi=ne||v,qt=se||X,En(s,a),qt=se,pi=ne,Nn(a),h&8192)e:for(s=a.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(u===null||X||pi||qt||mo(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){X=u=s;try{if(w=X.stateNode,v)M=w.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{B=X.stateNode;var de=X.memoizedProps.style,re=de!=null&&de.hasOwnProperty("display")?de.display:null;B.style.display=re==null||typeof re=="boolean"?"":(""+re).trim()}}catch(Ae){it(X,X.return,Ae)}}}else if(s.tag===6){if(u===null){X=s;try{X.stateNode.nodeValue=v?"":X.memoizedProps}catch(Ae){it(X,X.return,Ae)}}}else if(s.tag===18){if(u===null){X=s;try{var oe=X.stateNode;v?rE(oe,!0):rE(X.stateNode,!1)}catch(Ae){it(X,X.return,Ae)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=a.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,Yd(a,u))));break;case 19:En(s,a),Nn(a),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,Yd(a,h)));break;case 30:break;case 21:break;default:En(s,a),Nn(a)}}function Nn(a){var s=a.flags;if(s&2){try{for(var u,h=a.return;h!==null;){if(aj(h)){u=h;break}h=h.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var v=u.stateNode,w=Qg(a);Fd(a,w,v);break;case 5:var M=u.stateNode;u.flags&32&&(ds(M,""),u.flags&=-33);var B=Qg(a);Fd(a,B,M);break;case 3:case 4:var X=u.stateNode.containerInfo,ne=Qg(a);Zg(a,ne,X);break;default:throw Error(r(161))}}catch(se){it(a,a.return,se)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function pj(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;pj(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function mi(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)lj(a,s.alternate,s),s=s.sibling}function mo(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:ua(4,s,s.return),mo(s);break;case 1:Dr(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&rj(s,s.return,u),mo(s);break;case 27:Zu(s.stateNode);case 26:case 5:Dr(s,s.return),mo(s);break;case 22:s.memoizedState===null&&mo(s);break;case 30:mo(s);break;default:mo(s)}a=a.sibling}}function gi(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,v=a,w=s,M=w.flags;switch(w.tag){case 0:case 11:case 15:gi(v,w,u),Uu(4,w);break;case 1:if(gi(v,w,u),h=w,v=h.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(ne){it(h,h.return,ne)}if(h=w,v=h.updateQueue,v!==null){var B=h.stateNode;try{var X=v.shared.hiddenCallbacks;if(X!==null)for(v.shared.hiddenCallbacks=null,v=0;v<X.length;v++)GA(X[v],B)}catch(ne){it(h,h.return,ne)}}u&&M&64&&nj(w),Hu(w,w.return);break;case 27:oj(w);case 26:case 5:gi(v,w,u),u&&h===null&&M&4&&ij(w),Hu(w,w.return);break;case 12:gi(v,w,u);break;case 31:gi(v,w,u),u&&M&4&&fj(v,w);break;case 13:gi(v,w,u),u&&M&4&&dj(v,w);break;case 22:w.memoizedState===null&&gi(v,w,u),Hu(w,w.return);break;case 30:break;default:gi(v,w,u)}s=s.sibling}}function e0(a,s){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&Tu(u))}function t0(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Tu(a))}function yr(a,s,u,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)yj(a,s,u,h),s=s.sibling}function yj(a,s,u,h){var v=s.flags;switch(s.tag){case 0:case 11:case 15:yr(a,s,u,h),v&2048&&Uu(9,s);break;case 1:yr(a,s,u,h);break;case 3:yr(a,s,u,h),v&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Tu(a)));break;case 12:if(v&2048){yr(a,s,u,h),a=s.stateNode;try{var w=s.memoizedProps,M=w.id,B=w.onPostCommit;typeof B=="function"&&B(M,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(X){it(s,s.return,X)}}else yr(a,s,u,h);break;case 31:yr(a,s,u,h);break;case 13:yr(a,s,u,h);break;case 23:break;case 22:w=s.stateNode,M=s.alternate,s.memoizedState!==null?w._visibility&2?yr(a,s,u,h):Vu(a,s):w._visibility&2?yr(a,s,u,h):(w._visibility|=2,ks(a,s,u,h,(s.subtreeFlags&10256)!==0||!1)),v&2048&&e0(M,s);break;case 24:yr(a,s,u,h),v&2048&&t0(s.alternate,s);break;default:yr(a,s,u,h)}}function ks(a,s,u,h,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var w=a,M=s,B=u,X=h,ne=M.flags;switch(M.tag){case 0:case 11:case 15:ks(w,M,B,X,v),Uu(8,M);break;case 23:break;case 22:var se=M.stateNode;M.memoizedState!==null?se._visibility&2?ks(w,M,B,X,v):Vu(w,M):(se._visibility|=2,ks(w,M,B,X,v)),v&&ne&2048&&e0(M.alternate,M);break;case 24:ks(w,M,B,X,v),v&&ne&2048&&t0(M.alternate,M);break;default:ks(w,M,B,X,v)}s=s.sibling}}function Vu(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,h=s,v=h.flags;switch(h.tag){case 22:Vu(u,h),v&2048&&e0(h.alternate,h);break;case 24:Vu(u,h),v&2048&&t0(h.alternate,h);break;default:Vu(u,h)}s=s.sibling}}var Gu=8192;function Rs(a,s,u){if(a.subtreeFlags&Gu)for(a=a.child;a!==null;)mj(a,s,u),a=a.sibling}function mj(a,s,u){switch(a.tag){case 26:Rs(a,s,u),a.flags&Gu&&a.memoizedState!==null&&Ez(u,pr,a.memoizedState,a.memoizedProps);break;case 5:Rs(a,s,u);break;case 3:case 4:var h=pr;pr=sh(a.stateNode.containerInfo),Rs(a,s,u),pr=h;break;case 22:a.memoizedState===null&&(h=a.alternate,h!==null&&h.memoizedState!==null?(h=Gu,Gu=16777216,Rs(a,s,u),Gu=h):Rs(a,s,u));break;default:Rs(a,s,u)}}function gj(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function Fu(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var h=s[u];Xt=h,bj(h,a)}gj(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)vj(a),a=a.sibling}function vj(a){switch(a.tag){case 0:case 11:case 15:Fu(a),a.flags&2048&&ua(9,a,a.return);break;case 3:Fu(a);break;case 12:Fu(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Xd(a)):Fu(a);break;default:Fu(a)}}function Xd(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var h=s[u];Xt=h,bj(h,a)}gj(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:ua(8,s,s.return),Xd(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Xd(s));break;default:Xd(s)}a=a.sibling}}function bj(a,s){for(;Xt!==null;){var u=Xt;switch(u.tag){case 0:case 11:case 15:ua(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Tu(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,Xt=h;else e:for(u=a;Xt!==null;){h=Xt;var v=h.sibling,w=h.return;if(uj(h),h===u){Xt=null;break e}if(v!==null){v.return=w,Xt=v;break e}Xt=w}}}var UL={getCacheForType:function(a){var s=nn(Pt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return nn(Pt).controller.signal}},HL=typeof WeakMap=="function"?WeakMap:Map,Je=0,ct=null,Ue=null,Ve=0,rt=0,qn=null,ca=!1,Ps=!1,n0=!1,vi=0,Ot=0,fa=0,go=0,r0=0,Ln=0,Ds=0,Yu=null,Tn=null,i0=!1,Kd=0,xj=0,Wd=1/0,Qd=null,da=null,Ht=0,ha=null,$s=null,bi=0,a0=0,o0=null,wj=null,Xu=0,s0=null;function zn(){return(Je&2)!==0&&Ve!==0?Ve&-Ve:k.T!==null?h0():td()}function Sj(){if(Ln===0)if((Ve&536870912)===0||Fe){var a=os;os<<=1,(os&3932160)===0&&(os=262144),Ln=a}else Ln=536870912;return a=Dn.current,a!==null&&(a.flags|=32),Ln}function Cn(a,s,u){(a===ct&&(rt===2||rt===9)||a.cancelPendingCommit!==null)&&(qs(a,0),pa(a,Ve,Ln,!1)),Qa(a,u),((Je&2)===0||a!==ct)&&(a===ct&&((Je&2)===0&&(go|=u),Ot===4&&pa(a,Ve,Ln,!1)),$r(a))}function _j(a,s,u){if((Je&6)!==0)throw Error(r(327));var h=!u&&(s&127)===0&&(s&a.expiredLanes)===0||Wa(a,s),v=h?FL(a,s):u0(a,s,!0),w=h;do{if(v===0){Ps&&!h&&pa(a,s,0,!1);break}else{if(u=a.current.alternate,w&&!VL(u)){v=u0(a,s,!1),w=!1;continue}if(v===2){if(w=s,a.errorRecoveryDisabledLanes&w)var M=0;else M=a.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){s=M;e:{var B=a;v=Yu;var X=B.current.memoizedState.isDehydrated;if(X&&(qs(B,M).flags|=256),M=u0(B,M,!1),M!==2){if(n0&&!X){B.errorRecoveryDisabledLanes|=w,go|=w,v=4;break e}w=Tn,Tn=v,w!==null&&(Tn===null?Tn=w:Tn.push.apply(Tn,w))}v=M}if(w=!1,v!==2)continue}}if(v===1){qs(a,0),pa(a,s,0,!0);break}e:{switch(h=a,w=v,w){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:pa(h,s,Ln,!ca);break e;case 2:Tn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(v=Kd+300-kt(),10<v)){if(pa(h,s,Ln,!ca),ls(h,0,!0)!==0)break e;bi=s,h.timeoutHandle=eE(Aj.bind(null,h,u,Tn,Qd,i0,s,Ln,go,Ds,ca,w,"Throttled",-0,0),v);break e}Aj(h,u,Tn,Qd,i0,s,Ln,go,Ds,ca,w,null,-0,0)}}break}while(!0);$r(a)}function Aj(a,s,u,h,v,w,M,B,X,ne,se,de,re,oe){if(a.timeoutHandle=-1,de=s.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ii},mj(s,w,de);var Ae=(w&62914560)===w?Kd-kt():(w&4194048)===w?xj-kt():0;if(Ae=Nz(de,Ae),Ae!==null){bi=w,a.cancelPendingCommit=Ae(kj.bind(null,a,s,w,u,h,v,M,B,X,se,de,null,re,oe)),pa(a,w,M,!ne);return}}kj(a,s,w,u,h,v,M,B,X)}function VL(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var v=u[h],w=v.getSnapshot;v=v.value;try{if(!Rn(w(),v))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function pa(a,s,u,h){s&=~r0,s&=~go,a.suspendedLanes|=s,a.pingedLanes&=~s,h&&(a.warmLanes|=s),h=a.expirationTimes;for(var v=s;0<v;){var w=31-mn(v),M=1<<w;h[w]=-1,v&=~M}u!==0&&Zf(a,u,s)}function Zd(){return(Je&6)===0?(Ku(0),!1):!0}function l0(){if(Ue!==null){if(rt===0)var a=Ue.return;else a=Ue,li=so=null,Ag(a),Es=null,Mu=0,a=Ue;for(;a!==null;)tj(a.alternate,a),a=a.return;Ue=null}}function qs(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,cz(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),bi=0,l0(),ct=a,Ue=u=oi(a.current,null),Ve=s,rt=0,qn=null,ca=!1,Ps=Wa(a,s),n0=!1,Ds=Ln=r0=go=fa=Ot=0,Tn=Yu=null,i0=!1,(s&8)!==0&&(s|=s&32);var h=a.entangledLanes;if(h!==0)for(a=a.entanglements,h&=s;0<h;){var v=31-mn(h),w=1<<v;s|=a[v],h&=~w}return vi=s,bd(),u}function Oj(a,s){$e=null,k.H=zu,s===js||s===Ed?(s=IA(),rt=3):s===dg?(s=IA(),rt=4):rt=s===Bg?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,qn=s,Ue===null&&(Ot=1,Id(a,Xn(s,a.current)))}function jj(){var a=Dn.current;return a===null?!0:(Ve&4194048)===Ve?Zn===null:(Ve&62914560)===Ve||(Ve&536870912)!==0?a===Zn:!1}function Ej(){var a=k.H;return k.H=zu,a===null?zu:a}function Nj(){var a=k.A;return k.A=UL,a}function Jd(){Ot=4,ca||(Ve&4194048)!==Ve&&Dn.current!==null||(Ps=!0),(fa&134217727)===0&&(go&134217727)===0||ct===null||pa(ct,Ve,Ln,!1)}function u0(a,s,u){var h=Je;Je|=2;var v=Ej(),w=Nj();(ct!==a||Ve!==s)&&(Qd=null,qs(a,s)),s=!1;var M=Ot;e:do try{if(rt!==0&&Ue!==null){var B=Ue,X=qn;switch(rt){case 8:l0(),M=6;break e;case 3:case 2:case 9:case 6:Dn.current===null&&(s=!0);var ne=rt;if(rt=0,qn=null,Ls(a,B,X,ne),u&&Ps){M=0;break e}break;default:ne=rt,rt=0,qn=null,Ls(a,B,X,ne)}}GL(),M=Ot;break}catch(se){Oj(a,se)}while(!0);return s&&a.shellSuspendCounter++,li=so=null,Je=h,k.H=v,k.A=w,Ue===null&&(ct=null,Ve=0,bd()),M}function GL(){for(;Ue!==null;)Tj(Ue)}function FL(a,s){var u=Je;Je|=2;var h=Ej(),v=Nj();ct!==a||Ve!==s?(Qd=null,Wd=kt()+500,qs(a,s)):Ps=Wa(a,s);e:do try{if(rt!==0&&Ue!==null){s=Ue;var w=qn;t:switch(rt){case 1:rt=0,qn=null,Ls(a,s,w,1);break;case 2:case 9:if(zA(w)){rt=0,qn=null,Cj(s);break}s=function(){rt!==2&&rt!==9||ct!==a||(rt=7),$r(a)},w.then(s,s);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:zA(w)?(rt=0,qn=null,Cj(s)):(rt=0,qn=null,Ls(a,s,w,7));break;case 5:var M=null;switch(Ue.tag){case 26:M=Ue.memoizedState;case 5:case 27:var B=Ue;if(M?yE(M):B.stateNode.complete){rt=0,qn=null;var X=B.sibling;if(X!==null)Ue=X;else{var ne=B.return;ne!==null?(Ue=ne,eh(ne)):Ue=null}break t}}rt=0,qn=null,Ls(a,s,w,5);break;case 6:rt=0,qn=null,Ls(a,s,w,6);break;case 8:l0(),Ot=6;break e;default:throw Error(r(462))}}YL();break}catch(se){Oj(a,se)}while(!0);return li=so=null,k.H=h,k.A=v,Je=u,Ue!==null?0:(ct=null,Ve=0,bd(),Ot)}function YL(){for(;Ue!==null&&!pn();)Tj(Ue)}function Tj(a){var s=JO(a.alternate,a,vi);a.memoizedProps=a.pendingProps,s===null?eh(a):Ue=s}function Cj(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=YO(u,s,s.pendingProps,s.type,void 0,Ve);break;case 11:s=YO(u,s,s.pendingProps,s.type.render,s.ref,Ve);break;case 5:Ag(s);default:tj(u,s),s=Ue=NA(s,vi),s=JO(u,s,vi)}a.memoizedProps=a.pendingProps,s===null?eh(a):Ue=s}function Ls(a,s,u,h){li=so=null,Ag(s),Es=null,Mu=0;var v=s.return;try{if(DL(a,v,s,u,Ve)){Ot=1,Id(a,Xn(u,a.current)),Ue=null;return}}catch(w){if(v!==null)throw Ue=v,w;Ot=1,Id(a,Xn(u,a.current)),Ue=null;return}s.flags&32768?(Fe||h===1?a=!0:Ps||(Ve&536870912)!==0?a=!1:(ca=a=!0,(h===2||h===9||h===3||h===6)&&(h=Dn.current,h!==null&&h.tag===13&&(h.flags|=16384))),Mj(s,a)):eh(s)}function eh(a){var s=a;do{if((s.flags&32768)!==0){Mj(s,ca);return}a=s.return;var u=LL(s.alternate,s,vi);if(u!==null){Ue=u;return}if(s=s.sibling,s!==null){Ue=s;return}Ue=s=a}while(s!==null);Ot===0&&(Ot=5)}function Mj(a,s){do{var u=zL(a.alternate,a);if(u!==null){u.flags&=32767,Ue=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Ue=a;return}Ue=a=u}while(a!==null);Ot=6,Ue=null}function kj(a,s,u,h,v,w,M,B,X){a.cancelPendingCommit=null;do th();while(Ht!==0);if((Je&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(w=s.lanes|s.childLanes,w|=Qm,Em(a,u,w,M,B,X),a===ct&&(Ue=ct=null,Ve=0),$s=s,ha=a,bi=u,a0=w,o0=v,wj=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,QL(Xa,function(){return qj(),null})):(a.callbackNode=null,a.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=k.T,k.T=null,v=I.p,I.p=2,M=Je,Je|=4;try{BL(a,s,u)}finally{Je=M,I.p=v,k.T=h}}Ht=1,Rj(),Pj(),Dj()}}function Rj(){if(Ht===1){Ht=0;var a=ha,s=$s,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=k.T,k.T=null;var h=I.p;I.p=2;var v=Je;Je|=4;try{hj(s,a);var w=w0,M=bA(a.containerInfo),B=w.focusedElem,X=w.selectionRange;if(M!==B&&B&&B.ownerDocument&&vA(B.ownerDocument.documentElement,B)){if(X!==null&&Fm(B)){var ne=X.start,se=X.end;if(se===void 0&&(se=ne),"selectionStart"in B)B.selectionStart=ne,B.selectionEnd=Math.min(se,B.value.length);else{var de=B.ownerDocument||document,re=de&&de.defaultView||window;if(re.getSelection){var oe=re.getSelection(),Ae=B.textContent.length,Te=Math.min(X.start,Ae),lt=X.end===void 0?Te:Math.min(X.end,Ae);!oe.extend&&Te>lt&&(M=lt,lt=Te,Te=M);var J=gA(B,Te),Q=gA(B,lt);if(J&&Q&&(oe.rangeCount!==1||oe.anchorNode!==J.node||oe.anchorOffset!==J.offset||oe.focusNode!==Q.node||oe.focusOffset!==Q.offset)){var te=de.createRange();te.setStart(J.node,J.offset),oe.removeAllRanges(),Te>lt?(oe.addRange(te),oe.extend(Q.node,Q.offset)):(te.setEnd(Q.node,Q.offset),oe.addRange(te))}}}}for(de=[],oe=B;oe=oe.parentNode;)oe.nodeType===1&&de.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<de.length;B++){var ce=de[B];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}hh=!!x0,w0=x0=null}finally{Je=v,I.p=h,k.T=u}}a.current=s,Ht=2}}function Pj(){if(Ht===2){Ht=0;var a=ha,s=$s,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=k.T,k.T=null;var h=I.p;I.p=2;var v=Je;Je|=4;try{lj(a,s.alternate,s)}finally{Je=v,I.p=h,k.T=u}}Ht=3}}function Dj(){if(Ht===4||Ht===3){Ht=0,fr();var a=ha,s=$s,u=bi,h=wj;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Ht=5:(Ht=0,$s=ha=null,$j(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(da=null),pu(u),s=s.stateNode,yn&&typeof yn.onCommitFiberRoot=="function")try{yn.onCommitFiberRoot(Ka,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=k.T,v=I.p,I.p=2,k.T=null;try{for(var w=a.onRecoverableError,M=0;M<h.length;M++){var B=h[M];w(B.value,{componentStack:B.stack})}}finally{k.T=s,I.p=v}}(bi&3)!==0&&th(),$r(a),v=a.pendingLanes,(u&261930)!==0&&(v&42)!==0?a===s0?Xu++:(Xu=0,s0=a):Xu=0,Ku(0)}}function $j(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Tu(s)))}function th(){return Rj(),Pj(),Dj(),qj()}function qj(){if(Ht!==5)return!1;var a=ha,s=a0;a0=0;var u=pu(bi),h=k.T,v=I.p;try{I.p=32>u?32:u,k.T=null,u=o0,o0=null;var w=ha,M=bi;if(Ht=0,$s=ha=null,bi=0,(Je&6)!==0)throw Error(r(331));var B=Je;if(Je|=4,vj(w.current),yj(w,w.current,M,u),Je=B,Ku(0,!1),yn&&typeof yn.onPostCommitFiberRoot=="function")try{yn.onPostCommitFiberRoot(Ka,w)}catch{}return!0}finally{I.p=v,k.T=h,$j(a,s)}}function Lj(a,s,u){s=Xn(u,s),s=zg(a.stateNode,s,2),a=oa(a,s,2),a!==null&&(Qa(a,2),$r(a))}function it(a,s,u){if(a.tag===3)Lj(a,a,u);else for(;s!==null;){if(s.tag===3){Lj(s,a,u);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(da===null||!da.has(h))){a=Xn(u,a),u=zO(2),h=oa(s,u,2),h!==null&&(BO(u,h,s,a),Qa(h,2),$r(h));break}}s=s.return}}function c0(a,s,u){var h=a.pingCache;if(h===null){h=a.pingCache=new HL;var v=new Set;h.set(s,v)}else v=h.get(s),v===void 0&&(v=new Set,h.set(s,v));v.has(u)||(n0=!0,v.add(u),a=XL.bind(null,a,s,u),s.then(a,a))}function XL(a,s,u){var h=a.pingCache;h!==null&&h.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,ct===a&&(Ve&u)===u&&(Ot===4||Ot===3&&(Ve&62914560)===Ve&&300>kt()-Kd?(Je&2)===0&&qs(a,0):r0|=u,Ds===Ve&&(Ds=0)),$r(a)}function zj(a,s){s===0&&(s=Qf()),a=io(a,s),a!==null&&(Qa(a,s),$r(a))}function KL(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),zj(a,u)}function WL(a,s){var u=0;switch(a.tag){case 31:case 13:var h=a.stateNode,v=a.memoizedState;v!==null&&(u=v.retryLane);break;case 19:h=a.stateNode;break;case 22:h=a.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),zj(a,u)}function QL(a,s){return sn(a,s)}var nh=null,zs=null,f0=!1,rh=!1,d0=!1,ya=0;function $r(a){a!==zs&&a.next===null&&(zs===null?nh=zs=a:zs=zs.next=a),rh=!0,f0||(f0=!0,JL())}function Ku(a,s){if(!d0&&rh){d0=!0;do for(var u=!1,h=nh;h!==null;){if(a!==0){var v=h.pendingLanes;if(v===0)var w=0;else{var M=h.suspendedLanes,B=h.pingedLanes;w=(1<<31-mn(42|a)+1)-1,w&=v&~(M&~B),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,Hj(h,w))}else w=Ve,w=ls(h,h===ct?w:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(w&3)===0||Wa(h,w)||(u=!0,Hj(h,w));h=h.next}while(u);d0=!1}}function ZL(){Bj()}function Bj(){rh=f0=!1;var a=0;ya!==0&&uz()&&(a=ya);for(var s=kt(),u=null,h=nh;h!==null;){var v=h.next,w=Ij(h,s);w===0?(h.next=null,u===null?nh=v:u.next=v,v===null&&(zs=u)):(u=h,(a!==0||(w&3)!==0)&&(rh=!0)),h=v}Ht!==0&&Ht!==5||Ku(a),ya!==0&&(ya=0)}function Ij(a,s){for(var u=a.suspendedLanes,h=a.pingedLanes,v=a.expirationTimes,w=a.pendingLanes&-62914561;0<w;){var M=31-mn(w),B=1<<M,X=v[M];X===-1?((B&u)===0||(B&h)!==0)&&(v[M]=jm(B,s)):X<=s&&(a.expiredLanes|=B),w&=~B}if(s=ct,u=Ve,u=ls(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),h=a.callbackNode,u===0||a===s&&(rt===2||rt===9)||a.cancelPendingCommit!==null)return h!==null&&h!==null&&en(h),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Wa(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(h!==null&&en(h),pu(u)){case 2:case 8:u=Fi;break;case 32:u=Xa;break;case 268435456:u=is;break;default:u=Xa}return h=Uj.bind(null,a),u=sn(u,h),a.callbackPriority=s,a.callbackNode=u,s}return h!==null&&h!==null&&en(h),a.callbackPriority=2,a.callbackNode=null,2}function Uj(a,s){if(Ht!==0&&Ht!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(th()&&a.callbackNode!==u)return null;var h=Ve;return h=ls(a,a===ct?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),h===0?null:(_j(a,h,s),Ij(a,kt()),a.callbackNode!=null&&a.callbackNode===u?Uj.bind(null,a):null)}function Hj(a,s){if(th())return null;_j(a,s,!0)}function JL(){fz(function(){(Je&6)!==0?sn(Jr,ZL):Bj()})}function h0(){if(ya===0){var a=As;a===0&&(a=as,as<<=1,(as&261888)===0&&(as=256)),ya=a}return ya}function Vj(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:fd(""+a)}function Gj(a,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,a.id&&u.setAttribute("form",a.id),s.parentNode.insertBefore(u,s),a=new FormData(a),u.parentNode.removeChild(u),a}function ez(a,s,u,h,v){if(s==="submit"&&u&&u.stateNode===v){var w=Vj((v[ln]||null).action),M=h.submitter;M&&(s=(s=M[ln]||null)?Vj(s.formAction):M.getAttribute("formAction"),s!==null&&(w=s,M=null));var B=new yd("action","action",null,h,v);a.push({event:B,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ya!==0){var X=M?Gj(v,M):new FormData(v);Rg(u,{pending:!0,data:X,method:v.method,action:w},null,X)}}else typeof w=="function"&&(B.preventDefault(),X=M?Gj(v,M):new FormData(v),Rg(u,{pending:!0,data:X,method:v.method,action:w},w,X))},currentTarget:v}]})}}for(var p0=0;p0<Wm.length;p0++){var y0=Wm[p0],tz=y0.toLowerCase(),nz=y0[0].toUpperCase()+y0.slice(1);hr(tz,"on"+nz)}hr(SA,"onAnimationEnd"),hr(_A,"onAnimationIteration"),hr(AA,"onAnimationStart"),hr("dblclick","onDoubleClick"),hr("focusin","onFocus"),hr("focusout","onBlur"),hr(vL,"onTransitionRun"),hr(bL,"onTransitionStart"),hr(xL,"onTransitionCancel"),hr(OA,"onTransitionEnd"),Qi("onMouseEnter",["mouseout","mouseover"]),Qi("onMouseLeave",["mouseout","mouseover"]),Qi("onPointerEnter",["pointerout","pointerover"]),Qi("onPointerLeave",["pointerout","pointerover"]),ni("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ni("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ni("onBeforeInput",["compositionend","keypress","textInput","paste"]),ni("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ni("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ni("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wu="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(" "),rz=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wu));function Fj(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var h=a[u],v=h.event;h=h.listeners;e:{var w=void 0;if(s)for(var M=h.length-1;0<=M;M--){var B=h[M],X=B.instance,ne=B.currentTarget;if(B=B.listener,X!==w&&v.isPropagationStopped())break e;w=B,v.currentTarget=ne;try{w(v)}catch(se){vd(se)}v.currentTarget=null,w=X}else for(M=0;M<h.length;M++){if(B=h[M],X=B.instance,ne=B.currentTarget,B=B.listener,X!==w&&v.isPropagationStopped())break e;w=B,v.currentTarget=ne;try{w(v)}catch(se){vd(se)}v.currentTarget=null,w=X}}}}function He(a,s){var u=s[us];u===void 0&&(u=s[us]=new Set);var h=a+"__bubble";u.has(h)||(Yj(s,a,2,!1),u.add(h))}function m0(a,s,u){var h=0;s&&(h|=4),Yj(u,a,h,s)}var ih="_reactListening"+Math.random().toString(36).slice(2);function g0(a){if(!a[ih]){a[ih]=!0,ad.forEach(function(u){u!=="selectionchange"&&(rz.has(u)||m0(u,!1,a),m0(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[ih]||(s[ih]=!0,m0("selectionchange",!1,s))}}function Yj(a,s,u,h){switch(SE(s)){case 2:var v=Mz;break;case 8:v=kz;break;default:v=k0}u=v.bind(null,s,u,a),v=void 0,!qm||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),h?v!==void 0?a.addEventListener(s,u,{capture:!0,passive:v}):a.addEventListener(s,u,!0):v!==void 0?a.addEventListener(s,u,{passive:v}):a.addEventListener(s,u,!1)}function v0(a,s,u,h,v){var w=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var M=h.tag;if(M===3||M===4){var B=h.stateNode.containerInfo;if(B===v)break;if(M===4)for(M=h.return;M!==null;){var X=M.tag;if((X===3||X===4)&&M.stateNode.containerInfo===v)return;M=M.return}for(;B!==null;){if(M=Yi(B),M===null)return;if(X=M.tag,X===5||X===6||X===26||X===27){h=w=M;continue e}B=B.parentNode}}h=h.return}Z2(function(){var ne=w,se=Dm(u),de=[];e:{var re=jA.get(a);if(re!==void 0){var oe=yd,Ae=a;switch(a){case"keypress":if(hd(u)===0)break e;case"keydown":case"keyup":oe=W6;break;case"focusin":Ae="focus",oe=Im;break;case"focusout":Ae="blur",oe=Im;break;case"beforeblur":case"afterblur":oe=Im;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=tA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=L6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=J6;break;case SA:case _A:case AA:oe=I6;break;case OA:oe=tL;break;case"scroll":case"scrollend":oe=$6;break;case"wheel":oe=rL;break;case"copy":case"cut":case"paste":oe=H6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=rA;break;case"toggle":case"beforetoggle":oe=aL}var Te=(s&4)!==0,lt=!Te&&(a==="scroll"||a==="scrollend"),J=Te?re!==null?re+"Capture":null:re;Te=[];for(var Q=ne,te;Q!==null;){var ce=Q;if(te=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||te===null||J===null||(ce=vu(Q,J),ce!=null&&Te.push(Qu(Q,ce,te))),lt)break;Q=Q.return}0<Te.length&&(re=new oe(re,Ae,null,u,se),de.push({event:re,listeners:Te}))}}if((s&7)===0){e:{if(re=a==="mouseover"||a==="pointerover",oe=a==="mouseout"||a==="pointerout",re&&u!==Pm&&(Ae=u.relatedTarget||u.fromElement)&&(Yi(Ae)||Ae[ti]))break e;if((oe||re)&&(re=se.window===se?se:(re=se.ownerDocument)?re.defaultView||re.parentWindow:window,oe?(Ae=u.relatedTarget||u.toElement,oe=ne,Ae=Ae?Yi(Ae):null,Ae!==null&&(lt=o(Ae),Te=Ae.tag,Ae!==lt||Te!==5&&Te!==27&&Te!==6)&&(Ae=null)):(oe=null,Ae=ne),oe!==Ae)){if(Te=tA,ce="onMouseLeave",J="onMouseEnter",Q="mouse",(a==="pointerout"||a==="pointerover")&&(Te=rA,ce="onPointerLeave",J="onPointerEnter",Q="pointer"),lt=oe==null?re:Ki(oe),te=Ae==null?re:Ki(Ae),re=new Te(ce,Q+"leave",oe,u,se),re.target=lt,re.relatedTarget=te,ce=null,Yi(se)===ne&&(Te=new Te(J,Q+"enter",Ae,u,se),Te.target=te,Te.relatedTarget=lt,ce=Te),lt=ce,oe&&Ae)t:{for(Te=iz,J=oe,Q=Ae,te=0,ce=J;ce;ce=Te(ce))te++;ce=0;for(var Ne=Q;Ne;Ne=Te(Ne))ce++;for(;0<te-ce;)J=Te(J),te--;for(;0<ce-te;)Q=Te(Q),ce--;for(;te--;){if(J===Q||Q!==null&&J===Q.alternate){Te=J;break t}J=Te(J),Q=Te(Q)}Te=null}else Te=null;oe!==null&&Xj(de,re,oe,Te,!1),Ae!==null&&lt!==null&&Xj(de,lt,Ae,Te,!0)}}e:{if(re=ne?Ki(ne):window,oe=re.nodeName&&re.nodeName.toLowerCase(),oe==="select"||oe==="input"&&re.type==="file")var We=fA;else if(uA(re))if(dA)We=yL;else{We=hL;var Oe=dL}else oe=re.nodeName,!oe||oe.toLowerCase()!=="input"||re.type!=="checkbox"&&re.type!=="radio"?ne&&Rm(ne.elementType)&&(We=fA):We=pL;if(We&&(We=We(a,ne))){cA(de,We,u,se);break e}Oe&&Oe(a,re,ne),a==="focusout"&&ne&&re.type==="number"&&ne.memoizedProps.value!=null&&gu(re,"number",re.value)}switch(Oe=ne?Ki(ne):window,a){case"focusin":(uA(Oe)||Oe.contentEditable==="true")&&(ms=Oe,Ym=ne,ju=null);break;case"focusout":ju=Ym=ms=null;break;case"mousedown":Xm=!0;break;case"contextmenu":case"mouseup":case"dragend":Xm=!1,xA(de,u,se);break;case"selectionchange":if(gL)break;case"keydown":case"keyup":xA(de,u,se)}var qe;if(Hm)e:{switch(a){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else ys?sA(a,u)&&(Ge="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Ge="onCompositionStart");Ge&&(iA&&u.locale!=="ko"&&(ys||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&ys&&(qe=J2()):(Ji=se,Lm="value"in Ji?Ji.value:Ji.textContent,ys=!0)),Oe=ah(ne,Ge),0<Oe.length&&(Ge=new nA(Ge,a,null,u,se),de.push({event:Ge,listeners:Oe}),qe?Ge.data=qe:(qe=lA(u),qe!==null&&(Ge.data=qe)))),(qe=sL?lL(a,u):uL(a,u))&&(Ge=ah(ne,"onBeforeInput"),0<Ge.length&&(Oe=new nA("onBeforeInput","beforeinput",null,u,se),de.push({event:Oe,listeners:Ge}),Oe.data=qe)),ez(de,a,ne,u,se)}Fj(de,s)})}function Qu(a,s,u){return{instance:a,listener:s,currentTarget:u}}function ah(a,s){for(var u=s+"Capture",h=[];a!==null;){var v=a,w=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||w===null||(v=vu(a,u),v!=null&&h.unshift(Qu(a,v,w)),v=vu(a,s),v!=null&&h.push(Qu(a,v,w))),a.tag===3)return h;a=a.return}return[]}function iz(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Xj(a,s,u,h,v){for(var w=s._reactName,M=[];u!==null&&u!==h;){var B=u,X=B.alternate,ne=B.stateNode;if(B=B.tag,X!==null&&X===h)break;B!==5&&B!==26&&B!==27||ne===null||(X=ne,v?(ne=vu(u,w),ne!=null&&M.unshift(Qu(u,ne,X))):v||(ne=vu(u,w),ne!=null&&M.push(Qu(u,ne,X)))),u=u.return}M.length!==0&&a.push({event:s,listeners:M})}var az=/\r\n?/g,oz=/\u0000|\uFFFD/g;function Kj(a){return(typeof a=="string"?a:""+a).replace(az,`
49
+ `).replace(oz,"")}function Wj(a,s){return s=Kj(s),Kj(a)===s}function st(a,s,u,h,v,w){switch(u){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||ds(a,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&ds(a,""+h);break;case"className":fs(a,"class",h);break;case"tabIndex":fs(a,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":fs(a,u,h);break;case"style":W2(a,h,w);break;case"data":if(s!=="object"){fs(a,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){a.removeAttribute(u);break}h=fd(""+h),a.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){a.setAttribute(u,"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 w=="function"&&(u==="formAction"?(s!=="input"&&st(a,s,"name",v.name,v,null),st(a,s,"formEncType",v.formEncType,v,null),st(a,s,"formMethod",v.formMethod,v,null),st(a,s,"formTarget",v.formTarget,v,null)):(st(a,s,"encType",v.encType,v,null),st(a,s,"method",v.method,v,null),st(a,s,"target",v.target,v,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){a.removeAttribute(u);break}h=fd(""+h),a.setAttribute(u,h);break;case"onClick":h!=null&&(a.onclick=ii);break;case"onScroll":h!=null&&He("scroll",a);break;case"onScrollEnd":h!=null&&He("scrollend",a);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":a.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){a.removeAttribute("xlink:href");break}u=fd(""+h),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,""+h):a.removeAttribute(u);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":h&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":h===!0?a.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,h):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?a.setAttribute(u,h):a.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?a.removeAttribute(u):a.setAttribute(u,h);break;case"popover":He("beforetoggle",a),He("toggle",a),cs(a,"popover",h);break;case"xlinkActuate":dr(a,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":dr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":dr(a,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":dr(a,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":dr(a,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":dr(a,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":dr(a,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":dr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":dr(a,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":cs(a,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=P6.get(u)||u,cs(a,u,h))}}function b0(a,s,u,h,v,w){switch(u){case"style":W2(a,h,w);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof h=="string"?ds(a,h):(typeof h=="number"||typeof h=="bigint")&&ds(a,""+h);break;case"onScroll":h!=null&&He("scroll",a);break;case"onScrollEnd":h!=null&&He("scrollend",a);break;case"onClick":h!=null&&(a.onclick=ii);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!od.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(v=u.endsWith("Capture"),s=u.slice(2,v?u.length-7:void 0),w=a[ln]||null,w=w!=null?w[u]:null,typeof w=="function"&&a.removeEventListener(s,w,v),typeof h=="function")){typeof w!="function"&&w!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,h,v);break e}u in a?a[u]=h:h===!0?a.setAttribute(u,""):cs(a,u,h)}}}function an(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":He("error",a),He("load",a);var h=!1,v=!1,w;for(w in u)if(u.hasOwnProperty(w)){var M=u[w];if(M!=null)switch(w){case"src":h=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:st(a,s,w,M,u,null)}}v&&st(a,s,"srcSet",u.srcSet,u,null),h&&st(a,s,"src",u.src,u,null);return;case"input":He("invalid",a);var B=w=M=v=null,X=null,ne=null;for(h in u)if(u.hasOwnProperty(h)){var se=u[h];if(se!=null)switch(h){case"name":v=se;break;case"type":M=se;break;case"checked":X=se;break;case"defaultChecked":ne=se;break;case"value":w=se;break;case"defaultValue":B=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:st(a,s,h,se,u,null)}}cd(a,w,B,X,ne,M,v,!1);return;case"select":He("invalid",a),h=M=w=null;for(v in u)if(u.hasOwnProperty(v)&&(B=u[v],B!=null))switch(v){case"value":w=B;break;case"defaultValue":M=B;break;case"multiple":h=B;default:st(a,s,v,B,u,null)}s=w,u=M,a.multiple=!!h,s!=null?ri(a,!!h,s,!1):u!=null&&ri(a,!!h,u,!0);return;case"textarea":He("invalid",a),w=v=h=null;for(M in u)if(u.hasOwnProperty(M)&&(B=u[M],B!=null))switch(M){case"value":h=B;break;case"defaultValue":v=B;break;case"children":w=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(91));break;default:st(a,s,M,B,u,null)}X2(a,h,v,w);return;case"option":for(X in u)if(u.hasOwnProperty(X)&&(h=u[X],h!=null))switch(X){case"selected":a.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:st(a,s,X,h,u,null)}return;case"dialog":He("beforetoggle",a),He("toggle",a),He("cancel",a),He("close",a);break;case"iframe":case"object":He("load",a);break;case"video":case"audio":for(h=0;h<Wu.length;h++)He(Wu[h],a);break;case"image":He("error",a),He("load",a);break;case"details":He("toggle",a);break;case"embed":case"source":case"link":He("error",a),He("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in u)if(u.hasOwnProperty(ne)&&(h=u[ne],h!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:st(a,s,ne,h,u,null)}return;default:if(Rm(s)){for(se in u)u.hasOwnProperty(se)&&(h=u[se],h!==void 0&&b0(a,s,se,h,u,void 0));return}}for(B in u)u.hasOwnProperty(B)&&(h=u[B],h!=null&&st(a,s,B,h,u,null))}function sz(a,s,u,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,w=null,M=null,B=null,X=null,ne=null,se=null;for(oe in u){var de=u[oe];if(u.hasOwnProperty(oe)&&de!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":X=de;default:h.hasOwnProperty(oe)||st(a,s,oe,null,h,de)}}for(var re in h){var oe=h[re];if(de=u[re],h.hasOwnProperty(re)&&(oe!=null||de!=null))switch(re){case"type":w=oe;break;case"name":v=oe;break;case"checked":ne=oe;break;case"defaultChecked":se=oe;break;case"value":M=oe;break;case"defaultValue":B=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,s));break;default:oe!==de&&st(a,s,re,oe,h,de)}}eo(a,M,B,X,ne,se,w,v);return;case"select":oe=M=B=re=null;for(w in u)if(X=u[w],u.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":oe=X;default:h.hasOwnProperty(w)||st(a,s,w,null,h,X)}for(v in h)if(w=h[v],X=u[v],h.hasOwnProperty(v)&&(w!=null||X!=null))switch(v){case"value":re=w;break;case"defaultValue":B=w;break;case"multiple":M=w;default:w!==X&&st(a,s,v,w,h,X)}s=B,u=M,h=oe,re!=null?ri(a,!!u,re,!1):!!h!=!!u&&(s!=null?ri(a,!!u,s,!0):ri(a,!!u,u?[]:"",!1));return;case"textarea":oe=re=null;for(B in u)if(v=u[B],u.hasOwnProperty(B)&&v!=null&&!h.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:st(a,s,B,null,h,v)}for(M in h)if(v=h[M],w=u[M],h.hasOwnProperty(M)&&(v!=null||w!=null))switch(M){case"value":re=v;break;case"defaultValue":oe=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(r(91));break;default:v!==w&&st(a,s,M,v,h,w)}Y2(a,re,oe);return;case"option":for(var Ae in u)if(re=u[Ae],u.hasOwnProperty(Ae)&&re!=null&&!h.hasOwnProperty(Ae))switch(Ae){case"selected":a.selected=!1;break;default:st(a,s,Ae,null,h,re)}for(X in h)if(re=h[X],oe=u[X],h.hasOwnProperty(X)&&re!==oe&&(re!=null||oe!=null))switch(X){case"selected":a.selected=re&&typeof re!="function"&&typeof re!="symbol";break;default:st(a,s,X,re,h,oe)}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 Te in u)re=u[Te],u.hasOwnProperty(Te)&&re!=null&&!h.hasOwnProperty(Te)&&st(a,s,Te,null,h,re);for(ne in h)if(re=h[ne],oe=u[ne],h.hasOwnProperty(ne)&&re!==oe&&(re!=null||oe!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,s));break;default:st(a,s,ne,re,h,oe)}return;default:if(Rm(s)){for(var lt in u)re=u[lt],u.hasOwnProperty(lt)&&re!==void 0&&!h.hasOwnProperty(lt)&&b0(a,s,lt,void 0,h,re);for(se in h)re=h[se],oe=u[se],!h.hasOwnProperty(se)||re===oe||re===void 0&&oe===void 0||b0(a,s,se,re,h,oe);return}}for(var J in u)re=u[J],u.hasOwnProperty(J)&&re!=null&&!h.hasOwnProperty(J)&&st(a,s,J,null,h,re);for(de in h)re=h[de],oe=u[de],!h.hasOwnProperty(de)||re===oe||re==null&&oe==null||st(a,s,de,re,h,oe)}function Qj(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lz(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var v=u[h],w=v.transferSize,M=v.initiatorType,B=v.duration;if(w&&B&&Qj(M)){for(M=0,B=v.responseEnd,h+=1;h<u.length;h++){var X=u[h],ne=X.startTime;if(ne>B)break;var se=X.transferSize,de=X.initiatorType;se&&Qj(de)&&(X=X.responseEnd,M+=se*(X<B?1:(B-ne)/(X-ne)))}if(--h,s+=8*(w+M)/(v.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var x0=null,w0=null;function oh(a){return a.nodeType===9?a:a.ownerDocument}function Zj(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jj(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function S0(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var _0=null;function uz(){var a=window.event;return a&&a.type==="popstate"?a===_0?!1:(_0=a,!0):(_0=null,!1)}var eE=typeof setTimeout=="function"?setTimeout:void 0,cz=typeof clearTimeout=="function"?clearTimeout:void 0,tE=typeof Promise=="function"?Promise:void 0,fz=typeof queueMicrotask=="function"?queueMicrotask:typeof tE<"u"?function(a){return tE.resolve(null).then(a).catch(dz)}:eE;function dz(a){setTimeout(function(){throw a})}function ma(a){return a==="head"}function nE(a,s){var u=s,h=0;do{var v=u.nextSibling;if(a.removeChild(u),v&&v.nodeType===8)if(u=v.data,u==="/$"||u==="/&"){if(h===0){a.removeChild(v),Hs(s);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")Zu(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Zu(u);for(var w=u.firstChild;w;){var M=w.nextSibling,B=w.nodeName;w[Za]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=M}}else u==="body"&&Zu(a.ownerDocument.body);u=v}while(u);Hs(s)}function rE(a,s){var u=a;a=0;do{var h=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=h}while(u)}function A0(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":A0(u),yu(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function hz(a,s,u,h){for(;a.nodeType===1;){var v=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(h){if(!a[Za])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(w=a.getAttribute("rel"),w==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(w!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(w=a.getAttribute("src"),(w!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&w&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var w=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===w)return a}else return a;if(a=Jn(a.nextSibling),a===null)break}return null}function pz(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=Jn(a.nextSibling),a===null))return null;return a}function iE(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Jn(a.nextSibling),a===null))return null;return a}function O0(a){return a.data==="$?"||a.data==="$~"}function j0(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function yz(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var h=function(){s(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),a._reactRetry=h}}function Jn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var E0=null;function aE(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return Jn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function oE(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return a;s--}else u!=="/$"&&u!=="/&"||s++}a=a.previousSibling}return null}function sE(a,s,u){switch(s=oh(u),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Zu(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);yu(a)}var er=new Map,lE=new Set;function sh(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var xi=I.d;I.d={f:mz,r:gz,D:vz,C:bz,L:xz,m:wz,X:_z,S:Sz,M:Az};function mz(){var a=xi.f(),s=Zd();return a||s}function gz(a){var s=Xi(a);s!==null&&s.tag===5&&s.type==="form"?OO(s):xi.r(a)}var Bs=typeof document>"u"?null:document;function uE(a,s,u){var h=Bs;if(h&&typeof s=="string"&&s){var v=An(s);v='link[rel="'+a+'"][href="'+v+'"]',typeof u=="string"&&(v+='[crossorigin="'+u+'"]'),lE.has(v)||(lE.add(v),a={rel:a,crossOrigin:u,href:s},h.querySelector(v)===null&&(s=h.createElement("link"),an(s,"link",a),Rt(s),h.head.appendChild(s)))}}function vz(a){xi.D(a),uE("dns-prefetch",a,null)}function bz(a,s){xi.C(a,s),uE("preconnect",a,s)}function xz(a,s,u){xi.L(a,s,u);var h=Bs;if(h&&a&&s){var v='link[rel="preload"][as="'+An(s)+'"]';s==="image"&&u&&u.imageSrcSet?(v+='[imagesrcset="'+An(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(v+='[imagesizes="'+An(u.imageSizes)+'"]')):v+='[href="'+An(a)+'"]';var w=v;switch(s){case"style":w=Is(a);break;case"script":w=Us(a)}er.has(w)||(a=p({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),er.set(w,a),h.querySelector(v)!==null||s==="style"&&h.querySelector(Ju(w))||s==="script"&&h.querySelector(ec(w))||(s=h.createElement("link"),an(s,"link",a),Rt(s),h.head.appendChild(s)))}}function wz(a,s){xi.m(a,s);var u=Bs;if(u&&a){var h=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+An(h)+'"][href="'+An(a)+'"]',w=v;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=Us(a)}if(!er.has(w)&&(a=p({rel:"modulepreload",href:a},s),er.set(w,a),u.querySelector(v)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(ec(w)))return}h=u.createElement("link"),an(h,"link",a),Rt(h),u.head.appendChild(h)}}}function Sz(a,s,u){xi.S(a,s,u);var h=Bs;if(h&&a){var v=Wi(h).hoistableStyles,w=Is(a);s=s||"default";var M=v.get(w);if(!M){var B={loading:0,preload:null};if(M=h.querySelector(Ju(w)))B.loading=5;else{a=p({rel:"stylesheet",href:a,"data-precedence":s},u),(u=er.get(w))&&N0(a,u);var X=M=h.createElement("link");Rt(X),an(X,"link",a),X._p=new Promise(function(ne,se){X.onload=ne,X.onerror=se}),X.addEventListener("load",function(){B.loading|=1}),X.addEventListener("error",function(){B.loading|=2}),B.loading|=4,lh(M,s,h)}M={type:"stylesheet",instance:M,count:1,state:B},v.set(w,M)}}}function _z(a,s){xi.X(a,s);var u=Bs;if(u&&a){var h=Wi(u).hoistableScripts,v=Us(a),w=h.get(v);w||(w=u.querySelector(ec(v)),w||(a=p({src:a,async:!0},s),(s=er.get(v))&&T0(a,s),w=u.createElement("script"),Rt(w),an(w,"link",a),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},h.set(v,w))}}function Az(a,s){xi.M(a,s);var u=Bs;if(u&&a){var h=Wi(u).hoistableScripts,v=Us(a),w=h.get(v);w||(w=u.querySelector(ec(v)),w||(a=p({src:a,async:!0,type:"module"},s),(s=er.get(v))&&T0(a,s),w=u.createElement("script"),Rt(w),an(w,"link",a),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},h.set(v,w))}}function cE(a,s,u,h){var v=(v=pe.current)?sh(v):null;if(!v)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=Is(u.href),u=Wi(v).hoistableStyles,h=u.get(s),h||(h={type:"style",instance:null,count:0,state:null},u.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=Is(u.href);var w=Wi(v).hoistableStyles,M=w.get(a);if(M||(v=v.ownerDocument||v,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(a,M),(w=v.querySelector(Ju(a)))&&!w._p&&(M.instance=w,M.state.loading=5),er.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},er.set(a,u),w||Oz(v,a,u,M.state))),s&&h===null)throw Error(r(528,""));return M}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Us(u),u=Wi(v).hoistableScripts,h=u.get(s),h||(h={type:"script",instance:null,count:0,state:null},u.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Is(a){return'href="'+An(a)+'"'}function Ju(a){return'link[rel="stylesheet"]['+a+"]"}function fE(a){return p({},a,{"data-precedence":a.precedence,precedence:null})}function Oz(a,s,u,h){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=a.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),an(s,"link",u),Rt(s),a.head.appendChild(s))}function Us(a){return'[src="'+An(a)+'"]'}function ec(a){return"script[async]"+a}function dE(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var h=a.querySelector('style[data-href~="'+An(u.href)+'"]');if(h)return s.instance=h,Rt(h),h;var v=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(a.ownerDocument||a).createElement("style"),Rt(h),an(h,"style",v),lh(h,u.precedence,a),s.instance=h;case"stylesheet":v=Is(u.href);var w=a.querySelector(Ju(v));if(w)return s.state.loading|=4,s.instance=w,Rt(w),w;h=fE(u),(v=er.get(v))&&N0(h,v),w=(a.ownerDocument||a).createElement("link"),Rt(w);var M=w;return M._p=new Promise(function(B,X){M.onload=B,M.onerror=X}),an(w,"link",h),s.state.loading|=4,lh(w,u.precedence,a),s.instance=w;case"script":return w=Us(u.src),(v=a.querySelector(ec(w)))?(s.instance=v,Rt(v),v):(h=u,(v=er.get(w))&&(h=p({},u),T0(h,v)),a=a.ownerDocument||a,v=a.createElement("script"),Rt(v),an(v,"link",h),a.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,lh(h,u.precedence,a));return s.instance}function lh(a,s,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=h.length?h[h.length-1]:null,w=v,M=0;M<h.length;M++){var B=h[M];if(B.dataset.precedence===s)w=B;else if(w!==v)break}w?w.parentNode.insertBefore(a,w.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function N0(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function T0(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var uh=null;function hE(a,s,u){if(uh===null){var h=new Map,v=uh=new Map;v.set(u,h)}else v=uh,h=v.get(u),h||(h=new Map,v.set(u,h));if(h.has(a))return h;for(h.set(a,null),u=u.getElementsByTagName(a),v=0;v<u.length;v++){var w=u[v];if(!(w[Za]||w[Ut]||a==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var M=w.getAttribute(s)||"";M=a+M;var B=h.get(M);B?B.push(w):h.set(M,[w])}}return h}function pE(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function jz(a,s,u){if(u===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function yE(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function Ez(a,s,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var v=Is(h.href),w=s.querySelector(Ju(v));if(w){s=w._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=ch.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=w,Rt(w);return}w=s.ownerDocument||s,h=fE(h),(v=er.get(v))&&N0(h,v),w=w.createElement("link"),Rt(w);var M=w;M._p=new Promise(function(B,X){M.onload=B,M.onerror=X}),an(w,"link",h),u.instance=w}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=ch.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var C0=0;function Nz(a,s){return a.stylesheets&&a.count===0&&dh(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var h=setTimeout(function(){if(a.stylesheets&&dh(a,a.stylesheets),a.unsuspend){var w=a.unsuspend;a.unsuspend=null,w()}},6e4+s);0<a.imgBytes&&C0===0&&(C0=62500*lz());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&dh(a,a.stylesheets),a.unsuspend)){var w=a.unsuspend;a.unsuspend=null,w()}},(a.imgBytes>C0?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(h),clearTimeout(v)}}:null}function ch(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dh(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var fh=null;function dh(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,fh=new Map,s.forEach(Tz,a),fh=null,ch.call(a))}function Tz(a,s){if(!(s.state.loading&4)){var u=fh.get(a);if(u)var h=u.get(null);else{u=new Map,fh.set(a,u);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<v.length;w++){var M=v[w];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),h=M)}h&&u.set(null,h)}v=s.instance,M=v.getAttribute("data-precedence"),w=u.get(M)||h,w===h&&u.set(null,v),u.set(M,v),this.count++,h=ch.bind(this),v.addEventListener("load",h),v.addEventListener("error",h),w?w.parentNode.insertBefore(v,w.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),s.state.loading|=4}}var tc={$$typeof:O,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function Cz(a,s,u,h,v,w,M,B,X){this.tag=1,this.containerInfo=a,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=du(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=du(0),this.hiddenUpdates=du(null),this.identifierPrefix=h,this.onUncaughtError=v,this.onCaughtError=w,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function mE(a,s,u,h,v,w,M,B,X,ne,se,de){return a=new Cz(a,s,u,M,X,ne,se,de,B),s=1,w===!0&&(s|=24),w=Pn(3,null,null,s),a.current=w,w.stateNode=a,s=ug(),s.refCount++,a.pooledCache=s,s.refCount++,w.memoizedState={element:h,isDehydrated:u,cache:s},hg(w),a}function gE(a){return a?(a=bs,a):bs}function vE(a,s,u,h,v,w){v=gE(v),h.context===null?h.context=v:h.pendingContext=v,h=aa(s),h.payload={element:u},w=w===void 0?null:w,w!==null&&(h.callback=w),u=oa(a,h,s),u!==null&&(Cn(u,a,s),Ru(u,a,s))}function bE(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function M0(a,s){bE(a,s),(a=a.alternate)&&bE(a,s)}function xE(a){if(a.tag===13||a.tag===31){var s=io(a,67108864);s!==null&&Cn(s,a,67108864),M0(a,67108864)}}function wE(a){if(a.tag===13||a.tag===31){var s=zn();s=hu(s);var u=io(a,s);u!==null&&Cn(u,a,s),M0(a,s)}}var hh=!0;function Mz(a,s,u,h){var v=k.T;k.T=null;var w=I.p;try{I.p=2,k0(a,s,u,h)}finally{I.p=w,k.T=v}}function kz(a,s,u,h){var v=k.T;k.T=null;var w=I.p;try{I.p=8,k0(a,s,u,h)}finally{I.p=w,k.T=v}}function k0(a,s,u,h){if(hh){var v=R0(h);if(v===null)v0(a,s,h,ph,u),_E(a,h);else if(Pz(v,a,s,u,h))h.stopPropagation();else if(_E(a,h),s&4&&-1<Rz.indexOf(a)){for(;v!==null;){var w=Xi(v);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var M=ei(w.pendingLanes);if(M!==0){var B=w;for(B.pendingLanes|=2,B.entangledLanes|=2;M;){var X=1<<31-mn(M);B.entanglements[1]|=X,M&=~X}$r(w),(Je&6)===0&&(Wd=kt()+500,Ku(0))}}break;case 31:case 13:B=io(w,2),B!==null&&Cn(B,w,2),Zd(),M0(w,2)}if(w=R0(h),w===null&&v0(a,s,h,ph,u),w===v)break;v=w}v!==null&&h.stopPropagation()}else v0(a,s,h,null,u)}}function R0(a){return a=Dm(a),P0(a)}var ph=null;function P0(a){if(ph=null,a=Yi(a),a!==null){var s=o(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=l(s),a!==null)return a;a=null}else if(u===31){if(a=c(s),a!==null)return a;a=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return ph=a,null}function SE(a){switch(a){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(Zr()){case Jr:return 2;case Fi:return 8;case Xa:case xm:return 32;case is:return 268435456;default:return 32}default:return 32}}var D0=!1,ga=null,va=null,ba=null,nc=new Map,rc=new Map,xa=[],Rz="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 _E(a,s){switch(a){case"focusin":case"focusout":ga=null;break;case"dragenter":case"dragleave":va=null;break;case"mouseover":case"mouseout":ba=null;break;case"pointerover":case"pointerout":nc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":rc.delete(s.pointerId)}}function ic(a,s,u,h,v,w){return a===null||a.nativeEvent!==w?(a={blockedOn:s,domEventName:u,eventSystemFlags:h,nativeEvent:w,targetContainers:[v]},s!==null&&(s=Xi(s),s!==null&&xE(s)),a):(a.eventSystemFlags|=h,s=a.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),a)}function Pz(a,s,u,h,v){switch(s){case"focusin":return ga=ic(ga,a,s,u,h,v),!0;case"dragenter":return va=ic(va,a,s,u,h,v),!0;case"mouseover":return ba=ic(ba,a,s,u,h,v),!0;case"pointerover":var w=v.pointerId;return nc.set(w,ic(nc.get(w)||null,a,s,u,h,v)),!0;case"gotpointercapture":return w=v.pointerId,rc.set(w,ic(rc.get(w)||null,a,s,u,h,v)),!0}return!1}function AE(a){var s=Yi(a.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){a.blockedOn=s,nd(a.priority,function(){wE(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,nd(a.priority,function(){wE(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function yh(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=R0(a.nativeEvent);if(u===null){u=a.nativeEvent;var h=new u.constructor(u.type,u);Pm=h,u.target.dispatchEvent(h),Pm=null}else return s=Xi(u),s!==null&&xE(s),a.blockedOn=u,!1;s.shift()}return!0}function OE(a,s,u){yh(a)&&u.delete(s)}function Dz(){D0=!1,ga!==null&&yh(ga)&&(ga=null),va!==null&&yh(va)&&(va=null),ba!==null&&yh(ba)&&(ba=null),nc.forEach(OE),rc.forEach(OE)}function mh(a,s){a.blockedOn===s&&(a.blockedOn=null,D0||(D0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Dz)))}var gh=null;function jE(a){gh!==a&&(gh=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){gh===a&&(gh=null);for(var s=0;s<a.length;s+=3){var u=a[s],h=a[s+1],v=a[s+2];if(typeof h!="function"){if(P0(h||u)===null)continue;break}var w=Xi(u);w!==null&&(a.splice(s,3),s-=3,Rg(w,{pending:!0,data:v,method:u.method,action:h},h,v))}}))}function Hs(a){function s(X){return mh(X,a)}ga!==null&&mh(ga,a),va!==null&&mh(va,a),ba!==null&&mh(ba,a),nc.forEach(s),rc.forEach(s);for(var u=0;u<xa.length;u++){var h=xa[u];h.blockedOn===a&&(h.blockedOn=null)}for(;0<xa.length&&(u=xa[0],u.blockedOn===null);)AE(u),u.blockedOn===null&&xa.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var v=u[h],w=u[h+1],M=v[ln]||null;if(typeof w=="function")M||jE(u);else if(M){var B=null;if(w&&w.hasAttribute("formAction")){if(v=w,M=w[ln]||null)B=M.formAction;else if(P0(v)!==null)continue}else B=M.action;typeof B=="function"?u[h+1]=B:(u.splice(h,3),h-=3),jE(u)}}}function EE(){function a(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(M){return v=M})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function $0(a){this._internalRoot=a}vh.prototype.render=$0.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,h=zn();vE(u,h,a,s,null,null)},vh.prototype.unmount=$0.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;vE(a.current,2,null,a,null,null),Zd(),s[ti]=null}};function vh(a){this._internalRoot=a}vh.prototype.unstable_scheduleHydration=function(a){if(a){var s=td();a={blockedOn:null,target:a,priority:s};for(var u=0;u<xa.length&&s!==0&&s<xa[u].priority;u++);xa.splice(u,0,a),u===0&&AE(a)}};var NE=t.version;if(NE!=="19.2.3")throw Error(r(527,NE,"19.2.3"));I.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=d(s),a=a!==null?y(a):null,a=a===null?null:a.stateNode,a};var $z={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bh.isDisabled&&bh.supportsFiber)try{Ka=bh.inject($z),yn=bh}catch{}}return oc.createRoot=function(a,s){if(!i(a))throw Error(r(299));var u=!1,h="",v=DO,w=$O,M=qO;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(w=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError)),s=mE(a,1,!1,null,null,u,h,null,v,w,M,EE),a[ti]=s.current,g0(a),new $0(s)},oc.hydrateRoot=function(a,s,u){if(!i(a))throw Error(r(299));var h=!1,v="",w=DO,M=$O,B=qO,X=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(B=u.onRecoverableError),u.formState!==void 0&&(X=u.formState)),s=mE(a,1,!0,s,u??null,h,v,X,w,M,B,EE),s.context=gE(null),u=s.current,h=zn(),h=hu(h),v=aa(h),v.callback=null,oa(u,v,h),u=h,s.current.lanes=u,Qa(s,u),$r(s),a[ti]=s.current,g0(a),new vh(s)},oc.version="19.2.3",oc}var zE;function Gz(){if(zE)return B0.exports;zE=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(),B0.exports=Vz(),B0.exports}var Fz=Gz(),gy=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(){}},Yz={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ra,r_,pP,Xz=(pP=class{constructor(){Ye(this,Ra,Yz);Ye(this,r_,!1)}setTimeoutProvider(e){Re(this,Ra,e)}setTimeout(e,t){return ue(this,Ra).setTimeout(e,t)}clearTimeout(e){ue(this,Ra).clearTimeout(e)}setInterval(e,t){return ue(this,Ra).setInterval(e,t)}clearInterval(e){ue(this,Ra).clearInterval(e)}},Ra=new WeakMap,r_=new WeakMap,pP),fw=new Xz;function Kz(e){setTimeout(e,0)}var vy=typeof window>"u"||"Deno"in globalThis;function gr(){}function Wz(e,t){return typeof e=="function"?e(t):e}function Qz(e){return typeof e=="number"&&e>=0&&e!==1/0}function Zz(e,t){return Math.max(e+(t||0)-Date.now(),0)}function dw(e,t){return typeof e=="function"?e(t):e}function Jz(e,t){return typeof e=="function"?e(t):e}function BE(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==i_(l,t.options))return!1}else if(!Lc(t.queryKey,l))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function IE(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(qc(t.options.mutationKey)!==qc(o))return!1}else if(!Lc(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function i_(e,t){return((t==null?void 0:t.queryKeyHashFn)||qc)(e)}function qc(e){return JSON.stringify(e,(t,n)=>hw(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Lc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Lc(e[n],t[n])):!1}var eB=Object.prototype.hasOwnProperty;function AP(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=UE(e)&&UE(t);if(!r&&!(hw(e)&&hw(t)))return t;const o=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),c=l.length,f=r?new Array(c):{};let d=0;for(let y=0;y<c;y++){const p=r?y:l[y],g=e[p],b=t[p];if(g===b){f[p]=g,(r?y<o:eB.call(e,p))&&d++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){f[p]=b;continue}const _=AP(g,b,n+1);f[p]=_,_===g&&d++}return o===c&&d===o?e:f}function UE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function hw(e){if(!HE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!HE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function HE(e){return Object.prototype.toString.call(e)==="[object Object]"}function tB(e){return new Promise(t=>{fw.setTimeout(t,e)})}function nB(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?AP(e,t):t}function rB(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function iB(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var a_=Symbol();function OP(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===a_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function aB(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Co,Pa,fl,yP,oB=(yP=class extends gy{constructor(){super();Ye(this,Co);Ye(this,Pa);Ye(this,fl);Re(this,fl,t=>{if(!vy&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){ue(this,Pa)||this.setEventListener(ue(this,fl))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Pa))==null||t.call(this),Re(this,Pa,void 0))}setEventListener(t){var n;Re(this,fl,t),(n=ue(this,Pa))==null||n.call(this),Re(this,Pa,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){ue(this,Co)!==t&&(Re(this,Co,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof ue(this,Co)=="boolean"?ue(this,Co):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Co=new WeakMap,Pa=new WeakMap,fl=new WeakMap,yP),jP=new oB;function sB(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var lB=Kz;function uB(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=lB;const o=c=>{t?e.push(c):i(()=>{n(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||l()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var bn=uB(),dl,Da,hl,mP,cB=(mP=class extends gy{constructor(){super();Ye(this,dl,!0);Ye(this,Da);Ye(this,hl);Re(this,hl,t=>{if(!vy&&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(){ue(this,Da)||this.setEventListener(ue(this,hl))}onUnsubscribe(){var t;this.hasListeners()||((t=ue(this,Da))==null||t.call(this),Re(this,Da,void 0))}setEventListener(t){var n;Re(this,hl,t),(n=ue(this,Da))==null||n.call(this),Re(this,Da,t(this.setOnline.bind(this)))}setOnline(t){ue(this,dl)!==t&&(Re(this,dl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return ue(this,dl)}},dl=new WeakMap,Da=new WeakMap,hl=new WeakMap,mP),sp=new cB;function fB(e){return Math.min(1e3*2**e,3e4)}function EP(e){return(e??"online")==="online"?sp.isOnline():!0}var pw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function NP(e){let t=!1,n=0,r;const i=sB(),o=()=>i.status!=="pending",l=S=>{var x;if(!o()){const A=new pw(S);g(A),(x=e.onCancel)==null||x.call(e,A)}},c=()=>{t=!0},f=()=>{t=!1},d=()=>jP.isFocused()&&(e.networkMode==="always"||sp.isOnline())&&e.canRun(),y=()=>EP(e.networkMode)&&e.canRun(),p=S=>{o()||(r==null||r(),i.resolve(S))},g=S=>{o()||(r==null||r(),i.reject(S))},b=()=>new Promise(S=>{var x;r=A=>{(o()||d())&&S(A)},(x=e.onPause)==null||x.call(e)}).then(()=>{var S;r=void 0,o()||(S=e.onContinue)==null||S.call(e)}),_=()=>{if(o())return;let S;const x=n===0?e.initialPromise:void 0;try{S=x??e.fn()}catch(A){S=Promise.reject(A)}Promise.resolve(S).then(p).catch(A=>{var T;if(o())return;const j=e.retry??(vy?0:3),O=e.retryDelay??fB,N=typeof O=="function"?O(n,A):O,E=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,A);if(t||!E){g(A);return}n++,(T=e.onFail)==null||T.call(e,n,A),tB(N).then(()=>d()?void 0:b()).then(()=>{t?g(A):_()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:c,continueRetry:f,canStart:y,start:()=>(y()?_():b().then(_),i)}}var Mo,gP,TP=(gP=class{constructor(){Ye(this,Mo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qz(this.gcTime)&&Re(this,Mo,fw.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vy?1/0:300*1e3))}clearGcTimeout(){ue(this,Mo)&&(fw.clearTimeout(ue(this,Mo)),Re(this,Mo,void 0))}},Mo=new WeakMap,gP),ko,pl,ir,Ro,Wt,Cf,Po,vr,Ai,vP,dB=(vP=class extends TP{constructor(t){super();Ye(this,vr);Ye(this,ko);Ye(this,pl);Ye(this,ir);Ye(this,Ro);Ye(this,Wt);Ye(this,Cf);Ye(this,Po);Re(this,Po,!1),Re(this,Cf,t.defaultOptions),this.setOptions(t.options),this.observers=[],Re(this,Ro,t.client),Re(this,ir,ue(this,Ro).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Re(this,ko,GE(this.options)),this.state=t.state??ue(this,ko),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=ue(this,Wt))==null?void 0:t.promise}setOptions(t){if(this.options={...ue(this,Cf),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=GE(this.options);n.data!==void 0&&(this.setState(VE(n.data,n.dataUpdatedAt)),Re(this,ko,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&ue(this,ir).remove(this)}setData(t,n){const r=nB(this.state.data,t,this.options);return un(this,vr,Ai).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){un(this,vr,Ai).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=ue(this,Wt))==null?void 0:r.promise;return(i=ue(this,Wt))==null||i.cancel(t),n?n.then(gr).catch(gr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(ue(this,ko))}isActive(){return this.observers.some(t=>Jz(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===a_||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>dw(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:!Zz(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=ue(this,Wt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=ue(this,Wt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),ue(this,ir).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(ue(this,Wt)&&(ue(this,Po)?ue(this,Wt).cancel({revert:!0}):ue(this,Wt).cancelRetry()),this.scheduleGc()),ue(this,ir).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||un(this,vr,Ai).call(this,{type:"invalidate"})}async fetch(t,n){var f,d,y,p,g,b,_,S,x,A,j,O;if(this.state.fetchStatus!=="idle"&&((f=ue(this,Wt))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(ue(this,Wt))return ue(this,Wt).continueRetry(),ue(this,Wt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const N=this.observers.find(E=>E.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,i=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Re(this,Po,!0),r.signal)})},o=()=>{const N=OP(this.options,n),T=(()=>{const C={client:ue(this,Ro),queryKey:this.queryKey,meta:this.meta};return i(C),C})();return Re(this,Po,!1),this.options.persister?this.options.persister(N,T,this):N(T)},c=(()=>{const N={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:ue(this,Ro),state:this.state,fetchFn:o};return i(N),N})();(d=this.options.behavior)==null||d.onFetch(c,this),Re(this,pl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=c.fetchOptions)==null?void 0:y.meta))&&un(this,vr,Ai).call(this,{type:"fetch",meta:(p=c.fetchOptions)==null?void 0:p.meta}),Re(this,Wt,NP({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:N=>{N instanceof pw&&N.revert&&this.setState({...ue(this,pl),fetchStatus:"idle"}),r.abort()},onFail:(N,E)=>{un(this,vr,Ai).call(this,{type:"failed",failureCount:N,error:E})},onPause:()=>{un(this,vr,Ai).call(this,{type:"pause"})},onContinue:()=>{un(this,vr,Ai).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const N=await ue(this,Wt).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(b=(g=ue(this,ir).config).onSuccess)==null||b.call(g,N,this),(S=(_=ue(this,ir).config).onSettled)==null||S.call(_,N,this.state.error,this),N}catch(N){if(N instanceof pw){if(N.silent)return ue(this,Wt).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw un(this,vr,Ai).call(this,{type:"error",error:N}),(A=(x=ue(this,ir).config).onError)==null||A.call(x,N,this),(O=(j=ue(this,ir).config).onSettled)==null||O.call(j,this.state.data,N,this),N}finally{this.scheduleGc()}}},ko=new WeakMap,pl=new WeakMap,ir=new WeakMap,Ro=new WeakMap,Wt=new WeakMap,Cf=new WeakMap,Po=new WeakMap,vr=new WeakSet,Ai=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,...hB(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...VE(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Re(this,pl,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),bn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),ue(this,ir).notify({query:this,type:"updated",action:t})})},vP);function hB(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:EP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function VE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function GE(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"}}function FE(e){return{onFetch:(t,n)=>{var y,p,g,b,_;const r=t.options,i=(g=(p=(y=t.fetchOptions)==null?void 0:y.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,o=((b=t.state.data)==null?void 0:b.pages)||[],l=((_=t.state.data)==null?void 0:_.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let S=!1;const x=O=>{aB(O,()=>t.signal,()=>S=!0)},A=OP(t.options,t.fetchOptions),j=async(O,N,E)=>{if(S)return Promise.reject();if(N==null&&O.pages.length)return Promise.resolve(O);const C=(()=>{const L={client:t.client,queryKey:t.queryKey,pageParam:N,direction:E?"backward":"forward",meta:t.options.meta};return x(L),L})(),D=await A(C),{maxPages:q}=t.options,F=E?iB:rB;return{pages:F(O.pages,D,q),pageParams:F(O.pageParams,N,q)}};if(i&&o.length){const O=i==="backward",N=O?pB:YE,E={pages:o,pageParams:l},T=N(r,E);c=await j(E,T,O)}else{const O=e??o.length;do{const N=f===0?l[0]??r.initialPageParam:YE(r,c);if(f>0&&N==null)break;c=await j(c,N),f++}while(f<O)}return c};t.options.persister?t.fetchFn=()=>{var S,x;return(x=(S=t.options).persister)==null?void 0:x.call(S,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function YE(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 pB(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 Mf,Lr,vn,Do,zr,Na,bP,yB=(bP=class extends TP{constructor(t){super();Ye(this,zr);Ye(this,Mf);Ye(this,Lr);Ye(this,vn);Ye(this,Do);Re(this,Mf,t.client),this.mutationId=t.mutationId,Re(this,vn,t.mutationCache),Re(this,Lr,[]),this.state=t.state||mB(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){ue(this,Lr).includes(t)||(ue(this,Lr).push(t),this.clearGcTimeout(),ue(this,vn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Re(this,Lr,ue(this,Lr).filter(n=>n!==t)),this.scheduleGc(),ue(this,vn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){ue(this,Lr).length||(this.state.status==="pending"?this.scheduleGc():ue(this,vn).remove(this))}continue(){var t;return((t=ue(this,Do))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,f,d,y,p,g,b,_,S,x,A,j,O,N,E,T,C,D,q;const n=()=>{un(this,zr,Na).call(this,{type:"continue"})},r={client:ue(this,Mf),meta:this.options.meta,mutationKey:this.options.mutationKey};Re(this,Do,NP({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(F,L)=>{un(this,zr,Na).call(this,{type:"failed",failureCount:F,error:L})},onPause:()=>{un(this,zr,Na).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>ue(this,vn).canRun(this)}));const i=this.state.status==="pending",o=!ue(this,Do).canStart();try{if(i)n();else{un(this,zr,Na).call(this,{type:"pending",variables:t,isPaused:o}),await((c=(l=ue(this,vn).config).onMutate)==null?void 0:c.call(l,t,this,r));const L=await((d=(f=this.options).onMutate)==null?void 0:d.call(f,t,r));L!==this.state.context&&un(this,zr,Na).call(this,{type:"pending",context:L,variables:t,isPaused:o})}const F=await ue(this,Do).start();return await((p=(y=ue(this,vn).config).onSuccess)==null?void 0:p.call(y,F,t,this.state.context,this,r)),await((b=(g=this.options).onSuccess)==null?void 0:b.call(g,F,t,this.state.context,r)),await((S=(_=ue(this,vn).config).onSettled)==null?void 0:S.call(_,F,null,this.state.variables,this.state.context,this,r)),await((A=(x=this.options).onSettled)==null?void 0:A.call(x,F,null,t,this.state.context,r)),un(this,zr,Na).call(this,{type:"success",data:F}),F}catch(F){try{await((O=(j=ue(this,vn).config).onError)==null?void 0:O.call(j,F,t,this.state.context,this,r))}catch(L){Promise.reject(L)}try{await((E=(N=this.options).onError)==null?void 0:E.call(N,F,t,this.state.context,r))}catch(L){Promise.reject(L)}try{await((C=(T=ue(this,vn).config).onSettled)==null?void 0:C.call(T,void 0,F,this.state.variables,this.state.context,this,r))}catch(L){Promise.reject(L)}try{await((q=(D=this.options).onSettled)==null?void 0:q.call(D,void 0,F,t,this.state.context,r))}catch(L){Promise.reject(L)}throw un(this,zr,Na).call(this,{type:"error",error:F}),F}finally{ue(this,vn).runNext(this)}}},Mf=new WeakMap,Lr=new WeakMap,vn=new WeakMap,Do=new WeakMap,zr=new WeakSet,Na=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),bn.batch(()=>{ue(this,Lr).forEach(r=>{r.onMutationUpdate(t)}),ue(this,vn).notify({mutation:this,type:"updated",action:t})})},bP);function mB(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ji,br,kf,xP,gB=(xP=class extends gy{constructor(t={}){super();Ye(this,ji);Ye(this,br);Ye(this,kf);this.config=t,Re(this,ji,new Set),Re(this,br,new Map),Re(this,kf,0)}build(t,n,r){const i=new yB({client:t,mutationCache:this,mutationId:++xh(this,kf)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){ue(this,ji).add(t);const n=Sh(t);if(typeof n=="string"){const r=ue(this,br).get(n);r?r.push(t):ue(this,br).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(ue(this,ji).delete(t)){const n=Sh(t);if(typeof n=="string"){const r=ue(this,br).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&ue(this,br).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Sh(t);if(typeof n=="string"){const r=ue(this,br).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Sh(t);if(typeof n=="string"){const i=(r=ue(this,br).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){bn.batch(()=>{ue(this,ji).forEach(t=>{this.notify({type:"removed",mutation:t})}),ue(this,ji).clear(),ue(this,br).clear()})}getAll(){return Array.from(ue(this,ji))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>IE(n,r))}findAll(t={}){return this.getAll().filter(n=>IE(t,n))}notify(t){bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return bn.batch(()=>Promise.all(t.map(n=>n.continue().catch(gr))))}},ji=new WeakMap,br=new WeakMap,kf=new WeakMap,xP);function Sh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Br,wP,vB=(wP=class extends gy{constructor(t={}){super();Ye(this,Br);this.config=t,Re(this,Br,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??i_(i,n);let l=this.get(o);return l||(l=new dB({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){ue(this,Br).has(t.queryHash)||(ue(this,Br).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=ue(this,Br).get(t.queryHash);n&&(t.destroy(),n===t&&ue(this,Br).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){bn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return ue(this,Br).get(t)}getAll(){return[...ue(this,Br).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>BE(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>BE(t,r)):n}notify(t){bn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){bn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){bn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Br=new WeakMap,wP),jt,$a,qa,yl,ml,La,gl,vl,SP,bB=(SP=class{constructor(e={}){Ye(this,jt);Ye(this,$a);Ye(this,qa);Ye(this,yl);Ye(this,ml);Ye(this,La);Ye(this,gl);Ye(this,vl);Re(this,jt,e.queryCache||new vB),Re(this,$a,e.mutationCache||new gB),Re(this,qa,e.defaultOptions||{}),Re(this,yl,new Map),Re(this,ml,new Map),Re(this,La,0)}mount(){xh(this,La)._++,ue(this,La)===1&&(Re(this,gl,jP.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,jt).onFocus())})),Re(this,vl,sp.subscribe(async e=>{e&&(await this.resumePausedMutations(),ue(this,jt).onOnline())})))}unmount(){var e,t;xh(this,La)._--,ue(this,La)===0&&((e=ue(this,gl))==null||e.call(this),Re(this,gl,void 0),(t=ue(this,vl))==null||t.call(this),Re(this,vl,void 0))}isFetching(e){return ue(this,jt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return ue(this,$a).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ue(this,jt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=ue(this,jt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(dw(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return ue(this,jt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=ue(this,jt).get(r.queryHash),o=i==null?void 0:i.state.data,l=Wz(t,o);if(l!==void 0)return ue(this,jt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return bn.batch(()=>ue(this,jt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=ue(this,jt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=ue(this,jt);bn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=ue(this,jt);return bn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=bn.batch(()=>ue(this,jt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(gr).catch(gr)}invalidateQueries(e,t={}){return bn.batch(()=>(ue(this,jt).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=bn.batch(()=>ue(this,jt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(gr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(gr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=ue(this,jt).build(this,t);return n.isStaleByTime(dw(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(gr).catch(gr)}fetchInfiniteQuery(e){return e.behavior=FE(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(gr).catch(gr)}ensureInfiniteQueryData(e){return e.behavior=FE(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return sp.isOnline()?ue(this,$a).resumePausedMutations():Promise.resolve()}getQueryCache(){return ue(this,jt)}getMutationCache(){return ue(this,$a)}getDefaultOptions(){return ue(this,qa)}setDefaultOptions(e){Re(this,qa,e)}setQueryDefaults(e,t){ue(this,yl).set(qc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...ue(this,yl).values()],n={};return t.forEach(r=>{Lc(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){ue(this,ml).set(qc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...ue(this,ml).values()],n={};return t.forEach(r=>{Lc(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...ue(this,qa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=i_(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===a_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...ue(this,qa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){ue(this,jt).clear(),ue(this,$a).clear()}},jt=new WeakMap,$a=new WeakMap,qa=new WeakMap,yl=new WeakMap,ml=new WeakMap,La=new WeakMap,gl=new WeakMap,vl=new WeakMap,SP),xB=U.createContext(void 0),wB=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),m.jsx(xB.Provider,{value:e,children:t}));const XE=e=>{let t;const n=new Set,r=(d,y)=>{const p=typeof d=="function"?d(t):d;if(!Object.is(p,t)){const g=t;t=y??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(b=>b(t,g))}},i=()=>t,c={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,i,c);return c},SB=(e=>e?XE(e):XE),_B=e=>e;function AB(e,t=_B){const n=W.useSyncExternalStore(e.subscribe,W.useCallback(()=>t(e.getState()),[e,t]),W.useCallback(()=>t(e.getInitialState()),[e,t]));return W.useDebugValue(n),n}const KE=e=>{const t=SB(e),n=r=>AB(t,r);return Object.assign(n,t),n},CP=(e=>e?KE(e):KE),MP="expressots.studio.settings.v1",WE={vscode:"Visual Studio Code",cursor:"Cursor",webstorm:"WebStorm",idea:"IntelliJ IDEA",sublime:"Sublime Text",custom:"Custom…"},Ws={agentUrl:"ws://localhost:3334",editorScheme:"cursor",customEditorPrefix:"vscode://file",recordOnLaunch:!0,maxExchanges:100,maxLogBuffer:1e3,defaultView:"requests",defaultSidebarOpen:!0,defaultAutoScroll:!0,defaultLogLevels:["log","info","warn","error","debug"]};function OB(){if(typeof window>"u"||!window.localStorage)return Ws;try{const e=window.localStorage.getItem(MP);if(!e)return Ws;const t=JSON.parse(e);return{...Ws,...t}}catch{return Ws}}function QE(e){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(MP,JSON.stringify(e))}catch{}}const o_=CP((e,t)=>({...OB(),update:n=>{e(n);const{update:r,reset:i,...o}=t();QE(o)},reset:()=>{e({...Ws}),QE(Ws)}})),ZE=1e3;function kP(){const e=o_.getState();return{connected:!1,agentUrl:e.agentUrl,currentView:e.defaultView,selectedTraceId:null,selectedExchangeId:null,routes:[],traces:[],metrics:null,endpointStats:[],structure:null,exchanges:[],replayResult:null,containerSnapshot:null,containerResolutionsByExchange:{},runtime:null,securityReport:null,fixRun:null,logs:[],logsByTraceId:{},logLevelFilter:new Set(e.defaultLogLevels),sidebarOpen:e.defaultSidebarOpen,searchQuery:"",filterMethod:null,filterStatus:"all",recordingEnabled:!0,autoScroll:e.defaultAutoScroll,lastEventAt:null,agentLatencyMs:null,eventsReceived:0}}const jB=kP(),wt=CP(e=>({...jB,setConnected:t=>e({connected:t}),setAgentUrl:t=>e({agentUrl:t}),setCurrentView:t=>e({currentView:t}),setSelectedTraceId:t=>e({selectedTraceId:t}),setSelectedExchangeId:t=>e({selectedExchangeId:t}),setRoutes:t=>e({routes:t}),addTrace:t=>e(n=>({traces:[t,...n.traces].slice(0,100)})),setTraces:t=>e({traces:t}),setMetrics:t=>e({metrics:t}),setEndpointStats:t=>e({endpointStats:t}),setStructure:t=>e({structure:t}),setExchanges:t=>e({exchanges:t}),addExchange:t=>e(n=>({exchanges:[t,...n.exchanges].slice(0,100),lastEventAt:Date.now()})),setReplayResult:t=>e({replayResult:t}),setContainerSnapshot:t=>e({containerSnapshot:t}),setContainerResolutions:t=>e(n=>({containerResolutionsByExchange:{...n.containerResolutionsByExchange,[t.exchangeId]:t.resolved}})),setRuntime:t=>e({runtime:t}),setSecurityReport:t=>e({securityReport:t}),startFixRun:(t,n)=>e({fixRun:{targetId:t,command:n,startedAt:Date.now(),lines:[],result:void 0}}),appendFixProgress:t=>e(n=>{if(!n.fixRun||n.fixRun.targetId!==t.targetId)return{};const r=[...n.fixRun.lines,{stream:t.stream,text:t.line,timestamp:t.timestamp}],i=r.length>2e3?r.slice(-2e3):r;return{fixRun:{...n.fixRun,lines:i}}}),completeFixRun:t=>e(n=>!n.fixRun||n.fixRun.targetId!==t.targetId?{}:{fixRun:{...n.fixRun,result:t}}),clearFixRun:()=>e({fixRun:null}),addLog:t=>e(n=>{const r=[t,...n.logs].slice(0,ZE);let i=n.logsByTraceId;if(t.traceId){const o=i[t.traceId]??[];i={...i,[t.traceId]:[...o,t]}}return{logs:r,logsByTraceId:i,lastEventAt:Date.now()}}),setLogs:t=>e(()=>{const n=[...t].sort((i,o)=>o.timestamp-i.timestamp),r={};for(const i of t)i.traceId&&(r[i.traceId]||(r[i.traceId]=[]),r[i.traceId].push(i));return{logs:n.slice(0,ZE),logsByTraceId:r}}),clearLogs:()=>e({logs:[],logsByTraceId:{}}),setLogLevelFilter:t=>e({logLevelFilter:t}),setSidebarOpen:t=>e({sidebarOpen:t}),setSearchQuery:t=>e({searchQuery:t}),setFilterMethod:t=>e({filterMethod:t}),setFilterStatus:t=>e({filterStatus:t}),setRecordingEnabled:t=>e({recordingEnabled:t}),setAutoScroll:t=>e({autoScroll:t}),markLiveEvent:()=>e({lastEventAt:Date.now()}),setAgentLatency:t=>e({agentLatencyMs:t}),incrementEventCount:()=>e(t=>({eventsReceived:t.eventsReceived+1})),clearExchanges:()=>e({exchanges:[],traces:[],selectedExchangeId:null,replayResult:null,containerResolutionsByExchange:{}}),reset:()=>e(kP())})),Gr=Object.create(null);Gr.open="0";Gr.close="1";Gr.ping="2";Gr.pong="3";Gr.message="4";Gr.upgrade="5";Gr.noop="6";const Qh=Object.create(null);Object.keys(Gr).forEach(e=>{Qh[Gr[e]]=e});const yw={type:"error",data:"parser error"},RP=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",PP=typeof ArrayBuffer=="function",DP=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,s_=({type:e,data:t},n,r)=>RP&&t instanceof Blob?n?r(t):JE(t,r):PP&&(t instanceof ArrayBuffer||DP(t))?n?r(t):JE(new Blob([t]),r):r(Gr[e]+(t||"")),JE=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function eN(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let V0;function EB(e,t){if(RP&&e.data instanceof Blob)return e.data.arrayBuffer().then(eN).then(t);if(PP&&(e.data instanceof ArrayBuffer||DP(e.data)))return t(eN(e.data));s_(e,!1,n=>{V0||(V0=new TextEncoder),t(V0.encode(n))})}const tN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ac=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<tN.length;e++)Ac[tN.charCodeAt(e)]=e;const NB=e=>{let t=e.length*.75,n=e.length,r,i=0,o,l,c,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const d=new ArrayBuffer(t),y=new Uint8Array(d);for(r=0;r<n;r+=4)o=Ac[e.charCodeAt(r)],l=Ac[e.charCodeAt(r+1)],c=Ac[e.charCodeAt(r+2)],f=Ac[e.charCodeAt(r+3)],y[i++]=o<<2|l>>4,y[i++]=(l&15)<<4|c>>2,y[i++]=(c&3)<<6|f&63;return d},TB=typeof ArrayBuffer=="function",l_=(e,t)=>{if(typeof e!="string")return{type:"message",data:$P(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:CB(e.substring(1),t)}:Qh[n]?e.length>1?{type:Qh[n],data:e.substring(1)}:{type:Qh[n]}:yw},CB=(e,t)=>{if(TB){const n=NB(e);return $P(n,t)}else return{base64:!0,data:e}},$P=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},qP="",MB=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,l)=>{s_(o,!1,c=>{r[l]=c,++i===n&&t(r.join(qP))})})},kB=(e,t)=>{const n=e.split(qP),r=[];for(let i=0;i<n.length;i++){const o=l_(n[i],t);if(r.push(o),o.type==="error")break}return r};function RB(){return new TransformStream({transform(e,t){EB(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let G0;function _h(e){return e.reduce((t,n)=>t+n.length,0)}function Ah(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function PB(e,t){G0||(G0=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(l,c){for(n.push(l);;){if(r===0){if(_h(n)<1)break;const f=Ah(n,1);o=(f[0]&128)===128,i=f[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(_h(n)<2)break;const f=Ah(n,2);i=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(_h(n)<8)break;const f=Ah(n,8),d=new DataView(f.buffer,f.byteOffset,f.length),y=d.getUint32(0);if(y>Math.pow(2,21)-1){c.enqueue(yw);break}i=y*Math.pow(2,32)+d.getUint32(4),r=3}else{if(_h(n)<i)break;const f=Ah(n,i);c.enqueue(l_(o?f:G0.decode(f),t)),r=0}if(i===0||i>e){c.enqueue(yw);break}}}})}const LP=4;function zt(e){if(e)return DB(e)}function DB(e){for(var t in zt.prototype)e[t]=zt.prototype[t];return e}zt.prototype.on=zt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};zt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};zt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};zt.prototype.emitReserved=zt.prototype.emit;zt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};zt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const by=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ar=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),$B="arraybuffer";function zP(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const qB=ar.setTimeout,LB=ar.clearTimeout;function xy(e,t){t.useNativeTimers?(e.setTimeoutFn=qB.bind(ar),e.clearTimeoutFn=LB.bind(ar)):(e.setTimeoutFn=ar.setTimeout.bind(ar),e.clearTimeoutFn=ar.clearTimeout.bind(ar))}const zB=1.33;function BB(e){return typeof e=="string"?IB(e):Math.ceil((e.byteLength||e.size)*zB)}function IB(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function BP(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function UB(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function HB(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class VB extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class u_ extends zt{constructor(t){super(),this.writable=!1,xy(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new VB(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=l_(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=UB(t);return n.length?"?"+n:""}}class GB extends u_{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};kB(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,MB(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=BP()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let IP=!1;try{IP=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const FB=IP;function YB(){}class XB extends GB{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Ur extends zt{constructor(t,n,r){super(),this.createRequest=t,xy(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=zP(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=Ur.requestsCount++,Ur.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=YB,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Ur.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Ur.requestsCount=0;Ur.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",nN);else if(typeof addEventListener=="function"){const e="onpagehide"in ar?"pagehide":"unload";addEventListener(e,nN,!1)}}function nN(){for(let e in Ur.requests)Ur.requests.hasOwnProperty(e)&&Ur.requests[e].abort()}const KB=(function(){const e=UP({xdomain:!1});return e&&e.responseType!==null})();class WB extends XB{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=KB&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ur(UP,this.uri(),t)}}function UP(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||FB))return new XMLHttpRequest}catch{}if(!t)try{return new ar[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const HP=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class QB extends u_{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=HP?{}:zP(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;s_(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&by(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=BP()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const F0=ar.WebSocket||ar.MozWebSocket;class ZB extends QB{createSocket(t,n,r){return HP?new F0(t,n,r):n?new F0(t,n):new F0(t)}doWrite(t,n){this.ws.send(n)}}class JB extends u_{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=PB(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=RB();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:c,value:f})=>{c||(this.onPacket(f),o())}).catch(c=>{})};o();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&by(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const eI={websocket:ZB,webtransport:JB,polling:WB},tI=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,nI=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mw(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=tI.exec(e||""),o={},l=14;for(;l--;)o[nI[l]]=i[l]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=rI(o,o.path),o.queryKey=iI(o,o.query),o}function rI(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function iI(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const gw=typeof addEventListener=="function"&&typeof removeEventListener=="function",Zh=[];gw&&addEventListener("offline",()=>{Zh.forEach(e=>e())},!1);class Ba extends zt{constructor(t,n){if(super(),this.binaryType=$B,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=mw(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=mw(n.host).host);xy(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=HB(this.opts.query)),gw&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Zh.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=LP,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ba.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ba.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=BB(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,by(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ba.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),gw&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Zh.indexOf(this._offlineEventListener);r!==-1&&Zh.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ba.protocol=LP;class aI extends Ba{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ba.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!r)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ba.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(y(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function o(){r||(r=!0,y(),n.close(),n=null)}const l=p=>{const g=new Error("probe error: "+p);g.transport=n.name,o(),this.emitReserved("upgradeError",g)};function c(){l("transport closed")}function f(){l("socket closed")}function d(p){n&&p.name!==n.name&&o()}const y=()=>{n.removeListener("open",i),n.removeListener("error",l),n.removeListener("close",c),this.off("close",f),this.off("upgrading",d)};n.once("open",i),n.once("error",l),n.once("close",c),this.once("close",f),this.once("upgrading",d),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let oI=class extends aI{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>eI[i]).filter(i=>!!i)),super(t,r)}};function sI(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=mw(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const lI=typeof ArrayBuffer=="function",uI=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,VP=Object.prototype.toString,cI=typeof Blob=="function"||typeof Blob<"u"&&VP.call(Blob)==="[object BlobConstructor]",fI=typeof File=="function"||typeof File<"u"&&VP.call(File)==="[object FileConstructor]";function c_(e){return lI&&(e instanceof ArrayBuffer||uI(e))||cI&&e instanceof Blob||fI&&e instanceof File}function Jh(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Jh(e[n]))return!0;return!1}if(c_(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Jh(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Jh(e[n]))return!0;return!1}function dI(e){const t=[],n=e.data,r=e;return r.data=vw(n,t),r.attachments=t.length,{packet:r,buffers:t}}function vw(e,t){if(!e)return e;if(c_(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=vw(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=vw(e[r],t));return n}return e}function hI(e,t){return e.data=bw(e.data,t),delete e.attachments,e}function bw(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=bw(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bw(e[n],t));return e}const GP=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],pI=5;var ze;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ze||(ze={}));class yI{constructor(t){this.replacer=t}encode(t){return(t.type===ze.EVENT||t.type===ze.ACK)&&Jh(t)?this.encodeAsBinary({type:t.type===ze.EVENT?ze.BINARY_EVENT:ze.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ze.BINARY_EVENT||t.type===ze.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=dI(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class f_ extends zt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===ze.BINARY_EVENT;r||n.type===ze.BINARY_ACK?(n.type=r?ze.EVENT:ze.ACK,this.reconstructor=new mI(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(c_(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(ze[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===ze.BINARY_EVENT||r.type===ze.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(o,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(l)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(f_.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ze.CONNECT:return lp(n);case ze.DISCONNECT:return n===void 0;case ze.CONNECT_ERROR:return typeof n=="string"||lp(n);case ze.EVENT:case ze.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&GP.indexOf(n[0])===-1);case ze.ACK:case ze.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class mI{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=hI(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function gI(e){return typeof e=="string"}const vI=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function bI(e){return e===void 0||vI(e)}function lp(e){return Object.prototype.toString.call(e)==="[object Object]"}function xI(e,t){switch(e){case ze.CONNECT:return t===void 0||lp(t);case ze.DISCONNECT:return t===void 0;case ze.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&GP.indexOf(t[0])===-1);case ze.ACK:return Array.isArray(t);case ze.CONNECT_ERROR:return typeof t=="string"||lp(t);default:return!1}}function wI(e){return gI(e.nsp)&&bI(e.id)&&xI(e.type,e.data)}const SI=Object.freeze(Object.defineProperty({__proto__:null,Decoder:f_,Encoder:yI,get PacketType(){return ze},isPacketValid:wI,protocol:pI},Symbol.toStringTag,{value:"Module"}));function xr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const _I=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class FP extends zt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[xr(t,"open",this.onopen.bind(this)),xr(t,"packet",this.onpacket.bind(this)),xr(t,"error",this.onerror.bind(this)),xr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(_I.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const l={type:ze.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const y=this.ids++,p=n.pop();this._registerAckCallback(y,p),l.id=y}const c=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,f=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!c||(f?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},i),l=(...c)=>{this.io.clearTimeoutFn(o),n.apply(this,c)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(l,c)=>l?i(l):r(c);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ze.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ze.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ze.EVENT:case ze.BINARY_EVENT:this.onevent(t);break;case ze.ACK:case ze.BINARY_ACK:this.onack(t);break;case ze.DISCONNECT:this.ondisconnect();break;case ze.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:ze.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ze.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Jl(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Jl.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Jl.prototype.reset=function(){this.attempts=0};Jl.prototype.setMin=function(e){this.ms=e};Jl.prototype.setMax=function(e){this.max=e};Jl.prototype.setJitter=function(e){this.jitter=e};class xw extends zt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,xy(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Jl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||SI;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new oI(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=xr(n,"open",function(){r.onopen(),t&&t()}),o=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=xr(n,"error",o);if(this._timeout!==!1){const c=this._timeout,f=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},c);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(i),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(xr(t,"ping",this.onping.bind(this)),xr(t,"data",this.ondata.bind(this)),xr(t,"error",this.onerror.bind(this)),xr(t,"close",this.onclose.bind(this)),xr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){by(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new FP(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const sc={};function ep(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=sI(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,l=sc[i]&&o in sc[i].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let f;return c?f=new xw(r,t):(sc[i]||(sc[i]=new xw(r,t)),f=sc[i]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(ep,{Manager:xw,Socket:FP,io:ep,connect:ep});const YP=U.createContext(null);function AI({children:e}){const t=U.useRef(null),{agentUrl:n,setConnected:r,setRoutes:i,addTrace:o,setMetrics:l,setStructure:c,setExchanges:f,setEndpointStats:d,addExchange:y,setReplayResult:p,setContainerSnapshot:g,setContainerResolutions:b,setRecordingEnabled:_,markLiveEvent:S,clearExchanges:x,addLog:A,setLogs:j,clearLogs:O,setAgentLatency:N,incrementEventCount:E,setRuntime:T,setSecurityReport:C,startFixRun:D,appendFixProgress:q,completeFixRun:F}=wt(),L=U.useCallback(R=>{var $;switch(E(),R.type){case"routes":i(R.data);break;case"trace":o(R.data);break;case"metrics":l(R.data);break;case"structure":c(R.data);break;case"exchanges":f(R.data);break;case"endpoint_stats":d(R.data);break;case"exchange":break;case"request":{const k=R.data;if(k.request){const I={id:k.request.id,request:k.request,response:{id:"",requestId:k.request.id,traceId:k.request.traceId||"",timestamp:Date.now(),statusCode:k.response.statusCode,statusMessage:k.response.statusCode<400?"OK":"Error",headers:{},duration:k.response.duration}};y(I),S()}break}case"recording_state":_(!!(($=R.data)!=null&&$.enabled));break;case"cleared":x();break;case"replay_result":{const k=R.data;p({...k,replayedAt:Date.now()});break}case"container":g(R.data);break;case"container_resolutions":b(R.data);break;case"log":A(R.data);break;case"logs":j(R.data);break;case"logs_cleared":O();break;case"pong_studio":{const k=R.data;if(k!=null&&k.sentAt){const I=Date.now()-k.sentAt;I>=0&&I<6e4&&N(I)}break}case"runtime":T(R.data);break;case"security":C(R.data);break;case"security_scan_state":break;case"fix_progress":q(R.data);break;case"fix_result":F(R.data);break}},[i,o,l,c,f,d,y,p,g,b,_,S,x,A,j,O,N,E,T,C,q,F]);U.useEffect(()=>{if(t.current)return;const R=ep(n,{transports:["websocket"],reconnection:!0,reconnectionDelay:1e3,reconnectionAttempts:10});t.current=R;let $=null;return R.on("connect",()=>{r(!0),R.emit("get_routes"),R.emit("get_metrics"),R.emit("get_structure"),R.emit("get_exchanges",{limit:100}),R.emit("get_endpoint_stats"),R.emit("get_container"),R.emit("get_logs"),R.emit("get_runtime"),R.emit("get_security_report");const k=()=>R.emit("ping_studio",{sentAt:Date.now()});k(),$&&clearInterval($),$=setInterval(k,5e3)}),R.on("disconnect",()=>{r(!1),$&&(clearInterval($),$=null)}),R.on("connect_error",()=>{r(!1)}),R.on("message",L),()=>{$&&clearInterval($),R.disconnect(),t.current=null}},[n,L,r]);const P=U.useCallback((R,$)=>{var k;(k=t.current)!=null&&k.connected&&t.current.emit(R,$)},[]),Y={emit:P,requestRoutes:U.useCallback(()=>P("get_routes"),[P]),requestMetrics:U.useCallback(()=>P("get_metrics"),[P]),requestStructure:U.useCallback(()=>P("get_structure"),[P]),requestExchanges:U.useCallback((R=100,$=0)=>P("get_exchanges",{limit:R,offset:$}),[P]),requestExchange:U.useCallback(R=>P("get_exchange",{id:R}),[P]),searchExchanges:U.useCallback((R,$,k=100)=>P("search_exchanges",{query:R,method:$,limit:k}),[P]),replayRequest:U.useCallback(R=>P("replay",{exchangeId:R}),[P]),rescan:U.useCallback(()=>P("rescan"),[P]),clearRecordings:U.useCallback(()=>P("clear_recordings"),[P]),setRecording:U.useCallback(R=>P("set_recording",{enabled:R}),[P]),requestStats:U.useCallback(()=>P("get_stats"),[P]),requestEndpointStats:U.useCallback(()=>P("get_endpoint_stats"),[P]),requestContainer:U.useCallback(()=>P("get_container"),[P]),requestLogs:U.useCallback(()=>P("get_logs"),[P]),clearLogs:U.useCallback(()=>P("clear_logs"),[P]),requestRuntime:U.useCallback(()=>P("get_runtime"),[P]),requestSecurityScan:U.useCallback(()=>P("request_security_scan"),[P]),requestSecurityReport:U.useCallback(()=>P("get_security_report"),[P]),applyFix:U.useCallback(R=>{D(R.targetId,R.command),P("apply_security_fix",{targetKind:R.targetKind,targetId:R.targetId,allowMajor:!!R.allowMajor})},[P,D])};return m.jsx(YP.Provider,{value:Y,children:e})}function Qo(){const e=U.useContext(YP);if(!e)throw new Error("useSocket must be used within a SocketProvider");return e}const OI=[{combo:"?",description:"Toggle keyboard shortcuts overlay",category:"Help"},{combo:"Esc",description:"Close open panel or overlay",category:"Help"},{combo:"/",description:"Focus the search / filter input",category:"Lists"},{combo:"Cmd/Ctrl+K",description:"Focus the search / filter input",category:"Lists"},{combo:"J",description:"Select next request",category:"Lists"},{combo:"K",description:"Select previous request",category:"Lists"},{combo:"Enter",description:"Open the selected request",category:"Lists"},{combo:"Cmd/Ctrl+R",description:"Rescan routes / refresh",category:"Navigation"},{combo:"G then S",description:"Go to Status",category:"Navigation"},{combo:"G then R",description:"Go to Requests",category:"Navigation"},{combo:"G then L",description:"Go to Logs",category:"Navigation"},{combo:"G then A",description:"Go to API Client",category:"Navigation"},{combo:"G then M",description:"Go to Metrics",category:"Navigation"},{combo:"G then C",description:"Go to Container",category:"Navigation"},{combo:"G then X",description:"Go to Architecture",category:"Navigation"}];function rN(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return!!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable)}function jI(){const t=Array.from(document.querySelectorAll('input[type="text"], input:not([type])')).find(n=>{const r=(n.placeholder||"").toLowerCase();return/filter|search/.test(r)});return t?(t.focus(),t.select(),!0):!1}function EI({onToggleHelp:e,onCloseAll:t}){const{exchanges:n,selectedExchangeId:r,setSelectedExchangeId:i,setCurrentView:o}=wt();U.useEffect(()=>{let l=null,c=null;const f=()=>{l="g",c&&clearTimeout(c),c=setTimeout(()=>{l=null},800)},d=()=>{l=null,c&&(clearTimeout(c),c=null)},y=p=>{if(p.key==="Escape"){t();return}if(p.key==="?"&&!rN(p.target)){p.preventDefault(),e();return}if(rN(p.target))return;const g=p.metaKey||p.ctrlKey;if(g&&p.key.toLowerCase()==="k"||p.key==="/"){jI()&&p.preventDefault();return}if(!(g&&p.key.toLowerCase()==="r")){if(p.key.toLowerCase()==="g"&&!g&&!p.altKey&&!p.shiftKey){f();return}if(l==="g"){const _={s:()=>o("status"),r:()=>o("requests"),l:()=>o("logs"),a:()=>o("api-client"),m:()=>o("metrics"),c:()=>o("container"),x:()=>o("architecture"),p:()=>o("replay")}[p.key.toLowerCase()];if(_){p.preventDefault(),d(),_();return}d()}if((p.key==="j"||p.key==="k")&&!g&&!p.altKey){if(n.length===0)return;const b=r?n.findIndex(x=>x.id===r):-1;let _;p.key==="j"?_=b<0?0:Math.min(b+1,n.length-1):_=b<=0?0:b-1;const S=n[_];S&&(p.preventDefault(),i(S.id));return}}};return window.addEventListener("keydown",y),()=>{window.removeEventListener("keydown",y),c&&clearTimeout(c)}},[n,r,i,o,e,t])}function XP(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=XP(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Be(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=XP(e))&&(r&&(r+=" "),r+=t);return r}const d_="-",NI=e=>{const t=CI(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(d_);return c[0]===""&&c.length!==1&&c.shift(),KP(c,t)||TI(l)},getConflictingClassGroupIds:(l,c)=>{const f=n[l]||[];return c&&r[l]?[...f,...r[l]]:f}}},KP=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?KP(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(d_);return(l=t.validators.find(({validator:c})=>c(o)))==null?void 0:l.classGroupId},iN=/^\[(.+)\]$/,TI=e=>{if(iN.test(e)){const t=iN.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},CI=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return kI(Object.entries(e.classGroups),n).forEach(([o,l])=>{ww(l,r,o,t)}),r},ww=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:aN(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(MI(i)){ww(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{ww(l,aN(t,o),n,r)})})},aN=(e,t)=>{let n=e;return t.split(d_).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},MI=e=>e.isThemeGetter,kI=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([l,c])=>[t+l,c])):o);return[n,i]}):e,RI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,l)=>{n.set(o,l),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return i(o,l),l},set(o,l){n.has(o)?n.set(o,l):i(o,l)}}},WP="!",PI=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,l=c=>{const f=[];let d=0,y=0,p;for(let x=0;x<c.length;x++){let A=c[x];if(d===0){if(A===i&&(r||c.slice(x,x+o)===t)){f.push(c.slice(y,x)),y=x+o;continue}if(A==="/"){p=x;continue}}A==="["?d++:A==="]"&&d--}const g=f.length===0?c:c.substring(y),b=g.startsWith(WP),_=b?g.substring(1):g,S=p&&p>y?p-y:void 0;return{modifiers:f,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:l}):l},DI=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},$I=e=>({cache:RI(e.cacheSize),parseClassName:PI(e),...NI(e)}),qI=/\s+/,LI=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],l=e.trim().split(qI);let c="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{modifiers:y,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:b}=n(d);let _=!!b,S=r(_?g.substring(0,b):g);if(!S){if(!_){c=d+(c.length>0?" "+c:c);continue}if(S=r(g),!S){c=d+(c.length>0?" "+c:c);continue}_=!1}const x=DI(y).join(":"),A=p?x+WP:x,j=A+S;if(o.includes(j))continue;o.push(j);const O=i(S,_);for(let N=0;N<O.length;++N){const E=O[N];o.push(A+E)}c=d+(c.length>0?" "+c:c)}return c};function zI(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=QP(t))&&(r&&(r+=" "),r+=n);return r}const QP=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=QP(e[r]))&&(n&&(n+=" "),n+=t);return n};function BI(e,...t){let n,r,i,o=l;function l(f){const d=t.reduce((y,p)=>p(y),e());return n=$I(d),r=n.cache.get,i=n.cache.set,o=c,c(f)}function c(f){const d=r(f);if(d)return d;const y=LI(f,n);return i(f,y),y}return function(){return o(zI.apply(null,arguments))}}const gt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ZP=/^\[(?:([a-z-]+):)?(.+)\]$/i,II=/^\d+\/\d+$/,UI=new Set(["px","full","screen"]),HI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VI=/\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$/,GI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,FI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wi=e=>al(e)||UI.has(e)||II.test(e),Sa=e=>eu(e,"length",t7),al=e=>!!e&&!Number.isNaN(Number(e)),Y0=e=>eu(e,"number",al),lc=e=>!!e&&Number.isInteger(Number(e)),XI=e=>e.endsWith("%")&&al(e.slice(0,-1)),Le=e=>ZP.test(e),_a=e=>HI.test(e),KI=new Set(["length","size","percentage"]),WI=e=>eu(e,KI,JP),QI=e=>eu(e,"position",JP),ZI=new Set(["image","url"]),JI=e=>eu(e,ZI,r7),e7=e=>eu(e,"",n7),uc=()=>!0,eu=(e,t,n)=>{const r=ZP.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},t7=e=>VI.test(e)&&!GI.test(e),JP=()=>!1,n7=e=>FI.test(e),r7=e=>YI.test(e),i7=()=>{const e=gt("colors"),t=gt("spacing"),n=gt("blur"),r=gt("brightness"),i=gt("borderColor"),o=gt("borderRadius"),l=gt("borderSpacing"),c=gt("borderWidth"),f=gt("contrast"),d=gt("grayscale"),y=gt("hueRotate"),p=gt("invert"),g=gt("gap"),b=gt("gradientColorStops"),_=gt("gradientColorStopPositions"),S=gt("inset"),x=gt("margin"),A=gt("opacity"),j=gt("padding"),O=gt("saturate"),N=gt("scale"),E=gt("sepia"),T=gt("skew"),C=gt("space"),D=gt("translate"),q=()=>["auto","contain","none"],F=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",Le,t],P=()=>[Le,t],Y=()=>["",wi,Sa],R=()=>["auto",al,Le],$=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",Le],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[al,Le];return{cacheSize:500,separator:":",theme:{colors:[uc],spacing:[wi,Sa],blur:["none","",_a,Le],brightness:z(),borderColor:[e],borderRadius:["none","","full",_a,Le],borderSpacing:P(),borderWidth:Y(),contrast:z(),grayscale:V(),hueRotate:z(),invert:V(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[XI,Sa],inset:L(),margin:L(),opacity:z(),padding:P(),saturate:z(),scale:z(),sepia:V(),skew:z(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",Le]}],container:["container"],columns:[{columns:[_a]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...$(),Le]}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",lc,Le]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Le]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",lc,Le]}],"grid-cols":[{"grid-cols":[uc]}],"col-start-end":[{col:["auto",{span:["full",lc,Le]},Le]}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":[uc]}],"row-start-end":[{row:["auto",{span:[lc,Le]},Le]}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Le]}],gap:[{gap:[g]}],"gap-x":[{"gap-x":[g]}],"gap-y":[{"gap-y":[g]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Le,t]}],"min-w":[{"min-w":[Le,t,"min","max","fit"]}],"max-w":[{"max-w":[Le,t,"none","full","min","max","fit","prose",{screen:[_a]},_a]}],h:[{h:[Le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",_a,Sa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Y0]}],"font-family":[{font:[uc]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Le]}],"line-clamp":[{"line-clamp":["none",al,Y0]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wi,Le]}],"list-image":[{"list-image":["none",Le]}],"list-style-type":[{list:["none","disc","decimal",Le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",wi,Sa]}],"underline-offset":[{"underline-offset":["auto",wi,Le]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...$(),QI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",WI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},JI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:k()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[wi,Le]}],"outline-w":[{outline:[wi,Sa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[wi,Sa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_a,e7]}],"shadow-color":[{shadow:[uc]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...I(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",_a,Le]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[p]}],saturate:[{saturate:[O]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[f]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[O]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Le]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",Le]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",Le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[lc,Le]}],"translate-x":[{"translate-x":[D]}],"translate-y":[{"translate-y":[D]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Le]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",Le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[wi,Sa,Y0]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},a7=BI(i7);function be(...e){return a7(Be(e))}function Vn(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(2)}s`:`${(e/6e4).toFixed(2)}m`}function Ei(e){if(e===0)return"0 B";const t=1024,n=["B","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return`${(e/Math.pow(t,r)).toFixed(1)} ${n[r]}`}function h_(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function e4(e){return e>=500?"text-error-500":e>=400?"text-warning-500":e>=300?"text-primary-400":e>=200?"text-success-500":"text-gray-400"}function o7(e){return e>=500?"bg-error-500/10":e>=400?"bg-warning-500/10":e>=300?"bg-primary-400/10":e>=200?"bg-success-500/10":"bg-gray-500/10"}function zc(e){switch(e.toUpperCase()){case"GET":return"text-green-400";case"POST":return"text-blue-400";case"PUT":return"text-yellow-400";case"PATCH":return"text-orange-400";case"DELETE":return"text-red-400";default:return"text-gray-400"}}function p_(e){switch(e.toUpperCase()){case"GET":return"bg-green-500/10";case"POST":return"bg-blue-500/10";case"PUT":return"bg-yellow-500/10";case"PATCH":return"bg-orange-500/10";case"DELETE":return"bg-red-500/10";default:return"bg-gray-500/10"}}function s7(e){return e<100?"text-success-500":e<500?"text-warning-500":"text-error-500"}function l7(e){try{return JSON.parse(e)}catch{return e}}async function y_(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}/**
50
+ * @license lucide-react v0.460.0 - ISC
51
+ *
52
+ * This source code is licensed under the ISC license.
53
+ * See the LICENSE file in the root directory of this source tree.
54
+ */const u7=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),t4=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
55
+ * @license lucide-react v0.460.0 - ISC
56
+ *
57
+ * This source code is licensed under the ISC license.
58
+ * See the LICENSE file in the root directory of this source tree.
59
+ */var c7={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"};/**
60
+ * @license lucide-react v0.460.0 - ISC
61
+ *
62
+ * This source code is licensed under the ISC license.
63
+ * See the LICENSE file in the root directory of this source tree.
64
+ */const f7=U.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...c},f)=>U.createElement("svg",{ref:f,...c7,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:t4("lucide",i),...c},[...l.map(([d,y])=>U.createElement(d,y)),...Array.isArray(o)?o:[o]]));/**
65
+ * @license lucide-react v0.460.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */const Se=(e,t)=>{const n=U.forwardRef(({className:r,...i},o)=>U.createElement(f7,{ref:o,iconNode:t,className:t4(`lucide-${u7(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
70
+ * @license lucide-react v0.460.0 - ISC
71
+ *
72
+ * This source code is licensed under the ISC license.
73
+ * See the LICENSE file in the root directory of this source tree.
74
+ */const Bo=Se("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
75
+ * @license lucide-react v0.460.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */const n4=Se("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/**
80
+ * @license lucide-react v0.460.0 - ISC
81
+ *
82
+ * This source code is licensed under the ISC license.
83
+ * See the LICENSE file in the root directory of this source tree.
84
+ */const r4=Se("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
85
+ * @license lucide-react v0.460.0 - ISC
86
+ *
87
+ * This source code is licensed under the ISC license.
88
+ * See the LICENSE file in the root directory of this source tree.
89
+ */const d7=Se("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
90
+ * @license lucide-react v0.460.0 - ISC
91
+ *
92
+ * This source code is licensed under the ISC license.
93
+ * See the LICENSE file in the root directory of this source tree.
94
+ */const h7=Se("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
95
+ * @license lucide-react v0.460.0 - ISC
96
+ *
97
+ * This source code is licensed under the ISC license.
98
+ * See the LICENSE file in the root directory of this source tree.
99
+ */const i4=Se("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
100
+ * @license lucide-react v0.460.0 - ISC
101
+ *
102
+ * This source code is licensed under the ISC license.
103
+ * See the LICENSE file in the root directory of this source tree.
104
+ */const wy=Se("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
105
+ * @license lucide-react v0.460.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const a4=Se("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
110
+ * @license lucide-react v0.460.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */const m_=Se("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
115
+ * @license lucide-react v0.460.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const Sy=Se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
120
+ * @license lucide-react v0.460.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const tu=Se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
125
+ * @license lucide-react v0.460.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const p7=Se("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
130
+ * @license lucide-react v0.460.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const nu=Se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
135
+ * @license lucide-react v0.460.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const y7=Se("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
140
+ * @license lucide-react v0.460.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const Pf=Se("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
145
+ * @license lucide-react v0.460.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const o4=Se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
150
+ * @license lucide-react v0.460.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const s4=Se("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
155
+ * @license lucide-react v0.460.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const up=Se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
160
+ * @license lucide-react v0.460.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const m7=Se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
165
+ * @license lucide-react v0.460.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const l4=Se("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
170
+ * @license lucide-react v0.460.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const Df=Se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
175
+ * @license lucide-react v0.460.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const g_=Se("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
180
+ * @license lucide-react v0.460.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const oN=Se("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
185
+ * @license lucide-react v0.460.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const $o=Se("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
190
+ * @license lucide-react v0.460.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const g7=Se("Eye",[["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"}]]);/**
195
+ * @license lucide-react v0.460.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const Zo=Se("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
200
+ * @license lucide-react v0.460.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const v7=Se("FileSearch",[["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M4.268 21a2 2 0 0 0 1.727 1H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"ms7g94"}],["path",{d:"m9 18-1.5-1.5",key:"1j6qii"}],["circle",{cx:"5",cy:"14",r:"3",key:"ufru5t"}]]);/**
205
+ * @license lucide-react v0.460.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const u4=Se("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
210
+ * @license lucide-react v0.460.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const b7=Se("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
215
+ * @license lucide-react v0.460.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const x7=Se("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
220
+ * @license lucide-react v0.460.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const w7=Se("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/**
225
+ * @license lucide-react v0.460.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const S7=Se("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
230
+ * @license lucide-react v0.460.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const $f=Se("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
235
+ * @license lucide-react v0.460.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const _7=Se("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
240
+ * @license lucide-react v0.460.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const A7=Se("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
245
+ * @license lucide-react v0.460.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const O7=Se("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
250
+ * @license lucide-react v0.460.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const j7=Se("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
255
+ * @license lucide-react v0.460.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const Bc=Se("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
260
+ * @license lucide-react v0.460.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const E7=Se("MemoryStick",[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]]);/**
265
+ * @license lucide-react v0.460.0 - ISC
266
+ *
267
+ * This source code is licensed under the ISC license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const N7=Se("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
270
+ * @license lucide-react v0.460.0 - ISC
271
+ *
272
+ * This source code is licensed under the ISC license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */const T7=Se("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
275
+ * @license lucide-react v0.460.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */const C7=Se("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 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-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);/**
280
+ * @license lucide-react v0.460.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */const M7=Se("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
285
+ * @license lucide-react v0.460.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */const k7=Se("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
290
+ * @license lucide-react v0.460.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */const R7=Se("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
295
+ * @license lucide-react v0.460.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ */const cp=Se("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
300
+ * @license lucide-react v0.460.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */const P7=Se("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
305
+ * @license lucide-react v0.460.0 - ISC
306
+ *
307
+ * This source code is licensed under the ISC license.
308
+ * See the LICENSE file in the root directory of this source tree.
309
+ */const c4=Se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
310
+ * @license lucide-react v0.460.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */const D7=Se("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
315
+ * @license lucide-react v0.460.0 - ISC
316
+ *
317
+ * This source code is licensed under the ISC license.
318
+ * See the LICENSE file in the root directory of this source tree.
319
+ */const v_=Se("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
320
+ * @license lucide-react v0.460.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */const $7=Se("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]);/**
325
+ * @license lucide-react v0.460.0 - ISC
326
+ *
327
+ * This source code is licensed under the ISC license.
328
+ * See the LICENSE file in the root directory of this source tree.
329
+ */const f4=Se("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
330
+ * @license lucide-react v0.460.0 - ISC
331
+ *
332
+ * This source code is licensed under the ISC license.
333
+ * See the LICENSE file in the root directory of this source tree.
334
+ */const q7=Se("Route",[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]]);/**
335
+ * @license lucide-react v0.460.0 - ISC
336
+ *
337
+ * This source code is licensed under the ISC license.
338
+ * See the LICENSE file in the root directory of this source tree.
339
+ */const b_=Se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
340
+ * @license lucide-react v0.460.0 - ISC
341
+ *
342
+ * This source code is licensed under the ISC license.
343
+ * See the LICENSE file in the root directory of this source tree.
344
+ */const d4=Se("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
345
+ * @license lucide-react v0.460.0 - ISC
346
+ *
347
+ * This source code is licensed under the ISC license.
348
+ * See the LICENSE file in the root directory of this source tree.
349
+ */const sN=Se("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
350
+ * @license lucide-react v0.460.0 - ISC
351
+ *
352
+ * This source code is licensed under the ISC license.
353
+ * See the LICENSE file in the root directory of this source tree.
354
+ */const h4=Se("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
355
+ * @license lucide-react v0.460.0 - ISC
356
+ *
357
+ * This source code is licensed under the ISC license.
358
+ * See the LICENSE file in the root directory of this source tree.
359
+ */const fp=Se("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
360
+ * @license lucide-react v0.460.0 - ISC
361
+ *
362
+ * This source code is licensed under the ISC license.
363
+ * See the LICENSE file in the root directory of this source tree.
364
+ */const qf=Se("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
365
+ * @license lucide-react v0.460.0 - ISC
366
+ *
367
+ * This source code is licensed under the ISC license.
368
+ * See the LICENSE file in the root directory of this source tree.
369
+ */const L7=Se("ShieldQuestion",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
370
+ * @license lucide-react v0.460.0 - ISC
371
+ *
372
+ * This source code is licensed under the ISC license.
373
+ * See the LICENSE file in the root directory of this source tree.
374
+ */const z7=Se("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
375
+ * @license lucide-react v0.460.0 - ISC
376
+ *
377
+ * This source code is licensed under the ISC license.
378
+ * See the LICENSE file in the root directory of this source tree.
379
+ */const B7=Se("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
380
+ * @license lucide-react v0.460.0 - ISC
381
+ *
382
+ * This source code is licensed under the ISC license.
383
+ * See the LICENSE file in the root directory of this source tree.
384
+ */const I7=Se("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/**
385
+ * @license lucide-react v0.460.0 - ISC
386
+ *
387
+ * This source code is licensed under the ISC license.
388
+ * See the LICENSE file in the root directory of this source tree.
389
+ */const bl=Se("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
390
+ * @license lucide-react v0.460.0 - ISC
391
+ *
392
+ * This source code is licensed under the ISC license.
393
+ * See the LICENSE file in the root directory of this source tree.
394
+ */const Sw=Se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
395
+ * @license lucide-react v0.460.0 - ISC
396
+ *
397
+ * This source code is licensed under the ISC license.
398
+ * See the LICENSE file in the root directory of this source tree.
399
+ */const ru=Se("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
400
+ * @license lucide-react v0.460.0 - ISC
401
+ *
402
+ * This source code is licensed under the ISC license.
403
+ * See the LICENSE file in the root directory of this source tree.
404
+ */const U7=Se("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/**
405
+ * @license lucide-react v0.460.0 - ISC
406
+ *
407
+ * This source code is licensed under the ISC license.
408
+ * See the LICENSE file in the root directory of this source tree.
409
+ */const x_=Se("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
410
+ * @license lucide-react v0.460.0 - ISC
411
+ *
412
+ * This source code is licensed under the ISC license.
413
+ * See the LICENSE file in the root directory of this source tree.
414
+ */const w_=Se("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
415
+ * @license lucide-react v0.460.0 - ISC
416
+ *
417
+ * This source code is licensed under the ISC license.
418
+ * See the LICENSE file in the root directory of this source tree.
419
+ */const Bi=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
420
+ * @license lucide-react v0.460.0 - ISC
421
+ *
422
+ * This source code is licensed under the ISC license.
423
+ * See the LICENSE file in the root directory of this source tree.
424
+ */const S_=Se("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),H7=["log","info","warn","error","debug"],V7=[{id:"status",label:"Status"},{id:"requests",label:"Requests"},{id:"logs",label:"Logs"},{id:"api-client",label:"API Client"},{id:"container",label:"Container"},{id:"architecture",label:"Architecture"},{id:"metrics",label:"Metrics"},{id:"replay",label:"Replay"}];function G7({onClose:e}){const t=o_(),{agentUrl:n,connected:r,setAgentUrl:i,exchanges:o,logs:l}=wt(),[c,f]=U.useState(!1);return m.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[m.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:e}),m.jsxs("div",{className:"relative ml-auto w-full max-w-xl bg-gray-900 border-l border-gray-800 overflow-y-auto animate-slide-up",children:[m.jsxs("div",{className:"sticky top-0 bg-gray-900 border-b border-gray-800 p-4 flex items-center justify-between z-10",children:[m.jsx("h2",{className:"text-lg font-semibold text-white",children:"Settings"}),m.jsx("button",{onClick:e,className:"p-2 text-gray-400 hover:text-white hover:bg-gray-800 rounded-lg",children:m.jsx(Bi,{className:"w-5 h-5"})})]}),m.jsxs("div",{className:"divide-y divide-gray-800",children:[m.jsx(cc,{icon:P7,title:"Connection",children:m.jsxs(vo,{label:"Agent URL",hint:"WebSocket URL of the running Studio Agent.",children:[m.jsxs("div",{className:"flex gap-2",children:[m.jsx("input",{type:"text",value:t.agentUrl,onChange:d=>t.update({agentUrl:d.target.value}),className:"flex-1 px-3 py-2 text-sm bg-gray-800 border border-gray-700 rounded font-mono focus:outline-none focus:border-primary-500"}),m.jsx("button",{onClick:()=>i(t.agentUrl),className:"px-3 py-2 text-xs bg-primary-700 hover:bg-primary-600 text-white rounded whitespace-nowrap",title:"Reconnect Studio to this URL (page reload required for full effect)",children:"Apply"})]}),m.jsx(F7,{connected:r,liveUrl:n})]})}),m.jsxs(cc,{icon:Zo,title:"Editor",children:[m.jsx(vo,{label:"Editor scheme",hint:"Used by every Open-in-editor button. Changing this affects all future clicks.",children:m.jsx("select",{value:t.editorScheme,onChange:d=>t.update({editorScheme:d.target.value}),className:"w-full px-3 py-2 text-sm bg-gray-800 border border-gray-700 rounded focus:outline-none focus:border-primary-500",children:Object.keys(WE).map(d=>m.jsx("option",{value:d,children:WE[d]},d))})}),t.editorScheme==="custom"&&m.jsx(vo,{label:"Custom URL prefix",hint:'Path and ":<line>:<col>" will be appended. Example: "vscode-insiders://file"',children:m.jsx("input",{type:"text",value:t.customEditorPrefix,onChange:d=>t.update({customEditorPrefix:d.target.value}),placeholder:"vscode://file",className:"w-full px-3 py-2 text-sm bg-gray-800 border border-gray-700 rounded font-mono focus:outline-none focus:border-primary-500"})})]}),m.jsxs(cc,{icon:g_,title:"Recording",children:[m.jsx(X0,{label:"Start recording on launch",hint:"When off, you must click Resume in the header to begin capturing requests.",checked:t.recordOnLaunch,onChange:d=>t.update({recordOnLaunch:d})}),m.jsx(vo,{label:"Max retained exchanges",hint:"Older exchanges are dropped from memory once this limit is reached.",children:m.jsx(lN,{value:t.maxExchanges,onChange:d=>t.update({maxExchanges:d}),min:50,max:5e3,step:50})}),m.jsx(vo,{label:"Max log buffer size",hint:"Older log lines are dropped once this limit is reached.",children:m.jsx(lN,{value:t.maxLogBuffer,onChange:d=>t.update({maxLogBuffer:d}),min:100,max:1e4,step:100})})]}),m.jsxs(cc,{icon:g7,title:"Display",children:[m.jsx(vo,{label:"Default view on launch",hint:"Which tab Studio opens to on a fresh page load.",children:m.jsx("select",{value:t.defaultView,onChange:d=>t.update({defaultView:d.target.value}),className:"w-full px-3 py-2 text-sm bg-gray-800 border border-gray-700 rounded focus:outline-none focus:border-primary-500",children:V7.map(d=>m.jsx("option",{value:d.id,children:d.label},d.id))})}),m.jsx(X0,{label:"Sidebar open by default",checked:t.defaultSidebarOpen,onChange:d=>t.update({defaultSidebarOpen:d})}),m.jsx(X0,{label:"Auto-scroll lists by default",hint:"Applies to the Requests and Logs timelines.",checked:t.defaultAutoScroll,onChange:d=>t.update({defaultAutoScroll:d})}),m.jsx(vo,{label:"Default log levels",hint:"Levels checked here are visible by default in the Logs view.",children:m.jsx("div",{className:"flex flex-wrap gap-2",children:H7.map(d=>{const y=t.defaultLogLevels.includes(d);return m.jsx("button",{onClick:()=>{const p=y?t.defaultLogLevels.filter(g=>g!==d):[...t.defaultLogLevels,d];t.update({defaultLogLevels:p})},className:be("px-2 py-1 text-[11px] font-mono uppercase rounded border transition-colors",y?"border-primary-500/40 bg-primary-500/10 text-primary-300":"border-gray-800 text-gray-600 hover:text-gray-400"),children:d},d)})})})]}),m.jsxs(cc,{icon:$f,title:"About",children:[m.jsxs("div",{className:"space-y-2 text-sm text-gray-300",children:[m.jsx(fc,{label:"Studio UI",value:Y7()}),m.jsx(fc,{label:"Agent",value:r?"connected":"offline",valueClass:r?"text-success-500":"text-error-500"}),m.jsx(fc,{label:"Agent URL",value:n,mono:!0,copy:!0}),m.jsx(fc,{label:"Recorded exchanges",value:`${o.length}`}),m.jsx(fc,{label:"Buffered log lines",value:`${l.length}`})]}),m.jsx("div",{className:"mt-4 pt-4 border-t border-gray-800",children:c?m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Pf,{className:"w-4 h-4 text-warning-500"}),m.jsx("span",{className:"text-sm text-gray-300",children:"Reset all settings to defaults?"}),m.jsx("button",{onClick:()=>{t.reset(),f(!1)},className:"ml-auto px-3 py-1.5 text-xs bg-error-500/20 border border-error-500/40 text-error-300 hover:bg-error-500/30 rounded",children:"Reset"}),m.jsx("button",{onClick:()=>f(!1),className:"px-3 py-1.5 text-xs border border-gray-700 text-gray-400 hover:text-white rounded",children:"Cancel"})]}):m.jsxs("button",{onClick:()=>f(!0),className:"flex items-center gap-2 px-3 py-1.5 text-xs border border-gray-700 text-gray-400 hover:text-error-400 hover:border-error-500/50 rounded transition-colors",children:[m.jsx(f4,{className:"w-3.5 h-3.5"}),"Reset all settings"]})})]})]})]})]})}function cc({icon:e,title:t,children:n}){return m.jsxs("section",{className:"p-5",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[m.jsx(e,{className:"w-4 h-4 text-primary-400"}),m.jsx("h3",{className:"text-sm font-semibold text-gray-300 uppercase tracking-wide",children:t})]}),m.jsx("div",{className:"space-y-4",children:n})]})}function vo({label:e,hint:t,children:n}){return m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-200 mb-1",children:e}),t&&m.jsx("p",{className:"text-xs text-gray-500 mb-2",children:t}),n]})}function X0({label:e,hint:t,checked:n,onChange:r}){return m.jsxs("label",{className:"flex items-start gap-3 cursor-pointer select-none",children:[m.jsx("button",{type:"button",role:"switch","aria-checked":n,onClick:()=>r(!n),className:be("relative inline-flex h-5 w-9 rounded-full transition-colors flex-shrink-0 mt-0.5",n?"bg-primary-500":"bg-gray-700"),children:m.jsx("span",{className:be("inline-block h-4 w-4 transform rounded-full bg-white transition-transform mt-0.5",n?"translate-x-4":"translate-x-0.5")})}),m.jsxs("div",{className:"min-w-0",children:[m.jsx("div",{className:"text-sm text-gray-200",children:e}),t&&m.jsx("div",{className:"text-xs text-gray-500 mt-0.5",children:t})]})]})}function lN({value:e,onChange:t,min:n,max:r,step:i}){return m.jsx("input",{type:"number",value:e,onChange:o=>{const l=parseInt(o.target.value,10);Number.isFinite(l)&&t(l)},min:n,max:r,step:i,className:"w-32 px-3 py-2 text-sm bg-gray-800 border border-gray-700 rounded focus:outline-none focus:border-primary-500"})}function fc({label:e,value:t,mono:n,copy:r,valueClass:i}){const[o,l]=U.useState(!1);return m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"text-gray-500 w-32 shrink-0",children:e}),m.jsx("span",{className:be("truncate flex-1",n&&"font-mono text-xs",i),children:t}),r&&m.jsx("button",{onClick:async()=>{await y_(t),l(!0),setTimeout(()=>l(!1),1200)},className:"text-gray-500 hover:text-gray-200",title:"Copy",children:o?m.jsx(Sy,{className:"w-3.5 h-3.5 text-success-500"}):m.jsx(Df,{className:"w-3.5 h-3.5"})})]})}function F7({connected:e,liveUrl:t}){return m.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs",children:[m.jsx("span",{className:be("w-2 h-2 rounded-full",e?"bg-success-500 animate-pulse":"bg-error-500")}),m.jsx("span",{className:e?"text-success-500":"text-error-500",children:e?"Connected":"Disconnected"}),m.jsxs("span",{className:"text-gray-600 truncate",children:["→ ",t]})]})}function Y7(){return window.__STUDIO_VERSION__??"dev"}const X7=[{id:"status",label:"Status",icon:O7},{id:"requests",label:"Requests",icon:Bo},{id:"logs",label:"Logs",icon:bl},{id:"api-client",label:"API Client",icon:d4},{id:"container",label:"Container",icon:wy},{id:"architecture",label:"Architecture",icon:w7},{id:"metrics",label:"Metrics",icon:m_},{id:"replay",label:"Replay",icon:cp},{id:"security",label:"Security",icon:qf}];function K7(){const{sidebarOpen:e,setSidebarOpen:t,currentView:n,setCurrentView:r,connected:i}=wt(),[o,l]=U.useState(!1);return m.jsxs("aside",{className:be("fixed left-0 top-0 h-full bg-gray-900 border-r border-gray-800 z-40 transition-all duration-300",e?"w-64":"w-16"),children:[m.jsxs("div",{className:"flex items-center h-16 px-4 border-b border-gray-800",children:[m.jsx("img",{src:"/expressots-icon.svg",alt:"ExpressoTS",className:"w-8 h-8 flex-shrink-0 rounded-full"}),e&&m.jsxs("div",{className:"ml-3 overflow-hidden flex items-center gap-2",children:[m.jsx("span",{className:"text-lg font-bold text-white whitespace-nowrap",children:"EXPRESSO"}),m.jsx("span",{className:"text-xs font-bold px-1.5 py-0.5 rounded bg-primary-950 text-primary-500 shadow-sm whitespace-nowrap",children:"TS"})]})]}),m.jsxs("div",{className:be("flex items-center px-4 py-3 border-b border-gray-800",i?"text-success-500":"text-error-500"),children:[m.jsx("div",{className:be("w-2 h-2 rounded-full flex-shrink-0",i?"bg-success-500 animate-pulse-slow":"bg-error-500")}),e&&m.jsx("span",{className:"ml-3 text-sm whitespace-nowrap",children:i?"Connected":"Disconnected"})]}),m.jsx("nav",{className:"flex-1 py-4",children:X7.map(c=>{const f=c.icon,d=n===c.id;return m.jsxs("button",{onClick:()=>r(c.id),className:be("flex items-center w-full px-4 py-3 text-left transition-colors",d?"bg-primary-500/10 text-primary-400 border-r-2 border-primary-500":"text-gray-400 hover:bg-gray-800 hover:text-gray-200"),children:[m.jsx(f,{className:"w-5 h-5 flex-shrink-0"}),e&&m.jsx("span",{className:"ml-3 whitespace-nowrap",children:c.label})]},c.id)})}),m.jsx("div",{className:"border-t border-gray-800 p-4",children:m.jsxs("button",{onClick:()=>l(!0),className:"flex items-center w-full text-gray-400 hover:text-gray-200 transition-colors",children:[m.jsx(h4,{className:"w-5 h-5 flex-shrink-0"}),e&&m.jsx("span",{className:"ml-3 whitespace-nowrap",children:"Settings"})]})}),o&&m.jsx(G7,{onClose:()=>l(!1)}),m.jsx("button",{onClick:()=>t(!e),className:"absolute -right-3 top-20 w-6 h-6 bg-gray-800 border border-gray-700 rounded-full flex items-center justify-center text-gray-400 hover:text-white hover:bg-gray-700 transition-colors",children:e?m.jsx(p7,{className:"w-4 h-4"}):m.jsx(nu,{className:"w-4 h-4"})})]})}var W7=_P();const Q7=["GET","POST","PUT","PATCH","DELETE"],Z7={status:"App Status",requests:"Request Timeline",architecture:"Architecture Map",metrics:"Performance Metrics",replay:"Request Replay","api-client":"API Client",container:"DI Container",logs:"Live Logs"};function J7(){const{currentView:e,searchQuery:t,setSearchQuery:n,filterMethod:r,setFilterMethod:i,filterStatus:o,setFilterStatus:l,recordingEnabled:c,lastEventAt:f,exchanges:d,endpointStats:y,logs:p}=wt(),{rescan:g,requestMetrics:b,requestExchanges:_,clearRecordings:S,clearLogs:x,setRecording:A}=Qo(),[j,O]=U.useState(!1),[N,E]=U.useState(!1);U.useEffect(()=>{if(!f)return;E(!0);const F=setTimeout(()=>E(!1),900);return()=>clearTimeout(F)},[f]);const T=()=>{g(),b(),_()},C=()=>{S(),x(),O(!1)},D=()=>A(!c),q=e==="requests"||e==="replay";return m.jsxs("header",{className:"h-16 bg-gray-900/50 backdrop-blur-sm border-b border-gray-800 flex items-center justify-between px-6",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("h2",{className:"text-xl font-semibold text-white",children:Z7[e]||"Dashboard"}),q&&m.jsxs("span",{className:`flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[11px] font-medium border transition-colors ${c?N?"bg-primary-500/15 border-primary-500/40 text-primary-300":"bg-gray-800/60 border-gray-700 text-gray-400":"bg-gray-800 border-gray-700 text-gray-400"}`,title:c?"Recording — new requests stream in live":"Recording is paused",children:[m.jsx(D7,{className:`w-3 h-3 ${c&&N?"text-primary-400 animate-pulse":""}`}),c?"Live":"Paused",m.jsx("span",{className:"text-gray-500",children:"·"}),m.jsx("span",{className:"tabular-nums text-gray-400",children:d.length})]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsxs("div",{className:"relative",children:[m.jsx(b_,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),m.jsx("input",{type:"text",placeholder:"Search requests...",value:t,onChange:F=>n(F.target.value),className:"pl-10 pr-4 py-2 bg-gray-800 border border-gray-700 rounded-lg text-sm text-gray-200 placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent w-64"})]}),q&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(b7,{className:"w-4 h-4 text-gray-500"}),m.jsxs("select",{value:r||"",onChange:F=>i(F.target.value||null),className:"bg-gray-800 border border-gray-700 rounded-lg text-sm text-gray-200 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500",children:[m.jsx("option",{value:"",children:"All Methods"}),Q7.map(F=>m.jsx("option",{value:F,children:F},F))]}),m.jsxs("select",{value:o,onChange:F=>l(F.target.value),className:"bg-gray-800 border border-gray-700 rounded-lg text-sm text-gray-200 px-3 py-2 focus:outline-none focus:ring-2 focus:ring-primary-500",children:[m.jsx("option",{value:"all",children:"All Status"}),m.jsx("option",{value:"success",children:"Success (2xx)"}),m.jsx("option",{value:"error",children:"Errors (4xx/5xx)"})]})]}),q&&m.jsxs("div",{className:"flex items-center gap-1 pl-2 border-l border-gray-800",children:[m.jsx("button",{onClick:D,className:`p-2 rounded-lg transition-colors ${c?"text-gray-400 hover:text-white hover:bg-gray-800":"text-primary-400 hover:text-primary-300 hover:bg-primary-500/10"}`,title:c?"Pause recording":"Resume recording",children:c?m.jsx(k7,{className:"w-5 h-5"}):m.jsx(cp,{className:"w-5 h-5"})}),m.jsx("button",{onClick:()=>O(!0),disabled:d.length===0,className:"p-2 text-gray-400 hover:text-error-400 hover:bg-gray-800 rounded-lg transition-colors disabled:opacity-40 disabled:cursor-not-allowed disabled:hover:text-gray-400 disabled:hover:bg-transparent",title:"Clear all recorded requests",children:m.jsx(Sw,{className:"w-5 h-5"})})]}),m.jsx("button",{onClick:T,className:"p-2 text-gray-400 hover:text-white hover:bg-gray-800 rounded-lg transition-colors",title:"Refresh routes, metrics, and recordings",children:m.jsx(v_,{className:"w-5 h-5"})})]}),j&&W7.createPortal(m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",onClick:()=>O(!1),children:m.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-xl shadow-2xl max-w-md w-full overflow-hidden animate-slide-up",onClick:F=>F.stopPropagation(),role:"alertdialog","aria-modal":"true","aria-labelledby":"clear-dialog-title",children:[m.jsxs("div",{className:"flex items-start gap-3 px-5 pt-5 pb-4 border-b border-gray-800 bg-error-500/5",children:[m.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-full bg-error-500/15 border border-error-500/30 flex items-center justify-center",children:m.jsx(ru,{className:"w-5 h-5 text-error-400"})}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("h3",{id:"clear-dialog-title",className:"text-base font-semibold text-white leading-tight",children:"Clear all recorded data?"}),m.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"This cannot be undone."})]}),m.jsx("button",{onClick:()=>O(!1),className:"p-1 -mt-1 -mr-1 text-gray-500 hover:text-white rounded transition-colors","aria-label":"Close",children:m.jsx(Bi,{className:"w-4 h-4"})})]}),m.jsxs("div",{className:"px-5 py-4",children:[m.jsx("p",{className:"text-sm text-gray-300 mb-3",children:"You're about to discard everything Studio has captured for this session:"}),m.jsxs("ul",{className:"space-y-2",children:[m.jsx(K0,{icon:Bo,count:d.length,label:`captured request${d.length===1?"":"s"}`,detail:"including bodies, headers, and timings"}),m.jsx(K0,{icon:m_,count:y.length,label:`endpoint stat row${y.length===1?"":"s"}`,detail:"p50 / p95 / p99 will reset to zero"}),m.jsx(K0,{icon:bl,count:p.length,label:`buffered log line${p.length===1?"":"s"}`,detail:"agent log buffer will be emptied"})]})]}),m.jsxs("div",{className:"px-5 pb-5 flex items-center gap-2 justify-end border-t border-gray-800 pt-4 bg-gray-900/40",children:[m.jsx("button",{onClick:()=>O(!1),className:"px-4 py-2 text-sm font-medium bg-gray-800 hover:bg-gray-700 text-gray-200 rounded-lg transition-colors",children:"Cancel"}),m.jsxs("button",{onClick:C,autoFocus:!0,className:"flex items-center gap-2 px-4 py-2 text-sm font-medium bg-error-500 hover:bg-error-600 text-white rounded-lg transition-colors shadow-sm shadow-error-500/30",children:[m.jsx(Sw,{className:"w-4 h-4"}),"Clear everything"]})]})]})}),document.body)]})}function K0({icon:e,count:t,label:n,detail:r}){const i=t===0;return m.jsxs("li",{className:`flex items-start gap-3 p-2.5 rounded-lg border ${i?"border-gray-800/60 bg-gray-900/30 text-gray-500":"border-gray-800 bg-gray-800/40 text-gray-200"}`,children:[m.jsx(e,{className:`w-4 h-4 mt-0.5 ${i?"text-gray-600":"text-error-400"}`}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsxs("div",{className:"text-sm",children:[m.jsx("span",{className:"font-mono font-semibold tabular-nums",children:t})," ",m.jsx("span",{children:n})]}),m.jsx("div",{className:"text-[11px] text-gray-500",children:r})]})]})}function e9(){const{connected:e,agentLatencyMs:t,eventsReceived:n,metrics:r,exchanges:i,logs:o}=wt(),l=t==null?"text-gray-500":t<30?"text-success-500":t<150?"text-warning-500":"text-error-400";return m.jsxs("footer",{className:"border-t border-gray-800 bg-gray-900/60 backdrop-blur-sm px-4 py-1.5 flex items-center gap-4 text-xs font-mono text-gray-400",children:[m.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e?m.jsx(w_,{className:"w-3 h-3 text-success-500"}):m.jsx(x_,{className:"w-3 h-3 text-error-500"}),m.jsx("span",{className:e?"text-success-500":"text-error-500",children:e?"connected":"offline"})]}),m.jsx(W0,{}),m.jsxs("span",{className:"inline-flex items-center gap-1.5",title:"Round-trip latency to the Studio Agent",children:[m.jsx(x7,{className:be("w-3 h-3",l)}),m.jsx("span",{className:l,children:t==null?"—":`${t}ms`})]}),m.jsx(W0,{}),m.jsxs("span",{className:"inline-flex items-center gap-1.5",title:"Total messages received from the agent since page load",children:[m.jsx(r4,{className:"w-3 h-3"}),m.jsxs("span",{children:[n.toLocaleString()," ev"]})]}),m.jsx(W0,{}),r&&m.jsxs("span",{className:"inline-flex items-center gap-1.5",title:"Agent process memory: heapUsed / heapTotal",children:[m.jsx(E7,{className:"w-3 h-3"}),m.jsxs("span",{children:[Ei(r.memoryUsage.heapUsed)," /"," ",Ei(r.memoryUsage.heapTotal)]})]}),m.jsxs("span",{className:"ml-auto inline-flex items-center gap-3",children:[m.jsxs("span",{className:"inline-flex items-center gap-1.5",title:"Recorded exchanges currently held in memory",children:[m.jsx(Bo,{className:"w-3 h-3"}),i.length," req"]}),m.jsxs("span",{title:"Buffered log entries",children:[o.length," log"]})]})]})}function W0(){return m.jsx("span",{className:"text-gray-700",children:"·"})}function t9({children:e}){const{sidebarOpen:t}=wt();return m.jsxs("div",{className:"flex h-screen bg-gray-950 text-gray-100",children:[m.jsx(K7,{}),m.jsxs("div",{className:be("flex flex-col flex-1 transition-all duration-300",t?"ml-64":"ml-16"),children:[m.jsx(J7,{}),m.jsx("main",{className:"flex-1 overflow-auto p-6",children:e}),m.jsx(e9,{})]})]})}function p4(e,t){const n=e.request.headers||{},r=n.host||n.Host||t.defaultHost||"localhost:3000",i=e.request.url||e.request.path||"/";return/^https?:\/\//i.test(i)?i:`http://${r}${i.startsWith("/")?"":"/"}${i}`}function Q0(e){return`'${e.replace(/'/g,"'\\''")}'`}function y4(e){if(e==null)return null;if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}const n9=new Set(["host","content-length","connection","origin","referer","sec-ch-ua","sec-ch-ua-mobile","sec-ch-ua-platform","sec-fetch-mode","sec-fetch-site","sec-fetch-dest"]);function m4(e){return Object.entries(e).filter(([t])=>!n9.has(t.toLowerCase()))}function r9(e,t={}){const n=p4(e,t),r=e.request.method.toUpperCase(),i=m4(e.request.headers||{}),o=y4(e.request.body),l=["curl","-X",r,Q0(n)];for(const[c,f]of i)l.push("-H",Q0(`${c}: ${f}`));return o&&l.push("--data-raw",Q0(o)),l.join(` \\
425
+ `)}function i9(e,t={}){const n=p4(e,t),r=e.request.method.toUpperCase(),i=m4(e.request.headers||{}),o=y4(e.request.body),l={method:r};i.length>0&&(l.headers=Object.fromEntries(i)),o&&r!=="GET"&&r!=="HEAD"&&(l.body=o);const c=JSON.stringify(l,null,2);return`await fetch(${JSON.stringify(n)}, ${c});`}function a9(e){var f,d,y;const t=e.request.method.toLowerCase(),n=e.request.path||"/",r=((f=e.response)==null?void 0:f.statusCode)??200,i=dp(e.request.body),o=dp((d=e.response)==null?void 0:d.body),l={summary:`${e.request.method} ${n}`,responses:{[String(r)]:{description:((y=e.response)==null?void 0:y.statusMessage)||"Response",...o&&{content:{"application/json":{schema:o}}}}}};i&&t!=="get"&&t!=="head"&&(l.requestBody={required:!0,content:{"application/json":{schema:i}}});const c={paths:{[n]:{[t]:l}}};return JSON.stringify(c,null,2)}function dp(e){if(e==null)return null;if(typeof e=="string")return{type:"string",example:e};if(typeof e=="number")return{type:Number.isInteger(e)?"integer":"number",example:e};if(typeof e=="boolean")return{type:"boolean",example:e};if(Array.isArray(e))return{type:"array",items:e.length>0?dp(e[0])||{type:"object"}:{type:"object"}};if(typeof e=="object"){const t={};for(const[n,r]of Object.entries(e)){const i=dp(r);i&&(t[n]=i)}return{type:"object",properties:t}}return null}function g4(e,t,n={}){switch(t){case"curl":return r9(e,n);case"fetch":return i9(e,n);case"openapi":return a9(e);default:return""}}async function o9(e){try{return await navigator.clipboard.writeText(e),!0}catch{try{const t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}catch{return!1}}}const s9=[{id:"curl",label:"Copy as cURL",hint:"Terminal-ready command"},{id:"fetch",label:"Copy as fetch()",hint:"JavaScript / TypeScript"},{id:"openapi",label:"Copy as OpenAPI",hint:"OpenAPI 3.1 path fragment"}];function v4({exchange:e,compact:t=!1}){const[n,r]=U.useState(!1),[i,o]=U.useState(null),l=U.useRef(null);U.useEffect(()=>{if(!n)return;function f(d){l.current&&!l.current.contains(d.target)&&r(!1)}return document.addEventListener("mousedown",f),()=>document.removeEventListener("mousedown",f)},[n]);async function c(f,d){f.stopPropagation();const y=g4(e,d);await o9(y)&&(o(d),setTimeout(()=>o(null),1500))}return m.jsxs("div",{ref:l,className:"relative",children:[m.jsxs("button",{onClick:f=>{f.stopPropagation(),r(d=>!d)},className:t?"p-1 text-gray-500 hover:text-primary-400 rounded":"flex items-center gap-1 px-2 py-1 text-xs font-medium bg-gray-800 hover:bg-gray-700 text-gray-300 rounded",title:"Export this request",children:[m.jsx(Df,{className:"w-4 h-4"}),!t&&m.jsxs(m.Fragment,{children:[m.jsx("span",{children:"Export"}),m.jsx(tu,{className:"w-3 h-3"})]})]}),n&&m.jsx("div",{className:"absolute right-0 top-full mt-1 w-56 bg-gray-800 border border-gray-700 rounded-lg shadow-lg z-50 py-1",children:s9.map(f=>m.jsxs("button",{onClick:d=>c(d,f.id),className:"flex items-center w-full text-left px-3 py-2 hover:bg-gray-700 transition-colors",children:[m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:"text-sm text-white",children:f.label}),m.jsx("div",{className:"text-[10px] text-gray-500",children:f.hint})]}),i===f.id&&m.jsx(Sy,{className:"w-4 h-4 text-primary-400"})]},f.id))})]})}function uN(){var p;const{exchanges:e,searchQuery:t,filterMethod:n,filterStatus:r,selectedExchangeId:i,setSelectedExchangeId:o,autoScroll:l,setAutoScroll:c}=wt(),f=U.useRef(null),d=(p=e[0])==null?void 0:p.id;U.useEffect(()=>{var g;!l||!d||(g=f.current)==null||g.scrollIntoView({behavior:"smooth",block:"start"})},[d,l]);const y=U.useMemo(()=>e.filter(g=>{if(t){const b=t.toLowerCase();if(!g.request.path.toLowerCase().includes(b)&&!g.request.url.toLowerCase().includes(b))return!1}return!(n&&g.request.method!==n||r==="success"&&g.response.statusCode>=400||r==="error"&&g.response.statusCode<400)}),[e,t,n,r]);return e.length===0?m.jsx(l9,{}):m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center justify-between mb-3 text-xs text-gray-500",children:[m.jsxs("span",{children:["Showing ",y.length," of ",e.length,y.length!==e.length&&m.jsx("span",{className:"text-gray-600",children:" (filtered)"})]}),m.jsxs("button",{onClick:()=>c(!l),className:be("flex items-center gap-1.5 px-2 py-1 rounded border transition-colors",l?"bg-primary-500/10 border-primary-500/30 text-primary-300":"bg-gray-800/60 border-gray-700 text-gray-400 hover:text-gray-200"),title:l?"Auto-scroll on":"Auto-scroll off",children:[m.jsx(n4,{className:"w-3 h-3"}),"Auto-scroll"]})]}),m.jsx("div",{ref:f}),m.jsxs("div",{className:"space-y-2",children:[y.map(g=>m.jsx(u9,{exchange:g,isSelected:i===g.id,onSelect:()=>o(g.id)},g.id)),y.length===0&&m.jsx("div",{className:"text-center py-12 text-gray-500 text-sm",children:"No requests match the current filters."})]})]})}function l9(){return m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-gray-400",children:[m.jsx("div",{className:"w-16 h-16 mb-4 rounded-full bg-primary-500/10 flex items-center justify-center",children:m.jsx(up,{className:"w-8 h-8 text-primary-400 opacity-70"})}),m.jsx("p",{className:"text-lg text-white font-medium",children:"No requests recorded yet"}),m.jsxs("p",{className:"text-sm mt-2 text-center max-w-md",children:["Send a request to your running app (default"," ",m.jsx("code",{className:"px-1.5 py-0.5 bg-gray-800 rounded text-primary-300 text-xs",children:"localhost:3000"}),") and it will stream in here in real time."]}),m.jsxs("p",{className:"text-xs mt-4 text-gray-500",children:["Tip: use the"," ",m.jsx("span",{className:"text-primary-300 font-medium",children:"API Client"})," tab to send one from inside Studio."]})]})}function u9({exchange:e,isSelected:t,onSelect:n}){const{request:r,response:i}=e;return m.jsxs("div",{onClick:n,className:be("flex items-center p-4 rounded-lg border cursor-pointer transition-all",t?"bg-gray-800/80 border-primary-500/50":"bg-gray-900/50 border-gray-800 hover:bg-gray-800/50 hover:border-gray-700"),children:[m.jsx("div",{className:be("px-2 py-1 rounded text-xs font-mono font-semibold",p_(r.method),zc(r.method)),children:r.method}),m.jsxs("div",{className:"flex-1 ml-4 min-w-0",children:[m.jsx("p",{className:"text-sm font-mono text-gray-200 truncate",children:r.path}),m.jsx("p",{className:"text-xs text-gray-500 mt-1",children:h_(r.timestamp)})]}),m.jsx("div",{className:be("px-2 py-1 rounded text-xs font-semibold ml-4",o7(i.statusCode),e4(i.statusCode)),children:i.statusCode}),m.jsx("div",{className:be("text-sm font-mono ml-4 min-w-[80px] text-right",s7(i.duration)),children:Vn(i.duration)}),m.jsx("div",{className:"ml-3",onClick:o=>o.stopPropagation(),children:m.jsx(v4,{exchange:e,compact:!0})}),m.jsx($o,{className:"w-4 h-4 ml-3 text-gray-600"})]})}const c9={vscode:"vscode://file",cursor:"cursor://file",webstorm:"webstorm://open?file=",idea:"idea://open?file=",sublime:"subl://open?url=file://"};function f9(){const e=o_.getState();return e.editorScheme==="custom"?e.customEditorPrefix||"vscode://file":c9[e.editorScheme]??"vscode://file"}function d9(e){if(!e.filePath)return null;let t=e.filePath.replace(/\\/g,"/");t.startsWith("/")||(t="/"+t);const n=e.lineNumber??1,r=e.column??1,i=f9();return i.endsWith("?file=")?`${i}${encodeURIComponent(t)}&line=${n}&column=${r}`:i.endsWith("?url=file://")?`${i}${encodeURIComponent(t)}:${n}:${r}`:`${i}${t}:${n}:${r}`}function iu(e){const t=d9(e);t&&(window.location.href=t)}function qr(e){if(typeof e=="string")return e}function h9(e){if(!e)return[];const t=e.split(/\r?\n/).filter(r=>r.trim().startsWith("at ")),n=[];for(const r of t){const i=r.match(/at\s+(?:(.+?)\s+\()?(.+?):(\d+):(\d+)\)?$/)||r.match(/at\s+(.+?):(\d+):(\d+)$/);if(!i){n.push({raw:r.trim(),isUserCode:!1});continue}const[,o,l,c,f]=i,d=l||o||"",y=d.startsWith("node:")||d.includes("node_modules")||d.includes("@expressots");n.push({raw:r.trim(),function:o==null?void 0:o.trim(),file:d,line:Number(c),column:Number(f),isUserCode:!y})}return n}function p9(e){if(!e||typeof e!="object")return{frames:[],empty:!0};const t=e,n=(t.error&&typeof t.error=="object"?t.error:null)||t,r=qr(n.stack)||qr(t.stack),i=n.detail??t.detail??n.message,o=Array.isArray(n.validationErrors)?n.validationErrors:Array.isArray(t.errors)?t.errors:void 0,l={type:qr(n.type)||qr(t.type),title:qr(n.title)||qr(t.title)||qr(n.message)||qr(t.message),detail:typeof i=="string"||i&&typeof i=="object"?i:void 0,problemStatus:typeof n.status=="number"?n.status:void 0,errorCode:qr(n.errorCode)||qr(t.errorCode),validationErrors:o,stack:r,frames:h9(r),empty:!1};return l.empty=!l.type&&!l.title&&!l.detail&&!l.stack&&(!l.validationErrors||l.validationErrors.length===0),l}function y9({exchange:e}){const{response:t}=e,n=U.useMemo(()=>p9(t.body),[t.body]),[r,i]=U.useState(!1);if(t.statusCode<400)return null;const o=n.frames.filter(y=>y.isUserCode),l=r||o.length===0?n.frames:o,c=n.frames.length-l.length,f=o[0],d=t.statusCode>=500;return m.jsx("div",{className:"border-b border-gray-800",children:m.jsxs("div",{className:"p-4",children:[m.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[m.jsx("div",{className:`p-2 rounded ${d?"bg-error-500/15 text-error-400":"bg-warning-500/15 text-warning-500"}`,children:m.jsx(C7,{className:"w-5 h-5"})}),m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsxs("span",{className:`text-xs font-medium px-2 py-0.5 rounded ${d?"bg-error-500/10 text-error-400 border border-error-500/30":"bg-warning-500/10 text-warning-500 border border-warning-500/30"}`,children:[t.statusCode," ",t.statusMessage||(d?"Server Error":"Client Error")]}),n.errorCode&&m.jsx("span",{className:"text-xs font-mono text-gray-400 bg-gray-800 px-1.5 py-0.5 rounded",children:n.errorCode})]}),m.jsx("h3",{className:"text-base font-semibold text-white",children:n.title||"Request failed"}),n.type&&m.jsxs("a",{href:n.type,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary-400 hover:text-primary-300 mt-1 font-mono",children:[n.type,m.jsx($o,{className:"w-3 h-3"})]})]})]}),n.detail&&m.jsx("div",{className:"mt-3 pl-12 text-sm",children:typeof n.detail=="string"?m.jsx("p",{className:"text-gray-300 leading-relaxed",children:n.detail}):m.jsx("pre",{className:"text-xs font-mono bg-gray-800/50 text-gray-300 rounded p-3 overflow-x-auto",children:JSON.stringify(n.detail,null,2)})}),n.validationErrors&&n.validationErrors.length>0&&m.jsxs("div",{className:"mt-3 pl-12",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-2 text-xs text-gray-400 uppercase tracking-wide",children:[m.jsx(z7,{className:"w-3 h-3"}),"Validation errors"]}),m.jsx("ul",{className:"space-y-1.5",children:n.validationErrors.map((y,p)=>m.jsxs("li",{className:"text-sm bg-gray-800/40 rounded px-3 py-2",children:[m.jsx("span",{className:"font-mono text-warning-500",children:y.property}),y.constraints&&m.jsx("ul",{className:"mt-1 ml-3 text-xs text-gray-400 space-y-0.5",children:Object.entries(y.constraints).map(([g,b])=>m.jsxs("li",{children:[m.jsxs("span",{className:"text-gray-500",children:[g,":"]})," ",b]},g))})]},p))})]}),(f==null?void 0:f.file)&&m.jsx("div",{className:"mt-3 pl-12",children:m.jsxs("button",{onClick:()=>iu({filePath:f.file,lineNumber:f.line,column:f.column}),className:"inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium bg-primary-700 hover:bg-primary-600 text-white rounded",children:[m.jsx(Zo,{className:"w-3.5 h-3.5"}),"Open throw site in editor",m.jsxs("span",{className:"font-mono text-primary-200 opacity-80",children:[m9(f.file),":",f.line]})]})}),n.frames.length>0&&m.jsx(g9,{frames:l,allFrames:n.frames,collapsedCount:c,showAllFrames:r,onToggle:()=>i(!r)}),n.empty&&m.jsx("p",{className:"mt-2 pl-12 text-sm text-gray-500",children:"No structured error data was returned by the server. The response body is rendered below as-is."})]})})}function m9(e){const t=e.split(/[\\/]/);return t.length<=2?e:"…/"+t.slice(-2).join("/")}function g9({frames:e,allFrames:t,collapsedCount:n,showAllFrames:r,onToggle:i}){const[o,l]=U.useState(!0);return m.jsxs("div",{className:"mt-4 pl-12",children:[m.jsxs("button",{onClick:()=>l(!o),className:"flex items-center gap-1.5 text-xs uppercase tracking-wide text-gray-400 hover:text-white",children:[o?m.jsx(tu,{className:"w-3 h-3"}):m.jsx(nu,{className:"w-3 h-3"}),m.jsx(m7,{className:"w-3 h-3"}),"Stack trace",m.jsxs("span",{className:"text-gray-600 normal-case",children:["(",t.length," frame",t.length===1?"":"s",")"]})]}),o&&m.jsxs("div",{className:"mt-2 bg-gray-800/40 rounded border border-gray-800 divide-y divide-gray-800/60 font-mono text-xs",children:[e.map((c,f)=>m.jsx(v9,{frame:c},f)),n>0&&m.jsx("button",{onClick:i,className:"w-full text-left px-3 py-2 text-gray-500 hover:bg-gray-800/30 hover:text-gray-300 transition-colors",children:r?"↑ Hide framework / node_modules frames":`↓ Show ${n} framework / node_modules frame${n===1?"":"s"}`})]})]})}function v9({frame:e}){const t=e.isUserCode&&e.file&&e.line;return m.jsxs("div",{className:`flex items-center gap-2 px-3 py-1.5 ${e.isUserCode?"bg-primary-950/20":""}`,children:[m.jsxs("div",{className:"flex-1 min-w-0",children:[e.function&&m.jsx("div",{className:e.isUserCode?"text-primary-300":"text-gray-400",children:e.function}),e.file&&m.jsxs("div",{className:"text-gray-500 truncate",children:[e.file,e.line?`:${e.line}`:"",e.column?`:${e.column}`:""]}),!e.file&&!e.function&&m.jsx("div",{className:"text-gray-500 truncate",children:e.raw})]}),t&&m.jsx("button",{onClick:()=>iu({filePath:e.file,lineNumber:e.line,column:e.column}),className:"p-1 text-gray-500 hover:text-primary-400",title:"Open in editor",children:m.jsx(Zo,{className:"w-3.5 h-3.5"})})]})}const Oh={log:{text:"text-gray-300",bg:"bg-gray-700/30",label:"LOG",Icon:nu},info:{text:"text-sky-400",bg:"bg-sky-500/10",label:"INFO",Icon:$f},warn:{text:"text-warning-500",bg:"bg-warning-500/10",label:"WARN",Icon:ru},error:{text:"text-error-400",bg:"bg-error-500/15",label:"ERROR",Icon:Pf},debug:{text:"text-violet-400",bg:"bg-violet-500/10",label:"DEBUG",Icon:a4}};function b9(e){const t=new Date(e),n=String(t.getMilliseconds()).padStart(3,"0");return`${t.toLocaleTimeString([],{hour12:!1})}.${n}`}function x9({traceId:e}){const t=wt(l=>l.logsByTraceId),[n,r]=U.useState(!0),i=t[e]??[];if(i.length===0)return null;const o=i.reduce((l,c)=>c.level==="error"?"error":c.level==="warn"&&l!=="error"?"warn":l,"log");return m.jsxs("div",{className:"border-b border-gray-800",children:[m.jsxs("button",{onClick:()=>r(!n),className:"w-full px-4 py-3 flex items-center gap-2 hover:bg-gray-800/30 transition-colors",children:[m.jsx(bl,{className:"w-4 h-4 text-primary-400"}),m.jsx("span",{className:"text-sm font-semibold text-gray-300",children:"Logs during this request"}),m.jsxs("span",{className:"text-xs text-gray-500",children:["(",i.length," ",i.length===1?"entry":"entries",")"]}),m.jsx("span",{className:be("ml-auto inline-flex items-center px-2 py-0.5 rounded text-[10px] font-mono uppercase",Oh[o].bg,Oh[o].text),children:Oh[o].label})]}),n&&m.jsx("div",{className:"px-4 pb-4",children:m.jsx("div",{className:"bg-gray-950/60 border border-gray-800 rounded font-mono text-xs divide-y divide-gray-800/60 max-h-72 overflow-y-auto",children:i.map((l,c)=>{const f=Oh[l.level],{Icon:d}=f;return m.jsxs("div",{className:"flex items-start gap-2 px-3 py-1.5",children:[m.jsx("span",{className:"text-gray-600 tabular-nums select-none shrink-0",children:b9(l.timestamp)}),m.jsxs("span",{className:be("inline-flex items-center gap-1 shrink-0 px-1.5 py-0.5 rounded text-[10px] font-semibold tracking-wide",f.bg,f.text),children:[m.jsx(d,{className:"w-3 h-3"}),f.label]}),m.jsx("pre",{className:"flex-1 whitespace-pre-wrap break-words text-gray-200 leading-relaxed",children:l.message})]},c)})})})]})}function w9(e){return{generatedAt:new Date().toISOString(),studioVersion:e.studioVersion??"dev",agentUrl:e.agentUrl,request:e.exchange.request,response:e.exchange.response,matchedRoute:e.route,resolvedBindings:e.resolvedBindings,logs:e.logs,curl:g4(e.exchange,"curl")}}function S9(e){const t=[],{request:n,response:r,matchedRoute:i,resolvedBindings:o,logs:l}=e;t.push(`# Bug report — \`${n.method} ${n.path}\``),t.push(""),t.push(`**Status:** \`${r.statusCode}${r.statusMessage?" "+r.statusMessage:""}\` · **Duration:** ${r.duration}ms`),t.push(`**Generated:** ${e.generatedAt} · **Studio:** ${e.studioVersion}`),t.push(""),i&&(t.push("## Handler"),t.push(`- Controller: \`${i.controller}.${i.controllerMethod}()\``),i.filePath&&t.push(`- File: \`${i.filePath}${i.lineNumber?":"+i.lineNumber:""}\``),t.push("")),t.push("## Request"),t.push("```http"),t.push(`${n.method} ${n.url??n.path}`);for(const[c,f]of Object.entries(n.headers??{}))t.push(`${c}: ${f}`);if(t.push(""),n.body!==void 0&&n.body!==null&&t.push(typeof n.body=="string"?n.body:JSON.stringify(n.body,null,2)),t.push("```"),t.push(""),t.push("## Response"),t.push("```json"),t.push(JSON.stringify(r.body??null,null,2)),t.push("```"),t.push(""),o.length>0){t.push("## Resolved DI bindings");for(const c of o)t.push(`- \`${c}\``);t.push("")}if(l.length>0){t.push("## Logs during this request"),t.push("```");for(const c of l){const f=new Date(c.timestamp).toISOString().substring(11,23);t.push(`${f} [${c.level.toUpperCase().padEnd(5)}] ${c.message}`)}t.push("```"),t.push("")}return t.push("## Reproduce"),t.push("```bash"),t.push(e.curl),t.push("```"),t.join(`
426
+ `)}function cN(e,t,n="application/json"){const r=new Blob([t],{type:n}),i=URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),setTimeout(()=>URL.revokeObjectURL(i),1e3)}function _9(e,t){const n=w9(e),r=(e.exchange.request.path||"request").replace(/[^a-z0-9-]+/gi,"-").replace(/^-|-$/g,"").toLowerCase().slice(0,40)||"request",i=new Date().toISOString().replace(/[:.]/g,"-");t==="json"?cN(`studio-snapshot-${r}-${i}.json`,JSON.stringify(n,null,2),"application/json"):cN(`studio-snapshot-${r}-${i}.md`,S9(n),"text/markdown")}function A9(){const{exchanges:e,selectedExchangeId:t,setSelectedExchangeId:n,routes:r,containerResolutionsByExchange:i,logsByTraceId:o,agentUrl:l}=wt(),c=U.useMemo(()=>e.find(b=>b.id===t),[e,t]),f=U.useMemo(()=>{var S;if(!c)return;const b=r.find(x=>x.method===c.request.method&&x.path===c.request.path);return b||((S=r.filter(x=>x.method===c.request.method).map(x=>({r:x,score:j9(x.path,c.request.path)})).filter(x=>x.score>0).sort((x,A)=>A.score-x.score)[0])==null?void 0:S.r)},[c,r]),d=U.useMemo(()=>c?i[c.id]??[]:[],[c,i]);if(!c)return null;const{request:y,response:p,trace:g}=c;return m.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[m.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>n(null)}),m.jsxs("div",{className:"relative ml-auto w-full max-w-2xl bg-gray-900 border-l border-gray-800 overflow-y-auto animate-slide-up",children:[m.jsxs("div",{className:"sticky top-0 bg-gray-900 border-b border-gray-800 p-4 flex items-center justify-between z-10",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:be("px-2 py-1 rounded text-xs font-mono font-semibold",p.statusCode>=400?"bg-error-500/10 text-error-500":"bg-success-500/10 text-success-500"),children:p.statusCode}),m.jsxs("span",{className:"font-mono text-sm text-gray-300",children:[y.method," ",y.path]})]}),m.jsx("button",{onClick:()=>n(null),className:"p-2 text-gray-400 hover:text-white hover:bg-gray-800 rounded-lg",children:m.jsx(Bi,{className:"w-5 h-5"})})]}),m.jsx("div",{className:"p-4 border-b border-gray-800",children:m.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:"Duration"}),m.jsx("p",{className:"text-lg font-semibold text-white mt-1",children:Vn(p.duration)})]}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:"Time"}),m.jsx("p",{className:"text-lg font-semibold text-white mt-1",children:h_(y.timestamp)})]}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:"Status"}),m.jsxs("p",{className:be("text-lg font-semibold mt-1",p.statusCode>=400?"text-error-500":"text-success-500"),children:[p.statusCode," ",p.statusMessage]})]})]})}),(f||d.length>0)&&m.jsxs("div",{className:"p-4 border-b border-gray-800 space-y-3",children:[f&&f.filePath&&m.jsxs("div",{className:"flex items-center justify-between bg-gray-800/40 border border-gray-700 rounded-lg px-3 py-2",children:[m.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[m.jsx(Zo,{className:"w-4 h-4 text-primary-400 flex-shrink-0"}),m.jsxs("div",{className:"min-w-0",children:[m.jsxs("div",{className:"text-sm text-white truncate",children:[f.controller,m.jsx("span",{className:"text-gray-500",children:"."}),m.jsxs("span",{className:"text-primary-300",children:[f.controllerMethod,"()"]})]}),m.jsxs("div",{className:"text-[11px] text-gray-500 truncate font-mono",children:[f.filePath,f.lineNumber?`:${f.lineNumber}`:""]})]})]}),m.jsx("button",{onClick:()=>iu({filePath:f.filePath,lineNumber:f.lineNumber}),className:"ml-3 px-3 py-1.5 text-xs font-medium bg-primary-700 hover:bg-primary-600 text-white rounded",children:"Open in editor"})]}),d.length>0&&m.jsxs("div",{className:"bg-gray-800/40 border border-gray-700 rounded-lg px-3 py-2",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[m.jsx(wy,{className:"w-4 h-4 text-primary-400"}),m.jsxs("span",{className:"text-sm font-medium text-white",children:["Resolved bindings (",d.length,")"]})]}),m.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map(b=>m.jsx("span",{className:"px-2 py-0.5 text-[11px] font-mono bg-primary-950/60 border border-primary-700/40 text-primary-300 rounded",children:b},b))})]})]}),p.statusCode>=400&&m.jsx(y9,{exchange:c}),m.jsx(E9,{trace:g}),m.jsx(x9,{traceId:c.request.traceId||c.id}),m.jsx(jh,{title:"Request Headers",defaultOpen:!0,children:m.jsx(dN,{headers:y.headers})}),y.body?m.jsx(jh,{title:"Request Body",children:m.jsx(hN,{data:y.body})}):null,m.jsx(jh,{title:"Response Headers",children:m.jsx(dN,{headers:p.headers})}),p.body?m.jsx(jh,{title:"Response Body",defaultOpen:!0,children:m.jsx(hN,{data:p.body})}):null,m.jsxs("div",{className:"p-4 border-t border-gray-800 flex gap-2 items-center flex-wrap",children:[m.jsxs("button",{onClick:()=>y_(JSON.stringify(c,null,2)),className:"flex items-center gap-2 px-4 py-2 bg-gray-800 hover:bg-gray-700 rounded-lg text-sm text-gray-300 transition-colors",children:[m.jsx(Df,{className:"w-4 h-4"}),"Copy as JSON"]}),m.jsx(v4,{exchange:c}),m.jsx(O9,{onExport:b=>_9({exchange:c,route:f,logs:o[c.request.traceId||c.id]??[],resolvedBindings:d,agentUrl:l},b)})]})]})]})}function O9({onExport:e}){const[t,n]=U.useState(!1);return m.jsxs("div",{className:"relative",children:[m.jsxs("button",{onClick:()=>n(r=>!r),className:"flex items-center gap-2 px-4 py-2 bg-gray-800 hover:bg-gray-700 rounded-lg text-sm text-gray-300 transition-colors",children:[m.jsx(oN,{className:"w-4 h-4"}),"Export snapshot",m.jsx(tu,{className:be("w-3 h-3 transition-transform",t&&"rotate-180")})]}),t&&m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>n(!1),"aria-hidden":!0}),m.jsxs("div",{className:"absolute bottom-full mb-2 right-0 z-20 min-w-[200px] bg-gray-900 border border-gray-800 rounded-lg shadow-xl overflow-hidden",children:[m.jsx(fN,{icon:oN,label:"Download as JSON",hint:"Machine-readable, full fidelity",onClick:()=>{e("json"),n(!1)}}),m.jsx(fN,{icon:u4,label:"Download as Markdown",hint:"Bug-report draft, ready to paste",onClick:()=>{e("markdown"),n(!1)}})]})]})]})}function fN({icon:e,label:t,hint:n,onClick:r}){return m.jsxs("button",{onClick:r,className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-800 flex items-start gap-2",children:[m.jsx(e,{className:"w-4 h-4 text-primary-400 mt-0.5 flex-shrink-0"}),m.jsxs("div",{children:[m.jsx("div",{className:"text-gray-200",children:t}),n&&m.jsx("div",{className:"text-[11px] text-gray-500",children:n})]})]})}function j9(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);if(n.length!==r.length)return 0;let i=0;for(let o=0;o<n.length;o++){const l=n[o],c=r[o];if(l.startsWith(":")||l==="*")i+=1;else if(l===c)i+=2;else return 0}return i}function E9({trace:e}){return!e||e.spans.length===0?null:m.jsxs("div",{className:"p-4 border-b border-gray-800",children:[m.jsx("h3",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide mb-4",children:"Trace Waterfall"}),m.jsx("div",{className:"space-y-2",children:e.spans.sort((t,n)=>t.startTime-n.startTime).map(t=>{const n=(t.startTime-e.startTime)/e.duration*100,r=t.duration/e.duration*100;return m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-32 text-xs text-gray-500 truncate",children:t.name}),m.jsx("div",{className:"flex-1 h-6 bg-gray-800 rounded relative",children:m.jsx("div",{className:be("absolute h-full rounded",t.status==="ERROR"?"bg-error-500":"bg-primary-500"),style:{left:`${n}%`,width:`${Math.max(r,1)}%`}})}),m.jsx("div",{className:"w-16 text-xs text-gray-500 text-right",children:Vn(t.duration)})]},t.spanId)})})]})}function jh({title:e,defaultOpen:t=!1,children:n}){const[r,i]=U.useState(t);return m.jsxs("div",{className:"border-b border-gray-800",children:[m.jsxs("button",{onClick:()=>i(!r),className:"w-full p-4 flex items-center justify-between text-left hover:bg-gray-800/50 transition-colors",children:[m.jsx("h3",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide",children:e}),m.jsx("span",{className:"text-gray-500 text-sm",children:r?"−":"+"})]}),r&&m.jsx("div",{className:"px-4 pb-4",children:n})]})}function dN({headers:e}){const t=Object.entries(e);return t.length===0?m.jsx("p",{className:"text-sm text-gray-500",children:"No headers"}):m.jsx("div",{className:"space-y-1",children:t.map(([n,r])=>m.jsxs("div",{className:"flex text-sm",children:[m.jsxs("span",{className:"text-gray-500 w-40 flex-shrink-0 font-mono",children:[n,":"]}),m.jsx("span",{className:"text-gray-300 font-mono break-all",children:r})]},n))})}function hN({data:e}){const t=typeof e=="string"?e:JSON.stringify(e,null,2);return m.jsx("pre",{className:"text-sm font-mono text-gray-300 bg-gray-800/50 rounded-lg p-4 overflow-x-auto",children:t})}function It(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=It(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var N9={value:()=>{}};function _y(){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 tp(n)}function tp(e){this._=e}function T9(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}tp.prototype=_y.prototype={constructor:tp,on:function(e,t){var n=this._,r=T9(e+"",n),i,o=-1,l=r.length;if(arguments.length<2){for(;++o<l;)if((i=(e=r[o]).type)&&(i=C9(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<l;)if(i=(e=r[o]).type)n[i]=pN(n[i],e.name,t);else if(t==null)for(i in n)n[i]=pN(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new tp(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function C9(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function pN(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=N9,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var _w="http://www.w3.org/1999/xhtml";const yN={svg:"http://www.w3.org/2000/svg",xhtml:_w,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ay(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),yN.hasOwnProperty(t)?{space:yN[t],local:e}:e}function M9(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===_w&&t.documentElement.namespaceURI===_w?t.createElement(e):t.createElementNS(n,e)}}function k9(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function b4(e){var t=Ay(e);return(t.local?k9:M9)(t)}function R9(){}function __(e){return e==null?R9:function(){return this.querySelector(e)}}function P9(e){typeof e!="function"&&(e=__(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,c=r[i]=new Array(l),f,d,y=0;y<l;++y)(f=o[y])&&(d=e.call(f,f.__data__,y,o))&&("__data__"in f&&(d.__data__=f.__data__),c[y]=d);return new Fn(r,this._parents)}function D9(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function $9(){return[]}function x4(e){return e==null?$9:function(){return this.querySelectorAll(e)}}function q9(e){return function(){return D9(e.apply(this,arguments))}}function L9(e){typeof e=="function"?e=q9(e):e=x4(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var l=t[o],c=l.length,f,d=0;d<c;++d)(f=l[d])&&(r.push(e.call(f,f.__data__,d,l)),i.push(f));return new Fn(r,i)}function w4(e){return function(){return this.matches(e)}}function S4(e){return function(t){return t.matches(e)}}var z9=Array.prototype.find;function B9(e){return function(){return z9.call(this.children,e)}}function I9(){return this.firstElementChild}function U9(e){return this.select(e==null?I9:B9(typeof e=="function"?e:S4(e)))}var H9=Array.prototype.filter;function V9(){return Array.from(this.children)}function G9(e){return function(){return H9.call(this.children,e)}}function F9(e){return this.selectAll(e==null?V9:G9(typeof e=="function"?e:S4(e)))}function Y9(e){typeof e!="function"&&(e=w4(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,c=r[i]=[],f,d=0;d<l;++d)(f=o[d])&&e.call(f,f.__data__,d,o)&&c.push(f);return new Fn(r,this._parents)}function _4(e){return new Array(e.length)}function X9(){return new Fn(this._enter||this._groups.map(_4),this._parents)}function hp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}hp.prototype={constructor:hp,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 K9(e){return function(){return e}}function W9(e,t,n,r,i,o){for(var l=0,c,f=t.length,d=o.length;l<d;++l)(c=t[l])?(c.__data__=o[l],r[l]=c):n[l]=new hp(e,o[l]);for(;l<f;++l)(c=t[l])&&(i[l]=c)}function Q9(e,t,n,r,i,o,l){var c,f,d=new Map,y=t.length,p=o.length,g=new Array(y),b;for(c=0;c<y;++c)(f=t[c])&&(g[c]=b=l.call(f,f.__data__,c,t)+"",d.has(b)?i[c]=f:d.set(b,f));for(c=0;c<p;++c)b=l.call(e,o[c],c,o)+"",(f=d.get(b))?(r[c]=f,f.__data__=o[c],d.delete(b)):n[c]=new hp(e,o[c]);for(c=0;c<y;++c)(f=t[c])&&d.get(g[c])===f&&(i[c]=f)}function Z9(e){return e.__data__}function J9(e,t){if(!arguments.length)return Array.from(this,Z9);var n=t?Q9:W9,r=this._parents,i=this._groups;typeof e!="function"&&(e=K9(e));for(var o=i.length,l=new Array(o),c=new Array(o),f=new Array(o),d=0;d<o;++d){var y=r[d],p=i[d],g=p.length,b=eU(e.call(y,y&&y.__data__,d,r)),_=b.length,S=c[d]=new Array(_),x=l[d]=new Array(_),A=f[d]=new Array(g);n(y,p,S,x,A,b,t);for(var j=0,O=0,N,E;j<_;++j)if(N=S[j]){for(j>=O&&(O=j+1);!(E=x[O])&&++O<_;);N._next=E||null}}return l=new Fn(l,r),l._enter=c,l._exit=f,l}function eU(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tU(){return new Fn(this._exit||this._groups.map(_4),this._parents)}function nU(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function rU(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,l=Math.min(i,o),c=new Array(i),f=0;f<l;++f)for(var d=n[f],y=r[f],p=d.length,g=c[f]=new Array(p),b,_=0;_<p;++_)(b=d[_]||y[_])&&(g[_]=b);for(;f<i;++f)c[f]=n[f];return new Fn(c,this._parents)}function iU(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],l;--i>=0;)(l=r[i])&&(o&&l.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(l,o),o=l);return this}function aU(e){e||(e=oU);function t(p,g){return p&&g?e(p.__data__,g.__data__):!p-!g}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var l=n[o],c=l.length,f=i[o]=new Array(c),d,y=0;y<c;++y)(d=l[y])&&(f[y]=d);f.sort(t)}return new Fn(i,this._parents).order()}function oU(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function sU(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function lU(){return Array.from(this)}function uU(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var l=r[i];if(l)return l}return null}function cU(){let e=0;for(const t of this)++e;return e}function fU(){return!this.node()}function dU(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,l=i.length,c;o<l;++o)(c=i[o])&&e.call(c,c.__data__,o,i);return this}function hU(e){return function(){this.removeAttribute(e)}}function pU(e){return function(){this.removeAttributeNS(e.space,e.local)}}function yU(e,t){return function(){this.setAttribute(e,t)}}function mU(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function gU(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function vU(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 bU(e,t){var n=Ay(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?pU:hU:typeof t=="function"?n.local?vU:gU:n.local?mU:yU)(n,t))}function A4(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function xU(e){return function(){this.style.removeProperty(e)}}function wU(e,t,n){return function(){this.style.setProperty(e,t,n)}}function SU(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function _U(e,t,n){return arguments.length>1?this.each((t==null?xU:typeof t=="function"?SU:wU)(e,t,n??"")):xl(this.node(),e)}function xl(e,t){return e.style.getPropertyValue(t)||A4(e).getComputedStyle(e,null).getPropertyValue(t)}function AU(e){return function(){delete this[e]}}function OU(e,t){return function(){this[e]=t}}function jU(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function EU(e,t){return arguments.length>1?this.each((t==null?AU:typeof t=="function"?jU:OU)(e,t)):this.node()[e]}function O4(e){return e.trim().split(/^|\s+/)}function A_(e){return e.classList||new j4(e)}function j4(e){this._node=e,this._names=O4(e.getAttribute("class")||"")}j4.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 E4(e,t){for(var n=A_(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function N4(e,t){for(var n=A_(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function NU(e){return function(){E4(this,e)}}function TU(e){return function(){N4(this,e)}}function CU(e,t){return function(){(t.apply(this,arguments)?E4:N4)(this,e)}}function MU(e,t){var n=O4(e+"");if(arguments.length<2){for(var r=A_(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?CU:t?NU:TU)(n,t))}function kU(){this.textContent=""}function RU(e){return function(){this.textContent=e}}function PU(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function DU(e){return arguments.length?this.each(e==null?kU:(typeof e=="function"?PU:RU)(e)):this.node().textContent}function $U(){this.innerHTML=""}function qU(e){return function(){this.innerHTML=e}}function LU(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function zU(e){return arguments.length?this.each(e==null?$U:(typeof e=="function"?LU:qU)(e)):this.node().innerHTML}function BU(){this.nextSibling&&this.parentNode.appendChild(this)}function IU(){return this.each(BU)}function UU(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function HU(){return this.each(UU)}function VU(e){var t=typeof e=="function"?e:b4(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function GU(){return null}function FU(e,t){var n=typeof e=="function"?e:b4(e),r=t==null?GU:typeof t=="function"?t:__(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function YU(){var e=this.parentNode;e&&e.removeChild(this)}function XU(){return this.each(YU)}function KU(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function WU(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function QU(e){return this.select(e?WU:KU)}function ZU(e){return arguments.length?this.property("__data__",e):this.node().__data__}function JU(e){return function(t){e.call(this,t,this.__data__)}}function eH(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 tH(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function nH(e,t,n){return function(){var r=this.__on,i,o=JU(t);if(r){for(var l=0,c=r.length;l<c;++l)if((i=r[l]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function rH(e,t,n){var r=eH(e+""),i,o=r.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,d=c.length,y;f<d;++f)for(i=0,y=c[f];i<o;++i)if((l=r[i]).type===y.type&&l.name===y.name)return y.value}return}for(c=t?nH:tH,i=0;i<o;++i)this.each(c(r[i],t,n));return this}function T4(e,t,n){var r=A4(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function iH(e,t){return function(){return T4(this,e,t)}}function aH(e,t){return function(){return T4(this,e,t.apply(this,arguments))}}function oH(e,t){return this.each((typeof t=="function"?aH:iH)(e,t))}function*sH(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,l;i<o;++i)(l=r[i])&&(yield l)}var C4=[null];function Fn(e,t){this._groups=e,this._parents=t}function Lf(){return new Fn([[document.documentElement]],C4)}function lH(){return this}Fn.prototype=Lf.prototype={constructor:Fn,select:P9,selectAll:L9,selectChild:U9,selectChildren:F9,filter:Y9,data:J9,enter:X9,exit:tU,join:nU,merge:rU,selection:lH,order:iU,sort:aU,call:sU,nodes:lU,node:uU,size:cU,empty:fU,each:dU,attr:bU,style:_U,property:EU,classed:MU,text:DU,html:zU,raise:IU,lower:HU,append:VU,insert:FU,remove:XU,clone:QU,datum:ZU,on:rH,dispatch:oH,[Symbol.iterator]:sH};function Un(e){return typeof e=="string"?new Fn([[document.querySelector(e)]],[document.documentElement]):new Fn([[e]],C4)}function uH(e){let t;for(;t=e.sourceEvent;)e=t;return e}function wr(e,t){if(e=uH(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const cH={passive:!1},Ic={capture:!0,passive:!1};function Z0(e){e.stopImmediatePropagation()}function ol(e){e.preventDefault(),e.stopImmediatePropagation()}function M4(e){var t=e.document.documentElement,n=Un(e).on("dragstart.drag",ol,Ic);"onselectstart"in t?n.on("selectstart.drag",ol,Ic):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function k4(e,t){var n=e.document.documentElement,r=Un(e).on("dragstart.drag",null);t&&(r.on("click.drag",ol,Ic),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 Eh=e=>()=>e;function Aw(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:l,y:c,dx:f,dy:d,dispatch:y}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:y}})}Aw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function fH(e){return!e.ctrlKey&&!e.button}function dH(){return this.parentNode}function hH(e,t){return t??{x:e.x,y:e.y}}function pH(){return navigator.maxTouchPoints||"ontouchstart"in this}function R4(){var e=fH,t=dH,n=hH,r=pH,i={},o=_y("start","drag","end"),l=0,c,f,d,y,p=0;function g(N){N.on("mousedown.drag",b).filter(r).on("touchstart.drag",x).on("touchmove.drag",A,cH).on("touchend.drag touchcancel.drag",j).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(N,E){if(!(y||!e.call(this,N,E))){var T=O(this,t.call(this,N,E),N,E,"mouse");T&&(Un(N.view).on("mousemove.drag",_,Ic).on("mouseup.drag",S,Ic),M4(N.view),Z0(N),d=!1,c=N.clientX,f=N.clientY,T("start",N))}}function _(N){if(ol(N),!d){var E=N.clientX-c,T=N.clientY-f;d=E*E+T*T>p}i.mouse("drag",N)}function S(N){Un(N.view).on("mousemove.drag mouseup.drag",null),k4(N.view,d),ol(N),i.mouse("end",N)}function x(N,E){if(e.call(this,N,E)){var T=N.changedTouches,C=t.call(this,N,E),D=T.length,q,F;for(q=0;q<D;++q)(F=O(this,C,N,E,T[q].identifier,T[q]))&&(Z0(N),F("start",N,T[q]))}}function A(N){var E=N.changedTouches,T=E.length,C,D;for(C=0;C<T;++C)(D=i[E[C].identifier])&&(ol(N),D("drag",N,E[C]))}function j(N){var E=N.changedTouches,T=E.length,C,D;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),C=0;C<T;++C)(D=i[E[C].identifier])&&(Z0(N),D("end",N,E[C]))}function O(N,E,T,C,D,q){var F=o.copy(),L=wr(q||T,E),P,Y,R;if((R=n.call(N,new Aw("beforestart",{sourceEvent:T,target:g,identifier:D,active:l,x:L[0],y:L[1],dx:0,dy:0,dispatch:F}),C))!=null)return P=R.x-L[0]||0,Y=R.y-L[1]||0,function $(k,I,H){var V=L,K;switch(k){case"start":i[D]=$,K=l++;break;case"end":delete i[D],--l;case"drag":L=wr(H||I,E),K=l;break}F.call(k,N,new Aw(k,{sourceEvent:I,subject:R,target:g,identifier:D,active:K,x:L[0]+P,y:L[1]+Y,dx:L[0]-V[0],dy:L[1]-V[1],dispatch:F}),C)}}return g.filter=function(N){return arguments.length?(e=typeof N=="function"?N:Eh(!!N),g):e},g.container=function(N){return arguments.length?(t=typeof N=="function"?N:Eh(N),g):t},g.subject=function(N){return arguments.length?(n=typeof N=="function"?N:Eh(N),g):n},g.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:Eh(!!N),g):r},g.on=function(){var N=o.on.apply(o,arguments);return N===o?g:N},g.clickDistance=function(N){return arguments.length?(p=(N=+N)*N,g):Math.sqrt(p)},g}function O_(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function P4(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zf(){}var Uc=.7,pp=1/Uc,sl="\\s*([+-]?\\d+)\\s*",Hc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yH=/^#([0-9a-f]{3,8})$/,mH=new RegExp(`^rgb\\(${sl},${sl},${sl}\\)$`),gH=new RegExp(`^rgb\\(${Hr},${Hr},${Hr}\\)$`),vH=new RegExp(`^rgba\\(${sl},${sl},${sl},${Hc}\\)$`),bH=new RegExp(`^rgba\\(${Hr},${Hr},${Hr},${Hc}\\)$`),xH=new RegExp(`^hsl\\(${Hc},${Hr},${Hr}\\)$`),wH=new RegExp(`^hsla\\(${Hc},${Hr},${Hr},${Hc}\\)$`),mN={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};O_(zf,Io,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gN,formatHex:gN,formatHex8:SH,formatHsl:_H,formatRgb:vN,toString:vN});function gN(){return this.rgb().formatHex()}function SH(){return this.rgb().formatHex8()}function _H(){return D4(this).formatHsl()}function vN(){return this.rgb().formatRgb()}function Io(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=yH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?bN(t):n===3?new Mn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Nh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Nh(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=mH.exec(e))?new Mn(t[1],t[2],t[3],1):(t=gH.exec(e))?new Mn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=vH.exec(e))?Nh(t[1],t[2],t[3],t[4]):(t=bH.exec(e))?Nh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=xH.exec(e))?SN(t[1],t[2]/100,t[3]/100,1):(t=wH.exec(e))?SN(t[1],t[2]/100,t[3]/100,t[4]):mN.hasOwnProperty(e)?bN(mN[e]):e==="transparent"?new Mn(NaN,NaN,NaN,0):null}function bN(e){return new Mn(e>>16&255,e>>8&255,e&255,1)}function Nh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Mn(e,t,n,r)}function AH(e){return e instanceof zf||(e=Io(e)),e?(e=e.rgb(),new Mn(e.r,e.g,e.b,e.opacity)):new Mn}function Ow(e,t,n,r){return arguments.length===1?AH(e):new Mn(e,t,n,r??1)}function Mn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}O_(Mn,Ow,P4(zf,{brighter(e){return e=e==null?pp:Math.pow(pp,e),new Mn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Uc:Math.pow(Uc,e),new Mn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Mn(qo(this.r),qo(this.g),qo(this.b),yp(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:xN,formatHex:xN,formatHex8:OH,formatRgb:wN,toString:wN}));function xN(){return`#${jo(this.r)}${jo(this.g)}${jo(this.b)}`}function OH(){return`#${jo(this.r)}${jo(this.g)}${jo(this.b)}${jo((isNaN(this.opacity)?1:this.opacity)*255)}`}function wN(){const e=yp(this.opacity);return`${e===1?"rgb(":"rgba("}${qo(this.r)}, ${qo(this.g)}, ${qo(this.b)}${e===1?")":`, ${e})`}`}function yp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function jo(e){return e=qo(e),(e<16?"0":"")+e.toString(16)}function SN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Or(e,t,n,r)}function D4(e){if(e instanceof Or)return new Or(e.h,e.s,e.l,e.opacity);if(e instanceof zf||(e=Io(e)),!e)return new Or;if(e instanceof Or)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),l=NaN,c=o-i,f=(o+i)/2;return c?(t===o?l=(n-r)/c+(n<r)*6:n===o?l=(r-t)/c+2:l=(t-n)/c+4,c/=f<.5?o+i:2-o-i,l*=60):c=f>0&&f<1?0:l,new Or(l,c,f,e.opacity)}function jH(e,t,n,r){return arguments.length===1?D4(e):new Or(e,t,n,r??1)}function Or(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}O_(Or,jH,P4(zf,{brighter(e){return e=e==null?pp:Math.pow(pp,e),new Or(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Uc:Math.pow(Uc,e),new Or(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Mn(J0(e>=240?e-240:e+120,i,r),J0(e,i,r),J0(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Or(_N(this.h),Th(this.s),Th(this.l),yp(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=yp(this.opacity);return`${e===1?"hsl(":"hsla("}${_N(this.h)}, ${Th(this.s)*100}%, ${Th(this.l)*100}%${e===1?")":`, ${e})`}`}}));function _N(e){return e=(e||0)%360,e<0?e+360:e}function Th(e){return Math.max(0,Math.min(1,e||0))}function J0(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 j_=e=>()=>e;function EH(e,t){return function(n){return e+n*t}}function NH(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 TH(e){return(e=+e)==1?$4:function(t,n){return n-t?NH(t,n,e):j_(isNaN(t)?n:t)}}function $4(e,t){var n=t-e;return n?EH(e,n):j_(isNaN(e)?t:e)}const mp=(function e(t){var n=TH(t);function r(i,o){var l=n((i=Ow(i)).r,(o=Ow(o)).r),c=n(i.g,o.g),f=n(i.b,o.b),d=$4(i.opacity,o.opacity);return function(y){return i.r=l(y),i.g=c(y),i.b=f(y),i.opacity=d(y),i+""}}return r.gamma=e,r})(1);function CH(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function MH(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function kH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),l;for(l=0;l<r;++l)i[l]=ki(e[l],t[l]);for(;l<n;++l)o[l]=t[l];return function(c){for(l=0;l<r;++l)o[l]=i[l](c);return o}}function RH(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Ar(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function PH(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ki(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var jw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ev=new RegExp(jw.source,"g");function DH(e){return function(){return e}}function $H(e){return function(t){return e(t)+""}}function q4(e,t){var n=jw.lastIndex=ev.lastIndex=0,r,i,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=jw.exec(e))&&(i=ev.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),c[l]?c[l]+=o:c[++l]=o),(r=r[0])===(i=i[0])?c[l]?c[l]+=i:c[++l]=i:(c[++l]=null,f.push({i:l,x:Ar(r,i)})),n=ev.lastIndex;return n<t.length&&(o=t.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?$H(f[0].x):DH(t):(t=f.length,function(d){for(var y=0,p;y<t;++y)c[(p=f[y]).i]=p.x(d);return c.join("")})}function ki(e,t){var n=typeof t,r;return t==null||n==="boolean"?j_(t):(n==="number"?Ar:n==="string"?(r=Io(t))?(t=r,mp):q4:t instanceof Io?mp:t instanceof Date?RH:MH(t)?CH:Array.isArray(t)?kH:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?PH:Ar)(e,t)}function E_(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var AN=180/Math.PI,Ew={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function L4(e,t,n,r,i,o){var l,c,f;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(f=e*n+t*r)&&(n-=e*f,r-=t*f),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,f/=c),e*r<t*n&&(e=-e,t=-t,f=-f,l=-l),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*AN,skewX:Math.atan(f)*AN,scaleX:l,scaleY:c}}var Ch;function qH(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ew:L4(t.a,t.b,t.c,t.d,t.e,t.f)}function LH(e){return e==null||(Ch||(Ch=document.createElementNS("http://www.w3.org/2000/svg","g")),Ch.setAttribute("transform",e),!(e=Ch.transform.baseVal.consolidate()))?Ew:(e=e.matrix,L4(e.a,e.b,e.c,e.d,e.e,e.f))}function z4(e,t,n,r){function i(d){return d.length?d.pop()+" ":""}function o(d,y,p,g,b,_){if(d!==p||y!==g){var S=b.push("translate(",null,t,null,n);_.push({i:S-4,x:Ar(d,p)},{i:S-2,x:Ar(y,g)})}else(p||g)&&b.push("translate("+p+t+g+n)}function l(d,y,p,g){d!==y?(d-y>180?y+=360:y-d>180&&(d+=360),g.push({i:p.push(i(p)+"rotate(",null,r)-2,x:Ar(d,y)})):y&&p.push(i(p)+"rotate("+y+r)}function c(d,y,p,g){d!==y?g.push({i:p.push(i(p)+"skewX(",null,r)-2,x:Ar(d,y)}):y&&p.push(i(p)+"skewX("+y+r)}function f(d,y,p,g,b,_){if(d!==p||y!==g){var S=b.push(i(b)+"scale(",null,",",null,")");_.push({i:S-4,x:Ar(d,p)},{i:S-2,x:Ar(y,g)})}else(p!==1||g!==1)&&b.push(i(b)+"scale("+p+","+g+")")}return function(d,y){var p=[],g=[];return d=e(d),y=e(y),o(d.translateX,d.translateY,y.translateX,y.translateY,p,g),l(d.rotate,y.rotate,p,g),c(d.skewX,y.skewX,p,g),f(d.scaleX,d.scaleY,y.scaleX,y.scaleY,p,g),d=y=null,function(b){for(var _=-1,S=g.length,x;++_<S;)p[(x=g[_]).i]=x.x(b);return p.join("")}}}var zH=z4(qH,"px, ","px)","deg)"),BH=z4(LH,", ",")",")"),IH=1e-12;function ON(e){return((e=Math.exp(e))+1/e)/2}function UH(e){return((e=Math.exp(e))-1/e)/2}function HH(e){return((e=Math.exp(2*e))-1)/(e+1)}const np=(function e(t,n,r){function i(o,l){var c=o[0],f=o[1],d=o[2],y=l[0],p=l[1],g=l[2],b=y-c,_=p-f,S=b*b+_*_,x,A;if(S<IH)A=Math.log(g/d)/t,x=function(C){return[c+C*b,f+C*_,d*Math.exp(t*C*A)]};else{var j=Math.sqrt(S),O=(g*g-d*d+r*S)/(2*d*n*j),N=(g*g-d*d-r*S)/(2*g*n*j),E=Math.log(Math.sqrt(O*O+1)-O),T=Math.log(Math.sqrt(N*N+1)-N);A=(T-E)/t,x=function(C){var D=C*A,q=ON(E),F=d/(n*j)*(q*HH(t*D+E)-UH(E));return[c+F*b,f+F*_,d*q/ON(t*D+E)]}}return x.duration=A*1e3*t/Math.SQRT2,x}return i.rho=function(o){var l=Math.max(.001,+o),c=l*l,f=c*c;return e(l,c,f)},i})(Math.SQRT2,2,4);function VH(e,t){t===void 0&&(t=e,e=ki);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(l){var c=Math.max(0,Math.min(r-1,Math.floor(l*=r)));return o[c](l-c)}}var wl=0,Oc=0,dc=0,B4=1e3,gp,jc,vp=0,Uo=0,Oy=0,Vc=typeof performance=="object"&&performance.now?performance:Date,I4=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function N_(){return Uo||(I4(GH),Uo=Vc.now()+Oy)}function GH(){Uo=0}function bp(){this._call=this._time=this._next=null}bp.prototype=U4.prototype={constructor:bp,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?N_():+n)+(t==null?0:+t),!this._next&&jc!==this&&(jc?jc._next=this:gp=this,jc=this),this._call=e,this._time=n,Nw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Nw())}};function U4(e,t,n){var r=new bp;return r.restart(e,t,n),r}function FH(){N_(),++wl;for(var e=gp,t;e;)(t=Uo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--wl}function jN(){Uo=(vp=Vc.now())+Oy,wl=Oc=0;try{FH()}finally{wl=0,XH(),Uo=0}}function YH(){var e=Vc.now(),t=e-vp;t>B4&&(Oy-=t,vp=e)}function XH(){for(var e,t=gp,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:gp=n);jc=e,Nw(r)}function Nw(e){if(!wl){Oc&&(Oc=clearTimeout(Oc));var t=e-Uo;t>24?(e<1/0&&(Oc=setTimeout(jN,e-Vc.now()-Oy)),dc&&(dc=clearInterval(dc))):(dc||(vp=Vc.now(),dc=setInterval(YH,B4)),wl=1,I4(jN))}}function EN(e,t,n){var r=new bp;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var KH=_y("start","end","cancel","interrupt"),WH=[],H4=0,NN=1,Tw=2,rp=3,TN=4,Cw=5,ip=6;function jy(e,t,n,r,i,o){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;QH(e,n,{name:t,index:r,group:i,on:KH,tween:WH,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:H4})}function T_(e,t){var n=Tr(e,t);if(n.state>H4)throw new Error("too late; already scheduled");return n}function Kr(e,t){var n=Tr(e,t);if(n.state>rp)throw new Error("too late; already running");return n}function Tr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function QH(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=U4(o,0,n.time);function o(d){n.state=NN,n.timer.restart(l,n.delay,n.time),n.delay<=d&&l(d-n.delay)}function l(d){var y,p,g,b;if(n.state!==NN)return f();for(y in r)if(b=r[y],b.name===n.name){if(b.state===rp)return EN(l);b.state===TN?(b.state=ip,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete r[y]):+y<t&&(b.state=ip,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete r[y])}if(EN(function(){n.state===rp&&(n.state=TN,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=Tw,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Tw){for(n.state=rp,i=new Array(g=n.tween.length),y=0,p=-1;y<g;++y)(b=n.tween[y].value.call(e,e.__data__,n.index,n.group))&&(i[++p]=b);i.length=p+1}}function c(d){for(var y=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(f),n.state=Cw,1),p=-1,g=i.length;++p<g;)i[p].call(e,y);n.state===Cw&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=ip,n.timer.stop(),delete r[t];for(var d in r)return;delete e.__transition}}function ap(e,t){var n=e.__transition,r,i,o=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((r=n[l]).name!==t){o=!1;continue}i=r.state>Tw&&r.state<Cw,r.state=ip,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}o&&delete e.__transition}}function ZH(e){return this.each(function(){ap(this,e)})}function JH(e,t){var n,r;return function(){var i=Kr(this,e),o=i.tween;if(o!==n){r=n=o;for(var l=0,c=r.length;l<c;++l)if(r[l].name===t){r=r.slice(),r.splice(l,1);break}}i.tween=r}}function eV(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Kr(this,e),l=o.tween;if(l!==r){i=(r=l).slice();for(var c={name:t,value:n},f=0,d=i.length;f<d;++f)if(i[f].name===t){i[f]=c;break}f===d&&i.push(c)}o.tween=i}}function tV(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Tr(this.node(),n).tween,i=0,o=r.length,l;i<o;++i)if((l=r[i]).name===e)return l.value;return null}return this.each((t==null?JH:eV)(n,e,t))}function C_(e,t,n){var r=e._id;return e.each(function(){var i=Kr(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Tr(i,r).value[t]}}function V4(e,t){var n;return(typeof t=="number"?Ar:t instanceof Io?mp:(n=Io(t))?(t=n,mp):q4)(e,t)}function nV(e){return function(){this.removeAttribute(e)}}function rV(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iV(e,t,n){var r,i=n+"",o;return function(){var l=this.getAttribute(e);return l===i?null:l===r?o:o=t(r=l,n)}}function aV(e,t,n){var r,i=n+"",o;return function(){var l=this.getAttributeNS(e.space,e.local);return l===i?null:l===r?o:o=t(r=l,n)}}function oV(e,t,n){var r,i,o;return function(){var l,c=n(this),f;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),f=c+"",l===f?null:l===r&&f===i?o:(i=f,o=t(r=l,c)))}}function sV(e,t,n){var r,i,o;return function(){var l,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),f=c+"",l===f?null:l===r&&f===i?o:(i=f,o=t(r=l,c)))}}function lV(e,t){var n=Ay(e),r=n==="transform"?BH:V4;return this.attrTween(e,typeof t=="function"?(n.local?sV:oV)(n,r,C_(this,"attr."+e,t)):t==null?(n.local?rV:nV)(n):(n.local?aV:iV)(n,r,t))}function uV(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function cV(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function fV(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&cV(e,o)),n}return i._value=t,i}function dV(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&uV(e,o)),n}return i._value=t,i}function hV(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=Ay(e);return this.tween(n,(r.local?fV:dV)(r,t))}function pV(e,t){return function(){T_(this,e).delay=+t.apply(this,arguments)}}function yV(e,t){return t=+t,function(){T_(this,e).delay=t}}function mV(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?pV:yV)(t,e)):Tr(this.node(),t).delay}function gV(e,t){return function(){Kr(this,e).duration=+t.apply(this,arguments)}}function vV(e,t){return t=+t,function(){Kr(this,e).duration=t}}function bV(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?gV:vV)(t,e)):Tr(this.node(),t).duration}function xV(e,t){if(typeof t!="function")throw new Error;return function(){Kr(this,e).ease=t}}function wV(e){var t=this._id;return arguments.length?this.each(xV(t,e)):Tr(this.node(),t).ease}function SV(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Kr(this,e).ease=n}}function _V(e){if(typeof e!="function")throw new Error;return this.each(SV(this._id,e))}function AV(e){typeof e!="function"&&(e=w4(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],l=o.length,c=r[i]=[],f,d=0;d<l;++d)(f=o[d])&&e.call(f,f.__data__,d,o)&&c.push(f);return new Di(r,this._parents,this._name,this._id)}function OV(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),l=new Array(r),c=0;c<o;++c)for(var f=t[c],d=n[c],y=f.length,p=l[c]=new Array(y),g,b=0;b<y;++b)(g=f[b]||d[b])&&(p[b]=g);for(;c<r;++c)l[c]=t[c];return new Di(l,this._parents,this._name,this._id)}function jV(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 EV(e,t,n){var r,i,o=jV(t)?T_:Kr;return function(){var l=o(this,e),c=l.on;c!==r&&(i=(r=c).copy()).on(t,n),l.on=i}}function NV(e,t){var n=this._id;return arguments.length<2?Tr(this.node(),n).on.on(e):this.each(EV(n,e,t))}function TV(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function CV(){return this.on("end.remove",TV(this._id))}function MV(e){var t=this._name,n=this._id;typeof e!="function"&&(e=__(e));for(var r=this._groups,i=r.length,o=new Array(i),l=0;l<i;++l)for(var c=r[l],f=c.length,d=o[l]=new Array(f),y,p,g=0;g<f;++g)(y=c[g])&&(p=e.call(y,y.__data__,g,c))&&("__data__"in y&&(p.__data__=y.__data__),d[g]=p,jy(d[g],t,n,g,d,Tr(y,n)));return new Di(o,this._parents,t,n)}function kV(e){var t=this._name,n=this._id;typeof e!="function"&&(e=x4(e));for(var r=this._groups,i=r.length,o=[],l=[],c=0;c<i;++c)for(var f=r[c],d=f.length,y,p=0;p<d;++p)if(y=f[p]){for(var g=e.call(y,y.__data__,p,f),b,_=Tr(y,n),S=0,x=g.length;S<x;++S)(b=g[S])&&jy(b,t,n,S,g,_);o.push(g),l.push(y)}return new Di(o,l,t,n)}var RV=Lf.prototype.constructor;function PV(){return new RV(this._groups,this._parents)}function DV(e,t){var n,r,i;return function(){var o=xl(this,e),l=(this.style.removeProperty(e),xl(this,e));return o===l?null:o===n&&l===r?i:i=t(n=o,r=l)}}function G4(e){return function(){this.style.removeProperty(e)}}function $V(e,t,n){var r,i=n+"",o;return function(){var l=xl(this,e);return l===i?null:l===r?o:o=t(r=l,n)}}function qV(e,t,n){var r,i,o;return function(){var l=xl(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),xl(this,e))),l===f?null:l===r&&f===i?o:(i=f,o=t(r=l,c))}}function LV(e,t){var n,r,i,o="style."+t,l="end."+o,c;return function(){var f=Kr(this,e),d=f.on,y=f.value[o]==null?c||(c=G4(t)):void 0;(d!==n||i!==y)&&(r=(n=d).copy()).on(l,i=y),f.on=r}}function zV(e,t,n){var r=(e+="")=="transform"?zH:V4;return t==null?this.styleTween(e,DV(e,r)).on("end.style."+e,G4(e)):typeof t=="function"?this.styleTween(e,qV(e,r,C_(this,"style."+e,t))).each(LV(this._id,e)):this.styleTween(e,$V(e,r,t),n).on("end.style."+e,null)}function BV(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function IV(e,t,n){var r,i;function o(){var l=t.apply(this,arguments);return l!==i&&(r=(i=l)&&BV(e,l,n)),r}return o._value=t,o}function UV(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,IV(e,t,n??""))}function HV(e){return function(){this.textContent=e}}function VV(e){return function(){var t=e(this);this.textContent=t??""}}function GV(e){return this.tween("text",typeof e=="function"?VV(C_(this,"text",e)):HV(e==null?"":e+""))}function FV(e){return function(t){this.textContent=e.call(this,t)}}function YV(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&FV(i)),t}return r._value=e,r}function XV(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,YV(e))}function KV(){for(var e=this._name,t=this._id,n=F4(),r=this._groups,i=r.length,o=0;o<i;++o)for(var l=r[o],c=l.length,f,d=0;d<c;++d)if(f=l[d]){var y=Tr(f,t);jy(f,e,n,d,l,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new Di(r,this._parents,e,n)}function WV(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,l){var c={value:l},f={value:function(){--i===0&&o()}};n.each(function(){var d=Kr(this,r),y=d.on;y!==e&&(t=(e=y).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(f)),d.on=t}),i===0&&o()})}var QV=0;function Di(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function F4(){return++QV}var Si=Lf.prototype;Di.prototype={constructor:Di,select:MV,selectAll:kV,selectChild:Si.selectChild,selectChildren:Si.selectChildren,filter:AV,merge:OV,selection:PV,transition:KV,call:Si.call,nodes:Si.nodes,node:Si.node,size:Si.size,empty:Si.empty,each:Si.each,on:NV,attr:lV,attrTween:hV,style:zV,styleTween:UV,text:GV,textTween:XV,remove:CV,tween:tV,delay:mV,duration:bV,ease:wV,easeVarying:_V,end:WV,[Symbol.iterator]:Si[Symbol.iterator]};function ZV(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var JV={time:null,delay:0,duration:250,ease:ZV};function eG(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 tG(e){var t,n;e instanceof Di?(t=e._id,e=e._name):(t=F4(),(n=JV).time=N_(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var l=r[o],c=l.length,f,d=0;d<c;++d)(f=l[d])&&jy(f,e,t,d,l,n||eG(f,t));return new Di(r,this._parents,e,t)}Lf.prototype.interrupt=ZH;Lf.prototype.transition=tG;const Mh=e=>()=>e;function nG(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Ni(e,t,n){this.k=e,this.x=t,this.y=n}Ni.prototype={constructor:Ni,scale:function(e){return e===1?this:new Ni(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ni(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 Ey=new Ni(1,0,0);Y4.prototype=Ni.prototype;function Y4(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ey;return e.__zoom}function tv(e){e.stopImmediatePropagation()}function hc(e){e.preventDefault(),e.stopImmediatePropagation()}function rG(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function iG(){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 CN(){return this.__zoom||Ey}function aG(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function oG(){return navigator.maxTouchPoints||"ontouchstart"in this}function sG(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),l>o?(o+l)/2:Math.min(0,o)||Math.max(0,l))}function X4(){var e=rG,t=iG,n=sG,r=aG,i=oG,o=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,f=np,d=_y("start","zoom","end"),y,p,g,b=500,_=150,S=0,x=10;function A(R){R.property("__zoom",CN).on("wheel.zoom",D,{passive:!1}).on("mousedown.zoom",q).on("dblclick.zoom",F).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(R,$,k,I){var H=R.selection?R.selection():R;H.property("__zoom",CN),R!==H?E(R,$,k,I):H.interrupt().each(function(){T(this,arguments).event(I).start().zoom(null,typeof $=="function"?$.apply(this,arguments):$).end()})},A.scaleBy=function(R,$,k,I){A.scaleTo(R,function(){var H=this.__zoom.k,V=typeof $=="function"?$.apply(this,arguments):$;return H*V},k,I)},A.scaleTo=function(R,$,k,I){A.transform(R,function(){var H=t.apply(this,arguments),V=this.__zoom,K=k==null?N(H):typeof k=="function"?k.apply(this,arguments):k,z=V.invert(K),G=typeof $=="function"?$.apply(this,arguments):$;return n(O(j(V,G),K,z),H,l)},k,I)},A.translateBy=function(R,$,k,I){A.transform(R,function(){return n(this.__zoom.translate(typeof $=="function"?$.apply(this,arguments):$,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),l)},null,I)},A.translateTo=function(R,$,k,I,H){A.transform(R,function(){var V=t.apply(this,arguments),K=this.__zoom,z=I==null?N(V):typeof I=="function"?I.apply(this,arguments):I;return n(Ey.translate(z[0],z[1]).scale(K.k).translate(typeof $=="function"?-$.apply(this,arguments):-$,typeof k=="function"?-k.apply(this,arguments):-k),V,l)},I,H)};function j(R,$){return $=Math.max(o[0],Math.min(o[1],$)),$===R.k?R:new Ni($,R.x,R.y)}function O(R,$,k){var I=$[0]-k[0]*R.k,H=$[1]-k[1]*R.k;return I===R.x&&H===R.y?R:new Ni(R.k,I,H)}function N(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function E(R,$,k,I){R.on("start.zoom",function(){T(this,arguments).event(I).start()}).on("interrupt.zoom end.zoom",function(){T(this,arguments).event(I).end()}).tween("zoom",function(){var H=this,V=arguments,K=T(H,V).event(I),z=t.apply(H,V),G=k==null?N(z):typeof k=="function"?k.apply(H,V):k,Z=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),ee=H.__zoom,fe=typeof $=="function"?$.apply(H,V):$,pe=f(ee.invert(G).concat(Z/ee.k),fe.invert(G).concat(Z/fe.k));return function(ye){if(ye===1)ye=fe;else{var he=pe(ye),ae=Z/he[2];ye=new Ni(ae,G[0]-he[0]*ae,G[1]-he[1]*ae)}K.zoom(null,ye)}})}function T(R,$,k){return!k&&R.__zooming||new C(R,$)}function C(R,$){this.that=R,this.args=$,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,$),this.taps=0}C.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,$){return this.mouse&&R!=="mouse"&&(this.mouse[1]=$.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=$.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=$.invert(this.touch1[0])),this.that.__zoom=$,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var $=Un(this.that).datum();d.call(R,this.that,new nG(R,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:d}),$)}};function D(R,...$){if(!e.apply(this,arguments))return;var k=T(this,$).event(R),I=this.__zoom,H=Math.max(o[0],Math.min(o[1],I.k*Math.pow(2,r.apply(this,arguments)))),V=wr(R);if(k.wheel)(k.mouse[0][0]!==V[0]||k.mouse[0][1]!==V[1])&&(k.mouse[1]=I.invert(k.mouse[0]=V)),clearTimeout(k.wheel);else{if(I.k===H)return;k.mouse=[V,I.invert(V)],ap(this),k.start()}hc(R),k.wheel=setTimeout(K,_),k.zoom("mouse",n(O(j(I,H),k.mouse[0],k.mouse[1]),k.extent,l));function K(){k.wheel=null,k.end()}}function q(R,...$){if(g||!e.apply(this,arguments))return;var k=R.currentTarget,I=T(this,$,!0).event(R),H=Un(R.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",Z,!0),V=wr(R,k),K=R.clientX,z=R.clientY;M4(R.view),tv(R),I.mouse=[V,this.__zoom.invert(V)],ap(this),I.start();function G(ee){if(hc(ee),!I.moved){var fe=ee.clientX-K,pe=ee.clientY-z;I.moved=fe*fe+pe*pe>S}I.event(ee).zoom("mouse",n(O(I.that.__zoom,I.mouse[0]=wr(ee,k),I.mouse[1]),I.extent,l))}function Z(ee){H.on("mousemove.zoom mouseup.zoom",null),k4(ee.view,I.moved),hc(ee),I.event(ee).end()}}function F(R,...$){if(e.apply(this,arguments)){var k=this.__zoom,I=wr(R.changedTouches?R.changedTouches[0]:R,this),H=k.invert(I),V=k.k*(R.shiftKey?.5:2),K=n(O(j(k,V),I,H),t.apply(this,$),l);hc(R),c>0?Un(this).transition().duration(c).call(E,K,I,R):Un(this).call(A.transform,K,I,R)}}function L(R,...$){if(e.apply(this,arguments)){var k=R.touches,I=k.length,H=T(this,$,R.changedTouches.length===I).event(R),V,K,z,G;for(tv(R),K=0;K<I;++K)z=k[K],G=wr(z,this),G=[G,this.__zoom.invert(G),z.identifier],H.touch0?!H.touch1&&H.touch0[2]!==G[2]&&(H.touch1=G,H.taps=0):(H.touch0=G,V=!0,H.taps=1+!!y);y&&(y=clearTimeout(y)),V&&(H.taps<2&&(p=G[0],y=setTimeout(function(){y=null},b)),ap(this),H.start())}}function P(R,...$){if(this.__zooming){var k=T(this,$).event(R),I=R.changedTouches,H=I.length,V,K,z,G;for(hc(R),V=0;V<H;++V)K=I[V],z=wr(K,this),k.touch0&&k.touch0[2]===K.identifier?k.touch0[0]=z:k.touch1&&k.touch1[2]===K.identifier&&(k.touch1[0]=z);if(K=k.that.__zoom,k.touch1){var Z=k.touch0[0],ee=k.touch0[1],fe=k.touch1[0],pe=k.touch1[1],ye=(ye=fe[0]-Z[0])*ye+(ye=fe[1]-Z[1])*ye,he=(he=pe[0]-ee[0])*he+(he=pe[1]-ee[1])*he;K=j(K,Math.sqrt(ye/he)),z=[(Z[0]+fe[0])/2,(Z[1]+fe[1])/2],G=[(ee[0]+pe[0])/2,(ee[1]+pe[1])/2]}else if(k.touch0)z=k.touch0[0],G=k.touch0[1];else return;k.zoom("touch",n(O(K,z,G),k.extent,l))}}function Y(R,...$){if(this.__zooming){var k=T(this,$).event(R),I=R.changedTouches,H=I.length,V,K;for(tv(R),g&&clearTimeout(g),g=setTimeout(function(){g=null},b),V=0;V<H;++V)K=I[V],k.touch0&&k.touch0[2]===K.identifier?delete k.touch0:k.touch1&&k.touch1[2]===K.identifier&&delete k.touch1;if(k.touch1&&!k.touch0&&(k.touch0=k.touch1,delete k.touch1),k.touch0)k.touch0[1]=this.__zoom.invert(k.touch0[0]);else if(k.end(),k.taps===2&&(K=wr(K,this),Math.hypot(p[0]-K[0],p[1]-K[1])<x)){var z=Un(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return A.wheelDelta=function(R){return arguments.length?(r=typeof R=="function"?R:Mh(+R),A):r},A.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Mh(!!R),A):e},A.touchable=function(R){return arguments.length?(i=typeof R=="function"?R:Mh(!!R),A):i},A.extent=function(R){return arguments.length?(t=typeof R=="function"?R:Mh([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),A):t},A.scaleExtent=function(R){return arguments.length?(o[0]=+R[0],o[1]=+R[1],A):[o[0],o[1]]},A.translateExtent=function(R){return arguments.length?(l[0][0]=+R[0][0],l[1][0]=+R[1][0],l[0][1]=+R[0][1],l[1][1]=+R[1][1],A):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},A.constrain=function(R){return arguments.length?(n=R,A):n},A.duration=function(R){return arguments.length?(c=+R,A):c},A.interpolate=function(R){return arguments.length?(f=R,A):f},A.on=function(){var R=d.on.apply(d,arguments);return R===d?A:R},A.clickDistance=function(R){return arguments.length?(S=(R=+R)*R,A):Math.sqrt(S)},A.tapDistance=function(R){return arguments.length?(x=+R,A):x},A}const Fr={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."},Gc=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],K4=["Enter"," ","Escape"],W4={"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 Sl;(function(e){e.Strict="strict",e.Loose="loose"})(Sl||(Sl={}));var Lo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Lo||(Lo={}));var Fc;(function(e){e.Partial="partial",e.Full="full"})(Fc||(Fc={}));const Q4={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Ma;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Ma||(Ma={}));var _l;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(_l||(_l={}));var je;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(je||(je={}));const MN={[je.Left]:je.Right,[je.Right]:je.Left,[je.Top]:je.Bottom,[je.Bottom]:je.Top};function Z4(e){return e===null?null:e?"valid":"invalid"}const J4=e=>"id"in e&&"source"in e&&"target"in e,lG=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),M_=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Bf=(e,t=[0,0])=>{const{width:n,height:r}=Ii(e),i=e.origin??t,o=n*i[0],l=r*i[1];return{x:e.position.x-o,y:e.position.y-l}},uG=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const o=typeof i=="string";let l=!t.nodeLookup&&!o?i:void 0;t.nodeLookup&&(l=o?t.nodeLookup.get(i):M_(i)?i:t.nodeLookup.get(i.id));const c=l?xp(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ny(r,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ty(n)},If=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Ny(n,xp(i)),r=!0)}),r?Ty(n):{x:0,y:0,width:0,height:0}},k_=(e,t,[n,r,i]=[0,0,1],o=!1,l=!1)=>{const c={...Hf(t,[n,r,i]),width:t.width/i,height:t.height/i},f=[];for(const d of e.values()){const{measured:y,selectable:p=!0,hidden:g=!1}=d;if(l&&!p||g)continue;const b=y.width??d.width??d.initialWidth??null,_=y.height??d.height??d.initialHeight??null,S=Yc(c,Ol(d)),x=(b??0)*(_??0),A=o&&S>0;(!d.internals.handleBounds||A||S>=x||d.dragging)&&f.push(d)}return f},cG=(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 fG(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function dG({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:o},l){if(e.size===0)return Promise.resolve(!0);const c=fG(e,l),f=If(c),d=R_(f,t,n,(l==null?void 0:l.minZoom)??i,(l==null?void 0:l.maxZoom)??o,(l==null?void 0:l.padding)??.1);return await r.setViewport(d,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),Promise.resolve(!0)}function eD({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){const l=n.get(e),c=l.parentId?n.get(l.parentId):void 0,{x:f,y:d}=c?c.internals.positionAbsolute:{x:0,y:0},y=l.origin??r;let p=l.extent||i;if(l.extent==="parent"&&!l.expandParent)if(!c)o==null||o("005",Fr.error005());else{const b=c.measured.width,_=c.measured.height;b&&_&&(p=[[f,d],[f+b,d+_]])}else c&&jl(l.extent)&&(p=[[l.extent[0][0]+f,l.extent[0][1]+d],[l.extent[1][0]+f,l.extent[1][1]+d]]);const g=jl(p)?Ho(t,p,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(o==null||o("015",Fr.error015())),{position:{x:g.x-f+(l.measured.width??0)*y[0],y:g.y-d+(l.measured.height??0)*y[1]},positionAbsolute:g}}async function hG({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const o=new Set(e.map(g=>g.id)),l=[];for(const g of n){if(g.deletable===!1)continue;const b=o.has(g.id),_=!b&&g.parentId&&l.find(S=>S.id===g.parentId);(b||_)&&l.push(g)}const c=new Set(t.map(g=>g.id)),f=r.filter(g=>g.deletable!==!1),y=cG(l,f);for(const g of f)c.has(g.id)&&!y.find(_=>_.id===g.id)&&y.push(g);if(!i)return{edges:y,nodes:l};const p=await i({nodes:l,edges:y});return typeof p=="boolean"?p?{edges:y,nodes:l}:{edges:[],nodes:[]}:p}const Al=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Ho=(e={x:0,y:0},t,n)=>({x:Al(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Al(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function tD(e,t,n){const{width:r,height:i}=Ii(n),{x:o,y:l}=n.internals.positionAbsolute;return Ho(e,[[o,l],[o+r,l+i]],t)}const kN=(e,t,n)=>e<t?Al(Math.abs(e-t),1,t)/t:e>n?-Al(Math.abs(e-n),1,t)/t:0,nD=(e,t,n=15,r=40)=>{const i=kN(e.x,r,t.width-r)*n,o=kN(e.y,r,t.height-r)*n;return[i,o]},Ny=(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)}),Mw=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Ty=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Ol=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=M_(e)?e.internals.positionAbsolute:Bf(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0}},xp=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=M_(e)?e.internals.positionAbsolute:Bf(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((o=e.measured)==null?void 0:o.height)??e.height??e.initialHeight??0)}},rD=(e,t)=>Ty(Ny(Mw(e),Mw(t))),Yc=(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)},RN=e=>jr(e.width)&&jr(e.height)&&jr(e.x)&&jr(e.y),jr=e=>!isNaN(e)&&isFinite(e),pG=(e,t)=>{},Uf=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Hf=({x:e,y:t},[n,r,i],o=!1,l=[1,1])=>{const c={x:(e-n)/i,y:(t-r)/i};return o?Uf(c,l):c},wp=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Vs(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 yG(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Vs(e,n),i=Vs(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=Vs(e.top??e.y??0,n),i=Vs(e.bottom??e.y??0,n),o=Vs(e.left??e.x??0,t),l=Vs(e.right??e.x??0,t);return{top:r,right:l,bottom:i,left:o,x:o+l,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function mG(e,t,n,r,i,o){const{x:l,y:c}=wp(e,[t,n,r]),{x:f,y:d}=wp({x:e.x+e.width,y:e.y+e.height},[t,n,r]),y=i-f,p=o-d;return{left:Math.floor(l),top:Math.floor(c),right:Math.floor(y),bottom:Math.floor(p)}}const R_=(e,t,n,r,i,o)=>{const l=yG(o,t,n),c=(t-l.x)/e.width,f=(n-l.y)/e.height,d=Math.min(c,f),y=Al(d,r,i),p=e.x+e.width/2,g=e.y+e.height/2,b=t/2-p*y,_=n/2-g*y,S=mG(e,b,_,y,t,n),x={left:Math.min(S.left-l.left,0),top:Math.min(S.top-l.top,0),right:Math.min(S.right-l.right,0),bottom:Math.min(S.bottom-l.bottom,0)};return{x:b-x.left+x.right,y:_-x.top+x.bottom,zoom:y}},Xc=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function jl(e){return e!=null&&e!=="parent"}function Ii(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 iD(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 aD(e,t={width:0,height:0},n,r,i){const o={...e},l=r.get(n);if(l){const c=l.origin||i;o.x+=l.internals.positionAbsolute.x-(t.width??0)*c[0],o.y+=l.internals.positionAbsolute.y-(t.height??0)*c[1]}return o}function PN(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function gG(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function vG(e){return{...W4,...e||{}}}function Cc(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:o,y:l}=Er(e),c=Hf({x:o-((i==null?void 0:i.left)??0),y:l-((i==null?void 0:i.top)??0)},r),{x:f,y:d}=n?Uf(c,t):c;return{xSnapped:f,ySnapped:d,...c}}const P_=e=>({width:e.offsetWidth,height:e.offsetHeight}),oD=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},bG=["INPUT","SELECT","TEXTAREA"];function sD(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:bG.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const lD=e=>"clientX"in e,Er=(e,t)=>{var o,l;const n=lD(e),r=n?e.clientX:(o=e.touches)==null?void 0:o[0].clientX,i=n?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},DN=(e,t,n,r,i)=>{const o=t.querySelectorAll(`.${e}`);return!o||!o.length?null:Array.from(o).map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:i,position:l.getAttribute("data-handlepos"),x:(c.left-n.left)/r,y:(c.top-n.top)/r,...P_(l)}})};function uD({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:l,targetControlY:c}){const f=e*.125+i*.375+l*.375+n*.125,d=t*.125+o*.375+c*.375+r*.125,y=Math.abs(f-e),p=Math.abs(d-t);return[f,d,y,p]}function kh(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function $N({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case je.Left:return[t-kh(t-r,o),n];case je.Right:return[t+kh(r-t,o),n];case je.Top:return[t,n-kh(n-i,o)];case je.Bottom:return[t,n+kh(i-n,o)]}}function cD({sourceX:e,sourceY:t,sourcePosition:n=je.Bottom,targetX:r,targetY:i,targetPosition:o=je.Top,curvature:l=.25}){const[c,f]=$N({pos:n,x1:e,y1:t,x2:r,y2:i,c:l}),[d,y]=$N({pos:o,x1:r,y1:i,x2:e,y2:t,c:l}),[p,g,b,_]=uD({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:c,sourceControlY:f,targetControlX:d,targetControlY:y});return[`M${e},${t} C${c},${f} ${d},${y} ${r},${i}`,p,g,b,_]}function fD({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,o=n<e?n+i:n-i,l=Math.abs(r-t)/2,c=r<t?r+l:r-l;return[o,c,i,l]}function xG({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:o="basic"}){if(o==="manual")return r;const l=i&&n?r+1e3:r,c=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return l+c}function wG({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const o=Ny(xp(e),xp(t));o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const l={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return Yc(l,Ty(o))>0}const SG=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,_G=(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)),AG=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||SG;let i;return J4(e)?i={...e}:i={...e,id:r(e)},_G(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function dD({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,l,c]=fD({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,l,c]}const qN={[je.Left]:{x:-1,y:0},[je.Right]:{x:1,y:0},[je.Top]:{x:0,y:-1},[je.Bottom]:{x:0,y:1}},OG=({source:e,sourcePosition:t=je.Bottom,target:n})=>t===je.Left||t===je.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},LN=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function jG({source:e,sourcePosition:t=je.Bottom,target:n,targetPosition:r=je.Top,center:i,offset:o,stepPosition:l}){const c=qN[t],f=qN[r],d={x:e.x+c.x*o,y:e.y+c.y*o},y={x:n.x+f.x*o,y:n.y+f.y*o},p=OG({source:d,sourcePosition:t,target:y}),g=p.x!==0?"x":"y",b=p[g];let _=[],S,x;const A={x:0,y:0},j={x:0,y:0},[,,O,N]=fD({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(c[g]*f[g]===-1){g==="x"?(S=i.x??d.x+(y.x-d.x)*l,x=i.y??(d.y+y.y)/2):(S=i.x??(d.x+y.x)/2,x=i.y??d.y+(y.y-d.y)*l);const T=[{x:S,y:d.y},{x:S,y:y.y}],C=[{x:d.x,y:x},{x:y.x,y:x}];c[g]===b?_=g==="x"?T:C:_=g==="x"?C:T}else{const T=[{x:d.x,y:y.y}],C=[{x:y.x,y:d.y}];if(g==="x"?_=c.x===b?C:T:_=c.y===b?T:C,t===r){const P=Math.abs(e[g]-n[g]);if(P<=o){const Y=Math.min(o-1,o-P);c[g]===b?A[g]=(d[g]>e[g]?-1:1)*Y:j[g]=(y[g]>n[g]?-1:1)*Y}}if(t!==r){const P=g==="x"?"y":"x",Y=c[g]===f[P],R=d[P]>y[P],$=d[P]<y[P];(c[g]===1&&(!Y&&R||Y&&$)||c[g]!==1&&(!Y&&$||Y&&R))&&(_=g==="x"?T:C)}const D={x:d.x+A.x,y:d.y+A.y},q={x:y.x+j.x,y:y.y+j.y},F=Math.max(Math.abs(D.x-_[0].x),Math.abs(q.x-_[0].x)),L=Math.max(Math.abs(D.y-_[0].y),Math.abs(q.y-_[0].y));F>=L?(S=(D.x+q.x)/2,x=_[0].y):(S=_[0].x,x=(D.y+q.y)/2)}return[[e,{x:d.x+A.x,y:d.y+A.y},..._,{x:y.x+j.x,y:y.y+j.y},n],S,x,O,N]}function EG(e,t,n,r){const i=Math.min(LN(e,t)/2,LN(t,n)/2,r),{x:o,y:l}=t;if(e.x===o&&o===n.x||e.y===l&&l===n.y)return`L${o} ${l}`;if(e.y===l){const d=e.x<n.x?-1:1,y=e.y<n.y?1:-1;return`L ${o+i*d},${l}Q ${o},${l} ${o},${l+i*y}`}const c=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${o},${l+i*f}Q ${o},${l} ${o+i*c},${l}`}function kw({sourceX:e,sourceY:t,sourcePosition:n=je.Bottom,targetX:r,targetY:i,targetPosition:o=je.Top,borderRadius:l=5,centerX:c,centerY:f,offset:d=20,stepPosition:y=.5}){const[p,g,b,_,S]=jG({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:c,y:f},offset:d,stepPosition:y});return[p.reduce((A,j,O)=>{let N="";return O>0&&O<p.length-1?N=EG(p[O-1],j,p[O+1],l):N=`${O===0?"M":"L"}${j.x} ${j.y}`,A+=N,A},""),g,b,_,S]}function zN(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function NG(e){var p;const{sourceNode:t,targetNode:n}=e;if(!zN(t)||!zN(n))return null;const r=t.internals.handleBounds||BN(t.handles),i=n.internals.handleBounds||BN(n.handles),o=IN((r==null?void 0:r.source)??[],e.sourceHandle),l=IN(e.connectionMode===Sl.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!o||!l)return(p=e.onError)==null||p.call(e,"008",Fr.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(o==null?void 0:o.position)||je.Bottom,f=(l==null?void 0:l.position)||je.Top,d=Vo(t,o,c),y=Vo(n,l,f);return{sourceX:d.x,sourceY:d.y,targetX:y.x,targetY:y.y,sourcePosition:c,targetPosition:f}}function BN(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 Vo(e,t,n=je.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,o=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:l,height:c}=t??Ii(e);if(r)return{x:i+l/2,y:o+c/2};switch((t==null?void 0:t.position)??n){case je.Top:return{x:i+l/2,y:o};case je.Right:return{x:i+l,y:o+c/2};case je.Bottom:return{x:i+l/2,y:o+c};case je.Left:return{x:i,y:o+c/2}}}function IN(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Rw(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function TG(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const o=new Set;return e.reduce((l,c)=>([c.markerStart||r,c.markerEnd||i].forEach(f=>{if(f&&typeof f=="object"){const d=Rw(f,t);o.has(d)||(l.push({id:d,color:f.color||n,...f}),o.add(d))}}),l),[]).sort((l,c)=>l.id.localeCompare(c.id))}const hD=1e3,CG=10,D_={nodeOrigin:[0,0],nodeExtent:Gc,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},MG={...D_,checkEquality:!0};function $_(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function kG(e,t,n){const r=$_(D_,n);for(const i of e.values())if(i.parentId)L_(i,e,t,r);else{const o=Bf(i,r.nodeOrigin),l=jl(i.extent)?i.extent:r.nodeExtent,c=Ho(o,l,Ii(i));i.internals.positionAbsolute=c}}function RG(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const o={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(o):i.type==="target"&&r.push(o)}return{source:n,target:r}}function q_(e){return e==="manual"}function Pw(e,t,n,r={}){var d,y;const i=$_(MG,r),o={i:0},l=new Map(t),c=i!=null&&i.elevateNodesOnSelect&&!q_(i.zIndexMode)?hD:0;let f=e.length>0;t.clear(),n.clear();for(const p of e){let g=l.get(p.id);if(i.checkEquality&&p===(g==null?void 0:g.internals.userNode))t.set(p.id,g);else{const b=Bf(p,i.nodeOrigin),_=jl(p.extent)?p.extent:i.nodeExtent,S=Ho(b,_,Ii(p));g={...i.defaults,...p,measured:{width:(d=p.measured)==null?void 0:d.width,height:(y=p.measured)==null?void 0:y.height},internals:{positionAbsolute:S,handleBounds:RG(p,g),z:pD(p,c,i.zIndexMode),userNode:p}},t.set(p.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(f=!1),p.parentId&&L_(g,t,n,r,o)}return f}function PG(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 L_(e,t,n,r,i){const{elevateNodesOnSelect:o,nodeOrigin:l,nodeExtent:c,zIndexMode:f}=$_(D_,r),d=e.parentId,y=t.get(d);if(!y){console.warn(`Parent node ${d} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}PG(e,n),i&&!y.parentId&&y.internals.rootParentIndex===void 0&&f==="auto"&&(y.internals.rootParentIndex=++i.i,y.internals.z=y.internals.z+i.i*CG),i&&y.internals.rootParentIndex!==void 0&&(i.i=y.internals.rootParentIndex);const p=o&&!q_(f)?hD:0,{x:g,y:b,z:_}=DG(e,y,l,c,p,f),{positionAbsolute:S}=e.internals,x=g!==S.x||b!==S.y;(x||_!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:g,y:b}:S,z:_}})}function pD(e,t,n){const r=jr(e.zIndex)?e.zIndex:0;return q_(n)?r:r+(e.selected?t:0)}function DG(e,t,n,r,i,o){const{x:l,y:c}=t.internals.positionAbsolute,f=Ii(e),d=Bf(e,n),y=jl(e.extent)?Ho(d,e.extent,f):d;let p=Ho({x:l+y.x,y:c+y.y},r,f);e.extent==="parent"&&(p=tD(p,f,t));const g=pD(e,i,o),b=t.internals.z??0;return{x:p.x,y:p.y,z:b>=g?b+1:g}}function z_(e,t,n,r=[0,0]){var l;const i=[],o=new Map;for(const c of e){const f=t.get(c.parentId);if(!f)continue;const d=((l=o.get(c.parentId))==null?void 0:l.expandedRect)??Ol(f),y=rD(d,c.rect);o.set(c.parentId,{expandedRect:y,parent:f})}return o.size>0&&o.forEach(({expandedRect:c,parent:f},d)=>{var O;const y=f.internals.positionAbsolute,p=Ii(f),g=f.origin??r,b=c.x<y.x?Math.round(Math.abs(y.x-c.x)):0,_=c.y<y.y?Math.round(Math.abs(y.y-c.y)):0,S=Math.max(p.width,Math.round(c.width)),x=Math.max(p.height,Math.round(c.height)),A=(S-p.width)*g[0],j=(x-p.height)*g[1];(b>0||_>0||A||j)&&(i.push({id:d,type:"position",position:{x:f.position.x-b+A,y:f.position.y-_+j}}),(O=n.get(d))==null||O.forEach(N=>{e.some(E=>E.id===N.id)||i.push({id:N.id,type:"position",position:{x:N.position.x+b,y:N.position.y+_}})})),(p.width<c.width||p.height<c.height||b||_)&&i.push({id:d,type:"dimensions",setAttributes:!0,dimensions:{width:S+(b?g[0]*b-A:0),height:x+(_?g[1]*_-j:0)}})}),i}function $G(e,t,n,r,i,o,l){const c=r==null?void 0:r.querySelector(".xyflow__viewport");let f=!1;if(!c)return{changes:[],updatedInternals:f};const d=[],y=window.getComputedStyle(c),{m22:p}=new window.DOMMatrixReadOnly(y.transform),g=[];for(const b of e.values()){const _=t.get(b.id);if(!_)continue;if(_.hidden){t.set(_.id,{..._,internals:{..._.internals,handleBounds:void 0}}),f=!0;continue}const S=P_(b.nodeElement),x=_.measured.width!==S.width||_.measured.height!==S.height;if(!!(S.width&&S.height&&(x||!_.internals.handleBounds||b.force))){const j=b.nodeElement.getBoundingClientRect(),O=jl(_.extent)?_.extent:o;let{positionAbsolute:N}=_.internals;_.parentId&&_.extent==="parent"?N=tD(N,S,t.get(_.parentId)):O&&(N=Ho(N,O,S));const E={..._,measured:S,internals:{..._.internals,positionAbsolute:N,handleBounds:{source:DN("source",b.nodeElement,j,p,_.id),target:DN("target",b.nodeElement,j,p,_.id)}}};t.set(_.id,E),_.parentId&&L_(E,t,n,{nodeOrigin:i,zIndexMode:l}),f=!0,x&&(d.push({id:_.id,type:"dimensions",dimensions:S}),_.expandParent&&_.parentId&&g.push({id:_.id,parentId:_.parentId,rect:Ol(E,i)}))}}if(g.length>0){const b=z_(g,t,n,i);d.push(...b)}return{changes:d,updatedInternals:f}}async function qG({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:o}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,o]],r),c=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(c)}function UN(e,t,n,r,i,o){let l=i;const c=r.get(l)||new Map;r.set(l,c.set(n,t)),l=`${i}-${e}`;const f=r.get(l)||new Map;if(r.set(l,f.set(n,t)),o){l=`${i}-${e}-${o}`;const d=r.get(l)||new Map;r.set(l,d.set(n,t))}}function yD(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:o,sourceHandle:l=null,targetHandle:c=null}=r,f={edgeId:r.id,source:i,target:o,sourceHandle:l,targetHandle:c},d=`${i}-${l}--${o}-${c}`,y=`${o}-${c}--${i}-${l}`;UN("source",f,y,e,i,l),UN("target",f,d,e,o,c),t.set(r.id,r)}}function mD(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:mD(n,t):!1}function HN(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function LG(e,t,n,r){const i=new Map;for(const[o,l]of e)if((l.selected||l.id===r)&&(!l.parentId||!mD(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const c=e.get(o);c&&i.set(o,{id:o,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 i}function nv({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var l,c,f;const i=[];for(const[d,y]of t){const p=(l=n.get(d))==null?void 0:l.internals.userNode;p&&i.push({...p,position:y.position,dragging:r})}if(!e)return[i[0],i];const o=(c=n.get(e))==null?void 0:c.internals.userNode;return[o?{...o,position:((f=t.get(e))==null?void 0:f.position)||o.position,dragging:r}:i[0],i]}function zG({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const o={x:n-i.distance.x,y:r-i.distance.y},l=Uf(o,t);return{x:l.x-o.x,y:l.y-o.y}}function BG({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},l=0,c=new Map,f=!1,d={x:0,y:0},y=null,p=!1,g=null,b=!1,_=!1,S=null;function x({noDragClassName:j,handleSelector:O,domNode:N,isSelectable:E,nodeId:T,nodeClickDistance:C=0}){g=Un(N);function D({x:P,y:Y}){const{nodeLookup:R,nodeExtent:$,snapGrid:k,snapToGrid:I,nodeOrigin:H,onNodeDrag:V,onSelectionDrag:K,onError:z,updateNodePositions:G}=t();o={x:P,y:Y};let Z=!1;const ee=c.size>1,fe=ee&&$?Mw(If(c)):null,pe=ee&&I?zG({dragItems:c,snapGrid:k,x:P,y:Y}):null;for(const[ye,he]of c){if(!R.has(ye))continue;let ae={x:P-he.distance.x,y:Y-he.distance.y};I&&(ae=pe?{x:Math.round(ae.x+pe.x),y:Math.round(ae.y+pe.y)}:Uf(ae,k));let ve=null;if(ee&&$&&!he.extent&&fe){const{positionAbsolute:xe}=he.internals,we=xe.x-fe.x+$[0][0],Me=xe.x+he.measured.width-fe.x2+$[1][0],Ee=xe.y-fe.y+$[0][1],Ke=xe.y+he.measured.height-fe.y2+$[1][1];ve=[[we,Ee],[Me,Ke]]}const{position:me,positionAbsolute:ie}=eD({nodeId:ye,nextPosition:ae,nodeLookup:R,nodeExtent:ve||$,nodeOrigin:H,onError:z});Z=Z||he.position.x!==me.x||he.position.y!==me.y,he.position=me,he.internals.positionAbsolute=ie}if(_=_||Z,!!Z&&(G(c,!0),S&&(r||V||!T&&K))){const[ye,he]=nv({nodeId:T,dragItems:c,nodeLookup:R});r==null||r(S,c,ye,he),V==null||V(S,ye,he),T||K==null||K(S,he)}}async function q(){if(!y)return;const{transform:P,panBy:Y,autoPanSpeed:R,autoPanOnNodeDrag:$}=t();if(!$){f=!1,cancelAnimationFrame(l);return}const[k,I]=nD(d,y,R);(k!==0||I!==0)&&(o.x=(o.x??0)-k/P[2],o.y=(o.y??0)-I/P[2],await Y({x:k,y:I})&&D(o)),l=requestAnimationFrame(q)}function F(P){var ee;const{nodeLookup:Y,multiSelectionActive:R,nodesDraggable:$,transform:k,snapGrid:I,snapToGrid:H,selectNodesOnDrag:V,onNodeDragStart:K,onSelectionDragStart:z,unselectNodesAndEdges:G}=t();p=!0,(!V||!E)&&!R&&T&&((ee=Y.get(T))!=null&&ee.selected||G()),E&&V&&T&&(e==null||e(T));const Z=Cc(P.sourceEvent,{transform:k,snapGrid:I,snapToGrid:H,containerBounds:y});if(o=Z,c=LG(Y,$,Z,T),c.size>0&&(n||K||!T&&z)){const[fe,pe]=nv({nodeId:T,dragItems:c,nodeLookup:Y});n==null||n(P.sourceEvent,c,fe,pe),K==null||K(P.sourceEvent,fe,pe),T||z==null||z(P.sourceEvent,pe)}}const L=R4().clickDistance(C).on("start",P=>{const{domNode:Y,nodeDragThreshold:R,transform:$,snapGrid:k,snapToGrid:I}=t();y=(Y==null?void 0:Y.getBoundingClientRect())||null,b=!1,_=!1,S=P.sourceEvent,R===0&&F(P),o=Cc(P.sourceEvent,{transform:$,snapGrid:k,snapToGrid:I,containerBounds:y}),d=Er(P.sourceEvent,y)}).on("drag",P=>{const{autoPanOnNodeDrag:Y,transform:R,snapGrid:$,snapToGrid:k,nodeDragThreshold:I,nodeLookup:H}=t(),V=Cc(P.sourceEvent,{transform:R,snapGrid:$,snapToGrid:k,containerBounds:y});if(S=P.sourceEvent,(P.sourceEvent.type==="touchmove"&&P.sourceEvent.touches.length>1||T&&!H.has(T))&&(b=!0),!b){if(!f&&Y&&p&&(f=!0,q()),!p){const K=Er(P.sourceEvent,y),z=K.x-d.x,G=K.y-d.y;Math.sqrt(z*z+G*G)>I&&F(P)}(o.x!==V.xSnapped||o.y!==V.ySnapped)&&c&&p&&(d=Er(P.sourceEvent,y),D(V))}}).on("end",P=>{if(!(!p||b)&&(f=!1,p=!1,cancelAnimationFrame(l),c.size>0)){const{nodeLookup:Y,updateNodePositions:R,onNodeDragStop:$,onSelectionDragStop:k}=t();if(_&&(R(c,!1),_=!1),i||$||!T&&k){const[I,H]=nv({nodeId:T,dragItems:c,nodeLookup:Y,dragging:!1});i==null||i(P.sourceEvent,c,I,H),$==null||$(P.sourceEvent,I,H),T||k==null||k(P.sourceEvent,H)}}}).filter(P=>{const Y=P.target;return!P.button&&(!j||!HN(Y,`.${j}`,N))&&(!O||HN(Y,O,N))});g.call(L)}function A(){g==null||g.on(".drag",null)}return{update:x,destroy:A}}function IG(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const o of t.values())Yc(i,Ol(o))>0&&r.push(o);return r}const UG=250;function HG(e,t,n,r){var c,f;let i=[],o=1/0;const l=IG(e,n,t+UG);for(const d of l){const y=[...((c=d.internals.handleBounds)==null?void 0:c.source)??[],...((f=d.internals.handleBounds)==null?void 0:f.target)??[]];for(const p of y){if(r.nodeId===p.nodeId&&r.type===p.type&&r.id===p.id)continue;const{x:g,y:b}=Vo(d,p,p.position,!0),_=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(b-e.y,2));_>t||(_<o?(i=[{...p,x:g,y:b}],o=_):_===o&&i.push({...p,x:g,y:b}))}}if(!i.length)return null;if(i.length>1){const d=r.type==="source"?"target":"source";return i.find(y=>y.type===d)??i[0]}return i[0]}function gD(e,t,n,r,i,o=!1){var d,y,p;const l=r.get(e);if(!l)return null;const c=i==="strict"?(d=l.internals.handleBounds)==null?void 0:d[t]:[...((y=l.internals.handleBounds)==null?void 0:y.source)??[],...((p=l.internals.handleBounds)==null?void 0:p.target)??[]],f=(n?c==null?void 0:c.find(g=>g.id===n):c==null?void 0:c[0])??null;return f&&o?{...f,...Vo(l,f,f.position,!0)}:f}function vD(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function VG(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const bD=()=>!0;function GG(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:l,domNode:c,nodeLookup:f,lib:d,autoPanOnConnect:y,flowId:p,panBy:g,cancelConnection:b,onConnectStart:_,onConnect:S,onConnectEnd:x,isValidConnection:A=bD,onReconnectEnd:j,updateConnection:O,getTransform:N,getFromHandle:E,autoPanSpeed:T,dragThreshold:C=1,handleDomNode:D}){const q=oD(e.target);let F=0,L;const{x:P,y:Y}=Er(e),R=vD(o,D),$=c==null?void 0:c.getBoundingClientRect();let k=!1;if(!$||!R)return;const I=gD(i,R,r,f,t);if(!I)return;let H=Er(e,$),V=!1,K=null,z=!1,G=null;function Z(){if(!y||!$)return;const[me,ie]=nD(H,$,T);g({x:me,y:ie}),F=requestAnimationFrame(Z)}const ee={...I,nodeId:i,type:R,position:I.position},fe=f.get(i);let ye={inProgress:!0,isValid:null,from:Vo(fe,ee,je.Left,!0),fromHandle:ee,fromPosition:ee.position,fromNode:fe,to:H,toHandle:null,toPosition:MN[ee.position],toNode:null,pointer:H};function he(){k=!0,O(ye),_==null||_(e,{nodeId:i,handleId:r,handleType:R})}C===0&&he();function ae(me){if(!k){const{x:Ke,y:Ct}=Er(me),Mt=Ke-P,sn=Ct-Y;if(!(Mt*Mt+sn*sn>C*C))return;he()}if(!E()||!ee){ve(me);return}const ie=N();H=Er(me,$),L=HG(Hf(H,ie,!1,[1,1]),n,f,ee),V||(Z(),V=!0);const xe=xD(me,{handle:L,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:l?"target":"source",isValidConnection:A,doc:q,lib:d,flowId:p,nodeLookup:f});G=xe.handleDomNode,K=xe.connection,z=VG(!!L,xe.isValid);const we=f.get(i),Me=we?Vo(we,ee,je.Left,!0):ye.from,Ee={...ye,from:Me,isValid:z,to:xe.toHandle&&z?wp({x:xe.toHandle.x,y:xe.toHandle.y},ie):H,toHandle:xe.toHandle,toPosition:z&&xe.toHandle?xe.toHandle.position:MN[ee.position],toNode:xe.toHandle?f.get(xe.toHandle.nodeId):null,pointer:H};O(Ee),ye=Ee}function ve(me){if(!("touches"in me&&me.touches.length>0)){if(k){(L||G)&&K&&z&&(S==null||S(K));const{inProgress:ie,...xe}=ye,we={...xe,toPosition:ye.toHandle?ye.toPosition:null};x==null||x(me,we),o&&(j==null||j(me,we))}b(),cancelAnimationFrame(F),V=!1,z=!1,K=null,G=null,q.removeEventListener("mousemove",ae),q.removeEventListener("mouseup",ve),q.removeEventListener("touchmove",ae),q.removeEventListener("touchend",ve)}}q.addEventListener("mousemove",ae),q.addEventListener("mouseup",ve),q.addEventListener("touchmove",ae),q.addEventListener("touchend",ve)}function xD(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:l,lib:c,flowId:f,isValidConnection:d=bD,nodeLookup:y}){const p=o==="target",g=t?l.querySelector(`.${c}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:b,y:_}=Er(e),S=l.elementFromPoint(b,_),x=S!=null&&S.classList.contains(`${c}-flow__handle`)?S:g,A={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const j=vD(void 0,x),O=x.getAttribute("data-nodeid"),N=x.getAttribute("data-handleid"),E=x.classList.contains("connectable"),T=x.classList.contains("connectableend");if(!O||!j)return A;const C={source:p?O:r,sourceHandle:p?N:i,target:p?r:O,targetHandle:p?i:N};A.connection=C;const q=E&&T&&(n===Sl.Strict?p&&j==="source"||!p&&j==="target":O!==r||N!==i);A.isValid=q&&d(C),A.toHandle=gD(O,j,N,y,n,!0)}return A}const Dw={onPointerDown:GG,isValid:xD};function FG({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Un(e);function o({translateExtent:c,width:f,height:d,zoomStep:y=1,pannable:p=!0,zoomable:g=!0,inversePan:b=!1}){const _=O=>{if(O.sourceEvent.type!=="wheel"||!t)return;const N=n(),E=O.sourceEvent.ctrlKey&&Xc()?10:1,T=-O.sourceEvent.deltaY*(O.sourceEvent.deltaMode===1?.05:O.sourceEvent.deltaMode?1:.002)*y,C=N[2]*Math.pow(2,T*E);t.scaleTo(C)};let S=[0,0];const x=O=>{(O.sourceEvent.type==="mousedown"||O.sourceEvent.type==="touchstart")&&(S=[O.sourceEvent.clientX??O.sourceEvent.touches[0].clientX,O.sourceEvent.clientY??O.sourceEvent.touches[0].clientY])},A=O=>{const N=n();if(O.sourceEvent.type!=="mousemove"&&O.sourceEvent.type!=="touchmove"||!t)return;const E=[O.sourceEvent.clientX??O.sourceEvent.touches[0].clientX,O.sourceEvent.clientY??O.sourceEvent.touches[0].clientY],T=[E[0]-S[0],E[1]-S[1]];S=E;const C=r()*Math.max(N[2],Math.log(N[2]))*(b?-1:1),D={x:N[0]-T[0]*C,y:N[1]-T[1]*C},q=[[0,0],[f,d]];t.setViewportConstrained({x:D.x,y:D.y,zoom:N[2]},q,c)},j=X4().on("start",x).on("zoom",p?A:null).on("zoom.wheel",g?_:null);i.call(j,{})}function l(){i.on("zoom",null)}return{update:o,destroy:l,pointer:wr}}const Cy=e=>({x:e.x,y:e.y,zoom:e.k}),rv=({x:e,y:t,zoom:n})=>Ey.translate(e,t).scale(n),Qs=(e,t)=>e.target.closest(`.${t}`),wD=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),YG=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,iv=(e,t=0,n=YG,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},SD=e=>{const t=e.ctrlKey&&Xc()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function XG({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:l,onPanZoomStart:c,onPanZoom:f,onPanZoomEnd:d}){return y=>{if(Qs(y,t))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(y.ctrlKey&&l){const x=wr(y),A=SD(y),j=p*Math.pow(2,A);r.scaleTo(n,j,x,y);return}const g=y.deltaMode===1?20:1;let b=i===Lo.Vertical?0:y.deltaX*g,_=i===Lo.Horizontal?0:y.deltaY*g;!Xc()&&y.shiftKey&&i!==Lo.Vertical&&(b=y.deltaY*g,_=0),r.translateBy(n,-(b/p)*o,-(_/p)*o,{internal:!0});const S=Cy(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f==null||f(y,S),e.panScrollTimeout=setTimeout(()=>{d==null||d(y,S),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,c==null||c(y,S))}}function KG({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const o=r.type==="wheel",l=!t&&o&&!r.ctrlKey,c=Qs(r,e);if(r.ctrlKey&&o&&c&&r.preventDefault(),l||c)return null;r.preventDefault(),n.call(this,r,i)}}function WG({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,l,c;if((o=r.sourceEvent)!=null&&o.internal)return;const i=Cy(r.transform);e.mouseButton=((l=r.sourceEvent)==null?void 0:l.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((c=r.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function QG({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{var l,c;e.usedRightMouseButton=!!(n&&wD(t,e.mouseButton??0)),(l=o.sourceEvent)!=null&&l.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!((c=o.sourceEvent)!=null&&c.internal)&&(i==null||i(o.sourceEvent,Cy(o.transform)))}}function ZG({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return l=>{var c;if(!((c=l.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,o&&wD(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&o(l.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const f=Cy(l.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(l.sourceEvent,f)},n?150:0)}}}function JG({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:o,userSelectionActive:l,noWheelClassName:c,noPanClassName:f,lib:d,connectionInProgress:y}){return p=>{var x;const g=e||t,b=n&&p.ctrlKey,_=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(Qs(p,`${d}-flow__node`)||Qs(p,`${d}-flow__edge`)))return!0;if(!r&&!g&&!i&&!o&&!n||l||y&&!_||Qs(p,c)&&_||Qs(p,f)&&(!_||i&&_&&!e)||!n&&p.ctrlKey&&_)return!1;if(!n&&p.type==="touchstart"&&((x=p.touches)==null?void 0:x.length)>1)return p.preventDefault(),!1;if(!g&&!i&&!b&&_||!r&&(p.type==="mousedown"||p.type==="touchstart")||Array.isArray(r)&&!r.includes(p.button)&&p.type==="mousedown")return!1;const S=Array.isArray(r)&&r.includes(p.button)||!p.button||p.button<=1;return(!p.ctrlKey||_)&&S}}function eF({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:o,onPanZoomStart:l,onPanZoomEnd:c,onDraggingChange:f}){const d={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=e.getBoundingClientRect(),p=X4().scaleExtent([t,n]).translateExtent(r),g=Un(e).call(p);j({x:i.x,y:i.y,zoom:Al(i.zoom,t,n)},[[0,0],[y.width,y.height]],r);const b=g.on("wheel.zoom"),_=g.on("dblclick.zoom");p.wheelDelta(SD);function S(L,P){return g?new Promise(Y=>{p==null||p.interpolate((P==null?void 0:P.interpolate)==="linear"?ki:np).transform(iv(g,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>Y(!0)),L)}):Promise.resolve(!1)}function x({noWheelClassName:L,noPanClassName:P,onPaneContextMenu:Y,userSelectionActive:R,panOnScroll:$,panOnDrag:k,panOnScrollMode:I,panOnScrollSpeed:H,preventScrolling:V,zoomOnPinch:K,zoomOnScroll:z,zoomOnDoubleClick:G,zoomActivationKeyPressed:Z,lib:ee,onTransformChange:fe,connectionInProgress:pe,paneClickDistance:ye,selectionOnDrag:he}){R&&!d.isZoomingOrPanning&&A();const ae=$&&!Z&&!R;p.clickDistance(he?1/0:!jr(ye)||ye<0?0:ye);const ve=ae?XG({zoomPanValues:d,noWheelClassName:L,d3Selection:g,d3Zoom:p,panOnScrollMode:I,panOnScrollSpeed:H,zoomOnPinch:K,onPanZoomStart:l,onPanZoom:o,onPanZoomEnd:c}):KG({noWheelClassName:L,preventScrolling:V,d3ZoomHandler:b});if(g.on("wheel.zoom",ve,{passive:!1}),!R){const ie=WG({zoomPanValues:d,onDraggingChange:f,onPanZoomStart:l});p.on("start",ie);const xe=QG({zoomPanValues:d,panOnDrag:k,onPaneContextMenu:!!Y,onPanZoom:o,onTransformChange:fe});p.on("zoom",xe);const we=ZG({zoomPanValues:d,panOnDrag:k,panOnScroll:$,onPaneContextMenu:Y,onPanZoomEnd:c,onDraggingChange:f});p.on("end",we)}const me=JG({zoomActivationKeyPressed:Z,panOnDrag:k,zoomOnScroll:z,panOnScroll:$,zoomOnDoubleClick:G,zoomOnPinch:K,userSelectionActive:R,noPanClassName:P,noWheelClassName:L,lib:ee,connectionInProgress:pe});p.filter(me),G?g.on("dblclick.zoom",_):g.on("dblclick.zoom",null)}function A(){p.on("zoom",null)}async function j(L,P,Y){const R=rv(L),$=p==null?void 0:p.constrain()(R,P,Y);return $&&await S($),new Promise(k=>k($))}async function O(L,P){const Y=rv(L);return await S(Y,P),new Promise(R=>R(Y))}function N(L){if(g){const P=rv(L),Y=g.property("__zoom");(Y.k!==L.zoom||Y.x!==L.x||Y.y!==L.y)&&(p==null||p.transform(g,P,null,{sync:!0}))}}function E(){const L=g?Y4(g.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function T(L,P){return g?new Promise(Y=>{p==null||p.interpolate((P==null?void 0:P.interpolate)==="linear"?ki:np).scaleTo(iv(g,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>Y(!0)),L)}):Promise.resolve(!1)}function C(L,P){return g?new Promise(Y=>{p==null||p.interpolate((P==null?void 0:P.interpolate)==="linear"?ki:np).scaleBy(iv(g,P==null?void 0:P.duration,P==null?void 0:P.ease,()=>Y(!0)),L)}):Promise.resolve(!1)}function D(L){p==null||p.scaleExtent(L)}function q(L){p==null||p.translateExtent(L)}function F(L){const P=!jr(L)||L<0?0:L;p==null||p.clickDistance(P)}return{update:x,destroy:A,setViewport:O,setViewportConstrained:j,getViewport:E,scaleTo:T,scaleBy:C,setScaleExtent:D,setTranslateExtent:q,syncViewport:N,setClickDistance:F}}var El;(function(e){e.Line="line",e.Handle="handle"})(El||(El={}));function tF({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:o}){const l=e-t,c=n-r,f=[l>0?1:l<0?-1:0,c>0?1:c<0?-1:0];return l&&i&&(f[0]=f[0]*-1),c&&o&&(f[1]=f[1]*-1),f}function VN(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function Aa(e,t){return Math.max(0,t-e)}function Oa(e,t){return Math.max(0,e-t)}function Rh(e,t,n){return Math.max(0,t-e,e-n)}function GN(e,t){return e?!t:t}function nF(e,t,n,r,i,o,l,c){let{affectsX:f,affectsY:d}=t;const{isHorizontal:y,isVertical:p}=t,g=y&&p,{xSnapped:b,ySnapped:_}=n,{minWidth:S,maxWidth:x,minHeight:A,maxHeight:j}=r,{x:O,y:N,width:E,height:T,aspectRatio:C}=e;let D=Math.floor(y?b-e.pointerX:0),q=Math.floor(p?_-e.pointerY:0);const F=E+(f?-D:D),L=T+(d?-q:q),P=-o[0]*E,Y=-o[1]*T;let R=Rh(F,S,x),$=Rh(L,A,j);if(l){let H=0,V=0;f&&D<0?H=Aa(O+D+P,l[0][0]):!f&&D>0&&(H=Oa(O+F+P,l[1][0])),d&&q<0?V=Aa(N+q+Y,l[0][1]):!d&&q>0&&(V=Oa(N+L+Y,l[1][1])),R=Math.max(R,H),$=Math.max($,V)}if(c){let H=0,V=0;f&&D>0?H=Oa(O+D,c[0][0]):!f&&D<0&&(H=Aa(O+F,c[1][0])),d&&q>0?V=Oa(N+q,c[0][1]):!d&&q<0&&(V=Aa(N+L,c[1][1])),R=Math.max(R,H),$=Math.max($,V)}if(i){if(y){const H=Rh(F/C,A,j)*C;if(R=Math.max(R,H),l){let V=0;!f&&!d||f&&!d&&g?V=Oa(N+Y+F/C,l[1][1])*C:V=Aa(N+Y+(f?D:-D)/C,l[0][1])*C,R=Math.max(R,V)}if(c){let V=0;!f&&!d||f&&!d&&g?V=Aa(N+F/C,c[1][1])*C:V=Oa(N+(f?D:-D)/C,c[0][1])*C,R=Math.max(R,V)}}if(p){const H=Rh(L*C,S,x)/C;if($=Math.max($,H),l){let V=0;!f&&!d||d&&!f&&g?V=Oa(O+L*C+P,l[1][0])/C:V=Aa(O+(d?q:-q)*C+P,l[0][0])/C,$=Math.max($,V)}if(c){let V=0;!f&&!d||d&&!f&&g?V=Aa(O+L*C,c[1][0])/C:V=Oa(O+(d?q:-q)*C,c[0][0])/C,$=Math.max($,V)}}}q=q+(q<0?$:-$),D=D+(D<0?R:-R),i&&(g?F>L*C?q=(GN(f,d)?-D:D)/C:D=(GN(f,d)?-q:q)*C:y?(q=D/C,d=f):(D=q*C,f=d));const k=f?O+D:O,I=d?N+q:N;return{width:E+(f?-D:D),height:T+(d?-q:q),x:o[0]*D*(f?-1:1)+k,y:o[1]*q*(d?-1:1)+I}}const _D={width:0,height:0,x:0,y:0},rF={..._D,pointerX:0,pointerY:0,aspectRatio:1};function iF(e){return[[0,0],[e.measured.width,e.measured.height]]}function aF(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,o=e.measured.width??0,l=e.measured.height??0,c=n[0]*o,f=n[1]*l;return[[r-c,i-f],[r+o-c,i+l-f]]}function oF({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const o=Un(e);let l={controlDirection:VN("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:d,boundaries:y,keepAspectRatio:p,resizeDirection:g,onResizeStart:b,onResize:_,onResizeEnd:S,shouldResize:x}){let A={..._D},j={...rF};l={boundaries:y,resizeDirection:g,keepAspectRatio:p,controlDirection:VN(d)};let O,N=null,E=[],T,C,D,q=!1;const F=R4().on("start",L=>{const{nodeLookup:P,transform:Y,snapGrid:R,snapToGrid:$,nodeOrigin:k,paneDomNode:I}=n();if(O=P.get(t),!O)return;N=(I==null?void 0:I.getBoundingClientRect())??null;const{xSnapped:H,ySnapped:V}=Cc(L.sourceEvent,{transform:Y,snapGrid:R,snapToGrid:$,containerBounds:N});A={width:O.measured.width??0,height:O.measured.height??0,x:O.position.x??0,y:O.position.y??0},j={...A,pointerX:H,pointerY:V,aspectRatio:A.width/A.height},T=void 0,O.parentId&&(O.extent==="parent"||O.expandParent)&&(T=P.get(O.parentId),C=T&&O.extent==="parent"?iF(T):void 0),E=[],D=void 0;for(const[K,z]of P)if(z.parentId===t&&(E.push({id:K,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const G=aF(z,O,z.origin??k);D?D=[[Math.min(G[0][0],D[0][0]),Math.min(G[0][1],D[0][1])],[Math.max(G[1][0],D[1][0]),Math.max(G[1][1],D[1][1])]]:D=G}b==null||b(L,{...A})}).on("drag",L=>{const{transform:P,snapGrid:Y,snapToGrid:R,nodeOrigin:$}=n(),k=Cc(L.sourceEvent,{transform:P,snapGrid:Y,snapToGrid:R,containerBounds:N}),I=[];if(!O)return;const{x:H,y:V,width:K,height:z}=A,G={},Z=O.origin??$,{width:ee,height:fe,x:pe,y:ye}=nF(j,l.controlDirection,k,l.boundaries,l.keepAspectRatio,Z,C,D),he=ee!==K,ae=fe!==z,ve=pe!==H&&he,me=ye!==V&&ae;if(!ve&&!me&&!he&&!ae)return;if((ve||me||Z[0]===1||Z[1]===1)&&(G.x=ve?pe:A.x,G.y=me?ye:A.y,A.x=G.x,A.y=G.y,E.length>0)){const Me=pe-H,Ee=ye-V;for(const Ke of E)Ke.position={x:Ke.position.x-Me+Z[0]*(ee-K),y:Ke.position.y-Ee+Z[1]*(fe-z)},I.push(Ke)}if((he||ae)&&(G.width=he&&(!l.resizeDirection||l.resizeDirection==="horizontal")?ee:A.width,G.height=ae&&(!l.resizeDirection||l.resizeDirection==="vertical")?fe:A.height,A.width=G.width,A.height=G.height),T&&O.expandParent){const Me=Z[0]*(G.width??0);G.x&&G.x<Me&&(A.x=Me,j.x=j.x-(G.x-Me));const Ee=Z[1]*(G.height??0);G.y&&G.y<Ee&&(A.y=Ee,j.y=j.y-(G.y-Ee))}const ie=tF({width:A.width,prevWidth:K,height:A.height,prevHeight:z,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),xe={...A,direction:ie};(x==null?void 0:x(L,xe))!==!1&&(q=!0,_==null||_(L,xe),r(G,I))}).on("end",L=>{q&&(S==null||S(L,{...A}),i==null||i({...A}),q=!1)});o.call(F)}function f(){o.on(".drag",null)}return{update:c,destroy:f}}var av={exports:{}},ov={},sv={exports:{}},lv={};/**
427
+ * @license React
428
+ * use-sync-external-store-shim.production.js
429
+ *
430
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
431
+ *
432
+ * This source code is licensed under the MIT license found in the
433
+ * LICENSE file in the root directory of this source tree.
434
+ */var FN;function sF(){if(FN)return lv;FN=1;var e=Rf();function t(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(p,g){var b=g(),_=r({inst:{value:b,getSnapshot:g}}),S=_[0].inst,x=_[1];return o(function(){S.value=b,S.getSnapshot=g,f(S)&&x({inst:S})},[p,b,g]),i(function(){return f(S)&&x({inst:S}),p(function(){f(S)&&x({inst:S})})},[p]),l(b),b}function f(p){var g=p.getSnapshot;p=p.value;try{var b=g();return!n(p,b)}catch{return!0}}function d(p,g){return g()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return lv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,lv}var YN;function lF(){return YN||(YN=1,sv.exports=sF()),sv.exports}/**
435
+ * @license React
436
+ * use-sync-external-store-shim/with-selector.production.js
437
+ *
438
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
439
+ *
440
+ * This source code is licensed under the MIT license found in the
441
+ * LICENSE file in the root directory of this source tree.
442
+ */var XN;function uF(){if(XN)return ov;XN=1;var e=Rf(),t=lF();function n(d,y){return d===y&&(d!==0||1/d===1/y)||d!==d&&y!==y}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return ov.useSyncExternalStoreWithSelector=function(d,y,p,g,b){var _=o(null);if(_.current===null){var S={hasValue:!1,value:null};_.current=S}else S=_.current;_=c(function(){function A(T){if(!j){if(j=!0,O=T,T=g(T),b!==void 0&&S.hasValue){var C=S.value;if(b(C,T))return N=C}return N=T}if(C=N,r(O,T))return C;var D=g(T);return b!==void 0&&b(C,D)?(O=T,C):(O=T,N=D)}var j=!1,O,N,E=p===void 0?null:p;return[function(){return A(y())},E===null?void 0:function(){return A(E())}]},[y,p,g,b]);var x=i(d,_[0],_[1]);return l(function(){S.hasValue=!0,S.value=x},[x]),f(x),x},ov}var KN;function cF(){return KN||(KN=1,av.exports=uF()),av.exports}var fF=cF();const dF=nt(fF),hF={},WN=e=>{let t;const n=new Set,r=(y,p)=>{const g=typeof y=="function"?y(t):y;if(!Object.is(g,t)){const b=t;t=p??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(_=>_(t,b))}},i=()=>t,f={setState:r,getState:i,getInitialState:()=>d,subscribe:y=>(n.add(y),()=>n.delete(y)),destroy:()=>{(hF?"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()}},d=t=e(r,i,f);return f},pF=e=>e?WN(e):WN,{useDebugValue:yF}=W,{useSyncExternalStoreWithSelector:mF}=dF,gF=e=>e;function AD(e,t=gF,n){const r=mF(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return yF(r),r}const QN=(e,t)=>{const n=pF(e),r=(i,o=t)=>AD(n,i,o);return Object.assign(r,n),r},vF=(e,t)=>e?QN(e,t):QN;function St(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const My=U.createContext(null),bF=My.Provider,OD=Fr.error001();function Xe(e,t){const n=U.useContext(My);if(n===null)throw new Error(OD);return AD(n,e,t)}function _t(){const e=U.useContext(My);if(e===null)throw new Error(OD);return U.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const ZN={display:"none"},xF={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},jD="react-flow__node-desc",ED="react-flow__edge-desc",wF="react-flow__aria-live",SF=e=>e.ariaLiveMessage,_F=e=>e.ariaLabelConfig;function AF({rfId:e}){const t=Xe(SF);return m.jsx("div",{id:`${wF}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:xF,children:t})}function OF({rfId:e,disableKeyboardA11y:t}){const n=Xe(_F);return m.jsxs(m.Fragment,{children:[m.jsx("div",{id:`${jD}-${e}`,style:ZN,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),m.jsx("div",{id:`${ED}-${e}`,style:ZN,children:n["edge.a11yDescription.default"]}),!t&&m.jsx(AF,{rfId:e})]})}const ky=U.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},o)=>{const l=`${e}`.split("-");return m.jsx("div",{className:It(["react-flow__panel",n,...l]),style:r,ref:o,...i,children:t})});ky.displayName="Panel";function jF({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:m.jsx(ky,{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:m.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const EF=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}},Ph=e=>e.id;function NF(e,t){return St(e.selectedNodes.map(Ph),t.selectedNodes.map(Ph))&&St(e.selectedEdges.map(Ph),t.selectedEdges.map(Ph))}function TF({onSelectionChange:e}){const t=_t(),{selectedNodes:n,selectedEdges:r}=Xe(EF,NF);return U.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(o=>o(i))},[n,r,e]),null}const CF=e=>!!e.onSelectionChangeHandlers;function MF({onSelectionChange:e}){const t=Xe(CF);return e||t?m.jsx(TF,{onSelectionChange:e}):null}const ND=[0,0],kF={x:0,y:0,zoom:1},RF=["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"],JN=[...RF,"rfId"],PF=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}),eT={translateExtent:Gc,nodeOrigin:ND,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function DF(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:o,setNodeExtent:l,reset:c,setDefaultNodesAndEdges:f}=Xe(PF,St),d=_t();U.useEffect(()=>(f(e.defaultNodes,e.defaultEdges),()=>{y.current=eT,c()}),[]);const y=U.useRef(eT);return U.useEffect(()=>{for(const p of JN){const g=e[p],b=y.current[p];g!==b&&(typeof e[p]>"u"||(p==="nodes"?t(g):p==="edges"?n(g):p==="minZoom"?r(g):p==="maxZoom"?i(g):p==="translateExtent"?o(g):p==="nodeExtent"?l(g):p==="ariaLabelConfig"?d.setState({ariaLabelConfig:vG(g)}):p==="fitView"?d.setState({fitViewQueued:g}):p==="fitViewOptions"?d.setState({fitViewOptions:g}):d.setState({[p]:g})))}y.current=e},JN.map(p=>e[p])),null}function tT(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function $F(e){var r;const[t,n]=U.useState(e==="system"?null:e);return U.useEffect(()=>{if(e!=="system"){n(e);return}const i=tT(),o=()=>n(i!=null&&i.matches?"dark":"light");return o(),i==null||i.addEventListener("change",o),()=>{i==null||i.removeEventListener("change",o)}},[e]),t!==null?t:(r=tT())!=null&&r.matches?"dark":"light"}const nT=typeof document<"u"?document:null;function Kc(e=null,t={target:nT,actInsideInputWithModifier:!0}){const[n,r]=U.useState(!1),i=U.useRef(!1),o=U.useRef(new Set([])),[l,c]=U.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
443
+ `).replace(`
444
+
445
+ `,`
446
+ +`).split(`
447
+ `)),y=d.reduce((p,g)=>p.concat(...g),[]);return[d,y]}return[[],[]]},[e]);return U.useEffect(()=>{const f=(t==null?void 0:t.target)??nT,d=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const y=b=>{var x,A;if(i.current=b.ctrlKey||b.metaKey||b.shiftKey||b.altKey,(!i.current||i.current&&!d)&&sD(b))return!1;const S=iT(b.code,c);if(o.current.add(b[S]),rT(l,o.current,!1)){const j=((A=(x=b.composedPath)==null?void 0:x.call(b))==null?void 0:A[0])||b.target,O=(j==null?void 0:j.nodeName)==="BUTTON"||(j==null?void 0:j.nodeName)==="A";t.preventDefault!==!1&&(i.current||!O)&&b.preventDefault(),r(!0)}},p=b=>{const _=iT(b.code,c);rT(l,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(b[_]),b.key==="Meta"&&o.current.clear(),i.current=!1},g=()=>{o.current.clear(),r(!1)};return f==null||f.addEventListener("keydown",y),f==null||f.addEventListener("keyup",p),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{f==null||f.removeEventListener("keydown",y),f==null||f.removeEventListener("keyup",p),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,r]),n}function rT(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function iT(e,t){return t.includes(e)?"code":"key"}const qF=()=>{const e=_t();return U.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,i,o],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??o},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:o,maxZoom:l,panZoom:c}=e.getState(),f=R_(t,r,i,o,l,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(f,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:o,domNode:l}=e.getState();if(!l)return t;const{x:c,y:f}=l.getBoundingClientRect(),d={x:t.x-c,y:t.y-f},y=n.snapGrid??i,p=n.snapToGrid??o;return Hf(d,r,p,y)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:o}=r.getBoundingClientRect(),l=wp(t,n);return{x:l.x+i,y:l.y+o}}}),[])};function TD(e,t){const n=[],r=new Map,i=[];for(const o of e)if(o.type==="add"){i.push(o);continue}else if(o.type==="remove"||o.type==="replace")r.set(o.id,[o]);else{const l=r.get(o.id);l?l.push(o):r.set(o.id,[o])}for(const o of t){const l=r.get(o.id);if(!l){n.push(o);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const c={...o};for(const f of l)LF(f,c);n.push(c)}return i.length&&i.forEach(o=>{o.index!==void 0?n.splice(o.index,0,{...o.item}):n.push({...o.item})}),n}function LF(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 CD(e,t){return TD(e,t)}function MD(e,t){return TD(e,t)}function So(e,t){return{id:e,type:"select",selected:t}}function Zs(e,t=new Set,n=!1){const r=[];for(const[i,o]of e){const l=t.has(i);!(o.selected===void 0&&!l)&&o.selected!==l&&(n&&(o.selected=l),r.push(So(o.id,l)))}return r}function aT({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(o=>[o.id,o]));for(const[o,l]of e.entries()){const c=t.get(l.id),f=((i=c==null?void 0:c.internals)==null?void 0:i.userNode)??c;f!==void 0&&f!==l&&n.push({id:l.id,item:l,type:"replace"}),f===void 0&&n.push({item:l,type:"add",index:o})}for(const[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function oT(e){return{id:e.id,type:"remove"}}const sT=e=>lG(e),zF=e=>J4(e);function kD(e){return U.forwardRef(e)}const BF=typeof window<"u"?U.useLayoutEffect:U.useEffect;function lT(e){const[t,n]=U.useState(BigInt(0)),[r]=U.useState(()=>IF(()=>n(i=>i+BigInt(1))));return BF(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function IF(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const RD=U.createContext(null);function UF({children:e}){const t=_t(),n=U.useCallback(c=>{const{nodes:f=[],setNodes:d,hasDefaultNodes:y,onNodesChange:p,nodeLookup:g,fitViewQueued:b,onNodesChangeMiddlewareMap:_}=t.getState();let S=f;for(const A of c)S=typeof A=="function"?A(S):A;let x=aT({items:S,lookup:g});for(const A of _.values())x=A(x);y&&d(S),x.length>0?p==null||p(x):b&&window.requestAnimationFrame(()=>{const{fitViewQueued:A,nodes:j,setNodes:O}=t.getState();A&&O(j)})},[]),r=lT(n),i=U.useCallback(c=>{const{edges:f=[],setEdges:d,hasDefaultEdges:y,onEdgesChange:p,edgeLookup:g}=t.getState();let b=f;for(const _ of c)b=typeof _=="function"?_(b):_;y?d(b):p&&p(aT({items:b,lookup:g}))},[]),o=lT(i),l=U.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return m.jsx(RD.Provider,{value:l,children:e})}function HF(){const e=U.useContext(RD);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const VF=e=>!!e.panZoom;function B_(){const e=qF(),t=_t(),n=HF(),r=Xe(VF),i=U.useMemo(()=>{const o=p=>t.getState().nodeLookup.get(p),l=p=>{n.nodeQueue.push(p)},c=p=>{n.edgeQueue.push(p)},f=p=>{var A,j;const{nodeLookup:g,nodeOrigin:b}=t.getState(),_=sT(p)?p:g.get(p.id),S=_.parentId?aD(_.position,_.measured,_.parentId,g,b):_.position,x={..._,position:S,width:((A=_.measured)==null?void 0:A.width)??_.width,height:((j=_.measured)==null?void 0:j.height)??_.height};return Ol(x)},d=(p,g,b={replace:!1})=>{l(_=>_.map(S=>{if(S.id===p){const x=typeof g=="function"?g(S):g;return b.replace&&sT(x)?x:{...S,...x}}return S}))},y=(p,g,b={replace:!1})=>{c(_=>_.map(S=>{if(S.id===p){const x=typeof g=="function"?g(S):g;return b.replace&&zF(x)?x:{...S,...x}}return S}))};return{getNodes:()=>t.getState().nodes.map(p=>({...p})),getNode:p=>{var g;return(g=o(p))==null?void 0:g.internals.userNode},getInternalNode:o,getEdges:()=>{const{edges:p=[]}=t.getState();return p.map(g=>({...g}))},getEdge:p=>t.getState().edgeLookup.get(p),setNodes:l,setEdges:c,addNodes:p=>{const g=Array.isArray(p)?p:[p];n.nodeQueue.push(b=>[...b,...g])},addEdges:p=>{const g=Array.isArray(p)?p:[p];n.edgeQueue.push(b=>[...b,...g])},toObject:()=>{const{nodes:p=[],edges:g=[],transform:b}=t.getState(),[_,S,x]=b;return{nodes:p.map(A=>({...A})),edges:g.map(A=>({...A})),viewport:{x:_,y:S,zoom:x}}},deleteElements:async({nodes:p=[],edges:g=[]})=>{const{nodes:b,edges:_,onNodesDelete:S,onEdgesDelete:x,triggerNodeChanges:A,triggerEdgeChanges:j,onDelete:O,onBeforeDelete:N}=t.getState(),{nodes:E,edges:T}=await hG({nodesToRemove:p,edgesToRemove:g,nodes:b,edges:_,onBeforeDelete:N}),C=T.length>0,D=E.length>0;if(C){const q=T.map(oT);x==null||x(T),j(q)}if(D){const q=E.map(oT);S==null||S(E),A(q)}return(D||C)&&(O==null||O({nodes:E,edges:T})),{deletedNodes:E,deletedEdges:T}},getIntersectingNodes:(p,g=!0,b)=>{const _=RN(p),S=_?p:f(p),x=b!==void 0;return S?(b||t.getState().nodes).filter(A=>{const j=t.getState().nodeLookup.get(A.id);if(j&&!_&&(A.id===p.id||!j.internals.positionAbsolute))return!1;const O=Ol(x?A:j),N=Yc(O,S);return g&&N>0||N>=O.width*O.height||N>=S.width*S.height}):[]},isNodeIntersecting:(p,g,b=!0)=>{const S=RN(p)?p:f(p);if(!S)return!1;const x=Yc(S,g);return b&&x>0||x>=g.width*g.height||x>=S.width*S.height},updateNode:d,updateNodeData:(p,g,b={replace:!1})=>{d(p,_=>{const S=typeof g=="function"?g(_):g;return b.replace?{..._,data:S}:{..._,data:{..._.data,...S}}},b)},updateEdge:y,updateEdgeData:(p,g,b={replace:!1})=>{y(p,_=>{const S=typeof g=="function"?g(_):g;return b.replace?{..._,data:S}:{..._,data:{..._.data,...S}}},b)},getNodesBounds:p=>{const{nodeLookup:g,nodeOrigin:b}=t.getState();return uG(p,{nodeLookup:g,nodeOrigin:b})},getHandleConnections:({type:p,id:g,nodeId:b})=>{var _;return Array.from(((_=t.getState().connectionLookup.get(`${b}-${p}${g?`-${g}`:""}`))==null?void 0:_.values())??[])},getNodeConnections:({type:p,handleId:g,nodeId:b})=>{var _;return Array.from(((_=t.getState().connectionLookup.get(`${b}${p?g?`-${p}-${g}`:`-${p}`:""}`))==null?void 0:_.values())??[])},fitView:async p=>{const g=t.getState().fitViewResolver??gG();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:g}),n.nodeQueue.push(b=>[...b]),g.promise}}},[]);return U.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const uT=e=>e.selected,GF=typeof window<"u"?window:void 0;function FF({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=_t(),{deleteElements:r}=B_(),i=Kc(e,{actInsideInputWithModifier:!1}),o=Kc(t,{target:GF});U.useEffect(()=>{if(i){const{edges:l,nodes:c}=n.getState();r({nodes:c.filter(uT),edges:l.filter(uT)}),n.setState({nodesSelectionActive:!1})}},[i]),U.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function YF(e){const t=_t();U.useEffect(()=>{const n=()=>{var i,o,l,c;if(!e.current||!(((o=(i=e.current).checkVisibility)==null?void 0:o.call(i))??!0))return!1;const r=P_(e.current);(r.height===0||r.width===0)&&((c=(l=t.getState()).onError)==null||c.call(l,"004",Fr.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 Ry={position:"absolute",width:"100%",height:"100%",top:0,left:0},XF=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function KF({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:o=Lo.Free,zoomOnDoubleClick:l=!0,panOnDrag:c=!0,defaultViewport:f,translateExtent:d,minZoom:y,maxZoom:p,zoomActivationKeyCode:g,preventScrolling:b=!0,children:_,noWheelClassName:S,noPanClassName:x,onViewportChange:A,isControlledViewport:j,paneClickDistance:O,selectionOnDrag:N}){const E=_t(),T=U.useRef(null),{userSelectionActive:C,lib:D,connectionInProgress:q}=Xe(XF,St),F=Kc(g),L=U.useRef();YF(T);const P=U.useCallback(Y=>{A==null||A({x:Y[0],y:Y[1],zoom:Y[2]}),j||E.setState({transform:Y})},[A,j]);return U.useEffect(()=>{if(T.current){L.current=eF({domNode:T.current,minZoom:y,maxZoom:p,translateExtent:d,viewport:f,onDraggingChange:k=>E.setState({paneDragging:k}),onPanZoomStart:(k,I)=>{const{onViewportChangeStart:H,onMoveStart:V}=E.getState();V==null||V(k,I),H==null||H(I)},onPanZoom:(k,I)=>{const{onViewportChange:H,onMove:V}=E.getState();V==null||V(k,I),H==null||H(I)},onPanZoomEnd:(k,I)=>{const{onViewportChangeEnd:H,onMoveEnd:V}=E.getState();V==null||V(k,I),H==null||H(I)}});const{x:Y,y:R,zoom:$}=L.current.getViewport();return E.setState({panZoom:L.current,transform:[Y,R,$],domNode:T.current.closest(".react-flow")}),()=>{var k;(k=L.current)==null||k.destroy()}}},[]),U.useEffect(()=>{var Y;(Y=L.current)==null||Y.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:o,zoomOnDoubleClick:l,panOnDrag:c,zoomActivationKeyPressed:F,preventScrolling:b,noPanClassName:x,userSelectionActive:C,noWheelClassName:S,lib:D,onTransformChange:P,connectionInProgress:q,selectionOnDrag:N,paneClickDistance:O})},[e,t,n,r,i,o,l,c,F,b,x,C,S,D,P,q,N,O]),m.jsx("div",{className:"react-flow__renderer",ref:T,style:Ry,children:_})}const WF=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function QF(){const{userSelectionActive:e,userSelectionRect:t}=Xe(WF,St);return e&&t?m.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 uv=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},ZF=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function JF({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Fc.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:o,onSelectionStart:l,onSelectionEnd:c,onPaneClick:f,onPaneContextMenu:d,onPaneScroll:y,onPaneMouseEnter:p,onPaneMouseMove:g,onPaneMouseLeave:b,children:_}){const S=_t(),{userSelectionActive:x,elementsSelectable:A,dragging:j,connectionInProgress:O}=Xe(ZF,St),N=A&&(e||x),E=U.useRef(null),T=U.useRef(),C=U.useRef(new Set),D=U.useRef(new Set),q=U.useRef(!1),F=H=>{if(q.current||O){q.current=!1;return}f==null||f(H),S.getState().resetSelectedElements(),S.setState({nodesSelectionActive:!1})},L=H=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){H.preventDefault();return}d==null||d(H)},P=y?H=>y(H):void 0,Y=H=>{q.current&&(H.stopPropagation(),q.current=!1)},R=H=>{var fe,pe;const{domNode:V}=S.getState();if(T.current=V==null?void 0:V.getBoundingClientRect(),!T.current)return;const K=H.target===E.current;if(!K&&!!H.target.closest(".nokey")||!e||!(o&&K||t)||H.button!==0||!H.isPrimary)return;(pe=(fe=H.target)==null?void 0:fe.setPointerCapture)==null||pe.call(fe,H.pointerId),q.current=!1;const{x:Z,y:ee}=Er(H.nativeEvent,T.current);S.setState({userSelectionRect:{width:0,height:0,startX:Z,startY:ee,x:Z,y:ee}}),K||(H.stopPropagation(),H.preventDefault())},$=H=>{const{userSelectionRect:V,transform:K,nodeLookup:z,edgeLookup:G,connectionLookup:Z,triggerNodeChanges:ee,triggerEdgeChanges:fe,defaultEdgeOptions:pe,resetSelectedElements:ye}=S.getState();if(!T.current||!V)return;const{x:he,y:ae}=Er(H.nativeEvent,T.current),{startX:ve,startY:me}=V;if(!q.current){const Ee=t?0:i;if(Math.hypot(he-ve,ae-me)<=Ee)return;ye(),l==null||l(H)}q.current=!0;const ie={startX:ve,startY:me,x:he<ve?he:ve,y:ae<me?ae:me,width:Math.abs(he-ve),height:Math.abs(ae-me)},xe=C.current,we=D.current;C.current=new Set(k_(z,ie,K,n===Fc.Partial,!0).map(Ee=>Ee.id)),D.current=new Set;const Me=(pe==null?void 0:pe.selectable)??!0;for(const Ee of C.current){const Ke=Z.get(Ee);if(Ke)for(const{edgeId:Ct}of Ke.values()){const Mt=G.get(Ct);Mt&&(Mt.selectable??Me)&&D.current.add(Ct)}}if(!PN(xe,C.current)){const Ee=Zs(z,C.current,!0);ee(Ee)}if(!PN(we,D.current)){const Ee=Zs(G,D.current);fe(Ee)}S.setState({userSelectionRect:ie,userSelectionActive:!0,nodesSelectionActive:!1})},k=H=>{var V,K;H.button===0&&((K=(V=H.target)==null?void 0:V.releasePointerCapture)==null||K.call(V,H.pointerId),!x&&H.target===E.current&&S.getState().userSelectionRect&&(F==null||F(H)),S.setState({userSelectionActive:!1,userSelectionRect:null}),q.current&&(c==null||c(H),S.setState({nodesSelectionActive:C.current.size>0})))},I=r===!0||Array.isArray(r)&&r.includes(0);return m.jsxs("div",{className:It(["react-flow__pane",{draggable:I,dragging:j,selection:e}]),onClick:N?void 0:uv(F,E),onContextMenu:uv(L,E),onWheel:uv(P,E),onPointerEnter:N?void 0:p,onPointerMove:N?$:g,onPointerUp:N?k:void 0,onPointerDownCapture:N?R:void 0,onClickCapture:N?Y:void 0,onPointerLeave:b,ref:E,style:Ry,children:[_,m.jsx(QF,{})]})}function $w({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:o,multiSelectionActive:l,nodeLookup:c,onError:f}=t.getState(),d=c.get(e);if(!d){f==null||f("012",Fr.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&l)&&(o({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var y;return(y=r==null?void 0:r.current)==null?void 0:y.blur()})):i([e])}function PD({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,nodeClickDistance:l}){const c=_t(),[f,d]=U.useState(!1),y=U.useRef();return U.useEffect(()=>{y.current=BG({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{$w({id:p,store:c,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),U.useEffect(()=>{var p,g;if(t)(p=y.current)==null||p.destroy();else if(e.current)return(g=y.current)==null||g.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:i,nodeClickDistance:l}),()=>{var b;(b=y.current)==null||b.destroy()}},[n,r,t,o,e,i]),f}const eY=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function DD(){const e=_t();return U.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:o,nodesDraggable:l,onError:c,updateNodePositions:f,nodeLookup:d,nodeOrigin:y}=e.getState(),p=new Map,g=eY(l),b=i?o[0]:5,_=i?o[1]:5,S=n.direction.x*b*n.factor,x=n.direction.y*_*n.factor;for(const[,A]of d){if(!g(A))continue;let j={x:A.internals.positionAbsolute.x+S,y:A.internals.positionAbsolute.y+x};i&&(j=Uf(j,o));const{position:O,positionAbsolute:N}=eD({nodeId:A.id,nextPosition:j,nodeLookup:d,nodeExtent:r,nodeOrigin:y,onError:c});A.position=O,A.internals.positionAbsolute=N,p.set(A.id,A)}f(p)},[])}const I_=U.createContext(null),tY=I_.Provider;I_.Consumer;const $D=()=>U.useContext(I_),nY=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),rY=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:o,connection:l}=r,{fromHandle:c,toHandle:f,isValid:d}=l,y=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.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:y,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:o===Sl.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:!!i,valid:y&&d}};function iY({type:e="source",position:t=je.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:o=!0,id:l,onConnect:c,children:f,className:d,onMouseDown:y,onTouchStart:p,...g},b){var $,k;const _=l||null,S=e==="target",x=_t(),A=$D(),{connectOnClick:j,noPanClassName:O,rfId:N}=Xe(nY,St),{connectingFrom:E,connectingTo:T,clickConnecting:C,isPossibleEndHandle:D,connectionInProcess:q,clickConnectionInProcess:F,valid:L}=Xe(rY(A,_,e),St);A||(k=($=x.getState()).onError)==null||k.call($,"010",Fr.error010());const P=I=>{const{defaultEdgeOptions:H,onConnect:V,hasDefaultEdges:K}=x.getState(),z={...H,...I};if(K){const{edges:G,setEdges:Z}=x.getState();Z(AG(z,G))}V==null||V(z),c==null||c(z)},Y=I=>{if(!A)return;const H=lD(I.nativeEvent);if(i&&(H&&I.button===0||!H)){const V=x.getState();Dw.onPointerDown(I.nativeEvent,{handleDomNode:I.currentTarget,autoPanOnConnect:V.autoPanOnConnect,connectionMode:V.connectionMode,connectionRadius:V.connectionRadius,domNode:V.domNode,nodeLookup:V.nodeLookup,lib:V.lib,isTarget:S,handleId:_,nodeId:A,flowId:V.rfId,panBy:V.panBy,cancelConnection:V.cancelConnection,onConnectStart:V.onConnectStart,onConnectEnd:V.onConnectEnd,updateConnection:V.updateConnection,onConnect:P,isValidConnection:n||V.isValidConnection,getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:V.autoPanSpeed,dragThreshold:V.connectionDragThreshold})}H?y==null||y(I):p==null||p(I)},R=I=>{const{onClickConnectStart:H,onClickConnectEnd:V,connectionClickStartHandle:K,connectionMode:z,isValidConnection:G,lib:Z,rfId:ee,nodeLookup:fe,connection:pe}=x.getState();if(!A||!K&&!i)return;if(!K){H==null||H(I.nativeEvent,{nodeId:A,handleId:_,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:A,type:e,id:_}});return}const ye=oD(I.target),he=n||G,{connection:ae,isValid:ve}=Dw.isValid(I.nativeEvent,{handle:{nodeId:A,id:_,type:e},connectionMode:z,fromNodeId:K.nodeId,fromHandleId:K.id||null,fromType:K.type,isValidConnection:he,flowId:ee,doc:ye,lib:Z,nodeLookup:fe});ve&&ae&&P(ae);const me=structuredClone(pe);delete me.inProgress,me.toPosition=me.toHandle?me.toHandle.position:null,V==null||V(I,me),x.setState({connectionClickStartHandle:null})};return m.jsx("div",{"data-handleid":_,"data-nodeid":A,"data-handlepos":t,"data-id":`${N}-${A}-${_}-${e}`,className:It(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",O,d,{source:!S,target:S,connectable:r,connectablestart:i,connectableend:o,clickconnecting:C,connectingfrom:E,connectingto:T,valid:L,connectionindicator:r&&(!q||D)&&(q||F?o:i)}]),onMouseDown:Y,onTouchStart:Y,onClick:j?R:void 0,ref:b,...g,children:f})}const Yr=U.memo(kD(iY));function aY({data:e,isConnectable:t,sourcePosition:n=je.Bottom}){return m.jsxs(m.Fragment,{children:[e==null?void 0:e.label,m.jsx(Yr,{type:"source",position:n,isConnectable:t})]})}function oY({data:e,isConnectable:t,targetPosition:n=je.Top,sourcePosition:r=je.Bottom}){return m.jsxs(m.Fragment,{children:[m.jsx(Yr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,m.jsx(Yr,{type:"source",position:r,isConnectable:t})]})}function sY(){return null}function lY({data:e,isConnectable:t,targetPosition:n=je.Top}){return m.jsxs(m.Fragment,{children:[m.jsx(Yr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Sp={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},cT={input:aY,default:oY,output:lY,group:sY};function uY(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const cY=e=>{const{width:t,height:n,x:r,y:i}=If(e.nodeLookup,{filter:o=>!!o.selected});return{width:jr(t)?t:null,height:jr(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function fY({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=_t(),{width:i,height:o,transformString:l,userSelectionActive:c}=Xe(cY,St),f=DD(),d=U.useRef(null);if(U.useEffect(()=>{var g;n||(g=d.current)==null||g.focus({preventScroll:!0})},[n]),PD({nodeRef:d}),c||!i||!o)return null;const y=e?g=>{const b=r.getState().nodes.filter(_=>_.selected);e(g,b)}:void 0,p=g=>{Object.prototype.hasOwnProperty.call(Sp,g.key)&&(g.preventDefault(),f({direction:Sp[g.key],factor:g.shiftKey?4:1}))};return m.jsx("div",{className:It(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:m.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:y,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:i,height:o}})})}const fT=typeof window<"u"?window:void 0,dY=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function qD({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:l,paneClickDistance:c,deleteKeyCode:f,selectionKeyCode:d,selectionOnDrag:y,selectionMode:p,onSelectionStart:g,onSelectionEnd:b,multiSelectionKeyCode:_,panActivationKeyCode:S,zoomActivationKeyCode:x,elementsSelectable:A,zoomOnScroll:j,zoomOnPinch:O,panOnScroll:N,panOnScrollSpeed:E,panOnScrollMode:T,zoomOnDoubleClick:C,panOnDrag:D,defaultViewport:q,translateExtent:F,minZoom:L,maxZoom:P,preventScrolling:Y,onSelectionContextMenu:R,noWheelClassName:$,noPanClassName:k,disableKeyboardA11y:I,onViewportChange:H,isControlledViewport:V}){const{nodesSelectionActive:K,userSelectionActive:z}=Xe(dY,St),G=Kc(d,{target:fT}),Z=Kc(S,{target:fT}),ee=Z||D,fe=Z||N,pe=y&&ee!==!0,ye=G||z||pe;return FF({deleteKeyCode:f,multiSelectionKeyCode:_}),m.jsx(KF,{onPaneContextMenu:o,elementsSelectable:A,zoomOnScroll:j,zoomOnPinch:O,panOnScroll:fe,panOnScrollSpeed:E,panOnScrollMode:T,zoomOnDoubleClick:C,panOnDrag:!G&&ee,defaultViewport:q,translateExtent:F,minZoom:L,maxZoom:P,zoomActivationKeyCode:x,preventScrolling:Y,noWheelClassName:$,noPanClassName:k,onViewportChange:H,isControlledViewport:V,paneClickDistance:c,selectionOnDrag:pe,children:m.jsxs(JF,{onSelectionStart:g,onSelectionEnd:b,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:l,panOnDrag:ee,isSelecting:!!ye,selectionMode:p,selectionKeyPressed:G,paneClickDistance:c,selectionOnDrag:pe,children:[e,K&&m.jsx(fY,{onSelectionContextMenu:R,noPanClassName:k,disableKeyboardA11y:I})]})})}qD.displayName="FlowRenderer";const hY=U.memo(qD),pY=e=>t=>e?k_(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 yY(e){return Xe(U.useCallback(pY(e),[e]),St)}const mY=e=>e.updateNodeInternals;function gY(){const e=Xe(mY),[t]=U.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const o=i.target.getAttribute("data-id");r.set(o,{id:o,nodeElement:i.target,force:!0})}),e(r)}));return U.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function vY({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=_t(),o=U.useRef(null),l=U.useRef(null),c=U.useRef(e.sourcePosition),f=U.useRef(e.targetPosition),d=U.useRef(t),y=n&&!!e.internals.handleBounds;return U.useEffect(()=>{o.current&&!e.hidden&&(!y||l.current!==o.current)&&(l.current&&(r==null||r.unobserve(l.current)),r==null||r.observe(o.current),l.current=o.current)},[y,e.hidden]),U.useEffect(()=>()=>{l.current&&(r==null||r.unobserve(l.current),l.current=null)},[]),U.useEffect(()=>{if(o.current){const p=d.current!==t,g=c.current!==e.sourcePosition,b=f.current!==e.targetPosition;(p||g||b)&&(d.current=t,c.current=e.sourcePosition,f.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:o.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),o}function bY({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:o,onDoubleClick:l,nodesDraggable:c,elementsSelectable:f,nodesConnectable:d,nodesFocusable:y,resizeObserver:p,noDragClassName:g,noPanClassName:b,disableKeyboardA11y:_,rfId:S,nodeTypes:x,nodeClickDistance:A,onError:j}){const{node:O,internals:N,isParent:E}=Xe(he=>{const ae=he.nodeLookup.get(e),ve=he.parentLookup.has(e);return{node:ae,internals:ae.internals,isParent:ve}},St);let T=O.type||"default",C=(x==null?void 0:x[T])||cT[T];C===void 0&&(j==null||j("003",Fr.error003(T)),T="default",C=(x==null?void 0:x.default)||cT.default);const D=!!(O.draggable||c&&typeof O.draggable>"u"),q=!!(O.selectable||f&&typeof O.selectable>"u"),F=!!(O.connectable||d&&typeof O.connectable>"u"),L=!!(O.focusable||y&&typeof O.focusable>"u"),P=_t(),Y=iD(O),R=vY({node:O,nodeType:T,hasDimensions:Y,resizeObserver:p}),$=PD({nodeRef:R,disabled:O.hidden||!D,noDragClassName:g,handleSelector:O.dragHandle,nodeId:e,isSelectable:q,nodeClickDistance:A}),k=DD();if(O.hidden)return null;const I=Ii(O),H=uY(O),V=q||D||t||n||r||i,K=n?he=>n(he,{...N.userNode}):void 0,z=r?he=>r(he,{...N.userNode}):void 0,G=i?he=>i(he,{...N.userNode}):void 0,Z=o?he=>o(he,{...N.userNode}):void 0,ee=l?he=>l(he,{...N.userNode}):void 0,fe=he=>{const{selectNodesOnDrag:ae,nodeDragThreshold:ve}=P.getState();q&&(!ae||!D||ve>0)&&$w({id:e,store:P,nodeRef:R}),t&&t(he,{...N.userNode})},pe=he=>{if(!(sD(he.nativeEvent)||_)){if(K4.includes(he.key)&&q){const ae=he.key==="Escape";$w({id:e,store:P,unselect:ae,nodeRef:R})}else if(D&&O.selected&&Object.prototype.hasOwnProperty.call(Sp,he.key)){he.preventDefault();const{ariaLabelConfig:ae}=P.getState();P.setState({ariaLiveMessage:ae["node.a11yDescription.ariaLiveMessage"]({direction:he.key.replace("Arrow","").toLowerCase(),x:~~N.positionAbsolute.x,y:~~N.positionAbsolute.y})}),k({direction:Sp[he.key],factor:he.shiftKey?4:1})}}},ye=()=>{var we;if(_||!((we=R.current)!=null&&we.matches(":focus-visible")))return;const{transform:he,width:ae,height:ve,autoPanOnNodeFocus:me,setCenter:ie}=P.getState();if(!me)return;k_(new Map([[e,O]]),{x:0,y:0,width:ae,height:ve},he,!0).length>0||ie(O.position.x+I.width/2,O.position.y+I.height/2,{zoom:he[2]})};return m.jsx("div",{className:It(["react-flow__node",`react-flow__node-${T}`,{[b]:D},O.className,{selected:O.selected,selectable:q,parent:E,draggable:D,dragging:$}]),ref:R,style:{zIndex:N.z,transform:`translate(${N.positionAbsolute.x}px,${N.positionAbsolute.y}px)`,pointerEvents:V?"all":"none",visibility:Y?"visible":"hidden",...O.style,...H},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:K,onMouseMove:z,onMouseLeave:G,onContextMenu:Z,onClick:fe,onDoubleClick:ee,onKeyDown:L?pe:void 0,tabIndex:L?0:void 0,onFocus:L?ye:void 0,role:O.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":_?void 0:`${jD}-${S}`,"aria-label":O.ariaLabel,...O.domAttributes,children:m.jsx(tY,{value:e,children:m.jsx(C,{id:e,data:O.data,type:T,positionAbsoluteX:N.positionAbsolute.x,positionAbsoluteY:N.positionAbsolute.y,selected:O.selected??!1,selectable:q,draggable:D,deletable:O.deletable??!0,isConnectable:F,sourcePosition:O.sourcePosition,targetPosition:O.targetPosition,dragging:$,dragHandle:O.dragHandle,zIndex:N.z,parentId:O.parentId,...I})})})}var xY=U.memo(bY);const wY=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function LD(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:o}=Xe(wY,St),l=yY(e.onlyRenderVisibleElements),c=gY();return m.jsx("div",{className:"react-flow__nodes",style:Ry,children:l.map(f=>m.jsx(xY,{id:f,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:i,nodeClickDistance:e.nodeClickDistance,onError:o},f))})}LD.displayName="NodeRenderer";const SY=U.memo(LD);function _Y(e){return Xe(U.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const o=n.nodeLookup.get(i.source),l=n.nodeLookup.get(i.target);o&&l&&wG({sourceNode:o,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),St)}const AY=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return m.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},OY=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return m.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},dT={[_l.Arrow]:AY,[_l.ArrowClosed]:OY};function jY(e){const t=_t();return U.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(dT,e)?dT[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",Fr.error009(e)),null)},[e])}const EY=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:o="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const f=jY(t);return f?m.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:o,orient:c,refX:"0",refY:"0",children:m.jsx(f,{color:n,strokeWidth:l})}):null},zD=({defaultColor:e,rfId:t})=>{const n=Xe(o=>o.edges),r=Xe(o=>o.defaultEdgeOptions),i=U.useMemo(()=>TG(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?m.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:m.jsx("defs",{children:i.map(o=>m.jsx(EY,{id:o.id,type:o.type,color:o.color,width:o.width,height:o.height,markerUnits:o.markerUnits,strokeWidth:o.strokeWidth,orient:o.orient},o.id))})}):null};zD.displayName="MarkerDefinitions";var NY=U.memo(zD);function BD({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:o,labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:f,className:d,...y}){const[p,g]=U.useState({x:1,y:0,width:0,height:0}),b=It(["react-flow__edge-textwrapper",d]),_=U.useRef(null);return U.useEffect(()=>{if(_.current){const S=_.current.getBBox();g({x:S.x,y:S.y,width:S.width,height:S.height})}},[n]),n?m.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:b,visibility:p.width?"visible":"hidden",...y,children:[i&&m.jsx("rect",{width:p.width+2*l[0],x:-l[0],y:-l[1],height:p.height+2*l[1],className:"react-flow__edge-textbg",style:o,rx:c,ry:c}),m.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:_,style:r,children:n}),f]}):null}BD.displayName="EdgeText";const TY=U.memo(BD);function Py({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:f,interactionWidth:d=20,...y}){return m.jsxs(m.Fragment,{children:[m.jsx("path",{...y,d:e,fill:"none",className:It(["react-flow__edge-path",y.className])}),d?m.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&jr(t)&&jr(n)?m.jsx(TY,{x:t,y:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:f}):null]})}function hT({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===je.Left||e===je.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function ID({sourceX:e,sourceY:t,sourcePosition:n=je.Bottom,targetX:r,targetY:i,targetPosition:o=je.Top}){const[l,c]=hT({pos:n,x1:e,y1:t,x2:r,y2:i}),[f,d]=hT({pos:o,x1:r,y1:i,x2:e,y2:t}),[y,p,g,b]=uD({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:c,targetControlX:f,targetControlY:d});return[`M${e},${t} C${l},${c} ${f},${d} ${r},${i}`,y,p,g,b]}function UD(e){return U.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:l,targetPosition:c,label:f,labelStyle:d,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:b,style:_,markerEnd:S,markerStart:x,interactionWidth:A})=>{const[j,O,N]=ID({sourceX:n,sourceY:r,sourcePosition:l,targetX:i,targetY:o,targetPosition:c}),E=e.isInternal?void 0:t;return m.jsx(Py,{id:E,path:j,labelX:O,labelY:N,label:f,labelStyle:d,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:b,style:_,markerEnd:S,markerStart:x,interactionWidth:A})})}const CY=UD({isInternal:!1}),HD=UD({isInternal:!0});CY.displayName="SimpleBezierEdge";HD.displayName="SimpleBezierEdgeInternal";function VD(e){return U.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:p,style:g,sourcePosition:b=je.Bottom,targetPosition:_=je.Top,markerEnd:S,markerStart:x,pathOptions:A,interactionWidth:j})=>{const[O,N,E]=kw({sourceX:n,sourceY:r,sourcePosition:b,targetX:i,targetY:o,targetPosition:_,borderRadius:A==null?void 0:A.borderRadius,offset:A==null?void 0:A.offset,stepPosition:A==null?void 0:A.stepPosition}),T=e.isInternal?void 0:t;return m.jsx(Py,{id:T,path:O,labelX:N,labelY:E,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:p,style:g,markerEnd:S,markerStart:x,interactionWidth:j})})}const GD=VD({isInternal:!1}),FD=VD({isInternal:!0});GD.displayName="SmoothStepEdge";FD.displayName="SmoothStepEdgeInternal";function YD(e){return U.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return m.jsx(GD,{...n,id:r,pathOptions:U.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const MY=YD({isInternal:!1}),XD=YD({isInternal:!0});MY.displayName="StepEdge";XD.displayName="StepEdgeInternal";function KD(e){return U.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:_,interactionWidth:S})=>{const[x,A,j]=dD({sourceX:n,sourceY:r,targetX:i,targetY:o}),O=e.isInternal?void 0:t;return m.jsx(Py,{id:O,path:x,labelX:A,labelY:j,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:p,style:g,markerEnd:b,markerStart:_,interactionWidth:S})})}const kY=KD({isInternal:!1}),WD=KD({isInternal:!0});kY.displayName="StraightEdge";WD.displayName="StraightEdgeInternal";function QD(e){return U.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:l=je.Bottom,targetPosition:c=je.Top,label:f,labelStyle:d,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:b,style:_,markerEnd:S,markerStart:x,pathOptions:A,interactionWidth:j})=>{const[O,N,E]=cD({sourceX:n,sourceY:r,sourcePosition:l,targetX:i,targetY:o,targetPosition:c,curvature:A==null?void 0:A.curvature}),T=e.isInternal?void 0:t;return m.jsx(Py,{id:T,path:O,labelX:N,labelY:E,label:f,labelStyle:d,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:b,style:_,markerEnd:S,markerStart:x,interactionWidth:j})})}const RY=QD({isInternal:!1}),ZD=QD({isInternal:!0});RY.displayName="BezierEdge";ZD.displayName="BezierEdgeInternal";const pT={default:ZD,straight:WD,step:XD,smoothstep:FD,simplebezier:HD},yT={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},PY=(e,t,n)=>n===je.Left?e-t:n===je.Right?e+t:e,DY=(e,t,n)=>n===je.Top?e-t:n===je.Bottom?e+t:e,mT="react-flow__edgeupdater";function gT({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:l,type:c}){return m.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:l,className:It([mT,`${mT}-${c}`]),cx:PY(t,r,e),cy:DY(n,r,e),r,stroke:"transparent",fill:"transparent"})}function $Y({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:o,targetY:l,sourcePosition:c,targetPosition:f,onReconnect:d,onReconnectStart:y,onReconnectEnd:p,setReconnecting:g,setUpdateHover:b}){const _=_t(),S=(N,E)=>{if(N.button!==0)return;const{autoPanOnConnect:T,domNode:C,isValidConnection:D,connectionMode:q,connectionRadius:F,lib:L,onConnectStart:P,onConnectEnd:Y,cancelConnection:R,nodeLookup:$,rfId:k,panBy:I,updateConnection:H}=_.getState(),V=E.type==="target",K=(Z,ee)=>{g(!1),p==null||p(Z,n,E.type,ee)},z=Z=>d==null?void 0:d(n,Z),G=(Z,ee)=>{g(!0),y==null||y(N,n,E.type),P==null||P(Z,ee)};Dw.onPointerDown(N.nativeEvent,{autoPanOnConnect:T,connectionMode:q,connectionRadius:F,domNode:C,handleId:E.id,nodeId:E.nodeId,nodeLookup:$,isTarget:V,edgeUpdaterType:E.type,lib:L,flowId:k,cancelConnection:R,panBy:I,isValidConnection:D,onConnect:z,onConnectStart:G,onConnectEnd:Y,onReconnectEnd:K,updateConnection:H,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:N.currentTarget})},x=N=>S(N,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),A=N=>S(N,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),j=()=>b(!0),O=()=>b(!1);return m.jsxs(m.Fragment,{children:[(e===!0||e==="source")&&m.jsx(gT,{position:c,centerX:r,centerY:i,radius:t,onMouseDown:x,onMouseEnter:j,onMouseOut:O,type:"source"}),(e===!0||e==="target")&&m.jsx(gT,{position:f,centerX:o,centerY:l,radius:t,onMouseDown:A,onMouseEnter:j,onMouseOut:O,type:"target"})]})}function qY({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:o,onContextMenu:l,onMouseEnter:c,onMouseMove:f,onMouseLeave:d,reconnectRadius:y,onReconnect:p,onReconnectStart:g,onReconnectEnd:b,rfId:_,edgeTypes:S,noPanClassName:x,onError:A,disableKeyboardA11y:j}){let O=Xe(ie=>ie.edgeLookup.get(e));const N=Xe(ie=>ie.defaultEdgeOptions);O=N?{...N,...O}:O;let E=O.type||"default",T=(S==null?void 0:S[E])||pT[E];T===void 0&&(A==null||A("011",Fr.error011(E)),E="default",T=(S==null?void 0:S.default)||pT.default);const C=!!(O.focusable||t&&typeof O.focusable>"u"),D=typeof p<"u"&&(O.reconnectable||n&&typeof O.reconnectable>"u"),q=!!(O.selectable||r&&typeof O.selectable>"u"),F=U.useRef(null),[L,P]=U.useState(!1),[Y,R]=U.useState(!1),$=_t(),{zIndex:k,sourceX:I,sourceY:H,targetX:V,targetY:K,sourcePosition:z,targetPosition:G}=Xe(U.useCallback(ie=>{const xe=ie.nodeLookup.get(O.source),we=ie.nodeLookup.get(O.target);if(!xe||!we)return{zIndex:O.zIndex,...yT};const Me=NG({id:e,sourceNode:xe,targetNode:we,sourceHandle:O.sourceHandle||null,targetHandle:O.targetHandle||null,connectionMode:ie.connectionMode,onError:A});return{zIndex:xG({selected:O.selected,zIndex:O.zIndex,sourceNode:xe,targetNode:we,elevateOnSelect:ie.elevateEdgesOnSelect,zIndexMode:ie.zIndexMode}),...Me||yT}},[O.source,O.target,O.sourceHandle,O.targetHandle,O.selected,O.zIndex]),St),Z=U.useMemo(()=>O.markerStart?`url('#${Rw(O.markerStart,_)}')`:void 0,[O.markerStart,_]),ee=U.useMemo(()=>O.markerEnd?`url('#${Rw(O.markerEnd,_)}')`:void 0,[O.markerEnd,_]);if(O.hidden||I===null||H===null||V===null||K===null)return null;const fe=ie=>{var Ee;const{addSelectedEdges:xe,unselectNodesAndEdges:we,multiSelectionActive:Me}=$.getState();q&&($.setState({nodesSelectionActive:!1}),O.selected&&Me?(we({nodes:[],edges:[O]}),(Ee=F.current)==null||Ee.blur()):xe([e])),i&&i(ie,O)},pe=o?ie=>{o(ie,{...O})}:void 0,ye=l?ie=>{l(ie,{...O})}:void 0,he=c?ie=>{c(ie,{...O})}:void 0,ae=f?ie=>{f(ie,{...O})}:void 0,ve=d?ie=>{d(ie,{...O})}:void 0,me=ie=>{var xe;if(!j&&K4.includes(ie.key)&&q){const{unselectNodesAndEdges:we,addSelectedEdges:Me}=$.getState();ie.key==="Escape"?((xe=F.current)==null||xe.blur(),we({edges:[O]})):Me([e])}};return m.jsx("svg",{style:{zIndex:k},children:m.jsxs("g",{className:It(["react-flow__edge",`react-flow__edge-${E}`,O.className,x,{selected:O.selected,animated:O.animated,inactive:!q&&!i,updating:L,selectable:q}]),onClick:fe,onDoubleClick:pe,onContextMenu:ye,onMouseEnter:he,onMouseMove:ae,onMouseLeave:ve,onKeyDown:C?me:void 0,tabIndex:C?0:void 0,role:O.ariaRole??(C?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":O.ariaLabel===null?void 0:O.ariaLabel||`Edge from ${O.source} to ${O.target}`,"aria-describedby":C?`${ED}-${_}`:void 0,ref:F,...O.domAttributes,children:[!Y&&m.jsx(T,{id:e,source:O.source,target:O.target,type:O.type,selected:O.selected,animated:O.animated,selectable:q,deletable:O.deletable??!0,label:O.label,labelStyle:O.labelStyle,labelShowBg:O.labelShowBg,labelBgStyle:O.labelBgStyle,labelBgPadding:O.labelBgPadding,labelBgBorderRadius:O.labelBgBorderRadius,sourceX:I,sourceY:H,targetX:V,targetY:K,sourcePosition:z,targetPosition:G,data:O.data,style:O.style,sourceHandleId:O.sourceHandle,targetHandleId:O.targetHandle,markerStart:Z,markerEnd:ee,pathOptions:"pathOptions"in O?O.pathOptions:void 0,interactionWidth:O.interactionWidth}),D&&m.jsx($Y,{edge:O,isReconnectable:D,reconnectRadius:y,onReconnect:p,onReconnectStart:g,onReconnectEnd:b,sourceX:I,sourceY:H,targetX:V,targetY:K,sourcePosition:z,targetPosition:G,setUpdateHover:P,setReconnecting:R})]})})}var LY=U.memo(qY);const zY=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function JD({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:o,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:f,onEdgeMouseLeave:d,onEdgeClick:y,reconnectRadius:p,onEdgeDoubleClick:g,onReconnectStart:b,onReconnectEnd:_,disableKeyboardA11y:S}){const{edgesFocusable:x,edgesReconnectable:A,elementsSelectable:j,onError:O}=Xe(zY,St),N=_Y(t);return m.jsxs("div",{className:"react-flow__edges",children:[m.jsx(NY,{defaultColor:e,rfId:n}),N.map(E=>m.jsx(LY,{id:E,edgesFocusable:x,edgesReconnectable:A,elementsSelectable:j,noPanClassName:i,onReconnect:o,onContextMenu:l,onMouseEnter:c,onMouseMove:f,onMouseLeave:d,onClick:y,reconnectRadius:p,onDoubleClick:g,onReconnectStart:b,onReconnectEnd:_,rfId:n,onError:O,edgeTypes:r,disableKeyboardA11y:S},E))]})}JD.displayName="EdgeRenderer";const BY=U.memo(JD),IY=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function UY({children:e}){const t=Xe(IY);return m.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function HY(e){const t=B_(),n=U.useRef(!1);U.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const VY=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function GY(e){const t=Xe(VY),n=_t();return U.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function FY(e){return e.connection.inProgress?{...e.connection,to:Hf(e.connection.to,e.transform)}:{...e.connection}}function YY(e){return FY}function XY(e){const t=YY();return Xe(t,St)}const KY=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function WY({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:o,height:l,isValid:c,inProgress:f}=Xe(KY,St);return!(o&&i&&f)?null:m.jsx("svg",{style:e,width:o,height:l,className:"react-flow__connectionline react-flow__container",children:m.jsx("g",{className:It(["react-flow__connection",Z4(c)]),children:m.jsx(e8,{style:t,type:n,CustomComponent:r,isValid:c})})})}const e8=({style:e,type:t=Ma.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:o,fromNode:l,fromHandle:c,fromPosition:f,to:d,toNode:y,toHandle:p,toPosition:g,pointer:b}=XY();if(!i)return;if(n)return m.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:c,fromX:o.x,fromY:o.y,toX:d.x,toY:d.y,fromPosition:f,toPosition:g,connectionStatus:Z4(r),toNode:y,toHandle:p,pointer:b});let _="";const S={sourceX:o.x,sourceY:o.y,sourcePosition:f,targetX:d.x,targetY:d.y,targetPosition:g};switch(t){case Ma.Bezier:[_]=cD(S);break;case Ma.SimpleBezier:[_]=ID(S);break;case Ma.Step:[_]=kw({...S,borderRadius:0});break;case Ma.SmoothStep:[_]=kw(S);break;default:[_]=dD(S)}return m.jsx("path",{d:_,fill:"none",className:"react-flow__connection-path",style:e})};e8.displayName="ConnectionLine";const QY={};function vT(e=QY){U.useRef(e),_t(),U.useEffect(()=>{},[e])}function ZY(){_t(),U.useRef(!1),U.useEffect(()=>{},[])}function t8({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:o,onEdgeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:y,onSelectionContextMenu:p,onSelectionStart:g,onSelectionEnd:b,connectionLineType:_,connectionLineStyle:S,connectionLineComponent:x,connectionLineContainerStyle:A,selectionKeyCode:j,selectionOnDrag:O,selectionMode:N,multiSelectionKeyCode:E,panActivationKeyCode:T,zoomActivationKeyCode:C,deleteKeyCode:D,onlyRenderVisibleElements:q,elementsSelectable:F,defaultViewport:L,translateExtent:P,minZoom:Y,maxZoom:R,preventScrolling:$,defaultMarkerColor:k,zoomOnScroll:I,zoomOnPinch:H,panOnScroll:V,panOnScrollSpeed:K,panOnScrollMode:z,zoomOnDoubleClick:G,panOnDrag:Z,onPaneClick:ee,onPaneMouseEnter:fe,onPaneMouseMove:pe,onPaneMouseLeave:ye,onPaneScroll:he,onPaneContextMenu:ae,paneClickDistance:ve,nodeClickDistance:me,onEdgeContextMenu:ie,onEdgeMouseEnter:xe,onEdgeMouseMove:we,onEdgeMouseLeave:Me,reconnectRadius:Ee,onReconnect:Ke,onReconnectStart:Ct,onReconnectEnd:Mt,noDragClassName:sn,noWheelClassName:en,noPanClassName:pn,disableKeyboardA11y:fr,nodeExtent:kt,rfId:Zr,viewport:Jr,onViewportChange:Fi}){return vT(e),vT(t),ZY(),HY(n),GY(Jr),m.jsx(hY,{onPaneClick:ee,onPaneMouseEnter:fe,onPaneMouseMove:pe,onPaneMouseLeave:ye,onPaneContextMenu:ae,onPaneScroll:he,paneClickDistance:ve,deleteKeyCode:D,selectionKeyCode:j,selectionOnDrag:O,selectionMode:N,onSelectionStart:g,onSelectionEnd:b,multiSelectionKeyCode:E,panActivationKeyCode:T,zoomActivationKeyCode:C,elementsSelectable:F,zoomOnScroll:I,zoomOnPinch:H,zoomOnDoubleClick:G,panOnScroll:V,panOnScrollSpeed:K,panOnScrollMode:z,panOnDrag:Z,defaultViewport:L,translateExtent:P,minZoom:Y,maxZoom:R,onSelectionContextMenu:p,preventScrolling:$,noDragClassName:sn,noWheelClassName:en,noPanClassName:pn,disableKeyboardA11y:fr,onViewportChange:Fi,isControlledViewport:!!Jr,children:m.jsxs(UY,{children:[m.jsx(BY,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Ke,onReconnectStart:Ct,onReconnectEnd:Mt,onlyRenderVisibleElements:q,onEdgeContextMenu:ie,onEdgeMouseEnter:xe,onEdgeMouseMove:we,onEdgeMouseLeave:Me,reconnectRadius:Ee,defaultMarkerColor:k,noPanClassName:pn,disableKeyboardA11y:fr,rfId:Zr}),m.jsx(WY,{style:S,type:_,component:x,containerStyle:A}),m.jsx("div",{className:"react-flow__edgelabel-renderer"}),m.jsx(SY,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:y,nodeClickDistance:me,onlyRenderVisibleElements:q,noPanClassName:pn,noDragClassName:sn,disableKeyboardA11y:fr,nodeExtent:kt,rfId:Zr}),m.jsx("div",{className:"react-flow__viewport-portal"})]})})}t8.displayName="GraphView";const JY=U.memo(t8),bT=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:l,fitViewOptions:c,minZoom:f=.5,maxZoom:d=2,nodeOrigin:y,nodeExtent:p,zIndexMode:g="basic"}={})=>{const b=new Map,_=new Map,S=new Map,x=new Map,A=r??t??[],j=n??e??[],O=y??[0,0],N=p??Gc;yD(S,x,A);const E=Pw(j,b,_,{nodeOrigin:O,nodeExtent:N,zIndexMode:g});let T=[0,0,1];if(l&&i&&o){const C=If(b,{filter:L=>!!((L.width||L.initialWidth)&&(L.height||L.initialHeight))}),{x:D,y:q,zoom:F}=R_(C,i,o,f,d,(c==null?void 0:c.padding)??.1);T=[D,q,F]}return{rfId:"1",width:i??0,height:o??0,transform:T,nodes:j,nodesInitialized:E,nodeLookup:b,parentLookup:_,edges:A,edgeLookup:x,connectionLookup:S,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:f,maxZoom:d,translateExtent:Gc,nodeExtent:N,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Sl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:O,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:c,fitViewResolver:null,connection:{...Q4},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:pG,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:W4,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},eX=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:l,fitViewOptions:c,minZoom:f,maxZoom:d,nodeOrigin:y,nodeExtent:p,zIndexMode:g})=>vF((b,_)=>{async function S(){const{nodeLookup:x,panZoom:A,fitViewOptions:j,fitViewResolver:O,width:N,height:E,minZoom:T,maxZoom:C}=_();A&&(await dG({nodes:x,width:N,height:E,panZoom:A,minZoom:T,maxZoom:C},j),O==null||O.resolve(!0),b({fitViewResolver:null}))}return{...bT({nodes:e,edges:t,width:i,height:o,fitView:l,fitViewOptions:c,minZoom:f,maxZoom:d,nodeOrigin:y,nodeExtent:p,defaultNodes:n,defaultEdges:r,zIndexMode:g}),setNodes:x=>{const{nodeLookup:A,parentLookup:j,nodeOrigin:O,elevateNodesOnSelect:N,fitViewQueued:E,zIndexMode:T}=_(),C=Pw(x,A,j,{nodeOrigin:O,nodeExtent:p,elevateNodesOnSelect:N,checkEquality:!0,zIndexMode:T});E&&C?(S(),b({nodes:x,nodesInitialized:C,fitViewQueued:!1,fitViewOptions:void 0})):b({nodes:x,nodesInitialized:C})},setEdges:x=>{const{connectionLookup:A,edgeLookup:j}=_();yD(A,j,x),b({edges:x})},setDefaultNodesAndEdges:(x,A)=>{if(x){const{setNodes:j}=_();j(x),b({hasDefaultNodes:!0})}if(A){const{setEdges:j}=_();j(A),b({hasDefaultEdges:!0})}},updateNodeInternals:x=>{const{triggerNodeChanges:A,nodeLookup:j,parentLookup:O,domNode:N,nodeOrigin:E,nodeExtent:T,debug:C,fitViewQueued:D,zIndexMode:q}=_(),{changes:F,updatedInternals:L}=$G(x,j,O,N,E,T,q);L&&(kG(j,O,{nodeOrigin:E,nodeExtent:T,zIndexMode:q}),D?(S(),b({fitViewQueued:!1,fitViewOptions:void 0})):b({}),(F==null?void 0:F.length)>0&&(C&&console.log("React Flow: trigger node changes",F),A==null||A(F)))},updateNodePositions:(x,A=!1)=>{const j=[];let O=[];const{nodeLookup:N,triggerNodeChanges:E,connection:T,updateConnection:C,onNodesChangeMiddlewareMap:D}=_();for(const[q,F]of x){const L=N.get(q),P=!!(L!=null&&L.expandParent&&(L!=null&&L.parentId)&&(F!=null&&F.position)),Y={id:q,type:"position",position:P?{x:Math.max(0,F.position.x),y:Math.max(0,F.position.y)}:F.position,dragging:A};if(L&&T.inProgress&&T.fromNode.id===L.id){const R=Vo(L,T.fromHandle,je.Left,!0);C({...T,from:R})}P&&L.parentId&&j.push({id:q,parentId:L.parentId,rect:{...F.internals.positionAbsolute,width:F.measured.width??0,height:F.measured.height??0}}),O.push(Y)}if(j.length>0){const{parentLookup:q,nodeOrigin:F}=_(),L=z_(j,N,q,F);O.push(...L)}for(const q of D.values())O=q(O);E(O)},triggerNodeChanges:x=>{const{onNodesChange:A,setNodes:j,nodes:O,hasDefaultNodes:N,debug:E}=_();if(x!=null&&x.length){if(N){const T=CD(x,O);j(T)}E&&console.log("React Flow: trigger node changes",x),A==null||A(x)}},triggerEdgeChanges:x=>{const{onEdgesChange:A,setEdges:j,edges:O,hasDefaultEdges:N,debug:E}=_();if(x!=null&&x.length){if(N){const T=MD(x,O);j(T)}E&&console.log("React Flow: trigger edge changes",x),A==null||A(x)}},addSelectedNodes:x=>{const{multiSelectionActive:A,edgeLookup:j,nodeLookup:O,triggerNodeChanges:N,triggerEdgeChanges:E}=_();if(A){const T=x.map(C=>So(C,!0));N(T);return}N(Zs(O,new Set([...x]),!0)),E(Zs(j))},addSelectedEdges:x=>{const{multiSelectionActive:A,edgeLookup:j,nodeLookup:O,triggerNodeChanges:N,triggerEdgeChanges:E}=_();if(A){const T=x.map(C=>So(C,!0));E(T);return}E(Zs(j,new Set([...x]))),N(Zs(O,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:A}={})=>{const{edges:j,nodes:O,nodeLookup:N,triggerNodeChanges:E,triggerEdgeChanges:T}=_(),C=x||O,D=A||j,q=C.map(L=>{const P=N.get(L.id);return P&&(P.selected=!1),So(L.id,!1)}),F=D.map(L=>So(L.id,!1));E(q),T(F)},setMinZoom:x=>{const{panZoom:A,maxZoom:j}=_();A==null||A.setScaleExtent([x,j]),b({minZoom:x})},setMaxZoom:x=>{const{panZoom:A,minZoom:j}=_();A==null||A.setScaleExtent([j,x]),b({maxZoom:x})},setTranslateExtent:x=>{var A;(A=_().panZoom)==null||A.setTranslateExtent(x),b({translateExtent:x})},resetSelectedElements:()=>{const{edges:x,nodes:A,triggerNodeChanges:j,triggerEdgeChanges:O,elementsSelectable:N}=_();if(!N)return;const E=A.reduce((C,D)=>D.selected?[...C,So(D.id,!1)]:C,[]),T=x.reduce((C,D)=>D.selected?[...C,So(D.id,!1)]:C,[]);j(E),O(T)},setNodeExtent:x=>{const{nodes:A,nodeLookup:j,parentLookup:O,nodeOrigin:N,elevateNodesOnSelect:E,nodeExtent:T,zIndexMode:C}=_();x[0][0]===T[0][0]&&x[0][1]===T[0][1]&&x[1][0]===T[1][0]&&x[1][1]===T[1][1]||(Pw(A,j,O,{nodeOrigin:N,nodeExtent:x,elevateNodesOnSelect:E,checkEquality:!1,zIndexMode:C}),b({nodeExtent:x}))},panBy:x=>{const{transform:A,width:j,height:O,panZoom:N,translateExtent:E}=_();return qG({delta:x,panZoom:N,transform:A,translateExtent:E,width:j,height:O})},setCenter:async(x,A,j)=>{const{width:O,height:N,maxZoom:E,panZoom:T}=_();if(!T)return Promise.resolve(!1);const C=typeof(j==null?void 0:j.zoom)<"u"?j.zoom:E;return await T.setViewport({x:O/2-x*C,y:N/2-A*C,zoom:C},{duration:j==null?void 0:j.duration,ease:j==null?void 0:j.ease,interpolate:j==null?void 0:j.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{b({connection:{...Q4}})},updateConnection:x=>{b({connection:x})},reset:()=>b({...bT()})}},Object.is);function tX({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:o,initialMinZoom:l,initialMaxZoom:c,initialFitViewOptions:f,fitView:d,nodeOrigin:y,nodeExtent:p,zIndexMode:g,children:b}){const[_]=U.useState(()=>eX({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:o,fitView:d,minZoom:l,maxZoom:c,fitViewOptions:f,nodeOrigin:y,nodeExtent:p,zIndexMode:g}));return m.jsx(bF,{value:_,children:m.jsx(UF,{children:b})})}function nX({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:o,height:l,fitView:c,fitViewOptions:f,minZoom:d,maxZoom:y,nodeOrigin:p,nodeExtent:g,zIndexMode:b}){return U.useContext(My)?m.jsx(m.Fragment,{children:e}):m.jsx(tX,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:o,initialHeight:l,fitView:c,initialFitViewOptions:f,initialMinZoom:d,initialMaxZoom:y,nodeOrigin:p,nodeExtent:g,zIndexMode:b,children:e})}const rX={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function iX({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:o,edgeTypes:l,onNodeClick:c,onEdgeClick:f,onInit:d,onMove:y,onMoveStart:p,onMoveEnd:g,onConnect:b,onConnectStart:_,onConnectEnd:S,onClickConnectStart:x,onClickConnectEnd:A,onNodeMouseEnter:j,onNodeMouseMove:O,onNodeMouseLeave:N,onNodeContextMenu:E,onNodeDoubleClick:T,onNodeDragStart:C,onNodeDrag:D,onNodeDragStop:q,onNodesDelete:F,onEdgesDelete:L,onDelete:P,onSelectionChange:Y,onSelectionDragStart:R,onSelectionDrag:$,onSelectionDragStop:k,onSelectionContextMenu:I,onSelectionStart:H,onSelectionEnd:V,onBeforeDelete:K,connectionMode:z,connectionLineType:G=Ma.Bezier,connectionLineStyle:Z,connectionLineComponent:ee,connectionLineContainerStyle:fe,deleteKeyCode:pe="Backspace",selectionKeyCode:ye="Shift",selectionOnDrag:he=!1,selectionMode:ae=Fc.Full,panActivationKeyCode:ve="Space",multiSelectionKeyCode:me=Xc()?"Meta":"Control",zoomActivationKeyCode:ie=Xc()?"Meta":"Control",snapToGrid:xe,snapGrid:we,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:Ee,nodesDraggable:Ke,autoPanOnNodeFocus:Ct,nodesConnectable:Mt,nodesFocusable:sn,nodeOrigin:en=ND,edgesFocusable:pn,edgesReconnectable:fr,elementsSelectable:kt=!0,defaultViewport:Zr=kF,minZoom:Jr=.5,maxZoom:Fi=2,translateExtent:Xa=Gc,preventScrolling:xm=!0,nodeExtent:is,defaultMarkerColor:wm="#b1b1b7",zoomOnScroll:Sm=!0,zoomOnPinch:Ka=!0,panOnScroll:yn=!1,panOnScrollSpeed:Mr=.5,panOnScrollMode:mn=Lo.Free,zoomOnDoubleClick:_m=!0,panOnDrag:Am=!0,onPaneClick:Om,onPaneMouseEnter:as,onPaneMouseMove:os,onPaneMouseLeave:ss,onPaneScroll:ei,onPaneContextMenu:ls,paneClickDistance:Wa=1,nodeClickDistance:jm=0,children:Qf,onReconnect:du,onReconnectStart:Qa,onReconnectEnd:Em,onEdgeContextMenu:Zf,onEdgeDoubleClick:Jf,onEdgeMouseEnter:ed,onEdgeMouseMove:hu,onEdgeMouseLeave:pu,reconnectRadius:td=10,onNodesChange:nd,onEdgesChange:kr,noDragClassName:Ut="nodrag",noWheelClassName:ln="nowheel",noPanClassName:ti="nopan",fitView:us,fitViewOptions:rd,connectOnClick:Nm,attributionPosition:id,proOptions:Za,defaultEdgeOptions:yu,elevateNodesOnSelect:Yi=!0,elevateEdgesOnSelect:Xi=!1,disableKeyboardA11y:Ki=!1,autoPanOnConnect:Wi,autoPanOnNodeDrag:Rt,autoPanSpeed:ad,connectionRadius:od,isValidConnection:ni,onError:Qi,style:Tm,id:mu,nodeDragThreshold:sd,connectionDragThreshold:Cm,viewport:cs,onViewportChange:fs,width:dr,height:_n,colorMode:ld="light",debug:Mm,onScroll:Zi,ariaLabelConfig:ud,zIndexMode:Ja="basic",...km},An){const eo=mu||"1",cd=$F(ld),gu=U.useCallback(ri=>{ri.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Zi==null||Zi(ri)},[Zi]);return m.jsx("div",{"data-testid":"rf__wrapper",...km,onScroll:gu,style:{...Tm,...rX},ref:An,className:It(["react-flow",i,cd]),id:mu,role:"application",children:m.jsxs(nX,{nodes:e,edges:t,width:dr,height:_n,fitView:us,fitViewOptions:rd,minZoom:Jr,maxZoom:Fi,nodeOrigin:en,nodeExtent:is,zIndexMode:Ja,children:[m.jsx(JY,{onInit:d,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:j,onNodeMouseMove:O,onNodeMouseLeave:N,onNodeContextMenu:E,onNodeDoubleClick:T,nodeTypes:o,edgeTypes:l,connectionLineType:G,connectionLineStyle:Z,connectionLineComponent:ee,connectionLineContainerStyle:fe,selectionKeyCode:ye,selectionOnDrag:he,selectionMode:ae,deleteKeyCode:pe,multiSelectionKeyCode:me,panActivationKeyCode:ve,zoomActivationKeyCode:ie,onlyRenderVisibleElements:Me,defaultViewport:Zr,translateExtent:Xa,minZoom:Jr,maxZoom:Fi,preventScrolling:xm,zoomOnScroll:Sm,zoomOnPinch:Ka,zoomOnDoubleClick:_m,panOnScroll:yn,panOnScrollSpeed:Mr,panOnScrollMode:mn,panOnDrag:Am,onPaneClick:Om,onPaneMouseEnter:as,onPaneMouseMove:os,onPaneMouseLeave:ss,onPaneScroll:ei,onPaneContextMenu:ls,paneClickDistance:Wa,nodeClickDistance:jm,onSelectionContextMenu:I,onSelectionStart:H,onSelectionEnd:V,onReconnect:du,onReconnectStart:Qa,onReconnectEnd:Em,onEdgeContextMenu:Zf,onEdgeDoubleClick:Jf,onEdgeMouseEnter:ed,onEdgeMouseMove:hu,onEdgeMouseLeave:pu,reconnectRadius:td,defaultMarkerColor:wm,noDragClassName:Ut,noWheelClassName:ln,noPanClassName:ti,rfId:eo,disableKeyboardA11y:Ki,nodeExtent:is,viewport:cs,onViewportChange:fs}),m.jsx(DF,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:b,onConnectStart:_,onConnectEnd:S,onClickConnectStart:x,onClickConnectEnd:A,nodesDraggable:Ke,autoPanOnNodeFocus:Ct,nodesConnectable:Mt,nodesFocusable:sn,edgesFocusable:pn,edgesReconnectable:fr,elementsSelectable:kt,elevateNodesOnSelect:Yi,elevateEdgesOnSelect:Xi,minZoom:Jr,maxZoom:Fi,nodeExtent:is,onNodesChange:nd,onEdgesChange:kr,snapToGrid:xe,snapGrid:we,connectionMode:z,translateExtent:Xa,connectOnClick:Nm,defaultEdgeOptions:yu,fitView:us,fitViewOptions:rd,onNodesDelete:F,onEdgesDelete:L,onDelete:P,onNodeDragStart:C,onNodeDrag:D,onNodeDragStop:q,onSelectionDrag:$,onSelectionDragStart:R,onSelectionDragStop:k,onMove:y,onMoveStart:p,onMoveEnd:g,noPanClassName:ti,nodeOrigin:en,rfId:eo,autoPanOnConnect:Wi,autoPanOnNodeDrag:Rt,autoPanSpeed:ad,onError:Qi,connectionRadius:od,isValidConnection:ni,selectNodesOnDrag:Ee,nodeDragThreshold:sd,connectionDragThreshold:Cm,onBeforeDelete:K,debug:Mm,ariaLabelConfig:ud,zIndexMode:Ja}),m.jsx(MF,{onSelectionChange:Y}),Qf,m.jsx(jF,{proOptions:Za,position:id}),m.jsx(OF,{rfId:eo,disableKeyboardA11y:Ki})]})})}var n8=kD(iX);function r8(e){const[t,n]=U.useState(e),r=U.useCallback(i=>n(o=>CD(i,o)),[]);return[t,n,r]}function i8(e){const[t,n]=U.useState(e),r=U.useCallback(i=>n(o=>MD(i,o)),[]);return[t,n,r]}function aX({dimensions:e,lineWidth:t,variant:n,className:r}){return m.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:It(["react-flow__background-pattern",n,r])})}function oX({radius:e,className:t}){return m.jsx("circle",{cx:e,cy:e,r:e,className:It(["react-flow__background-pattern","dots",t])})}var Ia;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ia||(Ia={}));const sX={[Ia.Dots]:1,[Ia.Lines]:1,[Ia.Cross]:6},lX=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function a8({id:e,variant:t=Ia.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=0,color:l,bgColor:c,style:f,className:d,patternClassName:y}){const p=U.useRef(null),{transform:g,patternId:b}=Xe(lX,St),_=r||sX[t],S=t===Ia.Dots,x=t===Ia.Cross,A=Array.isArray(n)?n:[n,n],j=[A[0]*g[2]||1,A[1]*g[2]||1],O=_*g[2],N=Array.isArray(o)?o:[o,o],E=x?[O,O]:j,T=[N[0]*g[2]||1+E[0]/2,N[1]*g[2]||1+E[1]/2],C=`${b}${e||""}`;return m.jsxs("svg",{className:It(["react-flow__background",d]),style:{...f,...Ry,"--xy-background-color-props":c,"--xy-background-pattern-color-props":l},ref:p,"data-testid":"rf__background",children:[m.jsx("pattern",{id:C,x:g[0]%j[0],y:g[1]%j[1],width:j[0],height:j[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${T[0]},-${T[1]})`,children:S?m.jsx(oX,{radius:O/2,className:y}):m.jsx(aX,{dimensions:E,lineWidth:i,variant:t,className:y})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${C})`})]})}a8.displayName="Background";const o8=U.memo(a8);function uX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:m.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function cX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:m.jsx("path",{d:"M0 0h32v4.2H0z"})})}function fX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:m.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 dX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.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 hX(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.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 Dh({children:e,className:t,...n}){return m.jsx("button",{type:"button",className:It(["react-flow__controls-button",t]),...n,children:e})}const pX=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function s8({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:o,onZoomOut:l,onFitView:c,onInteractiveChange:f,className:d,children:y,position:p="bottom-left",orientation:g="vertical","aria-label":b}){const _=_t(),{isInteractive:S,minZoomReached:x,maxZoomReached:A,ariaLabelConfig:j}=Xe(pX,St),{zoomIn:O,zoomOut:N,fitView:E}=B_(),T=()=>{O(),o==null||o()},C=()=>{N(),l==null||l()},D=()=>{E(i),c==null||c()},q=()=>{_.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),f==null||f(!S)},F=g==="horizontal"?"horizontal":"vertical";return m.jsxs(ky,{className:It(["react-flow__controls",F,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":b??j["controls.ariaLabel"],children:[t&&m.jsxs(m.Fragment,{children:[m.jsx(Dh,{onClick:T,className:"react-flow__controls-zoomin",title:j["controls.zoomIn.ariaLabel"],"aria-label":j["controls.zoomIn.ariaLabel"],disabled:A,children:m.jsx(uX,{})}),m.jsx(Dh,{onClick:C,className:"react-flow__controls-zoomout",title:j["controls.zoomOut.ariaLabel"],"aria-label":j["controls.zoomOut.ariaLabel"],disabled:x,children:m.jsx(cX,{})})]}),n&&m.jsx(Dh,{className:"react-flow__controls-fitview",onClick:D,title:j["controls.fitView.ariaLabel"],"aria-label":j["controls.fitView.ariaLabel"],children:m.jsx(fX,{})}),r&&m.jsx(Dh,{className:"react-flow__controls-interactive",onClick:q,title:j["controls.interactive.ariaLabel"],"aria-label":j["controls.interactive.ariaLabel"],children:S?m.jsx(hX,{}):m.jsx(dX,{})}),y]})}s8.displayName="Controls";const l8=U.memo(s8);function yX({id:e,x:t,y:n,width:r,height:i,style:o,color:l,strokeColor:c,strokeWidth:f,className:d,borderRadius:y,shapeRendering:p,selected:g,onClick:b}){const{background:_,backgroundColor:S}=o||{},x=l||_||S;return m.jsx("rect",{className:It(["react-flow__minimap-node",{selected:g},d]),x:t,y:n,rx:y,ry:y,width:r,height:i,style:{fill:x,stroke:c,strokeWidth:f},shapeRendering:p,onClick:b?A=>b(A,e):void 0})}const mX=U.memo(yX),gX=e=>e.nodes.map(t=>t.id),cv=e=>e instanceof Function?e:()=>e;function vX({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:o=mX,onClick:l}){const c=Xe(gX,St),f=cv(t),d=cv(e),y=cv(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return m.jsx(m.Fragment,{children:c.map(g=>m.jsx(xX,{id:g,nodeColorFunc:f,nodeStrokeColorFunc:d,nodeClassNameFunc:y,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:o,onClick:l,shapeRendering:p},g))})}function bX({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:o,shapeRendering:l,NodeComponent:c,onClick:f}){const{node:d,x:y,y:p,width:g,height:b}=Xe(_=>{const{internals:S}=_.nodeLookup.get(e),x=S.userNode,{x:A,y:j}=S.positionAbsolute,{width:O,height:N}=Ii(x);return{node:x,x:A,y:j,width:O,height:N}},St);return!d||d.hidden||!iD(d)?null:m.jsx(c,{x:y,y:p,width:g,height:b,style:d.style,selected:!!d.selected,className:r(d),color:t(d),borderRadius:i,strokeColor:n(d),strokeWidth:o,shapeRendering:l,onClick:f,id:d.id})}const xX=U.memo(bX);var wX=U.memo(vX);const SX=200,_X=150,AX=e=>!e.hidden,OX=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?rD(If(e.nodeLookup,{filter:AX}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},jX="react-flow__minimap-desc";function u8({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:o=5,nodeStrokeWidth:l,nodeComponent:c,bgColor:f,maskColor:d,maskStrokeColor:y,maskStrokeWidth:p,position:g="bottom-right",onClick:b,onNodeClick:_,pannable:S=!1,zoomable:x=!1,ariaLabel:A,inversePan:j,zoomStep:O=1,offsetScale:N=5}){const E=_t(),T=U.useRef(null),{boundingRect:C,viewBB:D,rfId:q,panZoom:F,translateExtent:L,flowWidth:P,flowHeight:Y,ariaLabelConfig:R}=Xe(OX,St),$=(e==null?void 0:e.width)??SX,k=(e==null?void 0:e.height)??_X,I=C.width/$,H=C.height/k,V=Math.max(I,H),K=V*$,z=V*k,G=N*V,Z=C.x-(K-C.width)/2-G,ee=C.y-(z-C.height)/2-G,fe=K+G*2,pe=z+G*2,ye=`${jX}-${q}`,he=U.useRef(0),ae=U.useRef();he.current=V,U.useEffect(()=>{if(T.current&&F)return ae.current=FG({domNode:T.current,panZoom:F,getTransform:()=>E.getState().transform,getViewScale:()=>he.current}),()=>{var xe;(xe=ae.current)==null||xe.destroy()}},[F]),U.useEffect(()=>{var xe;(xe=ae.current)==null||xe.update({translateExtent:L,width:P,height:Y,inversePan:j,pannable:S,zoomStep:O,zoomable:x})},[S,x,j,O,L,P,Y]);const ve=b?xe=>{var Ee;const[we,Me]=((Ee=ae.current)==null?void 0:Ee.pointer(xe))||[0,0];b(xe,{x:we,y:Me})}:void 0,me=_?U.useCallback((xe,we)=>{const Me=E.getState().nodeLookup.get(we).internals.userNode;_(xe,Me)},[]):void 0,ie=A??R["minimap.ariaLabel"];return m.jsx(ky,{position:g,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-color-props":typeof y=="string"?y:void 0,"--xy-minimap-mask-stroke-width-props":typeof p=="number"?p*V: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 l=="number"?l:void 0},className:It(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:m.jsxs("svg",{width:$,height:k,viewBox:`${Z} ${ee} ${fe} ${pe}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ye,ref:T,onClick:ve,children:[ie&&m.jsx("title",{id:ye,children:ie}),m.jsx(wX,{onClick:me,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:c}),m.jsx("path",{className:"react-flow__minimap-mask",d:`M${Z-G},${ee-G}h${fe+G*2}v${pe+G*2}h${-fe-G*2}z
448
+ M${D.x},${D.y}h${D.width}v${D.height}h${-D.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}u8.displayName="MiniMap";const c8=U.memo(u8),EX=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,NX={[El.Line]:"right",[El.Handle]:"bottom-right"};function TX({nodeId:e,position:t,variant:n=El.Handle,className:r,style:i=void 0,children:o,color:l,minWidth:c=10,minHeight:f=10,maxWidth:d=Number.MAX_VALUE,maxHeight:y=Number.MAX_VALUE,keepAspectRatio:p=!1,resizeDirection:g,autoScale:b=!0,shouldResize:_,onResizeStart:S,onResize:x,onResizeEnd:A}){const j=$D(),O=typeof e=="string"?e:j,N=_t(),E=U.useRef(null),T=n===El.Handle,C=Xe(U.useCallback(EX(T&&b),[T,b]),St),D=U.useRef(null),q=t??NX[n];U.useEffect(()=>{if(!(!E.current||!O))return D.current||(D.current=oF({domNode:E.current,nodeId:O,getStoreItems:()=>{const{nodeLookup:L,transform:P,snapGrid:Y,snapToGrid:R,nodeOrigin:$,domNode:k}=N.getState();return{nodeLookup:L,transform:P,snapGrid:Y,snapToGrid:R,nodeOrigin:$,paneDomNode:k}},onChange:(L,P)=>{const{triggerNodeChanges:Y,nodeLookup:R,parentLookup:$,nodeOrigin:k}=N.getState(),I=[],H={x:L.x,y:L.y},V=R.get(O);if(V&&V.expandParent&&V.parentId){const K=V.origin??k,z=L.width??V.measured.width??0,G=L.height??V.measured.height??0,Z={id:V.id,parentId:V.parentId,rect:{width:z,height:G,...aD({x:L.x??V.position.x,y:L.y??V.position.y},{width:z,height:G},V.parentId,R,K)}},ee=z_([Z],R,$,k);I.push(...ee),H.x=L.x?Math.max(K[0]*z,L.x):void 0,H.y=L.y?Math.max(K[1]*G,L.y):void 0}if(H.x!==void 0&&H.y!==void 0){const K={id:O,type:"position",position:{...H}};I.push(K)}if(L.width!==void 0&&L.height!==void 0){const z={id:O,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};I.push(z)}for(const K of P){const z={...K,type:"position"};I.push(z)}Y(I)},onEnd:({width:L,height:P})=>{const Y={id:O,type:"dimensions",resizing:!1,dimensions:{width:L,height:P}};N.getState().triggerNodeChanges([Y])}})),D.current.update({controlPosition:q,boundaries:{minWidth:c,minHeight:f,maxWidth:d,maxHeight:y},keepAspectRatio:p,resizeDirection:g,onResizeStart:S,onResize:x,onResizeEnd:A,shouldResize:_}),()=>{var L;(L=D.current)==null||L.destroy()}},[q,c,f,d,y,p,S,x,A,_]);const F=q.split("-");return m.jsx("div",{className:It(["react-flow__resize-control","nodrag",...F,n,r]),ref:E,style:{...i,scale:C,...l&&{[T?"backgroundColor":"borderColor"]:l}},children:o})}U.memo(TX);const CX={Singleton:"text-primary-300 bg-primary-950/60 border-primary-700/50",Request:"text-amber-300 bg-amber-950/50 border-amber-700/50",Transient:"text-purple-300 bg-purple-950/50 border-purple-700/50"};function MX(e){const t=new Map;if(!e)return t;for(const n of e.bindings)t.has(n.className)||t.set(n.className,n.scope),t.has(n.serviceIdentifier)||t.set(n.serviceIdentifier,n.scope);return t}const kX={controller:$X,service:qX,provider:LX};function RX(){const{structure:e,selectedExchangeId:t,exchanges:n,routes:r,containerResolutionsByExchange:i,containerSnapshot:o}=wt(),l=U.useMemo(()=>MX(o),[o]),c=U.useMemo(()=>e?DX(e,l):{nodes:[],edges:[]},[e,l]),f=U.useMemo(()=>{var N;const x=new Set;if(!t||c.nodes.length===0)return x;const A=n.find(E=>E.id===t);if(!A)return x;const j=r.find(E=>E.method===A.request.method&&E.path===A.request.path)??((N=r.filter(E=>E.method===A.request.method).map(E=>({r:E,score:PX(E.path,A.request.path)})).filter(E=>E.score>0).sort((E,T)=>T.score-E.score)[0])==null?void 0:N.r);j&&x.add(`controller-${j.controller}`);const O=i[A.id]??[];for(const E of O){const T=E.replace(/^Symbol\(([^)]+)\)$/,"$1").trim(),C=[`service-${T}`,`provider-${T}`,`controller-${T}`];for(const D of C)c.nodes.some(q=>q.id===D)&&x.add(D)}return x},[t,n,r,i,c.nodes]),d=U.useMemo(()=>{if(f.size===0)return c;const x=c.nodes.map(j=>({...j,data:{...j.data,active:f.has(j.id)},style:{...j.style??{},opacity:f.has(j.id)?1:.25,transition:"opacity 200ms ease"}})),A=c.edges.map(j=>{const O=f.has(j.source)&&f.has(j.target);return{...j,animated:O,style:{...j.style??{},stroke:O?"#3de678":"#374151",strokeWidth:O?2:1,opacity:O?1:.3}}});return{nodes:x,edges:A}},[c,f]),[y,p,g]=r8(d.nodes),[b,_,S]=i8(d.edges);return U.useEffect(()=>{p(d.nodes)},[d.nodes,p]),U.useEffect(()=>{_(d.edges)},[d.edges,_]),e?m.jsxs("div",{className:"h-[calc(100vh-200px)] bg-gray-900 rounded-lg border border-gray-800 overflow-hidden",children:[m.jsxs(n8,{nodes:y,edges:b,onNodesChange:g,onEdgesChange:S,nodeTypes:kX,fitView:!0,minZoom:.1,maxZoom:2,defaultEdgeOptions:{type:"smoothstep",animated:!0,style:{stroke:"#4b5563"},markerEnd:{type:_l.ArrowClosed,color:"#4b5563"}},children:[m.jsx(o8,{color:"#374151",gap:20}),m.jsx(l8,{className:"!bg-gray-800 !border-gray-700",showZoom:!0,showFitView:!0,showInteractive:!1}),m.jsx(c8,{className:"!bg-gray-800",nodeColor:x=>{switch(x.type){case"controller":return"#3b82f6";case"service":return"#22c55e";case"provider":return"#a855f7";default:return"#6b7280"}}})]}),t&&f.size>0&&m.jsxs("div",{className:"absolute top-4 right-4 bg-primary-500/15 border border-primary-500/40 backdrop-blur-sm px-3 py-2 rounded-lg text-xs text-primary-200",children:["Showing the ",f.size,"-node active path for the selected request. Other components are dimmed for context."]}),m.jsxs("div",{className:"absolute bottom-4 left-4 bg-gray-900/90 backdrop-blur-sm p-4 rounded-lg border border-gray-800",children:[m.jsx("h4",{className:"text-xs font-semibold text-gray-400 uppercase tracking-wide mb-3",children:"Legend"}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-3 h-3 rounded bg-blue-500"}),m.jsx("span",{className:"text-xs text-gray-400",children:"Controller"})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-3 h-3 rounded bg-green-500"}),m.jsx("span",{className:"text-xs text-gray-400",children:"Service/UseCase"})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-3 h-3 rounded bg-purple-500"}),m.jsx("span",{className:"text-xs text-gray-400",children:"Provider"})]})]})]})]}):m.jsxs("div",{className:"flex flex-col items-center justify-center h-[600px] text-gray-500",children:[m.jsx(zX,{className:"w-12 h-12 mb-4 opacity-50"}),m.jsx("p",{className:"text-lg",children:"No architecture data available"}),m.jsx("p",{className:"text-sm mt-2",children:"Connect to the Studio Agent to view the architecture"})]})}function PX(e,t){const n=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);if(n.length!==r.length)return 0;let i=0;for(let o=0;o<n.length;o++){const l=n[o],c=r[o];if(l.startsWith(":")||l==="*")i+=1;else if(l===c)i+=2;else return 0}return i}function DX(e,t){const n=[],r=[],i=new Map,o=100,l=400,c=700,f=120;return e.controllers.forEach((d,y)=>{const p=`controller-${d.name}`;i.set(d.name,p),n.push({id:p,type:"controller",position:{x:o,y:y*f+50},data:{label:d.name,routes:d.routes.length,filePath:d.filePath,scope:t.get(d.name)}})}),e.services.forEach((d,y)=>{const p=`service-${d.name}`;i.set(d.name,p),n.push({id:p,type:"service",position:{x:l,y:y*f+50},data:{label:d.name,methods:d.methods.length,filePath:d.filePath,scope:t.get(d.name)}})}),e.providers.forEach((d,y)=>{const p=`provider-${d.name}`;i.set(d.name,p),n.push({id:p,type:"provider",position:{x:c,y:y*f+50},data:{label:d.name,methods:d.methods.length,filePath:d.filePath,scope:t.get(d.name)}})}),e.dependencies.forEach((d,y)=>{const p=i.get(d.source),g=i.get(d.target);p&&g&&r.push({id:`edge-${y}`,source:p,target:g,type:"smoothstep"})}),{nodes:n,edges:r}}const U_="ring-2 ring-primary-500 ring-offset-2 ring-offset-gray-950 shadow-[0_0_18px_rgba(61,230,120,0.35)]";function H_({filePath:e}){return e?m.jsxs("button",{onClick:t=>{t.stopPropagation(),iu({filePath:e})},className:"mt-2 flex items-center gap-1 text-[10px] text-gray-400 hover:text-primary-400 transition-colors",title:e,children:[m.jsx(Zo,{className:"w-3 h-3"}),"Open in editor"]}):null}function V_({scope:e}){if(!e)return null;const t=CX[e]??"text-gray-300 bg-gray-800 border-gray-700";return m.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium border ${t}`,title:`Binding scope: ${e}`,children:e})}function $X({data:e}){return m.jsxs("div",{className:`bg-blue-500/10 border-2 border-blue-500 rounded-lg p-4 min-w-[180px] ${e.active?U_:""}`,children:[m.jsx(Yr,{type:"target",position:je.Left,className:"!bg-blue-500"}),m.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(i4,{className:"w-4 h-4 text-blue-400"}),m.jsx("span",{className:"text-sm font-semibold text-blue-300",children:"Controller"})]}),m.jsx(V_,{scope:e.scope})]}),m.jsx("p",{className:"text-sm text-white font-mono",children:e.label}),e.routes!==void 0&&m.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:[e.routes," routes"]}),m.jsx(H_,{filePath:e.filePath}),m.jsx(Yr,{type:"source",position:je.Right,className:"!bg-blue-500"})]})}function qX({data:e}){return m.jsxs("div",{className:`bg-green-500/10 border-2 border-green-500 rounded-lg p-4 min-w-[180px] ${e.active?U_:""}`,children:[m.jsx(Yr,{type:"target",position:je.Left,className:"!bg-green-500"}),m.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(l4,{className:"w-4 h-4 text-green-400"}),m.jsx("span",{className:"text-sm font-semibold text-green-300",children:"Service"})]}),m.jsx(V_,{scope:e.scope})]}),m.jsx("p",{className:"text-sm text-white font-mono",children:e.label}),e.methods!==void 0&&m.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:[e.methods," methods"]}),m.jsx(H_,{filePath:e.filePath}),m.jsx(Yr,{type:"source",position:je.Right,className:"!bg-green-500"})]})}function LX({data:e}){return m.jsxs("div",{className:`bg-purple-500/10 border-2 border-purple-500 rounded-lg p-4 min-w-[180px] ${e.active?U_:""}`,children:[m.jsx(Yr,{type:"target",position:je.Left,className:"!bg-purple-500"}),m.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(g_,{className:"w-4 h-4 text-purple-400"}),m.jsx("span",{className:"text-sm font-semibold text-purple-300",children:"Provider"})]}),m.jsx(V_,{scope:e.scope})]}),m.jsx("p",{className:"text-sm text-white font-mono",children:e.label}),e.methods!==void 0&&m.jsxs("p",{className:"text-xs text-gray-400 mt-1",children:[e.methods," methods"]}),m.jsx(H_,{filePath:e.filePath}),m.jsx(Yr,{type:"source",position:je.Right,className:"!bg-purple-500"})]})}function zX({className:e}){return m.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[m.jsx("line",{x1:"6",y1:"3",x2:"6",y2:"15"}),m.jsx("circle",{cx:"18",cy:"6",r:"3"}),m.jsx("circle",{cx:"6",cy:"18",r:"3"}),m.jsx("path",{d:"M18 9a9 9 0 0 1-9 9"})]})}var fv,xT;function kn(){if(xT)return fv;xT=1;var e=Array.isArray;return fv=e,fv}var dv,wT;function f8(){if(wT)return dv;wT=1;var e=typeof wh=="object"&&wh&&wh.Object===Object&&wh;return dv=e,dv}var hv,ST;function Wr(){if(ST)return hv;ST=1;var e=f8(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return hv=n,hv}var pv,_T;function Vf(){if(_T)return pv;_T=1;var e=Wr(),t=e.Symbol;return pv=t,pv}var yv,AT;function BX(){if(AT)return yv;AT=1;var e=Vf(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(l){var c=n.call(l,i),f=l[i];try{l[i]=void 0;var d=!0}catch{}var y=r.call(l);return d&&(c?l[i]=f:delete l[i]),y}return yv=o,yv}var mv,OT;function IX(){if(OT)return mv;OT=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return mv=n,mv}var gv,jT;function Ui(){if(jT)return gv;jT=1;var e=Vf(),t=BX(),n=IX(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?i:r:o&&o in Object(c)?t(c):n(c)}return gv=l,gv}var vv,ET;function Hi(){if(ET)return vv;ET=1;function e(t){return t!=null&&typeof t=="object"}return vv=e,vv}var bv,NT;function au(){if(NT)return bv;NT=1;var e=Ui(),t=Hi(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return bv=r,bv}var xv,TT;function G_(){if(TT)return xv;TT=1;var e=kn(),t=au(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,l){if(e(o))return!1;var c=typeof o;return c=="number"||c=="symbol"||c=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||l!=null&&o in Object(l)}return xv=i,xv}var wv,CT;function Va(){if(CT)return wv;CT=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return wv=e,wv}var Sv,MT;function F_(){if(MT)return Sv;MT=1;var e=Ui(),t=Va(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==r||f==i||f==n||f==o}return Sv=l,Sv}var _v,kT;function UX(){if(kT)return _v;kT=1;var e=Wr(),t=e["__core-js_shared__"];return _v=t,_v}var Av,RT;function HX(){if(RT)return Av;RT=1;var e=UX(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return Av=n,Av}var Ov,PT;function d8(){if(PT)return Ov;PT=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return Ov=n,Ov}var jv,DT;function VX(){if(DT)return jv;DT=1;var e=F_(),t=HX(),n=Va(),r=d8(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,d=c.hasOwnProperty,y=RegExp("^"+f.call(d).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function p(g){if(!n(g)||t(g))return!1;var b=e(g)?y:o;return b.test(r(g))}return jv=p,jv}var Ev,$T;function GX(){if($T)return Ev;$T=1;function e(t,n){return t==null?void 0:t[n]}return Ev=e,Ev}var Nv,qT;function Jo(){if(qT)return Nv;qT=1;var e=VX(),t=GX();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return Nv=n,Nv}var Tv,LT;function Dy(){if(LT)return Tv;LT=1;var e=Jo(),t=e(Object,"create");return Tv=t,Tv}var Cv,zT;function FX(){if(zT)return Cv;zT=1;var e=Dy();function t(){this.__data__=e?e(null):{},this.size=0}return Cv=t,Cv}var Mv,BT;function YX(){if(BT)return Mv;BT=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Mv=e,Mv}var kv,IT;function XX(){if(IT)return kv;IT=1;var e=Dy(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var l=this.__data__;if(e){var c=l[o];return c===t?void 0:c}return r.call(l,o)?l[o]:void 0}return kv=i,kv}var Rv,UT;function KX(){if(UT)return Rv;UT=1;var e=Dy(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return Rv=r,Rv}var Pv,HT;function WX(){if(HT)return Pv;HT=1;var e=Dy(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return Pv=n,Pv}var Dv,VT;function QX(){if(VT)return Dv;VT=1;var e=FX(),t=YX(),n=XX(),r=KX(),i=WX();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Dv=o,Dv}var $v,GT;function ZX(){if(GT)return $v;GT=1;function e(){this.__data__=[],this.size=0}return $v=e,$v}var qv,FT;function Y_(){if(FT)return qv;FT=1;function e(t,n){return t===n||t!==t&&n!==n}return qv=e,qv}var Lv,YT;function $y(){if(YT)return Lv;YT=1;var e=Y_();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Lv=t,Lv}var zv,XT;function JX(){if(XT)return zv;XT=1;var e=$y(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,l=e(o,i);if(l<0)return!1;var c=o.length-1;return l==c?o.pop():n.call(o,l,1),--this.size,!0}return zv=r,zv}var Bv,KT;function eK(){if(KT)return Bv;KT=1;var e=$y();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Bv=t,Bv}var Iv,WT;function tK(){if(WT)return Iv;WT=1;var e=$y();function t(n){return e(this.__data__,n)>-1}return Iv=t,Iv}var Uv,QT;function nK(){if(QT)return Uv;QT=1;var e=$y();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return Uv=t,Uv}var Hv,ZT;function qy(){if(ZT)return Hv;ZT=1;var e=ZX(),t=JX(),n=eK(),r=tK(),i=nK();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Hv=o,Hv}var Vv,JT;function X_(){if(JT)return Vv;JT=1;var e=Jo(),t=Wr(),n=e(t,"Map");return Vv=n,Vv}var Gv,eC;function rK(){if(eC)return Gv;eC=1;var e=QX(),t=qy(),n=X_();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Gv=r,Gv}var Fv,tC;function iK(){if(tC)return Fv;tC=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Fv=e,Fv}var Yv,nC;function Ly(){if(nC)return Yv;nC=1;var e=iK();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Yv=t,Yv}var Xv,rC;function aK(){if(rC)return Xv;rC=1;var e=Ly();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Xv=t,Xv}var Kv,iC;function oK(){if(iC)return Kv;iC=1;var e=Ly();function t(n){return e(this,n).get(n)}return Kv=t,Kv}var Wv,aC;function sK(){if(aC)return Wv;aC=1;var e=Ly();function t(n){return e(this,n).has(n)}return Wv=t,Wv}var Qv,oC;function lK(){if(oC)return Qv;oC=1;var e=Ly();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return Qv=t,Qv}var Zv,sC;function K_(){if(sC)return Zv;sC=1;var e=rK(),t=aK(),n=oK(),r=sK(),i=lK();function o(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var d=l[c];this.set(d[0],d[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Zv=o,Zv}var Jv,lC;function h8(){if(lC)return Jv;lC=1;var e=K_(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var l=arguments,c=i?i.apply(this,l):l[0],f=o.cache;if(f.has(c))return f.get(c);var d=r.apply(this,l);return o.cache=f.set(c,d)||f,d};return o.cache=new(n.Cache||e),o}return n.Cache=e,Jv=n,Jv}var eb,uC;function uK(){if(uC)return eb;uC=1;var e=h8(),t=500;function n(r){var i=e(r,function(l){return o.size===t&&o.clear(),l}),o=i.cache;return i}return eb=n,eb}var tb,cC;function cK(){if(cC)return tb;cC=1;var e=uK(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(l,c,f,d){o.push(f?d.replace(n,"$1"):c||l)}),o});return tb=r,tb}var nb,fC;function W_(){if(fC)return nb;fC=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return nb=e,nb}var rb,dC;function fK(){if(dC)return rb;dC=1;var e=Vf(),t=W_(),n=kn(),r=au(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(r(c))return o?o.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return rb=l,rb}var ib,hC;function p8(){if(hC)return ib;hC=1;var e=fK();function t(n){return n==null?"":e(n)}return ib=t,ib}var ab,pC;function y8(){if(pC)return ab;pC=1;var e=kn(),t=G_(),n=cK(),r=p8();function i(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return ab=i,ab}var ob,yC;function zy(){if(yC)return ob;yC=1;var e=au();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return ob=t,ob}var sb,mC;function Q_(){if(mC)return sb;mC=1;var e=y8(),t=zy();function n(r,i){i=e(i,r);for(var o=0,l=i.length;r!=null&&o<l;)r=r[t(i[o++])];return o&&o==l?r:void 0}return sb=n,sb}var lb,gC;function m8(){if(gC)return lb;gC=1;var e=Q_();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return lb=t,lb}var dK=m8();const Gn=nt(dK);var ub,vC;function hK(){if(vC)return ub;vC=1;function e(t){return t==null}return ub=e,ub}var pK=hK();const Ie=nt(pK);var cb,bC;function yK(){if(bC)return cb;bC=1;var e=Ui(),t=kn(),n=Hi(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return cb=i,cb}var mK=yK();const Go=nt(mK);var gK=F_();const Pe=nt(gK);var vK=Va();const ou=nt(vK);var fb={exports:{}},et={};/**
449
+ * @license React
450
+ * react-is.production.min.js
451
+ *
452
+ * Copyright (c) Facebook, Inc. and its affiliates.
453
+ *
454
+ * This source code is licensed under the MIT license found in the
455
+ * LICENSE file in the root directory of this source tree.
456
+ */var xC;function bK(){if(xC)return et;xC=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),_;_=Symbol.for("react.module.reference");function S(x){if(typeof x=="object"&&x!==null){var A=x.$$typeof;switch(A){case e:switch(x=x.type,x){case n:case i:case r:case d:case y:return x;default:switch(x=x&&x.$$typeof,x){case c:case l:case f:case g:case p:case o:return x;default:return A}}case t:return A}}}return et.ContextConsumer=l,et.ContextProvider=o,et.Element=e,et.ForwardRef=f,et.Fragment=n,et.Lazy=g,et.Memo=p,et.Portal=t,et.Profiler=i,et.StrictMode=r,et.Suspense=d,et.SuspenseList=y,et.isAsyncMode=function(){return!1},et.isConcurrentMode=function(){return!1},et.isContextConsumer=function(x){return S(x)===l},et.isContextProvider=function(x){return S(x)===o},et.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===e},et.isForwardRef=function(x){return S(x)===f},et.isFragment=function(x){return S(x)===n},et.isLazy=function(x){return S(x)===g},et.isMemo=function(x){return S(x)===p},et.isPortal=function(x){return S(x)===t},et.isProfiler=function(x){return S(x)===i},et.isStrictMode=function(x){return S(x)===r},et.isSuspense=function(x){return S(x)===d},et.isSuspenseList=function(x){return S(x)===y},et.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===n||x===i||x===r||x===d||x===y||x===b||typeof x=="object"&&x!==null&&(x.$$typeof===g||x.$$typeof===p||x.$$typeof===o||x.$$typeof===l||x.$$typeof===f||x.$$typeof===_||x.getModuleId!==void 0)},et.typeOf=S,et}var wC;function xK(){return wC||(wC=1,fb.exports=bK()),fb.exports}var wK=xK(),db,SC;function g8(){if(SC)return db;SC=1;var e=Ui(),t=Hi(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return db=r,db}var hb,_C;function SK(){if(_C)return hb;_C=1;var e=g8();function t(n){return e(n)&&n!=+n}return hb=t,hb}var _K=SK();const Gf=nt(_K);var AK=g8();const OK=nt(AK);var xn=function(t){return t===0?0:t>0?1:-1},Eo=function(t){return Go(t)&&t.indexOf("%")===t.length-1},ge=function(t){return OK(t)&&!Gf(t)},jK=function(t){return Ie(t)},Ft=function(t){return ge(t)||Go(t)},EK=0,Ff=function(t){var n=++EK;return"".concat(t||"").concat(n)},wn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!ge(t)&&!Go(t))return r;var o;if(Eo(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return Gf(o)&&(o=r),i&&o>n&&(o=n),o},ka=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},NK=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},Ta=function(t,n){return ge(t)&&ge(n)?function(r){return t+r*(n-t)}:function(){return n}};function qw(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Gn(r,t))===n})}var TK=function(t,n){return ge(t)&&ge(n)?t-n:Go(t)&&Go(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function ll(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Lw(e){"@babel/helpers - typeof";return Lw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lw(e)}var CK=["viewBox","children"],MK=["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"],AC=["points","pathLength"],pb={svg:CK,polygon:AC,polyline:AC},Z_=["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"],_p=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(U.isValidElement(t)&&(r=t.props),!ou(r))return null;var i={};return Object.keys(r).forEach(function(o){Z_.includes(o)&&(i[o]=n||function(l){return r[o](r,l)})}),i},kK=function(t,n,r){return function(i){return t(n,r,i),null}},Fo=function(t,n,r){if(!ou(t)||Lw(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var l=t[o];Z_.includes(o)&&typeof l=="function"&&(i||(i={}),i[o]=kK(l,n,r))}),i},RK=["children"],PK=["children"];function OC(e,t){if(e==null)return{};var n=DK(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var jC={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},Ri=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},EC=null,yb=null,J_=function e(t){if(t===EC&&Array.isArray(yb))return yb;var n=[];return U.Children.forEach(t,function(r){Ie(r)||(wK.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),yb=n,EC=t,n};function lr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Ri(i)}):r=[Ri(t)],J_(e).forEach(function(i){var o=Gn(i,"type.displayName")||Gn(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function In(e,t){var n=lr(e,t);return n&&n[0]}var NC=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!ge(r)||r<=0||!ge(i)||i<=0)},$K=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],qK=function(t){return t&&t.type&&Go(t.type)&&$K.indexOf(t.type)>=0},LK=function(t,n,r,i){var o,l=(o=pb==null?void 0:pb[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!Pe(t)&&(i&&l.includes(n)||MK.includes(n))||r&&Z_.includes(n)},ke=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(U.isValidElement(t)&&(i=t.props),!ou(i))return null;var o={};return Object.keys(i).forEach(function(l){var c;LK((c=i)===null||c===void 0?void 0:c[l],l,n,r)&&(o[l]=i[l])}),o},zw=function e(t,n){if(t===n)return!0;var r=U.Children.count(t);if(r!==U.Children.count(n))return!1;if(r===0)return!0;if(r===1)return TC(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var o=t[i],l=n[i];if(Array.isArray(o)||Array.isArray(l)){if(!e(o,l))return!1}else if(!TC(o,l))return!1}return!0},TC=function(t,n){if(Ie(t)&&Ie(n))return!0;if(!Ie(t)&&!Ie(n)){var r=t.props||{},i=r.children,o=OC(r,RK),l=n.props||{},c=l.children,f=OC(l,PK);return i&&c?ll(o,f)&&zw(i,c):!i&&!c?ll(o,f):!1}return!1},CC=function(t,n){var r=[],i={};return J_(t).forEach(function(o,l){if(qK(o))r.push(o);else if(o){var c=Ri(o.type),f=n[c]||{},d=f.handler,y=f.once;if(d&&(!y||!i[c])){var p=d(o,c,l);r.push(p),i[c]=!0}}}),r},zK=function(t){var n=t&&t.type;return n&&jC[n]?jC[n]:null},BK=function(t,n){return J_(n).indexOf(t)},IK=["children","width","height","viewBox","className","style","title","desc"];function Bw(){return Bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bw.apply(this,arguments)}function UK(e,t){if(e==null)return{};var n=HK(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Iw(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,l=e.style,c=e.title,f=e.desc,d=UK(e,IK),y=i||{width:n,height:r,x:0,y:0},p=Be("recharts-surface",o);return W.createElement("svg",Bw({},ke(d,!0,"svg"),{className:p,width:n,height:r,style:l,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height)}),W.createElement("title",null,c),W.createElement("desc",null,f),t)}var VK=["children","className"];function Uw(){return Uw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uw.apply(this,arguments)}function GK(e,t){if(e==null)return{};var n=FK(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FK(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var at=W.forwardRef(function(e,t){var n=e.children,r=e.className,i=GK(e,VK),o=Be("recharts-layer",r);return W.createElement("g",Uw({className:o},ke(i,!0),{ref:t}),n)}),Nr=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o]},mb,MC;function YK(){if(MC)return mb;MC=1;function e(t,n,r){var i=-1,o=t.length;n<0&&(n=-n>o?0:o+n),r=r>o?o:r,r<0&&(r+=o),o=n>r?0:r-n>>>0,n>>>=0;for(var l=Array(o);++i<o;)l[i]=t[i+n];return l}return mb=e,mb}var gb,kC;function XK(){if(kC)return gb;kC=1;var e=YK();function t(n,r,i){var o=n.length;return i=i===void 0?o:i,!r&&i>=o?n:e(n,r,i)}return gb=t,gb}var vb,RC;function v8(){if(RC)return vb;RC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+i+o+"]");function f(d){return c.test(d)}return vb=f,vb}var bb,PC;function KK(){if(PC)return bb;PC=1;function e(t){return t.split("")}return bb=e,bb}var xb,DC;function WK(){if(DC)return xb;DC=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",l="["+e+"]",c="["+i+"]",f="\\ud83c[\\udffb-\\udfff]",d="(?:"+c+"|"+f+")",y="[^"+e+"]",p="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",_=d+"?",S="["+o+"]?",x="(?:"+b+"(?:"+[y,p,g].join("|")+")"+S+_+")*",A=S+_+x,j="(?:"+[y+c+"?",c,p,g,l].join("|")+")",O=RegExp(f+"(?="+f+")|"+j+A,"g");function N(E){return E.match(O)||[]}return xb=N,xb}var wb,$C;function QK(){if($C)return wb;$C=1;var e=KK(),t=v8(),n=WK();function r(i){return t(i)?n(i):e(i)}return wb=r,wb}var Sb,qC;function ZK(){if(qC)return Sb;qC=1;var e=XK(),t=v8(),n=QK(),r=p8();function i(o){return function(l){l=r(l);var c=t(l)?n(l):void 0,f=c?c[0]:l.charAt(0),d=c?e(c,1).join(""):l.slice(1);return f[o]()+d}}return Sb=i,Sb}var _b,LC;function JK(){if(LC)return _b;LC=1;var e=ZK(),t=e("toUpperCase");return _b=t,_b}var eW=JK();const By=nt(eW);function ht(e){return function(){return e}}const b8=Math.cos,Ap=Math.sin,Cr=Math.sqrt,Op=Math.PI,Iy=2*Op,Hw=Math.PI,Vw=2*Hw,_o=1e-6,tW=Vw-_o;function x8(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function nW(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return x8;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class rW{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?x8:nW(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,l){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,f=r-t,d=i-n,y=l-t,p=c-n,g=y*y+p*p;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(g>_o)if(!(Math.abs(p*f-d*y)>_o)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let b=r-l,_=i-c,S=f*f+d*d,x=b*b+_*_,A=Math.sqrt(S),j=Math.sqrt(g),O=o*Math.tan((Hw-Math.acos((S+g-x)/(2*A*j)))/2),N=O/j,E=O/A;Math.abs(N-1)>_o&&this._append`L${t+N*y},${n+N*p}`,this._append`A${o},${o},0,0,${+(p*b>y*_)},${this._x1=t+E*f},${this._y1=n+E*d}`}}arc(t,n,r,i,o,l){if(t=+t,n=+n,r=+r,l=!!l,r<0)throw new Error(`negative radius: ${r}`);let c=r*Math.cos(i),f=r*Math.sin(i),d=t+c,y=n+f,p=1^l,g=l?i-o:o-i;this._x1===null?this._append`M${d},${y}`:(Math.abs(this._x1-d)>_o||Math.abs(this._y1-y)>_o)&&this._append`L${d},${y}`,r&&(g<0&&(g=g%Vw+Vw),g>tW?this._append`A${r},${r},0,1,${p},${t-c},${n-f}A${r},${r},0,1,${p},${this._x1=d},${this._y1=y}`:g>_o&&this._append`A${r},${r},0,${+(g>=Hw)},${p},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function e2(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 rW(t)}function t2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function w8(e){this._context=e}w8.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 Uy(e){return new w8(e)}function S8(e){return e[0]}function _8(e){return e[1]}function A8(e,t){var n=ht(!0),r=null,i=Uy,o=null,l=e2(c);e=typeof e=="function"?e:e===void 0?S8:ht(e),t=typeof t=="function"?t:t===void 0?_8:ht(t);function c(f){var d,y=(f=t2(f)).length,p,g=!1,b;for(r==null&&(o=i(b=l())),d=0;d<=y;++d)!(d<y&&n(p=f[d],d,f))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(p,d,f),+t(p,d,f));if(b)return o=null,b+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:ht(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:ht(+f),c):t},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:ht(!!f),c):n},c.curve=function(f){return arguments.length?(i=f,r!=null&&(o=i(r)),c):i},c.context=function(f){return arguments.length?(f==null?r=o=null:o=i(r=f),c):r},c}function $h(e,t,n){var r=null,i=ht(!0),o=null,l=Uy,c=null,f=e2(d);e=typeof e=="function"?e:e===void 0?S8:ht(+e),t=typeof t=="function"?t:ht(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?_8:ht(+n);function d(p){var g,b,_,S=(p=t2(p)).length,x,A=!1,j,O=new Array(S),N=new Array(S);for(o==null&&(c=l(j=f())),g=0;g<=S;++g){if(!(g<S&&i(x=p[g],g,p))===A)if(A=!A)b=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),_=g-1;_>=b;--_)c.point(O[_],N[_]);c.lineEnd(),c.areaEnd()}A&&(O[g]=+e(x,g,p),N[g]=+t(x,g,p),c.point(r?+r(x,g,p):O[g],n?+n(x,g,p):N[g]))}if(j)return c=null,j+""||null}function y(){return A8().defined(i).curve(l).context(o)}return d.x=function(p){return arguments.length?(e=typeof p=="function"?p:ht(+p),r=null,d):e},d.x0=function(p){return arguments.length?(e=typeof p=="function"?p:ht(+p),d):e},d.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:ht(+p),d):r},d.y=function(p){return arguments.length?(t=typeof p=="function"?p:ht(+p),n=null,d):t},d.y0=function(p){return arguments.length?(t=typeof p=="function"?p:ht(+p),d):t},d.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:ht(+p),d):n},d.lineX0=d.lineY0=function(){return y().x(e).y(t)},d.lineY1=function(){return y().x(e).y(n)},d.lineX1=function(){return y().x(r).y(t)},d.defined=function(p){return arguments.length?(i=typeof p=="function"?p:ht(!!p),d):i},d.curve=function(p){return arguments.length?(l=p,o!=null&&(c=l(o)),d):l},d.context=function(p){return arguments.length?(p==null?o=c=null:c=l(o=p),d):o},d}class O8{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 iW(e){return new O8(e,!0)}function aW(e){return new O8(e,!1)}const n2={draw(e,t){const n=Cr(t/Op);e.moveTo(n,0),e.arc(0,0,n,0,Iy)}},oW={draw(e,t){const n=Cr(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()}},j8=Cr(1/3),sW=j8*2,lW={draw(e,t){const n=Cr(t/sW),r=n*j8;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},uW={draw(e,t){const n=Cr(t),r=-n/2;e.rect(r,r,n,n)}},cW=.8908130915292852,E8=Ap(Op/10)/Ap(7*Op/10),fW=Ap(Iy/10)*E8,dW=-b8(Iy/10)*E8,hW={draw(e,t){const n=Cr(t*cW),r=fW*n,i=dW*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=Iy*o/5,c=b8(l),f=Ap(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*i,f*r+c*i)}e.closePath()}},Ab=Cr(3),pW={draw(e,t){const n=-Cr(t/(Ab*3));e.moveTo(0,n*2),e.lineTo(-Ab*n,-n),e.lineTo(Ab*n,-n),e.closePath()}},tr=-.5,nr=Cr(3)/2,Gw=1/Cr(12),yW=(Gw/2+1)*3,mW={draw(e,t){const n=Cr(t/yW),r=n/2,i=n*Gw,o=r,l=n*Gw+n,c=-o,f=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(tr*r-nr*i,nr*r+tr*i),e.lineTo(tr*o-nr*l,nr*o+tr*l),e.lineTo(tr*c-nr*f,nr*c+tr*f),e.lineTo(tr*r+nr*i,tr*i-nr*r),e.lineTo(tr*o+nr*l,tr*l-nr*o),e.lineTo(tr*c+nr*f,tr*f-nr*c),e.closePath()}};function gW(e,t){let n=null,r=e2(i);e=typeof e=="function"?e:ht(e||n2),t=typeof t=="function"?t:ht(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:ht(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:ht(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function jp(){}function Ep(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 N8(e){this._context=e}N8.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:Ep(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:Ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vW(e){return new N8(e)}function T8(e){this._context=e}T8.prototype={areaStart:jp,areaEnd:jp,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:Ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bW(e){return new T8(e)}function C8(e){this._context=e}C8.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:Ep(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xW(e){return new C8(e)}function M8(e){this._context=e}M8.prototype={areaStart:jp,areaEnd:jp,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 wW(e){return new M8(e)}function zC(e){return e<0?-1:1}function BC(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),l=(n-e._y1)/(i||r<0&&-0),c=(o*i+l*r)/(r+i);return(zC(o)+zC(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function IC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ob(e,t,n){var r=e._x0,i=e._y0,o=e._x1,l=e._y1,c=(o-r)/3;e._context.bezierCurveTo(r+c,i+c*t,o-c,l-c*n,o,l)}function Np(e){this._context=e}Np.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:Ob(this,this._t0,IC(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,Ob(this,IC(this,n=BC(this,e,t)),n);break;default:Ob(this,this._t0,n=BC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function k8(e){this._context=new R8(e)}(k8.prototype=Object.create(Np.prototype)).point=function(e,t){Np.prototype.point.call(this,t,e)};function R8(e){this._context=e}R8.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function SW(e){return new Np(e)}function _W(e){return new k8(e)}function P8(e){this._context=e}P8.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=UC(e),i=UC(t),o=0,l=1;l<n;++o,++l)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[l],t[l]);(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 UC(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),l=new Array(n);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,l[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,l[t]-=r*l[t-1];for(i[n-1]=l[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function AW(e){return new P8(e)}function Hy(e,t){this._context=e,this._t=t}Hy.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 OW(e){return new Hy(e,.5)}function jW(e){return new Hy(e,0)}function EW(e){return new Hy(e,1)}function Nl(e,t){if((l=e.length)>1)for(var n=1,r,i,o=e[t[0]],l,c=o.length;n<l;++n)for(i=o,o=e[t[n]],r=0;r<c;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Fw(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function NW(e,t){return e[t]}function TW(e){const t=[];return t.key=e,t}function CW(){var e=ht([]),t=Fw,n=Nl,r=NW;function i(o){var l=Array.from(e.apply(this,arguments),TW),c,f=l.length,d=-1,y;for(const p of o)for(c=0,++d;c<f;++c)(l[c][d]=[0,+r(p,l[c].key,d,o)]).data=p;for(c=0,y=t2(t(l));c<f;++c)l[y[c]].index=c;return n(l,y),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:ht(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:ht(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?Fw:typeof o=="function"?o:ht(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Nl,i):n},i}function MW(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,l;i<o;++i){for(l=n=0;n<r;++n)l+=e[n][i][1]||0;if(l)for(n=0;n<r;++n)e[n][i][1]/=l}Nl(e,t)}}function kW(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var l=0,c=0;l<i;++l)c+=e[l][n][1]||0;r[n][1]+=r[n][0]=-c/2}Nl(e,t)}}function RW(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,l;r<o;++r){for(var c=0,f=0,d=0;c<l;++c){for(var y=e[t[c]],p=y[r][1]||0,g=y[r-1][1]||0,b=(p-g)/2,_=0;_<c;++_){var S=e[t[_]],x=S[r][1]||0,A=S[r-1][1]||0;b+=x-A}f+=p,d+=b*p}i[r-1][1]+=i[r-1][0]=n,f&&(n-=d/f)}i[r-1][1]+=i[r-1][0]=n,Nl(e,t)}}function Wc(e){"@babel/helpers - typeof";return Wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wc(e)}var PW=["type","size","sizeType"];function Yw(){return Yw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yw.apply(this,arguments)}function HC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HC(Object(n),!0).forEach(function(r){DW(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function DW(e,t,n){return t=$W(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $W(e){var t=qW(e,"string");return Wc(t)=="symbol"?t:t+""}function qW(e,t){if(Wc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LW(e,t){if(e==null)return{};var n=zW(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zW(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var D8={symbolCircle:n2,symbolCross:oW,symbolDiamond:lW,symbolSquare:uW,symbolStar:hW,symbolTriangle:pW,symbolWye:mW},BW=Math.PI/180,IW=function(t){var n="symbol".concat(By(t));return D8[n]||n2},UW=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*BW;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},HW=function(t,n){D8["symbol".concat(By(t))]=n},r2=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,l=t.sizeType,c=l===void 0?"area":l,f=LW(t,PW),d=VC(VC({},f),{},{type:r,size:o,sizeType:c}),y=function(){var x=IW(r),A=gW().type(x).size(UW(o,c,r));return A()},p=d.className,g=d.cx,b=d.cy,_=ke(d,!0);return g===+g&&b===+b&&o===+o?W.createElement("path",Yw({},_,{className:Be("recharts-symbols",p),transform:"translate(".concat(g,", ").concat(b,")"),d:y()})):null};r2.registerSymbol=HW;function Tl(e){"@babel/helpers - typeof";return Tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function Xw(){return Xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xw.apply(this,arguments)}function GC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VW(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GC(Object(n),!0).forEach(function(r){Qc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function FW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,q8(r.key),r)}}function YW(e,t,n){return t&&FW(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function XW(e,t,n){return t=Tp(t),KW(e,$8()?Reflect.construct(t,n||[],Tp(e).constructor):t.apply(e,n))}function KW(e,t){if(t&&(Tl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return WW(e)}function WW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($8=function(){return!!e})()}function Tp(e){return Tp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tp(e)}function QW(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kw(e,t)}function Kw(e,t){return Kw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Kw(e,t)}function Qc(e,t,n){return t=q8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q8(e){var t=ZW(e,"string");return Tl(t)=="symbol"?t:t+""}function ZW(e,t){if(Tl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rr=32,i2=(function(e){function t(){return GW(this,t),XW(this,t,arguments)}return QW(t,e),YW(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=rr/2,l=rr/6,c=rr/3,f=r.inactive?i:r.color;if(r.type==="plainline")return W.createElement("line",{strokeWidth:4,fill:"none",stroke:f,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:o,x2:rr,y2:o,className:"recharts-legend-icon"});if(r.type==="line")return W.createElement("path",{strokeWidth:4,fill:"none",stroke:f,d:"M0,".concat(o,"h").concat(c,`
457
+ A`).concat(l,",").concat(l,",0,1,1,").concat(2*c,",").concat(o,`
458
+ H`).concat(rr,"M").concat(2*c,",").concat(o,`
459
+ A`).concat(l,",").concat(l,",0,1,1,").concat(c,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return W.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(rr/8,"h").concat(rr,"v").concat(rr*3/4,"h").concat(-rr,"z"),className:"recharts-legend-icon"});if(W.isValidElement(r.legendIcon)){var d=VW({},r);return delete d.legendIcon,W.cloneElement(r.legendIcon,d)}return W.createElement(r2,{fill:f,cx:o,cy:o,size:rr,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,l=i.iconSize,c=i.layout,f=i.formatter,d=i.inactiveColor,y={x:0,y:0,width:rr,height:rr},p={display:c==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(b,_){var S=b.formatter||f,x=Be(Qc(Qc({"recharts-legend-item":!0},"legend-item-".concat(_),!0),"inactive",b.inactive));if(b.type==="none")return null;var A=Pe(b.value)?null:b.value;Nr(!Pe(b.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var j=b.inactive?d:b.color;return W.createElement("li",Xw({className:x,style:p,key:"legend-item-".concat(_)},Fo(r.props,b,_)),W.createElement(Iw,{width:l,height:l,viewBox:y,style:g},r.renderIcon(b)),W.createElement("span",{className:"recharts-legend-item-text",style:{color:j}},S?S(A,b,_):A))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,l=r.align;if(!i||!i.length)return null;var c={padding:0,margin:0,textAlign:o==="horizontal"?l:"left"};return W.createElement("ul",{className:"recharts-default-legend",style:c},this.renderItems())}}])})(U.PureComponent);Qc(i2,"displayName","Legend");Qc(i2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var jb,FC;function JW(){if(FC)return jb;FC=1;var e=qy();function t(){this.__data__=new e,this.size=0}return jb=t,jb}var Eb,YC;function eQ(){if(YC)return Eb;YC=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Eb=e,Eb}var Nb,XC;function tQ(){if(XC)return Nb;XC=1;function e(t){return this.__data__.get(t)}return Nb=e,Nb}var Tb,KC;function nQ(){if(KC)return Tb;KC=1;function e(t){return this.__data__.has(t)}return Tb=e,Tb}var Cb,WC;function rQ(){if(WC)return Cb;WC=1;var e=qy(),t=X_(),n=K_(),r=200;function i(o,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length<r-1)return f.push([o,l]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(o,l),this.size=c.size,this}return Cb=i,Cb}var Mb,QC;function L8(){if(QC)return Mb;QC=1;var e=qy(),t=JW(),n=eQ(),r=tQ(),i=nQ(),o=rQ();function l(c){var f=this.__data__=new e(c);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=r,l.prototype.has=i,l.prototype.set=o,Mb=l,Mb}var kb,ZC;function iQ(){if(ZC)return kb;ZC=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return kb=t,kb}var Rb,JC;function aQ(){if(JC)return Rb;JC=1;function e(t){return this.__data__.has(t)}return Rb=e,Rb}var Pb,eM;function z8(){if(eM)return Pb;eM=1;var e=K_(),t=iQ(),n=aQ();function r(i){var o=-1,l=i==null?0:i.length;for(this.__data__=new e;++o<l;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Pb=r,Pb}var Db,tM;function B8(){if(tM)return Db;tM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Db=e,Db}var $b,nM;function I8(){if(nM)return $b;nM=1;function e(t,n){return t.has(n)}return $b=e,$b}var qb,rM;function U8(){if(rM)return qb;rM=1;var e=z8(),t=B8(),n=I8(),r=1,i=2;function o(l,c,f,d,y,p){var g=f&r,b=l.length,_=c.length;if(b!=_&&!(g&&_>b))return!1;var S=p.get(l),x=p.get(c);if(S&&x)return S==c&&x==l;var A=-1,j=!0,O=f&i?new e:void 0;for(p.set(l,c),p.set(c,l);++A<b;){var N=l[A],E=c[A];if(d)var T=g?d(E,N,A,c,l,p):d(N,E,A,l,c,p);if(T!==void 0){if(T)continue;j=!1;break}if(O){if(!t(c,function(C,D){if(!n(O,D)&&(N===C||y(N,C,f,d,p)))return O.push(D)})){j=!1;break}}else if(!(N===E||y(N,E,f,d,p))){j=!1;break}}return p.delete(l),p.delete(c),j}return qb=o,qb}var Lb,iM;function oQ(){if(iM)return Lb;iM=1;var e=Wr(),t=e.Uint8Array;return Lb=t,Lb}var zb,aM;function sQ(){if(aM)return zb;aM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return zb=e,zb}var Bb,oM;function a2(){if(oM)return Bb;oM=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Bb=e,Bb}var Ib,sM;function lQ(){if(sM)return Ib;sM=1;var e=Vf(),t=oQ(),n=Y_(),r=U8(),i=sQ(),o=a2(),l=1,c=2,f="[object Boolean]",d="[object Date]",y="[object Error]",p="[object Map]",g="[object Number]",b="[object RegExp]",_="[object Set]",S="[object String]",x="[object Symbol]",A="[object ArrayBuffer]",j="[object DataView]",O=e?e.prototype:void 0,N=O?O.valueOf:void 0;function E(T,C,D,q,F,L,P){switch(D){case j:if(T.byteLength!=C.byteLength||T.byteOffset!=C.byteOffset)return!1;T=T.buffer,C=C.buffer;case A:return!(T.byteLength!=C.byteLength||!L(new t(T),new t(C)));case f:case d:case g:return n(+T,+C);case y:return T.name==C.name&&T.message==C.message;case b:case S:return T==C+"";case p:var Y=i;case _:var R=q&l;if(Y||(Y=o),T.size!=C.size&&!R)return!1;var $=P.get(T);if($)return $==C;q|=c,P.set(T,C);var k=r(Y(T),Y(C),q,F,L,P);return P.delete(T),k;case x:if(N)return N.call(T)==N.call(C)}return!1}return Ib=E,Ib}var Ub,lM;function H8(){if(lM)return Ub;lM=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return Ub=e,Ub}var Hb,uM;function uQ(){if(uM)return Hb;uM=1;var e=H8(),t=kn();function n(r,i,o){var l=i(r);return t(r)?l:e(l,o(r))}return Hb=n,Hb}var Vb,cM;function cQ(){if(cM)return Vb;cM=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,l=[];++r<i;){var c=t[r];n(c,r,t)&&(l[o++]=c)}return l}return Vb=e,Vb}var Gb,fM;function fQ(){if(fM)return Gb;fM=1;function e(){return[]}return Gb=e,Gb}var Fb,dM;function dQ(){if(dM)return Fb;dM=1;var e=cQ(),t=fQ(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(l){return l==null?[]:(l=Object(l),e(i(l),function(c){return r.call(l,c)}))}:t;return Fb=o,Fb}var Yb,hM;function hQ(){if(hM)return Yb;hM=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Yb=e,Yb}var Xb,pM;function pQ(){if(pM)return Xb;pM=1;var e=Ui(),t=Hi(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Xb=r,Xb}var Kb,yM;function o2(){if(yM)return Kb;yM=1;var e=pQ(),t=Hi(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e((function(){return arguments})())?e:function(l){return t(l)&&r.call(l,"callee")&&!i.call(l,"callee")};return Kb=o,Kb}var Ec={exports:{}},Wb,mM;function yQ(){if(mM)return Wb;mM=1;function e(){return!1}return Wb=e,Wb}Ec.exports;var gM;function V8(){return gM||(gM=1,(function(e,t){var n=Wr(),r=yQ(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,l=o&&o.exports===i,c=l?n.Buffer:void 0,f=c?c.isBuffer:void 0,d=f||r;e.exports=d})(Ec,Ec.exports)),Ec.exports}var Qb,vM;function s2(){if(vM)return Qb;vM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Qb=n,Qb}var Zb,bM;function l2(){if(bM)return Zb;bM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Zb=t,Zb}var Jb,xM;function mQ(){if(xM)return Jb;xM=1;var e=Ui(),t=l2(),n=Hi(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",d="[object Map]",y="[object Number]",p="[object Object]",g="[object RegExp]",b="[object Set]",_="[object String]",S="[object WeakMap]",x="[object ArrayBuffer]",A="[object DataView]",j="[object Float32Array]",O="[object Float64Array]",N="[object Int8Array]",E="[object Int16Array]",T="[object Int32Array]",C="[object Uint8Array]",D="[object Uint8ClampedArray]",q="[object Uint16Array]",F="[object Uint32Array]",L={};L[j]=L[O]=L[N]=L[E]=L[T]=L[C]=L[D]=L[q]=L[F]=!0,L[r]=L[i]=L[x]=L[o]=L[A]=L[l]=L[c]=L[f]=L[d]=L[y]=L[p]=L[g]=L[b]=L[_]=L[S]=!1;function P(Y){return n(Y)&&t(Y.length)&&!!L[e(Y)]}return Jb=P,Jb}var ex,wM;function G8(){if(wM)return ex;wM=1;function e(t){return function(n){return t(n)}}return ex=e,ex}var Nc={exports:{}};Nc.exports;var SM;function gQ(){return SM||(SM=1,(function(e,t){var n=f8(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,l=o&&n.process,c=(function(){try{var f=i&&i.require&&i.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(Nc,Nc.exports)),Nc.exports}var tx,_M;function F8(){if(_M)return tx;_M=1;var e=mQ(),t=G8(),n=gQ(),r=n&&n.isTypedArray,i=r?t(r):e;return tx=i,tx}var nx,AM;function vQ(){if(AM)return nx;AM=1;var e=hQ(),t=o2(),n=kn(),r=V8(),i=s2(),o=F8(),l=Object.prototype,c=l.hasOwnProperty;function f(d,y){var p=n(d),g=!p&&t(d),b=!p&&!g&&r(d),_=!p&&!g&&!b&&o(d),S=p||g||b||_,x=S?e(d.length,String):[],A=x.length;for(var j in d)(y||c.call(d,j))&&!(S&&(j=="length"||b&&(j=="offset"||j=="parent")||_&&(j=="buffer"||j=="byteLength"||j=="byteOffset")||i(j,A)))&&x.push(j);return x}return nx=f,nx}var rx,OM;function bQ(){if(OM)return rx;OM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return rx=t,rx}var ix,jM;function Y8(){if(jM)return ix;jM=1;function e(t,n){return function(r){return t(n(r))}}return ix=e,ix}var ax,EM;function xQ(){if(EM)return ax;EM=1;var e=Y8(),t=e(Object.keys,Object);return ax=t,ax}var ox,NM;function wQ(){if(NM)return ox;NM=1;var e=bQ(),t=xQ(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var l=[];for(var c in Object(o))r.call(o,c)&&c!="constructor"&&l.push(c);return l}return ox=i,ox}var sx,TM;function Yf(){if(TM)return sx;TM=1;var e=F_(),t=l2();function n(r){return r!=null&&t(r.length)&&!e(r)}return sx=n,sx}var lx,CM;function Vy(){if(CM)return lx;CM=1;var e=vQ(),t=wQ(),n=Yf();function r(i){return n(i)?e(i):t(i)}return lx=r,lx}var ux,MM;function SQ(){if(MM)return ux;MM=1;var e=uQ(),t=dQ(),n=Vy();function r(i){return e(i,n,t)}return ux=r,ux}var cx,kM;function _Q(){if(kM)return cx;kM=1;var e=SQ(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,l,c,f,d,y){var p=c&t,g=e(o),b=g.length,_=e(l),S=_.length;if(b!=S&&!p)return!1;for(var x=b;x--;){var A=g[x];if(!(p?A in l:r.call(l,A)))return!1}var j=y.get(o),O=y.get(l);if(j&&O)return j==l&&O==o;var N=!0;y.set(o,l),y.set(l,o);for(var E=p;++x<b;){A=g[x];var T=o[A],C=l[A];if(f)var D=p?f(C,T,A,l,o,y):f(T,C,A,o,l,y);if(!(D===void 0?T===C||d(T,C,c,f,y):D)){N=!1;break}E||(E=A=="constructor")}if(N&&!E){var q=o.constructor,F=l.constructor;q!=F&&"constructor"in o&&"constructor"in l&&!(typeof q=="function"&&q instanceof q&&typeof F=="function"&&F instanceof F)&&(N=!1)}return y.delete(o),y.delete(l),N}return cx=i,cx}var fx,RM;function AQ(){if(RM)return fx;RM=1;var e=Jo(),t=Wr(),n=e(t,"DataView");return fx=n,fx}var dx,PM;function OQ(){if(PM)return dx;PM=1;var e=Jo(),t=Wr(),n=e(t,"Promise");return dx=n,dx}var hx,DM;function X8(){if(DM)return hx;DM=1;var e=Jo(),t=Wr(),n=e(t,"Set");return hx=n,hx}var px,$M;function jQ(){if($M)return px;$M=1;var e=Jo(),t=Wr(),n=e(t,"WeakMap");return px=n,px}var yx,qM;function EQ(){if(qM)return yx;qM=1;var e=AQ(),t=X_(),n=OQ(),r=X8(),i=jQ(),o=Ui(),l=d8(),c="[object Map]",f="[object Object]",d="[object Promise]",y="[object Set]",p="[object WeakMap]",g="[object DataView]",b=l(e),_=l(t),S=l(n),x=l(r),A=l(i),j=o;return(e&&j(new e(new ArrayBuffer(1)))!=g||t&&j(new t)!=c||n&&j(n.resolve())!=d||r&&j(new r)!=y||i&&j(new i)!=p)&&(j=function(O){var N=o(O),E=N==f?O.constructor:void 0,T=E?l(E):"";if(T)switch(T){case b:return g;case _:return c;case S:return d;case x:return y;case A:return p}return N}),yx=j,yx}var mx,LM;function NQ(){if(LM)return mx;LM=1;var e=L8(),t=U8(),n=lQ(),r=_Q(),i=EQ(),o=kn(),l=V8(),c=F8(),f=1,d="[object Arguments]",y="[object Array]",p="[object Object]",g=Object.prototype,b=g.hasOwnProperty;function _(S,x,A,j,O,N){var E=o(S),T=o(x),C=E?y:i(S),D=T?y:i(x);C=C==d?p:C,D=D==d?p:D;var q=C==p,F=D==p,L=C==D;if(L&&l(S)){if(!l(x))return!1;E=!0,q=!1}if(L&&!q)return N||(N=new e),E||c(S)?t(S,x,A,j,O,N):n(S,x,C,A,j,O,N);if(!(A&f)){var P=q&&b.call(S,"__wrapped__"),Y=F&&b.call(x,"__wrapped__");if(P||Y){var R=P?S.value():S,$=Y?x.value():x;return N||(N=new e),O(R,$,A,j,N)}}return L?(N||(N=new e),r(S,x,A,j,O,N)):!1}return mx=_,mx}var gx,zM;function u2(){if(zM)return gx;zM=1;var e=NQ(),t=Hi();function n(r,i,o,l,c){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,l,n,c)}return gx=n,gx}var vx,BM;function TQ(){if(BM)return vx;BM=1;var e=L8(),t=u2(),n=1,r=2;function i(o,l,c,f){var d=c.length,y=d,p=!f;if(o==null)return!y;for(o=Object(o);d--;){var g=c[d];if(p&&g[2]?g[1]!==o[g[0]]:!(g[0]in o))return!1}for(;++d<y;){g=c[d];var b=g[0],_=o[b],S=g[1];if(p&&g[2]){if(_===void 0&&!(b in o))return!1}else{var x=new e;if(f)var A=f(_,S,b,o,l,x);if(!(A===void 0?t(S,_,n|r,f,x):A))return!1}}return!0}return vx=i,vx}var bx,IM;function K8(){if(IM)return bx;IM=1;var e=Va();function t(n){return n===n&&!e(n)}return bx=t,bx}var xx,UM;function CQ(){if(UM)return xx;UM=1;var e=K8(),t=Vy();function n(r){for(var i=t(r),o=i.length;o--;){var l=i[o],c=r[l];i[o]=[l,c,e(c)]}return i}return xx=n,xx}var wx,HM;function W8(){if(HM)return wx;HM=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return wx=e,wx}var Sx,VM;function MQ(){if(VM)return Sx;VM=1;var e=TQ(),t=CQ(),n=W8();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(l){return l===i||e(l,i,o)}}return Sx=r,Sx}var _x,GM;function kQ(){if(GM)return _x;GM=1;function e(t,n){return t!=null&&n in Object(t)}return _x=e,_x}var Ax,FM;function RQ(){if(FM)return Ax;FM=1;var e=y8(),t=o2(),n=kn(),r=s2(),i=l2(),o=zy();function l(c,f,d){f=e(f,c);for(var y=-1,p=f.length,g=!1;++y<p;){var b=o(f[y]);if(!(g=c!=null&&d(c,b)))break;c=c[b]}return g||++y!=p?g:(p=c==null?0:c.length,!!p&&i(p)&&r(b,p)&&(n(c)||t(c)))}return Ax=l,Ax}var Ox,YM;function PQ(){if(YM)return Ox;YM=1;var e=kQ(),t=RQ();function n(r,i){return r!=null&&t(r,i,e)}return Ox=n,Ox}var jx,XM;function DQ(){if(XM)return jx;XM=1;var e=u2(),t=m8(),n=PQ(),r=G_(),i=K8(),o=W8(),l=zy(),c=1,f=2;function d(y,p){return r(y)&&i(p)?o(l(y),p):function(g){var b=t(g,y);return b===void 0&&b===p?n(g,y):e(p,b,c|f)}}return jx=d,jx}var Ex,KM;function su(){if(KM)return Ex;KM=1;function e(t){return t}return Ex=e,Ex}var Nx,WM;function $Q(){if(WM)return Nx;WM=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Nx=e,Nx}var Tx,QM;function qQ(){if(QM)return Tx;QM=1;var e=Q_();function t(n){return function(r){return e(r,n)}}return Tx=t,Tx}var Cx,ZM;function LQ(){if(ZM)return Cx;ZM=1;var e=$Q(),t=qQ(),n=G_(),r=zy();function i(o){return n(o)?e(r(o)):t(o)}return Cx=i,Cx}var Mx,JM;function Qr(){if(JM)return Mx;JM=1;var e=MQ(),t=DQ(),n=su(),r=kn(),i=LQ();function o(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?r(l)?t(l[0],l[1]):e(l):i(l)}return Mx=o,Mx}var kx,e3;function Q8(){if(e3)return kx;e3=1;function e(t,n,r,i){for(var o=t.length,l=r+(i?1:-1);i?l--:++l<o;)if(n(t[l],l,t))return l;return-1}return kx=e,kx}var Rx,t3;function zQ(){if(t3)return Rx;t3=1;function e(t){return t!==t}return Rx=e,Rx}var Px,n3;function BQ(){if(n3)return Px;n3=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return Px=e,Px}var Dx,r3;function IQ(){if(r3)return Dx;r3=1;var e=Q8(),t=zQ(),n=BQ();function r(i,o,l){return o===o?n(i,o,l):e(i,t,l)}return Dx=r,Dx}var $x,i3;function UQ(){if(i3)return $x;i3=1;var e=IQ();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return $x=t,$x}var qx,a3;function HQ(){if(a3)return qx;a3=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return qx=e,qx}var Lx,o3;function VQ(){if(o3)return Lx;o3=1;function e(){}return Lx=e,Lx}var zx,s3;function GQ(){if(s3)return zx;s3=1;var e=X8(),t=VQ(),n=a2(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return zx=i,zx}var Bx,l3;function FQ(){if(l3)return Bx;l3=1;var e=z8(),t=UQ(),n=HQ(),r=I8(),i=GQ(),o=a2(),l=200;function c(f,d,y){var p=-1,g=t,b=f.length,_=!0,S=[],x=S;if(y)_=!1,g=n;else if(b>=l){var A=d?null:i(f);if(A)return o(A);_=!1,g=r,x=new e}else x=d?[]:S;e:for(;++p<b;){var j=f[p],O=d?d(j):j;if(j=y||j!==0?j:0,_&&O===O){for(var N=x.length;N--;)if(x[N]===O)continue e;d&&x.push(O),S.push(j)}else g(x,O,y)||(x!==S&&x.push(O),S.push(j))}return S}return Bx=c,Bx}var Ix,u3;function YQ(){if(u3)return Ix;u3=1;var e=Qr(),t=FQ();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return Ix=n,Ix}var XQ=YQ();const c3=nt(XQ);function Z8(e,t,n){return t===!0?c3(e,n):Pe(t)?c3(e,t):e}function Cl(e){"@babel/helpers - typeof";return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}var KQ=["ref"];function f3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _i(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f3(Object(n),!0).forEach(function(r){Gy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,e$(r.key),r)}}function QQ(e,t,n){return t&&d3(e.prototype,t),n&&d3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZQ(e,t,n){return t=Cp(t),JQ(e,J8()?Reflect.construct(t,n||[],Cp(e).constructor):t.apply(e,n))}function JQ(e,t){if(t&&(Cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eZ(e)}function eZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function J8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(J8=function(){return!!e})()}function Cp(e){return Cp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cp(e)}function tZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ww(e,t)}function Ww(e,t){return Ww=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ww(e,t)}function Gy(e,t,n){return t=e$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e$(e){var t=nZ(e,"string");return Cl(t)=="symbol"?t:t+""}function nZ(e,t){if(Cl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function rZ(e,t){if(e==null)return{};var n=iZ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iZ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function aZ(e){return e.value}function oZ(e,t){if(W.isValidElement(e))return W.cloneElement(e,t);if(typeof e=="function")return W.createElement(e,t);t.ref;var n=rZ(t,KQ);return W.createElement(i2,n)}var h3=1,ul=(function(e){function t(){var n;WQ(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=ZQ(this,t,[].concat(i)),Gy(n,"lastBoundingBox",{width:-1,height:-1}),n}return tZ(t,e),QQ(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>h3||Math.abs(i.height-this.lastBoundingBox.height)>h3)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?_i({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,l=i.align,c=i.verticalAlign,f=i.margin,d=i.chartWidth,y=i.chartHeight,p,g;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(l==="center"&&o==="vertical"){var b=this.getBBoxSnapshot();p={left:((d||0)-b.width)/2}}else p=l==="right"?{right:f&&f.right||0}:{left:f&&f.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(c==="middle"){var _=this.getBBoxSnapshot();g={top:((y||0)-_.height)/2}}else g=c==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return _i(_i({},p),g)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,l=i.width,c=i.height,f=i.wrapperStyle,d=i.payloadUniqBy,y=i.payload,p=_i(_i({position:"absolute",width:l||"auto",height:c||"auto"},this.getDefaultPosition(f)),f);return W.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(b){r.wrapperNode=b}},oZ(o,_i(_i({},this.props),{},{payload:Z8(y,d,aZ)})))}}],[{key:"getWithHeight",value:function(r,i){var o=_i(_i({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&ge(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||i}:null}}])})(U.PureComponent);Gy(ul,"displayName","Legend");Gy(ul,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ux,p3;function sZ(){if(p3)return Ux;p3=1;var e=Vf(),t=o2(),n=kn(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return Ux=i,Ux}var Hx,y3;function t$(){if(y3)return Hx;y3=1;var e=H8(),t=sZ();function n(r,i,o,l,c){var f=-1,d=r.length;for(o||(o=t),c||(c=[]);++f<d;){var y=r[f];i>0&&o(y)?i>1?n(y,i-1,o,l,c):e(c,y):l||(c[c.length]=y)}return c}return Hx=n,Hx}var Vx,m3;function lZ(){if(m3)return Vx;m3=1;function e(t){return function(n,r,i){for(var o=-1,l=Object(n),c=i(n),f=c.length;f--;){var d=c[t?f:++o];if(r(l[d],d,l)===!1)break}return n}}return Vx=e,Vx}var Gx,g3;function uZ(){if(g3)return Gx;g3=1;var e=lZ(),t=e();return Gx=t,Gx}var Fx,v3;function n$(){if(v3)return Fx;v3=1;var e=uZ(),t=Vy();function n(r,i){return r&&e(r,i,t)}return Fx=n,Fx}var Yx,b3;function cZ(){if(b3)return Yx;b3=1;var e=Yf();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var l=i.length,c=r?l:-1,f=Object(i);(r?c--:++c<l)&&o(f[c],c,f)!==!1;);return i}}return Yx=t,Yx}var Xx,x3;function c2(){if(x3)return Xx;x3=1;var e=n$(),t=cZ(),n=t(e);return Xx=n,Xx}var Kx,w3;function r$(){if(w3)return Kx;w3=1;var e=c2(),t=Yf();function n(r,i){var o=-1,l=t(r)?Array(r.length):[];return e(r,function(c,f,d){l[++o]=i(c,f,d)}),l}return Kx=n,Kx}var Wx,S3;function fZ(){if(S3)return Wx;S3=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Wx=e,Wx}var Qx,_3;function dZ(){if(_3)return Qx;_3=1;var e=au();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,l=n===n,c=e(n),f=r!==void 0,d=r===null,y=r===r,p=e(r);if(!d&&!p&&!c&&n>r||c&&f&&y&&!d&&!p||o&&f&&y||!i&&y||!l)return 1;if(!o&&!c&&!p&&n<r||p&&i&&l&&!o&&!c||d&&i&&l||!f&&l||!y)return-1}return 0}return Qx=t,Qx}var Zx,A3;function hZ(){if(A3)return Zx;A3=1;var e=dZ();function t(n,r,i){for(var o=-1,l=n.criteria,c=r.criteria,f=l.length,d=i.length;++o<f;){var y=e(l[o],c[o]);if(y){if(o>=d)return y;var p=i[o];return y*(p=="desc"?-1:1)}}return n.index-r.index}return Zx=t,Zx}var Jx,O3;function pZ(){if(O3)return Jx;O3=1;var e=W_(),t=Q_(),n=Qr(),r=r$(),i=fZ(),o=G8(),l=hZ(),c=su(),f=kn();function d(y,p,g){p.length?p=e(p,function(S){return f(S)?function(x){return t(x,S.length===1?S[0]:S)}:S}):p=[c];var b=-1;p=e(p,o(n));var _=r(y,function(S,x,A){var j=e(p,function(O){return O(S)});return{criteria:j,index:++b,value:S}});return i(_,function(S,x){return l(S,x,g)})}return Jx=d,Jx}var e1,j3;function yZ(){if(j3)return e1;j3=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return e1=e,e1}var t1,E3;function mZ(){if(E3)return t1;E3=1;var e=yZ(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var l=arguments,c=-1,f=t(l.length-i,0),d=Array(f);++c<f;)d[c]=l[i+c];c=-1;for(var y=Array(i+1);++c<i;)y[c]=l[c];return y[i]=o(d),e(r,this,y)}}return t1=n,t1}var n1,N3;function gZ(){if(N3)return n1;N3=1;function e(t){return function(){return t}}return n1=e,n1}var r1,T3;function i$(){if(T3)return r1;T3=1;var e=Jo(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return r1=t,r1}var i1,C3;function vZ(){if(C3)return i1;C3=1;var e=gZ(),t=i$(),n=su(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return i1=r,i1}var a1,M3;function bZ(){if(M3)return a1;M3=1;var e=800,t=16,n=Date.now;function r(i){var o=0,l=0;return function(){var c=n(),f=t-(c-l);if(l=c,f>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return a1=r,a1}var o1,k3;function xZ(){if(k3)return o1;k3=1;var e=vZ(),t=bZ(),n=t(e);return o1=n,o1}var s1,R3;function wZ(){if(R3)return s1;R3=1;var e=su(),t=mZ(),n=xZ();function r(i,o){return n(t(i,o,e),i+"")}return s1=r,s1}var l1,P3;function Fy(){if(P3)return l1;P3=1;var e=Y_(),t=Yf(),n=s2(),r=Va();function i(o,l,c){if(!r(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],o):!1}return l1=i,l1}var u1,D3;function SZ(){if(D3)return u1;D3=1;var e=t$(),t=pZ(),n=wZ(),r=Fy(),i=n(function(o,l){if(o==null)return[];var c=l.length;return c>1&&r(o,l[0],l[1])?l=[]:c>2&&r(l[0],l[1],l[2])&&(l=[l[0]]),t(o,e(l,1),[])});return u1=i,u1}var _Z=SZ();const f2=nt(_Z);function Zc(e){"@babel/helpers - typeof";return Zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zc(e)}function Qw(){return Qw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qw.apply(this,arguments)}function AZ(e,t){return NZ(e)||EZ(e,t)||jZ(e,t)||OZ()}function OZ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
460
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jZ(e,t){if(e){if(typeof e=="string")return $3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $3(e,t)}}function $3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function EZ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function NZ(e){if(Array.isArray(e))return e}function q3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function c1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q3(Object(n),!0).forEach(function(r){TZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TZ(e,t,n){return t=CZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CZ(e){var t=MZ(e,"string");return Zc(t)=="symbol"?t:t+""}function MZ(e,t){if(Zc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kZ(e){return Array.isArray(e)&&Ft(e[0])&&Ft(e[1])?e.join(" ~ "):e}var RZ=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,o=i===void 0?{}:i,l=t.itemStyle,c=l===void 0?{}:l,f=t.labelStyle,d=f===void 0?{}:f,y=t.payload,p=t.formatter,g=t.itemSorter,b=t.wrapperClassName,_=t.labelClassName,S=t.label,x=t.labelFormatter,A=t.accessibilityLayer,j=A===void 0?!1:A,O=function(){if(y&&y.length){var P={padding:0,margin:0},Y=(g?f2(y,g):y).map(function(R,$){if(R.type==="none")return null;var k=c1({display:"block",paddingTop:4,paddingBottom:4,color:R.color||"#000"},c),I=R.formatter||p||kZ,H=R.value,V=R.name,K=H,z=V;if(I&&K!=null&&z!=null){var G=I(H,V,R,$,y);if(Array.isArray(G)){var Z=AZ(G,2);K=Z[0],z=Z[1]}else K=G}return W.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:k},Ft(z)?W.createElement("span",{className:"recharts-tooltip-item-name"},z):null,Ft(z)?W.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,W.createElement("span",{className:"recharts-tooltip-item-value"},K),W.createElement("span",{className:"recharts-tooltip-item-unit"},R.unit||""))});return W.createElement("ul",{className:"recharts-tooltip-item-list",style:P},Y)}return null},N=c1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),E=c1({margin:0},d),T=!Ie(S),C=T?S:"",D=Be("recharts-default-tooltip",b),q=Be("recharts-tooltip-label",_);T&&x&&y!==void 0&&y!==null&&(C=x(S,y));var F=j?{role:"status","aria-live":"assertive"}:{};return W.createElement("div",Qw({className:D,style:N},F),W.createElement("p",{className:q,style:E},W.isValidElement(C)?C:"".concat(C)),O())};function Jc(e){"@babel/helpers - typeof";return Jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jc(e)}function qh(e,t,n){return t=PZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PZ(e){var t=DZ(e,"string");return Jc(t)=="symbol"?t:t+""}function DZ(e,t){if(Jc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pc="recharts-tooltip-wrapper",$Z={visibility:"hidden"};function qZ(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Be(pc,qh(qh(qh(qh({},"".concat(pc,"-right"),ge(n)&&t&&ge(t.x)&&n>=t.x),"".concat(pc,"-left"),ge(n)&&t&&ge(t.x)&&n<t.x),"".concat(pc,"-bottom"),ge(r)&&t&&ge(t.y)&&r>=t.y),"".concat(pc,"-top"),ge(r)&&t&&ge(t.y)&&r<t.y))}function L3(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,o=e.position,l=e.reverseDirection,c=e.tooltipDimension,f=e.viewBox,d=e.viewBoxDimension;if(o&&ge(o[r]))return o[r];var y=n[r]-c-i,p=n[r]+i;if(t[r])return l[r]?y:p;if(l[r]){var g=y,b=f[r];return g<b?Math.max(p,f[r]):Math.max(y,f[r])}var _=p+c,S=f[r]+d;return _>S?Math.max(y,f[r]):Math.max(p,f[r])}function LZ(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function zZ(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,f=e.viewBox,d,y,p;return l.height>0&&l.width>0&&n?(y=L3({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),p=L3({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),d=LZ({translateX:y,translateY:p,useTranslate3d:c})):d=$Z,{cssProperties:d,cssClasses:qZ({translateX:y,translateY:p,coordinate:n})}}function Ml(e){"@babel/helpers - typeof";return Ml=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ml(e)}function z3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function B3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?z3(Object(n),!0).forEach(function(r){Jw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o$(r.key),r)}}function UZ(e,t,n){return t&&IZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HZ(e,t,n){return t=Mp(t),VZ(e,a$()?Reflect.construct(t,n||[],Mp(e).constructor):t.apply(e,n))}function VZ(e,t){if(t&&(Ml(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return GZ(e)}function GZ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a$=function(){return!!e})()}function Mp(e){return Mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mp(e)}function FZ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zw(e,t)}function Zw(e,t){return Zw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Zw(e,t)}function Jw(e,t,n){return t=o$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o$(e){var t=YZ(e,"string");return Ml(t)=="symbol"?t:t+""}function YZ(e,t){if(Ml(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ml(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var I3=1,XZ=(function(e){function t(){var n;BZ(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=HZ(this,t,[].concat(i)),Jw(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),Jw(n,"handleKeyDown",function(l){if(l.key==="Escape"){var c,f,d,y;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(c=(f=n.props.coordinate)===null||f===void 0?void 0:f.x)!==null&&c!==void 0?c:0,y:(d=(y=n.props.coordinate)===null||y===void 0?void 0:y.y)!==null&&d!==void 0?d:0}})}}),n}return FZ(t,e),UZ(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>I3||Math.abs(r.height-this.state.lastBoundingBox.height)>I3)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,l=i.allowEscapeViewBox,c=i.animationDuration,f=i.animationEasing,d=i.children,y=i.coordinate,p=i.hasPayload,g=i.isAnimationActive,b=i.offset,_=i.position,S=i.reverseDirection,x=i.useTranslate3d,A=i.viewBox,j=i.wrapperStyle,O=zZ({allowEscapeViewBox:l,coordinate:y,offsetTopLeft:b,position:_,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:x,viewBox:A}),N=O.cssClasses,E=O.cssProperties,T=B3(B3({transition:g&&o?"transform ".concat(c,"ms ").concat(f):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&p?"visible":"hidden",position:"absolute",top:0,left:0},j);return W.createElement("div",{tabIndex:-1,className:N,style:T,ref:function(D){r.wrapperNode=D}},d)}}])})(U.PureComponent),KZ=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},lu={isSsr:KZ()};function kl(e){"@babel/helpers - typeof";return kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(e)}function U3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function H3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U3(Object(n),!0).forEach(function(r){d2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l$(r.key),r)}}function ZZ(e,t,n){return t&&QZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JZ(e,t,n){return t=kp(t),eJ(e,s$()?Reflect.construct(t,n||[],kp(e).constructor):t.apply(e,n))}function eJ(e,t){if(t&&(kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tJ(e)}function tJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s$(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(s$=function(){return!!e})()}function kp(e){return kp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kp(e)}function nJ(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eS(e,t)}function eS(e,t){return eS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},eS(e,t)}function d2(e,t,n){return t=l$(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l$(e){var t=rJ(e,"string");return kl(t)=="symbol"?t:t+""}function rJ(e,t){if(kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function iJ(e){return e.dataKey}function aJ(e,t){return W.isValidElement(e)?W.cloneElement(e,t):typeof e=="function"?W.createElement(e,t):W.createElement(RZ,t)}var Sr=(function(e){function t(){return WZ(this,t),JZ(this,t,arguments)}return nJ(t,e),ZZ(t,[{key:"render",value:function(){var r=this,i=this.props,o=i.active,l=i.allowEscapeViewBox,c=i.animationDuration,f=i.animationEasing,d=i.content,y=i.coordinate,p=i.filterNull,g=i.isAnimationActive,b=i.offset,_=i.payload,S=i.payloadUniqBy,x=i.position,A=i.reverseDirection,j=i.useTranslate3d,O=i.viewBox,N=i.wrapperStyle,E=_??[];p&&E.length&&(E=Z8(_.filter(function(C){return C.value!=null&&(C.hide!==!0||r.props.includeHidden)}),S,iJ));var T=E.length>0;return W.createElement(XZ,{allowEscapeViewBox:l,animationDuration:c,animationEasing:f,isAnimationActive:g,active:o,coordinate:y,hasPayload:T,offset:b,position:x,reverseDirection:A,useTranslate3d:j,viewBox:O,wrapperStyle:N},aJ(d,H3(H3({},this.props),{},{payload:E})))}}])})(U.PureComponent);d2(Sr,"displayName","Tooltip");d2(Sr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!lu.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var f1,V3;function oJ(){if(V3)return f1;V3=1;var e=Wr(),t=function(){return e.Date.now()};return f1=t,f1}var d1,G3;function sJ(){if(G3)return d1;G3=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return d1=t,d1}var h1,F3;function lJ(){if(F3)return h1;F3=1;var e=sJ(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return h1=n,h1}var p1,Y3;function u$(){if(Y3)return p1;Y3=1;var e=lJ(),t=Va(),n=au(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function f(d){if(typeof d=="number")return d;if(n(d))return r;if(t(d)){var y=typeof d.valueOf=="function"?d.valueOf():d;d=t(y)?y+"":y}if(typeof d!="string")return d===0?d:+d;d=e(d);var p=o.test(d);return p||l.test(d)?c(d.slice(2),p?2:8):i.test(d)?r:+d}return p1=f,p1}var y1,X3;function uJ(){if(X3)return y1;X3=1;var e=Va(),t=oJ(),n=u$(),r="Expected a function",i=Math.max,o=Math.min;function l(c,f,d){var y,p,g,b,_,S,x=0,A=!1,j=!1,O=!0;if(typeof c!="function")throw new TypeError(r);f=n(f)||0,e(d)&&(A=!!d.leading,j="maxWait"in d,g=j?i(n(d.maxWait)||0,f):g,O="trailing"in d?!!d.trailing:O);function N(Y){var R=y,$=p;return y=p=void 0,x=Y,b=c.apply($,R),b}function E(Y){return x=Y,_=setTimeout(D,f),A?N(Y):b}function T(Y){var R=Y-S,$=Y-x,k=f-R;return j?o(k,g-$):k}function C(Y){var R=Y-S,$=Y-x;return S===void 0||R>=f||R<0||j&&$>=g}function D(){var Y=t();if(C(Y))return q(Y);_=setTimeout(D,T(Y))}function q(Y){return _=void 0,O&&y?N(Y):(y=p=void 0,b)}function F(){_!==void 0&&clearTimeout(_),x=0,y=S=p=_=void 0}function L(){return _===void 0?b:q(t())}function P(){var Y=t(),R=C(Y);if(y=arguments,p=this,S=Y,R){if(_===void 0)return E(S);if(j)return clearTimeout(_),_=setTimeout(D,f),N(S)}return _===void 0&&(_=setTimeout(D,f)),b}return P.cancel=F,P.flush=L,P}return y1=l,y1}var m1,K3;function cJ(){if(K3)return m1;K3=1;var e=uJ(),t=Va(),n="Expected a function";function r(i,o,l){var c=!0,f=!0;if(typeof i!="function")throw new TypeError(n);return t(l)&&(c="leading"in l?!!l.leading:c,f="trailing"in l?!!l.trailing:f),e(i,o,{leading:c,maxWait:o,trailing:f})}return m1=r,m1}var fJ=cJ();const c$=nt(fJ);function ef(e){"@babel/helpers - typeof";return ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(e)}function W3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W3(Object(n),!0).forEach(function(r){dJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dJ(e,t,n){return t=hJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hJ(e){var t=pJ(e,"string");return ef(t)=="symbol"?t:t+""}function pJ(e,t){if(ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yJ(e,t){return bJ(e)||vJ(e,t)||gJ(e,t)||mJ()}function mJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
461
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gJ(e,t){if(e){if(typeof e=="string")return Q3(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q3(e,t)}}function Q3(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vJ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function bJ(e){if(Array.isArray(e))return e}var Z3=U.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,o=e.width,l=o===void 0?"100%":o,c=e.height,f=c===void 0?"100%":c,d=e.minWidth,y=d===void 0?0:d,p=e.minHeight,g=e.maxHeight,b=e.children,_=e.debounce,S=_===void 0?0:_,x=e.id,A=e.className,j=e.onResize,O=e.style,N=O===void 0?{}:O,E=U.useRef(null),T=U.useRef();T.current=j,U.useImperativeHandle(t,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var C=U.useState({containerWidth:i.width,containerHeight:i.height}),D=yJ(C,2),q=D[0],F=D[1],L=U.useCallback(function(Y,R){F(function($){var k=Math.round(Y),I=Math.round(R);return $.containerWidth===k&&$.containerHeight===I?$:{containerWidth:k,containerHeight:I}})},[]);U.useEffect(function(){var Y=function(V){var K,z=V[0].contentRect,G=z.width,Z=z.height;L(G,Z),(K=T.current)===null||K===void 0||K.call(T,G,Z)};S>0&&(Y=c$(Y,S,{trailing:!0,leading:!1}));var R=new ResizeObserver(Y),$=E.current.getBoundingClientRect(),k=$.width,I=$.height;return L(k,I),R.observe(E.current),function(){R.disconnect()}},[L,S]);var P=U.useMemo(function(){var Y=q.containerWidth,R=q.containerHeight;if(Y<0||R<0)return null;Nr(Eo(l)||Eo(f),`The width(%s) and height(%s) are both fixed numbers,
462
+ maybe you don't need to use a ResponsiveContainer.`,l,f),Nr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var $=Eo(l)?Y:l,k=Eo(f)?R:f;n&&n>0&&($?k=$/n:k&&($=k*n),g&&k>g&&(k=g)),Nr($>0||k>0,`The width(%s) and height(%s) of chart should be greater than 0,
463
+ please check the style of container, or the props width(%s) and height(%s),
464
+ or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
465
+ height and width.`,$,k,l,f,y,p,n);var I=!Array.isArray(b)&&Ri(b.type).endsWith("Chart");return W.Children.map(b,function(H){return W.isValidElement(H)?U.cloneElement(H,Lh({width:$,height:k},I?{style:Lh({height:"100%",width:"100%",maxHeight:k,maxWidth:$},H.props.style)}:{})):H})},[n,b,f,g,p,y,q,l]);return W.createElement("div",{id:x?"".concat(x):void 0,className:Be("recharts-responsive-container",A),style:Lh(Lh({},N),{},{width:l,height:f,minWidth:y,minHeight:p,maxHeight:g}),ref:E},P)}),tf=function(t){return null};tf.displayName="Cell";function nf(e){"@babel/helpers - typeof";return nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(e)}function J3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?J3(Object(n),!0).forEach(function(r){xJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xJ(e,t,n){return t=wJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wJ(e){var t=SJ(e,"string");return nf(t)=="symbol"?t:t+""}function SJ(e,t){if(nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gs={widthCache:{},cacheCount:0},_J=2e3,AJ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},e5="recharts_measurement_span";function OJ(e){var t=tS({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Mc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||lu.isSsr)return{width:0,height:0};var r=OJ(n),i=JSON.stringify({text:t,copyStyle:r});if(Gs.widthCache[i])return Gs.widthCache[i];try{var o=document.getElementById(e5);o||(o=document.createElement("span"),o.setAttribute("id",e5),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=tS(tS({},AJ),r);Object.assign(o.style,l),o.textContent="".concat(t);var c=o.getBoundingClientRect(),f={width:c.width,height:c.height};return Gs.widthCache[i]=f,++Gs.cacheCount>_J&&(Gs.cacheCount=0,Gs.widthCache={}),f}catch{return{width:0,height:0}}},jJ=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function rf(e){"@babel/helpers - typeof";return rf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rf(e)}function Rp(e,t){return CJ(e)||TJ(e,t)||NJ(e,t)||EJ()}function EJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
466
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NJ(e,t){if(e){if(typeof e=="string")return t5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return t5(e,t)}}function t5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TJ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function CJ(e){if(Array.isArray(e))return e}function MJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RJ(r.key),r)}}function kJ(e,t,n){return t&&n5(e.prototype,t),n&&n5(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function RJ(e){var t=PJ(e,"string");return rf(t)=="symbol"?t:t+""}function PJ(e,t){if(rf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var r5=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,i5=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,DJ=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,$J=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,f$={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},qJ=Object.keys(f$),Js="NaN";function LJ(e,t){return e*f$[t]}var zh=(function(){function e(t,n){MJ(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!DJ.test(n)&&(this.num=NaN,this.unit=""),qJ.includes(n)&&(this.num=LJ(t,n),this.unit="px")}return kJ(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=$J.exec(n))!==null&&r!==void 0?r:[],o=Rp(i,3),l=o[1],c=o[2];return new e(parseFloat(l),c??"")}}])})();function d$(e){if(e.includes(Js))return Js;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=r5.exec(t))!==null&&n!==void 0?n:[],i=Rp(r,4),o=i[1],l=i[2],c=i[3],f=zh.parse(o??""),d=zh.parse(c??""),y=l==="*"?f.multiply(d):f.divide(d);if(y.isNaN())return Js;t=t.replace(r5,y.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,g=(p=i5.exec(t))!==null&&p!==void 0?p:[],b=Rp(g,4),_=b[1],S=b[2],x=b[3],A=zh.parse(_??""),j=zh.parse(x??""),O=S==="+"?A.add(j):A.subtract(j);if(O.isNaN())return Js;t=t.replace(i5,O.toString())}return t}var a5=/\(([^()]*)\)/;function zJ(e){for(var t=e;t.includes("(");){var n=a5.exec(t),r=Rp(n,2),i=r[1];t=t.replace(a5,d$(i))}return t}function BJ(e){var t=e.replace(/\s+/g,"");return t=zJ(t),t=d$(t),t}function IJ(e){try{return BJ(e)}catch{return Js}}function g1(e){var t=IJ(e.slice(5,-1));return t===Js?"":t}var UJ=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],HJ=["dx","dy","angle","className","breakAll"];function nS(){return nS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nS.apply(this,arguments)}function o5(e,t){if(e==null)return{};var n=VJ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function VJ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function s5(e,t){return XJ(e)||YJ(e,t)||FJ(e,t)||GJ()}function GJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
467
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FJ(e,t){if(e){if(typeof e=="string")return l5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l5(e,t)}}function l5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function YJ(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;f=!1}else for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function XJ(e){if(Array.isArray(e))return e}var h$=/[ \f\n\r\t\v\u2028\u2029]+/,p$=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var o=[];Ie(n)||(r?o=n.toString().split(""):o=n.toString().split(h$));var l=o.map(function(f){return{word:f,width:Mc(f,i).width}}),c=r?0:Mc(" ",i).width;return{wordsWithComputedWidth:l,spaceWidth:c}}catch{return null}},KJ=function(t,n,r,i,o){var l=t.maxLines,c=t.children,f=t.style,d=t.breakAll,y=ge(l),p=c,g=function(){var $=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return $.reduce(function(k,I){var H=I.word,V=I.width,K=k[k.length-1];if(K&&(i==null||o||K.width+V+r<Number(i)))K.words.push(H),K.width+=V+r;else{var z={words:[H],width:V};k.push(z)}return k},[])},b=g(n),_=function($){return $.reduce(function(k,I){return k.width>I.width?k:I})};if(!y)return b;for(var S="…",x=function($){var k=p.slice(0,$),I=p$({breakAll:d,style:f,children:k+S}).wordsWithComputedWidth,H=g(I),V=H.length>l||_(H).width>Number(i);return[V,H]},A=0,j=p.length-1,O=0,N;A<=j&&O<=p.length-1;){var E=Math.floor((A+j)/2),T=E-1,C=x(T),D=s5(C,2),q=D[0],F=D[1],L=x(E),P=s5(L,1),Y=P[0];if(!q&&!Y&&(A=E+1),q&&Y&&(j=E-1),!q&&Y){N=F;break}O++}return N||b},u5=function(t){var n=Ie(t)?[]:t.toString().split(h$);return[{words:n}]},WJ=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,l=t.breakAll,c=t.maxLines;if((n||r)&&!lu.isSsr){var f,d,y=p$({breakAll:l,children:i,style:o});if(y){var p=y.wordsWithComputedWidth,g=y.spaceWidth;f=p,d=g}else return u5(i);return KJ({breakAll:l,children:i,maxLines:c,style:o},f,d,n,r)}return u5(i)},c5="#808080",Yo=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,l=t.lineHeight,c=l===void 0?"1em":l,f=t.capHeight,d=f===void 0?"0.71em":f,y=t.scaleToFit,p=y===void 0?!1:y,g=t.textAnchor,b=g===void 0?"start":g,_=t.verticalAnchor,S=_===void 0?"end":_,x=t.fill,A=x===void 0?c5:x,j=o5(t,UJ),O=U.useMemo(function(){return WJ({breakAll:j.breakAll,children:j.children,maxLines:j.maxLines,scaleToFit:p,style:j.style,width:j.width})},[j.breakAll,j.children,j.maxLines,p,j.style,j.width]),N=j.dx,E=j.dy,T=j.angle,C=j.className,D=j.breakAll,q=o5(j,HJ);if(!Ft(r)||!Ft(o))return null;var F=r+(ge(N)?N:0),L=o+(ge(E)?E:0),P;switch(S){case"start":P=g1("calc(".concat(d,")"));break;case"middle":P=g1("calc(".concat((O.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:P=g1("calc(".concat(O.length-1," * -").concat(c,")"));break}var Y=[];if(p){var R=O[0].width,$=j.width;Y.push("scale(".concat((ge($)?$/R:1)/R,")"))}return T&&Y.push("rotate(".concat(T,", ").concat(F,", ").concat(L,")")),Y.length&&(q.transform=Y.join(" ")),W.createElement("text",nS({},ke(q,!0),{x:F,y:L,className:Be("recharts-text",C),textAnchor:b,fill:A.includes("url")?c5:A}),O.map(function(k,I){var H=k.words.join(D?"":" ");return W.createElement("tspan",{x:F,dy:I===0?P:c,key:"".concat(H,"-").concat(I)},H)}))};function Ua(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function QJ(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function h2(e){let t,n,r;e.length!==2?(t=Ua,n=(c,f)=>Ua(e(c),f),r=(c,f)=>e(c)-f):(t=e===Ua||e===QJ?e:ZJ,n=e,r=e);function i(c,f,d=0,y=c.length){if(d<y){if(t(f,f)!==0)return y;do{const p=d+y>>>1;n(c[p],f)<0?d=p+1:y=p}while(d<y)}return d}function o(c,f,d=0,y=c.length){if(d<y){if(t(f,f)!==0)return y;do{const p=d+y>>>1;n(c[p],f)<=0?d=p+1:y=p}while(d<y)}return d}function l(c,f,d=0,y=c.length){const p=i(c,f,d,y-1);return p>d&&r(c[p-1],f)>-r(c[p],f)?p-1:p}return{left:i,center:l,right:o}}function ZJ(){return 0}function y$(e){return e===null?NaN:+e}function*JJ(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const eee=h2(Ua),Xf=eee.right;h2(y$).center;class f5 extends Map{constructor(t,n=ree){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(d5(this,t))}has(t){return super.has(d5(this,t))}set(t,n){return super.set(tee(this,t),n)}delete(t){return super.delete(nee(this,t))}}function d5({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function tee({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function nee({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ree(e){return e!==null&&typeof e=="object"?e.valueOf():e}function iee(e=Ua){if(e===Ua)return m$;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 m$(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const aee=Math.sqrt(50),oee=Math.sqrt(10),see=Math.sqrt(2);function Pp(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),l=o>=aee?10:o>=oee?5:o>=see?2:1;let c,f,d;return i<0?(d=Math.pow(10,-i)/l,c=Math.round(e*d),f=Math.round(t*d),c/d<e&&++c,f/d>t&&--f,d=-d):(d=Math.pow(10,i)*l,c=Math.round(e/d),f=Math.round(t/d),c*d<e&&++c,f*d>t&&--f),f<c&&.5<=n&&n<2?Pp(e,t,n*2):[c,f,d]}function rS(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,l]=r?Pp(t,e,n):Pp(e,t,n);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(r)if(l<0)for(let d=0;d<c;++d)f[d]=(o-d)/-l;else for(let d=0;d<c;++d)f[d]=(o-d)*l;else if(l<0)for(let d=0;d<c;++d)f[d]=(i+d)/-l;else for(let d=0;d<c;++d)f[d]=(i+d)*l;return f}function iS(e,t,n){return t=+t,e=+e,n=+n,Pp(e,t,n)[2]}function aS(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?iS(t,e,n):iS(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function h5(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function p5(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function g$(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?m$:iee(i);r>n;){if(r-n>600){const f=r-n+1,d=t-n+1,y=Math.log(f),p=.5*Math.exp(2*y/3),g=.5*Math.sqrt(y*p*(f-p)/f)*(d-f/2<0?-1:1),b=Math.max(n,Math.floor(t-d*p/f+g)),_=Math.min(r,Math.floor(t+(f-d)*p/f+g));g$(e,t,b,_,i)}const o=e[t];let l=n,c=r;for(yc(e,n,t),i(e[r],o)>0&&yc(e,n,r);l<c;){for(yc(e,l,c),++l,--c;i(e[l],o)<0;)++l;for(;i(e[c],o)>0;)--c}i(e[n],o)===0?yc(e,n,c):(++c,yc(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function yc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function lee(e,t,n){if(e=Float64Array.from(JJ(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return p5(e);if(t>=1)return h5(e);var r,i=(r-1)*t,o=Math.floor(i),l=h5(g$(e,o).subarray(0,o+1)),c=p5(e.subarray(o+1));return l+(c-l)*(i-o)}}function uee(e,t,n=y$){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),l=+n(e[o],o,e),c=+n(e[o+1],o+1,e);return l+(c-l)*(i-o)}}function cee(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function cr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Vi(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 oS=Symbol("implicit");function p2(){var e=new f5,t=[],n=[],r=oS;function i(o){let l=e.get(o);if(l===void 0){if(r!==oS)return r;e.set(o,l=t.push(o)-1)}return n[l%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new f5;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return p2(t,n).unknown(r)},cr.apply(i,arguments),i}function af(){var e=p2().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,l,c=!1,f=0,d=0,y=.5;delete e.unknown;function p(){var g=t().length,b=i<r,_=b?i:r,S=b?r:i;o=(S-_)/Math.max(1,g-f+d*2),c&&(o=Math.floor(o)),_+=(S-_-o*(g-f))*y,l=o*(1-f),c&&(_=Math.round(_),l=Math.round(l));var x=cee(g).map(function(A){return _+o*A});return n(b?x.reverse():x)}return e.domain=function(g){return arguments.length?(t(g),p()):t()},e.range=function(g){return arguments.length?([r,i]=g,r=+r,i=+i,p()):[r,i]},e.rangeRound=function(g){return[r,i]=g,r=+r,i=+i,c=!0,p()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(c=!!g,p()):c},e.padding=function(g){return arguments.length?(f=Math.min(1,d=+g),p()):f},e.paddingInner=function(g){return arguments.length?(f=Math.min(1,g),p()):f},e.paddingOuter=function(g){return arguments.length?(d=+g,p()):d},e.align=function(g){return arguments.length?(y=Math.max(0,Math.min(1,g)),p()):y},e.copy=function(){return af(t(),[r,i]).round(c).paddingInner(f).paddingOuter(d).align(y)},cr.apply(p(),arguments)}function v$(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return v$(t())},e}function kc(){return v$(af.apply(null,arguments).paddingInner(1))}function fee(e){return function(){return e}}function Dp(e){return+e}var y5=[0,1];function Sn(e){return e}function sS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:fee(isNaN(t)?NaN:.5)}function dee(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function hee(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=sS(i,r),o=n(l,o)):(r=sS(r,i),o=n(o,l)),function(c){return o(r(c))}}function pee(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),l=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<r;)i[l]=sS(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(c){var f=Xf(e,c,1,r)-1;return o[f](i[f](c))}}function Kf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Yy(){var e=y5,t=y5,n=ki,r,i,o,l=Sn,c,f,d;function y(){var g=Math.min(e.length,t.length);return l!==Sn&&(l=dee(e[0],e[g-1])),c=g>2?pee:hee,f=d=null,p}function p(g){return g==null||isNaN(g=+g)?o:(f||(f=c(e.map(r),t,n)))(r(l(g)))}return p.invert=function(g){return l(i((d||(d=c(t,e.map(r),Ar)))(g)))},p.domain=function(g){return arguments.length?(e=Array.from(g,Dp),y()):e.slice()},p.range=function(g){return arguments.length?(t=Array.from(g),y()):t.slice()},p.rangeRound=function(g){return t=Array.from(g),n=E_,y()},p.clamp=function(g){return arguments.length?(l=g?!0:Sn,y()):l!==Sn},p.interpolate=function(g){return arguments.length?(n=g,y()):n},p.unknown=function(g){return arguments.length?(o=g,p):o},function(g,b){return r=g,i=b,y()}}function y2(){return Yy()(Sn,Sn)}function yee(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function $p(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 Rl(e){return e=$p(Math.abs(e)),e?e[1]:NaN}function mee(e,t){return function(n,r){for(var i=n.length,o=[],l=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>r&&(c=Math.max(1,r-f)),o.push(n.substring(i-=c,i+c)),!((f+=c+1)>r));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function gee(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var vee=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function of(e){if(!(t=vee.exec(e)))throw new Error("invalid format: "+e);var t;return new m2({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]})}of.prototype=m2.prototype;function m2(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+""}m2.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 bee(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var qp;function xee(e,t){var n=$p(e,t);if(!n)return qp=void 0,e.toPrecision(t);var r=n[0],i=n[1],o=i-(qp=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=r.length;return o===l?r:o>l?r+new Array(o-l+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+$p(e,Math.max(0,t+o-1))[0]}function m5(e,t){var n=$p(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const g5={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:yee,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)=>m5(e*100,t),r:m5,s:xee,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function v5(e){return e}var b5=Array.prototype.map,x5=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wee(e){var t=e.grouping===void 0||e.thousands===void 0?v5:mee(b5.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?v5:gee(b5.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function d(p,g){p=of(p);var b=p.fill,_=p.align,S=p.sign,x=p.symbol,A=p.zero,j=p.width,O=p.comma,N=p.precision,E=p.trim,T=p.type;T==="n"?(O=!0,T="g"):g5[T]||(N===void 0&&(N=12),E=!0,T="g"),(A||b==="0"&&_==="=")&&(A=!0,b="0",_="=");var C=((g==null?void 0:g.prefix)!==void 0?g.prefix:"")+(x==="$"?n:x==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():""),D=(x==="$"?r:/[%p]/.test(T)?l:"")+((g==null?void 0:g.suffix)!==void 0?g.suffix:""),q=g5[T],F=/[defgprs%]/.test(T);N=N===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,N)):Math.max(0,Math.min(20,N));function L(P){var Y=C,R=D,$,k,I;if(T==="c")R=q(P)+R,P="";else{P=+P;var H=P<0||1/P<0;if(P=isNaN(P)?f:q(Math.abs(P),N),E&&(P=bee(P)),H&&+P==0&&S!=="+"&&(H=!1),Y=(H?S==="("?S:c:S==="-"||S==="("?"":S)+Y,R=(T==="s"&&!isNaN(P)&&qp!==void 0?x5[8+qp/3]:"")+R+(H&&S==="("?")":""),F){for($=-1,k=P.length;++$<k;)if(I=P.charCodeAt($),48>I||I>57){R=(I===46?i+P.slice($+1):P.slice($))+R,P=P.slice(0,$);break}}}O&&!A&&(P=t(P,1/0));var V=Y.length+P.length+R.length,K=V<j?new Array(j-V+1).join(b):"";switch(O&&A&&(P=t(K+P,K.length?j-R.length:1/0),K=""),_){case"<":P=Y+P+R+K;break;case"=":P=Y+K+P+R;break;case"^":P=K.slice(0,V=K.length>>1)+Y+P+R+K.slice(V);break;default:P=K+Y+P+R;break}return o(P)}return L.toString=function(){return p+""},L}function y(p,g){var b=Math.max(-8,Math.min(8,Math.floor(Rl(g)/3)))*3,_=Math.pow(10,-b),S=d((p=of(p),p.type="f",p),{suffix:x5[8+b/3]});return function(x){return S(_*x)}}return{format:d,formatPrefix:y}}var Bh,g2,b$;See({thousands:",",grouping:[3],currency:["$",""]});function See(e){return Bh=wee(e),g2=Bh.format,b$=Bh.formatPrefix,Bh}function _ee(e){return Math.max(0,-Rl(Math.abs(e)))}function Aee(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Rl(t)/3)))*3-Rl(Math.abs(e)))}function Oee(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Rl(t)-Rl(e))+1}function x$(e,t,n,r){var i=aS(e,t,n),o;switch(r=of(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Aee(i,l))&&(r.precision=o),b$(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Oee(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=_ee(i))&&(r.precision=o-(r.type==="%")*2);break}}return g2(r)}function Ga(e){var t=e.domain;return e.ticks=function(n){var r=t();return rS(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return x$(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,l=r[i],c=r[o],f,d,y=10;for(c<l&&(d=l,l=c,c=d,d=i,i=o,o=d);y-- >0;){if(d=iS(l,c,n),d===f)return r[i]=l,r[o]=c,t(r);if(d>0)l=Math.floor(l/d)*d,c=Math.ceil(c/d)*d;else if(d<0)l=Math.ceil(l*d)/d,c=Math.floor(c*d)/d;else break;f=d}return e},e}function Lp(){var e=y2();return e.copy=function(){return Kf(e,Lp())},cr.apply(e,arguments),Ga(e)}function w$(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,Dp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return w$(e).unknown(t)},e=arguments.length?Array.from(e,Dp):[0,1],Ga(n)}function S$(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],l;return o<i&&(l=n,n=r,r=l,l=i,i=o,o=l),e[n]=t.floor(i),e[r]=t.ceil(o),e}function w5(e){return Math.log(e)}function S5(e){return Math.exp(e)}function jee(e){return-Math.log(-e)}function Eee(e){return-Math.exp(-e)}function Nee(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Tee(e){return e===10?Nee:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Cee(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 _5(e){return(t,n)=>-e(-t,n)}function v2(e){const t=e(w5,S5),n=t.domain;let r=10,i,o;function l(){return i=Cee(r),o=Tee(r),n()[0]<0?(i=_5(i),o=_5(o),e(jee,Eee)):e(w5,S5),t}return t.base=function(c){return arguments.length?(r=+c,l()):r},t.domain=function(c){return arguments.length?(n(c),l()):n()},t.ticks=c=>{const f=n();let d=f[0],y=f[f.length-1];const p=y<d;p&&([d,y]=[y,d]);let g=i(d),b=i(y),_,S;const x=c==null?10:+c;let A=[];if(!(r%1)&&b-g<x){if(g=Math.floor(g),b=Math.ceil(b),d>0){for(;g<=b;++g)for(_=1;_<r;++_)if(S=g<0?_/o(-g):_*o(g),!(S<d)){if(S>y)break;A.push(S)}}else for(;g<=b;++g)for(_=r-1;_>=1;--_)if(S=g>0?_/o(-g):_*o(g),!(S<d)){if(S>y)break;A.push(S)}A.length*2<x&&(A=rS(d,y,x))}else A=rS(g,b,Math.min(b-g,x)).map(o);return p?A.reverse():A},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=of(f)).precision==null&&(f.trim=!0),f=g2(f)),c===1/0)return f;const d=Math.max(1,r*c/t.ticks().length);return y=>{let p=y/o(Math.round(i(y)));return p*r<r-.5&&(p*=r),p<=d?f(y):""}},t.nice=()=>n(S$(n(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function _$(){const e=v2(Yy()).domain([1,10]);return e.copy=()=>Kf(e,_$()).base(e.base()),cr.apply(e,arguments),e}function A5(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function O5(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function b2(e){var t=1,n=e(A5(t),O5(t));return n.constant=function(r){return arguments.length?e(A5(t=+r),O5(t)):t},Ga(n)}function A$(){var e=b2(Yy());return e.copy=function(){return Kf(e,A$()).constant(e.constant())},cr.apply(e,arguments)}function j5(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Mee(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function kee(e){return e<0?-e*e:e*e}function x2(e){var t=e(Sn,Sn),n=1;function r(){return n===1?e(Sn,Sn):n===.5?e(Mee,kee):e(j5(n),j5(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ga(t)}function w2(){var e=x2(Yy());return e.copy=function(){return Kf(e,w2()).exponent(e.exponent())},cr.apply(e,arguments),e}function Ree(){return w2.apply(null,arguments).exponent(.5)}function E5(e){return Math.sign(e)*e*e}function Pee(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function O$(){var e=y2(),t=[0,1],n=!1,r;function i(o){var l=Pee(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(E5(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Dp)).map(E5)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return O$(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},cr.apply(i,arguments),Ga(i)}function j$(){var e=[],t=[],n=[],r;function i(){var l=0,c=Math.max(1,t.length);for(n=new Array(c-1);++l<c;)n[l-1]=uee(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?r:t[Xf(n,l)]}return o.invertExtent=function(l){var c=t.indexOf(l);return c<0?[NaN,NaN]:[c>0?n[c-1]:e[0],c<n.length?n[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Ua),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(r=l,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return j$().domain(e).range(t).unknown(r)},cr.apply(o,arguments)}function E$(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[Xf(r,f,0,n)]:o}function c(){var f=-1;for(r=new Array(n);++f<n;)r[f]=((f+1)*t-(f-n)*e)/(n+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},l.range=function(f){return arguments.length?(n=(i=Array.from(f)).length-1,c()):i.slice()},l.invertExtent=function(f){var d=i.indexOf(f);return d<0?[NaN,NaN]:d<1?[e,r[0]]:d>=n?[r[n-1],t]:[r[d-1],r[d]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return r.slice()},l.copy=function(){return E$().domain([e,t]).range(i).unknown(o)},cr.apply(Ga(l),arguments)}function N$(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Xf(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return N$().domain(e).range(t).unknown(n)},cr.apply(i,arguments)}const v1=new Date,b1=new Date;function Yt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),c=i.ceil(o);return o-l<c-o?l:c},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return f;let d;do f.push(d=new Date(+o)),t(o,c),e(o);while(d<o&&o<l);return f},i.filter=o=>Yt(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),n&&(i.count=(o,l)=>(v1.setTime(+o),b1.setTime(+l),e(v1),e(b1),Math.floor(n(v1,b1))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?l=>r(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const zp=Yt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);zp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Yt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):zp);zp.range;const Ti=1e3,sr=Ti*60,Ci=sr*60,$i=Ci*24,S2=$i*7,N5=$i*30,x1=$i*365,No=Yt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ti)},(e,t)=>(t-e)/Ti,e=>e.getUTCSeconds());No.range;const _2=Yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ti)},(e,t)=>{e.setTime(+e+t*sr)},(e,t)=>(t-e)/sr,e=>e.getMinutes());_2.range;const A2=Yt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*sr)},(e,t)=>(t-e)/sr,e=>e.getUTCMinutes());A2.range;const O2=Yt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ti-e.getMinutes()*sr)},(e,t)=>{e.setTime(+e+t*Ci)},(e,t)=>(t-e)/Ci,e=>e.getHours());O2.range;const j2=Yt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ci)},(e,t)=>(t-e)/Ci,e=>e.getUTCHours());j2.range;const Wf=Yt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*sr)/$i,e=>e.getDate()-1);Wf.range;const Xy=Yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$i,e=>e.getUTCDate()-1);Xy.range;const T$=Yt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/$i,e=>Math.floor(e/$i));T$.range;function es(e){return Yt(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())*sr)/S2)}const Ky=es(0),Bp=es(1),Dee=es(2),$ee=es(3),Pl=es(4),qee=es(5),Lee=es(6);Ky.range;Bp.range;Dee.range;$ee.range;Pl.range;qee.range;Lee.range;function ts(e){return Yt(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)/S2)}const Wy=ts(0),Ip=ts(1),zee=ts(2),Bee=ts(3),Dl=ts(4),Iee=ts(5),Uee=ts(6);Wy.range;Ip.range;zee.range;Bee.range;Dl.range;Iee.range;Uee.range;const E2=Yt(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());E2.range;const N2=Yt(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());N2.range;const qi=Yt(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());qi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yt(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)});qi.range;const Li=Yt(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());Li.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Yt(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)});Li.range;function C$(e,t,n,r,i,o){const l=[[No,1,Ti],[No,5,5*Ti],[No,15,15*Ti],[No,30,30*Ti],[o,1,sr],[o,5,5*sr],[o,15,15*sr],[o,30,30*sr],[i,1,Ci],[i,3,3*Ci],[i,6,6*Ci],[i,12,12*Ci],[r,1,$i],[r,2,2*$i],[n,1,S2],[t,1,N5],[t,3,3*N5],[e,1,x1]];function c(d,y,p){const g=y<d;g&&([d,y]=[y,d]);const b=p&&typeof p.range=="function"?p:f(d,y,p),_=b?b.range(d,+y+1):[];return g?_.reverse():_}function f(d,y,p){const g=Math.abs(y-d)/p,b=h2(([,,x])=>x).right(l,g);if(b===l.length)return e.every(aS(d/x1,y/x1,p));if(b===0)return zp.every(Math.max(aS(d,y,p),1));const[_,S]=l[g/l[b-1][2]<l[b][2]/g?b-1:b];return _.every(S)}return[c,f]}const[Hee,Vee]=C$(Li,N2,Wy,T$,j2,A2),[Gee,Fee]=C$(qi,E2,Ky,Wf,O2,_2);function w1(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 S1(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 mc(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Yee(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,l=e.shortDays,c=e.months,f=e.shortMonths,d=gc(i),y=vc(i),p=gc(o),g=vc(o),b=gc(l),_=vc(l),S=gc(c),x=vc(c),A=gc(f),j=vc(f),O={a:I,A:H,b:V,B:K,c:null,d:P5,e:P5,f:mte,g:jte,G:Nte,H:hte,I:pte,j:yte,L:M$,m:gte,M:vte,p:z,q:G,Q:q5,s:L5,S:bte,u:xte,U:wte,V:Ste,w:_te,W:Ate,x:null,X:null,y:Ote,Y:Ete,Z:Tte,"%":$5},N={a:Z,A:ee,b:fe,B:pe,c:null,d:D5,e:D5,f:Rte,g:Hte,G:Gte,H:Cte,I:Mte,j:kte,L:R$,m:Pte,M:Dte,p:ye,q:he,Q:q5,s:L5,S:$te,u:qte,U:Lte,V:zte,w:Bte,W:Ite,x:null,X:null,y:Ute,Y:Vte,Z:Fte,"%":$5},E={a:F,A:L,b:P,B:Y,c:R,d:k5,e:k5,f:ute,g:M5,G:C5,H:R5,I:R5,j:ate,L:lte,m:ite,M:ote,p:q,q:rte,Q:fte,s:dte,S:ste,u:Zee,U:Jee,V:ete,w:Qee,W:tte,x:$,X:k,y:M5,Y:C5,Z:nte,"%":cte};O.x=T(n,O),O.X=T(r,O),O.c=T(t,O),N.x=T(n,N),N.X=T(r,N),N.c=T(t,N);function T(ae,ve){return function(me){var ie=[],xe=-1,we=0,Me=ae.length,Ee,Ke,Ct;for(me instanceof Date||(me=new Date(+me));++xe<Me;)ae.charCodeAt(xe)===37&&(ie.push(ae.slice(we,xe)),(Ke=T5[Ee=ae.charAt(++xe)])!=null?Ee=ae.charAt(++xe):Ke=Ee==="e"?" ":"0",(Ct=ve[Ee])&&(Ee=Ct(me,Ke)),ie.push(Ee),we=xe+1);return ie.push(ae.slice(we,xe)),ie.join("")}}function C(ae,ve){return function(me){var ie=mc(1900,void 0,1),xe=D(ie,ae,me+="",0),we,Me;if(xe!=me.length)return null;if("Q"in ie)return new Date(ie.Q);if("s"in ie)return new Date(ie.s*1e3+("L"in ie?ie.L:0));if(ve&&!("Z"in ie)&&(ie.Z=0),"p"in ie&&(ie.H=ie.H%12+ie.p*12),ie.m===void 0&&(ie.m="q"in ie?ie.q:0),"V"in ie){if(ie.V<1||ie.V>53)return null;"w"in ie||(ie.w=1),"Z"in ie?(we=S1(mc(ie.y,0,1)),Me=we.getUTCDay(),we=Me>4||Me===0?Ip.ceil(we):Ip(we),we=Xy.offset(we,(ie.V-1)*7),ie.y=we.getUTCFullYear(),ie.m=we.getUTCMonth(),ie.d=we.getUTCDate()+(ie.w+6)%7):(we=w1(mc(ie.y,0,1)),Me=we.getDay(),we=Me>4||Me===0?Bp.ceil(we):Bp(we),we=Wf.offset(we,(ie.V-1)*7),ie.y=we.getFullYear(),ie.m=we.getMonth(),ie.d=we.getDate()+(ie.w+6)%7)}else("W"in ie||"U"in ie)&&("w"in ie||(ie.w="u"in ie?ie.u%7:"W"in ie?1:0),Me="Z"in ie?S1(mc(ie.y,0,1)).getUTCDay():w1(mc(ie.y,0,1)).getDay(),ie.m=0,ie.d="W"in ie?(ie.w+6)%7+ie.W*7-(Me+5)%7:ie.w+ie.U*7-(Me+6)%7);return"Z"in ie?(ie.H+=ie.Z/100|0,ie.M+=ie.Z%100,S1(ie)):w1(ie)}}function D(ae,ve,me,ie){for(var xe=0,we=ve.length,Me=me.length,Ee,Ke;xe<we;){if(ie>=Me)return-1;if(Ee=ve.charCodeAt(xe++),Ee===37){if(Ee=ve.charAt(xe++),Ke=E[Ee in T5?ve.charAt(xe++):Ee],!Ke||(ie=Ke(ae,me,ie))<0)return-1}else if(Ee!=me.charCodeAt(ie++))return-1}return ie}function q(ae,ve,me){var ie=d.exec(ve.slice(me));return ie?(ae.p=y.get(ie[0].toLowerCase()),me+ie[0].length):-1}function F(ae,ve,me){var ie=b.exec(ve.slice(me));return ie?(ae.w=_.get(ie[0].toLowerCase()),me+ie[0].length):-1}function L(ae,ve,me){var ie=p.exec(ve.slice(me));return ie?(ae.w=g.get(ie[0].toLowerCase()),me+ie[0].length):-1}function P(ae,ve,me){var ie=A.exec(ve.slice(me));return ie?(ae.m=j.get(ie[0].toLowerCase()),me+ie[0].length):-1}function Y(ae,ve,me){var ie=S.exec(ve.slice(me));return ie?(ae.m=x.get(ie[0].toLowerCase()),me+ie[0].length):-1}function R(ae,ve,me){return D(ae,t,ve,me)}function $(ae,ve,me){return D(ae,n,ve,me)}function k(ae,ve,me){return D(ae,r,ve,me)}function I(ae){return l[ae.getDay()]}function H(ae){return o[ae.getDay()]}function V(ae){return f[ae.getMonth()]}function K(ae){return c[ae.getMonth()]}function z(ae){return i[+(ae.getHours()>=12)]}function G(ae){return 1+~~(ae.getMonth()/3)}function Z(ae){return l[ae.getUTCDay()]}function ee(ae){return o[ae.getUTCDay()]}function fe(ae){return f[ae.getUTCMonth()]}function pe(ae){return c[ae.getUTCMonth()]}function ye(ae){return i[+(ae.getUTCHours()>=12)]}function he(ae){return 1+~~(ae.getUTCMonth()/3)}return{format:function(ae){var ve=T(ae+="",O);return ve.toString=function(){return ae},ve},parse:function(ae){var ve=C(ae+="",!1);return ve.toString=function(){return ae},ve},utcFormat:function(ae){var ve=T(ae+="",N);return ve.toString=function(){return ae},ve},utcParse:function(ae){var ve=C(ae+="",!0);return ve.toString=function(){return ae},ve}}}var T5={"-":"",_:" ",0:"0"},Jt=/^\s*\d+/,Xee=/^%/,Kee=/[\\^$*+?|[\]().{}]/g;function Ze(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Wee(e){return e.replace(Kee,"\\$&")}function gc(e){return new RegExp("^(?:"+e.map(Wee).join("|")+")","i")}function vc(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Qee(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Zee(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Jee(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function ete(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function tte(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function C5(e,t,n){var r=Jt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function M5(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nte(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 rte(e,t,n){var r=Jt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function ite(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function k5(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function ate(e,t,n){var r=Jt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function R5(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ote(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ste(e,t,n){var r=Jt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function lte(e,t,n){var r=Jt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ute(e,t,n){var r=Jt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function cte(e,t,n){var r=Xee.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function fte(e,t,n){var r=Jt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function dte(e,t,n){var r=Jt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function P5(e,t){return Ze(e.getDate(),t,2)}function hte(e,t){return Ze(e.getHours(),t,2)}function pte(e,t){return Ze(e.getHours()%12||12,t,2)}function yte(e,t){return Ze(1+Wf.count(qi(e),e),t,3)}function M$(e,t){return Ze(e.getMilliseconds(),t,3)}function mte(e,t){return M$(e,t)+"000"}function gte(e,t){return Ze(e.getMonth()+1,t,2)}function vte(e,t){return Ze(e.getMinutes(),t,2)}function bte(e,t){return Ze(e.getSeconds(),t,2)}function xte(e){var t=e.getDay();return t===0?7:t}function wte(e,t){return Ze(Ky.count(qi(e)-1,e),t,2)}function k$(e){var t=e.getDay();return t>=4||t===0?Pl(e):Pl.ceil(e)}function Ste(e,t){return e=k$(e),Ze(Pl.count(qi(e),e)+(qi(e).getDay()===4),t,2)}function _te(e){return e.getDay()}function Ate(e,t){return Ze(Bp.count(qi(e)-1,e),t,2)}function Ote(e,t){return Ze(e.getFullYear()%100,t,2)}function jte(e,t){return e=k$(e),Ze(e.getFullYear()%100,t,2)}function Ete(e,t){return Ze(e.getFullYear()%1e4,t,4)}function Nte(e,t){var n=e.getDay();return e=n>=4||n===0?Pl(e):Pl.ceil(e),Ze(e.getFullYear()%1e4,t,4)}function Tte(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ze(t/60|0,"0",2)+Ze(t%60,"0",2)}function D5(e,t){return Ze(e.getUTCDate(),t,2)}function Cte(e,t){return Ze(e.getUTCHours(),t,2)}function Mte(e,t){return Ze(e.getUTCHours()%12||12,t,2)}function kte(e,t){return Ze(1+Xy.count(Li(e),e),t,3)}function R$(e,t){return Ze(e.getUTCMilliseconds(),t,3)}function Rte(e,t){return R$(e,t)+"000"}function Pte(e,t){return Ze(e.getUTCMonth()+1,t,2)}function Dte(e,t){return Ze(e.getUTCMinutes(),t,2)}function $te(e,t){return Ze(e.getUTCSeconds(),t,2)}function qte(e){var t=e.getUTCDay();return t===0?7:t}function Lte(e,t){return Ze(Wy.count(Li(e)-1,e),t,2)}function P$(e){var t=e.getUTCDay();return t>=4||t===0?Dl(e):Dl.ceil(e)}function zte(e,t){return e=P$(e),Ze(Dl.count(Li(e),e)+(Li(e).getUTCDay()===4),t,2)}function Bte(e){return e.getUTCDay()}function Ite(e,t){return Ze(Ip.count(Li(e)-1,e),t,2)}function Ute(e,t){return Ze(e.getUTCFullYear()%100,t,2)}function Hte(e,t){return e=P$(e),Ze(e.getUTCFullYear()%100,t,2)}function Vte(e,t){return Ze(e.getUTCFullYear()%1e4,t,4)}function Gte(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Dl(e):Dl.ceil(e),Ze(e.getUTCFullYear()%1e4,t,4)}function Fte(){return"+0000"}function $5(){return"%"}function q5(e){return+e}function L5(e){return Math.floor(+e/1e3)}var Fs,D$,$$;Yte({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 Yte(e){return Fs=Yee(e),D$=Fs.format,Fs.parse,$$=Fs.utcFormat,Fs.utcParse,Fs}function Xte(e){return new Date(e)}function Kte(e){return e instanceof Date?+e:+new Date(+e)}function T2(e,t,n,r,i,o,l,c,f,d){var y=y2(),p=y.invert,g=y.domain,b=d(".%L"),_=d(":%S"),S=d("%I:%M"),x=d("%I %p"),A=d("%a %d"),j=d("%b %d"),O=d("%B"),N=d("%Y");function E(T){return(f(T)<T?b:c(T)<T?_:l(T)<T?S:o(T)<T?x:r(T)<T?i(T)<T?A:j:n(T)<T?O:N)(T)}return y.invert=function(T){return new Date(p(T))},y.domain=function(T){return arguments.length?g(Array.from(T,Kte)):g().map(Xte)},y.ticks=function(T){var C=g();return e(C[0],C[C.length-1],T??10)},y.tickFormat=function(T,C){return C==null?E:d(C)},y.nice=function(T){var C=g();return(!T||typeof T.range!="function")&&(T=t(C[0],C[C.length-1],T??10)),T?g(S$(C,T)):y},y.copy=function(){return Kf(y,T2(e,t,n,r,i,o,l,c,f,d))},y}function Wte(){return cr.apply(T2(Gee,Fee,qi,E2,Ky,Wf,O2,_2,No,D$).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Qte(){return cr.apply(T2(Hee,Vee,Li,N2,Wy,Xy,j2,A2,No,$$).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Qy(){var e=0,t=1,n,r,i,o,l=Sn,c=!1,f;function d(p){return p==null||isNaN(p=+p)?f:l(i===0?.5:(p=(o(p)-n)*i,c?Math.max(0,Math.min(1,p)):p))}d.domain=function(p){return arguments.length?([e,t]=p,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),d):[e,t]},d.clamp=function(p){return arguments.length?(c=!!p,d):c},d.interpolator=function(p){return arguments.length?(l=p,d):l};function y(p){return function(g){var b,_;return arguments.length?([b,_]=g,l=p(b,_),d):[l(0),l(1)]}}return d.range=y(ki),d.rangeRound=y(E_),d.unknown=function(p){return arguments.length?(f=p,d):f},function(p){return o=p,n=p(e),r=p(t),i=n===r?0:1/(r-n),d}}function Fa(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function q$(){var e=Ga(Qy()(Sn));return e.copy=function(){return Fa(e,q$())},Vi.apply(e,arguments)}function L$(){var e=v2(Qy()).domain([1,10]);return e.copy=function(){return Fa(e,L$()).base(e.base())},Vi.apply(e,arguments)}function z$(){var e=b2(Qy());return e.copy=function(){return Fa(e,z$()).constant(e.constant())},Vi.apply(e,arguments)}function C2(){var e=x2(Qy());return e.copy=function(){return Fa(e,C2()).exponent(e.exponent())},Vi.apply(e,arguments)}function Zte(){return C2.apply(null,arguments).exponent(.5)}function B$(){var e=[],t=Sn;function n(r){if(r!=null&&!isNaN(r=+r))return t((Xf(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Ua),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>lee(e,o/r))},n.copy=function(){return B$(t).domain(e)},Vi.apply(n,arguments)}function Zy(){var e=0,t=.5,n=1,r=1,i,o,l,c,f,d=Sn,y,p=!1,g;function b(S){return isNaN(S=+S)?g:(S=.5+((S=+y(S))-o)*(r*S<r*o?c:f),d(p?Math.max(0,Math.min(1,S)):S))}b.domain=function(S){return arguments.length?([e,t,n]=S,i=y(e=+e),o=y(t=+t),l=y(n=+n),c=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,b):[e,t,n]},b.clamp=function(S){return arguments.length?(p=!!S,b):p},b.interpolator=function(S){return arguments.length?(d=S,b):d};function _(S){return function(x){var A,j,O;return arguments.length?([A,j,O]=x,d=VH(S,[A,j,O]),b):[d(0),d(.5),d(1)]}}return b.range=_(ki),b.rangeRound=_(E_),b.unknown=function(S){return arguments.length?(g=S,b):g},function(S){return y=S,i=S(e),o=S(t),l=S(n),c=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),r=o<i?-1:1,b}}function I$(){var e=Ga(Zy()(Sn));return e.copy=function(){return Fa(e,I$())},Vi.apply(e,arguments)}function U$(){var e=v2(Zy()).domain([.1,1,10]);return e.copy=function(){return Fa(e,U$()).base(e.base())},Vi.apply(e,arguments)}function H$(){var e=b2(Zy());return e.copy=function(){return Fa(e,H$()).constant(e.constant())},Vi.apply(e,arguments)}function M2(){var e=x2(Zy());return e.copy=function(){return Fa(e,M2()).exponent(e.exponent())},Vi.apply(e,arguments)}function Jte(){return M2.apply(null,arguments).exponent(.5)}const z5=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:af,scaleDiverging:I$,scaleDivergingLog:U$,scaleDivergingPow:M2,scaleDivergingSqrt:Jte,scaleDivergingSymlog:H$,scaleIdentity:w$,scaleImplicit:oS,scaleLinear:Lp,scaleLog:_$,scaleOrdinal:p2,scalePoint:kc,scalePow:w2,scaleQuantile:j$,scaleQuantize:E$,scaleRadial:O$,scaleSequential:q$,scaleSequentialLog:L$,scaleSequentialPow:C2,scaleSequentialQuantile:B$,scaleSequentialSqrt:Zte,scaleSequentialSymlog:z$,scaleSqrt:Ree,scaleSymlog:A$,scaleThreshold:N$,scaleTime:Wte,scaleUtc:Qte,tickFormat:x$},Symbol.toStringTag,{value:"Module"}));var _1,B5;function Jy(){if(B5)return _1;B5=1;var e=au();function t(n,r,i){for(var o=-1,l=n.length;++o<l;){var c=n[o],f=r(c);if(f!=null&&(d===void 0?f===f&&!e(f):i(f,d)))var d=f,y=c}return y}return _1=t,_1}var A1,I5;function V$(){if(I5)return A1;I5=1;function e(t,n){return t>n}return A1=e,A1}var O1,U5;function ene(){if(U5)return O1;U5=1;var e=Jy(),t=V$(),n=su();function r(i){return i&&i.length?e(i,n,t):void 0}return O1=r,O1}var tne=ene();const em=nt(tne);var j1,H5;function G$(){if(H5)return j1;H5=1;function e(t,n){return t<n}return j1=e,j1}var E1,V5;function nne(){if(V5)return E1;V5=1;var e=Jy(),t=G$(),n=su();function r(i){return i&&i.length?e(i,n,t):void 0}return E1=r,E1}var rne=nne();const tm=nt(rne);var N1,G5;function ine(){if(G5)return N1;G5=1;var e=W_(),t=Qr(),n=r$(),r=kn();function i(o,l){var c=r(o)?e:n;return c(o,t(l,3))}return N1=i,N1}var T1,F5;function ane(){if(F5)return T1;F5=1;var e=t$(),t=ine();function n(r,i){return e(t(r,i),1)}return T1=n,T1}var one=ane();const sne=nt(one);var C1,Y5;function lne(){if(Y5)return C1;Y5=1;var e=u2();function t(n,r){return e(n,r)}return C1=t,C1}var une=lne();const nm=nt(une);var uu=1e9,cne={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},R2,xt=!0,ur="[DecimalError] ",zo=ur+"Invalid argument: ",k2=ur+"Exponent out of range: ",cu=Math.floor,Ao=Math.pow,fne=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Hn,Qt=1e7,vt=7,F$=9007199254740991,Up=cu(F$/vt),_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,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};_e.decimalPlaces=_e.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*vt;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 Pi(this,new this.constructor(e))};_e.dividedToIntegerBy=_e.idiv=function(e){var t=this,n=t.constructor;return ft(Pi(t,new n(e),0,1),n.precision)};_e.equals=_e.eq=function(e){return!this.cmp(e)};_e.exponent=function(){return Bt(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,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Hn))throw Error(ur+"NaN");if(n.s<1)throw Error(ur+(n.s?"NaN":"-Infinity"));return n.eq(Hn)?new r(0):(xt=!1,t=Pi(sf(n,o),sf(e,o),o),xt=!0,ft(t,i))};_e.minus=_e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?K$(t,e):Y$(t,(e.s=-e.s,e))};_e.modulo=_e.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ur+"NaN");return n.s?(xt=!1,t=Pi(n,e,0,1).times(e),xt=!0,n.minus(t)):ft(new r(n),i)};_e.naturalExponential=_e.exp=function(){return X$(this)};_e.naturalLogarithm=_e.ln=function(){return sf(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?Y$(t,e):K$(t,(e.s=-e.s,e))};_e.precision=_e.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(zo+e);if(t=Bt(i)+1,r=i.d.length-1,n=r*vt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};_e.squareRoot=_e.sqrt=function(){var e,t,n,r,i,o,l,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(ur+"NaN")}for(e=Bt(c),xt=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=Ir(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=cu((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new f(t)):r=new f(i.toString()),n=f.precision,i=l=n+3;;)if(o=r,r=o.plus(Pi(c,o,l+2)).times(.5),Ir(o.d).slice(0,l)===(t=Ir(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(ft(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if(t!="9999")break;l+=4}return xt=!0,ft(r,n)};_e.times=_e.mul=function(e){var t,n,r,i,o,l,c,f,d,y=this,p=y.constructor,g=y.d,b=(e=new p(e)).d;if(!y.s||!e.s)return new p(0);for(e.s*=y.s,n=y.e+e.e,f=g.length,d=b.length,f<d&&(o=g,g=b,b=o,l=f,f=d,d=l),o=[],l=f+d,r=l;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,i=f+r;i>r;)c=o[i]+b[r]*g[i-r-1]+t,o[i--]=c%Qt|0,t=c/Qt|0;o[i]=(o[i]+t)%Qt|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,xt?ft(e,p.precision):e};_e.toDecimalPlaces=_e.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Xr(e,0,uu),t===void 0?t=r.rounding:Xr(t,0,8),ft(n,e+Bt(n)+1,t))};_e.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Xo(r,!0):(Xr(e,0,uu),t===void 0?t=i.rounding:Xr(t,0,8),r=ft(new i(r),e+1,t),n=Xo(r,!0,e+1)),n};_e.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Xo(i):(Xr(e,0,uu),t===void 0?t=o.rounding:Xr(t,0,8),r=ft(new o(i),e+Bt(i)+1,t),n=Xo(r.abs(),!1,e+Bt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};_e.toInteger=_e.toint=function(){var e=this,t=e.constructor;return ft(new t(e),Bt(e)+1,t.rounding)};_e.toNumber=function(){return+this};_e.toPower=_e.pow=function(e){var t,n,r,i,o,l,c=this,f=c.constructor,d=12,y=+(e=new f(e));if(!e.s)return new f(Hn);if(c=new f(c),!c.s){if(e.s<1)throw Error(ur+"Infinity");return c}if(c.eq(Hn))return c;if(r=f.precision,e.eq(Hn))return ft(c,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=c.s,l){if((n=y<0?-y:y)<=F$){for(i=new f(Hn),t=Math.ceil(r/vt+4),xt=!1;n%2&&(i=i.times(c),K5(i.d,t)),n=cu(n/2),n!==0;)c=c.times(c),K5(c.d,t);return xt=!0,e.s<0?new f(Hn).div(i):ft(i,r)}}else if(o<0)throw Error(ur+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,xt=!1,i=e.times(sf(c,r+d)),xt=!0,i=X$(i),i.s=o,i};_e.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Bt(i),r=Xo(i,n<=o.toExpNeg||n>=o.toExpPos)):(Xr(e,1,uu),t===void 0?t=o.rounding:Xr(t,0,8),i=ft(new o(i),e,t),n=Bt(i),r=Xo(i,e<=n||n<=o.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):(Xr(e,1,uu),t===void 0?t=r.rounding:Xr(t,0,8)),ft(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=Bt(e),n=e.constructor;return Xo(e,t<=n.toExpNeg||t>=n.toExpPos)};function Y$(e,t){var n,r,i,o,l,c,f,d,y=e.constructor,p=y.precision;if(!e.s||!t.s)return t.s||(t=new y(e)),xt?ft(t,p):t;if(f=e.d,d=t.d,l=e.e,i=t.e,f=f.slice(),o=l-i,o){for(o<0?(r=f,o=-o,c=d.length):(r=d,i=l,c=f.length),l=Math.ceil(p/vt),c=l>c?l+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=f.length,o=d.length,c-o<0&&(o=c,r=d,d=f,f=r),n=0;o;)n=(f[--o]=f[o]+d[o]+n)/Qt|0,f[o]%=Qt;for(n&&(f.unshift(n),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,xt?ft(t,p):t}function Xr(e,t,n){if(e!==~~e||e<t||e>n)throw Error(zo+e)}function Ir(e){var t,n,r,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)r=e[t]+"",n=vt-r.length,n&&(o+=Ca(n)),o+=r;l=e[t],r=l+"",n=vt-r.length,n&&(o+=Ca(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Pi=(function(){function e(r,i){var o,l=0,c=r.length;for(r=r.slice();c--;)o=r[c]*i+l,r[c]=o%Qt|0,l=o/Qt|0;return l&&r.unshift(l),r}function t(r,i,o,l){var c,f;if(o!=l)f=o>l?1:-1;else for(c=f=0;c<o;c++)if(r[c]!=i[c]){f=r[c]>i[c]?1:-1;break}return f}function n(r,i,o){for(var l=0;o--;)r[o]-=l,l=r[o]<i[o]?1:0,r[o]=l*Qt+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,l){var c,f,d,y,p,g,b,_,S,x,A,j,O,N,E,T,C,D,q=r.constructor,F=r.s==i.s?1:-1,L=r.d,P=i.d;if(!r.s)return new q(r);if(!i.s)throw Error(ur+"Division by zero");for(f=r.e-i.e,C=P.length,E=L.length,b=new q(F),_=b.d=[],d=0;P[d]==(L[d]||0);)++d;if(P[d]>(L[d]||0)&&--f,o==null?j=o=q.precision:l?j=o+(Bt(r)-Bt(i))+1:j=o,j<0)return new q(0);if(j=j/vt+2|0,d=0,C==1)for(y=0,P=P[0],j++;(d<E||y)&&j--;d++)O=y*Qt+(L[d]||0),_[d]=O/P|0,y=O%P|0;else{for(y=Qt/(P[0]+1)|0,y>1&&(P=e(P,y),L=e(L,y),C=P.length,E=L.length),N=C,S=L.slice(0,C),x=S.length;x<C;)S[x++]=0;D=P.slice(),D.unshift(0),T=P[0],P[1]>=Qt/2&&++T;do y=0,c=t(P,S,C,x),c<0?(A=S[0],C!=x&&(A=A*Qt+(S[1]||0)),y=A/T|0,y>1?(y>=Qt&&(y=Qt-1),p=e(P,y),g=p.length,x=S.length,c=t(p,S,g,x),c==1&&(y--,n(p,C<g?D:P,g))):(y==0&&(c=y=1),p=P.slice()),g=p.length,g<x&&p.unshift(0),n(S,p,x),c==-1&&(x=S.length,c=t(P,S,C,x),c<1&&(y++,n(S,C<x?D:P,x))),x=S.length):c===0&&(y++,S=[0]),_[d++]=y,c&&S[0]?S[x++]=L[N]||0:(S=[L[N]],x=1);while((N++<E||S[0]!==void 0)&&j--)}return _[0]||_.shift(),b.e=f,ft(b,l?o+Bt(b)+1:o)}})();function X$(e,t){var n,r,i,o,l,c,f=0,d=0,y=e.constructor,p=y.precision;if(Bt(e)>16)throw Error(k2+Bt(e));if(!e.s)return new y(Hn);for(xt=!1,c=p,l=new y(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(Ao(2,d))/Math.LN10*2+5|0,c+=r,n=i=o=new y(Hn),y.precision=c;;){if(i=ft(i.times(e),c),n=n.times(++f),l=o.plus(Pi(i,n,c)),Ir(l.d).slice(0,c)===Ir(o.d).slice(0,c)){for(;d--;)o=ft(o.times(o),c);return y.precision=p,t==null?(xt=!0,ft(o,p)):o}o=l}}function Bt(e){for(var t=e.e*vt,n=e.d[0];n>=10;n/=10)t++;return t}function M1(e,t,n){if(t>e.LN10.sd())throw xt=!0,n&&(e.precision=n),Error(ur+"LN10 precision limit exceeded");return ft(new e(e.LN10),t)}function Ca(e){for(var t="";e--;)t+="0";return t}function sf(e,t){var n,r,i,o,l,c,f,d,y,p=1,g=10,b=e,_=b.d,S=b.constructor,x=S.precision;if(b.s<1)throw Error(ur+(b.s?"NaN":"-Infinity"));if(b.eq(Hn))return new S(0);if(t==null?(xt=!1,d=x):d=t,b.eq(10))return t==null&&(xt=!0),M1(S,d);if(d+=g,S.precision=d,n=Ir(_),r=n.charAt(0),o=Bt(b),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)b=b.times(e),n=Ir(b.d),r=n.charAt(0),p++;o=Bt(b),r>1?(b=new S("0."+n),o++):b=new S(r+"."+n.slice(1))}else return f=M1(S,d+2,x).times(o+""),b=sf(new S(r+"."+n.slice(1)),d-g).plus(f),S.precision=x,t==null?(xt=!0,ft(b,x)):b;for(c=l=b=Pi(b.minus(Hn),b.plus(Hn),d),y=ft(b.times(b),d),i=3;;){if(l=ft(l.times(y),d),f=c.plus(Pi(l,new S(i),d)),Ir(f.d).slice(0,d)===Ir(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(M1(S,d+2,x).times(o+""))),c=Pi(c,new S(p),d),S.precision=x,t==null?(xt=!0,ft(c,x)):c;c=f,i+=2}}function X5(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=cu(n/vt),e.d=[],r=(n+1)%vt,n<0&&(r+=vt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=vt;r<i;)e.d.push(+t.slice(r,r+=vt));t=t.slice(r),r=vt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),xt&&(e.e>Up||e.e<-Up))throw Error(k2+n)}else e.s=0,e.e=0,e.d=[0];return e}function ft(e,t,n){var r,i,o,l,c,f,d,y,p=e.d;for(l=1,o=p[0];o>=10;o/=10)l++;if(r=t-l,r<0)r+=vt,i=t,d=p[y=0];else{if(y=Math.ceil((r+1)/vt),o=p.length,y>=o)return e;for(d=o=p[y],l=1;o>=10;o/=10)l++;r%=vt,i=r-vt+l}if(n!==void 0&&(o=Ao(10,l-i-1),c=d/o%10|0,f=t<0||p[y+1]!==void 0||d%o,f=n<4?(c||f)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||f||n==6&&(r>0?i>0?d/Ao(10,l-i):0:p[y-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return f?(o=Bt(e),p.length=1,t=t-o-1,p[0]=Ao(10,(vt-t%vt)%vt),e.e=cu(-t/vt)||0):(p.length=1,p[0]=e.e=e.s=0),e;if(r==0?(p.length=y,o=1,y--):(p.length=y+1,o=Ao(10,vt-r),p[y]=i>0?(d/Ao(10,l-i)%Ao(10,i)|0)*o:0),f)for(;;)if(y==0){(p[0]+=o)==Qt&&(p[0]=1,++e.e);break}else{if(p[y]+=o,p[y]!=Qt)break;p[y--]=0,o=1}for(r=p.length;p[--r]===0;)p.pop();if(xt&&(e.e>Up||e.e<-Up))throw Error(k2+Bt(e));return e}function K$(e,t){var n,r,i,o,l,c,f,d,y,p,g=e.constructor,b=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),xt?ft(t,b):t;if(f=e.d,p=t.d,r=t.e,d=e.e,f=f.slice(),l=d-r,l){for(y=l<0,y?(n=f,l=-l,c=p.length):(n=p,r=d,c=f.length),i=Math.max(Math.ceil(b/vt),c)+2,l>i&&(l=i,n.length=1),n.reverse(),i=l;i--;)n.push(0);n.reverse()}else{for(i=f.length,c=p.length,y=i<c,y&&(c=i),i=0;i<c;i++)if(f[i]!=p[i]){y=f[i]<p[i];break}l=0}for(y&&(n=f,f=p,p=n,t.s=-t.s),c=f.length,i=p.length-c;i>0;--i)f[c++]=0;for(i=p.length;i>l;){if(f[--i]<p[i]){for(o=i;o&&f[--o]===0;)f[o]=Qt-1;--f[o],f[i]+=Qt}f[i]-=p[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--r;return f[0]?(t.d=f,t.e=r,xt?ft(t,b):t):new g(0)}function Xo(e,t,n){var r,i=Bt(e),o=Ir(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+Ca(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ca(-i-1)+o,n&&(r=n-l)>0&&(o+=Ca(r))):i>=l?(o+=Ca(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+Ca(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=Ca(r))),e.s<0?"-"+o:o}function K5(e,t){if(e.length>t)return e.length=t,!0}function W$(e){var t,n,r;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(zo+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return X5(l,o.toString())}else if(typeof o!="string")throw Error(zo+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,fne.test(o))X5(l,o);else throw Error(zo+o)}if(i.prototype=_e,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=W$,i.config=i.set=dne,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function dne(e){if(!e||typeof e!="object")throw Error(ur+"Object expected");var t,n,r,i=["precision",1,uu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(cu(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(zo+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(zo+n+": "+r);return this}var R2=W$(cne);Hn=new R2(1);const ut=R2;function hne(e){return gne(e)||mne(e)||yne(e)||pne()}function pne(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
468
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yne(e,t){if(e){if(typeof e=="string")return lS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lS(e,t)}}function mne(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function gne(e){if(Array.isArray(e))return lS(e)}function lS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vne=function(t){return t},Q$={},Z$=function(t){return t===Q$},W5=function(t){return function n(){return arguments.length===0||arguments.length===1&&Z$(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},bne=function e(t,n){return t===1?n:W5(function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var l=i.filter(function(c){return c!==Q$}).length;return l>=t?n.apply(void 0,i):e(t-l,W5(function(){for(var c=arguments.length,f=new Array(c),d=0;d<c;d++)f[d]=arguments[d];var y=i.map(function(p){return Z$(p)?f.shift():p});return n.apply(void 0,hne(y).concat(f))}))})},rm=function(t){return bne(t.length,t)},uS=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},xne=rm(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),wne=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return vne;var i=n.reverse(),o=i[0],l=i.slice(1);return function(){return l.reduce(function(c,f){return f(c)},o.apply(void 0,arguments))}},cS=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},J$=function(t){var n=null,r=null;return function(){for(var i=arguments.length,o=new Array(i),l=0;l<i;l++)o[l]=arguments[l];return n&&o.every(function(c,f){return c===n[f]})||(n=o,r=t.apply(void 0,o)),r}};function Sne(e){var t;return e===0?t=1:t=Math.floor(new ut(e).abs().log(10).toNumber())+1,t}function _ne(e,t,n){for(var r=new ut(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var Ane=rm(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),One=rm(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),jne=rm(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const im={rangeStep:_ne,getDigitCount:Sne,interpolateNumber:Ane,uninterpolateNumber:One,uninterpolateTruncation:jne};function fS(e){return Tne(e)||Nne(e)||eq(e)||Ene()}function Ene(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
469
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nne(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Tne(e){if(Array.isArray(e))return dS(e)}function lf(e,t){return kne(e)||Mne(e,t)||eq(e,t)||Cne()}function Cne(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
470
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eq(e,t){if(e){if(typeof e=="string")return dS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dS(e,t)}}function dS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mne(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var l=e[Symbol.iterator](),c;!(r=(c=l.next()).done)&&(n.push(c.value),!(t&&n.length===t));r=!0);}catch(f){i=!0,o=f}finally{try{!r&&l.return!=null&&l.return()}finally{if(i)throw o}}return n}}function kne(e){if(Array.isArray(e))return e}function tq(e){var t=lf(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function nq(e,t,n){if(e.lte(0))return new ut(0);var r=im.getDigitCount(e.toNumber()),i=new ut(10).pow(r),o=e.div(i),l=r!==1?.05:.1,c=new ut(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=c.mul(i);return t?f:new ut(Math.ceil(f))}function Rne(e,t,n){var r=1,i=new ut(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new ut(10).pow(im.getDigitCount(e)-1),i=new ut(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new ut(Math.floor(e)))}else e===0?i=new ut(Math.floor((t-1)/2)):n||(i=new ut(Math.floor(e)));var l=Math.floor((t-1)/2),c=wne(xne(function(f){return i.add(new ut(f-l).mul(r)).toNumber()}),uS);return c(0,t)}function rq(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new ut(0),tickMin:new ut(0),tickMax:new ut(0)};var o=nq(new ut(t).sub(e).div(n-1),r,i),l;e<=0&&t>=0?l=new ut(0):(l=new ut(e).add(t).div(2),l=l.sub(new ut(l).mod(o)));var c=Math.ceil(l.sub(e).div(o).toNumber()),f=Math.ceil(new ut(t).sub(l).div(o).toNumber()),d=c+f+1;return d>n?rq(e,t,n,r,i+1):(d<n&&(f=t>0?f+(n-d):f,c=t>0?c:c+(n-d)),{step:o,tickMin:l.sub(new ut(c).mul(o)),tickMax:l.add(new ut(f).mul(o))})}function Pne(e){var t=lf(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=Math.max(i,2),c=tq([n,r]),f=lf(c,2),d=f[0],y=f[1];if(d===-1/0||y===1/0){var p=y===1/0?[d].concat(fS(uS(0,i-1).map(function(){return 1/0}))):[].concat(fS(uS(0,i-1).map(function(){return-1/0})),[y]);return n>r?cS(p):p}if(d===y)return Rne(d,i,o);var g=rq(d,y,l,o),b=g.step,_=g.tickMin,S=g.tickMax,x=im.rangeStep(_,S.add(new ut(.1).mul(b)),b);return n>r?cS(x):x}function Dne(e,t){var n=lf(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=tq([r,i]),c=lf(l,2),f=c[0],d=c[1];if(f===-1/0||d===1/0)return[r,i];if(f===d)return[f];var y=Math.max(t,2),p=nq(new ut(d).sub(f).div(y-1),o,0),g=[].concat(fS(im.rangeStep(new ut(f),new ut(d).sub(new ut(.99).mul(p)),p)),[d]);return r>i?cS(g):g}var $ne=J$(Pne),qne=J$(Dne),Lne="Invariant failed";function Ko(e,t){throw new Error(Lne)}var zne=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function $l(e){"@babel/helpers - typeof";return $l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(e)}function Hp(){return Hp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hp.apply(this,arguments)}function Bne(e,t){return Vne(e)||Hne(e,t)||Une(e,t)||Ine()}function Ine(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
471
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Une(e,t){if(e){if(typeof e=="string")return Q5(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q5(e,t)}}function Q5(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hne(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function Vne(e){if(Array.isArray(e))return e}function Gne(e,t){if(e==null)return{};var n=Fne(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fne(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Yne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oq(r.key),r)}}function Kne(e,t,n){return t&&Xne(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wne(e,t,n){return t=Vp(t),Qne(e,iq()?Reflect.construct(t,n||[],Vp(e).constructor):t.apply(e,n))}function Qne(e,t){if(t&&($l(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Zne(e)}function Zne(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iq=function(){return!!e})()}function Vp(e){return Vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vp(e)}function Jne(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hS(e,t)}function hS(e,t){return hS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},hS(e,t)}function aq(e,t,n){return t=oq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oq(e){var t=ere(e,"string");return $l(t)=="symbol"?t:t+""}function ere(e,t){if($l(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($l(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var am=(function(e){function t(){return Yne(this,t),Wne(this,t,arguments)}return Jne(t,e),Kne(t,[{key:"render",value:function(){var r=this.props,i=r.offset,o=r.layout,l=r.width,c=r.dataKey,f=r.data,d=r.dataPointFormatter,y=r.xAxis,p=r.yAxis,g=Gne(r,zne),b=ke(g,!1);this.props.direction==="x"&&y.type!=="number"&&Ko();var _=f.map(function(S){var x=d(S,c),A=x.x,j=x.y,O=x.value,N=x.errorVal;if(!N)return null;var E=[],T,C;if(Array.isArray(N)){var D=Bne(N,2);T=D[0],C=D[1]}else T=C=N;if(o==="vertical"){var q=y.scale,F=j+i,L=F+l,P=F-l,Y=q(O-T),R=q(O+C);E.push({x1:R,y1:L,x2:R,y2:P}),E.push({x1:Y,y1:F,x2:R,y2:F}),E.push({x1:Y,y1:L,x2:Y,y2:P})}else if(o==="horizontal"){var $=p.scale,k=A+i,I=k-l,H=k+l,V=$(O-T),K=$(O+C);E.push({x1:I,y1:K,x2:H,y2:K}),E.push({x1:k,y1:V,x2:k,y2:K}),E.push({x1:I,y1:V,x2:H,y2:V})}return W.createElement(at,Hp({className:"recharts-errorBar",key:"bar-".concat(E.map(function(z){return"".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))},b),E.map(function(z){return W.createElement("line",Hp({},z,{key:"line-".concat(z.x1,"-").concat(z.x2,"-").concat(z.y1,"-").concat(z.y2)}))}))});return W.createElement(at,{className:"recharts-errorBars"},_)}}])})(W.Component);aq(am,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});aq(am,"displayName","ErrorBar");function uf(e){"@babel/helpers - typeof";return uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uf(e)}function Z5(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Z5(Object(n),!0).forEach(function(r){tre(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Z5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tre(e,t,n){return t=nre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nre(e){var t=rre(e,"string");return uf(t)=="symbol"?t:t+""}function rre(e,t){if(uf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(uf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sq=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,l=In(n,ul);if(!l)return null;var c=ul.defaultProps,f=c!==void 0?bo(bo({},c),l.props):{},d;return l.props&&l.props.payload?d=l.props&&l.props.payload:o==="children"?d=(r||[]).reduce(function(y,p){var g=p.item,b=p.props,_=b.sectors||b.data||[];return y.concat(_.map(function(S){return{type:l.props.iconType||g.props.legendType,value:S.name,color:S.fill,payload:S}}))},[]):d=(r||[]).map(function(y){var p=y.item,g=p.type.defaultProps,b=g!==void 0?bo(bo({},g),p.props):{},_=b.dataKey,S=b.name,x=b.legendType,A=b.hide;return{inactive:A,dataKey:_,type:f.iconType||x||"square",color:P2(p),value:S||_,payload:b}}),bo(bo(bo({},f),ul.getWithHeight(l,i)),{},{payload:d,item:l})};function cf(e){"@babel/helpers - typeof";return cf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cf(e)}function J5(e){return sre(e)||ore(e)||are(e)||ire()}function ire(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
472
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function are(e,t){if(e){if(typeof e=="string")return pS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pS(e,t)}}function ore(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sre(e){if(Array.isArray(e))return pS(e)}function pS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Et(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ek(Object(n),!0).forEach(function(r){cl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ek(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cl(e,t,n){return t=lre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lre(e){var t=ure(e,"string");return cf(t)=="symbol"?t:t+""}function ure(e,t){if(cf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hn(e,t,n){return Ie(e)||Ie(t)?n:Ft(t)?Gn(e,t,n):Pe(t)?t(e):n}function Rc(e,t,n,r){var i=sne(e,function(c){return hn(c,t)});if(n==="number"){var o=i.filter(function(c){return ge(c)||parseFloat(c)});return o.length?[tm(o),em(o)]:[1/0,-1/0]}var l=r?i.filter(function(c){return!Ie(c)}):i;return l.map(function(c){return Ft(c)||c instanceof Date?c:""})}var cre=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,l=-1,c=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(c<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var f=o.range,d=0;d<c;d++){var y=d>0?i[d-1].coordinate:i[c-1].coordinate,p=i[d].coordinate,g=d>=c-1?i[0].coordinate:i[d+1].coordinate,b=void 0;if(xn(p-y)!==xn(g-p)){var _=[];if(xn(g-p)===xn(f[1]-f[0])){b=g;var S=p+f[1]-f[0];_[0]=Math.min(S,(S+y)/2),_[1]=Math.max(S,(S+y)/2)}else{b=y;var x=g+f[1]-f[0];_[0]=Math.min(p,(x+p)/2),_[1]=Math.max(p,(x+p)/2)}var A=[Math.min(p,(b+p)/2),Math.max(p,(b+p)/2)];if(t>A[0]&&t<=A[1]||t>=_[0]&&t<=_[1]){l=i[d].index;break}}else{var j=Math.min(y,g),O=Math.max(y,g);if(t>(j+p)/2&&t<=(O+p)/2){l=i[d].index;break}}}else for(var N=0;N<c;N++)if(N===0&&t<=(r[N].coordinate+r[N+1].coordinate)/2||N>0&&N<c-1&&t>(r[N].coordinate+r[N-1].coordinate)/2&&t<=(r[N].coordinate+r[N+1].coordinate)/2||N===c-1&&t>(r[N].coordinate+r[N-1].coordinate)/2){l=r[N].index;break}return l},P2=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,l=o.stroke,c=o.fill,f;switch(i){case"Line":f=l;break;case"Area":case"Radar":f=l&&l!=="none"?l:c;break;default:f=c;break}return f},fre=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var l={},c=Object.keys(o),f=0,d=c.length;f<d;f++)for(var y=o[c[f]].stackGroups,p=Object.keys(y),g=0,b=p.length;g<b;g++){var _=y[p[g]],S=_.items,x=_.cateAxisId,A=S.filter(function(C){return Ri(C.type).indexOf("Bar")>=0});if(A&&A.length){var j=A[0].type.defaultProps,O=j!==void 0?Et(Et({},j),A[0].props):A[0].props,N=O.barSize,E=O[x];l[E]||(l[E]=[]);var T=Ie(N)?n:N;l[E].push({item:A[0],stackList:A.slice(1),barSize:Ie(T)?void 0:wn(T,r,0)})}}return l},dre=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,l=o===void 0?[]:o,c=t.maxBarSize,f=l.length;if(f<1)return null;var d=wn(n,i,0,!0),y,p=[];if(l[0].barSize===+l[0].barSize){var g=!1,b=i/f,_=l.reduce(function(N,E){return N+E.barSize||0},0);_+=(f-1)*d,_>=i&&(_-=(f-1)*d,d=0),_>=i&&b>0&&(g=!0,b*=.9,_=f*b);var S=(i-_)/2>>0,x={offset:S-d,size:0};y=l.reduce(function(N,E){var T={item:E.item,position:{offset:x.offset+x.size+d,size:g?b:E.barSize}},C=[].concat(J5(N),[T]);return x=C[C.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(D){C.push({item:D,position:x})}),C},p)}else{var A=wn(r,i,0,!0);i-2*A-(f-1)*d<=0&&(d=0);var j=(i-2*A-(f-1)*d)/f;j>1&&(j>>=0);var O=c===+c?Math.min(j,c):j;y=l.reduce(function(N,E,T){var C=[].concat(J5(N),[{item:E.item,position:{offset:A+(j+d)*T+(j-O)/2,size:O}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(D){C.push({item:D,position:C[C.length-1].position})}),C},p)}return y},hre=function(t,n,r,i){var o=r.children,l=r.width,c=r.margin,f=l-(c.left||0)-(c.right||0),d=sq({children:o,legendWidth:f});if(d){var y=i||{},p=y.width,g=y.height,b=d.align,_=d.verticalAlign,S=d.layout;if((S==="vertical"||S==="horizontal"&&_==="middle")&&b!=="center"&&ge(t[b]))return Et(Et({},t),{},cl({},b,t[b]+(p||0)));if((S==="horizontal"||S==="vertical"&&b==="center")&&_!=="middle"&&ge(t[_]))return Et(Et({},t),{},cl({},_,t[_]+(g||0)))}return t},pre=function(t,n,r){return Ie(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},lq=function(t,n,r,i,o){var l=n.props.children,c=lr(l,am).filter(function(d){return pre(i,o,d.props.direction)});if(c&&c.length){var f=c.map(function(d){return d.props.dataKey});return t.reduce(function(d,y){var p=hn(y,r);if(Ie(p))return d;var g=Array.isArray(p)?[tm(p),em(p)]:[p,p],b=f.reduce(function(_,S){var x=hn(y,S,0),A=g[0]-Math.abs(Array.isArray(x)?x[0]:x),j=g[1]+Math.abs(Array.isArray(x)?x[1]:x);return[Math.min(A,_[0]),Math.max(j,_[1])]},[1/0,-1/0]);return[Math.min(b[0],d[0]),Math.max(b[1],d[1])]},[1/0,-1/0])}return null},yre=function(t,n,r,i,o){var l=n.map(function(c){return lq(t,c,r,o,i)}).filter(function(c){return!Ie(c)});return l&&l.length?l.reduce(function(c,f){return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]):null},uq=function(t,n,r,i,o){var l=n.map(function(f){var d=f.props.dataKey;return r==="number"&&d&&lq(t,f,d,i)||Rc(t,d,r,o)});if(r==="number")return l.reduce(function(f,d){return[Math.min(f[0],d[0]),Math.max(f[1],d[1])]},[1/0,-1/0]);var c={};return l.reduce(function(f,d){for(var y=0,p=d.length;y<p;y++)c[d[y]]||(c[d[y]]=!0,f.push(d[y]));return f},[])},cq=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},fq=function(t,n,r,i){if(i)return t.map(function(f){return f.coordinate});var o,l,c=t.map(function(f){return f.coordinate===n&&(o=!0),f.coordinate===r&&(l=!0),f.coordinate});return o||c.push(n),l||c.push(r),c},Mi=function(t,n,r){if(!t)return null;var i=t.scale,o=t.duplicateDomain,l=t.type,c=t.range,f=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,d=(n||r)&&l==="category"&&i.bandwidth?i.bandwidth()/f:0;if(d=t.axisType==="angleAxis"&&(c==null?void 0:c.length)>=2?xn(c[0]-c[1])*2*d:d,n&&(t.ticks||t.niceTicks)){var y=(t.ticks||t.niceTicks).map(function(p){var g=o?o.indexOf(p):p;return{coordinate:i(g)+d,value:p,offset:d}});return y.filter(function(p){return!Gf(p.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(p,g){return{coordinate:i(p)+d,value:p,index:g,offset:d}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(p){return{coordinate:i(p)+d,value:p,offset:d}}):i.domain().map(function(p,g){return{coordinate:i(p)+d,value:o?o[p]:p,index:g,offset:d}})},k1=new WeakMap,Ih=function(t,n){if(typeof n!="function")return t;k1.has(t)||k1.set(t,new WeakMap);var r=k1.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},dq=function(t,n,r){var i=t.scale,o=t.type,l=t.layout,c=t.axisType;if(i==="auto")return l==="radial"&&c==="radiusAxis"?{scale:af(),realScaleType:"band"}:l==="radial"&&c==="angleAxis"?{scale:Lp(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:kc(),realScaleType:"point"}:o==="category"?{scale:af(),realScaleType:"band"}:{scale:Lp(),realScaleType:"linear"};if(Go(i)){var f="scale".concat(By(i));return{scale:(z5[f]||kc)(),realScaleType:z5[f]?f:"point"}}return Pe(i)?{scale:i}:{scale:kc(),realScaleType:"point"}},tk=1e-4,hq=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-tk,l=Math.max(i[0],i[1])+tk,c=t(n[0]),f=t(n[r-1]);(c<o||c>l||f<o||f>l)&&t.domain([n[0],n[r-1]])}},mre=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},gre=function(t,n){if(!n||n.length!==2||!ge(n[0])||!ge(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),o=[t[0],t[1]];return(!ge(t[0])||t[0]<r)&&(o[0]=r),(!ge(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},vre=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,l=0,c=0;c<n;++c){var f=Gf(t[c][r][1])?t[c][r][0]:t[c][r][1];f>=0?(t[c][r][0]=o,t[c][r][1]=o+f,o=t[c][r][1]):(t[c][r][0]=l,t[c][r][1]=l+f,l=t[c][r][1])}},bre=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var o=0,l=0;l<n;++l){var c=Gf(t[l][r][1])?t[l][r][0]:t[l][r][1];c>=0?(t[l][r][0]=o,t[l][r][1]=o+c,o=t[l][r][1]):(t[l][r][0]=0,t[l][r][1]=0)}},xre={sign:vre,expand:MW,none:Nl,silhouette:kW,wiggle:RW,positive:bre},wre=function(t,n,r){var i=n.map(function(c){return c.props.dataKey}),o=xre[r],l=CW().keys(i).value(function(c,f){return+hn(c,f,0)}).order(Fw).offset(o);return l(t)},Sre=function(t,n,r,i,o,l){if(!t)return null;var c=l?n.reverse():n,f={},d=c.reduce(function(p,g){var b,_=(b=g.type)!==null&&b!==void 0&&b.defaultProps?Et(Et({},g.type.defaultProps),g.props):g.props,S=_.stackId,x=_.hide;if(x)return p;var A=_[r],j=p[A]||{hasStack:!1,stackGroups:{}};if(Ft(S)){var O=j.stackGroups[S]||{numericAxisId:r,cateAxisId:i,items:[]};O.items.push(g),j.hasStack=!0,j.stackGroups[S]=O}else j.stackGroups[Ff("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[g]};return Et(Et({},p),{},cl({},A,j))},f),y={};return Object.keys(d).reduce(function(p,g){var b=d[g];if(b.hasStack){var _={};b.stackGroups=Object.keys(b.stackGroups).reduce(function(S,x){var A=b.stackGroups[x];return Et(Et({},S),{},cl({},x,{numericAxisId:r,cateAxisId:i,items:A.items,stackedData:wre(t,A.items,o)}))},_)}return Et(Et({},p),{},cl({},g,b))},y)},pq=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,l=n.originalDomain,c=n.allowDecimals,f=r||n.scale;if(f!=="auto"&&f!=="linear")return null;if(o&&i==="number"&&l&&(l[0]==="auto"||l[1]==="auto")){var d=t.domain();if(!d.length)return null;var y=$ne(d,o,c);return t.domain([tm(y),em(y)]),{niceTicks:y}}if(o&&i==="number"){var p=t.domain(),g=qne(p,o,c);return{niceTicks:g}}return null},nk=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,l=t.entry,c=t.index;if(n.type==="category")return r[c]?r[c].coordinate+i:null;var f=hn(l,n.dataKey,n.domain[c]);return Ie(f)?null:n.scale(f)-o/2+i},_re=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},Are=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Ft(o)){var l=n[o];if(l){var c=l.items.indexOf(t);return c>=0?l.stackedData[c]:null}}return null},Ore=function(t){return t.reduce(function(n,r){return[tm(r.concat([n[0]]).filter(ge)),em(r.concat([n[1]]).filter(ge))]},[1/0,-1/0])},yq=function(t,n,r){return Object.keys(t).reduce(function(i,o){var l=t[o],c=l.stackedData,f=c.reduce(function(d,y){var p=Ore(y.slice(n,r+1));return[Math.min(d[0],p[0]),Math.max(d[1],p[1])]},[1/0,-1/0]);return[Math.min(f[0],i[0]),Math.max(f[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},rk=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,ik=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,yS=function(t,n,r){if(Pe(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(ge(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(rk.test(t[0])){var o=+rk.exec(t[0])[1];i[0]=n[0]-o}else Pe(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(ge(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(ik.test(t[1])){var l=+ik.exec(t[1])[1];i[1]=n[1]+l}else Pe(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Gp=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=f2(n,function(p){return p.coordinate}),l=1/0,c=1,f=o.length;c<f;c++){var d=o[c],y=o[c-1];l=Math.min((d.coordinate||0)-(y.coordinate||0),l)}return l===1/0?0:l}return r?void 0:0},ak=function(t,n,r){return!t||!t.length||nm(t,Gn(r,"type.defaultProps.domain"))?n:t},mq=function(t,n){var r=t.type.defaultProps?Et(Et({},t.type.defaultProps),t.props):t.props,i=r.dataKey,o=r.name,l=r.unit,c=r.formatter,f=r.tooltipType,d=r.chartType,y=r.hide;return Et(Et({},ke(t,!1)),{},{dataKey:i,unit:l,formatter:c,name:o||i,color:P2(t),value:hn(n,i),type:f,payload:n,chartType:d,hide:y})};function ff(e){"@babel/helpers - typeof";return ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ff(e)}function ok(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ok(Object(n),!0).forEach(function(r){gq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ok(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function gq(e,t,n){return t=jre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jre(e){var t=Ere(e,"string");return ff(t)=="symbol"?t:t+""}function Ere(e,t){if(ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nre(e,t){return kre(e)||Mre(e,t)||Cre(e,t)||Tre()}function Tre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
473
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cre(e,t){if(e){if(typeof e=="string")return sk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sk(e,t)}}function sk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mre(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function kre(e){if(Array.isArray(e))return e}var Fp=Math.PI/180,Rre=function(t){return t*180/Math.PI},pt=function(t,n,r,i){return{x:t+Math.cos(-Fp*i)*r,y:n+Math.sin(-Fp*i)*r}},vq=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},Pre=function(t,n,r,i,o){var l=t.width,c=t.height,f=t.startAngle,d=t.endAngle,y=wn(t.cx,l,l/2),p=wn(t.cy,c,c/2),g=vq(l,c,r),b=wn(t.innerRadius,g,0),_=wn(t.outerRadius,g,g*.8),S=Object.keys(n);return S.reduce(function(x,A){var j=n[A],O=j.domain,N=j.reversed,E;if(Ie(j.range))i==="angleAxis"?E=[f,d]:i==="radiusAxis"&&(E=[b,_]),N&&(E=[E[1],E[0]]);else{E=j.range;var T=E,C=Nre(T,2);f=C[0],d=C[1]}var D=dq(j,o),q=D.realScaleType,F=D.scale;F.domain(O).range(E),hq(F);var L=pq(F,Oi(Oi({},j),{},{realScaleType:q})),P=Oi(Oi(Oi({},j),L),{},{range:E,radius:_,realScaleType:q,scale:F,cx:y,cy:p,innerRadius:b,outerRadius:_,startAngle:f,endAngle:d});return Oi(Oi({},x),{},gq({},A,P))},{})},Dre=function(t,n){var r=t.x,i=t.y,o=n.x,l=n.y;return Math.sqrt(Math.pow(r-o,2)+Math.pow(i-l,2))},$re=function(t,n){var r=t.x,i=t.y,o=n.cx,l=n.cy,c=Dre({x:r,y:i},{x:o,y:l});if(c<=0)return{radius:c};var f=(r-o)/c,d=Math.acos(f);return i>l&&(d=2*Math.PI-d),{radius:c,angle:Rre(d),angleInRadian:d}},qre=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),l=Math.min(i,o);return{startAngle:n-l*360,endAngle:r-l*360}},Lre=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),l=Math.floor(i/360),c=Math.min(o,l);return t+c*360},lk=function(t,n){var r=t.x,i=t.y,o=$re({x:r,y:i},n),l=o.radius,c=o.angle,f=n.innerRadius,d=n.outerRadius;if(l<f||l>d)return!1;if(l===0)return!0;var y=qre(n),p=y.startAngle,g=y.endAngle,b=c,_;if(p<=g){for(;b>g;)b-=360;for(;b<p;)b+=360;_=b>=p&&b<=g}else{for(;b>p;)b-=360;for(;b<g;)b+=360;_=b>=g&&b<=p}return _?Oi(Oi({},n),{},{radius:l,angle:Lre(b,n)}):null},bq=function(t){return!U.isValidElement(t)&&!Pe(t)&&typeof t!="boolean"?t.className:""};function df(e){"@babel/helpers - typeof";return df=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},df(e)}var zre=["offset"];function Bre(e){return Vre(e)||Hre(e)||Ure(e)||Ire()}function Ire(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
474
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ure(e,t){if(e){if(typeof e=="string")return mS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mS(e,t)}}function Hre(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vre(e){if(Array.isArray(e))return mS(e)}function mS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gre(e,t){if(e==null)return{};var n=Fre(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Fre(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gt(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){Yre(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 Yre(e,t,n){return t=Xre(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xre(e){var t=Kre(e,"string");return df(t)=="symbol"?t:t+""}function Kre(e,t){if(df(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(df(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hf(){return hf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hf.apply(this,arguments)}var Wre=function(t){var n=t.value,r=t.formatter,i=Ie(t.children)?n:t.children;return Pe(r)?r(i):i},Qre=function(t,n){var r=xn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},Zre=function(t,n,r){var i=t.position,o=t.viewBox,l=t.offset,c=t.className,f=o,d=f.cx,y=f.cy,p=f.innerRadius,g=f.outerRadius,b=f.startAngle,_=f.endAngle,S=f.clockWise,x=(p+g)/2,A=Qre(b,_),j=A>=0?1:-1,O,N;i==="insideStart"?(O=b+j*l,N=S):i==="insideEnd"?(O=_-j*l,N=!S):i==="end"&&(O=_+j*l,N=S),N=A<=0?N:!N;var E=pt(d,y,x,O),T=pt(d,y,x,O+(N?1:-1)*359),C="M".concat(E.x,",").concat(E.y,`
475
+ A`).concat(x,",").concat(x,",0,1,").concat(N?0:1,`,
476
+ `).concat(T.x,",").concat(T.y),D=Ie(t.id)?Ff("recharts-radial-line-"):t.id;return W.createElement("text",hf({},r,{dominantBaseline:"central",className:Be("recharts-radial-bar-label",c)}),W.createElement("defs",null,W.createElement("path",{id:D,d:C})),W.createElement("textPath",{xlinkHref:"#".concat(D)},n))},Jre=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,l=o.cx,c=o.cy,f=o.innerRadius,d=o.outerRadius,y=o.startAngle,p=o.endAngle,g=(y+p)/2;if(i==="outside"){var b=pt(l,c,d+r,g),_=b.x,S=b.y;return{x:_,y:S,textAnchor:_>=l?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:l,y:c,textAnchor:"middle",verticalAnchor:"end"};var x=(f+d)/2,A=pt(l,c,x,g),j=A.x,O=A.y;return{x:j,y:O,textAnchor:"middle",verticalAnchor:"middle"}},eie=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,l=n,c=l.x,f=l.y,d=l.width,y=l.height,p=y>=0?1:-1,g=p*i,b=p>0?"end":"start",_=p>0?"start":"end",S=d>=0?1:-1,x=S*i,A=S>0?"end":"start",j=S>0?"start":"end";if(o==="top"){var O={x:c+d/2,y:f-p*i,textAnchor:"middle",verticalAnchor:b};return Gt(Gt({},O),r?{height:Math.max(f-r.y,0),width:d}:{})}if(o==="bottom"){var N={x:c+d/2,y:f+y+g,textAnchor:"middle",verticalAnchor:_};return Gt(Gt({},N),r?{height:Math.max(r.y+r.height-(f+y),0),width:d}:{})}if(o==="left"){var E={x:c-x,y:f+y/2,textAnchor:A,verticalAnchor:"middle"};return Gt(Gt({},E),r?{width:Math.max(E.x-r.x,0),height:y}:{})}if(o==="right"){var T={x:c+d+x,y:f+y/2,textAnchor:j,verticalAnchor:"middle"};return Gt(Gt({},T),r?{width:Math.max(r.x+r.width-T.x,0),height:y}:{})}var C=r?{width:d,height:y}:{};return o==="insideLeft"?Gt({x:c+x,y:f+y/2,textAnchor:j,verticalAnchor:"middle"},C):o==="insideRight"?Gt({x:c+d-x,y:f+y/2,textAnchor:A,verticalAnchor:"middle"},C):o==="insideTop"?Gt({x:c+d/2,y:f+g,textAnchor:"middle",verticalAnchor:_},C):o==="insideBottom"?Gt({x:c+d/2,y:f+y-g,textAnchor:"middle",verticalAnchor:b},C):o==="insideTopLeft"?Gt({x:c+x,y:f+g,textAnchor:j,verticalAnchor:_},C):o==="insideTopRight"?Gt({x:c+d-x,y:f+g,textAnchor:A,verticalAnchor:_},C):o==="insideBottomLeft"?Gt({x:c+x,y:f+y-g,textAnchor:j,verticalAnchor:b},C):o==="insideBottomRight"?Gt({x:c+d-x,y:f+y-g,textAnchor:A,verticalAnchor:b},C):ou(o)&&(ge(o.x)||Eo(o.x))&&(ge(o.y)||Eo(o.y))?Gt({x:c+wn(o.x,d),y:f+wn(o.y,y),textAnchor:"end",verticalAnchor:"end"},C):Gt({x:c+d/2,y:f+y/2,textAnchor:"middle",verticalAnchor:"middle"},C)},tie=function(t){return"cx"in t&&ge(t.cx)};function Zt(e){var t=e.offset,n=t===void 0?5:t,r=Gre(e,zre),i=Gt({offset:n},r),o=i.viewBox,l=i.position,c=i.value,f=i.children,d=i.content,y=i.className,p=y===void 0?"":y,g=i.textBreakAll;if(!o||Ie(c)&&Ie(f)&&!U.isValidElement(d)&&!Pe(d))return null;if(U.isValidElement(d))return U.cloneElement(d,i);var b;if(Pe(d)){if(b=U.createElement(d,i),U.isValidElement(b))return b}else b=Wre(i);var _=tie(o),S=ke(i,!0);if(_&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Zre(i,b,S);var x=_?Jre(i):eie(i);return W.createElement(Yo,hf({className:Be("recharts-label",p)},S,x,{breakAll:g}),b)}Zt.displayName="Label";var xq=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,l=t.endAngle,c=t.r,f=t.radius,d=t.innerRadius,y=t.outerRadius,p=t.x,g=t.y,b=t.top,_=t.left,S=t.width,x=t.height,A=t.clockWise,j=t.labelViewBox;if(j)return j;if(ge(S)&&ge(x)){if(ge(p)&&ge(g))return{x:p,y:g,width:S,height:x};if(ge(b)&&ge(_))return{x:b,y:_,width:S,height:x}}return ge(p)&&ge(g)?{x:p,y:g,width:0,height:0}:ge(n)&&ge(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:l||i||0,innerRadius:d||0,outerRadius:y||f||c||0,clockWise:A}:t.viewBox?t.viewBox:{}},nie=function(t,n){return t?t===!0?W.createElement(Zt,{key:"label-implicit",viewBox:n}):Ft(t)?W.createElement(Zt,{key:"label-implicit",viewBox:n,value:t}):U.isValidElement(t)?t.type===Zt?U.cloneElement(t,{key:"label-implicit",viewBox:n}):W.createElement(Zt,{key:"label-implicit",content:t,viewBox:n}):Pe(t)?W.createElement(Zt,{key:"label-implicit",content:t,viewBox:n}):ou(t)?W.createElement(Zt,hf({viewBox:n},t,{key:"label-implicit"})):null:null},rie=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=xq(t),l=lr(i,Zt).map(function(f,d){return U.cloneElement(f,{viewBox:n||o,key:"label-".concat(d)})});if(!r)return l;var c=nie(t.label,n||o);return[c].concat(Bre(l))};Zt.parseViewBox=xq;Zt.renderCallByParent=rie;var R1,ck;function iie(){if(ck)return R1;ck=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return R1=e,R1}var aie=iie();const oie=nt(aie);function pf(e){"@babel/helpers - typeof";return pf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pf(e)}var sie=["valueAccessor"],lie=["data","dataKey","clockWise","id","textBreakAll"];function uie(e){return hie(e)||die(e)||fie(e)||cie()}function cie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
477
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fie(e,t){if(e){if(typeof e=="string")return gS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gS(e,t)}}function die(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function hie(e){if(Array.isArray(e))return gS(e)}function gS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yp.apply(this,arguments)}function fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dk(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){pie(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 pie(e,t,n){return t=yie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yie(e){var t=mie(e,"string");return pf(t)=="symbol"?t:t+""}function mie(e,t){if(pf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hk(e,t){if(e==null)return{};var n=gie(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gie(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var vie=function(t){return Array.isArray(t.value)?oie(t.value):t.value};function Ha(e){var t=e.valueAccessor,n=t===void 0?vie:t,r=hk(e,sie),i=r.data,o=r.dataKey,l=r.clockWise,c=r.id,f=r.textBreakAll,d=hk(r,lie);return!i||!i.length?null:W.createElement(at,{className:"recharts-label-list"},i.map(function(y,p){var g=Ie(o)?n(y,p):hn(y&&y.payload,o),b=Ie(c)?{}:{id:"".concat(c,"-").concat(p)};return W.createElement(Zt,Yp({},ke(y,!0),d,b,{parentViewBox:y.parentViewBox,value:g,textBreakAll:f,viewBox:Zt.parseViewBox(Ie(l)?y:dk(dk({},y),{},{clockWise:l})),key:"label-".concat(p),index:p}))}))}Ha.displayName="LabelList";function bie(e,t){return e?e===!0?W.createElement(Ha,{key:"labelList-implicit",data:t}):W.isValidElement(e)||Pe(e)?W.createElement(Ha,{key:"labelList-implicit",data:t,content:e}):ou(e)?W.createElement(Ha,Yp({data:t},e,{key:"labelList-implicit"})):null:null}function xie(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=lr(r,Ha).map(function(l,c){return U.cloneElement(l,{data:t,key:"labelList-".concat(c)})});if(!n)return i;var o=bie(e.label,t);return[o].concat(uie(i))}Ha.renderCallByParent=xie;function yf(e){"@babel/helpers - typeof";return yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yf(e)}function vS(){return vS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vS.apply(this,arguments)}function pk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pk(Object(n),!0).forEach(function(r){wie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wie(e,t,n){return t=Sie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sie(e){var t=_ie(e,"string");return yf(t)=="symbol"?t:t+""}function _ie(e,t){if(yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Aie=function(t,n){var r=xn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},Uh=function(t){var n=t.cx,r=t.cy,i=t.radius,o=t.angle,l=t.sign,c=t.isExternal,f=t.cornerRadius,d=t.cornerIsExternal,y=f*(c?1:-1)+i,p=Math.asin(f/y)/Fp,g=d?o:o+l*p,b=pt(n,r,y,g),_=pt(n,r,i,g),S=d?o-l*p:o,x=pt(n,r,y*Math.cos(p*Fp),S);return{center:b,circleTangency:_,lineTangency:x,theta:p}},wq=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.startAngle,c=t.endAngle,f=Aie(l,c),d=l+f,y=pt(n,r,o,l),p=pt(n,r,o,d),g="M ".concat(y.x,",").concat(y.y,`
478
+ A `).concat(o,",").concat(o,`,0,
479
+ `).concat(+(Math.abs(f)>180),",").concat(+(l>d),`,
480
+ `).concat(p.x,",").concat(p.y,`
481
+ `);if(i>0){var b=pt(n,r,i,l),_=pt(n,r,i,d);g+="L ".concat(_.x,",").concat(_.y,`
482
+ A `).concat(i,",").concat(i,`,0,
483
+ `).concat(+(Math.abs(f)>180),",").concat(+(l<=d),`,
484
+ `).concat(b.x,",").concat(b.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},Oie=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.cornerRadius,c=t.forceCornerRadius,f=t.cornerIsExternal,d=t.startAngle,y=t.endAngle,p=xn(y-d),g=Uh({cx:n,cy:r,radius:o,angle:d,sign:p,cornerRadius:l,cornerIsExternal:f}),b=g.circleTangency,_=g.lineTangency,S=g.theta,x=Uh({cx:n,cy:r,radius:o,angle:y,sign:-p,cornerRadius:l,cornerIsExternal:f}),A=x.circleTangency,j=x.lineTangency,O=x.theta,N=f?Math.abs(d-y):Math.abs(d-y)-S-O;if(N<0)return c?"M ".concat(_.x,",").concat(_.y,`
485
+ a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
486
+ a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
487
+ `):wq({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:d,endAngle:y});var E="M ".concat(_.x,",").concat(_.y,`
488
+ A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(b.x,",").concat(b.y,`
489
+ A`).concat(o,",").concat(o,",0,").concat(+(N>180),",").concat(+(p<0),",").concat(A.x,",").concat(A.y,`
490
+ A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(j.x,",").concat(j.y,`
491
+ `);if(i>0){var T=Uh({cx:n,cy:r,radius:i,angle:d,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),C=T.circleTangency,D=T.lineTangency,q=T.theta,F=Uh({cx:n,cy:r,radius:i,angle:y,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),L=F.circleTangency,P=F.lineTangency,Y=F.theta,R=f?Math.abs(d-y):Math.abs(d-y)-q-Y;if(R<0&&l===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(P.x,",").concat(P.y,`
492
+ A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(L.x,",").concat(L.y,`
493
+ A`).concat(i,",").concat(i,",0,").concat(+(R>180),",").concat(+(p>0),",").concat(C.x,",").concat(C.y,`
494
+ A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(D.x,",").concat(D.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},jie={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Sq=function(t){var n=yk(yk({},jie),t),r=n.cx,i=n.cy,o=n.innerRadius,l=n.outerRadius,c=n.cornerRadius,f=n.forceCornerRadius,d=n.cornerIsExternal,y=n.startAngle,p=n.endAngle,g=n.className;if(l<o||y===p)return null;var b=Be("recharts-sector",g),_=l-o,S=wn(c,_,0,!0),x;return S>0&&Math.abs(y-p)<360?x=Oie({cx:r,cy:i,innerRadius:o,outerRadius:l,cornerRadius:Math.min(S,_/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:y,endAngle:p}):x=wq({cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:y,endAngle:p}),W.createElement("path",vS({},ke(n,!0),{className:b,d:x,role:"img"}))};function mf(e){"@babel/helpers - typeof";return mf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mf(e)}function bS(){return bS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bS.apply(this,arguments)}function mk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mk(Object(n),!0).forEach(function(r){Eie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eie(e,t,n){return t=Nie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nie(e){var t=Tie(e,"string");return mf(t)=="symbol"?t:t+""}function Tie(e,t){if(mf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vk={curveBasisClosed:bW,curveBasisOpen:xW,curveBasis:vW,curveBumpX:iW,curveBumpY:aW,curveLinearClosed:wW,curveLinear:Uy,curveMonotoneX:SW,curveMonotoneY:_W,curveNatural:AW,curveStep:OW,curveStepAfter:EW,curveStepBefore:jW},Hh=function(t){return t.x===+t.x&&t.y===+t.y},bc=function(t){return t.x},xc=function(t){return t.y},Cie=function(t,n){if(Pe(t))return t;var r="curve".concat(By(t));return(r==="curveMonotone"||r==="curveBump")&&n?vk["".concat(r).concat(n==="vertical"?"Y":"X")]:vk[r]||Uy},Mie=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,o=i===void 0?[]:i,l=t.baseLine,c=t.layout,f=t.connectNulls,d=f===void 0?!1:f,y=Cie(r,c),p=d?o.filter(function(S){return Hh(S)}):o,g;if(Array.isArray(l)){var b=d?l.filter(function(S){return Hh(S)}):l,_=p.map(function(S,x){return gk(gk({},S),{},{base:b[x]})});return c==="vertical"?g=$h().y(xc).x1(bc).x0(function(S){return S.base.x}):g=$h().x(bc).y1(xc).y0(function(S){return S.base.y}),g.defined(Hh).curve(y),g(_)}return c==="vertical"&&ge(l)?g=$h().y(xc).x1(bc).x0(l):ge(l)?g=$h().x(bc).y1(xc).y0(l):g=A8().x(bc).y(xc),g.defined(Hh).curve(y),g(p)},xS=function(t){var n=t.className,r=t.points,i=t.path,o=t.pathRef;if((!r||!r.length)&&!i)return null;var l=r&&r.length?Mie(t):i;return U.createElement("path",bS({},ke(t,!1),_p(t),{className:Be("recharts-curve",n),d:l,ref:o}))},P1={exports:{}},D1,bk;function kie(){if(bk)return D1;bk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return D1=e,D1}var $1,xk;function Rie(){if(xk)return $1;xk=1;var e=kie();function t(){}function n(){}return n.resetWarningCache=t,$1=function(){function r(l,c,f,d,y,p){if(p!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},$1}var wk;function Pie(){return wk||(wk=1,P1.exports=Rie()()),P1.exports}var Die=Pie();const tt=nt(Die),{getOwnPropertyNames:$ie,getOwnPropertySymbols:qie}=Object,{hasOwnProperty:Lie}=Object.prototype;function q1(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function Vh(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:o}=i,l=o.get(n),c=o.get(r);if(l&&c)return l===r&&c===n;o.set(n,r),o.set(r,n);const f=e(n,r,i);return o.delete(n),o.delete(r),f}}function zie(e){return e!=null?e[Symbol.toStringTag]:void 0}function Sk(e){return $ie(e).concat(qie(e))}const Bie=Object.hasOwn||((e,t)=>Lie.call(e,t));function ns(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Iie="__v",Uie="__o",Hie="_owner",{getOwnPropertyDescriptor:_k,keys:Ak}=Object;function Vie(e,t){return e.byteLength===t.byteLength&&Xp(new Uint8Array(e),new Uint8Array(t))}function Gie(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Fie(e,t){return e.byteLength===t.byteLength&&Xp(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Yie(e,t){return ns(e.getTime(),t.getTime())}function Xie(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Kie(e,t){return e===t}function Ok(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.entries();let l,c,f=0;for(;(l=o.next())&&!l.done;){const d=t.entries();let y=!1,p=0;for(;(c=d.next())&&!c.done;){if(i[p]){p++;continue}const g=l.value,b=c.value;if(n.equals(g[0],b[0],f,p,e,t,n)&&n.equals(g[1],b[1],g[0],b[0],e,t,n)){y=i[p]=!0;break}p++}if(!y)return!1;f++}return!0}const Wie=ns;function Qie(e,t,n){const r=Ak(e);let i=r.length;if(Ak(t).length!==i)return!1;for(;i-- >0;)if(!_q(e,t,n,r[i]))return!1;return!0}function wc(e,t,n){const r=Sk(e);let i=r.length;if(Sk(t).length!==i)return!1;let o,l,c;for(;i-- >0;)if(o=r[i],!_q(e,t,n,o)||(l=_k(e,o),c=_k(t,o),(l||c)&&(!l||!c||l.configurable!==c.configurable||l.enumerable!==c.enumerable||l.writable!==c.writable)))return!1;return!0}function Zie(e,t){return ns(e.valueOf(),t.valueOf())}function Jie(e,t){return e.source===t.source&&e.flags===t.flags}function jk(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),o=e.values();let l,c;for(;(l=o.next())&&!l.done;){const f=t.values();let d=!1,y=0;for(;(c=f.next())&&!c.done;){if(!i[y]&&n.equals(l.value,c.value,l.value,c.value,e,t,n)){d=i[y]=!0;break}y++}if(!d)return!1}return!0}function Xp(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function eae(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function _q(e,t,n,r){return(r===Hie||r===Uie||r===Iie)&&(e.$$typeof||t.$$typeof)?!0:Bie(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const tae="[object ArrayBuffer]",nae="[object Arguments]",rae="[object Boolean]",iae="[object DataView]",aae="[object Date]",oae="[object Error]",sae="[object Map]",lae="[object Number]",uae="[object Object]",cae="[object RegExp]",fae="[object Set]",dae="[object String]",hae={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},pae="[object URL]",yae=Object.prototype.toString;function mae({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:o,areMapsEqual:l,areNumbersEqual:c,areObjectsEqual:f,arePrimitiveWrappersEqual:d,areRegExpsEqual:y,areSetsEqual:p,areTypedArraysEqual:g,areUrlsEqual:b,unknownTagComparators:_}){return function(x,A,j){if(x===A)return!0;if(x==null||A==null)return!1;const O=typeof x;if(O!==typeof A)return!1;if(O!=="object")return O==="number"?c(x,A,j):O==="function"?o(x,A,j):!1;const N=x.constructor;if(N!==A.constructor)return!1;if(N===Object)return f(x,A,j);if(Array.isArray(x))return t(x,A,j);if(N===Date)return r(x,A,j);if(N===RegExp)return y(x,A,j);if(N===Map)return l(x,A,j);if(N===Set)return p(x,A,j);const E=yae.call(x);if(E===aae)return r(x,A,j);if(E===cae)return y(x,A,j);if(E===sae)return l(x,A,j);if(E===fae)return p(x,A,j);if(E===uae)return typeof x.then!="function"&&typeof A.then!="function"&&f(x,A,j);if(E===pae)return b(x,A,j);if(E===oae)return i(x,A,j);if(E===nae)return f(x,A,j);if(hae[E])return g(x,A,j);if(E===tae)return e(x,A,j);if(E===iae)return n(x,A,j);if(E===rae||E===lae||E===dae)return d(x,A,j);if(_){let T=_[E];if(!T){const C=zie(x);C&&(T=_[C])}if(T)return T(x,A,j)}return!1}}function gae({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Vie,areArraysEqual:n?wc:Gie,areDataViewsEqual:Fie,areDatesEqual:Yie,areErrorsEqual:Xie,areFunctionsEqual:Kie,areMapsEqual:n?q1(Ok,wc):Ok,areNumbersEqual:Wie,areObjectsEqual:n?wc:Qie,arePrimitiveWrappersEqual:Zie,areRegExpsEqual:Jie,areSetsEqual:n?q1(jk,wc):jk,areTypedArraysEqual:n?q1(Xp,wc):Xp,areUrlsEqual:eae,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=Vh(r.areArraysEqual),o=Vh(r.areMapsEqual),l=Vh(r.areObjectsEqual),c=Vh(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return r}function vae(e){return function(t,n,r,i,o,l,c){return e(t,n,c)}}function bae({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(c,f){const{cache:d=e?new WeakMap:void 0,meta:y}=n();return t(c,f,{cache:d,equals:r,meta:y,strict:i})};if(e)return function(c,f){return t(c,f,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const o={cache:void 0,equals:r,meta:void 0,strict:i};return function(c,f){return t(c,f,o)}}const xae=Ya();Ya({strict:!0});Ya({circular:!0});Ya({circular:!0,strict:!0});Ya({createInternalComparator:()=>ns});Ya({strict:!0,createInternalComparator:()=>ns});Ya({circular:!0,createInternalComparator:()=>ns});Ya({circular:!0,createInternalComparator:()=>ns,strict:!0});function Ya(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=gae(e),l=mae(o),c=n?n(l):vae(l);return bae({circular:t,comparator:l,createState:r,equals:c,strict:i})}function wae(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function Ek(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):wae(i)};requestAnimationFrame(r)}function wS(e){"@babel/helpers - typeof";return wS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wS(e)}function Sae(e){return jae(e)||Oae(e)||Aae(e)||_ae()}function _ae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
495
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aae(e,t){if(e){if(typeof e=="string")return Nk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nk(e,t)}}function Nk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jae(e){if(Array.isArray(e))return e}function Eae(){var e={},t=function(){return null},n=!1,r=function i(o){if(!n){if(Array.isArray(o)){if(!o.length)return;var l=o,c=Sae(l),f=c[0],d=c.slice(1);if(typeof f=="number"){Ek(i.bind(null,d),f);return}i(f),Ek(i.bind(null,d));return}wS(o)==="object"&&(e=o,t(e)),typeof o=="function"&&o()}};return{stop:function(){n=!0},start:function(o){n=!1,r(o)},subscribe:function(o){return t=o,function(){t=function(){return null}}}}}function gf(e){"@babel/helpers - typeof";return gf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gf(e)}function Tk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ck(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tk(Object(n),!0).forEach(function(r){Aq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Aq(e,t,n){return t=Nae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nae(e){var t=Tae(e,"string");return gf(t)==="symbol"?t:String(t)}function Tae(e,t){if(gf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Cae=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},Mae=function(t){return t},kae=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Pc=function(t,n){return Object.keys(n).reduce(function(r,i){return Ck(Ck({},r),{},Aq({},i,t(i,n[i])))},{})},Mk=function(t,n,r){return t.map(function(i){return"".concat(kae(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Rae(e,t){return $ae(e)||Dae(e,t)||Oq(e,t)||Pae()}function Pae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
496
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function $ae(e){if(Array.isArray(e))return e}function qae(e){return Bae(e)||zae(e)||Oq(e)||Lae()}function Lae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
497
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oq(e,t){if(e){if(typeof e=="string")return SS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return SS(e,t)}}function zae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Bae(e){if(Array.isArray(e))return SS(e)}function SS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Kp=1e-4,jq=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},Eq=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},kk=function(t,n){return function(r){var i=jq(t,n);return Eq(i,r)}},Iae=function(t,n){return function(r){var i=jq(t,n),o=[].concat(qae(i.map(function(l,c){return l*c}).slice(1)),[0]);return Eq(o,r)}},Rk=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],o=n[1],l=n[2],c=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,o=0,l=1,c=1;break;case"ease":i=.25,o=.1,l=.25,c=1;break;case"ease-in":i=.42,o=0,l=1,c=1;break;case"ease-out":i=.42,o=0,l=.58,c=1;break;case"ease-in-out":i=0,o=0,l=.58,c=1;break;default:{var f=n[0].split("(");if(f[0]==="cubic-bezier"&&f[1].split(")")[0].split(",").length===4){var d=f[1].split(")")[0].split(",").map(function(x){return parseFloat(x)}),y=Rae(d,4);i=y[0],o=y[1],l=y[2],c=y[3]}}}var p=kk(i,l),g=kk(o,c),b=Iae(i,l),_=function(A){return A>1?1:A<0?0:A},S=function(A){for(var j=A>1?1:A,O=j,N=0;N<8;++N){var E=p(O)-j,T=b(O);if(Math.abs(E-j)<Kp||T<Kp)return g(O);O=_(O-E/T)}return g(O)};return S.isStepper=!1,S},Uae=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,l=t.dt,c=l===void 0?17:l,f=function(y,p,g){var b=-(y-p)*r,_=g*o,S=g+(b-_)*c/1e3,x=g*c/1e3+y;return Math.abs(x-p)<Kp&&Math.abs(S)<Kp?[p,0]:[x,S]};return f.isStepper=!0,f.dt=c,f},Hae=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Rk(i);case"spring":return Uae();default:if(i.split("(")[0]==="cubic-bezier")return Rk(i)}return typeof i=="function"?i:null};function vf(e){"@babel/helpers - typeof";return vf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vf(e)}function Pk(e){return Fae(e)||Gae(e)||Nq(e)||Vae()}function Vae(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
498
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Fae(e){if(Array.isArray(e))return AS(e)}function Dk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function on(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Dk(Object(n),!0).forEach(function(r){_S(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 _S(e,t,n){return t=Yae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yae(e){var t=Xae(e,"string");return vf(t)==="symbol"?t:String(t)}function Xae(e,t){if(vf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kae(e,t){return Zae(e)||Qae(e,t)||Nq(e,t)||Wae()}function Wae(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
499
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nq(e,t){if(e){if(typeof e=="string")return AS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AS(e,t)}}function AS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qae(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function Zae(e){if(Array.isArray(e))return e}var Wp=function(t,n,r){return t+(n-t)*r},OS=function(t){var n=t.from,r=t.to;return n!==r},Jae=function e(t,n,r){var i=Pc(function(o,l){if(OS(l)){var c=t(l.from,l.to,l.velocity),f=Kae(c,2),d=f[0],y=f[1];return on(on({},l),{},{from:d,velocity:y})}return l},n);return r<1?Pc(function(o,l){return OS(l)?on(on({},l),{},{velocity:Wp(l.velocity,i[o].velocity,r),from:Wp(l.from,i[o].from,r)}):l},n):e(t,i,r-1)};const eoe=(function(e,t,n,r,i){var o=Cae(e,t),l=o.reduce(function(x,A){return on(on({},x),{},_S({},A,[e[A],t[A]]))},{}),c=o.reduce(function(x,A){return on(on({},x),{},_S({},A,{from:e[A],velocity:0,to:t[A]}))},{}),f=-1,d,y,p=function(){return null},g=function(){return Pc(function(A,j){return j.from},c)},b=function(){return!Object.values(c).filter(OS).length},_=function(A){d||(d=A);var j=A-d,O=j/n.dt;c=Jae(n,c,O),i(on(on(on({},e),t),g())),d=A,b()||(f=requestAnimationFrame(p))},S=function(A){y||(y=A);var j=(A-y)/r,O=Pc(function(E,T){return Wp.apply(void 0,Pk(T).concat([n(j)]))},l);if(i(on(on(on({},e),t),O)),j<1)f=requestAnimationFrame(p);else{var N=Pc(function(E,T){return Wp.apply(void 0,Pk(T).concat([n(1)]))},l);i(on(on(on({},e),t),N))}};return p=n.isStepper?_:S,function(){return requestAnimationFrame(p),function(){cancelAnimationFrame(f)}}});function ql(e){"@babel/helpers - typeof";return ql=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ql(e)}var toe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function noe(e,t){if(e==null)return{};var n=roe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function roe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function L1(e){return soe(e)||ooe(e)||aoe(e)||ioe()}function ioe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
500
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aoe(e,t){if(e){if(typeof e=="string")return jS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jS(e,t)}}function ooe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function soe(e){if(Array.isArray(e))return jS(e)}function jS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$k(Object(n),!0).forEach(function(r){Tc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$k(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tc(e,t,n){return t=Tq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function loe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uoe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tq(r.key),r)}}function coe(e,t,n){return t&&uoe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tq(e){var t=foe(e,"string");return ql(t)==="symbol"?t:String(t)}function foe(e,t){if(ql(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ql(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function doe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ES(e,t)}function ES(e,t){return ES=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ES(e,t)}function hoe(e){var t=poe();return function(){var r=Qp(e),i;if(t){var o=Qp(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return NS(this,i)}}function NS(e,t){if(t&&(ql(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return TS(e)}function TS(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function poe(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qp(e){return Qp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Qp(e)}var zi=(function(e){doe(n,e);var t=hoe(n);function n(r,i){var o;loe(this,n),o=t.call(this,r,i);var l=o.props,c=l.isActive,f=l.attributeName,d=l.from,y=l.to,p=l.steps,g=l.children,b=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(TS(o)),o.changeStyle=o.changeStyle.bind(TS(o)),!c||b<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:y}),NS(o);if(p&&p.length)o.state={style:p[0].style};else if(d){if(typeof g=="function")return o.state={style:d},NS(o);o.state={style:f?Tc({},f,d):d}}else o.state={style:{}};return o}return coe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,l=i.canBegin;this.mounted=!0,!(!o||!l)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,l=o.isActive,c=o.canBegin,f=o.attributeName,d=o.shouldReAnimate,y=o.to,p=o.from,g=this.state.style;if(c){if(!l){var b={style:f?Tc({},f,y):y};this.state&&g&&(f&&g[f]!==y||!f&&g!==y)&&this.setState(b);return}if(!(xae(i.to,y)&&i.canBegin&&i.isActive)){var _=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var S=_||d?p:i.to;if(this.state&&g){var x={style:f?Tc({},f,S):S};(f&&g[f]!==S||!f&&g!==S)&&this.setState(x)}this.runAnimation(mr(mr({},this.props),{},{from:S,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,l=i.from,c=i.to,f=i.duration,d=i.easing,y=i.begin,p=i.onAnimationEnd,g=i.onAnimationStart,b=eoe(l,c,Hae(d),f,this.changeStyle),_=function(){o.stopJSAnimation=b()};this.manager.start([g,y,_,f,p])}},{key:"runStepAnimation",value:function(i){var o=this,l=i.steps,c=i.begin,f=i.onAnimationStart,d=l[0],y=d.style,p=d.duration,g=p===void 0?0:p,b=function(S,x,A){if(A===0)return S;var j=x.duration,O=x.easing,N=O===void 0?"ease":O,E=x.style,T=x.properties,C=x.onAnimationEnd,D=A>0?l[A-1]:x,q=T||Object.keys(E);if(typeof N=="function"||N==="spring")return[].concat(L1(S),[o.runJSAnimation.bind(o,{from:D.style,to:E,duration:j,easing:N}),j]);var F=Mk(q,j,N),L=mr(mr(mr({},D.style),E),{},{transition:F});return[].concat(L1(S),[L,j,C]).filter(Mae)};return this.manager.start([f].concat(L1(l.reduce(b,[y,Math.max(g,c)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Eae());var o=i.begin,l=i.duration,c=i.attributeName,f=i.to,d=i.easing,y=i.onAnimationStart,p=i.onAnimationEnd,g=i.steps,b=i.children,_=this.manager;if(this.unSubscribe=_.subscribe(this.handleStyleChange),typeof d=="function"||typeof b=="function"||d==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var S=c?Tc({},c,f):f,x=Mk(Object.keys(S),l,d);_.start([y,o,mr(mr({},S),{},{transition:x}),l,p])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var l=i.duration;i.attributeName,i.easing;var c=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var f=noe(i,toe),d=U.Children.count(o),y=this.state.style;if(typeof o=="function")return o(y);if(!c||d===0||l<=0)return o;var p=function(b){var _=b.props,S=_.style,x=S===void 0?{}:S,A=_.className,j=U.cloneElement(b,mr(mr({},f),{},{style:mr(mr({},x),y),className:A}));return j};return d===1?p(U.Children.only(o)):W.createElement("div",null,U.Children.map(o,function(g){return p(g)}))}}]),n})(U.PureComponent);zi.displayName="Animate";zi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};zi.propTypes={from:tt.oneOfType([tt.object,tt.string]),to:tt.oneOfType([tt.object,tt.string]),attributeName:tt.string,duration:tt.number,begin:tt.number,easing:tt.oneOfType([tt.string,tt.func]),steps:tt.arrayOf(tt.shape({duration:tt.number.isRequired,style:tt.object.isRequired,easing:tt.oneOfType([tt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),tt.func]),properties:tt.arrayOf("string"),onAnimationEnd:tt.func})),children:tt.oneOfType([tt.node,tt.func]),isActive:tt.bool,canBegin:tt.bool,onAnimationEnd:tt.func,shouldReAnimate:tt.bool,onAnimationStart:tt.func,onAnimationReStart:tt.func};function bf(e){"@babel/helpers - typeof";return bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bf(e)}function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zp.apply(this,arguments)}function yoe(e,t){return boe(e)||voe(e,t)||goe(e,t)||moe()}function moe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
501
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function goe(e,t){if(e){if(typeof e=="string")return qk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return qk(e,t)}}function qk(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function voe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function boe(e){if(Array.isArray(e))return e}function Lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zk(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){xoe(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 xoe(e,t,n){return t=woe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function woe(e){var t=Soe(e,"string");return bf(t)=="symbol"?t:t+""}function Soe(e,t){if(bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bk=function(t,n,r,i,o){var l=Math.min(Math.abs(r)/2,Math.abs(i)/2),c=i>=0?1:-1,f=r>=0?1:-1,d=i>=0&&r>=0||i<0&&r<0?1:0,y;if(l>0&&o instanceof Array){for(var p=[0,0,0,0],g=0,b=4;g<b;g++)p[g]=o[g]>l?l:o[g];y="M".concat(t,",").concat(n+c*p[0]),p[0]>0&&(y+="A ".concat(p[0],",").concat(p[0],",0,0,").concat(d,",").concat(t+f*p[0],",").concat(n)),y+="L ".concat(t+r-f*p[1],",").concat(n),p[1]>0&&(y+="A ".concat(p[1],",").concat(p[1],",0,0,").concat(d,`,
502
+ `).concat(t+r,",").concat(n+c*p[1])),y+="L ".concat(t+r,",").concat(n+i-c*p[2]),p[2]>0&&(y+="A ".concat(p[2],",").concat(p[2],",0,0,").concat(d,`,
503
+ `).concat(t+r-f*p[2],",").concat(n+i)),y+="L ".concat(t+f*p[3],",").concat(n+i),p[3]>0&&(y+="A ".concat(p[3],",").concat(p[3],",0,0,").concat(d,`,
504
+ `).concat(t,",").concat(n+i-c*p[3])),y+="Z"}else if(l>0&&o===+o&&o>0){var _=Math.min(l,o);y="M ".concat(t,",").concat(n+c*_,`
505
+ A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(t+f*_,",").concat(n,`
506
+ L `).concat(t+r-f*_,",").concat(n,`
507
+ A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(t+r,",").concat(n+c*_,`
508
+ L `).concat(t+r,",").concat(n+i-c*_,`
509
+ A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(t+r-f*_,",").concat(n+i,`
510
+ L `).concat(t+f*_,",").concat(n+i,`
511
+ A `).concat(_,",").concat(_,",0,0,").concat(d,",").concat(t,",").concat(n+i-c*_," Z")}else y="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return y},_oe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,l=n.y,c=n.width,f=n.height;if(Math.abs(c)>0&&Math.abs(f)>0){var d=Math.min(o,o+c),y=Math.max(o,o+c),p=Math.min(l,l+f),g=Math.max(l,l+f);return r>=d&&r<=y&&i>=p&&i<=g}return!1},Aoe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},D2=function(t){var n=zk(zk({},Aoe),t),r=U.useRef(),i=U.useState(-1),o=yoe(i,2),l=o[0],c=o[1];U.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var N=r.current.getTotalLength();N&&c(N)}catch{}},[]);var f=n.x,d=n.y,y=n.width,p=n.height,g=n.radius,b=n.className,_=n.animationEasing,S=n.animationDuration,x=n.animationBegin,A=n.isAnimationActive,j=n.isUpdateAnimationActive;if(f!==+f||d!==+d||y!==+y||p!==+p||y===0||p===0)return null;var O=Be("recharts-rectangle",b);return j?W.createElement(zi,{canBegin:l>0,from:{width:y,height:p,x:f,y:d},to:{width:y,height:p,x:f,y:d},duration:S,animationEasing:_,isActive:j},function(N){var E=N.width,T=N.height,C=N.x,D=N.y;return W.createElement(zi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:S,isActive:A,easing:_},W.createElement("path",Zp({},ke(n,!0),{className:O,d:Bk(C,D,E,T,g),ref:r})))}):W.createElement("path",Zp({},ke(n,!0),{className:O,d:Bk(f,d,y,p,g)}))},Ooe=["points","className","baseLinePoints","connectNulls"];function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},el.apply(this,arguments)}function joe(e,t){if(e==null)return{};var n=Eoe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Eoe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ik(e){return Moe(e)||Coe(e)||Toe(e)||Noe()}function Noe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
512
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Toe(e,t){if(e){if(typeof e=="string")return CS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CS(e,t)}}function Coe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Moe(e){if(Array.isArray(e))return CS(e)}function CS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Uk=function(t){return t&&t.x===+t.x&&t.y===+t.y},koe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){Uk(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),Uk(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Dc=function(t,n){var r=koe(t);n&&(r=[r.reduce(function(o,l){return[].concat(Ik(o),Ik(l))},[])]);var i=r.map(function(o){return o.reduce(function(l,c,f){return"".concat(l).concat(f===0?"M":"L").concat(c.x,",").concat(c.y)},"")}).join("");return r.length===1?"".concat(i,"Z"):i},Roe=function(t,n,r){var i=Dc(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Dc(n.reverse(),r).slice(1))},Poe=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,l=joe(t,Ooe);if(!n||!n.length)return null;var c=Be("recharts-polygon",r);if(i&&i.length){var f=l.stroke&&l.stroke!=="none",d=Roe(n,i,o);return W.createElement("g",{className:c},W.createElement("path",el({},ke(l,!0),{fill:d.slice(-1)==="Z"?l.fill:"none",stroke:"none",d})),f?W.createElement("path",el({},ke(l,!0),{fill:"none",d:Dc(n,o)})):null,f?W.createElement("path",el({},ke(l,!0),{fill:"none",d:Dc(i,o)})):null)}var y=Dc(n,o);return W.createElement("path",el({},ke(l,!0),{fill:y.slice(-1)==="Z"?l.fill:"none",className:c,d:y}))};function MS(){return MS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},MS.apply(this,arguments)}var $2=function(t){var n=t.cx,r=t.cy,i=t.r,o=t.className,l=Be("recharts-dot",o);return n===+n&&r===+r&&i===+i?U.createElement("circle",MS({},ke(t,!1),_p(t),{className:l,cx:n,cy:r,r:i})):null};function xf(e){"@babel/helpers - typeof";return xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xf(e)}var Doe=["x","y","top","left","width","height","className"];function kS(){return kS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kS.apply(this,arguments)}function Hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hk(Object(n),!0).forEach(function(r){qoe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qoe(e,t,n){return t=Loe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Loe(e){var t=zoe(e,"string");return xf(t)=="symbol"?t:t+""}function zoe(e,t){if(xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Boe(e,t){if(e==null)return{};var n=Ioe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ioe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Uoe=function(t,n,r,i,o,l){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(l,",").concat(n,"h").concat(r)},Hoe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,l=t.top,c=l===void 0?0:l,f=t.left,d=f===void 0?0:f,y=t.width,p=y===void 0?0:y,g=t.height,b=g===void 0?0:g,_=t.className,S=Boe(t,Doe),x=$oe({x:r,y:o,top:c,left:d,width:p,height:b},S);return!ge(r)||!ge(o)||!ge(p)||!ge(b)||!ge(c)||!ge(d)?null:W.createElement("path",kS({},ke(x,!0),{className:Be("recharts-cross",_),d:Uoe(r,o,p,b,c,d)}))},z1,Vk;function Voe(){if(Vk)return z1;Vk=1;var e=Jy(),t=V$(),n=Qr();function r(i,o){return i&&i.length?e(i,n(o,2),t):void 0}return z1=r,z1}var Goe=Voe();const Foe=nt(Goe);var B1,Gk;function Yoe(){if(Gk)return B1;Gk=1;var e=Jy(),t=Qr(),n=G$();function r(i,o){return i&&i.length?e(i,t(o,2),n):void 0}return B1=r,B1}var Xoe=Yoe();const Koe=nt(Xoe);var Woe=["cx","cy","angle","ticks","axisLine"],Qoe=["ticks","tick","angle","tickFormatter","stroke"];function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function $c(){return $c=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$c.apply(this,arguments)}function Fk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xo(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){om(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 Yk(e,t){if(e==null)return{};var n=Zoe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Zoe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Joe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Mq(r.key),r)}}function ese(e,t,n){return t&&Xk(e.prototype,t),n&&Xk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tse(e,t,n){return t=Jp(t),nse(e,Cq()?Reflect.construct(t,n||[],Jp(e).constructor):t.apply(e,n))}function nse(e,t){if(t&&(Ll(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rse(e)}function rse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Cq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Cq=function(){return!!e})()}function Jp(e){return Jp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jp(e)}function ise(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RS(e,t)}function RS(e,t){return RS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},RS(e,t)}function om(e,t,n){return t=Mq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mq(e){var t=ase(e,"string");return Ll(t)=="symbol"?t:t+""}function ase(e,t){if(Ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sm=(function(e){function t(){return Joe(this,t),tse(this,t,arguments)}return ise(t,e),ese(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,o=this.props,l=o.angle,c=o.cx,f=o.cy;return pt(c,f,i,l)}},{key:"getTickTextAnchor",value:function(){var r=this.props.orientation,i;switch(r){case"left":i="end";break;case"right":i="start";break;default:i="middle";break}return i}},{key:"getViewBox",value:function(){var r=this.props,i=r.cx,o=r.cy,l=r.angle,c=r.ticks,f=Foe(c,function(y){return y.coordinate||0}),d=Koe(c,function(y){return y.coordinate||0});return{cx:i,cy:o,startAngle:l,endAngle:l,innerRadius:d.coordinate||0,outerRadius:f.coordinate||0}}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,l=r.angle,c=r.ticks,f=r.axisLine,d=Yk(r,Woe),y=c.reduce(function(_,S){return[Math.min(_[0],S.coordinate),Math.max(_[1],S.coordinate)]},[1/0,-1/0]),p=pt(i,o,y[0],l),g=pt(i,o,y[1],l),b=xo(xo(xo({},ke(d,!1)),{},{fill:"none"},ke(f,!1)),{},{x1:p.x,y1:p.y,x2:g.x,y2:g.y});return W.createElement("line",$c({className:"recharts-polar-radius-axis-line"},b))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,l=i.tick,c=i.angle,f=i.tickFormatter,d=i.stroke,y=Yk(i,Qoe),p=this.getTickTextAnchor(),g=ke(y,!1),b=ke(l,!1),_=o.map(function(S,x){var A=r.getTickValueCoord(S),j=xo(xo(xo(xo({textAnchor:p,transform:"rotate(".concat(90-c,", ").concat(A.x,", ").concat(A.y,")")},g),{},{stroke:"none",fill:d},b),{},{index:x},A),{},{payload:S});return W.createElement(at,$c({className:Be("recharts-polar-radius-axis-tick",bq(l)),key:"tick-".concat(S.coordinate)},Fo(r.props,S,x)),t.renderTickItem(l,j,f?f(S.value,x):S.value))});return W.createElement(at,{className:"recharts-polar-radius-axis-ticks"},_)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.axisLine,l=r.tick;return!i||!i.length?null:W.createElement(at,{className:Be("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),l&&this.renderTicks(),Zt.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(r,i,o){var l;return W.isValidElement(r)?l=W.cloneElement(r,i):Pe(r)?l=r(i):l=W.createElement(Yo,$c({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),l}}])})(U.PureComponent);om(sm,"displayName","PolarRadiusAxis");om(sm,"axisType","radiusAxis");om(sm,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function Oo(){return Oo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oo.apply(this,arguments)}function Kk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wo(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){lm(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 ose(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wk(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Rq(r.key),r)}}function sse(e,t,n){return t&&Wk(e.prototype,t),n&&Wk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lse(e,t,n){return t=ey(t),use(e,kq()?Reflect.construct(t,n||[],ey(e).constructor):t.apply(e,n))}function use(e,t){if(t&&(zl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cse(e)}function cse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kq=function(){return!!e})()}function ey(e){return ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ey(e)}function fse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PS(e,t)}function PS(e,t){return PS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},PS(e,t)}function lm(e,t,n){return t=Rq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rq(e){var t=dse(e,"string");return zl(t)=="symbol"?t:t+""}function dse(e,t){if(zl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hse=Math.PI/180,Qk=1e-5,um=(function(e){function t(){return ose(this,t),lse(this,t,arguments)}return fse(t,e),sse(t,[{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.cx,l=i.cy,c=i.radius,f=i.orientation,d=i.tickSize,y=d||8,p=pt(o,l,c,r.coordinate),g=pt(o,l,c+(f==="inner"?-1:1)*y,r.coordinate);return{x1:p.x,y1:p.y,x2:g.x,y2:g.y}}},{key:"getTickTextAnchor",value:function(r){var i=this.props.orientation,o=Math.cos(-r.coordinate*hse),l;return o>Qk?l=i==="outer"?"start":"end":o<-Qk?l=i==="outer"?"end":"start":l="middle",l}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.cx,o=r.cy,l=r.radius,c=r.axisLine,f=r.axisLineType,d=wo(wo({},ke(this.props,!1)),{},{fill:"none"},ke(c,!1));if(f==="circle")return W.createElement($2,Oo({className:"recharts-polar-angle-axis-line"},d,{cx:i,cy:o,r:l}));var y=this.props.ticks,p=y.map(function(g){return pt(i,o,l,g.coordinate)});return W.createElement(Poe,Oo({className:"recharts-polar-angle-axis-line"},d,{points:p}))}},{key:"renderTicks",value:function(){var r=this,i=this.props,o=i.ticks,l=i.tick,c=i.tickLine,f=i.tickFormatter,d=i.stroke,y=ke(this.props,!1),p=ke(l,!1),g=wo(wo({},y),{},{fill:"none"},ke(c,!1)),b=o.map(function(_,S){var x=r.getTickLineCoord(_),A=r.getTickTextAnchor(_),j=wo(wo(wo({textAnchor:A},y),{},{stroke:"none",fill:d},p),{},{index:S,payload:_,x:x.x2,y:x.y2});return W.createElement(at,Oo({className:Be("recharts-polar-angle-axis-tick",bq(l)),key:"tick-".concat(_.coordinate)},Fo(r.props,_,S)),c&&W.createElement("line",Oo({className:"recharts-polar-angle-axis-tick-line"},g,x)),l&&t.renderTickItem(l,j,f?f(_.value,S):_.value))});return W.createElement(at,{className:"recharts-polar-angle-axis-ticks"},b)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.radius,l=r.axisLine;return o<=0||!i||!i.length?null:W.createElement(at,{className:Be("recharts-polar-angle-axis",this.props.className)},l&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,i,o){var l;return W.isValidElement(r)?l=W.cloneElement(r,i):Pe(r)?l=r(i):l=W.createElement(Yo,Oo({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),l}}])})(U.PureComponent);lm(um,"displayName","PolarAngleAxis");lm(um,"axisType","angleAxis");lm(um,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var I1,Zk;function pse(){if(Zk)return I1;Zk=1;var e=Y8(),t=e(Object.getPrototypeOf,Object);return I1=t,I1}var U1,Jk;function yse(){if(Jk)return U1;Jk=1;var e=Ui(),t=pse(),n=Hi(),r="[object Object]",i=Function.prototype,o=Object.prototype,l=i.toString,c=o.hasOwnProperty,f=l.call(Object);function d(y){if(!n(y)||e(y)!=r)return!1;var p=t(y);if(p===null)return!0;var g=c.call(p,"constructor")&&p.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==f}return U1=d,U1}var mse=yse();const gse=nt(mse);var H1,eR;function vse(){if(eR)return H1;eR=1;var e=Ui(),t=Hi(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return H1=r,H1}var bse=vse();const xse=nt(bse);function wf(e){"@babel/helpers - typeof";return wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wf(e)}function 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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ty.apply(this,arguments)}function wse(e,t){return Ose(e)||Ase(e,t)||_se(e,t)||Sse()}function Sse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
513
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _se(e,t){if(e){if(typeof e=="string")return tR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tR(e,t)}}function tR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ase(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function Ose(e){if(Array.isArray(e))return e}function nR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nR(Object(n),!0).forEach(function(r){jse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jse(e,t,n){return t=Ese(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ese(e){var t=Nse(e,"string");return wf(t)=="symbol"?t:t+""}function Nse(e,t){if(wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iR=function(t,n,r,i,o){var l=r-i,c;return c="M ".concat(t,",").concat(n),c+="L ".concat(t+r,",").concat(n),c+="L ".concat(t+r-l/2,",").concat(n+o),c+="L ".concat(t+r-l/2-i,",").concat(n+o),c+="L ".concat(t,",").concat(n," Z"),c},Tse={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Cse=function(t){var n=rR(rR({},Tse),t),r=U.useRef(),i=U.useState(-1),o=wse(i,2),l=o[0],c=o[1];U.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&c(O)}catch{}},[]);var f=n.x,d=n.y,y=n.upperWidth,p=n.lowerWidth,g=n.height,b=n.className,_=n.animationEasing,S=n.animationDuration,x=n.animationBegin,A=n.isUpdateAnimationActive;if(f!==+f||d!==+d||y!==+y||p!==+p||g!==+g||y===0&&p===0||g===0)return null;var j=Be("recharts-trapezoid",b);return A?W.createElement(zi,{canBegin:l>0,from:{upperWidth:0,lowerWidth:0,height:g,x:f,y:d},to:{upperWidth:y,lowerWidth:p,height:g,x:f,y:d},duration:S,animationEasing:_,isActive:A},function(O){var N=O.upperWidth,E=O.lowerWidth,T=O.height,C=O.x,D=O.y;return W.createElement(zi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:x,duration:S,easing:_},W.createElement("path",ty({},ke(n,!0),{className:j,d:iR(C,D,N,E,T),ref:r})))}):W.createElement("g",null,W.createElement("path",ty({},ke(n,!0),{className:j,d:iR(f,d,y,p,g)})))},Mse=["option","shapeType","propTransformer","activeClassName","isActive"];function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}function kse(e,t){if(e==null)return{};var n=Rse(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rse(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function aR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ny(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aR(Object(n),!0).forEach(function(r){Pse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pse(e,t,n){return t=Dse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dse(e){var t=$se(e,"string");return Sf(t)=="symbol"?t:t+""}function $se(e,t){if(Sf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Sf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qse(e,t){return ny(ny({},t),e)}function Lse(e,t){return e==="symbols"}function oR(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return W.createElement(D2,n);case"trapezoid":return W.createElement(Cse,n);case"sector":return W.createElement(Sq,n);case"symbols":if(Lse(t))return W.createElement(r2,n);break;default:return null}}function zse(e){return U.isValidElement(e)?e.props:e}function Pq(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?qse:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,c=e.isActive,f=kse(e,Mse),d;if(U.isValidElement(t))d=U.cloneElement(t,ny(ny({},f),zse(t)));else if(Pe(t))d=t(f);else if(gse(t)&&!xse(t)){var y=i(t,f);d=W.createElement(oR,{shapeType:n,elementProps:y})}else{var p=f;d=W.createElement(oR,{shapeType:n,elementProps:p})}return c?W.createElement(at,{className:l},d):d}function cm(e,t){return t!=null&&"trapezoids"in e.props}function fm(e,t){return t!=null&&"sectors"in e.props}function _f(e,t){return t!=null&&"points"in e.props}function Bse(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,o=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&o}function Ise(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Use(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Hse(e,t){var n;return cm(e,t)?n=Bse:fm(e,t)?n=Ise:_f(e,t)&&(n=Use),n}function Vse(e,t){var n;return cm(e,t)?n="trapezoids":fm(e,t)?n="sectors":_f(e,t)&&(n="points"),n}function Gse(e,t){if(cm(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(fm(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return _f(e,t)?t.payload:{}}function Fse(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Vse(n,t),o=Gse(n,t),l=r.filter(function(f,d){var y=nm(o,f),p=n.props[i].filter(function(_){var S=Hse(n,t);return S(_,t)}),g=n.props[i].indexOf(p[p.length-1]),b=d===g;return y&&b}),c=r.indexOf(l[l.length-1]);return c}var op;function Bl(e){"@babel/helpers - typeof";return Bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(e)}function tl(){return tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tl.apply(this,arguments)}function sR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sR(Object(n),!0).forEach(function(r){or(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$q(r.key),r)}}function Xse(e,t,n){return t&&lR(e.prototype,t),n&&lR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kse(e,t,n){return t=ry(t),Wse(e,Dq()?Reflect.construct(t,n||[],ry(e).constructor):t.apply(e,n))}function Wse(e,t){if(t&&(Bl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qse(e)}function Qse(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dq=function(){return!!e})()}function ry(e){return ry=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ry(e)}function Zse(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&DS(e,t)}function DS(e,t){return DS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},DS(e,t)}function or(e,t,n){return t=$q(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $q(e){var t=Jse(e,"string");return Bl(t)=="symbol"?t:t+""}function Jse(e,t){if(Bl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gi=(function(e){function t(n){var r;return Yse(this,t),r=Kse(this,t,[n]),or(r,"pieRef",null),or(r,"sectorRefs",[]),or(r,"id",Ff("recharts-pie-")),or(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Pe(i)&&i()}),or(r,"handleAnimationStart",function(){var i=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),Pe(i)&&i()}),r.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},r}return Zse(t,e),Xse(t,[{key:"isActiveIndex",value:function(r){var i=this.props.activeIndex;return Array.isArray(i)?i.indexOf(r)!==-1:r===i}},{key:"hasActiveIndex",value:function(){var r=this.props.activeIndex;return Array.isArray(r)?r.length!==0:r||r===0}},{key:"renderLabels",value:function(r){var i=this.props.isAnimationActive;if(i&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.label,c=o.labelLine,f=o.dataKey,d=o.valueKey,y=ke(this.props,!1),p=ke(l,!1),g=ke(c,!1),b=l&&l.offsetRadius||20,_=r.map(function(S,x){var A=(S.startAngle+S.endAngle)/2,j=pt(S.cx,S.cy,S.outerRadius+b,A),O=dt(dt(dt(dt({},y),S),{},{stroke:"none"},p),{},{index:x,textAnchor:t.getTextAnchor(j.x,S.cx)},j),N=dt(dt(dt(dt({},y),S),{},{fill:"none",stroke:S.fill},g),{},{index:x,points:[pt(S.cx,S.cy,S.outerRadius,A),j]}),E=f;return Ie(f)&&Ie(d)?E="value":Ie(f)&&(E=d),W.createElement(at,{key:"label-".concat(S.startAngle,"-").concat(S.endAngle,"-").concat(S.midAngle,"-").concat(x)},c&&t.renderLabelLineItem(c,N,"line"),t.renderLabelItem(l,O,hn(S,E)))});return W.createElement(at,{className:"recharts-pie-labels"},_)}},{key:"renderSectorsStatically",value:function(r){var i=this,o=this.props,l=o.activeShape,c=o.blendStroke,f=o.inactiveShape;return r.map(function(d,y){if((d==null?void 0:d.startAngle)===0&&(d==null?void 0:d.endAngle)===0&&r.length!==1)return null;var p=i.isActiveIndex(y),g=f&&i.hasActiveIndex()?f:null,b=p?l:g,_=dt(dt({},d),{},{stroke:c?d.fill:d.stroke,tabIndex:-1});return W.createElement(at,tl({ref:function(x){x&&!i.sectorRefs.includes(x)&&i.sectorRefs.push(x)},tabIndex:-1,className:"recharts-pie-sector"},Fo(i.props,d,y),{key:"sector-".concat(d==null?void 0:d.startAngle,"-").concat(d==null?void 0:d.endAngle,"-").concat(d.midAngle,"-").concat(y)}),W.createElement(Pq,tl({option:b,isActive:p,shapeType:"sector"},_)))})}},{key:"renderSectorsWithAnimation",value:function(){var r=this,i=this.props,o=i.sectors,l=i.isAnimationActive,c=i.animationBegin,f=i.animationDuration,d=i.animationEasing,y=i.animationId,p=this.state,g=p.prevSectors,b=p.prevIsAnimationActive;return W.createElement(zi,{begin:c,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"pie-".concat(y,"-").concat(b),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(_){var S=_.t,x=[],A=o&&o[0],j=A.startAngle;return o.forEach(function(O,N){var E=g&&g[N],T=N>0?Gn(O,"paddingAngle",0):0;if(E){var C=Ta(E.endAngle-E.startAngle,O.endAngle-O.startAngle),D=dt(dt({},O),{},{startAngle:j+T,endAngle:j+C(S)+T});x.push(D),j=D.endAngle}else{var q=O.endAngle,F=O.startAngle,L=Ta(0,q-F),P=L(S),Y=dt(dt({},O),{},{startAngle:j+T,endAngle:j+P+T});x.push(Y),j=Y.endAngle}}),W.createElement(at,null,r.renderSectorsStatically(x))})}},{key:"attachKeyboardHandlers",value:function(r){var i=this;r.onkeydown=function(o){if(!o.altKey)switch(o.key){case"ArrowLeft":{var l=++i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[l].focus(),i.setState({sectorToFocus:l});break}case"ArrowRight":{var c=--i.state.sectorToFocus<0?i.sectorRefs.length-1:i.state.sectorToFocus%i.sectorRefs.length;i.sectorRefs[c].focus(),i.setState({sectorToFocus:c});break}case"Escape":{i.sectorRefs[i.state.sectorToFocus].blur(),i.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,i=r.sectors,o=r.isAnimationActive,l=this.state.prevSectors;return o&&i&&i.length&&(!l||!nm(l,i))?this.renderSectorsWithAnimation():this.renderSectorsStatically(i)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,i=this.props,o=i.hide,l=i.sectors,c=i.className,f=i.label,d=i.cx,y=i.cy,p=i.innerRadius,g=i.outerRadius,b=i.isAnimationActive,_=this.state.isAnimationFinished;if(o||!l||!l.length||!ge(d)||!ge(y)||!ge(p)||!ge(g))return null;var S=Be("recharts-pie",c);return W.createElement(at,{tabIndex:this.props.rootTabIndex,className:S,ref:function(A){r.pieRef=A}},this.renderSectors(),f&&this.renderLabels(l),Zt.renderCallByParent(this.props,null,!1),(!b||_)&&Ha.renderCallByParent(this.props,l,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return i.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:i.curSectors,isAnimationFinished:!0}:r.sectors!==i.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,i){return r>i?"start":r<i?"end":"middle"}},{key:"renderLabelLineItem",value:function(r,i,o){if(W.isValidElement(r))return W.cloneElement(r,i);if(Pe(r))return r(i);var l=Be("recharts-pie-label-line",typeof r!="boolean"?r.className:"");return W.createElement(xS,tl({},i,{key:o,type:"linear",className:l}))}},{key:"renderLabelItem",value:function(r,i,o){if(W.isValidElement(r))return W.cloneElement(r,i);var l=o;if(Pe(r)&&(l=r(i),W.isValidElement(l)))return l;var c=Be("recharts-pie-label-text",typeof r!="boolean"&&!Pe(r)?r.className:"");return W.createElement(Yo,tl({},i,{alignmentBaseline:"middle",className:c}),l)}}])})(U.PureComponent);op=Gi;or(Gi,"displayName","Pie");or(Gi,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!lu.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});or(Gi,"parseDeltaAngle",function(e,t){var n=xn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});or(Gi,"getRealPieData",function(e){var t=e.data,n=e.children,r=ke(e,!1),i=lr(n,tf);return t&&t.length?t.map(function(o,l){return dt(dt(dt({payload:o},r),o),i&&i[l]&&i[l].props)}):i&&i.length?i.map(function(o){return dt(dt({},r),o.props)}):[]});or(Gi,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,o=t.height,l=vq(i,o),c=r+wn(e.cx,i,i/2),f=n+wn(e.cy,o,o/2),d=wn(e.innerRadius,l,0),y=wn(e.outerRadius,l,l*.8),p=e.maxRadius||Math.sqrt(i*i+o*o)/2;return{cx:c,cy:f,innerRadius:d,outerRadius:y,maxRadius:p}});or(Gi,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?dt(dt({},t.type.defaultProps),t.props):t.props,i=op.getRealPieData(r);if(!i||!i.length)return null;var o=r.cornerRadius,l=r.startAngle,c=r.endAngle,f=r.paddingAngle,d=r.dataKey,y=r.nameKey,p=r.valueKey,g=r.tooltipType,b=Math.abs(r.minAngle),_=op.parseCoordinateOfPie(r,n),S=op.parseDeltaAngle(l,c),x=Math.abs(S),A=d;Ie(d)&&Ie(p)?(Nr(!1,`Use "dataKey" to specify the value of pie,
514
+ the props "valueKey" will be deprecated in 1.1.0`),A="value"):Ie(d)&&(Nr(!1,`Use "dataKey" to specify the value of pie,
515
+ the props "valueKey" will be deprecated in 1.1.0`),A=p);var j=i.filter(function(D){return hn(D,A,0)!==0}).length,O=(x>=360?j:j-1)*f,N=x-j*b-O,E=i.reduce(function(D,q){var F=hn(q,A,0);return D+(ge(F)?F:0)},0),T;if(E>0){var C;T=i.map(function(D,q){var F=hn(D,A,0),L=hn(D,y,q),P=(ge(F)?F:0)/E,Y;q?Y=C.endAngle+xn(S)*f*(F!==0?1:0):Y=l;var R=Y+xn(S)*((F!==0?b:0)+P*N),$=(Y+R)/2,k=(_.innerRadius+_.outerRadius)/2,I=[{name:L,value:F,payload:D,dataKey:A,type:g}],H=pt(_.cx,_.cy,k,$);return C=dt(dt(dt({percent:P,cornerRadius:o,name:L,tooltipPayload:I,midAngle:$,middleRadius:k,tooltipPosition:H},D),_),{},{value:hn(D,A),startAngle:Y,endAngle:R,payload:D,paddingAngle:xn(S)*f}),C})}return dt(dt({},_),{},{sectors:T,data:i})});var V1,uR;function ele(){if(uR)return V1;uR=1;var e=Math.ceil,t=Math.max;function n(r,i,o,l){for(var c=-1,f=t(e((i-r)/(o||1)),0),d=Array(f);f--;)d[l?f:++c]=r,r+=o;return d}return V1=n,V1}var G1,cR;function qq(){if(cR)return G1;cR=1;var e=u$(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return G1=r,G1}var F1,fR;function tle(){if(fR)return F1;fR=1;var e=ele(),t=Fy(),n=qq();function r(i){return function(o,l,c){return c&&typeof c!="number"&&t(o,l,c)&&(l=c=void 0),o=n(o),l===void 0?(l=o,o=0):l=n(l),c=c===void 0?o<l?1:-1:n(c),e(o,l,c,i)}}return F1=r,F1}var Y1,dR;function nle(){if(dR)return Y1;dR=1;var e=tle(),t=e();return Y1=t,Y1}var rle=nle();const iy=nt(rle);function Af(e){"@babel/helpers - typeof";return Af=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Af(e)}function hR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hR(Object(n),!0).forEach(function(r){Lq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lq(e,t,n){return t=ile(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ile(e){var t=ale(e,"string");return Af(t)=="symbol"?t:t+""}function ale(e,t){if(Af(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Af(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ole=["Webkit","Moz","O","ms"],sle=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=ole.reduce(function(o,l){return pR(pR({},o),{},Lq({},l+r,n))},{});return i[t]=n,i};function Il(e){"@babel/helpers - typeof";return Il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ay.apply(this,arguments)}function yR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yR(Object(n),!0).forEach(function(r){Bn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Bq(r.key),r)}}function ule(e,t,n){return t&&mR(e.prototype,t),n&&mR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cle(e,t,n){return t=oy(t),fle(e,zq()?Reflect.construct(t,n||[],oy(e).constructor):t.apply(e,n))}function fle(e,t){if(t&&(Il(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dle(e)}function dle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zq=function(){return!!e})()}function oy(e){return oy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oy(e)}function hle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$S(e,t)}function $S(e,t){return $S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$S(e,t)}function Bn(e,t,n){return t=Bq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bq(e){var t=ple(e,"string");return Il(t)=="symbol"?t:t+""}function ple(e,t){if(Il(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Il(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yle=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,o=t.x,l=t.width,c=t.travellerWidth;if(!n||!n.length)return{};var f=n.length,d=kc().domain(iy(0,f)).range([o,o+l-c]),y=d.domain().map(function(p){return d(p)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:d(r),endX:d(i),scale:d,scaleValues:y}},gR=function(t){return t.changedTouches&&!!t.changedTouches.length},Ul=(function(e){function t(n){var r;return lle(this,t),r=cle(this,t,[n]),Bn(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Bn(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Bn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,l=i.onDragEnd,c=i.startIndex;l==null||l({endIndex:o,startIndex:c})}),r.detachDragEndListener()}),Bn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Bn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Bn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Bn(r,"handleSlideDragStart",function(i){var o=gR(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return hle(t,e),ule(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,l=this.state.scaleValues,c=this.props,f=c.gap,d=c.data,y=d.length-1,p=Math.min(i,o),g=Math.max(i,o),b=t.getIndexInRange(l,p),_=t.getIndexInRange(l,g);return{startIndex:b-b%f,endIndex:_===y?y:_-_%f}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,l=i.tickFormatter,c=i.dataKey,f=hn(o[r],c,r);return Pe(l)?l(f,r):f}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,l=i.startX,c=i.endX,f=this.props,d=f.x,y=f.width,p=f.travellerWidth,g=f.startIndex,b=f.endIndex,_=f.onChange,S=r.pageX-o;S>0?S=Math.min(S,d+y-p-c,d+y-p-l):S<0&&(S=Math.max(S,d-l,d-c));var x=this.getIndex({startX:l+S,endX:c+S});(x.startIndex!==g||x.endIndex!==b)&&_&&_(x),this.setState({startX:l+S,endX:c+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=gR(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,l=i.movingTravellerId,c=i.endX,f=i.startX,d=this.state[l],y=this.props,p=y.x,g=y.width,b=y.travellerWidth,_=y.onChange,S=y.gap,x=y.data,A={startX:this.state.startX,endX:this.state.endX},j=r.pageX-o;j>0?j=Math.min(j,p+g-b-d):j<0&&(j=Math.max(j,p-d)),A[l]=d+j;var O=this.getIndex(A),N=O.startIndex,E=O.endIndex,T=function(){var D=x.length-1;return l==="startX"&&(c>f?N%S===0:E%S===0)||c<f&&E===D||l==="endX"&&(c>f?E%S===0:N%S===0)||c>f&&E===D};this.setState(Bn(Bn({},l,d+j),"brushMoveStartX",r.pageX),function(){_&&T()&&_(O)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,l=this.state,c=l.scaleValues,f=l.startX,d=l.endX,y=this.state[i],p=c.indexOf(y);if(p!==-1){var g=p+r;if(!(g===-1||g>=c.length)){var b=c[g];i==="startX"&&b>=d||i==="endX"&&b<=f||this.setState(Bn({},i,b),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,c=r.height,f=r.fill,d=r.stroke;return W.createElement("rect",{stroke:d,fill:f,x:i,y:o,width:l,height:c})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,c=r.height,f=r.data,d=r.children,y=r.padding,p=U.Children.only(d);return p?W.cloneElement(p,{x:i,y:o,width:l,height:c,margin:y,compact:!0,data:f}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,l,c=this,f=this.props,d=f.y,y=f.travellerWidth,p=f.height,g=f.traveller,b=f.ariaLabel,_=f.data,S=f.startIndex,x=f.endIndex,A=Math.max(r,this.props.x),j=X1(X1({},ke(this.props,!1)),{},{x:A,y:d,width:y,height:p}),O=b||"Min value: ".concat((o=_[S])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=_[x])===null||l===void 0?void 0:l.name);return W.createElement(at,{tabIndex:0,role:"slider","aria-label":O,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),c.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){c.setState({isTravellerFocused:!0})},onBlur:function(){c.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,j))}},{key:"renderSlide",value:function(r,i){var o=this.props,l=o.y,c=o.height,f=o.stroke,d=o.travellerWidth,y=Math.min(r,i)+d,p=Math.max(Math.abs(i-r)-d,0);return W.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:f,fillOpacity:.2,x:y,y:l,width:p,height:c})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,l=r.y,c=r.height,f=r.travellerWidth,d=r.stroke,y=this.state,p=y.startX,g=y.endX,b=5,_={pointerEvents:"none",fill:d};return W.createElement(at,{className:"recharts-brush-texts"},W.createElement(Yo,ay({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,g)-b,y:l+c/2},_),this.getTextOfTick(i)),W.createElement(Yo,ay({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,g)+f+b,y:l+c/2},_),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,l=r.children,c=r.x,f=r.y,d=r.width,y=r.height,p=r.alwaysShowText,g=this.state,b=g.startX,_=g.endX,S=g.isTextActive,x=g.isSlideMoving,A=g.isTravellerMoving,j=g.isTravellerFocused;if(!i||!i.length||!ge(c)||!ge(f)||!ge(d)||!ge(y)||d<=0||y<=0)return null;var O=Be("recharts-brush",o),N=W.Children.count(l)===1,E=sle("userSelect","none");return W.createElement(at,{className:O,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),N&&this.renderPanorama(),this.renderSlide(b,_),this.renderTravellerLayer(b,"startX"),this.renderTravellerLayer(_,"endX"),(S||x||A||j||p)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,l=r.width,c=r.height,f=r.stroke,d=Math.floor(o+c/2)-1;return W.createElement(W.Fragment,null,W.createElement("rect",{x:i,y:o,width:l,height:c,fill:f,stroke:"none"}),W.createElement("line",{x1:i+1,y1:d,x2:i+l-1,y2:d,fill:"none",stroke:"#fff"}),W.createElement("line",{x1:i+1,y1:d+2,x2:i+l-1,y2:d+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return W.isValidElement(r)?o=W.cloneElement(r,i):Pe(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,l=r.width,c=r.x,f=r.travellerWidth,d=r.updateId,y=r.startIndex,p=r.endIndex;if(o!==i.prevData||d!==i.prevUpdateId)return X1({prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,prevWidth:l},o&&o.length?yle({data:o,width:l,x:c,travellerWidth:f,startIndex:y,endIndex:p}):{scale:null,scaleValues:null});if(i.scale&&(l!==i.prevWidth||c!==i.prevX||f!==i.prevTravellerWidth)){i.scale.range([c,c+l-f]);var g=i.scale.domain().map(function(b){return i.scale(b)});return{prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,prevWidth:l,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:g}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,l=0,c=o-1;c-l>1;){var f=Math.floor((l+c)/2);r[f]>i?c=f:l=f}return i>=r[c]?c:l}}])})(U.PureComponent);Bn(Ul,"displayName","Brush");Bn(Ul,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var K1,vR;function mle(){if(vR)return K1;vR=1;var e=c2();function t(n,r){var i;return e(n,function(o,l,c){return i=r(o,l,c),!i}),!!i}return K1=t,K1}var W1,bR;function gle(){if(bR)return W1;bR=1;var e=B8(),t=Qr(),n=mle(),r=kn(),i=Fy();function o(l,c,f){var d=r(l)?e:n;return f&&i(l,c,f)&&(c=void 0),d(l,t(c,3))}return W1=o,W1}var vle=gle();const ble=nt(vle);var Vr=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},Q1,xR;function xle(){if(xR)return Q1;xR=1;var e=i$();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return Q1=t,Q1}var Z1,wR;function wle(){if(wR)return Z1;wR=1;var e=xle(),t=n$(),n=Qr();function r(i,o){var l={};return o=n(o,3),t(i,function(c,f,d){e(l,f,o(c,f,d))}),l}return Z1=r,Z1}var Sle=wle();const _le=nt(Sle);var J1,SR;function Ale(){if(SR)return J1;SR=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return J1=e,J1}var ew,_R;function Ole(){if(_R)return ew;_R=1;var e=c2();function t(n,r){var i=!0;return e(n,function(o,l,c){return i=!!r(o,l,c),i}),i}return ew=t,ew}var tw,AR;function jle(){if(AR)return tw;AR=1;var e=Ale(),t=Ole(),n=Qr(),r=kn(),i=Fy();function o(l,c,f){var d=r(l)?e:t;return f&&i(l,c,f)&&(c=void 0),d(l,n(c,3))}return tw=o,tw}var Ele=jle();const Iq=nt(Ele);var Nle=["x","y"];function Of(e){"@babel/helpers - typeof";return Of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Of(e)}function qS(){return qS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qS.apply(this,arguments)}function OR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sc(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){Tle(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 Tle(e,t,n){return t=Cle(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cle(e){var t=Mle(e,"string");return Of(t)=="symbol"?t:t+""}function Mle(e,t){if(Of(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Of(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kle(e,t){if(e==null)return{};var n=Rle(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Rle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ple(e,t){var n=e.x,r=e.y,i=kle(e,Nle),o="".concat(n),l=parseInt(o,10),c="".concat(r),f=parseInt(c,10),d="".concat(t.height||i.height),y=parseInt(d,10),p="".concat(t.width||i.width),g=parseInt(p,10);return Sc(Sc(Sc(Sc(Sc({},t),i),l?{x:l}:{}),f?{y:f}:{}),{},{height:y,width:g,name:t.name,radius:t.radius})}function jR(e){return W.createElement(Pq,qS({shapeType:"rectangle",propTransformer:Ple,activeClassName:"recharts-active-bar"},e))}var Dle=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=ge(r)||jK(r);return o?t(r,i):(o||Ko(),n)}},$le=["value","background"],Uq;function Hl(e){"@babel/helpers - typeof";return Hl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hl(e)}function qle(e,t){if(e==null)return{};var n=Lle(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lle(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sy(){return sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sy.apply(this,arguments)}function ER(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ER(Object(n),!0).forEach(function(r){za(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ER(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function NR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Vq(r.key),r)}}function Ble(e,t,n){return t&&NR(e.prototype,t),n&&NR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ile(e,t,n){return t=ly(t),Ule(e,Hq()?Reflect.construct(t,n||[],ly(e).constructor):t.apply(e,n))}function Ule(e,t){if(t&&(Hl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hle(e)}function Hle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hq(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Hq=function(){return!!e})()}function ly(e){return ly=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ly(e)}function Vle(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&LS(e,t)}function LS(e,t){return LS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LS(e,t)}function za(e,t,n){return t=Vq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vq(e){var t=Gle(e,"string");return Hl(t)=="symbol"?t:t+""}function Gle(e,t){if(Hl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rs=(function(e){function t(){var n;zle(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Ile(this,t,[].concat(i)),za(n,"state",{isAnimationFinished:!1}),za(n,"id",Ff("recharts-bar-")),za(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),za(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return Vle(t,e),Ble(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,o=this.props,l=o.shape,c=o.dataKey,f=o.activeIndex,d=o.activeBar,y=ke(this.props,!1);return r&&r.map(function(p,g){var b=g===f,_=b?d:l,S=Lt(Lt(Lt({},y),p),{},{isActive:b,option:_,index:g,dataKey:c,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return W.createElement(at,sy({className:"recharts-bar-rectangle"},Fo(i.props,p,g),{key:"rectangle-".concat(p==null?void 0:p.x,"-").concat(p==null?void 0:p.y,"-").concat(p==null?void 0:p.value,"-").concat(g)}),W.createElement(jR,S))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,o=i.data,l=i.layout,c=i.isAnimationActive,f=i.animationBegin,d=i.animationDuration,y=i.animationEasing,p=i.animationId,g=this.state.prevData;return W.createElement(zi,{begin:f,duration:d,isActive:c,easing:y,from:{t:0},to:{t:1},key:"bar-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var _=b.t,S=o.map(function(x,A){var j=g&&g[A];if(j){var O=Ta(j.x,x.x),N=Ta(j.y,x.y),E=Ta(j.width,x.width),T=Ta(j.height,x.height);return Lt(Lt({},x),{},{x:O(_),y:N(_),width:E(_),height:T(_)})}if(l==="horizontal"){var C=Ta(0,x.height),D=C(_);return Lt(Lt({},x),{},{y:x.y+x.height-D,height:D})}var q=Ta(0,x.width),F=q(_);return Lt(Lt({},x),{},{width:F})});return W.createElement(at,null,r.renderRectanglesStatically(S))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,o=r.isAnimationActive,l=this.state.prevData;return o&&i&&i.length&&(!l||!nm(l,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,o=i.data,l=i.dataKey,c=i.activeIndex,f=ke(this.props.background,!1);return o.map(function(d,y){d.value;var p=d.background,g=qle(d,$le);if(!p)return null;var b=Lt(Lt(Lt(Lt(Lt({},g),{},{fill:"#eee"},p),f),Fo(r.props,d,y)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:y,className:"recharts-bar-background-rectangle"});return W.createElement(jR,sy({key:"background-bar-".concat(y),option:r.props.background,isActive:y===c},b))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.data,c=o.xAxis,f=o.yAxis,d=o.layout,y=o.children,p=lr(y,am);if(!p)return null;var g=d==="vertical"?l[0].height/2:l[0].width/2,b=function(x,A){var j=Array.isArray(x.value)?x.value[1]:x.value;return{x:x.x,y:x.y,value:j,errorVal:hn(x,A)}},_={clipPath:r?"url(#clipPath-".concat(i,")"):null};return W.createElement(at,_,p.map(function(S){return W.cloneElement(S,{key:"error-bar-".concat(i,"-").concat(S.props.dataKey),data:l,xAxis:c,yAxis:f,layout:d,offset:g,dataPointFormatter:b})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,o=r.data,l=r.className,c=r.xAxis,f=r.yAxis,d=r.left,y=r.top,p=r.width,g=r.height,b=r.isAnimationActive,_=r.background,S=r.id;if(i||!o||!o.length)return null;var x=this.state.isAnimationFinished,A=Be("recharts-bar",l),j=c&&c.allowDataOverflow,O=f&&f.allowDataOverflow,N=j||O,E=Ie(S)?this.id:S;return W.createElement(at,{className:A},j||O?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(E)},W.createElement("rect",{x:j?d:d-p/2,y:O?y:y-g/2,width:j?p:p*2,height:O?g:g*2}))):null,W.createElement(at,{className:"recharts-bar-rectangles",clipPath:N?"url(#clipPath-".concat(E,")"):null},_?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(N,E),(!b||x)&&Ha.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(U.PureComponent);Uq=rs;za(rs,"displayName","Bar");za(rs,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!lu.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});za(rs,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,o=e.xAxis,l=e.yAxis,c=e.xAxisTicks,f=e.yAxisTicks,d=e.stackedData,y=e.dataStartIndex,p=e.displayedData,g=e.offset,b=mre(r,n);if(!b)return null;var _=t.layout,S=n.type.defaultProps,x=S!==void 0?Lt(Lt({},S),n.props):n.props,A=x.dataKey,j=x.children,O=x.minPointSize,N=_==="horizontal"?l:o,E=d?N.scale.domain():null,T=_re({numericAxis:N}),C=lr(j,tf),D=p.map(function(q,F){var L,P,Y,R,$,k;d?L=gre(d[y+F],E):(L=hn(q,A),Array.isArray(L)||(L=[T,L]));var I=Dle(O,Uq.defaultProps.minPointSize)(L[1],F);if(_==="horizontal"){var H,V=[l.scale(L[0]),l.scale(L[1])],K=V[0],z=V[1];P=nk({axis:o,ticks:c,bandSize:i,offset:b.offset,entry:q,index:F}),Y=(H=z??K)!==null&&H!==void 0?H:void 0,R=b.size;var G=K-z;if($=Number.isNaN(G)?0:G,k={x:P,y:l.y,width:R,height:l.height},Math.abs(I)>0&&Math.abs($)<Math.abs(I)){var Z=xn($||I)*(Math.abs(I)-Math.abs($));Y-=Z,$+=Z}}else{var ee=[o.scale(L[0]),o.scale(L[1])],fe=ee[0],pe=ee[1];if(P=fe,Y=nk({axis:l,ticks:f,bandSize:i,offset:b.offset,entry:q,index:F}),R=pe-fe,$=b.size,k={x:o.x,y:Y,width:o.width,height:$},Math.abs(I)>0&&Math.abs(R)<Math.abs(I)){var ye=xn(R||I)*(Math.abs(I)-Math.abs(R));R+=ye}}return Lt(Lt(Lt({},q),{},{x:P,y:Y,width:R,height:$,value:d?L:L[1],payload:q,background:k},C&&C[F]&&C[F].props),{},{tooltipPayload:[mq(n,q)],tooltipPosition:{x:P+R/2,y:Y+$/2}})});return Lt({data:D,layout:_},g)});function jf(e){"@babel/helpers - typeof";return jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jf(e)}function Fle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Gq(r.key),r)}}function Yle(e,t,n){return t&&TR(e.prototype,t),n&&TR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function CR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _r(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CR(Object(n),!0).forEach(function(r){dm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dm(e,t,n){return t=Gq(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gq(e){var t=Xle(e,"string");return jf(t)=="symbol"?t:t+""}function Xle(e,t){if(jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kle=function(t,n,r,i,o){var l=t.width,c=t.height,f=t.layout,d=t.children,y=Object.keys(n),p={left:r.left,leftMirror:r.left,right:l-r.right,rightMirror:l-r.right,top:r.top,topMirror:r.top,bottom:c-r.bottom,bottomMirror:c-r.bottom},g=!!In(d,rs);return y.reduce(function(b,_){var S=n[_],x=S.orientation,A=S.domain,j=S.padding,O=j===void 0?{}:j,N=S.mirror,E=S.reversed,T="".concat(x).concat(N?"Mirror":""),C,D,q,F,L;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var P=A[1]-A[0],Y=1/0,R=S.categoricalDomain.sort(TK);if(R.forEach(function(ee,fe){fe>0&&(Y=Math.min((ee||0)-(R[fe-1]||0),Y))}),Number.isFinite(Y)){var $=Y/P,k=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(C=$*k/2),S.padding==="no-gap"){var I=wn(t.barCategoryGap,$*k),H=$*k/2;C=H-I-(H-I)/k*I}}}i==="xAxis"?D=[r.left+(O.left||0)+(C||0),r.left+r.width-(O.right||0)-(C||0)]:i==="yAxis"?D=f==="horizontal"?[r.top+r.height-(O.bottom||0),r.top+(O.top||0)]:[r.top+(O.top||0)+(C||0),r.top+r.height-(O.bottom||0)-(C||0)]:D=S.range,E&&(D=[D[1],D[0]]);var V=dq(S,o,g),K=V.scale,z=V.realScaleType;K.domain(A).range(D),hq(K);var G=pq(K,_r(_r({},S),{},{realScaleType:z}));i==="xAxis"?(L=x==="top"&&!N||x==="bottom"&&N,q=r.left,F=p[T]-L*S.height):i==="yAxis"&&(L=x==="left"&&!N||x==="right"&&N,q=p[T]-L*S.width,F=r.top);var Z=_r(_r(_r({},S),G),{},{realScaleType:z,x:q,y:F,scale:K,width:i==="xAxis"?r.width:S.width,height:i==="yAxis"?r.height:S.height});return Z.bandSize=Gp(Z,G),!S.hide&&i==="xAxis"?p[T]+=(L?-1:1)*Z.height:S.hide||(p[T]+=(L?-1:1)*Z.width),_r(_r({},b),{},dm({},_,Z))},{})},Fq=function(t,n){var r=t.x,i=t.y,o=n.x,l=n.y;return{x:Math.min(r,o),y:Math.min(i,l),width:Math.abs(o-r),height:Math.abs(l-i)}},Wle=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return Fq({x:n,y:r},{x:i,y:o})},Yq=(function(){function e(t){Fle(this,e),this.scale=t}return Yle(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}case"end":{var c=this.bandwidth?this.bandwidth():0;return this.scale(n)+c}default:return this.scale(n)}if(i){var f=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+f}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();dm(Yq,"EPS",1e-4);var q2=function(t){var n=Object.keys(t).reduce(function(r,i){return _r(_r({},r),{},dm({},i,Yq.create(t[i])))},{});return _r(_r({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,c=o.position;return _le(i,function(f,d){return n[d].apply(f,{bandAware:l,position:c})})},isInRange:function(i){return Iq(i,function(o,l){return n[l].isInRange(o)})}})};function Qle(e){return(e%180+180)%180}var Zle=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Qle(i),l=o*Math.PI/180,c=Math.atan(r/n),f=l>c&&l<Math.PI-c?r/Math.sin(l):n/Math.cos(l);return Math.abs(f)},nw,MR;function Jle(){if(MR)return nw;MR=1;var e=Qr(),t=Yf(),n=Vy();function r(i){return function(o,l,c){var f=Object(o);if(!t(o)){var d=e(l,3);o=n(o),l=function(p){return d(f[p],p,f)}}var y=i(o,l,c);return y>-1?f[d?o[y]:y]:void 0}}return nw=r,nw}var rw,kR;function eue(){if(kR)return rw;kR=1;var e=qq();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return rw=t,rw}var iw,RR;function tue(){if(RR)return iw;RR=1;var e=Q8(),t=Qr(),n=eue(),r=Math.max;function i(o,l,c){var f=o==null?0:o.length;if(!f)return-1;var d=c==null?0:n(c);return d<0&&(d=r(f+d,0)),e(o,t(l,3),d)}return iw=i,iw}var aw,PR;function nue(){if(PR)return aw;PR=1;var e=Jle(),t=tue(),n=e(t);return aw=n,aw}var rue=nue();const iue=nt(rue);var aue=h8();const oue=nt(aue);var sue=oue(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),L2=U.createContext(void 0),z2=U.createContext(void 0),Xq=U.createContext(void 0),Kq=U.createContext({}),Wq=U.createContext(void 0),Qq=U.createContext(0),Zq=U.createContext(0),DR=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,l=t.clipPathId,c=t.children,f=t.width,d=t.height,y=sue(o);return W.createElement(L2.Provider,{value:r},W.createElement(z2.Provider,{value:i},W.createElement(Kq.Provider,{value:o},W.createElement(Xq.Provider,{value:y},W.createElement(Wq.Provider,{value:l},W.createElement(Qq.Provider,{value:d},W.createElement(Zq.Provider,{value:f},c)))))))},lue=function(){return U.useContext(Wq)},Jq=function(t){var n=U.useContext(L2);n==null&&Ko();var r=n[t];return r==null&&Ko(),r},uue=function(){var t=U.useContext(L2);return ka(t)},cue=function(){var t=U.useContext(z2),n=iue(t,function(r){return Iq(r.domain,Number.isFinite)});return n||ka(t)},e6=function(t){var n=U.useContext(z2);n==null&&Ko();var r=n[t];return r==null&&Ko(),r},fue=function(){var t=U.useContext(Xq);return t},due=function(){return U.useContext(Kq)},B2=function(){return U.useContext(Zq)},I2=function(){return U.useContext(Qq)};function Vl(e){"@babel/helpers - typeof";return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function hue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n6(r.key),r)}}function yue(e,t,n){return t&&pue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mue(e,t,n){return t=uy(t),gue(e,t6()?Reflect.construct(t,n||[],uy(e).constructor):t.apply(e,n))}function gue(e,t){if(t&&(Vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vue(e)}function vue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t6=function(){return!!e})()}function uy(e){return uy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},uy(e)}function bue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zS(e,t)}function zS(e,t){return zS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zS(e,t)}function $R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function qR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$R(Object(n),!0).forEach(function(r){U2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$R(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function U2(e,t,n){return t=n6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n6(e){var t=xue(e,"string");return Vl(t)=="symbol"?t:t+""}function xue(e,t){if(Vl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function wue(e,t){return Oue(e)||Aue(e,t)||_ue(e,t)||Sue()}function Sue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
516
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _ue(e,t){if(e){if(typeof e=="string")return LR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return LR(e,t)}}function LR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Aue(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function Oue(e){if(Array.isArray(e))return e}function BS(){return BS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BS.apply(this,arguments)}var jue=function(t,n){var r;return W.isValidElement(t)?r=W.cloneElement(t,n):Pe(t)?r=t(n):r=W.createElement("line",BS({},n,{className:"recharts-reference-line-line"})),r},Eue=function(t,n,r,i,o,l,c,f,d){var y=o.x,p=o.y,g=o.width,b=o.height;if(r){var _=d.y,S=t.y.apply(_,{position:l});if(Vr(d,"discard")&&!t.y.isInRange(S))return null;var x=[{x:y+g,y:S},{x:y,y:S}];return f==="left"?x.reverse():x}if(n){var A=d.x,j=t.x.apply(A,{position:l});if(Vr(d,"discard")&&!t.x.isInRange(j))return null;var O=[{x:j,y:p+b},{x:j,y:p}];return c==="top"?O.reverse():O}if(i){var N=d.segment,E=N.map(function(T){return t.apply(T,{position:l})});return Vr(d,"discard")&&ble(E,function(T){return!t.isInRange(T)})?null:E}return null};function Nue(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,o=e.yAxisId,l=e.shape,c=e.className,f=e.alwaysShow,d=lue(),y=Jq(i),p=e6(o),g=fue();if(!d||!g)return null;Nr(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var b=q2({x:y.scale,y:p.scale}),_=Ft(t),S=Ft(n),x=r&&r.length===2,A=Eue(b,_,S,x,g,e.position,y.orientation,p.orientation,e);if(!A)return null;var j=wue(A,2),O=j[0],N=O.x,E=O.y,T=j[1],C=T.x,D=T.y,q=Vr(e,"hidden")?"url(#".concat(d,")"):void 0,F=qR(qR({clipPath:q},ke(e,!0)),{},{x1:N,y1:E,x2:C,y2:D});return W.createElement(at,{className:Be("recharts-reference-line",c)},jue(l,F),Zt.renderCallByParent(e,Wle({x1:N,y1:E,x2:C,y2:D})))}var H2=(function(e){function t(){return hue(this,t),mue(this,t,arguments)}return bue(t,e),yue(t,[{key:"render",value:function(){return W.createElement(Nue,this.props)}}])})(W.Component);U2(H2,"displayName","ReferenceLine");U2(H2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function IS(){return IS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},IS.apply(this,arguments)}function Gl(e){"@babel/helpers - typeof";return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function zR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function BR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zR(Object(n),!0).forEach(function(r){hm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i6(r.key),r)}}function Mue(e,t,n){return t&&Cue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kue(e,t,n){return t=cy(t),Rue(e,r6()?Reflect.construct(t,n||[],cy(e).constructor):t.apply(e,n))}function Rue(e,t){if(t&&(Gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pue(e)}function Pue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function r6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(r6=function(){return!!e})()}function cy(e){return cy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},cy(e)}function Due(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&US(e,t)}function US(e,t){return US=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},US(e,t)}function hm(e,t,n){return t=i6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i6(e){var t=$ue(e,"string");return Gl(t)=="symbol"?t:t+""}function $ue(e,t){if(Gl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var que=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,l=q2({x:i.scale,y:o.scale}),c=l.apply({x:n,y:r},{bandAware:!0});return Vr(t,"discard")&&!l.isInRange(c)?null:c},pm=(function(e){function t(){return Tue(this,t),kue(this,t,arguments)}return Due(t,e),Mue(t,[{key:"render",value:function(){var r=this.props,i=r.x,o=r.y,l=r.r,c=r.alwaysShow,f=r.clipPathId,d=Ft(i),y=Ft(o);if(Nr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!y)return null;var p=que(this.props);if(!p)return null;var g=p.x,b=p.y,_=this.props,S=_.shape,x=_.className,A=Vr(this.props,"hidden")?"url(#".concat(f,")"):void 0,j=BR(BR({clipPath:A},ke(this.props,!0)),{},{cx:g,cy:b});return W.createElement(at,{className:Be("recharts-reference-dot",x)},t.renderDot(S,j),Zt.renderCallByParent(this.props,{x:g-l,y:b-l,width:2*l,height:2*l}))}}])})(W.Component);hm(pm,"displayName","ReferenceDot");hm(pm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});hm(pm,"renderDot",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):Pe(e)?n=e(t):n=W.createElement($2,IS({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function HS(){return HS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},HS.apply(this,arguments)}function Fl(e){"@babel/helpers - typeof";return Fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(e)}function IR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function UR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IR(Object(n),!0).forEach(function(r){ym(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 Lue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,o6(r.key),r)}}function Bue(e,t,n){return t&&zue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Iue(e,t,n){return t=fy(t),Uue(e,a6()?Reflect.construct(t,n||[],fy(e).constructor):t.apply(e,n))}function Uue(e,t){if(t&&(Fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hue(e)}function Hue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a6=function(){return!!e})()}function fy(e){return fy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fy(e)}function Vue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&VS(e,t)}function VS(e,t){return VS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},VS(e,t)}function ym(e,t,n){return t=o6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o6(e){var t=Gue(e,"string");return Fl(t)=="symbol"?t:t+""}function Gue(e,t){if(Fl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fue=function(t,n,r,i,o){var l=o.x1,c=o.x2,f=o.y1,d=o.y2,y=o.xAxis,p=o.yAxis;if(!y||!p)return null;var g=q2({x:y.scale,y:p.scale}),b={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(f,{position:"start"}):g.y.rangeMin},_={x:n?g.x.apply(c,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(d,{position:"end"}):g.y.rangeMax};return Vr(o,"discard")&&(!g.isInRange(b)||!g.isInRange(_))?null:Fq(b,_)},mm=(function(e){function t(){return Lue(this,t),Iue(this,t,arguments)}return Vue(t,e),Bue(t,[{key:"render",value:function(){var r=this.props,i=r.x1,o=r.x2,l=r.y1,c=r.y2,f=r.className,d=r.alwaysShow,y=r.clipPathId;Nr(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Ft(i),g=Ft(o),b=Ft(l),_=Ft(c),S=this.props.shape;if(!p&&!g&&!b&&!_&&!S)return null;var x=Fue(p,g,b,_,this.props);if(!x&&!S)return null;var A=Vr(this.props,"hidden")?"url(#".concat(y,")"):void 0;return W.createElement(at,{className:Be("recharts-reference-area",f)},t.renderRect(S,UR(UR({clipPath:A},ke(this.props,!0)),x)),Zt.renderCallByParent(this.props,x))}}])})(W.Component);ym(mm,"displayName","ReferenceArea");ym(mm,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});ym(mm,"renderRect",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):Pe(e)?n=e(t):n=W.createElement(D2,HS({},t,{className:"recharts-reference-area-rect"})),n});function s6(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function Yue(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Zle(r,n)}function Xue(e,t,n){var r=n==="width",i=e.x,o=e.y,l=e.width,c=e.height;return t===1?{start:r?i:o,end:r?i+l:o+c}:{start:r?i+l:o+c,end:r?i:o}}function dy(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function Kue(e,t){return s6(e,t+1)}function Wue(e,t,n,r,i){for(var o=(r||[]).slice(),l=t.start,c=t.end,f=0,d=1,y=l,p=function(){var _=r==null?void 0:r[f];if(_===void 0)return{v:s6(r,d)};var S=f,x,A=function(){return x===void 0&&(x=n(_,S)),x},j=_.coordinate,O=f===0||dy(e,j,A,y,c);O||(f=0,y=l,d+=1),O&&(y=j+e*(A()/2+i),f+=d)},g;d<=o.length;)if(g=p(),g)return g.v;return[]}function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function HR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HR(Object(n),!0).forEach(function(r){Que(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Que(e,t,n){return t=Zue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zue(e){var t=Jue(e,"string");return Ef(t)=="symbol"?t:t+""}function Jue(e,t){if(Ef(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ef(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ece(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,c=t.start,f=t.end,d=function(g){var b=o[g],_,S=function(){return _===void 0&&(_=n(b,g)),_};if(g===l-1){var x=e*(b.coordinate+e*S()/2-f);o[g]=b=fn(fn({},b),{},{tickCoord:x>0?b.coordinate-x*e:b.coordinate})}else o[g]=b=fn(fn({},b),{},{tickCoord:b.coordinate});var A=dy(e,b.tickCoord,S,c,f);A&&(f=b.tickCoord-e*(S()/2+i),o[g]=fn(fn({},b),{},{isShow:!0}))},y=l-1;y>=0;y--)d(y);return o}function tce(e,t,n,r,i,o){var l=(r||[]).slice(),c=l.length,f=t.start,d=t.end;if(o){var y=r[c-1],p=n(y,c-1),g=e*(y.coordinate+e*p/2-d);l[c-1]=y=fn(fn({},y),{},{tickCoord:g>0?y.coordinate-g*e:y.coordinate});var b=dy(e,y.tickCoord,function(){return p},f,d);b&&(d=y.tickCoord-e*(p/2+i),l[c-1]=fn(fn({},y),{},{isShow:!0}))}for(var _=o?c-1:c,S=function(j){var O=l[j],N,E=function(){return N===void 0&&(N=n(O,j)),N};if(j===0){var T=e*(O.coordinate-e*E()/2-f);l[j]=O=fn(fn({},O),{},{tickCoord:T<0?O.coordinate-T*e:O.coordinate})}else l[j]=O=fn(fn({},O),{},{tickCoord:O.coordinate});var C=dy(e,O.tickCoord,E,f,d);C&&(f=O.tickCoord+e*(E()/2+i),l[j]=fn(fn({},O),{},{isShow:!0}))},x=0;x<_;x++)S(x);return l}function V2(e,t,n){var r=e.tick,i=e.ticks,o=e.viewBox,l=e.minTickGap,c=e.orientation,f=e.interval,d=e.tickFormatter,y=e.unit,p=e.angle;if(!i||!i.length||!r)return[];if(ge(f)||lu.isSsr)return Kue(i,typeof f=="number"&&ge(f)?f:0);var g=[],b=c==="top"||c==="bottom"?"width":"height",_=y&&b==="width"?Mc(y,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(O,N){var E=Pe(d)?d(O.value,N):O.value;return b==="width"?Yue(Mc(E,{fontSize:t,letterSpacing:n}),_,p):Mc(E,{fontSize:t,letterSpacing:n})[b]},x=i.length>=2?xn(i[1].coordinate-i[0].coordinate):1,A=Xue(o,x,b);return f==="equidistantPreserveStart"?Wue(x,A,S,i,l):(f==="preserveStart"||f==="preserveStartEnd"?g=tce(x,A,S,i,l,f==="preserveStartEnd"):g=ece(x,A,S,i,l),g.filter(function(j){return j.isShow}))}var nce=["viewBox"],rce=["viewBox"],ice=["ticks"];function Yl(e){"@babel/helpers - typeof";return Yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yl(e)}function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nl.apply(this,arguments)}function VR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VR(Object(n),!0).forEach(function(r){G2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ow(e,t){if(e==null)return{};var n=ace(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ace(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function oce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function GR(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u6(r.key),r)}}function sce(e,t,n){return t&&GR(e.prototype,t),n&&GR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function lce(e,t,n){return t=hy(t),uce(e,l6()?Reflect.construct(t,n||[],hy(e).constructor):t.apply(e,n))}function uce(e,t){if(t&&(Yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cce(e)}function cce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(l6=function(){return!!e})()}function hy(e){return hy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hy(e)}function fce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GS(e,t)}function GS(e,t){return GS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},GS(e,t)}function G2(e,t,n){return t=u6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u6(e){var t=dce(e,"string");return Yl(t)=="symbol"?t:t+""}function dce(e,t){if(Yl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var fu=(function(e){function t(n){var r;return oce(this,t),r=lce(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return fce(t,e),sce(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,l=ow(r,nce),c=this.props,f=c.viewBox,d=ow(c,rce);return!ll(o,f)||!ll(l,d)||!ll(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,o=i.x,l=i.y,c=i.width,f=i.height,d=i.orientation,y=i.tickSize,p=i.mirror,g=i.tickMargin,b,_,S,x,A,j,O=p?-1:1,N=r.tickSize||y,E=ge(r.tickCoord)?r.tickCoord:r.coordinate;switch(d){case"top":b=_=r.coordinate,x=l+ +!p*f,S=x-O*N,j=S-O*g,A=E;break;case"left":S=x=r.coordinate,_=o+ +!p*c,b=_-O*N,A=b-O*g,j=E;break;case"right":S=x=r.coordinate,_=o+ +p*c,b=_+O*N,A=b+O*g,j=E;break;default:b=_=r.coordinate,x=l+ +p*f,S=x+O*N,j=S+O*g,A=E;break}return{line:{x1:b,y1:S,x2:_,y2:x},tick:{x:A,y:j}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,l;switch(i){case"left":l=o?"start":"end";break;case"right":l=o?"end":"start";break;default:l="middle";break}return l}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,o=r.mirror,l="end";switch(i){case"left":case"right":l="middle";break;case"top":l=o?"start":"end";break;default:l=o?"end":"start";break}return l}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,o=r.y,l=r.width,c=r.height,f=r.orientation,d=r.mirror,y=r.axisLine,p=Vt(Vt(Vt({},ke(this.props,!1)),ke(y,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var g=+(f==="top"&&!d||f==="bottom"&&d);p=Vt(Vt({},p),{},{x1:i,y1:o+g*c,x2:i+l,y2:o+g*c})}else{var b=+(f==="left"&&!d||f==="right"&&d);p=Vt(Vt({},p),{},{x1:i+b*l,y1:o,x2:i+b*l,y2:o+c})}return W.createElement("line",nl({},p,{className:Be("recharts-cartesian-axis-line",Gn(y,"className"))}))}},{key:"renderTicks",value:function(r,i,o){var l=this,c=this.props,f=c.tickLine,d=c.stroke,y=c.tick,p=c.tickFormatter,g=c.unit,b=V2(Vt(Vt({},this.props),{},{ticks:r}),i,o),_=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),x=ke(this.props,!1),A=ke(y,!1),j=Vt(Vt({},x),{},{fill:"none"},ke(f,!1)),O=b.map(function(N,E){var T=l.getTickLineCoord(N),C=T.line,D=T.tick,q=Vt(Vt(Vt(Vt({textAnchor:_,verticalAnchor:S},x),{},{stroke:"none",fill:d},A),D),{},{index:E,payload:N,visibleTicksCount:b.length,tickFormatter:p});return W.createElement(at,nl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(N.value,"-").concat(N.coordinate,"-").concat(N.tickCoord)},Fo(l.props,N,E)),f&&W.createElement("line",nl({},j,C,{className:Be("recharts-cartesian-axis-tick-line",Gn(f,"className"))})),y&&t.renderTickItem(y,q,"".concat(Pe(p)?p(N.value,E):N.value).concat(g||"")))});return W.createElement("g",{className:"recharts-cartesian-axis-ticks"},O)}},{key:"render",value:function(){var r=this,i=this.props,o=i.axisLine,l=i.width,c=i.height,f=i.ticksGenerator,d=i.className,y=i.hide;if(y)return null;var p=this.props,g=p.ticks,b=ow(p,ice),_=g;return Pe(f)&&(_=g&&g.length>0?f(this.props):f(b)),l<=0||c<=0||!_||!_.length?null:W.createElement(at,{className:Be("recharts-cartesian-axis",d),ref:function(x){r.layerReference=x}},o&&this.renderAxisLine(),this.renderTicks(_,this.state.fontSize,this.state.letterSpacing),Zt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var l,c=Be(i.className,"recharts-cartesian-axis-tick-value");return W.isValidElement(r)?l=W.cloneElement(r,Vt(Vt({},i),{},{className:c})):Pe(r)?l=r(Vt(Vt({},i),{},{className:c})):l=W.createElement(Yo,nl({},i,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})(U.Component);G2(fu,"displayName","CartesianAxis");G2(fu,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var hce=["x1","y1","x2","y2","key"],pce=["offset"];function Wo(e){"@babel/helpers - typeof";return Wo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wo(e)}function FR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FR(Object(n),!0).forEach(function(r){yce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yce(e,t,n){return t=mce(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mce(e){var t=gce(e,"string");return Wo(t)=="symbol"?t:t+""}function gce(e,t){if(Wo(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function To(){return To=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},To.apply(this,arguments)}function YR(e,t){if(e==null)return{};var n=vce(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var bce=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,l=t.width,c=t.height,f=t.ry;return W.createElement("rect",{x:i,y:o,ry:f,width:l,height:c,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function c6(e,t){var n;if(W.isValidElement(e))n=W.cloneElement(e,t);else if(Pe(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,l=t.y2,c=t.key,f=YR(t,hce),d=ke(f,!1);d.offset;var y=YR(d,pce);n=W.createElement("line",To({},y,{x1:r,y1:i,x2:o,y2:l,fill:"none",key:c}))}return n}function xce(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var l=o.map(function(c,f){var d=dn(dn({},e),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(f),index:f});return c6(i,d)});return W.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function wce(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var l=o.map(function(c,f){var d=dn(dn({},e),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(f),index:f});return c6(i,d)});return W.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Sce(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,l=e.height,c=e.horizontalPoints,f=e.horizontal,d=f===void 0?!0:f;if(!d||!t||!t.length)return null;var y=c.map(function(g){return Math.round(g+i-i)}).sort(function(g,b){return g-b});i!==y[0]&&y.unshift(0);var p=y.map(function(g,b){var _=!y[b+1],S=_?i+l-g:y[b+1]-g;if(S<=0)return null;var x=b%t.length;return W.createElement("rect",{key:"react-".concat(b),y:g,x:r,height:S,width:o,stroke:"none",fill:t[x],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function _ce(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,l=e.y,c=e.width,f=e.height,d=e.verticalPoints;if(!n||!r||!r.length)return null;var y=d.map(function(g){return Math.round(g+o-o)}).sort(function(g,b){return g-b});o!==y[0]&&y.unshift(0);var p=y.map(function(g,b){var _=!y[b+1],S=_?o+c-g:y[b+1]-g;if(S<=0)return null;var x=b%r.length;return W.createElement("rect",{key:"react-".concat(b),x:g,y:l,width:S,height:f,stroke:"none",fill:r[x],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var Ace=function(t,n){var r=t.xAxis,i=t.width,o=t.height,l=t.offset;return fq(V2(dn(dn(dn({},fu.defaultProps),r),{},{ticks:Mi(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.left,l.left+l.width,n)},Oce=function(t,n){var r=t.yAxis,i=t.width,o=t.height,l=t.offset;return fq(V2(dn(dn(dn({},fu.defaultProps),r),{},{ticks:Mi(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.top,l.top+l.height,n)},Ys={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function f6(e){var t,n,r,i,o,l,c=B2(),f=I2(),d=due(),y=dn(dn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ys.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Ys.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Ys.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Ys.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Ys.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:Ys.verticalFill,x:ge(e.x)?e.x:d.left,y:ge(e.y)?e.y:d.top,width:ge(e.width)?e.width:d.width,height:ge(e.height)?e.height:d.height}),p=y.x,g=y.y,b=y.width,_=y.height,S=y.syncWithTicks,x=y.horizontalValues,A=y.verticalValues,j=uue(),O=cue();if(!ge(b)||b<=0||!ge(_)||_<=0||!ge(p)||p!==+p||!ge(g)||g!==+g)return null;var N=y.verticalCoordinatesGenerator||Ace,E=y.horizontalCoordinatesGenerator||Oce,T=y.horizontalPoints,C=y.verticalPoints;if((!T||!T.length)&&Pe(E)){var D=x&&x.length,q=E({yAxis:O?dn(dn({},O),{},{ticks:D?x:O.ticks}):void 0,width:c,height:f,offset:d},D?!0:S);Nr(Array.isArray(q),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Wo(q),"]")),Array.isArray(q)&&(T=q)}if((!C||!C.length)&&Pe(N)){var F=A&&A.length,L=N({xAxis:j?dn(dn({},j),{},{ticks:F?A:j.ticks}):void 0,width:c,height:f,offset:d},F?!0:S);Nr(Array.isArray(L),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Wo(L),"]")),Array.isArray(L)&&(C=L)}return W.createElement("g",{className:"recharts-cartesian-grid"},W.createElement(bce,{fill:y.fill,fillOpacity:y.fillOpacity,x:y.x,y:y.y,width:y.width,height:y.height,ry:y.ry}),W.createElement(xce,To({},y,{offset:d,horizontalPoints:T,xAxis:j,yAxis:O})),W.createElement(wce,To({},y,{offset:d,verticalPoints:C,xAxis:j,yAxis:O})),W.createElement(Sce,To({},y,{horizontalPoints:T})),W.createElement(_ce,To({},y,{verticalPoints:C})))}f6.displayName="CartesianGrid";function Xl(e){"@babel/helpers - typeof";return Xl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xl(e)}function jce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ece(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p6(r.key),r)}}function Nce(e,t,n){return t&&Ece(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Tce(e,t,n){return t=py(t),Cce(e,d6()?Reflect.construct(t,n||[],py(e).constructor):t.apply(e,n))}function Cce(e,t){if(t&&(Xl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mce(e)}function Mce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d6=function(){return!!e})()}function py(e){return py=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},py(e)}function kce(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FS(e,t)}function FS(e,t){return FS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},FS(e,t)}function h6(e,t,n){return t=p6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p6(e){var t=Rce(e,"string");return Xl(t)=="symbol"?t:t+""}function Rce(e,t){if(Xl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(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)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YS.apply(this,arguments)}function Pce(e){var t=e.xAxisId,n=B2(),r=I2(),i=Jq(t);return i==null?null:U.createElement(fu,YS({},i,{className:Be("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(l){return Mi(l,!0)}}))}var gm=(function(e){function t(){return jce(this,t),Tce(this,t,arguments)}return kce(t,e),Nce(t,[{key:"render",value:function(){return U.createElement(Pce,this.props)}}])})(U.Component);h6(gm,"displayName","XAxis");h6(gm,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Kl(e){"@babel/helpers - typeof";return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(e)}function Dce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,g6(r.key),r)}}function qce(e,t,n){return t&&$ce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lce(e,t,n){return t=yy(t),zce(e,y6()?Reflect.construct(t,n||[],yy(e).constructor):t.apply(e,n))}function zce(e,t){if(t&&(Kl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bce(e)}function Bce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(y6=function(){return!!e})()}function yy(e){return yy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yy(e)}function Ice(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XS(e,t)}function XS(e,t){return XS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},XS(e,t)}function m6(e,t,n){return t=g6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g6(e){var t=Uce(e,"string");return Kl(t)=="symbol"?t:t+""}function Uce(e,t){if(Kl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function KS(){return KS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},KS.apply(this,arguments)}var Hce=function(t){var n=t.yAxisId,r=B2(),i=I2(),o=e6(n);return o==null?null:U.createElement(fu,KS({},o,{className:Be("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(c){return Mi(c,!0)}}))},vm=(function(e){function t(){return Dce(this,t),Lce(this,t,arguments)}return Ice(t,e),qce(t,[{key:"render",value:function(){return U.createElement(Hce,this.props)}}])})(U.Component);m6(vm,"displayName","YAxis");m6(vm,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function XR(e){return Yce(e)||Fce(e)||Gce(e)||Vce()}function Vce(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
517
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Gce(e,t){if(e){if(typeof e=="string")return WS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return WS(e,t)}}function Fce(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yce(e){if(Array.isArray(e))return WS(e)}function WS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var QS=function(t,n,r,i,o){var l=lr(t,H2),c=lr(t,pm),f=[].concat(XR(l),XR(c)),d=lr(t,mm),y="".concat(i,"Id"),p=i[0],g=n;if(f.length&&(g=f.reduce(function(S,x){if(x.props[y]===r&&Vr(x.props,"extendDomain")&&ge(x.props[p])){var A=x.props[p];return[Math.min(S[0],A),Math.max(S[1],A)]}return S},g)),d.length){var b="".concat(p,"1"),_="".concat(p,"2");g=d.reduce(function(S,x){if(x.props[y]===r&&Vr(x.props,"extendDomain")&&ge(x.props[b])&&ge(x.props[_])){var A=x.props[b],j=x.props[_];return[Math.min(S[0],A,j),Math.max(S[1],A,j)]}return S},g)}return o&&o.length&&(g=o.reduce(function(S,x){return ge(x)?[Math.min(S[0],x),Math.max(S[1],x)]:S},g)),g},sw={exports:{}},KR;function Xce(){return KR||(KR=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(f,d,y){this.fn=f,this.context=d,this.once=y||!1}function o(f,d,y,p,g){if(typeof y!="function")throw new TypeError("The listener must be a function");var b=new i(y,p||f,g),_=n?n+d:d;return f._events[_]?f._events[_].fn?f._events[_]=[f._events[_],b]:f._events[_].push(b):(f._events[_]=b,f._eventsCount++),f}function l(f,d){--f._eventsCount===0?f._events=new r:delete f._events[d]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var d=[],y,p;if(this._eventsCount===0)return d;for(p in y=this._events)t.call(y,p)&&d.push(n?p.slice(1):p);return Object.getOwnPropertySymbols?d.concat(Object.getOwnPropertySymbols(y)):d},c.prototype.listeners=function(d){var y=n?n+d:d,p=this._events[y];if(!p)return[];if(p.fn)return[p.fn];for(var g=0,b=p.length,_=new Array(b);g<b;g++)_[g]=p[g].fn;return _},c.prototype.listenerCount=function(d){var y=n?n+d:d,p=this._events[y];return p?p.fn?1:p.length:0},c.prototype.emit=function(d,y,p,g,b,_){var S=n?n+d:d;if(!this._events[S])return!1;var x=this._events[S],A=arguments.length,j,O;if(x.fn){switch(x.once&&this.removeListener(d,x.fn,void 0,!0),A){case 1:return x.fn.call(x.context),!0;case 2:return x.fn.call(x.context,y),!0;case 3:return x.fn.call(x.context,y,p),!0;case 4:return x.fn.call(x.context,y,p,g),!0;case 5:return x.fn.call(x.context,y,p,g,b),!0;case 6:return x.fn.call(x.context,y,p,g,b,_),!0}for(O=1,j=new Array(A-1);O<A;O++)j[O-1]=arguments[O];x.fn.apply(x.context,j)}else{var N=x.length,E;for(O=0;O<N;O++)switch(x[O].once&&this.removeListener(d,x[O].fn,void 0,!0),A){case 1:x[O].fn.call(x[O].context);break;case 2:x[O].fn.call(x[O].context,y);break;case 3:x[O].fn.call(x[O].context,y,p);break;case 4:x[O].fn.call(x[O].context,y,p,g);break;default:if(!j)for(E=1,j=new Array(A-1);E<A;E++)j[E-1]=arguments[E];x[O].fn.apply(x[O].context,j)}}return!0},c.prototype.on=function(d,y,p){return o(this,d,y,p,!1)},c.prototype.once=function(d,y,p){return o(this,d,y,p,!0)},c.prototype.removeListener=function(d,y,p,g){var b=n?n+d:d;if(!this._events[b])return this;if(!y)return l(this,b),this;var _=this._events[b];if(_.fn)_.fn===y&&(!g||_.once)&&(!p||_.context===p)&&l(this,b);else{for(var S=0,x=[],A=_.length;S<A;S++)(_[S].fn!==y||g&&!_[S].once||p&&_[S].context!==p)&&x.push(_[S]);x.length?this._events[b]=x.length===1?x[0]:x:l(this,b)}return this},c.prototype.removeAllListeners=function(d){var y;return d?(y=n?n+d:d,this._events[y]&&l(this,y)):(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})(sw)),sw.exports}var Kce=Xce();const Wce=nt(Kce);var lw=new Wce,uw="recharts.syncMouseEvents";function Nf(e){"@babel/helpers - typeof";return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}function Qce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,v6(r.key),r)}}function Jce(e,t,n){return t&&Zce(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cw(e,t,n){return t=v6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v6(e){var t=efe(e,"string");return Nf(t)=="symbol"?t:t+""}function efe(e,t){if(Nf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var tfe=(function(){function e(){Qce(this,e),cw(this,"activeIndex",0),cw(this,"coordinateList",[]),cw(this,"layout","horizontal")}return Jce(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,o=i===void 0?null:i,l=n.container,c=l===void 0?null:l,f=n.layout,d=f===void 0?null:f,y=n.offset,p=y===void 0?null:y,g=n.mouseHandlerCallback,b=g===void 0?null:g;this.coordinateList=(r=o??this.coordinateList)!==null&&r!==void 0?r:[],this.container=c??this.container,this.layout=d??this.layout,this.offset=p??this.offset,this.mouseHandlerCallback=b??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),o=i.x,l=i.y,c=i.height,f=this.coordinateList[this.activeIndex].coordinate,d=((n=window)===null||n===void 0?void 0:n.scrollX)||0,y=((r=window)===null||r===void 0?void 0:r.scrollY)||0,p=o+f+d,g=l+this.offset.top+c/2+y;this.mouseHandlerCallback({pageX:p,pageY:g})}}}])})();function nfe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&ge(r)&&ge(i))return!0}return!1}function rfe(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function b6(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle,l=pt(t,n,r,i),c=pt(t,n,r,o);return{points:[l,c],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function ife(e,t,n){var r,i,o,l;if(e==="horizontal")r=t.x,o=r,i=n.top,l=n.top+n.height;else if(e==="vertical")i=t.y,l=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var c=t.cx,f=t.cy,d=t.innerRadius,y=t.outerRadius,p=t.angle,g=pt(c,f,d,p),b=pt(c,f,y,p);r=g.x,i=g.y,o=b.x,l=b.y}else return b6(t);return[{x:r,y:i},{x:o,y:l}]}function Tf(e){"@babel/helpers - typeof";return Tf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(e)}function WR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WR(Object(n),!0).forEach(function(r){afe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function afe(e,t,n){return t=ofe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ofe(e){var t=sfe(e,"string");return Tf(t)=="symbol"?t:t+""}function sfe(e,t){if(Tf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Tf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lfe(e){var t,n,r=e.element,i=e.tooltipEventType,o=e.isActive,l=e.activeCoordinate,c=e.activePayload,f=e.offset,d=e.activeTooltipIndex,y=e.tooltipAxisBandSize,p=e.layout,g=e.chartName,b=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!b||!o||!l||g!=="ScatterChart"&&i!=="axis")return null;var _,S=xS;if(g==="ScatterChart")_=l,S=Hoe;else if(g==="BarChart")_=rfe(p,l,f,y),S=D2;else if(p==="radial"){var x=b6(l),A=x.cx,j=x.cy,O=x.radius,N=x.startAngle,E=x.endAngle;_={cx:A,cy:j,startAngle:N,endAngle:E,innerRadius:O,outerRadius:O},S=Sq}else _={points:ife(p,l,f)},S=xS;var T=Gh(Gh(Gh(Gh({stroke:"#ccc",pointerEvents:"none"},f),_),ke(b,!1)),{},{payload:c,payloadIndex:d,className:Be("recharts-tooltip-cursor",b.className)});return U.isValidElement(b)?U.cloneElement(b,T):U.createElement(S,T)}var ufe=["item"],cfe=["children","className","width","height","style","compact","title","desc"];function Wl(e){"@babel/helpers - typeof";return Wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wl(e)}function rl(){return rl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rl.apply(this,arguments)}function QR(e,t){return hfe(e)||dfe(e,t)||w6(e,t)||ffe()}function ffe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
518
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dfe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,l,c=[],f=!0,d=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(f=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(y){d=!0,i=y}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw i}}return c}}function hfe(e){if(Array.isArray(e))return e}function ZR(e,t){if(e==null)return{};var n=pfe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pfe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mfe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,S6(r.key),r)}}function gfe(e,t,n){return t&&mfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vfe(e,t,n){return t=my(t),bfe(e,x6()?Reflect.construct(t,n||[],my(e).constructor):t.apply(e,n))}function bfe(e,t){if(t&&(Wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xfe(e)}function xfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function x6(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(x6=function(){return!!e})()}function my(e){return my=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},my(e)}function wfe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ZS(e,t)}function ZS(e,t){return ZS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ZS(e,t)}function Ql(e){return Afe(e)||_fe(e)||w6(e)||Sfe()}function Sfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
519
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w6(e,t){if(e){if(typeof e=="string")return JS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JS(e,t)}}function _fe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Afe(e){if(Array.isArray(e))return JS(e)}function JS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function JR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JR(Object(n),!0).forEach(function(r){Ce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ce(e,t,n){return t=S6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S6(e){var t=Ofe(e,"string");return Wl(t)=="symbol"?t:t+""}function Ofe(e,t){if(Wl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jfe={xAxis:["bottom","top"],yAxis:["left","right"]},Efe={width:"100%",height:"100%"},_6={x:0,y:0};function Fh(e){return e}var Nfe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Tfe=function(t,n,r,i){var o=n.find(function(y){return y&&y.index===r});if(o){if(t==="horizontal")return{x:o.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:o.coordinate};if(t==="centric"){var l=o.coordinate,c=i.radius;return le(le(le({},i),pt(i.cx,i.cy,c,l)),{},{angle:l,radius:c})}var f=o.coordinate,d=i.angle;return le(le(le({},i),pt(i.cx,i.cy,f,d)),{},{angle:d,radius:f})}return _6},bm=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,o=n.dataEndIndex,l=(r??[]).reduce(function(c,f){var d=f.props.data;return d&&d.length?[].concat(Ql(c),Ql(d)):c},[]);return l.length>0?l:t&&t.length&&ge(i)&&ge(o)?t.slice(i,o+1):[]};function A6(e){return e==="number"?[0,"auto"]:void 0}var e_=function(t,n,r,i){var o=t.graphicalItems,l=t.tooltipAxis,c=bm(n,t);return r<0||!o||!o.length||r>=c.length?null:o.reduce(function(f,d){var y,p=(y=d.props.data)!==null&&y!==void 0?y:n;p&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(p=p.slice(t.dataStartIndex,t.dataEndIndex+1));var g;if(l.dataKey&&!l.allowDuplicatedCategory){var b=p===void 0?c:p;g=qw(b,l.dataKey,i)}else g=p&&p[r]||c[r];return g?[].concat(Ql(f),[mq(d,g)]):f},[])},eP=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},l=Nfe(o,r),c=t.orderedTooltipTicks,f=t.tooltipAxis,d=t.tooltipTicks,y=cre(l,c,d,f);if(y>=0&&d){var p=d[y]&&d[y].value,g=e_(t,n,y,p),b=Tfe(r,c,y,o);return{activeTooltipIndex:y,activeLabel:p,activePayload:g,activeCoordinate:b}}return null},Cfe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,y=t.layout,p=t.children,g=t.stackOffset,b=cq(y,o);return r.reduce(function(_,S){var x,A=S.type.defaultProps!==void 0?le(le({},S.type.defaultProps),S.props):S.props,j=A.type,O=A.dataKey,N=A.allowDataOverflow,E=A.allowDuplicatedCategory,T=A.scale,C=A.ticks,D=A.includeHidden,q=A[l];if(_[q])return _;var F=bm(t.data,{graphicalItems:i.filter(function(G){var Z,ee=l in G.props?G.props[l]:(Z=G.type.defaultProps)===null||Z===void 0?void 0:Z[l];return ee===q}),dataStartIndex:f,dataEndIndex:d}),L=F.length,P,Y,R;nfe(A.domain,N,j)&&(P=yS(A.domain,null,N),b&&(j==="number"||T!=="auto")&&(R=Rc(F,O,"category")));var $=A6(j);if(!P||P.length===0){var k,I=(k=A.domain)!==null&&k!==void 0?k:$;if(O){if(P=Rc(F,O,j),j==="category"&&b){var H=NK(P);E&&H?(Y=P,P=iy(0,L)):E||(P=ak(I,P,S).reduce(function(G,Z){return G.indexOf(Z)>=0?G:[].concat(Ql(G),[Z])},[]))}else if(j==="category")E?P=P.filter(function(G){return G!==""&&!Ie(G)}):P=ak(I,P,S).reduce(function(G,Z){return G.indexOf(Z)>=0||Z===""||Ie(Z)?G:[].concat(Ql(G),[Z])},[]);else if(j==="number"){var V=yre(F,i.filter(function(G){var Z,ee,fe=l in G.props?G.props[l]:(Z=G.type.defaultProps)===null||Z===void 0?void 0:Z[l],pe="hide"in G.props?G.props.hide:(ee=G.type.defaultProps)===null||ee===void 0?void 0:ee.hide;return fe===q&&(D||!pe)}),O,o,y);V&&(P=V)}b&&(j==="number"||T!=="auto")&&(R=Rc(F,O,"category"))}else b?P=iy(0,L):c&&c[q]&&c[q].hasStack&&j==="number"?P=g==="expand"?[0,1]:yq(c[q].stackGroups,f,d):P=uq(F,i.filter(function(G){var Z=l in G.props?G.props[l]:G.type.defaultProps[l],ee="hide"in G.props?G.props.hide:G.type.defaultProps.hide;return Z===q&&(D||!ee)}),j,y,!0);if(j==="number")P=QS(p,P,q,o,C),I&&(P=yS(I,P,N));else if(j==="category"&&I){var K=I,z=P.every(function(G){return K.indexOf(G)>=0});z&&(P=K)}}return le(le({},_),{},Ce({},q,le(le({},A),{},{axisType:o,domain:P,categoricalDomain:R,duplicateDomain:Y,originalDomain:(x=A.domain)!==null&&x!==void 0?x:$,isCategorical:b,layout:y})))},{})},Mfe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,l=n.axisIdKey,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,y=t.layout,p=t.children,g=bm(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:d}),b=g.length,_=cq(y,o),S=-1;return r.reduce(function(x,A){var j=A.type.defaultProps!==void 0?le(le({},A.type.defaultProps),A.props):A.props,O=j[l],N=A6("number");if(!x[O]){S++;var E;return _?E=iy(0,b):c&&c[O]&&c[O].hasStack?(E=yq(c[O].stackGroups,f,d),E=QS(p,E,O,o)):(E=yS(N,uq(g,r.filter(function(T){var C,D,q=l in T.props?T.props[l]:(C=T.type.defaultProps)===null||C===void 0?void 0:C[l],F="hide"in T.props?T.props.hide:(D=T.type.defaultProps)===null||D===void 0?void 0:D.hide;return q===O&&!F}),"number",y),i.defaultProps.allowDataOverflow),E=QS(p,E,O,o)),le(le({},x),{},Ce({},O,le(le({axisType:o},i.defaultProps),{},{hide:!0,orientation:Gn(jfe,"".concat(o,".").concat(S%2),null),domain:E,originalDomain:N,isCategorical:_,layout:y})))}return x},{})},kfe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,l=n.graphicalItems,c=n.stackGroups,f=n.dataStartIndex,d=n.dataEndIndex,y=t.children,p="".concat(i,"Id"),g=lr(y,o),b={};return g&&g.length?b=Cfe(t,{axes:g,graphicalItems:l,axisType:i,axisIdKey:p,stackGroups:c,dataStartIndex:f,dataEndIndex:d}):l&&l.length&&(b=Mfe(t,{Axis:o,graphicalItems:l,axisType:i,axisIdKey:p,stackGroups:c,dataStartIndex:f,dataEndIndex:d})),b},Rfe=function(t){var n=ka(t),r=Mi(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:f2(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Gp(n,r)}},tP=function(t){var n=t.children,r=t.defaultShowTooltip,i=In(n,Ul),o=0,l=0;return t.data&&t.data.length!==0&&(l=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(l=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:l,activeTooltipIndex:-1,isTooltipActive:!!r}},Pfe=function(t){return!t||!t.length?!1:t.some(function(n){var r=Ri(n&&n.type);return r&&r.indexOf("Bar")>=0})},nP=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Dfe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,l=o===void 0?{}:o,c=t.yAxisMap,f=c===void 0?{}:c,d=r.width,y=r.height,p=r.children,g=r.margin||{},b=In(p,Ul),_=In(p,ul),S=Object.keys(f).reduce(function(E,T){var C=f[T],D=C.orientation;return!C.mirror&&!C.hide?le(le({},E),{},Ce({},D,E[D]+C.width)):E},{left:g.left||0,right:g.right||0}),x=Object.keys(l).reduce(function(E,T){var C=l[T],D=C.orientation;return!C.mirror&&!C.hide?le(le({},E),{},Ce({},D,Gn(E,"".concat(D))+C.height)):E},{top:g.top||0,bottom:g.bottom||0}),A=le(le({},x),S),j=A.bottom;b&&(A.bottom+=b.props.height||Ul.defaultProps.height),_&&n&&(A=hre(A,i,r,n));var O=d-A.left-A.right,N=y-A.top-A.bottom;return le(le({brushBottom:j},A),{},{width:Math.max(O,0),height:Math.max(N,0)})},$fe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},O6=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,l=t.validateTooltipEventTypes,c=l===void 0?["axis"]:l,f=t.axisComponents,d=t.legendContent,y=t.formatAxisMap,p=t.defaultProps,g=function(A,j){var O=j.graphicalItems,N=j.stackGroups,E=j.offset,T=j.updateId,C=j.dataStartIndex,D=j.dataEndIndex,q=A.barSize,F=A.layout,L=A.barGap,P=A.barCategoryGap,Y=A.maxBarSize,R=nP(F),$=R.numericAxisName,k=R.cateAxisName,I=Pfe(O),H=[];return O.forEach(function(V,K){var z=bm(A.data,{graphicalItems:[V],dataStartIndex:C,dataEndIndex:D}),G=V.type.defaultProps!==void 0?le(le({},V.type.defaultProps),V.props):V.props,Z=G.dataKey,ee=G.maxBarSize,fe=G["".concat($,"Id")],pe=G["".concat(k,"Id")],ye={},he=f.reduce(function(en,pn){var fr=j["".concat(pn.axisType,"Map")],kt=G["".concat(pn.axisType,"Id")];fr&&fr[kt]||pn.axisType==="zAxis"||Ko();var Zr=fr[kt];return le(le({},en),{},Ce(Ce({},pn.axisType,Zr),"".concat(pn.axisType,"Ticks"),Mi(Zr)))},ye),ae=he[k],ve=he["".concat(k,"Ticks")],me=N&&N[fe]&&N[fe].hasStack&&Are(V,N[fe].stackGroups),ie=Ri(V.type).indexOf("Bar")>=0,xe=Gp(ae,ve),we=[],Me=I&&fre({barSize:q,stackGroups:N,totalSize:$fe(he,k)});if(ie){var Ee,Ke,Ct=Ie(ee)?Y:ee,Mt=(Ee=(Ke=Gp(ae,ve,!0))!==null&&Ke!==void 0?Ke:Ct)!==null&&Ee!==void 0?Ee:0;we=dre({barGap:L,barCategoryGap:P,bandSize:Mt!==xe?Mt:xe,sizeList:Me[pe],maxBarSize:Ct}),Mt!==xe&&(we=we.map(function(en){return le(le({},en),{},{position:le(le({},en.position),{},{offset:en.position.offset-Mt/2})})}))}var sn=V&&V.type&&V.type.getComposedData;sn&&H.push({props:le(le({},sn(le(le({},he),{},{displayedData:z,props:A,dataKey:Z,item:V,bandSize:xe,barPosition:we,offset:E,stackedData:me,layout:F,dataStartIndex:C,dataEndIndex:D}))),{},Ce(Ce(Ce({key:V.key||"item-".concat(K)},$,he[$]),k,he[k]),"animationId",T)),childIndex:BK(V,A.children),item:V})}),H},b=function(A,j){var O=A.props,N=A.dataStartIndex,E=A.dataEndIndex,T=A.updateId;if(!NC({props:O}))return null;var C=O.children,D=O.layout,q=O.stackOffset,F=O.data,L=O.reverseStackOrder,P=nP(D),Y=P.numericAxisName,R=P.cateAxisName,$=lr(C,r),k=Sre(F,$,"".concat(Y,"Id"),"".concat(R,"Id"),q,L),I=f.reduce(function(G,Z){var ee="".concat(Z.axisType,"Map");return le(le({},G),{},Ce({},ee,kfe(O,le(le({},Z),{},{graphicalItems:$,stackGroups:Z.axisType===Y&&k,dataStartIndex:N,dataEndIndex:E}))))},{}),H=Dfe(le(le({},I),{},{props:O,graphicalItems:$}),j==null?void 0:j.legendBBox);Object.keys(I).forEach(function(G){I[G]=y(O,I[G],H,G.replace("Map",""),n)});var V=I["".concat(R,"Map")],K=Rfe(V),z=g(O,le(le({},I),{},{dataStartIndex:N,dataEndIndex:E,updateId:T,graphicalItems:$,stackGroups:k,offset:H}));return le(le({formattedGraphicalItems:z,graphicalItems:$,offset:H,stackGroups:k},K),I)},_=(function(x){function A(j){var O,N,E;return yfe(this,A),E=vfe(this,A,[j]),Ce(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ce(E,"accessibilityManager",new tfe),Ce(E,"handleLegendBBoxUpdate",function(T){if(T){var C=E.state,D=C.dataStartIndex,q=C.dataEndIndex,F=C.updateId;E.setState(le({legendBBox:T},b({props:E.props,dataStartIndex:D,dataEndIndex:q,updateId:F},le(le({},E.state),{},{legendBBox:T}))))}}),Ce(E,"handleReceiveSyncEvent",function(T,C,D){if(E.props.syncId===T){if(D===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(C)}}),Ce(E,"handleBrushChange",function(T){var C=T.startIndex,D=T.endIndex;if(C!==E.state.dataStartIndex||D!==E.state.dataEndIndex){var q=E.state.updateId;E.setState(function(){return le({dataStartIndex:C,dataEndIndex:D},b({props:E.props,dataStartIndex:C,dataEndIndex:D,updateId:q},E.state))}),E.triggerSyncEvent({dataStartIndex:C,dataEndIndex:D})}}),Ce(E,"handleMouseEnter",function(T){var C=E.getMouseInfo(T);if(C){var D=le(le({},C),{},{isTooltipActive:!0});E.setState(D),E.triggerSyncEvent(D);var q=E.props.onMouseEnter;Pe(q)&&q(D,T)}}),Ce(E,"triggeredAfterMouseMove",function(T){var C=E.getMouseInfo(T),D=C?le(le({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(D),E.triggerSyncEvent(D);var q=E.props.onMouseMove;Pe(q)&&q(D,T)}),Ce(E,"handleItemMouseEnter",function(T){E.setState(function(){return{isTooltipActive:!0,activeItem:T,activePayload:T.tooltipPayload,activeCoordinate:T.tooltipPosition||{x:T.cx,y:T.cy}}})}),Ce(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),Ce(E,"handleMouseMove",function(T){T.persist(),E.throttleTriggeredAfterMouseMove(T)}),Ce(E,"handleMouseLeave",function(T){E.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};E.setState(C),E.triggerSyncEvent(C);var D=E.props.onMouseLeave;Pe(D)&&D(C,T)}),Ce(E,"handleOuterEvent",function(T){var C=zK(T),D=Gn(E.props,"".concat(C));if(C&&Pe(D)){var q,F;/.*touch.*/i.test(C)?F=E.getMouseInfo(T.changedTouches[0]):F=E.getMouseInfo(T),D((q=F)!==null&&q!==void 0?q:{},T)}}),Ce(E,"handleClick",function(T){var C=E.getMouseInfo(T);if(C){var D=le(le({},C),{},{isTooltipActive:!0});E.setState(D),E.triggerSyncEvent(D);var q=E.props.onClick;Pe(q)&&q(D,T)}}),Ce(E,"handleMouseDown",function(T){var C=E.props.onMouseDown;if(Pe(C)){var D=E.getMouseInfo(T);C(D,T)}}),Ce(E,"handleMouseUp",function(T){var C=E.props.onMouseUp;if(Pe(C)){var D=E.getMouseInfo(T);C(D,T)}}),Ce(E,"handleTouchMove",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(T.changedTouches[0])}),Ce(E,"handleTouchStart",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.handleMouseDown(T.changedTouches[0])}),Ce(E,"handleTouchEnd",function(T){T.changedTouches!=null&&T.changedTouches.length>0&&E.handleMouseUp(T.changedTouches[0])}),Ce(E,"handleDoubleClick",function(T){var C=E.props.onDoubleClick;if(Pe(C)){var D=E.getMouseInfo(T);C(D,T)}}),Ce(E,"handleContextMenu",function(T){var C=E.props.onContextMenu;if(Pe(C)){var D=E.getMouseInfo(T);C(D,T)}}),Ce(E,"triggerSyncEvent",function(T){E.props.syncId!==void 0&&lw.emit(uw,E.props.syncId,T,E.eventEmitterSymbol)}),Ce(E,"applySyncEvent",function(T){var C=E.props,D=C.layout,q=C.syncMethod,F=E.state.updateId,L=T.dataStartIndex,P=T.dataEndIndex;if(T.dataStartIndex!==void 0||T.dataEndIndex!==void 0)E.setState(le({dataStartIndex:L,dataEndIndex:P},b({props:E.props,dataStartIndex:L,dataEndIndex:P,updateId:F},E.state)));else if(T.activeTooltipIndex!==void 0){var Y=T.chartX,R=T.chartY,$=T.activeTooltipIndex,k=E.state,I=k.offset,H=k.tooltipTicks;if(!I)return;if(typeof q=="function")$=q(H,T);else if(q==="value"){$=-1;for(var V=0;V<H.length;V++)if(H[V].value===T.activeLabel){$=V;break}}var K=le(le({},I),{},{x:I.left,y:I.top}),z=Math.min(Y,K.x+K.width),G=Math.min(R,K.y+K.height),Z=H[$]&&H[$].value,ee=e_(E.state,E.props.data,$),fe=H[$]?{x:D==="horizontal"?H[$].coordinate:z,y:D==="horizontal"?G:H[$].coordinate}:_6;E.setState(le(le({},T),{},{activeLabel:Z,activeCoordinate:fe,activePayload:ee,activeTooltipIndex:$}))}else E.setState(T)}),Ce(E,"renderCursor",function(T){var C,D=E.state,q=D.isTooltipActive,F=D.activeCoordinate,L=D.activePayload,P=D.offset,Y=D.activeTooltipIndex,R=D.tooltipAxisBandSize,$=E.getTooltipEventType(),k=(C=T.props.active)!==null&&C!==void 0?C:q,I=E.props.layout,H=T.key||"_recharts-cursor";return W.createElement(lfe,{key:H,activeCoordinate:F,activePayload:L,activeTooltipIndex:Y,chartName:n,element:T,isActive:k,layout:I,offset:P,tooltipAxisBandSize:R,tooltipEventType:$})}),Ce(E,"renderPolarAxis",function(T,C,D){var q=Gn(T,"type.axisType"),F=Gn(E.state,"".concat(q,"Map")),L=T.type.defaultProps,P=L!==void 0?le(le({},L),T.props):T.props,Y=F&&F[P["".concat(q,"Id")]];return U.cloneElement(T,le(le({},Y),{},{className:Be(q,Y.className),key:T.key||"".concat(C,"-").concat(D),ticks:Mi(Y,!0)}))}),Ce(E,"renderPolarGrid",function(T){var C=T.props,D=C.radialLines,q=C.polarAngles,F=C.polarRadius,L=E.state,P=L.radiusAxisMap,Y=L.angleAxisMap,R=ka(P),$=ka(Y),k=$.cx,I=$.cy,H=$.innerRadius,V=$.outerRadius;return U.cloneElement(T,{polarAngles:Array.isArray(q)?q:Mi($,!0).map(function(K){return K.coordinate}),polarRadius:Array.isArray(F)?F:Mi(R,!0).map(function(K){return K.coordinate}),cx:k,cy:I,innerRadius:H,outerRadius:V,key:T.key||"polar-grid",radialLines:D})}),Ce(E,"renderLegend",function(){var T=E.state.formattedGraphicalItems,C=E.props,D=C.children,q=C.width,F=C.height,L=E.props.margin||{},P=q-(L.left||0)-(L.right||0),Y=sq({children:D,formattedGraphicalItems:T,legendWidth:P,legendContent:d});if(!Y)return null;var R=Y.item,$=ZR(Y,ufe);return U.cloneElement(R,le(le({},$),{},{chartWidth:q,chartHeight:F,margin:L,onBBoxUpdate:E.handleLegendBBoxUpdate}))}),Ce(E,"renderTooltip",function(){var T,C=E.props,D=C.children,q=C.accessibilityLayer,F=In(D,Sr);if(!F)return null;var L=E.state,P=L.isTooltipActive,Y=L.activeCoordinate,R=L.activePayload,$=L.activeLabel,k=L.offset,I=(T=F.props.active)!==null&&T!==void 0?T:P;return U.cloneElement(F,{viewBox:le(le({},k),{},{x:k.left,y:k.top}),active:I,label:$,payload:I?R:[],coordinate:Y,accessibilityLayer:q})}),Ce(E,"renderBrush",function(T){var C=E.props,D=C.margin,q=C.data,F=E.state,L=F.offset,P=F.dataStartIndex,Y=F.dataEndIndex,R=F.updateId;return U.cloneElement(T,{key:T.key||"_recharts-brush",onChange:Ih(E.handleBrushChange,T.props.onChange),data:q,x:ge(T.props.x)?T.props.x:L.left,y:ge(T.props.y)?T.props.y:L.top+L.height+L.brushBottom-(D.bottom||0),width:ge(T.props.width)?T.props.width:L.width,startIndex:P,endIndex:Y,updateId:"brush-".concat(R)})}),Ce(E,"renderReferenceElement",function(T,C,D){if(!T)return null;var q=E,F=q.clipPathId,L=E.state,P=L.xAxisMap,Y=L.yAxisMap,R=L.offset,$=T.type.defaultProps||{},k=T.props,I=k.xAxisId,H=I===void 0?$.xAxisId:I,V=k.yAxisId,K=V===void 0?$.yAxisId:V;return U.cloneElement(T,{key:T.key||"".concat(C,"-").concat(D),xAxis:P[H],yAxis:Y[K],viewBox:{x:R.left,y:R.top,width:R.width,height:R.height},clipPathId:F})}),Ce(E,"renderActivePoints",function(T){var C=T.item,D=T.activePoint,q=T.basePoint,F=T.childIndex,L=T.isRange,P=[],Y=C.props.key,R=C.item.type.defaultProps!==void 0?le(le({},C.item.type.defaultProps),C.item.props):C.item.props,$=R.activeDot,k=R.dataKey,I=le(le({index:F,dataKey:k,cx:D.x,cy:D.y,r:4,fill:P2(C.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},ke($,!1)),_p($));return P.push(A.renderActiveDot($,I,"".concat(Y,"-activePoint-").concat(F))),q?P.push(A.renderActiveDot($,le(le({},I),{},{cx:q.x,cy:q.y}),"".concat(Y,"-basePoint-").concat(F))):L&&P.push(null),P}),Ce(E,"renderGraphicChild",function(T,C,D){var q=E.filterFormatItem(T,C,D);if(!q)return null;var F=E.getTooltipEventType(),L=E.state,P=L.isTooltipActive,Y=L.tooltipAxis,R=L.activeTooltipIndex,$=L.activeLabel,k=E.props.children,I=In(k,Sr),H=q.props,V=H.points,K=H.isRange,z=H.baseLine,G=q.item.type.defaultProps!==void 0?le(le({},q.item.type.defaultProps),q.item.props):q.item.props,Z=G.activeDot,ee=G.hide,fe=G.activeBar,pe=G.activeShape,ye=!!(!ee&&P&&I&&(Z||fe||pe)),he={};F!=="axis"&&I&&I.props.trigger==="click"?he={onClick:Ih(E.handleItemMouseEnter,T.props.onClick)}:F!=="axis"&&(he={onMouseLeave:Ih(E.handleItemMouseLeave,T.props.onMouseLeave),onMouseEnter:Ih(E.handleItemMouseEnter,T.props.onMouseEnter)});var ae=U.cloneElement(T,le(le({},q.props),he));function ve(pn){return typeof Y.dataKey=="function"?Y.dataKey(pn.payload):null}if(ye)if(R>=0){var me,ie;if(Y.dataKey&&!Y.allowDuplicatedCategory){var xe=typeof Y.dataKey=="function"?ve:"payload.".concat(Y.dataKey.toString());me=qw(V,xe,$),ie=K&&z&&qw(z,xe,$)}else me=V==null?void 0:V[R],ie=K&&z&&z[R];if(pe||fe){var we=T.props.activeIndex!==void 0?T.props.activeIndex:R;return[U.cloneElement(T,le(le(le({},q.props),he),{},{activeIndex:we})),null,null]}if(!Ie(me))return[ae].concat(Ql(E.renderActivePoints({item:q,activePoint:me,basePoint:ie,childIndex:R,isRange:K})))}else{var Me,Ee=(Me=E.getItemByXY(E.state.activeCoordinate))!==null&&Me!==void 0?Me:{graphicalItem:ae},Ke=Ee.graphicalItem,Ct=Ke.item,Mt=Ct===void 0?T:Ct,sn=Ke.childIndex,en=le(le(le({},q.props),he),{},{activeIndex:sn});return[U.cloneElement(Mt,en),null,null]}return K?[ae,null,null]:[ae,null]}),Ce(E,"renderCustomized",function(T,C,D){return U.cloneElement(T,le(le({key:"recharts-customized-".concat(D)},E.props),E.state))}),Ce(E,"renderMap",{CartesianGrid:{handler:Fh,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Fh},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Fh},YAxis:{handler:Fh},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((O=j.id)!==null&&O!==void 0?O:Ff("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=c$(E.triggeredAfterMouseMove,(N=j.throttleDelay)!==null&&N!==void 0?N:1e3/60),E.state={},E}return wfe(A,x),gfe(A,[{key:"componentDidMount",value:function(){var O,N;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var O=this.props,N=O.children,E=O.data,T=O.height,C=O.layout,D=In(N,Sr);if(D){var q=D.props.defaultIndex;if(!(typeof q!="number"||q<0||q>this.state.tooltipTicks.length-1)){var F=this.state.tooltipTicks[q]&&this.state.tooltipTicks[q].value,L=e_(this.state,E,q,F),P=this.state.tooltipTicks[q].coordinate,Y=(this.state.offset.top+T)/2,R=C==="horizontal",$=R?{x:P,y:Y}:{y:P,x:Y},k=this.state.formattedGraphicalItems.find(function(H){var V=H.item;return V.type.name==="Scatter"});k&&($=le(le({},$),k.props.points[q].tooltipPosition),L=k.props.points[q].tooltipPayload);var I={activeTooltipIndex:q,isTooltipActive:!0,activeLabel:F,activePayload:L,activeCoordinate:$};this.setState(I),this.renderCursor(D),this.accessibilityManager.setIndex(q)}}}},{key:"getSnapshotBeforeUpdate",value:function(O,N){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==N.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==O.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==O.margin){var E,T;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(T=this.props.margin.top)!==null&&T!==void 0?T:0}})}return null}},{key:"componentDidUpdate",value:function(O){zw([In(O.children,Sr)],[In(this.props.children,Sr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var O=In(this.props.children,Sr);if(O&&typeof O.props.shared=="boolean"){var N=O.props.shared?"axis":"item";return c.indexOf(N)>=0?N:o}return o}},{key:"getMouseInfo",value:function(O){if(!this.container)return null;var N=this.container,E=N.getBoundingClientRect(),T=jJ(E),C={chartX:Math.round(O.pageX-T.left),chartY:Math.round(O.pageY-T.top)},D=E.width/N.offsetWidth||1,q=this.inRange(C.chartX,C.chartY,D);if(!q)return null;var F=this.state,L=F.xAxisMap,P=F.yAxisMap,Y=this.getTooltipEventType(),R=eP(this.state,this.props.data,this.props.layout,q);if(Y!=="axis"&&L&&P){var $=ka(L).scale,k=ka(P).scale,I=$&&$.invert?$.invert(C.chartX):null,H=k&&k.invert?k.invert(C.chartY):null;return le(le({},C),{},{xValue:I,yValue:H},R)}return R?le(le({},C),R):null}},{key:"inRange",value:function(O,N){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,T=this.props.layout,C=O/E,D=N/E;if(T==="horizontal"||T==="vertical"){var q=this.state.offset,F=C>=q.left&&C<=q.left+q.width&&D>=q.top&&D<=q.top+q.height;return F?{x:C,y:D}:null}var L=this.state,P=L.angleAxisMap,Y=L.radiusAxisMap;if(P&&Y){var R=ka(P);return lk({x:C,y:D},R)}return null}},{key:"parseEventsOfWrapper",value:function(){var O=this.props.children,N=this.getTooltipEventType(),E=In(O,Sr),T={};E&&N==="axis"&&(E.props.trigger==="click"?T={onClick:this.handleClick}:T={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var C=_p(this.props,this.handleOuterEvent);return le(le({},C),T)}},{key:"addListener",value:function(){lw.on(uw,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){lw.removeListener(uw,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(O,N,E){for(var T=this.state.formattedGraphicalItems,C=0,D=T.length;C<D;C++){var q=T[C];if(q.item===O||q.props.key===O.key||N===Ri(q.item.type)&&E===q.childIndex)return q}return null}},{key:"renderClipPath",value:function(){var O=this.clipPathId,N=this.state.offset,E=N.left,T=N.top,C=N.height,D=N.width;return W.createElement("defs",null,W.createElement("clipPath",{id:O},W.createElement("rect",{x:E,y:T,height:C,width:D})))}},{key:"getXScales",value:function(){var O=this.state.xAxisMap;return O?Object.entries(O).reduce(function(N,E){var T=QR(E,2),C=T[0],D=T[1];return le(le({},N),{},Ce({},C,D.scale))},{}):null}},{key:"getYScales",value:function(){var O=this.state.yAxisMap;return O?Object.entries(O).reduce(function(N,E){var T=QR(E,2),C=T[0],D=T[1];return le(le({},N),{},Ce({},C,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(O){var N;return(N=this.state.xAxisMap)===null||N===void 0||(N=N[O])===null||N===void 0?void 0:N.scale}},{key:"getYScaleByAxisId",value:function(O){var N;return(N=this.state.yAxisMap)===null||N===void 0||(N=N[O])===null||N===void 0?void 0:N.scale}},{key:"getItemByXY",value:function(O){var N=this.state,E=N.formattedGraphicalItems,T=N.activeItem;if(E&&E.length)for(var C=0,D=E.length;C<D;C++){var q=E[C],F=q.props,L=q.item,P=L.type.defaultProps!==void 0?le(le({},L.type.defaultProps),L.props):L.props,Y=Ri(L.type);if(Y==="Bar"){var R=(F.data||[]).find(function(H){return _oe(O,H)});if(R)return{graphicalItem:q,payload:R}}else if(Y==="RadialBar"){var $=(F.data||[]).find(function(H){return lk(O,H)});if($)return{graphicalItem:q,payload:$}}else if(cm(q,T)||fm(q,T)||_f(q,T)){var k=Fse({graphicalItem:q,activeTooltipItem:T,itemData:P.data}),I=P.activeIndex===void 0?k:P.activeIndex;return{graphicalItem:le(le({},q),{},{childIndex:I}),payload:_f(q,T)?P.data[k]:q.props.data[k]}}}return null}},{key:"render",value:function(){var O=this;if(!NC(this))return null;var N=this.props,E=N.children,T=N.className,C=N.width,D=N.height,q=N.style,F=N.compact,L=N.title,P=N.desc,Y=ZR(N,cfe),R=ke(Y,!1);if(F)return W.createElement(DR,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement(Iw,rl({},R,{width:C,height:D,title:L,desc:P}),this.renderClipPath(),CC(E,this.renderMap)));if(this.props.accessibilityLayer){var $,k;R.tabIndex=($=this.props.tabIndex)!==null&&$!==void 0?$:0,R.role=(k=this.props.role)!==null&&k!==void 0?k:"application",R.onKeyDown=function(H){O.accessibilityManager.keyboardEvent(H)},R.onFocus=function(){O.accessibilityManager.focus()}}var I=this.parseEventsOfWrapper();return W.createElement(DR,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement("div",rl({className:Be("recharts-wrapper",T),style:le({position:"relative",cursor:"default",width:C,height:D},q)},I,{ref:function(V){O.container=V}}),W.createElement(Iw,rl({},R,{width:C,height:D,title:L,desc:P,style:Efe}),this.renderClipPath(),CC(E,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(U.Component);Ce(_,"displayName",n),Ce(_,"defaultProps",le({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),Ce(_,"getDerivedStateFromProps",function(x,A){var j=x.dataKey,O=x.data,N=x.children,E=x.width,T=x.height,C=x.layout,D=x.stackOffset,q=x.margin,F=A.dataStartIndex,L=A.dataEndIndex;if(A.updateId===void 0){var P=tP(x);return le(le(le({},P),{},{updateId:0},b(le(le({props:x},P),{},{updateId:0}),A)),{},{prevDataKey:j,prevData:O,prevWidth:E,prevHeight:T,prevLayout:C,prevStackOffset:D,prevMargin:q,prevChildren:N})}if(j!==A.prevDataKey||O!==A.prevData||E!==A.prevWidth||T!==A.prevHeight||C!==A.prevLayout||D!==A.prevStackOffset||!ll(q,A.prevMargin)){var Y=tP(x),R={chartX:A.chartX,chartY:A.chartY,isTooltipActive:A.isTooltipActive},$=le(le({},eP(A,O,C)),{},{updateId:A.updateId+1}),k=le(le(le({},Y),R),$);return le(le(le({},k),b(le({props:x},k),A)),{},{prevDataKey:j,prevData:O,prevWidth:E,prevHeight:T,prevLayout:C,prevStackOffset:D,prevMargin:q,prevChildren:N})}if(!zw(N,A.prevChildren)){var I,H,V,K,z=In(N,Ul),G=z&&(I=(H=z.props)===null||H===void 0?void 0:H.startIndex)!==null&&I!==void 0?I:F,Z=z&&(V=(K=z.props)===null||K===void 0?void 0:K.endIndex)!==null&&V!==void 0?V:L,ee=G!==F||Z!==L,fe=!Ie(O),pe=fe&&!ee?A.updateId:A.updateId+1;return le(le({updateId:pe},b(le(le({props:x},A),{},{updateId:pe,dataStartIndex:G,dataEndIndex:Z}),A)),{},{prevChildren:N,dataStartIndex:G,dataEndIndex:Z})}return null}),Ce(_,"renderActiveDot",function(x,A,j){var O;return U.isValidElement(x)?O=U.cloneElement(x,A):Pe(x)?O=x(A):O=W.createElement($2,A),W.createElement(at,{className:"recharts-active-dot",key:j},O)});var S=U.forwardRef(function(A,j){return W.createElement(_,rl({},A,{ref:j}))});return S.displayName=_.displayName,S},qfe=O6({chartName:"BarChart",GraphicalChild:rs,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:gm},{axisType:"yAxis",AxisComp:vm}],formatAxisMap:Kle}),Lfe=O6({chartName:"PieChart",GraphicalChild:Gi,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:um},{axisType:"radiusAxis",AxisComp:sm}],formatAxisMap:Pre,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function zfe(){const{metrics:e,endpointStats:t}=wt();if(!e)return m.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-gray-500",children:[m.jsx(Bo,{className:"w-12 h-12 mb-4 opacity-50"}),m.jsx("p",{className:"text-lg",children:"No metrics available"}),m.jsx("p",{className:"text-sm mt-2",children:"Connect to the Studio Agent to view metrics"})]});const n=e.requestCount>0?(e.errorCount/e.requestCount*100).toFixed(1):"0";return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[m.jsx(Xh,{icon:Bo,label:"Total Requests",value:e.requestCount.toLocaleString(),color:"text-primary-400"}),m.jsx(Xh,{icon:ru,label:"Error Rate",value:`${n}%`,color:parseFloat(n)>5?"text-error-500":"text-success-500"}),m.jsx(Xh,{icon:up,label:"Avg Response",value:Vn(e.avgResponseTime),color:"text-warning-500"}),m.jsx(Xh,{icon:S_,label:"P95 Latency",value:Vn(e.p95ResponseTime),color:"text-accent-400"})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[m.jsxs("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-6",children:[m.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Response Time Percentiles"}),m.jsx(Z3,{width:"100%",height:250,children:m.jsxs(qfe,{data:[{name:"P50",value:e.p50ResponseTime},{name:"P95",value:e.p95ResponseTime},{name:"P99",value:e.p99ResponseTime}],children:[m.jsx(f6,{strokeDasharray:"3 3",stroke:"#374151"}),m.jsx(gm,{dataKey:"name",stroke:"#9ca3af"}),m.jsx(vm,{stroke:"#9ca3af",tickFormatter:r=>`${r}ms`}),m.jsx(Sr,{contentStyle:{backgroundColor:"#1f2937",border:"1px solid #374151",borderRadius:"8px"},labelStyle:{color:"#fff"},formatter:r=>[`${r.toFixed(2)}ms`,"Duration"]}),m.jsx(rs,{dataKey:"value",fill:"#3de678",radius:[4,4,0,0]})]})})]}),m.jsxs("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-6",children:[m.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Memory Usage"}),m.jsx("div",{className:"flex items-center justify-center h-[250px]",children:m.jsx(Z3,{width:"100%",height:200,children:m.jsxs(Lfe,{children:[m.jsxs(Gi,{data:[{name:"Heap Used",value:e.memoryUsage.heapUsed},{name:"Heap Free",value:e.memoryUsage.heapTotal-e.memoryUsage.heapUsed}],cx:"50%",cy:"50%",innerRadius:60,outerRadius:80,paddingAngle:5,dataKey:"value",children:[m.jsx(tf,{fill:"#3de678"}),m.jsx(tf,{fill:"#374151"})]}),m.jsx(Sr,{contentStyle:{backgroundColor:"#1f2937",border:"1px solid #374151",borderRadius:"8px"},formatter:r=>Ei(r)})]})})}),m.jsxs("div",{className:"flex justify-center gap-8 text-sm",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-3 h-3 rounded bg-primary-500"}),m.jsxs("span",{className:"text-gray-400",children:["Used: ",Ei(e.memoryUsage.heapUsed)]})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-3 h-3 rounded bg-gray-600"}),m.jsxs("span",{className:"text-gray-400",children:["Total: ",Ei(e.memoryUsage.heapTotal)]})]})]})]})]}),m.jsx(Ufe,{endpointStats:t}),m.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[m.jsx("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-4",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(S7,{className:"w-5 h-5 text-gray-500"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-gray-500",children:"RSS Memory"}),m.jsx("p",{className:"text-lg font-semibold text-white",children:Ei(e.memoryUsage.rss)})]})]})}),m.jsx("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-4",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(U7,{className:"w-5 h-5 text-gray-500"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-gray-500",children:"Active Connections"}),m.jsx("p",{className:"text-lg font-semibold text-white",children:e.activeConnections})]})]})}),m.jsx("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-4",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(up,{className:"w-5 h-5 text-gray-500"}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-gray-500",children:"Uptime"}),m.jsx("p",{className:"text-lg font-semibold text-white",children:Vn(e.uptime)})]})]})})]})]})}const ja={method:"Method",path:"Route",requestCount:"Reqs",errorRate:"Err %",p50Duration:"p50",p95Duration:"p95",p99Duration:"p99",maxDuration:"Max"};function rP(e){return e.requestCount===0?0:e.errorCount/e.requestCount*100}function Yh(e){return e>=500?"text-error-400":e>=200?"text-warning-500":"text-gray-300"}function Bfe(e){return e>=5?"text-error-400":e>=1?"text-warning-500":e>0?"text-yellow-500":"text-gray-500"}function Ife(e){switch(e){case"GET":return"bg-green-500/10 text-green-400";case"POST":return"bg-blue-500/10 text-blue-400";case"PUT":case"PATCH":return"bg-yellow-500/10 text-yellow-400";case"DELETE":return"bg-red-500/10 text-red-400";default:return"bg-gray-500/10 text-gray-400"}}function Ufe({endpointStats:e}){const[t,n]=U.useState("p95Duration"),[r,i]=U.useState("desc"),[o,l]=U.useState(""),c=U.useMemo(()=>{const d=o?e.filter(p=>`${p.method} ${p.path}`.toLowerCase().includes(o.toLowerCase())):e,y=p=>{switch(t){case"method":return p.method;case"path":return p.path;case"errorRate":return rP(p);default:return p[t]}};return[...d].sort((p,g)=>{const b=y(p),_=y(g);return typeof b=="string"&&typeof _=="string"?r==="asc"?b.localeCompare(_):_.localeCompare(b):r==="asc"?Number(b)-Number(_):Number(_)-Number(b)})},[e,t,r,o]);function f(d){t===d?i(r==="asc"?"desc":"asc"):(n(d),i(d==="method"||d==="path"?"asc":"desc"))}return m.jsxs("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-6",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4 gap-3 flex-wrap",children:[m.jsxs("div",{children:[m.jsx("h3",{className:"text-lg font-semibold text-white",children:"Per-route performance"}),m.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Latency percentiles and error rate per endpoint, computed from the last 100 requests per route."})]}),m.jsx("input",{type:"text",value:o,onChange:d=>l(d.target.value),placeholder:"Filter routes…",className:"px-3 py-2 text-sm bg-gray-800 border border-gray-700 rounded focus:outline-none focus:border-primary-500 w-48"})]}),e.length===0?m.jsx("p",{className:"text-gray-500 text-center py-8 text-sm",children:"No requests recorded yet — endpoint stats will populate as traffic flows."}):m.jsx("div",{className:"overflow-x-auto",children:m.jsxs("table",{className:"w-full text-sm",children:[m.jsx("thead",{children:m.jsxs("tr",{className:"text-left text-xs uppercase tracking-wider text-gray-500 border-b border-gray-800",children:[m.jsx(Ea,{label:ja.method,active:t==="method",dir:r,onClick:()=>f("method"),className:"w-20"}),m.jsx(Ea,{label:ja.path,active:t==="path",dir:r,onClick:()=>f("path")}),m.jsx(Ea,{label:ja.requestCount,active:t==="requestCount",dir:r,onClick:()=>f("requestCount"),align:"right"}),m.jsx(Ea,{label:ja.errorRate,active:t==="errorRate",dir:r,onClick:()=>f("errorRate"),align:"right"}),m.jsx(Ea,{label:ja.p50Duration,active:t==="p50Duration",dir:r,onClick:()=>f("p50Duration"),align:"right"}),m.jsx(Ea,{label:ja.p95Duration,active:t==="p95Duration",dir:r,onClick:()=>f("p95Duration"),align:"right"}),m.jsx(Ea,{label:ja.p99Duration,active:t==="p99Duration",dir:r,onClick:()=>f("p99Duration"),align:"right"}),m.jsx(Ea,{label:ja.maxDuration,active:t==="maxDuration",dir:r,onClick:()=>f("maxDuration"),align:"right"})]})}),m.jsxs("tbody",{className:"divide-y divide-gray-800/60",children:[c.map(d=>{const y=rP(d);return m.jsxs("tr",{className:"hover:bg-gray-800/30",children:[m.jsx("td",{className:"py-2.5",children:m.jsx("span",{className:be("inline-block w-14 text-[11px] font-mono px-2 py-0.5 rounded text-center font-semibold",Ife(d.method)),children:d.method})}),m.jsx("td",{className:"py-2.5 font-mono text-gray-300 truncate max-w-[300px]",children:d.path}),m.jsx("td",{className:"py-2.5 text-right text-gray-300 tabular-nums",children:d.requestCount.toLocaleString()}),m.jsxs("td",{className:be("py-2.5 text-right tabular-nums",Bfe(y)),children:[y===0?"—":`${y.toFixed(1)}%`,d.errorCount>0&&m.jsxs("span",{className:"text-gray-500 ml-1 text-xs",children:["(",d.errorCount,")"]})]}),m.jsx("td",{className:be("py-2.5 text-right tabular-nums",Yh(d.p50Duration)),children:Vn(d.p50Duration)}),m.jsx("td",{className:be("py-2.5 text-right tabular-nums font-medium",Yh(d.p95Duration)),children:Vn(d.p95Duration)}),m.jsx("td",{className:be("py-2.5 text-right tabular-nums",Yh(d.p99Duration)),children:Vn(d.p99Duration)}),m.jsx("td",{className:be("py-2.5 text-right tabular-nums",Yh(d.maxDuration)),children:Vn(d.maxDuration)})]},`${d.method}:${d.path}`)}),c.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:8,className:"py-8 text-center text-gray-500 text-sm",children:"No routes match the current filter."})})]})]})})]})}function Ea({label:e,active:t,dir:n,onClick:r,align:i="left",className:o}){return m.jsx("th",{className:be("pb-2 font-medium",o),children:m.jsxs("button",{onClick:r,className:be("flex items-center gap-1 hover:text-white transition-colors",i==="right"&&"ml-auto",t?"text-primary-300":"text-gray-500"),children:[m.jsx("span",{children:e}),t?n==="asc"?m.jsx(h7,{className:"w-3 h-3"}):m.jsx(r4,{className:"w-3 h-3"}):m.jsx(d7,{className:"w-3 h-3 opacity-50"})]})})}function Xh({icon:e,label:t,value:n,color:r}){return m.jsx("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-6",children:m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(e,{className:be("w-8 h-8",r)}),m.jsxs("div",{children:[m.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:t}),m.jsx("p",{className:be("text-2xl font-bold",r),children:n})]})]})})}const Hfe=8;function iP(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function aP(e,t){return typeof t=="number"?`${e}[${t}]`:e?/^[A-Za-z_][A-Za-z0-9_]*$/.test(t)?`${e}.${t}`:`${e}[${JSON.stringify(t)}]`:t}function Vfe(e,t){const n=[];t_(e,t,"",0,n);const r=n.filter(l=>l.kind==="added").length,i=n.filter(l=>l.kind==="removed").length,o=n.filter(l=>l.kind==="changed").length;return{changes:n,added:r,removed:i,changed:o,identical:r+i+o===0}}function t_(e,t,n,r,i){if(Object.is(e,t))return;if(r>Hfe){i.push({path:n,kind:"changed",before:e,after:t});return}const o=Array.isArray(e),l=Array.isArray(t),c=iP(e),f=iP(t);if(o&&l){const d=Math.max(e.length,t.length);for(let y=0;y<d;y++){const p=y<e.length,g=y<t.length,b=aP(n,y);p?g?t_(e[y],t[y],b,r+1,i):i.push({path:b,kind:"removed",before:e[y]}):i.push({path:b,kind:"added",after:t[y]})}return}if(c&&f){const d=new Set([...Object.keys(e),...Object.keys(t)]);for(const y of d){const p=y in e,g=y in t,b=aP(n,y);p?g?t_(e[y],t[y],b,r+1,i):i.push({path:b,kind:"removed",before:e[y]}):i.push({path:b,kind:"added",after:t[y]})}return}e===void 0?i.push({path:n,kind:"added",after:t}):t===void 0?i.push({path:n,kind:"removed",before:e}):Gfe(e,t)||i.push({path:n,kind:"changed",before:e,after:t})}function Gfe(e,t){if(Object.is(e,t))return!0;if(typeof e!=typeof t)return!1;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}const Ffe=new Set(["date","content-length","etag","last-modified","x-request-id","x-trace-id","x-response-time"]);function Yfe(e={},t={}){const n=[],r=c=>{const f={};for(const[d,y]of Object.entries(c)){const p=d.toLowerCase();Ffe.has(p)||(f[p]=String(y))}return f},i=r(e),o=r(t),l=new Set([...Object.keys(i),...Object.keys(o)]);for(const c of l)c in i?c in o?i[c]!==o[c]&&n.push({name:c,before:i[c],after:o[c],kind:"changed"}):n.push({name:c,before:i[c],kind:"removed"}):n.push({name:c,after:o[c],kind:"added"});return n.sort((c,f)=>c.name.localeCompare(f.name))}function Xfe({payload:e}){const t=U.useMemo(()=>Yfe(e.original.headers,e.replay.headers),[e.original.headers,e.replay.headers]),n=U.useMemo(()=>Vfe(e.original.body,e.replay.body),[e.original.body,e.replay.body]),r=e.original.statusCode===e.replay.statusCode,i=e.original.duration>0?(e.replay.duration-e.original.duration)/e.original.duration*100:0;return m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[m.jsx(oP,{label:"Original",statusCode:e.original.statusCode,statusMessage:e.original.statusMessage,duration:e.original.duration}),m.jsx(oP,{label:"Replay",statusCode:e.replay.statusCode,statusMessage:e.replay.statusMessage,duration:e.replay.duration,deltaPct:i})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[m.jsx(Kh,{kind:r?"success":"error",icon:r?Sy:Bi,label:r?"Same status code":`Status ${e.original.statusCode} → ${e.replay.statusCode}`}),m.jsx(Kh,{kind:t.length===0?"success":"warn",icon:A7,label:t.length===0?"Headers identical":`${t.length} header${t.length===1?"":"s"} changed`}),m.jsx(Kh,{kind:n.identical?"success":"warn",icon:u4,label:n.identical?"Body identical":`Body: +${n.added} −${n.removed} ~${n.changed}`}),m.jsx(Kh,{kind:Math.abs(i)<25?"neutral":i<0?"success":"warn",icon:Bo,label:e.original.duration===0?`${Vn(e.replay.duration)}`:`${i>=0?"+":""}${i.toFixed(0)}% duration`})]}),t.length>0&&m.jsx(sP,{title:"Response headers diff",defaultOpen:!0,children:m.jsx("div",{className:"rounded border border-gray-800 divide-y divide-gray-800/60 font-mono text-xs",children:t.map(o=>m.jsxs("div",{className:"px-3 py-1.5 flex items-start gap-2",children:[m.jsx(j6,{kind:o.kind}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"text-gray-200",children:o.name}),o.kind==="added"&&m.jsx("div",{className:"text-success-400 truncate",children:o.after}),o.kind==="removed"&&m.jsx("div",{className:"text-error-400 line-through truncate",children:o.before}),o.kind==="changed"&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("div",{className:"text-error-400 line-through truncate",children:o.before}),m.jsx("div",{className:"text-success-400 truncate",children:o.after})]})]})]},o.name))})}),!n.identical&&n.changes.length>0&&m.jsx(sP,{title:"Response body diff",defaultOpen:!0,children:m.jsx(Kfe,{changes:n.changes})}),n.identical&&!r&&m.jsx("p",{className:"text-xs text-gray-500",children:"Bodies are identical — the status code is the only difference between the recorded and replayed response."})]})}function oP({label:e,statusCode:t,statusMessage:n,duration:r,deltaPct:i}){const o=t>=500?"text-error-400":t>=400?"text-warning-500":"text-success-500";return m.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-3",children:[m.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1",children:e}),m.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[m.jsxs("span",{className:be("text-lg font-semibold",o),children:[t,n&&m.jsx("span",{className:"text-xs text-gray-500 font-normal ml-2",children:n})]}),m.jsxs("span",{className:"text-sm text-gray-400 tabular-nums",children:[Vn(r),typeof i=="number"&&Math.abs(i)>=1&&m.jsxs("span",{className:be("ml-1 text-[11px]",i<0?"text-success-500":"text-warning-500"),children:["(",i>=0?"+":"",i.toFixed(0),"%)"]})]})]})]})}function Kh({kind:e,icon:t,label:n}){const r={success:"bg-success-500/10 border-success-500/30 text-success-400",warn:"bg-warning-500/10 border-warning-500/30 text-warning-500",error:"bg-error-500/10 border-error-500/30 text-error-400",neutral:"bg-gray-800 border-gray-700 text-gray-400"};return m.jsxs("span",{className:be("inline-flex items-center gap-1.5 px-2 py-1 rounded border",r[e]),children:[m.jsx(t,{className:"w-3 h-3"}),n]})}function sP({title:e,defaultOpen:t,children:n}){const[r,i]=U.useState(t??!1);return m.jsxs("div",{children:[m.jsxs("button",{onClick:()=>i(!r),className:"flex items-center gap-1.5 text-xs font-semibold uppercase tracking-wide text-gray-400 hover:text-white mb-2",children:[r?m.jsx(tu,{className:"w-3 h-3"}):m.jsx(nu,{className:"w-3 h-3"}),e]}),r&&n]})}function Kfe({changes:e}){return m.jsx("div",{className:"rounded border border-gray-800 divide-y divide-gray-800/60 font-mono text-xs max-h-96 overflow-y-auto",children:e.map((t,n)=>m.jsxs("div",{className:"px-3 py-1.5 flex items-start gap-2",children:[m.jsx(j6,{kind:t.kind}),m.jsxs("div",{className:"flex-1 min-w-0",children:[m.jsx("div",{className:"text-gray-300 truncate",title:t.path,children:t.path||"<root>"}),t.kind==="added"&&m.jsx("div",{className:"text-success-400 break-all",children:Wh(t.after)}),t.kind==="removed"&&m.jsx("div",{className:"text-error-400 line-through break-all",children:Wh(t.before)}),t.kind==="changed"&&m.jsxs("div",{className:"space-y-0.5",children:[m.jsx("div",{className:"text-error-400 line-through break-all",children:Wh(t.before)}),m.jsx("div",{className:"text-success-400 break-all",children:Wh(t.after)})]})]})]},n))})}function j6({kind:e}){return e==="added"?m.jsx("span",{className:"mt-0.5 inline-flex items-center justify-center w-4 h-4 rounded bg-success-500/15 text-success-400",children:m.jsx(c4,{className:"w-3 h-3"})}):e==="removed"?m.jsx("span",{className:"mt-0.5 inline-flex items-center justify-center w-4 h-4 rounded bg-error-500/15 text-error-400",children:m.jsx(N7,{className:"w-3 h-3"})}):e==="changed"?m.jsx("span",{className:"mt-0.5 inline-flex items-center justify-center w-4 h-4 rounded bg-warning-500/15 text-warning-500",children:m.jsx(R7,{className:"w-3 h-3"})}):null}function Wh(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return JSON.stringify(e);if(typeof e=="number"||typeof e=="boolean")return String(e);try{const t=JSON.stringify(e);return t.length>200?t.slice(0,200)+"…":t}catch{return String(e)}}function Wfe(){const{exchanges:e,searchQuery:t,filterMethod:n,replayResult:r,setReplayResult:i}=wt(),{replayRequest:o}=Qo(),[l,c]=U.useState(null),[f,d]=U.useState(new Map),y=U.useMemo(()=>e.filter(g=>{if(t){const b=t.toLowerCase();if(!g.request.path.toLowerCase().includes(b))return!1}return!(n&&g.request.method!==n)}),[e,t,n]);U.useEffect(()=>{var _;if(!r)return;const g=l??((_=r.original)==null?void 0:_.id);if(!g)return;const b=r.original??e.find(S=>S.id===g);d(S=>{const x=new Map(S),A=r.replay;return x.set(g,{success:r.success,diff:r.success&&A&&b?{original:{statusCode:b.response.statusCode,statusMessage:b.response.statusMessage,headers:b.response.headers,body:b.response.body,duration:b.response.duration},replay:{statusCode:A.statusCode,statusMessage:A.statusMessage,headers:A.headers,body:A.body,duration:A.duration??0}}:void 0,error:r.error}),x}),c(null),i(null)},[r,l,e,i]);const p=g=>{c(g.id),o(g.id)};return e.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-gray-500",children:[m.jsx(f4,{className:"w-12 h-12 mb-4 opacity-50"}),m.jsx("p",{className:"text-lg",children:"No requests to replay"}),m.jsx("p",{className:"text-sm mt-2",children:"Record some requests first, then replay them here"})]}):m.jsxs("div",{className:"space-y-6",children:[m.jsx("div",{className:"bg-primary-500/10 border border-primary-500/30 rounded-lg p-4",children:m.jsxs("div",{className:"flex items-start gap-3",children:[m.jsx(cp,{className:"w-5 h-5 text-primary-400 mt-0.5"}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-sm font-semibold text-primary-300",children:"Request Replay"}),m.jsx("p",{className:"text-sm text-primary-200/70 mt-1",children:"Replay recorded requests against your running application to compare behavior. This is useful for debugging and regression testing."})]})]})}),m.jsx("div",{className:"space-y-3",children:y.map(g=>{const b=f.get(g.id),_=l===g.id;return m.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg p-4",children:[m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("div",{className:be("px-2 py-1 rounded text-xs font-mono font-semibold",p_(g.request.method),zc(g.request.method)),children:g.request.method}),m.jsxs("div",{children:[m.jsx("p",{className:"font-mono text-sm text-gray-200",children:g.request.path}),m.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[m.jsx(up,{className:"w-3 h-3 inline mr-1"}),h_(g.request.timestamp)]})]})]}),m.jsx("button",{onClick:()=>p(g),disabled:_,className:be("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",_?"bg-gray-700 text-gray-400 cursor-not-allowed":"bg-primary-500 text-white hover:bg-primary-600"),children:_?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"w-4 h-4 border-2 border-gray-400 border-t-transparent rounded-full animate-spin"}),"Replaying..."]}):m.jsxs(m.Fragment,{children:[m.jsx(cp,{className:"w-4 h-4"}),"Replay"]})})]}),b&&m.jsx("div",{className:"mt-4 pt-4 border-t border-gray-800",children:b.success&&b.diff?m.jsx(Xfe,{payload:b.diff}):m.jsx("div",{className:"bg-error-500/10 border border-error-500/30 rounded-lg p-3",children:m.jsxs("div",{className:"flex items-center gap-2 text-error-400 text-sm",children:[m.jsx(Bi,{className:"w-4 h-4"}),"Replay failed: ",b.error??"Unknown error"]})})})]},g.id)})})]})}const Qfe=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],lP="http://localhost:3000",uP=()=>({id:Math.random().toString(36).slice(2,10),key:"",value:"",enabled:!0});function Zfe(){const{routes:e}=wt(),[t,n]=U.useState("GET"),[r,i]=U.useState(`${lP}/`),[o,l]=U.useState("headers"),[c,f]=U.useState([]),[d,y]=U.useState([]),[p,g]=U.useState(""),[b,_]=U.useState(!1),[S,x]=U.useState(null),[A,j]=U.useState(null),[O,N]=U.useState(!1),[E,T]=U.useState(!1),C=t!=="GET"&&t!=="HEAD",D=U.useMemo(()=>e.map($=>({method:$.method,path:$.path})),[e]),q=($,k)=>{n($);try{const I=new URL(r);I.pathname=k,I.search="",i(I.toString())}catch{i(`${lP}${k.startsWith("/")?k:`/${k}`}`)}},F=($,k,I,H)=>{k($.map(V=>V.id===I?{...V,...H}:V))},L=($,k,I)=>{k($.filter(H=>H.id!==I))},P=()=>{const $=d.filter(k=>k.enabled&&k.key);if($.length===0)return r;try{const k=new URL(r);for(const I of $)k.searchParams.set(I.key,I.value);return k.toString()}catch{return r}},Y=async()=>{j(null),x(null),_(!0);const $=P(),k={};c.filter(V=>V.enabled&&V.key).forEach(V=>{k[V.key]=V.value});const I={method:t,headers:k};if(C&&p.trim()&&(I.body=p,!Object.keys(k).some(K=>K.toLowerCase()==="content-type"))){const K=p.trim();(K.startsWith("{")||K.startsWith("["))&&(k["Content-Type"]="application/json")}const H=performance.now();try{const V=await fetch($,I),K=performance.now()-H,z=await V.text(),G={};V.headers.forEach((pe,ye)=>{G[ye]=pe});const ee=(V.headers.get("content-type")||"").includes("application/json"),fe=ee?l7(z):z;x({status:V.status,statusText:V.statusText,duration:K,headers:G,body:z,parsed:fe,isJson:ee})}catch(V){const K=V instanceof Error?V.message:"Request failed",z=K.toLowerCase().includes("failed to fetch")||K.toLowerCase().includes("networkerror")?" — check that the app is running and that @expressots/studio-agent is installed (it injects CORS headers for the Studio UI).":"";j(`${K}${z}`)}finally{_(!1)}},R=async()=>{if(!S)return;const $=S.isJson&&typeof S.parsed!="string"?JSON.stringify(S.parsed,null,2):S.body;await y_($)&&(T(!0),setTimeout(()=>T(!1),1500))};return m.jsxs("div",{className:"space-y-4",children:[D.length>0&&m.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg p-3",children:[m.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide mb-2",children:"Discovered routes"}),m.jsx("div",{className:"flex flex-wrap gap-2",children:D.map(($,k)=>m.jsxs("button",{onClick:()=>q($.method,$.path),className:"flex items-center gap-2 px-2 py-1 rounded bg-gray-800/60 border border-gray-700 hover:border-primary-500 transition-colors",children:[m.jsx("span",{className:be("text-xs font-mono font-semibold px-1.5 py-0.5 rounded",p_($.method),zc($.method)),children:$.method}),m.jsx("span",{className:"text-xs font-mono text-gray-300",children:$.path})]},`${$.method}-${$.path}-${k}`))})]}),m.jsxs("div",{className:"flex items-stretch gap-2",children:[m.jsx("select",{value:t,onChange:$=>n($.target.value),className:be("px-3 py-2 rounded-lg bg-gray-900 border border-gray-800 text-sm font-mono font-semibold focus:outline-none focus:border-primary-500",zc(t)),children:Qfe.map($=>m.jsx("option",{value:$,className:"bg-gray-900 text-gray-200",children:$},$))}),m.jsx("input",{type:"text",value:r,onChange:$=>i($.target.value),onKeyDown:$=>{$.key==="Enter"&&!b&&Y()},placeholder:"http://localhost:3000/",className:"flex-1 px-3 py-2 rounded-lg bg-gray-900 border border-gray-800 text-sm font-mono text-gray-200 focus:outline-none focus:border-primary-500"}),m.jsx("button",{onClick:Y,disabled:b||!r.trim(),className:be("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",b||!r.trim()?"bg-gray-700 text-gray-400 cursor-not-allowed":"bg-primary-500 text-white hover:bg-primary-600"),children:b?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"w-4 h-4 border-2 border-gray-400 border-t-transparent rounded-full animate-spin"}),"Sending..."]}):m.jsxs(m.Fragment,{children:[m.jsx(d4,{className:"w-4 h-4"}),"Send"]})})]}),m.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg overflow-hidden",children:[m.jsx("div",{className:"flex border-b border-gray-800",children:["headers","query","body"].map($=>m.jsxs("button",{onClick:()=>l($),disabled:$==="body"&&!C,className:be("px-4 py-2 text-sm font-medium capitalize transition-colors",o===$?"text-primary-400 border-b-2 border-primary-500":"text-gray-400 hover:text-gray-200",$==="body"&&!C&&"opacity-40 cursor-not-allowed"),children:[$,$==="headers"&&c.filter(k=>k.enabled&&k.key).length>0&&m.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",c.filter(k=>k.enabled&&k.key).length,")"]}),$==="query"&&d.filter(k=>k.enabled&&k.key).length>0&&m.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",d.filter(k=>k.enabled&&k.key).length,")"]})]},$))}),m.jsxs("div",{className:"p-3",children:[o==="headers"&&m.jsx(cP,{items:c,onChange:($,k)=>F(c,f,$,k),onRemove:$=>L(c,f,$),onAdd:()=>f([...c,uP()]),keyPlaceholder:"Header",valuePlaceholder:"Value"}),o==="query"&&m.jsx(cP,{items:d,onChange:($,k)=>F(d,y,$,k),onRemove:$=>L(d,y,$),onAdd:()=>y([...d,uP()]),keyPlaceholder:"Param",valuePlaceholder:"Value"}),o==="body"&&m.jsx(m.Fragment,{children:C?m.jsx("textarea",{value:p,onChange:$=>g($.target.value),placeholder:'{\\n "key": "value"\\n}',spellCheck:!1,className:"w-full h-48 px-3 py-2 rounded-lg bg-gray-950 border border-gray-800 text-sm font-mono text-gray-200 focus:outline-none focus:border-primary-500 resize-none"}):m.jsxs("p",{className:"text-sm text-gray-500",children:["Body is not supported for ",t," requests."]})})]})]}),(S||A)&&m.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg overflow-hidden",children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-800",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[S&&m.jsxs(m.Fragment,{children:[m.jsxs("span",{className:be("text-lg font-semibold",e4(S.status)),children:[S.status," ",S.statusText]}),m.jsx("span",{className:"text-sm text-gray-400",children:Vn(S.duration)}),m.jsxs("span",{className:"text-sm text-gray-500",children:[new Blob([S.body]).size," bytes"]})]}),A&&m.jsxs("span",{className:"text-error-400 text-sm font-medium",children:["Error: ",A]})]}),S&&m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs("button",{onClick:()=>N($=>!$),className:"text-xs text-gray-400 hover:text-gray-200 px-2 py-1 rounded",children:[O?"Hide":"Show"," headers"]}),m.jsx("button",{onClick:R,className:"text-xs text-gray-400 hover:text-gray-200 px-2 py-1 rounded flex items-center gap-1",children:E?m.jsxs(m.Fragment,{children:[m.jsx(Sy,{className:"w-3 h-3"})," Copied"]}):m.jsxs(m.Fragment,{children:[m.jsx(Df,{className:"w-3 h-3"})," Copy"]})})]})]}),S&&O&&m.jsxs("div",{className:"px-4 py-3 border-b border-gray-800 bg-gray-950/50",children:[m.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide mb-2",children:"Response headers"}),m.jsx("div",{className:"space-y-1",children:Object.entries(S.headers).map(([$,k])=>m.jsxs("div",{className:"text-xs font-mono text-gray-300",children:[m.jsxs("span",{className:"text-gray-500",children:[$,":"]})," ",k]},$))})]}),S&&m.jsx("pre",{className:"px-4 py-3 text-xs text-gray-200 font-mono overflow-auto max-h-96 bg-gray-950/50",children:S.isJson&&typeof S.parsed!="string"?JSON.stringify(S.parsed,null,2):S.body||"(empty body)"})]})]})}function cP({items:e,onChange:t,onRemove:n,onAdd:r,keyPlaceholder:i,valuePlaceholder:o}){return m.jsxs("div",{className:"space-y-2",children:[e.map(l=>m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("input",{type:"checkbox",checked:l.enabled,onChange:c=>t(l.id,{enabled:c.target.checked}),className:"w-4 h-4 rounded bg-gray-800 border-gray-700"}),m.jsx("input",{type:"text",value:l.key,onChange:c=>t(l.id,{key:c.target.value}),placeholder:i,className:"flex-1 px-2 py-1 rounded bg-gray-950 border border-gray-800 text-sm font-mono text-gray-200 focus:outline-none focus:border-primary-500"}),m.jsx("input",{type:"text",value:l.value,onChange:c=>t(l.id,{value:c.target.value}),placeholder:o,className:"flex-1 px-2 py-1 rounded bg-gray-950 border border-gray-800 text-sm font-mono text-gray-200 focus:outline-none focus:border-primary-500"}),m.jsx("button",{onClick:()=>n(l.id),className:"text-gray-500 hover:text-error-400 p-1","aria-label":"Remove",children:m.jsx(Bi,{className:"w-4 h-4"})})]},l.id)),m.jsxs("button",{onClick:r,className:"flex items-center gap-2 text-sm text-primary-400 hover:text-primary-300",children:[m.jsx(c4,{className:"w-4 h-4"}),"Add"]})]})}const Jfe={Singleton:"text-primary-400 bg-primary-950/40 border-primary-700/40",Request:"text-amber-300 bg-amber-950/40 border-amber-700/40",Transient:"text-purple-300 bg-purple-950/40 border-purple-700/40"};function ede({scope:e}){const t=Jfe[e]||"text-gray-300 bg-gray-800 border-gray-700";return m.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium border ${t}`,children:e})}function tde(){const e=wt(p=>p.containerSnapshot),t=wt(p=>p.selectedExchangeId),n=wt(p=>p.containerResolutionsByExchange),[r,i]=U.useState("list"),[o,l]=U.useState(""),[c,f]=U.useState("all"),d=U.useMemo(()=>t?new Set(n[t]??[]):new Set,[t,n]);if(!e||e.bindings.length===0)return m.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-gray-500",children:[m.jsx(wy,{className:"w-12 h-12 mb-4 opacity-50"}),m.jsx("p",{className:"text-lg",children:"No container snapshot"}),m.jsx("p",{className:"text-sm mt-2 max-w-md text-center",children:"The Studio Agent could not introspect the DI container. Make sure your application is running and the agent is connected."})]});const y=e.bindings.filter(p=>{if(c!=="all"&&p.scope!==c)return!1;if(!o)return!0;const g=o.toLowerCase();return p.className.toLowerCase().includes(g)||p.serviceIdentifier.toLowerCase().includes(g)});return m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[m.jsx(_c,{label:"Bindings",value:e.summary.total}),m.jsx(_c,{label:"Singletons",value:e.summary.byScope.Singleton??0}),m.jsx(_c,{label:"Request-scoped",value:e.summary.byScope.Request??0}),m.jsx(_c,{label:"Transient",value:e.summary.byScope.Transient??0}),m.jsx(_c,{label:"Cached",value:e.summary.cached})]}),d.size>0&&m.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-primary-950/30 border border-primary-700/40 rounded-lg text-sm",children:[m.jsx(v7,{className:"w-4 h-4 text-primary-400"}),m.jsxs("span",{className:"text-primary-300",children:["Showing ",d.size," binding",d.size===1?"":"s"," resolved by the selected request."]})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[m.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[m.jsx(b_,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),m.jsx("input",{type:"text",value:o,onChange:p=>l(p.target.value),placeholder:"Search bindings…",className:"w-full pl-9 pr-3 py-2 text-sm bg-gray-900 border border-gray-700 rounded focus:outline-none focus:border-primary-500"})]}),m.jsxs("select",{value:c,onChange:p=>f(p.target.value),className:"px-3 py-2 text-sm bg-gray-900 border border-gray-700 rounded focus:outline-none focus:border-primary-500",children:[m.jsx("option",{value:"all",children:"All scopes"}),Object.keys(e.summary.byScope).map(p=>m.jsx("option",{value:p,children:p},p))]}),m.jsxs("div",{className:"flex bg-gray-900 border border-gray-700 rounded overflow-hidden",children:[m.jsxs("button",{onClick:()=>i("list"),className:`flex items-center gap-1 px-3 py-2 text-sm ${r==="list"?"bg-primary-700 text-white":"text-gray-400 hover:text-white"}`,children:[m.jsx(j7,{className:"w-4 h-4"}),"List"]}),m.jsxs("button",{onClick:()=>i("graph"),className:`flex items-center gap-1 px-3 py-2 text-sm ${r==="graph"?"bg-primary-700 text-white":"text-gray-400 hover:text-white"}`,children:[m.jsx(T7,{className:"w-4 h-4"}),"Graph"]})]})]}),r==="list"?m.jsx(nde,{bindings:y,resolved:d}):m.jsx(rde,{bindings:y,allBindings:e.bindings,edges:e.edges,resolved:d})]})}function _c({label:e,value:t}){return m.jsxs("div",{className:"px-3 py-2 bg-gray-900 border border-gray-800 rounded-lg",children:[m.jsx("div",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:e}),m.jsx("div",{className:"text-2xl font-bold text-white",children:t})]})}function nde({bindings:e,resolved:t}){return m.jsx("div",{className:"bg-gray-900 border border-gray-800 rounded-lg overflow-hidden",children:m.jsx("div",{className:"overflow-x-auto max-h-[60vh]",children:m.jsxs("table",{className:"w-full text-sm",children:[m.jsx("thead",{className:"bg-gray-950 sticky top-0",children:m.jsxs("tr",{className:"text-left text-xs uppercase tracking-wider text-gray-500",children:[m.jsx("th",{className:"px-4 py-2 font-medium",children:"Class"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Service Identifier"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Scope"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Type"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Cached"}),m.jsx("th",{className:"px-4 py-2 font-medium",children:"Activated"})]})}),m.jsxs("tbody",{className:"divide-y divide-gray-800",children:[e.map(n=>{const r=t.has(n.serviceIdentifier)||t.has(n.className);return m.jsxs("tr",{className:r?"bg-primary-950/30 hover:bg-primary-950/50":"hover:bg-gray-800/50",children:[m.jsx("td",{className:"px-4 py-2 font-mono text-white",children:n.className}),m.jsx("td",{className:"px-4 py-2 font-mono text-gray-400 text-xs",children:n.serviceIdentifier}),m.jsx("td",{className:"px-4 py-2",children:m.jsx(ede,{scope:n.scope})}),m.jsx("td",{className:"px-4 py-2 text-gray-400",children:n.type}),m.jsx("td",{className:"px-4 py-2",children:n.cached?m.jsx("span",{className:"text-primary-400",children:"✓"}):m.jsx("span",{className:"text-gray-600",children:"—"})}),m.jsx("td",{className:"px-4 py-2",children:n.activated?m.jsx("span",{className:"text-primary-400",children:"✓"}):m.jsx("span",{className:"text-gray-600",children:"—"})})]},n.id)}),e.length===0&&m.jsx("tr",{children:m.jsx("td",{colSpan:6,className:"px-4 py-8 text-center text-gray-500",children:"No bindings match the current filters."})})]})]})})})}function rde({bindings:e,allBindings:t,edges:n,resolved:r}){const i=U.useMemo(()=>{const _=new Map;for(const S of t)_.set(S.id,S);return _},[t]),o=U.useMemo(()=>new Set(e.map(_=>_.id)),[e]),{graphNodes:l,graphEdges:c}=U.useMemo(()=>{const _={Singleton:[],Request:[],Transient:[]};for(const T of e)(_[T.scope]??(_[T.scope]=[])).push(T);const S=180,x=60,A=60,j=24,O=Object.keys(_),N=[];O.forEach((T,C)=>{_[T].forEach((q,F)=>{const L=r.has(q.serviceIdentifier)||r.has(q.className);N.push({id:q.id,position:{x:C*(S+A),y:F*(x+j)},data:{label:ide(q,L)},style:ade(q,L),sourcePosition:"right",targetPosition:"left"})})});const E=n.filter(T=>o.has(T.source)&&o.has(T.target)).map((T,C)=>({id:`e-${C}`,source:T.source,target:T.target,type:"smoothstep",animated:!1,style:{stroke:"#3de678",strokeOpacity:.5},markerEnd:{type:_l.ArrowClosed,color:"#3de678"}}));return{graphNodes:N,graphEdges:E}},[e,n,o,r,i]),[f,d,y]=r8(l),[p,g,b]=i8(c);return U.useEffect(()=>d(l),[l,d]),U.useEffect(()=>g(c),[c,g]),m.jsx("div",{className:"h-[60vh] bg-gray-900 rounded-lg border border-gray-800 overflow-hidden",children:m.jsxs(n8,{nodes:f,edges:p,onNodesChange:y,onEdgesChange:b,fitView:!0,minZoom:.1,maxZoom:2,children:[m.jsx(o8,{color:"#1f2937",gap:16}),m.jsx(l8,{className:"!bg-gray-800 !border-gray-700"}),m.jsx(c8,{className:"!bg-gray-800",nodeColor:_=>{var S;return((S=_.style)==null?void 0:S.borderColor)||"#374151"}})]})})}function ide(e,t){return m.jsxs("div",{className:"text-xs",children:[m.jsxs("div",{className:"font-semibold truncate",title:e.className,children:[t?"● ":"",e.className]}),m.jsx("div",{className:"text-[10px] opacity-70 mt-0.5",children:e.scope})]})}function ade(e,t){const r={Singleton:{bg:"#082413",border:"#19ce59",text:"#3de678"},Request:{bg:"#1f1505",border:"#d97706",text:"#fbbf24"},Transient:{bg:"#1e0a2b",border:"#9333ea",text:"#c084fc"}}[e.scope]??{bg:"#1f2937",border:"#4b5563",text:"#e5e7eb"};return{background:r.bg,border:`1px solid ${t?"#3de678":r.border}`,boxShadow:t?"0 0 0 2px rgba(61,230,120,0.35)":"none",color:r.text,width:180,height:60,fontSize:11,padding:8,borderRadius:8}}const ode=["log","info","warn","error","debug"],E6={log:{text:"text-gray-300",bg:"bg-gray-700/30",label:"LOG",Icon:nu},info:{text:"text-sky-400",bg:"bg-sky-500/10",label:"INFO",Icon:$f},warn:{text:"text-warning-500",bg:"bg-warning-500/10",label:"WARN",Icon:ru},error:{text:"text-error-400",bg:"bg-error-500/15",label:"ERROR",Icon:Pf},debug:{text:"text-violet-400",bg:"bg-violet-500/10",label:"DEBUG",Icon:a4}};function sde(e){const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),r=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0"),o=String(t.getMilliseconds()).padStart(3,"0");return`${n}:${r}:${i}.${o}`}function lde(){const{logs:e,logLevelFilter:t,setLogLevelFilter:n,exchanges:r,setSelectedExchangeId:i,setCurrentView:o}=wt(),{clearLogs:l}=Qo(),[c,f]=U.useState(""),[d,y]=U.useState(!0),p=U.useRef(null),g=U.useMemo(()=>{const S=c.trim().toLowerCase();return e.filter(x=>!(!t.has(x.level)||S&&!x.message.toLowerCase().includes(S)))},[e,t,c]);U.useEffect(()=>{!d||!p.current||(p.current.scrollTop=0)},[g,d]);function b(S){const x=new Set(t);x.has(S)?x.delete(S):x.add(S),n(x)}function _(S){if(!S)return;const x=r.find(A=>{var j;return A.id===S||((j=A.trace)==null?void 0:j.traceId)===S||A.request.traceId===S});x&&(i(x.id),o("requests"))}return m.jsxs("div",{className:"h-full flex flex-col",children:[m.jsxs("div",{className:"border-b border-gray-800 px-4 py-3 space-y-3 bg-gray-900/40",children:[m.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[m.jsxs("div",{className:"flex items-center gap-2 mr-auto",children:[m.jsx(bl,{className:"w-4 h-4 text-primary-400"}),m.jsx("h2",{className:"text-base font-semibold text-white",children:"Logs"}),m.jsxs("span",{className:"text-xs text-gray-500",children:[g.length," of ",e.length]})]}),m.jsxs("button",{onClick:()=>y(!d),className:be("flex items-center gap-1.5 px-3 py-1.5 text-xs rounded border transition-colors",d?"bg-primary-500/15 border-primary-500/40 text-primary-300":"border-gray-700 text-gray-400 hover:text-white"),children:[m.jsx(n4,{className:"w-3 h-3"}),"Auto-scroll"]}),m.jsxs("button",{onClick:()=>l(),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs border border-gray-700 text-gray-400 hover:text-error-400 hover:border-error-500/50 rounded transition-colors",children:[m.jsx(Sw,{className:"w-3 h-3"}),"Clear"]})]}),m.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[m.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[m.jsx(b_,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-500"}),m.jsx("input",{type:"text",value:c,onChange:S=>f(S.target.value),placeholder:"Filter messages…",className:"w-full pl-8 pr-3 py-1.5 text-sm bg-gray-800 border border-gray-700 rounded focus:outline-none focus:border-primary-500 text-gray-200"})]}),m.jsx("div",{className:"flex items-center gap-1",children:ode.map(S=>{const x=t.has(S),A=E6[S];return m.jsx("button",{onClick:()=>b(S),className:be("px-2 py-1 text-[11px] font-mono rounded border transition-colors",x?`${A.bg} ${A.text} border-current/30`:"border-gray-800 text-gray-600 hover:text-gray-400"),children:A.label},S)})})]})]}),g.length===0?m.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:m.jsxs("div",{className:"text-center max-w-md",children:[m.jsx(bl,{className:"w-10 h-10 mx-auto mb-3 opacity-40"}),m.jsx("p",{className:"text-sm font-medium text-gray-400",children:e.length===0?"No logs captured yet":"No logs match the current filter"}),m.jsx("p",{className:"text-xs mt-2 text-gray-500",children:e.length===0?"Studio captures every console.* call from your app. Trigger a request or restart the server to see output here.":"Adjust the level filter or clear the search to see more."})]})}):m.jsx("div",{ref:p,className:"flex-1 overflow-y-auto flex flex-col-reverse font-mono text-xs",children:[...g].reverse().map((S,x)=>m.jsx(ude,{entry:S,onJump:_},x))})]})}function ude({entry:e,onJump:t}){const n=E6[e.level],{Icon:r}=n;return m.jsxs("div",{className:"group flex items-start gap-2 px-4 py-1.5 border-b border-gray-900 hover:bg-gray-800/40",children:[m.jsx("span",{className:"text-gray-600 tabular-nums select-none w-[88px] shrink-0",children:sde(e.timestamp)}),m.jsxs("span",{className:be("inline-flex items-center gap-1 w-[60px] shrink-0 px-1.5 py-0.5 rounded text-[10px] font-semibold tracking-wide justify-center",n.bg,n.text),children:[m.jsx(r,{className:"w-3 h-3"}),n.label]}),m.jsx("pre",{className:"flex-1 whitespace-pre-wrap break-words text-gray-200 leading-relaxed",children:e.message}),e.traceId&&m.jsx("button",{onClick:()=>t(e.traceId),className:"opacity-0 group-hover:opacity-100 transition-opacity text-[10px] text-primary-400 hover:text-primary-300 px-2 py-0.5 border border-primary-500/30 rounded",title:`Jump to request ${e.traceId.slice(0,8)}`,children:"→ request"})]})}const cde=["Navigation","Lists","Detail","Help"];function fde({onClose:e}){const t=cde.map(n=>({category:n,items:OI.filter(r=>r.category===n)})).filter(n=>n.items.length>0);return m.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-6",onClick:e,children:[m.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm"}),m.jsxs("div",{className:"relative bg-gray-900 border border-gray-800 rounded-xl shadow-2xl w-full max-w-2xl max-h-[80vh] overflow-y-auto",onClick:n=>n.stopPropagation(),children:[m.jsxs("div",{className:"sticky top-0 bg-gray-900 border-b border-gray-800 px-5 py-3 flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(_7,{className:"w-4 h-4 text-primary-400"}),m.jsx("h2",{className:"text-base font-semibold text-white",children:"Keyboard shortcuts"})]}),m.jsx("button",{onClick:e,className:"p-1.5 text-gray-400 hover:text-white hover:bg-gray-800 rounded",children:m.jsx(Bi,{className:"w-4 h-4"})})]}),m.jsx("div",{className:"p-5 grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-6",children:t.map(n=>m.jsxs("div",{children:[m.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wider text-gray-500 mb-2",children:n.category}),m.jsx("ul",{className:"space-y-1.5",children:n.items.map(r=>m.jsxs("li",{className:"flex items-center gap-3 text-sm",children:[m.jsx(fP,{combo:r.combo}),m.jsx("span",{className:"text-gray-300",children:r.description})]},r.combo+r.description))})]},n.category))}),m.jsxs("div",{className:"px-5 py-3 border-t border-gray-800 text-xs text-gray-500",children:["Press ",m.jsx(fP,{combo:"?"})," any time to toggle this overlay."]})]})]})}function fP({combo:e}){const t=e.includes(" then ")?[e]:e.split("+");return m.jsx("span",{className:"inline-flex items-center gap-1 flex-shrink-0",children:t.map((n,r)=>m.jsx("kbd",{className:"px-1.5 py-0.5 text-[11px] font-mono bg-gray-800 border border-gray-700 rounded text-gray-300 min-w-[24px] text-center",children:n.trim()},r))})}const dde={routes:"Routes",controllers:"Controllers",services:"Services / Use Cases",providers:"Providers",middleware:"Middleware",bindings:"DI Bindings",interceptors:"Interceptors"};function hde(){const{runtime:e,metrics:t,connected:n,routes:r,structure:i,containerSnapshot:o,recordingEnabled:l,agentLatencyMs:c,eventsReceived:f,securityReport:d,setCurrentView:y}=wt(),{requestRuntime:p,requestMetrics:g,rescan:b}=Qo(),[_,S]=U.useState(null),x=()=>{p(),g(),b()},A=T=>S(C=>C===T?null:T),j=t&&t.memoryUsage.heapTotal>0?Math.round(t.memoryUsage.heapUsed/t.memoryUsage.heapTotal*100):0,O=(e==null?void 0:e.counts.interceptors)??(i==null?void 0:i.middleware.length)??0,N=(o==null?void 0:o.summary.byScope)??{},E=Object.entries(N).map(([T,C])=>`${T}: ${C}`).join(", ");return m.jsxs("div",{className:"space-y-6",children:[m.jsx("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden",children:m.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 px-6 py-5",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary-500/10 border border-primary-500/30 flex items-center justify-center",children:m.jsx(sN,{className:"w-5 h-5 text-primary-400"})}),m.jsxs("div",{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("h2",{className:"text-xl font-bold text-white tracking-tight",children:(e==null?void 0:e.serviceName)??"expressots-app"}),(e==null?void 0:e.env)&&m.jsx("span",{className:"text-[10px] uppercase tracking-wider px-1.5 py-0.5 rounded bg-gray-800 border border-gray-700 text-gray-400 font-medium",children:e.env})]}),m.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500 mt-1 font-mono",children:[(e==null?void 0:e.versions.core)&&m.jsxs("span",{title:"@expressots/core",children:["core v",e.versions.core]}),(e==null?void 0:e.versions.adapterExpress)&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-gray-700",children:"·"}),m.jsxs("span",{title:"@expressots/adapter-express",children:["adapter v",e.versions.adapterExpress]})]}),(e==null?void 0:e.versions.agent)&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-gray-700",children:"·"}),m.jsxs("span",{title:"@expressots/studio-agent",children:["studio-agent v",e.versions.agent]})]})]})]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(xde,{connected:n,latencyMs:c}),m.jsxs("button",{onClick:x,className:"inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium bg-gray-800 hover:bg-gray-700 text-gray-200 rounded-lg transition-colors border border-gray-700",title:"Re-fetch runtime info, metrics, and rescan routes",children:[m.jsx(v_,{className:"w-3.5 h-3.5"}),"Refresh"]})]})]})}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[m.jsxs(Xs,{icon:sN,title:"Server",accent:"text-primary-400",children:[m.jsx(Kt,{label:"Env",value:(e==null?void 0:e.env)??"—",mono:!0}),m.jsx(Kt,{label:"App URL",value:(e==null?void 0:e.appUrl)??"—",mono:!0}),m.jsx(Kt,{label:"App Port",value:e!=null&&e.appPort?String(e.appPort):"—",mono:!0}),m.jsx(Kt,{label:"Agent Port",value:e?String(e.agentPort):"—",mono:!0}),m.jsx(Kt,{label:"PID",value:e?String(e.pid):"—",mono:!0})]}),m.jsxs(Xs,{icon:h4,title:"Config",accent:"text-blue-400",children:[m.jsx(Kt,{label:"Global Prefix",value:(e==null?void 0:e.globalPrefix)??"/",mono:!0}),m.jsx(Kt,{label:"Node",value:(e==null?void 0:e.nodeVersion)??"—",mono:!0}),m.jsx(Kt,{label:"Platform",value:e?`${e.platform} (${e.arch})`:"—",mono:!0}),m.jsx(Kt,{label:"Recording",value:l?"enabled":"paused",valueClass:l?"text-success-500":"text-gray-500"})]}),m.jsx(Xs,{icon:Bo,title:"Health",accent:"text-success-500",children:t?m.jsxs(m.Fragment,{children:[m.jsx(Kt,{label:"Memory",value:`${Ei(t.memoryUsage.heapUsed)} / ${Ei(t.memoryUsage.heapTotal)}`,mono:!0}),m.jsx(Kt,{label:"Heap",value:`${j}%`,mono:!0,children:m.jsx("div",{className:"mt-1 w-full h-1.5 rounded-full bg-gray-800 overflow-hidden",children:m.jsx("div",{className:be("h-full",j>85?"bg-error-500":j>65?"bg-warning-500":"bg-success-500"),style:{width:`${Math.min(100,j)}%`}})})}),m.jsx(Kt,{label:"RSS",value:Ei(t.memoryUsage.rss),mono:!0}),m.jsx(Kt,{label:"Connections",value:String(t.activeConnections),mono:!0})]}):m.jsx(wde,{children:"Waiting for metrics…"})}),m.jsxs(Xs,{icon:m_,title:"Metrics",accent:"text-amber-400",children:[m.jsx(Ks,{label:"Routes",value:String((e==null?void 0:e.counts.routes)??r.length),active:_==="routes",onClick:()=>A("routes")}),m.jsx(Ks,{label:"Controllers",value:String((e==null?void 0:e.counts.controllers)??(i==null?void 0:i.controllers.length)??0),active:_==="controllers",onClick:()=>A("controllers")}),m.jsx(Ks,{label:"Services / UseCases",value:String((e==null?void 0:e.counts.services)??(i==null?void 0:i.services.length)??0),active:_==="services",onClick:()=>A("services")}),m.jsx(Ks,{label:"Providers",value:String((e==null?void 0:e.counts.providers)??(i==null?void 0:i.providers.length)??0),active:_==="providers",onClick:()=>A("providers")})]}),m.jsxs(Xs,{icon:qf,title:"Security & Scope",accent:"text-purple-400",children:[m.jsx(Sde,{report:d,onOpen:()=>y("security")}),m.jsx(Ks,{label:"Interceptors",value:String(O),active:_==="interceptors",onClick:()=>A("interceptors")}),m.jsx(Ks,{label:"DI Bindings",value:String((o==null?void 0:o.summary.total)??0),active:_==="bindings",onClick:()=>A("bindings")}),m.jsx(Kt,{label:"By Scope",value:E||"—",mono:!0,valueClass:"text-xs"})]}),m.jsxs(Xs,{icon:$7,title:"Startup",accent:"text-pink-400",children:[m.jsx(Kt,{label:"Boot Time",value:e!=null&&e.startupMs?`${e.startupMs}ms`:"—",mono:!0}),m.jsx(Kt,{label:"Started At",value:e?new Date(e.startedAt).toLocaleString():"—"}),m.jsx(Kt,{label:"Uptime",value:e?_de(e.uptimeMs):"—",mono:!0}),m.jsx(Kt,{label:"Events",value:`${f.toLocaleString()} from agent`,mono:!0})]})]}),_&&m.jsx(pde,{drill:_,onClose:()=>S(null)})]})}function pde({drill:e,onClose:t}){const{routes:n,structure:r,containerSnapshot:i,runtime:o}=wt(),l=U.useMemo(()=>{var c,f;switch(e){case"routes":return n.map((d,y)=>({key:`${d.method}-${d.path}-${y}`,primary:d.path,secondary:`${d.controller}.${d.controllerMethod}`,method:d.method,filePath:d.filePath,lineNumber:d.lineNumber}));case"controllers":return((r==null?void 0:r.controllers)??[]).map(d=>({key:d.name,primary:d.name,secondary:`${d.routes.length} route${d.routes.length===1?"":"s"} · ${d.dependencies.length} dep${d.dependencies.length===1?"":"s"}`,deps:d.dependencies,filePath:d.filePath}));case"services":return((r==null?void 0:r.services)??[]).map(d=>({key:d.name,primary:d.name,secondary:`${d.methods.length} method${d.methods.length===1?"":"s"} · ${d.dependencies.length} dep${d.dependencies.length===1?"":"s"}`,deps:d.dependencies,filePath:d.filePath}));case"providers":return mde((c=o==null?void 0:o.runtimeItems)==null?void 0:c.providers,r==null?void 0:r.providers,i==null?void 0:i.bindings);case"middleware":return((r==null?void 0:r.middleware)??[]).map((d,y)=>({key:`${d}-${y}`,primary:d,secondary:"Class-based middleware"}));case"interceptors":return gde((f=o==null?void 0:o.runtimeItems)==null?void 0:f.interceptors,r==null?void 0:r.middleware);case"bindings":return((i==null?void 0:i.bindings)??[]).map(d=>({key:d.id,primary:d.className,secondary:d.serviceIdentifier,scope:d.scope,cached:d.cached,activated:d.activated}));default:return[]}},[e,n,r,i,o]);return m.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden animate-slide-up",children:[m.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-gray-800 bg-gray-900/40",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(vde,{drill:e}),m.jsx("h3",{className:"text-sm font-semibold text-white",children:dde[e]}),m.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:["(",l.length,")"]})]}),m.jsx("button",{onClick:t,className:"p-1 text-gray-500 hover:text-white rounded transition-colors","aria-label":"Close details",children:m.jsx(Bi,{className:"w-4 h-4"})})]}),m.jsx("div",{className:"max-h-[420px] overflow-y-auto",children:l.length===0?m.jsxs("div",{className:"px-5 py-8 text-center text-sm text-gray-500",children:["Nothing to show. ",e==="bindings"?"Container snapshot may not be available yet.":"Studio Agent hasn't reported any items."]}):m.jsx("ul",{className:"divide-y divide-gray-800",children:l.map(c=>m.jsx(yde,{item:c,drill:e},c.key))})})]})}function yde({item:e,drill:t}){return m.jsx("li",{className:"px-5 py-3 hover:bg-gray-800/40 transition-colors",children:m.jsxs("div",{className:"flex items-start justify-between gap-4",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.method&&m.jsx("span",{className:be("text-[10px] font-mono font-bold uppercase px-1.5 py-0.5 rounded",zc(e.method),"bg-gray-800"),children:e.method}),m.jsx("span",{className:"text-sm text-white font-mono truncate",title:e.primary,children:e.primary}),e.scope&&m.jsx(bde,{scope:e.scope})]}),e.secondary&&m.jsx("div",{className:"text-xs text-gray-500 font-mono truncate",title:e.secondary,children:e.secondary}),e.deps&&e.deps.length>0&&m.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.deps.map(n=>m.jsxs("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-gray-800 border border-gray-700 text-gray-400 font-mono",children:["→ ",n]},n))}),t==="bindings"&&m.jsxs("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-gray-500",children:[e.cached&&m.jsx("span",{className:"text-primary-500",children:"cached"}),e.activated&&m.jsx("span",{className:"text-amber-400",children:"activated"})]})]}),e.filePath&&m.jsxs("button",{onClick:()=>iu({filePath:e.filePath,lineNumber:e.lineNumber}),className:"flex-shrink-0 inline-flex items-center gap-1 text-[10px] text-gray-500 hover:text-primary-400 transition-colors",title:e.filePath,children:[m.jsx(Zo,{className:"w-3 h-3"}),"Open"]})]})})}function mde(e,t,n){const r=new Map((t??[]).map(o=>[o.name,o])),i=new Map((n??[]).map(o=>[o.className,o]));return e&&e.length>0?e.map((o,l)=>{const c=r.get(o.name),f=i.get(o.name);return{key:`${o.name}-${l}`,primary:o.name,secondary:(f==null?void 0:f.serviceIdentifier)??(c?`${c.methods.length} method${c.methods.length===1?"":"s"} · ${c.dependencies.length} dep${c.dependencies.length===1?"":"s"}`:o.source==="provide"?"Registered via @provide":void 0),deps:c==null?void 0:c.dependencies,filePath:c==null?void 0:c.filePath,scope:f==null?void 0:f.scope,cached:f==null?void 0:f.cached,activated:f==null?void 0:f.activated}}):(t??[]).map(o=>({key:o.name,primary:o.name,secondary:`${o.methods.length} method${o.methods.length===1?"":"s"} · ${o.dependencies.length} dep${o.dependencies.length===1?"":"s"}`,deps:o.dependencies,filePath:o.filePath}))}function gde(e,t){return e&&e.length>0?[...e].sort((r,i)=>(r.priority??100)-(i.priority??100)).map((r,i)=>({key:`${r.name}-${i}`,primary:r.name,secondary:r.priority!==void 0?`priority ${r.priority}`:"Registered via @Interceptor()"})):(t??[]).map((n,r)=>({key:`${n}-${r}`,primary:n,secondary:"Class-based middleware"}))}function vde({drill:e}){const n={routes:q7,controllers:i4,services:l4,providers:g_,middleware:fp,interceptors:fp,bindings:wy}[e];return m.jsx(n,{className:"w-4 h-4 text-primary-400"})}function bde({scope:e}){const n={Singleton:"text-primary-300 bg-primary-950/60 border-primary-700/50",Request:"text-amber-300 bg-amber-950/50 border-amber-700/50",Transient:"text-purple-300 bg-purple-950/50 border-purple-700/50"}[e]??"text-gray-300 bg-gray-800 border-gray-700";return m.jsx("span",{className:be("inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium border",n),children:e})}function Xs({icon:e,title:t,accent:n,children:r}){return m.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden hover:border-gray-700 transition-colors",children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-gray-800 bg-gray-900/40",children:[m.jsx(e,{className:be("w-4 h-4",n)}),m.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:t})]}),m.jsx("div",{className:"px-4 py-3 space-y-2",children:r})]})}function Kt({label:e,value:t,mono:n,valueClass:r,children:i}){return m.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[m.jsx("span",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:e}),m.jsxs("div",{className:"flex flex-col items-end min-w-0 flex-1",children:[m.jsx("span",{className:be("text-sm truncate",n&&"font-mono",r??"text-gray-100"),title:t,children:t}),i]})]})}function Ks({label:e,value:t,active:n,onClick:r}){return m.jsxs("button",{onClick:r,className:be("group flex items-baseline justify-between gap-3 w-full -mx-2 px-2 py-1 rounded transition-colors",n?"bg-primary-500/10 border border-primary-500/30":"border border-transparent hover:bg-gray-800/60"),children:[m.jsx("span",{className:be("text-[11px] uppercase tracking-wide",n?"text-primary-400":"text-gray-500 group-hover:text-gray-400"),children:e}),m.jsxs("span",{className:"flex items-center gap-1 min-w-0",children:[m.jsx("span",{className:be("text-sm font-mono",n?"text-primary-300":"text-gray-100"),children:t}),n?m.jsx(y7,{className:"w-3 h-3 text-primary-400"}):m.jsx(tu,{className:"w-3 h-3 text-gray-600 group-hover:text-gray-400"})]})]})}function xde({connected:e,latencyMs:t}){const n=e?w_:x_;return m.jsxs("span",{className:be("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-medium border",e?"bg-success-500/10 border-success-500/40 text-success-500":"bg-error-500/10 border-error-500/40 text-error-500"),children:[m.jsx(n,{className:"w-3 h-3"}),e?"connected":"offline",e&&t!=null&&m.jsxs("span",{className:"text-gray-400 font-mono",children:["· ",t,"ms"]})]})}function wde({children:e}){return m.jsx("div",{className:"text-xs text-gray-500 italic",children:e})}function Sde({report:e,onOpen:t}){const n=(e==null?void 0:e.score)??"A",r=n==="A"?"bg-success-500/10 text-success-500 border-success-500/30":n==="B"?"bg-primary-500/10 text-primary-400 border-primary-500/30":n==="C"?"bg-yellow-500/10 text-yellow-400 border-yellow-500/30":n==="D"?"bg-orange-500/10 text-orange-400 border-orange-500/30":"bg-red-500/10 text-red-400 border-red-500/30",i=e==null?void 0:e.counts,o=[];i&&(i.CRITICAL&&o.push(`${i.CRITICAL} critical`),i.HIGH&&o.push(`${i.HIGH} high`),i.MEDIUM&&o.push(`${i.MEDIUM} med`));const l=o.join(" · ")||"no findings";return m.jsxs("button",{onClick:t,className:"w-full -mx-2 px-2 py-1.5 rounded border border-transparent hover:bg-gray-800/60 transition-colors text-left",title:"Open the Security view",children:[m.jsxs("div",{className:"flex items-center justify-between gap-3",children:[m.jsx("span",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:"Score"}),m.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[m.jsx("span",{className:"text-xs text-gray-400 font-mono truncate",title:l,children:l}),m.jsx("span",{className:be("inline-flex items-center justify-center w-7 h-7 rounded-md border text-sm font-bold",r),"aria-label":`Security grade: ${n}`,children:n})]})]}),(e==null?void 0:e.scanState.audit)==="running"&&m.jsx("div",{className:"text-[10px] text-gray-500 mt-1 italic",children:"Scanning…"}),(e==null?void 0:e.scanState.audit)==="error"&&m.jsx("div",{className:"text-[10px] text-red-400/80 mt-1 truncate",children:e.scanState.auditError??"Scan failed"}),(e==null?void 0:e.scanState.missingLockfile)&&m.jsx("div",{className:"text-[10px] text-gray-500 mt-1 italic",children:"No lockfile"})]})}function _de(e){const t=Math.floor(e/1e3),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),o=t%60;return n>0?`${n}d ${r}h`:r>0?`${r}h ${i}m`:i>0?`${i}m ${o}s`:`${o}s`}const F2=["CRITICAL","HIGH","MEDIUM","LOW","INFO"],Zl={CRITICAL:{dot:"bg-red-500",chip:"bg-red-500/10 text-red-400 border-red-500/30",ring:"border-red-500/30",text:"text-red-400"},HIGH:{dot:"bg-orange-500",chip:"bg-orange-500/10 text-orange-400 border-orange-500/30",ring:"border-orange-500/30",text:"text-orange-400"},MEDIUM:{dot:"bg-yellow-500",chip:"bg-yellow-500/10 text-yellow-400 border-yellow-500/30",ring:"border-yellow-500/30",text:"text-yellow-400"},LOW:{dot:"bg-blue-500",chip:"bg-blue-500/10 text-blue-400 border-blue-500/30",ring:"border-blue-500/30",text:"text-blue-400"},INFO:{dot:"bg-gray-500",chip:"bg-gray-500/10 text-gray-400 border-gray-500/30",ring:"border-gray-500/30",text:"text-gray-400"}},Ade={A:{badge:"bg-success-500/10 border-success-500/40 text-success-500",tone:"success"},B:{badge:"bg-primary-500/10 border-primary-500/40 text-primary-400",tone:"primary"},C:{badge:"bg-yellow-500/10 border-yellow-500/40 text-yellow-400",tone:"yellow"},D:{badge:"bg-orange-500/10 border-orange-500/40 text-orange-400",tone:"orange"},F:{badge:"bg-red-500/10 border-red-500/40 text-red-400",tone:"red"}};function Ode(){const{securityReport:e,connected:t,setCurrentView:n,setSelectedExchangeId:r}=wt(),{requestSecurityScan:i}=Qo(),[o,l]=U.useState("dependencies"),c=e,f=(c==null?void 0:c.scanState.audit)==="running";return m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden",children:[m.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 px-6 py-5",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx(jde,{report:c}),m.jsxs("div",{children:[m.jsx("h2",{className:"text-xl font-bold text-white tracking-tight",children:"Security"}),m.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Supply-chain CVEs from ",m.jsx("code",{className:"text-gray-400",children:"npm audit"})," + OSV.dev, runtime posture from Studio's recorded traffic."]})]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(Tde,{connected:t}),m.jsxs("button",{onClick:()=>i(),disabled:f,className:be("inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors border",f?"bg-gray-800 text-gray-500 border-gray-800 cursor-not-allowed":"bg-gray-800 hover:bg-gray-700 text-gray-200 border-gray-700"),title:"Re-run npm audit + OSV.dev lookup",children:[f?m.jsx(Bc,{className:"w-3.5 h-3.5 animate-spin"}):m.jsx(v_,{className:"w-3.5 h-3.5"}),f?"Scanning…":"Rescan"]})]})]}),m.jsx(Ede,{report:c}),m.jsx(Nde,{report:c})]}),m.jsxs("div",{className:"flex items-center gap-1 border-b border-gray-800",children:[m.jsx(hP,{active:o==="dependencies",onClick:()=>l("dependencies"),label:"Dependencies",count:(c==null?void 0:c.dependencies.length)??0}),m.jsx(hP,{active:o==="posture",onClick:()=>l("posture"),label:"Runtime Posture",count:(c==null?void 0:c.posture.length)??0})]}),o==="dependencies"&&m.jsx(Cde,{report:c}),o==="posture"&&m.jsx(qde,{report:c,onOpenExchange:d=>{n("requests"),r(d)},onOpenRoute:()=>n("requests"),onOpenLogs:()=>n("logs")})]})}function jde({report:e}){const t=(e==null?void 0:e.score)??"A",n=Ade[t];return m.jsx("div",{className:be("w-14 h-14 rounded-lg border flex items-center justify-center text-2xl font-bold",n.badge),title:`Aggregate posture grade: ${t}`,children:t})}function Ede({report:e}){if(!e)return null;const{scanState:t}=e;return t.missingLockfile?m.jsx(dP,{tone:"info",icon:m.jsx($f,{className:"w-4 h-4"}),title:"No package-lock.json found",body:m.jsxs(m.Fragment,{children:["Studio skipped ",m.jsx("code",{className:"text-gray-400",children:"npm audit"})," because this project has no lockfile. Run ",m.jsx("code",{className:"text-gray-300",children:"npm install"})," in the host project and rescan to see supply-chain findings. Runtime posture checks still apply."]})}):t.audit==="error"?m.jsx(dP,{tone:"error",icon:m.jsx(Pf,{className:"w-4 h-4"}),title:"npm audit failed",body:t.auditError??"See the Studio Agent logs for details."}):null}function dP({tone:e,icon:t,title:n,body:r}){return m.jsxs("div",{className:be("flex items-start gap-3 px-6 py-3 border-t",e==="error"?"border-red-900/40 bg-red-950/20 text-red-300":"border-gray-800 bg-gray-900/40 text-gray-400"),children:[m.jsx("div",{className:"mt-0.5",children:t}),m.jsxs("div",{className:"text-sm",children:[m.jsx("div",{className:"font-medium mb-0.5",children:n}),m.jsx("div",{className:"text-xs leading-relaxed",children:r})]})]})}function Nde({report:e}){return m.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-5 border-t border-gray-800",children:F2.map(t=>{const n=Zl[t],r=(e==null?void 0:e.counts[t])??0;return m.jsxs("div",{className:"flex items-center justify-between px-5 py-2.5 border-r border-gray-800 last:border-r-0",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:be("w-2 h-2 rounded-full",n.dot)}),m.jsx("span",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:t.toLowerCase()})]}),m.jsx("span",{className:be("text-sm font-mono",r>0?n.text:"text-gray-600"),children:r})]},t)})})}function Tde({connected:e}){const t=e?w_:x_;return m.jsxs("span",{className:be("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] font-medium border",e?"bg-success-500/10 border-success-500/40 text-success-500":"bg-error-500/10 border-error-500/40 text-error-500"),children:[m.jsx(t,{className:"w-3 h-3"}),e?"connected":"offline"]})}function hP({active:e,onClick:t,label:n,count:r}){return m.jsxs("button",{onClick:t,className:be("flex items-center gap-2 px-4 py-2 -mb-px border-b-2 text-sm transition-colors",e?"border-primary-500 text-primary-400":"border-transparent text-gray-500 hover:text-gray-300"),children:[m.jsx("span",{children:n}),m.jsx("span",{className:be("inline-flex items-center justify-center min-w-[20px] px-1.5 rounded text-[10px] font-mono",e?"bg-primary-500/10 text-primary-400":"bg-gray-800 text-gray-500"),children:r})]})}function Cde({report:e}){var r;if(!e)return m.jsx(il,{icon:Bc,message:"Connecting to agent…"});if(e.scanState.missingLockfile)return m.jsx(il,{icon:M7,message:"Supply-chain scanning is disabled until a package-lock.json is present."});if(e.dependencies.length===0)return e.scanState.audit==="running"?m.jsx(il,{icon:Bc,spin:!0,message:"Running npm audit…"}):m.jsx(il,{icon:qf,message:"No known supply-chain vulnerabilities. (Last scan completed; rescan to re-check.)",tone:"success"});const t=k6(e.dependencies),n=new Map(e.dependencies.map(i=>[i.id,i]));return m.jsxs("div",{className:"space-y-8",children:[m.jsx($de,{}),e.fixGroups.length>0&&m.jsx(Mde,{groups:e.fixGroups,findingsById:n,fixInFlight:((r=e.scanState.fix)==null?void 0:r.state)==="running"}),m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(fp,{className:"w-4 h-4 text-gray-500"}),m.jsx("h3",{className:"text-sm font-semibold text-gray-300 tracking-tight",children:"All advisories"}),m.jsxs("span",{className:"text-xs text-gray-600 font-mono",children:["(",e.dependencies.length,")"]})]}),F2.map(i=>{const o=t[i]??[];return o.length===0?null:m.jsx(M6,{severity:i,count:o.length,children:o.map(l=>{var c;return m.jsx(Rde,{finding:l,fixInFlight:((c=e.scanState.fix)==null?void 0:c.state)==="running"},l.id)})},i)})]})]})}function Mde({groups:e,findingsById:t,fixInFlight:n}){return m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(B7,{className:"w-4 h-4 text-primary-400"}),m.jsx("h3",{className:"text-sm font-semibold text-white tracking-tight",children:"Recommended fixes"}),m.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:["(",e.length,")"]})]}),m.jsx("p",{className:"text-xs text-gray-500 -mt-1 mb-2",children:"Each row collapses every advisory that shares a single upgrade. Apply one change, clear many findings."}),m.jsx("div",{className:"space-y-3",children:e.map(r=>m.jsx(kde,{group:r,findings:r.findingIds.map(i=>t.get(i)).filter(i=>!!i),fixInFlight:n},r.id))})]})}function kde({group:e,findings:t,fixInFlight:n}){const r=Zl[e.severity],{applyFix:i}=Qo(),[o,l]=U.useState(!1),[c,f]=U.useState(!1),d=()=>{e.fix.command&&(navigator.clipboard.writeText(e.fix.command),f(!0),setTimeout(()=>f(!1),1500))},y=()=>{!e.fix.command||e.fix.kind==="none"||e.fix.kind==="override"||i({targetKind:"fix-group",targetId:e.id,command:e.fix.command,allowMajor:e.fix.kind==="audit-fix-force"||e.breaking})};return m.jsxs("div",{className:be("rounded-lg border bg-gray-900/40 overflow-hidden",r.ring),children:[m.jsxs("div",{className:"p-4 space-y-3",children:[m.jsx("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:m.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[m.jsx("span",{className:be("inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",r.chip),children:e.severity}),e.breaking&&m.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border bg-orange-500/10 text-orange-300 border-orange-500/30",children:[m.jsx(ru,{className:"w-3 h-3"})," breaking"]}),m.jsx(C6,{level:e.reachability}),m.jsxs("span",{className:"text-[11px] text-gray-500",children:["Fixes ",e.findingIds.length," ",e.findingIds.length===1?"advisory":"advisories"]})]}),m.jsxs("h4",{className:"text-sm font-semibold text-white",children:["Upgrade ",m.jsx("span",{className:"font-mono text-primary-300",children:e.package})," ",m.jsx("span",{className:"font-mono text-gray-500",children:e.fromVersion}),m.jsx("span",{className:"mx-2 text-gray-600",children:"→"}),m.jsx("span",{className:"font-mono text-success-500",children:e.toVersion})]}),e.fix.note&&m.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:e.fix.note})]})}),m.jsx(N6,{spec:e.fix,copied:c,onCopy:d}),m.jsxs("div",{className:"flex items-center gap-2 flex-wrap pt-1",children:[m.jsxs("button",{onClick:y,disabled:n||e.fix.kind==="none"||e.fix.kind==="override",className:be("inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors border",n||e.fix.kind==="none"||e.fix.kind==="override"?"bg-gray-800 text-gray-500 border-gray-800 cursor-not-allowed":e.breaking?"bg-orange-600/20 hover:bg-orange-600/30 text-orange-300 border-orange-500/40":"bg-primary-600/20 hover:bg-primary-600/30 text-primary-300 border-primary-500/40"),title:e.fix.kind==="none"?"No upstream fix available yet.":e.fix.kind==="override"?"Requires a manual package.json overrides entry.":"Run this command in the host project",children:[m.jsx(s4,{className:"w-3.5 h-3.5"}),"Apply fix"]}),m.jsxs("button",{onClick:()=>l(p=>!p),className:"inline-flex items-center gap-1 px-2 py-1.5 text-xs text-gray-400 hover:text-gray-200 transition-colors",children:[o?m.jsx(tu,{className:"w-3.5 h-3.5"}):m.jsx(nu,{className:"w-3.5 h-3.5"}),o?"Hide advisories":`Show ${e.findingIds.length} ${e.findingIds.length===1?"advisory":"advisories"}`]})]})]}),o&&t.length>0&&m.jsx("div",{className:"border-t border-gray-800 bg-gray-950/50 p-3 space-y-2",children:t.map(p=>m.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 rounded bg-gray-900/60 border border-gray-800",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[m.jsx("span",{className:be("inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",Zl[p.severity].chip),children:p.severity}),m.jsx("span",{className:"text-[10px] font-mono text-gray-500",children:p.id})]}),m.jsx("p",{className:"text-xs text-gray-300 truncate",children:p.title})]}),n_(p)&&m.jsxs("a",{href:n_(p),target:"_blank",rel:"noreferrer noopener",className:"flex-shrink-0 inline-flex items-center gap-1 text-[11px] text-primary-400 hover:text-primary-300",children:["Advisory ",m.jsx($o,{className:"w-3 h-3"})]})]},p.id))})]})}function Rde({finding:e,fixInFlight:t}){const n=Zl[e.severity],r=n_(e),{applyFix:i}=Qo(),[o,l]=U.useState(!1),c=e.fix&&e.fix.command&&e.fix.kind!=="none"&&e.fix.kind!=="override",f=()=>{var y;(y=e.fix)!=null&&y.command&&(navigator.clipboard.writeText(e.fix.command),l(!0),setTimeout(()=>l(!1),1500))},d=()=>{!c||!e.fix||i({targetKind:"finding",targetId:e.id,command:e.fix.command,allowMajor:e.fix.breaking})};return m.jsxs("div",{className:be("rounded-lg border bg-gray-900/40 p-4 space-y-3",n.ring),children:[m.jsxs("div",{className:"flex items-start justify-between gap-4",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[m.jsx("span",{className:be("inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",n.chip),children:e.severity}),e.cvss!==void 0&&m.jsxs("span",{className:"text-[10px] font-mono text-gray-500",children:["CVSS ",e.cvss.toFixed(1)]}),e.reachability&&m.jsx(C6,{level:e.reachability.level}),m.jsx("span",{className:"text-[10px] font-mono text-gray-500",children:e.id})]}),m.jsx("h4",{className:"text-sm font-semibold text-white truncate",title:e.title,children:e.title}),m.jsxs("div",{className:"mt-1 text-xs text-gray-400 font-mono",children:[m.jsx("span",{className:"text-gray-300",children:e.package}),m.jsx("span",{className:"text-gray-600 mx-1",children:"·"}),"installed ",m.jsx("span",{className:"text-gray-300",children:e.installedVersion}),e.fixedVersion&&m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"text-gray-600 mx-1",children:"→"}),"fix in ",m.jsx("span",{className:"text-success-500",children:e.fixedVersion})]})]})]}),r&&m.jsxs("a",{href:r,target:"_blank",rel:"noreferrer noopener",className:"flex-shrink-0 inline-flex items-center gap-1 text-xs text-primary-400 hover:text-primary-300",children:["Advisory ",m.jsx($o,{className:"w-3 h-3"})]})]}),e.summary&&m.jsx("p",{className:"text-xs text-gray-400 leading-relaxed",children:e.summary}),e.rootCause&&!e.rootCause.isDirect&&m.jsx(Pde,{finding:e}),e.reachability&&m.jsx(Dde,{info:e.reachability}),e.fix&&m.jsxs(m.Fragment,{children:[e.fix.command&&m.jsx(N6,{spec:e.fix,copied:o,onCopy:f}),m.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[m.jsxs("button",{onClick:d,disabled:!c||t,className:be("inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors border",!c||t?"bg-gray-800 text-gray-500 border-gray-800 cursor-not-allowed":e.fix.breaking?"bg-orange-600/20 hover:bg-orange-600/30 text-orange-300 border-orange-500/40":"bg-primary-600/20 hover:bg-primary-600/30 text-primary-300 border-primary-500/40"),title:e.fix.kind==="none"?"No upstream fix available yet.":e.fix.kind==="override"?"Requires a manual package.json overrides entry.":"Run this command in the host project",children:[m.jsx(s4,{className:"w-3.5 h-3.5"}),e.fix.label]}),e.fix.note&&m.jsx("span",{className:"text-[11px] text-gray-500",children:e.fix.note})]})]})]})}function N6({spec:e,copied:t,onCopy:n}){return e.command?m.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2",children:[m.jsx(bl,{className:"w-3.5 h-3.5 text-gray-500 flex-shrink-0"}),m.jsx("code",{className:"flex-1 text-xs font-mono text-gray-300 truncate",children:e.command}),m.jsxs("button",{onClick:n,className:"flex-shrink-0 inline-flex items-center gap-1 px-1.5 py-1 text-[11px] text-gray-400 hover:text-gray-200 rounded transition-colors",title:"Copy command to clipboard",children:[t?m.jsx(o4,{className:"w-3.5 h-3.5 text-success-500"}):m.jsx(Df,{className:"w-3.5 h-3.5"}),t?"Copied":"Copy"]})]}):null}function Pde({finding:e}){const t=e.rootCause;return t?m.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/40 px-3 py-2 text-[11px] text-gray-400",children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[m.jsx(I7,{className:"w-3 h-3 text-yellow-400"}),m.jsx("span",{className:"uppercase tracking-wide text-yellow-400/80 font-medium",children:"Root cause"}),m.jsxs("span",{className:"text-gray-500",children:["via"," ",m.jsx("span",{className:"font-mono text-gray-300",children:t.rootPackage})," ",m.jsx("span",{className:"text-gray-600",children:t.rootInstalledVersion})]})]}),m.jsx("div",{className:"font-mono text-gray-500 leading-relaxed truncate",title:t.chain.join(" → "),children:t.chain.join(" → ")})]}):null}function Dde({info:e}){if(e.level==="unknown")return null;const t=T6[e.level];return m.jsxs("div",{className:be("rounded-md border px-3 py-2 text-[11px] leading-relaxed",t.row),children:[m.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[m.jsx(S_,{className:be("w-3 h-3",t.icon)}),m.jsx("span",{className:be("uppercase tracking-wide font-medium",t.icon),children:e.level==="confirmed"?"Confirmed reachable":e.level}),e.runtimeHits>0&&m.jsxs("span",{className:"text-gray-400",children:["· ",e.runtimeHits," request",e.runtimeHits===1?"":"s"]})]}),m.jsx("p",{className:"text-gray-400",children:e.reason}),e.routes.length>0&&m.jsxs("div",{className:"mt-1 font-mono text-gray-500 truncate",children:[e.routes.slice(0,3).map(n=>`${n.method} ${n.path}`).join(" · "),e.routes.length>3?` +${e.routes.length-3} more`:""]})]})}const T6={confirmed:{row:"border-red-900/40 bg-red-950/20",icon:"text-red-400",chip:"bg-red-500/10 text-red-400 border-red-500/30"},likely:{row:"border-yellow-900/40 bg-yellow-950/10",icon:"text-yellow-400",chip:"bg-yellow-500/10 text-yellow-300 border-yellow-500/30"},unreachable:{row:"border-gray-800 bg-gray-950/40",icon:"text-gray-500",chip:"bg-gray-500/10 text-gray-400 border-gray-500/30"},unknown:{row:"border-gray-800 bg-gray-950/40",icon:"text-gray-500",chip:"bg-gray-500/10 text-gray-400 border-gray-500/30"}};function C6({level:e}){if(!e||e==="unknown")return null;const t=T6[e],n=e==="confirmed"?"reachable":e==="unreachable"?"unreachable":"likely";return m.jsxs("span",{className:be("inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",t.chip),title:e==="confirmed"?"A route reaching this package has been exercised in the current session.":e==="unreachable"?"No file under src/ imports this package.":"Imported by src/, but no requests have hit a route that uses it yet.",children:[m.jsx(S_,{className:"w-3 h-3"})," ",n]})}function n_(e){return e.references.find(t=>/github\.com\/advisories|osv\.dev|nvd\.nist\.gov/i.test(t))??e.references[0]}function $de(){var o,l,c;const e=wt(f=>f.fixRun),t=wt(f=>f.clearFixRun);if(!e)return null;const n=!!e.result,r=((o=e.result)==null?void 0:o.success)===!0,i=n?r?"border-success-500/40 bg-success-500/5":"border-red-500/40 bg-red-500/5":"border-primary-500/40 bg-primary-500/5";return m.jsxs("div",{className:be("rounded-lg border overflow-hidden",i),children:[m.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 border-b border-gray-800/60",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[n?r?m.jsx(o4,{className:"w-4 h-4 text-success-500"}):m.jsx(Pf,{className:"w-4 h-4 text-red-400"}):m.jsx(Bc,{className:"w-4 h-4 animate-spin text-primary-400"}),m.jsx("span",{className:"text-xs font-medium text-white",children:n?((l=e.result)==null?void 0:l.summary)??(r?"Fix completed":"Fix failed"):"Applying fix…"}),m.jsx("code",{className:"text-[11px] font-mono text-gray-400 truncate max-w-[60vw]",children:e.command})]}),m.jsx("button",{onClick:t,className:"text-gray-500 hover:text-gray-300 transition-colors",title:"Dismiss",disabled:!n,children:m.jsx(Bi,{className:"w-4 h-4"})})]}),m.jsxs("pre",{className:"max-h-48 overflow-auto px-4 py-2 text-[11px] font-mono leading-relaxed text-gray-300 bg-gray-950/60",children:[e.lines.length===0&&!n?"Waiting for npm output…":e.lines.map(f=>`${f.stream==="stderr"?"⚠ ":" "}${f.text}`).join(`
520
+ `),n&&((c=e.result)==null?void 0:c.errorTail)&&m.jsxs(m.Fragment,{children:[`
521
+ `,e.result.errorTail.trim()]})]})]})}function qde({report:e,onOpenExchange:t,onOpenRoute:n,onOpenLogs:r}){if(!e)return m.jsx(il,{icon:Bc,message:"Connecting to agent…"});if(e.posture.length===0)return m.jsx(il,{icon:qf,tone:"success",message:"No runtime posture findings yet. Send some requests through your app — the analyzer evaluates recorded traffic."});const i=k6(e.posture);return m.jsx("div",{className:"space-y-6",children:F2.map(o=>{const l=i[o]??[];return l.length===0?null:m.jsx(M6,{severity:o,count:l.length,children:l.map(c=>m.jsx(Lde,{finding:c,onOpenExchange:t,onOpenRoute:n,onOpenLogs:r},c.id))},o)})})}function Lde({finding:e,onOpenExchange:t,onOpenRoute:n,onOpenLogs:r}){const i=Zl[e.severity];return m.jsx("div",{className:be("rounded-lg border bg-gray-900/40 p-4 space-y-3",i.ring),children:m.jsxs("div",{className:"flex items-start justify-between gap-4",children:[m.jsxs("div",{className:"min-w-0 flex-1",children:[m.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[m.jsx("span",{className:be("inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",i.chip),children:e.severity}),e.owasp&&m.jsxs("span",{className:"text-[10px] font-mono text-purple-400",children:["OWASP ",e.owasp]}),m.jsx("span",{className:"text-[10px] font-mono text-gray-600",children:e.rule})]}),m.jsx("h4",{className:"text-sm font-semibold text-white",children:e.title}),m.jsx("p",{className:"mt-1 text-xs text-gray-400 leading-relaxed",children:e.description}),e.fixHint&&m.jsxs("p",{className:"mt-2 text-xs text-success-500/80 leading-relaxed",children:[m.jsx("span",{className:"font-medium mr-1",children:"Fix:"}),e.fixHint]})]}),m.jsx(zde,{finding:e,onOpenExchange:t,onOpenRoute:n,onOpenLogs:r})]})})}function zde({finding:e,onOpenExchange:t,onOpenRoute:n,onOpenLogs:r}){switch(e.evidence.kind){case"exchange":{const i=e.evidence.exchangeId;return m.jsxs("button",{onClick:()=>t(i),className:"flex-shrink-0 inline-flex items-center gap-1 text-xs text-primary-400 hover:text-primary-300",title:"Open the recorded exchange in the Requests view",children:["View exchange ",m.jsx($o,{className:"w-3 h-3"})]})}case"route":return m.jsxs("button",{onClick:n,className:"flex-shrink-0 inline-flex items-center gap-1 text-xs text-primary-400 hover:text-primary-300",title:"Jump to the Requests view",children:[m.jsxs("span",{className:"font-mono",children:[e.evidence.method," ",e.evidence.path]}),m.jsx($o,{className:"w-3 h-3"})]});case"log":return m.jsxs("button",{onClick:r,className:"flex-shrink-0 inline-flex items-center gap-1 text-xs text-primary-400 hover:text-primary-300",children:["View logs ",m.jsx($o,{className:"w-3 h-3"})]});case"file":{const i=e.evidence;return m.jsxs("button",{onClick:()=>iu({filePath:i.filePath,lineNumber:i.lineNumber}),className:"flex-shrink-0 inline-flex items-center gap-1 text-xs text-primary-400 hover:text-primary-300",title:i.filePath,children:[m.jsx(Zo,{className:"w-3 h-3"})," Open file"]})}default:return null}}function M6({severity:e,count:t,children:n}){const r=Zl[e],i=Bde(e);return m.jsxs("div",{className:"space-y-3",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(i,{className:be("w-4 h-4",r.text)}),m.jsx("h3",{className:be("text-sm font-semibold capitalize",r.text),children:e.toLowerCase()}),m.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:["(",t,")"]})]}),m.jsx("div",{className:"space-y-3",children:n})]})}function Bde(e){switch(e){case"CRITICAL":return fp;case"HIGH":return ru;case"MEDIUM":return L7;case"LOW":return qf;default:return $f}}function k6(e){const t={};for(const n of e){const r=t[n.severity]??[];r.push(n),t[n.severity]=r}return t}function il({icon:e,message:t,spin:n=!1,tone:r="default"}){return m.jsx("div",{className:"flex items-center justify-center py-16",children:m.jsxs("div",{className:"text-center max-w-md",children:[m.jsx(e,{className:be("w-10 h-10 mx-auto mb-3",r==="success"?"text-success-500":"text-gray-600",n&&"animate-spin")}),m.jsx("p",{className:"text-sm text-gray-400 leading-relaxed",children:t})]})})}const Ide=new bB({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});function Ude(){const{currentView:e,selectedExchangeId:t,setSelectedExchangeId:n}=wt(),[r,i]=U.useState(!1);EI({onToggleHelp:()=>i(l=>!l),onCloseAll:()=>{r?i(!1):t&&n(null)}});const o=()=>{switch(e){case"status":return m.jsx(hde,{});case"requests":return m.jsx(uN,{});case"architecture":return m.jsx(RX,{});case"metrics":return m.jsx(zfe,{});case"replay":return m.jsx(Wfe,{});case"api-client":return m.jsx(Zfe,{});case"container":return m.jsx(tde,{});case"logs":return m.jsx(lde,{});case"security":return m.jsx(Ode,{});default:return m.jsx(uN,{})}};return m.jsxs(t9,{children:[o(),t&&m.jsx(A9,{}),r&&m.jsx(fde,{onClose:()=>i(!1)})]})}function Hde(){return m.jsx(wB,{client:Ide,children:m.jsx(AI,{children:m.jsx(Ude,{})})})}Fz.createRoot(document.getElementById("root")).render(m.jsx(U.StrictMode,{children:m.jsx(Hde,{})}));
522
+ //# sourceMappingURL=index-CwOg4Wcc.js.map