@expressots/studio 4.0.0-preview.1 → 4.0.0-preview.3
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.
- package/README.md +122 -122
- package/dist/cli.js +9 -1
- package/dist/cli.js.map +1 -1
- package/dist/studio.d.ts.map +1 -1
- package/dist/studio.js +112 -108
- package/dist/studio.js.map +1 -1
- package/dist/ui/assets/index-Beegyg-P.js +567 -0
- package/dist/ui/assets/index-Beegyg-P.js.map +1 -0
- package/dist/ui/assets/index-Drah5JMl.css +1 -0
- package/dist/ui/index.html +18 -18
- package/package.json +10 -7
- package/dist/ui/assets/index-CwOg4Wcc.js +0 -522
- package/dist/ui/assets/index-CwOg4Wcc.js.map +0 -1
- package/dist/ui/assets/index-D2kzut78.css +0 -1
|
@@ -0,0 +1,567 @@
|
|
|
1
|
+
var aE=e=>{throw TypeError(e)};var iv=(e,t,n)=>t.has(e)||aE("Cannot "+n);var fe=(e,t,n)=>(iv(e,t,"read from private field"),n?n.call(e):t.get(e)),Xe=(e,t,n)=>t.has(e)?aE("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Re=(e,t,n,r)=>(iv(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),un=(e,t,n)=>(iv(e,t,"access private method"),n);var kh=(e,t,n,r)=>({set _(i){Re(e,t,i,n)},get _(){return fe(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 Rh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function at(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var av={exports:{}},mu={};/**
|
|
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 oE;function EB(){if(oE)return mu;oE=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 mu.Fragment=t,mu.jsx=n,mu.jsxs=n,mu}var sE;function TB(){return sE||(sE=1,av.exports=EB()),av.exports}var h=TB(),ov={exports:{}},$e={};/**
|
|
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 lE;function CB(){if(lE)return $e;lE=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 v(q){return q===null||typeof q!="object"?null:(q=g&&q[g]||q["@@iterator"],typeof q=="function"?q:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function j(q,V,J){this.props=q,this.context=V,this.refs=b,this.updater=J||w}j.prototype.isReactComponent={},j.prototype.setState=function(q,V){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,V,"setState")},j.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function T(){}T.prototype=j.prototype;function N(q,V,J){this.props=q,this.context=V,this.refs=b,this.updater=J||w}var E=N.prototype=new T;E.constructor=N,S(E,j.prototype),E.isPureReactComponent=!0;var O=Array.isArray;function A(){}var C={H:null,A:null,T:null,S:null},R=Object.prototype.hasOwnProperty;function D(q,V,J){var ae=J.ref;return{$$typeof:e,type:q,key:V,ref:ae!==void 0?ae:null,props:J}}function G(q,V){return D(q.type,V,q.props)}function I(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function L(q){var V={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(J){return V[J]})}var Y=/\/+/g;function P(q,V){return typeof q=="object"&&q!==null&&q.key!=null?L(""+q.key):V.toString(36)}function U(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(A,A):(q.status="pending",q.then(function(V){q.status==="pending"&&(q.status="fulfilled",q.value=V)},function(V){q.status==="pending"&&(q.status="rejected",q.reason=V)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function k(q,V,J,ae,he){var ge=typeof q;(ge==="undefined"||ge==="boolean")&&(q=null);var ee=!1;if(q===null)ee=!0;else switch(ge){case"bigint":case"string":case"number":ee=!0;break;case"object":switch(q.$$typeof){case e:case t:ee=!0;break;case y:return ee=q._init,k(ee(q._payload),V,J,ae,he)}}if(ee)return he=he(q),ee=ae===""?"."+P(q,0):ae,O(he)?(J="",ee!=null&&(J=ee.replace(Y,"$&/")+"/"),k(he,V,J,"",function(ye){return ye})):he!=null&&(I(he)&&(he=G(he,J+(he.key==null||q&&q.key===he.key?"":(""+he.key).replace(Y,"$&/")+"/")+ee)),V.push(he)),1;ee=0;var ne=ae===""?".":ae+":";if(O(q))for(var Q=0;Q<q.length;Q++)ae=q[Q],ge=ne+P(ae,Q),ee+=k(ae,V,J,ge,he);else if(Q=v(q),typeof Q=="function")for(q=Q.call(q),Q=0;!(ae=q.next()).done;)ae=ae.value,ge=ne+P(ae,Q++),ee+=k(ae,V,J,ge,he);else if(ge==="object"){if(typeof q.then=="function")return k(U(q),V,J,ae,he);throw V=String(q),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ee}function z(q,V,J){if(q==null)return q;var ae=[],he=0;return k(q,ae,"","",function(ge){return V.call(J,ge,he++)}),ae}function H(q){if(q._status===-1){var V=q._result;V=V(),V.then(function(J){(q._status===0||q._status===-1)&&(q._status=1,q._result=J)},function(J){(q._status===0||q._status===-1)&&(q._status=2,q._result=J)}),q._status===-1&&(q._status=0,q._result=V)}if(q._status===1)return q._result.default;throw q._result}var F=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)},K={map:z,forEach:function(q,V,J){z(q,function(){V.apply(this,arguments)},J)},count:function(q){var V=0;return z(q,function(){V++}),V},toArray:function(q){return z(q,function(V){return V})||[]},only:function(q){if(!I(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return $e.Activity=p,$e.Children=K,$e.Component=j,$e.Fragment=n,$e.Profiler=i,$e.PureComponent=N,$e.StrictMode=r,$e.Suspense=f,$e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=C,$e.__COMPILER_RUNTIME={__proto__:null,c:function(q){return C.H.useMemoCache(q)}},$e.cache=function(q){return function(){return q.apply(null,arguments)}},$e.cacheSignal=function(){return null},$e.cloneElement=function(q,V,J){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var ae=S({},q.props),he=q.key;if(V!=null)for(ge in V.key!==void 0&&(he=""+V.key),V)!R.call(V,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&V.ref===void 0||(ae[ge]=V[ge]);var ge=arguments.length-2;if(ge===1)ae.children=J;else if(1<ge){for(var ee=Array(ge),ne=0;ne<ge;ne++)ee[ne]=arguments[ne+2];ae.children=ee}return D(q.type,he,ae)},$e.createContext=function(q){return q={$$typeof:l,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:o,_context:q},q},$e.createElement=function(q,V,J){var ae,he={},ge=null;if(V!=null)for(ae in V.key!==void 0&&(ge=""+V.key),V)R.call(V,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(he[ae]=V[ae]);var ee=arguments.length-2;if(ee===1)he.children=J;else if(1<ee){for(var ne=Array(ee),Q=0;Q<ee;Q++)ne[Q]=arguments[Q+2];he.children=ne}if(q&&q.defaultProps)for(ae in ee=q.defaultProps,ee)he[ae]===void 0&&(he[ae]=ee[ae]);return D(q,ge,he)},$e.createRef=function(){return{current:null}},$e.forwardRef=function(q){return{$$typeof:c,render:q}},$e.isValidElement=I,$e.lazy=function(q){return{$$typeof:y,_payload:{_status:-1,_result:q},_init:H}},$e.memo=function(q,V){return{$$typeof:d,type:q,compare:V===void 0?null:V}},$e.startTransition=function(q){var V=C.T,J={};C.T=J;try{var ae=q(),he=C.S;he!==null&&he(J,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(A,F)}catch(ge){F(ge)}finally{V!==null&&J.types!==null&&(V.types=J.types),C.T=V}},$e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},$e.use=function(q){return C.H.use(q)},$e.useActionState=function(q,V,J){return C.H.useActionState(q,V,J)},$e.useCallback=function(q,V){return C.H.useCallback(q,V)},$e.useContext=function(q){return C.H.useContext(q)},$e.useDebugValue=function(){},$e.useDeferredValue=function(q,V){return C.H.useDeferredValue(q,V)},$e.useEffect=function(q,V){return C.H.useEffect(q,V)},$e.useEffectEvent=function(q){return C.H.useEffectEvent(q)},$e.useId=function(){return C.H.useId()},$e.useImperativeHandle=function(q,V,J){return C.H.useImperativeHandle(q,V,J)},$e.useInsertionEffect=function(q,V){return C.H.useInsertionEffect(q,V)},$e.useLayoutEffect=function(q,V){return C.H.useLayoutEffect(q,V)},$e.useMemo=function(q,V){return C.H.useMemo(q,V)},$e.useOptimistic=function(q,V){return C.H.useOptimistic(q,V)},$e.useReducer=function(q,V,J){return C.H.useReducer(q,V,J)},$e.useRef=function(q){return C.H.useRef(q)},$e.useState=function(q){return C.H.useState(q)},$e.useSyncExternalStore=function(q,V,J){return C.H.useSyncExternalStore(q,V,J)},$e.useTransition=function(){return C.H.useTransition()},$e.version="19.2.6",$e}var cE;function Yf(){return cE||(cE=1,ov.exports=CB()),ov.exports}var $=Yf();const W=at($);var sv={exports:{}},yu={},lv={exports:{}},cv={};/**
|
|
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 uE;function MB(){return uE||(uE=1,(function(e){function t(k,z){var H=k.length;k.push(z);e:for(;0<H;){var F=H-1>>>1,K=k[F];if(0<i(K,z))k[F]=z,k[H]=K,H=F;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var z=k[0],H=k.pop();if(H!==z){k[0]=H;e:for(var F=0,K=k.length,q=K>>>1;F<q;){var V=2*(F+1)-1,J=k[V],ae=V+1,he=k[ae];if(0>i(J,H))ae<K&&0>i(he,J)?(k[F]=he,k[ae]=H,F=ae):(k[F]=J,k[V]=H,F=V);else if(ae<K&&0>i(he,H))k[F]=he,k[ae]=H,F=ae;else break e}}return z}function i(k,z){var H=k.sortIndex-z.sortIndex;return H!==0?H:k.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var 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,v=!1,w=!1,S=!1,b=!1,j=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function E(k){for(var z=n(d);z!==null;){if(z.callback===null)r(d);else if(z.startTime<=k)r(d),z.sortIndex=z.expirationTime,t(f,z);else break;z=n(d)}}function O(k){if(S=!1,E(k),!w)if(n(f)!==null)w=!0,A||(A=!0,L());else{var z=n(d);z!==null&&U(O,z.startTime-k)}}var A=!1,C=-1,R=5,D=-1;function G(){return b?!0:!(e.unstable_now()-D<R)}function I(){if(b=!1,A){var k=e.unstable_now();D=k;var z=!0;try{e:{w=!1,S&&(S=!1,T(C),C=-1),v=!0;var H=g;try{t:{for(E(k),p=n(f);p!==null&&!(p.expirationTime>k&&G());){var F=p.callback;if(typeof F=="function"){p.callback=null,g=p.priorityLevel;var K=F(p.expirationTime<=k);if(k=e.unstable_now(),typeof K=="function"){p.callback=K,E(k),z=!0;break t}p===n(f)&&r(f),E(k)}else r(f);p=n(f)}if(p!==null)z=!0;else{var q=n(d);q!==null&&U(O,q.startTime-k),z=!1}}break e}finally{p=null,g=H,v=!1}z=void 0}}finally{z?L():A=!1}}}var L;if(typeof N=="function")L=function(){N(I)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,P=Y.port2;Y.port1.onmessage=I,L=function(){P.postMessage(null)}}else L=function(){j(I,0)};function U(k,z){C=j(function(){k(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(k){switch(g){case 1:case 2:case 3:var z=3;break;default:z=g}var H=g;g=z;try{return k()}finally{g=H}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(k,z){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var H=g;g=k;try{return z()}finally{g=H}},e.unstable_scheduleCallback=function(k,z,H){var F=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?F+H:F):H=F,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:z,priorityLevel:k,startTime:H,expirationTime:K,sortIndex:-1},H>F?(k.sortIndex=H,t(d,k),n(f)===null&&k===n(d)&&(S?(T(C),C=-1):S=!0,U(O,H-F))):(k.sortIndex=K,t(f,k),w||v||(w=!0,A||(A=!0,L()))),k},e.unstable_shouldYield=G,e.unstable_wrapCallback=function(k){var z=g;return function(){var H=g;g=z;try{return k.apply(this,arguments)}finally{g=H}}}})(cv)),cv}var fE;function kB(){return fE||(fE=1,lv.exports=MB()),lv.exports}var uv={exports:{}},hn={};/**
|
|
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 dE;function RB(){if(dE)return hn;dE=1;var e=Yf();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 hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,hn.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)},hn.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()}},hn.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))},hn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},hn.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,v=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:v}):y==="script"&&r.d.X(f,{crossOrigin:p,integrity:g,fetchPriority:v,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},hn.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)},hn.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})}},hn.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)},hn.requestFormReset=function(f){r.d.r(f)},hn.unstable_batchedUpdates=function(f,d){return f(d)},hn.useFormState=function(f,d,y){return l.H.useFormState(f,d,y)},hn.useFormStatus=function(){return l.H.useHostTransitionStatus()},hn.version="19.2.6",hn}var hE;function cP(){if(hE)return uv.exports;hE=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(),uv.exports=RB(),uv.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 pE;function PB(){if(pE)return yu;pE=1;var e=kB(),t=Yf(),n=cP();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,m=s;;){var x=u.return;if(x===null)break;var _=x.alternate;if(_===null){if(m=x.return,m!==null){u=m;continue}break}if(x.child===_.child){for(_=x.child;_;){if(_===u)return f(x),a;if(_===m)return f(x),s;_=_.sibling}throw Error(r(188))}if(u.return!==m.return)u=x,m=_;else{for(var M=!1,B=x.child;B;){if(B===u){M=!0,u=x,m=_;break}if(B===m){M=!0,m=x,u=_;break}B=B.sibling}if(!M){for(B=_.child;B;){if(B===u){M=!0,u=_,m=x;break}if(B===m){M=!0,m=_,u=x;break}B=B.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==m)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"),v=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),N=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function L(a){return a===null||typeof a!="object"?null:(a=I&&a[I]||a["@@iterator"],typeof a=="function"?a:null)}var Y=Symbol.for("react.client.reference");function P(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 j:return"Profiler";case b:return"StrictMode";case O:return"Suspense";case A:return"SuspenseList";case D:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case w:return"Portal";case N:return a.displayName||"Context";case T:return(a._context.displayName||"Context")+".Consumer";case E: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:P(a.type)||"Memo";case R:s=a._payload,a=a._init;try{return P(a(s))}catch{}}return null}var U=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H={pending:!1,data:null,method:null,action:null},F=[],K=-1;function q(a){return{current:a}}function V(a){0>K||(a.current=F[K],F[K]=null,K--)}function J(a,s){K++,F[K]=a.current,a.current=s}var ae=q(null),he=q(null),ge=q(null),ee=q(null);function ne(a,s){switch(J(ge,s),J(he,a),J(ae,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?EO(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=EO(s),a=TO(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}V(ae),J(ae,a)}function Q(){V(ae),V(he),V(ge)}function ye(a){a.memoizedState!==null&&J(ee,a);var s=ae.current,u=TO(s,a.type);s!==u&&(J(he,a),J(ae,u))}function ce(a){he.current===a&&(V(ae),V(he)),ee.current===a&&(V(ee),fu._currentValue=H)}var re,be;function Se(a){if(re===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);re=s&&s[1]||"",be=-1<u.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+re+a+be}var Te=!1;function Ae(a,s){if(!a||Te)return"";Te=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(le){var se=le}Reflect.construct(a,[],me)}else{try{me.call()}catch(le){se=le}a.call(me.prototype)}}else{try{throw Error()}catch(le){se=le}(me=a())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(le){if(le&&se&&typeof le.stack=="string")return[le.stack,se.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var _=m.DetermineComponentFrameRoot(),M=_[0],B=_[1];if(M&&B){var X=M.split(`
|
|
44
|
+
`),oe=B.split(`
|
|
45
|
+
`);for(x=m=0;m<X.length&&!X[m].includes("DetermineComponentFrameRoot");)m++;for(;x<oe.length&&!oe[x].includes("DetermineComponentFrameRoot");)x++;if(m===X.length||x===oe.length)for(m=X.length-1,x=oe.length-1;1<=m&&0<=x&&X[m]!==oe[x];)x--;for(;1<=m&&0<=x;m--,x--)if(X[m]!==oe[x]){if(m!==1||x!==1)do if(m--,x--,0>x||X[m]!==oe[x]){var ue=`
|
|
46
|
+
`+X[m].replace(" at new "," at ");return a.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",a.displayName)),ue}while(1<=m&&0<=x);break}}}finally{Te=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Se(u):""}function Ue(a,s){switch(a.tag){case 26:case 27:case 5:return Se(a.type);case 16:return Se("Lazy");case 13:return a.child!==s&&s!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return Ae(a.type,!1);case 11:return Ae(a.type.render,!1);case 1:return Ae(a.type,!0);case 31:return Se("Activity");default:return""}}function xt(a){try{var s="",u=null;do s+=Ue(a,u),u=a,a=a.return;while(a);return s}catch(m){return`
|
|
47
|
+
Error generating stack: `+m.message+`
|
|
48
|
+
`+m.stack}}var jt=Object.prototype.hasOwnProperty,Zt=e.unstable_scheduleCallback,Pt=e.unstable_cancelCallback,De=e.unstable_shouldYield,ze=e.unstable_requestPaint,nt=e.unstable_now,gr=e.unstable_getCurrentPriorityLevel,Qn=e.unstable_ImmediatePriority,At=e.unstable_UserBlockingPriority,Dn=e.unstable_NormalPriority,bc=e.unstable_LowPriority,oi=e.unstable_IdlePriority,wc=e.log,Uy=e.unstable_setDisableYieldValue,io=null,vn=null;function Lr(a){if(typeof wc=="function"&&Uy(a),vn&&typeof vn.setStrictMode=="function")try{vn.setStrictMode(io,a)}catch{}}var xn=Math.clz32?Math.clz32:Fy,Gy=Math.log,Vy=Math.LN2;function Fy(a){return a>>>=0,a===0?32:31-(Gy(a)/Vy|0)|0}var ps=256,ms=262144,ys=4194304;function si(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 gs(a,s,u){var m=a.pendingLanes;if(m===0)return 0;var x=0,_=a.suspendedLanes,M=a.pingedLanes;a=a.warmLanes;var B=m&134217727;return B!==0?(m=B&~_,m!==0?x=si(m):(M&=B,M!==0?x=si(M):u||(u=B&~a,u!==0&&(x=si(u))))):(B=m&~_,B!==0?x=si(B):M!==0?x=si(M):u||(u=m&~a,u!==0&&(x=si(u)))),x===0?0:s!==0&&s!==x&&(s&_)===0&&(_=x&-x,u=s&-s,_>=u||_===32&&(u&4194048)!==0)?s:x}function ao(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function Yy(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 cd(){var a=ys;return ys<<=1,(ys&62914560)===0&&(ys=4194304),a}function Sc(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function oo(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Xy(a,s,u,m,x,_){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,oe=a.hiddenUpdates;for(u=M&~u;0<u;){var ue=31-xn(u),me=1<<ue;B[ue]=0,X[ue]=-1;var se=oe[ue];if(se!==null)for(oe[ue]=null,ue=0;ue<se.length;ue++){var le=se[ue];le!==null&&(le.lane&=-536870913)}u&=~me}m!==0&&ud(a,m,0),_!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=_&~(M&~s))}function ud(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var m=31-xn(s);a.entangledLanes|=s,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function fd(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var m=31-xn(u),x=1<<m;x&s|a[m]&s&&(a[m]|=s),u&=~x}}function dd(a,s){var u=s&-s;return u=(u&42)!==0?1:_c(u),(u&(a.suspendedLanes|s))!==0?0:u}function _c(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 jc(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function hd(){var a=z.p;return a!==0?a:(a=window.event,a===void 0?32:ZO(a.type))}function pd(a,s){var u=z.p;try{return z.p=a,s()}finally{z.p=u}}var qr=Math.random().toString(36).slice(2),Ft="__reactFiber$"+qr,dn="__reactProps$"+qr,li="__reactContainer$"+qr,vs="__reactEvents$"+qr,md="__reactListeners$"+qr,Ky="__reactHandles$"+qr,yd="__reactResources$"+qr,so="__reactMarker$"+qr;function Ac(a){delete a[Ft],delete a[dn],delete a[vs],delete a[md],delete a[Ky]}function ea(a){var s=a[Ft];if(s)return s;for(var u=a.parentNode;u;){if(s=u[li]||u[Ft]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=$O(a);a!==null;){if(u=a[Ft])return u;a=$O(a)}return s}a=u,u=a.parentNode}return null}function ta(a){if(a=a[Ft]||a[li]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function na(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function ra(a){var s=a[yd];return s||(s=a[yd]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function It(a){a[so]=!0}var gd=new Set,vd={};function ci(a,s){ia(a,s),ia(a+"Capture",s)}function ia(a,s){for(vd[a]=s,a=0;a<s.length;a++)gd.add(s[a])}var Wy=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]*$"),Nc={},xd={};function Qy(a){return jt.call(xd,a)?!0:jt.call(Nc,a)?!1:Wy.test(a)?xd[a]=!0:(Nc[a]=!0,!1)}function xs(a,s,u){if(Qy(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function bs(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 vr(a,s,u,m){if(m===null)a.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+m)}}function An(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function bd(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Zy(a,s,u){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var x=m.get,_=m.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return x.call(this)},set:function(M){u=""+M,_.call(this,M)}}),Object.defineProperty(a,s,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function aa(a){if(!a._valueTracker){var s=bd(a)?"checked":"value";a._valueTracker=Zy(a,s,""+a[s])}}function wd(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return a&&(m=bd(a)?a.checked?"true":"false":a.value),a=m,a!==u?(s.setValue(a),!0):!1}function lo(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 Jy=/[\n"\\]/g;function Nn(a){return a.replace(Jy,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function co(a,s,u,m,x,_,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=""+An(s)):a.value!==""+An(s)&&(a.value=""+An(s)):M!=="submit"&&M!=="reset"||a.removeAttribute("value"),s!=null?Oc(a,M,An(s)):u!=null?Oc(a,M,An(u)):m!=null&&a.removeAttribute("value"),x==null&&_!=null&&(a.defaultChecked=!!_),x!=null&&(a.checked=x&&typeof x!="function"&&typeof x!="symbol"),B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?a.name=""+An(B):a.removeAttribute("name")}function Sd(a,s,u,m,x,_,M,B){if(_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(a.type=_),s!=null||u!=null){if(!(_!=="submit"&&_!=="reset"||s!=null)){aa(a);return}u=u!=null?""+An(u):"",s=s!=null?""+An(s):u,B||s===a.value||(a.value=s),a.defaultValue=s}m=m??x,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=B?a.checked:!!m,a.defaultChecked=!!m,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(a.name=M),aa(a)}function Oc(a,s,u){s==="number"&&lo(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function ui(a,s,u,m){if(a=a.options,s){s={};for(var x=0;x<u.length;x++)s["$"+u[x]]=!0;for(u=0;u<a.length;u++)x=s.hasOwnProperty("$"+a[u].value),a[u].selected!==x&&(a[u].selected=x),x&&m&&(a[u].defaultSelected=!0)}else{for(u=""+An(u),s=null,x=0;x<a.length;x++){if(a[x].value===u){a[x].selected=!0,m&&(a[x].defaultSelected=!0);return}s!==null||a[x].disabled||(s=a[x])}s!==null&&(s.selected=!0)}}function _j(a,s,u){if(s!=null&&(s=""+An(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+An(u):""}function jj(a,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(r(92));if(U(m)){if(1<m.length)throw Error(r(93));m=m[0]}u=m}u==null&&(u=""),s=u}u=An(s),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),aa(a)}function ws(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var _L=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 Aj(a,s,u){var m=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":m?a.setProperty(s,u):typeof u!="number"||u===0||_L.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function Nj(a,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var x in s)m=s[x],s.hasOwnProperty(x)&&u[x]!==m&&Aj(a,x,m)}else for(var _ in s)s.hasOwnProperty(_)&&Aj(a,_,s[_])}function eg(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 jL=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"]]),AL=/^[\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 _d(a){return AL.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function fi(){}var tg=null;function ng(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Ss=null,_s=null;function Oj(a){var s=ta(a);if(s&&(a=s.stateNode)){var u=a[dn]||null;e:switch(a=s.stateNode,s.type){case"input":if(co(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="'+Nn(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var m=u[s];if(m!==a&&m.form===a.form){var x=m[dn]||null;if(!x)throw Error(r(90));co(m,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===a.form&&wd(m)}break e;case"textarea":_j(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&ui(a,!!u.multiple,s,!1)}}}var rg=!1;function Ej(a,s,u){if(rg)return a(s,u);rg=!0;try{var m=a(s);return m}finally{if(rg=!1,(Ss!==null||_s!==null)&&(uh(),Ss&&(s=Ss,a=_s,_s=Ss=null,Oj(s),a)))for(s=0;s<a.length;s++)Oj(a[s])}}function Ec(a,s){var u=a.stateNode;if(u===null)return null;var m=u[dn]||null;if(m===null)return null;u=m[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":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ig=!1;if(di)try{var Tc={};Object.defineProperty(Tc,"passive",{get:function(){ig=!0}}),window.addEventListener("test",Tc,Tc),window.removeEventListener("test",Tc,Tc)}catch{ig=!1}var oa=null,ag=null,jd=null;function Tj(){if(jd)return jd;var a,s=ag,u=s.length,m,x="value"in oa?oa.value:oa.textContent,_=x.length;for(a=0;a<u&&s[a]===x[a];a++);var M=u-a;for(m=1;m<=M&&s[u-m]===x[_-m];m++);return jd=x.slice(a,1<m?1-m:void 0)}function Ad(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 Nd(){return!0}function Cj(){return!1}function On(a){function s(u,m,x,_,M){this._reactName=u,this._targetInst=x,this.type=m,this.nativeEvent=_,this.target=M,this.currentTarget=null;for(var B in a)a.hasOwnProperty(B)&&(u=a[B],this[B]=u?u(_):_[B]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?Nd:Cj,this.isPropagationStopped=Cj,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=Nd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Nd)},persist:function(){},isPersistent:Nd}),s}var uo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Od=On(uo),Cc=p({},uo,{view:0,detail:0}),NL=On(Cc),og,sg,Mc,Ed=p({},Cc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cg,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!==Mc&&(Mc&&a.type==="mousemove"?(og=a.screenX-Mc.screenX,sg=a.screenY-Mc.screenY):sg=og=0,Mc=a),og)},movementY:function(a){return"movementY"in a?a.movementY:sg}}),Mj=On(Ed),OL=p({},Ed,{dataTransfer:0}),EL=On(OL),TL=p({},Cc,{relatedTarget:0}),lg=On(TL),CL=p({},uo,{animationName:0,elapsedTime:0,pseudoElement:0}),ML=On(CL),kL=p({},uo,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),RL=On(kL),PL=p({},uo,{data:0}),kj=On(PL),DL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$L={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"},IL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function LL(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=IL[a])?!!s[a]:!1}function cg(){return LL}var qL=p({},Cc,{key:function(a){if(a.key){var s=DL[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Ad(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?$L[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cg,charCode:function(a){return a.type==="keypress"?Ad(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Ad(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),BL=On(qL),zL=p({},Ed,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rj=On(zL),HL=p({},Cc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cg}),UL=On(HL),GL=p({},uo,{propertyName:0,elapsedTime:0,pseudoElement:0}),VL=On(GL),FL=p({},Ed,{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}),YL=On(FL),XL=p({},uo,{newState:0,oldState:0}),KL=On(XL),WL=[9,13,27,32],ug=di&&"CompositionEvent"in window,kc=null;di&&"documentMode"in document&&(kc=document.documentMode);var QL=di&&"TextEvent"in window&&!kc,Pj=di&&(!ug||kc&&8<kc&&11>=kc),Dj=" ",$j=!1;function Ij(a,s){switch(a){case"keyup":return WL.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lj(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var js=!1;function ZL(a,s){switch(a){case"compositionend":return Lj(s);case"keypress":return s.which!==32?null:($j=!0,Dj);case"textInput":return a=s.data,a===Dj&&$j?null:a;default:return null}}function JL(a,s){if(js)return a==="compositionend"||!ug&&Ij(a,s)?(a=Tj(),jd=ag=oa=null,js=!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 Pj&&s.locale!=="ko"?null:s.data;default:return null}}var eq={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 qj(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!eq[a.type]:s==="textarea"}function Bj(a,s,u,m){Ss?_s?_s.push(m):_s=[m]:Ss=m,s=gh(s,"onChange"),0<s.length&&(u=new Od("onChange","change",null,u,m),a.push({event:u,listeners:s}))}var Rc=null,Pc=null;function tq(a){SO(a,0)}function Td(a){var s=na(a);if(wd(s))return a}function zj(a,s){if(a==="change")return s}var Hj=!1;if(di){var fg;if(di){var dg="oninput"in document;if(!dg){var Uj=document.createElement("div");Uj.setAttribute("oninput","return;"),dg=typeof Uj.oninput=="function"}fg=dg}else fg=!1;Hj=fg&&(!document.documentMode||9<document.documentMode)}function Gj(){Rc&&(Rc.detachEvent("onpropertychange",Vj),Pc=Rc=null)}function Vj(a){if(a.propertyName==="value"&&Td(Pc)){var s=[];Bj(s,Pc,a,ng(a)),Ej(tq,s)}}function nq(a,s,u){a==="focusin"?(Gj(),Rc=s,Pc=u,Rc.attachEvent("onpropertychange",Vj)):a==="focusout"&&Gj()}function rq(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Td(Pc)}function iq(a,s){if(a==="click")return Td(s)}function aq(a,s){if(a==="input"||a==="change")return Td(s)}function oq(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var $n=typeof Object.is=="function"?Object.is:oq;function Dc(a,s){if($n(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var x=u[m];if(!jt.call(s,x)||!$n(a[x],s[x]))return!1}return!0}function Fj(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Yj(a,s){var u=Fj(a);a=0;for(var m;u;){if(u.nodeType===3){if(m=a+u.textContent.length,a<=s&&m>=s)return{node:u,offset:s-a};a=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=Fj(u)}}function Xj(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Xj(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function Kj(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=lo(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=lo(a.document)}return s}function hg(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 sq=di&&"documentMode"in document&&11>=document.documentMode,As=null,pg=null,$c=null,mg=!1;function Wj(a,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;mg||As==null||As!==lo(m)||(m=As,"selectionStart"in m&&hg(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),$c&&Dc($c,m)||($c=m,m=gh(pg,"onSelect"),0<m.length&&(s=new Od("onSelect","select",null,s,u),a.push({event:s,listeners:m}),s.target=As)))}function fo(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var Ns={animationend:fo("Animation","AnimationEnd"),animationiteration:fo("Animation","AnimationIteration"),animationstart:fo("Animation","AnimationStart"),transitionrun:fo("Transition","TransitionRun"),transitionstart:fo("Transition","TransitionStart"),transitioncancel:fo("Transition","TransitionCancel"),transitionend:fo("Transition","TransitionEnd")},yg={},Qj={};di&&(Qj=document.createElement("div").style,"AnimationEvent"in window||(delete Ns.animationend.animation,delete Ns.animationiteration.animation,delete Ns.animationstart.animation),"TransitionEvent"in window||delete Ns.transitionend.transition);function ho(a){if(yg[a])return yg[a];if(!Ns[a])return a;var s=Ns[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in Qj)return yg[a]=s[u];return a}var Zj=ho("animationend"),Jj=ho("animationiteration"),eA=ho("animationstart"),lq=ho("transitionrun"),cq=ho("transitionstart"),uq=ho("transitioncancel"),tA=ho("transitionend"),nA=new Map,gg="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(" ");gg.push("scrollEnd");function xr(a,s){nA.set(a,s),ci(s,[a])}var Cd=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)},Zn=[],Os=0,vg=0;function Md(){for(var a=Os,s=vg=Os=0;s<a;){var u=Zn[s];Zn[s++]=null;var m=Zn[s];Zn[s++]=null;var x=Zn[s];Zn[s++]=null;var _=Zn[s];if(Zn[s++]=null,m!==null&&x!==null){var M=m.pending;M===null?x.next=x:(x.next=M.next,M.next=x),m.pending=x}_!==0&&rA(u,x,_)}}function kd(a,s,u,m){Zn[Os++]=a,Zn[Os++]=s,Zn[Os++]=u,Zn[Os++]=m,vg|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function xg(a,s,u,m){return kd(a,s,u,m),Rd(a)}function po(a,s){return kd(a,null,null,s),Rd(a)}function rA(a,s,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var x=!1,_=a.return;_!==null;)_.childLanes|=u,m=_.alternate,m!==null&&(m.childLanes|=u),_.tag===22&&(a=_.stateNode,a===null||a._visibility&1||(x=!0)),a=_,_=_.return;return a.tag===3?(_=a.stateNode,x&&s!==null&&(x=31-xn(u),a=_.hiddenUpdates,m=a[x],m===null?a[x]=[s]:m.push(s),s.lane=u|536870912),_):null}function Rd(a){if(50<iu)throw iu=0,E0=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Es={};function fq(a,s,u,m){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=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function In(a,s,u,m){return new fq(a,s,u,m)}function bg(a){return a=a.prototype,!(!a||!a.isReactComponent)}function hi(a,s){var u=a.alternate;return u===null?(u=In(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 iA(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 Pd(a,s,u,m,x,_){var M=0;if(m=a,typeof a=="function")bg(a)&&(M=1);else if(typeof a=="string")M=yB(a,u,ae.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case D:return a=In(31,u,s,x),a.elementType=D,a.lanes=_,a;case S:return mo(u.children,x,_,s);case b:M=8,x|=24;break;case j:return a=In(12,u,s,x|2),a.elementType=j,a.lanes=_,a;case O:return a=In(13,u,s,x),a.elementType=O,a.lanes=_,a;case A:return a=In(19,u,s,x),a.elementType=A,a.lanes=_,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:M=10;break e;case T:M=9;break e;case E:M=11;break e;case C:M=14;break e;case R:M=16,m=null;break e}M=29,u=Error(r(130,a===null?"null":typeof a,"")),m=null}return s=In(M,u,s,x),s.elementType=a,s.type=m,s.lanes=_,s}function mo(a,s,u,m){return a=In(7,a,m,s),a.lanes=u,a}function wg(a,s,u){return a=In(6,a,null,s),a.lanes=u,a}function aA(a){var s=In(18,null,null,0);return s.stateNode=a,s}function Sg(a,s,u){return s=In(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var oA=new WeakMap;function Jn(a,s){if(typeof a=="object"&&a!==null){var u=oA.get(a);return u!==void 0?u:(s={value:a,source:s,stack:xt(s)},oA.set(a,s),s)}return{value:a,source:s,stack:xt(s)}}var Ts=[],Cs=0,Dd=null,Ic=0,er=[],tr=0,sa=null,Br=1,zr="";function pi(a,s){Ts[Cs++]=Ic,Ts[Cs++]=Dd,Dd=a,Ic=s}function sA(a,s,u){er[tr++]=Br,er[tr++]=zr,er[tr++]=sa,sa=a;var m=Br;a=zr;var x=32-xn(m)-1;m&=~(1<<x),u+=1;var _=32-xn(s)+x;if(30<_){var M=x-x%5;_=(m&(1<<M)-1).toString(32),m>>=M,x-=M,Br=1<<32-xn(s)+x|u<<x|m,zr=_+a}else Br=1<<_|u<<x|m,zr=a}function _g(a){a.return!==null&&(pi(a,1),sA(a,1,0))}function jg(a){for(;a===Dd;)Dd=Ts[--Cs],Ts[Cs]=null,Ic=Ts[--Cs],Ts[Cs]=null;for(;a===sa;)sa=er[--tr],er[tr]=null,zr=er[--tr],er[tr]=null,Br=er[--tr],er[tr]=null}function lA(a,s){er[tr++]=Br,er[tr++]=zr,er[tr++]=sa,Br=s.id,zr=s.overflow,sa=a}var on=null,bt=null,Ke=!1,la=null,nr=!1,Ag=Error(r(519));function ca(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lc(Jn(s,a)),Ag}function cA(a){var s=a.stateNode,u=a.type,m=a.memoizedProps;switch(s[Ft]=a,s[dn]=m,u){case"dialog":Ve("cancel",s),Ve("close",s);break;case"iframe":case"object":case"embed":Ve("load",s);break;case"video":case"audio":for(u=0;u<ou.length;u++)Ve(ou[u],s);break;case"source":Ve("error",s);break;case"img":case"image":case"link":Ve("error",s),Ve("load",s);break;case"details":Ve("toggle",s);break;case"input":Ve("invalid",s),Sd(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Ve("invalid",s);break;case"textarea":Ve("invalid",s),jj(s,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||m.suppressHydrationWarning===!0||NO(s.textContent,u)?(m.popover!=null&&(Ve("beforetoggle",s),Ve("toggle",s)),m.onScroll!=null&&Ve("scroll",s),m.onScrollEnd!=null&&Ve("scrollend",s),m.onClick!=null&&(s.onclick=fi),s=!0):s=!1,s||ca(a,!0)}function uA(a){for(on=a.return;on;)switch(on.tag){case 5:case 31:case 13:nr=!1;return;case 27:case 3:nr=!0;return;default:on=on.return}}function Ms(a){if(a!==on)return!1;if(!Ke)return uA(a),Ke=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||U0(a.type,a.memoizedProps)),u=!u),u&&bt&&ca(a),uA(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));bt=DO(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));bt=DO(a)}else s===27?(s=bt,_a(a.type)?(a=X0,X0=null,bt=a):bt=s):bt=on?ir(a.stateNode.nextSibling):null;return!0}function yo(){bt=on=null,Ke=!1}function Ng(){var a=la;return a!==null&&(Mn===null?Mn=a:Mn.push.apply(Mn,a),la=null),a}function Lc(a){la===null?la=[a]:la.push(a)}var Og=q(null),go=null,mi=null;function ua(a,s,u){J(Og,s._currentValue),s._currentValue=u}function yi(a){a._currentValue=Og.current,V(Og)}function Eg(a,s,u){for(;a!==null;){var m=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),a===u)break;a=a.return}}function Tg(a,s,u,m){var x=a.child;for(x!==null&&(x.return=a);x!==null;){var _=x.dependencies;if(_!==null){var M=x.child;_=_.firstContext;e:for(;_!==null;){var B=_;_=x;for(var X=0;X<s.length;X++)if(B.context===s[X]){_.lanes|=u,B=_.alternate,B!==null&&(B.lanes|=u),Eg(_.return,u,a),m||(M=null);break e}_=B.next}}else if(x.tag===18){if(M=x.return,M===null)throw Error(r(341));M.lanes|=u,_=M.alternate,_!==null&&(_.lanes|=u),Eg(M,u,a),M=null}else M=x.child;if(M!==null)M.return=x;else for(M=x;M!==null;){if(M===a){M=null;break}if(x=M.sibling,x!==null){x.return=M.return,M=x;break}M=M.return}x=M}}function ks(a,s,u,m){a=null;for(var x=s,_=!1;x!==null;){if(!_){if((x.flags&524288)!==0)_=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var M=x.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var B=x.type;$n(x.pendingProps.value,M.value)||(a!==null?a.push(B):a=[B])}}else if(x===ee.current){if(M=x.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(a!==null?a.push(fu):a=[fu])}x=x.return}a!==null&&Tg(s,a,u,m),s.flags|=262144}function $d(a){for(a=a.firstContext;a!==null;){if(!$n(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function vo(a){go=a,mi=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function sn(a){return fA(go,a)}function Id(a,s){return go===null&&vo(a),fA(a,s)}function fA(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},mi===null){if(a===null)throw Error(r(308));mi=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else mi=mi.next=s;return u}var dq=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,m){a.push(m)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},hq=e.unstable_scheduleCallback,pq=e.unstable_NormalPriority,Lt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cg(){return{controller:new dq,data:new Map,refCount:0}}function qc(a){a.refCount--,a.refCount===0&&hq(pq,function(){a.controller.abort()})}var Bc=null,Mg=0,Rs=0,Ps=null;function mq(a,s){if(Bc===null){var u=Bc=[];Mg=0,Rs=P0(),Ps={status:"pending",value:void 0,then:function(m){u.push(m)}}}return Mg++,s.then(dA,dA),s}function dA(){if(--Mg===0&&Bc!==null){Ps!==null&&(Ps.status="fulfilled");var a=Bc;Bc=null,Rs=0,Ps=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function yq(a,s){var u=[],m={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return a.then(function(){m.status="fulfilled",m.value=s;for(var x=0;x<u.length;x++)(0,u[x])(s)},function(x){for(m.status="rejected",m.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),m}var hA=k.S;k.S=function(a,s){WN=nt(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&mq(a,s),hA!==null&&hA(a,s)};var xo=q(null);function kg(){var a=xo.current;return a!==null?a:pt.pooledCache}function Ld(a,s){s===null?J(xo,xo.current):J(xo,s.pool)}function pA(){var a=kg();return a===null?null:{parent:Lt._currentValue,pool:a}}var Ds=Error(r(460)),Rg=Error(r(474)),qd=Error(r(542)),Bd={then:function(){}};function mA(a){return a=a.status,a==="fulfilled"||a==="rejected"}function yA(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(fi,fi),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,vA(a),a;default:if(typeof s.status=="string")s.then(fi,fi);else{if(a=pt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(m){if(s.status==="pending"){var x=s;x.status="fulfilled",x.value=m}},function(m){if(s.status==="pending"){var x=s;x.status="rejected",x.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,vA(a),a}throw wo=s,Ds}}function bo(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(wo=u,Ds):u}}var wo=null;function gA(){if(wo===null)throw Error(r(459));var a=wo;return wo=null,a}function vA(a){if(a===Ds||a===qd)throw Error(r(483))}var $s=null,zc=0;function zd(a){var s=zc;return zc+=1,$s===null&&($s=[]),yA($s,a,s)}function Hc(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Hd(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 xA(a){function s(te,Z){if(a){var ie=te.deletions;ie===null?(te.deletions=[Z],te.flags|=16):ie.push(Z)}}function u(te,Z){if(!a)return null;for(;Z!==null;)s(te,Z),Z=Z.sibling;return null}function m(te){for(var Z=new Map;te!==null;)te.key!==null?Z.set(te.key,te):Z.set(te.index,te),te=te.sibling;return Z}function x(te,Z){return te=hi(te,Z),te.index=0,te.sibling=null,te}function _(te,Z,ie){return te.index=ie,a?(ie=te.alternate,ie!==null?(ie=ie.index,ie<Z?(te.flags|=67108866,Z):ie):(te.flags|=67108866,Z)):(te.flags|=1048576,Z)}function M(te){return a&&te.alternate===null&&(te.flags|=67108866),te}function B(te,Z,ie,pe){return Z===null||Z.tag!==6?(Z=wg(ie,te.mode,pe),Z.return=te,Z):(Z=x(Z,ie),Z.return=te,Z)}function X(te,Z,ie,pe){var Ee=ie.type;return Ee===S?ue(te,Z,ie.props.children,pe,ie.key):Z!==null&&(Z.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===R&&bo(Ee)===Z.type)?(Z=x(Z,ie.props),Hc(Z,ie),Z.return=te,Z):(Z=Pd(ie.type,ie.key,ie.props,null,te.mode,pe),Hc(Z,ie),Z.return=te,Z)}function oe(te,Z,ie,pe){return Z===null||Z.tag!==4||Z.stateNode.containerInfo!==ie.containerInfo||Z.stateNode.implementation!==ie.implementation?(Z=Sg(ie,te.mode,pe),Z.return=te,Z):(Z=x(Z,ie.children||[]),Z.return=te,Z)}function ue(te,Z,ie,pe,Ee){return Z===null||Z.tag!==7?(Z=mo(ie,te.mode,pe,Ee),Z.return=te,Z):(Z=x(Z,ie),Z.return=te,Z)}function me(te,Z,ie){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return Z=wg(""+Z,te.mode,ie),Z.return=te,Z;if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return ie=Pd(Z.type,Z.key,Z.props,null,te.mode,ie),Hc(ie,Z),ie.return=te,ie;case w:return Z=Sg(Z,te.mode,ie),Z.return=te,Z;case R:return Z=bo(Z),me(te,Z,ie)}if(U(Z)||L(Z))return Z=mo(Z,te.mode,ie,null),Z.return=te,Z;if(typeof Z.then=="function")return me(te,zd(Z),ie);if(Z.$$typeof===N)return me(te,Id(te,Z),ie);Hd(te,Z)}return null}function se(te,Z,ie,pe){var Ee=Z!==null?Z.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Ee!==null?null:B(te,Z,""+ie,pe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:return ie.key===Ee?X(te,Z,ie,pe):null;case w:return ie.key===Ee?oe(te,Z,ie,pe):null;case R:return ie=bo(ie),se(te,Z,ie,pe)}if(U(ie)||L(ie))return Ee!==null?null:ue(te,Z,ie,pe,null);if(typeof ie.then=="function")return se(te,Z,zd(ie),pe);if(ie.$$typeof===N)return se(te,Z,Id(te,ie),pe);Hd(te,ie)}return null}function le(te,Z,ie,pe,Ee){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return te=te.get(ie)||null,B(Z,te,""+pe,Ee);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case v:return te=te.get(pe.key===null?ie:pe.key)||null,X(Z,te,pe,Ee);case w:return te=te.get(pe.key===null?ie:pe.key)||null,oe(Z,te,pe,Ee);case R:return pe=bo(pe),le(te,Z,ie,pe,Ee)}if(U(pe)||L(pe))return te=te.get(ie)||null,ue(Z,te,pe,Ee,null);if(typeof pe.then=="function")return le(te,Z,ie,zd(pe),Ee);if(pe.$$typeof===N)return le(te,Z,ie,Id(Z,pe),Ee);Hd(Z,pe)}return null}function je(te,Z,ie,pe){for(var Ee=null,Ze=null,Oe=Z,Le=Z=0,Ye=null;Oe!==null&&Le<ie.length;Le++){Oe.index>Le?(Ye=Oe,Oe=null):Ye=Oe.sibling;var Je=se(te,Oe,ie[Le],pe);if(Je===null){Oe===null&&(Oe=Ye);break}a&&Oe&&Je.alternate===null&&s(te,Oe),Z=_(Je,Z,Le),Ze===null?Ee=Je:Ze.sibling=Je,Ze=Je,Oe=Ye}if(Le===ie.length)return u(te,Oe),Ke&&pi(te,Le),Ee;if(Oe===null){for(;Le<ie.length;Le++)Oe=me(te,ie[Le],pe),Oe!==null&&(Z=_(Oe,Z,Le),Ze===null?Ee=Oe:Ze.sibling=Oe,Ze=Oe);return Ke&&pi(te,Le),Ee}for(Oe=m(Oe);Le<ie.length;Le++)Ye=le(Oe,te,Le,ie[Le],pe),Ye!==null&&(a&&Ye.alternate!==null&&Oe.delete(Ye.key===null?Le:Ye.key),Z=_(Ye,Z,Le),Ze===null?Ee=Ye:Ze.sibling=Ye,Ze=Ye);return a&&Oe.forEach(function(Ea){return s(te,Ea)}),Ke&&pi(te,Le),Ee}function Ce(te,Z,ie,pe){if(ie==null)throw Error(r(151));for(var Ee=null,Ze=null,Oe=Z,Le=Z=0,Ye=null,Je=ie.next();Oe!==null&&!Je.done;Le++,Je=ie.next()){Oe.index>Le?(Ye=Oe,Oe=null):Ye=Oe.sibling;var Ea=se(te,Oe,Je.value,pe);if(Ea===null){Oe===null&&(Oe=Ye);break}a&&Oe&&Ea.alternate===null&&s(te,Oe),Z=_(Ea,Z,Le),Ze===null?Ee=Ea:Ze.sibling=Ea,Ze=Ea,Oe=Ye}if(Je.done)return u(te,Oe),Ke&&pi(te,Le),Ee;if(Oe===null){for(;!Je.done;Le++,Je=ie.next())Je=me(te,Je.value,pe),Je!==null&&(Z=_(Je,Z,Le),Ze===null?Ee=Je:Ze.sibling=Je,Ze=Je);return Ke&&pi(te,Le),Ee}for(Oe=m(Oe);!Je.done;Le++,Je=ie.next())Je=le(Oe,te,Le,Je.value,pe),Je!==null&&(a&&Je.alternate!==null&&Oe.delete(Je.key===null?Le:Je.key),Z=_(Je,Z,Le),Ze===null?Ee=Je:Ze.sibling=Je,Ze=Je);return a&&Oe.forEach(function(OB){return s(te,OB)}),Ke&&pi(te,Le),Ee}function ft(te,Z,ie,pe){if(typeof ie=="object"&&ie!==null&&ie.type===S&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:e:{for(var Ee=ie.key;Z!==null;){if(Z.key===Ee){if(Ee=ie.type,Ee===S){if(Z.tag===7){u(te,Z.sibling),pe=x(Z,ie.props.children),pe.return=te,te=pe;break e}}else if(Z.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===R&&bo(Ee)===Z.type){u(te,Z.sibling),pe=x(Z,ie.props),Hc(pe,ie),pe.return=te,te=pe;break e}u(te,Z);break}else s(te,Z);Z=Z.sibling}ie.type===S?(pe=mo(ie.props.children,te.mode,pe,ie.key),pe.return=te,te=pe):(pe=Pd(ie.type,ie.key,ie.props,null,te.mode,pe),Hc(pe,ie),pe.return=te,te=pe)}return M(te);case w:e:{for(Ee=ie.key;Z!==null;){if(Z.key===Ee)if(Z.tag===4&&Z.stateNode.containerInfo===ie.containerInfo&&Z.stateNode.implementation===ie.implementation){u(te,Z.sibling),pe=x(Z,ie.children||[]),pe.return=te,te=pe;break e}else{u(te,Z);break}else s(te,Z);Z=Z.sibling}pe=Sg(ie,te.mode,pe),pe.return=te,te=pe}return M(te);case R:return ie=bo(ie),ft(te,Z,ie,pe)}if(U(ie))return je(te,Z,ie,pe);if(L(ie)){if(Ee=L(ie),typeof Ee!="function")throw Error(r(150));return ie=Ee.call(ie),Ce(te,Z,ie,pe)}if(typeof ie.then=="function")return ft(te,Z,zd(ie),pe);if(ie.$$typeof===N)return ft(te,Z,Id(te,ie),pe);Hd(te,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,Z!==null&&Z.tag===6?(u(te,Z.sibling),pe=x(Z,ie),pe.return=te,te=pe):(u(te,Z),pe=wg(ie,te.mode,pe),pe.return=te,te=pe),M(te)):u(te,Z)}return function(te,Z,ie,pe){try{zc=0;var Ee=ft(te,Z,ie,pe);return $s=null,Ee}catch(Oe){if(Oe===Ds||Oe===qd)throw Oe;var Ze=In(29,Oe,null,te.mode);return Ze.lanes=pe,Ze.return=te,Ze}finally{}}}var So=xA(!0),bA=xA(!1),fa=!1;function Pg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dg(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 da(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function ha(a,s,u){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(tt&2)!==0){var x=m.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),m.pending=s,s=Rd(a),rA(a,null,u),s}return kd(a,m,s,u),Rd(a)}function Uc(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,fd(a,u)}}function $g(a,s){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var x=null,_=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};_===null?x=_=M:_=_.next=M,u=u.next}while(u!==null);_===null?x=_=s:_=_.next=s}else x=_=s;u={baseState:m.baseState,firstBaseUpdate:x,lastBaseUpdate:_,shared:m.shared,callbacks:m.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var Ig=!1;function Gc(){if(Ig){var a=Ps;if(a!==null)throw a}}function Vc(a,s,u,m){Ig=!1;var x=a.updateQueue;fa=!1;var _=x.firstBaseUpdate,M=x.lastBaseUpdate,B=x.shared.pending;if(B!==null){x.shared.pending=null;var X=B,oe=X.next;X.next=null,M===null?_=oe:M.next=oe,M=X;var ue=a.alternate;ue!==null&&(ue=ue.updateQueue,B=ue.lastBaseUpdate,B!==M&&(B===null?ue.firstBaseUpdate=oe:B.next=oe,ue.lastBaseUpdate=X))}if(_!==null){var me=x.baseState;M=0,ue=oe=X=null,B=_;do{var se=B.lane&-536870913,le=se!==B.lane;if(le?(Fe&se)===se:(m&se)===se){se!==0&&se===Rs&&(Ig=!0),ue!==null&&(ue=ue.next={lane:0,tag:B.tag,payload:B.payload,callback:null,next:null});e:{var je=a,Ce=B;se=s;var ft=u;switch(Ce.tag){case 1:if(je=Ce.payload,typeof je=="function"){me=je.call(ft,me,se);break e}me=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ce.payload,se=typeof je=="function"?je.call(ft,me,se):je,se==null)break e;me=p({},me,se);break e;case 2:fa=!0}}se=B.callback,se!==null&&(a.flags|=64,le&&(a.flags|=8192),le=x.callbacks,le===null?x.callbacks=[se]:le.push(se))}else le={lane:se,tag:B.tag,payload:B.payload,callback:B.callback,next:null},ue===null?(oe=ue=le,X=me):ue=ue.next=le,M|=se;if(B=B.next,B===null){if(B=x.shared.pending,B===null)break;le=B,B=le.next,le.next=null,x.lastBaseUpdate=le,x.shared.pending=null}}while(!0);ue===null&&(X=me),x.baseState=X,x.firstBaseUpdate=oe,x.lastBaseUpdate=ue,_===null&&(x.shared.lanes=0),va|=M,a.lanes=M,a.memoizedState=me}}function wA(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function SA(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)wA(u[a],s)}var Is=q(null),Ud=q(0);function _A(a,s){a=Ai,J(Ud,a),J(Is,s),Ai=a|s.baseLanes}function Lg(){J(Ud,Ai),J(Is,Is.current)}function qg(){Ai=Ud.current,V(Is),V(Ud)}var Ln=q(null),rr=null;function pa(a){var s=a.alternate;J(Dt,Dt.current&1),J(Ln,a),rr===null&&(s===null||Is.current!==null||s.memoizedState!==null)&&(rr=a)}function Bg(a){J(Dt,Dt.current),J(Ln,a),rr===null&&(rr=a)}function jA(a){a.tag===22?(J(Dt,Dt.current),J(Ln,a),rr===null&&(rr=a)):ma()}function ma(){J(Dt,Dt.current),J(Ln,Ln.current)}function qn(a){V(Ln),rr===a&&(rr=null),V(Dt)}var Dt=q(0);function Gd(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||F0(u)||Y0(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 gi=0,Ie=null,ct=null,qt=null,Vd=!1,Ls=!1,_o=!1,Fd=0,Fc=0,qs=null,gq=0;function Ct(){throw Error(r(321))}function zg(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!$n(a[u],s[u]))return!1;return!0}function Hg(a,s,u,m,x,_){return gi=_,Ie=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,k.H=a===null||a.memoizedState===null?sN:r0,_o=!1,_=u(m,x),_o=!1,Ls&&(_=NA(s,u,m,x)),AA(a),_}function AA(a){k.H=Kc;var s=ct!==null&&ct.next!==null;if(gi=0,qt=ct=Ie=null,Vd=!1,Fc=0,qs=null,s)throw Error(r(300));a===null||Bt||(a=a.dependencies,a!==null&&$d(a)&&(Bt=!0))}function NA(a,s,u,m){Ie=a;var x=0;do{if(Ls&&(qs=null),Fc=0,Ls=!1,25<=x)throw Error(r(301));if(x+=1,qt=ct=null,a.updateQueue!=null){var _=a.updateQueue;_.lastEffect=null,_.events=null,_.stores=null,_.memoCache!=null&&(_.memoCache.index=0)}k.H=lN,_=s(u,m)}while(Ls);return _}function vq(){var a=k.H,s=a.useState()[0];return s=typeof s.then=="function"?Yc(s):s,a=a.useState()[0],(ct!==null?ct.memoizedState:null)!==a&&(Ie.flags|=1024),s}function Ug(){var a=Fd!==0;return Fd=0,a}function Gg(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function Vg(a){if(Vd){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Vd=!1}gi=0,qt=ct=Ie=null,Ls=!1,Fc=Fd=0,qs=null}function bn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qt===null?Ie.memoizedState=qt=a:qt=qt.next=a,qt}function $t(){if(ct===null){var a=Ie.alternate;a=a!==null?a.memoizedState:null}else a=ct.next;var s=qt===null?Ie.memoizedState:qt.next;if(s!==null)qt=s,ct=a;else{if(a===null)throw Ie.alternate===null?Error(r(467)):Error(r(310));ct=a,a={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},qt===null?Ie.memoizedState=qt=a:qt=qt.next=a}return qt}function Yd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yc(a){var s=Fc;return Fc+=1,qs===null&&(qs=[]),a=yA(qs,a,s),s=Ie,(qt===null?s.memoizedState:qt.next)===null&&(s=s.alternate,k.H=s===null||s.memoizedState===null?sN:r0),a}function Xd(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Yc(a);if(a.$$typeof===N)return sn(a)}throw Error(r(438,String(a)))}function Fg(a){var s=null,u=Ie.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var m=Ie.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(x){return x.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=Yd(),Ie.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),m=0;m<a;m++)u[m]=G;return s.index++,u}function vi(a,s){return typeof s=="function"?s(a):s}function Kd(a){var s=$t();return Yg(s,ct,a)}function Yg(a,s,u){var m=a.queue;if(m===null)throw Error(r(311));m.lastRenderedReducer=u;var x=a.baseQueue,_=m.pending;if(_!==null){if(x!==null){var M=x.next;x.next=_.next,_.next=M}s.baseQueue=x=_,m.pending=null}if(_=a.baseState,x===null)a.memoizedState=_;else{s=x.next;var B=M=null,X=null,oe=s,ue=!1;do{var me=oe.lane&-536870913;if(me!==oe.lane?(Fe&me)===me:(gi&me)===me){var se=oe.revertLane;if(se===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),me===Rs&&(ue=!0);else if((gi&se)===se){oe=oe.next,se===Rs&&(ue=!0);continue}else me={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},X===null?(B=X=me,M=_):X=X.next=me,Ie.lanes|=se,va|=se;me=oe.action,_o&&u(_,me),_=oe.hasEagerState?oe.eagerState:u(_,me)}else se={lane:me,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},X===null?(B=X=se,M=_):X=X.next=se,Ie.lanes|=me,va|=me;oe=oe.next}while(oe!==null&&oe!==s);if(X===null?M=_:X.next=B,!$n(_,a.memoizedState)&&(Bt=!0,ue&&(u=Ps,u!==null)))throw u;a.memoizedState=_,a.baseState=M,a.baseQueue=X,m.lastRenderedState=_}return x===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function Xg(a){var s=$t(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var m=u.dispatch,x=u.pending,_=s.memoizedState;if(x!==null){u.pending=null;var M=x=x.next;do _=a(_,M.action),M=M.next;while(M!==x);$n(_,s.memoizedState)||(Bt=!0),s.memoizedState=_,s.baseQueue===null&&(s.baseState=_),u.lastRenderedState=_}return[_,m]}function OA(a,s,u){var m=Ie,x=$t(),_=Ke;if(_){if(u===void 0)throw Error(r(407));u=u()}else u=s();var M=!$n((ct||x).memoizedState,u);if(M&&(x.memoizedState=u,Bt=!0),x=x.queue,Qg(CA.bind(null,m,x,a),[a]),x.getSnapshot!==s||M||qt!==null&&qt.memoizedState.tag&1){if(m.flags|=2048,Bs(9,{destroy:void 0},TA.bind(null,m,x,u,s),null),pt===null)throw Error(r(349));_||(gi&127)!==0||EA(m,s,u)}return u}function EA(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ie.updateQueue,s===null?(s=Yd(),Ie.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function TA(a,s,u,m){s.value=u,s.getSnapshot=m,MA(s)&&kA(a)}function CA(a,s,u){return u(function(){MA(s)&&kA(a)})}function MA(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!$n(a,u)}catch{return!0}}function kA(a){var s=po(a,2);s!==null&&kn(s,a,2)}function Kg(a){var s=bn();if(typeof a=="function"){var u=a;if(a=u(),_o){Lr(!0);try{u()}finally{Lr(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:a},s}function RA(a,s,u,m){return a.baseState=u,Yg(a,ct,typeof m=="function"?m:vi)}function xq(a,s,u,m,x){if(Zd(a))throw Error(r(485));if(a=s.action,a!==null){var _={payload:x,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){_.listeners.push(M)}};k.T!==null?u(!0):_.isTransition=!1,m(_),u=s.pending,u===null?(_.next=s.pending=_,PA(s,_)):(_.next=u.next,s.pending=u.next=_)}}function PA(a,s){var u=s.action,m=s.payload,x=a.state;if(s.isTransition){var _=k.T,M={};k.T=M;try{var B=u(x,m),X=k.S;X!==null&&X(M,B),DA(a,s,B)}catch(oe){Wg(a,s,oe)}finally{_!==null&&M.types!==null&&(_.types=M.types),k.T=_}}else try{_=u(x,m),DA(a,s,_)}catch(oe){Wg(a,s,oe)}}function DA(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){$A(a,s,m)},function(m){return Wg(a,s,m)}):$A(a,s,u)}function $A(a,s,u){s.status="fulfilled",s.value=u,IA(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,PA(a,u)))}function Wg(a,s,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,IA(s),s=s.next;while(s!==m)}a.action=null}function IA(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function LA(a,s){return s}function qA(a,s){if(Ke){var u=pt.formState;if(u!==null){e:{var m=Ie;if(Ke){if(bt){t:{for(var x=bt,_=nr;x.nodeType!==8;){if(!_){x=null;break t}if(x=ir(x.nextSibling),x===null){x=null;break t}}_=x.data,x=_==="F!"||_==="F"?x:null}if(x){bt=ir(x.nextSibling),m=x.data==="F!";break e}}ca(m)}m=!1}m&&(s=u[0])}}return u=bn(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:LA,lastRenderedState:s},u.queue=m,u=iN.bind(null,Ie,m),m.dispatch=u,m=Kg(!1),_=n0.bind(null,Ie,!1,m.queue),m=bn(),x={state:s,dispatch:null,action:a,pending:null},m.queue=x,u=xq.bind(null,Ie,x,_,u),x.dispatch=u,m.memoizedState=a,[s,u,!1]}function BA(a){var s=$t();return zA(s,ct,a)}function zA(a,s,u){if(s=Yg(a,s,LA)[0],a=Kd(vi)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Yc(s)}catch(M){throw M===Ds?qd:M}else m=s;s=$t();var x=s.queue,_=x.dispatch;return u!==s.memoizedState&&(Ie.flags|=2048,Bs(9,{destroy:void 0},bq.bind(null,x,u),null)),[m,_,a]}function bq(a,s){a.action=s}function HA(a){var s=$t(),u=ct;if(u!==null)return zA(s,u,a);$t(),s=s.memoizedState,u=$t();var m=u.queue.dispatch;return u.memoizedState=a,[s,m,!1]}function Bs(a,s,u,m){return a={tag:a,create:u,deps:m,inst:s,next:null},s=Ie.updateQueue,s===null&&(s=Yd(),Ie.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(m=u.next,u.next=a,a.next=m,s.lastEffect=a),a}function UA(){return $t().memoizedState}function Wd(a,s,u,m){var x=bn();Ie.flags|=a,x.memoizedState=Bs(1|s,{destroy:void 0},u,m===void 0?null:m)}function Qd(a,s,u,m){var x=$t();m=m===void 0?null:m;var _=x.memoizedState.inst;ct!==null&&m!==null&&zg(m,ct.memoizedState.deps)?x.memoizedState=Bs(s,_,u,m):(Ie.flags|=a,x.memoizedState=Bs(1|s,_,u,m))}function GA(a,s){Wd(8390656,8,a,s)}function Qg(a,s){Qd(2048,8,a,s)}function wq(a){Ie.flags|=4;var s=Ie.updateQueue;if(s===null)s=Yd(),Ie.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function VA(a){var s=$t().memoizedState;return wq({ref:s,nextImpl:a}),function(){if((tt&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function FA(a,s){return Qd(4,2,a,s)}function YA(a,s){return Qd(4,4,a,s)}function XA(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 KA(a,s,u){u=u!=null?u.concat([a]):null,Qd(4,4,XA.bind(null,s,a),u)}function Zg(){}function WA(a,s){var u=$t();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&zg(s,m[1])?m[0]:(u.memoizedState=[a,s],a)}function QA(a,s){var u=$t();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&zg(s,m[1]))return m[0];if(m=a(),_o){Lr(!0);try{a()}finally{Lr(!1)}}return u.memoizedState=[m,s],m}function Jg(a,s,u){return u===void 0||(gi&1073741824)!==0&&(Fe&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=ZN(),Ie.lanes|=a,va|=a,u)}function ZA(a,s,u,m){return $n(u,s)?u:Is.current!==null?(a=Jg(a,u,m),$n(a,s)||(Bt=!0),a):(gi&42)===0||(gi&1073741824)!==0&&(Fe&261930)===0?(Bt=!0,a.memoizedState=u):(a=ZN(),Ie.lanes|=a,va|=a,s)}function JA(a,s,u,m,x){var _=z.p;z.p=_!==0&&8>_?_:8;var M=k.T,B={};k.T=B,n0(a,!1,s,u);try{var X=x(),oe=k.S;if(oe!==null&&oe(B,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var ue=yq(X,m);Xc(a,s,ue,Hn(a))}else Xc(a,s,m,Hn(a))}catch(me){Xc(a,s,{then:function(){},status:"rejected",reason:me},Hn())}finally{z.p=_,M!==null&&B.types!==null&&(M.types=B.types),k.T=M}}function Sq(){}function e0(a,s,u,m){if(a.tag!==5)throw Error(r(476));var x=eN(a).queue;JA(a,x,s,H,u===null?Sq:function(){return tN(a),u(m)})}function eN(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:vi,lastRenderedState:H},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function tN(a){var s=eN(a);s.next===null&&(s=a.alternate.memoizedState),Xc(a,s.next.queue,{},Hn())}function t0(){return sn(fu)}function nN(){return $t().memoizedState}function rN(){return $t().memoizedState}function _q(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Hn();a=da(u);var m=ha(s,a,u);m!==null&&(kn(m,s,u),Uc(m,s,u)),s={cache:Cg()},a.payload=s;return}s=s.return}}function jq(a,s,u){var m=Hn();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Zd(a)?aN(s,u):(u=xg(a,s,u,m),u!==null&&(kn(u,a,m),oN(u,s,m)))}function iN(a,s,u){var m=Hn();Xc(a,s,u,m)}function Xc(a,s,u,m){var x={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Zd(a))aN(s,x);else{var _=a.alternate;if(a.lanes===0&&(_===null||_.lanes===0)&&(_=s.lastRenderedReducer,_!==null))try{var M=s.lastRenderedState,B=_(M,u);if(x.hasEagerState=!0,x.eagerState=B,$n(B,M))return kd(a,s,x,0),pt===null&&Md(),!1}catch{}finally{}if(u=xg(a,s,x,m),u!==null)return kn(u,a,m),oN(u,s,m),!0}return!1}function n0(a,s,u,m){if(m={lane:2,revertLane:P0(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Zd(a)){if(s)throw Error(r(479))}else s=xg(a,u,m,2),s!==null&&kn(s,a,2)}function Zd(a){var s=a.alternate;return a===Ie||s!==null&&s===Ie}function aN(a,s){Ls=Vd=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function oN(a,s,u){if((u&4194048)!==0){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,fd(a,u)}}var Kc={readContext:sn,use:Xd,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};Kc.useEffectEvent=Ct;var sN={readContext:sn,use:Xd,useCallback:function(a,s){return bn().memoizedState=[a,s===void 0?null:s],a},useContext:sn,useEffect:GA,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,Wd(4194308,4,XA.bind(null,s,a),u)},useLayoutEffect:function(a,s){return Wd(4194308,4,a,s)},useInsertionEffect:function(a,s){Wd(4,2,a,s)},useMemo:function(a,s){var u=bn();s=s===void 0?null:s;var m=a();if(_o){Lr(!0);try{a()}finally{Lr(!1)}}return u.memoizedState=[m,s],m},useReducer:function(a,s,u){var m=bn();if(u!==void 0){var x=u(s);if(_o){Lr(!0);try{u(s)}finally{Lr(!1)}}}else x=s;return m.memoizedState=m.baseState=x,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:x},m.queue=a,a=a.dispatch=jq.bind(null,Ie,a),[m.memoizedState,a]},useRef:function(a){var s=bn();return a={current:a},s.memoizedState=a},useState:function(a){a=Kg(a);var s=a.queue,u=iN.bind(null,Ie,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:Zg,useDeferredValue:function(a,s){var u=bn();return Jg(u,a,s)},useTransition:function(){var a=Kg(!1);return a=JA.bind(null,Ie,a.queue,!0,!1),bn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var m=Ie,x=bn();if(Ke){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),pt===null)throw Error(r(349));(Fe&127)!==0||EA(m,s,u)}x.memoizedState=u;var _={value:u,getSnapshot:s};return x.queue=_,GA(CA.bind(null,m,_,a),[a]),m.flags|=2048,Bs(9,{destroy:void 0},TA.bind(null,m,_,u,s),null),u},useId:function(){var a=bn(),s=pt.identifierPrefix;if(Ke){var u=zr,m=Br;u=(m&~(1<<32-xn(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=Fd++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=gq++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:t0,useFormState:qA,useActionState:qA,useOptimistic:function(a){var s=bn();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=n0.bind(null,Ie,!0,u),u.dispatch=s,[a,s]},useMemoCache:Fg,useCacheRefresh:function(){return bn().memoizedState=_q.bind(null,Ie)},useEffectEvent:function(a){var s=bn(),u={impl:a};return s.memoizedState=u,function(){if((tt&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},r0={readContext:sn,use:Xd,useCallback:WA,useContext:sn,useEffect:Qg,useImperativeHandle:KA,useInsertionEffect:FA,useLayoutEffect:YA,useMemo:QA,useReducer:Kd,useRef:UA,useState:function(){return Kd(vi)},useDebugValue:Zg,useDeferredValue:function(a,s){var u=$t();return ZA(u,ct.memoizedState,a,s)},useTransition:function(){var a=Kd(vi)[0],s=$t().memoizedState;return[typeof a=="boolean"?a:Yc(a),s]},useSyncExternalStore:OA,useId:nN,useHostTransitionStatus:t0,useFormState:BA,useActionState:BA,useOptimistic:function(a,s){var u=$t();return RA(u,ct,a,s)},useMemoCache:Fg,useCacheRefresh:rN};r0.useEffectEvent=VA;var lN={readContext:sn,use:Xd,useCallback:WA,useContext:sn,useEffect:Qg,useImperativeHandle:KA,useInsertionEffect:FA,useLayoutEffect:YA,useMemo:QA,useReducer:Xg,useRef:UA,useState:function(){return Xg(vi)},useDebugValue:Zg,useDeferredValue:function(a,s){var u=$t();return ct===null?Jg(u,a,s):ZA(u,ct.memoizedState,a,s)},useTransition:function(){var a=Xg(vi)[0],s=$t().memoizedState;return[typeof a=="boolean"?a:Yc(a),s]},useSyncExternalStore:OA,useId:nN,useHostTransitionStatus:t0,useFormState:HA,useActionState:HA,useOptimistic:function(a,s){var u=$t();return ct!==null?RA(u,ct,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Fg,useCacheRefresh:rN};lN.useEffectEvent=VA;function i0(a,s,u,m){s=a.memoizedState,u=u(m,s),u=u==null?s:p({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var a0={enqueueSetState:function(a,s,u){a=a._reactInternals;var m=Hn(),x=da(m);x.payload=s,u!=null&&(x.callback=u),s=ha(a,x,m),s!==null&&(kn(s,a,m),Uc(s,a,m))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var m=Hn(),x=da(m);x.tag=1,x.payload=s,u!=null&&(x.callback=u),s=ha(a,x,m),s!==null&&(kn(s,a,m),Uc(s,a,m))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Hn(),m=da(u);m.tag=2,s!=null&&(m.callback=s),s=ha(a,m,u),s!==null&&(kn(s,a,u),Uc(s,a,u))}};function cN(a,s,u,m,x,_,M){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,_,M):s.prototype&&s.prototype.isPureReactComponent?!Dc(u,m)||!Dc(x,_):!0}function uN(a,s,u,m){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,m),s.state!==a&&a0.enqueueReplaceState(s,s.state,null)}function jo(a,s){var u=s;if("ref"in s){u={};for(var m in s)m!=="ref"&&(u[m]=s[m])}if(a=a.defaultProps){u===s&&(u=p({},u));for(var x in a)u[x]===void 0&&(u[x]=a[x])}return u}function fN(a){Cd(a)}function dN(a){console.error(a)}function hN(a){Cd(a)}function Jd(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function pN(a,s,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function o0(a,s,u){return u=da(u),u.tag=3,u.payload={element:null},u.callback=function(){Jd(a,s)},u}function mN(a){return a=da(a),a.tag=3,a}function yN(a,s,u,m){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var _=m.value;a.payload=function(){return x(_)},a.callback=function(){pN(s,u,m)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(a.callback=function(){pN(s,u,m),typeof x!="function"&&(xa===null?xa=new Set([this]):xa.add(this));var B=m.stack;this.componentDidCatch(m.value,{componentStack:B!==null?B:""})})}function Aq(a,s,u,m,x){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&ks(s,u,x,!0),u=Ln.current,u!==null){switch(u.tag){case 31:case 13:return rr===null?fh():u.alternate===null&&Mt===0&&(Mt=3),u.flags&=-257,u.flags|=65536,u.lanes=x,m===Bd?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),M0(a,m,x)),!1;case 22:return u.flags|=65536,m===Bd?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([m]):u.add(m)),M0(a,m,x)),!1}throw Error(r(435,u.tag))}return M0(a,m,x),fh(),!1}if(Ke)return s=Ln.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=x,m!==Ag&&(a=Error(r(422),{cause:m}),Lc(Jn(a,u)))):(m!==Ag&&(s=Error(r(423),{cause:m}),Lc(Jn(s,u))),a=a.current.alternate,a.flags|=65536,x&=-x,a.lanes|=x,m=Jn(m,u),x=o0(a.stateNode,m,x),$g(a,x),Mt!==4&&(Mt=2)),!1;var _=Error(r(520),{cause:m});if(_=Jn(_,u),ru===null?ru=[_]:ru.push(_),Mt!==4&&(Mt=2),s===null)return!0;m=Jn(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=x&-x,u.lanes|=a,a=o0(u.stateNode,m,a),$g(u,a),!1;case 1:if(s=u.type,_=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||_!==null&&typeof _.componentDidCatch=="function"&&(xa===null||!xa.has(_))))return u.flags|=65536,x&=-x,u.lanes|=x,x=mN(x),yN(x,a,u,m),$g(u,x),!1}u=u.return}while(u!==null);return!1}var s0=Error(r(461)),Bt=!1;function ln(a,s,u,m){s.child=a===null?bA(s,null,u,m):So(s,a.child,u,m)}function gN(a,s,u,m,x){u=u.render;var _=s.ref;if("ref"in m){var M={};for(var B in m)B!=="ref"&&(M[B]=m[B])}else M=m;return vo(s),m=Hg(a,s,u,M,_,x),B=Ug(),a!==null&&!Bt?(Gg(a,s,x),xi(a,s,x)):(Ke&&B&&_g(s),s.flags|=1,ln(a,s,m,x),s.child)}function vN(a,s,u,m,x){if(a===null){var _=u.type;return typeof _=="function"&&!bg(_)&&_.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=_,xN(a,s,_,m,x)):(a=Pd(u.type,null,m,s,s.mode,x),a.ref=s.ref,a.return=s,s.child=a)}if(_=a.child,!m0(a,x)){var M=_.memoizedProps;if(u=u.compare,u=u!==null?u:Dc,u(M,m)&&a.ref===s.ref)return xi(a,s,x)}return s.flags|=1,a=hi(_,m),a.ref=s.ref,a.return=s,s.child=a}function xN(a,s,u,m,x){if(a!==null){var _=a.memoizedProps;if(Dc(_,m)&&a.ref===s.ref)if(Bt=!1,s.pendingProps=m=_,m0(a,x))(a.flags&131072)!==0&&(Bt=!0);else return s.lanes=a.lanes,xi(a,s,x)}return l0(a,s,u,m,x)}function bN(a,s,u,m){var x=m.children,_=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(_=_!==null?_.baseLanes|u:u,a!==null){for(m=s.child=a.child,x=0;m!==null;)x=x|m.lanes|m.childLanes,m=m.sibling;m=x&~_}else m=0,s.child=null;return wN(a,s,_,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Ld(s,_!==null?_.cachePool:null),_!==null?_A(s,_):Lg(),jA(s);else return m=s.lanes=536870912,wN(a,s,_!==null?_.baseLanes|u:u,u,m)}else _!==null?(Ld(s,_.cachePool),_A(s,_),ma(),s.memoizedState=null):(a!==null&&Ld(s,null),Lg(),ma());return ln(a,s,x,u),s.child}function Wc(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function wN(a,s,u,m,x){var _=kg();return _=_===null?null:{parent:Lt._currentValue,pool:_},s.memoizedState={baseLanes:u,cachePool:_},a!==null&&Ld(s,null),Lg(),jA(s),a!==null&&ks(a,s,m,!0),s.childLanes=x,null}function eh(a,s){return s=nh({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function SN(a,s,u){return So(s,a.child,null,u),a=eh(s,s.pendingProps),a.flags|=2,qn(s),s.memoizedState=null,a}function Nq(a,s,u){var m=s.pendingProps,x=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Ke){if(m.mode==="hidden")return a=eh(s,m),s.lanes=536870912,Wc(null,a);if(Bg(s),(a=bt)?(a=PO(a,nr),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:sa!==null?{id:Br,overflow:zr}:null,retryLane:536870912,hydrationErrors:null},u=aA(a),u.return=s,s.child=u,on=s,bt=null)):a=null,a===null)throw ca(s);return s.lanes=536870912,null}return eh(s,m)}var _=a.memoizedState;if(_!==null){var M=_.dehydrated;if(Bg(s),x)if(s.flags&256)s.flags&=-257,s=SN(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Bt||ks(a,s,u,!1),x=(u&a.childLanes)!==0,Bt||x){if(m=pt,m!==null&&(M=dd(m,u),M!==0&&M!==_.retryLane))throw _.retryLane=M,po(a,M),kn(m,a,M),s0;fh(),s=SN(a,s,u)}else a=_.treeContext,bt=ir(M.nextSibling),on=s,Ke=!0,la=null,nr=!1,a!==null&&lA(s,a),s=eh(s,m),s.flags|=4096;return s}return a=hi(a.child,{mode:m.mode,children:m.children}),a.ref=s.ref,s.child=a,a.return=s,a}function th(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 l0(a,s,u,m,x){return vo(s),u=Hg(a,s,u,m,void 0,x),m=Ug(),a!==null&&!Bt?(Gg(a,s,x),xi(a,s,x)):(Ke&&m&&_g(s),s.flags|=1,ln(a,s,u,x),s.child)}function _N(a,s,u,m,x,_){return vo(s),s.updateQueue=null,u=NA(s,m,u,x),AA(a),m=Ug(),a!==null&&!Bt?(Gg(a,s,_),xi(a,s,_)):(Ke&&m&&_g(s),s.flags|=1,ln(a,s,u,_),s.child)}function jN(a,s,u,m,x){if(vo(s),s.stateNode===null){var _=Es,M=u.contextType;typeof M=="object"&&M!==null&&(_=sn(M)),_=new u(m,_),s.memoizedState=_.state!==null&&_.state!==void 0?_.state:null,_.updater=a0,s.stateNode=_,_._reactInternals=s,_=s.stateNode,_.props=m,_.state=s.memoizedState,_.refs={},Pg(s),M=u.contextType,_.context=typeof M=="object"&&M!==null?sn(M):Es,_.state=s.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(i0(s,u,M,m),_.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof _.getSnapshotBeforeUpdate=="function"||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(M=_.state,typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount(),M!==_.state&&a0.enqueueReplaceState(_,_.state,null),Vc(s,m,_,x),Gc(),_.state=s.memoizedState),typeof _.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(a===null){_=s.stateNode;var B=s.memoizedProps,X=jo(u,B);_.props=X;var oe=_.context,ue=u.contextType;M=Es,typeof ue=="object"&&ue!==null&&(M=sn(ue));var me=u.getDerivedStateFromProps;ue=typeof me=="function"||typeof _.getSnapshotBeforeUpdate=="function",B=s.pendingProps!==B,ue||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(B||oe!==M)&&uN(s,_,m,M),fa=!1;var se=s.memoizedState;_.state=se,Vc(s,m,_,x),Gc(),oe=s.memoizedState,B||se!==oe||fa?(typeof me=="function"&&(i0(s,u,me,m),oe=s.memoizedState),(X=fa||cN(s,u,X,m,se,oe,M))?(ue||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(s.flags|=4194308)):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=oe),_.props=m,_.state=oe,_.context=M,m=X):(typeof _.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{_=s.stateNode,Dg(a,s),M=s.memoizedProps,ue=jo(u,M),_.props=ue,me=s.pendingProps,se=_.context,oe=u.contextType,X=Es,typeof oe=="object"&&oe!==null&&(X=sn(oe)),B=u.getDerivedStateFromProps,(oe=typeof B=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(M!==me||se!==X)&&uN(s,_,m,X),fa=!1,se=s.memoizedState,_.state=se,Vc(s,m,_,x),Gc();var le=s.memoizedState;M!==me||se!==le||fa||a!==null&&a.dependencies!==null&&$d(a.dependencies)?(typeof B=="function"&&(i0(s,u,B,m),le=s.memoizedState),(ue=fa||cN(s,u,ue,m,se,le,X)||a!==null&&a.dependencies!==null&&$d(a.dependencies))?(oe||typeof _.UNSAFE_componentWillUpdate!="function"&&typeof _.componentWillUpdate!="function"||(typeof _.componentWillUpdate=="function"&&_.componentWillUpdate(m,le,X),typeof _.UNSAFE_componentWillUpdate=="function"&&_.UNSAFE_componentWillUpdate(m,le,X)),typeof _.componentDidUpdate=="function"&&(s.flags|=4),typeof _.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof _.componentDidUpdate!="function"||M===a.memoizedProps&&se===a.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===a.memoizedProps&&se===a.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=le),_.props=m,_.state=le,_.context=X,m=ue):(typeof _.componentDidUpdate!="function"||M===a.memoizedProps&&se===a.memoizedState||(s.flags|=4),typeof _.getSnapshotBeforeUpdate!="function"||M===a.memoizedProps&&se===a.memoizedState||(s.flags|=1024),m=!1)}return _=m,th(a,s),m=(s.flags&128)!==0,_||m?(_=s.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:_.render(),s.flags|=1,a!==null&&m?(s.child=So(s,a.child,null,x),s.child=So(s,null,u,x)):ln(a,s,u,x),s.memoizedState=_.state,a=s.child):a=xi(a,s,x),a}function AN(a,s,u,m){return yo(),s.flags|=256,ln(a,s,u,m),s.child}var c0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function u0(a){return{baseLanes:a,cachePool:pA()}}function f0(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=zn),a}function NN(a,s,u){var m=s.pendingProps,x=!1,_=(s.flags&128)!==0,M;if((M=_)||(M=a!==null&&a.memoizedState===null?!1:(Dt.current&2)!==0),M&&(x=!0,s.flags&=-129),M=(s.flags&32)!==0,s.flags&=-33,a===null){if(Ke){if(x?pa(s):ma(),(a=bt)?(a=PO(a,nr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:sa!==null?{id:Br,overflow:zr}:null,retryLane:536870912,hydrationErrors:null},u=aA(a),u.return=s,s.child=u,on=s,bt=null)):a=null,a===null)throw ca(s);return Y0(a)?s.lanes=32:s.lanes=536870912,null}var B=m.children;return m=m.fallback,x?(ma(),x=s.mode,B=nh({mode:"hidden",children:B},x),m=mo(m,x,u,null),B.return=s,m.return=s,B.sibling=m,s.child=B,m=s.child,m.memoizedState=u0(u),m.childLanes=f0(a,M,u),s.memoizedState=c0,Wc(null,m)):(pa(s),d0(s,B))}var X=a.memoizedState;if(X!==null&&(B=X.dehydrated,B!==null)){if(_)s.flags&256?(pa(s),s.flags&=-257,s=h0(a,s,u)):s.memoizedState!==null?(ma(),s.child=a.child,s.flags|=128,s=null):(ma(),B=m.fallback,x=s.mode,m=nh({mode:"visible",children:m.children},x),B=mo(B,x,u,null),B.flags|=2,m.return=s,B.return=s,m.sibling=B,s.child=m,So(s,a.child,null,u),m=s.child,m.memoizedState=u0(u),m.childLanes=f0(a,M,u),s.memoizedState=c0,s=Wc(null,m));else if(pa(s),Y0(B)){if(M=B.nextSibling&&B.nextSibling.dataset,M)var oe=M.dgst;M=oe,m=Error(r(419)),m.stack="",m.digest=M,Lc({value:m,source:null,stack:null}),s=h0(a,s,u)}else if(Bt||ks(a,s,u,!1),M=(u&a.childLanes)!==0,Bt||M){if(M=pt,M!==null&&(m=dd(M,u),m!==0&&m!==X.retryLane))throw X.retryLane=m,po(a,m),kn(M,a,m),s0;F0(B)||fh(),s=h0(a,s,u)}else F0(B)?(s.flags|=192,s.child=a.child,s=null):(a=X.treeContext,bt=ir(B.nextSibling),on=s,Ke=!0,la=null,nr=!1,a!==null&&lA(s,a),s=d0(s,m.children),s.flags|=4096);return s}return x?(ma(),B=m.fallback,x=s.mode,X=a.child,oe=X.sibling,m=hi(X,{mode:"hidden",children:m.children}),m.subtreeFlags=X.subtreeFlags&65011712,oe!==null?B=hi(oe,B):(B=mo(B,x,u,null),B.flags|=2),B.return=s,m.return=s,m.sibling=B,s.child=m,Wc(null,m),m=s.child,B=a.child.memoizedState,B===null?B=u0(u):(x=B.cachePool,x!==null?(X=Lt._currentValue,x=x.parent!==X?{parent:X,pool:X}:x):x=pA(),B={baseLanes:B.baseLanes|u,cachePool:x}),m.memoizedState=B,m.childLanes=f0(a,M,u),s.memoizedState=c0,Wc(a.child,m)):(pa(s),u=a.child,a=u.sibling,u=hi(u,{mode:"visible",children:m.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 d0(a,s){return s=nh({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function nh(a,s){return a=In(22,a,null,s),a.lanes=0,a}function h0(a,s,u){return So(s,a.child,null,u),a=d0(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function ON(a,s,u){a.lanes|=s;var m=a.alternate;m!==null&&(m.lanes|=s),Eg(a.return,s,u)}function p0(a,s,u,m,x,_){var M=a.memoizedState;M===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:x,treeForkCount:_}:(M.isBackwards=s,M.rendering=null,M.renderingStartTime=0,M.last=m,M.tail=u,M.tailMode=x,M.treeForkCount=_)}function EN(a,s,u){var m=s.pendingProps,x=m.revealOrder,_=m.tail;m=m.children;var M=Dt.current,B=(M&2)!==0;if(B?(M=M&1|2,s.flags|=128):M&=1,J(Dt,M),ln(a,s,m,u),m=Ke?Ic:0,!B&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&ON(a,u,s);else if(a.tag===19)ON(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(x){case"forwards":for(u=s.child,x=null;u!==null;)a=u.alternate,a!==null&&Gd(a)===null&&(x=u),u=u.sibling;u=x,u===null?(x=s.child,s.child=null):(x=u.sibling,u.sibling=null),p0(s,!1,x,u,_,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,x=s.child,s.child=null;x!==null;){if(a=x.alternate,a!==null&&Gd(a)===null){s.child=x;break}a=x.sibling,x.sibling=u,u=x,x=a}p0(s,!0,u,null,_,m);break;case"together":p0(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function xi(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),va|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(ks(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=hi(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=hi(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function m0(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&$d(a)))}function Oq(a,s,u){switch(s.tag){case 3:ne(s,s.stateNode.containerInfo),ua(s,Lt,a.memoizedState.cache),yo();break;case 27:case 5:ye(s);break;case 4:ne(s,s.stateNode.containerInfo);break;case 10:ua(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Bg(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(pa(s),s.flags|=128,null):(u&s.child.childLanes)!==0?NN(a,s,u):(pa(s),a=xi(a,s,u),a!==null?a.sibling:null);pa(s);break;case 19:var x=(a.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(ks(a,s,u,!1),m=(u&s.childLanes)!==0),x){if(m)return EN(a,s,u);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),J(Dt,Dt.current),m)break;return null;case 22:return s.lanes=0,bN(a,s,u,s.pendingProps);case 24:ua(s,Lt,a.memoizedState.cache)}return xi(a,s,u)}function TN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Bt=!0;else{if(!m0(a,u)&&(s.flags&128)===0)return Bt=!1,Oq(a,s,u);Bt=(a.flags&131072)!==0}else Bt=!1,Ke&&(s.flags&1048576)!==0&&sA(s,Ic,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(a=bo(s.elementType),s.type=a,typeof a=="function")bg(a)?(m=jo(a,m),s.tag=1,s=jN(null,s,a,m,u)):(s.tag=0,s=l0(null,s,a,m,u));else{if(a!=null){var x=a.$$typeof;if(x===E){s.tag=11,s=gN(null,s,a,m,u);break e}else if(x===C){s.tag=14,s=vN(null,s,a,m,u);break e}}throw s=P(a)||a,Error(r(306,s,""))}}return s;case 0:return l0(a,s,s.type,s.pendingProps,u);case 1:return m=s.type,x=jo(m,s.pendingProps),jN(a,s,m,x,u);case 3:e:{if(ne(s,s.stateNode.containerInfo),a===null)throw Error(r(387));m=s.pendingProps;var _=s.memoizedState;x=_.element,Dg(a,s),Vc(s,m,null,u);var M=s.memoizedState;if(m=M.cache,ua(s,Lt,m),m!==_.cache&&Tg(s,[Lt],u,!0),Gc(),m=M.element,_.isDehydrated)if(_={element:m,isDehydrated:!1,cache:M.cache},s.updateQueue.baseState=_,s.memoizedState=_,s.flags&256){s=AN(a,s,m,u);break e}else if(m!==x){x=Jn(Error(r(424)),s),Lc(x),s=AN(a,s,m,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(bt=ir(a.firstChild),on=s,Ke=!0,la=null,nr=!0,u=bA(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(yo(),m===x){s=xi(a,s,u);break e}ln(a,s,m,u)}s=s.child}return s;case 26:return th(a,s),a===null?(u=BO(s.type,null,s.pendingProps,null))?s.memoizedState=u:Ke||(u=s.type,a=s.pendingProps,m=vh(ge.current).createElement(u),m[Ft]=s,m[dn]=a,cn(m,u,a),It(m),s.stateNode=m):s.memoizedState=BO(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return ye(s),a===null&&Ke&&(m=s.stateNode=IO(s.type,s.pendingProps,ge.current),on=s,nr=!0,x=bt,_a(s.type)?(X0=x,bt=ir(m.firstChild)):bt=x),ln(a,s,s.pendingProps.children,u),th(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Ke&&((x=m=bt)&&(m=rB(m,s.type,s.pendingProps,nr),m!==null?(s.stateNode=m,on=s,bt=ir(m.firstChild),nr=!1,x=!0):x=!1),x||ca(s)),ye(s),x=s.type,_=s.pendingProps,M=a!==null?a.memoizedProps:null,m=_.children,U0(x,_)?m=null:M!==null&&U0(x,M)&&(s.flags|=32),s.memoizedState!==null&&(x=Hg(a,s,vq,null,null,u),fu._currentValue=x),th(a,s),ln(a,s,m,u),s.child;case 6:return a===null&&Ke&&((a=u=bt)&&(u=iB(u,s.pendingProps,nr),u!==null?(s.stateNode=u,on=s,bt=null,a=!0):a=!1),a||ca(s)),null;case 13:return NN(a,s,u);case 4:return ne(s,s.stateNode.containerInfo),m=s.pendingProps,a===null?s.child=So(s,null,m,u):ln(a,s,m,u),s.child;case 11:return gN(a,s,s.type,s.pendingProps,u);case 7:return ln(a,s,s.pendingProps,u),s.child;case 8:return ln(a,s,s.pendingProps.children,u),s.child;case 12:return ln(a,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,ua(s,s.type,m.value),ln(a,s,m.children,u),s.child;case 9:return x=s.type._context,m=s.pendingProps.children,vo(s),x=sn(x),m=m(x),s.flags|=1,ln(a,s,m,u),s.child;case 14:return vN(a,s,s.type,s.pendingProps,u);case 15:return xN(a,s,s.type,s.pendingProps,u);case 19:return EN(a,s,u);case 31:return Nq(a,s,u);case 22:return bN(a,s,u,s.pendingProps);case 24:return vo(s),m=sn(Lt),a===null?(x=kg(),x===null&&(x=pt,_=Cg(),x.pooledCache=_,_.refCount++,_!==null&&(x.pooledCacheLanes|=u),x=_),s.memoizedState={parent:m,cache:x},Pg(s),ua(s,Lt,x)):((a.lanes&u)!==0&&(Dg(a,s),Vc(s,null,null,u),Gc()),x=a.memoizedState,_=s.memoizedState,x.parent!==m?(x={parent:m,cache:m},s.memoizedState=x,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=x),ua(s,Lt,m)):(m=_.cache,ua(s,Lt,m),m!==x.cache&&Tg(s,[Lt],u,!0))),ln(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function bi(a){a.flags|=4}function y0(a,s,u,m,x){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(x&335544128)===x)if(a.stateNode.complete)a.flags|=8192;else if(nO())a.flags|=8192;else throw wo=Bd,Rg}else a.flags&=-16777217}function CN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!VO(s))if(nO())a.flags|=8192;else throw wo=Bd,Rg}function rh(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?cd():536870912,a.lanes|=s,Gs|=s)}function Qc(a,s){if(!Ke)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 m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function wt(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(s)for(var x=a.child;x!==null;)u|=x.lanes|x.childLanes,m|=x.subtreeFlags&65011712,m|=x.flags&65011712,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)u|=x.lanes|x.childLanes,m|=x.subtreeFlags,m|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=m,a.childLanes=u,s}function Eq(a,s,u){var m=s.pendingProps;switch(jg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(s),null;case 1:return wt(s),null;case 3:return u=s.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),yi(Lt),Q(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Ms(s)?bi(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Ng())),wt(s),null;case 26:var x=s.type,_=s.memoizedState;return a===null?(bi(s),_!==null?(wt(s),CN(s,_)):(wt(s),y0(s,x,null,m,u))):_?_!==a.memoizedState?(bi(s),wt(s),CN(s,_)):(wt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==m&&bi(s),wt(s),y0(s,x,a,m,u)),null;case 27:if(ce(s),u=ge.current,x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&bi(s);else{if(!m){if(s.stateNode===null)throw Error(r(166));return wt(s),null}a=ae.current,Ms(s)?cA(s):(a=IO(x,m,u),s.stateNode=a,bi(s))}return wt(s),null;case 5:if(ce(s),x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&bi(s);else{if(!m){if(s.stateNode===null)throw Error(r(166));return wt(s),null}if(_=ae.current,Ms(s))cA(s);else{var M=vh(ge.current);switch(_){case 1:_=M.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:_=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":_=M.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":_=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":_=M.createElement("div"),_.innerHTML="<script><\/script>",_=_.removeChild(_.firstChild);break;case"select":_=typeof m.is=="string"?M.createElement("select",{is:m.is}):M.createElement("select"),m.multiple?_.multiple=!0:m.size&&(_.size=m.size);break;default:_=typeof m.is=="string"?M.createElement(x,{is:m.is}):M.createElement(x)}}_[Ft]=s,_[dn]=m;e:for(M=s.child;M!==null;){if(M.tag===5||M.tag===6)_.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=_;e:switch(cn(_,x,m),x){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&bi(s)}}return wt(s),y0(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==m&&bi(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(r(166));if(a=ge.current,Ms(s)){if(a=s.stateNode,u=s.memoizedProps,m=null,x=on,x!==null)switch(x.tag){case 27:case 5:m=x.memoizedProps}a[Ft]=s,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||NO(a.nodeValue,u)),a||ca(s,!0)}else a=vh(a).createTextNode(m),a[Ft]=s,s.stateNode=a}return wt(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(m=Ms(s),u!==null){if(a===null){if(!m)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Ft]=s}else yo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;wt(s),a=!1}else u=Ng(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(qn(s),s):(qn(s),null);if((s.flags&128)!==0)throw Error(r(558))}return wt(s),null;case 13:if(m=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(x=Ms(s),m!==null&&m.dehydrated!==null){if(a===null){if(!x)throw Error(r(318));if(x=s.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[Ft]=s}else yo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;wt(s),x=!1}else x=Ng(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=x),x=!0;if(!x)return s.flags&256?(qn(s),s):(qn(s),null)}return qn(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=s.child,x=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(x=m.alternate.memoizedState.cachePool.pool),_=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(_=m.memoizedState.cachePool.pool),_!==x&&(m.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),rh(s,s.updateQueue),wt(s),null);case 4:return Q(),a===null&&L0(s.stateNode.containerInfo),wt(s),null;case 10:return yi(s.type),wt(s),null;case 19:if(V(Dt),m=s.memoizedState,m===null)return wt(s),null;if(x=(s.flags&128)!==0,_=m.rendering,_===null)if(x)Qc(m,!1);else{if(Mt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(_=Gd(a),_!==null){for(s.flags|=128,Qc(m,!1),a=_.updateQueue,s.updateQueue=a,rh(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)iA(u,a),u=u.sibling;return J(Dt,Dt.current&1|2),Ke&&pi(s,m.treeForkCount),s.child}a=a.sibling}m.tail!==null&&nt()>lh&&(s.flags|=128,x=!0,Qc(m,!1),s.lanes=4194304)}else{if(!x)if(a=Gd(_),a!==null){if(s.flags|=128,x=!0,a=a.updateQueue,s.updateQueue=a,rh(s,a),Qc(m,!0),m.tail===null&&m.tailMode==="hidden"&&!_.alternate&&!Ke)return wt(s),null}else 2*nt()-m.renderingStartTime>lh&&u!==536870912&&(s.flags|=128,x=!0,Qc(m,!1),s.lanes=4194304);m.isBackwards?(_.sibling=s.child,s.child=_):(a=m.last,a!==null?a.sibling=_:s.child=_,m.last=_)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=nt(),a.sibling=null,u=Dt.current,J(Dt,x?u&1|2:u&1),Ke&&pi(s,m.treeForkCount),a):(wt(s),null);case 22:case 23:return qn(s),qg(),m=s.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(u&536870912)!==0&&(s.flags&128)===0&&(wt(s),s.subtreeFlags&6&&(s.flags|=8192)):wt(s),u=s.updateQueue,u!==null&&rh(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==u&&(s.flags|=2048),a!==null&&V(xo),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),yi(Lt),wt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function Tq(a,s){switch(jg(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return yi(Lt),Q(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return ce(s),null;case 31:if(s.memoizedState!==null){if(qn(s),s.alternate===null)throw Error(r(340));yo()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(qn(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));yo()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return V(Dt),null;case 4:return Q(),null;case 10:return yi(s.type),null;case 22:case 23:return qn(s),qg(),a!==null&&V(xo),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return yi(Lt),null;case 25:return null;default:return null}}function MN(a,s){switch(jg(s),s.tag){case 3:yi(Lt),Q();break;case 26:case 27:case 5:ce(s);break;case 4:Q();break;case 31:s.memoizedState!==null&&qn(s);break;case 13:qn(s);break;case 19:V(Dt);break;case 10:yi(s.type);break;case 22:case 23:qn(s),qg(),a!==null&&V(xo);break;case 24:yi(Lt)}}function Zc(a,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var x=m.next;u=x;do{if((u.tag&a)===a){m=void 0;var _=u.create,M=u.inst;m=_(),M.destroy=m}u=u.next}while(u!==x)}}catch(B){st(s,s.return,B)}}function ya(a,s,u){try{var m=s.updateQueue,x=m!==null?m.lastEffect:null;if(x!==null){var _=x.next;m=_;do{if((m.tag&a)===a){var M=m.inst,B=M.destroy;if(B!==void 0){M.destroy=void 0,x=s;var X=u,oe=B;try{oe()}catch(ue){st(x,X,ue)}}}m=m.next}while(m!==_)}}catch(ue){st(s,s.return,ue)}}function kN(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{SA(s,u)}catch(m){st(a,a.return,m)}}}function RN(a,s,u){u.props=jo(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){st(a,s,m)}}function Jc(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof u=="function"?a.refCleanup=u(m):u.current=m}}catch(x){st(a,s,x)}}function Hr(a,s){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(x){st(a,s,x)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){st(a,s,x)}else u.current=null}function PN(a){var s=a.type,u=a.memoizedProps,m=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(x){st(a,a.return,x)}}function g0(a,s,u){try{var m=a.stateNode;Qq(m,a.type,u,s),m[dn]=s}catch(x){st(a,a.return,x)}}function DN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&_a(a.type)||a.tag===4}function v0(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||DN(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&&_a(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 x0(a,s,u){var m=a.tag;if(m===5||m===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=fi));else if(m!==4&&(m===27&&_a(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(x0(a,s,u),a=a.sibling;a!==null;)x0(a,s,u),a=a.sibling}function ih(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(m!==4&&(m===27&&_a(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(ih(a,s,u),a=a.sibling;a!==null;)ih(a,s,u),a=a.sibling}function $N(a){var s=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,x=s.attributes;x.length;)s.removeAttributeNode(x[0]);cn(s,m,u),s[Ft]=a,s[dn]=u}catch(_){st(a,a.return,_)}}var wi=!1,zt=!1,b0=!1,IN=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function Cq(a,s){if(a=a.containerInfo,z0=Ah,a=Kj(a),hg(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var x=m.anchorOffset,_=m.focusNode;m=m.focusOffset;try{u.nodeType,_.nodeType}catch{u=null;break e}var M=0,B=-1,X=-1,oe=0,ue=0,me=a,se=null;t:for(;;){for(var le;me!==u||x!==0&&me.nodeType!==3||(B=M+x),me!==_||m!==0&&me.nodeType!==3||(X=M+m),me.nodeType===3&&(M+=me.nodeValue.length),(le=me.firstChild)!==null;)se=me,me=le;for(;;){if(me===a)break t;if(se===u&&++oe===x&&(B=M),se===_&&++ue===m&&(X=M),(le=me.nextSibling)!==null)break;me=se,se=me.parentNode}me=le}u=B===-1||X===-1?null:{start:B,end:X}}else u=null}u=u||{start:0,end:0}}else u=null;for(H0={focusedElem:a,selectionRange:u},Ah=!1,Jt=s;Jt!==null;)if(s=Jt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Jt=a;else for(;Jt!==null;){switch(s=Jt,_=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++)x=a[u],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&_!==null){a=void 0,u=s,x=_.memoizedProps,_=_.memoizedState,m=u.stateNode;try{var je=jo(u.type,x);a=m.getSnapshotBeforeUpdate(je,_),m.__reactInternalSnapshotBeforeUpdate=a}catch(Ce){st(u,u.return,Ce)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)V0(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":V0(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,Jt=a;break}Jt=s.return}}function LN(a,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:_i(a,u),m&4&&Zc(5,u);break;case 1:if(_i(a,u),m&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(M){st(u,u.return,M)}else{var x=jo(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(x,s,a.__reactInternalSnapshotBeforeUpdate)}catch(M){st(u,u.return,M)}}m&64&&kN(u),m&512&&Jc(u,u.return);break;case 3:if(_i(a,u),m&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{SA(a,s)}catch(M){st(u,u.return,M)}}break;case 27:s===null&&m&4&&$N(u);case 26:case 5:_i(a,u),s===null&&m&4&&PN(u),m&512&&Jc(u,u.return);break;case 12:_i(a,u);break;case 31:_i(a,u),m&4&&zN(a,u);break;case 13:_i(a,u),m&4&&HN(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=qq.bind(null,u),aB(a,u))));break;case 22:if(m=u.memoizedState!==null||wi,!m){s=s!==null&&s.memoizedState!==null||zt,x=wi;var _=zt;wi=m,(zt=s)&&!_?ji(a,u,(u.subtreeFlags&8772)!==0):_i(a,u),wi=x,zt=_}break;case 30:break;default:_i(a,u)}}function qN(a){var s=a.alternate;s!==null&&(a.alternate=null,qN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Ac(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 Nt=null,En=!1;function Si(a,s,u){for(u=u.child;u!==null;)BN(a,s,u),u=u.sibling}function BN(a,s,u){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(io,u)}catch{}switch(u.tag){case 26:zt||Hr(u,s),Si(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:zt||Hr(u,s);var m=Nt,x=En;_a(u.type)&&(Nt=u.stateNode,En=!1),Si(a,s,u),lu(u.stateNode),Nt=m,En=x;break;case 5:zt||Hr(u,s);case 6:if(m=Nt,x=En,Nt=null,Si(a,s,u),Nt=m,En=x,Nt!==null)if(En)try{(Nt.nodeType===9?Nt.body:Nt.nodeName==="HTML"?Nt.ownerDocument.body:Nt).removeChild(u.stateNode)}catch(_){st(u,s,_)}else try{Nt.removeChild(u.stateNode)}catch(_){st(u,s,_)}break;case 18:Nt!==null&&(En?(a=Nt,kO(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Zs(a)):kO(Nt,u.stateNode));break;case 4:m=Nt,x=En,Nt=u.stateNode.containerInfo,En=!0,Si(a,s,u),Nt=m,En=x;break;case 0:case 11:case 14:case 15:ya(2,u,s),zt||ya(4,u,s),Si(a,s,u);break;case 1:zt||(Hr(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&RN(u,s,m)),Si(a,s,u);break;case 21:Si(a,s,u);break;case 22:zt=(m=zt)||u.memoizedState!==null,Si(a,s,u),zt=m;break;default:Si(a,s,u)}}function zN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Zs(a)}catch(u){st(s,s.return,u)}}}function HN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Zs(a)}catch(u){st(s,s.return,u)}}function Mq(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new IN),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new IN),s;default:throw Error(r(435,a.tag))}}function ah(a,s){var u=Mq(a);s.forEach(function(m){if(!u.has(m)){u.add(m);var x=Bq.bind(null,a,m);m.then(x,x)}})}function Tn(a,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var x=u[m],_=a,M=s,B=M;e:for(;B!==null;){switch(B.tag){case 27:if(_a(B.type)){Nt=B.stateNode,En=!1;break e}break;case 5:Nt=B.stateNode,En=!1;break e;case 3:case 4:Nt=B.stateNode.containerInfo,En=!0;break e}B=B.return}if(Nt===null)throw Error(r(160));BN(_,M,x),Nt=null,En=!1,_=x.alternate,_!==null&&(_.return=null),x.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)UN(s,a),s=s.sibling}var br=null;function UN(a,s){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Tn(s,a),Cn(a),m&4&&(ya(3,a,a.return),Zc(3,a),ya(5,a,a.return));break;case 1:Tn(s,a),Cn(a),m&512&&(zt||u===null||Hr(u,u.return)),m&64&&wi&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var x=br;if(Tn(s,a),Cn(a),m&512&&(zt||u===null||Hr(u,u.return)),m&4){var _=u!==null?u.memoizedState:null;if(m=a.memoizedState,u===null)if(m===null)if(a.stateNode===null){e:{m=a.type,u=a.memoizedProps,x=x.ownerDocument||x;t:switch(m){case"title":_=x.getElementsByTagName("title")[0],(!_||_[so]||_[Ft]||_.namespaceURI==="http://www.w3.org/2000/svg"||_.hasAttribute("itemprop"))&&(_=x.createElement(m),x.head.insertBefore(_,x.querySelector("head > title"))),cn(_,m,u),_[Ft]=a,It(_),m=_;break e;case"link":var M=UO("link","href",x).get(m+(u.href||""));if(M){for(var B=0;B<M.length;B++)if(_=M[B],_.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&_.getAttribute("rel")===(u.rel==null?null:u.rel)&&_.getAttribute("title")===(u.title==null?null:u.title)&&_.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(B,1);break t}}_=x.createElement(m),cn(_,m,u),x.head.appendChild(_);break;case"meta":if(M=UO("meta","content",x).get(m+(u.content||""))){for(B=0;B<M.length;B++)if(_=M[B],_.getAttribute("content")===(u.content==null?null:""+u.content)&&_.getAttribute("name")===(u.name==null?null:u.name)&&_.getAttribute("property")===(u.property==null?null:u.property)&&_.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&_.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(B,1);break t}}_=x.createElement(m),cn(_,m,u),x.head.appendChild(_);break;default:throw Error(r(468,m))}_[Ft]=a,It(_),m=_}a.stateNode=m}else GO(x,a.type,a.stateNode);else a.stateNode=HO(x,m,a.memoizedProps);else _!==m?(_===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):_.count--,m===null?GO(x,a.type,a.stateNode):HO(x,m,a.memoizedProps)):m===null&&a.stateNode!==null&&g0(a,a.memoizedProps,u.memoizedProps)}break;case 27:Tn(s,a),Cn(a),m&512&&(zt||u===null||Hr(u,u.return)),u!==null&&m&4&&g0(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Tn(s,a),Cn(a),m&512&&(zt||u===null||Hr(u,u.return)),a.flags&32){x=a.stateNode;try{ws(x,"")}catch(je){st(a,a.return,je)}}m&4&&a.stateNode!=null&&(x=a.memoizedProps,g0(a,x,u!==null?u.memoizedProps:x)),m&1024&&(b0=!0);break;case 6:if(Tn(s,a),Cn(a),m&4){if(a.stateNode===null)throw Error(r(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(je){st(a,a.return,je)}}break;case 3:if(wh=null,x=br,br=xh(s.containerInfo),Tn(s,a),br=x,Cn(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{Zs(s.containerInfo)}catch(je){st(a,a.return,je)}b0&&(b0=!1,GN(a));break;case 4:m=br,br=xh(a.stateNode.containerInfo),Tn(s,a),Cn(a),br=m;break;case 12:Tn(s,a),Cn(a);break;case 31:Tn(s,a),Cn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,ah(a,m)));break;case 13:Tn(s,a),Cn(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(sh=nt()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,ah(a,m)));break;case 22:x=a.memoizedState!==null;var X=u!==null&&u.memoizedState!==null,oe=wi,ue=zt;if(wi=oe||x,zt=ue||X,Tn(s,a),zt=ue,wi=oe,Cn(a),m&8192)e:for(s=a.stateNode,s._visibility=x?s._visibility&-2:s._visibility|1,x&&(u===null||X||wi||zt||Ao(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){X=u=s;try{if(_=X.stateNode,x)M=_.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{B=X.stateNode;var me=X.memoizedProps.style,se=me!=null&&me.hasOwnProperty("display")?me.display:null;B.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(je){st(X,X.return,je)}}}else if(s.tag===6){if(u===null){X=s;try{X.stateNode.nodeValue=x?"":X.memoizedProps}catch(je){st(X,X.return,je)}}}else if(s.tag===18){if(u===null){X=s;try{var le=X.stateNode;x?RO(le,!0):RO(X.stateNode,!1)}catch(je){st(X,X.return,je)}}}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}m&4&&(m=a.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,ah(a,u))));break;case 19:Tn(s,a),Cn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,ah(a,m)));break;case 30:break;case 21:break;default:Tn(s,a),Cn(a)}}function Cn(a){var s=a.flags;if(s&2){try{for(var u,m=a.return;m!==null;){if(DN(m)){u=m;break}m=m.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,_=v0(a);ih(a,_,x);break;case 5:var M=u.stateNode;u.flags&32&&(ws(M,""),u.flags&=-33);var B=v0(a);ih(a,B,M);break;case 3:case 4:var X=u.stateNode.containerInfo,oe=v0(a);x0(a,oe,X);break;default:throw Error(r(161))}}catch(ue){st(a,a.return,ue)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function GN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;GN(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function _i(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)LN(a,s.alternate,s),s=s.sibling}function Ao(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:ya(4,s,s.return),Ao(s);break;case 1:Hr(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&RN(s,s.return,u),Ao(s);break;case 27:lu(s.stateNode);case 26:case 5:Hr(s,s.return),Ao(s);break;case 22:s.memoizedState===null&&Ao(s);break;case 30:Ao(s);break;default:Ao(s)}a=a.sibling}}function ji(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,x=a,_=s,M=_.flags;switch(_.tag){case 0:case 11:case 15:ji(x,_,u),Zc(4,_);break;case 1:if(ji(x,_,u),m=_,x=m.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(oe){st(m,m.return,oe)}if(m=_,x=m.updateQueue,x!==null){var B=m.stateNode;try{var X=x.shared.hiddenCallbacks;if(X!==null)for(x.shared.hiddenCallbacks=null,x=0;x<X.length;x++)wA(X[x],B)}catch(oe){st(m,m.return,oe)}}u&&M&64&&kN(_),Jc(_,_.return);break;case 27:$N(_);case 26:case 5:ji(x,_,u),u&&m===null&&M&4&&PN(_),Jc(_,_.return);break;case 12:ji(x,_,u);break;case 31:ji(x,_,u),u&&M&4&&zN(x,_);break;case 13:ji(x,_,u),u&&M&4&&HN(x,_);break;case 22:_.memoizedState===null&&ji(x,_,u),Jc(_,_.return);break;case 30:break;default:ji(x,_,u)}s=s.sibling}}function w0(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&&qc(u))}function S0(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&qc(a))}function wr(a,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)VN(a,s,u,m),s=s.sibling}function VN(a,s,u,m){var x=s.flags;switch(s.tag){case 0:case 11:case 15:wr(a,s,u,m),x&2048&&Zc(9,s);break;case 1:wr(a,s,u,m);break;case 3:wr(a,s,u,m),x&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&qc(a)));break;case 12:if(x&2048){wr(a,s,u,m),a=s.stateNode;try{var _=s.memoizedProps,M=_.id,B=_.onPostCommit;typeof B=="function"&&B(M,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(X){st(s,s.return,X)}}else wr(a,s,u,m);break;case 31:wr(a,s,u,m);break;case 13:wr(a,s,u,m);break;case 23:break;case 22:_=s.stateNode,M=s.alternate,s.memoizedState!==null?_._visibility&2?wr(a,s,u,m):eu(a,s):_._visibility&2?wr(a,s,u,m):(_._visibility|=2,zs(a,s,u,m,(s.subtreeFlags&10256)!==0||!1)),x&2048&&w0(M,s);break;case 24:wr(a,s,u,m),x&2048&&S0(s.alternate,s);break;default:wr(a,s,u,m)}}function zs(a,s,u,m,x){for(x=x&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var _=a,M=s,B=u,X=m,oe=M.flags;switch(M.tag){case 0:case 11:case 15:zs(_,M,B,X,x),Zc(8,M);break;case 23:break;case 22:var ue=M.stateNode;M.memoizedState!==null?ue._visibility&2?zs(_,M,B,X,x):eu(_,M):(ue._visibility|=2,zs(_,M,B,X,x)),x&&oe&2048&&w0(M.alternate,M);break;case 24:zs(_,M,B,X,x),x&&oe&2048&&S0(M.alternate,M);break;default:zs(_,M,B,X,x)}s=s.sibling}}function eu(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,m=s,x=m.flags;switch(m.tag){case 22:eu(u,m),x&2048&&w0(m.alternate,m);break;case 24:eu(u,m),x&2048&&S0(m.alternate,m);break;default:eu(u,m)}s=s.sibling}}var tu=8192;function Hs(a,s,u){if(a.subtreeFlags&tu)for(a=a.child;a!==null;)FN(a,s,u),a=a.sibling}function FN(a,s,u){switch(a.tag){case 26:Hs(a,s,u),a.flags&tu&&a.memoizedState!==null&&gB(u,br,a.memoizedState,a.memoizedProps);break;case 5:Hs(a,s,u);break;case 3:case 4:var m=br;br=xh(a.stateNode.containerInfo),Hs(a,s,u),br=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=tu,tu=16777216,Hs(a,s,u),tu=m):Hs(a,s,u));break;default:Hs(a,s,u)}}function YN(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 nu(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];Jt=m,KN(m,a)}YN(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)XN(a),a=a.sibling}function XN(a){switch(a.tag){case 0:case 11:case 15:nu(a),a.flags&2048&&ya(9,a,a.return);break;case 3:nu(a);break;case 12:nu(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,oh(a)):nu(a);break;default:nu(a)}}function oh(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];Jt=m,KN(m,a)}YN(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:ya(8,s,s.return),oh(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,oh(s));break;default:oh(s)}a=a.sibling}}function KN(a,s){for(;Jt!==null;){var u=Jt;switch(u.tag){case 0:case 11:case 15:ya(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:qc(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Jt=m;else e:for(u=a;Jt!==null;){m=Jt;var x=m.sibling,_=m.return;if(qN(m),m===u){Jt=null;break e}if(x!==null){x.return=_,Jt=x;break e}Jt=_}}}var kq={getCacheForType:function(a){var s=sn(Lt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return sn(Lt).controller.signal}},Rq=typeof WeakMap=="function"?WeakMap:Map,tt=0,pt=null,Ge=null,Fe=0,ot=0,Bn=null,ga=!1,Us=!1,_0=!1,Ai=0,Mt=0,va=0,No=0,j0=0,zn=0,Gs=0,ru=null,Mn=null,A0=!1,sh=0,WN=0,lh=1/0,ch=null,xa=null,Yt=0,ba=null,Vs=null,Ni=0,N0=0,O0=null,QN=null,iu=0,E0=null;function Hn(){return(tt&2)!==0&&Fe!==0?Fe&-Fe:k.T!==null?P0():hd()}function ZN(){if(zn===0)if((Fe&536870912)===0||Ke){var a=ms;ms<<=1,(ms&3932160)===0&&(ms=262144),zn=a}else zn=536870912;return a=Ln.current,a!==null&&(a.flags|=32),zn}function kn(a,s,u){(a===pt&&(ot===2||ot===9)||a.cancelPendingCommit!==null)&&(Fs(a,0),wa(a,Fe,zn,!1)),oo(a,u),((tt&2)===0||a!==pt)&&(a===pt&&((tt&2)===0&&(No|=u),Mt===4&&wa(a,Fe,zn,!1)),Ur(a))}function JN(a,s,u){if((tt&6)!==0)throw Error(r(327));var m=!u&&(s&127)===0&&(s&a.expiredLanes)===0||ao(a,s),x=m?$q(a,s):C0(a,s,!0),_=m;do{if(x===0){Us&&!m&&wa(a,s,0,!1);break}else{if(u=a.current.alternate,_&&!Pq(u)){x=C0(a,s,!1),_=!1;continue}if(x===2){if(_=s,a.errorRecoveryDisabledLanes&_)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;x=ru;var X=B.current.memoizedState.isDehydrated;if(X&&(Fs(B,M).flags|=256),M=C0(B,M,!1),M!==2){if(_0&&!X){B.errorRecoveryDisabledLanes|=_,No|=_,x=4;break e}_=Mn,Mn=x,_!==null&&(Mn===null?Mn=_:Mn.push.apply(Mn,_))}x=M}if(_=!1,x!==2)continue}}if(x===1){Fs(a,0),wa(a,s,0,!0);break}e:{switch(m=a,_=x,_){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:wa(m,s,zn,!ga);break e;case 2:Mn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(x=sh+300-nt(),10<x)){if(wa(m,s,zn,!ga),gs(m,0,!0)!==0)break e;Ni=s,m.timeoutHandle=CO(eO.bind(null,m,u,Mn,ch,A0,s,zn,No,Gs,ga,_,"Throttled",-0,0),x);break e}eO(m,u,Mn,ch,A0,s,zn,No,Gs,ga,_,null,-0,0)}}break}while(!0);Ur(a)}function eO(a,s,u,m,x,_,M,B,X,oe,ue,me,se,le){if(a.timeoutHandle=-1,me=s.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fi},FN(s,_,me);var je=(_&62914560)===_?sh-nt():(_&4194048)===_?WN-nt():0;if(je=vB(me,je),je!==null){Ni=_,a.cancelPendingCommit=je(lO.bind(null,a,s,_,u,m,x,M,B,X,ue,me,null,se,le)),wa(a,_,M,!oe);return}}lO(a,s,_,u,m,x,M,B,X)}function Pq(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 m=0;m<u.length;m++){var x=u[m],_=x.getSnapshot;x=x.value;try{if(!$n(_(),x))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 wa(a,s,u,m){s&=~j0,s&=~No,a.suspendedLanes|=s,a.pingedLanes&=~s,m&&(a.warmLanes|=s),m=a.expirationTimes;for(var x=s;0<x;){var _=31-xn(x),M=1<<_;m[_]=-1,x&=~M}u!==0&&ud(a,u,s)}function uh(){return(tt&6)===0?(au(0),!1):!0}function T0(){if(Ge!==null){if(ot===0)var a=Ge.return;else a=Ge,mi=go=null,Vg(a),$s=null,zc=0,a=Ge;for(;a!==null;)MN(a.alternate,a),a=a.return;Ge=null}}function Fs(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,eB(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Ni=0,T0(),pt=a,Ge=u=hi(a.current,null),Fe=s,ot=0,Bn=null,ga=!1,Us=ao(a,s),_0=!1,Gs=zn=j0=No=va=Mt=0,Mn=ru=null,A0=!1,(s&8)!==0&&(s|=s&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=s;0<m;){var x=31-xn(m),_=1<<x;s|=a[x],m&=~_}return Ai=s,Md(),u}function tO(a,s){Ie=null,k.H=Kc,s===Ds||s===qd?(s=gA(),ot=3):s===Rg?(s=gA(),ot=4):ot=s===s0?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Bn=s,Ge===null&&(Mt=1,Jd(a,Jn(s,a.current)))}function nO(){var a=Ln.current;return a===null?!0:(Fe&4194048)===Fe?rr===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?a===rr:!1}function rO(){var a=k.H;return k.H=Kc,a===null?Kc:a}function iO(){var a=k.A;return k.A=kq,a}function fh(){Mt=4,ga||(Fe&4194048)!==Fe&&Ln.current!==null||(Us=!0),(va&134217727)===0&&(No&134217727)===0||pt===null||wa(pt,Fe,zn,!1)}function C0(a,s,u){var m=tt;tt|=2;var x=rO(),_=iO();(pt!==a||Fe!==s)&&(ch=null,Fs(a,s)),s=!1;var M=Mt;e:do try{if(ot!==0&&Ge!==null){var B=Ge,X=Bn;switch(ot){case 8:T0(),M=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(s=!0);var oe=ot;if(ot=0,Bn=null,Ys(a,B,X,oe),u&&Us){M=0;break e}break;default:oe=ot,ot=0,Bn=null,Ys(a,B,X,oe)}}Dq(),M=Mt;break}catch(ue){tO(a,ue)}while(!0);return s&&a.shellSuspendCounter++,mi=go=null,tt=m,k.H=x,k.A=_,Ge===null&&(pt=null,Fe=0,Md()),M}function Dq(){for(;Ge!==null;)aO(Ge)}function $q(a,s){var u=tt;tt|=2;var m=rO(),x=iO();pt!==a||Fe!==s?(ch=null,lh=nt()+500,Fs(a,s)):Us=ao(a,s);e:do try{if(ot!==0&&Ge!==null){s=Ge;var _=Bn;t:switch(ot){case 1:ot=0,Bn=null,Ys(a,s,_,1);break;case 2:case 9:if(mA(_)){ot=0,Bn=null,oO(s);break}s=function(){ot!==2&&ot!==9||pt!==a||(ot=7),Ur(a)},_.then(s,s);break e;case 3:ot=7;break e;case 4:ot=5;break e;case 7:mA(_)?(ot=0,Bn=null,oO(s)):(ot=0,Bn=null,Ys(a,s,_,7));break;case 5:var M=null;switch(Ge.tag){case 26:M=Ge.memoizedState;case 5:case 27:var B=Ge;if(M?VO(M):B.stateNode.complete){ot=0,Bn=null;var X=B.sibling;if(X!==null)Ge=X;else{var oe=B.return;oe!==null?(Ge=oe,dh(oe)):Ge=null}break t}}ot=0,Bn=null,Ys(a,s,_,5);break;case 6:ot=0,Bn=null,Ys(a,s,_,6);break;case 8:T0(),Mt=6;break e;default:throw Error(r(462))}}Iq();break}catch(ue){tO(a,ue)}while(!0);return mi=go=null,k.H=m,k.A=x,tt=u,Ge!==null?0:(pt=null,Fe=0,Md(),Mt)}function Iq(){for(;Ge!==null&&!De();)aO(Ge)}function aO(a){var s=TN(a.alternate,a,Ai);a.memoizedProps=a.pendingProps,s===null?dh(a):Ge=s}function oO(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=_N(u,s,s.pendingProps,s.type,void 0,Fe);break;case 11:s=_N(u,s,s.pendingProps,s.type.render,s.ref,Fe);break;case 5:Vg(s);default:MN(u,s),s=Ge=iA(s,Ai),s=TN(u,s,Ai)}a.memoizedProps=a.pendingProps,s===null?dh(a):Ge=s}function Ys(a,s,u,m){mi=go=null,Vg(s),$s=null,zc=0;var x=s.return;try{if(Aq(a,x,s,u,Fe)){Mt=1,Jd(a,Jn(u,a.current)),Ge=null;return}}catch(_){if(x!==null)throw Ge=x,_;Mt=1,Jd(a,Jn(u,a.current)),Ge=null;return}s.flags&32768?(Ke||m===1?a=!0:Us||(Fe&536870912)!==0?a=!1:(ga=a=!0,(m===2||m===9||m===3||m===6)&&(m=Ln.current,m!==null&&m.tag===13&&(m.flags|=16384))),sO(s,a)):dh(s)}function dh(a){var s=a;do{if((s.flags&32768)!==0){sO(s,ga);return}a=s.return;var u=Eq(s.alternate,s,Ai);if(u!==null){Ge=u;return}if(s=s.sibling,s!==null){Ge=s;return}Ge=s=a}while(s!==null);Mt===0&&(Mt=5)}function sO(a,s){do{var u=Tq(a.alternate,a);if(u!==null){u.flags&=32767,Ge=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Ge=a;return}Ge=a=u}while(a!==null);Mt=6,Ge=null}function lO(a,s,u,m,x,_,M,B,X){a.cancelPendingCommit=null;do hh();while(Yt!==0);if((tt&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(_=s.lanes|s.childLanes,_|=vg,Xy(a,u,_,M,B,X),a===pt&&(Ge=pt=null,Fe=0),Vs=s,ba=a,Ni=u,N0=_,O0=x,QN=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,zq(Dn,function(){return hO(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=k.T,k.T=null,x=z.p,z.p=2,M=tt,tt|=4;try{Cq(a,s,u)}finally{tt=M,z.p=x,k.T=m}}Yt=1,cO(),uO(),fO()}}function cO(){if(Yt===1){Yt=0;var a=ba,s=Vs,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=k.T,k.T=null;var m=z.p;z.p=2;var x=tt;tt|=4;try{UN(s,a);var _=H0,M=Kj(a.containerInfo),B=_.focusedElem,X=_.selectionRange;if(M!==B&&B&&B.ownerDocument&&Xj(B.ownerDocument.documentElement,B)){if(X!==null&&hg(B)){var oe=X.start,ue=X.end;if(ue===void 0&&(ue=oe),"selectionStart"in B)B.selectionStart=oe,B.selectionEnd=Math.min(ue,B.value.length);else{var me=B.ownerDocument||document,se=me&&me.defaultView||window;if(se.getSelection){var le=se.getSelection(),je=B.textContent.length,Ce=Math.min(X.start,je),ft=X.end===void 0?Ce:Math.min(X.end,je);!le.extend&&Ce>ft&&(M=ft,ft=Ce,Ce=M);var te=Yj(B,Ce),Z=Yj(B,ft);if(te&&Z&&(le.rangeCount!==1||le.anchorNode!==te.node||le.anchorOffset!==te.offset||le.focusNode!==Z.node||le.focusOffset!==Z.offset)){var ie=me.createRange();ie.setStart(te.node,te.offset),le.removeAllRanges(),Ce>ft?(le.addRange(ie),le.extend(Z.node,Z.offset)):(ie.setEnd(Z.node,Z.offset),le.addRange(ie))}}}}for(me=[],le=B;le=le.parentNode;)le.nodeType===1&&me.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof B.focus=="function"&&B.focus(),B=0;B<me.length;B++){var pe=me[B];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Ah=!!z0,H0=z0=null}finally{tt=x,z.p=m,k.T=u}}a.current=s,Yt=2}}function uO(){if(Yt===2){Yt=0;var a=ba,s=Vs,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=k.T,k.T=null;var m=z.p;z.p=2;var x=tt;tt|=4;try{LN(a,s.alternate,s)}finally{tt=x,z.p=m,k.T=u}}Yt=3}}function fO(){if(Yt===4||Yt===3){Yt=0,ze();var a=ba,s=Vs,u=Ni,m=QN;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Yt=5:(Yt=0,Vs=ba=null,dO(a,a.pendingLanes));var x=a.pendingLanes;if(x===0&&(xa=null),jc(u),s=s.stateNode,vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(io,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=k.T,x=z.p,z.p=2,k.T=null;try{for(var _=a.onRecoverableError,M=0;M<m.length;M++){var B=m[M];_(B.value,{componentStack:B.stack})}}finally{k.T=s,z.p=x}}(Ni&3)!==0&&hh(),Ur(a),x=a.pendingLanes,(u&261930)!==0&&(x&42)!==0?a===E0?iu++:(iu=0,E0=a):iu=0,au(0)}}function dO(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,qc(s)))}function hh(){return cO(),uO(),fO(),hO()}function hO(){if(Yt!==5)return!1;var a=ba,s=N0;N0=0;var u=jc(Ni),m=k.T,x=z.p;try{z.p=32>u?32:u,k.T=null,u=O0,O0=null;var _=ba,M=Ni;if(Yt=0,Vs=ba=null,Ni=0,(tt&6)!==0)throw Error(r(331));var B=tt;if(tt|=4,XN(_.current),VN(_,_.current,M,u),tt=B,au(0,!1),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(io,_)}catch{}return!0}finally{z.p=x,k.T=m,dO(a,s)}}function pO(a,s,u){s=Jn(u,s),s=o0(a.stateNode,s,2),a=ha(a,s,2),a!==null&&(oo(a,2),Ur(a))}function st(a,s,u){if(a.tag===3)pO(a,a,u);else for(;s!==null;){if(s.tag===3){pO(s,a,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(xa===null||!xa.has(m))){a=Jn(u,a),u=mN(2),m=ha(s,u,2),m!==null&&(yN(u,m,s,a),oo(m,2),Ur(m));break}}s=s.return}}function M0(a,s,u){var m=a.pingCache;if(m===null){m=a.pingCache=new Rq;var x=new Set;m.set(s,x)}else x=m.get(s),x===void 0&&(x=new Set,m.set(s,x));x.has(u)||(_0=!0,x.add(u),a=Lq.bind(null,a,s,u),s.then(a,a))}function Lq(a,s,u){var m=a.pingCache;m!==null&&m.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,pt===a&&(Fe&u)===u&&(Mt===4||Mt===3&&(Fe&62914560)===Fe&&300>nt()-sh?(tt&2)===0&&Fs(a,0):j0|=u,Gs===Fe&&(Gs=0)),Ur(a)}function mO(a,s){s===0&&(s=cd()),a=po(a,s),a!==null&&(oo(a,s),Ur(a))}function qq(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),mO(a,u)}function Bq(a,s){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,x=a.memoizedState;x!==null&&(u=x.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(r(314))}m!==null&&m.delete(s),mO(a,u)}function zq(a,s){return Zt(a,s)}var ph=null,Xs=null,k0=!1,mh=!1,R0=!1,Sa=0;function Ur(a){a!==Xs&&a.next===null&&(Xs===null?ph=Xs=a:Xs=Xs.next=a),mh=!0,k0||(k0=!0,Uq())}function au(a,s){if(!R0&&mh){R0=!0;do for(var u=!1,m=ph;m!==null;){if(a!==0){var x=m.pendingLanes;if(x===0)var _=0;else{var M=m.suspendedLanes,B=m.pingedLanes;_=(1<<31-xn(42|a)+1)-1,_&=x&~(M&~B),_=_&201326741?_&201326741|1:_?_|2:0}_!==0&&(u=!0,xO(m,_))}else _=Fe,_=gs(m,m===pt?_:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(_&3)===0||ao(m,_)||(u=!0,xO(m,_));m=m.next}while(u);R0=!1}}function Hq(){yO()}function yO(){mh=k0=!1;var a=0;Sa!==0&&Jq()&&(a=Sa);for(var s=nt(),u=null,m=ph;m!==null;){var x=m.next,_=gO(m,s);_===0?(m.next=null,u===null?ph=x:u.next=x,x===null&&(Xs=u)):(u=m,(a!==0||(_&3)!==0)&&(mh=!0)),m=x}Yt!==0&&Yt!==5||au(a),Sa!==0&&(Sa=0)}function gO(a,s){for(var u=a.suspendedLanes,m=a.pingedLanes,x=a.expirationTimes,_=a.pendingLanes&-62914561;0<_;){var M=31-xn(_),B=1<<M,X=x[M];X===-1?((B&u)===0||(B&m)!==0)&&(x[M]=Yy(B,s)):X<=s&&(a.expiredLanes|=B),_&=~B}if(s=pt,u=Fe,u=gs(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===s&&(ot===2||ot===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&Pt(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||ao(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(m!==null&&Pt(m),jc(u)){case 2:case 8:u=At;break;case 32:u=Dn;break;case 268435456:u=oi;break;default:u=Dn}return m=vO.bind(null,a),u=Zt(u,m),a.callbackPriority=s,a.callbackNode=u,s}return m!==null&&m!==null&&Pt(m),a.callbackPriority=2,a.callbackNode=null,2}function vO(a,s){if(Yt!==0&&Yt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(hh()&&a.callbackNode!==u)return null;var m=Fe;return m=gs(a,a===pt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(JN(a,m,s),gO(a,nt()),a.callbackNode!=null&&a.callbackNode===u?vO.bind(null,a):null)}function xO(a,s){if(hh())return null;JN(a,s,!0)}function Uq(){tB(function(){(tt&6)!==0?Zt(Qn,Hq):yO()})}function P0(){if(Sa===0){var a=Rs;a===0&&(a=ps,ps<<=1,(ps&261888)===0&&(ps=256)),Sa=a}return Sa}function bO(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:_d(""+a)}function wO(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 Gq(a,s,u,m,x){if(s==="submit"&&u&&u.stateNode===x){var _=bO((x[dn]||null).action),M=m.submitter;M&&(s=(s=M[dn]||null)?bO(s.formAction):M.getAttribute("formAction"),s!==null&&(_=s,M=null));var B=new Od("action","action",null,m,x);a.push({event:B,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Sa!==0){var X=M?wO(x,M):new FormData(x);e0(u,{pending:!0,data:X,method:x.method,action:_},null,X)}}else typeof _=="function"&&(B.preventDefault(),X=M?wO(x,M):new FormData(x),e0(u,{pending:!0,data:X,method:x.method,action:_},_,X))},currentTarget:x}]})}}for(var D0=0;D0<gg.length;D0++){var $0=gg[D0],Vq=$0.toLowerCase(),Fq=$0[0].toUpperCase()+$0.slice(1);xr(Vq,"on"+Fq)}xr(Zj,"onAnimationEnd"),xr(Jj,"onAnimationIteration"),xr(eA,"onAnimationStart"),xr("dblclick","onDoubleClick"),xr("focusin","onFocus"),xr("focusout","onBlur"),xr(lq,"onTransitionRun"),xr(cq,"onTransitionStart"),xr(uq,"onTransitionCancel"),xr(tA,"onTransitionEnd"),ia("onMouseEnter",["mouseout","mouseover"]),ia("onMouseLeave",["mouseout","mouseover"]),ia("onPointerEnter",["pointerout","pointerover"]),ia("onPointerLeave",["pointerout","pointerover"]),ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ou="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(" "),Yq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ou));function SO(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],x=m.event;m=m.listeners;e:{var _=void 0;if(s)for(var M=m.length-1;0<=M;M--){var B=m[M],X=B.instance,oe=B.currentTarget;if(B=B.listener,X!==_&&x.isPropagationStopped())break e;_=B,x.currentTarget=oe;try{_(x)}catch(ue){Cd(ue)}x.currentTarget=null,_=X}else for(M=0;M<m.length;M++){if(B=m[M],X=B.instance,oe=B.currentTarget,B=B.listener,X!==_&&x.isPropagationStopped())break e;_=B,x.currentTarget=oe;try{_(x)}catch(ue){Cd(ue)}x.currentTarget=null,_=X}}}}function Ve(a,s){var u=s[vs];u===void 0&&(u=s[vs]=new Set);var m=a+"__bubble";u.has(m)||(_O(s,a,2,!1),u.add(m))}function I0(a,s,u){var m=0;s&&(m|=4),_O(u,a,m,s)}var yh="_reactListening"+Math.random().toString(36).slice(2);function L0(a){if(!a[yh]){a[yh]=!0,gd.forEach(function(u){u!=="selectionchange"&&(Yq.has(u)||I0(u,!1,a),I0(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[yh]||(s[yh]=!0,I0("selectionchange",!1,s))}}function _O(a,s,u,m){switch(ZO(s)){case 2:var x=wB;break;case 8:x=SB;break;default:x=J0}u=x.bind(null,s,u,a),x=void 0,!ig||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),m?x!==void 0?a.addEventListener(s,u,{capture:!0,passive:x}):a.addEventListener(s,u,!0):x!==void 0?a.addEventListener(s,u,{passive:x}):a.addEventListener(s,u,!1)}function q0(a,s,u,m,x){var _=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var M=m.tag;if(M===3||M===4){var B=m.stateNode.containerInfo;if(B===x)break;if(M===4)for(M=m.return;M!==null;){var X=M.tag;if((X===3||X===4)&&M.stateNode.containerInfo===x)return;M=M.return}for(;B!==null;){if(M=ea(B),M===null)return;if(X=M.tag,X===5||X===6||X===26||X===27){m=_=M;continue e}B=B.parentNode}}m=m.return}Ej(function(){var oe=_,ue=ng(u),me=[];e:{var se=nA.get(a);if(se!==void 0){var le=Od,je=a;switch(a){case"keypress":if(Ad(u)===0)break e;case"keydown":case"keyup":le=BL;break;case"focusin":je="focus",le=lg;break;case"focusout":je="blur",le=lg;break;case"beforeblur":case"afterblur":le=lg;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":le=Mj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=EL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=UL;break;case Zj:case Jj:case eA:le=ML;break;case tA:le=VL;break;case"scroll":case"scrollend":le=NL;break;case"wheel":le=YL;break;case"copy":case"cut":case"paste":le=RL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=Rj;break;case"toggle":case"beforetoggle":le=KL}var Ce=(s&4)!==0,ft=!Ce&&(a==="scroll"||a==="scrollend"),te=Ce?se!==null?se+"Capture":null:se;Ce=[];for(var Z=oe,ie;Z!==null;){var pe=Z;if(ie=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ie===null||te===null||(pe=Ec(Z,te),pe!=null&&Ce.push(su(Z,pe,ie))),ft)break;Z=Z.return}0<Ce.length&&(se=new le(se,je,null,u,ue),me.push({event:se,listeners:Ce}))}}if((s&7)===0){e:{if(se=a==="mouseover"||a==="pointerover",le=a==="mouseout"||a==="pointerout",se&&u!==tg&&(je=u.relatedTarget||u.fromElement)&&(ea(je)||je[li]))break e;if((le||se)&&(se=ue.window===ue?ue:(se=ue.ownerDocument)?se.defaultView||se.parentWindow:window,le?(je=u.relatedTarget||u.toElement,le=oe,je=je?ea(je):null,je!==null&&(ft=o(je),Ce=je.tag,je!==ft||Ce!==5&&Ce!==27&&Ce!==6)&&(je=null)):(le=null,je=oe),le!==je)){if(Ce=Mj,pe="onMouseLeave",te="onMouseEnter",Z="mouse",(a==="pointerout"||a==="pointerover")&&(Ce=Rj,pe="onPointerLeave",te="onPointerEnter",Z="pointer"),ft=le==null?se:na(le),ie=je==null?se:na(je),se=new Ce(pe,Z+"leave",le,u,ue),se.target=ft,se.relatedTarget=ie,pe=null,ea(ue)===oe&&(Ce=new Ce(te,Z+"enter",je,u,ue),Ce.target=ie,Ce.relatedTarget=ft,pe=Ce),ft=pe,le&&je)t:{for(Ce=Xq,te=le,Z=je,ie=0,pe=te;pe;pe=Ce(pe))ie++;pe=0;for(var Ee=Z;Ee;Ee=Ce(Ee))pe++;for(;0<ie-pe;)te=Ce(te),ie--;for(;0<pe-ie;)Z=Ce(Z),pe--;for(;ie--;){if(te===Z||Z!==null&&te===Z.alternate){Ce=te;break t}te=Ce(te),Z=Ce(Z)}Ce=null}else Ce=null;le!==null&&jO(me,se,le,Ce,!1),je!==null&&ft!==null&&jO(me,ft,je,Ce,!0)}}e:{if(se=oe?na(oe):window,le=se.nodeName&&se.nodeName.toLowerCase(),le==="select"||le==="input"&&se.type==="file")var Ze=zj;else if(qj(se))if(Hj)Ze=aq;else{Ze=rq;var Oe=nq}else le=se.nodeName,!le||le.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?oe&&eg(oe.elementType)&&(Ze=zj):Ze=iq;if(Ze&&(Ze=Ze(a,oe))){Bj(me,Ze,u,ue);break e}Oe&&Oe(a,se,oe),a==="focusout"&&oe&&se.type==="number"&&oe.memoizedProps.value!=null&&Oc(se,"number",se.value)}switch(Oe=oe?na(oe):window,a){case"focusin":(qj(Oe)||Oe.contentEditable==="true")&&(As=Oe,pg=oe,$c=null);break;case"focusout":$c=pg=As=null;break;case"mousedown":mg=!0;break;case"contextmenu":case"mouseup":case"dragend":mg=!1,Wj(me,u,ue);break;case"selectionchange":if(sq)break;case"keydown":case"keyup":Wj(me,u,ue)}var Le;if(ug)e:{switch(a){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else js?Ij(a,u)&&(Ye="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Ye="onCompositionStart");Ye&&(Pj&&u.locale!=="ko"&&(js||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&js&&(Le=Tj()):(oa=ue,ag="value"in oa?oa.value:oa.textContent,js=!0)),Oe=gh(oe,Ye),0<Oe.length&&(Ye=new kj(Ye,a,null,u,ue),me.push({event:Ye,listeners:Oe}),Le?Ye.data=Le:(Le=Lj(u),Le!==null&&(Ye.data=Le)))),(Le=QL?ZL(a,u):JL(a,u))&&(Ye=gh(oe,"onBeforeInput"),0<Ye.length&&(Oe=new kj("onBeforeInput","beforeinput",null,u,ue),me.push({event:Oe,listeners:Ye}),Oe.data=Le)),Gq(me,a,oe,u,ue)}SO(me,s)})}function su(a,s,u){return{instance:a,listener:s,currentTarget:u}}function gh(a,s){for(var u=s+"Capture",m=[];a!==null;){var x=a,_=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||_===null||(x=Ec(a,u),x!=null&&m.unshift(su(a,x,_)),x=Ec(a,s),x!=null&&m.push(su(a,x,_))),a.tag===3)return m;a=a.return}return[]}function Xq(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function jO(a,s,u,m,x){for(var _=s._reactName,M=[];u!==null&&u!==m;){var B=u,X=B.alternate,oe=B.stateNode;if(B=B.tag,X!==null&&X===m)break;B!==5&&B!==26&&B!==27||oe===null||(X=oe,x?(oe=Ec(u,_),oe!=null&&M.unshift(su(u,oe,X))):x||(oe=Ec(u,_),oe!=null&&M.push(su(u,oe,X)))),u=u.return}M.length!==0&&a.push({event:s,listeners:M})}var Kq=/\r\n?/g,Wq=/\u0000|\uFFFD/g;function AO(a){return(typeof a=="string"?a:""+a).replace(Kq,`
|
|
49
|
+
`).replace(Wq,"")}function NO(a,s){return s=AO(s),AO(a)===s}function ut(a,s,u,m,x,_){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||ws(a,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&ws(a,""+m);break;case"className":bs(a,"class",m);break;case"tabIndex":bs(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":bs(a,u,m);break;case"style":Nj(a,m,_);break;case"data":if(s!=="object"){bs(a,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=_d(""+m),a.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="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 _=="function"&&(u==="formAction"?(s!=="input"&&ut(a,s,"name",x.name,x,null),ut(a,s,"formEncType",x.formEncType,x,null),ut(a,s,"formMethod",x.formMethod,x,null),ut(a,s,"formTarget",x.formTarget,x,null)):(ut(a,s,"encType",x.encType,x,null),ut(a,s,"method",x.method,x,null),ut(a,s,"target",x.target,x,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=_d(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=fi);break;case"onScroll":m!=null&&Ve("scroll",a);break;case"onScrollEnd":m!=null&&Ve("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}u=_d(""+m),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":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):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":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":Ve("beforetoggle",a),Ve("toggle",a),xs(a,"popover",m);break;case"xlinkActuate":vr(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":vr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":vr(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":vr(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":vr(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":vr(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":vr(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":vr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":vr(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":xs(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=jL.get(u)||u,xs(a,u,m))}}function B0(a,s,u,m,x,_){switch(u){case"style":Nj(a,m,_);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(r(61));if(u=m.__html,u!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof m=="string"?ws(a,m):(typeof m=="number"||typeof m=="bigint")&&ws(a,""+m);break;case"onScroll":m!=null&&Ve("scroll",a);break;case"onScrollEnd":m!=null&&Ve("scrollend",a);break;case"onClick":m!=null&&(a.onclick=fi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vd.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),s=u.slice(2,x?u.length-7:void 0),_=a[dn]||null,_=_!=null?_[u]:null,typeof _=="function"&&a.removeEventListener(s,_,x),typeof m=="function")){typeof _!="function"&&_!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,m,x);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):xs(a,u,m)}}}function cn(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ve("error",a),Ve("load",a);var m=!1,x=!1,_;for(_ in u)if(u.hasOwnProperty(_)){var M=u[_];if(M!=null)switch(_){case"src":m=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ut(a,s,_,M,u,null)}}x&&ut(a,s,"srcSet",u.srcSet,u,null),m&&ut(a,s,"src",u.src,u,null);return;case"input":Ve("invalid",a);var B=_=M=x=null,X=null,oe=null;for(m in u)if(u.hasOwnProperty(m)){var ue=u[m];if(ue!=null)switch(m){case"name":x=ue;break;case"type":M=ue;break;case"checked":X=ue;break;case"defaultChecked":oe=ue;break;case"value":_=ue;break;case"defaultValue":B=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:ut(a,s,m,ue,u,null)}}Sd(a,_,B,X,oe,M,x,!1);return;case"select":Ve("invalid",a),m=M=_=null;for(x in u)if(u.hasOwnProperty(x)&&(B=u[x],B!=null))switch(x){case"value":_=B;break;case"defaultValue":M=B;break;case"multiple":m=B;default:ut(a,s,x,B,u,null)}s=_,u=M,a.multiple=!!m,s!=null?ui(a,!!m,s,!1):u!=null&&ui(a,!!m,u,!0);return;case"textarea":Ve("invalid",a),_=x=m=null;for(M in u)if(u.hasOwnProperty(M)&&(B=u[M],B!=null))switch(M){case"value":m=B;break;case"defaultValue":x=B;break;case"children":_=B;break;case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(91));break;default:ut(a,s,M,B,u,null)}jj(a,m,x,_);return;case"option":for(X in u)if(u.hasOwnProperty(X)&&(m=u[X],m!=null))switch(X){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:ut(a,s,X,m,u,null)}return;case"dialog":Ve("beforetoggle",a),Ve("toggle",a),Ve("cancel",a),Ve("close",a);break;case"iframe":case"object":Ve("load",a);break;case"video":case"audio":for(m=0;m<ou.length;m++)Ve(ou[m],a);break;case"image":Ve("error",a),Ve("load",a);break;case"details":Ve("toggle",a);break;case"embed":case"source":case"link":Ve("error",a),Ve("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(oe in u)if(u.hasOwnProperty(oe)&&(m=u[oe],m!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:ut(a,s,oe,m,u,null)}return;default:if(eg(s)){for(ue in u)u.hasOwnProperty(ue)&&(m=u[ue],m!==void 0&&B0(a,s,ue,m,u,void 0));return}}for(B in u)u.hasOwnProperty(B)&&(m=u[B],m!=null&&ut(a,s,B,m,u,null))}function Qq(a,s,u,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,_=null,M=null,B=null,X=null,oe=null,ue=null;for(le in u){var me=u[le];if(u.hasOwnProperty(le)&&me!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":X=me;default:m.hasOwnProperty(le)||ut(a,s,le,null,m,me)}}for(var se in m){var le=m[se];if(me=u[se],m.hasOwnProperty(se)&&(le!=null||me!=null))switch(se){case"type":_=le;break;case"name":x=le;break;case"checked":oe=le;break;case"defaultChecked":ue=le;break;case"value":M=le;break;case"defaultValue":B=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,s));break;default:le!==me&&ut(a,s,se,le,m,me)}}co(a,M,B,X,oe,ue,_,x);return;case"select":le=M=B=se=null;for(_ in u)if(X=u[_],u.hasOwnProperty(_)&&X!=null)switch(_){case"value":break;case"multiple":le=X;default:m.hasOwnProperty(_)||ut(a,s,_,null,m,X)}for(x in m)if(_=m[x],X=u[x],m.hasOwnProperty(x)&&(_!=null||X!=null))switch(x){case"value":se=_;break;case"defaultValue":B=_;break;case"multiple":M=_;default:_!==X&&ut(a,s,x,_,m,X)}s=B,u=M,m=le,se!=null?ui(a,!!u,se,!1):!!m!=!!u&&(s!=null?ui(a,!!u,s,!0):ui(a,!!u,u?[]:"",!1));return;case"textarea":le=se=null;for(B in u)if(x=u[B],u.hasOwnProperty(B)&&x!=null&&!m.hasOwnProperty(B))switch(B){case"value":break;case"children":break;default:ut(a,s,B,null,m,x)}for(M in m)if(x=m[M],_=u[M],m.hasOwnProperty(M)&&(x!=null||_!=null))switch(M){case"value":se=x;break;case"defaultValue":le=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==_&&ut(a,s,M,x,m,_)}_j(a,se,le);return;case"option":for(var je in u)if(se=u[je],u.hasOwnProperty(je)&&se!=null&&!m.hasOwnProperty(je))switch(je){case"selected":a.selected=!1;break;default:ut(a,s,je,null,m,se)}for(X in m)if(se=m[X],le=u[X],m.hasOwnProperty(X)&&se!==le&&(se!=null||le!=null))switch(X){case"selected":a.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:ut(a,s,X,se,m,le)}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 Ce in u)se=u[Ce],u.hasOwnProperty(Ce)&&se!=null&&!m.hasOwnProperty(Ce)&&ut(a,s,Ce,null,m,se);for(oe in m)if(se=m[oe],le=u[oe],m.hasOwnProperty(oe)&&se!==le&&(se!=null||le!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:ut(a,s,oe,se,m,le)}return;default:if(eg(s)){for(var ft in u)se=u[ft],u.hasOwnProperty(ft)&&se!==void 0&&!m.hasOwnProperty(ft)&&B0(a,s,ft,void 0,m,se);for(ue in m)se=m[ue],le=u[ue],!m.hasOwnProperty(ue)||se===le||se===void 0&&le===void 0||B0(a,s,ue,se,m,le);return}}for(var te in u)se=u[te],u.hasOwnProperty(te)&&se!=null&&!m.hasOwnProperty(te)&&ut(a,s,te,null,m,se);for(me in m)se=m[me],le=u[me],!m.hasOwnProperty(me)||se===le||se==null&&le==null||ut(a,s,me,se,m,le)}function OO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zq(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var x=u[m],_=x.transferSize,M=x.initiatorType,B=x.duration;if(_&&B&&OO(M)){for(M=0,B=x.responseEnd,m+=1;m<u.length;m++){var X=u[m],oe=X.startTime;if(oe>B)break;var ue=X.transferSize,me=X.initiatorType;ue&&OO(me)&&(X=X.responseEnd,M+=ue*(X<B?1:(B-oe)/(X-oe)))}if(--m,s+=8*(_+M)/(x.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 z0=null,H0=null;function vh(a){return a.nodeType===9?a:a.ownerDocument}function EO(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 TO(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 U0(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 G0=null;function Jq(){var a=window.event;return a&&a.type==="popstate"?a===G0?!1:(G0=a,!0):(G0=null,!1)}var CO=typeof setTimeout=="function"?setTimeout:void 0,eB=typeof clearTimeout=="function"?clearTimeout:void 0,MO=typeof Promise=="function"?Promise:void 0,tB=typeof queueMicrotask=="function"?queueMicrotask:typeof MO<"u"?function(a){return MO.resolve(null).then(a).catch(nB)}:CO;function nB(a){setTimeout(function(){throw a})}function _a(a){return a==="head"}function kO(a,s){var u=s,m=0;do{var x=u.nextSibling;if(a.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(x),Zs(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")lu(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,lu(u);for(var _=u.firstChild;_;){var M=_.nextSibling,B=_.nodeName;_[so]||B==="SCRIPT"||B==="STYLE"||B==="LINK"&&_.rel.toLowerCase()==="stylesheet"||u.removeChild(_),_=M}}else u==="body"&&lu(a.ownerDocument.body);u=x}while(u);Zs(s)}function RO(a,s){var u=a;a=0;do{var m=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||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=m}while(u)}function V0(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":V0(u),Ac(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function rB(a,s,u,m){for(;a.nodeType===1;){var x=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[so])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(_=a.getAttribute("rel"),_==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(_!==x.rel||a.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||a.getAttribute("title")!==(x.title==null?null:x.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(_=a.getAttribute("src"),(_!==(x.src==null?null:x.src)||a.getAttribute("type")!==(x.type==null?null:x.type)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&_&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var _=x.name==null?null:""+x.name;if(x.type==="hidden"&&a.getAttribute("name")===_)return a}else return a;if(a=ir(a.nextSibling),a===null)break}return null}function iB(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=ir(a.nextSibling),a===null))return null;return a}function PO(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=ir(a.nextSibling),a===null))return null;return a}function F0(a){return a.data==="$?"||a.data==="$~"}function Y0(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function aB(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var m=function(){s(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function ir(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 X0=null;function DO(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return ir(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function $O(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 IO(a,s,u){switch(s=vh(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 lu(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Ac(a)}var ar=new Map,LO=new Set;function xh(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Oi=z.d;z.d={f:oB,r:sB,D:lB,C:cB,L:uB,m:fB,X:hB,S:dB,M:pB};function oB(){var a=Oi.f(),s=uh();return a||s}function sB(a){var s=ta(a);s!==null&&s.tag===5&&s.type==="form"?tN(s):Oi.r(a)}var Ks=typeof document>"u"?null:document;function qO(a,s,u){var m=Ks;if(m&&typeof s=="string"&&s){var x=Nn(s);x='link[rel="'+a+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),LO.has(x)||(LO.add(x),a={rel:a,crossOrigin:u,href:s},m.querySelector(x)===null&&(s=m.createElement("link"),cn(s,"link",a),It(s),m.head.appendChild(s)))}}function lB(a){Oi.D(a),qO("dns-prefetch",a,null)}function cB(a,s){Oi.C(a,s),qO("preconnect",a,s)}function uB(a,s,u){Oi.L(a,s,u);var m=Ks;if(m&&a&&s){var x='link[rel="preload"][as="'+Nn(s)+'"]';s==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+Nn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+Nn(u.imageSizes)+'"]')):x+='[href="'+Nn(a)+'"]';var _=x;switch(s){case"style":_=Ws(a);break;case"script":_=Qs(a)}ar.has(_)||(a=p({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),ar.set(_,a),m.querySelector(x)!==null||s==="style"&&m.querySelector(cu(_))||s==="script"&&m.querySelector(uu(_))||(s=m.createElement("link"),cn(s,"link",a),It(s),m.head.appendChild(s)))}}function fB(a,s){Oi.m(a,s);var u=Ks;if(u&&a){var m=s&&typeof s.as=="string"?s.as:"script",x='link[rel="modulepreload"][as="'+Nn(m)+'"][href="'+Nn(a)+'"]',_=x;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":_=Qs(a)}if(!ar.has(_)&&(a=p({rel:"modulepreload",href:a},s),ar.set(_,a),u.querySelector(x)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(uu(_)))return}m=u.createElement("link"),cn(m,"link",a),It(m),u.head.appendChild(m)}}}function dB(a,s,u){Oi.S(a,s,u);var m=Ks;if(m&&a){var x=ra(m).hoistableStyles,_=Ws(a);s=s||"default";var M=x.get(_);if(!M){var B={loading:0,preload:null};if(M=m.querySelector(cu(_)))B.loading=5;else{a=p({rel:"stylesheet",href:a,"data-precedence":s},u),(u=ar.get(_))&&K0(a,u);var X=M=m.createElement("link");It(X),cn(X,"link",a),X._p=new Promise(function(oe,ue){X.onload=oe,X.onerror=ue}),X.addEventListener("load",function(){B.loading|=1}),X.addEventListener("error",function(){B.loading|=2}),B.loading|=4,bh(M,s,m)}M={type:"stylesheet",instance:M,count:1,state:B},x.set(_,M)}}}function hB(a,s){Oi.X(a,s);var u=Ks;if(u&&a){var m=ra(u).hoistableScripts,x=Qs(a),_=m.get(x);_||(_=u.querySelector(uu(x)),_||(a=p({src:a,async:!0},s),(s=ar.get(x))&&W0(a,s),_=u.createElement("script"),It(_),cn(_,"link",a),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},m.set(x,_))}}function pB(a,s){Oi.M(a,s);var u=Ks;if(u&&a){var m=ra(u).hoistableScripts,x=Qs(a),_=m.get(x);_||(_=u.querySelector(uu(x)),_||(a=p({src:a,async:!0,type:"module"},s),(s=ar.get(x))&&W0(a,s),_=u.createElement("script"),It(_),cn(_,"link",a),u.head.appendChild(_)),_={type:"script",instance:_,count:1,state:null},m.set(x,_))}}function BO(a,s,u,m){var x=(x=ge.current)?xh(x):null;if(!x)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=Ws(u.href),u=ra(x).hoistableStyles,m=u.get(s),m||(m={type:"style",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=Ws(u.href);var _=ra(x).hoistableStyles,M=_.get(a);if(M||(x=x.ownerDocument||x,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},_.set(a,M),(_=x.querySelector(cu(a)))&&!_._p&&(M.instance=_,M.state.loading=5),ar.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},ar.set(a,u),_||mB(x,a,u,M.state))),s&&m===null)throw Error(r(528,""));return M}if(s&&m!==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=Qs(u),u=ra(x).hoistableScripts,m=u.get(s),m||(m={type:"script",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Ws(a){return'href="'+Nn(a)+'"'}function cu(a){return'link[rel="stylesheet"]['+a+"]"}function zO(a){return p({},a,{"data-precedence":a.precedence,precedence:null})}function mB(a,s,u,m){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=a.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),cn(s,"link",u),It(s),a.head.appendChild(s))}function Qs(a){return'[src="'+Nn(a)+'"]'}function uu(a){return"script[async]"+a}function HO(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var m=a.querySelector('style[data-href~="'+Nn(u.href)+'"]');if(m)return s.instance=m,It(m),m;var x=p({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),It(m),cn(m,"style",x),bh(m,u.precedence,a),s.instance=m;case"stylesheet":x=Ws(u.href);var _=a.querySelector(cu(x));if(_)return s.state.loading|=4,s.instance=_,It(_),_;m=zO(u),(x=ar.get(x))&&K0(m,x),_=(a.ownerDocument||a).createElement("link"),It(_);var M=_;return M._p=new Promise(function(B,X){M.onload=B,M.onerror=X}),cn(_,"link",m),s.state.loading|=4,bh(_,u.precedence,a),s.instance=_;case"script":return _=Qs(u.src),(x=a.querySelector(uu(_)))?(s.instance=x,It(x),x):(m=u,(x=ar.get(_))&&(m=p({},u),W0(m,x)),a=a.ownerDocument||a,x=a.createElement("script"),It(x),cn(x,"link",m),a.head.appendChild(x),s.instance=x);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,bh(m,u.precedence,a));return s.instance}function bh(a,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=m.length?m[m.length-1]:null,_=x,M=0;M<m.length;M++){var B=m[M];if(B.dataset.precedence===s)_=B;else if(_!==x)break}_?_.parentNode.insertBefore(a,_.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function K0(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function W0(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var wh=null;function UO(a,s,u){if(wh===null){var m=new Map,x=wh=new Map;x.set(u,m)}else x=wh,m=x.get(u),m||(m=new Map,x.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),x=0;x<u.length;x++){var _=u[x];if(!(_[so]||_[Ft]||a==="link"&&_.getAttribute("rel")==="stylesheet")&&_.namespaceURI!=="http://www.w3.org/2000/svg"){var M=_.getAttribute(s)||"";M=a+M;var B=m.get(M);B?B.push(_):m.set(M,[_])}}return m}function GO(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function yB(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 VO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function gB(a,s,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=Ws(m.href),_=s.querySelector(cu(x));if(_){s=_._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Sh.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=_,It(_);return}_=s.ownerDocument||s,m=zO(m),(x=ar.get(x))&&K0(m,x),_=_.createElement("link"),It(_);var M=_;M._p=new Promise(function(B,X){M.onload=B,M.onerror=X}),cn(_,"link",m),u.instance=_}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Sh.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var Q0=0;function vB(a,s){return a.stylesheets&&a.count===0&&jh(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&jh(a,a.stylesheets),a.unsuspend){var _=a.unsuspend;a.unsuspend=null,_()}},6e4+s);0<a.imgBytes&&Q0===0&&(Q0=62500*Zq());var x=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&jh(a,a.stylesheets),a.unsuspend)){var _=a.unsuspend;a.unsuspend=null,_()}},(a.imgBytes>Q0?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(x)}}:null}function Sh(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)jh(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var _h=null;function jh(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,_h=new Map,s.forEach(xB,a),_h=null,Sh.call(a))}function xB(a,s){if(!(s.state.loading&4)){var u=_h.get(a);if(u)var m=u.get(null);else{u=new Map,_h.set(a,u);for(var x=a.querySelectorAll("link[data-precedence],style[data-precedence]"),_=0;_<x.length;_++){var M=x[_];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),m=M)}m&&u.set(null,m)}x=s.instance,M=x.getAttribute("data-precedence"),_=u.get(M)||m,_===m&&u.set(null,x),u.set(M,x),this.count++,m=Sh.bind(this),x.addEventListener("load",m),x.addEventListener("error",m),_?_.parentNode.insertBefore(x,_.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(x,a.firstChild)),s.state.loading|=4}}var fu={$$typeof:N,Provider:null,Consumer:null,_currentValue:H,_currentValue2:H,_threadCount:0};function bB(a,s,u,m,x,_,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=Sc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sc(0),this.hiddenUpdates=Sc(null),this.identifierPrefix=m,this.onUncaughtError=x,this.onCaughtError=_,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function FO(a,s,u,m,x,_,M,B,X,oe,ue,me){return a=new bB(a,s,u,M,X,oe,ue,me,B),s=1,_===!0&&(s|=24),_=In(3,null,null,s),a.current=_,_.stateNode=a,s=Cg(),s.refCount++,a.pooledCache=s,s.refCount++,_.memoizedState={element:m,isDehydrated:u,cache:s},Pg(_),a}function YO(a){return a?(a=Es,a):Es}function XO(a,s,u,m,x,_){x=YO(x),m.context===null?m.context=x:m.pendingContext=x,m=da(s),m.payload={element:u},_=_===void 0?null:_,_!==null&&(m.callback=_),u=ha(a,m,s),u!==null&&(kn(u,a,s),Uc(u,a,s))}function KO(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function Z0(a,s){KO(a,s),(a=a.alternate)&&KO(a,s)}function WO(a){if(a.tag===13||a.tag===31){var s=po(a,67108864);s!==null&&kn(s,a,67108864),Z0(a,67108864)}}function QO(a){if(a.tag===13||a.tag===31){var s=Hn();s=_c(s);var u=po(a,s);u!==null&&kn(u,a,s),Z0(a,s)}}var Ah=!0;function wB(a,s,u,m){var x=k.T;k.T=null;var _=z.p;try{z.p=2,J0(a,s,u,m)}finally{z.p=_,k.T=x}}function SB(a,s,u,m){var x=k.T;k.T=null;var _=z.p;try{z.p=8,J0(a,s,u,m)}finally{z.p=_,k.T=x}}function J0(a,s,u,m){if(Ah){var x=ev(m);if(x===null)q0(a,s,m,Nh,u),JO(a,m);else if(jB(x,a,s,u,m))m.stopPropagation();else if(JO(a,m),s&4&&-1<_B.indexOf(a)){for(;x!==null;){var _=ta(x);if(_!==null)switch(_.tag){case 3:if(_=_.stateNode,_.current.memoizedState.isDehydrated){var M=si(_.pendingLanes);if(M!==0){var B=_;for(B.pendingLanes|=2,B.entangledLanes|=2;M;){var X=1<<31-xn(M);B.entanglements[1]|=X,M&=~X}Ur(_),(tt&6)===0&&(lh=nt()+500,au(0))}}break;case 31:case 13:B=po(_,2),B!==null&&kn(B,_,2),uh(),Z0(_,2)}if(_=ev(m),_===null&&q0(a,s,m,Nh,u),_===x)break;x=_}x!==null&&m.stopPropagation()}else q0(a,s,m,null,u)}}function ev(a){return a=ng(a),tv(a)}var Nh=null;function tv(a){if(Nh=null,a=ea(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 Nh=a,null}function ZO(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(gr()){case Qn:return 2;case At:return 8;case Dn:case bc:return 32;case oi:return 268435456;default:return 32}default:return 32}}var nv=!1,ja=null,Aa=null,Na=null,du=new Map,hu=new Map,Oa=[],_B="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 JO(a,s){switch(a){case"focusin":case"focusout":ja=null;break;case"dragenter":case"dragleave":Aa=null;break;case"mouseover":case"mouseout":Na=null;break;case"pointerover":case"pointerout":du.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hu.delete(s.pointerId)}}function pu(a,s,u,m,x,_){return a===null||a.nativeEvent!==_?(a={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:_,targetContainers:[x]},s!==null&&(s=ta(s),s!==null&&WO(s)),a):(a.eventSystemFlags|=m,s=a.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),a)}function jB(a,s,u,m,x){switch(s){case"focusin":return ja=pu(ja,a,s,u,m,x),!0;case"dragenter":return Aa=pu(Aa,a,s,u,m,x),!0;case"mouseover":return Na=pu(Na,a,s,u,m,x),!0;case"pointerover":var _=x.pointerId;return du.set(_,pu(du.get(_)||null,a,s,u,m,x)),!0;case"gotpointercapture":return _=x.pointerId,hu.set(_,pu(hu.get(_)||null,a,s,u,m,x)),!0}return!1}function eE(a){var s=ea(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,pd(a.priority,function(){QO(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,pd(a.priority,function(){QO(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 Oh(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=ev(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);tg=m,u.target.dispatchEvent(m),tg=null}else return s=ta(u),s!==null&&WO(s),a.blockedOn=u,!1;s.shift()}return!0}function tE(a,s,u){Oh(a)&&u.delete(s)}function AB(){nv=!1,ja!==null&&Oh(ja)&&(ja=null),Aa!==null&&Oh(Aa)&&(Aa=null),Na!==null&&Oh(Na)&&(Na=null),du.forEach(tE),hu.forEach(tE)}function Eh(a,s){a.blockedOn===s&&(a.blockedOn=null,nv||(nv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,AB)))}var Th=null;function nE(a){Th!==a&&(Th=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Th===a&&(Th=null);for(var s=0;s<a.length;s+=3){var u=a[s],m=a[s+1],x=a[s+2];if(typeof m!="function"){if(tv(m||u)===null)continue;break}var _=ta(u);_!==null&&(a.splice(s,3),s-=3,e0(_,{pending:!0,data:x,method:u.method,action:m},m,x))}}))}function Zs(a){function s(X){return Eh(X,a)}ja!==null&&Eh(ja,a),Aa!==null&&Eh(Aa,a),Na!==null&&Eh(Na,a),du.forEach(s),hu.forEach(s);for(var u=0;u<Oa.length;u++){var m=Oa[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<Oa.length&&(u=Oa[0],u.blockedOn===null);)eE(u),u.blockedOn===null&&Oa.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var x=u[m],_=u[m+1],M=x[dn]||null;if(typeof _=="function")M||nE(u);else if(M){var B=null;if(_&&_.hasAttribute("formAction")){if(x=_,M=_[dn]||null)B=M.formAction;else if(tv(x)!==null)continue}else B=M.action;typeof B=="function"?u[m+1]=B:(u.splice(m,3),m-=3),nE(u)}}}function rE(){function a(_){_.canIntercept&&_.info==="react-transition"&&_.intercept({handler:function(){return new Promise(function(M){return x=M})},focusReset:"manual",scroll:"manual"})}function s(){x!==null&&(x(),x=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var _=navigation.currentEntry;_&&_.url!=null&&navigation.navigate(_.url,{state:_.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,x=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),x!==null&&(x(),x=null)}}}function rv(a){this._internalRoot=a}Ch.prototype.render=rv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,m=Hn();XO(u,m,a,s,null,null)},Ch.prototype.unmount=rv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;XO(a.current,2,null,a,null,null),uh(),s[li]=null}};function Ch(a){this._internalRoot=a}Ch.prototype.unstable_scheduleHydration=function(a){if(a){var s=hd();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Oa.length&&s!==0&&s<Oa[u].priority;u++);Oa.splice(u,0,a),u===0&&eE(a)}};var iE=t.version;if(iE!=="19.2.6")throw Error(r(527,iE,"19.2.6"));z.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 NB={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mh.isDisabled&&Mh.supportsFiber)try{io=Mh.inject(NB),vn=Mh}catch{}}return yu.createRoot=function(a,s){if(!i(a))throw Error(r(299));var u=!1,m="",x=fN,_=dN,M=hN;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(_=s.onCaughtError),s.onRecoverableError!==void 0&&(M=s.onRecoverableError)),s=FO(a,1,!1,null,null,u,m,null,x,_,M,rE),a[li]=s.current,L0(a),new rv(s)},yu.hydrateRoot=function(a,s,u){if(!i(a))throw Error(r(299));var m=!1,x="",_=fN,M=dN,B=hN,X=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(_=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(B=u.onRecoverableError),u.formState!==void 0&&(X=u.formState)),s=FO(a,1,!0,s,u??null,m,x,X,_,M,B,rE),s.context=YO(null),u=s.current,m=Hn(),m=_c(m),x=da(m),x.callback=null,ha(u,x,m),u=m,s.current.lanes=u,oo(s,u),Ur(s),a[li]=s.current,L0(a),new Ch(s)},yu.version="19.2.6",yu}var mE;function DB(){if(mE)return sv.exports;mE=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(),sv.exports=PB(),sv.exports}var $B=DB(),Rm=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(){}},Bo,Ba,wl,eP,IB=(eP=class extends Rm{constructor(){super();Xe(this,Bo);Xe(this,Ba);Xe(this,wl);Re(this,wl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){fe(this,Ba)||this.setEventListener(fe(this,wl))}onUnsubscribe(){var t;this.hasListeners()||((t=fe(this,Ba))==null||t.call(this),Re(this,Ba,void 0))}setEventListener(t){var n;Re(this,wl,t),(n=fe(this,Ba))==null||n.call(this),Re(this,Ba,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){fe(this,Bo)!==t&&(Re(this,Bo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof fe(this,Bo)=="boolean"?fe(this,Bo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Bo=new WeakMap,Ba=new WeakMap,wl=new WeakMap,eP),uP=new IB,LB={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},za,M_,tP,qB=(tP=class{constructor(){Xe(this,za,LB);Xe(this,M_,!1)}setTimeoutProvider(e){Re(this,za,e)}setTimeout(e,t){return fe(this,za).setTimeout(e,t)}clearTimeout(e){fe(this,za).clearTimeout(e)}setInterval(e,t){return fe(this,za).setInterval(e,t)}clearInterval(e){fe(this,za).clearInterval(e)}},za=new WeakMap,M_=new WeakMap,tP),Lw=new qB;function BB(e){setTimeout(e,0)}var zB=typeof window>"u"||"Deno"in globalThis;function _r(){}function HB(e,t){return typeof e=="function"?e(t):e}function UB(e){return typeof e=="number"&&e>=0&&e!==1/0}function GB(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qw(e,t){return typeof e=="function"?e(t):e}function VB(e,t){return typeof e=="function"?e(t):e}function yE(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:c}=e;if(l){if(r){if(t.queryHash!==k_(l,t.options))return!1}else if(!Wu(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 gE(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Ku(t.options.mutationKey)!==Ku(o))return!1}else if(!Wu(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function k_(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ku)(e)}function Ku(e){return JSON.stringify(e,(t,n)=>Bw(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Wu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Wu(e[n],t[n])):!1}var FB=Object.prototype.hasOwnProperty;function fP(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=vE(e)&&vE(t);if(!r&&!(Bw(e)&&Bw(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],v=t[p];if(g===v){f[p]=g,(r?y<o:FB.call(e,p))&&d++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){f[p]=v;continue}const w=fP(g,v,n+1);f[p]=w,w===g&&d++}return o===c&&d===o?e:f}function vE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Bw(e){if(!xE(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!xE(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xE(e){return Object.prototype.toString.call(e)==="[object Object]"}function YB(e){return new Promise(t=>{Lw.setTimeout(t,e)})}function XB(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?fP(e,t):t}function KB(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function WB(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var R_=Symbol();function dP(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===R_?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function QB(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 hP=(()=>{let e=()=>zB;return{isServer(){return e()},setIsServer(t){e=t}}})();function ZB(){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 JB=BB;function ez(){let e=[],t=0,n=c=>{c()},r=c=>{c()},i=JB;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 wn=ez(),Sl,Ha,_l,nP,tz=(nP=class extends Rm{constructor(){super();Xe(this,Sl,!0);Xe(this,Ha);Xe(this,_l);Re(this,_l,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){fe(this,Ha)||this.setEventListener(fe(this,_l))}onUnsubscribe(){var t;this.hasListeners()||((t=fe(this,Ha))==null||t.call(this),Re(this,Ha,void 0))}setEventListener(t){var n;Re(this,_l,t),(n=fe(this,Ha))==null||n.call(this),Re(this,Ha,t(this.setOnline.bind(this)))}setOnline(t){fe(this,Sl)!==t&&(Re(this,Sl,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return fe(this,Sl)}},Sl=new WeakMap,Ha=new WeakMap,_l=new WeakMap,nP),wp=new tz;function nz(e){return Math.min(1e3*2**e,3e4)}function pP(e){return(e??"online")==="online"?wp.isOnline():!0}var zw=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function mP(e){let t=!1,n=0,r;const i=ZB(),o=()=>i.status!=="pending",l=S=>{var b;if(!o()){const j=new zw(S);g(j),(b=e.onCancel)==null||b.call(e,j)}},c=()=>{t=!0},f=()=>{t=!1},d=()=>uP.isFocused()&&(e.networkMode==="always"||wp.isOnline())&&e.canRun(),y=()=>pP(e.networkMode)&&e.canRun(),p=S=>{o()||(r==null||r(),i.resolve(S))},g=S=>{o()||(r==null||r(),i.reject(S))},v=()=>new Promise(S=>{var b;r=j=>{(o()||d())&&S(j)},(b=e.onPause)==null||b.call(e)}).then(()=>{var S;r=void 0,o()||(S=e.onContinue)==null||S.call(e)}),w=()=>{if(o())return;let S;const b=n===0?e.initialPromise:void 0;try{S=b??e.fn()}catch(j){S=Promise.reject(j)}Promise.resolve(S).then(p).catch(j=>{var A;if(o())return;const T=e.retry??(hP.isServer()?0:3),N=e.retryDelay??nz,E=typeof N=="function"?N(n,j):N,O=T===!0||typeof T=="number"&&n<T||typeof T=="function"&&T(n,j);if(t||!O){g(j);return}n++,(A=e.onFail)==null||A.call(e,n,j),YB(E).then(()=>d()?void 0:v()).then(()=>{t?g(j):w()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(r==null||r(),i),cancelRetry:c,continueRetry:f,canStart:y,start:()=>(y()?w():v().then(w),i)}}var zo,rP,yP=(rP=class{constructor(){Xe(this,zo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),UB(this.gcTime)&&Re(this,zo,Lw.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(hP.isServer()?1/0:300*1e3))}clearGcTimeout(){fe(this,zo)!==void 0&&(Lw.clearTimeout(fe(this,zo)),Re(this,zo,void 0))}},zo=new WeakMap,rP);function rz(e){return{onFetch:(t,n)=>{var y,p,g,v,w;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=((v=t.state.data)==null?void 0:v.pages)||[],l=((w=t.state.data)==null?void 0:w.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const d=async()=>{let S=!1;const b=N=>{QB(N,()=>t.signal,()=>S=!0)},j=dP(t.options,t.fetchOptions),T=async(N,E,O)=>{if(S)return Promise.reject(t.signal.reason);if(E==null&&N.pages.length)return Promise.resolve(N);const C=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:E,direction:O?"backward":"forward",meta:t.options.meta};return b(I),I})(),R=await j(C),{maxPages:D}=t.options,G=O?WB:KB;return{pages:G(N.pages,R,D),pageParams:G(N.pageParams,E,D)}};if(i&&o.length){const N=i==="backward",E=N?iz:bE,O={pages:o,pageParams:l},A=E(r,O);c=await T(O,A,N)}else{const N=e??o.length;do{const E=f===0?l[0]??r.initialPageParam:bE(r,c);if(f>0&&E==null)break;c=await T(c,E),f++}while(f<N)}return c};t.options.persister?t.fetchFn=()=>{var S,b;return(b=(S=t.options).persister)==null?void 0:b.call(S,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function bE(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 iz(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 jl,Ho,Al,cr,Uo,tn,Gf,Go,Vn,gP,Mi,iP,az=(iP=class extends yP{constructor(t){super();Xe(this,Vn);Xe(this,jl);Xe(this,Ho);Xe(this,Al);Xe(this,cr);Xe(this,Uo);Xe(this,tn);Xe(this,Gf);Xe(this,Go);Re(this,Go,!1),Re(this,Gf,t.defaultOptions),this.setOptions(t.options),this.observers=[],Re(this,Uo,t.client),Re(this,cr,fe(this,Uo).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Re(this,Ho,SE(this.options)),this.state=t.state??fe(this,Ho),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return fe(this,jl)}get promise(){var t;return(t=fe(this,tn))==null?void 0:t.promise}setOptions(t){if(this.options={...fe(this,Gf),...t},t!=null&&t._type&&Re(this,jl,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=SE(this.options);n.data!==void 0&&(this.setState(wE(n.data,n.dataUpdatedAt)),Re(this,Ho,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&fe(this,cr).remove(this)}setData(t,n){const r=XB(this.state.data,t,this.options);return un(this,Vn,Mi).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t){un(this,Vn,Mi).call(this,{type:"setState",state:t})}cancel(t){var r,i;const n=(r=fe(this,tn))==null?void 0:r.promise;return(i=fe(this,tn))==null||i.cancel(t),n?n.then(_r).catch(_r):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return fe(this,Ho)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>VB(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===R_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>qw(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:!GB(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=fe(this,tn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=fe(this,tn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),fe(this,cr).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(fe(this,tn)&&(fe(this,Go)||un(this,Vn,gP).call(this)?fe(this,tn).cancel({revert:!0}):fe(this,tn).cancelRetry()),this.scheduleGc()),fe(this,cr).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||un(this,Vn,Mi).call(this,{type:"invalidate"})}async fetch(t,n){var d,y,p,g,v,w,S,b,j,T,N;if(this.state.fetchStatus!=="idle"&&((d=fe(this,tn))==null?void 0:d.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(fe(this,tn))return fe(this,tn).continueRetry(),fe(this,tn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(O=>O.options.queryFn);E&&this.setOptions(E.options)}const r=new AbortController,i=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Re(this,Go,!0),r.signal)})},o=()=>{const E=dP(this.options,n),A=(()=>{const C={client:fe(this,Uo),queryKey:this.queryKey,meta:this.meta};return i(C),C})();return Re(this,Go,!1),this.options.persister?this.options.persister(E,A,this):E(A)},c=(()=>{const E={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:fe(this,Uo),state:this.state,fetchFn:o};return i(E),E})(),f=fe(this,jl)==="infinite"?rz(this.options.pages):this.options.behavior;f==null||f.onFetch(c,this),Re(this,Al,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=c.fetchOptions)==null?void 0:y.meta))&&un(this,Vn,Mi).call(this,{type:"fetch",meta:(p=c.fetchOptions)==null?void 0:p.meta}),Re(this,tn,mP({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:E=>{E instanceof zw&&E.revert&&this.setState({...fe(this,Al),fetchStatus:"idle"}),r.abort()},onFail:(E,O)=>{un(this,Vn,Mi).call(this,{type:"failed",failureCount:E,error:O})},onPause:()=>{un(this,Vn,Mi).call(this,{type:"pause"})},onContinue:()=>{un(this,Vn,Mi).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const E=await fe(this,tn).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(v=(g=fe(this,cr).config).onSuccess)==null||v.call(g,E,this),(S=(w=fe(this,cr).config).onSettled)==null||S.call(w,E,this.state.error,this),E}catch(E){if(E instanceof zw){if(E.silent)return fe(this,tn).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw un(this,Vn,Mi).call(this,{type:"error",error:E}),(j=(b=fe(this,cr).config).onError)==null||j.call(b,E,this),(N=(T=fe(this,cr).config).onSettled)==null||N.call(T,this.state.data,E,this),E}finally{this.scheduleGc()}}},jl=new WeakMap,Ho=new WeakMap,Al=new WeakMap,cr=new WeakMap,Uo=new WeakMap,tn=new WeakMap,Gf=new WeakMap,Go=new WeakMap,Vn=new WeakSet,gP=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Mi=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,...oz(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...wE(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Re(this,Al,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),wn.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),fe(this,cr).notify({query:this,type:"updated",action:t})})},iP);function oz(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pP(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wE(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function SE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Vf,Vr,pn,Vo,Fr,Da,aP,sz=(aP=class extends yP{constructor(t){super();Xe(this,Fr);Xe(this,Vf);Xe(this,Vr);Xe(this,pn);Xe(this,Vo);Re(this,Vf,t.client),this.mutationId=t.mutationId,Re(this,pn,t.mutationCache),Re(this,Vr,[]),this.state=t.state||lz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){fe(this,Vr).includes(t)||(fe(this,Vr).push(t),this.clearGcTimeout(),fe(this,pn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Re(this,Vr,fe(this,Vr).filter(n=>n!==t)),this.scheduleGc(),fe(this,pn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){fe(this,Vr).length||(this.state.status==="pending"?this.scheduleGc():fe(this,pn).remove(this))}continue(){var t;return((t=fe(this,Vo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,f,d,y,p,g,v,w,S,b,j,T,N,E,O,A,C;const n=()=>{un(this,Fr,Da).call(this,{type:"continue"})},r={client:fe(this,Vf),meta:this.options.meta,mutationKey:this.options.mutationKey};Re(this,Vo,mP({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(R,D)=>{un(this,Fr,Da).call(this,{type:"failed",failureCount:R,error:D})},onPause:()=>{un(this,Fr,Da).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>fe(this,pn).canRun(this)}));const i=this.state.status==="pending",o=!fe(this,Vo).canStart();try{if(i)n();else{un(this,Fr,Da).call(this,{type:"pending",variables:t,isPaused:o}),fe(this,pn).config.onMutate&&await fe(this,pn).config.onMutate(t,this,r);const D=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,r));D!==this.state.context&&un(this,Fr,Da).call(this,{type:"pending",context:D,variables:t,isPaused:o})}const R=await fe(this,Vo).start();return await((d=(f=fe(this,pn).config).onSuccess)==null?void 0:d.call(f,R,t,this.state.context,this,r)),await((p=(y=this.options).onSuccess)==null?void 0:p.call(y,R,t,this.state.context,r)),await((v=(g=fe(this,pn).config).onSettled)==null?void 0:v.call(g,R,null,this.state.variables,this.state.context,this,r)),await((S=(w=this.options).onSettled)==null?void 0:S.call(w,R,null,t,this.state.context,r)),un(this,Fr,Da).call(this,{type:"success",data:R}),R}catch(R){try{await((j=(b=fe(this,pn).config).onError)==null?void 0:j.call(b,R,t,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((N=(T=this.options).onError)==null?void 0:N.call(T,R,t,this.state.context,r))}catch(D){Promise.reject(D)}try{await((O=(E=fe(this,pn).config).onSettled)==null?void 0:O.call(E,void 0,R,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(A=this.options).onSettled)==null?void 0:C.call(A,void 0,R,t,this.state.context,r))}catch(D){Promise.reject(D)}throw un(this,Fr,Da).call(this,{type:"error",error:R}),R}finally{fe(this,pn).runNext(this)}}},Vf=new WeakMap,Vr=new WeakMap,pn=new WeakMap,Vo=new WeakMap,Fr=new WeakSet,Da=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),wn.batch(()=>{fe(this,Vr).forEach(r=>{r.onMutationUpdate(t)}),fe(this,pn).notify({mutation:this,type:"updated",action:t})})},aP);function lz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ri,jr,Ff,oP,cz=(oP=class extends Rm{constructor(t={}){super();Xe(this,Ri);Xe(this,jr);Xe(this,Ff);this.config=t,Re(this,Ri,new Set),Re(this,jr,new Map),Re(this,Ff,0)}build(t,n,r){const i=new sz({client:t,mutationCache:this,mutationId:++kh(this,Ff)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){fe(this,Ri).add(t);const n=Ph(t);if(typeof n=="string"){const r=fe(this,jr).get(n);r?r.push(t):fe(this,jr).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(fe(this,Ri).delete(t)){const n=Ph(t);if(typeof n=="string"){const r=fe(this,jr).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&fe(this,jr).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ph(t);if(typeof n=="string"){const r=fe(this,jr).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=Ph(t);if(typeof n=="string"){const i=(r=fe(this,jr).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(){wn.batch(()=>{fe(this,Ri).forEach(t=>{this.notify({type:"removed",mutation:t})}),fe(this,Ri).clear(),fe(this,jr).clear()})}getAll(){return Array.from(fe(this,Ri))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>gE(n,r))}findAll(t={}){return this.getAll().filter(n=>gE(t,n))}notify(t){wn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return wn.batch(()=>Promise.all(t.map(n=>n.continue().catch(_r))))}},Ri=new WeakMap,jr=new WeakMap,Ff=new WeakMap,oP);function Ph(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Yr,sP,uz=(sP=class extends Rm{constructor(t={}){super();Xe(this,Yr);this.config=t,Re(this,Yr,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??k_(i,n);let l=this.get(o);return l||(l=new az({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){fe(this,Yr).has(t.queryHash)||(fe(this,Yr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=fe(this,Yr).get(t.queryHash);n&&(t.destroy(),n===t&&fe(this,Yr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){wn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return fe(this,Yr).get(t)}getAll(){return[...fe(this,Yr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yE(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>yE(t,r)):n}notify(t){wn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){wn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){wn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yr=new WeakMap,sP),kt,Ua,Ga,Nl,Ol,Va,El,Tl,lP,fz=(lP=class{constructor(e={}){Xe(this,kt);Xe(this,Ua);Xe(this,Ga);Xe(this,Nl);Xe(this,Ol);Xe(this,Va);Xe(this,El);Xe(this,Tl);Re(this,kt,e.queryCache||new uz),Re(this,Ua,e.mutationCache||new cz),Re(this,Ga,e.defaultOptions||{}),Re(this,Nl,new Map),Re(this,Ol,new Map),Re(this,Va,0)}mount(){kh(this,Va)._++,fe(this,Va)===1&&(Re(this,El,uP.subscribe(async e=>{e&&(await this.resumePausedMutations(),fe(this,kt).onFocus())})),Re(this,Tl,wp.subscribe(async e=>{e&&(await this.resumePausedMutations(),fe(this,kt).onOnline())})))}unmount(){var e,t;kh(this,Va)._--,fe(this,Va)===0&&((e=fe(this,El))==null||e.call(this),Re(this,El,void 0),(t=fe(this,Tl))==null||t.call(this),Re(this,Tl,void 0))}isFetching(e){return fe(this,kt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return fe(this,Ua).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=fe(this,kt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=fe(this,kt).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qw(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return fe(this,kt).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=fe(this,kt).get(r.queryHash),o=i==null?void 0:i.state.data,l=HB(t,o);if(l!==void 0)return fe(this,kt).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return wn.batch(()=>fe(this,kt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=fe(this,kt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=fe(this,kt);wn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=fe(this,kt);return wn.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=wn.batch(()=>fe(this,kt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(_r).catch(_r)}invalidateQueries(e,t={}){return wn.batch(()=>(fe(this,kt).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=wn.batch(()=>fe(this,kt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(_r)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(_r)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=fe(this,kt).build(this,t);return n.isStaleByTime(qw(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_r).catch(_r)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_r).catch(_r)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return wp.isOnline()?fe(this,Ua).resumePausedMutations():Promise.resolve()}getQueryCache(){return fe(this,kt)}getMutationCache(){return fe(this,Ua)}getDefaultOptions(){return fe(this,Ga)}setDefaultOptions(e){Re(this,Ga,e)}setQueryDefaults(e,t){fe(this,Nl).set(Ku(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...fe(this,Nl).values()],n={};return t.forEach(r=>{Wu(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){fe(this,Ol).set(Ku(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...fe(this,Ol).values()],n={};return t.forEach(r=>{Wu(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...fe(this,Ga).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=k_(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===R_&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...fe(this,Ga).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){fe(this,kt).clear(),fe(this,Ua).clear()}},kt=new WeakMap,Ua=new WeakMap,Ga=new WeakMap,Nl=new WeakMap,Ol=new WeakMap,Va=new WeakMap,El=new WeakMap,Tl=new WeakMap,lP),dz=$.createContext(void 0),hz=({client:e,children:t})=>($.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(dz.Provider,{value:e,children:t}));const _E=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(v=>v(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},pz=(e=>e?_E(e):_E),mz=e=>e;function yz(e,t=mz){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 jE=e=>{const t=pz(e),n=r=>yz(t,r);return Object.assign(n,t),n},vP=(e=>e?jE(e):jE),xP="expressots.studio.settings.v1",AE={vscode:"Visual Studio Code",cursor:"Cursor",webstorm:"WebStorm",idea:"IntelliJ IDEA",sublime:"Sublime Text",custom:"Custom…"},al={agentUrl:"ws://localhost:3334",editorScheme:"cursor",customEditorPrefix:"vscode://file",recordOnLaunch:!0,maxExchanges:100,maxLogBuffer:1e3,defaultView:"status",defaultSidebarOpen:!0,defaultAutoScroll:!0,defaultLogLevels:["log","info","warn","error","debug"]},NE={defaultViewStatus:"expressots.studio.settings.migrated.defaultViewStatus"};function gz(){if(typeof window>"u"||!window.localStorage)return al;try{const e=window.localStorage.getItem(xP);if(!e)return al;const t=JSON.parse(e),n={...al,...t};return window.localStorage.getItem(NE.defaultViewStatus)==="1"||(n.defaultView==="requests"&&(n.defaultView="status"),window.localStorage.setItem(NE.defaultViewStatus,"1")),n}catch{return al}}function OE(e){if(!(typeof window>"u"||!window.localStorage))try{window.localStorage.setItem(xP,JSON.stringify(e))}catch{}}const P_=vP((e,t)=>({...gz(),update:n=>{e(n);const{update:r,reset:i,...o}=t();OE(o)},reset:()=>{e({...al}),OE(al)}})),EE=1e3;function bP(){const e=P_.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,databaseSnapshot:null,databaseTableData:null,fixRun:null,logs:[],logsByTraceId:{},logLevelFilter:new Set(e.defaultLogLevels),sidebarOpen:e.defaultSidebarOpen,searchQuery:"",filterMethod:null,filterStatus:"all",pendingApiClientRequest:null,recordingEnabled:!0,autoScroll:e.defaultAutoScroll,lastEventAt:null,agentLatencyMs:null,eventsReceived:0}}const vz=bP(),ht=vP(e=>({...vz,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}),setDatabaseSnapshot:t=>e({databaseSnapshot:t}),setDatabaseTableData:t=>e({databaseTableData: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,EE);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,EE),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}),setPendingApiClientRequest:t=>e({pendingApiClientRequest: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(bP())})),Jr=Object.create(null);Jr.open="0";Jr.close="1";Jr.ping="2";Jr.pong="3";Jr.message="4";Jr.upgrade="5";Jr.noop="6";const fp=Object.create(null);Object.keys(Jr).forEach(e=>{fp[Jr[e]]=e});const Hw={type:"error",data:"parser error"},wP=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",SP=typeof ArrayBuffer=="function",_P=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,D_=({type:e,data:t},n,r)=>wP&&t instanceof Blob?n?r(t):TE(t,r):SP&&(t instanceof ArrayBuffer||_P(t))?n?r(t):TE(new Blob([t]),r):r(Jr[e]+(t||"")),TE=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function CE(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let fv;function xz(e,t){if(wP&&e.data instanceof Blob)return e.data.arrayBuffer().then(CE).then(t);if(SP&&(e.data instanceof ArrayBuffer||_P(e.data)))return t(CE(e.data));D_(e,!1,n=>{fv||(fv=new TextEncoder),t(fv.encode(n))})}const ME="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$u=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<ME.length;e++)$u[ME.charCodeAt(e)]=e;const bz=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=$u[e.charCodeAt(r)],l=$u[e.charCodeAt(r+1)],c=$u[e.charCodeAt(r+2)],f=$u[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},wz=typeof ArrayBuffer=="function",$_=(e,t)=>{if(typeof e!="string")return{type:"message",data:jP(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:Sz(e.substring(1),t)}:fp[n]?e.length>1?{type:fp[n],data:e.substring(1)}:{type:fp[n]}:Hw},Sz=(e,t)=>{if(wz){const n=bz(e);return jP(n,t)}else return{base64:!0,data:e}},jP=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},AP="",_z=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,l)=>{D_(o,!1,c=>{r[l]=c,++i===n&&t(r.join(AP))})})},jz=(e,t)=>{const n=e.split(AP),r=[];for(let i=0;i<n.length;i++){const o=$_(n[i],t);if(r.push(o),o.type==="error")break}return r};function Az(){return new TransformStream({transform(e,t){xz(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 dv;function Dh(e){return e.reduce((t,n)=>t+n.length,0)}function $h(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 Nz(e,t){dv||(dv=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(Dh(n)<1)break;const f=$h(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(Dh(n)<2)break;const f=$h(n,2);i=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),r=3}else if(r===2){if(Dh(n)<8)break;const f=$h(n,8),d=new DataView(f.buffer,f.byteOffset,f.length),y=d.getUint32(0);if(y>Math.pow(2,21)-1){c.enqueue(Hw);break}i=y*Math.pow(2,32)+d.getUint32(4),r=3}else{if(Dh(n)<i)break;const f=$h(n,i);c.enqueue($_(o?f:dv.decode(f),t)),r=0}if(i===0||i>e){c.enqueue(Hw);break}}}})}const NP=4;function Ut(e){if(e)return Oz(e)}function Oz(e){for(var t in Ut.prototype)e[t]=Ut.prototype[t];return e}Ut.prototype.on=Ut.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ut.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ut.prototype.off=Ut.prototype.removeListener=Ut.prototype.removeAllListeners=Ut.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};Ut.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};Ut.prototype.emitReserved=Ut.prototype.emit;Ut.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ut.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Pm=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ur=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ez="arraybuffer";function OP(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const Tz=ur.setTimeout,Cz=ur.clearTimeout;function Dm(e,t){t.useNativeTimers?(e.setTimeoutFn=Tz.bind(ur),e.clearTimeoutFn=Cz.bind(ur)):(e.setTimeoutFn=ur.setTimeout.bind(ur),e.clearTimeoutFn=ur.clearTimeout.bind(ur))}const Mz=1.33;function kz(e){return typeof e=="string"?Rz(e):Math.ceil((e.byteLength||e.size)*Mz)}function Rz(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 EP(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Pz(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Dz(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 $z extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class I_ extends Ut{constructor(t){super(),this.writable=!1,Dm(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 $z(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=$_(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=Pz(t);return n.length?"?"+n:""}}class Iz extends I_{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)};jz(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,_z(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]=EP()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let TP=!1;try{TP=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Lz=TP;function qz(){}class Bz extends Iz{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 Kr extends Ut{constructor(t,n,r){super(),this.createRequest=t,Dm(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=OP(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=Kr.requestsCount++,Kr.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=qz,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Kr.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()}}Kr.requestsCount=0;Kr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",kE);else if(typeof addEventListener=="function"){const e="onpagehide"in ur?"pagehide":"unload";addEventListener(e,kE,!1)}}function kE(){for(let e in Kr.requests)Kr.requests.hasOwnProperty(e)&&Kr.requests[e].abort()}const zz=(function(){const e=CP({xdomain:!1});return e&&e.responseType!==null})();class Hz extends Bz{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=zz&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Kr(CP,this.uri(),t)}}function CP(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Lz))return new XMLHttpRequest}catch{}if(!t)try{return new ur[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const MP=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Uz extends I_{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=MP?{}:OP(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;D_(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&Pm(()=>{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]=EP()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const hv=ur.WebSocket||ur.MozWebSocket;class Gz extends Uz{createSocket(t,n,r){return MP?new hv(t,n,r):n?new hv(t,n):new hv(t)}doWrite(t,n){this.ws.send(n)}}class Vz extends I_{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=Nz(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=Az();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&&Pm(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const Fz={websocket:Gz,webtransport:Vz,polling:Hz},Yz=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Xz=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Uw(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=Yz.exec(e||""),o={},l=14;for(;l--;)o[Xz[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=Kz(o,o.path),o.queryKey=Wz(o,o.query),o}function Kz(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 Wz(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",dp=[];Gw&&addEventListener("offline",()=>{dp.forEach(e=>e())},!1);class Ya extends Ut{constructor(t,n){if(super(),this.binaryType=Ez,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=Uw(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=Uw(n.host).host);Dm(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=Dz(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"})},dp.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=NP,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&&Ya.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",Ya.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+=kz(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,Pm(()=>{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(Ya.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=dp.indexOf(this._offlineEventListener);r!==-1&&dp.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ya.protocol=NP;class Qz extends Ya{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;Ya.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;Ya.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 Zz=class extends Qz{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=>Fz[i]).filter(i=>!!i)),super(t,r)}};function Jz(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=Uw(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 e9=typeof ArrayBuffer=="function",t9=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,kP=Object.prototype.toString,n9=typeof Blob=="function"||typeof Blob<"u"&&kP.call(Blob)==="[object BlobConstructor]",r9=typeof File=="function"||typeof File<"u"&&kP.call(File)==="[object FileConstructor]";function L_(e){return e9&&(e instanceof ArrayBuffer||t9(e))||n9&&e instanceof Blob||r9&&e instanceof File}function hp(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(hp(e[n]))return!0;return!1}if(L_(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return hp(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&hp(e[n]))return!0;return!1}function i9(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(L_(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 a9(e,t){return e.data=Fw(e.data,t),delete e.attachments,e}function Fw(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]=Fw(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Fw(e[n],t));return e}const o9=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var We;(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"})(We||(We={}));class s9{constructor(t){this.replacer=t}encode(t){return(t.type===We.EVENT||t.type===We.ACK)&&hp(t)?this.encodeAsBinary({type:t.type===We.EVENT?We.BINARY_EVENT:We.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===We.BINARY_EVENT||t.type===We.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=i9(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class q_ extends Ut{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}: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===We.BINARY_EVENT;r||n.type===We.BINARY_ACK?(n.type=r?We.EVENT:We.ACK,this.reconstructor=new l9(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(L_(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(We[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===We.BINARY_EVENT||r.type===We.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");const c=Number(l);if(!c9(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}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(q_.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case We.CONNECT:return RE(n);case We.DISCONNECT:return n===void 0;case We.CONNECT_ERROR:return typeof n=="string"||RE(n);case We.EVENT:case We.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&o9.indexOf(n[0])===-1);case We.ACK:case We.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class l9{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=a9(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const c9=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function RE(e){return Object.prototype.toString.call(e)==="[object Object]"}const u9=Object.freeze(Object.defineProperty({__proto__:null,Decoder:q_,Encoder:s9,get PacketType(){return We}},Symbol.toStringTag,{value:"Module"}));function Ar(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const f9=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class RP extends Ut{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=[Ar(t,"open",this.onopen.bind(this)),Ar(t,"packet",this.onpacket.bind(this)),Ar(t,"error",this.onerror.bind(this)),Ar(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(f9.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:We.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:We.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 We.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 We.EVENT:case We.BINARY_EVENT:this.onevent(t);break;case We.ACK:case We.BINARY_ACK:this.onack(t);break;case We.DISCONNECT:this.ondisconnect();break;case We.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:We.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:We.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 uc(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}uc.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};uc.prototype.reset=function(){this.attempts=0};uc.prototype.setMin=function(e){this.ms=e};uc.prototype.setMax=function(e){this.max=e};uc.prototype.setJitter=function(e){this.jitter=e};class Yw extends Ut{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,Dm(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 uc({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||u9;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 Zz(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Ar(n,"open",function(){r.onopen(),t&&t()}),o=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=Ar(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(Ar(t,"ping",this.onping.bind(this)),Ar(t,"data",this.ondata.bind(this)),Ar(t,"error",this.onerror.bind(this)),Ar(t,"close",this.onclose.bind(this)),Ar(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){Pm(()=>{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 RP(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 gu={};function pp(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Jz(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,l=gu[i]&&o in gu[i].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let f;return c?f=new Yw(r,t):(gu[i]||(gu[i]=new Yw(r,t)),f=gu[i]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(pp,{Manager:Yw,Socket:RP,io:pp,connect:pp});const PP=$.createContext(null);function d9({children:e}){const t=$.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:v,setRecordingEnabled:w,markLiveEvent:S,clearExchanges:b,addLog:j,setLogs:T,clearLogs:N,setAgentLatency:E,incrementEventCount:O,setRuntime:A,setSecurityReport:C,setDatabaseSnapshot:R,setDatabaseTableData:D,startFixRun:G,appendFixProgress:I,completeFixRun:L}=ht(),Y=$.useCallback(k=>{var z;switch(O(),k.type){case"routes":i(k.data);break;case"trace":o(k.data);break;case"metrics":l(k.data);break;case"structure":{const H=k.data,F={...H,middleware:Array.isArray(H.middleware)?H.middleware.map(K=>typeof K=="string"?{name:K,filePath:"",dependencies:[],methods:[],scope:"unknown"}:K):[]};c(F);break}case"exchanges":f(k.data);break;case"endpoint_stats":d(k.data);break;case"exchange":break;case"request":{const H=k.data;if(H.request){const F={id:H.request.id,request:H.request,response:{id:"",requestId:H.request.id,traceId:H.request.traceId||"",timestamp:Date.now(),statusCode:H.response.statusCode,statusMessage:H.response.statusCode<400?"OK":"Error",headers:{},duration:H.response.duration}};y(F),S()}break}case"recording_state":w(!!((z=k.data)!=null&&z.enabled));break;case"cleared":b();break;case"replay_result":{const H=k.data;p({...H,replayedAt:Date.now()});break}case"container":g(k.data);break;case"container_resolutions":v(k.data);break;case"log":j(k.data);break;case"logs":T(k.data);break;case"logs_cleared":N();break;case"pong_studio":{const H=k.data;if(H!=null&&H.sentAt){const F=Date.now()-H.sentAt;F>=0&&F<6e4&&E(F)}break}case"runtime":A(k.data);break;case"security":C(k.data);break;case"security_scan_state":break;case"fix_progress":I(k.data);break;case"fix_result":L(k.data);break;case"database":R(k.data);break;case"database_table":D(k.data);break}},[i,o,l,c,f,d,y,p,g,v,w,S,b,j,T,N,E,O,A,C,R,D,I,L]);$.useEffect(()=>{if(t.current)return;const k=pp(n,{transports:["websocket"],reconnection:!0,reconnectionDelay:1e3,reconnectionAttempts:10});t.current=k;let z=null;return k.on("connect",()=>{r(!0),k.emit("get_routes"),k.emit("get_metrics"),k.emit("get_structure"),k.emit("get_exchanges",{limit:100}),k.emit("get_endpoint_stats"),k.emit("get_container"),k.emit("get_logs"),k.emit("get_runtime"),k.emit("get_security_report"),k.emit("get_database_schema");const H=()=>k.emit("ping_studio",{sentAt:Date.now()});H(),z&&clearInterval(z),z=setInterval(H,5e3)}),k.on("disconnect",()=>{r(!1),z&&(clearInterval(z),z=null)}),k.on("connect_error",()=>{r(!1)}),k.on("message",Y),()=>{z&&clearInterval(z),k.disconnect(),t.current=null}},[n,Y,r]);const P=$.useCallback((k,z)=>{var H;(H=t.current)!=null&&H.connected&&t.current.emit(k,z)},[]),U={emit:P,requestRoutes:$.useCallback(()=>P("get_routes"),[P]),requestMetrics:$.useCallback(()=>P("get_metrics"),[P]),requestStructure:$.useCallback(()=>P("get_structure"),[P]),requestExchanges:$.useCallback((k=100,z=0)=>P("get_exchanges",{limit:k,offset:z}),[P]),requestExchange:$.useCallback(k=>P("get_exchange",{id:k}),[P]),searchExchanges:$.useCallback((k,z,H=100)=>P("search_exchanges",{query:k,method:z,limit:H}),[P]),replayRequest:$.useCallback(k=>P("replay",{exchangeId:k}),[P]),rescan:$.useCallback(()=>P("rescan"),[P]),clearRecordings:$.useCallback(()=>P("clear_recordings"),[P]),setRecording:$.useCallback(k=>P("set_recording",{enabled:k}),[P]),requestStats:$.useCallback(()=>P("get_stats"),[P]),requestEndpointStats:$.useCallback(()=>P("get_endpoint_stats"),[P]),requestContainer:$.useCallback(()=>P("get_container"),[P]),requestLogs:$.useCallback(()=>P("get_logs"),[P]),clearLogs:$.useCallback(()=>P("clear_logs"),[P]),requestRuntime:$.useCallback(()=>P("get_runtime"),[P]),requestDatabaseSchema:$.useCallback(()=>P("get_database_schema"),[P]),requestDatabaseTable:$.useCallback((k,z=0,H=50)=>P("get_database_table",{table:k,offset:z,limit:H}),[P]),requestSecurityScan:$.useCallback(()=>P("request_security_scan"),[P]),requestSecurityReport:$.useCallback(()=>P("get_security_report"),[P]),applyFix:$.useCallback(k=>{G(k.targetId,k.command),P("apply_security_fix",{targetKind:k.targetKind,targetId:k.targetId,allowMajor:!!k.allowMajor})},[P,G])};return h.jsx(PP.Provider,{value:U,children:e})}function Yi(){const e=$.useContext(PP);if(!e)throw new Error("useSocket must be used within a SocketProvider");return e}const h9=[{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 PE(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return!!(t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable)}function p9(){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 m9({onToggleHelp:e,onCloseAll:t}){const{exchanges:n,selectedExchangeId:r,setSelectedExchangeId:i,setCurrentView:o}=ht();$.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==="?"&&!PE(p.target)){p.preventDefault(),e();return}if(PE(p.target))return;const g=p.metaKey||p.ctrlKey;if(g&&p.key.toLowerCase()==="k"||p.key==="/"){p9()&&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 w={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(w){p.preventDefault(),d(),w();return}d()}if((p.key==="j"||p.key==="k")&&!g&&!p.altKey){if(n.length===0)return;const v=r?n.findIndex(b=>b.id===r):-1;let w;p.key==="j"?w=v<0?0:Math.min(v+1,n.length-1):w=v<=0?0:v-1;const S=n[w];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 DP(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=DP(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=DP(e))&&(r&&(r+=" "),r+=t);return r}const B_="-",y9=e=>{const t=v9(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{const c=l.split(B_);return c[0]===""&&c.length!==1&&c.shift(),$P(c,t)||g9(l)},getConflictingClassGroupIds:(l,c)=>{const f=n[l]||[];return c&&r[l]?[...f,...r[l]]:f}}},$P=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?$P(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(B_);return(l=t.validators.find(({validator:c})=>c(o)))==null?void 0:l.classGroupId},DE=/^\[(.+)\]$/,g9=e=>{if(DE.test(e)){const t=DE.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},v9=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return b9(Object.entries(e.classGroups),n).forEach(([o,l])=>{Xw(l,r,o,t)}),r},Xw=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:$E(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(x9(i)){Xw(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,l])=>{Xw(l,$E(t,o),n,r)})})},$E=(e,t)=>{let n=e;return t.split(B_).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},x9=e=>e.isThemeGetter,b9=(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,w9=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)}}},IP="!",S9=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 b=0;b<c.length;b++){let j=c[b];if(d===0){if(j===i&&(r||c.slice(b,b+o)===t)){f.push(c.slice(y,b)),y=b+o;continue}if(j==="/"){p=b;continue}}j==="["?d++:j==="]"&&d--}const g=f.length===0?c:c.substring(y),v=g.startsWith(IP),w=v?g.substring(1):g,S=p&&p>y?p-y:void 0;return{modifiers:f,hasImportantModifier:v,baseClassName:w,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:l}):l},_9=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},j9=e=>({cache:w9(e.cacheSize),parseClassName:S9(e),...y9(e)}),A9=/\s+/,N9=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],l=e.trim().split(A9);let c="";for(let f=l.length-1;f>=0;f-=1){const d=l[f],{modifiers:y,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:v}=n(d);let w=!!v,S=r(w?g.substring(0,v):g);if(!S){if(!w){c=d+(c.length>0?" "+c:c);continue}if(S=r(g),!S){c=d+(c.length>0?" "+c:c);continue}w=!1}const b=_9(y).join(":"),j=p?b+IP:b,T=j+S;if(o.includes(T))continue;o.push(T);const N=i(S,w);for(let E=0;E<N.length;++E){const O=N[E];o.push(j+O)}c=d+(c.length>0?" "+c:c)}return c};function O9(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=LP(t))&&(r&&(r+=" "),r+=n);return r}const LP=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=LP(e[r]))&&(n&&(n+=" "),n+=t);return n};function E9(e,...t){let n,r,i,o=l;function l(f){const d=t.reduce((y,p)=>p(y),e());return n=j9(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=N9(f,n);return i(f,y),y}return function(){return o(O9.apply(null,arguments))}}const St=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},qP=/^\[(?:([a-z-]+):)?(.+)\]$/i,T9=/^\d+\/\d+$/,C9=new Set(["px","full","screen"]),M9=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,k9=/\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$/,R9=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,P9=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,D9=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ei=e=>pl(e)||C9.has(e)||T9.test(e),Ta=e=>fc(e,"length",U9),pl=e=>!!e&&!Number.isNaN(Number(e)),pv=e=>fc(e,"number",pl),vu=e=>!!e&&Number.isInteger(Number(e)),$9=e=>e.endsWith("%")&&pl(e.slice(0,-1)),qe=e=>qP.test(e),Ca=e=>M9.test(e),I9=new Set(["length","size","percentage"]),L9=e=>fc(e,I9,BP),q9=e=>fc(e,"position",BP),B9=new Set(["image","url"]),z9=e=>fc(e,B9,V9),H9=e=>fc(e,"",G9),xu=()=>!0,fc=(e,t,n)=>{const r=qP.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},U9=e=>k9.test(e)&&!R9.test(e),BP=()=>!1,G9=e=>P9.test(e),V9=e=>D9.test(e),F9=()=>{const e=St("colors"),t=St("spacing"),n=St("blur"),r=St("brightness"),i=St("borderColor"),o=St("borderRadius"),l=St("borderSpacing"),c=St("borderWidth"),f=St("contrast"),d=St("grayscale"),y=St("hueRotate"),p=St("invert"),g=St("gap"),v=St("gradientColorStops"),w=St("gradientColorStopPositions"),S=St("inset"),b=St("margin"),j=St("opacity"),T=St("padding"),N=St("saturate"),E=St("scale"),O=St("sepia"),A=St("skew"),C=St("space"),R=St("translate"),D=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",qe,t],L=()=>[qe,t],Y=()=>["",Ei,Ta],P=()=>["auto",pl,qe],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",qe],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[pl,qe];return{cacheSize:500,separator:":",theme:{colors:[xu],spacing:[Ei,Ta],blur:["none","",Ca,qe],brightness:q(),borderColor:[e],borderRadius:["none","","full",Ca,qe],borderSpacing:L(),borderWidth:Y(),contrast:q(),grayscale:F(),hueRotate:q(),invert:F(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[$9,Ta],inset:I(),margin:I(),opacity:q(),padding:L(),saturate:q(),scale:q(),sepia:F(),skew:q(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",qe]}],container:["container"],columns:[{columns:[Ca]}],"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:[...U(),qe]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],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",vu,qe]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qe]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",vu,qe]}],"grid-cols":[{"grid-cols":[xu]}],"col-start-end":[{col:["auto",{span:["full",vu,qe]},qe]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[xu]}],"row-start-end":[{row:["auto",{span:[vu,qe]},qe]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qe]}],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:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[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",qe,t]}],"min-w":[{"min-w":[qe,t,"min","max","fit"]}],"max-w":[{"max-w":[qe,t,"none","full","min","max","fit","prose",{screen:[Ca]},Ca]}],h:[{h:[qe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ca,Ta]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pv]}],"font-family":[{font:[xu]}],"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",qe]}],"line-clamp":[{"line-clamp":["none",pl,pv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ei,qe]}],"list-image":[{"list-image":["none",qe]}],"list-style-type":[{list:["none","disc","decimal",qe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[j]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ei,Ta]}],"underline-offset":[{"underline-offset":["auto",Ei,qe]}],"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:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe]}],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",qe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[j]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),q9]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",L9]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},z9]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],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":[j]}],"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":[j]}],"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":[Ei,qe]}],"outline-w":[{outline:[Ei,Ta]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[j]}],"ring-offset-w":[{"ring-offset":[Ei,Ta]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ca,H9]}],"shadow-color":[{shadow:[xu]}],opacity:[{opacity:[j]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[f]}],"drop-shadow":[{"drop-shadow":["","none",Ca,qe]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[p]}],saturate:[{saturate:[N]}],sepia:[{sepia:[O]}],"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":[j]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"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",qe]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",qe]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",qe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[vu,qe]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qe]}],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",qe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",qe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ei,Ta,pv]}],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"]}}},Y9=E9(F9);function ve(...e){return Y9(Be(e))}function Xn(e){return e<1?"<1ms":e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(2)}s`:`${(e/6e4).toFixed(2)}m`}function Pi(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 z_(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function zP(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 X9(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 Cl(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 H_(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 K9(e){return e<100?"text-success-500":e<500?"text-warning-500":"text-error-500"}function W9(e){try{return JSON.parse(e)}catch{return e}}async function Qu(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 Q9=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),HP=(...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 Z9={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 J9=$.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...c},f)=>$.createElement("svg",{ref:f,...Z9,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:HP("lucide",i),...c},[...l.map(([d,y])=>$.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 we=(e,t)=>{const n=$.forwardRef(({className:r,...i},o)=>$.createElement(J9,{ref:o,iconNode:t,className:HP(`lucide-${Q9(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 Ko=we("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 UP=we("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 GP=we("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 e7=we("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 t7=we("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 VP=we("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 $m=we("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 FP=we("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 U_=we("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 Im=we("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 Pr=we("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 YP=we("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 ni=we("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 n7=we("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 Xf=we("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 Ml=we("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 G_=we("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 Zu=we("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 r7=we("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
|
|
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 i7=we("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
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 XP=we("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"}]]);/**
|
|
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 ss=we("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"}]]);/**
|
|
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 dc=we("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"}]]);/**
|
|
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 Sp=we("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"}]]);/**
|
|
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 Xa=we("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"}]]);/**
|
|
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 Ju=we("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
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 Lm=we("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"}]]);/**
|
|
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 Xi=we("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"}]]);/**
|
|
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 a7=we("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"}]]);/**
|
|
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 V_=we("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"}]]);/**
|
|
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 KP=we("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
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 o7=we("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);/**
|
|
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 s7=we("Gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);/**
|
|
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 WP=we("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"}]]);/**
|
|
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 l7=we("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"}]]);/**
|
|
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 c7=we("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
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 Kf=we("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
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 u7=we("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
|
|
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 f7=we("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"}]]);/**
|
|
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 qm=we("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"}]]);/**
|
|
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 d7=we("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"}]]);/**
|
|
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 h7=we("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
|
|
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 p7=we("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"}]]);/**
|
|
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 ef=we("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
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 m7=we("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/**
|
|
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 y7=we("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"}]]);/**
|
|
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 g7=we("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
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 v7=we("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"}]]);/**
|
|
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 x7=we("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"}]]);/**
|
|
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 b7=we("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"}]]);/**
|
|
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 w7=we("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"}]]);/**
|
|
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 S7=we("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"}]]);/**
|
|
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 _p=we("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
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 _7=we("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"}]]);/**
|
|
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 F_=we("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 j7=we("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"}]]);/**
|
|
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 Bm=we("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"}]]);/**
|
|
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 A7=we("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"}]]);/**
|
|
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 QP=we("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"}]]);/**
|
|
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 N7=we("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"}]]);/**
|
|
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 Y_=we("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
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 X_=we("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"}]]);/**
|
|
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 IE=we("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"}]]);/**
|
|
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 ZP=we("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"}]]);/**
|
|
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 jp=we("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"}]]);/**
|
|
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 Ja=we("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"}]]);/**
|
|
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 JP=we("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"}]]);/**
|
|
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 K_=we("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"}]]);/**
|
|
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 eD=we("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"}]]);/**
|
|
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 O7=we("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
|
|
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 tD=we("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"}]]);/**
|
|
425
|
+
* @license lucide-react v0.460.0 - ISC
|
|
426
|
+
*
|
|
427
|
+
* This source code is licensed under the ISC license.
|
|
428
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
429
|
+
*/const kl=we("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
430
|
+
* @license lucide-react v0.460.0 - ISC
|
|
431
|
+
*
|
|
432
|
+
* This source code is licensed under the ISC license.
|
|
433
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
434
|
+
*/const Ap=we("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"}]]);/**
|
|
435
|
+
* @license lucide-react v0.460.0 - ISC
|
|
436
|
+
*
|
|
437
|
+
* This source code is licensed under the ISC license.
|
|
438
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
439
|
+
*/const Wr=we("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"}]]);/**
|
|
440
|
+
* @license lucide-react v0.460.0 - ISC
|
|
441
|
+
*
|
|
442
|
+
* This source code is licensed under the ISC license.
|
|
443
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
444
|
+
*/const E7=we("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"}]]);/**
|
|
445
|
+
* @license lucide-react v0.460.0 - ISC
|
|
446
|
+
*
|
|
447
|
+
* This source code is licensed under the ISC license.
|
|
448
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
449
|
+
*/const W_=we("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"}]]);/**
|
|
450
|
+
* @license lucide-react v0.460.0 - ISC
|
|
451
|
+
*
|
|
452
|
+
* This source code is licensed under the ISC license.
|
|
453
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
454
|
+
*/const Q_=we("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"}]]);/**
|
|
455
|
+
* @license lucide-react v0.460.0 - ISC
|
|
456
|
+
*
|
|
457
|
+
* This source code is licensed under the ISC license.
|
|
458
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
459
|
+
*/const Dr=we("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
460
|
+
* @license lucide-react v0.460.0 - ISC
|
|
461
|
+
*
|
|
462
|
+
* This source code is licensed under the ISC license.
|
|
463
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
464
|
+
*/const Z_=we("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"}]]),T7=["log","info","warn","error","debug"],C7=[{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 M7({onClose:e}){const t=P_(),{agentUrl:n,connected:r,setAgentUrl:i,exchanges:o,logs:l}=ht(),[c,f]=$.useState(!1);return h.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[h.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:e}),h.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:[h.jsxs("div",{className:"sticky top-0 bg-gray-900 border-b border-gray-800 p-4 flex items-center justify-between z-10",children:[h.jsx("h2",{className:"text-lg font-semibold text-white",children:"Settings"}),h.jsx("button",{onClick:e,className:"p-2 text-gray-400 hover:text-white hover:bg-gray-800 rounded-lg",children:h.jsx(Dr,{className:"w-5 h-5"})})]}),h.jsxs("div",{className:"divide-y divide-gray-800",children:[h.jsx(bu,{icon:_7,title:"Connection",children:h.jsxs(Oo,{label:"Agent URL",hint:"WebSocket URL of the running Studio Agent.",children:[h.jsxs("div",{className:"flex gap-2",children:[h.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"}),h.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"})]}),h.jsx(k7,{connected:r,liveUrl:n})]})}),h.jsxs(bu,{icon:Xi,title:"Editor",children:[h.jsx(Oo,{label:"Editor scheme",hint:"Used by every Open-in-editor button. Changing this affects all future clicks.",children:h.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(AE).map(d=>h.jsx("option",{value:d,children:AE[d]},d))})}),t.editorScheme==="custom"&&h.jsx(Oo,{label:"Custom URL prefix",hint:'Path and ":<line>:<col>" will be appended. Example: "vscode-insiders://file"',children:h.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"})})]}),h.jsxs(bu,{icon:dc,title:"Recording",children:[h.jsx(mv,{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})}),h.jsx(Oo,{label:"Max retained exchanges",hint:"Older exchanges are dropped from memory once this limit is reached.",children:h.jsx(LE,{value:t.maxExchanges,onChange:d=>t.update({maxExchanges:d}),min:50,max:5e3,step:50})}),h.jsx(Oo,{label:"Max log buffer size",hint:"Older log lines are dropped once this limit is reached.",children:h.jsx(LE,{value:t.maxLogBuffer,onChange:d=>t.update({maxLogBuffer:d}),min:100,max:1e4,step:100})})]}),h.jsxs(bu,{icon:Lm,title:"Display",children:[h.jsx(Oo,{label:"Default view on launch",hint:"Which tab Studio opens to on a fresh page load.",children:h.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:C7.map(d=>h.jsx("option",{value:d.id,children:d.label},d.id))})}),h.jsx(mv,{label:"Sidebar open by default",checked:t.defaultSidebarOpen,onChange:d=>t.update({defaultSidebarOpen:d})}),h.jsx(mv,{label:"Auto-scroll lists by default",hint:"Applies to the Requests and Logs timelines.",checked:t.defaultAutoScroll,onChange:d=>t.update({defaultAutoScroll:d})}),h.jsx(Oo,{label:"Default log levels",hint:"Levels checked here are visible by default in the Logs view.",children:h.jsx("div",{className:"flex flex-wrap gap-2",children:T7.map(d=>{const y=t.defaultLogLevels.includes(d);return h.jsx("button",{onClick:()=>{const p=y?t.defaultLogLevels.filter(g=>g!==d):[...t.defaultLogLevels,d];t.update({defaultLogLevels:p})},className:ve("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)})})})]}),h.jsxs(bu,{icon:Kf,title:"About",children:[h.jsxs("div",{className:"space-y-2 text-sm text-gray-300",children:[h.jsx(wu,{label:"Studio UI",value:R7()}),h.jsx(wu,{label:"Agent",value:r?"connected":"offline",valueClass:r?"text-success-500":"text-error-500"}),h.jsx(wu,{label:"Agent URL",value:n,mono:!0,copy:!0}),h.jsx(wu,{label:"Recorded exchanges",value:`${o.length}`}),h.jsx(wu,{label:"Buffered log lines",value:`${l.length}`})]}),h.jsx("div",{className:"mt-4 pt-4 border-t border-gray-800",children:c?h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Xf,{className:"w-4 h-4 text-warning-500"}),h.jsx("span",{className:"text-sm text-gray-300",children:"Reset all settings to defaults?"}),h.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"}),h.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"})]}):h.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:[h.jsx(QP,{className:"w-3.5 h-3.5"}),"Reset all settings"]})})]})]})]})]})}function bu({icon:e,title:t,children:n}){return h.jsxs("section",{className:"p-5",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[h.jsx(e,{className:"w-4 h-4 text-primary-400"}),h.jsx("h3",{className:"text-sm font-semibold text-gray-300 uppercase tracking-wide",children:t})]}),h.jsx("div",{className:"space-y-4",children:n})]})}function Oo({label:e,hint:t,children:n}){return h.jsxs("div",{children:[h.jsx("label",{className:"block text-sm font-medium text-gray-200 mb-1",children:e}),t&&h.jsx("p",{className:"text-xs text-gray-500 mb-2",children:t}),n]})}function mv({label:e,hint:t,checked:n,onChange:r}){return h.jsxs("label",{className:"flex items-start gap-3 cursor-pointer select-none",children:[h.jsx("button",{type:"button",role:"switch","aria-checked":n,onClick:()=>r(!n),className:ve("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:h.jsx("span",{className:ve("inline-block h-4 w-4 transform rounded-full bg-white transition-transform mt-0.5",n?"translate-x-4":"translate-x-0.5")})}),h.jsxs("div",{className:"min-w-0",children:[h.jsx("div",{className:"text-sm text-gray-200",children:e}),t&&h.jsx("div",{className:"text-xs text-gray-500 mt-0.5",children:t})]})]})}function LE({value:e,onChange:t,min:n,max:r,step:i}){return h.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 wu({label:e,value:t,mono:n,copy:r,valueClass:i}){const[o,l]=$.useState(!1);return h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("span",{className:"text-gray-500 w-32 shrink-0",children:e}),h.jsx("span",{className:ve("truncate flex-1",n&&"font-mono text-xs",i),children:t}),r&&h.jsx("button",{onClick:async()=>{await Qu(t),l(!0),setTimeout(()=>l(!1),1200)},className:"text-gray-500 hover:text-gray-200",title:"Copy",children:o?h.jsx(Im,{className:"w-3.5 h-3.5 text-success-500"}):h.jsx(ss,{className:"w-3.5 h-3.5"})})]})}function k7({connected:e,liveUrl:t}){return h.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs",children:[h.jsx("span",{className:ve("w-2 h-2 rounded-full",e?"bg-success-500 animate-pulse":"bg-error-500")}),h.jsx("span",{className:e?"text-success-500":"text-error-500",children:e?"Connected":"Disconnected"}),h.jsxs("span",{className:"text-gray-600 truncate",children:["→ ",t]})]})}function R7(){return window.__STUDIO_VERSION__??"dev"}const P7=[{id:"status",label:"Status",icon:d7},{id:"requests",label:"Requests",icon:Ko},{id:"logs",label:"Logs",icon:kl},{id:"api-client",label:"API Client",icon:X_},{id:"container",label:"Container",icon:$m},{id:"database",label:"Database",icon:dc},{id:"architecture",label:"Architecture",icon:WP},{id:"metrics",label:"Metrics",icon:U_},{id:"replay",label:"Replay",icon:_p},{id:"security",label:"Security",icon:Ja}];function D7(){const{sidebarOpen:e,setSidebarOpen:t,currentView:n,setCurrentView:r,connected:i}=ht(),[o,l]=$.useState(!1);return h.jsxs("aside",{className:ve("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:[h.jsxs("div",{className:"flex items-center h-16 px-4 border-b border-gray-800",children:[h.jsx("img",{src:"/expressots-icon.svg",alt:"ExpressoTS",className:"w-8 h-8 flex-shrink-0 rounded-full"}),e&&h.jsxs("div",{className:"ml-3 overflow-hidden flex items-center gap-2",children:[h.jsx("span",{className:"text-lg font-bold text-white whitespace-nowrap",children:"EXPRESSO"}),h.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"})]})]}),h.jsxs("div",{className:ve("flex items-center px-4 py-3 border-b border-gray-800",i?"text-success-500":"text-error-500"),children:[h.jsx("div",{className:ve("w-2 h-2 rounded-full flex-shrink-0",i?"bg-success-500 animate-pulse-slow":"bg-error-500")}),e&&h.jsx("span",{className:"ml-3 text-sm whitespace-nowrap",children:i?"Connected":"Disconnected"})]}),h.jsx("nav",{className:"flex-1 py-4",children:P7.map(c=>{const f=c.icon,d=n===c.id;return h.jsxs("button",{onClick:()=>r(c.id),className:ve("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:[h.jsx(f,{className:"w-5 h-5 flex-shrink-0"}),e&&h.jsx("span",{className:"ml-3 whitespace-nowrap",children:c.label})]},c.id)})}),h.jsx("div",{className:"border-t border-gray-800 p-4",children:h.jsxs("button",{onClick:()=>l(!0),className:"flex items-center w-full text-gray-400 hover:text-gray-200 transition-colors",children:[h.jsx(ZP,{className:"w-5 h-5 flex-shrink-0"}),e&&h.jsx("span",{className:"ml-3 whitespace-nowrap",children:"Settings"})]})}),o&&h.jsx(M7,{onClose:()=>l(!1)}),h.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?h.jsx(YP,{className:"w-4 h-4"}):h.jsx(ni,{className:"w-4 h-4"})})]})}var $7=cP();const I7=["GET","POST","PUT","PATCH","DELETE"],L7={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 q7(){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}=ht(),{rescan:g,requestMetrics:v,requestExchanges:w,clearRecordings:S,clearLogs:b,setRecording:j}=Yi(),[T,N]=$.useState(!1),[E,O]=$.useState(!1);$.useEffect(()=>{if(!f)return;O(!0);const G=setTimeout(()=>O(!1),900);return()=>clearTimeout(G)},[f]);const A=()=>{g(),v(),w()},C=()=>{S(),b(),N(!1)},R=()=>j(!c),D=e==="requests"||e==="replay";return h.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:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("h2",{className:"text-xl font-semibold text-white",children:L7[e]||"Dashboard"}),D&&h.jsxs("span",{className:`flex items-center gap-1.5 px-2 py-0.5 rounded-full text-[11px] font-medium border transition-colors ${c?E?"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:[h.jsx(j7,{className:`w-3 h-3 ${c&&E?"text-primary-400 animate-pulse":""}`}),c?"Live":"Paused",h.jsx("span",{className:"text-gray-500",children:"·"}),h.jsx("span",{className:"tabular-nums text-gray-400",children:d.length})]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("div",{className:"relative",children:[h.jsx(Y_,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),h.jsx("input",{type:"text",placeholder:"Search requests...",value:t,onChange:G=>n(G.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"})]}),D&&h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(KP,{className:"w-4 h-4 text-gray-500"}),h.jsxs("select",{value:r||"",onChange:G=>i(G.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:[h.jsx("option",{value:"",children:"All Methods"}),I7.map(G=>h.jsx("option",{value:G,children:G},G))]}),h.jsxs("select",{value:o,onChange:G=>l(G.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:[h.jsx("option",{value:"all",children:"All Status"}),h.jsx("option",{value:"success",children:"Success (2xx)"}),h.jsx("option",{value:"error",children:"Errors (4xx/5xx)"})]})]}),D&&h.jsxs("div",{className:"flex items-center gap-1 pl-2 border-l border-gray-800",children:[h.jsx("button",{onClick:R,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?h.jsx(w7,{className:"w-5 h-5"}):h.jsx(_p,{className:"w-5 h-5"})}),h.jsx("button",{onClick:()=>N(!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:h.jsx(Ap,{className:"w-5 h-5"})})]}),h.jsx("button",{onClick:A,className:"p-2 text-gray-400 hover:text-white hover:bg-gray-800 rounded-lg transition-colors",title:"Refresh routes, metrics, and recordings",children:h.jsx(Bm,{className:"w-5 h-5"})})]}),T&&$7.createPortal(h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",onClick:()=>N(!1),children:h.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:G=>G.stopPropagation(),role:"alertdialog","aria-modal":"true","aria-labelledby":"clear-dialog-title",children:[h.jsxs("div",{className:"flex items-start gap-3 px-5 pt-5 pb-4 border-b border-gray-800 bg-error-500/5",children:[h.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:h.jsx(Wr,{className:"w-5 h-5 text-error-400"})}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("h3",{id:"clear-dialog-title",className:"text-base font-semibold text-white leading-tight",children:"Clear all recorded data?"}),h.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"This cannot be undone."})]}),h.jsx("button",{onClick:()=>N(!1),className:"p-1 -mt-1 -mr-1 text-gray-500 hover:text-white rounded transition-colors","aria-label":"Close",children:h.jsx(Dr,{className:"w-4 h-4"})})]}),h.jsxs("div",{className:"px-5 py-4",children:[h.jsx("p",{className:"text-sm text-gray-300 mb-3",children:"You're about to discard everything Studio has captured for this session:"}),h.jsxs("ul",{className:"space-y-2",children:[h.jsx(yv,{icon:Ko,count:d.length,label:`captured request${d.length===1?"":"s"}`,detail:"including bodies, headers, and timings"}),h.jsx(yv,{icon:U_,count:y.length,label:`endpoint stat row${y.length===1?"":"s"}`,detail:"p50 / p95 / p99 will reset to zero"}),h.jsx(yv,{icon:kl,count:p.length,label:`buffered log line${p.length===1?"":"s"}`,detail:"agent log buffer will be emptied"})]})]}),h.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:[h.jsx("button",{onClick:()=>N(!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"}),h.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:[h.jsx(Ap,{className:"w-4 h-4"}),"Clear everything"]})]})]})}),document.body)]})}function yv({icon:e,count:t,label:n,detail:r}){const i=t===0;return h.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:[h.jsx(e,{className:`w-4 h-4 mt-0.5 ${i?"text-gray-600":"text-error-400"}`}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"text-sm",children:[h.jsx("span",{className:"font-mono font-semibold tabular-nums",children:t})," ",h.jsx("span",{children:n})]}),h.jsx("div",{className:"text-[11px] text-gray-500",children:r})]})]})}function B7(){const{connected:e,agentLatencyMs:t,eventsReceived:n,metrics:r,exchanges:i,logs:o}=ht(),l=t==null?"text-gray-500":t<30?"text-success-500":t<150?"text-warning-500":"text-error-400";return h.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:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[e?h.jsx(Q_,{className:"w-3 h-3 text-success-500"}):h.jsx(W_,{className:"w-3 h-3 text-error-500"}),h.jsx("span",{className:e?"text-success-500":"text-error-500",children:e?"connected":"offline"})]}),h.jsx(gv,{}),h.jsxs("span",{className:"inline-flex items-center gap-1.5",title:"Round-trip latency to the Studio Agent",children:[h.jsx(s7,{className:ve("w-3 h-3",l)}),h.jsx("span",{className:l,children:t==null?"—":`${t}ms`})]}),h.jsx(gv,{}),h.jsxs("span",{className:"inline-flex items-center gap-1.5",title:"Total messages received from the agent since page load",children:[h.jsx(GP,{className:"w-3 h-3"}),h.jsxs("span",{children:[n.toLocaleString()," ev"]})]}),h.jsx(gv,{}),r&&h.jsxs("span",{className:"inline-flex items-center gap-1.5",title:"Agent process memory: heapUsed / heapTotal",children:[h.jsx(y7,{className:"w-3 h-3"}),h.jsxs("span",{children:[Pi(r.memoryUsage.heapUsed)," /"," ",Pi(r.memoryUsage.heapTotal)]})]}),h.jsxs("span",{className:"ml-auto inline-flex items-center gap-3",children:[h.jsxs("span",{className:"inline-flex items-center gap-1.5",title:"Recorded exchanges currently held in memory",children:[h.jsx(Ko,{className:"w-3 h-3"}),i.length," req"]}),h.jsxs("span",{title:"Buffered log entries",children:[o.length," log"]})]})]})}function gv(){return h.jsx("span",{className:"text-gray-700",children:"·"})}function z7({children:e}){const{sidebarOpen:t}=ht();return h.jsxs("div",{className:"flex h-screen bg-gray-950 text-gray-100",children:[h.jsx(D7,{}),h.jsxs("div",{className:ve("flex flex-col flex-1 transition-all duration-300",t?"ml-64":"ml-16"),children:[h.jsx(q7,{}),h.jsx("main",{className:"flex-1 overflow-auto p-6",children:e}),h.jsx(B7,{})]})]})}function nD(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 vv(e){return`'${e.replace(/'/g,"'\\''")}'`}function rD(e){if(e==null)return null;if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}const H7=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 iD(e){return Object.entries(e).filter(([t])=>!H7.has(t.toLowerCase()))}function U7(e,t={}){const n=nD(e,t),r=e.request.method.toUpperCase(),i=iD(e.request.headers||{}),o=rD(e.request.body),l=["curl","-X",r,vv(n)];for(const[c,f]of i)l.push("-H",vv(`${c}: ${f}`));return o&&l.push("--data-raw",vv(o)),l.join(` \\
|
|
465
|
+
`)}function G7(e,t={}){const n=nD(e,t),r=e.request.method.toUpperCase(),i=iD(e.request.headers||{}),o=rD(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 V7(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=Np(e.request.body),o=Np((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 Np(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?Np(e[0])||{type:"object"}:{type:"object"}};if(typeof e=="object"){const t={};for(const[n,r]of Object.entries(e)){const i=Np(r);i&&(t[n]=i)}return{type:"object",properties:t}}return null}function aD(e,t,n={}){switch(t){case"curl":return U7(e,n);case"fetch":return G7(e,n);case"openapi":return V7(e);default:return""}}async function F7(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 Y7=[{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 oD({exchange:e,compact:t=!1}){const[n,r]=$.useState(!1),[i,o]=$.useState(null),l=$.useRef(null);$.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=aD(e,d);await F7(y)&&(o(d),setTimeout(()=>o(null),1500))}return h.jsxs("div",{ref:l,className:"relative",children:[h.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:[h.jsx(ss,{className:"w-4 h-4"}),!t&&h.jsxs(h.Fragment,{children:[h.jsx("span",{children:"Export"}),h.jsx(Pr,{className:"w-3 h-3"})]})]}),n&&h.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:Y7.map(f=>h.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:[h.jsxs("div",{className:"flex-1",children:[h.jsx("div",{className:"text-sm text-white",children:f.label}),h.jsx("div",{className:"text-[10px] text-gray-500",children:f.hint})]}),i===f.id&&h.jsx(Im,{className:"w-4 h-4 text-primary-400"})]},f.id))})]})}function qE(){var p;const{exchanges:e,searchQuery:t,filterMethod:n,filterStatus:r,selectedExchangeId:i,setSelectedExchangeId:o,autoScroll:l,setAutoScroll:c}=ht(),f=$.useRef(null),d=(p=e[0])==null?void 0:p.id;$.useEffect(()=>{var g;!l||!d||(g=f.current)==null||g.scrollIntoView({behavior:"smooth",block:"start"})},[d,l]);const y=$.useMemo(()=>e.filter(g=>{if(t){const v=t.toLowerCase();if(!g.request.path.toLowerCase().includes(v)&&!g.request.url.toLowerCase().includes(v))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?h.jsx(X7,{}):h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-3 text-xs text-gray-500",children:[h.jsxs("span",{children:["Showing ",y.length," of ",e.length,y.length!==e.length&&h.jsx("span",{className:"text-gray-600",children:" (filtered)"})]}),h.jsxs("button",{onClick:()=>c(!l),className:ve("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:[h.jsx(UP,{className:"w-3 h-3"}),"Auto-scroll"]})]}),h.jsx("div",{ref:f}),h.jsxs("div",{className:"space-y-2",children:[y.map(g=>h.jsx(K7,{exchange:g,isSelected:i===g.id,onSelect:()=>o(g.id)},g.id)),y.length===0&&h.jsx("div",{className:"text-center py-12 text-gray-500 text-sm",children:"No requests match the current filters."})]})]})}function X7(){return h.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-gray-400",children:[h.jsx("div",{className:"w-16 h-16 mb-4 rounded-full bg-primary-500/10 flex items-center justify-center",children:h.jsx(Zu,{className:"w-8 h-8 text-primary-400 opacity-70"})}),h.jsx("p",{className:"text-lg text-white font-medium",children:"No requests recorded yet"}),h.jsxs("p",{className:"text-sm mt-2 text-center max-w-md",children:["Send a request to your running app (default"," ",h.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."]}),h.jsxs("p",{className:"text-xs mt-4 text-gray-500",children:["Tip: use the"," ",h.jsx("span",{className:"text-primary-300 font-medium",children:"API Client"})," tab to send one from inside Studio."]})]})}function K7({exchange:e,isSelected:t,onSelect:n}){const{request:r,response:i}=e;return h.jsxs("div",{onClick:n,className:ve("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:[h.jsx("div",{className:ve("px-2 py-1 rounded text-xs font-mono font-semibold",H_(r.method),Cl(r.method)),children:r.method}),h.jsxs("div",{className:"flex-1 ml-4 min-w-0",children:[h.jsx("p",{className:"text-sm font-mono text-gray-200 truncate",children:r.path}),h.jsx("p",{className:"text-xs text-gray-500 mt-1",children:z_(r.timestamp)})]}),h.jsx("div",{className:ve("px-2 py-1 rounded text-xs font-semibold ml-4",X9(i.statusCode),zP(i.statusCode)),children:i.statusCode}),h.jsx("div",{className:ve("text-sm font-mono ml-4 min-w-[80px] text-right",K9(i.duration)),children:Xn(i.duration)}),h.jsx("div",{className:"ml-3",onClick:o=>o.stopPropagation(),children:h.jsx(oD,{exchange:e,compact:!0})}),h.jsx(Xa,{className:"w-4 h-4 ml-3 text-gray-600"})]})}const W7={vscode:"vscode://file",cursor:"cursor://file",webstorm:"webstorm://open?file=",idea:"idea://open?file=",sublime:"subl://open?url=file://"};function Q7(){const e=P_.getState();return e.editorScheme==="custom"?e.customEditorPrefix||"vscode://file":W7[e.editorScheme]??"vscode://file"}function Z7(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=Q7();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 ls(e){const t=Z7(e);t&&(window.location.href=t)}function Gr(e){if(typeof e=="string")return e}function J7(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 eH(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=Gr(n.stack)||Gr(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:Gr(n.type)||Gr(t.type),title:Gr(n.title)||Gr(t.title)||Gr(n.message)||Gr(t.message),detail:typeof i=="string"||i&&typeof i=="object"?i:void 0,problemStatus:typeof n.status=="number"?n.status:void 0,errorCode:Gr(n.errorCode)||Gr(t.errorCode),validationErrors:o,stack:r,frames:J7(r),empty:!1};return l.empty=!l.type&&!l.title&&!l.detail&&!l.stack&&(!l.validationErrors||l.validationErrors.length===0),l}function tH({exchange:e}){const{response:t}=e,n=$.useMemo(()=>eH(t.body),[t.body]),[r,i]=$.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 h.jsx("div",{className:"border-b border-gray-800",children:h.jsxs("div",{className:"p-4",children:[h.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[h.jsx("div",{className:`p-2 rounded ${d?"bg-error-500/15 text-error-400":"bg-warning-500/15 text-warning-500"}`,children:h.jsx(x7,{className:"w-5 h-5"})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[h.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&&h.jsx("span",{className:"text-xs font-mono text-gray-400 bg-gray-800 px-1.5 py-0.5 rounded",children:n.errorCode})]}),h.jsx("h3",{className:"text-base font-semibold text-white",children:n.title||"Request failed"}),n.type&&h.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,h.jsx(Xa,{className:"w-3 h-3"})]})]})]}),n.detail&&h.jsx("div",{className:"mt-3 pl-12 text-sm",children:typeof n.detail=="string"?h.jsx("p",{className:"text-gray-300 leading-relaxed",children:n.detail}):h.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&&h.jsxs("div",{className:"mt-3 pl-12",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-2 text-xs text-gray-400 uppercase tracking-wide",children:[h.jsx(K_,{className:"w-3 h-3"}),"Validation errors"]}),h.jsx("ul",{className:"space-y-1.5",children:n.validationErrors.map((y,p)=>h.jsxs("li",{className:"text-sm bg-gray-800/40 rounded px-3 py-2",children:[h.jsx("span",{className:"font-mono text-warning-500",children:y.property}),y.constraints&&h.jsx("ul",{className:"mt-1 ml-3 text-xs text-gray-400 space-y-0.5",children:Object.entries(y.constraints).map(([g,v])=>h.jsxs("li",{children:[h.jsxs("span",{className:"text-gray-500",children:[g,":"]})," ",v]},g))})]},p))})]}),(f==null?void 0:f.file)&&h.jsx("div",{className:"mt-3 pl-12",children:h.jsxs("button",{onClick:()=>ls({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:[h.jsx(Xi,{className:"w-3.5 h-3.5"}),"Open throw site in editor",h.jsxs("span",{className:"font-mono text-primary-200 opacity-80",children:[nH(f.file),":",f.line]})]})}),n.frames.length>0&&h.jsx(rH,{frames:l,allFrames:n.frames,collapsedCount:c,showAllFrames:r,onToggle:()=>i(!r)}),n.empty&&h.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 nH(e){const t=e.split(/[\\/]/);return t.length<=2?e:"…/"+t.slice(-2).join("/")}function rH({frames:e,allFrames:t,collapsedCount:n,showAllFrames:r,onToggle:i}){const[o,l]=$.useState(!0);return h.jsxs("div",{className:"mt-4 pl-12",children:[h.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?h.jsx(Pr,{className:"w-3 h-3"}):h.jsx(ni,{className:"w-3 h-3"}),h.jsx(i7,{className:"w-3 h-3"}),"Stack trace",h.jsxs("span",{className:"text-gray-600 normal-case",children:["(",t.length," frame",t.length===1?"":"s",")"]})]}),o&&h.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)=>h.jsx(iH,{frame:c},f)),n>0&&h.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 iH({frame:e}){const t=e.isUserCode&&e.file&&e.line;return h.jsxs("div",{className:`flex items-center gap-2 px-3 py-1.5 ${e.isUserCode?"bg-primary-950/20":""}`,children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[e.function&&h.jsx("div",{className:e.isUserCode?"text-primary-300":"text-gray-400",children:e.function}),e.file&&h.jsxs("div",{className:"text-gray-500 truncate",children:[e.file,e.line?`:${e.line}`:"",e.column?`:${e.column}`:""]}),!e.file&&!e.function&&h.jsx("div",{className:"text-gray-500 truncate",children:e.raw})]}),t&&h.jsx("button",{onClick:()=>ls({filePath:e.file,lineNumber:e.line,column:e.column}),className:"p-1 text-gray-500 hover:text-primary-400",title:"Open in editor",children:h.jsx(Xi,{className:"w-3.5 h-3.5"})})]})}const Ih={log:{text:"text-gray-300",bg:"bg-gray-700/30",label:"LOG",Icon:ni},info:{text:"text-sky-400",bg:"bg-sky-500/10",label:"INFO",Icon:Kf},warn:{text:"text-warning-500",bg:"bg-warning-500/10",label:"WARN",Icon:Wr},error:{text:"text-error-400",bg:"bg-error-500/15",label:"ERROR",Icon:Xf},debug:{text:"text-violet-400",bg:"bg-violet-500/10",label:"DEBUG",Icon:FP}};function aH(e){const t=new Date(e),n=String(t.getMilliseconds()).padStart(3,"0");return`${t.toLocaleTimeString([],{hour12:!1})}.${n}`}function oH({traceId:e}){const t=ht(l=>l.logsByTraceId),[n,r]=$.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 h.jsxs("div",{className:"border-b border-gray-800",children:[h.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:[h.jsx(kl,{className:"w-4 h-4 text-primary-400"}),h.jsx("span",{className:"text-sm font-semibold text-gray-300",children:"Logs during this request"}),h.jsxs("span",{className:"text-xs text-gray-500",children:["(",i.length," ",i.length===1?"entry":"entries",")"]}),h.jsx("span",{className:ve("ml-auto inline-flex items-center px-2 py-0.5 rounded text-[10px] font-mono uppercase",Ih[o].bg,Ih[o].text),children:Ih[o].label})]}),n&&h.jsx("div",{className:"px-4 pb-4",children:h.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=Ih[l.level],{Icon:d}=f;return h.jsxs("div",{className:"flex items-start gap-2 px-3 py-1.5",children:[h.jsx("span",{className:"text-gray-600 tabular-nums select-none shrink-0",children:aH(l.timestamp)}),h.jsxs("span",{className:ve("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:[h.jsx(d,{className:"w-3 h-3"}),f.label]}),h.jsx("pre",{className:"flex-1 whitespace-pre-wrap break-words text-gray-200 leading-relaxed",children:l.message})]},c)})})})]})}function sH(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:aD(e.exchange,"curl")}}function lH(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(`
|
|
466
|
+
`)}function BE(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 cH(e,t){const n=sH(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"?BE(`studio-snapshot-${r}-${i}.json`,JSON.stringify(n,null,2),"application/json"):BE(`studio-snapshot-${r}-${i}.md`,lH(n),"text/markdown")}function uH(){const{exchanges:e,selectedExchangeId:t,setSelectedExchangeId:n,routes:r,containerResolutionsByExchange:i,logsByTraceId:o,agentUrl:l}=ht(),c=$.useMemo(()=>e.find(v=>v.id===t),[e,t]),f=$.useMemo(()=>{var S;if(!c)return;const v=r.find(b=>b.method===c.request.method&&b.path===c.request.path);return v||((S=r.filter(b=>b.method===c.request.method).map(b=>({r:b,score:dH(b.path,c.request.path)})).filter(b=>b.score>0).sort((b,j)=>j.score-b.score)[0])==null?void 0:S.r)},[c,r]),d=$.useMemo(()=>c?i[c.id]??[]:[],[c,i]);if(!c)return null;const{request:y,response:p,trace:g}=c;return h.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[h.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:()=>n(null)}),h.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:[h.jsxs("div",{className:"sticky top-0 bg-gray-900 border-b border-gray-800 p-4 flex items-center justify-between z-10",children:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("span",{className:ve("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}),h.jsxs("span",{className:"font-mono text-sm text-gray-300",children:[y.method," ",y.path]})]}),h.jsx("button",{onClick:()=>n(null),className:"p-2 text-gray-400 hover:text-white hover:bg-gray-800 rounded-lg",children:h.jsx(Dr,{className:"w-5 h-5"})})]}),h.jsx("div",{className:"p-4 border-b border-gray-800",children:h.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:"Duration"}),h.jsx("p",{className:"text-lg font-semibold text-white mt-1",children:Xn(p.duration)})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:"Time"}),h.jsx("p",{className:"text-lg font-semibold text-white mt-1",children:z_(y.timestamp)})]}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:"Status"}),h.jsxs("p",{className:ve("text-lg font-semibold mt-1",p.statusCode>=400?"text-error-500":"text-success-500"),children:[p.statusCode," ",p.statusMessage]})]})]})}),(f||d.length>0)&&h.jsxs("div",{className:"p-4 border-b border-gray-800 space-y-3",children:[f&&f.filePath&&h.jsxs("div",{className:"flex items-center justify-between bg-gray-800/40 border border-gray-700 rounded-lg px-3 py-2",children:[h.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h.jsx(Xi,{className:"w-4 h-4 text-primary-400 flex-shrink-0"}),h.jsxs("div",{className:"min-w-0",children:[h.jsxs("div",{className:"text-sm text-white truncate",children:[f.controller,h.jsx("span",{className:"text-gray-500",children:"."}),h.jsxs("span",{className:"text-primary-300",children:[f.controllerMethod,"()"]})]}),h.jsxs("div",{className:"text-[11px] text-gray-500 truncate font-mono",children:[f.filePath,f.lineNumber?`:${f.lineNumber}`:""]})]})]}),h.jsx("button",{onClick:()=>ls({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&&h.jsxs("div",{className:"bg-gray-800/40 border border-gray-700 rounded-lg px-3 py-2",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[h.jsx($m,{className:"w-4 h-4 text-primary-400"}),h.jsxs("span",{className:"text-sm font-medium text-white",children:["Resolved bindings (",d.length,")"]})]}),h.jsx("div",{className:"flex flex-wrap gap-1.5",children:d.map(v=>h.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:v},v))})]})]}),p.statusCode>=400&&h.jsx(tH,{exchange:c}),h.jsx(hH,{trace:g}),h.jsx(oH,{traceId:c.request.traceId||c.id}),h.jsx(Lh,{title:"Request Headers",defaultOpen:!0,children:h.jsx(HE,{headers:y.headers})}),y.body?h.jsx(Lh,{title:"Request Body",children:h.jsx(UE,{data:y.body})}):null,h.jsx(Lh,{title:"Response Headers",children:h.jsx(HE,{headers:p.headers})}),p.body?h.jsx(Lh,{title:"Response Body",defaultOpen:!0,children:h.jsx(UE,{data:p.body})}):null,h.jsxs("div",{className:"p-4 border-t border-gray-800 flex gap-2 items-center flex-wrap",children:[h.jsxs("button",{onClick:()=>Qu(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:[h.jsx(ss,{className:"w-4 h-4"}),"Copy as JSON"]}),h.jsx(oD,{exchange:c}),h.jsx(fH,{onExport:v=>cH({exchange:c,route:f,logs:o[c.request.traceId||c.id]??[],resolvedBindings:d,agentUrl:l},v)})]})]})]})}function fH({onExport:e}){const[t,n]=$.useState(!1);return h.jsxs("div",{className:"relative",children:[h.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:[h.jsx(Sp,{className:"w-4 h-4"}),"Export snapshot",h.jsx(Pr,{className:ve("w-3 h-3 transition-transform",t&&"rotate-180")})]}),t&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>n(!1),"aria-hidden":!0}),h.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:[h.jsx(zE,{icon:Sp,label:"Download as JSON",hint:"Machine-readable, full fidelity",onClick:()=>{e("json"),n(!1)}}),h.jsx(zE,{icon:V_,label:"Download as Markdown",hint:"Bug-report draft, ready to paste",onClick:()=>{e("markdown"),n(!1)}})]})]})]})}function zE({icon:e,label:t,hint:n,onClick:r}){return h.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:[h.jsx(e,{className:"w-4 h-4 text-primary-400 mt-0.5 flex-shrink-0"}),h.jsxs("div",{children:[h.jsx("div",{className:"text-gray-200",children:t}),n&&h.jsx("div",{className:"text-[11px] text-gray-500",children:n})]})]})}function dH(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 hH({trace:e}){return!e||e.spans.length===0?null:h.jsxs("div",{className:"p-4 border-b border-gray-800",children:[h.jsx("h3",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide mb-4",children:"Trace Waterfall"}),h.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 h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-32 text-xs text-gray-500 truncate",children:t.name}),h.jsx("div",{className:"flex-1 h-6 bg-gray-800 rounded relative",children:h.jsx("div",{className:ve("absolute h-full rounded",t.status==="ERROR"?"bg-error-500":"bg-primary-500"),style:{left:`${n}%`,width:`${Math.max(r,1)}%`}})}),h.jsx("div",{className:"w-16 text-xs text-gray-500 text-right",children:Xn(t.duration)})]},t.spanId)})})]})}function Lh({title:e,defaultOpen:t=!1,children:n}){const[r,i]=$.useState(t);return h.jsxs("div",{className:"border-b border-gray-800",children:[h.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:[h.jsx("h3",{className:"text-sm font-semibold text-gray-400 uppercase tracking-wide",children:e}),h.jsx("span",{className:"text-gray-500 text-sm",children:r?"−":"+"})]}),r&&h.jsx("div",{className:"px-4 pb-4",children:n})]})}function HE({headers:e}){const t=Object.entries(e);return t.length===0?h.jsx("p",{className:"text-sm text-gray-500",children:"No headers"}):h.jsx("div",{className:"space-y-1",children:t.map(([n,r])=>h.jsxs("div",{className:"flex text-sm",children:[h.jsxs("span",{className:"text-gray-500 w-40 flex-shrink-0 font-mono",children:[n,":"]}),h.jsx("span",{className:"text-gray-300 font-mono break-all",children:r})]},n))})}function UE({data:e}){const t=typeof e=="string"?e:JSON.stringify(e,null,2);return h.jsx("pre",{className:"text-sm font-mono text-gray-300 bg-gray-800/50 rounded-lg p-4 overflow-x-auto",children:t})}function Vt(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=Vt(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var pH={value:()=>{}};function zm(){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 mp(n)}function mp(e){this._=e}function mH(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}})}mp.prototype=zm.prototype={constructor:mp,on:function(e,t){var n=this._,r=mH(e+"",n),i,o=-1,l=r.length;if(arguments.length<2){for(;++o<l;)if((i=(e=r[o]).type)&&(i=yH(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]=GE(n[i],e.name,t);else if(t==null)for(i in n)n[i]=GE(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 mp(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 yH(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function GE(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=pH,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Kw="http://www.w3.org/1999/xhtml";const VE={svg:"http://www.w3.org/2000/svg",xhtml:Kw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Hm(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),VE.hasOwnProperty(t)?{space:VE[t],local:e}:e}function gH(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Kw&&t.documentElement.namespaceURI===Kw?t.createElement(e):t.createElementNS(n,e)}}function vH(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function sD(e){var t=Hm(e);return(t.local?vH:gH)(t)}function xH(){}function J_(e){return e==null?xH:function(){return this.querySelector(e)}}function bH(e){typeof e!="function"&&(e=J_(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 Wn(r,this._parents)}function wH(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function SH(){return[]}function lD(e){return e==null?SH:function(){return this.querySelectorAll(e)}}function _H(e){return function(){return wH(e.apply(this,arguments))}}function jH(e){typeof e=="function"?e=_H(e):e=lD(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 Wn(r,i)}function cD(e){return function(){return this.matches(e)}}function uD(e){return function(t){return t.matches(e)}}var AH=Array.prototype.find;function NH(e){return function(){return AH.call(this.children,e)}}function OH(){return this.firstElementChild}function EH(e){return this.select(e==null?OH:NH(typeof e=="function"?e:uD(e)))}var TH=Array.prototype.filter;function CH(){return Array.from(this.children)}function MH(e){return function(){return TH.call(this.children,e)}}function kH(e){return this.selectAll(e==null?CH:MH(typeof e=="function"?e:uD(e)))}function RH(e){typeof e!="function"&&(e=cD(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 Wn(r,this._parents)}function fD(e){return new Array(e.length)}function PH(){return new Wn(this._enter||this._groups.map(fD),this._parents)}function Op(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Op.prototype={constructor:Op,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 DH(e){return function(){return e}}function $H(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 Op(e,o[l]);for(;l<f;++l)(c=t[l])&&(i[l]=c)}function IH(e,t,n,r,i,o,l){var c,f,d=new Map,y=t.length,p=o.length,g=new Array(y),v;for(c=0;c<y;++c)(f=t[c])&&(g[c]=v=l.call(f,f.__data__,c,t)+"",d.has(v)?i[c]=f:d.set(v,f));for(c=0;c<p;++c)v=l.call(e,o[c],c,o)+"",(f=d.get(v))?(r[c]=f,f.__data__=o[c],d.delete(v)):n[c]=new Op(e,o[c]);for(c=0;c<y;++c)(f=t[c])&&d.get(g[c])===f&&(i[c]=f)}function LH(e){return e.__data__}function qH(e,t){if(!arguments.length)return Array.from(this,LH);var n=t?IH:$H,r=this._parents,i=this._groups;typeof e!="function"&&(e=DH(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,v=BH(e.call(y,y&&y.__data__,d,r)),w=v.length,S=c[d]=new Array(w),b=l[d]=new Array(w),j=f[d]=new Array(g);n(y,p,S,b,j,v,t);for(var T=0,N=0,E,O;T<w;++T)if(E=S[T]){for(T>=N&&(N=T+1);!(O=b[N])&&++N<w;);E._next=O||null}}return l=new Wn(l,r),l._enter=c,l._exit=f,l}function BH(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function zH(){return new Wn(this._exit||this._groups.map(fD),this._parents)}function HH(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 UH(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),v,w=0;w<p;++w)(v=d[w]||y[w])&&(g[w]=v);for(;f<i;++f)c[f]=n[f];return new Wn(c,this._parents)}function GH(){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 VH(e){e||(e=FH);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 Wn(i,this._parents).order()}function FH(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function YH(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function XH(){return Array.from(this)}function KH(){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 WH(){let e=0;for(const t of this)++e;return e}function QH(){return!this.node()}function ZH(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 JH(e){return function(){this.removeAttribute(e)}}function eU(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tU(e,t){return function(){this.setAttribute(e,t)}}function nU(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function rU(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function iU(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 aU(e,t){var n=Hm(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?eU:JH:typeof t=="function"?n.local?iU:rU:n.local?nU:tU)(n,t))}function dD(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function oU(e){return function(){this.style.removeProperty(e)}}function sU(e,t,n){return function(){this.style.setProperty(e,t,n)}}function lU(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function cU(e,t,n){return arguments.length>1?this.each((t==null?oU:typeof t=="function"?lU:sU)(e,t,n??"")):Rl(this.node(),e)}function Rl(e,t){return e.style.getPropertyValue(t)||dD(e).getComputedStyle(e,null).getPropertyValue(t)}function uU(e){return function(){delete this[e]}}function fU(e,t){return function(){this[e]=t}}function dU(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function hU(e,t){return arguments.length>1?this.each((t==null?uU:typeof t=="function"?dU:fU)(e,t)):this.node()[e]}function hD(e){return e.trim().split(/^|\s+/)}function e2(e){return e.classList||new pD(e)}function pD(e){this._node=e,this._names=hD(e.getAttribute("class")||"")}pD.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 mD(e,t){for(var n=e2(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function yD(e,t){for(var n=e2(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function pU(e){return function(){mD(this,e)}}function mU(e){return function(){yD(this,e)}}function yU(e,t){return function(){(t.apply(this,arguments)?mD:yD)(this,e)}}function gU(e,t){var n=hD(e+"");if(arguments.length<2){for(var r=e2(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?yU:t?pU:mU)(n,t))}function vU(){this.textContent=""}function xU(e){return function(){this.textContent=e}}function bU(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function wU(e){return arguments.length?this.each(e==null?vU:(typeof e=="function"?bU:xU)(e)):this.node().textContent}function SU(){this.innerHTML=""}function _U(e){return function(){this.innerHTML=e}}function jU(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function AU(e){return arguments.length?this.each(e==null?SU:(typeof e=="function"?jU:_U)(e)):this.node().innerHTML}function NU(){this.nextSibling&&this.parentNode.appendChild(this)}function OU(){return this.each(NU)}function EU(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function TU(){return this.each(EU)}function CU(e){var t=typeof e=="function"?e:sD(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function MU(){return null}function kU(e,t){var n=typeof e=="function"?e:sD(e),r=t==null?MU:typeof t=="function"?t:J_(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function RU(){var e=this.parentNode;e&&e.removeChild(this)}function PU(){return this.each(RU)}function DU(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $U(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function IU(e){return this.select(e?$U:DU)}function LU(e){return arguments.length?this.property("__data__",e):this.node().__data__}function qU(e){return function(t){e.call(this,t,this.__data__)}}function BU(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 zU(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 HU(e,t,n){return function(){var r=this.__on,i,o=qU(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 UU(e,t,n){var r=BU(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?HU:zU,i=0;i<o;++i)this.each(c(r[i],t,n));return this}function gD(e,t,n){var r=dD(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 GU(e,t){return function(){return gD(this,e,t)}}function VU(e,t){return function(){return gD(this,e,t.apply(this,arguments))}}function FU(e,t){return this.each((typeof t=="function"?VU:GU)(e,t))}function*YU(){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 vD=[null];function Wn(e,t){this._groups=e,this._parents=t}function Wf(){return new Wn([[document.documentElement]],vD)}function XU(){return this}Wn.prototype=Wf.prototype={constructor:Wn,select:bH,selectAll:jH,selectChild:EH,selectChildren:kH,filter:RH,data:qH,enter:PH,exit:zH,join:HH,merge:UH,selection:XU,order:GH,sort:VH,call:YH,nodes:XH,node:KH,size:WH,empty:QH,each:ZH,attr:aU,style:cU,property:hU,classed:gU,text:wU,html:AU,raise:OU,lower:TU,append:CU,insert:kU,remove:PU,clone:IU,datum:LU,on:UU,dispatch:FU,[Symbol.iterator]:YU};function Fn(e){return typeof e=="string"?new Wn([[document.querySelector(e)]],[document.documentElement]):new Wn([[e]],vD)}function KU(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Nr(e,t){if(e=KU(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 WU={passive:!1},tf={capture:!0,passive:!1};function xv(e){e.stopImmediatePropagation()}function ml(e){e.preventDefault(),e.stopImmediatePropagation()}function xD(e){var t=e.document.documentElement,n=Fn(e).on("dragstart.drag",ml,tf);"onselectstart"in t?n.on("selectstart.drag",ml,tf):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function bD(e,t){var n=e.document.documentElement,r=Fn(e).on("dragstart.drag",null);t&&(r.on("click.drag",ml,tf),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 qh=e=>()=>e;function Ww(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}})}Ww.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function QU(e){return!e.ctrlKey&&!e.button}function ZU(){return this.parentNode}function JU(e,t){return t??{x:e.x,y:e.y}}function eG(){return navigator.maxTouchPoints||"ontouchstart"in this}function wD(){var e=QU,t=ZU,n=JU,r=eG,i={},o=zm("start","drag","end"),l=0,c,f,d,y,p=0;function g(E){E.on("mousedown.drag",v).filter(r).on("touchstart.drag",b).on("touchmove.drag",j,WU).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(E,O){if(!(y||!e.call(this,E,O))){var A=N(this,t.call(this,E,O),E,O,"mouse");A&&(Fn(E.view).on("mousemove.drag",w,tf).on("mouseup.drag",S,tf),xD(E.view),xv(E),d=!1,c=E.clientX,f=E.clientY,A("start",E))}}function w(E){if(ml(E),!d){var O=E.clientX-c,A=E.clientY-f;d=O*O+A*A>p}i.mouse("drag",E)}function S(E){Fn(E.view).on("mousemove.drag mouseup.drag",null),bD(E.view,d),ml(E),i.mouse("end",E)}function b(E,O){if(e.call(this,E,O)){var A=E.changedTouches,C=t.call(this,E,O),R=A.length,D,G;for(D=0;D<R;++D)(G=N(this,C,E,O,A[D].identifier,A[D]))&&(xv(E),G("start",E,A[D]))}}function j(E){var O=E.changedTouches,A=O.length,C,R;for(C=0;C<A;++C)(R=i[O[C].identifier])&&(ml(E),R("drag",E,O[C]))}function T(E){var O=E.changedTouches,A=O.length,C,R;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),C=0;C<A;++C)(R=i[O[C].identifier])&&(xv(E),R("end",E,O[C]))}function N(E,O,A,C,R,D){var G=o.copy(),I=Nr(D||A,O),L,Y,P;if((P=n.call(E,new Ww("beforestart",{sourceEvent:A,target:g,identifier:R,active:l,x:I[0],y:I[1],dx:0,dy:0,dispatch:G}),C))!=null)return L=P.x-I[0]||0,Y=P.y-I[1]||0,function U(k,z,H){var F=I,K;switch(k){case"start":i[R]=U,K=l++;break;case"end":delete i[R],--l;case"drag":I=Nr(H||z,O),K=l;break}G.call(k,E,new Ww(k,{sourceEvent:z,subject:P,target:g,identifier:R,active:K,x:I[0]+L,y:I[1]+Y,dx:I[0]-F[0],dy:I[1]-F[1],dispatch:G}),C)}}return g.filter=function(E){return arguments.length?(e=typeof E=="function"?E:qh(!!E),g):e},g.container=function(E){return arguments.length?(t=typeof E=="function"?E:qh(E),g):t},g.subject=function(E){return arguments.length?(n=typeof E=="function"?E:qh(E),g):n},g.touchable=function(E){return arguments.length?(r=typeof E=="function"?E:qh(!!E),g):r},g.on=function(){var E=o.on.apply(o,arguments);return E===o?g:E},g.clickDistance=function(E){return arguments.length?(p=(E=+E)*E,g):Math.sqrt(p)},g}function t2(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function SD(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Qf(){}var nf=.7,Ep=1/nf,yl="\\s*([+-]?\\d+)\\s*",rf="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tG=/^#([0-9a-f]{3,8})$/,nG=new RegExp(`^rgb\\(${yl},${yl},${yl}\\)$`),rG=new RegExp(`^rgb\\(${Qr},${Qr},${Qr}\\)$`),iG=new RegExp(`^rgba\\(${yl},${yl},${yl},${rf}\\)$`),aG=new RegExp(`^rgba\\(${Qr},${Qr},${Qr},${rf}\\)$`),oG=new RegExp(`^hsl\\(${rf},${Qr},${Qr}\\)$`),sG=new RegExp(`^hsla\\(${rf},${Qr},${Qr},${rf}\\)$`),FE={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};t2(Qf,Wo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:YE,formatHex:YE,formatHex8:lG,formatHsl:cG,formatRgb:XE,toString:XE});function YE(){return this.rgb().formatHex()}function lG(){return this.rgb().formatHex8()}function cG(){return _D(this).formatHsl()}function XE(){return this.rgb().formatRgb()}function Wo(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=tG.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?KE(t):n===3?new Rn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Bh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Bh(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=nG.exec(e))?new Rn(t[1],t[2],t[3],1):(t=rG.exec(e))?new Rn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=iG.exec(e))?Bh(t[1],t[2],t[3],t[4]):(t=aG.exec(e))?Bh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=oG.exec(e))?ZE(t[1],t[2]/100,t[3]/100,1):(t=sG.exec(e))?ZE(t[1],t[2]/100,t[3]/100,t[4]):FE.hasOwnProperty(e)?KE(FE[e]):e==="transparent"?new Rn(NaN,NaN,NaN,0):null}function KE(e){return new Rn(e>>16&255,e>>8&255,e&255,1)}function Bh(e,t,n,r){return r<=0&&(e=t=n=NaN),new Rn(e,t,n,r)}function uG(e){return e instanceof Qf||(e=Wo(e)),e?(e=e.rgb(),new Rn(e.r,e.g,e.b,e.opacity)):new Rn}function Qw(e,t,n,r){return arguments.length===1?uG(e):new Rn(e,t,n,r??1)}function Rn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}t2(Rn,Qw,SD(Qf,{brighter(e){return e=e==null?Ep:Math.pow(Ep,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?nf:Math.pow(nf,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn(Fo(this.r),Fo(this.g),Fo(this.b),Tp(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:WE,formatHex:WE,formatHex8:fG,formatRgb:QE,toString:QE}));function WE(){return`#${$o(this.r)}${$o(this.g)}${$o(this.b)}`}function fG(){return`#${$o(this.r)}${$o(this.g)}${$o(this.b)}${$o((isNaN(this.opacity)?1:this.opacity)*255)}`}function QE(){const e=Tp(this.opacity);return`${e===1?"rgb(":"rgba("}${Fo(this.r)}, ${Fo(this.g)}, ${Fo(this.b)}${e===1?")":`, ${e})`}`}function Tp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Fo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $o(e){return e=Fo(e),(e<16?"0":"")+e.toString(16)}function ZE(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Cr(e,t,n,r)}function _D(e){if(e instanceof Cr)return new Cr(e.h,e.s,e.l,e.opacity);if(e instanceof Qf||(e=Wo(e)),!e)return new Cr;if(e instanceof Cr)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 Cr(l,c,f,e.opacity)}function dG(e,t,n,r){return arguments.length===1?_D(e):new Cr(e,t,n,r??1)}function Cr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}t2(Cr,dG,SD(Qf,{brighter(e){return e=e==null?Ep:Math.pow(Ep,e),new Cr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?nf:Math.pow(nf,e),new Cr(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 Rn(bv(e>=240?e-240:e+120,i,r),bv(e,i,r),bv(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Cr(JE(this.h),zh(this.s),zh(this.l),Tp(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=Tp(this.opacity);return`${e===1?"hsl(":"hsla("}${JE(this.h)}, ${zh(this.s)*100}%, ${zh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function JE(e){return e=(e||0)%360,e<0?e+360:e}function zh(e){return Math.max(0,Math.min(1,e||0))}function bv(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 n2=e=>()=>e;function hG(e,t){return function(n){return e+n*t}}function pG(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 mG(e){return(e=+e)==1?jD:function(t,n){return n-t?pG(t,n,e):n2(isNaN(t)?n:t)}}function jD(e,t){var n=t-e;return n?hG(e,n):n2(isNaN(e)?t:e)}const Cp=(function e(t){var n=mG(t);function r(i,o){var l=n((i=Qw(i)).r,(o=Qw(o)).r),c=n(i.g,o.g),f=n(i.b,o.b),d=jD(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 yG(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 gG(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function vG(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]=qi(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 xG(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Tr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function bG(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]=qi(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var Zw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,wv=new RegExp(Zw.source,"g");function wG(e){return function(){return e}}function SG(e){return function(t){return e(t)+""}}function AD(e,t){var n=Zw.lastIndex=wv.lastIndex=0,r,i,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(r=Zw.exec(e))&&(i=wv.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:Tr(r,i)})),n=wv.lastIndex;return n<t.length&&(o=t.slice(n),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?SG(f[0].x):wG(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 qi(e,t){var n=typeof t,r;return t==null||n==="boolean"?n2(t):(n==="number"?Tr:n==="string"?(r=Wo(t))?(t=r,Cp):AD:t instanceof Wo?Cp:t instanceof Date?xG:gG(t)?yG:Array.isArray(t)?vG:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?bG:Tr)(e,t)}function r2(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var eT=180/Math.PI,Jw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ND(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)*eT,skewX:Math.atan(f)*eT,scaleX:l,scaleY:c}}var Hh;function _G(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jw:ND(t.a,t.b,t.c,t.d,t.e,t.f)}function jG(e){return e==null||(Hh||(Hh=document.createElementNS("http://www.w3.org/2000/svg","g")),Hh.setAttribute("transform",e),!(e=Hh.transform.baseVal.consolidate()))?Jw:(e=e.matrix,ND(e.a,e.b,e.c,e.d,e.e,e.f))}function OD(e,t,n,r){function i(d){return d.length?d.pop()+" ":""}function o(d,y,p,g,v,w){if(d!==p||y!==g){var S=v.push("translate(",null,t,null,n);w.push({i:S-4,x:Tr(d,p)},{i:S-2,x:Tr(y,g)})}else(p||g)&&v.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:Tr(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:Tr(d,y)}):y&&p.push(i(p)+"skewX("+y+r)}function f(d,y,p,g,v,w){if(d!==p||y!==g){var S=v.push(i(v)+"scale(",null,",",null,")");w.push({i:S-4,x:Tr(d,p)},{i:S-2,x:Tr(y,g)})}else(p!==1||g!==1)&&v.push(i(v)+"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(v){for(var w=-1,S=g.length,b;++w<S;)p[(b=g[w]).i]=b.x(v);return p.join("")}}}var AG=OD(_G,"px, ","px)","deg)"),NG=OD(jG,", ",")",")"),OG=1e-12;function tT(e){return((e=Math.exp(e))+1/e)/2}function EG(e){return((e=Math.exp(e))-1/e)/2}function TG(e){return((e=Math.exp(2*e))-1)/(e+1)}const yp=(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],v=y-c,w=p-f,S=v*v+w*w,b,j;if(S<OG)j=Math.log(g/d)/t,b=function(C){return[c+C*v,f+C*w,d*Math.exp(t*C*j)]};else{var T=Math.sqrt(S),N=(g*g-d*d+r*S)/(2*d*n*T),E=(g*g-d*d-r*S)/(2*g*n*T),O=Math.log(Math.sqrt(N*N+1)-N),A=Math.log(Math.sqrt(E*E+1)-E);j=(A-O)/t,b=function(C){var R=C*j,D=tT(O),G=d/(n*T)*(D*TG(t*R+O)-EG(O));return[c+G*v,f+G*w,d*D/tT(t*R+O)]}}return b.duration=j*1e3*t/Math.SQRT2,b}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 CG(e,t){t===void 0&&(t=e,e=qi);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 Pl=0,Iu=0,Su=0,ED=1e3,Mp,Lu,kp=0,Qo=0,Um=0,af=typeof performance=="object"&&performance.now?performance:Date,TD=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function i2(){return Qo||(TD(MG),Qo=af.now()+Um)}function MG(){Qo=0}function Rp(){this._call=this._time=this._next=null}Rp.prototype=CD.prototype={constructor:Rp,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?i2():+n)+(t==null?0:+t),!this._next&&Lu!==this&&(Lu?Lu._next=this:Mp=this,Lu=this),this._call=e,this._time=n,eS()},stop:function(){this._call&&(this._call=null,this._time=1/0,eS())}};function CD(e,t,n){var r=new Rp;return r.restart(e,t,n),r}function kG(){i2(),++Pl;for(var e=Mp,t;e;)(t=Qo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Pl}function nT(){Qo=(kp=af.now())+Um,Pl=Iu=0;try{kG()}finally{Pl=0,PG(),Qo=0}}function RG(){var e=af.now(),t=e-kp;t>ED&&(Um-=t,kp=e)}function PG(){for(var e,t=Mp,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:Mp=n);Lu=e,eS(r)}function eS(e){if(!Pl){Iu&&(Iu=clearTimeout(Iu));var t=e-Qo;t>24?(e<1/0&&(Iu=setTimeout(nT,e-af.now()-Um)),Su&&(Su=clearInterval(Su))):(Su||(kp=af.now(),Su=setInterval(RG,ED)),Pl=1,TD(nT))}}function rT(e,t,n){var r=new Rp;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var DG=zm("start","end","cancel","interrupt"),$G=[],MD=0,iT=1,tS=2,gp=3,aT=4,nS=5,vp=6;function Gm(e,t,n,r,i,o){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;IG(e,n,{name:t,index:r,group:i,on:DG,tween:$G,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:MD})}function a2(e,t){var n=$r(e,t);if(n.state>MD)throw new Error("too late; already scheduled");return n}function ri(e,t){var n=$r(e,t);if(n.state>gp)throw new Error("too late; already running");return n}function $r(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function IG(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=CD(o,0,n.time);function o(d){n.state=iT,n.timer.restart(l,n.delay,n.time),n.delay<=d&&l(d-n.delay)}function l(d){var y,p,g,v;if(n.state!==iT)return f();for(y in r)if(v=r[y],v.name===n.name){if(v.state===gp)return rT(l);v.state===aT?(v.state=vp,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete r[y]):+y<t&&(v.state=vp,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete r[y])}if(rT(function(){n.state===gp&&(n.state=aT,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=tS,n.on.call("start",e,e.__data__,n.index,n.group),n.state===tS){for(n.state=gp,i=new Array(g=n.tween.length),y=0,p=-1;y<g;++y)(v=n.tween[y].value.call(e,e.__data__,n.index,n.group))&&(i[++p]=v);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=nS,1),p=-1,g=i.length;++p<g;)i[p].call(e,y);n.state===nS&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=vp,n.timer.stop(),delete r[t];for(var d in r)return;delete e.__transition}}function xp(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>tS&&r.state<nS,r.state=vp,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[l]}o&&delete e.__transition}}function LG(e){return this.each(function(){xp(this,e)})}function qG(e,t){var n,r;return function(){var i=ri(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 BG(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=ri(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 zG(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=$r(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?qG:BG)(n,e,t))}function o2(e,t,n){var r=e._id;return e.each(function(){var i=ri(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return $r(i,r).value[t]}}function kD(e,t){var n;return(typeof t=="number"?Tr:t instanceof Wo?Cp:(n=Wo(t))?(t=n,Cp):AD)(e,t)}function HG(e){return function(){this.removeAttribute(e)}}function UG(e){return function(){this.removeAttributeNS(e.space,e.local)}}function GG(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 VG(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 FG(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 YG(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 XG(e,t){var n=Hm(e),r=n==="transform"?NG:kD;return this.attrTween(e,typeof t=="function"?(n.local?YG:FG)(n,r,o2(this,"attr."+e,t)):t==null?(n.local?UG:HG)(n):(n.local?VG:GG)(n,r,t))}function KG(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function WG(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function QG(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&WG(e,o)),n}return i._value=t,i}function ZG(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&KG(e,o)),n}return i._value=t,i}function JG(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=Hm(e);return this.tween(n,(r.local?QG:ZG)(r,t))}function eV(e,t){return function(){a2(this,e).delay=+t.apply(this,arguments)}}function tV(e,t){return t=+t,function(){a2(this,e).delay=t}}function nV(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?eV:tV)(t,e)):$r(this.node(),t).delay}function rV(e,t){return function(){ri(this,e).duration=+t.apply(this,arguments)}}function iV(e,t){return t=+t,function(){ri(this,e).duration=t}}function aV(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?rV:iV)(t,e)):$r(this.node(),t).duration}function oV(e,t){if(typeof t!="function")throw new Error;return function(){ri(this,e).ease=t}}function sV(e){var t=this._id;return arguments.length?this.each(oV(t,e)):$r(this.node(),t).ease}function lV(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;ri(this,e).ease=n}}function cV(e){if(typeof e!="function")throw new Error;return this.each(lV(this._id,e))}function uV(e){typeof e!="function"&&(e=cD(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 Hi(r,this._parents,this._name,this._id)}function fV(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,v=0;v<y;++v)(g=f[v]||d[v])&&(p[v]=g);for(;c<r;++c)l[c]=t[c];return new Hi(l,this._parents,this._name,this._id)}function dV(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 hV(e,t,n){var r,i,o=dV(t)?a2:ri;return function(){var l=o(this,e),c=l.on;c!==r&&(i=(r=c).copy()).on(t,n),l.on=i}}function pV(e,t){var n=this._id;return arguments.length<2?$r(this.node(),n).on.on(e):this.each(hV(n,e,t))}function mV(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function yV(){return this.on("end.remove",mV(this._id))}function gV(e){var t=this._name,n=this._id;typeof e!="function"&&(e=J_(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,Gm(d[g],t,n,g,d,$r(y,n)));return new Hi(o,this._parents,t,n)}function vV(e){var t=this._name,n=this._id;typeof e!="function"&&(e=lD(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),v,w=$r(y,n),S=0,b=g.length;S<b;++S)(v=g[S])&&Gm(v,t,n,S,g,w);o.push(g),l.push(y)}return new Hi(o,l,t,n)}var xV=Wf.prototype.constructor;function bV(){return new xV(this._groups,this._parents)}function wV(e,t){var n,r,i;return function(){var o=Rl(this,e),l=(this.style.removeProperty(e),Rl(this,e));return o===l?null:o===n&&l===r?i:i=t(n=o,r=l)}}function RD(e){return function(){this.style.removeProperty(e)}}function SV(e,t,n){var r,i=n+"",o;return function(){var l=Rl(this,e);return l===i?null:l===r?o:o=t(r=l,n)}}function _V(e,t,n){var r,i,o;return function(){var l=Rl(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Rl(this,e))),l===f?null:l===r&&f===i?o:(i=f,o=t(r=l,c))}}function jV(e,t){var n,r,i,o="style."+t,l="end."+o,c;return function(){var f=ri(this,e),d=f.on,y=f.value[o]==null?c||(c=RD(t)):void 0;(d!==n||i!==y)&&(r=(n=d).copy()).on(l,i=y),f.on=r}}function AV(e,t,n){var r=(e+="")=="transform"?AG:kD;return t==null?this.styleTween(e,wV(e,r)).on("end.style."+e,RD(e)):typeof t=="function"?this.styleTween(e,_V(e,r,o2(this,"style."+e,t))).each(jV(this._id,e)):this.styleTween(e,SV(e,r,t),n).on("end.style."+e,null)}function NV(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function OV(e,t,n){var r,i;function o(){var l=t.apply(this,arguments);return l!==i&&(r=(i=l)&&NV(e,l,n)),r}return o._value=t,o}function EV(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,OV(e,t,n??""))}function TV(e){return function(){this.textContent=e}}function CV(e){return function(){var t=e(this);this.textContent=t??""}}function MV(e){return this.tween("text",typeof e=="function"?CV(o2(this,"text",e)):TV(e==null?"":e+""))}function kV(e){return function(t){this.textContent=e.call(this,t)}}function RV(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&kV(i)),t}return r._value=e,r}function PV(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,RV(e))}function DV(){for(var e=this._name,t=this._id,n=PD(),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=$r(f,t);Gm(f,e,n,d,l,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new Hi(r,this._parents,e,n)}function $V(){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=ri(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 IV=0;function Hi(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function PD(){return++IV}var Ti=Wf.prototype;Hi.prototype={constructor:Hi,select:gV,selectAll:vV,selectChild:Ti.selectChild,selectChildren:Ti.selectChildren,filter:uV,merge:fV,selection:bV,transition:DV,call:Ti.call,nodes:Ti.nodes,node:Ti.node,size:Ti.size,empty:Ti.empty,each:Ti.each,on:pV,attr:XG,attrTween:JG,style:AV,styleTween:EV,text:MV,textTween:PV,remove:yV,tween:zG,delay:nV,duration:aV,ease:sV,easeVarying:cV,end:$V,[Symbol.iterator]:Ti[Symbol.iterator]};function LV(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var qV={time:null,delay:0,duration:250,ease:LV};function BV(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 zV(e){var t,n;e instanceof Hi?(t=e._id,e=e._name):(t=PD(),(n=qV).time=i2(),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])&&Gm(f,e,t,d,l,n||BV(f,t));return new Hi(r,this._parents,e,t)}Wf.prototype.interrupt=LG;Wf.prototype.transition=zV;const Uh=e=>()=>e;function HV(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 Di(e,t,n){this.k=e,this.x=t,this.y=n}Di.prototype={constructor:Di,scale:function(e){return e===1?this:new Di(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Di(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 Vm=new Di(1,0,0);DD.prototype=Di.prototype;function DD(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Vm;return e.__zoom}function Sv(e){e.stopImmediatePropagation()}function _u(e){e.preventDefault(),e.stopImmediatePropagation()}function UV(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function GV(){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 oT(){return this.__zoom||Vm}function VV(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function FV(){return navigator.maxTouchPoints||"ontouchstart"in this}function YV(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 $D(){var e=UV,t=GV,n=YV,r=VV,i=FV,o=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,f=yp,d=zm("start","zoom","end"),y,p,g,v=500,w=150,S=0,b=10;function j(P){P.property("__zoom",oT).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",G).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",L).on("touchend.zoom touchcancel.zoom",Y).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}j.transform=function(P,U,k,z){var H=P.selection?P.selection():P;H.property("__zoom",oT),P!==H?O(P,U,k,z):H.interrupt().each(function(){A(this,arguments).event(z).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},j.scaleBy=function(P,U,k,z){j.scaleTo(P,function(){var H=this.__zoom.k,F=typeof U=="function"?U.apply(this,arguments):U;return H*F},k,z)},j.scaleTo=function(P,U,k,z){j.transform(P,function(){var H=t.apply(this,arguments),F=this.__zoom,K=k==null?E(H):typeof k=="function"?k.apply(this,arguments):k,q=F.invert(K),V=typeof U=="function"?U.apply(this,arguments):U;return n(N(T(F,V),K,q),H,l)},k,z)},j.translateBy=function(P,U,k,z){j.transform(P,function(){return n(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof k=="function"?k.apply(this,arguments):k),t.apply(this,arguments),l)},null,z)},j.translateTo=function(P,U,k,z,H){j.transform(P,function(){var F=t.apply(this,arguments),K=this.__zoom,q=z==null?E(F):typeof z=="function"?z.apply(this,arguments):z;return n(Vm.translate(q[0],q[1]).scale(K.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof k=="function"?-k.apply(this,arguments):-k),F,l)},z,H)};function T(P,U){return U=Math.max(o[0],Math.min(o[1],U)),U===P.k?P:new Di(U,P.x,P.y)}function N(P,U,k){var z=U[0]-k[0]*P.k,H=U[1]-k[1]*P.k;return z===P.x&&H===P.y?P:new Di(P.k,z,H)}function E(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function O(P,U,k,z){P.on("start.zoom",function(){A(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(z).end()}).tween("zoom",function(){var H=this,F=arguments,K=A(H,F).event(z),q=t.apply(H,F),V=k==null?E(q):typeof k=="function"?k.apply(H,F):k,J=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),ae=H.__zoom,he=typeof U=="function"?U.apply(H,F):U,ge=f(ae.invert(V).concat(J/ae.k),he.invert(V).concat(J/he.k));return function(ee){if(ee===1)ee=he;else{var ne=ge(ee),Q=J/ne[2];ee=new Di(Q,V[0]-ne[0]*Q,V[1]-ne[1]*Q)}K.zoom(null,ee)}})}function A(P,U,k){return!k&&P.__zooming||new C(P,U)}function C(P,U){this.that=P,this.args=U,this.active=0,this.sourceEvent=null,this.extent=t.apply(P,U),this.taps=0}C.prototype={event:function(P){return P&&(this.sourceEvent=P),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,U){return this.mouse&&P!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var U=Fn(this.that).datum();d.call(P,this.that,new HV(P,{sourceEvent:this.sourceEvent,target:j,transform:this.that.__zoom,dispatch:d}),U)}};function R(P,...U){if(!e.apply(this,arguments))return;var k=A(this,U).event(P),z=this.__zoom,H=Math.max(o[0],Math.min(o[1],z.k*Math.pow(2,r.apply(this,arguments)))),F=Nr(P);if(k.wheel)(k.mouse[0][0]!==F[0]||k.mouse[0][1]!==F[1])&&(k.mouse[1]=z.invert(k.mouse[0]=F)),clearTimeout(k.wheel);else{if(z.k===H)return;k.mouse=[F,z.invert(F)],xp(this),k.start()}_u(P),k.wheel=setTimeout(K,w),k.zoom("mouse",n(N(T(z,H),k.mouse[0],k.mouse[1]),k.extent,l));function K(){k.wheel=null,k.end()}}function D(P,...U){if(g||!e.apply(this,arguments))return;var k=P.currentTarget,z=A(this,U,!0).event(P),H=Fn(P.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",J,!0),F=Nr(P,k),K=P.clientX,q=P.clientY;xD(P.view),Sv(P),z.mouse=[F,this.__zoom.invert(F)],xp(this),z.start();function V(ae){if(_u(ae),!z.moved){var he=ae.clientX-K,ge=ae.clientY-q;z.moved=he*he+ge*ge>S}z.event(ae).zoom("mouse",n(N(z.that.__zoom,z.mouse[0]=Nr(ae,k),z.mouse[1]),z.extent,l))}function J(ae){H.on("mousemove.zoom mouseup.zoom",null),bD(ae.view,z.moved),_u(ae),z.event(ae).end()}}function G(P,...U){if(e.apply(this,arguments)){var k=this.__zoom,z=Nr(P.changedTouches?P.changedTouches[0]:P,this),H=k.invert(z),F=k.k*(P.shiftKey?.5:2),K=n(N(T(k,F),z,H),t.apply(this,U),l);_u(P),c>0?Fn(this).transition().duration(c).call(O,K,z,P):Fn(this).call(j.transform,K,z,P)}}function I(P,...U){if(e.apply(this,arguments)){var k=P.touches,z=k.length,H=A(this,U,P.changedTouches.length===z).event(P),F,K,q,V;for(Sv(P),K=0;K<z;++K)q=k[K],V=Nr(q,this),V=[V,this.__zoom.invert(V),q.identifier],H.touch0?!H.touch1&&H.touch0[2]!==V[2]&&(H.touch1=V,H.taps=0):(H.touch0=V,F=!0,H.taps=1+!!y);y&&(y=clearTimeout(y)),F&&(H.taps<2&&(p=V[0],y=setTimeout(function(){y=null},v)),xp(this),H.start())}}function L(P,...U){if(this.__zooming){var k=A(this,U).event(P),z=P.changedTouches,H=z.length,F,K,q,V;for(_u(P),F=0;F<H;++F)K=z[F],q=Nr(K,this),k.touch0&&k.touch0[2]===K.identifier?k.touch0[0]=q:k.touch1&&k.touch1[2]===K.identifier&&(k.touch1[0]=q);if(K=k.that.__zoom,k.touch1){var J=k.touch0[0],ae=k.touch0[1],he=k.touch1[0],ge=k.touch1[1],ee=(ee=he[0]-J[0])*ee+(ee=he[1]-J[1])*ee,ne=(ne=ge[0]-ae[0])*ne+(ne=ge[1]-ae[1])*ne;K=T(K,Math.sqrt(ee/ne)),q=[(J[0]+he[0])/2,(J[1]+he[1])/2],V=[(ae[0]+ge[0])/2,(ae[1]+ge[1])/2]}else if(k.touch0)q=k.touch0[0],V=k.touch0[1];else return;k.zoom("touch",n(N(K,q,V),k.extent,l))}}function Y(P,...U){if(this.__zooming){var k=A(this,U).event(P),z=P.changedTouches,H=z.length,F,K;for(Sv(P),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),F=0;F<H;++F)K=z[F],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=Nr(K,this),Math.hypot(p[0]-K[0],p[1]-K[1])<b)){var q=Fn(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return j.wheelDelta=function(P){return arguments.length?(r=typeof P=="function"?P:Uh(+P),j):r},j.filter=function(P){return arguments.length?(e=typeof P=="function"?P:Uh(!!P),j):e},j.touchable=function(P){return arguments.length?(i=typeof P=="function"?P:Uh(!!P),j):i},j.extent=function(P){return arguments.length?(t=typeof P=="function"?P:Uh([[+P[0][0],+P[0][1]],[+P[1][0],+P[1][1]]]),j):t},j.scaleExtent=function(P){return arguments.length?(o[0]=+P[0],o[1]=+P[1],j):[o[0],o[1]]},j.translateExtent=function(P){return arguments.length?(l[0][0]=+P[0][0],l[1][0]=+P[1][0],l[0][1]=+P[0][1],l[1][1]=+P[1][1],j):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},j.constrain=function(P){return arguments.length?(n=P,j):n},j.duration=function(P){return arguments.length?(c=+P,j):c},j.interpolate=function(P){return arguments.length?(f=P,j):f},j.on=function(){var P=d.on.apply(d,arguments);return P===d?j:P},j.clickDistance=function(P){return arguments.length?(S=(P=+P)*P,j):Math.sqrt(S)},j.tapDistance=function(P){return arguments.length?(b=+P,j):b},j}const ei={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."},of=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ID=["Enter"," ","Escape"],LD={"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 Dl;(function(e){e.Strict="strict",e.Loose="loose"})(Dl||(Dl={}));var Yo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Yo||(Yo={}));var sf;(function(e){e.Partial="partial",e.Full="full"})(sf||(sf={}));const qD={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var La;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(La||(La={}));var Za;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Za||(Za={}));var Ne;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ne||(Ne={}));const sT={[Ne.Left]:Ne.Right,[Ne.Right]:Ne.Left,[Ne.Top]:Ne.Bottom,[Ne.Bottom]:Ne.Top};function BD(e){return e===null?null:e?"valid":"invalid"}const zD=e=>"id"in e&&"source"in e&&"target"in e,XV=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),s2=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Zf=(e,t=[0,0])=>{const{width:n,height:r}=Ki(e),i=e.origin??t,o=n*i[0],l=r*i[1];return{x:e.position.x-o,y:e.position.y-l}},KV=(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):s2(i)?i:t.nodeLookup.get(i.id));const c=l?Pp(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Fm(r,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ym(n)},Jf=(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=Fm(n,Pp(i)),r=!0)}),r?Ym(n):{x:0,y:0,width:0,height:0}},l2=(e,t,[n,r,i]=[0,0,1],o=!1,l=!1)=>{const c={...td(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 v=y.width??d.width??d.initialWidth??null,w=y.height??d.height??d.initialHeight??null,S=lf(c,Il(d)),b=(v??0)*(w??0),j=o&&S>0;(!d.internals.handleBounds||j||S>=b||d.dragging)&&f.push(d)}return f},WV=(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 QV(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 ZV({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:o},l){if(e.size===0)return Promise.resolve(!0);const c=QV(e,l),f=Jf(c),d=c2(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 HD({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",ei.error005());else{const v=c.measured.width,w=c.measured.height;v&&w&&(p=[[f,d],[f+v,d+w]])}else c&&Ll(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=Ll(p)?Zo(t,p,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(o==null||o("015",ei.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 JV({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 v=o.has(g.id),w=!v&&g.parentId&&l.find(S=>S.id===g.parentId);(v||w)&&l.push(g)}const c=new Set(t.map(g=>g.id)),f=r.filter(g=>g.deletable!==!1),y=WV(l,f);for(const g of f)c.has(g.id)&&!y.find(w=>w.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 $l=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Zo=(e={x:0,y:0},t,n)=>({x:$l(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:$l(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function UD(e,t,n){const{width:r,height:i}=Ki(n),{x:o,y:l}=n.internals.positionAbsolute;return Zo(e,[[o,l],[o+r,l+i]],t)}const lT=(e,t,n)=>e<t?$l(Math.abs(e-t),1,t)/t:e>n?-$l(Math.abs(e-n),1,t)/t:0,GD=(e,t,n=15,r=40)=>{const i=lT(e.x,r,t.width-r)*n,o=lT(e.y,r,t.height-r)*n;return[i,o]},Fm=(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)}),rS=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Ym=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Il=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=s2(e)?e.internals.positionAbsolute:Zf(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}},Pp=(e,t=[0,0])=>{var i,o;const{x:n,y:r}=s2(e)?e.internals.positionAbsolute:Zf(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)}},VD=(e,t)=>Ym(Fm(rS(e),rS(t))),lf=(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)},cT=e=>Mr(e.width)&&Mr(e.height)&&Mr(e.x)&&Mr(e.y),Mr=e=>!isNaN(e)&&isFinite(e),eF=(e,t)=>{},ed=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),td=({x:e,y:t},[n,r,i],o=!1,l=[1,1])=>{const c={x:(e-n)/i,y:(t-r)/i};return o?ed(c,l):c},Dp=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Js(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 tF(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Js(e,n),i=Js(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=Js(e.top??e.y??0,n),i=Js(e.bottom??e.y??0,n),o=Js(e.left??e.x??0,t),l=Js(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 nF(e,t,n,r,i,o){const{x:l,y:c}=Dp(e,[t,n,r]),{x:f,y:d}=Dp({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 c2=(e,t,n,r,i,o)=>{const l=tF(o,t,n),c=(t-l.x)/e.width,f=(n-l.y)/e.height,d=Math.min(c,f),y=$l(d,r,i),p=e.x+e.width/2,g=e.y+e.height/2,v=t/2-p*y,w=n/2-g*y,S=nF(e,v,w,y,t,n),b={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:v-b.left+b.right,y:w-b.top+b.bottom,zoom:y}},cf=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ll(e){return e!=null&&e!=="parent"}function Ki(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 FD(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 YD(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 uT(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function rF(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function iF(e){return{...LD,...e||{}}}function Hu(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:o,y:l}=kr(e),c=td({x:o-((i==null?void 0:i.left)??0),y:l-((i==null?void 0:i.top)??0)},r),{x:f,y:d}=n?ed(c,t):c;return{xSnapped:f,ySnapped:d,...c}}const u2=e=>({width:e.offsetWidth,height:e.offsetHeight}),XD=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},aF=["INPUT","SELECT","TEXTAREA"];function KD(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:aF.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const WD=e=>"clientX"in e,kr=(e,t)=>{var o,l;const n=WD(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)}},fT=(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,...u2(l)}})};function QD({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 Gh(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function dT({pos:e,x1:t,y1:n,x2:r,y2:i,c:o}){switch(e){case Ne.Left:return[t-Gh(t-r,o),n];case Ne.Right:return[t+Gh(r-t,o),n];case Ne.Top:return[t,n-Gh(n-i,o)];case Ne.Bottom:return[t,n+Gh(i-n,o)]}}function ZD({sourceX:e,sourceY:t,sourcePosition:n=Ne.Bottom,targetX:r,targetY:i,targetPosition:o=Ne.Top,curvature:l=.25}){const[c,f]=dT({pos:n,x1:e,y1:t,x2:r,y2:i,c:l}),[d,y]=dT({pos:o,x1:r,y1:i,x2:e,y2:t,c:l}),[p,g,v,w]=QD({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,v,w]}function JD({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 oF({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 sF({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const o=Fm(Pp(e),Pp(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 lf(l,Ym(o))>0}const lF=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,cF=(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)),uF=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||lF;let i;return zD(e)?i={...e}:i={...e,id:r(e)},cF(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function e$({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,o,l,c]=JD({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,o,l,c]}const hT={[Ne.Left]:{x:-1,y:0},[Ne.Right]:{x:1,y:0},[Ne.Top]:{x:0,y:-1},[Ne.Bottom]:{x:0,y:1}},fF=({source:e,sourcePosition:t=Ne.Bottom,target:n})=>t===Ne.Left||t===Ne.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},pT=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function dF({source:e,sourcePosition:t=Ne.Bottom,target:n,targetPosition:r=Ne.Top,center:i,offset:o,stepPosition:l}){const c=hT[t],f=hT[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=fF({source:d,sourcePosition:t,target:y}),g=p.x!==0?"x":"y",v=p[g];let w=[],S,b;const j={x:0,y:0},T={x:0,y:0},[,,N,E]=JD({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,b=i.y??(d.y+y.y)/2):(S=i.x??(d.x+y.x)/2,b=i.y??d.y+(y.y-d.y)*l);const R=[{x:S,y:d.y},{x:S,y:y.y}],D=[{x:d.x,y:b},{x:y.x,y:b}];c[g]===v?w=g==="x"?R:D:w=g==="x"?D:R}else{const R=[{x:d.x,y:y.y}],D=[{x:y.x,y:d.y}];if(g==="x"?w=c.x===v?D:R:w=c.y===v?R:D,t===r){const P=Math.abs(e[g]-n[g]);if(P<=o){const U=Math.min(o-1,o-P);c[g]===v?j[g]=(d[g]>e[g]?-1:1)*U:T[g]=(y[g]>n[g]?-1:1)*U}}if(t!==r){const P=g==="x"?"y":"x",U=c[g]===f[P],k=d[P]>y[P],z=d[P]<y[P];(c[g]===1&&(!U&&k||U&&z)||c[g]!==1&&(!U&&z||U&&k))&&(w=g==="x"?R:D)}const G={x:d.x+j.x,y:d.y+j.y},I={x:y.x+T.x,y:y.y+T.y},L=Math.max(Math.abs(G.x-w[0].x),Math.abs(I.x-w[0].x)),Y=Math.max(Math.abs(G.y-w[0].y),Math.abs(I.y-w[0].y));L>=Y?(S=(G.x+I.x)/2,b=w[0].y):(S=w[0].x,b=(G.y+I.y)/2)}const O={x:d.x+j.x,y:d.y+j.y},A={x:y.x+T.x,y:y.y+T.y};return[[e,...O.x!==w[0].x||O.y!==w[0].y?[O]:[],...w,...A.x!==w[w.length-1].x||A.y!==w[w.length-1].y?[A]:[],n],S,b,N,E]}function hF(e,t,n,r){const i=Math.min(pT(e,t)/2,pT(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 iS({sourceX:e,sourceY:t,sourcePosition:n=Ne.Bottom,targetX:r,targetY:i,targetPosition:o=Ne.Top,borderRadius:l=5,centerX:c,centerY:f,offset:d=20,stepPosition:y=.5}){const[p,g,v,w,S]=dF({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:c,y:f},offset:d,stepPosition:y});let b=`M${p[0].x} ${p[0].y}`;for(let j=1;j<p.length-1;j++)b+=hF(p[j-1],p[j],p[j+1],l);return b+=`L${p[p.length-1].x} ${p[p.length-1].y}`,[b,g,v,w,S]}function mT(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function pF(e){var p;const{sourceNode:t,targetNode:n}=e;if(!mT(t)||!mT(n))return null;const r=t.internals.handleBounds||yT(t.handles),i=n.internals.handleBounds||yT(n.handles),o=gT((r==null?void 0:r.source)??[],e.sourceHandle),l=gT(e.connectionMode===Dl.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",ei.error008(o?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(o==null?void 0:o.position)||Ne.Bottom,f=(l==null?void 0:l.position)||Ne.Top,d=Jo(t,o,c),y=Jo(n,l,f);return{sourceX:d.x,sourceY:d.y,targetX:y.x,targetY:y.y,sourcePosition:c,targetPosition:f}}function yT(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 Jo(e,t,n=Ne.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??Ki(e);if(r)return{x:i+l/2,y:o+c/2};switch((t==null?void 0:t.position)??n){case Ne.Top:return{x:i+l/2,y:o};case Ne.Right:return{x:i+l,y:o+c/2};case Ne.Bottom:return{x:i+l/2,y:o+c};case Ne.Left:return{x:i,y:o+c/2}}}function gT(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function aS(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function mF(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=aS(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 t$=1e3,yF=10,f2={nodeOrigin:[0,0],nodeExtent:of,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},gF={...f2,checkEquality:!0};function d2(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function vF(e,t,n){const r=d2(f2,n);for(const i of e.values())if(i.parentId)p2(i,e,t,r);else{const o=Zf(i,r.nodeOrigin),l=Ll(i.extent)?i.extent:r.nodeExtent,c=Zo(o,l,Ki(i));i.internals.positionAbsolute=c}}function xF(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 h2(e){return e==="manual"}function oS(e,t,n,r={}){var y,p;const i=d2(gF,r),o={i:0},l=new Map(t),c=i!=null&&i.elevateNodesOnSelect&&!h2(i.zIndexMode)?t$:0;let f=e.length>0,d=!1;t.clear(),n.clear();for(const g of e){let v=l.get(g.id);if(i.checkEquality&&g===(v==null?void 0:v.internals.userNode))t.set(g.id,v);else{const w=Zf(g,i.nodeOrigin),S=Ll(g.extent)?g.extent:i.nodeExtent,b=Zo(w,S,Ki(g));v={...i.defaults,...g,measured:{width:(y=g.measured)==null?void 0:y.width,height:(p=g.measured)==null?void 0:p.height},internals:{positionAbsolute:b,handleBounds:xF(g,v),z:n$(g,c,i.zIndexMode),userNode:g}},t.set(g.id,v)}(v.measured===void 0||v.measured.width===void 0||v.measured.height===void 0)&&!v.hidden&&(f=!1),g.parentId&&p2(v,t,n,r,o),d||(d=g.selected??!1)}return{nodesInitialized:f,hasSelectedNodes:d}}function bF(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 p2(e,t,n,r,i){const{elevateNodesOnSelect:o,nodeOrigin:l,nodeExtent:c,zIndexMode:f}=d2(f2,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}bF(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*yF),i&&y.internals.rootParentIndex!==void 0&&(i.i=y.internals.rootParentIndex);const p=o&&!h2(f)?t$:0,{x:g,y:v,z:w}=wF(e,y,l,c,p,f),{positionAbsolute:S}=e.internals,b=g!==S.x||v!==S.y;(b||w!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:g,y:v}:S,z:w}})}function n$(e,t,n){const r=Mr(e.zIndex)?e.zIndex:0;return h2(n)?r:r+(e.selected?t:0)}function wF(e,t,n,r,i,o){const{x:l,y:c}=t.internals.positionAbsolute,f=Ki(e),d=Zf(e,n),y=Ll(e.extent)?Zo(d,e.extent,f):d;let p=Zo({x:l+y.x,y:c+y.y},r,f);e.extent==="parent"&&(p=UD(p,f,t));const g=n$(e,i,o),v=t.internals.z??0;return{x:p.x,y:p.y,z:v>=g?v+1:g}}function m2(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)??Il(f),y=VD(d,c.rect);o.set(c.parentId,{expandedRect:y,parent:f})}return o.size>0&&o.forEach(({expandedRect:c,parent:f},d)=>{var N;const y=f.internals.positionAbsolute,p=Ki(f),g=f.origin??r,v=c.x<y.x?Math.round(Math.abs(y.x-c.x)):0,w=c.y<y.y?Math.round(Math.abs(y.y-c.y)):0,S=Math.max(p.width,Math.round(c.width)),b=Math.max(p.height,Math.round(c.height)),j=(S-p.width)*g[0],T=(b-p.height)*g[1];(v>0||w>0||j||T)&&(i.push({id:d,type:"position",position:{x:f.position.x-v+j,y:f.position.y-w+T}}),(N=n.get(d))==null||N.forEach(E=>{e.some(O=>O.id===E.id)||i.push({id:E.id,type:"position",position:{x:E.position.x+v,y:E.position.y+w}})})),(p.width<c.width||p.height<c.height||v||w)&&i.push({id:d,type:"dimensions",setAttributes:!0,dimensions:{width:S+(v?g[0]*v-j:0),height:b+(w?g[1]*w-T:0)}})}),i}function SF(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 v of e.values()){const w=t.get(v.id);if(!w)continue;if(w.hidden){t.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),f=!0;continue}const S=u2(v.nodeElement),b=w.measured.width!==S.width||w.measured.height!==S.height;if(!!(S.width&&S.height&&(b||!w.internals.handleBounds||v.force))){const T=v.nodeElement.getBoundingClientRect(),N=Ll(w.extent)?w.extent:o;let{positionAbsolute:E}=w.internals;w.parentId&&w.extent==="parent"?E=UD(E,S,t.get(w.parentId)):N&&(E=Zo(E,N,S));const O={...w,measured:S,internals:{...w.internals,positionAbsolute:E,handleBounds:{source:fT("source",v.nodeElement,T,p,w.id),target:fT("target",v.nodeElement,T,p,w.id)}}};t.set(w.id,O),w.parentId&&p2(O,t,n,{nodeOrigin:i,zIndexMode:l}),f=!0,b&&(d.push({id:w.id,type:"dimensions",dimensions:S}),w.expandParent&&w.parentId&&g.push({id:w.id,parentId:w.parentId,rect:Il(O,i)}))}}if(g.length>0){const v=m2(g,t,n,i);d.push(...v)}return{changes:d,updatedInternals:f}}async function _F({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 vT(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 r$(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}`;vT("source",f,y,e,i,l),vT("target",f,d,e,o,c),t.set(r.id,r)}}function i$(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:i$(n,t):!1}function xT(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 jF(e,t,n,r){const i=new Map;for(const[o,l]of e)if((l.selected||l.id===r)&&(!l.parentId||!i$(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 _v({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 AF({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=ed(o,t);return{x:l.x-o.x,y:l.y-o.y}}function NF({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,v=!1,w=!1,S=null;function b({noDragClassName:T,handleSelector:N,domNode:E,isSelectable:O,nodeId:A,nodeClickDistance:C=0}){g=Fn(E);function R({x:L,y:Y}){const{nodeLookup:P,nodeExtent:U,snapGrid:k,snapToGrid:z,nodeOrigin:H,onNodeDrag:F,onSelectionDrag:K,onError:q,updateNodePositions:V}=t();o={x:L,y:Y};let J=!1;const ae=c.size>1,he=ae&&U?rS(Jf(c)):null,ge=ae&&z?AF({dragItems:c,snapGrid:k,x:L,y:Y}):null;for(const[ee,ne]of c){if(!P.has(ee))continue;let Q={x:L-ne.distance.x,y:Y-ne.distance.y};z&&(Q=ge?{x:Math.round(Q.x+ge.x),y:Math.round(Q.y+ge.y)}:ed(Q,k));let ye=null;if(ae&&U&&!ne.extent&&he){const{positionAbsolute:be}=ne.internals,Se=be.x-he.x+U[0][0],Te=be.x+ne.measured.width-he.x2+U[1][0],Ae=be.y-he.y+U[0][1],Ue=be.y+ne.measured.height-he.y2+U[1][1];ye=[[Se,Ae],[Te,Ue]]}const{position:ce,positionAbsolute:re}=HD({nodeId:ee,nextPosition:Q,nodeLookup:P,nodeExtent:ye||U,nodeOrigin:H,onError:q});J=J||ne.position.x!==ce.x||ne.position.y!==ce.y,ne.position=ce,ne.internals.positionAbsolute=re}if(w=w||J,!!J&&(V(c,!0),S&&(r||F||!A&&K))){const[ee,ne]=_v({nodeId:A,dragItems:c,nodeLookup:P});r==null||r(S,c,ee,ne),F==null||F(S,ee,ne),A||K==null||K(S,ne)}}async function D(){if(!y)return;const{transform:L,panBy:Y,autoPanSpeed:P,autoPanOnNodeDrag:U}=t();if(!U){f=!1,cancelAnimationFrame(l);return}const[k,z]=GD(d,y,P);(k!==0||z!==0)&&(o.x=(o.x??0)-k/L[2],o.y=(o.y??0)-z/L[2],await Y({x:k,y:z})&&R(o)),l=requestAnimationFrame(D)}function G(L){var ae;const{nodeLookup:Y,multiSelectionActive:P,nodesDraggable:U,transform:k,snapGrid:z,snapToGrid:H,selectNodesOnDrag:F,onNodeDragStart:K,onSelectionDragStart:q,unselectNodesAndEdges:V}=t();p=!0,(!F||!O)&&!P&&A&&((ae=Y.get(A))!=null&&ae.selected||V()),O&&F&&A&&(e==null||e(A));const J=Hu(L.sourceEvent,{transform:k,snapGrid:z,snapToGrid:H,containerBounds:y});if(o=J,c=jF(Y,U,J,A),c.size>0&&(n||K||!A&&q)){const[he,ge]=_v({nodeId:A,dragItems:c,nodeLookup:Y});n==null||n(L.sourceEvent,c,he,ge),K==null||K(L.sourceEvent,he,ge),A||q==null||q(L.sourceEvent,ge)}}const I=wD().clickDistance(C).on("start",L=>{const{domNode:Y,nodeDragThreshold:P,transform:U,snapGrid:k,snapToGrid:z}=t();y=(Y==null?void 0:Y.getBoundingClientRect())||null,v=!1,w=!1,S=L.sourceEvent,P===0&&G(L),o=Hu(L.sourceEvent,{transform:U,snapGrid:k,snapToGrid:z,containerBounds:y}),d=kr(L.sourceEvent,y)}).on("drag",L=>{const{autoPanOnNodeDrag:Y,transform:P,snapGrid:U,snapToGrid:k,nodeDragThreshold:z,nodeLookup:H}=t(),F=Hu(L.sourceEvent,{transform:P,snapGrid:U,snapToGrid:k,containerBounds:y});if(S=L.sourceEvent,(L.sourceEvent.type==="touchmove"&&L.sourceEvent.touches.length>1||A&&!H.has(A))&&(v=!0),!v){if(!f&&Y&&p&&(f=!0,D()),!p){const K=kr(L.sourceEvent,y),q=K.x-d.x,V=K.y-d.y;Math.sqrt(q*q+V*V)>z&&G(L)}(o.x!==F.xSnapped||o.y!==F.ySnapped)&&c&&p&&(d=kr(L.sourceEvent,y),R(F))}}).on("end",L=>{if(!(!p||v)&&(f=!1,p=!1,cancelAnimationFrame(l),c.size>0)){const{nodeLookup:Y,updateNodePositions:P,onNodeDragStop:U,onSelectionDragStop:k}=t();if(w&&(P(c,!1),w=!1),i||U||!A&&k){const[z,H]=_v({nodeId:A,dragItems:c,nodeLookup:Y,dragging:!1});i==null||i(L.sourceEvent,c,z,H),U==null||U(L.sourceEvent,z,H),A||k==null||k(L.sourceEvent,H)}}}).filter(L=>{const Y=L.target;return!L.button&&(!T||!xT(Y,`.${T}`,E))&&(!N||xT(Y,N,E))});g.call(I)}function j(){g==null||g.on(".drag",null)}return{update:b,destroy:j}}function OF(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())lf(i,Il(o))>0&&r.push(o);return r}const EF=250;function TF(e,t,n,r){var c,f;let i=[],o=1/0;const l=OF(e,n,t+EF);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:v}=Jo(d,p,p.position,!0),w=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));w>t||(w<o?(i=[{...p,x:g,y:v}],o=w):w===o&&i.push({...p,x:g,y:v}))}}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 a$(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,...Jo(l,f,f.position,!0)}:f}function o$(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function CF(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const s$=()=>!0;function MF(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:v,onConnectStart:w,onConnect:S,onConnectEnd:b,isValidConnection:j=s$,onReconnectEnd:T,updateConnection:N,getTransform:E,getFromHandle:O,autoPanSpeed:A,dragThreshold:C=1,handleDomNode:R}){const D=XD(e.target);let G=0,I;const{x:L,y:Y}=kr(e),P=o$(o,R),U=c==null?void 0:c.getBoundingClientRect();let k=!1;if(!U||!P)return;const z=a$(i,P,r,f,t);if(!z)return;let H=kr(e,U),F=!1,K=null,q=!1,V=null;function J(){if(!y||!U)return;const[ce,re]=GD(H,U,A);g({x:ce,y:re}),G=requestAnimationFrame(J)}const ae={...z,nodeId:i,type:P,position:z.position},he=f.get(i);let ee={inProgress:!0,isValid:null,from:Jo(he,ae,Ne.Left,!0),fromHandle:ae,fromPosition:ae.position,fromNode:he,to:H,toHandle:null,toPosition:sT[ae.position],toNode:null,pointer:H};function ne(){k=!0,N(ee),w==null||w(e,{nodeId:i,handleId:r,handleType:P})}C===0&&ne();function Q(ce){if(!k){const{x:Ue,y:xt}=kr(ce),jt=Ue-L,Zt=xt-Y;if(!(jt*jt+Zt*Zt>C*C))return;ne()}if(!O()||!ae){ye(ce);return}const re=E();H=kr(ce,U),I=TF(td(H,re,!1,[1,1]),n,f,ae),F||(J(),F=!0);const be=l$(ce,{handle:I,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:l?"target":"source",isValidConnection:j,doc:D,lib:d,flowId:p,nodeLookup:f});V=be.handleDomNode,K=be.connection,q=CF(!!I,be.isValid);const Se=f.get(i),Te=Se?Jo(Se,ae,Ne.Left,!0):ee.from,Ae={...ee,from:Te,isValid:q,to:be.toHandle&&q?Dp({x:be.toHandle.x,y:be.toHandle.y},re):H,toHandle:be.toHandle,toPosition:q&&be.toHandle?be.toHandle.position:sT[ae.position],toNode:be.toHandle?f.get(be.toHandle.nodeId):null,pointer:H};N(Ae),ee=Ae}function ye(ce){if(!("touches"in ce&&ce.touches.length>0)){if(k){(I||V)&&K&&q&&(S==null||S(K));const{inProgress:re,...be}=ee,Se={...be,toPosition:ee.toHandle?ee.toPosition:null};b==null||b(ce,Se),o&&(T==null||T(ce,Se))}v(),cancelAnimationFrame(G),F=!1,q=!1,K=null,V=null,D.removeEventListener("mousemove",Q),D.removeEventListener("mouseup",ye),D.removeEventListener("touchmove",Q),D.removeEventListener("touchend",ye)}}D.addEventListener("mousemove",Q),D.addEventListener("mouseup",ye),D.addEventListener("touchmove",Q),D.addEventListener("touchend",ye)}function l$(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:l,lib:c,flowId:f,isValidConnection:d=s$,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:v,y:w}=kr(e),S=l.elementFromPoint(v,w),b=S!=null&&S.classList.contains(`${c}-flow__handle`)?S:g,j={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const T=o$(void 0,b),N=b.getAttribute("data-nodeid"),E=b.getAttribute("data-handleid"),O=b.classList.contains("connectable"),A=b.classList.contains("connectableend");if(!N||!T)return j;const C={source:p?N:r,sourceHandle:p?E:i,target:p?r:N,targetHandle:p?i:E};j.connection=C;const D=O&&A&&(n===Dl.Strict?p&&T==="source"||!p&&T==="target":N!==r||E!==i);j.isValid=D&&d(C),j.toHandle=a$(N,T,E,y,n,!0)}return j}const sS={onPointerDown:MF,isValid:l$};function kF({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Fn(e);function o({translateExtent:c,width:f,height:d,zoomStep:y=1,pannable:p=!0,zoomable:g=!0,inversePan:v=!1}){const w=N=>{if(N.sourceEvent.type!=="wheel"||!t)return;const E=n(),O=N.sourceEvent.ctrlKey&&cf()?10:1,A=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*y,C=E[2]*Math.pow(2,A*O);t.scaleTo(C)};let S=[0,0];const b=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(S=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},j=N=>{const E=n();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!t)return;const O=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],A=[O[0]-S[0],O[1]-S[1]];S=O;const C=r()*Math.max(E[2],Math.log(E[2]))*(v?-1:1),R={x:E[0]-A[0]*C,y:E[1]-A[1]*C},D=[[0,0],[f,d]];t.setViewportConstrained({x:R.x,y:R.y,zoom:E[2]},D,c)},T=$D().on("start",b).on("zoom",p?j:null).on("zoom.wheel",g?w:null);i.call(T,{})}function l(){i.on("zoom",null)}return{update:o,destroy:l,pointer:Nr}}const Xm=e=>({x:e.x,y:e.y,zoom:e.k}),jv=({x:e,y:t,zoom:n})=>Vm.translate(e,t).scale(n),ol=(e,t)=>e.target.closest(`.${t}`),c$=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),RF=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Av=(e,t=0,n=RF,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},u$=e=>{const t=e.ctrlKey&&cf()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function PF({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:l,onPanZoomStart:c,onPanZoom:f,onPanZoomEnd:d}){return y=>{if(ol(y,t))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const p=n.property("__zoom").k||1;if(y.ctrlKey&&l){const b=Nr(y),j=u$(y),T=p*Math.pow(2,j);r.scaleTo(n,T,b,y);return}const g=y.deltaMode===1?20:1;let v=i===Yo.Vertical?0:y.deltaX*g,w=i===Yo.Horizontal?0:y.deltaY*g;!cf()&&y.shiftKey&&i!==Yo.Vertical&&(v=y.deltaY*g,w=0),r.translateBy(n,-(v/p)*o,-(w/p)*o,{internal:!0});const S=Xm(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 DF({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const o=r.type==="wheel",l=!t&&o&&!r.ctrlKey,c=ol(r,e);if(r.ctrlKey&&o&&c&&r.preventDefault(),l||c)return null;r.preventDefault(),n.call(this,r,i)}}function $F({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var o,l,c;if((o=r.sourceEvent)!=null&&o.internal)return;const i=Xm(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 IF({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{var l,c;e.usedRightMouseButton=!!(n&&c$(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,Xm(o.transform)))}}function LF({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&&c$(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&o(l.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const f=Xm(l.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(l.sourceEvent,f)},n?150:0)}}}function qF({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 b;const g=e||t,v=n&&p.ctrlKey,w=p.type==="wheel";if(p.button===1&&p.type==="mousedown"&&(ol(p,`${d}-flow__node`)||ol(p,`${d}-flow__edge`)))return!0;if(!r&&!g&&!i&&!o&&!n||l||y&&!w||ol(p,c)&&w||ol(p,f)&&(!w||i&&w&&!e)||!n&&p.ctrlKey&&w)return!1;if(!n&&p.type==="touchstart"&&((b=p.touches)==null?void 0:b.length)>1)return p.preventDefault(),!1;if(!g&&!i&&!v&&w||!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||w)&&S}}function BF({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=$D().scaleExtent([t,n]).translateExtent(r),g=Fn(e).call(p);T({x:i.x,y:i.y,zoom:$l(i.zoom,t,n)},[[0,0],[y.width,y.height]],r);const v=g.on("wheel.zoom"),w=g.on("dblclick.zoom");p.wheelDelta(u$);function S(I,L){return g?new Promise(Y=>{p==null||p.interpolate((L==null?void 0:L.interpolate)==="linear"?qi:yp).transform(Av(g,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>Y(!0)),I)}):Promise.resolve(!1)}function b({noWheelClassName:I,noPanClassName:L,onPaneContextMenu:Y,userSelectionActive:P,panOnScroll:U,panOnDrag:k,panOnScrollMode:z,panOnScrollSpeed:H,preventScrolling:F,zoomOnPinch:K,zoomOnScroll:q,zoomOnDoubleClick:V,zoomActivationKeyPressed:J,lib:ae,onTransformChange:he,connectionInProgress:ge,paneClickDistance:ee,selectionOnDrag:ne}){P&&!d.isZoomingOrPanning&&j();const Q=U&&!J&&!P;p.clickDistance(ne?1/0:!Mr(ee)||ee<0?0:ee);const ye=Q?PF({zoomPanValues:d,noWheelClassName:I,d3Selection:g,d3Zoom:p,panOnScrollMode:z,panOnScrollSpeed:H,zoomOnPinch:K,onPanZoomStart:l,onPanZoom:o,onPanZoomEnd:c}):DF({noWheelClassName:I,preventScrolling:F,d3ZoomHandler:v});if(g.on("wheel.zoom",ye,{passive:!1}),!P){const re=$F({zoomPanValues:d,onDraggingChange:f,onPanZoomStart:l});p.on("start",re);const be=IF({zoomPanValues:d,panOnDrag:k,onPaneContextMenu:!!Y,onPanZoom:o,onTransformChange:he});p.on("zoom",be);const Se=LF({zoomPanValues:d,panOnDrag:k,panOnScroll:U,onPaneContextMenu:Y,onPanZoomEnd:c,onDraggingChange:f});p.on("end",Se)}const ce=qF({zoomActivationKeyPressed:J,panOnDrag:k,zoomOnScroll:q,panOnScroll:U,zoomOnDoubleClick:V,zoomOnPinch:K,userSelectionActive:P,noPanClassName:L,noWheelClassName:I,lib:ae,connectionInProgress:ge});p.filter(ce),V?g.on("dblclick.zoom",w):g.on("dblclick.zoom",null)}function j(){p.on("zoom",null)}async function T(I,L,Y){const P=jv(I),U=p==null?void 0:p.constrain()(P,L,Y);return U&&await S(U),new Promise(k=>k(U))}async function N(I,L){const Y=jv(I);return await S(Y,L),new Promise(P=>P(Y))}function E(I){if(g){const L=jv(I),Y=g.property("__zoom");(Y.k!==I.zoom||Y.x!==I.x||Y.y!==I.y)&&(p==null||p.transform(g,L,null,{sync:!0}))}}function O(){const I=g?DD(g.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function A(I,L){return g?new Promise(Y=>{p==null||p.interpolate((L==null?void 0:L.interpolate)==="linear"?qi:yp).scaleTo(Av(g,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>Y(!0)),I)}):Promise.resolve(!1)}function C(I,L){return g?new Promise(Y=>{p==null||p.interpolate((L==null?void 0:L.interpolate)==="linear"?qi:yp).scaleBy(Av(g,L==null?void 0:L.duration,L==null?void 0:L.ease,()=>Y(!0)),I)}):Promise.resolve(!1)}function R(I){p==null||p.scaleExtent(I)}function D(I){p==null||p.translateExtent(I)}function G(I){const L=!Mr(I)||I<0?0:I;p==null||p.clickDistance(L)}return{update:b,destroy:j,setViewport:N,setViewportConstrained:T,getViewport:O,scaleTo:A,scaleBy:C,setScaleExtent:R,setTranslateExtent:D,syncViewport:E,setClickDistance:G}}var ql;(function(e){e.Line="line",e.Handle="handle"})(ql||(ql={}));function zF({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 bT(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 Ma(e,t){return Math.max(0,t-e)}function ka(e,t){return Math.max(0,e-t)}function Vh(e,t,n){return Math.max(0,t-e,e-n)}function wT(e,t){return e?!t:t}function HF(e,t,n,r,i,o,l,c){let{affectsX:f,affectsY:d}=t;const{isHorizontal:y,isVertical:p}=t,g=y&&p,{xSnapped:v,ySnapped:w}=n,{minWidth:S,maxWidth:b,minHeight:j,maxHeight:T}=r,{x:N,y:E,width:O,height:A,aspectRatio:C}=e;let R=Math.floor(y?v-e.pointerX:0),D=Math.floor(p?w-e.pointerY:0);const G=O+(f?-R:R),I=A+(d?-D:D),L=-o[0]*O,Y=-o[1]*A;let P=Vh(G,S,b),U=Vh(I,j,T);if(l){let H=0,F=0;f&&R<0?H=Ma(N+R+L,l[0][0]):!f&&R>0&&(H=ka(N+G+L,l[1][0])),d&&D<0?F=Ma(E+D+Y,l[0][1]):!d&&D>0&&(F=ka(E+I+Y,l[1][1])),P=Math.max(P,H),U=Math.max(U,F)}if(c){let H=0,F=0;f&&R>0?H=ka(N+R,c[0][0]):!f&&R<0&&(H=Ma(N+G,c[1][0])),d&&D>0?F=ka(E+D,c[0][1]):!d&&D<0&&(F=Ma(E+I,c[1][1])),P=Math.max(P,H),U=Math.max(U,F)}if(i){if(y){const H=Vh(G/C,j,T)*C;if(P=Math.max(P,H),l){let F=0;!f&&!d||f&&!d&&g?F=ka(E+Y+G/C,l[1][1])*C:F=Ma(E+Y+(f?R:-R)/C,l[0][1])*C,P=Math.max(P,F)}if(c){let F=0;!f&&!d||f&&!d&&g?F=Ma(E+G/C,c[1][1])*C:F=ka(E+(f?R:-R)/C,c[0][1])*C,P=Math.max(P,F)}}if(p){const H=Vh(I*C,S,b)/C;if(U=Math.max(U,H),l){let F=0;!f&&!d||d&&!f&&g?F=ka(N+I*C+L,l[1][0])/C:F=Ma(N+(d?D:-D)*C+L,l[0][0])/C,U=Math.max(U,F)}if(c){let F=0;!f&&!d||d&&!f&&g?F=Ma(N+I*C,c[1][0])/C:F=ka(N+(d?D:-D)*C,c[0][0])/C,U=Math.max(U,F)}}}D=D+(D<0?U:-U),R=R+(R<0?P:-P),i&&(g?G>I*C?D=(wT(f,d)?-R:R)/C:R=(wT(f,d)?-D:D)*C:y?(D=R/C,d=f):(R=D*C,f=d));const k=f?N+R:N,z=d?E+D:E;return{width:O+(f?-R:R),height:A+(d?-D:D),x:o[0]*R*(f?-1:1)+k,y:o[1]*D*(d?-1:1)+z}}const f$={width:0,height:0,x:0,y:0},UF={...f$,pointerX:0,pointerY:0,aspectRatio:1};function GF(e){return[[0,0],[e.measured.width,e.measured.height]]}function VF(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 FF({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const o=Fn(e);let l={controlDirection:bT("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:v,onResize:w,onResizeEnd:S,shouldResize:b}){let j={...f$},T={...UF};l={boundaries:y,resizeDirection:g,keepAspectRatio:p,controlDirection:bT(d)};let N,E=null,O=[],A,C,R,D=!1;const G=wD().on("start",I=>{const{nodeLookup:L,transform:Y,snapGrid:P,snapToGrid:U,nodeOrigin:k,paneDomNode:z}=n();if(N=L.get(t),!N)return;E=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:H,ySnapped:F}=Hu(I.sourceEvent,{transform:Y,snapGrid:P,snapToGrid:U,containerBounds:E});j={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},T={...j,pointerX:H,pointerY:F,aspectRatio:j.width/j.height},A=void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(A=L.get(N.parentId),C=A&&N.extent==="parent"?GF(A):void 0),O=[],R=void 0;for(const[K,q]of L)if(q.parentId===t&&(O.push({id:K,position:{...q.position},extent:q.extent}),q.extent==="parent"||q.expandParent)){const V=VF(q,N,q.origin??k);R?R=[[Math.min(V[0][0],R[0][0]),Math.min(V[0][1],R[0][1])],[Math.max(V[1][0],R[1][0]),Math.max(V[1][1],R[1][1])]]:R=V}v==null||v(I,{...j})}).on("drag",I=>{const{transform:L,snapGrid:Y,snapToGrid:P,nodeOrigin:U}=n(),k=Hu(I.sourceEvent,{transform:L,snapGrid:Y,snapToGrid:P,containerBounds:E}),z=[];if(!N)return;const{x:H,y:F,width:K,height:q}=j,V={},J=N.origin??U,{width:ae,height:he,x:ge,y:ee}=HF(T,l.controlDirection,k,l.boundaries,l.keepAspectRatio,J,C,R),ne=ae!==K,Q=he!==q,ye=ge!==H&&ne,ce=ee!==F&&Q;if(!ye&&!ce&&!ne&&!Q)return;if((ye||ce||J[0]===1||J[1]===1)&&(V.x=ye?ge:j.x,V.y=ce?ee:j.y,j.x=V.x,j.y=V.y,O.length>0)){const Te=ge-H,Ae=ee-F;for(const Ue of O)Ue.position={x:Ue.position.x-Te+J[0]*(ae-K),y:Ue.position.y-Ae+J[1]*(he-q)},z.push(Ue)}if((ne||Q)&&(V.width=ne&&(!l.resizeDirection||l.resizeDirection==="horizontal")?ae:j.width,V.height=Q&&(!l.resizeDirection||l.resizeDirection==="vertical")?he:j.height,j.width=V.width,j.height=V.height),A&&N.expandParent){const Te=J[0]*(V.width??0);V.x&&V.x<Te&&(j.x=Te,T.x=T.x-(V.x-Te));const Ae=J[1]*(V.height??0);V.y&&V.y<Ae&&(j.y=Ae,T.y=T.y-(V.y-Ae))}const re=zF({width:j.width,prevWidth:K,height:j.height,prevHeight:q,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),be={...j,direction:re};(b==null?void 0:b(I,be))!==!1&&(D=!0,w==null||w(I,be),r(V,z))}).on("end",I=>{D&&(S==null||S(I,{...j}),i==null||i({...j}),D=!1)});o.call(G)}function f(){o.on(".drag",null)}return{update:c,destroy:f}}var Nv={exports:{}},Ov={},Ev={exports:{}},Tv={};/**
|
|
467
|
+
* @license React
|
|
468
|
+
* use-sync-external-store-shim.production.js
|
|
469
|
+
*
|
|
470
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
471
|
+
*
|
|
472
|
+
* This source code is licensed under the MIT license found in the
|
|
473
|
+
* LICENSE file in the root directory of this source tree.
|
|
474
|
+
*/var ST;function YF(){if(ST)return Tv;ST=1;var e=Yf();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 v=g(),w=r({inst:{value:v,getSnapshot:g}}),S=w[0].inst,b=w[1];return o(function(){S.value=v,S.getSnapshot=g,f(S)&&b({inst:S})},[p,v,g]),i(function(){return f(S)&&b({inst:S}),p(function(){f(S)&&b({inst:S})})},[p]),l(v),v}function f(p){var g=p.getSnapshot;p=p.value;try{var v=g();return!n(p,v)}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 Tv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y,Tv}var _T;function XF(){return _T||(_T=1,Ev.exports=YF()),Ev.exports}/**
|
|
475
|
+
* @license React
|
|
476
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
477
|
+
*
|
|
478
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
479
|
+
*
|
|
480
|
+
* This source code is licensed under the MIT license found in the
|
|
481
|
+
* LICENSE file in the root directory of this source tree.
|
|
482
|
+
*/var jT;function KF(){if(jT)return Ov;jT=1;var e=Yf(),t=XF();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,v){var w=o(null);if(w.current===null){var S={hasValue:!1,value:null};w.current=S}else S=w.current;w=c(function(){function j(A){if(!T){if(T=!0,N=A,A=g(A),v!==void 0&&S.hasValue){var C=S.value;if(v(C,A))return E=C}return E=A}if(C=E,r(N,A))return C;var R=g(A);return v!==void 0&&v(C,R)?(N=A,C):(N=A,E=R)}var T=!1,N,E,O=p===void 0?null:p;return[function(){return j(y())},O===null?void 0:function(){return j(O())}]},[y,p,g,v]);var b=i(d,w[0],w[1]);return l(function(){S.hasValue=!0,S.value=b},[b]),f(b),b},Ov}var AT;function WF(){return AT||(AT=1,Nv.exports=KF()),Nv.exports}var QF=WF();const ZF=at(QF),JF={},NT=e=>{let t;const n=new Set,r=(y,p)=>{const g=typeof y=="function"?y(t):y;if(!Object.is(g,t)){const v=t;t=p??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(w=>w(t,v))}},i=()=>t,f={setState:r,getState:i,getInitialState:()=>d,subscribe:y=>(n.add(y),()=>n.delete(y)),destroy:()=>{(JF?"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},eY=e=>e?NT(e):NT,{useDebugValue:tY}=W,{useSyncExternalStoreWithSelector:nY}=ZF,rY=e=>e;function d$(e,t=rY,n){const r=nY(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return tY(r),r}const OT=(e,t)=>{const n=eY(e),r=(i,o=t)=>d$(n,i,o);return Object.assign(r,n),r},iY=(e,t)=>e?OT(e,t):OT;function Et(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 Km=$.createContext(null),aY=Km.Provider,h$=ei.error001();function Qe(e,t){const n=$.useContext(Km);if(n===null)throw new Error(h$);return d$(n,e,t)}function Tt(){const e=$.useContext(Km);if(e===null)throw new Error(h$);return $.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const ET={display:"none"},oY={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},p$="react-flow__node-desc",m$="react-flow__edge-desc",sY="react-flow__aria-live",lY=e=>e.ariaLiveMessage,cY=e=>e.ariaLabelConfig;function uY({rfId:e}){const t=Qe(lY);return h.jsx("div",{id:`${sY}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:oY,children:t})}function fY({rfId:e,disableKeyboardA11y:t}){const n=Qe(cY);return h.jsxs(h.Fragment,{children:[h.jsx("div",{id:`${p$}-${e}`,style:ET,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),h.jsx("div",{id:`${m$}-${e}`,style:ET,children:n["edge.a11yDescription.default"]}),!t&&h.jsx(uY,{rfId:e})]})}const Wm=$.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},o)=>{const l=`${e}`.split("-");return h.jsx("div",{className:Vt(["react-flow__panel",n,...l]),style:r,ref:o,...i,children:t})});Wm.displayName="Panel";function dY({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:h.jsx(Wm,{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:h.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const hY=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}},Fh=e=>e.id;function pY(e,t){return Et(e.selectedNodes.map(Fh),t.selectedNodes.map(Fh))&&Et(e.selectedEdges.map(Fh),t.selectedEdges.map(Fh))}function mY({onSelectionChange:e}){const t=Tt(),{selectedNodes:n,selectedEdges:r}=Qe(hY,pY);return $.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(o=>o(i))},[n,r,e]),null}const yY=e=>!!e.onSelectionChangeHandlers;function gY({onSelectionChange:e}){const t=Qe(yY);return e||t?h.jsx(mY,{onSelectionChange:e}):null}const lS=typeof window<"u"?$.useLayoutEffect:$.useEffect,y$=[0,0],vY={x:0,y:0,zoom:1},xY=["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"],TT=[...xY,"rfId"],bY=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}),CT={translateExtent:of,nodeOrigin:y$,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function wY(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:o,setNodeExtent:l,reset:c,setDefaultNodesAndEdges:f}=Qe(bY,Et),d=Tt();lS(()=>(f(e.defaultNodes,e.defaultEdges),()=>{y.current=CT,c()}),[]);const y=$.useRef(CT);return lS(()=>{for(const p of TT){const g=e[p],v=y.current[p];g!==v&&(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:iF(g)}):p==="fitView"?d.setState({fitViewQueued:g}):p==="fitViewOptions"?d.setState({fitViewOptions:g}):d.setState({[p]:g})))}y.current=e},TT.map(p=>e[p])),null}function MT(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function SY(e){var r;const[t,n]=$.useState(e==="system"?null:e);return $.useEffect(()=>{if(e!=="system"){n(e);return}const i=MT(),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=MT())!=null&&r.matches?"dark":"light"}const kT=typeof document<"u"?document:null;function uf(e=null,t={target:kT,actInsideInputWithModifier:!0}){const[n,r]=$.useState(!1),i=$.useRef(!1),o=$.useRef(new Set([])),[l,c]=$.useMemo(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(p=>typeof p=="string").map(p=>p.replace("+",`
|
|
483
|
+
`).replace(`
|
|
484
|
+
|
|
485
|
+
`,`
|
|
486
|
+
+`).split(`
|
|
487
|
+
`)),y=d.reduce((p,g)=>p.concat(...g),[]);return[d,y]}return[[],[]]},[e]);return $.useEffect(()=>{const f=(t==null?void 0:t.target)??kT,d=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const y=v=>{var b,j;if(i.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!i.current||i.current&&!d)&&KD(v))return!1;const S=PT(v.code,c);if(o.current.add(v[S]),RT(l,o.current,!1)){const T=((j=(b=v.composedPath)==null?void 0:b.call(v))==null?void 0:j[0])||v.target,N=(T==null?void 0:T.nodeName)==="BUTTON"||(T==null?void 0:T.nodeName)==="A";t.preventDefault!==!1&&(i.current||!N)&&v.preventDefault(),r(!0)}},p=v=>{const w=PT(v.code,c);RT(l,o.current,!0)?(r(!1),o.current.clear()):o.current.delete(v[w]),v.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 PT(e,t){return t.includes(e)?"code":"key"}const _Y=()=>{const e=Tt();return $.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,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=c2(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 td(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=Dp(t,n);return{x:l.x+i,y:l.y+o}}}),[])};function g$(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)jY(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 jY(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 v$(e,t){return g$(e,t)}function x$(e,t){return g$(e,t)}function ko(e,t){return{id:e,type:"select",selected:t}}function sl(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(ko(o.id,l)))}return r}function DT({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 $T(e){return{id:e.id,type:"remove"}}const IT=e=>XV(e),AY=e=>zD(e);function b$(e){return $.forwardRef(e)}function LT(e){const[t,n]=$.useState(BigInt(0)),[r]=$.useState(()=>NY(()=>n(i=>i+BigInt(1))));return lS(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function NY(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const w$=$.createContext(null);function OY({children:e}){const t=Tt(),n=$.useCallback(c=>{const{nodes:f=[],setNodes:d,hasDefaultNodes:y,onNodesChange:p,nodeLookup:g,fitViewQueued:v,onNodesChangeMiddlewareMap:w}=t.getState();let S=f;for(const j of c)S=typeof j=="function"?j(S):j;let b=DT({items:S,lookup:g});for(const j of w.values())b=j(b);y&&d(S),b.length>0?p==null||p(b):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:j,nodes:T,setNodes:N}=t.getState();j&&N(T)})},[]),r=LT(n),i=$.useCallback(c=>{const{edges:f=[],setEdges:d,hasDefaultEdges:y,onEdgesChange:p,edgeLookup:g}=t.getState();let v=f;for(const w of c)v=typeof w=="function"?w(v):w;y?d(v):p&&p(DT({items:v,lookup:g}))},[]),o=LT(i),l=$.useMemo(()=>({nodeQueue:r,edgeQueue:o}),[]);return h.jsx(w$.Provider,{value:l,children:e})}function EY(){const e=$.useContext(w$);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const TY=e=>!!e.panZoom;function y2(){const e=_Y(),t=Tt(),n=EY(),r=Qe(TY),i=$.useMemo(()=>{const o=p=>t.getState().nodeLookup.get(p),l=p=>{n.nodeQueue.push(p)},c=p=>{n.edgeQueue.push(p)},f=p=>{var j,T;const{nodeLookup:g,nodeOrigin:v}=t.getState(),w=IT(p)?p:g.get(p.id),S=w.parentId?YD(w.position,w.measured,w.parentId,g,v):w.position,b={...w,position:S,width:((j=w.measured)==null?void 0:j.width)??w.width,height:((T=w.measured)==null?void 0:T.height)??w.height};return Il(b)},d=(p,g,v={replace:!1})=>{l(w=>w.map(S=>{if(S.id===p){const b=typeof g=="function"?g(S):g;return v.replace&&IT(b)?b:{...S,...b}}return S}))},y=(p,g,v={replace:!1})=>{c(w=>w.map(S=>{if(S.id===p){const b=typeof g=="function"?g(S):g;return v.replace&&AY(b)?b:{...S,...b}}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(v=>[...v,...g])},addEdges:p=>{const g=Array.isArray(p)?p:[p];n.edgeQueue.push(v=>[...v,...g])},toObject:()=>{const{nodes:p=[],edges:g=[],transform:v}=t.getState(),[w,S,b]=v;return{nodes:p.map(j=>({...j})),edges:g.map(j=>({...j})),viewport:{x:w,y:S,zoom:b}}},deleteElements:async({nodes:p=[],edges:g=[]})=>{const{nodes:v,edges:w,onNodesDelete:S,onEdgesDelete:b,triggerNodeChanges:j,triggerEdgeChanges:T,onDelete:N,onBeforeDelete:E}=t.getState(),{nodes:O,edges:A}=await JV({nodesToRemove:p,edgesToRemove:g,nodes:v,edges:w,onBeforeDelete:E}),C=A.length>0,R=O.length>0;if(C){const D=A.map($T);b==null||b(A),T(D)}if(R){const D=O.map($T);S==null||S(O),j(D)}return(R||C)&&(N==null||N({nodes:O,edges:A})),{deletedNodes:O,deletedEdges:A}},getIntersectingNodes:(p,g=!0,v)=>{const w=cT(p),S=w?p:f(p),b=v!==void 0;return S?(v||t.getState().nodes).filter(j=>{const T=t.getState().nodeLookup.get(j.id);if(T&&!w&&(j.id===p.id||!T.internals.positionAbsolute))return!1;const N=Il(b?j:T),E=lf(N,S);return g&&E>0||E>=N.width*N.height||E>=S.width*S.height}):[]},isNodeIntersecting:(p,g,v=!0)=>{const S=cT(p)?p:f(p);if(!S)return!1;const b=lf(S,g);return v&&b>0||b>=g.width*g.height||b>=S.width*S.height},updateNode:d,updateNodeData:(p,g,v={replace:!1})=>{d(p,w=>{const S=typeof g=="function"?g(w):g;return v.replace?{...w,data:S}:{...w,data:{...w.data,...S}}},v)},updateEdge:y,updateEdgeData:(p,g,v={replace:!1})=>{y(p,w=>{const S=typeof g=="function"?g(w):g;return v.replace?{...w,data:S}:{...w,data:{...w.data,...S}}},v)},getNodesBounds:p=>{const{nodeLookup:g,nodeOrigin:v}=t.getState();return KV(p,{nodeLookup:g,nodeOrigin:v})},getHandleConnections:({type:p,id:g,nodeId:v})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${v}-${p}${g?`-${g}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:p,handleId:g,nodeId:v})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${v}${p?g?`-${p}-${g}`:`-${p}`:""}`))==null?void 0:w.values())??[])},fitView:async p=>{const g=t.getState().fitViewResolver??rF();return t.setState({fitViewQueued:!0,fitViewOptions:p,fitViewResolver:g}),n.nodeQueue.push(v=>[...v]),g.promise}}},[]);return $.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const qT=e=>e.selected,CY=typeof window<"u"?window:void 0;function MY({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Tt(),{deleteElements:r}=y2(),i=uf(e,{actInsideInputWithModifier:!1}),o=uf(t,{target:CY});$.useEffect(()=>{if(i){const{edges:l,nodes:c}=n.getState();r({nodes:c.filter(qT),edges:l.filter(qT)}),n.setState({nodesSelectionActive:!1})}},[i]),$.useEffect(()=>{n.setState({multiSelectionActive:o})},[o])}function kY(e){const t=Tt();$.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=u2(e.current);(r.height===0||r.width===0)&&((c=(l=t.getState()).onError)==null||c.call(l,"004",ei.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 Qm={position:"absolute",width:"100%",height:"100%",top:0,left:0},RY=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function PY({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:o=Yo.Free,zoomOnDoubleClick:l=!0,panOnDrag:c=!0,defaultViewport:f,translateExtent:d,minZoom:y,maxZoom:p,zoomActivationKeyCode:g,preventScrolling:v=!0,children:w,noWheelClassName:S,noPanClassName:b,onViewportChange:j,isControlledViewport:T,paneClickDistance:N,selectionOnDrag:E}){const O=Tt(),A=$.useRef(null),{userSelectionActive:C,lib:R,connectionInProgress:D}=Qe(RY,Et),G=uf(g),I=$.useRef();kY(A);const L=$.useCallback(Y=>{j==null||j({x:Y[0],y:Y[1],zoom:Y[2]}),T||O.setState({transform:Y})},[j,T]);return $.useEffect(()=>{if(A.current){I.current=BF({domNode:A.current,minZoom:y,maxZoom:p,translateExtent:d,viewport:f,onDraggingChange:k=>O.setState(z=>z.paneDragging===k?z:{paneDragging:k}),onPanZoomStart:(k,z)=>{const{onViewportChangeStart:H,onMoveStart:F}=O.getState();F==null||F(k,z),H==null||H(z)},onPanZoom:(k,z)=>{const{onViewportChange:H,onMove:F}=O.getState();F==null||F(k,z),H==null||H(z)},onPanZoomEnd:(k,z)=>{const{onViewportChangeEnd:H,onMoveEnd:F}=O.getState();F==null||F(k,z),H==null||H(z)}});const{x:Y,y:P,zoom:U}=I.current.getViewport();return O.setState({panZoom:I.current,transform:[Y,P,U],domNode:A.current.closest(".react-flow")}),()=>{var k;(k=I.current)==null||k.destroy()}}},[]),$.useEffect(()=>{var Y;(Y=I.current)==null||Y.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:o,zoomOnDoubleClick:l,panOnDrag:c,zoomActivationKeyPressed:G,preventScrolling:v,noPanClassName:b,userSelectionActive:C,noWheelClassName:S,lib:R,onTransformChange:L,connectionInProgress:D,selectionOnDrag:E,paneClickDistance:N})},[e,t,n,r,i,o,l,c,G,v,b,C,S,R,L,D,E,N]),h.jsx("div",{className:"react-flow__renderer",ref:A,style:Qm,children:w})}const DY=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function $Y(){const{userSelectionActive:e,userSelectionRect:t}=Qe(DY,Et);return e&&t?h.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 Cv=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},IY=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function LY({isSelecting:e,selectionKeyPressed:t,selectionMode:n=sf.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:o,onSelectionStart:l,onSelectionEnd:c,onPaneClick:f,onPaneContextMenu:d,onPaneScroll:y,onPaneMouseEnter:p,onPaneMouseMove:g,onPaneMouseLeave:v,children:w}){const S=Tt(),{userSelectionActive:b,elementsSelectable:j,dragging:T,connectionInProgress:N}=Qe(IY,Et),E=j&&(e||b),O=$.useRef(null),A=$.useRef(),C=$.useRef(new Set),R=$.useRef(new Set),D=$.useRef(!1),G=H=>{if(D.current||N){D.current=!1;return}f==null||f(H),S.getState().resetSelectedElements(),S.setState({nodesSelectionActive:!1})},I=H=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){H.preventDefault();return}d==null||d(H)},L=y?H=>y(H):void 0,Y=H=>{D.current&&(H.stopPropagation(),D.current=!1)},P=H=>{var he,ge;const{domNode:F}=S.getState();if(A.current=F==null?void 0:F.getBoundingClientRect(),!A.current)return;const K=H.target===O.current;if(!K&&!!H.target.closest(".nokey")||!e||!(o&&K||t)||H.button!==0||!H.isPrimary)return;(ge=(he=H.target)==null?void 0:he.setPointerCapture)==null||ge.call(he,H.pointerId),D.current=!1;const{x:J,y:ae}=kr(H.nativeEvent,A.current);S.setState({userSelectionRect:{width:0,height:0,startX:J,startY:ae,x:J,y:ae}}),K||(H.stopPropagation(),H.preventDefault())},U=H=>{const{userSelectionRect:F,transform:K,nodeLookup:q,edgeLookup:V,connectionLookup:J,triggerNodeChanges:ae,triggerEdgeChanges:he,defaultEdgeOptions:ge,resetSelectedElements:ee}=S.getState();if(!A.current||!F)return;const{x:ne,y:Q}=kr(H.nativeEvent,A.current),{startX:ye,startY:ce}=F;if(!D.current){const Ae=t?0:i;if(Math.hypot(ne-ye,Q-ce)<=Ae)return;ee(),l==null||l(H)}D.current=!0;const re={startX:ye,startY:ce,x:ne<ye?ne:ye,y:Q<ce?Q:ce,width:Math.abs(ne-ye),height:Math.abs(Q-ce)},be=C.current,Se=R.current;C.current=new Set(l2(q,re,K,n===sf.Partial,!0).map(Ae=>Ae.id)),R.current=new Set;const Te=(ge==null?void 0:ge.selectable)??!0;for(const Ae of C.current){const Ue=J.get(Ae);if(Ue)for(const{edgeId:xt}of Ue.values()){const jt=V.get(xt);jt&&(jt.selectable??Te)&&R.current.add(xt)}}if(!uT(be,C.current)){const Ae=sl(q,C.current,!0);ae(Ae)}if(!uT(Se,R.current)){const Ae=sl(V,R.current);he(Ae)}S.setState({userSelectionRect:re,userSelectionActive:!0,nodesSelectionActive:!1})},k=H=>{var F,K;H.button===0&&((K=(F=H.target)==null?void 0:F.releasePointerCapture)==null||K.call(F,H.pointerId),!b&&H.target===O.current&&S.getState().userSelectionRect&&(G==null||G(H)),S.setState({userSelectionActive:!1,userSelectionRect:null}),D.current&&(c==null||c(H),S.setState({nodesSelectionActive:C.current.size>0})))},z=r===!0||Array.isArray(r)&&r.includes(0);return h.jsxs("div",{className:Vt(["react-flow__pane",{draggable:z,dragging:T,selection:e}]),onClick:E?void 0:Cv(G,O),onContextMenu:Cv(I,O),onWheel:Cv(L,O),onPointerEnter:E?void 0:p,onPointerMove:E?U:g,onPointerUp:E?k:void 0,onPointerDownCapture:E?P:void 0,onClickCapture:E?Y:void 0,onPointerLeave:v,ref:O,style:Qm,children:[w,h.jsx($Y,{})]})}function cS({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",ei.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 S$({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:o,nodeClickDistance:l}){const c=Tt(),[f,d]=$.useState(!1),y=$.useRef();return $.useEffect(()=>{y.current=NF({getStoreItems:()=>c.getState(),onNodeMouseDown:p=>{cS({id:p,store:c,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),$.useEffect(()=>{if(!(t||!e.current||!y.current))return y.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:o,nodeId:i,nodeClickDistance:l}),()=>{var p;(p=y.current)==null||p.destroy()}},[n,r,t,o,e,i,l]),f}const qY=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function _$(){const e=Tt();return $.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=qY(l),v=i?o[0]:5,w=i?o[1]:5,S=n.direction.x*v*n.factor,b=n.direction.y*w*n.factor;for(const[,j]of d){if(!g(j))continue;let T={x:j.internals.positionAbsolute.x+S,y:j.internals.positionAbsolute.y+b};i&&(T=ed(T,o));const{position:N,positionAbsolute:E}=HD({nodeId:j.id,nextPosition:T,nodeLookup:d,nodeExtent:r,nodeOrigin:y,onError:c});j.position=N,j.internals.positionAbsolute=E,p.set(j.id,j)}f(p)},[])}const g2=$.createContext(null),BY=g2.Provider;g2.Consumer;const j$=()=>$.useContext(g2),zY=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),HY=(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===Dl.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 UY({type:e="source",position:t=Ne.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},v){var U,k;const w=l||null,S=e==="target",b=Tt(),j=j$(),{connectOnClick:T,noPanClassName:N,rfId:E}=Qe(zY,Et),{connectingFrom:O,connectingTo:A,clickConnecting:C,isPossibleEndHandle:R,connectionInProcess:D,clickConnectionInProcess:G,valid:I}=Qe(HY(j,w,e),Et);j||(k=(U=b.getState()).onError)==null||k.call(U,"010",ei.error010());const L=z=>{const{defaultEdgeOptions:H,onConnect:F,hasDefaultEdges:K}=b.getState(),q={...H,...z};if(K){const{edges:V,setEdges:J}=b.getState();J(uF(q,V))}F==null||F(q),c==null||c(q)},Y=z=>{if(!j)return;const H=WD(z.nativeEvent);if(i&&(H&&z.button===0||!H)){const F=b.getState();sS.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:F.autoPanOnConnect,connectionMode:F.connectionMode,connectionRadius:F.connectionRadius,domNode:F.domNode,nodeLookup:F.nodeLookup,lib:F.lib,isTarget:S,handleId:w,nodeId:j,flowId:F.rfId,panBy:F.panBy,cancelConnection:F.cancelConnection,onConnectStart:F.onConnectStart,onConnectEnd:(...K)=>{var q,V;return(V=(q=b.getState()).onConnectEnd)==null?void 0:V.call(q,...K)},updateConnection:F.updateConnection,onConnect:L,isValidConnection:n||((...K)=>{var q,V;return((V=(q=b.getState()).isValidConnection)==null?void 0:V.call(q,...K))??!0}),getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:F.autoPanSpeed,dragThreshold:F.connectionDragThreshold})}H?y==null||y(z):p==null||p(z)},P=z=>{const{onClickConnectStart:H,onClickConnectEnd:F,connectionClickStartHandle:K,connectionMode:q,isValidConnection:V,lib:J,rfId:ae,nodeLookup:he,connection:ge}=b.getState();if(!j||!K&&!i)return;if(!K){H==null||H(z.nativeEvent,{nodeId:j,handleId:w,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:j,type:e,id:w}});return}const ee=XD(z.target),ne=n||V,{connection:Q,isValid:ye}=sS.isValid(z.nativeEvent,{handle:{nodeId:j,id:w,type:e},connectionMode:q,fromNodeId:K.nodeId,fromHandleId:K.id||null,fromType:K.type,isValidConnection:ne,flowId:ae,doc:ee,lib:J,nodeLookup:he});ye&&Q&&L(Q);const ce=structuredClone(ge);delete ce.inProgress,ce.toPosition=ce.toHandle?ce.toHandle.position:null,F==null||F(z,ce),b.setState({connectionClickStartHandle:null})};return h.jsx("div",{"data-handleid":w,"data-nodeid":j,"data-handlepos":t,"data-id":`${E}-${j}-${w}-${e}`,className:Vt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",N,d,{source:!S,target:S,connectable:r,connectablestart:i,connectableend:o,clickconnecting:C,connectingfrom:O,connectingto:A,valid:I,connectionindicator:r&&(!D||R)&&(D||G?o:i)}]),onMouseDown:Y,onTouchStart:Y,onClick:T?P:void 0,ref:v,...g,children:f})}const pr=$.memo(b$(UY));function GY({data:e,isConnectable:t,sourcePosition:n=Ne.Bottom}){return h.jsxs(h.Fragment,{children:[e==null?void 0:e.label,h.jsx(pr,{type:"source",position:n,isConnectable:t})]})}function VY({data:e,isConnectable:t,targetPosition:n=Ne.Top,sourcePosition:r=Ne.Bottom}){return h.jsxs(h.Fragment,{children:[h.jsx(pr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,h.jsx(pr,{type:"source",position:r,isConnectable:t})]})}function FY(){return null}function YY({data:e,isConnectable:t,targetPosition:n=Ne.Top}){return h.jsxs(h.Fragment,{children:[h.jsx(pr,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const $p={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},BT={input:GY,default:VY,output:YY,group:FY};function XY(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 KY=e=>{const{width:t,height:n,x:r,y:i}=Jf(e.nodeLookup,{filter:o=>!!o.selected});return{width:Mr(t)?t:null,height:Mr(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 WY({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Tt(),{width:i,height:o,transformString:l,userSelectionActive:c}=Qe(KY,Et),f=_$(),d=$.useRef(null);$.useEffect(()=>{var v;n||(v=d.current)==null||v.focus({preventScroll:!0})},[n]);const y=!c&&i!==null&&o!==null;if(S$({nodeRef:d,disabled:!y}),!y)return null;const p=e?v=>{const w=r.getState().nodes.filter(S=>S.selected);e(v,w)}:void 0,g=v=>{Object.prototype.hasOwnProperty.call($p,v.key)&&(v.preventDefault(),f({direction:$p[v.key],factor:v.shiftKey?4:1}))};return h.jsx("div",{className:Vt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:h.jsx("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:i,height:o}})})}const zT=typeof window<"u"?window:void 0,QY=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function A$({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:v,multiSelectionKeyCode:w,panActivationKeyCode:S,zoomActivationKeyCode:b,elementsSelectable:j,zoomOnScroll:T,zoomOnPinch:N,panOnScroll:E,panOnScrollSpeed:O,panOnScrollMode:A,zoomOnDoubleClick:C,panOnDrag:R,defaultViewport:D,translateExtent:G,minZoom:I,maxZoom:L,preventScrolling:Y,onSelectionContextMenu:P,noWheelClassName:U,noPanClassName:k,disableKeyboardA11y:z,onViewportChange:H,isControlledViewport:F}){const{nodesSelectionActive:K,userSelectionActive:q}=Qe(QY,Et),V=uf(d,{target:zT}),J=uf(S,{target:zT}),ae=J||R,he=J||E,ge=y&&ae!==!0,ee=V||q||ge;return MY({deleteKeyCode:f,multiSelectionKeyCode:w}),h.jsx(PY,{onPaneContextMenu:o,elementsSelectable:j,zoomOnScroll:T,zoomOnPinch:N,panOnScroll:he,panOnScrollSpeed:O,panOnScrollMode:A,zoomOnDoubleClick:C,panOnDrag:!V&&ae,defaultViewport:D,translateExtent:G,minZoom:I,maxZoom:L,zoomActivationKeyCode:b,preventScrolling:Y,noWheelClassName:U,noPanClassName:k,onViewportChange:H,isControlledViewport:F,paneClickDistance:c,selectionOnDrag:ge,children:h.jsxs(LY,{onSelectionStart:g,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:o,onPaneScroll:l,panOnDrag:ae,isSelecting:!!ee,selectionMode:p,selectionKeyPressed:V,paneClickDistance:c,selectionOnDrag:ge,children:[e,K&&h.jsx(WY,{onSelectionContextMenu:P,noPanClassName:k,disableKeyboardA11y:z})]})})}A$.displayName="FlowRenderer";const ZY=$.memo(A$),JY=e=>t=>e?l2(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 eX(e){return Qe($.useCallback(JY(e),[e]),Et)}const tX=e=>e.updateNodeInternals;function nX(){const e=Qe(tX),[t]=$.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 $.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function rX({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Tt(),o=$.useRef(null),l=$.useRef(null),c=$.useRef(e.sourcePosition),f=$.useRef(e.targetPosition),d=$.useRef(t),y=n&&!!e.internals.handleBounds;return $.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]),$.useEffect(()=>()=>{l.current&&(r==null||r.unobserve(l.current),l.current=null)},[]),$.useEffect(()=>{if(o.current){const p=d.current!==t,g=c.current!==e.sourcePosition,v=f.current!==e.targetPosition;(p||g||v)&&(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 iX({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:v,disableKeyboardA11y:w,rfId:S,nodeTypes:b,nodeClickDistance:j,onError:T}){const{node:N,internals:E,isParent:O}=Qe(ne=>{const Q=ne.nodeLookup.get(e),ye=ne.parentLookup.has(e);return{node:Q,internals:Q.internals,isParent:ye}},Et);let A=N.type||"default",C=(b==null?void 0:b[A])||BT[A];C===void 0&&(T==null||T("003",ei.error003(A)),A="default",C=(b==null?void 0:b.default)||BT.default);const R=!!(N.draggable||c&&typeof N.draggable>"u"),D=!!(N.selectable||f&&typeof N.selectable>"u"),G=!!(N.connectable||d&&typeof N.connectable>"u"),I=!!(N.focusable||y&&typeof N.focusable>"u"),L=Tt(),Y=FD(N),P=rX({node:N,nodeType:A,hasDimensions:Y,resizeObserver:p}),U=S$({nodeRef:P,disabled:N.hidden||!R,noDragClassName:g,handleSelector:N.dragHandle,nodeId:e,isSelectable:D,nodeClickDistance:j}),k=_$();if(N.hidden)return null;const z=Ki(N),H=XY(N),F=D||R||t||n||r||i,K=n?ne=>n(ne,{...E.userNode}):void 0,q=r?ne=>r(ne,{...E.userNode}):void 0,V=i?ne=>i(ne,{...E.userNode}):void 0,J=o?ne=>o(ne,{...E.userNode}):void 0,ae=l?ne=>l(ne,{...E.userNode}):void 0,he=ne=>{const{selectNodesOnDrag:Q,nodeDragThreshold:ye}=L.getState();D&&(!Q||!R||ye>0)&&cS({id:e,store:L,nodeRef:P}),t&&t(ne,{...E.userNode})},ge=ne=>{if(!(KD(ne.nativeEvent)||w)){if(ID.includes(ne.key)&&D){const Q=ne.key==="Escape";cS({id:e,store:L,unselect:Q,nodeRef:P})}else if(R&&N.selected&&Object.prototype.hasOwnProperty.call($p,ne.key)){ne.preventDefault();const{ariaLabelConfig:Q}=L.getState();L.setState({ariaLiveMessage:Q["node.a11yDescription.ariaLiveMessage"]({direction:ne.key.replace("Arrow","").toLowerCase(),x:~~E.positionAbsolute.x,y:~~E.positionAbsolute.y})}),k({direction:$p[ne.key],factor:ne.shiftKey?4:1})}}},ee=()=>{var Se;if(w||!((Se=P.current)!=null&&Se.matches(":focus-visible")))return;const{transform:ne,width:Q,height:ye,autoPanOnNodeFocus:ce,setCenter:re}=L.getState();if(!ce)return;l2(new Map([[e,N]]),{x:0,y:0,width:Q,height:ye},ne,!0).length>0||re(N.position.x+z.width/2,N.position.y+z.height/2,{zoom:ne[2]})};return h.jsx("div",{className:Vt(["react-flow__node",`react-flow__node-${A}`,{[v]:R},N.className,{selected:N.selected,selectable:D,parent:O,draggable:R,dragging:U}]),ref:P,style:{zIndex:E.z,transform:`translate(${E.positionAbsolute.x}px,${E.positionAbsolute.y}px)`,pointerEvents:F?"all":"none",visibility:Y?"visible":"hidden",...N.style,...H},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:K,onMouseMove:q,onMouseLeave:V,onContextMenu:J,onClick:he,onDoubleClick:ae,onKeyDown:I?ge:void 0,tabIndex:I?0:void 0,onFocus:I?ee:void 0,role:N.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${p$}-${S}`,"aria-label":N.ariaLabel,...N.domAttributes,children:h.jsx(BY,{value:e,children:h.jsx(C,{id:e,data:N.data,type:A,positionAbsoluteX:E.positionAbsolute.x,positionAbsoluteY:E.positionAbsolute.y,selected:N.selected??!1,selectable:D,draggable:R,deletable:N.deletable??!0,isConnectable:G,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:U,dragHandle:N.dragHandle,zIndex:E.z,parentId:N.parentId,...z})})})}var aX=$.memo(iX);const oX=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function N$(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:o}=Qe(oX,Et),l=eX(e.onlyRenderVisibleElements),c=nX();return h.jsx("div",{className:"react-flow__nodes",style:Qm,children:l.map(f=>h.jsx(aX,{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))})}N$.displayName="NodeRenderer";const sX=$.memo(N$);function lX(e){return Qe($.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&&sF({sourceNode:o,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Et)}const cX=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return h.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},uX=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return h.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},HT={[Za.Arrow]:cX,[Za.ArrowClosed]:uX};function fX(e){const t=Tt();return $.useMemo(()=>{var i,o;return Object.prototype.hasOwnProperty.call(HT,e)?HT[e]:((o=(i=t.getState()).onError)==null||o.call(i,"009",ei.error009(e)),null)},[e])}const dX=({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=fX(t);return f?h.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:h.jsx(f,{color:n,strokeWidth:l})}):null},O$=({defaultColor:e,rfId:t})=>{const n=Qe(o=>o.edges),r=Qe(o=>o.defaultEdgeOptions),i=$.useMemo(()=>mF(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?h.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:h.jsx("defs",{children:i.map(o=>h.jsx(dX,{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};O$.displayName="MarkerDefinitions";var hX=$.memo(O$);function E$({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]=$.useState({x:1,y:0,width:0,height:0}),v=Vt(["react-flow__edge-textwrapper",d]),w=$.useRef(null);return $.useEffect(()=>{if(w.current){const S=w.current.getBBox();g({x:S.x,y:S.y,width:S.width,height:S.height})}},[n]),n?h.jsxs("g",{transform:`translate(${e-p.width/2} ${t-p.height/2})`,className:v,visibility:p.width?"visible":"hidden",...y,children:[i&&h.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}),h.jsx("text",{className:"react-flow__edge-text",y:p.height/2,dy:"0.3em",ref:w,style:r,children:n}),f]}):null}E$.displayName="EdgeText";const pX=$.memo(E$);function Zm({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:f,interactionWidth:d=20,...y}){return h.jsxs(h.Fragment,{children:[h.jsx("path",{...y,d:e,fill:"none",className:Vt(["react-flow__edge-path",y.className])}),d?h.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:d,className:"react-flow__edge-interaction"}):null,r&&Mr(t)&&Mr(n)?h.jsx(pX,{x:t,y:n,label:r,labelStyle:i,labelShowBg:o,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:f}):null]})}function UT({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Ne.Left||e===Ne.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function T$({sourceX:e,sourceY:t,sourcePosition:n=Ne.Bottom,targetX:r,targetY:i,targetPosition:o=Ne.Top}){const[l,c]=UT({pos:n,x1:e,y1:t,x2:r,y2:i}),[f,d]=UT({pos:o,x1:r,y1:i,x2:e,y2:t}),[y,p,g,v]=QD({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,v]}function C$(e){return $.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:v,style:w,markerEnd:S,markerStart:b,interactionWidth:j})=>{const[T,N,E]=T$({sourceX:n,sourceY:r,sourcePosition:l,targetX:i,targetY:o,targetPosition:c}),O=e.isInternal?void 0:t;return h.jsx(Zm,{id:O,path:T,labelX:N,labelY:E,label:f,labelStyle:d,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:S,markerStart:b,interactionWidth:j})})}const mX=C$({isInternal:!1}),M$=C$({isInternal:!0});mX.displayName="SimpleBezierEdge";M$.displayName="SimpleBezierEdgeInternal";function k$(e){return $.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:v=Ne.Bottom,targetPosition:w=Ne.Top,markerEnd:S,markerStart:b,pathOptions:j,interactionWidth:T})=>{const[N,E,O]=iS({sourceX:n,sourceY:r,sourcePosition:v,targetX:i,targetY:o,targetPosition:w,borderRadius:j==null?void 0:j.borderRadius,offset:j==null?void 0:j.offset,stepPosition:j==null?void 0:j.stepPosition}),A=e.isInternal?void 0:t;return h.jsx(Zm,{id:A,path:N,labelX:E,labelY:O,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:p,style:g,markerEnd:S,markerStart:b,interactionWidth:T})})}const R$=k$({isInternal:!1}),P$=k$({isInternal:!0});R$.displayName="SmoothStepEdge";P$.displayName="SmoothStepEdgeInternal";function D$(e){return $.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return h.jsx(R$,{...n,id:r,pathOptions:$.useMemo(()=>{var o;return{borderRadius:0,offset:(o=n.pathOptions)==null?void 0:o.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const yX=D$({isInternal:!1}),$$=D$({isInternal:!0});yX.displayName="StepEdge";$$.displayName="StepEdgeInternal";function I$(e){return $.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:v,markerStart:w,interactionWidth:S})=>{const[b,j,T]=e$({sourceX:n,sourceY:r,targetX:i,targetY:o}),N=e.isInternal?void 0:t;return h.jsx(Zm,{id:N,path:b,labelX:j,labelY:T,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:d,labelBgPadding:y,labelBgBorderRadius:p,style:g,markerEnd:v,markerStart:w,interactionWidth:S})})}const gX=I$({isInternal:!1}),L$=I$({isInternal:!0});gX.displayName="StraightEdge";L$.displayName="StraightEdgeInternal";function q$(e){return $.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:o,sourcePosition:l=Ne.Bottom,targetPosition:c=Ne.Top,label:f,labelStyle:d,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:S,markerStart:b,pathOptions:j,interactionWidth:T})=>{const[N,E,O]=ZD({sourceX:n,sourceY:r,sourcePosition:l,targetX:i,targetY:o,targetPosition:c,curvature:j==null?void 0:j.curvature}),A=e.isInternal?void 0:t;return h.jsx(Zm,{id:A,path:N,labelX:E,labelY:O,label:f,labelStyle:d,labelShowBg:y,labelBgStyle:p,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:S,markerStart:b,interactionWidth:T})})}const vX=q$({isInternal:!1}),B$=q$({isInternal:!0});vX.displayName="BezierEdge";B$.displayName="BezierEdgeInternal";const GT={default:B$,straight:L$,step:$$,smoothstep:P$,simplebezier:M$},VT={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},xX=(e,t,n)=>n===Ne.Left?e-t:n===Ne.Right?e+t:e,bX=(e,t,n)=>n===Ne.Top?e-t:n===Ne.Bottom?e+t:e,FT="react-flow__edgeupdater";function YT({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:o,onMouseOut:l,type:c}){return h.jsx("circle",{onMouseDown:i,onMouseEnter:o,onMouseOut:l,className:Vt([FT,`${FT}-${c}`]),cx:xX(t,r,e),cy:bX(n,r,e),r,stroke:"transparent",fill:"transparent"})}function wX({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:v}){const w=Tt(),S=(E,O)=>{if(E.button!==0)return;const{autoPanOnConnect:A,domNode:C,connectionMode:R,connectionRadius:D,lib:G,onConnectStart:I,cancelConnection:L,nodeLookup:Y,rfId:P,panBy:U,updateConnection:k}=w.getState(),z=O.type==="target",H=(q,V)=>{g(!1),p==null||p(q,n,O.type,V)},F=q=>d==null?void 0:d(n,q),K=(q,V)=>{g(!0),y==null||y(E,n,O.type),I==null||I(q,V)};sS.onPointerDown(E.nativeEvent,{autoPanOnConnect:A,connectionMode:R,connectionRadius:D,domNode:C,handleId:O.id,nodeId:O.nodeId,nodeLookup:Y,isTarget:z,edgeUpdaterType:O.type,lib:G,flowId:P,cancelConnection:L,panBy:U,isValidConnection:(...q)=>{var V,J;return((J=(V=w.getState()).isValidConnection)==null?void 0:J.call(V,...q))??!0},onConnect:F,onConnectStart:K,onConnectEnd:(...q)=>{var V,J;return(J=(V=w.getState()).onConnectEnd)==null?void 0:J.call(V,...q)},onReconnectEnd:H,updateConnection:k,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:E.currentTarget})},b=E=>S(E,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),j=E=>S(E,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),T=()=>v(!0),N=()=>v(!1);return h.jsxs(h.Fragment,{children:[(e===!0||e==="source")&&h.jsx(YT,{position:c,centerX:r,centerY:i,radius:t,onMouseDown:b,onMouseEnter:T,onMouseOut:N,type:"source"}),(e===!0||e==="target")&&h.jsx(YT,{position:f,centerX:o,centerY:l,radius:t,onMouseDown:j,onMouseEnter:T,onMouseOut:N,type:"target"})]})}function SX({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:v,rfId:w,edgeTypes:S,noPanClassName:b,onError:j,disableKeyboardA11y:T}){let N=Qe(re=>re.edgeLookup.get(e));const E=Qe(re=>re.defaultEdgeOptions);N=E?{...E,...N}:N;let O=N.type||"default",A=(S==null?void 0:S[O])||GT[O];A===void 0&&(j==null||j("011",ei.error011(O)),O="default",A=(S==null?void 0:S.default)||GT.default);const C=!!(N.focusable||t&&typeof N.focusable>"u"),R=typeof p<"u"&&(N.reconnectable||n&&typeof N.reconnectable>"u"),D=!!(N.selectable||r&&typeof N.selectable>"u"),G=$.useRef(null),[I,L]=$.useState(!1),[Y,P]=$.useState(!1),U=Tt(),{zIndex:k,sourceX:z,sourceY:H,targetX:F,targetY:K,sourcePosition:q,targetPosition:V}=Qe($.useCallback(re=>{const be=re.nodeLookup.get(N.source),Se=re.nodeLookup.get(N.target);if(!be||!Se)return{zIndex:N.zIndex,...VT};const Te=pF({id:e,sourceNode:be,targetNode:Se,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:re.connectionMode,onError:j});return{zIndex:oF({selected:N.selected,zIndex:N.zIndex,sourceNode:be,targetNode:Se,elevateOnSelect:re.elevateEdgesOnSelect,zIndexMode:re.zIndexMode}),...Te||VT}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),Et),J=$.useMemo(()=>N.markerStart?`url('#${aS(N.markerStart,w)}')`:void 0,[N.markerStart,w]),ae=$.useMemo(()=>N.markerEnd?`url('#${aS(N.markerEnd,w)}')`:void 0,[N.markerEnd,w]);if(N.hidden||z===null||H===null||F===null||K===null)return null;const he=re=>{var Ae;const{addSelectedEdges:be,unselectNodesAndEdges:Se,multiSelectionActive:Te}=U.getState();D&&(U.setState({nodesSelectionActive:!1}),N.selected&&Te?(Se({nodes:[],edges:[N]}),(Ae=G.current)==null||Ae.blur()):be([e])),i&&i(re,N)},ge=o?re=>{o(re,{...N})}:void 0,ee=l?re=>{l(re,{...N})}:void 0,ne=c?re=>{c(re,{...N})}:void 0,Q=f?re=>{f(re,{...N})}:void 0,ye=d?re=>{d(re,{...N})}:void 0,ce=re=>{var be;if(!T&&ID.includes(re.key)&&D){const{unselectNodesAndEdges:Se,addSelectedEdges:Te}=U.getState();re.key==="Escape"?((be=G.current)==null||be.blur(),Se({edges:[N]})):Te([e])}};return h.jsx("svg",{style:{zIndex:k},children:h.jsxs("g",{className:Vt(["react-flow__edge",`react-flow__edge-${O}`,N.className,b,{selected:N.selected,animated:N.animated,inactive:!D&&!i,updating:I,selectable:D}]),onClick:he,onDoubleClick:ge,onContextMenu:ee,onMouseEnter:ne,onMouseMove:Q,onMouseLeave:ye,onKeyDown:C?ce:void 0,tabIndex:C?0:void 0,role:N.ariaRole??(C?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":C?`${m$}-${w}`:void 0,ref:G,...N.domAttributes,children:[!Y&&h.jsx(A,{id:e,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:D,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:z,sourceY:H,targetX:F,targetY:K,sourcePosition:q,targetPosition:V,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:J,markerEnd:ae,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),R&&h.jsx(wX,{edge:N,isReconnectable:R,reconnectRadius:y,onReconnect:p,onReconnectStart:g,onReconnectEnd:v,sourceX:z,sourceY:H,targetX:F,targetY:K,sourcePosition:q,targetPosition:V,setUpdateHover:L,setReconnecting:P})]})})}var _X=$.memo(SX);const jX=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function z$({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:v,onReconnectEnd:w,disableKeyboardA11y:S}){const{edgesFocusable:b,edgesReconnectable:j,elementsSelectable:T,onError:N}=Qe(jX,Et),E=lX(t);return h.jsxs("div",{className:"react-flow__edges",children:[h.jsx(hX,{defaultColor:e,rfId:n}),E.map(O=>h.jsx(_X,{id:O,edgesFocusable:b,edgesReconnectable:j,elementsSelectable:T,noPanClassName:i,onReconnect:o,onContextMenu:l,onMouseEnter:c,onMouseMove:f,onMouseLeave:d,onClick:y,reconnectRadius:p,onDoubleClick:g,onReconnectStart:v,onReconnectEnd:w,rfId:n,onError:N,edgeTypes:r,disableKeyboardA11y:S},O))]})}z$.displayName="EdgeRenderer";const AX=$.memo(z$),NX=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function OX({children:e}){const t=Qe(NX);return h.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function EX(e){const t=y2(),n=$.useRef(!1);$.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const TX=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function CX(e){const t=Qe(TX),n=Tt();return $.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function MX(e){return e.connection.inProgress?{...e.connection,to:td(e.connection.to,e.transform)}:{...e.connection}}function kX(e){return MX}function RX(e){const t=kX();return Qe(t,Et)}const PX=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function DX({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:o,height:l,isValid:c,inProgress:f}=Qe(PX,Et);return!(o&&i&&f)?null:h.jsx("svg",{style:e,width:o,height:l,className:"react-flow__connectionline react-flow__container",children:h.jsx("g",{className:Vt(["react-flow__connection",BD(c)]),children:h.jsx(H$,{style:t,type:n,CustomComponent:r,isValid:c})})})}const H$=({style:e,type:t=La.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:v}=RX();if(!i)return;if(n)return h.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:BD(r),toNode:y,toHandle:p,pointer:v});let w="";const S={sourceX:o.x,sourceY:o.y,sourcePosition:f,targetX:d.x,targetY:d.y,targetPosition:g};switch(t){case La.Bezier:[w]=ZD(S);break;case La.SimpleBezier:[w]=T$(S);break;case La.Step:[w]=iS({...S,borderRadius:0});break;case La.SmoothStep:[w]=iS(S);break;default:[w]=e$(S)}return h.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};H$.displayName="ConnectionLine";const $X={};function XT(e=$X){$.useRef(e),Tt(),$.useEffect(()=>{},[e])}function IX(){Tt(),$.useRef(!1),$.useEffect(()=>{},[])}function U$({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:v,connectionLineType:w,connectionLineStyle:S,connectionLineComponent:b,connectionLineContainerStyle:j,selectionKeyCode:T,selectionOnDrag:N,selectionMode:E,multiSelectionKeyCode:O,panActivationKeyCode:A,zoomActivationKeyCode:C,deleteKeyCode:R,onlyRenderVisibleElements:D,elementsSelectable:G,defaultViewport:I,translateExtent:L,minZoom:Y,maxZoom:P,preventScrolling:U,defaultMarkerColor:k,zoomOnScroll:z,zoomOnPinch:H,panOnScroll:F,panOnScrollSpeed:K,panOnScrollMode:q,zoomOnDoubleClick:V,panOnDrag:J,onPaneClick:ae,onPaneMouseEnter:he,onPaneMouseMove:ge,onPaneMouseLeave:ee,onPaneScroll:ne,onPaneContextMenu:Q,paneClickDistance:ye,nodeClickDistance:ce,onEdgeContextMenu:re,onEdgeMouseEnter:be,onEdgeMouseMove:Se,onEdgeMouseLeave:Te,reconnectRadius:Ae,onReconnect:Ue,onReconnectStart:xt,onReconnectEnd:jt,noDragClassName:Zt,noWheelClassName:Pt,noPanClassName:De,disableKeyboardA11y:ze,nodeExtent:nt,rfId:gr,viewport:Qn,onViewportChange:At}){return XT(e),XT(t),IX(),EX(n),CX(Qn),h.jsx(ZY,{onPaneClick:ae,onPaneMouseEnter:he,onPaneMouseMove:ge,onPaneMouseLeave:ee,onPaneContextMenu:Q,onPaneScroll:ne,paneClickDistance:ye,deleteKeyCode:R,selectionKeyCode:T,selectionOnDrag:N,selectionMode:E,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:O,panActivationKeyCode:A,zoomActivationKeyCode:C,elementsSelectable:G,zoomOnScroll:z,zoomOnPinch:H,zoomOnDoubleClick:V,panOnScroll:F,panOnScrollSpeed:K,panOnScrollMode:q,panOnDrag:J,defaultViewport:I,translateExtent:L,minZoom:Y,maxZoom:P,onSelectionContextMenu:p,preventScrolling:U,noDragClassName:Zt,noWheelClassName:Pt,noPanClassName:De,disableKeyboardA11y:ze,onViewportChange:At,isControlledViewport:!!Qn,children:h.jsxs(OX,{children:[h.jsx(AX,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:l,onReconnect:Ue,onReconnectStart:xt,onReconnectEnd:jt,onlyRenderVisibleElements:D,onEdgeContextMenu:re,onEdgeMouseEnter:be,onEdgeMouseMove:Se,onEdgeMouseLeave:Te,reconnectRadius:Ae,defaultMarkerColor:k,noPanClassName:De,disableKeyboardA11y:ze,rfId:gr}),h.jsx(DX,{style:S,type:w,component:b,containerStyle:j}),h.jsx("div",{className:"react-flow__edgelabel-renderer"}),h.jsx(sX,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:o,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:y,nodeClickDistance:ce,onlyRenderVisibleElements:D,noPanClassName:De,noDragClassName:Zt,disableKeyboardA11y:ze,nodeExtent:nt,rfId:gr}),h.jsx("div",{className:"react-flow__viewport-portal"})]})})}U$.displayName="GraphView";const LX=$.memo(U$),KT=({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 v=new Map,w=new Map,S=new Map,b=new Map,j=r??t??[],T=n??e??[],N=y??[0,0],E=p??of;r$(S,b,j);const{nodesInitialized:O}=oS(T,v,w,{nodeOrigin:N,nodeExtent:E,zIndexMode:g});let A=[0,0,1];if(l&&i&&o){const C=Jf(v,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:R,y:D,zoom:G}=c2(C,i,o,f,d,(c==null?void 0:c.padding)??.1);A=[R,D,G]}return{rfId:"1",width:i??0,height:o??0,transform:A,nodes:T,nodesInitialized:O,nodeLookup:v,parentLookup:w,edges:j,edgeLookup:b,connectionLookup:S,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:f,maxZoom:d,translateExtent:of,nodeExtent:E,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Dl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:N,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:{...qD},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:eF,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:LD,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},qX=({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})=>iY((v,w)=>{async function S(){const{nodeLookup:b,panZoom:j,fitViewOptions:T,fitViewResolver:N,width:E,height:O,minZoom:A,maxZoom:C}=w();j&&(await ZV({nodes:b,width:E,height:O,panZoom:j,minZoom:A,maxZoom:C},T),N==null||N.resolve(!0),v({fitViewResolver:null}))}return{...KT({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:b=>{const{nodeLookup:j,parentLookup:T,nodeOrigin:N,elevateNodesOnSelect:E,fitViewQueued:O,zIndexMode:A,nodesSelectionActive:C}=w(),{nodesInitialized:R,hasSelectedNodes:D}=oS(b,j,T,{nodeOrigin:N,nodeExtent:p,elevateNodesOnSelect:E,checkEquality:!0,zIndexMode:A}),G=C&&D;O&&R?(S(),v({nodes:b,nodesInitialized:R,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:G})):v({nodes:b,nodesInitialized:R,nodesSelectionActive:G})},setEdges:b=>{const{connectionLookup:j,edgeLookup:T}=w();r$(j,T,b),v({edges:b})},setDefaultNodesAndEdges:(b,j)=>{if(b){const{setNodes:T}=w();T(b),v({hasDefaultNodes:!0})}if(j){const{setEdges:T}=w();T(j),v({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:j,nodeLookup:T,parentLookup:N,domNode:E,nodeOrigin:O,nodeExtent:A,debug:C,fitViewQueued:R,zIndexMode:D}=w(),{changes:G,updatedInternals:I}=SF(b,T,N,E,O,A,D);I&&(vF(T,N,{nodeOrigin:O,nodeExtent:A,zIndexMode:D}),R?(S(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(G==null?void 0:G.length)>0&&(C&&console.log("React Flow: trigger node changes",G),j==null||j(G)))},updateNodePositions:(b,j=!1)=>{const T=[];let N=[];const{nodeLookup:E,triggerNodeChanges:O,connection:A,updateConnection:C,onNodesChangeMiddlewareMap:R}=w();for(const[D,G]of b){const I=E.get(D),L=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(G!=null&&G.position)),Y={id:D,type:"position",position:L?{x:Math.max(0,G.position.x),y:Math.max(0,G.position.y)}:G.position,dragging:j};if(I&&A.inProgress&&A.fromNode.id===I.id){const P=Jo(I,A.fromHandle,Ne.Left,!0);C({...A,from:P})}L&&I.parentId&&T.push({id:D,parentId:I.parentId,rect:{...G.internals.positionAbsolute,width:G.measured.width??0,height:G.measured.height??0}}),N.push(Y)}if(T.length>0){const{parentLookup:D,nodeOrigin:G}=w(),I=m2(T,E,D,G);N.push(...I)}for(const D of R.values())N=D(N);O(N)},triggerNodeChanges:b=>{const{onNodesChange:j,setNodes:T,nodes:N,hasDefaultNodes:E,debug:O}=w();if(b!=null&&b.length){if(E){const A=v$(b,N);T(A)}O&&console.log("React Flow: trigger node changes",b),j==null||j(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:j,setEdges:T,edges:N,hasDefaultEdges:E,debug:O}=w();if(b!=null&&b.length){if(E){const A=x$(b,N);T(A)}O&&console.log("React Flow: trigger edge changes",b),j==null||j(b)}},addSelectedNodes:b=>{const{multiSelectionActive:j,edgeLookup:T,nodeLookup:N,triggerNodeChanges:E,triggerEdgeChanges:O}=w();if(j){const A=b.map(C=>ko(C,!0));E(A);return}E(sl(N,new Set([...b]),!0)),O(sl(T))},addSelectedEdges:b=>{const{multiSelectionActive:j,edgeLookup:T,nodeLookup:N,triggerNodeChanges:E,triggerEdgeChanges:O}=w();if(j){const A=b.map(C=>ko(C,!0));O(A);return}O(sl(T,new Set([...b]))),E(sl(N,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:j}={})=>{const{edges:T,nodes:N,nodeLookup:E,triggerNodeChanges:O,triggerEdgeChanges:A}=w(),C=b||N,R=j||T,D=[];for(const I of C){if(!I.selected)continue;const L=E.get(I.id);L&&(L.selected=!1),D.push(ko(I.id,!1))}const G=[];for(const I of R)I.selected&&G.push(ko(I.id,!1));O(D),A(G)},setMinZoom:b=>{const{panZoom:j,maxZoom:T}=w();j==null||j.setScaleExtent([b,T]),v({minZoom:b})},setMaxZoom:b=>{const{panZoom:j,minZoom:T}=w();j==null||j.setScaleExtent([T,b]),v({maxZoom:b})},setTranslateExtent:b=>{var j;(j=w().panZoom)==null||j.setTranslateExtent(b),v({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:j,triggerNodeChanges:T,triggerEdgeChanges:N,elementsSelectable:E}=w();if(!E)return;const O=j.reduce((C,R)=>R.selected?[...C,ko(R.id,!1)]:C,[]),A=b.reduce((C,R)=>R.selected?[...C,ko(R.id,!1)]:C,[]);T(O),N(A)},setNodeExtent:b=>{const{nodes:j,nodeLookup:T,parentLookup:N,nodeOrigin:E,elevateNodesOnSelect:O,nodeExtent:A,zIndexMode:C}=w();b[0][0]===A[0][0]&&b[0][1]===A[0][1]&&b[1][0]===A[1][0]&&b[1][1]===A[1][1]||(oS(j,T,N,{nodeOrigin:E,nodeExtent:b,elevateNodesOnSelect:O,checkEquality:!1,zIndexMode:C}),v({nodeExtent:b}))},panBy:b=>{const{transform:j,width:T,height:N,panZoom:E,translateExtent:O}=w();return _F({delta:b,panZoom:E,transform:j,translateExtent:O,width:T,height:N})},setCenter:async(b,j,T)=>{const{width:N,height:E,maxZoom:O,panZoom:A}=w();if(!A)return Promise.resolve(!1);const C=typeof(T==null?void 0:T.zoom)<"u"?T.zoom:O;return await A.setViewport({x:N/2-b*C,y:E/2-j*C,zoom:C},{duration:T==null?void 0:T.duration,ease:T==null?void 0:T.ease,interpolate:T==null?void 0:T.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...qD}})},updateConnection:b=>{v({connection:b})},reset:()=>v({...KT()})}},Object.is);function BX({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:v}){const[w]=$.useState(()=>qX({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 h.jsx(aY,{value:w,children:h.jsx(OY,{children:v})})}function zX({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:v}){return $.useContext(Km)?h.jsx(h.Fragment,{children:e}):h.jsx(BX,{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:v,children:e})}const HX={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function UX({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:v,onConnectStart:w,onConnectEnd:S,onClickConnectStart:b,onClickConnectEnd:j,onNodeMouseEnter:T,onNodeMouseMove:N,onNodeMouseLeave:E,onNodeContextMenu:O,onNodeDoubleClick:A,onNodeDragStart:C,onNodeDrag:R,onNodeDragStop:D,onNodesDelete:G,onEdgesDelete:I,onDelete:L,onSelectionChange:Y,onSelectionDragStart:P,onSelectionDrag:U,onSelectionDragStop:k,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:F,onBeforeDelete:K,connectionMode:q,connectionLineType:V=La.Bezier,connectionLineStyle:J,connectionLineComponent:ae,connectionLineContainerStyle:he,deleteKeyCode:ge="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:ne=!1,selectionMode:Q=sf.Full,panActivationKeyCode:ye="Space",multiSelectionKeyCode:ce=cf()?"Meta":"Control",zoomActivationKeyCode:re=cf()?"Meta":"Control",snapToGrid:be,snapGrid:Se,onlyRenderVisibleElements:Te=!1,selectNodesOnDrag:Ae,nodesDraggable:Ue,autoPanOnNodeFocus:xt,nodesConnectable:jt,nodesFocusable:Zt,nodeOrigin:Pt=y$,edgesFocusable:De,edgesReconnectable:ze,elementsSelectable:nt=!0,defaultViewport:gr=vY,minZoom:Qn=.5,maxZoom:At=2,translateExtent:Dn=of,preventScrolling:bc=!0,nodeExtent:oi,defaultMarkerColor:wc="#b1b1b7",zoomOnScroll:Uy=!0,zoomOnPinch:io=!0,panOnScroll:vn=!1,panOnScrollSpeed:Lr=.5,panOnScrollMode:xn=Yo.Free,zoomOnDoubleClick:Gy=!0,panOnDrag:Vy=!0,onPaneClick:Fy,onPaneMouseEnter:ps,onPaneMouseMove:ms,onPaneMouseLeave:ys,onPaneScroll:si,onPaneContextMenu:gs,paneClickDistance:ao=1,nodeClickDistance:Yy=0,children:cd,onReconnect:Sc,onReconnectStart:oo,onReconnectEnd:Xy,onEdgeContextMenu:ud,onEdgeDoubleClick:fd,onEdgeMouseEnter:dd,onEdgeMouseMove:_c,onEdgeMouseLeave:jc,reconnectRadius:hd=10,onNodesChange:pd,onEdgesChange:qr,noDragClassName:Ft="nodrag",noWheelClassName:dn="nowheel",noPanClassName:li="nopan",fitView:vs,fitViewOptions:md,connectOnClick:Ky,attributionPosition:yd,proOptions:so,defaultEdgeOptions:Ac,elevateNodesOnSelect:ea=!0,elevateEdgesOnSelect:ta=!1,disableKeyboardA11y:na=!1,autoPanOnConnect:ra,autoPanOnNodeDrag:It,autoPanSpeed:gd,connectionRadius:vd,isValidConnection:ci,onError:ia,style:Wy,id:Nc,nodeDragThreshold:xd,connectionDragThreshold:Qy,viewport:xs,onViewportChange:bs,width:vr,height:An,colorMode:bd="light",debug:Zy,onScroll:aa,ariaLabelConfig:wd,zIndexMode:lo="basic",...Jy},Nn){const co=Nc||"1",Sd=SY(bd),Oc=$.useCallback(ui=>{ui.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),aa==null||aa(ui)},[aa]);return h.jsx("div",{"data-testid":"rf__wrapper",...Jy,onScroll:Oc,style:{...Wy,...HX},ref:Nn,className:Vt(["react-flow",i,Sd]),id:Nc,role:"application",children:h.jsxs(zX,{nodes:e,edges:t,width:vr,height:An,fitView:vs,fitViewOptions:md,minZoom:Qn,maxZoom:At,nodeOrigin:Pt,nodeExtent:oi,zIndexMode:lo,children:[h.jsx(wY,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:v,onConnectStart:w,onConnectEnd:S,onClickConnectStart:b,onClickConnectEnd:j,nodesDraggable:Ue,autoPanOnNodeFocus:xt,nodesConnectable:jt,nodesFocusable:Zt,edgesFocusable:De,edgesReconnectable:ze,elementsSelectable:nt,elevateNodesOnSelect:ea,elevateEdgesOnSelect:ta,minZoom:Qn,maxZoom:At,nodeExtent:oi,onNodesChange:pd,onEdgesChange:qr,snapToGrid:be,snapGrid:Se,connectionMode:q,translateExtent:Dn,connectOnClick:Ky,defaultEdgeOptions:Ac,fitView:vs,fitViewOptions:md,onNodesDelete:G,onEdgesDelete:I,onDelete:L,onNodeDragStart:C,onNodeDrag:R,onNodeDragStop:D,onSelectionDrag:U,onSelectionDragStart:P,onSelectionDragStop:k,onMove:y,onMoveStart:p,onMoveEnd:g,noPanClassName:li,nodeOrigin:Pt,rfId:co,autoPanOnConnect:ra,autoPanOnNodeDrag:It,autoPanSpeed:gd,onError:ia,connectionRadius:vd,isValidConnection:ci,selectNodesOnDrag:Ae,nodeDragThreshold:xd,connectionDragThreshold:Qy,onBeforeDelete:K,debug:Zy,ariaLabelConfig:wd,zIndexMode:lo}),h.jsx(LX,{onInit:d,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:T,onNodeMouseMove:N,onNodeMouseLeave:E,onNodeContextMenu:O,onNodeDoubleClick:A,nodeTypes:o,edgeTypes:l,connectionLineType:V,connectionLineStyle:J,connectionLineComponent:ae,connectionLineContainerStyle:he,selectionKeyCode:ee,selectionOnDrag:ne,selectionMode:Q,deleteKeyCode:ge,multiSelectionKeyCode:ce,panActivationKeyCode:ye,zoomActivationKeyCode:re,onlyRenderVisibleElements:Te,defaultViewport:gr,translateExtent:Dn,minZoom:Qn,maxZoom:At,preventScrolling:bc,zoomOnScroll:Uy,zoomOnPinch:io,zoomOnDoubleClick:Gy,panOnScroll:vn,panOnScrollSpeed:Lr,panOnScrollMode:xn,panOnDrag:Vy,onPaneClick:Fy,onPaneMouseEnter:ps,onPaneMouseMove:ms,onPaneMouseLeave:ys,onPaneScroll:si,onPaneContextMenu:gs,paneClickDistance:ao,nodeClickDistance:Yy,onSelectionContextMenu:z,onSelectionStart:H,onSelectionEnd:F,onReconnect:Sc,onReconnectStart:oo,onReconnectEnd:Xy,onEdgeContextMenu:ud,onEdgeDoubleClick:fd,onEdgeMouseEnter:dd,onEdgeMouseMove:_c,onEdgeMouseLeave:jc,reconnectRadius:hd,defaultMarkerColor:wc,noDragClassName:Ft,noWheelClassName:dn,noPanClassName:li,rfId:co,disableKeyboardA11y:na,nodeExtent:oi,viewport:xs,onViewportChange:bs}),h.jsx(gY,{onSelectionChange:Y}),cd,h.jsx(dY,{proOptions:so,position:yd}),h.jsx(fY,{rfId:co,disableKeyboardA11y:na})]})})}var G$=b$(UX);function V$(e){const[t,n]=$.useState(e),r=$.useCallback(i=>n(o=>v$(i,o)),[]);return[t,n,r]}function F$(e){const[t,n]=$.useState(e),r=$.useCallback(i=>n(o=>x$(i,o)),[]);return[t,n,r]}function GX({dimensions:e,lineWidth:t,variant:n,className:r}){return h.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Vt(["react-flow__background-pattern",n,r])})}function VX({radius:e,className:t}){return h.jsx("circle",{cx:e,cy:e,r:e,className:Vt(["react-flow__background-pattern","dots",t])})}var Ka;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ka||(Ka={}));const FX={[Ka.Dots]:1,[Ka.Lines]:1,[Ka.Cross]:6},YX=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Y$({id:e,variant:t=Ka.Dots,gap:n=20,size:r,lineWidth:i=1,offset:o=0,color:l,bgColor:c,style:f,className:d,patternClassName:y}){const p=$.useRef(null),{transform:g,patternId:v}=Qe(YX,Et),w=r||FX[t],S=t===Ka.Dots,b=t===Ka.Cross,j=Array.isArray(n)?n:[n,n],T=[j[0]*g[2]||1,j[1]*g[2]||1],N=w*g[2],E=Array.isArray(o)?o:[o,o],O=b?[N,N]:T,A=[E[0]*g[2]||1+O[0]/2,E[1]*g[2]||1+O[1]/2],C=`${v}${e||""}`;return h.jsxs("svg",{className:Vt(["react-flow__background",d]),style:{...f,...Qm,"--xy-background-color-props":c,"--xy-background-pattern-color-props":l},ref:p,"data-testid":"rf__background",children:[h.jsx("pattern",{id:C,x:g[0]%T[0],y:g[1]%T[1],width:T[0],height:T[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:S?h.jsx(VX,{radius:N/2,className:y}):h.jsx(GX,{dimensions:O,lineWidth:i,variant:t,className:y})}),h.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${C})`})]})}Y$.displayName="Background";const X$=$.memo(Y$);function XX(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:h.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function KX(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:h.jsx("path",{d:"M0 0h32v4.2H0z"})})}function WX(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:h.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 QX(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 ZX(){return h.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:h.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 Yh({children:e,className:t,...n}){return h.jsx("button",{type:"button",className:Vt(["react-flow__controls-button",t]),...n,children:e})}const JX=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function K$({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":v}){const w=Tt(),{isInteractive:S,minZoomReached:b,maxZoomReached:j,ariaLabelConfig:T}=Qe(JX,Et),{zoomIn:N,zoomOut:E,fitView:O}=y2(),A=()=>{N(),o==null||o()},C=()=>{E(),l==null||l()},R=()=>{O(i),c==null||c()},D=()=>{w.setState({nodesDraggable:!S,nodesConnectable:!S,elementsSelectable:!S}),f==null||f(!S)},G=g==="horizontal"?"horizontal":"vertical";return h.jsxs(Wm,{className:Vt(["react-flow__controls",G,d]),position:p,style:e,"data-testid":"rf__controls","aria-label":v??T["controls.ariaLabel"],children:[t&&h.jsxs(h.Fragment,{children:[h.jsx(Yh,{onClick:A,className:"react-flow__controls-zoomin",title:T["controls.zoomIn.ariaLabel"],"aria-label":T["controls.zoomIn.ariaLabel"],disabled:j,children:h.jsx(XX,{})}),h.jsx(Yh,{onClick:C,className:"react-flow__controls-zoomout",title:T["controls.zoomOut.ariaLabel"],"aria-label":T["controls.zoomOut.ariaLabel"],disabled:b,children:h.jsx(KX,{})})]}),n&&h.jsx(Yh,{className:"react-flow__controls-fitview",onClick:R,title:T["controls.fitView.ariaLabel"],"aria-label":T["controls.fitView.ariaLabel"],children:h.jsx(WX,{})}),r&&h.jsx(Yh,{className:"react-flow__controls-interactive",onClick:D,title:T["controls.interactive.ariaLabel"],"aria-label":T["controls.interactive.ariaLabel"],children:S?h.jsx(ZX,{}):h.jsx(QX,{})}),y]})}K$.displayName="Controls";const W$=$.memo(K$);function eK({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:v}){const{background:w,backgroundColor:S}=o||{},b=l||w||S;return h.jsx("rect",{className:Vt(["react-flow__minimap-node",{selected:g},d]),x:t,y:n,rx:y,ry:y,width:r,height:i,style:{fill:b,stroke:c,strokeWidth:f},shapeRendering:p,onClick:v?j=>v(j,e):void 0})}const tK=$.memo(eK),nK=e=>e.nodes.map(t=>t.id),Mv=e=>e instanceof Function?e:()=>e;function rK({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:o=tK,onClick:l}){const c=Qe(nK,Et),f=Mv(t),d=Mv(e),y=Mv(n),p=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return h.jsx(h.Fragment,{children:c.map(g=>h.jsx(aK,{id:g,nodeColorFunc:f,nodeStrokeColorFunc:d,nodeClassNameFunc:y,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:o,onClick:l,shapeRendering:p},g))})}function iK({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:v}=Qe(w=>{const S=w.nodeLookup.get(e);if(!S)return{node:void 0,x:0,y:0,width:0,height:0};const b=S.internals.userNode,{x:j,y:T}=S.internals.positionAbsolute,{width:N,height:E}=Ki(b);return{node:b,x:j,y:T,width:N,height:E}},Et);return!d||d.hidden||!FD(d)?null:h.jsx(c,{x:y,y:p,width:g,height:v,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 aK=$.memo(iK);var oK=$.memo(rK);const sK=200,lK=150,cK=e=>!e.hidden,uK=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?VD(Jf(e.nodeLookup,{filter:cK}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},fK="react-flow__minimap-desc";function Q$({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:v,onNodeClick:w,pannable:S=!1,zoomable:b=!1,ariaLabel:j,inversePan:T,zoomStep:N=1,offsetScale:E=5}){const O=Tt(),A=$.useRef(null),{boundingRect:C,viewBB:R,rfId:D,panZoom:G,translateExtent:I,flowWidth:L,flowHeight:Y,ariaLabelConfig:P}=Qe(uK,Et),U=(e==null?void 0:e.width)??sK,k=(e==null?void 0:e.height)??lK,z=C.width/U,H=C.height/k,F=Math.max(z,H),K=F*U,q=F*k,V=E*F,J=C.x-(K-C.width)/2-V,ae=C.y-(q-C.height)/2-V,he=K+V*2,ge=q+V*2,ee=`${fK}-${D}`,ne=$.useRef(0),Q=$.useRef();ne.current=F,$.useEffect(()=>{if(A.current&&G)return Q.current=kF({domNode:A.current,panZoom:G,getTransform:()=>O.getState().transform,getViewScale:()=>ne.current}),()=>{var be;(be=Q.current)==null||be.destroy()}},[G]),$.useEffect(()=>{var be;(be=Q.current)==null||be.update({translateExtent:I,width:L,height:Y,inversePan:T,pannable:S,zoomStep:N,zoomable:b})},[S,b,T,N,I,L,Y]);const ye=v?be=>{var Ae;const[Se,Te]=((Ae=Q.current)==null?void 0:Ae.pointer(be))||[0,0];v(be,{x:Se,y:Te})}:void 0,ce=w?$.useCallback((be,Se)=>{const Te=O.getState().nodeLookup.get(Se).internals.userNode;w(be,Te)},[]):void 0,re=j??P["minimap.ariaLabel"];return h.jsx(Wm,{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*F:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:Vt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:h.jsxs("svg",{width:U,height:k,viewBox:`${J} ${ae} ${he} ${ge}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:A,onClick:ye,children:[re&&h.jsx("title",{id:ee,children:re}),h.jsx(oK,{onClick:ce,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:o,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:c}),h.jsx("path",{className:"react-flow__minimap-mask",d:`M${J-V},${ae-V}h${he+V*2}v${ge+V*2}h${-he-V*2}z
|
|
488
|
+
M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Q$.displayName="MiniMap";const Z$=$.memo(Q$),dK=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,hK={[ql.Line]:"right",[ql.Handle]:"bottom-right"};function pK({nodeId:e,position:t,variant:n=ql.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:v=!0,shouldResize:w,onResizeStart:S,onResize:b,onResizeEnd:j}){const T=j$(),N=typeof e=="string"?e:T,E=Tt(),O=$.useRef(null),A=n===ql.Handle,C=Qe($.useCallback(dK(A&&v),[A,v]),Et),R=$.useRef(null),D=t??hK[n];$.useEffect(()=>{if(!(!O.current||!N))return R.current||(R.current=FF({domNode:O.current,nodeId:N,getStoreItems:()=>{const{nodeLookup:I,transform:L,snapGrid:Y,snapToGrid:P,nodeOrigin:U,domNode:k}=E.getState();return{nodeLookup:I,transform:L,snapGrid:Y,snapToGrid:P,nodeOrigin:U,paneDomNode:k}},onChange:(I,L)=>{const{triggerNodeChanges:Y,nodeLookup:P,parentLookup:U,nodeOrigin:k}=E.getState(),z=[],H={x:I.x,y:I.y},F=P.get(N);if(F&&F.expandParent&&F.parentId){const K=F.origin??k,q=I.width??F.measured.width??0,V=I.height??F.measured.height??0,J={id:F.id,parentId:F.parentId,rect:{width:q,height:V,...YD({x:I.x??F.position.x,y:I.y??F.position.y},{width:q,height:V},F.parentId,P,K)}},ae=m2([J],P,U,k);z.push(...ae),H.x=I.x?Math.max(K[0]*q,I.x):void 0,H.y=I.y?Math.max(K[1]*V,I.y):void 0}if(H.x!==void 0&&H.y!==void 0){const K={id:N,type:"position",position:{...H}};z.push(K)}if(I.width!==void 0&&I.height!==void 0){const q={id:N,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};z.push(q)}for(const K of L){const q={...K,type:"position"};z.push(q)}Y(z)},onEnd:({width:I,height:L})=>{const Y={id:N,type:"dimensions",resizing:!1,dimensions:{width:I,height:L}};E.getState().triggerNodeChanges([Y])}})),R.current.update({controlPosition:D,boundaries:{minWidth:c,minHeight:f,maxWidth:d,maxHeight:y},keepAspectRatio:p,resizeDirection:g,onResizeStart:S,onResize:b,onResizeEnd:j,shouldResize:w}),()=>{var I;(I=R.current)==null||I.destroy()}},[D,c,f,d,y,p,S,b,j,w]);const G=D.split("-");return h.jsx("div",{className:Vt(["react-flow__resize-control","nodrag",...G,n,r]),ref:O,style:{...i,scale:C,...l&&{[A?"backgroundColor":"borderColor"]:l}},children:o})}$.memo(pK);const mK={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",Global:"text-orange-300 bg-orange-950/50 border-orange-700/50",Controller:"text-amber-300 bg-amber-950/50 border-amber-700/50",Route:"text-yellow-300 bg-yellow-950/50 border-yellow-700/50"},yK="ring-2 ring-primary-500 ring-offset-2 ring-offset-gray-950 shadow-[0_0_18px_rgba(61,230,120,0.35)]",gK=5,vK=/entity$/i;function xK(){const{structure:e,selectedExchangeId:t,exchanges:n,routes:r,containerResolutionsByExchange:i,containerSnapshot:o,setCurrentView:l,setPendingApiClientRequest:c}=ht(),[f,d]=$.useState(""),[y,p]=$.useState(!1),[g,v]=$.useState(!1),[w,S]=$.useState(!1),[b,j]=$.useState(!1),[T,N]=$.useState(!0),[E,O]=$.useState("LR"),[A,C]=$.useState(null),[R,D]=$.useState(null),[G,I]=$.useState(!1),[L,Y]=$.useState(null),[P,U]=$.useState(!1),k=$.useRef(null),z=$.useMemo(()=>NK(o),[o]),H=$.useMemo(()=>OK(r,n),[r,n]),F=$.useMemo(()=>e?EK(e):new Map,[e]),K=$.useMemo(()=>CK(r,e),[r,e]),q=1800,[V,J]=$.useState(new Set),[ae,he]=$.useState(new Set),ge=$.useRef(null);$.useEffect(()=>{if(n.length===0||!e)return;const De=n[0];if(ge.current===De.id)return;ge.current=De.id;const ze=MK(De,r,i[De.id]??[]);if(ze.nodeIds.size===0)return;J(new Set(ze.nodeIds)),he(new Set(ze.edgeIds));const nt=setTimeout(()=>{J(new Set),he(new Set)},q);return()=>clearTimeout(nt)},[n,e,r,i]);const ee=$.useMemo(()=>e?J$(e,{scopeIndex:z,stats:H,warnings:F,dtoEdgeLabels:K,layoutDir:E,showModules:T}):{nodes:[],edges:[]},[e,z,H,F,K,E,T]),ne=$.useMemo(()=>{var Qn;const De=new Set;if(!t||ee.nodes.length===0)return De;const ze=n.find(At=>At.id===t);if(!ze)return De;const nt=r.find(At=>At.method===ze.request.method&&At.path===ze.request.path)??((Qn=r.filter(At=>At.method===ze.request.method).map(At=>({r:At,score:v2(At.path,ze.request.path)})).filter(At=>At.score>0).sort((At,Dn)=>Dn.score-At.score)[0])==null?void 0:Qn.r);nt&&De.add(`controller-${nt.controller}`);const gr=i[ze.id]??[];for(const At of gr){const Dn=At.replace(/^Symbol\(([^)]+)\)$/,"$1").trim(),bc=[`service-${Dn}`,`provider-${Dn}`,`controller-${Dn}`];for(const oi of bc)ee.nodes.some(wc=>wc.id===oi)&&De.add(oi)}return De},[t,n,r,i,ee.nodes]),Q=$.useMemo(()=>{if(!A)return new Set;const De=new Set([A]);for(const ze of ee.edges)ze.source===A&&De.add(ze.target),ze.target===A&&De.add(ze.source);return De},[A,ee.edges]),ye=$.useMemo(()=>jK(ee,{search:f,hideEntities:y,hideOrphans:g,hideLeaves:w,hideMiddleware:b,warnings:F}),[ee,f,y,g,w,b,F]),ce=$.useMemo(()=>AK(ye,{activeNodeIds:ne,focusedNeighborhood:Q,pulseNodes:V,pulseEdges:ae}),[ye,ne,Q,V,ae]),[re,be,Se]=V$(ce.nodes),[Te,Ae,Ue]=F$(ce.edges);$.useEffect(()=>be(ce.nodes),[ce.nodes,be]),$.useEffect(()=>Ae(ce.edges),[ce.edges,Ae]);const xt=$.useMemo(()=>!R||!e?null:wK(R,e,r,H.get(IK(R))),[R,e,r,H]);if(!e)return h.jsxs("div",{className:"flex flex-col items-center justify-center h-[600px] text-gray-500",children:[h.jsx(WP,{className:"w-12 h-12 mb-4 opacity-50"}),h.jsx("p",{className:"text-lg",children:"No architecture data available"}),h.jsx("p",{className:"text-sm mt-2",children:"Connect to the Studio Agent to view the architecture"})]});const jt=De=>{c({method:De.method,path:De.path,body:De.bodySample}),l("api-client")},Zt=async De=>{if(I(!1),!!e)if(De==="mermaid"){const ze=LK(e,E);await Qu(ze)&&Pt("Mermaid diagram copied to clipboard")}else if(De==="svg")BK(qK(e,{stats:H,warnings:F,layoutDir:E}),"architecture.svg"),Pt("Saved architecture.svg");else{const ze=JSON.stringify({structure:e,stats:Object.fromEntries(H),warnings:Object.fromEntries(F)},null,2);await Qu(ze)&&Pt("Architecture JSON copied to clipboard")}};function Pt(De){Y(De),setTimeout(()=>Y(null),2e3)}return h.jsxs("div",{className:"space-y-3",children:[h.jsx(bK,{search:f,onSearch:d,hideEntities:y,setHideEntities:p,hideOrphans:g,setHideOrphans:v,hideLeaves:w,setHideLeaves:S,hideMiddleware:b,setHideMiddleware:j,showModules:T,setShowModules:N,layoutDir:E,setLayoutDir:O,exportMenuOpen:G,setExportMenuOpen:I,onExport:Zt,focusedNodeId:A,clearFocus:()=>C(null),nodeCount:ce.nodes.filter(De=>De.type!=="module").length,warningSummary:TK(F)}),h.jsxs("div",{ref:k,className:"relative h-[calc(100vh-260px)] bg-gray-900 rounded-lg border border-gray-800 overflow-hidden",children:[h.jsxs(G$,{nodes:re,edges:Te,onNodesChange:Se,onEdgesChange:Ue,nodeTypes:_K,fitView:!0,minZoom:.1,maxZoom:2,proOptions:{hideAttribution:!0},onNodeClick:(De,ze)=>{ze.type!=="module"&&(D(ze.id),C(ze.id))},onEdgeClick:(De,ze)=>{const nt=ze.source.startsWith("middleware-")?ze.target:ze.source;D(nt),C(nt)},onPaneClick:()=>{C(null),D(null)},defaultEdgeOptions:{type:"smoothstep",style:{stroke:"#475569"},markerEnd:{type:Za.ArrowClosed,color:"#475569"}},children:[h.jsx(X$,{color:"#374151",gap:20}),h.jsx(W$,{className:"!bg-gray-800 !border-gray-700",showZoom:!0,showFitView:!0,showInteractive:!1}),P&&h.jsx(Z$,{className:"!bg-gray-900 !border !border-gray-800 !rounded-md",style:{width:160,height:100},pannable:!0,zoomable:!0,maskColor:"rgba(15, 23, 42, 0.7)",nodeStrokeWidth:2,nodeColor:De=>{switch(De.type){case"controller":return"#3b82f6";case"service":return"#22c55e";case"provider":return"#a855f7";case"module":return"#1e293b";default:return"#6b7280"}}})]}),h.jsxs("button",{onClick:()=>U(!P),className:`absolute bottom-4 right-4 flex items-center gap-1.5 px-2 py-1.5 rounded-md text-[11px] border transition-colors ${P?"bg-primary-500/15 border-primary-500/40 text-primary-200":"bg-gray-900/80 border-gray-800 text-gray-400 hover:text-gray-200 hover:border-gray-700"}`,title:P?"Hide minimap":"Show minimap",children:[h.jsx(m7,{className:"w-3.5 h-3.5"}),P?"Hide map":"Map"]}),t&&ne.size>0&&h.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 ",ne.size,"-node active path for the selected request."]}),ae.size>0&&!t&&h.jsxs("div",{className:"absolute top-4 right-4 bg-emerald-500/15 border border-emerald-500/40 backdrop-blur-sm px-3 py-2 rounded-lg text-xs text-emerald-200 flex items-center gap-2",children:[h.jsx(eD,{className:"w-3.5 h-3.5"}),"Live request flowing"]}),L&&h.jsx("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 bg-gray-950/95 border border-gray-700 px-3 py-1.5 rounded-md text-xs text-gray-200",children:L}),h.jsxs("div",{className:"absolute bottom-4 left-4 bg-gray-900/90 backdrop-blur-sm p-3 rounded-lg border border-gray-800",children:[h.jsx("h4",{className:"text-[10px] font-semibold text-gray-400 uppercase tracking-wide mb-2",children:"Legend"}),h.jsxs("div",{className:"space-y-1 text-[11px] text-gray-400",children:[h.jsx(Au,{dot:"bg-blue-500",label:"Controller"}),h.jsx(Au,{dot:"bg-green-500",label:"Service / Use Case"}),h.jsx(Au,{dot:"bg-purple-500",label:"Provider"}),h.jsx(Au,{dot:"bg-amber-500",label:"Middleware"}),h.jsx(Au,{dot:"bg-orange-500",label:"Warning"})]})]}),xt&&h.jsx(SK,{node:xt,onClose:()=>D(null),onTryInApiClient:jt})]})]})}function bK(e){return h.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg p-2.5 flex flex-wrap items-center gap-2",children:[h.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[h.jsx("input",{type:"text",value:e.search,onChange:t=>e.onSearch(t.target.value),placeholder:"Search nodes…",className:"w-full pl-8 pr-2 py-1.5 rounded-md bg-gray-950 border border-gray-800 text-xs text-gray-200 focus:outline-none focus:border-primary-500"}),h.jsx(KP,{className:"w-3.5 h-3.5 text-gray-500 absolute left-2.5 top-1/2 -translate-y-1/2"})]}),h.jsx(ju,{on:e.hideEntities,onClick:()=>e.setHideEntities(!e.hideEntities),children:"Hide entities"}),h.jsx(ju,{on:e.hideOrphans,onClick:()=>e.setHideOrphans(!e.hideOrphans),children:"Hide orphans"}),h.jsx(ju,{on:e.hideLeaves,onClick:()=>e.setHideLeaves(!e.hideLeaves),children:"Hide leaves"}),h.jsxs(ju,{on:e.hideMiddleware,onClick:()=>e.setHideMiddleware(!e.hideMiddleware),children:[h.jsx(K_,{className:"w-3 h-3 mr-1"}),"Hide middleware"]}),h.jsxs(ju,{on:e.showModules,onClick:()=>e.setShowModules(!e.showModules),children:[h.jsx(qm,{className:"w-3 h-3 mr-1"}),"Modules"]}),h.jsx("div",{className:"inline-flex rounded-md border border-gray-800 overflow-hidden",children:["LR","TB"].map(t=>h.jsx("button",{onClick:()=>e.setLayoutDir(t),className:`px-2 py-1 text-[10px] font-medium tracking-wide ${e.layoutDir===t?"bg-primary-500/20 text-primary-300":"bg-gray-900 text-gray-500 hover:text-gray-300"}`,children:t},t))}),e.focusedNodeId&&h.jsx("button",{onClick:e.clearFocus,className:"text-[11px] px-2 py-1 rounded-md bg-amber-500/10 border border-amber-500/30 text-amber-300 hover:bg-amber-500/20",children:"Clear focus"}),h.jsxs("span",{className:"text-[11px] text-gray-500 ml-auto",children:[e.nodeCount," nodes",e.warningSummary?` · ${e.warningSummary}`:""]}),h.jsxs("div",{className:"relative",children:[h.jsxs("button",{onClick:()=>e.setExportMenuOpen(!e.exportMenuOpen),className:"flex items-center gap-1 px-2 py-1.5 rounded-md bg-gray-900 border border-gray-800 text-xs text-gray-300 hover:border-primary-500",children:[h.jsx(Sp,{className:"w-3.5 h-3.5"}),"Export",h.jsx(Pr,{className:"w-3 h-3"})]}),e.exportMenuOpen&&h.jsxs("div",{className:"absolute right-0 top-full mt-1 z-10 w-48 bg-gray-950 border border-gray-800 rounded-md shadow-xl overflow-hidden",children:[h.jsx(kv,{icon:h.jsx(ss,{className:"w-3.5 h-3.5"}),label:"Copy as Mermaid",hint:"Paste into READMEs / PRs",onClick:()=>e.onExport("mermaid")}),h.jsx(kv,{icon:h.jsx(Xi,{className:"w-3.5 h-3.5"}),label:"Download SVG",hint:"Scalable vector for docs",onClick:()=>e.onExport("svg")}),h.jsx(kv,{icon:h.jsx(r7,{className:"w-3.5 h-3.5"}),label:"Copy as JSON",hint:"Stats + warnings + structure",onClick:()=>e.onExport("json")})]})]})]})}function ju({on:e,onClick:t,children:n}){return h.jsx("button",{onClick:t,className:`inline-flex items-center px-2 py-1 rounded-md text-[11px] font-medium border ${e?"bg-primary-500/15 border-primary-500/40 text-primary-200":"bg-gray-900 border-gray-800 text-gray-500 hover:text-gray-300"}`,children:n})}function kv({icon:e,label:t,hint:n,onClick:r}){return h.jsxs("button",{onClick:r,className:"flex items-start gap-2 w-full px-3 py-2 text-left hover:bg-gray-900 transition-colors",children:[h.jsx("span",{className:"text-gray-400 mt-0.5",children:e}),h.jsxs("span",{className:"flex-1",children:[h.jsx("span",{className:"block text-xs text-gray-200",children:t}),h.jsx("span",{className:"block text-[10px] text-gray-500",children:n})]})]})}function Au({dot:e,label:t}){return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:`w-2.5 h-2.5 rounded ${e}`}),h.jsx("span",{children:t})]})}function wK(e,t,n,r){if(e.startsWith("controller-")){const i=e.slice(11),o=t.controllers.find(l=>l.name===i);return o?{kind:"controller",name:i,filePath:o.filePath,routes:n.filter(l=>l.controller===i),methods:[],dependencies:o.dependencies,stats:r}:null}if(e.startsWith("service-")){const i=e.slice(8),o=t.services.find(l=>l.name===i);return o?{kind:"service",name:i,filePath:o.filePath,routes:[],methods:o.methods,dependencies:o.dependencies,stats:r}:null}if(e.startsWith("provider-")){const i=e.slice(9),o=t.providers.find(l=>l.name===i);return o?{kind:"provider",name:i,filePath:o.filePath,routes:[],methods:o.methods,dependencies:o.dependencies,stats:r}:null}if(e.startsWith("middleware-")){const i=e.slice(11),o=t.middleware.find(l=>l.name===i);return o?{kind:"middleware",name:i,filePath:o.filePath||void 0,routes:[],methods:o.methods,dependencies:o.dependencies,stats:r,middlewareScope:o.scope}:null}return null}function SK({node:e,onClose:t,onTryInApiClient:n}){return h.jsxs("div",{className:"absolute right-0 top-0 bottom-0 w-96 bg-gray-950/95 border-l border-gray-800 backdrop-blur-md p-4 overflow-y-auto",children:[h.jsxs("div",{className:"flex items-start justify-between mb-3",children:[h.jsxs("div",{children:[h.jsx("p",{className:"text-[10px] uppercase tracking-wide text-gray-500",children:e.kind}),h.jsx("h3",{className:"text-sm font-mono font-semibold text-gray-100",children:e.name})]}),h.jsx("button",{onClick:t,className:"text-gray-500 hover:text-gray-200 p-1","aria-label":"Close",children:h.jsx(Dr,{className:"w-4 h-4"})})]}),e.stats&&e.stats.req>0&&h.jsxs("div",{className:"mb-3 p-2.5 rounded-md bg-gray-900/60 border border-gray-800",children:[h.jsx("p",{className:"text-[10px] uppercase tracking-wide text-gray-500 mb-1",children:"Runtime"}),h.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[h.jsxs("span",{className:"text-gray-300",children:[h.jsx("span",{className:"text-gray-500",children:"req:"})," ",e.stats.req]}),h.jsxs("span",{className:"text-gray-300",children:[h.jsx("span",{className:"text-gray-500",children:"avg:"})," ",e.stats.avgMs.toFixed(0),"ms"]}),h.jsxs("span",{className:"text-gray-300",children:[h.jsx("span",{className:"text-gray-500",children:"p95:"})," ",e.stats.p95Ms.toFixed(0),"ms"]}),h.jsxs("span",{className:e.stats.errors>0?"text-error-400":"text-gray-500",children:[h.jsx("span",{className:"text-gray-500",children:"err:"})," ",e.stats.errors]})]})]}),e.routes.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsxs("p",{className:"text-[10px] uppercase tracking-wide text-gray-500 mb-1",children:["Routes (",e.routes.length,")"]}),h.jsx("div",{className:"space-y-1",children:e.routes.map((r,i)=>h.jsxs("div",{className:"p-1.5 rounded bg-gray-900/40 border border-gray-800",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:`text-[10px] font-mono font-semibold w-12 text-center ${Cl(r.method)}`,children:r.method}),h.jsx("span",{className:"text-xs font-mono text-gray-200 flex-1 truncate",children:r.path}),h.jsx("button",{onClick:()=>n(r),title:"Send via API Client",className:"text-primary-300 hover:text-primary-200 p-1 rounded hover:bg-primary-500/10",children:h.jsx(X_,{className:"w-3.5 h-3.5"})})]}),r.bodyDto&&h.jsxs("div",{className:"mt-1 ml-14",children:[h.jsxs("div",{className:"flex items-center gap-1",children:[h.jsx("span",{className:"text-[9px] text-sky-400/70",children:"body:"}),h.jsx("span",{className:"text-[10px] font-mono text-sky-300",children:r.bodyDto})]}),r.bodySample&&Object.keys(r.bodySample).length>0&&h.jsx("div",{className:"mt-0.5 ml-2 space-y-px",children:Object.entries(r.bodySample).map(([o,l])=>h.jsxs("div",{className:"flex items-center gap-1.5 text-[9px]",children:[h.jsx("span",{className:"font-mono text-gray-400",children:o}),h.jsx("span",{className:"text-gray-600",children:":"}),h.jsx("span",{className:"font-mono text-gray-500",children:typeof l=="object"&&l!==null?"object":typeof l})]},o))})]})]},`${r.method}-${r.path}-${i}`))})]}),e.methods.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsxs("p",{className:"text-[10px] uppercase tracking-wide text-gray-500 mb-1",children:["Methods (",e.methods.length,")"]}),h.jsx("div",{className:"flex flex-wrap gap-1",children:e.methods.map(r=>h.jsxs("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono bg-gray-900/60 border border-gray-800 text-gray-300",children:[r,"()"]},r))})]}),e.dependencies.length>0&&h.jsxs("div",{className:"mb-3",children:[h.jsx("p",{className:"text-[10px] uppercase tracking-wide text-gray-500 mb-1",children:"Depends on"}),h.jsx("div",{className:"flex flex-wrap gap-1",children:e.dependencies.map(r=>h.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-mono bg-gray-900/60 border border-gray-800 text-gray-300",children:r},r))})]}),e.filePath&&h.jsxs("button",{onClick:()=>ls({filePath:e.filePath}),className:"w-full flex items-center justify-center gap-1.5 mt-2 py-1.5 rounded-md bg-gray-900 border border-gray-800 text-xs text-gray-300 hover:border-primary-500",children:[h.jsx(Xi,{className:"w-3.5 h-3.5"}),"Open in editor"]})]})}const _K={controller:kK,service:RK,provider:PK,middleware:DK,module:$K};function J$(e,t){const n=[],r=[],i=new Map,o={global:"Global",controller:"Controller",route:"Route",unknown:""},l=[...e.controllers.map(A=>({name:A.name,kind:"controller",routes:A.routes.length,filePath:A.filePath})),...e.services.map(A=>({name:A.name,kind:"service",methods:A.methods.length,filePath:A.filePath})),...e.providers.map(A=>({name:A.name,kind:"provider",methods:A.methods.length,filePath:A.filePath})),...e.middleware.map(A=>({name:A.name,kind:"middleware",filePath:A.filePath||void 0,middlewareScope:A.scope}))];for(const A of l)i.set(A.name,`${A.kind}-${A.name}`);const c=new Map,f=new Map;for(const A of l)c.set(A.name,[]),f.set(A.name,[]);const d=new Set;for(const A of e.dependencies){if(!i.has(A.source)||!i.has(A.target))continue;const C=`${A.source}->${A.target}`;d.has(C)||(d.add(C),c.get(A.source).push(A.target),f.get(A.target).push(A.source))}const y=new Map,p=[];for(const A of l)A.kind==="middleware"&&(y.set(A.name,0),p.push(A.name));for(const A of l)A.kind==="controller"&&(y.has(A.name)||(y.set(A.name,1),p.push(A.name)));for(const A of l)(f.get(A.name)??[]).length===0&&!y.has(A.name)&&(y.set(A.name,0),p.push(A.name));if(p.length===0)for(const A of l)A.kind==="controller"&&(y.set(A.name,0),p.push(A.name));for(;p.length>0;){const A=p.shift(),C=y.get(A)??0;for(const R of c.get(A)??[]){const D=C+1;(y.get(R)??-1)<D&&(y.set(R,D),p.push(R))}}const g=Math.max(0,...Array.from(y.values()));for(const A of l)y.has(A.name)||y.set(A.name,g+1);const v=new Map;for(const A of l){const C=y.get(A.name)??0,R=v.get(C)??[];R.push(A),v.set(C,R)}const w=300,S=150,b=80,j=60,T=new Map;for(const[A,C]of v)C.sort((R,D)=>{const G={middleware:0,controller:1,service:2,provider:3};return G[R.kind]!==G[D.kind]?G[R.kind]-G[D.kind]:R.name.localeCompare(D.name)}),C.forEach((R,D)=>{const G=t.layoutDir==="LR"?b+A*w:b+D*w,I=t.layoutDir==="LR"?j+D*S:j+A*S;T.set(R.name,{x:G,y:I})});const N=new Map;if(t.showModules)for(const A of e.modules??[])for(const C of A.members)N.has(C)||N.set(C,A.name);for(const A of l){const C=T.get(A.name),R=N.get(A.name),D=A.kind==="middleware"?A.middlewareScope&&A.middlewareScope!=="unknown"?o[A.middlewareScope]:void 0:t.scopeIndex.get(A.name);n.push({id:i.get(A.name),type:A.kind,position:C,...R?{parentId:`module-${R}`,extent:"parent"}:{},data:{label:A.name,routes:A.routes,methods:A.methods,filePath:A.filePath,scope:D,stats:t.stats.get(A.name),warnings:t.warnings.get(A.name)}})}if(t.showModules){const C=[];for(const D of e.modules??[]){const G=D.members.map(U=>T.get(U)).filter(U=>!!U);if(G.length===0)continue;const I=Math.min(...G.map(U=>U.x)),L=Math.min(...G.map(U=>U.y)),Y=Math.max(...G.map(U=>U.x))+220,P=Math.max(...G.map(U=>U.y))+110;C.push({id:`module-${D.name}`,type:"module",position:{x:I-32,y:L-32},data:{label:D.name,filePath:D.filePath,memberCount:D.members.length},style:{width:Y-I+64,height:P-L+64},selectable:!0,draggable:!0,zIndex:-1})}const R=new Map(C.map(D=>[D.id,D]));for(const D of n){const G=D.parentId;if(!G)continue;const I=R.get(G);I&&(D.position={x:D.position.x-I.position.x,y:D.position.y-I.position.y})}n.unshift(...C)}const E=new Map;for(const A of l)A.kind==="middleware"&&E.set(A.name,A.middlewareScope);const O=new Set;return e.dependencies.forEach((A,C)=>{const R=i.get(A.source),D=i.get(A.target);if(!R||!D)return;const G=`${R}->${D}`;if(O.has(G))return;O.add(G);const I=A.type==="middleware",L=E.get(A.source);let Y,P,U=!1;if(I)P="#f59e0b",L==="global"?(Y="global",U=!0):L==="route"?Y="route":Y="protects";else{const k=t.dtoEdgeLabels.get(`${A.source}->${A.target}`);Y=k?`↳ ${k}`:"depends on",P="#475569"}r.push({id:`edge-${C}-${A.source}-${A.target}`,source:R,target:D,type:"smoothstep",animated:!1,label:Y,labelStyle:{fill:I?"#fbbf24":t.dtoEdgeLabels.has(`${A.source}->${A.target}`)?"#7dd3fc":"#9ca3af",fontSize:10,fontFamily:"ui-monospace, SFMono-Regular, monospace"},labelBgStyle:{fill:"#0f172a",fillOpacity:.85},labelBgPadding:[4,2],labelBgBorderRadius:4,style:{stroke:P,strokeWidth:1.5,...U?{strokeDasharray:"4 4"}:{}},markerEnd:{type:Za.ArrowClosed,color:P}})}),{nodes:n,edges:r}}function jK(e,t){const n=t.search.trim().toLowerCase(),r=new Map,i=new Map;for(const p of e.edges)r.set(p.source,(r.get(p.source)??0)+1),i.set(p.target,(i.get(p.target)??0)+1);const o=p=>{var w;if(p.type==="module")return!0;if(t.hideMiddleware&&p.type==="middleware")return!1;const g=(((w=p.data)==null?void 0:w.label)??"").toString();if(n&&!g.toLowerCase().includes(n)||t.hideEntities&&vK.test(g))return!1;const v=t.warnings.get(g);return!(t.hideOrphans&&(v!=null&&v.orphan)||t.hideLeaves&&(r.get(p.id)??0)===0&&p.type!=="controller"&&p.type!=="middleware")},l=e.nodes.filter(o),c=new Map;for(const p of l){const g=p.parentId;g&&c.set(g,(c.get(g)??0)+1)}const f=l.filter(p=>p.type!=="module"?!0:(c.get(p.id)??0)>0),d=new Set(f.map(p=>p.id)),y=e.edges.filter(p=>d.has(p.source)&&d.has(p.target));return{nodes:f,edges:y}}function AK(e,t){const n=t.activeNodeIds.size>0,r=t.focusedNeighborhood.size>0,i=c=>!!(n&&!t.activeNodeIds.has(c)||r&&!t.focusedNeighborhood.has(c)),o=e.nodes.map(c=>{const f=c.type!=="module"&&i(c.id),d=t.pulseNodes.has(c.id);return{...c,data:{...c.data,active:t.activeNodeIds.has(c.id),pulse:d},style:{...c.style??{},opacity:f?.25:1,transition:"opacity 200ms ease"}}}),l=e.edges.map(c=>{const f=n&&t.activeNodeIds.has(c.source)&&t.activeNodeIds.has(c.target),d=r&&t.focusedNeighborhood.has(c.source)&&t.focusedNeighborhood.has(c.target),y=t.pulseEdges.has(c.id);let p="#475569",g=1.5,v=1,w=!1;return n&&!f&&(v=.3),r&&!d&&(v=.3),(f||y)&&(p="#22c55e",g=2.5,v=1,w=!0),{...c,animated:w,style:{...c.style??{},stroke:p,strokeWidth:g,opacity:v},markerEnd:{type:Za.ArrowClosed,color:p}}});return{nodes:o,edges:l}}function NK(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}function OK(e,t){var i;const n=new Map;if(t.length===0)return n;const r=new Map;for(const o of t){const l=e.find(f=>f.method===o.request.method&&f.path===o.request.path)??((i=e.filter(f=>f.method===o.request.method).map(f=>({r:f,score:v2(f.path,o.request.path)})).filter(f=>f.score>0).sort((f,d)=>d.score-f.score)[0])==null?void 0:i.r);if(!l)continue;const c=r.get(l.controller)??{durations:[],errors:0};c.durations.push(o.response.duration),o.response.statusCode>=400&&c.errors++,r.set(l.controller,c)}for(const[o,l]of r){const c=[...l.durations].sort((y,p)=>y-p),f=Math.max(0,Math.ceil(c.length*.95)-1),d=c.reduce((y,p)=>y+p,0)/c.length;n.set(o,{req:c.length,errors:l.errors,avgMs:d,p95Ms:c[f]??d})}return n}function EK(e){const t=new Map,n=new Set([...e.controllers.map(p=>p.name),...e.services.map(p=>p.name),...e.providers.map(p=>p.name),...e.middleware.map(p=>p.name)]),r=new Map,i=new Map;for(const p of n)r.set(p,new Set),i.set(p,0);for(const p of e.dependencies)!n.has(p.source)||!n.has(p.target)||r.get(p.source).has(p.target)||(r.get(p.source).add(p.target),i.set(p.target,(i.get(p.target)??0)+1));const o=new Map,l=new Set,c=[];function f(p){o.set(p,1),c.push(p);for(const g of r.get(p)??[]){const v=o.get(g)??0;if(v===0)f(g);else if(v===1){const w=c.indexOf(g);if(w>=0)for(let S=w;S<c.length;S++)l.add(c[S])}}c.pop(),o.set(p,2)}for(const p of n)(o.get(p)??0)===0&&f(p);const d=new Set(e.controllers.map(p=>p.name)),y=new Set(e.middleware.map(p=>p.name));for(const p of n){const g={};l.has(p)&&(g.cycle=!0),!d.has(p)&&!y.has(p)&&(i.get(p)??0)===0&&(g.orphan=!0);const v=i.get(p)??0;v>=gK&&(g.fanIn=v),Object.keys(g).length>0&&t.set(p,g)}return t}function TK(e){let t=0,n=0,r=0;for(const o of e.values())o.cycle&&t++,o.orphan&&n++,o.fanIn&&r++;const i=[];return t&&i.push(`${t} cycle`),n&&i.push(`${n} orphan${n===1?"":"s"}`),r&&i.push(`${r} hub`),i.join(" · ")}function CK(e,t){var r;const n=new Map;if(!t)return n;for(const i of t.controllers){if(i.dependencies.length===0)continue;const o=i.dependencies[0],l=(r=e.find(c=>c.controller===i.name&&c.bodyDto))==null?void 0:r.bodyDto;l&&n.set(`${i.name}->${o}`,l)}return n}function MK(e,t,n){var l;const r=new Set,i=new Set,o=t.find(c=>c.method===e.request.method&&c.path===e.request.path)??((l=t.filter(c=>c.method===e.request.method).map(c=>({r:c,score:v2(c.path,e.request.path)})).filter(c=>c.score>0).sort((c,f)=>f.score-c.score)[0])==null?void 0:l.r);o&&r.add(`controller-${o.controller}`);for(const c of n){const f=c.replace(/^Symbol\(([^)]+)\)$/,"$1").trim();r.add(`service-${f}`),r.add(`provider-${f}`)}return{nodeIds:r,edgeIds:i}}function Jm({scope:e}){if(!e)return null;const t=mK[e]??"text-gray-300 bg-gray-800 border-gray-700";return h.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 ey({stats:e}){if(!e||e.req===0)return null;const t=e.errors>0?"text-error-400":"text-gray-500";return h.jsxs("div",{className:"mt-1 flex items-center gap-2 text-[10px] font-mono",children:[h.jsxs("span",{className:"text-gray-400",children:[e.req," req"]}),h.jsx("span",{className:"text-gray-500",children:"·"}),h.jsxs("span",{className:"text-gray-400",children:["p95 ",e.p95Ms.toFixed(0),"ms"]}),e.errors>0&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-gray-500",children:"·"}),h.jsxs("span",{className:t,children:[e.errors," err"]})]})]})}function ty({warnings:e}){return!e||!e.cycle&&!e.orphan&&!e.fanIn?null:h.jsxs("div",{className:"mt-1 flex items-center gap-1",children:[e.cycle&&h.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium bg-error-500/15 border border-error-500/40 text-error-300",title:"Part of a circular dependency",children:[h.jsx(Wr,{className:"w-2.5 h-2.5 mr-0.5"}),"cycle"]}),e.orphan&&h.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium bg-amber-500/15 border border-amber-500/40 text-amber-300",title:"No one depends on this — possibly dead code",children:[h.jsx(Wr,{className:"w-2.5 h-2.5 mr-0.5"}),"orphan"]}),e.fanIn&&h.jsxs("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium bg-orange-500/15 border border-orange-500/40 text-orange-300",title:`Used by ${e.fanIn} components — refactor candidate`,children:[h.jsx(Wr,{className:"w-2.5 h-2.5 mr-0.5"}),"fan-in ",e.fanIn]})]})}function ny(e,t,n){return[n,e?yK:"",t?"ring-2 ring-emerald-400 shadow-[0_0_24px_rgba(34,197,94,0.5)]":""].filter(Boolean).join(" ")}function kK({data:e}){return h.jsxs("div",{className:ny(e.active,e.pulse,"bg-blue-500/10 border-2 border-blue-500 rounded-lg p-3 min-w-[200px]"),children:[h.jsx(pr,{type:"target",position:Ne.Left,className:"!bg-blue-500"}),h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx(VP,{className:"w-3.5 h-3.5 text-blue-400"}),h.jsx("span",{className:"text-xs font-semibold text-blue-300",children:"Controller"})]}),h.jsx(Jm,{scope:e.scope})]}),h.jsx("p",{className:"text-sm text-white font-mono truncate",children:e.label}),e.routes!==void 0&&h.jsxs("p",{className:"text-[11px] text-gray-400 mt-0.5",children:[e.routes," route",e.routes===1?"":"s"]}),h.jsx(ey,{stats:e.stats}),h.jsx(ty,{warnings:e.warnings}),h.jsx(pr,{type:"source",position:Ne.Right,className:"!bg-blue-500"})]})}function RK({data:e}){return h.jsxs("div",{className:ny(e.active,e.pulse,"bg-green-500/10 border-2 border-green-500 rounded-lg p-3 min-w-[200px]"),children:[h.jsx(pr,{type:"target",position:Ne.Left,className:"!bg-green-500"}),h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx(XP,{className:"w-3.5 h-3.5 text-green-400"}),h.jsx("span",{className:"text-xs font-semibold text-green-300",children:"Service"})]}),h.jsx(Jm,{scope:e.scope})]}),h.jsx("p",{className:"text-sm text-white font-mono truncate",children:e.label}),e.methods!==void 0&&h.jsxs("p",{className:"text-[11px] text-gray-400 mt-0.5",children:[e.methods," method",e.methods===1?"":"s"]}),h.jsx(ey,{stats:e.stats}),h.jsx(ty,{warnings:e.warnings}),h.jsx(pr,{type:"source",position:Ne.Right,className:"!bg-green-500"})]})}function PK({data:e}){return h.jsxs("div",{className:ny(e.active,e.pulse,"bg-purple-500/10 border-2 border-purple-500 rounded-lg p-3 min-w-[200px]"),children:[h.jsx(pr,{type:"target",position:Ne.Left,className:"!bg-purple-500"}),h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx(dc,{className:"w-3.5 h-3.5 text-purple-400"}),h.jsx("span",{className:"text-xs font-semibold text-purple-300",children:"Provider"})]}),h.jsx(Jm,{scope:e.scope})]}),h.jsx("p",{className:"text-sm text-white font-mono truncate",children:e.label}),e.methods!==void 0&&h.jsxs("p",{className:"text-[11px] text-gray-400 mt-0.5",children:[e.methods," method",e.methods===1?"":"s"]}),h.jsx(ey,{stats:e.stats}),h.jsx(ty,{warnings:e.warnings}),h.jsx(pr,{type:"source",position:Ne.Right,className:"!bg-purple-500"})]})}function DK({data:e}){return h.jsxs("div",{className:ny(e.active,e.pulse,"bg-amber-500/10 border-2 border-amber-500 rounded-lg p-3 min-w-[200px]"),children:[h.jsx(pr,{type:"target",position:Ne.Left,className:"!bg-amber-500"}),h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[h.jsxs("div",{className:"flex items-center gap-1.5",children:[h.jsx(K_,{className:"w-3.5 h-3.5 text-amber-400"}),h.jsx("span",{className:"text-xs font-semibold text-amber-300",children:"Middleware"})]}),h.jsx(Jm,{scope:e.scope})]}),h.jsx("p",{className:"text-sm text-white font-mono truncate",children:e.label}),h.jsx(ey,{stats:e.stats}),h.jsx(ty,{warnings:e.warnings}),h.jsx(pr,{type:"source",position:Ne.Right,className:"!bg-amber-500"})]})}function $K({data:e}){return h.jsx("div",{className:"w-full h-full rounded-xl border-2 border-dashed border-gray-700 bg-gray-900/20",children:h.jsxs("div",{className:"px-2 py-1 text-[10px] font-mono text-gray-500 uppercase tracking-wide",children:[h.jsx(qm,{className:"inline w-3 h-3 mr-1"}),e.label,h.jsxs("span",{className:"ml-2 text-gray-600",children:["(",e.memberCount,")"]})]})})}function IK(e){return e.replace(/^(controller|service|provider|middleware|module)-/,"")}function v2(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 LK(e,t){const r=[`flowchart ${t==="LR"?"LR":"TB"}`],i=v=>v.replace(/[^A-Za-z0-9_]/g,"_"),o=new Set(e.controllers.map(v=>v.name)),l=new Set(e.services.map(v=>v.name)),c=new Set(e.providers.map(v=>v.name)),f=new Set(e.middleware.map(v=>v.name)),d=v=>o.has(v)?`${i(v)}["${v}<br/><i>controller</i>"]`:c.has(v)?`${i(v)}[(${v})]`:l.has(v)?`${i(v)}(["${v}"])`:f.has(v)?`${i(v)}{{"${v}<br/><i>middleware</i>"}}`:`${i(v)}["${v}"]`;for(const v of e.modules??[])if(v.members.length!==0){r.push(` subgraph ${i(v.name)} ["${v.name}"]`);for(const w of v.members)r.push(` ${d(w)}`);r.push(" end")}const y=new Set;for(const v of e.modules??[])for(const w of v.members)y.add(w);for(const v of e.controllers)y.has(v.name)||r.push(` ${d(v.name)}`);for(const v of e.services)y.has(v.name)||r.push(` ${d(v.name)}`);for(const v of e.providers)y.has(v.name)||r.push(` ${d(v.name)}`);for(const v of e.middleware)y.has(v.name)||r.push(` ${d(v.name)}`);const p=new Map(e.middleware.map(v=>[v.name,v.scope])),g=new Set;for(const v of e.dependencies){const w=`${v.source}->${v.target}`;if(!g.has(w))if(g.add(w),v.type==="middleware"){const S=p.get(v.source),b=S==="global"?"-..->":"-->",j=S==="global"?"global":"protects";r.push(` ${i(v.source)} ${b}|${j}| ${i(v.target)}`)}else r.push(` ${i(v.source)} --> ${i(v.target)}`)}r.push(""),r.push(" classDef controller fill:#1e3a8a,stroke:#3b82f6,color:#dbeafe;"),r.push(" classDef service fill:#14532d,stroke:#22c55e,color:#dcfce7;"),r.push(" classDef provider fill:#581c87,stroke:#a855f7,color:#f3e8ff;"),r.push(" classDef middleware fill:#78350f,stroke:#f59e0b,color:#fef3c7;");for(const v of e.controllers)r.push(` class ${i(v.name)} controller;`);for(const v of e.services)r.push(` class ${i(v.name)} service;`);for(const v of e.providers)r.push(` class ${i(v.name)} provider;`);for(const v of e.middleware)r.push(` class ${i(v.name)} middleware;`);return r.join(`
|
|
489
|
+
`)}function qK(e,t){var j,T,N;const{nodes:n,edges:r}=J$(e,{scopeIndex:new Map,stats:t.stats,warnings:t.warnings,dtoEdgeLabels:new Map,layoutDir:t.layoutDir,showModules:!0}),i=220,o=96;let l=1/0,c=1/0,f=-1/0,d=-1/0;for(const E of n){if(E.type==="module")continue;const O=E.parentId?n.find(R=>R.id===E.parentId):null,A=((O==null?void 0:O.position.x)??0)+E.position.x,C=((O==null?void 0:O.position.y)??0)+E.position.y;l=Math.min(l,A),c=Math.min(c,C),f=Math.max(f,A+i),d=Math.max(d,C+o)}isFinite(l)||(l=0,c=0,f=800,d=400);const y=40,p=f-l+y*2,g=d-c+y*2,v=-l+y,w=-c+y,S=E=>{switch(E){case"controller":return{fill:"#1e3a8a",stroke:"#3b82f6",text:"#dbeafe"};case"service":return{fill:"#14532d",stroke:"#22c55e",text:"#dcfce7"};case"provider":return{fill:"#581c87",stroke:"#a855f7",text:"#f3e8ff"};case"middleware":return{fill:"#78350f",stroke:"#f59e0b",text:"#fef3c7"};default:return{fill:"#1f2937",stroke:"#475569",text:"#cbd5e1"}}},b=[];b.push(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${p} ${g}" font-family="ui-monospace, SFMono-Regular, monospace" font-size="12">`),b.push('<rect width="100%" height="100%" fill="#0b1220"/>');for(const E of n){if(E.type!=="module")continue;const O=E.position.x+v,A=E.position.y+w,C=((j=E.style)==null?void 0:j.width)??240,R=((T=E.style)==null?void 0:T.height)??200;b.push(`<rect x="${O}" y="${A}" width="${C}" height="${R}" fill="#0f172a" stroke="#334155" stroke-dasharray="6 4" rx="14"/>`),b.push(`<text x="${O+12}" y="${A+18}" fill="#64748b" font-size="11">▤ ${Xh((((N=E.data)==null?void 0:N.label)??"").toString())}</text>`)}for(const E of r){const O=n.find(P=>P.id===E.source),A=n.find(P=>P.id===E.target);if(!O||!A)continue;const C=O.parentId?n.find(P=>P.id===O.parentId):null,R=A.parentId?n.find(P=>P.id===A.parentId):null,D=((C==null?void 0:C.position.x)??0)+O.position.x+i+v,G=((C==null?void 0:C.position.y)??0)+O.position.y+o/2+w,I=((R==null?void 0:R.position.x)??0)+A.position.x+v,L=((R==null?void 0:R.position.y)??0)+A.position.y+o/2+w,Y=(D+I)/2;b.push(`<path d="M ${D} ${G} C ${Y} ${G}, ${Y} ${L}, ${I} ${L}" stroke="#475569" stroke-width="1.5" fill="none" marker-end="url(#arrow)"/>`),typeof E.label=="string"&&b.push(`<text x="${Y}" y="${(G+L)/2-6}" fill="#94a3b8" font-size="10" text-anchor="middle">${Xh(E.label)}</text>`)}b.push('<defs><marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#475569"/></marker></defs>');for(const E of n){if(E.type==="module")continue;const O=S(E.type??""),A=E.parentId?n.find(L=>L.id===E.parentId):null,C=((A==null?void 0:A.position.x)??0)+E.position.x+v,R=((A==null?void 0:A.position.y)??0)+E.position.y+w;b.push(`<rect x="${C}" y="${R}" width="${i}" height="${o}" rx="8" fill="${O.fill}" stroke="${O.stroke}" stroke-width="2"/>`),b.push(`<text x="${C+12}" y="${R+22}" fill="${O.stroke}" font-size="11">${(E.type??"").toString()}</text>`);const D=E.data;b.push(`<text x="${C+12}" y="${R+44}" fill="${O.text}" font-size="13" font-weight="600">${Xh(((D==null?void 0:D.label)??"").toString())}</text>`);const G=[];D.routes!==void 0&&G.push(`${D.routes} routes`),D.methods!==void 0&&G.push(`${D.methods} methods`),b.push(`<text x="${C+12}" y="${R+64}" fill="${O.text}" opacity="0.7" font-size="11">${Xh(G.join(" · "))}</text>`);const I=D.stats;I&&I.req>0&&b.push(`<text x="${C+12}" y="${R+84}" fill="${O.text}" opacity="0.7" font-size="10">${I.req} req · p95 ${I.p95Ms.toFixed(0)}ms${I.errors?` · ${I.errors} err`:""}</text>`)}return b.push("</svg>"),b.join(`
|
|
490
|
+
`)}function Xh(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function BK(e,t){const n=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(r)}var Rv,WT;function Pn(){if(WT)return Rv;WT=1;var e=Array.isArray;return Rv=e,Rv}var Pv,QT;function e8(){if(QT)return Pv;QT=1;var e=typeof Rh=="object"&&Rh&&Rh.Object===Object&&Rh;return Pv=e,Pv}var Dv,ZT;function ii(){if(ZT)return Dv;ZT=1;var e=e8(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Dv=n,Dv}var $v,JT;function nd(){if(JT)return $v;JT=1;var e=ii(),t=e.Symbol;return $v=t,$v}var Iv,eC;function zK(){if(eC)return Iv;eC=1;var e=nd(),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 Iv=o,Iv}var Lv,tC;function HK(){if(tC)return Lv;tC=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Lv=n,Lv}var qv,nC;function Wi(){if(nC)return qv;nC=1;var e=nd(),t=zK(),n=HK(),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 qv=l,qv}var Bv,rC;function Qi(){if(rC)return Bv;rC=1;function e(t){return t!=null&&typeof t=="object"}return Bv=e,Bv}var zv,iC;function hc(){if(iC)return zv;iC=1;var e=Wi(),t=Qi(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return zv=r,zv}var Hv,aC;function x2(){if(aC)return Hv;aC=1;var e=Pn(),t=hc(),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 Hv=i,Hv}var Uv,oC;function eo(){if(oC)return Uv;oC=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Uv=e,Uv}var Gv,sC;function b2(){if(sC)return Gv;sC=1;var e=Wi(),t=eo(),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 Gv=l,Gv}var Vv,lC;function UK(){if(lC)return Vv;lC=1;var e=ii(),t=e["__core-js_shared__"];return Vv=t,Vv}var Fv,cC;function GK(){if(cC)return Fv;cC=1;var e=UK(),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 Fv=n,Fv}var Yv,uC;function t8(){if(uC)return Yv;uC=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 Yv=n,Yv}var Xv,fC;function VK(){if(fC)return Xv;fC=1;var e=b2(),t=GK(),n=eo(),r=t8(),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 v=e(g)?y:o;return v.test(r(g))}return Xv=p,Xv}var Kv,dC;function FK(){if(dC)return Kv;dC=1;function e(t,n){return t==null?void 0:t[n]}return Kv=e,Kv}var Wv,hC;function cs(){if(hC)return Wv;hC=1;var e=VK(),t=FK();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return Wv=n,Wv}var Qv,pC;function ry(){if(pC)return Qv;pC=1;var e=cs(),t=e(Object,"create");return Qv=t,Qv}var Zv,mC;function YK(){if(mC)return Zv;mC=1;var e=ry();function t(){this.__data__=e?e(null):{},this.size=0}return Zv=t,Zv}var Jv,yC;function XK(){if(yC)return Jv;yC=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Jv=e,Jv}var ex,gC;function KK(){if(gC)return ex;gC=1;var e=ry(),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 ex=i,ex}var tx,vC;function WK(){if(vC)return tx;vC=1;var e=ry(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return tx=r,tx}var nx,xC;function QK(){if(xC)return nx;xC=1;var e=ry(),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 nx=n,nx}var rx,bC;function ZK(){if(bC)return rx;bC=1;var e=YK(),t=XK(),n=KK(),r=WK(),i=QK();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,rx=o,rx}var ix,wC;function JK(){if(wC)return ix;wC=1;function e(){this.__data__=[],this.size=0}return ix=e,ix}var ax,SC;function w2(){if(SC)return ax;SC=1;function e(t,n){return t===n||t!==t&&n!==n}return ax=e,ax}var ox,_C;function iy(){if(_C)return ox;_C=1;var e=w2();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return ox=t,ox}var sx,jC;function eW(){if(jC)return sx;jC=1;var e=iy(),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 sx=r,sx}var lx,AC;function tW(){if(AC)return lx;AC=1;var e=iy();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return lx=t,lx}var cx,NC;function nW(){if(NC)return cx;NC=1;var e=iy();function t(n){return e(this.__data__,n)>-1}return cx=t,cx}var ux,OC;function rW(){if(OC)return ux;OC=1;var e=iy();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 ux=t,ux}var fx,EC;function ay(){if(EC)return fx;EC=1;var e=JK(),t=eW(),n=tW(),r=nW(),i=rW();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,fx=o,fx}var dx,TC;function S2(){if(TC)return dx;TC=1;var e=cs(),t=ii(),n=e(t,"Map");return dx=n,dx}var hx,CC;function iW(){if(CC)return hx;CC=1;var e=ZK(),t=ay(),n=S2();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return hx=r,hx}var px,MC;function aW(){if(MC)return px;MC=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return px=e,px}var mx,kC;function oy(){if(kC)return mx;kC=1;var e=aW();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return mx=t,mx}var yx,RC;function oW(){if(RC)return yx;RC=1;var e=oy();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return yx=t,yx}var gx,PC;function sW(){if(PC)return gx;PC=1;var e=oy();function t(n){return e(this,n).get(n)}return gx=t,gx}var vx,DC;function lW(){if(DC)return vx;DC=1;var e=oy();function t(n){return e(this,n).has(n)}return vx=t,vx}var xx,$C;function cW(){if($C)return xx;$C=1;var e=oy();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 xx=t,xx}var bx,IC;function _2(){if(IC)return bx;IC=1;var e=iW(),t=oW(),n=sW(),r=lW(),i=cW();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,bx=o,bx}var wx,LC;function n8(){if(LC)return wx;LC=1;var e=_2(),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,wx=n,wx}var Sx,qC;function uW(){if(qC)return Sx;qC=1;var e=n8(),t=500;function n(r){var i=e(r,function(l){return o.size===t&&o.clear(),l}),o=i.cache;return i}return Sx=n,Sx}var _x,BC;function fW(){if(BC)return _x;BC=1;var e=uW(),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 _x=r,_x}var jx,zC;function j2(){if(zC)return jx;zC=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 jx=e,jx}var Ax,HC;function dW(){if(HC)return Ax;HC=1;var e=nd(),t=j2(),n=Pn(),r=hc(),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 Ax=l,Ax}var Nx,UC;function r8(){if(UC)return Nx;UC=1;var e=dW();function t(n){return n==null?"":e(n)}return Nx=t,Nx}var Ox,GC;function i8(){if(GC)return Ox;GC=1;var e=Pn(),t=x2(),n=fW(),r=r8();function i(o,l){return e(o)?o:t(o,l)?[o]:n(r(o))}return Ox=i,Ox}var Ex,VC;function sy(){if(VC)return Ex;VC=1;var e=hc();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Ex=t,Ex}var Tx,FC;function A2(){if(FC)return Tx;FC=1;var e=i8(),t=sy();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 Tx=n,Tx}var Cx,YC;function a8(){if(YC)return Cx;YC=1;var e=A2();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return Cx=t,Cx}var hW=a8();const Kn=at(hW);var Mx,XC;function pW(){if(XC)return Mx;XC=1;function e(t){return t==null}return Mx=e,Mx}var mW=pW();const He=at(mW);var kx,KC;function yW(){if(KC)return kx;KC=1;var e=Wi(),t=Pn(),n=Qi(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return kx=i,kx}var gW=yW();const es=at(gW);var vW=b2();const Pe=at(vW);var xW=eo();const pc=at(xW);var Rx={exports:{}},rt={};/**
|
|
491
|
+
* @license React
|
|
492
|
+
* react-is.production.min.js
|
|
493
|
+
*
|
|
494
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
495
|
+
*
|
|
496
|
+
* This source code is licensed under the MIT license found in the
|
|
497
|
+
* LICENSE file in the root directory of this source tree.
|
|
498
|
+
*/var WC;function bW(){if(WC)return rt;WC=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"),v=Symbol.for("react.offscreen"),w;w=Symbol.for("react.module.reference");function S(b){if(typeof b=="object"&&b!==null){var j=b.$$typeof;switch(j){case e:switch(b=b.type,b){case n:case i:case r:case d:case y:return b;default:switch(b=b&&b.$$typeof,b){case c:case l:case f:case g:case p:case o:return b;default:return j}}case t:return j}}}return rt.ContextConsumer=l,rt.ContextProvider=o,rt.Element=e,rt.ForwardRef=f,rt.Fragment=n,rt.Lazy=g,rt.Memo=p,rt.Portal=t,rt.Profiler=i,rt.StrictMode=r,rt.Suspense=d,rt.SuspenseList=y,rt.isAsyncMode=function(){return!1},rt.isConcurrentMode=function(){return!1},rt.isContextConsumer=function(b){return S(b)===l},rt.isContextProvider=function(b){return S(b)===o},rt.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},rt.isForwardRef=function(b){return S(b)===f},rt.isFragment=function(b){return S(b)===n},rt.isLazy=function(b){return S(b)===g},rt.isMemo=function(b){return S(b)===p},rt.isPortal=function(b){return S(b)===t},rt.isProfiler=function(b){return S(b)===i},rt.isStrictMode=function(b){return S(b)===r},rt.isSuspense=function(b){return S(b)===d},rt.isSuspenseList=function(b){return S(b)===y},rt.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===i||b===r||b===d||b===y||b===v||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===p||b.$$typeof===o||b.$$typeof===l||b.$$typeof===f||b.$$typeof===w||b.getModuleId!==void 0)},rt.typeOf=S,rt}var QC;function wW(){return QC||(QC=1,Rx.exports=bW()),Rx.exports}var SW=wW(),Px,ZC;function o8(){if(ZC)return Px;ZC=1;var e=Wi(),t=Qi(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return Px=r,Px}var Dx,JC;function _W(){if(JC)return Dx;JC=1;var e=o8();function t(n){return e(n)&&n!=+n}return Dx=t,Dx}var jW=_W();const rd=at(jW);var AW=o8();const NW=at(AW);var Sn=function(t){return t===0?0:t>0?1:-1},Io=function(t){return es(t)&&t.indexOf("%")===t.length-1},xe=function(t){return NW(t)&&!rd(t)},OW=function(t){return He(t)},Wt=function(t){return xe(t)||es(t)},EW=0,id=function(t){var n=++EW;return"".concat(t||"").concat(n)},_n=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(!xe(t)&&!es(t))return r;var o;if(Io(t)){var l=t.indexOf("%");o=n*parseFloat(t.slice(0,l))/100}else o=+t;return rd(o)&&(o=r),i&&o>n&&(o=n),o},qa=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},TW=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},$a=function(t,n){return xe(t)&&xe(n)?function(r){return t+r*(n-t)}:function(){return n}};function uS(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):Kn(r,t))===n})}var CW=function(t,n){return xe(t)&&xe(n)?t-n:es(t)&&es(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function gl(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 fS(e){"@babel/helpers - typeof";return fS=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},fS(e)}var MW=["viewBox","children"],kW=["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"],e5=["points","pathLength"],$x={svg:MW,polygon:e5,polyline:e5},N2=["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"],Ip=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if($.isValidElement(t)&&(r=t.props),!pc(r))return null;var i={};return Object.keys(r).forEach(function(o){N2.includes(o)&&(i[o]=n||function(l){return r[o](r,l)})}),i},RW=function(t,n,r){return function(i){return t(n,r,i),null}},ts=function(t,n,r){if(!pc(t)||fS(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(o){var l=t[o];N2.includes(o)&&typeof l=="function"&&(i||(i={}),i[o]=RW(l,n,r))}),i},PW=["children"],DW=["children"];function t5(e,t){if(e==null)return{};var n=$W(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 $W(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 n5={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"},Bi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},r5=null,Ix=null,O2=function e(t){if(t===r5&&Array.isArray(Ix))return Ix;var n=[];return $.Children.forEach(t,function(r){He(r)||(SW.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Ix=n,r5=t,n};function hr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return Bi(i)}):r=[Bi(t)],O2(e).forEach(function(i){var o=Kn(i,"type.displayName")||Kn(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function Gn(e,t){var n=hr(e,t);return n&&n[0]}var i5=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!xe(r)||r<=0||!xe(i)||i<=0)},IW=["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"],LW=function(t){return t&&t.type&&es(t.type)&&IW.indexOf(t.type)>=0},qW=function(t,n,r,i){var o,l=(o=$x==null?void 0:$x[i])!==null&&o!==void 0?o:[];return n.startsWith("data-")||!Pe(t)&&(i&&l.includes(n)||kW.includes(n))||r&&N2.includes(n)},ke=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if($.isValidElement(t)&&(i=t.props),!pc(i))return null;var o={};return Object.keys(i).forEach(function(l){var c;qW((c=i)===null||c===void 0?void 0:c[l],l,n,r)&&(o[l]=i[l])}),o},dS=function e(t,n){if(t===n)return!0;var r=$.Children.count(t);if(r!==$.Children.count(n))return!1;if(r===0)return!0;if(r===1)return a5(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(!a5(o,l))return!1}return!0},a5=function(t,n){if(He(t)&&He(n))return!0;if(!He(t)&&!He(n)){var r=t.props||{},i=r.children,o=t5(r,PW),l=n.props||{},c=l.children,f=t5(l,DW);return i&&c?gl(o,f)&&dS(i,c):!i&&!c?gl(o,f):!1}return!1},o5=function(t,n){var r=[],i={};return O2(t).forEach(function(o,l){if(LW(o))r.push(o);else if(o){var c=Bi(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},BW=function(t){var n=t&&t.type;return n&&n5[n]?n5[n]:null},zW=function(t,n){return O2(n).indexOf(t)},HW=["children","width","height","viewBox","className","style","title","desc"];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 UW(e,t){if(e==null)return{};var n=GW(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 GW(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 pS(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=UW(e,HW),y=i||{width:n,height:r,x:0,y:0},p=Be("recharts-surface",o);return W.createElement("svg",hS({},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 VW=["children","className"];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)}function FW(e,t){if(e==null)return{};var n=YW(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 YW(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 lt=W.forwardRef(function(e,t){var n=e.children,r=e.className,i=FW(e,VW),o=Be("recharts-layer",r);return W.createElement("g",mS({className:o},ke(i,!0),{ref:t}),n)}),Rr=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]},Lx,s5;function XW(){if(s5)return Lx;s5=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 Lx=e,Lx}var qx,l5;function KW(){if(l5)return qx;l5=1;var e=XW();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 qx=t,qx}var Bx,c5;function s8(){if(c5)return Bx;c5=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 Bx=f,Bx}var zx,u5;function WW(){if(u5)return zx;u5=1;function e(t){return t.split("")}return zx=e,zx}var Hx,f5;function QW(){if(f5)return Hx;f5=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]",v="\\u200d",w=d+"?",S="["+o+"]?",b="(?:"+v+"(?:"+[y,p,g].join("|")+")"+S+w+")*",j=S+w+b,T="(?:"+[y+c+"?",c,p,g,l].join("|")+")",N=RegExp(f+"(?="+f+")|"+T+j,"g");function E(O){return O.match(N)||[]}return Hx=E,Hx}var Ux,d5;function ZW(){if(d5)return Ux;d5=1;var e=WW(),t=s8(),n=QW();function r(i){return t(i)?n(i):e(i)}return Ux=r,Ux}var Gx,h5;function JW(){if(h5)return Gx;h5=1;var e=KW(),t=s8(),n=ZW(),r=r8();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 Gx=i,Gx}var Vx,p5;function eQ(){if(p5)return Vx;p5=1;var e=JW(),t=e("toUpperCase");return Vx=t,Vx}var tQ=eQ();const ly=at(tQ);function gt(e){return function(){return e}}const l8=Math.cos,Lp=Math.sin,Ir=Math.sqrt,qp=Math.PI,cy=2*qp,yS=Math.PI,gS=2*yS,Ro=1e-6,nQ=gS-Ro;function c8(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function rQ(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return c8;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 iQ{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?c8:rQ(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>Ro)if(!(Math.abs(p*f-d*y)>Ro)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let v=r-l,w=i-c,S=f*f+d*d,b=v*v+w*w,j=Math.sqrt(S),T=Math.sqrt(g),N=o*Math.tan((yS-Math.acos((S+g-b)/(2*j*T)))/2),E=N/T,O=N/j;Math.abs(E-1)>Ro&&this._append`L${t+E*y},${n+E*p}`,this._append`A${o},${o},0,0,${+(p*v>y*w)},${this._x1=t+O*f},${this._y1=n+O*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)>Ro||Math.abs(this._y1-y)>Ro)&&this._append`L${d},${y}`,r&&(g<0&&(g=g%gS+gS),g>nQ?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>Ro&&this._append`A${r},${r},0,${+(g>=yS)},${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 iQ(t)}function T2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function u8(e){this._context=e}u8.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 u8(e)}function f8(e){return e[0]}function d8(e){return e[1]}function h8(e,t){var n=gt(!0),r=null,i=uy,o=null,l=E2(c);e=typeof e=="function"?e:e===void 0?f8:gt(e),t=typeof t=="function"?t:t===void 0?d8:gt(t);function c(f){var d,y=(f=T2(f)).length,p,g=!1,v;for(r==null&&(o=i(v=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(v)return o=null,v+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:gt(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:gt(+f),c):t},c.defined=function(f){return arguments.length?(n=typeof f=="function"?f:gt(!!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 Kh(e,t,n){var r=null,i=gt(!0),o=null,l=uy,c=null,f=E2(d);e=typeof e=="function"?e:e===void 0?f8:gt(+e),t=typeof t=="function"?t:gt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?d8:gt(+n);function d(p){var g,v,w,S=(p=T2(p)).length,b,j=!1,T,N=new Array(S),E=new Array(S);for(o==null&&(c=l(T=f())),g=0;g<=S;++g){if(!(g<S&&i(b=p[g],g,p))===j)if(j=!j)v=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),w=g-1;w>=v;--w)c.point(N[w],E[w]);c.lineEnd(),c.areaEnd()}j&&(N[g]=+e(b,g,p),E[g]=+t(b,g,p),c.point(r?+r(b,g,p):N[g],n?+n(b,g,p):E[g]))}if(T)return c=null,T+""||null}function y(){return h8().defined(i).curve(l).context(o)}return d.x=function(p){return arguments.length?(e=typeof p=="function"?p:gt(+p),r=null,d):e},d.x0=function(p){return arguments.length?(e=typeof p=="function"?p:gt(+p),d):e},d.x1=function(p){return arguments.length?(r=p==null?null:typeof p=="function"?p:gt(+p),d):r},d.y=function(p){return arguments.length?(t=typeof p=="function"?p:gt(+p),n=null,d):t},d.y0=function(p){return arguments.length?(t=typeof p=="function"?p:gt(+p),d):t},d.y1=function(p){return arguments.length?(n=p==null?null:typeof p=="function"?p:gt(+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:gt(!!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 p8{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 aQ(e){return new p8(e,!0)}function oQ(e){return new p8(e,!1)}const C2={draw(e,t){const n=Ir(t/qp);e.moveTo(n,0),e.arc(0,0,n,0,cy)}},sQ={draw(e,t){const n=Ir(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()}},m8=Ir(1/3),lQ=m8*2,cQ={draw(e,t){const n=Ir(t/lQ),r=n*m8;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},uQ={draw(e,t){const n=Ir(t),r=-n/2;e.rect(r,r,n,n)}},fQ=.8908130915292852,y8=Lp(qp/10)/Lp(7*qp/10),dQ=Lp(cy/10)*y8,hQ=-l8(cy/10)*y8,pQ={draw(e,t){const n=Ir(t*fQ),r=dQ*n,i=hQ*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const l=cy*o/5,c=l8(l),f=Lp(l);e.lineTo(f*n,-c*n),e.lineTo(c*r-f*i,f*r+c*i)}e.closePath()}},Fx=Ir(3),mQ={draw(e,t){const n=-Ir(t/(Fx*3));e.moveTo(0,n*2),e.lineTo(-Fx*n,-n),e.lineTo(Fx*n,-n),e.closePath()}},or=-.5,sr=Ir(3)/2,vS=1/Ir(12),yQ=(vS/2+1)*3,gQ={draw(e,t){const n=Ir(t/yQ),r=n/2,i=n*vS,o=r,l=n*vS+n,c=-o,f=l;e.moveTo(r,i),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(or*r-sr*i,sr*r+or*i),e.lineTo(or*o-sr*l,sr*o+or*l),e.lineTo(or*c-sr*f,sr*c+or*f),e.lineTo(or*r+sr*i,or*i-sr*r),e.lineTo(or*o+sr*l,or*l-sr*o),e.lineTo(or*c+sr*f,or*f-sr*c),e.closePath()}};function vQ(e,t){let n=null,r=E2(i);e=typeof e=="function"?e:gt(e||C2),t=typeof t=="function"?t:gt(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:gt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:gt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Bp(){}function zp(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 g8(e){this._context=e}g8.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:zp(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:zp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function xQ(e){return new g8(e)}function v8(e){this._context=e}v8.prototype={areaStart:Bp,areaEnd:Bp,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:zp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bQ(e){return new v8(e)}function x8(e){this._context=e}x8.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:zp(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wQ(e){return new x8(e)}function b8(e){this._context=e}b8.prototype={areaStart:Bp,areaEnd:Bp,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 SQ(e){return new b8(e)}function m5(e){return e<0?-1:1}function y5(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(m5(o)+m5(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function g5(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Yx(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 Hp(e){this._context=e}Hp.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:Yx(this,this._t0,g5(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,Yx(this,g5(this,n=y5(this,e,t)),n);break;default:Yx(this,this._t0,n=y5(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function w8(e){this._context=new S8(e)}(w8.prototype=Object.create(Hp.prototype)).point=function(e,t){Hp.prototype.point.call(this,t,e)};function S8(e){this._context=e}S8.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 _Q(e){return new Hp(e)}function jQ(e){return new w8(e)}function _8(e){this._context=e}_8.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=v5(e),i=v5(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 v5(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 AQ(e){return new _8(e)}function fy(e,t){this._context=e,this._t=t}fy.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 NQ(e){return new fy(e,.5)}function OQ(e){return new fy(e,0)}function EQ(e){return new fy(e,1)}function Bl(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 xS(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function TQ(e,t){return e[t]}function CQ(e){const t=[];return t.key=e,t}function MQ(){var e=gt([]),t=xS,n=Bl,r=TQ;function i(o){var l=Array.from(e.apply(this,arguments),CQ),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:gt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:gt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?xS:typeof o=="function"?o:gt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Bl,i):n},i}function kQ(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}Bl(e,t)}}function RQ(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}Bl(e,t)}}function PQ(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,v=(p-g)/2,w=0;w<c;++w){var S=e[t[w]],b=S[r][1]||0,j=S[r-1][1]||0;v+=b-j}f+=p,d+=v*p}i[r-1][1]+=i[r-1][0]=n,f&&(n-=d/f)}i[r-1][1]+=i[r-1][0]=n,Bl(e,t)}}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)}var DQ=["type","size","sizeType"];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 x5(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 b5(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x5(Object(n),!0).forEach(function(r){$Q(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Q(e,t,n){return t=IQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IQ(e){var t=LQ(e,"string");return ff(t)=="symbol"?t:t+""}function LQ(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 qQ(e,t){if(e==null)return{};var n=BQ(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 BQ(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 j8={symbolCircle:C2,symbolCross:sQ,symbolDiamond:cQ,symbolSquare:uQ,symbolStar:pQ,symbolTriangle:mQ,symbolWye:gQ},zQ=Math.PI/180,HQ=function(t){var n="symbol".concat(ly(t));return j8[n]||C2},UQ=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*zQ;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}},GQ=function(t,n){j8["symbol".concat(ly(t))]=n},M2=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=qQ(t,DQ),d=b5(b5({},f),{},{type:r,size:o,sizeType:c}),y=function(){var b=HQ(r),j=vQ().type(b).size(UQ(o,c,r));return j()},p=d.className,g=d.cx,v=d.cy,w=ke(d,!0);return g===+g&&v===+v&&o===+o?W.createElement("path",bS({},w,{className:Be("recharts-symbols",p),transform:"translate(".concat(g,", ").concat(v,")"),d:y()})):null};M2.registerSymbol=GQ;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 wS(){return wS=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},wS.apply(this,arguments)}function w5(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 VQ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w5(Object(n),!0).forEach(function(r){df(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w5(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YQ(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,N8(r.key),r)}}function XQ(e,t,n){return t&&YQ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function KQ(e,t,n){return t=Up(t),WQ(e,A8()?Reflect.construct(t,n||[],Up(e).constructor):t.apply(e,n))}function WQ(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 QQ(e)}function QQ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(A8=function(){return!!e})()}function Up(e){return Up=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Up(e)}function ZQ(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&&SS(e,t)}function SS(e,t){return SS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},SS(e,t)}function df(e,t,n){return t=N8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N8(e){var t=JQ(e,"string");return zl(t)=="symbol"?t:t+""}function JQ(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 lr=32,k2=(function(e){function t(){return FQ(this,t),KQ(this,t,arguments)}return ZQ(t,e),XQ(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,o=lr/2,l=lr/6,c=lr/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:lr,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,`
|
|
499
|
+
A`).concat(l,",").concat(l,",0,1,1,").concat(2*c,",").concat(o,`
|
|
500
|
+
H`).concat(lr,"M").concat(2*c,",").concat(o,`
|
|
501
|
+
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(lr/8,"h").concat(lr,"v").concat(lr*3/4,"h").concat(-lr,"z"),className:"recharts-legend-icon"});if(W.isValidElement(r.legendIcon)){var d=VQ({},r);return delete d.legendIcon,W.cloneElement(r.legendIcon,d)}return W.createElement(M2,{fill:f,cx:o,cy:o,size:lr,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:lr,height:lr},p={display:c==="horizontal"?"inline-block":"block",marginRight:10},g={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(v,w){var S=v.formatter||f,b=Be(df(df({"recharts-legend-item":!0},"legend-item-".concat(w),!0),"inactive",v.inactive));if(v.type==="none")return null;var j=Pe(v.value)?null:v.value;Rr(!Pe(v.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var T=v.inactive?d:v.color;return W.createElement("li",wS({className:b,style:p,key:"legend-item-".concat(w)},ts(r.props,v,w)),W.createElement(pS,{width:l,height:l,viewBox:y,style:g},r.renderIcon(v)),W.createElement("span",{className:"recharts-legend-item-text",style:{color:T}},S?S(j,v,w):j))})}},{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())}}])})($.PureComponent);df(k2,"displayName","Legend");df(k2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Xx,S5;function eZ(){if(S5)return Xx;S5=1;var e=ay();function t(){this.__data__=new e,this.size=0}return Xx=t,Xx}var Kx,_5;function tZ(){if(_5)return Kx;_5=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return Kx=e,Kx}var Wx,j5;function nZ(){if(j5)return Wx;j5=1;function e(t){return this.__data__.get(t)}return Wx=e,Wx}var Qx,A5;function rZ(){if(A5)return Qx;A5=1;function e(t){return this.__data__.has(t)}return Qx=e,Qx}var Zx,N5;function iZ(){if(N5)return Zx;N5=1;var e=ay(),t=S2(),n=_2(),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 Zx=i,Zx}var Jx,O5;function O8(){if(O5)return Jx;O5=1;var e=ay(),t=eZ(),n=tZ(),r=nZ(),i=rZ(),o=iZ();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,Jx=l,Jx}var eb,E5;function aZ(){if(E5)return eb;E5=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return eb=t,eb}var tb,T5;function oZ(){if(T5)return tb;T5=1;function e(t){return this.__data__.has(t)}return tb=e,tb}var nb,C5;function E8(){if(C5)return nb;C5=1;var e=_2(),t=aZ(),n=oZ();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,nb=r,nb}var rb,M5;function T8(){if(M5)return rb;M5=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 rb=e,rb}var ib,k5;function C8(){if(k5)return ib;k5=1;function e(t,n){return t.has(n)}return ib=e,ib}var ab,R5;function M8(){if(R5)return ab;R5=1;var e=E8(),t=T8(),n=C8(),r=1,i=2;function o(l,c,f,d,y,p){var g=f&r,v=l.length,w=c.length;if(v!=w&&!(g&&w>v))return!1;var S=p.get(l),b=p.get(c);if(S&&b)return S==c&&b==l;var j=-1,T=!0,N=f&i?new e:void 0;for(p.set(l,c),p.set(c,l);++j<v;){var E=l[j],O=c[j];if(d)var A=g?d(O,E,j,c,l,p):d(E,O,j,l,c,p);if(A!==void 0){if(A)continue;T=!1;break}if(N){if(!t(c,function(C,R){if(!n(N,R)&&(E===C||y(E,C,f,d,p)))return N.push(R)})){T=!1;break}}else if(!(E===O||y(E,O,f,d,p))){T=!1;break}}return p.delete(l),p.delete(c),T}return ab=o,ab}var ob,P5;function sZ(){if(P5)return ob;P5=1;var e=ii(),t=e.Uint8Array;return ob=t,ob}var sb,D5;function lZ(){if(D5)return sb;D5=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return sb=e,sb}var lb,$5;function R2(){if($5)return lb;$5=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return lb=e,lb}var cb,I5;function cZ(){if(I5)return cb;I5=1;var e=nd(),t=sZ(),n=w2(),r=M8(),i=lZ(),o=R2(),l=1,c=2,f="[object Boolean]",d="[object Date]",y="[object Error]",p="[object Map]",g="[object Number]",v="[object RegExp]",w="[object Set]",S="[object String]",b="[object Symbol]",j="[object ArrayBuffer]",T="[object DataView]",N=e?e.prototype:void 0,E=N?N.valueOf:void 0;function O(A,C,R,D,G,I,L){switch(R){case T:if(A.byteLength!=C.byteLength||A.byteOffset!=C.byteOffset)return!1;A=A.buffer,C=C.buffer;case j:return!(A.byteLength!=C.byteLength||!I(new t(A),new t(C)));case f:case d:case g:return n(+A,+C);case y:return A.name==C.name&&A.message==C.message;case v:case S:return A==C+"";case p:var Y=i;case w:var P=D&l;if(Y||(Y=o),A.size!=C.size&&!P)return!1;var U=L.get(A);if(U)return U==C;D|=c,L.set(A,C);var k=r(Y(A),Y(C),D,G,I,L);return L.delete(A),k;case b:if(E)return E.call(A)==E.call(C)}return!1}return cb=O,cb}var ub,L5;function k8(){if(L5)return ub;L5=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 fb,q5;function uZ(){if(q5)return fb;q5=1;var e=k8(),t=Pn();function n(r,i,o){var l=i(r);return t(r)?l:e(l,o(r))}return fb=n,fb}var db,B5;function fZ(){if(B5)return db;B5=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 db=e,db}var hb,z5;function dZ(){if(z5)return hb;z5=1;function e(){return[]}return hb=e,hb}var pb,H5;function hZ(){if(H5)return pb;H5=1;var e=fZ(),t=dZ(),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 pb=o,pb}var mb,U5;function pZ(){if(U5)return mb;U5=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return mb=e,mb}var yb,G5;function mZ(){if(G5)return yb;G5=1;var e=Wi(),t=Qi(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return yb=r,yb}var gb,V5;function P2(){if(V5)return gb;V5=1;var e=mZ(),t=Qi(),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 gb=o,gb}var qu={exports:{}},vb,F5;function yZ(){if(F5)return vb;F5=1;function e(){return!1}return vb=e,vb}qu.exports;var Y5;function R8(){return Y5||(Y5=1,(function(e,t){var n=ii(),r=yZ(),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})(qu,qu.exports)),qu.exports}var xb,X5;function D2(){if(X5)return xb;X5=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 xb=n,xb}var bb,K5;function $2(){if(K5)return bb;K5=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return bb=t,bb}var wb,W5;function gZ(){if(W5)return wb;W5=1;var e=Wi(),t=$2(),n=Qi(),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]",v="[object Set]",w="[object String]",S="[object WeakMap]",b="[object ArrayBuffer]",j="[object DataView]",T="[object Float32Array]",N="[object Float64Array]",E="[object Int8Array]",O="[object Int16Array]",A="[object Int32Array]",C="[object Uint8Array]",R="[object Uint8ClampedArray]",D="[object Uint16Array]",G="[object Uint32Array]",I={};I[T]=I[N]=I[E]=I[O]=I[A]=I[C]=I[R]=I[D]=I[G]=!0,I[r]=I[i]=I[b]=I[o]=I[j]=I[l]=I[c]=I[f]=I[d]=I[y]=I[p]=I[g]=I[v]=I[w]=I[S]=!1;function L(Y){return n(Y)&&t(Y.length)&&!!I[e(Y)]}return wb=L,wb}var Sb,Q5;function P8(){if(Q5)return Sb;Q5=1;function e(t){return function(n){return t(n)}}return Sb=e,Sb}var Bu={exports:{}};Bu.exports;var Z5;function vZ(){return Z5||(Z5=1,(function(e,t){var n=e8(),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})(Bu,Bu.exports)),Bu.exports}var _b,J5;function D8(){if(J5)return _b;J5=1;var e=gZ(),t=P8(),n=vZ(),r=n&&n.isTypedArray,i=r?t(r):e;return _b=i,_b}var jb,eM;function xZ(){if(eM)return jb;eM=1;var e=pZ(),t=P2(),n=Pn(),r=R8(),i=D2(),o=D8(),l=Object.prototype,c=l.hasOwnProperty;function f(d,y){var p=n(d),g=!p&&t(d),v=!p&&!g&&r(d),w=!p&&!g&&!v&&o(d),S=p||g||v||w,b=S?e(d.length,String):[],j=b.length;for(var T in d)(y||c.call(d,T))&&!(S&&(T=="length"||v&&(T=="offset"||T=="parent")||w&&(T=="buffer"||T=="byteLength"||T=="byteOffset")||i(T,j)))&&b.push(T);return b}return jb=f,jb}var Ab,tM;function bZ(){if(tM)return Ab;tM=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Ab=t,Ab}var Nb,nM;function $8(){if(nM)return Nb;nM=1;function e(t,n){return function(r){return t(n(r))}}return Nb=e,Nb}var Ob,rM;function wZ(){if(rM)return Ob;rM=1;var e=$8(),t=e(Object.keys,Object);return Ob=t,Ob}var Eb,iM;function SZ(){if(iM)return Eb;iM=1;var e=bZ(),t=wZ(),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 Eb=i,Eb}var Tb,aM;function ad(){if(aM)return Tb;aM=1;var e=b2(),t=$2();function n(r){return r!=null&&t(r.length)&&!e(r)}return Tb=n,Tb}var Cb,oM;function dy(){if(oM)return Cb;oM=1;var e=xZ(),t=SZ(),n=ad();function r(i){return n(i)?e(i):t(i)}return Cb=r,Cb}var Mb,sM;function _Z(){if(sM)return Mb;sM=1;var e=uZ(),t=hZ(),n=dy();function r(i){return e(i,n,t)}return Mb=r,Mb}var kb,lM;function jZ(){if(lM)return kb;lM=1;var e=_Z(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,l,c,f,d,y){var p=c&t,g=e(o),v=g.length,w=e(l),S=w.length;if(v!=S&&!p)return!1;for(var b=v;b--;){var j=g[b];if(!(p?j in l:r.call(l,j)))return!1}var T=y.get(o),N=y.get(l);if(T&&N)return T==l&&N==o;var E=!0;y.set(o,l),y.set(l,o);for(var O=p;++b<v;){j=g[b];var A=o[j],C=l[j];if(f)var R=p?f(C,A,j,l,o,y):f(A,C,j,o,l,y);if(!(R===void 0?A===C||d(A,C,c,f,y):R)){E=!1;break}O||(O=j=="constructor")}if(E&&!O){var D=o.constructor,G=l.constructor;D!=G&&"constructor"in o&&"constructor"in l&&!(typeof D=="function"&&D instanceof D&&typeof G=="function"&&G instanceof G)&&(E=!1)}return y.delete(o),y.delete(l),E}return kb=i,kb}var Rb,cM;function AZ(){if(cM)return Rb;cM=1;var e=cs(),t=ii(),n=e(t,"DataView");return Rb=n,Rb}var Pb,uM;function NZ(){if(uM)return Pb;uM=1;var e=cs(),t=ii(),n=e(t,"Promise");return Pb=n,Pb}var Db,fM;function I8(){if(fM)return Db;fM=1;var e=cs(),t=ii(),n=e(t,"Set");return Db=n,Db}var $b,dM;function OZ(){if(dM)return $b;dM=1;var e=cs(),t=ii(),n=e(t,"WeakMap");return $b=n,$b}var Ib,hM;function EZ(){if(hM)return Ib;hM=1;var e=AZ(),t=S2(),n=NZ(),r=I8(),i=OZ(),o=Wi(),l=t8(),c="[object Map]",f="[object Object]",d="[object Promise]",y="[object Set]",p="[object WeakMap]",g="[object DataView]",v=l(e),w=l(t),S=l(n),b=l(r),j=l(i),T=o;return(e&&T(new e(new ArrayBuffer(1)))!=g||t&&T(new t)!=c||n&&T(n.resolve())!=d||r&&T(new r)!=y||i&&T(new i)!=p)&&(T=function(N){var E=o(N),O=E==f?N.constructor:void 0,A=O?l(O):"";if(A)switch(A){case v:return g;case w:return c;case S:return d;case b:return y;case j:return p}return E}),Ib=T,Ib}var Lb,pM;function TZ(){if(pM)return Lb;pM=1;var e=O8(),t=M8(),n=cZ(),r=jZ(),i=EZ(),o=Pn(),l=R8(),c=D8(),f=1,d="[object Arguments]",y="[object Array]",p="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function w(S,b,j,T,N,E){var O=o(S),A=o(b),C=O?y:i(S),R=A?y:i(b);C=C==d?p:C,R=R==d?p:R;var D=C==p,G=R==p,I=C==R;if(I&&l(S)){if(!l(b))return!1;O=!0,D=!1}if(I&&!D)return E||(E=new e),O||c(S)?t(S,b,j,T,N,E):n(S,b,C,j,T,N,E);if(!(j&f)){var L=D&&v.call(S,"__wrapped__"),Y=G&&v.call(b,"__wrapped__");if(L||Y){var P=L?S.value():S,U=Y?b.value():b;return E||(E=new e),N(P,U,j,T,E)}}return I?(E||(E=new e),r(S,b,j,T,N,E)):!1}return Lb=w,Lb}var qb,mM;function I2(){if(mM)return qb;mM=1;var e=TZ(),t=Qi();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 qb=n,qb}var Bb,yM;function CZ(){if(yM)return Bb;yM=1;var e=O8(),t=I2(),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 v=g[0],w=o[v],S=g[1];if(p&&g[2]){if(w===void 0&&!(v in o))return!1}else{var b=new e;if(f)var j=f(w,S,v,o,l,b);if(!(j===void 0?t(S,w,n|r,f,b):j))return!1}}return!0}return Bb=i,Bb}var zb,gM;function L8(){if(gM)return zb;gM=1;var e=eo();function t(n){return n===n&&!e(n)}return zb=t,zb}var Hb,vM;function MZ(){if(vM)return Hb;vM=1;var e=L8(),t=dy();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 Hb=n,Hb}var Ub,xM;function q8(){if(xM)return Ub;xM=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Ub=e,Ub}var Gb,bM;function kZ(){if(bM)return Gb;bM=1;var e=CZ(),t=MZ(),n=q8();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 Gb=r,Gb}var Vb,wM;function RZ(){if(wM)return Vb;wM=1;function e(t,n){return t!=null&&n in Object(t)}return Vb=e,Vb}var Fb,SM;function PZ(){if(SM)return Fb;SM=1;var e=i8(),t=P2(),n=Pn(),r=D2(),i=$2(),o=sy();function l(c,f,d){f=e(f,c);for(var y=-1,p=f.length,g=!1;++y<p;){var v=o(f[y]);if(!(g=c!=null&&d(c,v)))break;c=c[v]}return g||++y!=p?g:(p=c==null?0:c.length,!!p&&i(p)&&r(v,p)&&(n(c)||t(c)))}return Fb=l,Fb}var Yb,_M;function DZ(){if(_M)return Yb;_M=1;var e=RZ(),t=PZ();function n(r,i){return r!=null&&t(r,i,e)}return Yb=n,Yb}var Xb,jM;function $Z(){if(jM)return Xb;jM=1;var e=I2(),t=a8(),n=DZ(),r=x2(),i=L8(),o=q8(),l=sy(),c=1,f=2;function d(y,p){return r(y)&&i(p)?o(l(y),p):function(g){var v=t(g,y);return v===void 0&&v===p?n(g,y):e(p,v,c|f)}}return Xb=d,Xb}var Kb,AM;function mc(){if(AM)return Kb;AM=1;function e(t){return t}return Kb=e,Kb}var Wb,NM;function IZ(){if(NM)return Wb;NM=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Wb=e,Wb}var Qb,OM;function LZ(){if(OM)return Qb;OM=1;var e=A2();function t(n){return function(r){return e(r,n)}}return Qb=t,Qb}var Zb,EM;function qZ(){if(EM)return Zb;EM=1;var e=IZ(),t=LZ(),n=x2(),r=sy();function i(o){return n(o)?e(r(o)):t(o)}return Zb=i,Zb}var Jb,TM;function ai(){if(TM)return Jb;TM=1;var e=kZ(),t=$Z(),n=mc(),r=Pn(),i=qZ();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 Jb=o,Jb}var e1,CM;function B8(){if(CM)return e1;CM=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 e1=e,e1}var t1,MM;function BZ(){if(MM)return t1;MM=1;function e(t){return t!==t}return t1=e,t1}var n1,kM;function zZ(){if(kM)return n1;kM=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 n1=e,n1}var r1,RM;function HZ(){if(RM)return r1;RM=1;var e=B8(),t=BZ(),n=zZ();function r(i,o,l){return o===o?n(i,o,l):e(i,t,l)}return r1=r,r1}var i1,PM;function UZ(){if(PM)return i1;PM=1;var e=HZ();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return i1=t,i1}var a1,DM;function GZ(){if(DM)return a1;DM=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 a1=e,a1}var o1,$M;function VZ(){if($M)return o1;$M=1;function e(){}return o1=e,o1}var s1,IM;function FZ(){if(IM)return s1;IM=1;var e=I8(),t=VZ(),n=R2(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return s1=i,s1}var l1,LM;function YZ(){if(LM)return l1;LM=1;var e=E8(),t=UZ(),n=GZ(),r=C8(),i=FZ(),o=R2(),l=200;function c(f,d,y){var p=-1,g=t,v=f.length,w=!0,S=[],b=S;if(y)w=!1,g=n;else if(v>=l){var j=d?null:i(f);if(j)return o(j);w=!1,g=r,b=new e}else b=d?[]:S;e:for(;++p<v;){var T=f[p],N=d?d(T):T;if(T=y||T!==0?T:0,w&&N===N){for(var E=b.length;E--;)if(b[E]===N)continue e;d&&b.push(N),S.push(T)}else g(b,N,y)||(b!==S&&b.push(N),S.push(T))}return S}return l1=c,l1}var c1,qM;function XZ(){if(qM)return c1;qM=1;var e=ai(),t=YZ();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return c1=n,c1}var KZ=XZ();const BM=at(KZ);function z8(e,t,n){return t===!0?BM(e,n):Pe(t)?BM(e,t):e}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)}var WZ=["ref"];function zM(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 Ci(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zM(Object(n),!0).forEach(function(r){hy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zM(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QZ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HM(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,U8(r.key),r)}}function ZZ(e,t,n){return t&&HM(e.prototype,t),n&&HM(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function JZ(e,t,n){return t=Gp(t),eJ(e,H8()?Reflect.construct(t,n||[],Gp(e).constructor):t.apply(e,n))}function eJ(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 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 H8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(H8=function(){return!!e})()}function Gp(e){return Gp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Gp(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&&_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 hy(e,t,n){return t=U8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U8(e){var t=rJ(e,"string");return Hl(t)=="symbol"?t:t+""}function rJ(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)}function iJ(e,t){if(e==null)return{};var n=aJ(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 aJ(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 oJ(e){return e.value}function sJ(e,t){if(W.isValidElement(e))return W.cloneElement(e,t);if(typeof e=="function")return W.createElement(e,t);t.ref;var n=iJ(t,WZ);return W.createElement(k2,n)}var UM=1,vl=(function(e){function t(){var n;QZ(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=JZ(this,t,[].concat(i)),hy(n,"lastBoundingBox",{width:-1,height:-1}),n}return nJ(t,e),ZZ(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)>UM||Math.abs(i.height-this.lastBoundingBox.height)>UM)&&(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?Ci({},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 v=this.getBBoxSnapshot();p={left:((d||0)-v.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 w=this.getBBoxSnapshot();g={top:((y||0)-w.height)/2}}else g=c==="bottom"?{bottom:f&&f.bottom||0}:{top:f&&f.top||0};return Ci(Ci({},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=Ci(Ci({position:"absolute",width:l||"auto",height:c||"auto"},this.getDefaultPosition(f)),f);return W.createElement("div",{className:"recharts-legend-wrapper",style:p,ref:function(v){r.wrapperNode=v}},sJ(o,Ci(Ci({},this.props),{},{payload:z8(y,d,oJ)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Ci(Ci({},this.defaultProps),r.props),l=o.layout;return l==="vertical"&&xe(r.props.height)?{height:r.props.height}:l==="horizontal"?{width:r.props.width||i}:null}}])})($.PureComponent);hy(vl,"displayName","Legend");hy(vl,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var u1,GM;function lJ(){if(GM)return u1;GM=1;var e=nd(),t=P2(),n=Pn(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return u1=i,u1}var f1,VM;function G8(){if(VM)return f1;VM=1;var e=k8(),t=lJ();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 f1=n,f1}var d1,FM;function cJ(){if(FM)return d1;FM=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 d1=e,d1}var h1,YM;function uJ(){if(YM)return h1;YM=1;var e=cJ(),t=e();return h1=t,h1}var p1,XM;function V8(){if(XM)return p1;XM=1;var e=uJ(),t=dy();function n(r,i){return r&&e(r,i,t)}return p1=n,p1}var m1,KM;function fJ(){if(KM)return m1;KM=1;var e=ad();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 m1=t,m1}var y1,WM;function L2(){if(WM)return y1;WM=1;var e=V8(),t=fJ(),n=t(e);return y1=n,y1}var g1,QM;function F8(){if(QM)return g1;QM=1;var e=L2(),t=ad();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 g1=n,g1}var v1,ZM;function dJ(){if(ZM)return v1;ZM=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return v1=e,v1}var x1,JM;function hJ(){if(JM)return x1;JM=1;var e=hc();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 x1=t,x1}var b1,e3;function pJ(){if(e3)return b1;e3=1;var e=hJ();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 b1=t,b1}var w1,t3;function mJ(){if(t3)return w1;t3=1;var e=j2(),t=A2(),n=ai(),r=F8(),i=dJ(),o=P8(),l=pJ(),c=mc(),f=Pn();function d(y,p,g){p.length?p=e(p,function(S){return f(S)?function(b){return t(b,S.length===1?S[0]:S)}:S}):p=[c];var v=-1;p=e(p,o(n));var w=r(y,function(S,b,j){var T=e(p,function(N){return N(S)});return{criteria:T,index:++v,value:S}});return i(w,function(S,b){return l(S,b,g)})}return w1=d,w1}var S1,n3;function yJ(){if(n3)return S1;n3=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 S1=e,S1}var _1,r3;function gJ(){if(r3)return _1;r3=1;var e=yJ(),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 _1=n,_1}var j1,i3;function vJ(){if(i3)return j1;i3=1;function e(t){return function(){return t}}return j1=e,j1}var A1,a3;function Y8(){if(a3)return A1;a3=1;var e=cs(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return A1=t,A1}var N1,o3;function xJ(){if(o3)return N1;o3=1;var e=vJ(),t=Y8(),n=mc(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return N1=r,N1}var O1,s3;function bJ(){if(s3)return O1;s3=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 O1=r,O1}var E1,l3;function wJ(){if(l3)return E1;l3=1;var e=xJ(),t=bJ(),n=t(e);return E1=n,E1}var T1,c3;function SJ(){if(c3)return T1;c3=1;var e=mc(),t=gJ(),n=wJ();function r(i,o){return n(t(i,o,e),i+"")}return T1=r,T1}var C1,u3;function py(){if(u3)return C1;u3=1;var e=w2(),t=ad(),n=D2(),r=eo();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 C1=i,C1}var M1,f3;function _J(){if(f3)return M1;f3=1;var e=G8(),t=mJ(),n=SJ(),r=py(),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 M1=i,M1}var jJ=_J();const q2=at(jJ);function hf(e){"@babel/helpers - typeof";return hf=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},hf(e)}function jS(){return jS=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},jS.apply(this,arguments)}function AJ(e,t){return TJ(e)||EJ(e,t)||OJ(e,t)||NJ()}function NJ(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
502
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OJ(e,t){if(e){if(typeof e=="string")return d3(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 d3(e,t)}}function d3(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 EJ(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 TJ(e){if(Array.isArray(e))return e}function h3(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 k1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?h3(Object(n),!0).forEach(function(r){CJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CJ(e,t,n){return t=MJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function MJ(e){var t=kJ(e,"string");return hf(t)=="symbol"?t:t+""}function kJ(e,t){if(hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RJ(e){return Array.isArray(e)&&Wt(e[0])&&Wt(e[1])?e.join(" ~ "):e}var PJ=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,v=t.wrapperClassName,w=t.labelClassName,S=t.label,b=t.labelFormatter,j=t.accessibilityLayer,T=j===void 0?!1:j,N=function(){if(y&&y.length){var L={padding:0,margin:0},Y=(g?q2(y,g):y).map(function(P,U){if(P.type==="none")return null;var k=k1({display:"block",paddingTop:4,paddingBottom:4,color:P.color||"#000"},c),z=P.formatter||p||RJ,H=P.value,F=P.name,K=H,q=F;if(z&&K!=null&&q!=null){var V=z(H,F,P,U,y);if(Array.isArray(V)){var J=AJ(V,2);K=J[0],q=J[1]}else K=V}return W.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:k},Wt(q)?W.createElement("span",{className:"recharts-tooltip-item-name"},q):null,Wt(q)?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"},P.unit||""))});return W.createElement("ul",{className:"recharts-tooltip-item-list",style:L},Y)}return null},E=k1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),O=k1({margin:0},d),A=!He(S),C=A?S:"",R=Be("recharts-default-tooltip",v),D=Be("recharts-tooltip-label",w);A&&b&&y!==void 0&&y!==null&&(C=b(S,y));var G=T?{role:"status","aria-live":"assertive"}:{};return W.createElement("div",jS({className:R,style:E},G),W.createElement("p",{className:D,style:O},W.isValidElement(C)?C:"".concat(C)),N())};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)}function Wh(e,t,n){return t=DJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DJ(e){var t=$J(e,"string");return pf(t)=="symbol"?t:t+""}function $J(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)}var Nu="recharts-tooltip-wrapper",IJ={visibility:"hidden"};function LJ(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Be(Nu,Wh(Wh(Wh(Wh({},"".concat(Nu,"-right"),xe(n)&&t&&xe(t.x)&&n>=t.x),"".concat(Nu,"-left"),xe(n)&&t&&xe(t.x)&&n<t.x),"".concat(Nu,"-bottom"),xe(r)&&t&&xe(t.y)&&r>=t.y),"".concat(Nu,"-top"),xe(r)&&t&&xe(t.y)&&r<t.y))}function p3(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&&xe(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,v=f[r];return g<v?Math.max(p,f[r]):Math.max(y,f[r])}var w=p+c,S=f[r]+d;return w>S?Math.max(y,f[r]):Math.max(p,f[r])}function qJ(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 BJ(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=p3({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.width,viewBox:f,viewBoxDimension:f.width}),p=p3({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:l.height,viewBox:f,viewBoxDimension:f.height}),d=qJ({translateX:y,translateY:p,useTranslate3d:c})):d=IJ,{cssProperties:d,cssClasses:LJ({translateX:y,translateY:p,coordinate:n})}}function Ul(e){"@babel/helpers - typeof";return Ul=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},Ul(e)}function m3(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 y3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m3(Object(n),!0).forEach(function(r){NS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HJ(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,K8(r.key),r)}}function UJ(e,t,n){return t&&HJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function GJ(e,t,n){return t=Vp(t),VJ(e,X8()?Reflect.construct(t,n||[],Vp(e).constructor):t.apply(e,n))}function VJ(e,t){if(t&&(Ul(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return FJ(e)}function FJ(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(X8=function(){return!!e})()}function Vp(e){return Vp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vp(e)}function YJ(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&&AS(e,t)}function AS(e,t){return AS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},AS(e,t)}function NS(e,t,n){return t=K8(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K8(e){var t=XJ(e,"string");return Ul(t)=="symbol"?t:t+""}function XJ(e,t){if(Ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ul(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var g3=1,KJ=(function(e){function t(){var n;zJ(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=GJ(this,t,[].concat(i)),NS(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),NS(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 YJ(t,e),UJ(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>g3||Math.abs(r.height-this.state.lastBoundingBox.height)>g3)&&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,v=i.offset,w=i.position,S=i.reverseDirection,b=i.useTranslate3d,j=i.viewBox,T=i.wrapperStyle,N=BJ({allowEscapeViewBox:l,coordinate:y,offsetTopLeft:v,position:w,reverseDirection:S,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:j}),E=N.cssClasses,O=N.cssProperties,A=y3(y3({transition:g&&o?"transform ".concat(c,"ms ").concat(f):void 0},O),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&p?"visible":"hidden",position:"absolute",top:0,left:0},T);return W.createElement("div",{tabIndex:-1,className:E,style:A,ref:function(R){r.wrapperNode=R}},d)}}])})($.PureComponent),WJ=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},yc={isSsr:WJ()};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 v3(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 x3(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?v3(Object(n),!0).forEach(function(r){B2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ZJ(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 JJ(e,t,n){return t&&ZJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function eee(e,t,n){return t=Fp(t),tee(e,W8()?Reflect.construct(t,n||[],Fp(e).constructor):t.apply(e,n))}function tee(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 nee(e)}function nee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function W8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(W8=function(){return!!e})()}function Fp(e){return Fp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Fp(e)}function ree(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&&OS(e,t)}function OS(e,t){return OS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},OS(e,t)}function B2(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=iee(e,"string");return Gl(t)=="symbol"?t:t+""}function iee(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)}function aee(e){return e.dataKey}function oee(e,t){return W.isValidElement(e)?W.cloneElement(e,t):typeof e=="function"?W.createElement(e,t):W.createElement(PJ,t)}var Or=(function(e){function t(){return QJ(this,t),eee(this,t,arguments)}return ree(t,e),JJ(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,v=i.offset,w=i.payload,S=i.payloadUniqBy,b=i.position,j=i.reverseDirection,T=i.useTranslate3d,N=i.viewBox,E=i.wrapperStyle,O=w??[];p&&O.length&&(O=z8(w.filter(function(C){return C.value!=null&&(C.hide!==!0||r.props.includeHidden)}),S,aee));var A=O.length>0;return W.createElement(KJ,{allowEscapeViewBox:l,animationDuration:c,animationEasing:f,isAnimationActive:g,active:o,coordinate:y,hasPayload:A,offset:v,position:b,reverseDirection:j,useTranslate3d:T,viewBox:N,wrapperStyle:E},oee(d,x3(x3({},this.props),{},{payload:O})))}}])})($.PureComponent);B2(Or,"displayName","Tooltip");B2(Or,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!yc.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 R1,b3;function see(){if(b3)return R1;b3=1;var e=ii(),t=function(){return e.Date.now()};return R1=t,R1}var P1,w3;function lee(){if(w3)return P1;w3=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return P1=t,P1}var D1,S3;function cee(){if(S3)return D1;S3=1;var e=lee(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return D1=n,D1}var $1,_3;function Z8(){if(_3)return $1;_3=1;var e=cee(),t=eo(),n=hc(),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 $1=f,$1}var I1,j3;function uee(){if(j3)return I1;j3=1;var e=eo(),t=see(),n=Z8(),r="Expected a function",i=Math.max,o=Math.min;function l(c,f,d){var y,p,g,v,w,S,b=0,j=!1,T=!1,N=!0;if(typeof c!="function")throw new TypeError(r);f=n(f)||0,e(d)&&(j=!!d.leading,T="maxWait"in d,g=T?i(n(d.maxWait)||0,f):g,N="trailing"in d?!!d.trailing:N);function E(Y){var P=y,U=p;return y=p=void 0,b=Y,v=c.apply(U,P),v}function O(Y){return b=Y,w=setTimeout(R,f),j?E(Y):v}function A(Y){var P=Y-S,U=Y-b,k=f-P;return T?o(k,g-U):k}function C(Y){var P=Y-S,U=Y-b;return S===void 0||P>=f||P<0||T&&U>=g}function R(){var Y=t();if(C(Y))return D(Y);w=setTimeout(R,A(Y))}function D(Y){return w=void 0,N&&y?E(Y):(y=p=void 0,v)}function G(){w!==void 0&&clearTimeout(w),b=0,y=S=p=w=void 0}function I(){return w===void 0?v:D(t())}function L(){var Y=t(),P=C(Y);if(y=arguments,p=this,S=Y,P){if(w===void 0)return O(S);if(T)return clearTimeout(w),w=setTimeout(R,f),E(S)}return w===void 0&&(w=setTimeout(R,f)),v}return L.cancel=G,L.flush=I,L}return I1=l,I1}var L1,A3;function fee(){if(A3)return L1;A3=1;var e=uee(),t=eo(),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 L1=r,L1}var dee=fee();const J8=at(dee);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 N3(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?N3(Object(n),!0).forEach(function(r){hee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hee(e,t,n){return t=pee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pee(e){var t=mee(e,"string");return mf(t)=="symbol"?t:t+""}function mee(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)}function yee(e,t){return bee(e)||xee(e,t)||vee(e,t)||gee()}function gee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
503
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vee(e,t){if(e){if(typeof e=="string")return O3(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 O3(e,t)}}function O3(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 xee(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 bee(e){if(Array.isArray(e))return e}var E3=$.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,v=e.children,w=e.debounce,S=w===void 0?0:w,b=e.id,j=e.className,T=e.onResize,N=e.style,E=N===void 0?{}:N,O=$.useRef(null),A=$.useRef();A.current=T,$.useImperativeHandle(t,function(){return Object.defineProperty(O.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),O.current},configurable:!0})});var C=$.useState({containerWidth:i.width,containerHeight:i.height}),R=yee(C,2),D=R[0],G=R[1],I=$.useCallback(function(Y,P){G(function(U){var k=Math.round(Y),z=Math.round(P);return U.containerWidth===k&&U.containerHeight===z?U:{containerWidth:k,containerHeight:z}})},[]);$.useEffect(function(){var Y=function(F){var K,q=F[0].contentRect,V=q.width,J=q.height;I(V,J),(K=A.current)===null||K===void 0||K.call(A,V,J)};S>0&&(Y=J8(Y,S,{trailing:!0,leading:!1}));var P=new ResizeObserver(Y),U=O.current.getBoundingClientRect(),k=U.width,z=U.height;return I(k,z),P.observe(O.current),function(){P.disconnect()}},[I,S]);var L=$.useMemo(function(){var Y=D.containerWidth,P=D.containerHeight;if(Y<0||P<0)return null;Rr(Io(l)||Io(f),`The width(%s) and height(%s) are both fixed numbers,
|
|
504
|
+
maybe you don't need to use a ResponsiveContainer.`,l,f),Rr(!n||n>0,"The aspect(%s) must be greater than zero.",n);var U=Io(l)?Y:l,k=Io(f)?P:f;n&&n>0&&(U?k=U/n:k&&(U=k*n),g&&k>g&&(k=g)),Rr(U>0||k>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
505
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
506
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
507
|
+
height and width.`,U,k,l,f,y,p,n);var z=!Array.isArray(v)&&Bi(v.type).endsWith("Chart");return W.Children.map(v,function(H){return W.isValidElement(H)?$.cloneElement(H,Qh({width:U,height:k},z?{style:Qh({height:"100%",width:"100%",maxHeight:k,maxWidth:U},H.props.style)}:{})):H})},[n,v,f,g,p,y,D,l]);return W.createElement("div",{id:b?"".concat(b):void 0,className:Be("recharts-responsive-container",j),style:Qh(Qh({},E),{},{width:l,height:f,minWidth:y,minHeight:p,maxHeight:g}),ref:O},L)}),yf=function(t){return null};yf.displayName="Cell";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 T3(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 ES(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?T3(Object(n),!0).forEach(function(r){wee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):T3(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wee(e,t,n){return t=See(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function See(e){var t=_ee(e,"string");return gf(t)=="symbol"?t:t+""}function _ee(e,t){if(gf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var el={widthCache:{},cacheCount:0},jee=2e3,Aee={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},C3="recharts_measurement_span";function Nee(e){var t=ES({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var Uu=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||yc.isSsr)return{width:0,height:0};var r=Nee(n),i=JSON.stringify({text:t,copyStyle:r});if(el.widthCache[i])return el.widthCache[i];try{var o=document.getElementById(C3);o||(o=document.createElement("span"),o.setAttribute("id",C3),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var l=ES(ES({},Aee),r);Object.assign(o.style,l),o.textContent="".concat(t);var c=o.getBoundingClientRect(),f={width:c.width,height:c.height};return el.widthCache[i]=f,++el.cacheCount>jee&&(el.cacheCount=0,el.widthCache={}),f}catch{return{width:0,height:0}}},Oee=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};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 Yp(e,t){return Mee(e)||Cee(e,t)||Tee(e,t)||Eee()}function Eee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
508
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tee(e,t){if(e){if(typeof e=="string")return M3(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 M3(e,t)}}function M3(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 Cee(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 Mee(e){if(Array.isArray(e))return e}function kee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k3(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,Pee(r.key),r)}}function Ree(e,t,n){return t&&k3(e.prototype,t),n&&k3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pee(e){var t=Dee(e,"string");return vf(t)=="symbol"?t:t+""}function Dee(e,t){if(vf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var R3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,P3=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,$ee=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Iee=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,e6={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Lee=Object.keys(e6),ll="NaN";function qee(e,t){return e*e6[t]}var Zh=(function(){function e(t,n){kee(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!$ee.test(n)&&(this.num=NaN,this.unit=""),Lee.includes(n)&&(this.num=qee(t,n),this.unit="px")}return Ree(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=Iee.exec(n))!==null&&r!==void 0?r:[],o=Yp(i,3),l=o[1],c=o[2];return new e(parseFloat(l),c??"")}}])})();function t6(e){if(e.includes(ll))return ll;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=R3.exec(t))!==null&&n!==void 0?n:[],i=Yp(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 ll;t=t.replace(R3,y.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var p,g=(p=P3.exec(t))!==null&&p!==void 0?p:[],v=Yp(g,4),w=v[1],S=v[2],b=v[3],j=Zh.parse(w??""),T=Zh.parse(b??""),N=S==="+"?j.add(T):j.subtract(T);if(N.isNaN())return ll;t=t.replace(P3,N.toString())}return t}var D3=/\(([^()]*)\)/;function Bee(e){for(var t=e;t.includes("(");){var n=D3.exec(t),r=Yp(n,2),i=r[1];t=t.replace(D3,t6(i))}return t}function zee(e){var t=e.replace(/\s+/g,"");return t=Bee(t),t=t6(t),t}function Hee(e){try{return zee(e)}catch{return ll}}function q1(e){var t=Hee(e.slice(5,-1));return t===ll?"":t}var Uee=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Gee=["dx","dy","angle","className","breakAll"];function TS(){return TS=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},TS.apply(this,arguments)}function $3(e,t){if(e==null)return{};var n=Vee(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 Vee(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 I3(e,t){return Kee(e)||Xee(e,t)||Yee(e,t)||Fee()}function Fee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
509
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yee(e,t){if(e){if(typeof e=="string")return L3(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 L3(e,t)}}function L3(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 Xee(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 Kee(e){if(Array.isArray(e))return e}var n6=/[ \f\n\r\t\v\u2028\u2029]+/,r6=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var o=[];He(n)||(r?o=n.toString().split(""):o=n.toString().split(n6));var l=o.map(function(f){return{word:f,width:Uu(f,i).width}}),c=r?0:Uu(" ",i).width;return{wordsWithComputedWidth:l,spaceWidth:c}}catch{return null}},Wee=function(t,n,r,i,o){var l=t.maxLines,c=t.children,f=t.style,d=t.breakAll,y=xe(l),p=c,g=function(){var U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return U.reduce(function(k,z){var H=z.word,F=z.width,K=k[k.length-1];if(K&&(i==null||o||K.width+F+r<Number(i)))K.words.push(H),K.width+=F+r;else{var q={words:[H],width:F};k.push(q)}return k},[])},v=g(n),w=function(U){return U.reduce(function(k,z){return k.width>z.width?k:z})};if(!y)return v;for(var S="…",b=function(U){var k=p.slice(0,U),z=r6({breakAll:d,style:f,children:k+S}).wordsWithComputedWidth,H=g(z),F=H.length>l||w(H).width>Number(i);return[F,H]},j=0,T=p.length-1,N=0,E;j<=T&&N<=p.length-1;){var O=Math.floor((j+T)/2),A=O-1,C=b(A),R=I3(C,2),D=R[0],G=R[1],I=b(O),L=I3(I,1),Y=L[0];if(!D&&!Y&&(j=O+1),D&&Y&&(T=O-1),!D&&Y){E=G;break}N++}return E||v},q3=function(t){var n=He(t)?[]:t.toString().split(n6);return[{words:n}]},Qee=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,l=t.breakAll,c=t.maxLines;if((n||r)&&!yc.isSsr){var f,d,y=r6({breakAll:l,children:i,style:o});if(y){var p=y.wordsWithComputedWidth,g=y.spaceWidth;f=p,d=g}else return q3(i);return Wee({breakAll:l,children:i,maxLines:c,style:o},f,d,n,r)}return q3(i)},B3="#808080",ns=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,v=g===void 0?"start":g,w=t.verticalAnchor,S=w===void 0?"end":w,b=t.fill,j=b===void 0?B3:b,T=$3(t,Uee),N=$.useMemo(function(){return Qee({breakAll:T.breakAll,children:T.children,maxLines:T.maxLines,scaleToFit:p,style:T.style,width:T.width})},[T.breakAll,T.children,T.maxLines,p,T.style,T.width]),E=T.dx,O=T.dy,A=T.angle,C=T.className,R=T.breakAll,D=$3(T,Gee);if(!Wt(r)||!Wt(o))return null;var G=r+(xe(E)?E:0),I=o+(xe(O)?O:0),L;switch(S){case"start":L=q1("calc(".concat(d,")"));break;case"middle":L=q1("calc(".concat((N.length-1)/2," * -").concat(c," + (").concat(d," / 2))"));break;default:L=q1("calc(".concat(N.length-1," * -").concat(c,")"));break}var Y=[];if(p){var P=N[0].width,U=T.width;Y.push("scale(".concat((xe(U)?U/P:1)/P,")"))}return A&&Y.push("rotate(".concat(A,", ").concat(G,", ").concat(I,")")),Y.length&&(D.transform=Y.join(" ")),W.createElement("text",TS({},ke(D,!0),{x:G,y:I,className:Be("recharts-text",C),textAnchor:v,fill:j.includes("url")?B3:j}),N.map(function(k,z){var H=k.words.join(R?"":" ");return W.createElement("tspan",{x:G,dy:z===0?L:c,key:"".concat(H,"-").concat(z)},H)}))};function Wa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function Zee(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function z2(e){let t,n,r;e.length!==2?(t=Wa,n=(c,f)=>Wa(e(c),f),r=(c,f)=>e(c)-f):(t=e===Wa||e===Zee?e:Jee,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 Jee(){return 0}function i6(e){return e===null?NaN:+e}function*ete(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const tte=z2(Wa),od=tte.right;z2(i6).center;class z3 extends Map{constructor(t,n=ite){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(H3(this,t))}has(t){return super.has(H3(this,t))}set(t,n){return super.set(nte(this,t),n)}delete(t){return super.delete(rte(this,t))}}function H3({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function nte({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function rte({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function ite(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ate(e=Wa){if(e===Wa)return a6;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 a6(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const ote=Math.sqrt(50),ste=Math.sqrt(10),lte=Math.sqrt(2);function Xp(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>=ote?10:o>=ste?5:o>=lte?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?Xp(e,t,n*2):[c,f,d]}function CS(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?Xp(t,e,n):Xp(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 MS(e,t,n){return t=+t,e=+e,n=+n,Xp(e,t,n)[2]}function kS(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?MS(t,e,n):MS(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function U3(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function G3(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function o6(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?a6:ate(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),v=Math.max(n,Math.floor(t-d*p/f+g)),w=Math.min(r,Math.floor(t+(f-d)*p/f+g));o6(e,t,v,w,i)}const o=e[t];let l=n,c=r;for(Ou(e,n,t),i(e[r],o)>0&&Ou(e,n,r);l<c;){for(Ou(e,l,c),++l,--c;i(e[l],o)<0;)++l;for(;i(e[c],o)>0;)--c}i(e[n],o)===0?Ou(e,n,c):(++c,Ou(e,c,r)),c<=t&&(n=c+1),t<=c&&(r=c-1)}return e}function Ou(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function cte(e,t,n){if(e=Float64Array.from(ete(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return G3(e);if(t>=1)return U3(e);var r,i=(r-1)*t,o=Math.floor(i),l=U3(o6(e,o).subarray(0,o+1)),c=G3(e.subarray(o+1));return l+(c-l)*(i-o)}}function ute(e,t,n=i6){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 fte(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 yr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Zi(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 RS=Symbol("implicit");function H2(){var e=new z3,t=[],n=[],r=RS;function i(o){let l=e.get(o);if(l===void 0){if(r!==RS)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 z3;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 H2(t,n).unknown(r)},yr.apply(i,arguments),i}function xf(){var e=H2().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,v=i<r,w=v?i:r,S=v?r:i;o=(S-w)/Math.max(1,g-f+d*2),c&&(o=Math.floor(o)),w+=(S-w-o*(g-f))*y,l=o*(1-f),c&&(w=Math.round(w),l=Math.round(l));var b=fte(g).map(function(j){return w+o*j});return n(v?b.reverse():b)}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 xf(t(),[r,i]).round(c).paddingInner(f).paddingOuter(d).align(y)},yr.apply(p(),arguments)}function s6(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return s6(t())},e}function Gu(){return s6(xf.apply(null,arguments).paddingInner(1))}function dte(e){return function(){return e}}function Kp(e){return+e}var V3=[0,1];function jn(e){return e}function PS(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:dte(isNaN(t)?NaN:.5)}function hte(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function pte(e,t,n){var r=e[0],i=e[1],o=t[0],l=t[1];return i<r?(r=PS(i,r),o=n(l,o)):(r=PS(r,i),o=n(o,l)),function(c){return o(r(c))}}function mte(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]=PS(e[l],e[l+1]),o[l]=n(t[l],t[l+1]);return function(c){var f=od(e,c,1,r)-1;return o[f](i[f](c))}}function sd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function my(){var e=V3,t=V3,n=qi,r,i,o,l=jn,c,f,d;function y(){var g=Math.min(e.length,t.length);return l!==jn&&(l=hte(e[0],e[g-1])),c=g>2?mte:pte,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),Tr)))(g)))},p.domain=function(g){return arguments.length?(e=Array.from(g,Kp),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=r2,y()},p.clamp=function(g){return arguments.length?(l=g?!0:jn,y()):l!==jn},p.interpolate=function(g){return arguments.length?(n=g,y()):n},p.unknown=function(g){return arguments.length?(o=g,p):o},function(g,v){return r=g,i=v,y()}}function U2(){return my()(jn,jn)}function yte(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Wp(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 Vl(e){return e=Wp(Math.abs(e)),e?e[1]:NaN}function gte(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 vte(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var xte=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function bf(e){if(!(t=xte.exec(e)))throw new Error("invalid format: "+e);var t;return new G2({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]})}bf.prototype=G2.prototype;function G2(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+""}G2.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 bte(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 wte(e,t){var n=Wp(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")+Wp(e,Math.max(0,t+o-1))[0]}function F3(e,t){var n=Wp(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 Y3={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:yte,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)=>F3(e*100,t),r:F3,s:wte,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function X3(e){return e}var K3=Array.prototype.map,W3=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Ste(e){var t=e.grouping===void 0||e.thousands===void 0?X3:gte(K3.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?X3:vte(K3.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=bf(p);var v=p.fill,w=p.align,S=p.sign,b=p.symbol,j=p.zero,T=p.width,N=p.comma,E=p.precision,O=p.trim,A=p.type;A==="n"?(N=!0,A="g"):Y3[A]||(E===void 0&&(E=12),O=!0,A="g"),(j||v==="0"&&w==="=")&&(j=!0,v="0",w="=");var C=(g&&g.prefix!==void 0?g.prefix:"")+(b==="$"?n:b==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():""),R=(b==="$"?r:/[%p]/.test(A)?l:"")+(g&&g.suffix!==void 0?g.suffix:""),D=Y3[A],G=/[defgprs%]/.test(A);E=E===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function I(L){var Y=C,P=R,U,k,z;if(A==="c")P=D(L)+P,L="";else{L=+L;var H=L<0||1/L<0;if(L=isNaN(L)?f:D(Math.abs(L),E),O&&(L=bte(L)),H&&+L==0&&S!=="+"&&(H=!1),Y=(H?S==="("?S:c:S==="-"||S==="("?"":S)+Y,P=(A==="s"&&!isNaN(L)&&Qp!==void 0?W3[8+Qp/3]:"")+P+(H&&S==="("?")":""),G){for(U=-1,k=L.length;++U<k;)if(z=L.charCodeAt(U),48>z||z>57){P=(z===46?i+L.slice(U+1):L.slice(U))+P,L=L.slice(0,U);break}}}N&&!j&&(L=t(L,1/0));var F=Y.length+L.length+P.length,K=F<T?new Array(T-F+1).join(v):"";switch(N&&j&&(L=t(K+L,K.length?T-P.length:1/0),K=""),w){case"<":L=Y+L+P+K;break;case"=":L=Y+K+L+P;break;case"^":L=K.slice(0,F=K.length>>1)+Y+L+P+K.slice(F);break;default:L=K+Y+L+P;break}return o(L)}return I.toString=function(){return p+""},I}function y(p,g){var v=Math.max(-8,Math.min(8,Math.floor(Vl(g)/3)))*3,w=Math.pow(10,-v),S=d((p=bf(p),p.type="f",p),{suffix:W3[8+v/3]});return function(b){return S(w*b)}}return{format:d,formatPrefix:y}}var Jh,V2,l6;_te({thousands:",",grouping:[3],currency:["$",""]});function _te(e){return Jh=Ste(e),V2=Jh.format,l6=Jh.formatPrefix,Jh}function jte(e){return Math.max(0,-Vl(Math.abs(e)))}function Ate(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Vl(t)/3)))*3-Vl(Math.abs(e)))}function Nte(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Vl(t)-Vl(e))+1}function c6(e,t,n,r){var i=kS(e,t,n),o;switch(r=bf(r??",f"),r.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=Ate(i,l))&&(r.precision=o),l6(r,l)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Nte(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=jte(i))&&(r.precision=o-(r.type==="%")*2);break}}return V2(r)}function to(e){var t=e.domain;return e.ticks=function(n){var r=t();return CS(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return c6(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=MS(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 Zp(){var e=U2();return e.copy=function(){return sd(e,Zp())},yr.apply(e,arguments),to(e)}function u6(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,Kp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return u6(e).unknown(t)},e=arguments.length?Array.from(e,Kp):[0,1],to(n)}function f6(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 Q3(e){return Math.log(e)}function Z3(e){return Math.exp(e)}function Ote(e){return-Math.log(-e)}function Ete(e){return-Math.exp(-e)}function Tte(e){return isFinite(e)?+("1e"+e):e<0?0:e}function Cte(e){return e===10?Tte:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Mte(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 J3(e){return(t,n)=>-e(-t,n)}function F2(e){const t=e(Q3,Z3),n=t.domain;let r=10,i,o;function l(){return i=Mte(r),o=Cte(r),n()[0]<0?(i=J3(i),o=J3(o),e(Ote,Ete)):e(Q3,Z3),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),v=i(y),w,S;const b=c==null?10:+c;let j=[];if(!(r%1)&&v-g<b){if(g=Math.floor(g),v=Math.ceil(v),d>0){for(;g<=v;++g)for(w=1;w<r;++w)if(S=g<0?w/o(-g):w*o(g),!(S<d)){if(S>y)break;j.push(S)}}else for(;g<=v;++g)for(w=r-1;w>=1;--w)if(S=g>0?w/o(-g):w*o(g),!(S<d)){if(S>y)break;j.push(S)}j.length*2<b&&(j=CS(d,y,b))}else j=CS(g,v,Math.min(v-g,b)).map(o);return p?j.reverse():j},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=r===10?"s":","),typeof f!="function"&&(!(r%1)&&(f=bf(f)).precision==null&&(f.trim=!0),f=V2(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(f6(n(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function d6(){const e=F2(my()).domain([1,10]);return e.copy=()=>sd(e,d6()).base(e.base()),yr.apply(e,arguments),e}function ek(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function tk(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Y2(e){var t=1,n=e(ek(t),tk(t));return n.constant=function(r){return arguments.length?e(ek(t=+r),tk(t)):t},to(n)}function h6(){var e=Y2(my());return e.copy=function(){return sd(e,h6()).constant(e.constant())},yr.apply(e,arguments)}function nk(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function kte(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Rte(e){return e<0?-e*e:e*e}function X2(e){var t=e(jn,jn),n=1;function r(){return n===1?e(jn,jn):n===.5?e(kte,Rte):e(nk(n),nk(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},to(t)}function K2(){var e=X2(my());return e.copy=function(){return sd(e,K2()).exponent(e.exponent())},yr.apply(e,arguments),e}function Pte(){return K2.apply(null,arguments).exponent(.5)}function rk(e){return Math.sign(e)*e*e}function Dte(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function p6(){var e=U2(),t=[0,1],n=!1,r;function i(o){var l=Dte(e(o));return isNaN(l)?r:n?Math.round(l):l}return i.invert=function(o){return e.invert(rk(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,Kp)).map(rk)),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 p6(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},yr.apply(i,arguments),to(i)}function m6(){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]=ute(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?r:t[od(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(Wa),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 m6().domain(e).range(t).unknown(r)},yr.apply(o,arguments)}function y6(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[od(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 y6().domain([e,t]).range(i).unknown(o)},yr.apply(to(l),arguments)}function g6(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[od(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 g6().domain(e).range(t).unknown(n)},yr.apply(i,arguments)}const B1=new Date,z1=new Date;function Qt(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=>Qt(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)=>(B1.setTime(+o),z1.setTime(+l),e(B1),e(z1),Math.floor(n(B1,z1))),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 Jp=Qt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Jp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Qt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Jp);Jp.range;const $i=1e3,dr=$i*60,Ii=dr*60,Ui=Ii*24,W2=Ui*7,ik=Ui*30,H1=Ui*365,Lo=Qt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*$i)},(e,t)=>(t-e)/$i,e=>e.getUTCSeconds());Lo.range;const Q2=Qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*$i)},(e,t)=>{e.setTime(+e+t*dr)},(e,t)=>(t-e)/dr,e=>e.getMinutes());Q2.range;const Z2=Qt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*dr)},(e,t)=>(t-e)/dr,e=>e.getUTCMinutes());Z2.range;const J2=Qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*$i-e.getMinutes()*dr)},(e,t)=>{e.setTime(+e+t*Ii)},(e,t)=>(t-e)/Ii,e=>e.getHours());J2.range;const ej=Qt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ii)},(e,t)=>(t-e)/Ii,e=>e.getUTCHours());ej.range;const ld=Qt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*dr)/Ui,e=>e.getDate()-1);ld.range;const yy=Qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ui,e=>e.getUTCDate()-1);yy.range;const v6=Qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ui,e=>Math.floor(e/Ui));v6.range;function us(e){return Qt(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())*dr)/W2)}const gy=us(0),em=us(1),$te=us(2),Ite=us(3),Fl=us(4),Lte=us(5),qte=us(6);gy.range;em.range;$te.range;Ite.range;Fl.range;Lte.range;qte.range;function fs(e){return Qt(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)/W2)}const vy=fs(0),tm=fs(1),Bte=fs(2),zte=fs(3),Yl=fs(4),Hte=fs(5),Ute=fs(6);vy.range;tm.range;Bte.range;zte.range;Yl.range;Hte.range;Ute.range;const tj=Qt(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());tj.range;const nj=Qt(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());nj.range;const Gi=Qt(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());Gi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(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)});Gi.range;const Vi=Qt(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());Vi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Qt(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)});Vi.range;function x6(e,t,n,r,i,o){const l=[[Lo,1,$i],[Lo,5,5*$i],[Lo,15,15*$i],[Lo,30,30*$i],[o,1,dr],[o,5,5*dr],[o,15,15*dr],[o,30,30*dr],[i,1,Ii],[i,3,3*Ii],[i,6,6*Ii],[i,12,12*Ii],[r,1,Ui],[r,2,2*Ui],[n,1,W2],[t,1,ik],[t,3,3*ik],[e,1,H1]];function c(d,y,p){const g=y<d;g&&([d,y]=[y,d]);const v=p&&typeof p.range=="function"?p:f(d,y,p),w=v?v.range(d,+y+1):[];return g?w.reverse():w}function f(d,y,p){const g=Math.abs(y-d)/p,v=z2(([,,b])=>b).right(l,g);if(v===l.length)return e.every(kS(d/H1,y/H1,p));if(v===0)return Jp.every(Math.max(kS(d,y,p),1));const[w,S]=l[g/l[v-1][2]<l[v][2]/g?v-1:v];return w.every(S)}return[c,f]}const[Gte,Vte]=x6(Vi,nj,vy,v6,ej,Z2),[Fte,Yte]=x6(Gi,tj,gy,ld,J2,Q2);function U1(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 G1(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 Eu(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Xte(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=Tu(i),y=Cu(i),p=Tu(o),g=Cu(o),v=Tu(l),w=Cu(l),S=Tu(c),b=Cu(c),j=Tu(f),T=Cu(f),N={a:z,A:H,b:F,B:K,c:null,d:uk,e:uk,f:gne,g:One,G:Tne,H:pne,I:mne,j:yne,L:b6,m:vne,M:xne,p:q,q:V,Q:hk,s:pk,S:bne,u:wne,U:Sne,V:_ne,w:jne,W:Ane,x:null,X:null,y:Nne,Y:Ene,Z:Cne,"%":dk},E={a:J,A:ae,b:he,B:ge,c:null,d:fk,e:fk,f:Pne,g:Gne,G:Fne,H:Mne,I:kne,j:Rne,L:S6,m:Dne,M:$ne,p:ee,q:ne,Q:hk,s:pk,S:Ine,u:Lne,U:qne,V:Bne,w:zne,W:Hne,x:null,X:null,y:Une,Y:Vne,Z:Yne,"%":dk},O={a:G,A:I,b:L,B:Y,c:P,d:lk,e:lk,f:une,g:sk,G:ok,H:ck,I:ck,j:one,L:cne,m:ane,M:sne,p:D,q:ine,Q:dne,s:hne,S:lne,u:Jte,U:ene,V:tne,w:Zte,W:nne,x:U,X:k,y:sk,Y:ok,Z:rne,"%":fne};N.x=A(n,N),N.X=A(r,N),N.c=A(t,N),E.x=A(n,E),E.X=A(r,E),E.c=A(t,E);function A(Q,ye){return function(ce){var re=[],be=-1,Se=0,Te=Q.length,Ae,Ue,xt;for(ce instanceof Date||(ce=new Date(+ce));++be<Te;)Q.charCodeAt(be)===37&&(re.push(Q.slice(Se,be)),(Ue=ak[Ae=Q.charAt(++be)])!=null?Ae=Q.charAt(++be):Ue=Ae==="e"?" ":"0",(xt=ye[Ae])&&(Ae=xt(ce,Ue)),re.push(Ae),Se=be+1);return re.push(Q.slice(Se,be)),re.join("")}}function C(Q,ye){return function(ce){var re=Eu(1900,void 0,1),be=R(re,Q,ce+="",0),Se,Te;if(be!=ce.length)return null;if("Q"in re)return new Date(re.Q);if("s"in re)return new Date(re.s*1e3+("L"in re?re.L:0));if(ye&&!("Z"in re)&&(re.Z=0),"p"in re&&(re.H=re.H%12+re.p*12),re.m===void 0&&(re.m="q"in re?re.q:0),"V"in re){if(re.V<1||re.V>53)return null;"w"in re||(re.w=1),"Z"in re?(Se=G1(Eu(re.y,0,1)),Te=Se.getUTCDay(),Se=Te>4||Te===0?tm.ceil(Se):tm(Se),Se=yy.offset(Se,(re.V-1)*7),re.y=Se.getUTCFullYear(),re.m=Se.getUTCMonth(),re.d=Se.getUTCDate()+(re.w+6)%7):(Se=U1(Eu(re.y,0,1)),Te=Se.getDay(),Se=Te>4||Te===0?em.ceil(Se):em(Se),Se=ld.offset(Se,(re.V-1)*7),re.y=Se.getFullYear(),re.m=Se.getMonth(),re.d=Se.getDate()+(re.w+6)%7)}else("W"in re||"U"in re)&&("w"in re||(re.w="u"in re?re.u%7:"W"in re?1:0),Te="Z"in re?G1(Eu(re.y,0,1)).getUTCDay():U1(Eu(re.y,0,1)).getDay(),re.m=0,re.d="W"in re?(re.w+6)%7+re.W*7-(Te+5)%7:re.w+re.U*7-(Te+6)%7);return"Z"in re?(re.H+=re.Z/100|0,re.M+=re.Z%100,G1(re)):U1(re)}}function R(Q,ye,ce,re){for(var be=0,Se=ye.length,Te=ce.length,Ae,Ue;be<Se;){if(re>=Te)return-1;if(Ae=ye.charCodeAt(be++),Ae===37){if(Ae=ye.charAt(be++),Ue=O[Ae in ak?ye.charAt(be++):Ae],!Ue||(re=Ue(Q,ce,re))<0)return-1}else if(Ae!=ce.charCodeAt(re++))return-1}return re}function D(Q,ye,ce){var re=d.exec(ye.slice(ce));return re?(Q.p=y.get(re[0].toLowerCase()),ce+re[0].length):-1}function G(Q,ye,ce){var re=v.exec(ye.slice(ce));return re?(Q.w=w.get(re[0].toLowerCase()),ce+re[0].length):-1}function I(Q,ye,ce){var re=p.exec(ye.slice(ce));return re?(Q.w=g.get(re[0].toLowerCase()),ce+re[0].length):-1}function L(Q,ye,ce){var re=j.exec(ye.slice(ce));return re?(Q.m=T.get(re[0].toLowerCase()),ce+re[0].length):-1}function Y(Q,ye,ce){var re=S.exec(ye.slice(ce));return re?(Q.m=b.get(re[0].toLowerCase()),ce+re[0].length):-1}function P(Q,ye,ce){return R(Q,t,ye,ce)}function U(Q,ye,ce){return R(Q,n,ye,ce)}function k(Q,ye,ce){return R(Q,r,ye,ce)}function z(Q){return l[Q.getDay()]}function H(Q){return o[Q.getDay()]}function F(Q){return f[Q.getMonth()]}function K(Q){return c[Q.getMonth()]}function q(Q){return i[+(Q.getHours()>=12)]}function V(Q){return 1+~~(Q.getMonth()/3)}function J(Q){return l[Q.getUTCDay()]}function ae(Q){return o[Q.getUTCDay()]}function he(Q){return f[Q.getUTCMonth()]}function ge(Q){return c[Q.getUTCMonth()]}function ee(Q){return i[+(Q.getUTCHours()>=12)]}function ne(Q){return 1+~~(Q.getUTCMonth()/3)}return{format:function(Q){var ye=A(Q+="",N);return ye.toString=function(){return Q},ye},parse:function(Q){var ye=C(Q+="",!1);return ye.toString=function(){return Q},ye},utcFormat:function(Q){var ye=A(Q+="",E);return ye.toString=function(){return Q},ye},utcParse:function(Q){var ye=C(Q+="",!0);return ye.toString=function(){return Q},ye}}}var ak={"-":"",_:" ",0:"0"},an=/^\s*\d+/,Kte=/^%/,Wte=/[\\^$*+?|[\]().{}]/g;function et(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 Qte(e){return e.replace(Wte,"\\$&")}function Tu(e){return new RegExp("^(?:"+e.map(Qte).join("|")+")","i")}function Cu(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function Zte(e,t,n){var r=an.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Jte(e,t,n){var r=an.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ene(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function tne(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function nne(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function ok(e,t,n){var r=an.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function sk(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function rne(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 ine(e,t,n){var r=an.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function ane(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function lk(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function one(e,t,n){var r=an.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ck(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function sne(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function lne(e,t,n){var r=an.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cne(e,t,n){var r=an.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function une(e,t,n){var r=an.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fne(e,t,n){var r=Kte.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function dne(e,t,n){var r=an.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function hne(e,t,n){var r=an.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function uk(e,t){return et(e.getDate(),t,2)}function pne(e,t){return et(e.getHours(),t,2)}function mne(e,t){return et(e.getHours()%12||12,t,2)}function yne(e,t){return et(1+ld.count(Gi(e),e),t,3)}function b6(e,t){return et(e.getMilliseconds(),t,3)}function gne(e,t){return b6(e,t)+"000"}function vne(e,t){return et(e.getMonth()+1,t,2)}function xne(e,t){return et(e.getMinutes(),t,2)}function bne(e,t){return et(e.getSeconds(),t,2)}function wne(e){var t=e.getDay();return t===0?7:t}function Sne(e,t){return et(gy.count(Gi(e)-1,e),t,2)}function w6(e){var t=e.getDay();return t>=4||t===0?Fl(e):Fl.ceil(e)}function _ne(e,t){return e=w6(e),et(Fl.count(Gi(e),e)+(Gi(e).getDay()===4),t,2)}function jne(e){return e.getDay()}function Ane(e,t){return et(em.count(Gi(e)-1,e),t,2)}function Nne(e,t){return et(e.getFullYear()%100,t,2)}function One(e,t){return e=w6(e),et(e.getFullYear()%100,t,2)}function Ene(e,t){return et(e.getFullYear()%1e4,t,4)}function Tne(e,t){var n=e.getDay();return e=n>=4||n===0?Fl(e):Fl.ceil(e),et(e.getFullYear()%1e4,t,4)}function Cne(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+et(t/60|0,"0",2)+et(t%60,"0",2)}function fk(e,t){return et(e.getUTCDate(),t,2)}function Mne(e,t){return et(e.getUTCHours(),t,2)}function kne(e,t){return et(e.getUTCHours()%12||12,t,2)}function Rne(e,t){return et(1+yy.count(Vi(e),e),t,3)}function S6(e,t){return et(e.getUTCMilliseconds(),t,3)}function Pne(e,t){return S6(e,t)+"000"}function Dne(e,t){return et(e.getUTCMonth()+1,t,2)}function $ne(e,t){return et(e.getUTCMinutes(),t,2)}function Ine(e,t){return et(e.getUTCSeconds(),t,2)}function Lne(e){var t=e.getUTCDay();return t===0?7:t}function qne(e,t){return et(vy.count(Vi(e)-1,e),t,2)}function _6(e){var t=e.getUTCDay();return t>=4||t===0?Yl(e):Yl.ceil(e)}function Bne(e,t){return e=_6(e),et(Yl.count(Vi(e),e)+(Vi(e).getUTCDay()===4),t,2)}function zne(e){return e.getUTCDay()}function Hne(e,t){return et(tm.count(Vi(e)-1,e),t,2)}function Une(e,t){return et(e.getUTCFullYear()%100,t,2)}function Gne(e,t){return e=_6(e),et(e.getUTCFullYear()%100,t,2)}function Vne(e,t){return et(e.getUTCFullYear()%1e4,t,4)}function Fne(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Yl(e):Yl.ceil(e),et(e.getUTCFullYear()%1e4,t,4)}function Yne(){return"+0000"}function dk(){return"%"}function hk(e){return+e}function pk(e){return Math.floor(+e/1e3)}var tl,j6,A6;Xne({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 Xne(e){return tl=Xte(e),j6=tl.format,tl.parse,A6=tl.utcFormat,tl.utcParse,tl}function Kne(e){return new Date(e)}function Wne(e){return e instanceof Date?+e:+new Date(+e)}function rj(e,t,n,r,i,o,l,c,f,d){var y=U2(),p=y.invert,g=y.domain,v=d(".%L"),w=d(":%S"),S=d("%I:%M"),b=d("%I %p"),j=d("%a %d"),T=d("%b %d"),N=d("%B"),E=d("%Y");function O(A){return(f(A)<A?v:c(A)<A?w:l(A)<A?S:o(A)<A?b:r(A)<A?i(A)<A?j:T:n(A)<A?N:E)(A)}return y.invert=function(A){return new Date(p(A))},y.domain=function(A){return arguments.length?g(Array.from(A,Wne)):g().map(Kne)},y.ticks=function(A){var C=g();return e(C[0],C[C.length-1],A??10)},y.tickFormat=function(A,C){return C==null?O:d(C)},y.nice=function(A){var C=g();return(!A||typeof A.range!="function")&&(A=t(C[0],C[C.length-1],A??10)),A?g(f6(C,A)):y},y.copy=function(){return sd(y,rj(e,t,n,r,i,o,l,c,f,d))},y}function Qne(){return yr.apply(rj(Fte,Yte,Gi,tj,gy,ld,J2,Q2,Lo,j6).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Zne(){return yr.apply(rj(Gte,Vte,Vi,nj,vy,yy,ej,Z2,Lo,A6).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function xy(){var e=0,t=1,n,r,i,o,l=jn,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 v,w;return arguments.length?([v,w]=g,l=p(v,w),d):[l(0),l(1)]}}return d.range=y(qi),d.rangeRound=y(r2),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 no(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function N6(){var e=to(xy()(jn));return e.copy=function(){return no(e,N6())},Zi.apply(e,arguments)}function O6(){var e=F2(xy()).domain([1,10]);return e.copy=function(){return no(e,O6()).base(e.base())},Zi.apply(e,arguments)}function E6(){var e=Y2(xy());return e.copy=function(){return no(e,E6()).constant(e.constant())},Zi.apply(e,arguments)}function ij(){var e=X2(xy());return e.copy=function(){return no(e,ij()).exponent(e.exponent())},Zi.apply(e,arguments)}function Jne(){return ij.apply(null,arguments).exponent(.5)}function T6(){var e=[],t=jn;function n(r){if(r!=null&&!isNaN(r=+r))return t((od(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(Wa),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)=>cte(e,o/r))},n.copy=function(){return T6(t).domain(e)},Zi.apply(n,arguments)}function by(){var e=0,t=.5,n=1,r=1,i,o,l,c,f,d=jn,y,p=!1,g;function v(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))}v.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,v):[e,t,n]},v.clamp=function(S){return arguments.length?(p=!!S,v):p},v.interpolator=function(S){return arguments.length?(d=S,v):d};function w(S){return function(b){var j,T,N;return arguments.length?([j,T,N]=b,d=CG(S,[j,T,N]),v):[d(0),d(.5),d(1)]}}return v.range=w(qi),v.rangeRound=w(r2),v.unknown=function(S){return arguments.length?(g=S,v):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,v}}function C6(){var e=to(by()(jn));return e.copy=function(){return no(e,C6())},Zi.apply(e,arguments)}function M6(){var e=F2(by()).domain([.1,1,10]);return e.copy=function(){return no(e,M6()).base(e.base())},Zi.apply(e,arguments)}function k6(){var e=Y2(by());return e.copy=function(){return no(e,k6()).constant(e.constant())},Zi.apply(e,arguments)}function aj(){var e=X2(by());return e.copy=function(){return no(e,aj()).exponent(e.exponent())},Zi.apply(e,arguments)}function ere(){return aj.apply(null,arguments).exponent(.5)}const mk=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:xf,scaleDiverging:C6,scaleDivergingLog:M6,scaleDivergingPow:aj,scaleDivergingSqrt:ere,scaleDivergingSymlog:k6,scaleIdentity:u6,scaleImplicit:RS,scaleLinear:Zp,scaleLog:d6,scaleOrdinal:H2,scalePoint:Gu,scalePow:K2,scaleQuantile:m6,scaleQuantize:y6,scaleRadial:p6,scaleSequential:N6,scaleSequentialLog:O6,scaleSequentialPow:ij,scaleSequentialQuantile:T6,scaleSequentialSqrt:Jne,scaleSequentialSymlog:E6,scaleSqrt:Pte,scaleSymlog:h6,scaleThreshold:g6,scaleTime:Qne,scaleUtc:Zne,tickFormat:c6},Symbol.toStringTag,{value:"Module"}));var V1,yk;function wy(){if(yk)return V1;yk=1;var e=hc();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 V1=t,V1}var F1,gk;function R6(){if(gk)return F1;gk=1;function e(t,n){return t>n}return F1=e,F1}var Y1,vk;function tre(){if(vk)return Y1;vk=1;var e=wy(),t=R6(),n=mc();function r(i){return i&&i.length?e(i,n,t):void 0}return Y1=r,Y1}var nre=tre();const Sy=at(nre);var X1,xk;function P6(){if(xk)return X1;xk=1;function e(t,n){return t<n}return X1=e,X1}var K1,bk;function rre(){if(bk)return K1;bk=1;var e=wy(),t=P6(),n=mc();function r(i){return i&&i.length?e(i,n,t):void 0}return K1=r,K1}var ire=rre();const _y=at(ire);var W1,wk;function are(){if(wk)return W1;wk=1;var e=j2(),t=ai(),n=F8(),r=Pn();function i(o,l){var c=r(o)?e:n;return c(o,t(l,3))}return W1=i,W1}var Q1,Sk;function ore(){if(Sk)return Q1;Sk=1;var e=G8(),t=are();function n(r,i){return e(t(r,i),1)}return Q1=n,Q1}var sre=ore();const lre=at(sre);var Z1,_k;function cre(){if(_k)return Z1;_k=1;var e=I2();function t(n,r){return e(n,r)}return Z1=t,Z1}var ure=cre();const jy=at(ure);var gc=1e9,fre={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},sj,Ot=!0,mr="[DecimalError] ",Xo=mr+"Invalid argument: ",oj=mr+"Exponent out of range: ",vc=Math.floor,Po=Math.pow,dre=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Yn,nn=1e7,_t=7,D6=9007199254740991,nm=vc(D6/_t),_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)*_t;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 zi(this,new this.constructor(e))};_e.dividedToIntegerBy=_e.idiv=function(e){var t=this,n=t.constructor;return mt(zi(t,new n(e),0,1),n.precision)};_e.equals=_e.eq=function(e){return!this.cmp(e)};_e.exponent=function(){return Gt(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(Yn))throw Error(mr+"NaN");if(n.s<1)throw Error(mr+(n.s?"NaN":"-Infinity"));return n.eq(Yn)?new r(0):(Ot=!1,t=zi(wf(n,o),wf(e,o),o),Ot=!0,mt(t,i))};_e.minus=_e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?L6(t,e):$6(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(mr+"NaN");return n.s?(Ot=!1,t=zi(n,e,0,1).times(e),Ot=!0,n.minus(t)):mt(new r(n),i)};_e.naturalExponential=_e.exp=function(){return I6(this)};_e.naturalLogarithm=_e.ln=function(){return wf(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?$6(t,e):L6(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(Xo+e);if(t=Gt(i)+1,r=i.d.length-1,n=r*_t+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(mr+"NaN")}for(e=Gt(c),Ot=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=Xr(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=vc((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(zi(c,o,l+2)).times(.5),Xr(o.d).slice(0,l)===(t=Xr(r.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(mt(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if(t!="9999")break;l+=4}return Ot=!0,mt(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,v=(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=v.length,f<d&&(o=g,g=v,v=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]+v[r]*g[i-r-1]+t,o[i--]=c%nn|0,t=c/nn|0;o[i]=(o[i]+t)%nn|0}for(;!o[--l];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,Ot?mt(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:(ti(e,0,gc),t===void 0?t=r.rounding:ti(t,0,8),mt(n,e+Gt(n)+1,t))};_e.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=rs(r,!0):(ti(e,0,gc),t===void 0?t=i.rounding:ti(t,0,8),r=mt(new i(r),e+1,t),n=rs(r,!0,e+1)),n};_e.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?rs(i):(ti(e,0,gc),t===void 0?t=o.rounding:ti(t,0,8),r=mt(new o(i),e+Gt(i)+1,t),n=rs(r.abs(),!1,e+Gt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};_e.toInteger=_e.toint=function(){var e=this,t=e.constructor;return mt(new t(e),Gt(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(Yn);if(c=new f(c),!c.s){if(e.s<1)throw Error(mr+"Infinity");return c}if(c.eq(Yn))return c;if(r=f.precision,e.eq(Yn))return mt(c,r);if(t=e.e,n=e.d.length-1,l=t>=n,o=c.s,l){if((n=y<0?-y:y)<=D6){for(i=new f(Yn),t=Math.ceil(r/_t+4),Ot=!1;n%2&&(i=i.times(c),Ak(i.d,t)),n=vc(n/2),n!==0;)c=c.times(c),Ak(c.d,t);return Ot=!0,e.s<0?new f(Yn).div(i):mt(i,r)}}else if(o<0)throw Error(mr+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,Ot=!1,i=e.times(wf(c,r+d)),Ot=!0,i=I6(i),i.s=o,i};_e.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Gt(i),r=rs(i,n<=o.toExpNeg||n>=o.toExpPos)):(ti(e,1,gc),t===void 0?t=o.rounding:ti(t,0,8),i=mt(new o(i),e,t),n=Gt(i),r=rs(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):(ti(e,1,gc),t===void 0?t=r.rounding:ti(t,0,8)),mt(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=Gt(e),n=e.constructor;return rs(e,t<=n.toExpNeg||t>=n.toExpPos)};function $6(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)),Ot?mt(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/_t),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)/nn|0,f[o]%=nn;for(n&&(f.unshift(n),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,Ot?mt(t,p):t}function ti(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Xo+e)}function Xr(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=_t-r.length,n&&(o+=Ia(n)),o+=r;l=e[t],r=l+"",n=_t-r.length,n&&(o+=Ia(n))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var zi=(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%nn|0,l=o/nn|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*nn+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,v,w,S,b,j,T,N,E,O,A,C,R,D=r.constructor,G=r.s==i.s?1:-1,I=r.d,L=i.d;if(!r.s)return new D(r);if(!i.s)throw Error(mr+"Division by zero");for(f=r.e-i.e,C=L.length,O=I.length,v=new D(G),w=v.d=[],d=0;L[d]==(I[d]||0);)++d;if(L[d]>(I[d]||0)&&--f,o==null?T=o=D.precision:l?T=o+(Gt(r)-Gt(i))+1:T=o,T<0)return new D(0);if(T=T/_t+2|0,d=0,C==1)for(y=0,L=L[0],T++;(d<O||y)&&T--;d++)N=y*nn+(I[d]||0),w[d]=N/L|0,y=N%L|0;else{for(y=nn/(L[0]+1)|0,y>1&&(L=e(L,y),I=e(I,y),C=L.length,O=I.length),E=C,S=I.slice(0,C),b=S.length;b<C;)S[b++]=0;R=L.slice(),R.unshift(0),A=L[0],L[1]>=nn/2&&++A;do y=0,c=t(L,S,C,b),c<0?(j=S[0],C!=b&&(j=j*nn+(S[1]||0)),y=j/A|0,y>1?(y>=nn&&(y=nn-1),p=e(L,y),g=p.length,b=S.length,c=t(p,S,g,b),c==1&&(y--,n(p,C<g?R:L,g))):(y==0&&(c=y=1),p=L.slice()),g=p.length,g<b&&p.unshift(0),n(S,p,b),c==-1&&(b=S.length,c=t(L,S,C,b),c<1&&(y++,n(S,C<b?R:L,b))),b=S.length):c===0&&(y++,S=[0]),w[d++]=y,c&&S[0]?S[b++]=I[E]||0:(S=[I[E]],b=1);while((E++<O||S[0]!==void 0)&&T--)}return w[0]||w.shift(),v.e=f,mt(v,l?o+Gt(v)+1:o)}})();function I6(e,t){var n,r,i,o,l,c,f=0,d=0,y=e.constructor,p=y.precision;if(Gt(e)>16)throw Error(oj+Gt(e));if(!e.s)return new y(Yn);for(Ot=!1,c=p,l=new y(.03125);e.abs().gte(.1);)e=e.times(l),d+=5;for(r=Math.log(Po(2,d))/Math.LN10*2+5|0,c+=r,n=i=o=new y(Yn),y.precision=c;;){if(i=mt(i.times(e),c),n=n.times(++f),l=o.plus(zi(i,n,c)),Xr(l.d).slice(0,c)===Xr(o.d).slice(0,c)){for(;d--;)o=mt(o.times(o),c);return y.precision=p,t==null?(Ot=!0,mt(o,p)):o}o=l}}function Gt(e){for(var t=e.e*_t,n=e.d[0];n>=10;n/=10)t++;return t}function J1(e,t,n){if(t>e.LN10.sd())throw Ot=!0,n&&(e.precision=n),Error(mr+"LN10 precision limit exceeded");return mt(new e(e.LN10),t)}function Ia(e){for(var t="";e--;)t+="0";return t}function wf(e,t){var n,r,i,o,l,c,f,d,y,p=1,g=10,v=e,w=v.d,S=v.constructor,b=S.precision;if(v.s<1)throw Error(mr+(v.s?"NaN":"-Infinity"));if(v.eq(Yn))return new S(0);if(t==null?(Ot=!1,d=b):d=t,v.eq(10))return t==null&&(Ot=!0),J1(S,d);if(d+=g,S.precision=d,n=Xr(w),r=n.charAt(0),o=Gt(v),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)v=v.times(e),n=Xr(v.d),r=n.charAt(0),p++;o=Gt(v),r>1?(v=new S("0."+n),o++):v=new S(r+"."+n.slice(1))}else return f=J1(S,d+2,b).times(o+""),v=wf(new S(r+"."+n.slice(1)),d-g).plus(f),S.precision=b,t==null?(Ot=!0,mt(v,b)):v;for(c=l=v=zi(v.minus(Yn),v.plus(Yn),d),y=mt(v.times(v),d),i=3;;){if(l=mt(l.times(y),d),f=c.plus(zi(l,new S(i),d)),Xr(f.d).slice(0,d)===Xr(c.d).slice(0,d))return c=c.times(2),o!==0&&(c=c.plus(J1(S,d+2,b).times(o+""))),c=zi(c,new S(p),d),S.precision=b,t==null?(Ot=!0,mt(c,b)):c;c=f,i+=2}}function jk(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=vc(n/_t),e.d=[],r=(n+1)%_t,n<0&&(r+=_t),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=_t;r<i;)e.d.push(+t.slice(r,r+=_t));t=t.slice(r),r=_t-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Ot&&(e.e>nm||e.e<-nm))throw Error(oj+n)}else e.s=0,e.e=0,e.d=[0];return e}function mt(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+=_t,i=t,d=p[y=0];else{if(y=Math.ceil((r+1)/_t),o=p.length,y>=o)return e;for(d=o=p[y],l=1;o>=10;o/=10)l++;r%=_t,i=r-_t+l}if(n!==void 0&&(o=Po(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/Po(10,l-i):0:p[y-1])%10&1||n==(e.s<0?8:7))),t<1||!p[0])return f?(o=Gt(e),p.length=1,t=t-o-1,p[0]=Po(10,(_t-t%_t)%_t),e.e=vc(-t/_t)||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=Po(10,_t-r),p[y]=i>0?(d/Po(10,l-i)%Po(10,i)|0)*o:0),f)for(;;)if(y==0){(p[0]+=o)==nn&&(p[0]=1,++e.e);break}else{if(p[y]+=o,p[y]!=nn)break;p[y--]=0,o=1}for(r=p.length;p[--r]===0;)p.pop();if(Ot&&(e.e>nm||e.e<-nm))throw Error(oj+Gt(e));return e}function L6(e,t){var n,r,i,o,l,c,f,d,y,p,g=e.constructor,v=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),Ot?mt(t,v):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(v/_t),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]=nn-1;--f[o],f[i]+=nn}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,Ot?mt(t,v):t):new g(0)}function rs(e,t,n){var r,i=Gt(e),o=Xr(e.d),l=o.length;return t?(n&&(r=n-l)>0?o=o.charAt(0)+"."+o.slice(1)+Ia(r):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ia(-i-1)+o,n&&(r=n-l)>0&&(o+=Ia(r))):i>=l?(o+=Ia(i+1-l),n&&(r=n-i-1)>0&&(o=o+"."+Ia(r))):((r=i+1)<l&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-l)>0&&(i+1===l&&(o+="."),o+=Ia(r))),e.s<0?"-"+o:o}function Ak(e,t){if(e.length>t)return e.length=t,!0}function q6(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(Xo+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 jk(l,o.toString())}else if(typeof o!="string")throw Error(Xo+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,dre.test(o))jk(l,o);else throw Error(Xo+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=q6,i.config=i.set=hre,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 hre(e){if(!e||typeof e!="object")throw Error(mr+"Object expected");var t,n,r,i=["precision",1,gc,"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(vc(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Xo+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Xo+n+": "+r);return this}var sj=q6(fre);Yn=new sj(1);const dt=sj;function pre(e){return vre(e)||gre(e)||yre(e)||mre()}function mre(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
510
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yre(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 gre(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function vre(e){if(Array.isArray(e))return DS(e)}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}var xre=function(t){return t},B6={},z6=function(t){return t===B6},Nk=function(t){return function n(){return arguments.length===0||arguments.length===1&&z6(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},bre=function e(t,n){return t===1?n:Nk(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!==B6}).length;return l>=t?n.apply(void 0,i):e(t-l,Nk(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 z6(p)?f.shift():p});return n.apply(void 0,pre(y).concat(f))}))})},Ay=function(t){return bre(t.length,t)},$S=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},wre=Ay(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),Sre=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return xre;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))}},IS=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},H6=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 _re(e){var t;return e===0?t=1:t=Math.floor(new dt(e).abs().log(10).toNumber())+1,t}function jre(e,t,n){for(var r=new dt(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}var Are=Ay(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),Nre=Ay(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),Ore=Ay(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Ny={rangeStep:jre,getDigitCount:_re,interpolateNumber:Are,uninterpolateNumber:Nre,uninterpolateTruncation:Ore};function LS(e){return Cre(e)||Tre(e)||U6(e)||Ere()}function Ere(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
511
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tre(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Cre(e){if(Array.isArray(e))return qS(e)}function Sf(e,t){return Rre(e)||kre(e,t)||U6(e,t)||Mre()}function Mre(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
512
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function U6(e,t){if(e){if(typeof e=="string")return qS(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 qS(e,t)}}function qS(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kre(e,t){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 Rre(e){if(Array.isArray(e))return e}function G6(e){var t=Sf(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function V6(e,t,n){if(e.lte(0))return new dt(0);var r=Ny.getDigitCount(e.toNumber()),i=new dt(10).pow(r),o=e.div(i),l=r!==1?.05:.1,c=new dt(Math.ceil(o.div(l).toNumber())).add(n).mul(l),f=c.mul(i);return t?f:new dt(Math.ceil(f))}function Pre(e,t,n){var r=1,i=new dt(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new dt(10).pow(Ny.getDigitCount(e)-1),i=new dt(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new dt(Math.floor(e)))}else e===0?i=new dt(Math.floor((t-1)/2)):n||(i=new dt(Math.floor(e)));var l=Math.floor((t-1)/2),c=Sre(wre(function(f){return i.add(new dt(f-l).mul(r)).toNumber()}),$S);return c(0,t)}function F6(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 dt(0),tickMin:new dt(0),tickMax:new dt(0)};var o=V6(new dt(t).sub(e).div(n-1),r,i),l;e<=0&&t>=0?l=new dt(0):(l=new dt(e).add(t).div(2),l=l.sub(new dt(l).mod(o)));var c=Math.ceil(l.sub(e).div(o).toNumber()),f=Math.ceil(new dt(t).sub(l).div(o).toNumber()),d=c+f+1;return d>n?F6(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 dt(c).mul(o)),tickMax:l.add(new dt(f).mul(o))})}function Dre(e){var t=Sf(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=G6([n,r]),f=Sf(c,2),d=f[0],y=f[1];if(d===-1/0||y===1/0){var p=y===1/0?[d].concat(LS($S(0,i-1).map(function(){return 1/0}))):[].concat(LS($S(0,i-1).map(function(){return-1/0})),[y]);return n>r?IS(p):p}if(d===y)return Pre(d,i,o);var g=F6(d,y,l,o),v=g.step,w=g.tickMin,S=g.tickMax,b=Ny.rangeStep(w,S.add(new dt(.1).mul(v)),v);return n>r?IS(b):b}function $re(e,t){var n=Sf(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=G6([r,i]),c=Sf(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=V6(new dt(d).sub(f).div(y-1),o,0),g=[].concat(LS(Ny.rangeStep(new dt(f),new dt(d).sub(new dt(.99).mul(p)),p)),[d]);return r>i?IS(g):g}var Ire=H6(Dre),Lre=H6($re),qre="Invariant failed";function is(e,t){throw new Error(qre)}var Bre=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rm.apply(this,arguments)}function zre(e,t){return Vre(e)||Gre(e,t)||Ure(e,t)||Hre()}function Hre(){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 Ure(e,t){if(e){if(typeof e=="string")return Ok(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 Ok(e,t)}}function Ok(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){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 Vre(e){if(Array.isArray(e))return e}function Fre(e,t){if(e==null)return{};var n=Yre(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 Yre(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 Xre(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kre(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,K6(r.key),r)}}function Wre(e,t,n){return t&&Kre(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Qre(e,t,n){return t=im(t),Zre(e,Y6()?Reflect.construct(t,n||[],im(e).constructor):t.apply(e,n))}function Zre(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 Jre(e)}function Jre(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 im(e){return im=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},im(e)}function eie(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&&BS(e,t)}function BS(e,t){return BS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},BS(e,t)}function X6(e,t,n){return t=K6(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function K6(e){var t=tie(e,"string");return Xl(t)=="symbol"?t:t+""}function tie(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)}var Oy=(function(e){function t(){return Xre(this,t),Qre(this,t,arguments)}return eie(t,e),Wre(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=Fre(r,Bre),v=ke(g,!1);this.props.direction==="x"&&y.type!=="number"&&is();var w=f.map(function(S){var b=d(S,c),j=b.x,T=b.y,N=b.value,E=b.errorVal;if(!E)return null;var O=[],A,C;if(Array.isArray(E)){var R=zre(E,2);A=R[0],C=R[1]}else A=C=E;if(o==="vertical"){var D=y.scale,G=T+i,I=G+l,L=G-l,Y=D(N-A),P=D(N+C);O.push({x1:P,y1:I,x2:P,y2:L}),O.push({x1:Y,y1:G,x2:P,y2:G}),O.push({x1:Y,y1:I,x2:Y,y2:L})}else if(o==="horizontal"){var U=p.scale,k=j+i,z=k-l,H=k+l,F=U(N-A),K=U(N+C);O.push({x1:z,y1:K,x2:H,y2:K}),O.push({x1:k,y1:F,x2:k,y2:K}),O.push({x1:z,y1:F,x2:H,y2:F})}return W.createElement(lt,rm({className:"recharts-errorBar",key:"bar-".concat(O.map(function(q){return"".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))},v),O.map(function(q){return W.createElement("line",rm({},q,{key:"line-".concat(q.x1,"-").concat(q.x2,"-").concat(q.y1,"-").concat(q.y2)}))}))});return W.createElement(lt,{className:"recharts-errorBars"},w)}}])})(W.Component);X6(Oy,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});X6(Oy,"displayName","ErrorBar");function _f(e){"@babel/helpers - typeof";return _f=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},_f(e)}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 Eo(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){nie(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 nie(e,t,n){return t=rie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rie(e){var t=iie(e,"string");return _f(t)=="symbol"?t:t+""}function iie(e,t){if(_f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(_f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var W6=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,o=t.legendContent,l=Gn(n,vl);if(!l)return null;var c=vl.defaultProps,f=c!==void 0?Eo(Eo({},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,v=p.props,w=v.sectors||v.data||[];return y.concat(w.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,v=g!==void 0?Eo(Eo({},g),p.props):{},w=v.dataKey,S=v.name,b=v.legendType,j=v.hide;return{inactive:j,dataKey:w,type:f.iconType||b||"square",color:lj(p),value:S||w,payload:v}}),Eo(Eo(Eo({},f),vl.getWithHeight(l,i)),{},{payload:d,item:l})};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 Tk(e){return lie(e)||sie(e)||oie(e)||aie()}function aie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
514
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oie(e,t){if(e){if(typeof e=="string")return zS(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 zS(e,t)}}function sie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lie(e){if(Array.isArray(e))return zS(e)}function zS(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 Ck(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 Rt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ck(Object(n),!0).forEach(function(r){xl(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ck(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xl(e,t,n){return t=cie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cie(e){var t=uie(e,"string");return jf(t)=="symbol"?t:t+""}function uie(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)}function gn(e,t,n){return He(e)||He(t)?n:Wt(t)?Kn(e,t,n):Pe(t)?t(e):n}function Vu(e,t,n,r){var i=lre(e,function(c){return gn(c,t)});if(n==="number"){var o=i.filter(function(c){return xe(c)||parseFloat(c)});return o.length?[_y(o),Sy(o)]:[1/0,-1/0]}var l=r?i.filter(function(c){return!He(c)}):i;return l.map(function(c){return Wt(c)||c instanceof Date?c:""})}var fie=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,v=void 0;if(Sn(p-y)!==Sn(g-p)){var w=[];if(Sn(g-p)===Sn(f[1]-f[0])){v=g;var S=p+f[1]-f[0];w[0]=Math.min(S,(S+y)/2),w[1]=Math.max(S,(S+y)/2)}else{v=y;var b=g+f[1]-f[0];w[0]=Math.min(p,(b+p)/2),w[1]=Math.max(p,(b+p)/2)}var j=[Math.min(p,(v+p)/2),Math.max(p,(v+p)/2)];if(t>j[0]&&t<=j[1]||t>=w[0]&&t<=w[1]){l=i[d].index;break}}else{var T=Math.min(y,g),N=Math.max(y,g);if(t>(T+p)/2&&t<=(N+p)/2){l=i[d].index;break}}}else for(var E=0;E<c;E++)if(E===0&&t<=(r[E].coordinate+r[E+1].coordinate)/2||E>0&&E<c-1&&t>(r[E].coordinate+r[E-1].coordinate)/2&&t<=(r[E].coordinate+r[E+1].coordinate)/2||E===c-1&&t>(r[E].coordinate+r[E-1].coordinate)/2){l=r[E].index;break}return l},lj=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Rt(Rt({},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},die=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,v=p.length;g<v;g++){var w=y[p[g]],S=w.items,b=w.cateAxisId,j=S.filter(function(C){return Bi(C.type).indexOf("Bar")>=0});if(j&&j.length){var T=j[0].type.defaultProps,N=T!==void 0?Rt(Rt({},T),j[0].props):j[0].props,E=N.barSize,O=N[b];l[O]||(l[O]=[]);var A=He(E)?n:E;l[O].push({item:j[0],stackList:j.slice(1),barSize:He(A)?void 0:_n(A,r,0)})}}return l},hie=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=_n(n,i,0,!0),y,p=[];if(l[0].barSize===+l[0].barSize){var g=!1,v=i/f,w=l.reduce(function(E,O){return E+O.barSize||0},0);w+=(f-1)*d,w>=i&&(w-=(f-1)*d,d=0),w>=i&&v>0&&(g=!0,v*=.9,w=f*v);var S=(i-w)/2>>0,b={offset:S-d,size:0};y=l.reduce(function(E,O){var A={item:O.item,position:{offset:b.offset+b.size+d,size:g?v:O.barSize}},C=[].concat(Tk(E),[A]);return b=C[C.length-1].position,O.stackList&&O.stackList.length&&O.stackList.forEach(function(R){C.push({item:R,position:b})}),C},p)}else{var j=_n(r,i,0,!0);i-2*j-(f-1)*d<=0&&(d=0);var T=(i-2*j-(f-1)*d)/f;T>1&&(T>>=0);var N=c===+c?Math.min(T,c):T;y=l.reduce(function(E,O,A){var C=[].concat(Tk(E),[{item:O.item,position:{offset:j+(T+d)*A+(T-N)/2,size:N}}]);return O.stackList&&O.stackList.length&&O.stackList.forEach(function(R){C.push({item:R,position:C[C.length-1].position})}),C},p)}return y},pie=function(t,n,r,i){var o=r.children,l=r.width,c=r.margin,f=l-(c.left||0)-(c.right||0),d=W6({children:o,legendWidth:f});if(d){var y=i||{},p=y.width,g=y.height,v=d.align,w=d.verticalAlign,S=d.layout;if((S==="vertical"||S==="horizontal"&&w==="middle")&&v!=="center"&&xe(t[v]))return Rt(Rt({},t),{},xl({},v,t[v]+(p||0)));if((S==="horizontal"||S==="vertical"&&v==="center")&&w!=="middle"&&xe(t[w]))return Rt(Rt({},t),{},xl({},w,t[w]+(g||0)))}return t},mie=function(t,n,r){return He(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Q6=function(t,n,r,i,o){var l=n.props.children,c=hr(l,Oy).filter(function(d){return mie(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=gn(y,r);if(He(p))return d;var g=Array.isArray(p)?[_y(p),Sy(p)]:[p,p],v=f.reduce(function(w,S){var b=gn(y,S,0),j=g[0]-Math.abs(Array.isArray(b)?b[0]:b),T=g[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(j,w[0]),Math.max(T,w[1])]},[1/0,-1/0]);return[Math.min(v[0],d[0]),Math.max(v[1],d[1])]},[1/0,-1/0])}return null},yie=function(t,n,r,i,o){var l=n.map(function(c){return Q6(t,c,r,o,i)}).filter(function(c){return!He(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},Z6=function(t,n,r,i,o){var l=n.map(function(f){var d=f.props.dataKey;return r==="number"&&d&&Q6(t,f,d,i)||Vu(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},[])},J6=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},eI=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},Li=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?Sn(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!rd(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}})},ew=new WeakMap,ep=function(t,n){if(typeof n!="function")return t;ew.has(t)||ew.set(t,new WeakMap);var r=ew.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},tI=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:xf(),realScaleType:"band"}:l==="radial"&&c==="angleAxis"?{scale:Zp(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:Gu(),realScaleType:"point"}:o==="category"?{scale:xf(),realScaleType:"band"}:{scale:Zp(),realScaleType:"linear"};if(es(i)){var f="scale".concat(ly(i));return{scale:(mk[f]||Gu)(),realScaleType:mk[f]?f:"point"}}return Pe(i)?{scale:i}:{scale:Gu(),realScaleType:"point"}},Mk=1e-4,nI=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])-Mk,l=Math.max(i[0],i[1])+Mk,c=t(n[0]),f=t(n[r-1]);(c<o||c>l||f<o||f>l)&&t.domain([n[0],n[r-1]])}},gie=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},vie=function(t,n){if(!n||n.length!==2||!xe(n[0])||!xe(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(!xe(t[0])||t[0]<r)&&(o[0]=r),(!xe(t[1])||t[1]>i)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]<r&&(o[1]=r),o},xie=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=rd(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])}},bie=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=rd(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)}},wie={sign:xie,expand:kQ,none:Bl,silhouette:RQ,wiggle:PQ,positive:bie},Sie=function(t,n,r){var i=n.map(function(c){return c.props.dataKey}),o=wie[r],l=MQ().keys(i).value(function(c,f){return+gn(c,f,0)}).order(xS).offset(o);return l(t)},_ie=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 v,w=(v=g.type)!==null&&v!==void 0&&v.defaultProps?Rt(Rt({},g.type.defaultProps),g.props):g.props,S=w.stackId,b=w.hide;if(b)return p;var j=w[r],T=p[j]||{hasStack:!1,stackGroups:{}};if(Wt(S)){var N=T.stackGroups[S]||{numericAxisId:r,cateAxisId:i,items:[]};N.items.push(g),T.hasStack=!0,T.stackGroups[S]=N}else T.stackGroups[id("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[g]};return Rt(Rt({},p),{},xl({},j,T))},f),y={};return Object.keys(d).reduce(function(p,g){var v=d[g];if(v.hasStack){var w={};v.stackGroups=Object.keys(v.stackGroups).reduce(function(S,b){var j=v.stackGroups[b];return Rt(Rt({},S),{},xl({},b,{numericAxisId:r,cateAxisId:i,items:j.items,stackedData:Sie(t,j.items,o)}))},w)}return Rt(Rt({},p),{},xl({},g,v))},y)},rI=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=Ire(d,o,c);return t.domain([_y(y),Sy(y)]),{niceTicks:y}}if(o&&i==="number"){var p=t.domain(),g=Lre(p,o,c);return{niceTicks:g}}return null},kk=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=gn(l,n.dataKey,n.domain[c]);return He(f)?null:n.scale(f)-o/2+i},jie=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]},Aie=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Rt(Rt({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Wt(o)){var l=n[o];if(l){var c=l.items.indexOf(t);return c>=0?l.stackedData[c]:null}}return null},Nie=function(t){return t.reduce(function(n,r){return[_y(r.concat([n[0]]).filter(xe)),Sy(r.concat([n[1]]).filter(xe))]},[1/0,-1/0])},iI=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=Nie(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})$/,Pk=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,HS=function(t,n,r){if(Pe(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(xe(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(xe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(Pk.test(t[1])){var l=+Pk.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},am=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=q2(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},Dk=function(t,n,r){return!t||!t.length||jy(t,Kn(r,"type.defaultProps.domain"))?n:t},aI=function(t,n){var r=t.type.defaultProps?Rt(Rt({},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 Rt(Rt({},ke(t,!1)),{},{dataKey:i,unit:l,formatter:c,name:o||i,color:lj(t),value:gn(n,i),type:f,payload:n,chartType:d,hide:y})};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 $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 ki(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){oI(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 oI(e,t,n){return t=Oie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oie(e){var t=Eie(e,"string");return Af(t)=="symbol"?t:t+""}function Eie(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)}function Tie(e,t){return Rie(e)||kie(e,t)||Mie(e,t)||Cie()}function Cie(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
515
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mie(e,t){if(e){if(typeof e=="string")return Ik(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 Ik(e,t)}}function Ik(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 kie(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 Rie(e){if(Array.isArray(e))return e}var om=Math.PI/180,Pie=function(t){return t*180/Math.PI},vt=function(t,n,r,i){return{x:t+Math.cos(-om*i)*r,y:n+Math.sin(-om*i)*r}},sI=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},Die=function(t,n,r,i,o){var l=t.width,c=t.height,f=t.startAngle,d=t.endAngle,y=_n(t.cx,l,l/2),p=_n(t.cy,c,c/2),g=sI(l,c,r),v=_n(t.innerRadius,g,0),w=_n(t.outerRadius,g,g*.8),S=Object.keys(n);return S.reduce(function(b,j){var T=n[j],N=T.domain,E=T.reversed,O;if(He(T.range))i==="angleAxis"?O=[f,d]:i==="radiusAxis"&&(O=[v,w]),E&&(O=[O[1],O[0]]);else{O=T.range;var A=O,C=Tie(A,2);f=C[0],d=C[1]}var R=tI(T,o),D=R.realScaleType,G=R.scale;G.domain(N).range(O),nI(G);var I=rI(G,ki(ki({},T),{},{realScaleType:D})),L=ki(ki(ki({},T),I),{},{range:O,radius:w,realScaleType:D,scale:G,cx:y,cy:p,innerRadius:v,outerRadius:w,startAngle:f,endAngle:d});return ki(ki({},b),{},oI({},j,L))},{})},$ie=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))},Iie=function(t,n){var r=t.x,i=t.y,o=n.cx,l=n.cy,c=$ie({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:Pie(d),angleInRadian:d}},Lie=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}},qie=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=Iie({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=Lie(n),p=y.startAngle,g=y.endAngle,v=c,w;if(p<=g){for(;v>g;)v-=360;for(;v<p;)v+=360;w=v>=p&&v<=g}else{for(;v>p;)v-=360;for(;v<g;)v+=360;w=v>=g&&v<=p}return w?ki(ki({},n),{},{radius:l,angle:qie(v,n)}):null},lI=function(t){return!$.isValidElement(t)&&!Pe(t)&&typeof t!="boolean"?t.className:""};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)}var Bie=["offset"];function zie(e){return Vie(e)||Gie(e)||Uie(e)||Hie()}function Hie(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
516
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uie(e,t){if(e){if(typeof e=="string")return US(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 US(e,t)}}function Gie(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vie(e){if(Array.isArray(e))return US(e)}function US(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 Fie(e,t){if(e==null)return{};var n=Yie(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 Yie(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 qk(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 Kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qk(Object(n),!0).forEach(function(r){Xie(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xie(e,t,n){return t=Kie(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kie(e){var t=Wie(e,"string");return Nf(t)=="symbol"?t:t+""}function Wie(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)}function Of(){return Of=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},Of.apply(this,arguments)}var Qie=function(t){var n=t.value,r=t.formatter,i=He(t.children)?n:t.children;return Pe(r)?r(i):i},Zie=function(t,n){var r=Sn(n-t),i=Math.min(Math.abs(n-t),360);return r*i},Jie=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,v=f.startAngle,w=f.endAngle,S=f.clockWise,b=(p+g)/2,j=Zie(v,w),T=j>=0?1:-1,N,E;i==="insideStart"?(N=v+T*l,E=S):i==="insideEnd"?(N=w-T*l,E=!S):i==="end"&&(N=w+T*l,E=S),E=j<=0?E:!E;var O=vt(d,y,b,N),A=vt(d,y,b,N+(E?1:-1)*359),C="M".concat(O.x,",").concat(O.y,`
|
|
517
|
+
A`).concat(b,",").concat(b,",0,1,").concat(E?0:1,`,
|
|
518
|
+
`).concat(A.x,",").concat(A.y),R=He(t.id)?id("recharts-radial-line-"):t.id;return W.createElement("text",Of({},r,{dominantBaseline:"central",className:Be("recharts-radial-bar-label",c)}),W.createElement("defs",null,W.createElement("path",{id:R,d:C})),W.createElement("textPath",{xlinkHref:"#".concat(R)},n))},eae=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 v=vt(l,c,d+r,g),w=v.x,S=v.y;return{x:w,y:S,textAnchor:w>=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 b=(f+d)/2,j=vt(l,c,b,g),T=j.x,N=j.y;return{x:T,y:N,textAnchor:"middle",verticalAnchor:"middle"}},tae=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,v=p>0?"end":"start",w=p>0?"start":"end",S=d>=0?1:-1,b=S*i,j=S>0?"end":"start",T=S>0?"start":"end";if(o==="top"){var N={x:c+d/2,y:f-p*i,textAnchor:"middle",verticalAnchor:v};return Kt(Kt({},N),r?{height:Math.max(f-r.y,0),width:d}:{})}if(o==="bottom"){var E={x:c+d/2,y:f+y+g,textAnchor:"middle",verticalAnchor:w};return Kt(Kt({},E),r?{height:Math.max(r.y+r.height-(f+y),0),width:d}:{})}if(o==="left"){var O={x:c-b,y:f+y/2,textAnchor:j,verticalAnchor:"middle"};return Kt(Kt({},O),r?{width:Math.max(O.x-r.x,0),height:y}:{})}if(o==="right"){var A={x:c+d+b,y:f+y/2,textAnchor:T,verticalAnchor:"middle"};return Kt(Kt({},A),r?{width:Math.max(r.x+r.width-A.x,0),height:y}:{})}var C=r?{width:d,height:y}:{};return o==="insideLeft"?Kt({x:c+b,y:f+y/2,textAnchor:T,verticalAnchor:"middle"},C):o==="insideRight"?Kt({x:c+d-b,y:f+y/2,textAnchor:j,verticalAnchor:"middle"},C):o==="insideTop"?Kt({x:c+d/2,y:f+g,textAnchor:"middle",verticalAnchor:w},C):o==="insideBottom"?Kt({x:c+d/2,y:f+y-g,textAnchor:"middle",verticalAnchor:v},C):o==="insideTopLeft"?Kt({x:c+b,y:f+g,textAnchor:T,verticalAnchor:w},C):o==="insideTopRight"?Kt({x:c+d-b,y:f+g,textAnchor:j,verticalAnchor:w},C):o==="insideBottomLeft"?Kt({x:c+b,y:f+y-g,textAnchor:T,verticalAnchor:v},C):o==="insideBottomRight"?Kt({x:c+d-b,y:f+y-g,textAnchor:j,verticalAnchor:v},C):pc(o)&&(xe(o.x)||Io(o.x))&&(xe(o.y)||Io(o.y))?Kt({x:c+_n(o.x,d),y:f+_n(o.y,y),textAnchor:"end",verticalAnchor:"end"},C):Kt({x:c+d/2,y:f+y/2,textAnchor:"middle",verticalAnchor:"middle"},C)},nae=function(t){return"cx"in t&&xe(t.cx)};function rn(e){var t=e.offset,n=t===void 0?5:t,r=Fie(e,Bie),i=Kt({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||He(c)&&He(f)&&!$.isValidElement(d)&&!Pe(d))return null;if($.isValidElement(d))return $.cloneElement(d,i);var v;if(Pe(d)){if(v=$.createElement(d,i),$.isValidElement(v))return v}else v=Qie(i);var w=nae(o),S=ke(i,!0);if(w&&(l==="insideStart"||l==="insideEnd"||l==="end"))return Jie(i,v,S);var b=w?eae(i):tae(i);return W.createElement(ns,Of({className:Be("recharts-label",p)},S,b,{breakAll:g}),v)}rn.displayName="Label";var cI=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,v=t.top,w=t.left,S=t.width,b=t.height,j=t.clockWise,T=t.labelViewBox;if(T)return T;if(xe(S)&&xe(b)){if(xe(p)&&xe(g))return{x:p,y:g,width:S,height:b};if(xe(v)&&xe(w))return{x:v,y:w,width:S,height:b}}return xe(p)&&xe(g)?{x:p,y:g,width:0,height:0}:xe(n)&&xe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:l||i||0,innerRadius:d||0,outerRadius:y||f||c||0,clockWise:j}:t.viewBox?t.viewBox:{}},rae=function(t,n){return t?t===!0?W.createElement(rn,{key:"label-implicit",viewBox:n}):Wt(t)?W.createElement(rn,{key:"label-implicit",viewBox:n,value:t}):$.isValidElement(t)?t.type===rn?$.cloneElement(t,{key:"label-implicit",viewBox:n}):W.createElement(rn,{key:"label-implicit",content:t,viewBox:n}):Pe(t)?W.createElement(rn,{key:"label-implicit",content:t,viewBox:n}):pc(t)?W.createElement(rn,Of({viewBox:n},t,{key:"label-implicit"})):null:null},iae=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=cI(t),l=hr(i,rn).map(function(f,d){return $.cloneElement(f,{viewBox:n||o,key:"label-".concat(d)})});if(!r)return l;var c=rae(t.label,n||o);return[c].concat(zie(l))};rn.parseViewBox=cI;rn.renderCallByParent=iae;var tw,Bk;function aae(){if(Bk)return tw;Bk=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return tw=e,tw}var oae=aae();const sae=at(oae);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)}var lae=["valueAccessor"],cae=["data","dataKey","clockWise","id","textBreakAll"];function uae(e){return pae(e)||hae(e)||dae(e)||fae()}function fae(){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 dae(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 hae(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pae(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 sm(){return sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sm.apply(this,arguments)}function zk(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 Hk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zk(Object(n),!0).forEach(function(r){mae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mae(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=gae(e,"string");return Ef(t)=="symbol"?t:t+""}function gae(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 Uk(e,t){if(e==null)return{};var n=vae(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 vae(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 xae=function(t){return Array.isArray(t.value)?sae(t.value):t.value};function Qa(e){var t=e.valueAccessor,n=t===void 0?xae:t,r=Uk(e,lae),i=r.data,o=r.dataKey,l=r.clockWise,c=r.id,f=r.textBreakAll,d=Uk(r,cae);return!i||!i.length?null:W.createElement(lt,{className:"recharts-label-list"},i.map(function(y,p){var g=He(o)?n(y,p):gn(y&&y.payload,o),v=He(c)?{}:{id:"".concat(c,"-").concat(p)};return W.createElement(rn,sm({},ke(y,!0),d,v,{parentViewBox:y.parentViewBox,value:g,textBreakAll:f,viewBox:rn.parseViewBox(He(l)?y:Hk(Hk({},y),{},{clockWise:l})),key:"label-".concat(p),index:p}))}))}Qa.displayName="LabelList";function bae(e,t){return e?e===!0?W.createElement(Qa,{key:"labelList-implicit",data:t}):W.isValidElement(e)||Pe(e)?W.createElement(Qa,{key:"labelList-implicit",data:t,content:e}):pc(e)?W.createElement(Qa,sm({data:t},e,{key:"labelList-implicit"})):null:null}function wae(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=hr(r,Qa).map(function(l,c){return $.cloneElement(l,{data:t,key:"labelList-".concat(c)})});if(!n)return i;var o=bae(e.label,t);return[o].concat(uae(i))}Qa.renderCallByParent=wae;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 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 Gk(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 Vk(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gk(Object(n),!0).forEach(function(r){Sae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gk(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sae(e,t,n){return t=_ae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _ae(e){var t=jae(e,"string");return Tf(t)=="symbol"?t:t+""}function jae(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)}var Aae=function(t,n){var r=Sn(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},tp=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)/om,g=d?o:o+l*p,v=vt(n,r,y,g),w=vt(n,r,i,g),S=d?o-l*p:o,b=vt(n,r,y*Math.cos(p*om),S);return{center:v,circleTangency:w,lineTangency:b,theta:p}},uI=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,l=t.startAngle,c=t.endAngle,f=Aae(l,c),d=l+f,y=vt(n,r,o,l),p=vt(n,r,o,d),g="M ".concat(y.x,",").concat(y.y,`
|
|
520
|
+
A `).concat(o,",").concat(o,`,0,
|
|
521
|
+
`).concat(+(Math.abs(f)>180),",").concat(+(l>d),`,
|
|
522
|
+
`).concat(p.x,",").concat(p.y,`
|
|
523
|
+
`);if(i>0){var v=vt(n,r,i,l),w=vt(n,r,i,d);g+="L ".concat(w.x,",").concat(w.y,`
|
|
524
|
+
A `).concat(i,",").concat(i,`,0,
|
|
525
|
+
`).concat(+(Math.abs(f)>180),",").concat(+(l<=d),`,
|
|
526
|
+
`).concat(v.x,",").concat(v.y," Z")}else g+="L ".concat(n,",").concat(r," Z");return g},Nae=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=Sn(y-d),g=tp({cx:n,cy:r,radius:o,angle:d,sign:p,cornerRadius:l,cornerIsExternal:f}),v=g.circleTangency,w=g.lineTangency,S=g.theta,b=tp({cx:n,cy:r,radius:o,angle:y,sign:-p,cornerRadius:l,cornerIsExternal:f}),j=b.circleTangency,T=b.lineTangency,N=b.theta,E=f?Math.abs(d-y):Math.abs(d-y)-S-N;if(E<0)return c?"M ".concat(w.x,",").concat(w.y,`
|
|
527
|
+
a`).concat(l,",").concat(l,",0,0,1,").concat(l*2,`,0
|
|
528
|
+
a`).concat(l,",").concat(l,",0,0,1,").concat(-l*2,`,0
|
|
529
|
+
`):uI({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:d,endAngle:y});var O="M ".concat(w.x,",").concat(w.y,`
|
|
530
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(v.x,",").concat(v.y,`
|
|
531
|
+
A`).concat(o,",").concat(o,",0,").concat(+(E>180),",").concat(+(p<0),",").concat(j.x,",").concat(j.y,`
|
|
532
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(T.x,",").concat(T.y,`
|
|
533
|
+
`);if(i>0){var A=tp({cx:n,cy:r,radius:i,angle:d,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),C=A.circleTangency,R=A.lineTangency,D=A.theta,G=tp({cx:n,cy:r,radius:i,angle:y,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:f}),I=G.circleTangency,L=G.lineTangency,Y=G.theta,P=f?Math.abs(d-y):Math.abs(d-y)-D-Y;if(P<0&&l===0)return"".concat(O,"L").concat(n,",").concat(r,"Z");O+="L".concat(L.x,",").concat(L.y,`
|
|
534
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(I.x,",").concat(I.y,`
|
|
535
|
+
A`).concat(i,",").concat(i,",0,").concat(+(P>180),",").concat(+(p>0),",").concat(C.x,",").concat(C.y,`
|
|
536
|
+
A`).concat(l,",").concat(l,",0,0,").concat(+(p<0),",").concat(R.x,",").concat(R.y,"Z")}else O+="L".concat(n,",").concat(r,"Z");return O},Oae={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},fI=function(t){var n=Vk(Vk({},Oae),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 v=Be("recharts-sector",g),w=l-o,S=_n(c,w,0,!0),b;return S>0&&Math.abs(y-p)<360?b=Nae({cx:r,cy:i,innerRadius:o,outerRadius:l,cornerRadius:Math.min(S,w/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:y,endAngle:p}):b=uI({cx:r,cy:i,innerRadius:o,outerRadius:l,startAngle:y,endAngle:p}),W.createElement("path",VS({},ke(n,!0),{className:v,d:b,role:"img"}))};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 FS(){return FS=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},FS.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 Yk(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){Eae(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 Eae(e,t,n){return t=Tae(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tae(e){var t=Cae(e,"string");return Cf(t)=="symbol"?t:t+""}function Cae(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)}var Xk={curveBasisClosed:bQ,curveBasisOpen:wQ,curveBasis:xQ,curveBumpX:aQ,curveBumpY:oQ,curveLinearClosed:SQ,curveLinear:uy,curveMonotoneX:_Q,curveMonotoneY:jQ,curveNatural:AQ,curveStep:NQ,curveStepAfter:EQ,curveStepBefore:OQ},np=function(t){return t.x===+t.x&&t.y===+t.y},Mu=function(t){return t.x},ku=function(t){return t.y},Mae=function(t,n){if(Pe(t))return t;var r="curve".concat(ly(t));return(r==="curveMonotone"||r==="curveBump")&&n?Xk["".concat(r).concat(n==="vertical"?"Y":"X")]:Xk[r]||uy},kae=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=Mae(r,c),p=d?o.filter(function(S){return np(S)}):o,g;if(Array.isArray(l)){var v=d?l.filter(function(S){return np(S)}):l,w=p.map(function(S,b){return Yk(Yk({},S),{},{base:v[b]})});return c==="vertical"?g=Kh().y(ku).x1(Mu).x0(function(S){return S.base.x}):g=Kh().x(Mu).y1(ku).y0(function(S){return S.base.y}),g.defined(np).curve(y),g(w)}return c==="vertical"&&xe(l)?g=Kh().y(ku).x1(Mu).x0(l):xe(l)?g=Kh().x(Mu).y1(ku).y0(l):g=h8().x(Mu).y(ku),g.defined(np).curve(y),g(p)},YS=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?kae(t):i;return $.createElement("path",FS({},ke(t,!1),Ip(t),{className:Be("recharts-curve",n),d:l,ref:o}))},nw={exports:{}},rw,Kk;function Rae(){if(Kk)return rw;Kk=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return rw=e,rw}var iw,Wk;function Pae(){if(Wk)return iw;Wk=1;var e=Rae();function t(){}function n(){}return n.resetWarningCache=t,iw=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},iw}var Qk;function Dae(){return Qk||(Qk=1,nw.exports=Pae()()),nw.exports}var $ae=Dae();const it=at($ae),{getOwnPropertyNames:Iae,getOwnPropertySymbols:Lae}=Object,{hasOwnProperty:qae}=Object.prototype;function aw(e,t){return function(r,i,o){return e(r,i,o)&&t(r,i,o)}}function rp(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 Bae(e){return e!=null?e[Symbol.toStringTag]:void 0}function Zk(e){return Iae(e).concat(Lae(e))}const zae=Object.hasOwn||((e,t)=>qae.call(e,t));function ds(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const Hae="__v",Uae="__o",Gae="_owner",{getOwnPropertyDescriptor:Jk,keys:e4}=Object;function Vae(e,t){return e.byteLength===t.byteLength&&lm(new Uint8Array(e),new Uint8Array(t))}function Fae(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 Yae(e,t){return e.byteLength===t.byteLength&&lm(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Xae(e,t){return ds(e.getTime(),t.getTime())}function Kae(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Wae(e,t){return e===t}function t4(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,v=c.value;if(n.equals(g[0],v[0],f,p,e,t,n)&&n.equals(g[1],v[1],g[0],v[0],e,t,n)){y=i[p]=!0;break}p++}if(!y)return!1;f++}return!0}const Qae=ds;function Zae(e,t,n){const r=e4(e);let i=r.length;if(e4(t).length!==i)return!1;for(;i-- >0;)if(!dI(e,t,n,r[i]))return!1;return!0}function Ru(e,t,n){const r=Zk(e);let i=r.length;if(Zk(t).length!==i)return!1;let o,l,c;for(;i-- >0;)if(o=r[i],!dI(e,t,n,o)||(l=Jk(e,o),c=Jk(t,o),(l||c)&&(!l||!c||l.configurable!==c.configurable||l.enumerable!==c.enumerable||l.writable!==c.writable)))return!1;return!0}function Jae(e,t){return ds(e.valueOf(),t.valueOf())}function eoe(e,t){return e.source===t.source&&e.flags===t.flags}function n4(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 lm(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 toe(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 dI(e,t,n,r){return(r===Gae||r===Uae||r===Hae)&&(e.$$typeof||t.$$typeof)?!0:zae(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const noe="[object ArrayBuffer]",roe="[object Arguments]",ioe="[object Boolean]",aoe="[object DataView]",ooe="[object Date]",soe="[object Error]",loe="[object Map]",coe="[object Number]",uoe="[object Object]",foe="[object RegExp]",doe="[object Set]",hoe="[object String]",poe={"[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},moe="[object URL]",yoe=Object.prototype.toString;function goe({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:v,unknownTagComparators:w}){return function(b,j,T){if(b===j)return!0;if(b==null||j==null)return!1;const N=typeof b;if(N!==typeof j)return!1;if(N!=="object")return N==="number"?c(b,j,T):N==="function"?o(b,j,T):!1;const E=b.constructor;if(E!==j.constructor)return!1;if(E===Object)return f(b,j,T);if(Array.isArray(b))return t(b,j,T);if(E===Date)return r(b,j,T);if(E===RegExp)return y(b,j,T);if(E===Map)return l(b,j,T);if(E===Set)return p(b,j,T);const O=yoe.call(b);if(O===ooe)return r(b,j,T);if(O===foe)return y(b,j,T);if(O===loe)return l(b,j,T);if(O===doe)return p(b,j,T);if(O===uoe)return typeof b.then!="function"&&typeof j.then!="function"&&f(b,j,T);if(O===moe)return v(b,j,T);if(O===soe)return i(b,j,T);if(O===roe)return f(b,j,T);if(poe[O])return g(b,j,T);if(O===noe)return e(b,j,T);if(O===aoe)return n(b,j,T);if(O===ioe||O===coe||O===hoe)return d(b,j,T);if(w){let A=w[O];if(!A){const C=Bae(b);C&&(A=w[C])}if(A)return A(b,j,T)}return!1}}function voe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Vae,areArraysEqual:n?Ru:Fae,areDataViewsEqual:Yae,areDatesEqual:Xae,areErrorsEqual:Kae,areFunctionsEqual:Wae,areMapsEqual:n?aw(t4,Ru):t4,areNumbersEqual:Qae,areObjectsEqual:n?Ru:Zae,arePrimitiveWrappersEqual:Jae,areRegExpsEqual:eoe,areSetsEqual:n?aw(n4,Ru):n4,areTypedArraysEqual:n?aw(lm,Ru):lm,areUrlsEqual:toe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=rp(r.areArraysEqual),o=rp(r.areMapsEqual),l=rp(r.areObjectsEqual),c=rp(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:o,areObjectsEqual:l,areSetsEqual:c})}return r}function xoe(e){return function(t,n,r,i,o,l,c){return e(t,n,c)}}function boe({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 woe=ro();ro({strict:!0});ro({circular:!0});ro({circular:!0,strict:!0});ro({createInternalComparator:()=>ds});ro({strict:!0,createInternalComparator:()=>ds});ro({circular:!0,createInternalComparator:()=>ds});ro({circular:!0,createInternalComparator:()=>ds,strict:!0});function ro(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,o=voe(e),l=goe(o),c=n?n(l):xoe(l);return boe({circular:t,comparator:l,createState:r,equals:c,strict:i})}function Soe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function r4(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):Soe(i)};requestAnimationFrame(r)}function XS(e){"@babel/helpers - typeof";return XS=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},XS(e)}function _oe(e){return Ooe(e)||Noe(e)||Aoe(e)||joe()}function joe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
537
|
+
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 i4(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 i4(e,t)}}function i4(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 Noe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ooe(e){if(Array.isArray(e))return e}function Eoe(){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=_oe(l),f=c[0],d=c.slice(1);if(typeof f=="number"){r4(i.bind(null,d),f);return}i(f),r4(i.bind(null,d));return}XS(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 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 a4(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 o4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a4(Object(n),!0).forEach(function(r){hI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hI(e,t,n){return t=Toe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Toe(e){var t=Coe(e,"string");return Mf(t)==="symbol"?t:String(t)}function Coe(e,t){if(Mf(e)!=="object"||e===null)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 Moe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(o){return i.includes(o)})})},koe=function(t){return t},Roe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Fu=function(t,n){return Object.keys(n).reduce(function(r,i){return o4(o4({},r),{},hI({},i,t(i,n[i])))},{})},s4=function(t,n,r){return t.map(function(i){return"".concat(Roe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function Poe(e,t){return Ioe(e)||$oe(e,t)||pI(e,t)||Doe()}function Doe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
538
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $oe(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 Ioe(e){if(Array.isArray(e))return e}function Loe(e){return zoe(e)||Boe(e)||pI(e)||qoe()}function qoe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
539
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pI(e,t){if(e){if(typeof e=="string")return KS(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 KS(e,t)}}function Boe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zoe(e){if(Array.isArray(e))return KS(e)}function KS(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 cm=1e-4,mI=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},yI=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},l4=function(t,n){return function(r){var i=mI(t,n);return yI(i,r)}},Hoe=function(t,n){return function(r){var i=mI(t,n),o=[].concat(Loe(i.map(function(l,c){return l*c}).slice(1)),[0]);return yI(o,r)}},c4=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(b){return parseFloat(b)}),y=Poe(d,4);i=y[0],o=y[1],l=y[2],c=y[3]}}}var p=l4(i,l),g=l4(o,c),v=Hoe(i,l),w=function(j){return j>1?1:j<0?0:j},S=function(j){for(var T=j>1?1:j,N=T,E=0;E<8;++E){var O=p(N)-T,A=v(N);if(Math.abs(O-T)<cm||A<cm)return g(N);N=w(N-O/A)}return g(N)};return S.isStepper=!1,S},Uoe=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 v=-(y-p)*r,w=g*o,S=g+(v-w)*c/1e3,b=g*c/1e3+y;return Math.abs(b-p)<cm&&Math.abs(S)<cm?[p,0]:[b,S]};return f.isStepper=!0,f.dt=c,f},Goe=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 c4(i);case"spring":return Uoe();default:if(i.split("(")[0]==="cubic-bezier")return c4(i)}return typeof i=="function"?i:null};function kf(e){"@babel/helpers - typeof";return kf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(e)}function u4(e){return Yoe(e)||Foe(e)||gI(e)||Voe()}function Voe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
540
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Foe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Yoe(e){if(Array.isArray(e))return QS(e)}function f4(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?f4(Object(n),!0).forEach(function(r){WS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WS(e,t,n){return t=Xoe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xoe(e){var t=Koe(e,"string");return kf(t)==="symbol"?t:String(t)}function Koe(e,t){if(kf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(kf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Woe(e,t){return Joe(e)||Zoe(e,t)||gI(e,t)||Qoe()}function Qoe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
541
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gI(e,t){if(e){if(typeof e=="string")return QS(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 QS(e,t)}}function QS(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 Zoe(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 Joe(e){if(Array.isArray(e))return e}var um=function(t,n,r){return t+(n-t)*r},ZS=function(t){var n=t.from,r=t.to;return n!==r},ese=function e(t,n,r){var i=Fu(function(o,l){if(ZS(l)){var c=t(l.from,l.to,l.velocity),f=Woe(c,2),d=f[0],y=f[1];return fn(fn({},l),{},{from:d,velocity:y})}return l},n);return r<1?Fu(function(o,l){return ZS(l)?fn(fn({},l),{},{velocity:um(l.velocity,i[o].velocity,r),from:um(l.from,i[o].from,r)}):l},n):e(t,i,r-1)};const tse=(function(e,t,n,r,i){var o=Moe(e,t),l=o.reduce(function(b,j){return fn(fn({},b),{},WS({},j,[e[j],t[j]]))},{}),c=o.reduce(function(b,j){return fn(fn({},b),{},WS({},j,{from:e[j],velocity:0,to:t[j]}))},{}),f=-1,d,y,p=function(){return null},g=function(){return Fu(function(j,T){return T.from},c)},v=function(){return!Object.values(c).filter(ZS).length},w=function(j){d||(d=j);var T=j-d,N=T/n.dt;c=ese(n,c,N),i(fn(fn(fn({},e),t),g())),d=j,v()||(f=requestAnimationFrame(p))},S=function(j){y||(y=j);var T=(j-y)/r,N=Fu(function(O,A){return um.apply(void 0,u4(A).concat([n(T)]))},l);if(i(fn(fn(fn({},e),t),N)),T<1)f=requestAnimationFrame(p);else{var E=Fu(function(O,A){return um.apply(void 0,u4(A).concat([n(1)]))},l);i(fn(fn(fn({},e),t),E))}};return p=n.isStepper?w:S,function(){return requestAnimationFrame(p),function(){cancelAnimationFrame(f)}}});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)}var nse=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function rse(e,t){if(e==null)return{};var n=ise(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 ise(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 ow(e){return lse(e)||sse(e)||ose(e)||ase()}function ase(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
542
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ose(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 sse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function lse(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 d4(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 Sr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d4(Object(n),!0).forEach(function(r){zu(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zu(e,t,n){return t=vI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cse(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function use(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,vI(r.key),r)}}function fse(e,t,n){return t&&use(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vI(e){var t=dse(e,"string");return Kl(t)==="symbol"?t:String(t)}function dse(e,t){if(Kl(e)!=="object"||e===null)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(t==="string"?String:Number)(e)}function hse(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&&e_(e,t)}function e_(e,t){return e_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},e_(e,t)}function pse(e){var t=mse();return function(){var r=fm(e),i;if(t){var o=fm(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return t_(this,i)}}function t_(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 n_(e)}function n_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mse(){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 fm(e){return fm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fm(e)}var Fi=(function(e){hse(n,e);var t=pse(n);function n(r,i){var o;cse(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,v=l.duration;if(o.handleStyleChange=o.handleStyleChange.bind(n_(o)),o.changeStyle=o.changeStyle.bind(n_(o)),!c||v<=0)return o.state={style:{}},typeof g=="function"&&(o.state={style:y}),t_(o);if(p&&p.length)o.state={style:p[0].style};else if(d){if(typeof g=="function")return o.state={style:d},t_(o);o.state={style:f?zu({},f,d):d}}else o.state={style:{}};return o}return fse(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 v={style:f?zu({},f,y):y};this.state&&g&&(f&&g[f]!==y||!f&&g!==y)&&this.setState(v);return}if(!(woe(i.to,y)&&i.canBegin&&i.isActive)){var w=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var S=w||d?p:i.to;if(this.state&&g){var b={style:f?zu({},f,S):S};(f&&g[f]!==S||!f&&g!==S)&&this.setState(b)}this.runAnimation(Sr(Sr({},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,v=tse(l,c,Goe(d),f,this.changeStyle),w=function(){o.stopJSAnimation=v()};this.manager.start([g,y,w,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,v=function(S,b,j){if(j===0)return S;var T=b.duration,N=b.easing,E=N===void 0?"ease":N,O=b.style,A=b.properties,C=b.onAnimationEnd,R=j>0?l[j-1]:b,D=A||Object.keys(O);if(typeof E=="function"||E==="spring")return[].concat(ow(S),[o.runJSAnimation.bind(o,{from:R.style,to:O,duration:T,easing:E}),T]);var G=s4(D,T,E),I=Sr(Sr(Sr({},R.style),O),{},{transition:G});return[].concat(ow(S),[I,T,C]).filter(koe)};return this.manager.start([f].concat(ow(l.reduce(v,[y,Math.max(g,c)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Eoe());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,v=i.children,w=this.manager;if(this.unSubscribe=w.subscribe(this.handleStyleChange),typeof d=="function"||typeof v=="function"||d==="spring"){this.runJSAnimation(i);return}if(g.length>1){this.runStepAnimation(i);return}var S=c?zu({},c,f):f,b=s4(Object.keys(S),l,d);w.start([y,o,Sr(Sr({},S),{},{transition:b}),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=rse(i,nse),d=$.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(v){var w=v.props,S=w.style,b=S===void 0?{}:S,j=w.className,T=$.cloneElement(v,Sr(Sr({},f),{},{style:Sr(Sr({},b),y),className:j}));return T};return d===1?p($.Children.only(o)):W.createElement("div",null,$.Children.map(o,function(g){return p(g)}))}}]),n})($.PureComponent);Fi.displayName="Animate";Fi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Fi.propTypes={from:it.oneOfType([it.object,it.string]),to:it.oneOfType([it.object,it.string]),attributeName:it.string,duration:it.number,begin:it.number,easing:it.oneOfType([it.string,it.func]),steps:it.arrayOf(it.shape({duration:it.number.isRequired,style:it.object.isRequired,easing:it.oneOfType([it.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),it.func]),properties:it.arrayOf("string"),onAnimationEnd:it.func})),children:it.oneOfType([it.node,it.func]),isActive:it.bool,canBegin:it.bool,onAnimationEnd:it.func,shouldReAnimate:it.bool,onAnimationStart:it.func,onAnimationReStart:it.func};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 dm(){return dm=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},dm.apply(this,arguments)}function yse(e,t){return bse(e)||xse(e,t)||vse(e,t)||gse()}function gse(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
543
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vse(e,t){if(e){if(typeof e=="string")return h4(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 h4(e,t)}}function h4(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 xse(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 bse(e){if(Array.isArray(e))return e}function p4(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 m4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p4(Object(n),!0).forEach(function(r){wse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function wse(e,t,n){return t=Sse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sse(e){var t=_se(e,"string");return Rf(t)=="symbol"?t:t+""}function _se(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(t==="string"?String:Number)(e)}var y4=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,v=4;g<v;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,`,
|
|
544
|
+
`).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,`,
|
|
545
|
+
`).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,`,
|
|
546
|
+
`).concat(t,",").concat(n+i-c*p[3])),y+="Z"}else if(l>0&&o===+o&&o>0){var w=Math.min(l,o);y="M ".concat(t,",").concat(n+c*w,`
|
|
547
|
+
A `).concat(w,",").concat(w,",0,0,").concat(d,",").concat(t+f*w,",").concat(n,`
|
|
548
|
+
L `).concat(t+r-f*w,",").concat(n,`
|
|
549
|
+
A `).concat(w,",").concat(w,",0,0,").concat(d,",").concat(t+r,",").concat(n+c*w,`
|
|
550
|
+
L `).concat(t+r,",").concat(n+i-c*w,`
|
|
551
|
+
A `).concat(w,",").concat(w,",0,0,").concat(d,",").concat(t+r-f*w,",").concat(n+i,`
|
|
552
|
+
L `).concat(t+f*w,",").concat(n+i,`
|
|
553
|
+
A `).concat(w,",").concat(w,",0,0,").concat(d,",").concat(t,",").concat(n+i-c*w," Z")}else y="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return y},jse=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},Ase={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},cj=function(t){var n=m4(m4({},Ase),t),r=$.useRef(),i=$.useState(-1),o=yse(i,2),l=o[0],c=o[1];$.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var E=r.current.getTotalLength();E&&c(E)}catch{}},[]);var f=n.x,d=n.y,y=n.width,p=n.height,g=n.radius,v=n.className,w=n.animationEasing,S=n.animationDuration,b=n.animationBegin,j=n.isAnimationActive,T=n.isUpdateAnimationActive;if(f!==+f||d!==+d||y!==+y||p!==+p||y===0||p===0)return null;var N=Be("recharts-rectangle",v);return T?W.createElement(Fi,{canBegin:l>0,from:{width:y,height:p,x:f,y:d},to:{width:y,height:p,x:f,y:d},duration:S,animationEasing:w,isActive:T},function(E){var O=E.width,A=E.height,C=E.x,R=E.y;return W.createElement(Fi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:S,isActive:j,easing:w},W.createElement("path",dm({},ke(n,!0),{className:N,d:y4(C,R,O,A,g),ref:r})))}):W.createElement("path",dm({},ke(n,!0),{className:N,d:y4(f,d,y,p,g)}))},Nse=["points","className","baseLinePoints","connectNulls"];function cl(){return cl=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},cl.apply(this,arguments)}function Ose(e,t){if(e==null)return{};var n=Ese(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 Ese(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 g4(e){return kse(e)||Mse(e)||Cse(e)||Tse()}function Tse(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
554
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cse(e,t){if(e){if(typeof e=="string")return r_(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r_(e,t)}}function Mse(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kse(e){if(Array.isArray(e))return r_(e)}function r_(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v4=function(t){return t&&t.x===+t.x&&t.y===+t.y},Rse=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){v4(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),v4(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Yu=function(t,n){var r=Rse(t);n&&(r=[r.reduce(function(o,l){return[].concat(g4(o),g4(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},Pse=function(t,n,r){var i=Yu(t,r);return"".concat(i.slice(-1)==="Z"?i.slice(0,-1):i,"L").concat(Yu(n.reverse(),r).slice(1))},Dse=function(t){var n=t.points,r=t.className,i=t.baseLinePoints,o=t.connectNulls,l=Ose(t,Nse);if(!n||!n.length)return null;var c=Be("recharts-polygon",r);if(i&&i.length){var f=l.stroke&&l.stroke!=="none",d=Pse(n,i,o);return W.createElement("g",{className:c},W.createElement("path",cl({},ke(l,!0),{fill:d.slice(-1)==="Z"?l.fill:"none",stroke:"none",d})),f?W.createElement("path",cl({},ke(l,!0),{fill:"none",d:Yu(n,o)})):null,f?W.createElement("path",cl({},ke(l,!0),{fill:"none",d:Yu(i,o)})):null)}var y=Yu(n,o);return W.createElement("path",cl({},ke(l,!0),{fill:y.slice(-1)==="Z"?l.fill:"none",className:c,d:y}))};function i_(){return i_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i_.apply(this,arguments)}var uj=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?$.createElement("circle",i_({},ke(t,!1),Ip(t),{className:l,cx:n,cy:r,r:i})):null};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 $se=["x","y","top","left","width","height","className"];function a_(){return a_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a_.apply(this,arguments)}function x4(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 Ise(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x4(Object(n),!0).forEach(function(r){Lse(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lse(e,t,n){return t=qse(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qse(e){var t=Bse(e,"string");return Pf(t)=="symbol"?t:t+""}function Bse(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 zse(e,t){if(e==null)return{};var n=Hse(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 Hse(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 Use=function(t,n,r,i,o,l){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(l,",").concat(n,"h").concat(r)},Gse=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,v=g===void 0?0:g,w=t.className,S=zse(t,$se),b=Ise({x:r,y:o,top:c,left:d,width:p,height:v},S);return!xe(r)||!xe(o)||!xe(p)||!xe(v)||!xe(c)||!xe(d)?null:W.createElement("path",a_({},ke(b,!0),{className:Be("recharts-cross",w),d:Use(r,o,p,v,c,d)}))},sw,b4;function Vse(){if(b4)return sw;b4=1;var e=wy(),t=R6(),n=ai();function r(i,o){return i&&i.length?e(i,n(o,2),t):void 0}return sw=r,sw}var Fse=Vse();const Yse=at(Fse);var lw,w4;function Xse(){if(w4)return lw;w4=1;var e=wy(),t=ai(),n=P6();function r(i,o){return i&&i.length?e(i,t(o,2),n):void 0}return lw=r,lw}var Kse=Xse();const Wse=at(Kse);var Qse=["cx","cy","angle","ticks","axisLine"],Zse=["ticks","tick","angle","tickFormatter","stroke"];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 Xu(){return Xu=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},Xu.apply(this,arguments)}function S4(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 To(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S4(Object(n),!0).forEach(function(r){Ey(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _4(e,t){if(e==null)return{};var n=Jse(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 Jse(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 ele(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j4(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,bI(r.key),r)}}function tle(e,t,n){return t&&j4(e.prototype,t),n&&j4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function nle(e,t,n){return t=hm(t),rle(e,xI()?Reflect.construct(t,n||[],hm(e).constructor):t.apply(e,n))}function rle(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 ile(e)}function ile(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(xI=function(){return!!e})()}function hm(e){return hm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hm(e)}function ale(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o_(e,t)}function o_(e,t){return o_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},o_(e,t)}function Ey(e,t,n){return t=bI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bI(e){var t=ole(e,"string");return Wl(t)=="symbol"?t:t+""}function ole(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 Ty=(function(e){function t(){return ele(this,t),nle(this,t,arguments)}return ale(t,e),tle(t,[{key:"getTickValueCoord",value:function(r){var i=r.coordinate,o=this.props,l=o.angle,c=o.cx,f=o.cy;return vt(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=Yse(c,function(y){return y.coordinate||0}),d=Wse(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=_4(r,Qse),y=c.reduce(function(w,S){return[Math.min(w[0],S.coordinate),Math.max(w[1],S.coordinate)]},[1/0,-1/0]),p=vt(i,o,y[0],l),g=vt(i,o,y[1],l),v=To(To(To({},ke(d,!1)),{},{fill:"none"},ke(f,!1)),{},{x1:p.x,y1:p.y,x2:g.x,y2:g.y});return W.createElement("line",Xu({className:"recharts-polar-radius-axis-line"},v))}},{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=_4(i,Zse),p=this.getTickTextAnchor(),g=ke(y,!1),v=ke(l,!1),w=o.map(function(S,b){var j=r.getTickValueCoord(S),T=To(To(To(To({textAnchor:p,transform:"rotate(".concat(90-c,", ").concat(j.x,", ").concat(j.y,")")},g),{},{stroke:"none",fill:d},v),{},{index:b},j),{},{payload:S});return W.createElement(lt,Xu({className:Be("recharts-polar-radius-axis-tick",lI(l)),key:"tick-".concat(S.coordinate)},ts(r.props,S,b)),t.renderTickItem(l,T,f?f(S.value,b):S.value))});return W.createElement(lt,{className:"recharts-polar-radius-axis-ticks"},w)}},{key:"render",value:function(){var r=this.props,i=r.ticks,o=r.axisLine,l=r.tick;return!i||!i.length?null:W.createElement(lt,{className:Be("recharts-polar-radius-axis",this.props.className)},o&&this.renderAxisLine(),l&&this.renderTicks(),rn.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(ns,Xu({},i,{className:"recharts-polar-radius-axis-tick-value"}),o),l}}])})($.PureComponent);Ey(Ty,"displayName","PolarRadiusAxis");Ey(Ty,"axisType","radiusAxis");Ey(Ty,"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 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)}function Do(){return Do=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},Do.apply(this,arguments)}function A4(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 Co(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A4(Object(n),!0).forEach(function(r){Cy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N4(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,SI(r.key),r)}}function lle(e,t,n){return t&&N4(e.prototype,t),n&&N4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cle(e,t,n){return t=pm(t),ule(e,wI()?Reflect.construct(t,n||[],pm(e).constructor):t.apply(e,n))}function ule(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 fle(e)}function fle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wI=function(){return!!e})()}function pm(e){return pm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},pm(e)}function dle(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 Cy(e,t,n){return t=SI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SI(e){var t=hle(e,"string");return Ql(t)=="symbol"?t:t+""}function hle(e,t){if(Ql(e)!="object"||!e)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)}var ple=Math.PI/180,O4=1e-5,My=(function(e){function t(){return sle(this,t),cle(this,t,arguments)}return dle(t,e),lle(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=vt(o,l,c,r.coordinate),g=vt(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*ple),l;return o>O4?l=i==="outer"?"start":"end":o<-O4?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=Co(Co({},ke(this.props,!1)),{},{fill:"none"},ke(c,!1));if(f==="circle")return W.createElement(uj,Do({className:"recharts-polar-angle-axis-line"},d,{cx:i,cy:o,r:l}));var y=this.props.ticks,p=y.map(function(g){return vt(i,o,l,g.coordinate)});return W.createElement(Dse,Do({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=Co(Co({},y),{},{fill:"none"},ke(c,!1)),v=o.map(function(w,S){var b=r.getTickLineCoord(w),j=r.getTickTextAnchor(w),T=Co(Co(Co({textAnchor:j},y),{},{stroke:"none",fill:d},p),{},{index:S,payload:w,x:b.x2,y:b.y2});return W.createElement(lt,Do({className:Be("recharts-polar-angle-axis-tick",lI(l)),key:"tick-".concat(w.coordinate)},ts(r.props,w,S)),c&&W.createElement("line",Do({className:"recharts-polar-angle-axis-tick-line"},g,b)),l&&t.renderTickItem(l,T,f?f(w.value,S):w.value))});return W.createElement(lt,{className:"recharts-polar-angle-axis-ticks"},v)}},{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(lt,{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(ns,Do({},i,{className:"recharts-polar-angle-axis-tick-value"}),o),l}}])})($.PureComponent);Cy(My,"displayName","PolarAngleAxis");Cy(My,"axisType","angleAxis");Cy(My,"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 cw,E4;function mle(){if(E4)return cw;E4=1;var e=$8(),t=e(Object.getPrototypeOf,Object);return cw=t,cw}var uw,T4;function yle(){if(T4)return uw;T4=1;var e=Wi(),t=mle(),n=Qi(),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 uw=d,uw}var gle=yle();const vle=at(gle);var fw,C4;function xle(){if(C4)return fw;C4=1;var e=Wi(),t=Qi(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return fw=r,fw}var ble=xle();const wle=at(ble);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)}function mm(){return mm=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},mm.apply(this,arguments)}function Sle(e,t){return Nle(e)||Ale(e,t)||jle(e,t)||_le()}function _le(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
555
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jle(e,t){if(e){if(typeof e=="string")return M4(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 M4(e,t)}}function M4(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 Ale(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 Nle(e){if(Array.isArray(e))return e}function k4(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 R4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k4(Object(n),!0).forEach(function(r){Ole(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ole(e,t,n){return t=Ele(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ele(e){var t=Tle(e,"string");return Df(t)=="symbol"?t:t+""}function Tle(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)}var P4=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},Cle={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Mle=function(t){var n=R4(R4({},Cle),t),r=$.useRef(),i=$.useState(-1),o=Sle(i,2),l=o[0],c=o[1];$.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.upperWidth,p=n.lowerWidth,g=n.height,v=n.className,w=n.animationEasing,S=n.animationDuration,b=n.animationBegin,j=n.isUpdateAnimationActive;if(f!==+f||d!==+d||y!==+y||p!==+p||g!==+g||y===0&&p===0||g===0)return null;var T=Be("recharts-trapezoid",v);return j?W.createElement(Fi,{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:w,isActive:j},function(N){var E=N.upperWidth,O=N.lowerWidth,A=N.height,C=N.x,R=N.y;return W.createElement(Fi,{canBegin:l>0,from:"0px ".concat(l===-1?1:l,"px"),to:"".concat(l,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:S,easing:w},W.createElement("path",mm({},ke(n,!0),{className:T,d:P4(C,R,E,O,A),ref:r})))}):W.createElement("g",null,W.createElement("path",mm({},ke(n,!0),{className:T,d:P4(f,d,y,p,g)})))},kle=["option","shapeType","propTransformer","activeClassName","isActive"];function $f(e){"@babel/helpers - typeof";return $f=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},$f(e)}function Rle(e,t){if(e==null)return{};var n=Ple(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 Ple(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 D4(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 ym(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?D4(Object(n),!0).forEach(function(r){Dle(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Dle(e,t,n){return t=$le(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $le(e){var t=Ile(e,"string");return $f(t)=="symbol"?t:t+""}function Ile(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lle(e,t){return ym(ym({},t),e)}function qle(e,t){return e==="symbols"}function $4(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return W.createElement(cj,n);case"trapezoid":return W.createElement(Mle,n);case"sector":return W.createElement(fI,n);case"symbols":if(qle(t))return W.createElement(M2,n);break;default:return null}}function Ble(e){return $.isValidElement(e)?e.props:e}function _I(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?Lle:r,o=e.activeClassName,l=o===void 0?"recharts-active-shape":o,c=e.isActive,f=Rle(e,kle),d;if($.isValidElement(t))d=$.cloneElement(t,ym(ym({},f),Ble(t)));else if(Pe(t))d=t(f);else if(vle(t)&&!wle(t)){var y=i(t,f);d=W.createElement($4,{shapeType:n,elementProps:y})}else{var p=f;d=W.createElement($4,{shapeType:n,elementProps:p})}return c?W.createElement(lt,{className:l},d):d}function ky(e,t){return t!=null&&"trapezoids"in e.props}function Ry(e,t){return t!=null&&"sectors"in e.props}function If(e,t){return t!=null&&"points"in e.props}function zle(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 Hle(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function Ule(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function Gle(e,t){var n;return ky(e,t)?n=zle:Ry(e,t)?n=Hle:If(e,t)&&(n=Ule),n}function Vle(e,t){var n;return ky(e,t)?n="trapezoids":Ry(e,t)?n="sectors":If(e,t)&&(n="points"),n}function Fle(e,t){if(ky(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(Ry(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 If(e,t)?t.payload:{}}function Yle(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=Vle(n,t),o=Fle(n,t),l=r.filter(function(f,d){var y=jy(o,f),p=n.props[i].filter(function(w){var S=Gle(n,t);return S(w,t)}),g=n.props[i].indexOf(p[p.length-1]),v=d===g;return y&&v}),c=r.indexOf(l[l.length-1]);return c}var bp;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 ul(){return ul=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},ul.apply(this,arguments)}function I4(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 yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?I4(Object(n),!0).forEach(function(r){fr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xle(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function L4(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,AI(r.key),r)}}function Kle(e,t,n){return t&&L4(e.prototype,t),n&&L4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Wle(e,t,n){return t=gm(t),Qle(e,jI()?Reflect.construct(t,n||[],gm(e).constructor):t.apply(e,n))}function Qle(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 Zle(e)}function Zle(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(jI=function(){return!!e})()}function gm(e){return gm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gm(e)}function Jle(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&&l_(e,t)}function l_(e,t){return l_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},l_(e,t)}function fr(e,t,n){return t=AI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AI(e){var t=ece(e,"string");return Zl(t)=="symbol"?t:t+""}function ece(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 Ji=(function(e){function t(n){var r;return Xle(this,t),r=Wle(this,t,[n]),fr(r,"pieRef",null),fr(r,"sectorRefs",[]),fr(r,"id",id("recharts-pie-")),fr(r,"handleAnimationEnd",function(){var i=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),Pe(i)&&i()}),fr(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 Jle(t,e),Kle(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),v=l&&l.offsetRadius||20,w=r.map(function(S,b){var j=(S.startAngle+S.endAngle)/2,T=vt(S.cx,S.cy,S.outerRadius+v,j),N=yt(yt(yt(yt({},y),S),{},{stroke:"none"},p),{},{index:b,textAnchor:t.getTextAnchor(T.x,S.cx)},T),E=yt(yt(yt(yt({},y),S),{},{fill:"none",stroke:S.fill},g),{},{index:b,points:[vt(S.cx,S.cy,S.outerRadius,j),T]}),O=f;return He(f)&&He(d)?O="value":He(f)&&(O=d),W.createElement(lt,{key:"label-".concat(S.startAngle,"-").concat(S.endAngle,"-").concat(S.midAngle,"-").concat(b)},c&&t.renderLabelLineItem(c,E,"line"),t.renderLabelItem(l,N,gn(S,O)))});return W.createElement(lt,{className:"recharts-pie-labels"},w)}},{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,v=p?l:g,w=yt(yt({},d),{},{stroke:c?d.fill:d.stroke,tabIndex:-1});return W.createElement(lt,ul({ref:function(b){b&&!i.sectorRefs.includes(b)&&i.sectorRefs.push(b)},tabIndex:-1,className:"recharts-pie-sector"},ts(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(_I,ul({option:v,isActive:p,shapeType:"sector"},w)))})}},{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,v=p.prevIsAnimationActive;return W.createElement(Fi,{begin:c,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"pie-".concat(y,"-").concat(v),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(w){var S=w.t,b=[],j=o&&o[0],T=j.startAngle;return o.forEach(function(N,E){var O=g&&g[E],A=E>0?Kn(N,"paddingAngle",0):0;if(O){var C=$a(O.endAngle-O.startAngle,N.endAngle-N.startAngle),R=yt(yt({},N),{},{startAngle:T+A,endAngle:T+C(S)+A});b.push(R),T=R.endAngle}else{var D=N.endAngle,G=N.startAngle,I=$a(0,D-G),L=I(S),Y=yt(yt({},N),{},{startAngle:T+A,endAngle:T+L+A});b.push(Y),T=Y.endAngle}}),W.createElement(lt,null,r.renderSectorsStatically(b))})}},{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||!jy(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,v=i.isAnimationActive,w=this.state.isAnimationFinished;if(o||!l||!l.length||!xe(d)||!xe(y)||!xe(p)||!xe(g))return null;var S=Be("recharts-pie",c);return W.createElement(lt,{tabIndex:this.props.rootTabIndex,className:S,ref:function(j){r.pieRef=j}},this.renderSectors(),f&&this.renderLabels(l),rn.renderCallByParent(this.props,null,!1),(!v||w)&&Qa.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(YS,ul({},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(ns,ul({},i,{alignmentBaseline:"middle",className:c}),l)}}])})($.PureComponent);bp=Ji;fr(Ji,"displayName","Pie");fr(Ji,"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:!yc.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});fr(Ji,"parseDeltaAngle",function(e,t){var n=Sn(t-e),r=Math.min(Math.abs(t-e),360);return n*r});fr(Ji,"getRealPieData",function(e){var t=e.data,n=e.children,r=ke(e,!1),i=hr(n,yf);return t&&t.length?t.map(function(o,l){return yt(yt(yt({payload:o},r),o),i&&i[l]&&i[l].props)}):i&&i.length?i.map(function(o){return yt(yt({},r),o.props)}):[]});fr(Ji,"parseCoordinateOfPie",function(e,t){var n=t.top,r=t.left,i=t.width,o=t.height,l=sI(i,o),c=r+_n(e.cx,i,i/2),f=n+_n(e.cy,o,o/2),d=_n(e.innerRadius,l,0),y=_n(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}});fr(Ji,"getComposedData",function(e){var t=e.item,n=e.offset,r=t.type.defaultProps!==void 0?yt(yt({},t.type.defaultProps),t.props):t.props,i=bp.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,v=Math.abs(r.minAngle),w=bp.parseCoordinateOfPie(r,n),S=bp.parseDeltaAngle(l,c),b=Math.abs(S),j=d;He(d)&&He(p)?(Rr(!1,`Use "dataKey" to specify the value of pie,
|
|
556
|
+
the props "valueKey" will be deprecated in 1.1.0`),j="value"):He(d)&&(Rr(!1,`Use "dataKey" to specify the value of pie,
|
|
557
|
+
the props "valueKey" will be deprecated in 1.1.0`),j=p);var T=i.filter(function(R){return gn(R,j,0)!==0}).length,N=(b>=360?T:T-1)*f,E=b-T*v-N,O=i.reduce(function(R,D){var G=gn(D,j,0);return R+(xe(G)?G:0)},0),A;if(O>0){var C;A=i.map(function(R,D){var G=gn(R,j,0),I=gn(R,y,D),L=(xe(G)?G:0)/O,Y;D?Y=C.endAngle+Sn(S)*f*(G!==0?1:0):Y=l;var P=Y+Sn(S)*((G!==0?v:0)+L*E),U=(Y+P)/2,k=(w.innerRadius+w.outerRadius)/2,z=[{name:I,value:G,payload:R,dataKey:j,type:g}],H=vt(w.cx,w.cy,k,U);return C=yt(yt(yt({percent:L,cornerRadius:o,name:I,tooltipPayload:z,midAngle:U,middleRadius:k,tooltipPosition:H},R),w),{},{value:gn(R,j),startAngle:Y,endAngle:P,payload:R,paddingAngle:Sn(S)*f}),C})}return yt(yt({},w),{},{sectors:A,data:i})});var dw,q4;function tce(){if(q4)return dw;q4=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 dw=n,dw}var hw,B4;function NI(){if(B4)return hw;B4=1;var e=Z8(),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 hw=r,hw}var pw,z4;function nce(){if(z4)return pw;z4=1;var e=tce(),t=py(),n=NI();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 pw=r,pw}var mw,H4;function rce(){if(H4)return mw;H4=1;var e=nce(),t=e();return mw=t,mw}var ice=rce();const vm=at(ice);function Lf(e){"@babel/helpers - typeof";return Lf=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},Lf(e)}function U4(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 G4(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U4(Object(n),!0).forEach(function(r){OI(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OI(e,t,n){return t=ace(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ace(e){var t=oce(e,"string");return Lf(t)=="symbol"?t:t+""}function oce(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sce=["Webkit","Moz","O","ms"],lce=function(t,n){var r=t.replace(/(\w)/,function(o){return o.toUpperCase()}),i=sce.reduce(function(o,l){return G4(G4({},o),{},OI({},l+r,n))},{});return i[t]=n,i};function Jl(e){"@babel/helpers - typeof";return Jl=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},Jl(e)}function xm(){return xm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xm.apply(this,arguments)}function V4(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 yw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V4(Object(n),!0).forEach(function(r){Un(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V4(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F4(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,TI(r.key),r)}}function uce(e,t,n){return t&&F4(e.prototype,t),n&&F4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function fce(e,t,n){return t=bm(t),dce(e,EI()?Reflect.construct(t,n||[],bm(e).constructor):t.apply(e,n))}function dce(e,t){if(t&&(Jl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hce(e)}function hce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EI=function(){return!!e})()}function bm(e){return bm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},bm(e)}function pce(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&&c_(e,t)}function c_(e,t){return c_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},c_(e,t)}function Un(e,t,n){return t=TI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TI(e){var t=mce(e,"string");return Jl(t)=="symbol"?t:t+""}function mce(e,t){if(Jl(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jl(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var yce=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=Gu().domain(vm(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}},Y4=function(t){return t.changedTouches&&!!t.changedTouches.length},ec=(function(e){function t(n){var r;return cce(this,t),r=fce(this,t,[n]),Un(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Un(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Un(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()}),Un(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Un(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Un(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Un(r,"handleSlideDragStart",function(i){var o=Y4(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 pce(t,e),uce(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),v=t.getIndexInRange(l,p),w=t.getIndexInRange(l,g);return{startIndex:v-v%f,endIndex:w===y?y:w-w%f}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,l=i.tickFormatter,c=i.dataKey,f=gn(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,v=f.endIndex,w=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 b=this.getIndex({startX:l+S,endX:c+S});(b.startIndex!==g||b.endIndex!==v)&&w&&w(b),this.setState({startX:l+S,endX:c+S,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=Y4(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,v=y.travellerWidth,w=y.onChange,S=y.gap,b=y.data,j={startX:this.state.startX,endX:this.state.endX},T=r.pageX-o;T>0?T=Math.min(T,p+g-v-d):T<0&&(T=Math.max(T,p-d)),j[l]=d+T;var N=this.getIndex(j),E=N.startIndex,O=N.endIndex,A=function(){var R=b.length-1;return l==="startX"&&(c>f?E%S===0:O%S===0)||c<f&&O===R||l==="endX"&&(c>f?O%S===0:E%S===0)||c>f&&O===R};this.setState(Un(Un({},l,d+T),"brushMoveStartX",r.pageX),function(){w&&A()&&w(N)})}},{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 v=c[g];i==="startX"&&v>=d||i==="endX"&&v<=f||this.setState(Un({},i,v),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=$.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,v=f.ariaLabel,w=f.data,S=f.startIndex,b=f.endIndex,j=Math.max(r,this.props.x),T=yw(yw({},ke(this.props,!1)),{},{x:j,y:d,width:y,height:p}),N=v||"Min value: ".concat((o=w[S])===null||o===void 0?void 0:o.name,", Max value: ").concat((l=w[b])===null||l===void 0?void 0:l.name);return W.createElement(lt,{tabIndex:0,role:"slider","aria-label":N,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(O){["ArrowLeft","ArrowRight"].includes(O.key)&&(O.preventDefault(),O.stopPropagation(),c.handleTravellerMoveKeyboard(O.key==="ArrowRight"?1:-1,i))},onFocus:function(){c.setState({isTravellerFocused:!0})},onBlur:function(){c.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(g,T))}},{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,v=5,w={pointerEvents:"none",fill:d};return W.createElement(lt,{className:"recharts-brush-texts"},W.createElement(ns,xm({textAnchor:"end",verticalAnchor:"middle",x:Math.min(p,g)-v,y:l+c/2},w),this.getTextOfTick(i)),W.createElement(ns,xm({textAnchor:"start",verticalAnchor:"middle",x:Math.max(p,g)+f+v,y:l+c/2},w),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,v=g.startX,w=g.endX,S=g.isTextActive,b=g.isSlideMoving,j=g.isTravellerMoving,T=g.isTravellerFocused;if(!i||!i.length||!xe(c)||!xe(f)||!xe(d)||!xe(y)||d<=0||y<=0)return null;var N=Be("recharts-brush",o),E=W.Children.count(l)===1,O=lce("userSelect","none");return W.createElement(lt,{className:N,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:O},this.renderBackground(),E&&this.renderPanorama(),this.renderSlide(v,w),this.renderTravellerLayer(v,"startX"),this.renderTravellerLayer(w,"endX"),(S||b||j||T||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 yw({prevData:o,prevTravellerWidth:f,prevUpdateId:d,prevX:c,prevWidth:l},o&&o.length?yce({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(v){return i.scale(v)});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}}])})($.PureComponent);Un(ec,"displayName","Brush");Un(ec,"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 gw,X4;function gce(){if(X4)return gw;X4=1;var e=L2();function t(n,r){var i;return e(n,function(o,l,c){return i=r(o,l,c),!i}),!!i}return gw=t,gw}var vw,K4;function vce(){if(K4)return vw;K4=1;var e=T8(),t=ai(),n=gce(),r=Pn(),i=py();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 vw=o,vw}var xce=vce();const bce=at(xce);var Zr=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},xw,W4;function wce(){if(W4)return xw;W4=1;var e=Y8();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return xw=t,xw}var bw,Q4;function Sce(){if(Q4)return bw;Q4=1;var e=wce(),t=V8(),n=ai();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 bw=r,bw}var _ce=Sce();const jce=at(_ce);var ww,Z4;function Ace(){if(Z4)return ww;Z4=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 ww=e,ww}var Sw,J4;function Nce(){if(J4)return Sw;J4=1;var e=L2();function t(n,r){var i=!0;return e(n,function(o,l,c){return i=!!r(o,l,c),i}),i}return Sw=t,Sw}var _w,eR;function Oce(){if(eR)return _w;eR=1;var e=Ace(),t=Nce(),n=ai(),r=Pn(),i=py();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 _w=o,_w}var Ece=Oce();const CI=at(Ece);var Tce=["x","y"];function qf(e){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(e)}function u_(){return u_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u_.apply(this,arguments)}function tR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Pu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tR(Object(n),!0).forEach(function(r){Cce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cce(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=kce(e,"string");return qf(t)=="symbol"?t:t+""}function kce(e,t){if(qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rce(e,t){if(e==null)return{};var n=Pce(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 Pce(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 Dce(e,t){var n=e.x,r=e.y,i=Rce(e,Tce),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 Pu(Pu(Pu(Pu(Pu({},t),i),l?{x:l}:{}),f?{y:f}:{}),{},{height:y,width:g,name:t.name,radius:t.radius})}function nR(e){return W.createElement(_I,u_({shapeType:"rectangle",propTransformer:Dce,activeClassName:"recharts-active-bar"},e))}var $ce=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=xe(r)||OW(r);return o?t(r,i):(o||is(),n)}},Ice=["value","background"],MI;function tc(e){"@babel/helpers - typeof";return tc=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},tc(e)}function Lce(e,t){if(e==null)return{};var n=qce(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 qce(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wm(){return wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wm.apply(this,arguments)}function rR(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 Ht(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rR(Object(n),!0).forEach(function(r){Fa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function iR(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,RI(r.key),r)}}function zce(e,t,n){return t&&iR(e.prototype,t),n&&iR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hce(e,t,n){return t=Sm(t),Uce(e,kI()?Reflect.construct(t,n||[],Sm(e).constructor):t.apply(e,n))}function Uce(e,t){if(t&&(tc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gce(e)}function Gce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kI=function(){return!!e})()}function Sm(e){return Sm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Sm(e)}function Vce(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&&f_(e,t)}function f_(e,t){return f_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},f_(e,t)}function Fa(e,t,n){return t=RI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RI(e){var t=Fce(e,"string");return tc(t)=="symbol"?t:t+""}function Fce(e,t){if(tc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hs=(function(e){function t(){var n;Bce(this,t);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return n=Hce(this,t,[].concat(i)),Fa(n,"state",{isAnimationFinished:!1}),Fa(n,"id",id("recharts-bar-")),Fa(n,"handleAnimationEnd",function(){var l=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),l&&l()}),Fa(n,"handleAnimationStart",function(){var l=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),l&&l()}),n}return Vce(t,e),zce(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 v=g===f,w=v?d:l,S=Ht(Ht(Ht({},y),p),{},{isActive:v,option:w,index:g,dataKey:c,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return W.createElement(lt,wm({className:"recharts-bar-rectangle"},ts(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(nR,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(Fi,{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(v){var w=v.t,S=o.map(function(b,j){var T=g&&g[j];if(T){var N=$a(T.x,b.x),E=$a(T.y,b.y),O=$a(T.width,b.width),A=$a(T.height,b.height);return Ht(Ht({},b),{},{x:N(w),y:E(w),width:O(w),height:A(w)})}if(l==="horizontal"){var C=$a(0,b.height),R=C(w);return Ht(Ht({},b),{},{y:b.y+b.height-R,height:R})}var D=$a(0,b.width),G=D(w);return Ht(Ht({},b),{},{width:G})});return W.createElement(lt,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||!jy(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=Lce(d,Ice);if(!p)return null;var v=Ht(Ht(Ht(Ht(Ht({},g),{},{fill:"#eee"},p),f),ts(r.props,d,y)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:l,index:y,className:"recharts-bar-background-rectangle"});return W.createElement(nR,wm({key:"background-bar-".concat(y),option:r.props.background,isActive:y===c},v))})}},{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=hr(y,Oy);if(!p)return null;var g=d==="vertical"?l[0].height/2:l[0].width/2,v=function(b,j){var T=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:T,errorVal:gn(b,j)}},w={clipPath:r?"url(#clipPath-".concat(i,")"):null};return W.createElement(lt,w,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:v})}))}},{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,v=r.isAnimationActive,w=r.background,S=r.id;if(i||!o||!o.length)return null;var b=this.state.isAnimationFinished,j=Be("recharts-bar",l),T=c&&c.allowDataOverflow,N=f&&f.allowDataOverflow,E=T||N,O=He(S)?this.id:S;return W.createElement(lt,{className:j},T||N?W.createElement("defs",null,W.createElement("clipPath",{id:"clipPath-".concat(O)},W.createElement("rect",{x:T?d:d-p/2,y:N?y:y-g/2,width:T?p:p*2,height:N?g:g*2}))):null,W.createElement(lt,{className:"recharts-bar-rectangles",clipPath:E?"url(#clipPath-".concat(O,")"):null},w?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(E,O),(!v||b)&&Qa.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}}])})($.PureComponent);MI=hs;Fa(hs,"displayName","Bar");Fa(hs,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!yc.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Fa(hs,"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,v=gie(r,n);if(!v)return null;var w=t.layout,S=n.type.defaultProps,b=S!==void 0?Ht(Ht({},S),n.props):n.props,j=b.dataKey,T=b.children,N=b.minPointSize,E=w==="horizontal"?l:o,O=d?E.scale.domain():null,A=jie({numericAxis:E}),C=hr(T,yf),R=p.map(function(D,G){var I,L,Y,P,U,k;d?I=vie(d[y+G],O):(I=gn(D,j),Array.isArray(I)||(I=[A,I]));var z=$ce(N,MI.defaultProps.minPointSize)(I[1],G);if(w==="horizontal"){var H,F=[l.scale(I[0]),l.scale(I[1])],K=F[0],q=F[1];L=kk({axis:o,ticks:c,bandSize:i,offset:v.offset,entry:D,index:G}),Y=(H=q??K)!==null&&H!==void 0?H:void 0,P=v.size;var V=K-q;if(U=Number.isNaN(V)?0:V,k={x:L,y:l.y,width:P,height:l.height},Math.abs(z)>0&&Math.abs(U)<Math.abs(z)){var J=Sn(U||z)*(Math.abs(z)-Math.abs(U));Y-=J,U+=J}}else{var ae=[o.scale(I[0]),o.scale(I[1])],he=ae[0],ge=ae[1];if(L=he,Y=kk({axis:l,ticks:f,bandSize:i,offset:v.offset,entry:D,index:G}),P=ge-he,U=v.size,k={x:o.x,y:Y,width:o.width,height:U},Math.abs(z)>0&&Math.abs(P)<Math.abs(z)){var ee=Sn(P||z)*(Math.abs(z)-Math.abs(P));P+=ee}}return Ht(Ht(Ht({},D),{},{x:L,y:Y,width:P,height:U,value:d?I:I[1],payload:D,background:k},C&&C[G]&&C[G].props),{},{tooltipPayload:[aI(n,D)],tooltipPosition:{x:L+P/2,y:Y+U/2}})});return Ht({data:R,layout:w},g)});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 Yce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aR(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,PI(r.key),r)}}function Xce(e,t,n){return t&&aR(e.prototype,t),n&&aR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}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 Er(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){Py(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 Py(e,t,n){return t=PI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PI(e){var t=Kce(e,"string");return Bf(t)=="symbol"?t:t+""}function Kce(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 Wce=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=!!Gn(d,hs);return y.reduce(function(v,w){var S=n[w],b=S.orientation,j=S.domain,T=S.padding,N=T===void 0?{}:T,E=S.mirror,O=S.reversed,A="".concat(b).concat(E?"Mirror":""),C,R,D,G,I;if(S.type==="number"&&(S.padding==="gap"||S.padding==="no-gap")){var L=j[1]-j[0],Y=1/0,P=S.categoricalDomain.sort(CW);if(P.forEach(function(ae,he){he>0&&(Y=Math.min((ae||0)-(P[he-1]||0),Y))}),Number.isFinite(Y)){var U=Y/L,k=S.layout==="vertical"?r.height:r.width;if(S.padding==="gap"&&(C=U*k/2),S.padding==="no-gap"){var z=_n(t.barCategoryGap,U*k),H=U*k/2;C=H-z-(H-z)/k*z}}}i==="xAxis"?R=[r.left+(N.left||0)+(C||0),r.left+r.width-(N.right||0)-(C||0)]:i==="yAxis"?R=f==="horizontal"?[r.top+r.height-(N.bottom||0),r.top+(N.top||0)]:[r.top+(N.top||0)+(C||0),r.top+r.height-(N.bottom||0)-(C||0)]:R=S.range,O&&(R=[R[1],R[0]]);var F=tI(S,o,g),K=F.scale,q=F.realScaleType;K.domain(j).range(R),nI(K);var V=rI(K,Er(Er({},S),{},{realScaleType:q}));i==="xAxis"?(I=b==="top"&&!E||b==="bottom"&&E,D=r.left,G=p[A]-I*S.height):i==="yAxis"&&(I=b==="left"&&!E||b==="right"&&E,D=p[A]-I*S.width,G=r.top);var J=Er(Er(Er({},S),V),{},{realScaleType:q,x:D,y:G,scale:K,width:i==="xAxis"?r.width:S.width,height:i==="yAxis"?r.height:S.height});return J.bandSize=am(J,V),!S.hide&&i==="xAxis"?p[A]+=(I?-1:1)*J.height:S.hide||(p[A]+=(I?-1:1)*J.width),Er(Er({},v),{},Py({},w,J))},{})},DI=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)}},Qce=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return DI({x:n,y:r},{x:i,y:o})},$I=(function(){function e(t){Yce(this,e),this.scale=t}return Xce(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)}}])})();Py($I,"EPS",1e-4);var fj=function(t){var n=Object.keys(t).reduce(function(r,i){return Er(Er({},r),{},Py({},i,$I.create(t[i])))},{});return Er(Er({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=o.bandAware,c=o.position;return jce(i,function(f,d){return n[d].apply(f,{bandAware:l,position:c})})},isInRange:function(i){return CI(i,function(o,l){return n[l].isInRange(o)})}})};function Zce(e){return(e%180+180)%180}var Jce=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=Zce(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)},jw,sR;function eue(){if(sR)return jw;sR=1;var e=ai(),t=ad(),n=dy();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 jw=r,jw}var Aw,lR;function tue(){if(lR)return Aw;lR=1;var e=NI();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return Aw=t,Aw}var Nw,cR;function nue(){if(cR)return Nw;cR=1;var e=B8(),t=ai(),n=tue(),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 Nw=i,Nw}var Ow,uR;function rue(){if(uR)return Ow;uR=1;var e=eue(),t=nue(),n=e(t);return Ow=n,Ow}var iue=rue();const aue=at(iue);var oue=n8();const sue=at(oue);var lue=sue(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("")}),dj=$.createContext(void 0),hj=$.createContext(void 0),II=$.createContext(void 0),LI=$.createContext({}),qI=$.createContext(void 0),BI=$.createContext(0),zI=$.createContext(0),fR=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=lue(o);return W.createElement(dj.Provider,{value:r},W.createElement(hj.Provider,{value:i},W.createElement(LI.Provider,{value:o},W.createElement(II.Provider,{value:y},W.createElement(qI.Provider,{value:l},W.createElement(BI.Provider,{value:d},W.createElement(zI.Provider,{value:f},c)))))))},cue=function(){return $.useContext(qI)},HI=function(t){var n=$.useContext(dj);n==null&&is();var r=n[t];return r==null&&is(),r},uue=function(){var t=$.useContext(dj);return qa(t)},fue=function(){var t=$.useContext(hj),n=aue(t,function(r){return CI(r.domain,Number.isFinite)});return n||qa(t)},UI=function(t){var n=$.useContext(hj);n==null&&is();var r=n[t];return r==null&&is(),r},due=function(){var t=$.useContext(II);return t},hue=function(){return $.useContext(LI)},pj=function(){return $.useContext(zI)},mj=function(){return $.useContext(BI)};function nc(e){"@babel/helpers - typeof";return nc=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},nc(e)}function pue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mue(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,VI(r.key),r)}}function yue(e,t,n){return t&&mue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gue(e,t,n){return t=_m(t),vue(e,GI()?Reflect.construct(t,n||[],_m(e).constructor):t.apply(e,n))}function vue(e,t){if(t&&(nc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xue(e)}function xue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function GI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(GI=function(){return!!e})()}function _m(e){return _m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_m(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&&d_(e,t)}function d_(e,t){return d_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},d_(e,t)}function dR(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 hR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dR(Object(n),!0).forEach(function(r){yj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yj(e,t,n){return t=VI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VI(e){var t=wue(e,"string");return nc(t)=="symbol"?t:t+""}function wue(e,t){if(nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Sue(e,t){return Nue(e)||Aue(e,t)||jue(e,t)||_ue()}function _ue(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
558
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jue(e,t){if(e){if(typeof e=="string")return pR(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 pR(e,t)}}function pR(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 Nue(e){if(Array.isArray(e))return e}function h_(){return h_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h_.apply(this,arguments)}var Oue=function(t,n){var r;return W.isValidElement(t)?r=W.cloneElement(t,n):Pe(t)?r=t(n):r=W.createElement("line",h_({},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,v=o.height;if(r){var w=d.y,S=t.y.apply(w,{position:l});if(Zr(d,"discard")&&!t.y.isInRange(S))return null;var b=[{x:y+g,y:S},{x:y,y:S}];return f==="left"?b.reverse():b}if(n){var j=d.x,T=t.x.apply(j,{position:l});if(Zr(d,"discard")&&!t.x.isInRange(T))return null;var N=[{x:T,y:p+v},{x:T,y:p}];return c==="top"?N.reverse():N}if(i){var E=d.segment,O=E.map(function(A){return t.apply(A,{position:l})});return Zr(d,"discard")&&bce(O,function(A){return!t.isInRange(A)})?null:O}return null};function Tue(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=cue(),y=HI(i),p=UI(o),g=due();if(!d||!g)return null;Rr(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var v=fj({x:y.scale,y:p.scale}),w=Wt(t),S=Wt(n),b=r&&r.length===2,j=Eue(v,w,S,b,g,e.position,y.orientation,p.orientation,e);if(!j)return null;var T=Sue(j,2),N=T[0],E=N.x,O=N.y,A=T[1],C=A.x,R=A.y,D=Zr(e,"hidden")?"url(#".concat(d,")"):void 0,G=hR(hR({clipPath:D},ke(e,!0)),{},{x1:E,y1:O,x2:C,y2:R});return W.createElement(lt,{className:Be("recharts-reference-line",c)},Oue(l,G),rn.renderCallByParent(e,Qce({x1:E,y1:O,x2:C,y2:R})))}var gj=(function(e){function t(){return pue(this,t),gue(this,t,arguments)}return bue(t,e),yue(t,[{key:"render",value:function(){return W.createElement(Tue,this.props)}}])})(W.Component);yj(gj,"displayName","ReferenceLine");yj(gj,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function p_(){return p_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p_.apply(this,arguments)}function rc(e){"@babel/helpers - typeof";return rc=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},rc(e)}function mR(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 yR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mR(Object(n),!0).forEach(function(r){Dy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Cue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mue(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,YI(r.key),r)}}function kue(e,t,n){return t&&Mue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rue(e,t,n){return t=jm(t),Pue(e,FI()?Reflect.construct(t,n||[],jm(e).constructor):t.apply(e,n))}function Pue(e,t){if(t&&(rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Due(e)}function Due(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function FI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(FI=function(){return!!e})()}function jm(e){return jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jm(e)}function $ue(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m_(e,t)}function m_(e,t){return m_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},m_(e,t)}function Dy(e,t,n){return t=YI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YI(e){var t=Iue(e,"string");return rc(t)=="symbol"?t:t+""}function Iue(e,t){if(rc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Lue=function(t){var n=t.x,r=t.y,i=t.xAxis,o=t.yAxis,l=fj({x:i.scale,y:o.scale}),c=l.apply({x:n,y:r},{bandAware:!0});return Zr(t,"discard")&&!l.isInRange(c)?null:c},$y=(function(e){function t(){return Cue(this,t),Rue(this,t,arguments)}return $ue(t,e),kue(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=Wt(i),y=Wt(o);if(Rr(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!d||!y)return null;var p=Lue(this.props);if(!p)return null;var g=p.x,v=p.y,w=this.props,S=w.shape,b=w.className,j=Zr(this.props,"hidden")?"url(#".concat(f,")"):void 0,T=yR(yR({clipPath:j},ke(this.props,!0)),{},{cx:g,cy:v});return W.createElement(lt,{className:Be("recharts-reference-dot",b)},t.renderDot(S,T),rn.renderCallByParent(this.props,{x:g-l,y:v-l,width:2*l,height:2*l}))}}])})(W.Component);Dy($y,"displayName","ReferenceDot");Dy($y,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});Dy($y,"renderDot",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):Pe(e)?n=e(t):n=W.createElement(uj,p_({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function y_(){return y_=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},y_.apply(this,arguments)}function ic(e){"@babel/helpers - typeof";return ic=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},ic(e)}function gR(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 vR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gR(Object(n),!0).forEach(function(r){Iy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function que(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bue(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,KI(r.key),r)}}function zue(e,t,n){return t&&Bue(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Hue(e,t,n){return t=Am(t),Uue(e,XI()?Reflect.construct(t,n||[],Am(e).constructor):t.apply(e,n))}function Uue(e,t){if(t&&(ic(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Gue(e)}function Gue(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(XI=function(){return!!e})()}function Am(e){return Am=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Am(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&&g_(e,t)}function g_(e,t){return g_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},g_(e,t)}function Iy(e,t,n){return t=KI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KI(e){var t=Fue(e,"string");return ic(t)=="symbol"?t:t+""}function Fue(e,t){if(ic(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ic(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Yue=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=fj({x:y.scale,y:p.scale}),v={x:t?g.x.apply(l,{position:"start"}):g.x.rangeMin,y:r?g.y.apply(f,{position:"start"}):g.y.rangeMin},w={x:n?g.x.apply(c,{position:"end"}):g.x.rangeMax,y:i?g.y.apply(d,{position:"end"}):g.y.rangeMax};return Zr(o,"discard")&&(!g.isInRange(v)||!g.isInRange(w))?null:DI(v,w)},Ly=(function(e){function t(){return que(this,t),Hue(this,t,arguments)}return Vue(t,e),zue(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;Rr(d===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=Wt(i),g=Wt(o),v=Wt(l),w=Wt(c),S=this.props.shape;if(!p&&!g&&!v&&!w&&!S)return null;var b=Yue(p,g,v,w,this.props);if(!b&&!S)return null;var j=Zr(this.props,"hidden")?"url(#".concat(y,")"):void 0;return W.createElement(lt,{className:Be("recharts-reference-area",f)},t.renderRect(S,vR(vR({clipPath:j},ke(this.props,!0)),b)),rn.renderCallByParent(this.props,b))}}])})(W.Component);Iy(Ly,"displayName","ReferenceArea");Iy(Ly,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Iy(Ly,"renderRect",function(e,t){var n;return W.isValidElement(e)?n=W.cloneElement(e,t):Pe(e)?n=e(t):n=W.createElement(cj,y_({},t,{className:"recharts-reference-area-rect"})),n});function WI(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 Xue(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return Jce(r,n)}function Kue(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 Nm(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 Wue(e,t){return WI(e,t+1)}function Que(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 w=r==null?void 0:r[f];if(w===void 0)return{v:WI(r,d)};var S=f,b,j=function(){return b===void 0&&(b=n(w,S)),b},T=w.coordinate,N=f===0||Nm(e,T,j,y,c);N||(f=0,y=l,d+=1),N&&(y=T+e*(j()/2+i),f+=d)},g;d<=o.length;)if(g=p(),g)return g.v;return[]}function zf(e){"@babel/helpers - typeof";return zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(e)}function xR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xR(Object(n),!0).forEach(function(r){Zue(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zue(e,t,n){return t=Jue(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jue(e){var t=efe(e,"string");return zf(t)=="symbol"?t:t+""}function efe(e,t){if(zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tfe(e,t,n,r,i){for(var o=(r||[]).slice(),l=o.length,c=t.start,f=t.end,d=function(g){var v=o[g],w,S=function(){return w===void 0&&(w=n(v,g)),w};if(g===l-1){var b=e*(v.coordinate+e*S()/2-f);o[g]=v=mn(mn({},v),{},{tickCoord:b>0?v.coordinate-b*e:v.coordinate})}else o[g]=v=mn(mn({},v),{},{tickCoord:v.coordinate});var j=Nm(e,v.tickCoord,S,c,f);j&&(f=v.tickCoord-e*(S()/2+i),o[g]=mn(mn({},v),{},{isShow:!0}))},y=l-1;y>=0;y--)d(y);return o}function nfe(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=mn(mn({},y),{},{tickCoord:g>0?y.coordinate-g*e:y.coordinate});var v=Nm(e,y.tickCoord,function(){return p},f,d);v&&(d=y.tickCoord-e*(p/2+i),l[c-1]=mn(mn({},y),{},{isShow:!0}))}for(var w=o?c-1:c,S=function(T){var N=l[T],E,O=function(){return E===void 0&&(E=n(N,T)),E};if(T===0){var A=e*(N.coordinate-e*O()/2-f);l[T]=N=mn(mn({},N),{},{tickCoord:A<0?N.coordinate-A*e:N.coordinate})}else l[T]=N=mn(mn({},N),{},{tickCoord:N.coordinate});var C=Nm(e,N.tickCoord,O,f,d);C&&(f=N.tickCoord+e*(O()/2+i),l[T]=mn(mn({},N),{},{isShow:!0}))},b=0;b<w;b++)S(b);return l}function vj(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(xe(f)||yc.isSsr)return Wue(i,typeof f=="number"&&xe(f)?f:0);var g=[],v=c==="top"||c==="bottom"?"width":"height",w=y&&v==="width"?Uu(y,{fontSize:t,letterSpacing:n}):{width:0,height:0},S=function(N,E){var O=Pe(d)?d(N.value,E):N.value;return v==="width"?Xue(Uu(O,{fontSize:t,letterSpacing:n}),w,p):Uu(O,{fontSize:t,letterSpacing:n})[v]},b=i.length>=2?Sn(i[1].coordinate-i[0].coordinate):1,j=Kue(o,b,v);return f==="equidistantPreserveStart"?Que(b,j,S,i,l):(f==="preserveStart"||f==="preserveStartEnd"?g=nfe(b,j,S,i,l,f==="preserveStartEnd"):g=tfe(b,j,S,i,l),g.filter(function(T){return T.isShow}))}var rfe=["viewBox"],ife=["viewBox"],afe=["ticks"];function ac(e){"@babel/helpers - typeof";return ac=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},ac(e)}function fl(){return fl=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},fl.apply(this,arguments)}function bR(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 Xt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bR(Object(n),!0).forEach(function(r){xj(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ew(e,t){if(e==null)return{};var n=ofe(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 ofe(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 sfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wR(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,ZI(r.key),r)}}function lfe(e,t,n){return t&&wR(e.prototype,t),n&&wR(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function cfe(e,t,n){return t=Om(t),ufe(e,QI()?Reflect.construct(t,n||[],Om(e).constructor):t.apply(e,n))}function ufe(e,t){if(t&&(ac(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ffe(e)}function ffe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function QI(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(QI=function(){return!!e})()}function Om(e){return Om=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Om(e)}function dfe(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&&v_(e,t)}function v_(e,t){return v_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},v_(e,t)}function xj(e,t,n){return t=ZI(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZI(e){var t=hfe(e,"string");return ac(t)=="symbol"?t:t+""}function hfe(e,t){if(ac(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ac(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xc=(function(e){function t(n){var r;return sfe(this,t),r=cfe(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return dfe(t,e),lfe(t,[{key:"shouldComponentUpdate",value:function(r,i){var o=r.viewBox,l=Ew(r,rfe),c=this.props,f=c.viewBox,d=Ew(c,ife);return!gl(o,f)||!gl(l,d)||!gl(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,v,w,S,b,j,T,N=p?-1:1,E=r.tickSize||y,O=xe(r.tickCoord)?r.tickCoord:r.coordinate;switch(d){case"top":v=w=r.coordinate,b=l+ +!p*f,S=b-N*E,T=S-N*g,j=O;break;case"left":S=b=r.coordinate,w=o+ +!p*c,v=w-N*E,j=v-N*g,T=O;break;case"right":S=b=r.coordinate,w=o+ +p*c,v=w+N*E,j=v+N*g,T=O;break;default:v=w=r.coordinate,b=l+ +p*f,S=b+N*E,T=S+N*g,j=O;break}return{line:{x1:v,y1:S,x2:w,y2:b},tick:{x:j,y:T}}}},{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=Xt(Xt(Xt({},ke(this.props,!1)),ke(y,!1)),{},{fill:"none"});if(f==="top"||f==="bottom"){var g=+(f==="top"&&!d||f==="bottom"&&d);p=Xt(Xt({},p),{},{x1:i,y1:o+g*c,x2:i+l,y2:o+g*c})}else{var v=+(f==="left"&&!d||f==="right"&&d);p=Xt(Xt({},p),{},{x1:i+v*l,y1:o,x2:i+v*l,y2:o+c})}return W.createElement("line",fl({},p,{className:Be("recharts-cartesian-axis-line",Kn(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,v=vj(Xt(Xt({},this.props),{},{ticks:r}),i,o),w=this.getTickTextAnchor(),S=this.getTickVerticalAnchor(),b=ke(this.props,!1),j=ke(y,!1),T=Xt(Xt({},b),{},{fill:"none"},ke(f,!1)),N=v.map(function(E,O){var A=l.getTickLineCoord(E),C=A.line,R=A.tick,D=Xt(Xt(Xt(Xt({textAnchor:w,verticalAnchor:S},b),{},{stroke:"none",fill:d},j),R),{},{index:O,payload:E,visibleTicksCount:v.length,tickFormatter:p});return W.createElement(lt,fl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(E.value,"-").concat(E.coordinate,"-").concat(E.tickCoord)},ts(l.props,E,O)),f&&W.createElement("line",fl({},T,C,{className:Be("recharts-cartesian-axis-tick-line",Kn(f,"className"))})),y&&t.renderTickItem(y,D,"".concat(Pe(p)?p(E.value,O):E.value).concat(g||"")))});return W.createElement("g",{className:"recharts-cartesian-axis-ticks"},N)}},{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,v=Ew(p,afe),w=g;return Pe(f)&&(w=g&&g.length>0?f(this.props):f(v)),l<=0||c<=0||!w||!w.length?null:W.createElement(lt,{className:Be("recharts-cartesian-axis",d),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(w,this.state.fontSize,this.state.letterSpacing),rn.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,Xt(Xt({},i),{},{className:c})):Pe(r)?l=r(Xt(Xt({},i),{},{className:c})):l=W.createElement(ns,fl({},i,{className:"recharts-cartesian-axis-tick-value"}),o),l}}])})($.Component);xj(xc,"displayName","CartesianAxis");xj(xc,"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 pfe=["x1","y1","x2","y2","key"],mfe=["offset"];function as(e){"@babel/helpers - typeof";return as=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},as(e)}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 yn(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){yfe(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 yfe(e,t,n){return t=gfe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gfe(e){var t=vfe(e,"string");return as(t)=="symbol"?t:t+""}function vfe(e,t){if(as(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(as(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qo(){return qo=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},qo.apply(this,arguments)}function _R(e,t){if(e==null)return{};var n=xfe(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 xfe(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 bfe=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 JI(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=_R(t,pfe),d=ke(f,!1);d.offset;var y=_R(d,mfe);n=W.createElement("line",qo({},y,{x1:r,y1:i,x2:o,y2:l,fill:"none",key:c}))}return n}function wfe(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=yn(yn({},e),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(f),index:f});return JI(i,d)});return W.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function Sfe(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=yn(yn({},e),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(f),index:f});return JI(i,d)});return W.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function _fe(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,v){return g-v});i!==y[0]&&y.unshift(0);var p=y.map(function(g,v){var w=!y[v+1],S=w?i+l-g:y[v+1]-g;if(S<=0)return null;var b=v%t.length;return W.createElement("rect",{key:"react-".concat(v),y:g,x:r,height:S,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function jfe(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,v){return g-v});o!==y[0]&&y.unshift(0);var p=y.map(function(g,v){var w=!y[v+1],S=w?o+c-g:y[v+1]-g;if(S<=0)return null;var b=v%r.length;return W.createElement("rect",{key:"react-".concat(v),x:g,y:l,width:S,height:f,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return W.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var Afe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,l=t.offset;return eI(vj(yn(yn(yn({},xc.defaultProps),r),{},{ticks:Li(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.left,l.left+l.width,n)},Nfe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,l=t.offset;return eI(vj(yn(yn(yn({},xc.defaultProps),r),{},{ticks:Li(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),l.top,l.top+l.height,n)},nl={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function eL(e){var t,n,r,i,o,l,c=pj(),f=mj(),d=hue(),y=yn(yn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:nl.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:nl.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:nl.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:nl.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:nl.vertical,verticalFill:(l=e.verticalFill)!==null&&l!==void 0?l:nl.verticalFill,x:xe(e.x)?e.x:d.left,y:xe(e.y)?e.y:d.top,width:xe(e.width)?e.width:d.width,height:xe(e.height)?e.height:d.height}),p=y.x,g=y.y,v=y.width,w=y.height,S=y.syncWithTicks,b=y.horizontalValues,j=y.verticalValues,T=uue(),N=fue();if(!xe(v)||v<=0||!xe(w)||w<=0||!xe(p)||p!==+p||!xe(g)||g!==+g)return null;var E=y.verticalCoordinatesGenerator||Afe,O=y.horizontalCoordinatesGenerator||Nfe,A=y.horizontalPoints,C=y.verticalPoints;if((!A||!A.length)&&Pe(O)){var R=b&&b.length,D=O({yAxis:N?yn(yn({},N),{},{ticks:R?b:N.ticks}):void 0,width:c,height:f,offset:d},R?!0:S);Rr(Array.isArray(D),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(as(D),"]")),Array.isArray(D)&&(A=D)}if((!C||!C.length)&&Pe(E)){var G=j&&j.length,I=E({xAxis:T?yn(yn({},T),{},{ticks:G?j:T.ticks}):void 0,width:c,height:f,offset:d},G?!0:S);Rr(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(as(I),"]")),Array.isArray(I)&&(C=I)}return W.createElement("g",{className:"recharts-cartesian-grid"},W.createElement(bfe,{fill:y.fill,fillOpacity:y.fillOpacity,x:y.x,y:y.y,width:y.width,height:y.height,ry:y.ry}),W.createElement(wfe,qo({},y,{offset:d,horizontalPoints:A,xAxis:T,yAxis:N})),W.createElement(Sfe,qo({},y,{offset:d,verticalPoints:C,xAxis:T,yAxis:N})),W.createElement(_fe,qo({},y,{horizontalPoints:A})),W.createElement(jfe,qo({},y,{verticalPoints:C})))}eL.displayName="CartesianGrid";function oc(e){"@babel/helpers - typeof";return oc=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},oc(e)}function Ofe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Efe(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,rL(r.key),r)}}function Tfe(e,t,n){return t&&Efe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cfe(e,t,n){return t=Em(t),Mfe(e,tL()?Reflect.construct(t,n||[],Em(e).constructor):t.apply(e,n))}function Mfe(e,t){if(t&&(oc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kfe(e)}function kfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tL=function(){return!!e})()}function Em(e){return Em=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Em(e)}function Rfe(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&&x_(e,t)}function x_(e,t){return x_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},x_(e,t)}function nL(e,t,n){return t=rL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rL(e){var t=Pfe(e,"string");return oc(t)=="symbol"?t:t+""}function Pfe(e,t){if(oc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(oc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function b_(){return b_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},b_.apply(this,arguments)}function Dfe(e){var t=e.xAxisId,n=pj(),r=mj(),i=HI(t);return i==null?null:$.createElement(xc,b_({},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 Li(l,!0)}}))}var qy=(function(e){function t(){return Ofe(this,t),Cfe(this,t,arguments)}return Rfe(t,e),Tfe(t,[{key:"render",value:function(){return $.createElement(Dfe,this.props)}}])})($.Component);nL(qy,"displayName","XAxis");nL(qy,"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 sc(e){"@babel/helpers - typeof";return sc=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},sc(e)}function $fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ife(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,oL(r.key),r)}}function Lfe(e,t,n){return t&&Ife(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function qfe(e,t,n){return t=Tm(t),Bfe(e,iL()?Reflect.construct(t,n||[],Tm(e).constructor):t.apply(e,n))}function Bfe(e,t){if(t&&(sc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zfe(e)}function zfe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(iL=function(){return!!e})()}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tm(e)}function Hfe(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&&w_(e,t)}function w_(e,t){return w_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},w_(e,t)}function aL(e,t,n){return t=oL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oL(e){var t=Ufe(e,"string");return sc(t)=="symbol"?t:t+""}function Ufe(e,t){if(sc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function S_(){return S_=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},S_.apply(this,arguments)}var Gfe=function(t){var n=t.yAxisId,r=pj(),i=mj(),o=UI(n);return o==null?null:$.createElement(xc,S_({},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 Li(c,!0)}}))},By=(function(e){function t(){return $fe(this,t),qfe(this,t,arguments)}return Hfe(t,e),Lfe(t,[{key:"render",value:function(){return $.createElement(Gfe,this.props)}}])})($.Component);aL(By,"displayName","YAxis");aL(By,"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 jR(e){return Xfe(e)||Yfe(e)||Ffe(e)||Vfe()}function Vfe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
559
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ffe(e,t){if(e){if(typeof e=="string")return __(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 __(e,t)}}function Yfe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xfe(e){if(Array.isArray(e))return __(e)}function __(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 j_=function(t,n,r,i,o){var l=hr(t,gj),c=hr(t,$y),f=[].concat(jR(l),jR(c)),d=hr(t,Ly),y="".concat(i,"Id"),p=i[0],g=n;if(f.length&&(g=f.reduce(function(S,b){if(b.props[y]===r&&Zr(b.props,"extendDomain")&&xe(b.props[p])){var j=b.props[p];return[Math.min(S[0],j),Math.max(S[1],j)]}return S},g)),d.length){var v="".concat(p,"1"),w="".concat(p,"2");g=d.reduce(function(S,b){if(b.props[y]===r&&Zr(b.props,"extendDomain")&&xe(b.props[v])&&xe(b.props[w])){var j=b.props[v],T=b.props[w];return[Math.min(S[0],j,T),Math.max(S[1],j,T)]}return S},g)}return o&&o.length&&(g=o.reduce(function(S,b){return xe(b)?[Math.min(S[0],b),Math.max(S[1],b)]:S},g)),g},Tw={exports:{}},AR;function Kfe(){return AR||(AR=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 v=new i(y,p||f,g),w=n?n+d:d;return f._events[w]?f._events[w].fn?f._events[w]=[f._events[w],v]:f._events[w].push(v):(f._events[w]=v,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,v=p.length,w=new Array(v);g<v;g++)w[g]=p[g].fn;return w},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,v,w){var S=n?n+d:d;if(!this._events[S])return!1;var b=this._events[S],j=arguments.length,T,N;if(b.fn){switch(b.once&&this.removeListener(d,b.fn,void 0,!0),j){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,y),!0;case 3:return b.fn.call(b.context,y,p),!0;case 4:return b.fn.call(b.context,y,p,g),!0;case 5:return b.fn.call(b.context,y,p,g,v),!0;case 6:return b.fn.call(b.context,y,p,g,v,w),!0}for(N=1,T=new Array(j-1);N<j;N++)T[N-1]=arguments[N];b.fn.apply(b.context,T)}else{var E=b.length,O;for(N=0;N<E;N++)switch(b[N].once&&this.removeListener(d,b[N].fn,void 0,!0),j){case 1:b[N].fn.call(b[N].context);break;case 2:b[N].fn.call(b[N].context,y);break;case 3:b[N].fn.call(b[N].context,y,p);break;case 4:b[N].fn.call(b[N].context,y,p,g);break;default:if(!T)for(O=1,T=new Array(j-1);O<j;O++)T[O-1]=arguments[O];b[N].fn.apply(b[N].context,T)}}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 v=n?n+d:d;if(!this._events[v])return this;if(!y)return l(this,v),this;var w=this._events[v];if(w.fn)w.fn===y&&(!g||w.once)&&(!p||w.context===p)&&l(this,v);else{for(var S=0,b=[],j=w.length;S<j;S++)(w[S].fn!==y||g&&!w[S].once||p&&w[S].context!==p)&&b.push(w[S]);b.length?this._events[v]=b.length===1?b[0]:b:l(this,v)}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})(Tw)),Tw.exports}var Wfe=Kfe();const Qfe=at(Wfe);var Cw=new Qfe,Mw="recharts.syncMouseEvents";function Hf(e){"@babel/helpers - typeof";return Hf=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},Hf(e)}function Zfe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jfe(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,sL(r.key),r)}}function ede(e,t,n){return t&&Jfe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function kw(e,t,n){return t=sL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sL(e){var t=tde(e,"string");return Hf(t)=="symbol"?t:t+""}function tde(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var nde=(function(){function e(){Zfe(this,e),kw(this,"activeIndex",0),kw(this,"coordinateList",[]),kw(this,"layout","horizontal")}return ede(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,v=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=v??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),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 rde(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&&xe(r)&&xe(i))return!0}return!1}function ide(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 lL(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,o=e.endAngle,l=vt(t,n,r,i),c=vt(t,n,r,o);return{points:[l,c],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function ade(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=vt(c,f,d,p),v=vt(c,f,y,p);r=g.x,i=g.y,o=v.x,l=v.y}else return lL(t);return[{x:r,y:i},{x:o,y:l}]}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 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 ip(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){ode(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 ode(e,t,n){return t=sde(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sde(e){var t=lde(e,"string");return Uf(t)=="symbol"?t:t+""}function lde(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)}function cde(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,v=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!v||!o||!l||g!=="ScatterChart"&&i!=="axis")return null;var w,S=YS;if(g==="ScatterChart")w=l,S=Gse;else if(g==="BarChart")w=ide(p,l,f,y),S=cj;else if(p==="radial"){var b=lL(l),j=b.cx,T=b.cy,N=b.radius,E=b.startAngle,O=b.endAngle;w={cx:j,cy:T,startAngle:E,endAngle:O,innerRadius:N,outerRadius:N},S=fI}else w={points:ade(p,l,f)},S=YS;var A=ip(ip(ip(ip({stroke:"#ccc",pointerEvents:"none"},f),w),ke(v,!1)),{},{payload:c,payloadIndex:d,className:Be("recharts-tooltip-cursor",v.className)});return $.isValidElement(v)?$.cloneElement(v,A):$.createElement(S,A)}var ude=["item"],fde=["children","className","width","height","style","compact","title","desc"];function lc(e){"@babel/helpers - typeof";return lc=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},lc(e)}function dl(){return dl=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},dl.apply(this,arguments)}function OR(e,t){return pde(e)||hde(e,t)||uL(e,t)||dde()}function dde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
560
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hde(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 pde(e){if(Array.isArray(e))return e}function ER(e,t){if(e==null)return{};var n=mde(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 mde(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 yde(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gde(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,fL(r.key),r)}}function vde(e,t,n){return t&&gde(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function xde(e,t,n){return t=Cm(t),bde(e,cL()?Reflect.construct(t,n||[],Cm(e).constructor):t.apply(e,n))}function bde(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wde(e)}function wde(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(cL=function(){return!!e})()}function Cm(e){return Cm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cm(e)}function Sde(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&&A_(e,t)}function A_(e,t){return A_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},A_(e,t)}function cc(e){return Ade(e)||jde(e)||uL(e)||_de()}function _de(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
561
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uL(e,t){if(e){if(typeof e=="string")return N_(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 N_(e,t)}}function jde(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ade(e){if(Array.isArray(e))return N_(e)}function N_(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 TR(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 de(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TR(Object(n),!0).forEach(function(r){Me(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TR(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Me(e,t,n){return t=fL(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fL(e){var t=Nde(e,"string");return lc(t)=="symbol"?t:t+""}function Nde(e,t){if(lc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ode={xAxis:["bottom","top"],yAxis:["left","right"]},Ede={width:"100%",height:"100%"},dL={x:0,y:0};function ap(e){return e}var Tde=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Cde=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 de(de(de({},i),vt(i.cx,i.cy,c,l)),{},{angle:l,radius:c})}var f=o.coordinate,d=i.angle;return de(de(de({},i),vt(i.cx,i.cy,f,d)),{},{angle:d,radius:f})}return dL},zy=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(cc(c),cc(d)):c},[]);return l.length>0?l:t&&t.length&&xe(i)&&xe(o)?t.slice(i,o+1):[]};function hL(e){return e==="number"?[0,"auto"]:void 0}var O_=function(t,n,r,i){var o=t.graphicalItems,l=t.tooltipAxis,c=zy(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 v=p===void 0?c:p;g=uS(v,l.dataKey,i)}else g=p&&p[r]||c[r];return g?[].concat(cc(f),[aI(d,g)]):f},[])},CR=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},l=Tde(o,r),c=t.orderedTooltipTicks,f=t.tooltipAxis,d=t.tooltipTicks,y=fie(l,c,d,f);if(y>=0&&d){var p=d[y]&&d[y].value,g=O_(t,n,y,p),v=Cde(r,c,y,o);return{activeTooltipIndex:y,activeLabel:p,activePayload:g,activeCoordinate:v}}return null},Mde=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,v=J6(y,o);return r.reduce(function(w,S){var b,j=S.type.defaultProps!==void 0?de(de({},S.type.defaultProps),S.props):S.props,T=j.type,N=j.dataKey,E=j.allowDataOverflow,O=j.allowDuplicatedCategory,A=j.scale,C=j.ticks,R=j.includeHidden,D=j[l];if(w[D])return w;var G=zy(t.data,{graphicalItems:i.filter(function(V){var J,ae=l in V.props?V.props[l]:(J=V.type.defaultProps)===null||J===void 0?void 0:J[l];return ae===D}),dataStartIndex:f,dataEndIndex:d}),I=G.length,L,Y,P;rde(j.domain,E,T)&&(L=HS(j.domain,null,E),v&&(T==="number"||A!=="auto")&&(P=Vu(G,N,"category")));var U=hL(T);if(!L||L.length===0){var k,z=(k=j.domain)!==null&&k!==void 0?k:U;if(N){if(L=Vu(G,N,T),T==="category"&&v){var H=TW(L);O&&H?(Y=L,L=vm(0,I)):O||(L=Dk(z,L,S).reduce(function(V,J){return V.indexOf(J)>=0?V:[].concat(cc(V),[J])},[]))}else if(T==="category")O?L=L.filter(function(V){return V!==""&&!He(V)}):L=Dk(z,L,S).reduce(function(V,J){return V.indexOf(J)>=0||J===""||He(J)?V:[].concat(cc(V),[J])},[]);else if(T==="number"){var F=yie(G,i.filter(function(V){var J,ae,he=l in V.props?V.props[l]:(J=V.type.defaultProps)===null||J===void 0?void 0:J[l],ge="hide"in V.props?V.props.hide:(ae=V.type.defaultProps)===null||ae===void 0?void 0:ae.hide;return he===D&&(R||!ge)}),N,o,y);F&&(L=F)}v&&(T==="number"||A!=="auto")&&(P=Vu(G,N,"category"))}else v?L=vm(0,I):c&&c[D]&&c[D].hasStack&&T==="number"?L=g==="expand"?[0,1]:iI(c[D].stackGroups,f,d):L=Z6(G,i.filter(function(V){var J=l in V.props?V.props[l]:V.type.defaultProps[l],ae="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return J===D&&(R||!ae)}),T,y,!0);if(T==="number")L=j_(p,L,D,o,C),z&&(L=HS(z,L,E));else if(T==="category"&&z){var K=z,q=L.every(function(V){return K.indexOf(V)>=0});q&&(L=K)}}return de(de({},w),{},Me({},D,de(de({},j),{},{axisType:o,domain:L,categoricalDomain:P,duplicateDomain:Y,originalDomain:(b=j.domain)!==null&&b!==void 0?b:U,isCategorical:v,layout:y})))},{})},kde=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=zy(t.data,{graphicalItems:r,dataStartIndex:f,dataEndIndex:d}),v=g.length,w=J6(y,o),S=-1;return r.reduce(function(b,j){var T=j.type.defaultProps!==void 0?de(de({},j.type.defaultProps),j.props):j.props,N=T[l],E=hL("number");if(!b[N]){S++;var O;return w?O=vm(0,v):c&&c[N]&&c[N].hasStack?(O=iI(c[N].stackGroups,f,d),O=j_(p,O,N,o)):(O=HS(E,Z6(g,r.filter(function(A){var C,R,D=l in A.props?A.props[l]:(C=A.type.defaultProps)===null||C===void 0?void 0:C[l],G="hide"in A.props?A.props.hide:(R=A.type.defaultProps)===null||R===void 0?void 0:R.hide;return D===N&&!G}),"number",y),i.defaultProps.allowDataOverflow),O=j_(p,O,N,o)),de(de({},b),{},Me({},N,de(de({axisType:o},i.defaultProps),{},{hide:!0,orientation:Kn(Ode,"".concat(o,".").concat(S%2),null),domain:O,originalDomain:E,isCategorical:w,layout:y})))}return b},{})},Rde=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=hr(y,o),v={};return g&&g.length?v=Mde(t,{axes:g,graphicalItems:l,axisType:i,axisIdKey:p,stackGroups:c,dataStartIndex:f,dataEndIndex:d}):l&&l.length&&(v=kde(t,{Axis:o,graphicalItems:l,axisType:i,axisIdKey:p,stackGroups:c,dataStartIndex:f,dataEndIndex:d})),v},Pde=function(t){var n=qa(t),r=Li(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:q2(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:am(n,r)}},MR=function(t){var n=t.children,r=t.defaultShowTooltip,i=Gn(n,ec),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}},Dde=function(t){return!t||!t.length?!1:t.some(function(n){var r=Bi(n&&n.type);return r&&r.indexOf("Bar")>=0})},kR=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},$de=function(t,n){var r=t.props,i=t.graphicalItems,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||{},v=Gn(p,ec),w=Gn(p,vl),S=Object.keys(f).reduce(function(O,A){var C=f[A],R=C.orientation;return!C.mirror&&!C.hide?de(de({},O),{},Me({},R,O[R]+C.width)):O},{left:g.left||0,right:g.right||0}),b=Object.keys(l).reduce(function(O,A){var C=l[A],R=C.orientation;return!C.mirror&&!C.hide?de(de({},O),{},Me({},R,Kn(O,"".concat(R))+C.height)):O},{top:g.top||0,bottom:g.bottom||0}),j=de(de({},b),S),T=j.bottom;v&&(j.bottom+=v.props.height||ec.defaultProps.height),w&&n&&(j=pie(j,i,r,n));var N=d-j.left-j.right,E=y-j.top-j.bottom;return de(de({brushBottom:T},j),{},{width:Math.max(N,0),height:Math.max(E,0)})},Ide=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},pL=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(j,T){var N=T.graphicalItems,E=T.stackGroups,O=T.offset,A=T.updateId,C=T.dataStartIndex,R=T.dataEndIndex,D=j.barSize,G=j.layout,I=j.barGap,L=j.barCategoryGap,Y=j.maxBarSize,P=kR(G),U=P.numericAxisName,k=P.cateAxisName,z=Dde(N),H=[];return N.forEach(function(F,K){var q=zy(j.data,{graphicalItems:[F],dataStartIndex:C,dataEndIndex:R}),V=F.type.defaultProps!==void 0?de(de({},F.type.defaultProps),F.props):F.props,J=V.dataKey,ae=V.maxBarSize,he=V["".concat(U,"Id")],ge=V["".concat(k,"Id")],ee={},ne=f.reduce(function(Pt,De){var ze=T["".concat(De.axisType,"Map")],nt=V["".concat(De.axisType,"Id")];ze&&ze[nt]||De.axisType==="zAxis"||is();var gr=ze[nt];return de(de({},Pt),{},Me(Me({},De.axisType,gr),"".concat(De.axisType,"Ticks"),Li(gr)))},ee),Q=ne[k],ye=ne["".concat(k,"Ticks")],ce=E&&E[he]&&E[he].hasStack&&Aie(F,E[he].stackGroups),re=Bi(F.type).indexOf("Bar")>=0,be=am(Q,ye),Se=[],Te=z&&die({barSize:D,stackGroups:E,totalSize:Ide(ne,k)});if(re){var Ae,Ue,xt=He(ae)?Y:ae,jt=(Ae=(Ue=am(Q,ye,!0))!==null&&Ue!==void 0?Ue:xt)!==null&&Ae!==void 0?Ae:0;Se=hie({barGap:I,barCategoryGap:L,bandSize:jt!==be?jt:be,sizeList:Te[ge],maxBarSize:xt}),jt!==be&&(Se=Se.map(function(Pt){return de(de({},Pt),{},{position:de(de({},Pt.position),{},{offset:Pt.position.offset-jt/2})})}))}var Zt=F&&F.type&&F.type.getComposedData;Zt&&H.push({props:de(de({},Zt(de(de({},ne),{},{displayedData:q,props:j,dataKey:J,item:F,bandSize:be,barPosition:Se,offset:O,stackedData:ce,layout:G,dataStartIndex:C,dataEndIndex:R}))),{},Me(Me(Me({key:F.key||"item-".concat(K)},U,ne[U]),k,ne[k]),"animationId",A)),childIndex:zW(F,j.children),item:F})}),H},v=function(j,T){var N=j.props,E=j.dataStartIndex,O=j.dataEndIndex,A=j.updateId;if(!i5({props:N}))return null;var C=N.children,R=N.layout,D=N.stackOffset,G=N.data,I=N.reverseStackOrder,L=kR(R),Y=L.numericAxisName,P=L.cateAxisName,U=hr(C,r),k=_ie(G,U,"".concat(Y,"Id"),"".concat(P,"Id"),D,I),z=f.reduce(function(V,J){var ae="".concat(J.axisType,"Map");return de(de({},V),{},Me({},ae,Rde(N,de(de({},J),{},{graphicalItems:U,stackGroups:J.axisType===Y&&k,dataStartIndex:E,dataEndIndex:O}))))},{}),H=$de(de(de({},z),{},{props:N,graphicalItems:U}),T==null?void 0:T.legendBBox);Object.keys(z).forEach(function(V){z[V]=y(N,z[V],H,V.replace("Map",""),n)});var F=z["".concat(P,"Map")],K=Pde(F),q=g(N,de(de({},z),{},{dataStartIndex:E,dataEndIndex:O,updateId:A,graphicalItems:U,stackGroups:k,offset:H}));return de(de({formattedGraphicalItems:q,graphicalItems:U,offset:H,stackGroups:k},K),z)},w=(function(b){function j(T){var N,E,O;return yde(this,j),O=xde(this,j,[T]),Me(O,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Me(O,"accessibilityManager",new nde),Me(O,"handleLegendBBoxUpdate",function(A){if(A){var C=O.state,R=C.dataStartIndex,D=C.dataEndIndex,G=C.updateId;O.setState(de({legendBBox:A},v({props:O.props,dataStartIndex:R,dataEndIndex:D,updateId:G},de(de({},O.state),{},{legendBBox:A}))))}}),Me(O,"handleReceiveSyncEvent",function(A,C,R){if(O.props.syncId===A){if(R===O.eventEmitterSymbol&&typeof O.props.syncMethod!="function")return;O.applySyncEvent(C)}}),Me(O,"handleBrushChange",function(A){var C=A.startIndex,R=A.endIndex;if(C!==O.state.dataStartIndex||R!==O.state.dataEndIndex){var D=O.state.updateId;O.setState(function(){return de({dataStartIndex:C,dataEndIndex:R},v({props:O.props,dataStartIndex:C,dataEndIndex:R,updateId:D},O.state))}),O.triggerSyncEvent({dataStartIndex:C,dataEndIndex:R})}}),Me(O,"handleMouseEnter",function(A){var C=O.getMouseInfo(A);if(C){var R=de(de({},C),{},{isTooltipActive:!0});O.setState(R),O.triggerSyncEvent(R);var D=O.props.onMouseEnter;Pe(D)&&D(R,A)}}),Me(O,"triggeredAfterMouseMove",function(A){var C=O.getMouseInfo(A),R=C?de(de({},C),{},{isTooltipActive:!0}):{isTooltipActive:!1};O.setState(R),O.triggerSyncEvent(R);var D=O.props.onMouseMove;Pe(D)&&D(R,A)}),Me(O,"handleItemMouseEnter",function(A){O.setState(function(){return{isTooltipActive:!0,activeItem:A,activePayload:A.tooltipPayload,activeCoordinate:A.tooltipPosition||{x:A.cx,y:A.cy}}})}),Me(O,"handleItemMouseLeave",function(){O.setState(function(){return{isTooltipActive:!1}})}),Me(O,"handleMouseMove",function(A){A.persist(),O.throttleTriggeredAfterMouseMove(A)}),Me(O,"handleMouseLeave",function(A){O.throttleTriggeredAfterMouseMove.cancel();var C={isTooltipActive:!1};O.setState(C),O.triggerSyncEvent(C);var R=O.props.onMouseLeave;Pe(R)&&R(C,A)}),Me(O,"handleOuterEvent",function(A){var C=BW(A),R=Kn(O.props,"".concat(C));if(C&&Pe(R)){var D,G;/.*touch.*/i.test(C)?G=O.getMouseInfo(A.changedTouches[0]):G=O.getMouseInfo(A),R((D=G)!==null&&D!==void 0?D:{},A)}}),Me(O,"handleClick",function(A){var C=O.getMouseInfo(A);if(C){var R=de(de({},C),{},{isTooltipActive:!0});O.setState(R),O.triggerSyncEvent(R);var D=O.props.onClick;Pe(D)&&D(R,A)}}),Me(O,"handleMouseDown",function(A){var C=O.props.onMouseDown;if(Pe(C)){var R=O.getMouseInfo(A);C(R,A)}}),Me(O,"handleMouseUp",function(A){var C=O.props.onMouseUp;if(Pe(C)){var R=O.getMouseInfo(A);C(R,A)}}),Me(O,"handleTouchMove",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&O.throttleTriggeredAfterMouseMove(A.changedTouches[0])}),Me(O,"handleTouchStart",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&O.handleMouseDown(A.changedTouches[0])}),Me(O,"handleTouchEnd",function(A){A.changedTouches!=null&&A.changedTouches.length>0&&O.handleMouseUp(A.changedTouches[0])}),Me(O,"handleDoubleClick",function(A){var C=O.props.onDoubleClick;if(Pe(C)){var R=O.getMouseInfo(A);C(R,A)}}),Me(O,"handleContextMenu",function(A){var C=O.props.onContextMenu;if(Pe(C)){var R=O.getMouseInfo(A);C(R,A)}}),Me(O,"triggerSyncEvent",function(A){O.props.syncId!==void 0&&Cw.emit(Mw,O.props.syncId,A,O.eventEmitterSymbol)}),Me(O,"applySyncEvent",function(A){var C=O.props,R=C.layout,D=C.syncMethod,G=O.state.updateId,I=A.dataStartIndex,L=A.dataEndIndex;if(A.dataStartIndex!==void 0||A.dataEndIndex!==void 0)O.setState(de({dataStartIndex:I,dataEndIndex:L},v({props:O.props,dataStartIndex:I,dataEndIndex:L,updateId:G},O.state)));else if(A.activeTooltipIndex!==void 0){var Y=A.chartX,P=A.chartY,U=A.activeTooltipIndex,k=O.state,z=k.offset,H=k.tooltipTicks;if(!z)return;if(typeof D=="function")U=D(H,A);else if(D==="value"){U=-1;for(var F=0;F<H.length;F++)if(H[F].value===A.activeLabel){U=F;break}}var K=de(de({},z),{},{x:z.left,y:z.top}),q=Math.min(Y,K.x+K.width),V=Math.min(P,K.y+K.height),J=H[U]&&H[U].value,ae=O_(O.state,O.props.data,U),he=H[U]?{x:R==="horizontal"?H[U].coordinate:q,y:R==="horizontal"?V:H[U].coordinate}:dL;O.setState(de(de({},A),{},{activeLabel:J,activeCoordinate:he,activePayload:ae,activeTooltipIndex:U}))}else O.setState(A)}),Me(O,"renderCursor",function(A){var C,R=O.state,D=R.isTooltipActive,G=R.activeCoordinate,I=R.activePayload,L=R.offset,Y=R.activeTooltipIndex,P=R.tooltipAxisBandSize,U=O.getTooltipEventType(),k=(C=A.props.active)!==null&&C!==void 0?C:D,z=O.props.layout,H=A.key||"_recharts-cursor";return W.createElement(cde,{key:H,activeCoordinate:G,activePayload:I,activeTooltipIndex:Y,chartName:n,element:A,isActive:k,layout:z,offset:L,tooltipAxisBandSize:P,tooltipEventType:U})}),Me(O,"renderPolarAxis",function(A,C,R){var D=Kn(A,"type.axisType"),G=Kn(O.state,"".concat(D,"Map")),I=A.type.defaultProps,L=I!==void 0?de(de({},I),A.props):A.props,Y=G&&G[L["".concat(D,"Id")]];return $.cloneElement(A,de(de({},Y),{},{className:Be(D,Y.className),key:A.key||"".concat(C,"-").concat(R),ticks:Li(Y,!0)}))}),Me(O,"renderPolarGrid",function(A){var C=A.props,R=C.radialLines,D=C.polarAngles,G=C.polarRadius,I=O.state,L=I.radiusAxisMap,Y=I.angleAxisMap,P=qa(L),U=qa(Y),k=U.cx,z=U.cy,H=U.innerRadius,F=U.outerRadius;return $.cloneElement(A,{polarAngles:Array.isArray(D)?D:Li(U,!0).map(function(K){return K.coordinate}),polarRadius:Array.isArray(G)?G:Li(P,!0).map(function(K){return K.coordinate}),cx:k,cy:z,innerRadius:H,outerRadius:F,key:A.key||"polar-grid",radialLines:R})}),Me(O,"renderLegend",function(){var A=O.state.formattedGraphicalItems,C=O.props,R=C.children,D=C.width,G=C.height,I=O.props.margin||{},L=D-(I.left||0)-(I.right||0),Y=W6({children:R,formattedGraphicalItems:A,legendWidth:L,legendContent:d});if(!Y)return null;var P=Y.item,U=ER(Y,ude);return $.cloneElement(P,de(de({},U),{},{chartWidth:D,chartHeight:G,margin:I,onBBoxUpdate:O.handleLegendBBoxUpdate}))}),Me(O,"renderTooltip",function(){var A,C=O.props,R=C.children,D=C.accessibilityLayer,G=Gn(R,Or);if(!G)return null;var I=O.state,L=I.isTooltipActive,Y=I.activeCoordinate,P=I.activePayload,U=I.activeLabel,k=I.offset,z=(A=G.props.active)!==null&&A!==void 0?A:L;return $.cloneElement(G,{viewBox:de(de({},k),{},{x:k.left,y:k.top}),active:z,label:U,payload:z?P:[],coordinate:Y,accessibilityLayer:D})}),Me(O,"renderBrush",function(A){var C=O.props,R=C.margin,D=C.data,G=O.state,I=G.offset,L=G.dataStartIndex,Y=G.dataEndIndex,P=G.updateId;return $.cloneElement(A,{key:A.key||"_recharts-brush",onChange:ep(O.handleBrushChange,A.props.onChange),data:D,x:xe(A.props.x)?A.props.x:I.left,y:xe(A.props.y)?A.props.y:I.top+I.height+I.brushBottom-(R.bottom||0),width:xe(A.props.width)?A.props.width:I.width,startIndex:L,endIndex:Y,updateId:"brush-".concat(P)})}),Me(O,"renderReferenceElement",function(A,C,R){if(!A)return null;var D=O,G=D.clipPathId,I=O.state,L=I.xAxisMap,Y=I.yAxisMap,P=I.offset,U=A.type.defaultProps||{},k=A.props,z=k.xAxisId,H=z===void 0?U.xAxisId:z,F=k.yAxisId,K=F===void 0?U.yAxisId:F;return $.cloneElement(A,{key:A.key||"".concat(C,"-").concat(R),xAxis:L[H],yAxis:Y[K],viewBox:{x:P.left,y:P.top,width:P.width,height:P.height},clipPathId:G})}),Me(O,"renderActivePoints",function(A){var C=A.item,R=A.activePoint,D=A.basePoint,G=A.childIndex,I=A.isRange,L=[],Y=C.props.key,P=C.item.type.defaultProps!==void 0?de(de({},C.item.type.defaultProps),C.item.props):C.item.props,U=P.activeDot,k=P.dataKey,z=de(de({index:G,dataKey:k,cx:R.x,cy:R.y,r:4,fill:lj(C.item),strokeWidth:2,stroke:"#fff",payload:R.payload,value:R.value},ke(U,!1)),Ip(U));return L.push(j.renderActiveDot(U,z,"".concat(Y,"-activePoint-").concat(G))),D?L.push(j.renderActiveDot(U,de(de({},z),{},{cx:D.x,cy:D.y}),"".concat(Y,"-basePoint-").concat(G))):I&&L.push(null),L}),Me(O,"renderGraphicChild",function(A,C,R){var D=O.filterFormatItem(A,C,R);if(!D)return null;var G=O.getTooltipEventType(),I=O.state,L=I.isTooltipActive,Y=I.tooltipAxis,P=I.activeTooltipIndex,U=I.activeLabel,k=O.props.children,z=Gn(k,Or),H=D.props,F=H.points,K=H.isRange,q=H.baseLine,V=D.item.type.defaultProps!==void 0?de(de({},D.item.type.defaultProps),D.item.props):D.item.props,J=V.activeDot,ae=V.hide,he=V.activeBar,ge=V.activeShape,ee=!!(!ae&&L&&z&&(J||he||ge)),ne={};G!=="axis"&&z&&z.props.trigger==="click"?ne={onClick:ep(O.handleItemMouseEnter,A.props.onClick)}:G!=="axis"&&(ne={onMouseLeave:ep(O.handleItemMouseLeave,A.props.onMouseLeave),onMouseEnter:ep(O.handleItemMouseEnter,A.props.onMouseEnter)});var Q=$.cloneElement(A,de(de({},D.props),ne));function ye(De){return typeof Y.dataKey=="function"?Y.dataKey(De.payload):null}if(ee)if(P>=0){var ce,re;if(Y.dataKey&&!Y.allowDuplicatedCategory){var be=typeof Y.dataKey=="function"?ye:"payload.".concat(Y.dataKey.toString());ce=uS(F,be,U),re=K&&q&&uS(q,be,U)}else ce=F==null?void 0:F[P],re=K&&q&&q[P];if(ge||he){var Se=A.props.activeIndex!==void 0?A.props.activeIndex:P;return[$.cloneElement(A,de(de(de({},D.props),ne),{},{activeIndex:Se})),null,null]}if(!He(ce))return[Q].concat(cc(O.renderActivePoints({item:D,activePoint:ce,basePoint:re,childIndex:P,isRange:K})))}else{var Te,Ae=(Te=O.getItemByXY(O.state.activeCoordinate))!==null&&Te!==void 0?Te:{graphicalItem:Q},Ue=Ae.graphicalItem,xt=Ue.item,jt=xt===void 0?A:xt,Zt=Ue.childIndex,Pt=de(de(de({},D.props),ne),{},{activeIndex:Zt});return[$.cloneElement(jt,Pt),null,null]}return K?[Q,null,null]:[Q,null]}),Me(O,"renderCustomized",function(A,C,R){return $.cloneElement(A,de(de({key:"recharts-customized-".concat(R)},O.props),O.state))}),Me(O,"renderMap",{CartesianGrid:{handler:ap,once:!0},ReferenceArea:{handler:O.renderReferenceElement},ReferenceLine:{handler:ap},ReferenceDot:{handler:O.renderReferenceElement},XAxis:{handler:ap},YAxis:{handler:ap},Brush:{handler:O.renderBrush,once:!0},Bar:{handler:O.renderGraphicChild},Line:{handler:O.renderGraphicChild},Area:{handler:O.renderGraphicChild},Radar:{handler:O.renderGraphicChild},RadialBar:{handler:O.renderGraphicChild},Scatter:{handler:O.renderGraphicChild},Pie:{handler:O.renderGraphicChild},Funnel:{handler:O.renderGraphicChild},Tooltip:{handler:O.renderCursor,once:!0},PolarGrid:{handler:O.renderPolarGrid,once:!0},PolarAngleAxis:{handler:O.renderPolarAxis},PolarRadiusAxis:{handler:O.renderPolarAxis},Customized:{handler:O.renderCustomized}}),O.clipPathId="".concat((N=T.id)!==null&&N!==void 0?N:id("recharts"),"-clip"),O.throttleTriggeredAfterMouseMove=J8(O.triggeredAfterMouseMove,(E=T.throttleDelay)!==null&&E!==void 0?E:1e3/60),O.state={},O}return Sde(j,b),vde(j,[{key:"componentDidMount",value:function(){var N,E;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(N=this.props.margin.left)!==null&&N!==void 0?N:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var N=this.props,E=N.children,O=N.data,A=N.height,C=N.layout,R=Gn(E,Or);if(R){var D=R.props.defaultIndex;if(!(typeof D!="number"||D<0||D>this.state.tooltipTicks.length-1)){var G=this.state.tooltipTicks[D]&&this.state.tooltipTicks[D].value,I=O_(this.state,O,D,G),L=this.state.tooltipTicks[D].coordinate,Y=(this.state.offset.top+A)/2,P=C==="horizontal",U=P?{x:L,y:Y}:{y:L,x:Y},k=this.state.formattedGraphicalItems.find(function(H){var F=H.item;return F.type.name==="Scatter"});k&&(U=de(de({},U),k.props.points[D].tooltipPosition),I=k.props.points[D].tooltipPayload);var z={activeTooltipIndex:D,isTooltipActive:!0,activeLabel:G,activePayload:I,activeCoordinate:U};this.setState(z),this.renderCursor(R),this.accessibilityManager.setIndex(D)}}}},{key:"getSnapshotBeforeUpdate",value:function(N,E){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==E.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==N.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==N.margin){var O,A;this.accessibilityManager.setDetails({offset:{left:(O=this.props.margin.left)!==null&&O!==void 0?O:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0}})}return null}},{key:"componentDidUpdate",value:function(N){dS([Gn(N.children,Or)],[Gn(this.props.children,Or)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var N=Gn(this.props.children,Or);if(N&&typeof N.props.shared=="boolean"){var E=N.props.shared?"axis":"item";return c.indexOf(E)>=0?E:o}return o}},{key:"getMouseInfo",value:function(N){if(!this.container)return null;var E=this.container,O=E.getBoundingClientRect(),A=Oee(O),C={chartX:Math.round(N.pageX-A.left),chartY:Math.round(N.pageY-A.top)},R=O.width/E.offsetWidth||1,D=this.inRange(C.chartX,C.chartY,R);if(!D)return null;var G=this.state,I=G.xAxisMap,L=G.yAxisMap,Y=this.getTooltipEventType(),P=CR(this.state,this.props.data,this.props.layout,D);if(Y!=="axis"&&I&&L){var U=qa(I).scale,k=qa(L).scale,z=U&&U.invert?U.invert(C.chartX):null,H=k&&k.invert?k.invert(C.chartY):null;return de(de({},C),{},{xValue:z,yValue:H},P)}return P?de(de({},C),P):null}},{key:"inRange",value:function(N,E){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,A=this.props.layout,C=N/O,R=E/O;if(A==="horizontal"||A==="vertical"){var D=this.state.offset,G=C>=D.left&&C<=D.left+D.width&&R>=D.top&&R<=D.top+D.height;return G?{x:C,y:R}:null}var I=this.state,L=I.angleAxisMap,Y=I.radiusAxisMap;if(L&&Y){var P=qa(L);return Lk({x:C,y:R},P)}return null}},{key:"parseEventsOfWrapper",value:function(){var N=this.props.children,E=this.getTooltipEventType(),O=Gn(N,Or),A={};O&&E==="axis"&&(O.props.trigger==="click"?A={onClick:this.handleClick}:A={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=Ip(this.props,this.handleOuterEvent);return de(de({},C),A)}},{key:"addListener",value:function(){Cw.on(Mw,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Cw.removeListener(Mw,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(N,E,O){for(var A=this.state.formattedGraphicalItems,C=0,R=A.length;C<R;C++){var D=A[C];if(D.item===N||D.props.key===N.key||E===Bi(D.item.type)&&O===D.childIndex)return D}return null}},{key:"renderClipPath",value:function(){var N=this.clipPathId,E=this.state.offset,O=E.left,A=E.top,C=E.height,R=E.width;return W.createElement("defs",null,W.createElement("clipPath",{id:N},W.createElement("rect",{x:O,y:A,height:C,width:R})))}},{key:"getXScales",value:function(){var N=this.state.xAxisMap;return N?Object.entries(N).reduce(function(E,O){var A=OR(O,2),C=A[0],R=A[1];return de(de({},E),{},Me({},C,R.scale))},{}):null}},{key:"getYScales",value:function(){var N=this.state.yAxisMap;return N?Object.entries(N).reduce(function(E,O){var A=OR(O,2),C=A[0],R=A[1];return de(de({},E),{},Me({},C,R.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(N){var E;return(E=this.state.xAxisMap)===null||E===void 0||(E=E[N])===null||E===void 0?void 0:E.scale}},{key:"getYScaleByAxisId",value:function(N){var E;return(E=this.state.yAxisMap)===null||E===void 0||(E=E[N])===null||E===void 0?void 0:E.scale}},{key:"getItemByXY",value:function(N){var E=this.state,O=E.formattedGraphicalItems,A=E.activeItem;if(O&&O.length)for(var C=0,R=O.length;C<R;C++){var D=O[C],G=D.props,I=D.item,L=I.type.defaultProps!==void 0?de(de({},I.type.defaultProps),I.props):I.props,Y=Bi(I.type);if(Y==="Bar"){var P=(G.data||[]).find(function(H){return jse(N,H)});if(P)return{graphicalItem:D,payload:P}}else if(Y==="RadialBar"){var U=(G.data||[]).find(function(H){return Lk(N,H)});if(U)return{graphicalItem:D,payload:U}}else if(ky(D,A)||Ry(D,A)||If(D,A)){var k=Yle({graphicalItem:D,activeTooltipItem:A,itemData:L.data}),z=L.activeIndex===void 0?k:L.activeIndex;return{graphicalItem:de(de({},D),{},{childIndex:z}),payload:If(D,A)?L.data[k]:D.props.data[k]}}}return null}},{key:"render",value:function(){var N=this;if(!i5(this))return null;var E=this.props,O=E.children,A=E.className,C=E.width,R=E.height,D=E.style,G=E.compact,I=E.title,L=E.desc,Y=ER(E,fde),P=ke(Y,!1);if(G)return W.createElement(fR,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement(pS,dl({},P,{width:C,height:R,title:I,desc:L}),this.renderClipPath(),o5(O,this.renderMap)));if(this.props.accessibilityLayer){var U,k;P.tabIndex=(U=this.props.tabIndex)!==null&&U!==void 0?U:0,P.role=(k=this.props.role)!==null&&k!==void 0?k:"application",P.onKeyDown=function(H){N.accessibilityManager.keyboardEvent(H)},P.onFocus=function(){N.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return W.createElement(fR,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},W.createElement("div",dl({className:Be("recharts-wrapper",A),style:de({position:"relative",cursor:"default",width:C,height:R},D)},z,{ref:function(F){N.container=F}}),W.createElement(pS,dl({},P,{width:C,height:R,title:I,desc:L,style:Ede}),this.renderClipPath(),o5(O,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})($.Component);Me(w,"displayName",n),Me(w,"defaultProps",de({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},p)),Me(w,"getDerivedStateFromProps",function(b,j){var T=b.dataKey,N=b.data,E=b.children,O=b.width,A=b.height,C=b.layout,R=b.stackOffset,D=b.margin,G=j.dataStartIndex,I=j.dataEndIndex;if(j.updateId===void 0){var L=MR(b);return de(de(de({},L),{},{updateId:0},v(de(de({props:b},L),{},{updateId:0}),j)),{},{prevDataKey:T,prevData:N,prevWidth:O,prevHeight:A,prevLayout:C,prevStackOffset:R,prevMargin:D,prevChildren:E})}if(T!==j.prevDataKey||N!==j.prevData||O!==j.prevWidth||A!==j.prevHeight||C!==j.prevLayout||R!==j.prevStackOffset||!gl(D,j.prevMargin)){var Y=MR(b),P={chartX:j.chartX,chartY:j.chartY,isTooltipActive:j.isTooltipActive},U=de(de({},CR(j,N,C)),{},{updateId:j.updateId+1}),k=de(de(de({},Y),P),U);return de(de(de({},k),v(de({props:b},k),j)),{},{prevDataKey:T,prevData:N,prevWidth:O,prevHeight:A,prevLayout:C,prevStackOffset:R,prevMargin:D,prevChildren:E})}if(!dS(E,j.prevChildren)){var z,H,F,K,q=Gn(E,ec),V=q&&(z=(H=q.props)===null||H===void 0?void 0:H.startIndex)!==null&&z!==void 0?z:G,J=q&&(F=(K=q.props)===null||K===void 0?void 0:K.endIndex)!==null&&F!==void 0?F:I,ae=V!==G||J!==I,he=!He(N),ge=he&&!ae?j.updateId:j.updateId+1;return de(de({updateId:ge},v(de(de({props:b},j),{},{updateId:ge,dataStartIndex:V,dataEndIndex:J}),j)),{},{prevChildren:E,dataStartIndex:V,dataEndIndex:J})}return null}),Me(w,"renderActiveDot",function(b,j,T){var N;return $.isValidElement(b)?N=$.cloneElement(b,j):Pe(b)?N=b(j):N=W.createElement(uj,j),W.createElement(lt,{className:"recharts-active-dot",key:T},N)});var S=$.forwardRef(function(j,T){return W.createElement(w,dl({},j,{ref:T}))});return S.displayName=w.displayName,S},Lde=pL({chartName:"BarChart",GraphicalChild:hs,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:qy},{axisType:"yAxis",AxisComp:By}],formatAxisMap:Wce}),qde=pL({chartName:"PieChart",GraphicalChild:Ji,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:My},{axisType:"radiusAxis",AxisComp:Ty}],formatAxisMap:Die,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});function Bde(){const{metrics:e,endpointStats:t}=ht();if(!e)return h.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-gray-500",children:[h.jsx(Ko,{className:"w-12 h-12 mb-4 opacity-50"}),h.jsx("p",{className:"text-lg",children:"No metrics available"}),h.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 h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[h.jsx(sp,{icon:Ko,label:"Total Requests",value:e.requestCount.toLocaleString(),color:"text-primary-400"}),h.jsx(sp,{icon:Wr,label:"Error Rate",value:`${n}%`,color:parseFloat(n)>5?"text-error-500":"text-success-500"}),h.jsx(sp,{icon:Zu,label:"Avg Response",value:Xn(e.avgResponseTime),color:"text-warning-500"}),h.jsx(sp,{icon:Z_,label:"P95 Latency",value:Xn(e.p95ResponseTime),color:"text-accent-400"})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[h.jsxs("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-6",children:[h.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Response Time Percentiles"}),h.jsx(E3,{width:"100%",height:250,children:h.jsxs(Lde,{data:[{name:"P50",value:e.p50ResponseTime},{name:"P95",value:e.p95ResponseTime},{name:"P99",value:e.p99ResponseTime}],children:[h.jsx(eL,{strokeDasharray:"3 3",stroke:"#374151"}),h.jsx(qy,{dataKey:"name",stroke:"#9ca3af"}),h.jsx(By,{stroke:"#9ca3af",tickFormatter:r=>`${r}ms`}),h.jsx(Or,{contentStyle:{backgroundColor:"#1f2937",border:"1px solid #374151",borderRadius:"8px"},labelStyle:{color:"#fff"},formatter:r=>[`${r.toFixed(2)}ms`,"Duration"]}),h.jsx(hs,{dataKey:"value",fill:"#3de678",radius:[4,4,0,0]})]})})]}),h.jsxs("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-6",children:[h.jsx("h3",{className:"text-lg font-semibold text-white mb-4",children:"Memory Usage"}),h.jsx("div",{className:"flex items-center justify-center h-[250px]",children:h.jsx(E3,{width:"100%",height:200,children:h.jsxs(qde,{children:[h.jsxs(Ji,{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:[h.jsx(yf,{fill:"#3de678"}),h.jsx(yf,{fill:"#374151"})]}),h.jsx(Or,{contentStyle:{backgroundColor:"#1f2937",border:"1px solid #374151",borderRadius:"8px"},formatter:r=>Pi(r)})]})})}),h.jsxs("div",{className:"flex justify-center gap-8 text-sm",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-3 h-3 rounded bg-primary-500"}),h.jsxs("span",{className:"text-gray-400",children:["Used: ",Pi(e.memoryUsage.heapUsed)]})]}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("div",{className:"w-3 h-3 rounded bg-gray-600"}),h.jsxs("span",{className:"text-gray-400",children:["Total: ",Pi(e.memoryUsage.heapTotal)]})]})]})]})]}),h.jsx(Ude,{endpointStats:t}),h.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[h.jsx("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(l7,{className:"w-5 h-5 text-gray-500"}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-gray-500",children:"RSS Memory"}),h.jsx("p",{className:"text-lg font-semibold text-white",children:Pi(e.memoryUsage.rss)})]})]})}),h.jsx("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(E7,{className:"w-5 h-5 text-gray-500"}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-gray-500",children:"Active Connections"}),h.jsx("p",{className:"text-lg font-semibold text-white",children:e.activeConnections})]})]})}),h.jsx("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-4",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(Zu,{className:"w-5 h-5 text-gray-500"}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-gray-500",children:"Uptime"}),h.jsx("p",{className:"text-lg font-semibold text-white",children:Xn(e.uptime)})]})]})})]})]})}const Ra={method:"Method",path:"Route",requestCount:"Reqs",errorRate:"Err %",p50Duration:"p50",p95Duration:"p95",p99Duration:"p99",maxDuration:"Max"};function RR(e){return e.requestCount===0?0:e.errorCount/e.requestCount*100}function op(e){return e>=500?"text-error-400":e>=200?"text-warning-500":"text-gray-300"}function zde(e){return e>=5?"text-error-400":e>=1?"text-warning-500":e>0?"text-yellow-500":"text-gray-500"}function Hde(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 Ude({endpointStats:e}){const[t,n]=$.useState("p95Duration"),[r,i]=$.useState("desc"),[o,l]=$.useState(""),c=$.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 RR(p);default:return p[t]}};return[...d].sort((p,g)=>{const v=y(p),w=y(g);return typeof v=="string"&&typeof w=="string"?r==="asc"?v.localeCompare(w):w.localeCompare(v):r==="asc"?Number(v)-Number(w):Number(w)-Number(v)})},[e,t,r,o]);function f(d){t===d?i(r==="asc"?"desc":"asc"):(n(d),i(d==="method"||d==="path"?"asc":"desc"))}return h.jsxs("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-6",children:[h.jsxs("div",{className:"flex items-center justify-between mb-4 gap-3 flex-wrap",children:[h.jsxs("div",{children:[h.jsx("h3",{className:"text-lg font-semibold text-white",children:"Per-route performance"}),h.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."})]}),h.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?h.jsx("p",{className:"text-gray-500 text-center py-8 text-sm",children:"No requests recorded yet — endpoint stats will populate as traffic flows."}):h.jsx("div",{className:"overflow-x-auto",children:h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"text-left text-xs uppercase tracking-wider text-gray-500 border-b border-gray-800",children:[h.jsx(Pa,{label:Ra.method,active:t==="method",dir:r,onClick:()=>f("method"),className:"w-20"}),h.jsx(Pa,{label:Ra.path,active:t==="path",dir:r,onClick:()=>f("path")}),h.jsx(Pa,{label:Ra.requestCount,active:t==="requestCount",dir:r,onClick:()=>f("requestCount"),align:"right"}),h.jsx(Pa,{label:Ra.errorRate,active:t==="errorRate",dir:r,onClick:()=>f("errorRate"),align:"right"}),h.jsx(Pa,{label:Ra.p50Duration,active:t==="p50Duration",dir:r,onClick:()=>f("p50Duration"),align:"right"}),h.jsx(Pa,{label:Ra.p95Duration,active:t==="p95Duration",dir:r,onClick:()=>f("p95Duration"),align:"right"}),h.jsx(Pa,{label:Ra.p99Duration,active:t==="p99Duration",dir:r,onClick:()=>f("p99Duration"),align:"right"}),h.jsx(Pa,{label:Ra.maxDuration,active:t==="maxDuration",dir:r,onClick:()=>f("maxDuration"),align:"right"})]})}),h.jsxs("tbody",{className:"divide-y divide-gray-800/60",children:[c.map(d=>{const y=RR(d);return h.jsxs("tr",{className:"hover:bg-gray-800/30",children:[h.jsx("td",{className:"py-2.5",children:h.jsx("span",{className:ve("inline-block w-14 text-[11px] font-mono px-2 py-0.5 rounded text-center font-semibold",Hde(d.method)),children:d.method})}),h.jsx("td",{className:"py-2.5 font-mono text-gray-300 truncate max-w-[300px]",children:d.path}),h.jsx("td",{className:"py-2.5 text-right text-gray-300 tabular-nums",children:d.requestCount.toLocaleString()}),h.jsxs("td",{className:ve("py-2.5 text-right tabular-nums",zde(y)),children:[y===0?"—":`${y.toFixed(1)}%`,d.errorCount>0&&h.jsxs("span",{className:"text-gray-500 ml-1 text-xs",children:["(",d.errorCount,")"]})]}),h.jsx("td",{className:ve("py-2.5 text-right tabular-nums",op(d.p50Duration)),children:Xn(d.p50Duration)}),h.jsx("td",{className:ve("py-2.5 text-right tabular-nums font-medium",op(d.p95Duration)),children:Xn(d.p95Duration)}),h.jsx("td",{className:ve("py-2.5 text-right tabular-nums",op(d.p99Duration)),children:Xn(d.p99Duration)}),h.jsx("td",{className:ve("py-2.5 text-right tabular-nums",op(d.maxDuration)),children:Xn(d.maxDuration)})]},`${d.method}:${d.path}`)}),c.length===0&&h.jsx("tr",{children:h.jsx("td",{colSpan:8,className:"py-8 text-center text-gray-500 text-sm",children:"No routes match the current filter."})})]})]})})]})}function Pa({label:e,active:t,dir:n,onClick:r,align:i="left",className:o}){return h.jsx("th",{className:ve("pb-2 font-medium",o),children:h.jsxs("button",{onClick:r,className:ve("flex items-center gap-1 hover:text-white transition-colors",i==="right"&&"ml-auto",t?"text-primary-300":"text-gray-500"),children:[h.jsx("span",{children:e}),t?n==="asc"?h.jsx(t7,{className:"w-3 h-3"}):h.jsx(GP,{className:"w-3 h-3"}):h.jsx(e7,{className:"w-3 h-3 opacity-50"})]})})}function sp({icon:e,label:t,value:n,color:r}){return h.jsx("div",{className:"bg-gray-900/50 rounded-lg border border-gray-800 p-6",children:h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(e,{className:ve("w-8 h-8",r)}),h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:t}),h.jsx("p",{className:ve("text-2xl font-bold",r),children:n})]})]})})}const Gde=8;function PR(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function DR(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 Vde(e,t){const n=[];E_(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 E_(e,t,n,r,i){if(Object.is(e,t))return;if(r>Gde){i.push({path:n,kind:"changed",before:e,after:t});return}const o=Array.isArray(e),l=Array.isArray(t),c=PR(e),f=PR(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,v=DR(n,y);p?g?E_(e[y],t[y],v,r+1,i):i.push({path:v,kind:"removed",before:e[y]}):i.push({path:v,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,v=DR(n,y);p?g?E_(e[y],t[y],v,r+1,i):i.push({path:v,kind:"removed",before:e[y]}):i.push({path:v,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}):Fde(e,t)||i.push({path:n,kind:"changed",before:e,after:t})}function Fde(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 Yde=new Set(["date","content-length","etag","last-modified","x-request-id","x-trace-id","x-response-time"]);function Xde(e={},t={}){const n=[],r=c=>{const f={};for(const[d,y]of Object.entries(c)){const p=d.toLowerCase();Yde.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 Kde({payload:e}){const t=$.useMemo(()=>Xde(e.original.headers,e.replay.headers),[e.original.headers,e.replay.headers]),n=$.useMemo(()=>Vde(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 h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[h.jsx($R,{label:"Original",statusCode:e.original.statusCode,statusMessage:e.original.statusMessage,duration:e.original.duration}),h.jsx($R,{label:"Replay",statusCode:e.replay.statusCode,statusMessage:e.replay.statusMessage,duration:e.replay.duration,deltaPct:i})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[h.jsx(lp,{kind:r?"success":"error",icon:r?Im:Dr,label:r?"Same status code":`Status ${e.original.statusCode} → ${e.replay.statusCode}`}),h.jsx(lp,{kind:t.length===0?"success":"warn",icon:qm,label:t.length===0?"Headers identical":`${t.length} header${t.length===1?"":"s"} changed`}),h.jsx(lp,{kind:n.identical?"success":"warn",icon:V_,label:n.identical?"Body identical":`Body: +${n.added} −${n.removed} ~${n.changed}`}),h.jsx(lp,{kind:Math.abs(i)<25?"neutral":i<0?"success":"warn",icon:Ko,label:e.original.duration===0?`${Xn(e.replay.duration)}`:`${i>=0?"+":""}${i.toFixed(0)}% duration`})]}),t.length>0&&h.jsx(IR,{title:"Response headers diff",defaultOpen:!0,children:h.jsx("div",{className:"rounded border border-gray-800 divide-y divide-gray-800/60 font-mono text-xs",children:t.map(o=>h.jsxs("div",{className:"px-3 py-1.5 flex items-start gap-2",children:[h.jsx(mL,{kind:o.kind}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:"text-gray-200",children:o.name}),o.kind==="added"&&h.jsx("div",{className:"text-success-400 truncate",children:o.after}),o.kind==="removed"&&h.jsx("div",{className:"text-error-400 line-through truncate",children:o.before}),o.kind==="changed"&&h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("div",{className:"text-error-400 line-through truncate",children:o.before}),h.jsx("div",{className:"text-success-400 truncate",children:o.after})]})]})]},o.name))})}),!n.identical&&n.changes.length>0&&h.jsx(IR,{title:"Response body diff",defaultOpen:!0,children:h.jsx(Wde,{changes:n.changes})}),n.identical&&!r&&h.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 $R({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 h.jsxs("div",{className:"bg-gray-800/50 rounded-lg p-3",children:[h.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1",children:e}),h.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[h.jsxs("span",{className:ve("text-lg font-semibold",o),children:[t,n&&h.jsx("span",{className:"text-xs text-gray-500 font-normal ml-2",children:n})]}),h.jsxs("span",{className:"text-sm text-gray-400 tabular-nums",children:[Xn(r),typeof i=="number"&&Math.abs(i)>=1&&h.jsxs("span",{className:ve("ml-1 text-[11px]",i<0?"text-success-500":"text-warning-500"),children:["(",i>=0?"+":"",i.toFixed(0),"%)"]})]})]})]})}function lp({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 h.jsxs("span",{className:ve("inline-flex items-center gap-1.5 px-2 py-1 rounded border",r[e]),children:[h.jsx(t,{className:"w-3 h-3"}),n]})}function IR({title:e,defaultOpen:t,children:n}){const[r,i]=$.useState(t??!1);return h.jsxs("div",{children:[h.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?h.jsx(Pr,{className:"w-3 h-3"}):h.jsx(ni,{className:"w-3 h-3"}),e]}),r&&n]})}function Wde({changes:e}){return h.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)=>h.jsxs("div",{className:"px-3 py-1.5 flex items-start gap-2",children:[h.jsx(mL,{kind:t.kind}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsx("div",{className:"text-gray-300 truncate",title:t.path,children:t.path||"<root>"}),t.kind==="added"&&h.jsx("div",{className:"text-success-400 break-all",children:cp(t.after)}),t.kind==="removed"&&h.jsx("div",{className:"text-error-400 line-through break-all",children:cp(t.before)}),t.kind==="changed"&&h.jsxs("div",{className:"space-y-0.5",children:[h.jsx("div",{className:"text-error-400 line-through break-all",children:cp(t.before)}),h.jsx("div",{className:"text-success-400 break-all",children:cp(t.after)})]})]})]},n))})}function mL({kind:e}){return e==="added"?h.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:h.jsx(F_,{className:"w-3 h-3"})}):e==="removed"?h.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:h.jsx(g7,{className:"w-3 h-3"})}):e==="changed"?h.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:h.jsx(S7,{className:"w-3 h-3"})}):null}function cp(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 Qde(){const{exchanges:e,searchQuery:t,filterMethod:n,replayResult:r,setReplayResult:i}=ht(),{replayRequest:o}=Yi(),[l,c]=$.useState(null),[f,d]=$.useState(new Map),y=$.useMemo(()=>e.filter(g=>{if(t){const v=t.toLowerCase();if(!g.request.path.toLowerCase().includes(v))return!1}return!(n&&g.request.method!==n)}),[e,t,n]);$.useEffect(()=>{var w;if(!r)return;const g=l??((w=r.original)==null?void 0:w.id);if(!g)return;const v=r.original??e.find(S=>S.id===g);d(S=>{const b=new Map(S),j=r.replay;return b.set(g,{success:r.success,diff:r.success&&j&&v?{original:{statusCode:v.response.statusCode,statusMessage:v.response.statusMessage,headers:v.response.headers,body:v.response.body,duration:v.response.duration},replay:{statusCode:j.statusCode,statusMessage:j.statusMessage,headers:j.headers,body:j.body,duration:j.duration??0}}:void 0,error:r.error}),b}),c(null),i(null)},[r,l,e,i]);const p=g=>{c(g.id),o(g.id)};return e.length===0?h.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-gray-500",children:[h.jsx(QP,{className:"w-12 h-12 mb-4 opacity-50"}),h.jsx("p",{className:"text-lg",children:"No requests to replay"}),h.jsx("p",{className:"text-sm mt-2",children:"Record some requests first, then replay them here"})]}):h.jsxs("div",{className:"space-y-6",children:[h.jsx("div",{className:"bg-primary-500/10 border border-primary-500/30 rounded-lg p-4",children:h.jsxs("div",{className:"flex items-start gap-3",children:[h.jsx(_p,{className:"w-5 h-5 text-primary-400 mt-0.5"}),h.jsxs("div",{children:[h.jsx("h3",{className:"text-sm font-semibold text-primary-300",children:"Request Replay"}),h.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."})]})]})}),h.jsx("div",{className:"space-y-3",children:y.map(g=>{const v=f.get(g.id),w=l===g.id;return h.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg p-4",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:ve("px-2 py-1 rounded text-xs font-mono font-semibold",H_(g.request.method),Cl(g.request.method)),children:g.request.method}),h.jsxs("div",{children:[h.jsx("p",{className:"font-mono text-sm text-gray-200",children:g.request.path}),h.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:[h.jsx(Zu,{className:"w-3 h-3 inline mr-1"}),z_(g.request.timestamp)]})]})]}),h.jsx("button",{onClick:()=>p(g),disabled:w,className:ve("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",w?"bg-gray-700 text-gray-400 cursor-not-allowed":"bg-primary-500 text-white hover:bg-primary-600"),children:w?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"w-4 h-4 border-2 border-gray-400 border-t-transparent rounded-full animate-spin"}),"Replaying..."]}):h.jsxs(h.Fragment,{children:[h.jsx(_p,{className:"w-4 h-4"}),"Replay"]})})]}),v&&h.jsx("div",{className:"mt-4 pt-4 border-t border-gray-800",children:v.success&&v.diff?h.jsx(Kde,{payload:v.diff}):h.jsx("div",{className:"bg-error-500/10 border border-error-500/30 rounded-lg p-3",children:h.jsxs("div",{className:"flex items-center gap-2 text-error-400 text-sm",children:[h.jsx(Dr,{className:"w-4 h-4"}),"Replay failed: ",v.error??"Unknown error"]})})})]},g.id)})})]})}const Zde=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],LR="http://localhost:3000",qR=()=>({id:Math.random().toString(36).slice(2,10),key:"",value:"",enabled:!0});function Jde(){const{routes:e,pendingApiClientRequest:t,setPendingApiClientRequest:n,runtime:r}=ht(),[i,o]=$.useState("GET"),[l,c]=$.useState(`${LR}/`),[f,d]=$.useState("headers"),y=(r==null?void 0:r.appUrl)??LR;$.useEffect(()=>{const ee=r!=null&&r.globalPrefix&&r.globalPrefix!=="/"?r.globalPrefix:"/";c(`${y}${ee}`)},[r==null?void 0:r.appUrl,r==null?void 0:r.globalPrefix]);const[p,g]=$.useState([]),[v,w]=$.useState([]),[S,b]=$.useState(""),[j,T]=$.useState("form"),[N,E]=$.useState(!1),[O,A]=$.useState(null),[C,R]=$.useState(null),[D,G]=$.useState(!1),[I,L]=$.useState(!1),Y=i!=="GET"&&i!=="HEAD";$.useEffect(()=>{if(!t)return;const{method:ee,path:ne,body:Q}=t;o(ee);try{const ye=new URL(l);ye.pathname=ne,ye.search="",c(ye.toString())}catch{c(`${y}${ne.startsWith("/")?ne:`/${ne}`}`)}Q&&(ee==="POST"||ee==="PUT"||ee==="PATCH")&&(b(JSON.stringify(Q,null,2)),d("body"),T("form")),n(null)},[t]);const P=$.useMemo(()=>{const ee=new Map;for(const Q of e){const ye=Q.controller&&Q.controller!=="Unknown"?Q.controller:"Other",ce=ee.get(ye)??[];ce.push({method:Q.method,path:Q.path,bodyDto:Q.bodyDto,bodySample:Q.bodySample,controllerMethod:Q.controllerMethod}),ee.set(ye,ce)}const ne=[];for(const[Q,ye]of ee)ye.sort((ce,re)=>ce.path===re.path?ce.method.localeCompare(re.method):ce.path.localeCompare(re.path)),ne.push({controller:Q,routes:ye});return ne.sort((Q,ye)=>Q.controller==="Other"?1:ye.controller==="Other"?-1:Q.controller.localeCompare(ye.controller)),ne},[e]),[U,k]=$.useState(new Set),z=ee=>{k(ne=>{const Q=new Set(ne);return Q.has(ee)?Q.delete(ee):Q.add(ee),Q})},[H,F]=$.useState(""),K=$.useMemo(()=>{const ee=H.trim().toLowerCase();return ee?P.map(ne=>({controller:ne.controller,routes:ne.routes.filter(Q=>Q.path.toLowerCase().includes(ee)||Q.method.toLowerCase().includes(ee)||(Q.controllerMethod??"").toLowerCase().includes(ee))})).filter(ne=>ne.routes.length>0):P},[P,H]),q=(ee,ne,Q)=>{o(ee);try{const ce=new URL(l);ce.pathname=ne,ce.search="",c(ce.toString())}catch{c(`${y}${ne.startsWith("/")?ne:`/${ne}`}`)}if(["POST","PUT","PATCH"].includes(ee)&&Q){const ce=JSON.stringify(Q,null,2);b(re=>re.trim()?re:ce),d("body")}},V=(ee,ne,Q,ye)=>{ne(ee.map(ce=>ce.id===Q?{...ce,...ye}:ce))},J=(ee,ne,Q)=>{ne(ee.filter(ye=>ye.id!==Q))},ae=()=>{const ee=v.filter(ne=>ne.enabled&&ne.key);if(ee.length===0)return l;try{const ne=new URL(l);for(const Q of ee)ne.searchParams.set(Q.key,Q.value);return ne.toString()}catch{return l}},he=async()=>{R(null),A(null),E(!0);const ee=ae(),ne={};p.filter(ce=>ce.enabled&&ce.key).forEach(ce=>{ne[ce.key]=ce.value});const Q={method:i,headers:ne};if(Y&&S.trim()&&(Q.body=S,!Object.keys(ne).some(re=>re.toLowerCase()==="content-type"))){const re=S.trim();(re.startsWith("{")||re.startsWith("["))&&(ne["Content-Type"]="application/json")}const ye=performance.now();try{const ce=await fetch(ee,Q),re=performance.now()-ye,be=await ce.text(),Se={};ce.headers.forEach((xt,jt)=>{Se[jt]=xt});const Ae=(ce.headers.get("content-type")||"").includes("application/json"),Ue=Ae?W9(be):be;A({status:ce.status,statusText:ce.statusText,duration:re,headers:Se,body:be,parsed:Ue,isJson:Ae})}catch(ce){const re=ce instanceof Error?ce.message:"Request failed",be=re.toLowerCase().includes("failed to fetch")||re.toLowerCase().includes("networkerror")?" — check that the app is running and that @expressots/studio-agent is installed (it injects CORS headers for the Studio UI).":"";R(`${re}${be}`)}finally{E(!1)}},ge=async()=>{if(!O)return;const ee=O.isJson&&typeof O.parsed!="string"?JSON.stringify(O.parsed,null,2):O.body;await Qu(ee)&&(L(!0),setTimeout(()=>L(!1),1500))};return h.jsxs("div",{className:"space-y-4",children:[P.length>0&&h.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg p-3 space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsxs("p",{className:"text-xs text-gray-500 uppercase tracking-wide",children:["Discovered routes",h.jsxs("span",{className:"ml-2 text-gray-600 normal-case font-normal",children:[P.reduce((ee,ne)=>ee+ne.routes.length,0)," endpoints across"," ",P.length," controller",P.length===1?"":"s"]})]}),h.jsx("input",{type:"text",value:H,onChange:ee=>F(ee.target.value),placeholder:"Filter by path, method, or handler…",className:"w-64 px-2 py-1 rounded bg-gray-950 border border-gray-800 text-xs text-gray-200 focus:outline-none focus:border-primary-500"})]}),K.length===0?h.jsxs("p",{className:"text-xs text-gray-500 italic",children:['No routes match "',H,'".']}):K.map(ee=>{const ne=U.has(ee.controller);return h.jsxs("div",{className:"border border-gray-800 rounded-md overflow-hidden bg-gray-950/40",children:[h.jsxs("button",{onClick:()=>z(ee.controller),className:"w-full flex items-center gap-2 px-3 py-2 text-left bg-gray-900/60 hover:bg-gray-900 transition-colors",children:[ne?h.jsx(ni,{className:"w-3.5 h-3.5 text-gray-500"}):h.jsx(Pr,{className:"w-3.5 h-3.5 text-gray-500"}),h.jsx("span",{className:"text-xs font-mono font-semibold text-primary-300",children:ee.controller}),h.jsxs("span",{className:"text-[11px] text-gray-500",children:[ee.routes.length," route",ee.routes.length===1?"":"s"]})]}),!ne&&h.jsx("div",{className:"px-3 py-2 flex flex-col gap-1",children:ee.routes.map((Q,ye)=>h.jsxs("button",{onClick:()=>q(Q.method,Q.path,Q.bodySample),title:Q.bodyDto?`Auto-fills body from ${Q.bodyDto}`:`${Q.method} ${Q.path}${Q.controllerMethod?` → ${Q.controllerMethod}()`:""}`,className:"flex items-center gap-2 px-2 py-1 rounded hover:bg-gray-800/60 border border-transparent hover:border-primary-500/40 transition-colors text-left",children:[h.jsx("span",{className:ve("text-[10px] font-mono font-semibold px-1.5 py-0.5 rounded w-14 text-center",H_(Q.method),Cl(Q.method)),children:Q.method}),h.jsx("span",{className:"text-xs font-mono text-gray-200 flex-1 truncate",children:Q.path}),Q.controllerMethod&&h.jsxs("span",{className:"text-[10px] font-mono text-gray-500 truncate",children:[Q.controllerMethod,"()"]}),Q.bodyDto&&h.jsx("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-primary-500/10 border border-primary-500/30 text-primary-300",title:`Auto-fills body from ${Q.bodyDto}`,children:Q.bodyDto})]},`${Q.method}-${Q.path}-${ye}`))})]},ee.controller)})]}),h.jsxs("div",{className:"flex items-stretch gap-2",children:[h.jsx("select",{value:i,onChange:ee=>o(ee.target.value),className:ve("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",Cl(i)),children:Zde.map(ee=>h.jsx("option",{value:ee,className:"bg-gray-900 text-gray-200",children:ee},ee))}),h.jsx("input",{type:"text",value:l,onChange:ee=>c(ee.target.value),onKeyDown:ee=>{ee.key==="Enter"&&!N&&he()},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"}),h.jsx("button",{onClick:he,disabled:N||!l.trim(),className:ve("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",N||!l.trim()?"bg-gray-700 text-gray-400 cursor-not-allowed":"bg-primary-500 text-white hover:bg-primary-600"),children:N?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"w-4 h-4 border-2 border-gray-400 border-t-transparent rounded-full animate-spin"}),"Sending..."]}):h.jsxs(h.Fragment,{children:[h.jsx(X_,{className:"w-4 h-4"}),"Send"]})})]}),h.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg overflow-hidden",children:[h.jsx("div",{className:"flex border-b border-gray-800",children:["headers","query","body"].map(ee=>h.jsxs("button",{onClick:()=>d(ee),disabled:ee==="body"&&!Y,className:ve("px-4 py-2 text-sm font-medium capitalize transition-colors",f===ee?"text-primary-400 border-b-2 border-primary-500":"text-gray-400 hover:text-gray-200",ee==="body"&&!Y&&"opacity-40 cursor-not-allowed"),children:[ee,ee==="headers"&&p.filter(ne=>ne.enabled&&ne.key).length>0&&h.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",p.filter(ne=>ne.enabled&&ne.key).length,")"]}),ee==="query"&&v.filter(ne=>ne.enabled&&ne.key).length>0&&h.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",v.filter(ne=>ne.enabled&&ne.key).length,")"]})]},ee))}),h.jsxs("div",{className:"p-3",children:[f==="headers"&&h.jsx(BR,{items:p,onChange:(ee,ne)=>V(p,g,ee,ne),onRemove:ee=>J(p,g,ee),onAdd:()=>g([...p,qR()]),keyPlaceholder:"Header",valuePlaceholder:"Value"}),f==="query"&&h.jsx(BR,{items:v,onChange:(ee,ne)=>V(v,w,ee,ne),onRemove:ee=>J(v,w,ee),onAdd:()=>w([...v,qR()]),keyPlaceholder:"Param",valuePlaceholder:"Value"}),f==="body"&&h.jsx(h.Fragment,{children:Y?h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("div",{className:"inline-flex rounded-md border border-gray-800 overflow-hidden",children:["form","json"].map(ee=>h.jsx("button",{onClick:()=>T(ee),className:ve("px-3 py-1 text-xs font-medium uppercase tracking-wide transition-colors",j===ee?"bg-primary-500/20 text-primary-300":"bg-gray-900 text-gray-500 hover:text-gray-300"),children:ee},ee))}),h.jsx("p",{className:"text-[11px] text-gray-500",children:j==="form"?"Type each variable below — JSON is built for you.":"Raw JSON. Click Form to edit field-by-field."})]}),j==="form"?h.jsx(ehe,{body:S,onChange:b}):h.jsx("textarea",{value:S,onChange:ee=>b(ee.target.value),placeholder:`{
|
|
562
|
+
"key": "value"
|
|
563
|
+
}`,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"})]}):h.jsxs("p",{className:"text-sm text-gray-500",children:["Body is not supported for ",i," requests."]})})]})]}),(O||C)&&h.jsxs("div",{className:"bg-gray-900/50 border border-gray-800 rounded-lg overflow-hidden",children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-gray-800",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[O&&h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:ve("text-lg font-semibold",zP(O.status)),children:[O.status," ",O.statusText]}),h.jsx("span",{className:"text-sm text-gray-400",children:Xn(O.duration)}),h.jsxs("span",{className:"text-sm text-gray-500",children:[new Blob([O.body]).size," bytes"]})]}),C&&h.jsxs("span",{className:"text-error-400 text-sm font-medium",children:["Error: ",C]})]}),O&&h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsxs("button",{onClick:()=>G(ee=>!ee),className:"text-xs text-gray-400 hover:text-gray-200 px-2 py-1 rounded",children:[D?"Hide":"Show"," headers"]}),h.jsx("button",{onClick:ge,className:"text-xs text-gray-400 hover:text-gray-200 px-2 py-1 rounded flex items-center gap-1",children:I?h.jsxs(h.Fragment,{children:[h.jsx(Im,{className:"w-3 h-3"})," Copied"]}):h.jsxs(h.Fragment,{children:[h.jsx(ss,{className:"w-3 h-3"})," Copy"]})})]})]}),O&&D&&h.jsxs("div",{className:"px-4 py-3 border-b border-gray-800 bg-gray-950/50",children:[h.jsx("p",{className:"text-xs text-gray-500 uppercase tracking-wide mb-2",children:"Response headers"}),h.jsx("div",{className:"space-y-1",children:Object.entries(O.headers).map(([ee,ne])=>h.jsxs("div",{className:"text-xs font-mono text-gray-300",children:[h.jsxs("span",{className:"text-gray-500",children:[ee,":"]})," ",ne]},ee))})]}),O&&h.jsx("pre",{className:"px-4 py-3 text-xs text-gray-200 font-mono overflow-auto max-h-96 bg-gray-950/50",children:O.isJson&&typeof O.parsed!="string"?JSON.stringify(O.parsed,null,2):O.body||"(empty body)"})]})]})}function BR({items:e,onChange:t,onRemove:n,onAdd:r,keyPlaceholder:i,valuePlaceholder:o}){return h.jsxs("div",{className:"space-y-2",children:[e.map(l=>h.jsxs("div",{className:"flex items-center gap-2",children:[h.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"}),h.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"}),h.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"}),h.jsx("button",{onClick:()=>n(l.id),className:"text-gray-500 hover:text-error-400 p-1","aria-label":"Remove",children:h.jsx(Dr,{className:"w-4 h-4"})})]},l.id)),h.jsxs("button",{onClick:r,className:"flex items-center gap-2 text-sm text-primary-400 hover:text-primary-300",children:[h.jsx(F_,{className:"w-4 h-4"}),"Add"]})]})}function ehe({body:e,onChange:t}){const n=$.useMemo(()=>zR(e),[]),[r,i]=$.useState(n),o=$.useMemo(()=>e,[e]),[l,c]=$.useState(o);l!==e&&e!==HR(r)&&(i(zR(e)),c(e));const f=g=>{i(g);const v=HR(g);c(v),t(v)},d=(g,v)=>f(r.map(w=>w.id===g?{...w,...v}:w)),y=g=>f(r.filter(v=>v.id!==g)),p=()=>f([...r,{id:Math.random().toString(36).slice(2,10),key:"",type:"string",value:""}]);return h.jsxs("div",{className:"space-y-2",children:[r.length===0&&h.jsxs("p",{className:"text-xs text-gray-500 italic px-1",children:["No fields yet. Click ",h.jsx("span",{className:"text-primary-300",children:"Add field"})," or pick a route with a ",h.jsx("span",{className:"font-mono",children:"@Body()"})," DTO to auto-fill the form."]}),r.map(g=>{const v=g.type!=="null";return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("input",{type:"text",value:g.key,onChange:w=>d(g.id,{key:w.target.value}),placeholder:"field",className:"w-40 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"}),h.jsxs("select",{value:g.type,onChange:w=>d(g.id,{type:w.target.value}),className:"w-24 px-2 py-1 rounded bg-gray-950 border border-gray-800 text-xs font-mono text-gray-300 focus:outline-none focus:border-primary-500",children:[h.jsx("option",{value:"string",children:"string"}),h.jsx("option",{value:"number",children:"number"}),h.jsx("option",{value:"boolean",children:"boolean"}),h.jsx("option",{value:"null",children:"null"}),h.jsx("option",{value:"json",children:"json"})]}),g.type==="boolean"?h.jsxs("select",{value:g.value||"true",onChange:w=>d(g.id,{value:w.target.value}),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",children:[h.jsx("option",{value:"true",children:"true"}),h.jsx("option",{value:"false",children:"false"})]}):v?h.jsx("input",{type:g.type==="number"?"number":"text",value:g.value,onChange:w=>d(g.id,{value:w.target.value}),placeholder:g.type==="json"?'{"nested":true}':g.type==="number"?"0":"value",spellCheck:!1,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"}):h.jsx("span",{className:"flex-1 px-2 py-1 text-xs text-gray-500 italic",children:"null"}),h.jsx("button",{onClick:()=>y(g.id),className:"text-gray-500 hover:text-error-400 p-1","aria-label":"Remove field",children:h.jsx(Dr,{className:"w-4 h-4"})})]},g.id)}),h.jsxs("button",{onClick:p,className:"flex items-center gap-2 text-sm text-primary-400 hover:text-primary-300",children:[h.jsx(F_,{className:"w-4 h-4"}),"Add field"]})]})}function the(e){return e===null?"null":typeof e=="string"?"string":typeof e=="number"?"number":typeof e=="boolean"?"boolean":"json"}function zR(e){const t=e.trim();if(!t)return[];try{const n=JSON.parse(t);return n===null||typeof n!="object"||Array.isArray(n)?[{id:Math.random().toString(36).slice(2,10),key:"$root",type:"json",value:JSON.stringify(n)}]:Object.entries(n).map(([r,i])=>{const o=the(i),l=o==="string"?i:o==="json"?JSON.stringify(i):String(i);return{id:Math.random().toString(36).slice(2,10),key:r,type:o,value:o==="null"?"":l}})}catch{return[]}}function HR(e){if(e.length===0)return"";if(e.length===1&&e[0].key==="$root"&&e[0].type==="json")return e[0].value||"";const t={};for(const n of e)if(n.key)switch(n.type){case"string":t[n.key]=n.value;break;case"number":{const r=Number(n.value);t[n.key]=Number.isFinite(r)?r:0;break}case"boolean":t[n.key]=n.value==="true";break;case"null":t[n.key]=null;break;case"json":try{t[n.key]=JSON.parse(n.value||"null")}catch{t[n.key]=n.value}break}return JSON.stringify(t,null,2)}const nhe={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 rhe({scope:e}){const t=nhe[e]||"text-gray-300 bg-gray-800 border-gray-700";return h.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium border ${t}`,children:e})}function ihe(){const e=ht(p=>p.containerSnapshot),t=ht(p=>p.selectedExchangeId),n=ht(p=>p.containerResolutionsByExchange),[r,i]=$.useState("list"),[o,l]=$.useState(""),[c,f]=$.useState("all"),d=$.useMemo(()=>t?new Set(n[t]??[]):new Set,[t,n]);if(!e||e.bindings.length===0)return h.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-gray-500",children:[h.jsx($m,{className:"w-12 h-12 mb-4 opacity-50"}),h.jsx("p",{className:"text-lg",children:"No container snapshot"}),h.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 h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[h.jsx(Du,{label:"Bindings",value:e.summary.total}),h.jsx(Du,{label:"Singletons",value:e.summary.byScope.Singleton??0}),h.jsx(Du,{label:"Request-scoped",value:e.summary.byScope.Request??0}),h.jsx(Du,{label:"Transient",value:e.summary.byScope.Transient??0}),h.jsx(Du,{label:"Cached",value:e.summary.cached})]}),d.size>0&&h.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:[h.jsx(a7,{className:"w-4 h-4 text-primary-400"}),h.jsxs("span",{className:"text-primary-300",children:["Showing ",d.size," binding",d.size===1?"":"s"," resolved by the selected request."]})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[h.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[h.jsx(Y_,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-500"}),h.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"})]}),h.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:[h.jsx("option",{value:"all",children:"All scopes"}),Object.keys(e.summary.byScope).map(p=>h.jsx("option",{value:p,children:p},p))]}),h.jsxs("div",{className:"flex bg-gray-900 border border-gray-700 rounded overflow-hidden",children:[h.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:[h.jsx(p7,{className:"w-4 h-4"}),"List"]}),h.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:[h.jsx(v7,{className:"w-4 h-4"}),"Graph"]})]})]}),r==="list"?h.jsx(ahe,{bindings:y,resolved:d}):h.jsx(ohe,{bindings:y,allBindings:e.bindings,edges:e.edges,resolved:d})]})}function Du({label:e,value:t}){return h.jsxs("div",{className:"px-3 py-2 bg-gray-900 border border-gray-800 rounded-lg",children:[h.jsx("div",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:e}),h.jsx("div",{className:"text-2xl font-bold text-white",children:t})]})}function ahe({bindings:e,resolved:t}){return h.jsx("div",{className:"bg-gray-900 border border-gray-800 rounded-lg overflow-hidden",children:h.jsx("div",{className:"overflow-x-auto max-h-[60vh]",children:h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{className:"bg-gray-950 sticky top-0",children:h.jsxs("tr",{className:"text-left text-xs uppercase tracking-wider text-gray-500",children:[h.jsx("th",{className:"px-4 py-2 font-medium",children:"Class"}),h.jsx("th",{className:"px-4 py-2 font-medium",children:"Service Identifier"}),h.jsx("th",{className:"px-4 py-2 font-medium",children:"Scope"}),h.jsx("th",{className:"px-4 py-2 font-medium",children:"Type"}),h.jsx("th",{className:"px-4 py-2 font-medium",children:"Cached"}),h.jsx("th",{className:"px-4 py-2 font-medium",children:"Activated"})]})}),h.jsxs("tbody",{className:"divide-y divide-gray-800",children:[e.map(n=>{const r=t.has(n.serviceIdentifier)||t.has(n.className);return h.jsxs("tr",{className:r?"bg-primary-950/30 hover:bg-primary-950/50":"hover:bg-gray-800/50",children:[h.jsx("td",{className:"px-4 py-2 font-mono text-white",children:n.className}),h.jsx("td",{className:"px-4 py-2 font-mono text-gray-400 text-xs",children:n.serviceIdentifier}),h.jsx("td",{className:"px-4 py-2",children:h.jsx(rhe,{scope:n.scope})}),h.jsx("td",{className:"px-4 py-2 text-gray-400",children:n.type}),h.jsx("td",{className:"px-4 py-2",children:n.cached?h.jsx("span",{className:"text-primary-400",children:"✓"}):h.jsx("span",{className:"text-gray-600",children:"—"})}),h.jsx("td",{className:"px-4 py-2",children:n.activated?h.jsx("span",{className:"text-primary-400",children:"✓"}):h.jsx("span",{className:"text-gray-600",children:"—"})})]},n.id)}),e.length===0&&h.jsx("tr",{children:h.jsx("td",{colSpan:6,className:"px-4 py-8 text-center text-gray-500",children:"No bindings match the current filters."})})]})]})})})}function ohe({bindings:e,allBindings:t,edges:n,resolved:r}){const i=$.useMemo(()=>{const w=new Map;for(const S of t)w.set(S.id,S);return w},[t]),o=$.useMemo(()=>new Set(e.map(w=>w.id)),[e]),{graphNodes:l,graphEdges:c}=$.useMemo(()=>{const w={Singleton:[],Request:[],Transient:[]};for(const A of e)(w[A.scope]??(w[A.scope]=[])).push(A);const S=180,b=60,j=60,T=24,N=Object.keys(w),E=[];N.forEach((A,C)=>{w[A].forEach((D,G)=>{const I=r.has(D.serviceIdentifier)||r.has(D.className);E.push({id:D.id,position:{x:C*(S+j),y:G*(b+T)},data:{label:she(D,I)},style:lhe(D,I),sourcePosition:"right",targetPosition:"left"})})});const O=n.filter(A=>o.has(A.source)&&o.has(A.target)).map((A,C)=>({id:`e-${C}`,source:A.source,target:A.target,type:"smoothstep",animated:!1,style:{stroke:"#3de678",strokeOpacity:.5},markerEnd:{type:Za.ArrowClosed,color:"#3de678"}}));return{graphNodes:E,graphEdges:O}},[e,n,o,r,i]),[f,d,y]=V$(l),[p,g,v]=F$(c);return $.useEffect(()=>d(l),[l,d]),$.useEffect(()=>g(c),[c,g]),h.jsx("div",{className:"h-[60vh] bg-gray-900 rounded-lg border border-gray-800 overflow-hidden",children:h.jsxs(G$,{nodes:f,edges:p,onNodesChange:y,onEdgesChange:v,fitView:!0,minZoom:.1,maxZoom:2,children:[h.jsx(X$,{color:"#1f2937",gap:16}),h.jsx(W$,{className:"!bg-gray-800 !border-gray-700"}),h.jsx(Z$,{className:"!bg-gray-800",nodeColor:w=>{var S;return((S=w.style)==null?void 0:S.borderColor)||"#374151"}})]})})}function she(e,t){return h.jsxs("div",{className:"text-xs",children:[h.jsxs("div",{className:"font-semibold truncate",title:e.className,children:[t?"● ":"",e.className]}),h.jsx("div",{className:"text-[10px] opacity-70 mt-0.5",children:e.scope})]})}function lhe(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 che=["log","info","warn","error","debug"],yL={log:{text:"text-gray-300",bg:"bg-gray-700/30",label:"LOG",Icon:ni},info:{text:"text-sky-400",bg:"bg-sky-500/10",label:"INFO",Icon:Kf},warn:{text:"text-warning-500",bg:"bg-warning-500/10",label:"WARN",Icon:Wr},error:{text:"text-error-400",bg:"bg-error-500/15",label:"ERROR",Icon:Xf},debug:{text:"text-violet-400",bg:"bg-violet-500/10",label:"DEBUG",Icon:FP}};function uhe(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 fhe(){const{logs:e,logLevelFilter:t,setLogLevelFilter:n,exchanges:r,setSelectedExchangeId:i,setCurrentView:o}=ht(),{clearLogs:l}=Yi(),[c,f]=$.useState(""),[d,y]=$.useState(!0),p=$.useRef(null),g=$.useMemo(()=>{const S=c.trim().toLowerCase();return e.filter(b=>!(!t.has(b.level)||S&&!b.message.toLowerCase().includes(S)))},[e,t,c]);$.useEffect(()=>{!d||!p.current||(p.current.scrollTop=0)},[g,d]);function v(S){const b=new Set(t);b.has(S)?b.delete(S):b.add(S),n(b)}function w(S){if(!S)return;const b=r.find(j=>{var T;return j.id===S||((T=j.trace)==null?void 0:T.traceId)===S||j.request.traceId===S});b&&(i(b.id),o("requests"))}return h.jsxs("div",{className:"h-full flex flex-col",children:[h.jsxs("div",{className:"border-b border-gray-800 px-4 py-3 space-y-3 bg-gray-900/40",children:[h.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[h.jsxs("div",{className:"flex items-center gap-2 mr-auto",children:[h.jsx(kl,{className:"w-4 h-4 text-primary-400"}),h.jsx("h2",{className:"text-base font-semibold text-white",children:"Logs"}),h.jsxs("span",{className:"text-xs text-gray-500",children:[g.length," of ",e.length]})]}),h.jsxs("button",{onClick:()=>y(!d),className:ve("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:[h.jsx(UP,{className:"w-3 h-3"}),"Auto-scroll"]}),h.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:[h.jsx(Ap,{className:"w-3 h-3"}),"Clear"]})]}),h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsxs("div",{className:"relative flex-1 min-w-[200px]",children:[h.jsx(Y_,{className:"absolute left-2 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-gray-500"}),h.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"})]}),h.jsx("div",{className:"flex items-center gap-1",children:che.map(S=>{const b=t.has(S),j=yL[S];return h.jsx("button",{onClick:()=>v(S),className:ve("px-2 py-1 text-[11px] font-mono rounded border transition-colors",b?`${j.bg} ${j.text} border-current/30`:"border-gray-800 text-gray-600 hover:text-gray-400"),children:j.label},S)})})]})]}),g.length===0?h.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500",children:h.jsxs("div",{className:"text-center max-w-md",children:[h.jsx(kl,{className:"w-10 h-10 mx-auto mb-3 opacity-40"}),h.jsx("p",{className:"text-sm font-medium text-gray-400",children:e.length===0?"No logs captured yet":"No logs match the current filter"}),h.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."})]})}):h.jsx("div",{ref:p,className:"flex-1 overflow-y-auto flex flex-col-reverse font-mono text-xs",children:[...g].reverse().map((S,b)=>h.jsx(dhe,{entry:S,onJump:w},b))})]})}function dhe({entry:e,onJump:t}){const n=yL[e.level],{Icon:r}=n;return h.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:[h.jsx("span",{className:"text-gray-600 tabular-nums select-none w-[88px] shrink-0",children:uhe(e.timestamp)}),h.jsxs("span",{className:ve("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:[h.jsx(r,{className:"w-3 h-3"}),n.label]}),h.jsx("pre",{className:"flex-1 whitespace-pre-wrap break-words text-gray-200 leading-relaxed",children:e.message}),e.traceId&&h.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 hhe=["Navigation","Lists","Detail","Help"];function phe({onClose:e}){const t=hhe.map(n=>({category:n,items:h9.filter(r=>r.category===n)})).filter(n=>n.items.length>0);return h.jsxs("div",{className:"fixed inset-0 z-[60] flex items-center justify-center p-6",onClick:e,children:[h.jsx("div",{className:"absolute inset-0 bg-black/70 backdrop-blur-sm"}),h.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:[h.jsxs("div",{className:"sticky top-0 bg-gray-900 border-b border-gray-800 px-5 py-3 flex items-center justify-between",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(f7,{className:"w-4 h-4 text-primary-400"}),h.jsx("h2",{className:"text-base font-semibold text-white",children:"Keyboard shortcuts"})]}),h.jsx("button",{onClick:e,className:"p-1.5 text-gray-400 hover:text-white hover:bg-gray-800 rounded",children:h.jsx(Dr,{className:"w-4 h-4"})})]}),h.jsx("div",{className:"p-5 grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-6",children:t.map(n=>h.jsxs("div",{children:[h.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wider text-gray-500 mb-2",children:n.category}),h.jsx("ul",{className:"space-y-1.5",children:n.items.map(r=>h.jsxs("li",{className:"flex items-center gap-3 text-sm",children:[h.jsx(UR,{combo:r.combo}),h.jsx("span",{className:"text-gray-300",children:r.description})]},r.combo+r.description))})]},n.category))}),h.jsxs("div",{className:"px-5 py-3 border-t border-gray-800 text-xs text-gray-500",children:["Press ",h.jsx(UR,{combo:"?"})," any time to toggle this overlay."]})]})]})}function UR({combo:e}){const t=e.includes(" then ")?[e]:e.split("+");return h.jsx("span",{className:"inline-flex items-center gap-1 flex-shrink-0",children:t.map((n,r)=>h.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 mhe={routes:"Routes",controllers:"Controllers",services:"Services / Use Cases",providers:"Providers",middleware:"Middleware",bindings:"DI Bindings",interceptors:"Interceptors"};function yhe(){const{runtime:e,metrics:t,connected:n,routes:r,structure:i,containerSnapshot:o,recordingEnabled:l,agentLatencyMs:c,eventsReceived:f,securityReport:d,setCurrentView:y}=ht(),{requestRuntime:p,requestMetrics:g,rescan:v}=Yi(),[w,S]=$.useState(null),b=()=>{p(),g(),v()},j=A=>S(C=>C===A?null:A),T=t&&t.memoryUsage.heapTotal>0?Math.round(t.memoryUsage.heapUsed/t.memoryUsage.heapTotal*100):0,N=(e==null?void 0:e.counts.interceptors)??(i==null?void 0:i.middleware.length)??0,E=(o==null?void 0:o.summary.byScope)??{},O=Object.entries(E).map(([A,C])=>`${A}: ${C}`).join(", ");return h.jsxs("div",{className:"space-y-6",children:[h.jsx("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden",children:h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 px-6 py-5",children:[h.jsxs("div",{className:"flex items-center gap-4",children:[h.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary-500/10 border border-primary-500/30 flex items-center justify-center",children:h.jsx(IE,{className:"w-5 h-5 text-primary-400"})}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.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)&&h.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})]}),h.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)&&h.jsxs("span",{title:"@expressots/core",children:["core v",e.versions.core]}),(e==null?void 0:e.versions.adapterExpress)&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-gray-700",children:"·"}),h.jsxs("span",{title:"@expressots/adapter-express",children:["adapter v",e.versions.adapterExpress]})]}),(e==null?void 0:e.versions.agent)&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-gray-700",children:"·"}),h.jsxs("span",{title:"@expressots/studio-agent",children:["studio-agent v",e.versions.agent]})]})]})]})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx(Ahe,{connected:n,latencyMs:c}),h.jsxs("button",{onClick:b,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:[h.jsx(Bm,{className:"w-3.5 h-3.5"}),"Refresh"]})]})]})}),h.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[h.jsxs(il,{icon:IE,title:"Server",accent:"text-primary-400",children:[h.jsx(en,{label:"Env",value:(e==null?void 0:e.env)??"—",mono:!0}),h.jsx(en,{label:"App URL",value:(e==null?void 0:e.appUrl)??"—",mono:!0}),h.jsx(en,{label:"App Port",value:e!=null&&e.appPort?String(e.appPort):"—",mono:!0}),h.jsx(en,{label:"Agent Port",value:e?String(e.agentPort):"—",mono:!0}),h.jsx(en,{label:"PID",value:e?String(e.pid):"—",mono:!0})]}),h.jsxs(il,{icon:ZP,title:"Config",accent:"text-blue-400",children:[h.jsx(en,{label:"Global Prefix",value:(e==null?void 0:e.globalPrefix)??"/",mono:!0}),h.jsx(en,{label:"Node",value:(e==null?void 0:e.nodeVersion)??"—",mono:!0}),h.jsx(en,{label:"Platform",value:e?`${e.platform} (${e.arch})`:"—",mono:!0}),h.jsx(en,{label:"Recording",value:l?"enabled":"paused",valueClass:l?"text-success-500":"text-gray-500"})]}),h.jsxs(il,{icon:A7,title:"Startup",accent:"text-pink-400",children:[h.jsx(en,{label:"Boot Time",value:e!=null&&e.startupMs?`${e.startupMs}ms`:"—",mono:!0}),h.jsx(en,{label:"Started At",value:e?new Date(e.startedAt).toLocaleString():"—"}),h.jsx(en,{label:"Uptime",value:e?Ehe(e.uptimeMs):"—",mono:!0}),h.jsx(en,{label:"Events",value:`${f.toLocaleString()} from agent`,mono:!0})]}),h.jsx(il,{icon:Ko,title:"Health",accent:"text-success-500",children:t?h.jsxs(h.Fragment,{children:[h.jsx(en,{label:"Memory",value:`${Pi(t.memoryUsage.heapUsed)} / ${Pi(t.memoryUsage.heapTotal)}`,mono:!0,tooltip:"V8 heap memory: used / reserved. This is where JS objects, closures, and scoped data live. Differs from the terminal banner which shows a one-time boot snapshot."}),h.jsx(en,{label:"Heap",value:`${T}%`,mono:!0,tooltip:"Heap pressure: heapUsed / heapTotal. High values (>85%) mean V8 may trigger frequent garbage collection pauses or expand its heap.",children:h.jsx("div",{className:"mt-1 w-full h-1.5 rounded-full bg-gray-800 overflow-hidden",children:h.jsx("div",{className:ve("h-full",T>85?"bg-error-500":T>65?"bg-warning-500":"bg-success-500"),style:{width:`${Math.min(100,T)}%`}})})}),h.jsx(en,{label:"RSS",value:Pi(t.memoryUsage.rss),mono:!0,tooltip:"Resident Set Size: total physical memory used by the entire process, including the V8 heap, native C++ bindings, buffers, and shared libraries. Always larger than heap."}),h.jsx(en,{label:"Connections",value:String(t.activeConnections),mono:!0,tooltip:"Number of active WebSocket clients connected to the Studio Agent (e.g. this browser tab). Not the HTTP connections to your app server."}),h.jsx("div",{className:"mt-1 text-[10px] text-gray-600 italic text-right",children:"Live — refreshed every 5s"})]}):h.jsx(Nhe,{children:"Waiting for metrics…"})}),h.jsxs(il,{icon:U_,title:"Metrics",accent:"text-amber-400",children:[h.jsx(Mo,{label:"Routes",value:String((e==null?void 0:e.counts.routes)??r.length),active:w==="routes",onClick:()=>j("routes")}),h.jsx(Mo,{label:"Controllers",value:String((e==null?void 0:e.counts.controllers)??(i==null?void 0:i.controllers.length)??0),active:w==="controllers",onClick:()=>j("controllers")}),h.jsx(Mo,{label:"Services / UseCases",value:String((e==null?void 0:e.counts.services)??(i==null?void 0:i.services.length)??0),active:w==="services",onClick:()=>j("services")}),h.jsx(Mo,{label:"Providers",value:String((e==null?void 0:e.counts.providers)??(i==null?void 0:i.providers.length)??0),active:w==="providers",onClick:()=>j("providers")}),h.jsx(Mo,{label:"Middleware",value:String((e==null?void 0:e.counts.middleware)??(i==null?void 0:i.middleware.length)??0),active:w==="middleware",onClick:()=>j("middleware")})]}),h.jsxs(il,{icon:Ja,title:"Security & Scope",accent:"text-purple-400",children:[h.jsx(Ohe,{report:d,onOpen:()=>y("security")}),h.jsx(Mo,{label:"Interceptors",value:String(N),active:w==="interceptors",onClick:()=>j("interceptors")}),h.jsx(Mo,{label:"DI Bindings",value:String((o==null?void 0:o.summary.total)??0),active:w==="bindings",onClick:()=>j("bindings")}),h.jsx(en,{label:"By Scope",value:O||"—",mono:!0,valueClass:"text-xs"})]})]}),h.jsx(ghe,{preset:(e==null?void 0:e.middlewarePreset)??null}),w&&h.jsx(vhe,{drill:w,onClose:()=>S(null)})]})}function ghe({preset:e}){var r,i,o,l,c,f,d,y,p;if(!e)return null;const t=(r=e.security)!=null&&r.cors?typeof e.security.cors.origin=="string"?e.security.cors.origin:e.security.cors.origin?"permissive":"restricted":"—",n=(i=e.security)!=null&&i.rateLimit?`${e.security.rateLimit.max}/${Math.round((e.security.rateLimit.windowMs??6e4)/1e3)}s`:"off";return h.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden hover:border-gray-700 transition-colors",children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-gray-800 bg-gray-900/40",children:[h.jsx(qm,{className:"w-4 h-4 text-teal-400"}),h.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Preset"}),h.jsxs("span",{className:"ml-auto text-xs font-mono text-gray-400",children:[e.name,e.hasOverrides?" (custom)":""]})]}),h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 px-4 py-3",children:[h.jsx(rl,{label:"Preset",value:e.name,highlight:!0}),h.jsx(rl,{label:"Parse",value:(l=(o=e.parse)==null?void 0:o.json)!=null&&l.limit?`JSON ${e.parse.json.limit}${(c=e.parse)!=null&&c.cookies?" + cookies":""}`:"defaults"}),h.jsx(rl,{label:"CORS",value:t}),h.jsx(rl,{label:"Rate Limit",value:n,muted:n==="off"}),h.jsx(rl,{label:"Helmet",value:((f=e.security)==null?void 0:f.helmet)!==!1?"on":"off",muted:((d=e.security)==null?void 0:d.helmet)===!1}),h.jsx(rl,{label:"Compression",value:(y=e.compress)!=null&&y.enabled?e.compress.level?`level ${e.compress.level}`:"default":"off",muted:!((p=e.compress)!=null&&p.enabled)})]})]})}function rl({label:e,value:t,highlight:n,muted:r}){return h.jsxs("div",{className:"flex flex-col gap-0.5",children:[h.jsx("span",{className:"text-[10px] uppercase tracking-wide text-gray-500",children:e}),h.jsx("span",{className:ve("text-sm font-mono truncate",n?"text-teal-300 font-semibold":r?"text-gray-500":"text-gray-100"),title:t,children:t})]})}function vhe({drill:e,onClose:t}){const{routes:n,structure:r,containerSnapshot:i,runtime:o}=ht(),l=$.useMemo(()=>{var c,f,d;switch(e){case"routes":return n.map((y,p)=>({key:`${y.method}-${y.path}-${p}`,primary:y.path,secondary:`${y.controller}.${y.controllerMethod}`,method:y.method,filePath:y.filePath,lineNumber:y.lineNumber}));case"controllers":return((r==null?void 0:r.controllers)??[]).map(y=>({key:y.name,primary:y.name,secondary:`${y.routes.length} route${y.routes.length===1?"":"s"} · ${y.dependencies.length} dep${y.dependencies.length===1?"":"s"}`,deps:y.dependencies,filePath:y.filePath}));case"services":return((r==null?void 0:r.services)??[]).map(y=>({key:y.name,primary:y.name,secondary:`${y.methods.length} method${y.methods.length===1?"":"s"} · ${y.dependencies.length} dep${y.dependencies.length===1?"":"s"}`,deps:y.dependencies,filePath:y.filePath}));case"providers":return bhe((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 She((f=o==null?void 0:o.runtimeItems)==null?void 0:f.middleware,r==null?void 0:r.middleware);case"interceptors":return whe((d=o==null?void 0:o.runtimeItems)==null?void 0:d.interceptors,r==null?void 0:r.middleware);case"bindings":return((i==null?void 0:i.bindings)??[]).map(y=>({key:y.id,primary:y.className,secondary:y.serviceIdentifier,scope:y.scope,cached:y.cached,activated:y.activated}));default:return[]}},[e,n,r,i,o]);return h.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden animate-slide-up",children:[h.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-gray-800 bg-gray-900/40",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(_he,{drill:e}),h.jsx("h3",{className:"text-sm font-semibold text-white",children:mhe[e]}),h.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:["(",l.length,")"]})]}),h.jsx("button",{onClick:t,className:"p-1 text-gray-500 hover:text-white rounded transition-colors","aria-label":"Close details",children:h.jsx(Dr,{className:"w-4 h-4"})})]}),h.jsx("div",{className:"max-h-[420px] overflow-y-auto",children:l.length===0?h.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."]}):h.jsx("ul",{className:"divide-y divide-gray-800",children:l.map(c=>h.jsx(xhe,{item:c,drill:e},c.key))})})]})}function xhe({item:e,drill:t}){return h.jsx("li",{className:"px-5 py-3 hover:bg-gray-800/40 transition-colors",children:h.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.method&&h.jsx("span",{className:ve("text-[10px] font-mono font-bold uppercase px-1.5 py-0.5 rounded",Cl(e.method),"bg-gray-800"),children:e.method}),t==="middleware"&&e.middlewareType&&h.jsx("span",{className:ve("text-[10px] font-mono px-1.5 py-0.5 rounded border",e.middlewareType==="built-in"?"text-primary-300 bg-primary-950/60 border-primary-700/50":"text-amber-300 bg-amber-950/50 border-amber-700/50"),children:e.middlewareType==="built-in"?"preset":"custom"}),h.jsx("span",{className:"text-sm text-white font-mono truncate",title:e.primary,children:e.primary}),e.scope&&h.jsx(jhe,{scope:e.scope})]}),e.secondary&&h.jsx("div",{className:"text-xs text-gray-500 font-mono truncate",title:e.secondary,children:e.secondary}),e.deps&&e.deps.length>0&&h.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:e.deps.map(n=>h.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"&&h.jsxs("div",{className:"mt-1 flex items-center gap-2 text-[10px] text-gray-500",children:[e.cached&&h.jsx("span",{className:"text-primary-500",children:"cached"}),e.activated&&h.jsx("span",{className:"text-amber-400",children:"activated"})]})]}),e.filePath&&h.jsxs("button",{onClick:()=>ls({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:[h.jsx(Xi,{className:"w-3 h-3"}),"Open"]})]})})}function bhe(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 whe(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.name}-${r}`,primary:n.name,secondary:"Class-based middleware"}))}function She(e,t){return e&&e.length>0?e.map((n,r)=>({key:`${n.name}-${r}`,primary:n.name,secondary:`${n.category} · ${n.type}${n.path?` · ${n.path}`:""}`,category:n.category,middlewareType:n.type})):(t??[]).map((n,r)=>({key:`${n.name}-${r}`,primary:n.name,secondary:`Class-based middleware${n.scope&&n.scope!=="unknown"?` · ${n.scope}`:""}`}))}function _he({drill:e}){const n={routes:N7,controllers:VP,services:XP,providers:dc,middleware:jp,interceptors:jp,bindings:$m}[e];return h.jsx(n,{className:"w-4 h-4 text-primary-400"})}function jhe({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 h.jsx("span",{className:ve("inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-medium border",n),children:e})}function il({icon:e,title:t,accent:n,children:r}){return h.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden hover:border-gray-700 transition-colors",children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 py-2.5 border-b border-gray-800 bg-gray-900/40",children:[h.jsx(e,{className:ve("w-4 h-4",n)}),h.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:t})]}),h.jsx("div",{className:"px-4 py-3 space-y-2",children:r})]})}function en({label:e,value:t,mono:n,valueClass:r,tooltip:i,children:o}){return h.jsxs("div",{className:"flex items-baseline justify-between gap-3",title:i,children:[h.jsx("span",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:e}),h.jsxs("div",{className:"flex flex-col items-end min-w-0 flex-1",children:[h.jsx("span",{className:ve("text-sm truncate",n&&"font-mono",r??"text-gray-100"),title:i??t,children:t}),o]})]})}function Mo({label:e,value:t,active:n,onClick:r}){return h.jsxs("button",{onClick:r,className:ve("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:[h.jsx("span",{className:ve("text-[11px] uppercase tracking-wide",n?"text-primary-400":"text-gray-500 group-hover:text-gray-400"),children:e}),h.jsxs("span",{className:"flex items-center gap-1 min-w-0",children:[h.jsx("span",{className:ve("text-sm font-mono",n?"text-primary-300":"text-gray-100"),children:t}),n?h.jsx(n7,{className:"w-3 h-3 text-primary-400"}):h.jsx(Pr,{className:"w-3 h-3 text-gray-600 group-hover:text-gray-400"})]})]})}function Ahe({connected:e,latencyMs:t}){const n=e?Q_:W_;return h.jsxs("span",{className:ve("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:[h.jsx(n,{className:"w-3 h-3"}),e?"connected":"offline",e&&t!=null&&h.jsxs("span",{className:"text-gray-400 font-mono",children:["· ",t,"ms"]})]})}function Nhe({children:e}){return h.jsx("div",{className:"text-xs text-gray-500 italic",children:e})}function Ohe({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 h.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:[h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsx("span",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:"Score"}),h.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h.jsx("span",{className:"text-xs text-gray-400 font-mono truncate",title:l,children:l}),h.jsx("span",{className:ve("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"&&h.jsx("div",{className:"text-[10px] text-gray-500 mt-1 italic",children:"Scanning…"}),(e==null?void 0:e.scanState.audit)==="error"&&h.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)&&h.jsx("div",{className:"text-[10px] text-gray-500 mt-1 italic",children:"No lockfile"})]})}function Ehe(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 bl=["CRITICAL","HIGH","MEDIUM","LOW","INFO"],os={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"}},bj={A:{badge:"bg-success-500/10 border-success-500/40 text-success-500",tone:"success",text:"text-success-500"},B:{badge:"bg-primary-500/10 border-primary-500/40 text-primary-400",tone:"primary",text:"text-primary-400"},C:{badge:"bg-yellow-500/10 border-yellow-500/40 text-yellow-400",tone:"yellow",text:"text-yellow-400"},D:{badge:"bg-orange-500/10 border-orange-500/40 text-orange-400",tone:"orange",text:"text-orange-400"},F:{badge:"bg-red-500/10 border-red-500/40 text-red-400",tone:"red",text:"text-red-400"}},Hy={A:{status:"Excellent",meaning:"No medium-or-higher security issues.",rule:"Zero CRITICAL/HIGH/MEDIUM findings (LOW + INFO are advisory only)."},B:{status:"Good",meaning:"A few medium-severity issues to triage.",rule:"At least one MEDIUM finding, but no HIGH or CRITICAL."},C:{status:"Manageable",meaning:"Some high-severity posture issues, or many medium ones.",rule:"At least one HIGH posture finding, or 5+ MEDIUM findings."},D:{status:"Needs work",meaning:"Multiple high-severity issues — exposure is meaningful.",rule:"3+ HIGH findings overall, or any HIGH supply-chain CVE."},F:{status:"Critical",meaning:"At least one critical-severity issue exists.",rule:"One or more CRITICAL findings (supply-chain or runtime posture)."}};function The(){const{securityReport:e,connected:t,setCurrentView:n,setSelectedExchangeId:r}=ht(),{requestSecurityScan:i}=Yi(),[o,l]=$.useState("dependencies"),c=e,f=(c==null?void 0:c.scanState.audit)==="running",d=Vhe(c),y=Fhe();return h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-xl overflow-hidden",children:[h.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 px-6 py-5",children:[h.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[h.jsx(Che,{report:c}),h.jsx(Mhe,{report:c})]}),h.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[h.jsx(Ghe,{connected:t}),h.jsx(Phe,{connected:t,onTrigger:()=>i()}),h.jsx(Rhe,{report:c,suppressions:y}),h.jsxs("button",{onClick:()=>i(),disabled:f,className:ve("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?h.jsx(ef,{className:"w-3.5 h-3.5 animate-spin"}):h.jsx(Bm,{className:"w-3.5 h-3.5"}),f?"Scanning…":"Rescan"]})]})]}),h.jsx(Hhe,{report:c}),h.jsx(Uhe,{report:c}),h.jsx(zhe,{report:c})]}),h.jsx(Khe,{report:c,suppressions:y,onSwitchTab:p=>l(p),onOpenExchange:p=>{n("requests"),r(p)},onOpenRoute:()=>n("requests"),onOpenLogs:()=>n("logs")}),h.jsxs("div",{className:"flex items-center gap-1 border-b border-gray-800",children:[h.jsx(YR,{active:o==="dependencies",onClick:()=>l("dependencies"),label:"Dependencies",count:(c==null?void 0:c.dependencies.length)??0}),h.jsx(YR,{active:o==="posture",onClick:()=>l("posture"),label:"Runtime Posture",count:(c==null?void 0:c.posture.length)??0})]}),o==="dependencies"&&h.jsx(Qhe,{report:c,newFindingIds:d,suppressions:y}),o==="posture"&&h.jsx(ape,{report:c,newFindingIds:d,suppressions:y,onOpenExchange:p=>{n("requests"),r(p)},onOpenRoute:()=>n("requests"),onOpenLogs:()=>n("logs")})]})}function Che({report:e}){const t=(e==null?void 0:e.score)??"A",n=bj[t],r=Hy[t];return h.jsxs("div",{className:ve("w-16 h-16 rounded-lg border flex flex-col items-center justify-center shrink-0",n.badge),title:`Grade ${t} — ${r.status}. ${r.meaning}`,children:[h.jsx("span",{className:"text-2xl font-bold leading-none",children:t}),h.jsx("span",{className:"text-[9px] uppercase tracking-wider opacity-80 mt-0.5",children:"Grade"})]})}function Mhe({report:e}){const t=(e==null?void 0:e.score)??"A",n=Hy[t],r=bj[t],i=(e==null?void 0:e.counts)??{CRITICAL:0,HIGH:0,MEDIUM:0,LOW:0,INFO:0},o=(e==null?void 0:e.dependencies.filter(d=>d.severity==="HIGH").length)??0,l=qhe(t,i,o),c=Bhe(t,i,o),f=Dhe(e);return h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-baseline gap-2 flex-wrap",children:[h.jsx("h2",{className:"text-xl font-bold text-white tracking-tight",children:"Security"}),h.jsx("span",{className:ve("text-sm font-semibold",r.text),children:n.status}),h.jsx("span",{className:"text-xs text-gray-500",children:"·"}),h.jsx("span",{className:"text-xs text-gray-400",children:n.meaning})]}),l.length>0&&h.jsxs("p",{className:"text-xs text-gray-400 mt-2 leading-relaxed",children:[h.jsxs("span",{className:"text-gray-500",children:["Why grade ",t,": "]}),l.join(" · ")]}),c&&h.jsxs("p",{className:"text-xs text-gray-400 mt-1 leading-relaxed",children:[h.jsxs("span",{className:"text-gray-500",children:["To reach ",c.target,": "]}),c.action]}),h.jsx(Ihe,{points:f,currentScore:t})]})}function Rw(e,t){const n=new Date(e.generatedAt).toISOString(),r=Hy[e.score],i=[];i.push(`# Security report — Grade ${e.score} (${r.status})`),i.push(""),i.push(`*Generated by ExpressoTS Studio at ${n}*`),i.push(""),i.push(`> ${r.meaning}`),i.push(""),i.push("## Summary"),i.push(""),i.push("| Severity | Count |"),i.push("| -------- | ----: |");for(const o of bl)i.push(`| ${o} | ${e.counts[o]} |`);if(i.push(""),i.push(`- **Dependencies:** ${e.dependencies.length}`),i.push(`- **Posture:** ${e.posture.length}`),i.push(`- **Recommended fix groups:** ${e.fixGroups.length}`),i.push(`- **Locally suppressed:** ${t.count}`),i.push(""),e.fixGroups.length>0){i.push("## Recommended fixes"),i.push("");for(const o of e.fixGroups)i.push(`- **${o.severity}** — \`${o.package}\` ${o.fromVersion} → ${o.toVersion} (fixes ${o.findingIds.length})${o.breaking?" · breaking":""}`),o.fix.command&&i.push(` - \`${o.fix.command}\``),o.reachability&&i.push(` - reachability: ${o.reachability}`);i.push("")}if(e.dependencies.length>0){i.push("## Dependency findings"),i.push("");const o=km(e.dependencies);for(const l of bl){const c=o[l]??[];if(c.length!==0){i.push(`### ${l} (${c.length})`),i.push("");for(const f of c){const d=t.isSuppressed(`d:${f.id}`)?" _(suppressed)_":"",y=f.reachability?` · ${f.reachability.level}`:"",p=f.cvss!==void 0?` · CVSS ${f.cvss.toFixed(1)}`:"";i.push(`- **${f.id}** — \`${f.package}@${f.installedVersion}\`${f.fixedVersion?` → fix in ${f.fixedVersion}`:""}${p}${y}${d}`),i.push(` - ${f.title}`)}i.push("")}}}if(e.posture.length>0){i.push("## Runtime posture findings"),i.push("");const o=km(e.posture);for(const l of bl){const c=o[l]??[];if(c.length!==0){i.push(`### ${l} (${c.length})`),i.push("");for(const f of c){const d=t.isSuppressed(`p:${f.id}`)?" _(suppressed)_":"",y=f.owasp?` · ${f.owasp}`:"";i.push(`- **${f.rule}**${y} — ${f.title}${d}`),f.fixHint&&i.push(` - Fix: ${f.fixHint}`)}i.push("")}}}if(t.count>0){i.push("## Locally suppressed findings"),i.push(""),i.push("Suppressed via the Studio UI; tracked in browser localStorage and **not** reflected in the grade."),i.push("");for(const[o,l]of Object.entries(t.map)){const c=new Date(l.ackedAt).toISOString();i.push(`- \`${o}\` — ${l.reason} _(acked ${c})_`)}i.push("")}return i.push("## Scan state"),i.push(""),i.push(`- npm audit: \`${e.scanState.audit}\``),e.scanState.auditError&&i.push(`- audit error: ${e.scanState.auditError}`),e.scanState.missingLockfile&&i.push("- ⚠️ No package-lock.json — supply-chain scanning was skipped."),i.push(`- posture last analyzed: ${e.scanState.postureLastRunAt>0?new Date(e.scanState.postureLastRunAt).toISOString():"never"}`),i.push(""),i.join(`
|
|
564
|
+
`)}function khe(e){const t={meta:{kind:"expressots-studio-security-report",version:1,generatedAt:new Date(e.generatedAt).toISOString()},report:e};return JSON.stringify(t,null,2)}function Pw(e,t,n){const r=new Blob([t],{type:`${n};charset=utf-8`}),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 Rhe({report:e,suppressions:t}){const[n,r]=$.useState(!1),[i,o]=$.useState(!1),l=$.useRef(null);$.useEffect(()=>{if(!n)return;const g=w=>{var S;(S=l.current)!=null&&S.contains(w.target)||r(!1)},v=w=>{w.key==="Escape"&&r(!1)};return window.addEventListener("mousedown",g),window.addEventListener("keydown",v),()=>{window.removeEventListener("mousedown",g),window.removeEventListener("keydown",v)}},[n]);const c=!e,f=(e==null?void 0:e.generatedAt)!=null?new Date(e.generatedAt).toISOString().replace(/[:.]/g,"-").slice(0,19):"unscanned",d=async()=>{if(e){try{await navigator.clipboard.writeText(Rw(e,t)),o(!0),setTimeout(()=>o(!1),1500)}catch{Pw(`security-report-${f}.md`,Rw(e,t),"text/markdown")}r(!1)}},y=()=>{e&&(Pw(`security-report-${f}.md`,Rw(e,t),"text/markdown"),r(!1))},p=()=>{e&&(Pw(`security-report-${f}.json`,khe(e),"application/json"),r(!1))};return h.jsxs("div",{className:"relative",ref:l,children:[h.jsxs("button",{onClick:()=>r(g=>!g),disabled:c,className:ve("inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors border",c?"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:"Export the current report",children:[h.jsx(Sp,{className:"w-3.5 h-3.5"}),"Export",h.jsx(Pr,{className:ve("w-3 h-3 transition-transform",n&&"rotate-180")})]}),n&&h.jsxs("div",{className:"absolute right-0 mt-1 z-20 w-56 rounded-lg border border-gray-700 bg-gray-900 shadow-xl overflow-hidden",children:[h.jsx(Dw,{icon:i?Ml:ss,label:i?"Copied!":"Copy as Markdown",sublabel:"For Slack / PR descriptions",onClick:d}),h.jsx(Dw,{icon:V_,label:"Download Markdown",sublabel:".md file",onClick:y}),h.jsx(Dw,{icon:Xi,label:"Download JSON",sublabel:"Raw report (.json)",onClick:p})]})]})}function Dw({icon:e,label:t,sublabel:n,onClick:r}){return h.jsxs("button",{onClick:r,className:"w-full text-left px-3 py-2 hover:bg-gray-800 flex items-start gap-2.5 transition-colors",children:[h.jsx(e,{className:"w-4 h-4 text-gray-400 mt-0.5 shrink-0"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-xs font-medium text-gray-200",children:t}),h.jsx("div",{className:"text-[10px] text-gray-500",children:n})]})]})}const GR="expressots.studio.security.autoRescan",VR=5e3;function Phe({connected:e,onTrigger:t}){const[n,r]=$.useState(()=>{try{return localStorage.getItem(GR)==="1"}catch{return!1}}),i=ht(f=>f.structure),o=$.useRef(0),l=$.useRef(null),c=$.useRef(!1);return $.useEffect(()=>{try{localStorage.setItem(GR,n?"1":"0")}catch{}},[n]),$.useEffect(()=>{n||l.current&&(clearTimeout(l.current),l.current=null)},[n]),$.useEffect(()=>{if(!(!n||!e)){if(!c.current){c.current=!0;return}return l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{o.current=Date.now(),t(),l.current=null},VR),()=>{l.current&&clearTimeout(l.current)}}},[i,n,e]),h.jsxs("button",{onClick:()=>r(f=>!f),className:ve("inline-flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] font-medium rounded-lg transition-colors border",n?"bg-primary-500/15 border-primary-500/40 text-primary-300":"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700"),title:n?`Auto-rescans ${VR/1e3}s after the agent reports a code change. Click to disable.`:"Click to auto-rescan whenever the agent detects a source file change.",children:[h.jsx(Bm,{className:ve("w-3 h-3",n&&"text-primary-300")}),"Auto-rescan ",n?"on":"off"]})}const gL="expressots.studio.security.trend",vL=30;function Dhe(e){const[t,n]=$.useState(()=>$he()),r=$.useRef(0);return $.useEffect(()=>{if(!e||e.generatedAt===r.current)return;r.current=e.generatedAt;const i={at:e.generatedAt,score:e.score,blocking:e.counts.CRITICAL+e.counts.HIGH,total:e.counts.CRITICAL+e.counts.HIGH+e.counts.MEDIUM+e.counts.LOW+e.counts.INFO};n(o=>{const c=[...o.filter(f=>f.at!==i.at),i].slice(-vL);try{localStorage.setItem(gL,JSON.stringify(c))}catch{}return c})},[e]),t}function $he(){try{const e=localStorage.getItem(gL);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.slice(-vL):[]}catch{return[]}}function Ihe({points:e,currentScore:t}){if(e.length<2)return h.jsx("p",{className:"text-[11px] text-gray-600 mt-2",children:"Trend will appear after a few scans."});const n=e[0],r=e[e.length-1],i=r.blocking-n.blocking,o=i<0?"down":i>0?"up":"flat",l=o==="down"?"text-success-500":o==="up"?"text-orange-300":"text-gray-500",c=o==="down"?"improving":o==="up"?"regressing":"stable",f=n.score!==r.score?`${n.score} → ${r.score}`:`held at ${t}`;return h.jsxs("div",{className:"flex items-center gap-3 mt-3",children:[h.jsx(Lhe,{points:e}),h.jsxs("div",{className:"text-[11px] text-gray-400 leading-tight min-w-0",children:[h.jsxs("div",{children:[h.jsx("span",{className:ve("font-medium",l),children:c}),h.jsxs("span",{className:"text-gray-600",children:[" · ",e.length," scans"]})]}),h.jsxs("div",{className:"text-gray-500 mt-0.5",children:[f,i!==0&&h.jsxs(h.Fragment,{children:[" · ","blocking ",n.blocking," → ",r.blocking]})]})]})]})}function Lhe({points:e}){const i=Math.max(1,...e.map(g=>g.blocking)),o=e.length>1?136/(e.length-1):0,l=g=>30-g/i*28,c=e.map((g,v)=>({x:2+v*o,y:l(g.blocking)})),f=c.map((g,v)=>`${v===0?"M":"L"}${g.x.toFixed(1)},${g.y.toFixed(1)}`).join(" "),d=c[c.length-1],y=e[e.length-1].blocking,p=y===0?"fill-success-500 stroke-success-500":y>=5?"fill-red-400 stroke-red-400":"fill-yellow-300 stroke-yellow-300";return h.jsxs("svg",{width:140,height:32,viewBox:"0 0 140 32",className:"shrink-0",role:"img","aria-label":`Blocking findings over the last ${e.length} scans`,children:[h.jsx("path",{d:f,fill:"none",strokeWidth:1.25,className:"stroke-gray-500"}),h.jsx("circle",{cx:d.x,cy:d.y,r:2.25,className:p})]})}function qhe(e,t,n){const r=[];if(e==="A")return t.LOW>0||t.INFO>0?r.push(`${t.LOW+t.INFO} low/info finding${t.LOW+t.INFO===1?"":"s"} (advisory only)`):r.push("No medium-or-higher findings detected"),r;if(t.CRITICAL>0&&r.push(`${t.CRITICAL} critical finding${t.CRITICAL===1?"":"s"}`),t.HIGH>0){const i=n>0?` (${n} supply-chain)`:"";r.push(`${t.HIGH} high finding${t.HIGH===1?"":"s"}${i}`)}return t.MEDIUM>0&&(e==="B"||e==="C")&&r.push(`${t.MEDIUM} medium finding${t.MEDIUM===1?"":"s"}`),r}function Bhe(e,t,n){if(e==="A")return null;if(e==="F")return{target:"D",action:`Resolve all ${t.CRITICAL} critical finding${t.CRITICAL===1?"":"s"}.`};if(e==="D"){if(n>0)return{target:"C",action:`Patch the ${n} supply-chain HIGH${n===1?"":"s"} and bring total HIGHs below 3.`};const r=Math.max(0,t.HIGH-2);return{target:"C",action:`Fix ${r} HIGH finding${r===1?"":"s"} to drop below the 3-HIGH threshold.`}}if(e==="C"){if(t.HIGH>0)return{target:"B",action:`Resolve all ${t.HIGH} HIGH finding${t.HIGH===1?"":"s"} (mediums alone are fine for B).`};const r=Math.max(0,t.MEDIUM-4);return{target:"B",action:`Fix ${r} MEDIUM finding${r===1?"":"s"} to drop below the 5-MEDIUM threshold.`}}return{target:"A",action:`Resolve all ${t.MEDIUM} MEDIUM finding${t.MEDIUM===1?"":"s"} (LOW/INFO don't affect the grade).`}}function zhe({report:e}){const[t,n]=$.useState(!1),r=(e==null?void 0:e.score)??"A";return h.jsxs("div",{className:"border-t border-gray-800",children:[h.jsxs("button",{onClick:()=>n(i=>!i),className:"w-full flex items-center justify-between px-6 py-2.5 text-xs text-gray-400 hover:text-gray-200 hover:bg-gray-800/50 transition-colors",children:[h.jsxs("span",{className:"inline-flex items-center gap-2",children:[t?h.jsx(Pr,{className:"w-3.5 h-3.5"}):h.jsx(ni,{className:"w-3.5 h-3.5"}),"How this grade is calculated"]}),h.jsx("span",{className:"text-[10px] uppercase tracking-wider text-gray-500",children:"A → F · severity-driven"})]}),t&&h.jsxs("div",{className:"px-6 pb-4 pt-1 space-y-1.5",children:[["A","B","C","D","F"].map(i=>{const o=Hy[i],l=bj[i],c=i===r;return h.jsxs("div",{className:ve("flex items-start gap-3 px-3 py-2 rounded-md border text-xs",c?ve(l.badge,"border-opacity-60"):"border-gray-800 bg-gray-950/40"),children:[h.jsx("span",{className:ve("inline-flex items-center justify-center w-6 h-6 rounded font-bold border shrink-0",l.badge),children:i}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:ve("font-medium",c?l.text:"text-gray-300"),children:[o.status,c&&h.jsx("span",{className:"ml-2 text-[10px] uppercase tracking-wider text-gray-500",children:"current"})]}),h.jsx("div",{className:"text-gray-500 mt-0.5",children:o.rule})]})]},i)}),h.jsxs("p",{className:"text-[11px] text-gray-500 pt-1",children:["Supply-chain CVEs come from ",h.jsx("code",{className:"text-gray-400",children:"npm audit"})," + OSV.dev. Runtime posture findings come from Studio's recorded traffic, route map and logs."]})]})]})}function Hhe({report:e}){if(!e)return null;const{scanState:t}=e;return t.missingLockfile?h.jsx(FR,{tone:"info",icon:h.jsx(Kf,{className:"w-4 h-4"}),title:"No package-lock.json found",body:h.jsxs(h.Fragment,{children:["Studio skipped ",h.jsx("code",{className:"text-gray-400",children:"npm audit"})," because this project has no lockfile. Run ",h.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"?h.jsx(FR,{tone:"error",icon:h.jsx(Xf,{className:"w-4 h-4"}),title:"npm audit failed",body:t.auditError??"See the Studio Agent logs for details."}):null}function FR({tone:e,icon:t,title:n,body:r}){return h.jsxs("div",{className:ve("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:[h.jsx("div",{className:"mt-0.5",children:t}),h.jsxs("div",{className:"text-sm",children:[h.jsx("div",{className:"font-medium mb-0.5",children:n}),h.jsx("div",{className:"text-xs leading-relaxed",children:r})]})]})}function Uhe({report:e}){return h.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-5 border-t border-gray-800",children:bl.map(t=>{const n=os[t],r=(e==null?void 0:e.counts[t])??0;return h.jsxs("div",{className:"flex items-center justify-between px-5 py-2.5 border-r border-gray-800 last:border-r-0",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("span",{className:ve("w-2 h-2 rounded-full",n.dot)}),h.jsx("span",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:t.toLowerCase()})]}),h.jsx("span",{className:ve("text-sm font-mono",r>0?n.text:"text-gray-600"),children:r})]},t)})})}function Ghe({connected:e}){const t=e?Q_:W_;return h.jsxs("span",{className:ve("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:[h.jsx(t,{className:"w-3 h-3"}),e?"connected":"offline"]})}function YR({active:e,onClick:t,label:n,count:r}){return h.jsxs("button",{onClick:t,className:ve("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:[h.jsx("span",{children:n}),h.jsx("span",{className:ve("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})]})}const XR="expressots.studio.security.lastFindingIds";function Vhe(e){const[t,n]=$.useState(()=>new Set),r=$.useRef(0);return $.useEffect(()=>{if(!e||e.generatedAt===r.current)return;r.current=e.generatedAt;const i=new Set;for(const c of e.dependencies)i.add(`d:${c.id}`);for(const c of e.posture)i.add(`p:${c.id}`);let o;try{const c=localStorage.getItem(XR);o=new Set(c?JSON.parse(c):[])}catch{o=new Set}const l=new Set;if(o.size>0)for(const c of i)o.has(c)||l.add(c);n(l);try{localStorage.setItem(XR,JSON.stringify(Array.from(i)))}catch{}},[e]),t}function wj(){return h.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[9px] font-bold uppercase tracking-wider bg-primary-500/15 text-primary-300 border border-primary-500/30",title:"Appeared since the previous scan",children:"New"})}const KR="expressots.studio.security.suppressions";function Fhe(){const[e,t]=$.useState(()=>{try{const l=localStorage.getItem(KR);if(!l)return{};const c=JSON.parse(l);return typeof c=="object"&&c!==null?c:{}}catch{return{}}}),n=$.useCallback(l=>{try{localStorage.setItem(KR,JSON.stringify(l))}catch{}},[]),r=$.useCallback((l,c)=>{t(f=>{const d={...f,[l]:{reason:c.trim()||"No reason given",ackedAt:Date.now()}};return n(d),d})},[n]),i=$.useCallback(l=>{t(c=>{if(!c[l])return c;const f={...c};return delete f[l],n(f),f})},[n]),o=$.useCallback(l=>!!e[l],[e]);return{map:e,suppress:r,unsuppress:i,isSuppressed:o,count:Object.keys(e).length}}function T_({prefixedId:e,suppression:t,onSuppress:n,onUnsuppress:r}){const[i,o]=$.useState(!1),[l,c]=$.useState("");return t?h.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md bg-gray-800/60 border border-gray-700/60 text-[11px]",children:[h.jsx(Ju,{className:"w-3.5 h-3.5 text-gray-500 shrink-0"}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"text-gray-300",children:["Acknowledged",h.jsxs("span",{className:"text-gray-500 ml-1.5",children:["· ",new Date(t.ackedAt).toLocaleString()]})]}),h.jsx("div",{className:"text-gray-500 truncate",title:t.reason,children:t.reason})]}),h.jsxs("button",{onClick:()=>r(e),className:"shrink-0 inline-flex items-center gap-1 px-2 py-0.5 rounded text-gray-300 hover:text-white hover:bg-gray-700",title:"Re-enable this finding",children:[h.jsx(Lm,{className:"w-3 h-3"})," Restore"]})]}):i?h.jsxs("form",{onSubmit:f=>{f.preventDefault(),n(e,l),c(""),o(!1)},className:"flex items-center gap-2",children:[h.jsx("input",{autoFocus:!0,value:l,onChange:f=>c(f.target.value),placeholder:"Reason (e.g. accepted risk)",className:"px-2 py-1 rounded-md text-[11px] bg-gray-950 border border-gray-700 text-gray-200 placeholder:text-gray-600 focus:outline-none focus:ring-1 focus:ring-primary-400 w-52"}),h.jsx("button",{type:"submit",className:"inline-flex items-center gap-1 px-2 py-1 rounded-md text-[11px] font-medium border bg-primary-500/15 border-primary-500/40 text-primary-300 hover:bg-primary-500/25",children:"Confirm"}),h.jsx("button",{type:"button",onClick:()=>{o(!1),c("")},className:"text-[11px] text-gray-400 hover:text-gray-200",children:"Cancel"})]}):h.jsxs("button",{onClick:()=>o(!0),className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11px] font-medium border bg-gray-800 hover:bg-gray-700 text-gray-300 border-gray-700",title:"Hide this finding from the main view (local-only, you can restore it later)",children:[h.jsx(Ju,{className:"w-3 h-3"}),"Suppress"]})}const Yhe={CRITICAL:5,HIGH:4,MEDIUM:3,LOW:2,INFO:1},Mm={confirmed:4,likely:3,unknown:2,unreachable:1},xL=[{code:"API1:2023",label:"Broken Object Level Authz"},{code:"API2:2023",label:"Broken Authentication"},{code:"API3:2023",label:"Broken Object Property Authz"},{code:"API4:2023",label:"Unrestricted Resource Consumption"},{code:"API5:2023",label:"Broken Function Level Authz"},{code:"API6:2023",label:"Sensitive Business Flows"},{code:"API7:2023",label:"Server-Side Request Forgery"},{code:"API8:2023",label:"Security Misconfiguration"},{code:"API9:2023",label:"Improper Inventory Mgmt"},{code:"API10:2023",label:"Unsafe API Consumption"}];function WR(e){const t=Yhe[e.severity]*10;if(e.kind==="fix-group"){const r=e.reachability?Mm[e.reachability]:Mm.unknown,o={"audit-fix":3,install:2,"audit-fix-force":1,override:0,none:-2}[e.group.fix.kind]??0,l=e.group.breaking?-1:0;return t+r+o+l}const n=e.finding.fixHint?2:0;return t+n}function Xhe(e,t=3,n){const r=[];for(const i of e.fixGroups)n&&i.findingIds.length>0&&i.findingIds.every(l=>n.isSuppressed(`d:${l}`))||r.push({kind:"fix-group",id:i.id,title:`Upgrade ${i.package} ${i.fromVersion} → ${i.toVersion}`,subtitle:`Fixes ${i.findingIds.length} advisor${i.findingIds.length===1?"y":"ies"}${i.breaking?" · breaking change":""}`,severity:i.severity,reachability:i.reachability,group:i});for(const i of e.posture)i.severity==="INFO"||i.severity==="LOW"||n!=null&&n.isSuppressed(`p:${i.id}`)||r.push({kind:"posture",id:i.id,title:i.title,subtitle:i.fixHint??i.description,severity:i.severity,finding:i});return r.sort((i,o)=>WR(o)-WR(i)).slice(0,t)}function Khe({report:e,suppressions:t,onSwitchTab:n,onOpenExchange:r,onOpenRoute:i,onOpenLogs:o}){var y;const{applyFix:l}=Yi(),c=$.useMemo(()=>e?Xhe(e,3,t):[],[e,t]);if(!e||c.length===0)return null;const f=((y=e.scanState.fix)==null?void 0:y.state)==="running",d=p=>{!p.fix.command||p.fix.kind==="none"||p.fix.kind==="override"||l({targetKind:"fix-group",targetId:p.id,command:p.fix.command,allowMajor:p.fix.kind==="audit-fix-force"||p.breaking})};return h.jsxs("div",{className:"bg-gradient-to-r from-primary-500/5 to-primary-500/0 border border-primary-500/20 rounded-xl p-4 sm:p-5",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(tD,{className:"w-4 h-4 text-primary-400"}),h.jsxs("h3",{className:"text-sm font-semibold text-white tracking-tight",children:["Top ",c.length," fix",c.length===1?"":"es"," today"]}),h.jsx("span",{className:"text-[11px] text-gray-500",children:"ranked by severity · reachability · fix-ease"})]}),h.jsx("ul",{className:"space-y-2",children:c.map(p=>h.jsx(Whe,{action:p,fixInFlight:f,onApplyGroup:d,onSwitchTab:n,onOpenExchange:r,onOpenRoute:i,onOpenLogs:o},`${p.kind}:${p.id}`))})]})}function Whe({action:e,fixInFlight:t,onApplyGroup:n,onSwitchTab:r,onOpenExchange:i,onOpenRoute:o,onOpenLogs:l}){const c=os[e.severity],f=()=>{if(e.kind!=="posture")return;const y=e.finding.evidence;switch(y.kind){case"exchange":i(y.exchangeId);return;case"route":o();return;case"log":l();return;case"file":ls({filePath:y.filePath,lineNumber:y.lineNumber});return}},d=e.kind==="fix-group"&&(e.group.fix.kind==="none"||e.group.fix.kind==="override");return h.jsxs("li",{className:"flex items-start gap-3 p-3 rounded-lg bg-gray-900/60 border border-gray-800",children:[h.jsx("span",{className:ve("mt-0.5 inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border shrink-0",c.chip),children:e.severity}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("div",{className:"text-sm font-medium text-white truncate",children:e.title}),h.jsx("div",{className:"text-xs text-gray-400 mt-0.5 line-clamp-2",children:e.subtitle}),e.kind==="fix-group"&&e.reachability&&h.jsx("div",{className:"mt-1",children:h.jsx(Sj,{level:e.reachability})})]}),h.jsx("div",{className:"shrink-0 flex items-center gap-2",children:e.kind==="fix-group"?h.jsxs(h.Fragment,{children:[h.jsx("button",{onClick:()=>r("dependencies"),className:"text-[11px] text-gray-400 hover:text-gray-200 underline-offset-2 hover:underline",children:"View"}),h.jsxs("button",{onClick:()=>n(e.group),disabled:t||d,className:ve("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11px] font-medium border transition-colors",t||d?"bg-gray-800 text-gray-500 border-gray-800 cursor-not-allowed":"bg-primary-500/15 border-primary-500/40 text-primary-300 hover:bg-primary-500/25"),title:d?"No one-click fix available — open Dependencies for guidance.":e.group.fix.command,children:[h.jsx(G_,{className:"w-3 h-3"}),"Apply"]})]}):h.jsxs("button",{onClick:f,className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md text-[11px] font-medium border bg-gray-800 hover:bg-gray-700 text-gray-200 border-gray-700",children:[h.jsx(Xa,{className:"w-3 h-3"}),"Investigate"]})})]})}function Qhe({report:e,newFindingIds:t,suppressions:n}){var S;const[r,i]=$.useState(!1),[o,l]=$.useState(!0),[c,f]=$.useState(!1);if(!e)return h.jsx(hl,{icon:ef,message:"Connecting to agent…"});if(e.scanState.missingLockfile)return h.jsx(hl,{icon:b7,message:"Supply-chain scanning is disabled until a package-lock.json is present."});if(e.dependencies.length===0)return e.scanState.audit==="running"?h.jsx(hl,{icon:ef,spin:!0,message:"Running npm audit…"}):h.jsx(hl,{icon:Ja,message:"No known supply-chain vulnerabilities. (Last scan completed; rescan to re-check.)",tone:"success"});const d=e.dependencies.filter(b=>b.reachability&&b.reachability.level!=="unreachable").length,y=e.dependencies.filter(b=>{var j;return((j=b.reachability)==null?void 0:j.level)==="unreachable"}).length,p=e.dependencies.filter(b=>n.isSuppressed(`d:${b.id}`)).length;let g=e.dependencies;r&&(g=g.filter(b=>{var j;return((j=b.reachability)==null?void 0:j.level)!=="unreachable"})),c||(g=g.filter(b=>!n.isSuppressed(`d:${b.id}`)));const v=km(g),w=new Map(e.dependencies.map(b=>[b.id,b]));return h.jsxs("div",{className:"space-y-8",children:[h.jsx(ipe,{}),e.fixGroups.length>0&&h.jsx(Jhe,{groups:e.fixGroups,findingsById:w,fixInFlight:((S=e.scanState.fix)==null?void 0:S.state)==="running",newFindingIds:t,suppressions:n,showSuppressed:c}),h.jsx(Zhe,{total:e.dependencies.length,reachable:d,unreachable:y,suppressed:p,hideUnreachable:r,onToggleHide:()=>i(b=>!b),reachableFirst:o,onToggleSort:()=>l(b=>!b),showSuppressed:c,onToggleShowSuppressed:()=>f(b=>!b)}),h.jsxs("div",{className:"space-y-6",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(jp,{className:"w-4 h-4 text-gray-500"}),h.jsx("h3",{className:"text-sm font-semibold text-gray-300 tracking-tight",children:"All advisories"}),h.jsxs("span",{className:"text-xs text-gray-600 font-mono",children:["(",g.length,g.length!==e.dependencies.length?` of ${e.dependencies.length}`:"",")"]})]}),bl.map(b=>{const j=v[b]??[];if(j.length===0)return null;const T=o?[...j].sort((N,E)=>{var O,A;return Mm[((O=E.reachability)==null?void 0:O.level)??"unknown"]-Mm[((A=N.reachability)==null?void 0:A.level)??"unknown"]}):j;return h.jsx(SL,{severity:b,count:j.length,children:T.map(N=>{var E;return h.jsx(tpe,{finding:N,fixInFlight:((E=e.scanState.fix)==null?void 0:E.state)==="running",isNew:t.has(`d:${N.id}`),suppression:n.map[`d:${N.id}`],onSuppress:n.suppress,onUnsuppress:n.unsuppress},N.id)})},b)})]})]})}function Zhe({total:e,reachable:t,unreachable:n,suppressed:r,hideUnreachable:i,onToggleHide:o,reachableFirst:l,onToggleSort:c,showSuppressed:f,onToggleShowSuppressed:d}){return h.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs",children:[h.jsx("span",{className:"text-gray-500 mr-1",children:"Filter:"}),h.jsx(up,{label:`${e} total`,tone:"muted"}),t>0&&h.jsx(up,{label:`${t} reachable`,tone:"warn",title:"Code paths your app executes — these are the CVEs that actually matter."}),n>0&&h.jsx(up,{label:`${n} unreachable`,tone:"muted",title:"In dependencies your app never invokes (often dev-only or unused exports)."}),r>0&&h.jsx(up,{label:`${r} suppressed`,tone:"muted",title:"Findings you acknowledged. They still exist but are hidden from the main list."}),h.jsxs("button",{onClick:o,className:ve("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md border text-[11px] font-medium transition-colors",i?"bg-primary-500/15 border-primary-500/40 text-primary-300":"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700"),children:[i?h.jsx(Ml,{className:"w-3 h-3"}):null,"Hide unreachable"]}),h.jsxs("button",{onClick:c,className:ve("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md border text-[11px] font-medium transition-colors",l?"bg-primary-500/15 border-primary-500/40 text-primary-300":"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700"),title:"When on, reachable findings appear above unknown / unreachable inside each severity group.",children:[l?h.jsx(Ml,{className:"w-3 h-3"}):null,"Reachable-first"]}),r>0&&h.jsxs("button",{onClick:d,className:ve("inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md border text-[11px] font-medium transition-colors",f?"bg-primary-500/15 border-primary-500/40 text-primary-300":"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700"),title:"Reveal acknowledged findings inline with the rest.",children:[f?h.jsx(Lm,{className:"w-3 h-3"}):h.jsx(Ju,{className:"w-3 h-3"}),f?"Hide suppressed":`Show suppressed (${r})`]})]})}function up({label:e,tone:t,title:n}){return h.jsx("span",{title:n,className:ve("inline-flex items-center px-2 py-0.5 rounded-full border text-[11px] font-medium",t==="warn"?"bg-orange-500/10 border-orange-500/30 text-orange-300":"bg-gray-800 border-gray-700 text-gray-400"),children:e})}function Jhe({groups:e,findingsById:t,fixInFlight:n,newFindingIds:r,suppressions:i,showSuppressed:o}){const l=e.filter(c=>o||c.findingIds.length===0?!0:!c.findingIds.every(f=>i.isSuppressed(`d:${f}`)));return l.length===0?null:h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(eD,{className:"w-4 h-4 text-primary-400"}),h.jsx("h3",{className:"text-sm font-semibold text-white tracking-tight",children:"Recommended fixes"}),h.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:["(",l.length,l.length!==e.length?` of ${e.length}`:"",")"]})]}),h.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."}),h.jsx("div",{className:"space-y-3",children:l.map(c=>{const f=c.findingIds.some(y=>r.has(`d:${y}`)),d=c.findingIds.length>0&&c.findingIds.every(y=>i.isSuppressed(`d:${y}`));return h.jsx(epe,{group:c,findings:c.findingIds.map(y=>t.get(y)).filter(y=>!!y),fixInFlight:n,isNew:f,allSuppressed:d},c.id)})})]})}function epe({group:e,findings:t,fixInFlight:n,isNew:r,allSuppressed:i}){const o=os[e.severity],{applyFix:l}=Yi(),[c,f]=$.useState(!1),[d,y]=$.useState(!1),p=()=>{e.fix.command&&(navigator.clipboard.writeText(e.fix.command),y(!0),setTimeout(()=>y(!1),1500))},g=()=>{!e.fix.command||e.fix.kind==="none"||e.fix.kind==="override"||l({targetKind:"fix-group",targetId:e.id,command:e.fix.command,allowMajor:e.fix.kind==="audit-fix-force"||e.breaking})};return h.jsxs("div",{className:ve("rounded-lg border bg-gray-900/40 overflow-hidden transition-opacity",o.ring,i&&"opacity-60"),children:[h.jsxs("div",{className:"p-4 space-y-3",children:[h.jsx("div",{className:"flex items-start justify-between gap-4 flex-wrap",children:h.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx("span",{className:ve("inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",o.chip),children:e.severity}),e.breaking&&h.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:[h.jsx(Wr,{className:"w-3 h-3"})," breaking"]}),r&&h.jsx(wj,{}),i&&h.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border bg-gray-800 text-gray-400 border-gray-700",children:[h.jsx(Ju,{className:"w-3 h-3"})," all acked"]}),h.jsx(Sj,{level:e.reachability}),h.jsxs("span",{className:"text-[11px] text-gray-500",children:["Fixes ",e.findingIds.length," ",e.findingIds.length===1?"advisory":"advisories"]})]}),h.jsxs("h4",{className:"text-sm font-semibold text-white",children:["Upgrade ",h.jsx("span",{className:"font-mono text-primary-300",children:e.package})," ",h.jsx("span",{className:"font-mono text-gray-500",children:e.fromVersion}),h.jsx("span",{className:"mx-2 text-gray-600",children:"→"}),h.jsx("span",{className:"font-mono text-success-500",children:e.toVersion})]}),e.fix.note&&h.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:e.fix.note})]})}),h.jsx(bL,{spec:e.fix,copied:d,onCopy:p}),h.jsxs("div",{className:"flex items-center gap-2 flex-wrap pt-1",children:[h.jsxs("button",{onClick:g,disabled:n||e.fix.kind==="none"||e.fix.kind==="override",className:ve("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:[h.jsx(G_,{className:"w-3.5 h-3.5"}),"Apply fix"]}),h.jsxs("button",{onClick:()=>f(v=>!v),className:"inline-flex items-center gap-1 px-2 py-1.5 text-xs text-gray-400 hover:text-gray-200 transition-colors",children:[c?h.jsx(Pr,{className:"w-3.5 h-3.5"}):h.jsx(ni,{className:"w-3.5 h-3.5"}),c?"Hide advisories":`Show ${e.findingIds.length} ${e.findingIds.length===1?"advisory":"advisories"}`]})]})]}),c&&t.length>0&&h.jsx("div",{className:"border-t border-gray-800 bg-gray-950/50 p-3 space-y-2",children:t.map(v=>h.jsxs("div",{className:"flex items-center justify-between gap-3 px-3 py-2 rounded bg-gray-900/60 border border-gray-800",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[h.jsx("span",{className:ve("inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",os[v.severity].chip),children:v.severity}),h.jsx("span",{className:"text-[10px] font-mono text-gray-500",children:v.id})]}),h.jsx("p",{className:"text-xs text-gray-300 truncate",children:v.title})]}),C_(v)&&h.jsxs("a",{href:C_(v),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 ",h.jsx(Xa,{className:"w-3 h-3"})]})]},v.id))})]})}function tpe({finding:e,fixInFlight:t,isNew:n,suppression:r,onSuppress:i,onUnsuppress:o}){const l=os[e.severity],c=C_(e),{applyFix:f}=Yi(),[d,y]=$.useState(!1),p=e.fix&&e.fix.command&&e.fix.kind!=="none"&&e.fix.kind!=="override",g=()=>{var w;(w=e.fix)!=null&&w.command&&(navigator.clipboard.writeText(e.fix.command),y(!0),setTimeout(()=>y(!1),1500))},v=()=>{!p||!e.fix||f({targetKind:"finding",targetId:e.id,command:e.fix.command,allowMajor:e.fix.breaking})};return h.jsxs("div",{className:ve("rounded-lg border bg-gray-900/40 p-4 space-y-3 transition-opacity",l.ring,r&&"opacity-60"),children:[h.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[h.jsx("span",{className:ve("inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",l.chip),children:e.severity}),e.cvss!==void 0&&h.jsxs("span",{className:"text-[10px] font-mono text-gray-500",children:["CVSS ",e.cvss.toFixed(1)]}),e.reachability&&h.jsx(Sj,{level:e.reachability.level}),n&&h.jsx(wj,{}),h.jsx("span",{className:"text-[10px] font-mono text-gray-500",children:e.id})]}),h.jsx("h4",{className:"text-sm font-semibold text-white truncate",title:e.title,children:e.title}),h.jsxs("div",{className:"mt-1 text-xs text-gray-400 font-mono",children:[h.jsx("span",{className:"text-gray-300",children:e.package}),h.jsx("span",{className:"text-gray-600 mx-1",children:"·"}),"installed ",h.jsx("span",{className:"text-gray-300",children:e.installedVersion}),e.fixedVersion&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-gray-600 mx-1",children:"→"}),"fix in ",h.jsx("span",{className:"text-success-500",children:e.fixedVersion})]})]})]}),c&&h.jsxs("a",{href:c,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 ",h.jsx(Xa,{className:"w-3 h-3"})]})]}),e.summary&&h.jsx("p",{className:"text-xs text-gray-400 leading-relaxed",children:e.summary}),e.rootCause&&!e.rootCause.isDirect&&h.jsx(npe,{finding:e}),e.reachability&&h.jsx(rpe,{info:e.reachability}),e.fix&&h.jsxs(h.Fragment,{children:[e.fix.command&&h.jsx(bL,{spec:e.fix,copied:d,onCopy:g}),h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsxs("button",{onClick:v,disabled:!p||t,className:ve("inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-lg transition-colors border",!p||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:[h.jsx(G_,{className:"w-3.5 h-3.5"}),e.fix.label]}),e.fix.note&&h.jsx("span",{className:"text-[11px] text-gray-500",children:e.fix.note}),h.jsx("div",{className:"ml-auto",children:h.jsx(T_,{prefixedId:`d:${e.id}`,suppression:r,onSuppress:i,onUnsuppress:o})})]})]}),!e.fix&&h.jsx("div",{className:"flex items-center justify-end",children:h.jsx(T_,{prefixedId:`d:${e.id}`,suppression:r,onSuppress:i,onUnsuppress:o})})]})}function bL({spec:e,copied:t,onCopy:n}){return e.command?h.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2",children:[h.jsx(kl,{className:"w-3.5 h-3.5 text-gray-500 flex-shrink-0"}),h.jsx("code",{className:"flex-1 text-xs font-mono text-gray-300 truncate",children:e.command}),h.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?h.jsx(Ml,{className:"w-3.5 h-3.5 text-success-500"}):h.jsx(ss,{className:"w-3.5 h-3.5"}),t?"Copied":"Copy"]})]}):null}function npe({finding:e}){const t=e.rootCause;return t?h.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/40 px-3 py-2 text-[11px] text-gray-400",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[h.jsx(tD,{className:"w-3 h-3 text-yellow-400"}),h.jsx("span",{className:"uppercase tracking-wide text-yellow-400/80 font-medium",children:"Root cause"}),h.jsxs("span",{className:"text-gray-500",children:["via"," ",h.jsx("span",{className:"font-mono text-gray-300",children:t.rootPackage})," ",h.jsx("span",{className:"text-gray-600",children:t.rootInstalledVersion})]})]}),h.jsx("div",{className:"font-mono text-gray-500 leading-relaxed truncate",title:t.chain.join(" → "),children:t.chain.join(" → ")})]}):null}function rpe({info:e}){if(e.level==="unknown")return null;const t=wL[e.level];return h.jsxs("div",{className:ve("rounded-md border px-3 py-2 text-[11px] leading-relaxed",t.row),children:[h.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[h.jsx(Z_,{className:ve("w-3 h-3",t.icon)}),h.jsx("span",{className:ve("uppercase tracking-wide font-medium",t.icon),children:e.level==="confirmed"?"Confirmed reachable":e.level}),e.runtimeHits>0&&h.jsxs("span",{className:"text-gray-400",children:["· ",e.runtimeHits," request",e.runtimeHits===1?"":"s"]})]}),h.jsx("p",{className:"text-gray-400",children:e.reason}),e.routes.length>0&&h.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 wL={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 Sj({level:e}){if(!e||e==="unknown")return null;const t=wL[e],n=e==="confirmed"?"reachable":e==="unreachable"?"unreachable":"likely";return h.jsxs("span",{className:ve("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:[h.jsx(Z_,{className:"w-3 h-3"})," ",n]})}function C_(e){return e.references.find(t=>/github\.com\/advisories|osv\.dev|nvd\.nist\.gov/i.test(t))??e.references[0]}function ipe(){var o,l,c;const e=ht(f=>f.fixRun),t=ht(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 h.jsxs("div",{className:ve("rounded-lg border overflow-hidden",i),children:[h.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 border-b border-gray-800/60",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[n?r?h.jsx(Ml,{className:"w-4 h-4 text-success-500"}):h.jsx(Xf,{className:"w-4 h-4 text-red-400"}):h.jsx(ef,{className:"w-4 h-4 animate-spin text-primary-400"}),h.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…"}),h.jsx("code",{className:"text-[11px] font-mono text-gray-400 truncate max-w-[60vw]",children:e.command})]}),h.jsx("button",{onClick:t,className:"text-gray-500 hover:text-gray-300 transition-colors",title:"Dismiss",disabled:!n,children:h.jsx(Dr,{className:"w-4 h-4"})})]}),h.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(`
|
|
565
|
+
`),n&&((c=e.result)==null?void 0:c.errorTail)&&h.jsxs(h.Fragment,{children:[`
|
|
566
|
+
`,e.result.errorTail.trim()]})]})]})}function ape({report:e,newFindingIds:t,suppressions:n,onOpenExchange:r,onOpenRoute:i,onOpenLogs:o}){const l=ht(j=>j.routes),[c,f]=$.useState(null),[d,y]=$.useState(!1),p=lpe((e==null?void 0:e.posture)??[]),g=ope(l,(e==null?void 0:e.posture)??[]);if(!e)return h.jsx(hl,{icon:ef,message:"Connecting to agent…"});const v=e.posture.filter(j=>n.isSuppressed(`p:${j.id}`)).length,w=h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[h.jsx("div",{className:"lg:col-span-2",children:h.jsx(cpe,{counts:p,filter:c,onSelect:f})}),h.jsx(spe,{coverage:g})]});if(e.posture.length===0)return h.jsxs("div",{className:"space-y-6",children:[w,h.jsx(ZR,{findings:e.posture}),h.jsx(hl,{icon:Ja,tone:"success",message:"No runtime posture findings yet. Send some requests through your app — the analyzer evaluates recorded traffic."})]});let S=e.posture;c&&(S=S.filter(j=>j.owasp===c)),d||(S=S.filter(j=>!n.isSuppressed(`p:${j.id}`)));const b=km(S);return h.jsxs("div",{className:"space-y-6",children:[w,h.jsx(ZR,{findings:e.posture}),h.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs",children:[c&&h.jsxs("div",{className:"text-gray-400",children:["Filtered to"," ",h.jsx("span",{className:"font-mono text-purple-300",children:c})," ","(",S.length," finding",S.length===1?"":"s",") ·"," ",h.jsx("button",{onClick:()=>f(null),className:"text-primary-400 hover:underline",children:"clear"})]}),v>0&&h.jsxs("button",{onClick:()=>y(j=>!j),className:ve("ml-auto inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md border text-[11px] font-medium transition-colors",d?"bg-primary-500/15 border-primary-500/40 text-primary-300":"bg-gray-800 border-gray-700 text-gray-300 hover:bg-gray-700"),children:[d?h.jsx(Lm,{className:"w-3 h-3"}):h.jsx(Ju,{className:"w-3 h-3"}),d?"Hide suppressed":`Show suppressed (${v})`]})]}),bl.map(j=>{const T=b[j]??[];return T.length===0?null:h.jsx(SL,{severity:j,count:T.length,children:T.map(N=>h.jsx(upe,{finding:N,isNew:t.has(`p:${N.id}`),suppression:n.map[`p:${N.id}`],onSuppress:n.suppress,onUnsuppress:n.unsuppress,onOpenExchange:r,onOpenRoute:i,onOpenLogs:o},N.id))},j)})]})}function ope(e,t){return $.useMemo(()=>{const n=[],r=new Set;for(const c of t){if(c.rule!=="unauthenticated-route"||c.evidence.kind!=="route")continue;const f=`${c.evidence.method}:${c.evidence.path}`;r.has(f)||(r.add(f),n.push({method:c.evidence.method,path:c.evidence.path}))}const i=e.length,o=Math.min(n.length,i||n.length),l=Math.max(0,i-o);return{total:i,unauthenticated:o,authenticated:l,unauthRoutes:n}},[e,t])}function spe({coverage:e}){const{total:t,unauthenticated:n,authenticated:r,unauthRoutes:i}=e,o=t>0?Math.round(r/t*100):100;if(t===0)return h.jsxs("div",{className:"bg-gray-900/40 border border-gray-800 rounded-xl p-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(JP,{className:"w-4 h-4 text-gray-500"}),h.jsx("h3",{className:"text-sm font-semibold text-white tracking-tight",children:"Auth coverage"})]}),h.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:"No routes discovered yet. Once your app starts handling requests, Studio will show how many endpoints look authenticated."})]});const l=n===0?"text-success-500":n<=1?"text-yellow-300":"text-orange-300";return h.jsxs("div",{className:"bg-gray-900/40 border border-gray-800 rounded-xl p-4 h-full flex flex-col",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Ja,{className:"w-4 h-4 text-purple-400"}),h.jsx("h3",{className:"text-sm font-semibold text-white tracking-tight",children:"Auth coverage"})]}),h.jsxs("div",{className:"flex items-baseline gap-2",children:[h.jsx("span",{className:ve("text-2xl font-bold tabular-nums",l),children:r}),h.jsxs("span",{className:"text-sm text-gray-500",children:["/ ",t," routes"]}),h.jsxs("span",{className:"ml-auto text-[11px] font-mono text-gray-500",children:[o,"%"]})]}),h.jsx("div",{className:"mt-2 h-1.5 rounded-full overflow-hidden bg-gray-800",children:h.jsx("div",{className:ve("h-full transition-all",n===0?"bg-success-500":"bg-yellow-400"),style:{width:`${o}%`}})}),n>0?h.jsxs("div",{className:"mt-3 text-[11px] text-gray-400 leading-relaxed",children:[h.jsxs("div",{className:"text-gray-500 mb-1",children:[n," route",n===1?"":"s"," appear unauthenticated:"]}),h.jsxs("ul",{className:"space-y-0.5 max-h-20 overflow-y-auto",children:[i.slice(0,5).map(c=>h.jsxs("li",{className:"font-mono text-gray-300 truncate",title:`${c.method} ${c.path}`,children:[h.jsx("span",{className:"text-gray-500 mr-1.5",children:c.method}),c.path]},`${c.method}:${c.path}`)),i.length>5&&h.jsxs("li",{className:"text-gray-600",children:["+ ",i.length-5," more"]})]})]}):h.jsx("p",{className:"mt-3 text-[11px] text-gray-500 leading-relaxed",children:"Every observed route either required credentials or matched a conventional public path (`/health`, `/metrics`, …)."})]})}const QR=[{group:"Response headers",rules:[{rule:"missing-content-security-policy",title:"Content-Security-Policy",description:"Mitigates XSS and resource-injection attacks.",severity:"MEDIUM",owasp:"API8:2023"},{rule:"missing-strict-transport-security",title:"Strict-Transport-Security",description:"Forces HTTPS for the configured max-age window.",severity:"MEDIUM",owasp:"API8:2023"},{rule:"missing-x-content-type-options",title:"X-Content-Type-Options",description:"Stops MIME sniffing on responses.",severity:"LOW",owasp:"API8:2023"},{rule:"missing-x-frame-options",title:"X-Frame-Options",description:"Prevents clickjacking via embedded iframes.",severity:"LOW",owasp:"API8:2023"},{rule:"missing-referrer-policy",title:"Referrer-Policy",description:"Controls how much URL information leaves the origin.",severity:"LOW",owasp:"API8:2023"}]},{group:"Cross-origin",rules:[{rule:"permissive-cors",title:"Permissive CORS",description:"Wildcard `Access-Control-Allow-Origin: *`, especially on authenticated routes.",severity:"HIGH",owasp:"API8:2023"}]},{group:"Authentication",rules:[{rule:"unauthenticated-route",title:"Unauthenticated routes",description:"Routes returning 2xx with no observed `Authorization` / cookie and no global auth middleware.",severity:"LOW",owasp:"API2:2023"}]},{group:"Error handling",rules:[{rule:"verbose-error",title:"Stack traces in 5xx responses",description:"Server errors that leak implementation details to the client.",severity:"MEDIUM",owasp:"API8:2023"}]},{group:"Secret leakage",rules:[{rule:"response-secret",title:"Secrets in response bodies",description:"High-precision patterns: AWS keys, GitHub PATs, Slack tokens, Stripe live keys, JWTs.",severity:"HIGH",owasp:"API3:2023"},{rule:"log-secret",title:"Secrets in log lines",description:"Same patterns as above, scanned across every captured log entry.",severity:"MEDIUM",owasp:"API3:2023"}]},{group:"Input validation",rules:[{rule:"unvalidated-body",title:"Body without obvious validation",description:"Controllers accepting non-empty request bodies but not importing zod / class-validator / a DTO.",severity:"INFO",owasp:"API4:2023"}]}];function ZR({findings:e}){const[t,n]=$.useState(!1),r=$.useMemo(()=>{const o={};for(const l of e)o[l.rule]=(o[l.rule]??0)+1;return o},[e]),i=$.useMemo(()=>{let o=0,l=0;for(const c of QR)for(const f of c.rules)o++,(f.matchPrefix?Object.keys(r).some(y=>y.startsWith(f.matchPrefix)):(r[f.rule]??0)>0)||l++;return{total:o,clean:l}},[r]);return h.jsxs("div",{className:"bg-gray-900/40 border border-gray-800 rounded-xl overflow-hidden",children:[h.jsxs("button",{onClick:()=>n(o=>!o),className:"w-full flex items-center justify-between gap-3 px-4 py-3 hover:bg-gray-800/40 transition-colors",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[t?h.jsx(Pr,{className:"w-4 h-4 text-gray-500"}):h.jsx(ni,{className:"w-4 h-4 text-gray-500"}),h.jsx(Ja,{className:"w-4 h-4 text-success-500"}),h.jsx("h3",{className:"text-sm font-semibold text-white tracking-tight",children:"What Studio checks for"})]}),h.jsxs("span",{className:"text-[11px] text-gray-500",children:[h.jsx("span",{className:"text-success-500 font-medium",children:i.clean})," / ",i.total," checks clean"]})]}),t&&h.jsxs("div",{className:"px-4 pb-4 pt-1 space-y-4",children:[h.jsx("p",{className:"text-[11px] text-gray-500 leading-relaxed",children:"Each check runs over recorded traffic, the route map, the captured logs, or the application source. A green tick means the check ran and produced no findings — not that the check was skipped."}),QR.map(o=>h.jsxs("div",{children:[h.jsx("div",{className:"text-[11px] uppercase tracking-wider text-gray-500 mb-2",children:o.group}),h.jsx("ul",{className:"space-y-1.5",children:o.rules.map(l=>{const c=l.matchPrefix?Object.entries(r).filter(([d])=>d.startsWith(l.matchPrefix)).reduce((d,[,y])=>d+y,0):r[l.rule]??0,f=c===0;return h.jsxs("li",{className:"flex items-start gap-3 text-xs",children:[h.jsx("span",{className:ve("inline-flex items-center justify-center w-4 h-4 rounded-full mt-0.5 shrink-0",f?"bg-success-500/15 text-success-500":"bg-orange-500/15 text-orange-300"),children:f?h.jsx(Ml,{className:"w-3 h-3"}):h.jsx(Wr,{className:"w-3 h-3"})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.jsx("span",{className:ve("font-medium",f?"text-gray-300":"text-orange-200"),children:l.title}),h.jsx("span",{className:"text-[10px] font-mono text-purple-400/80",children:l.owasp}),h.jsx("span",{className:"text-[10px] font-mono text-gray-600",children:l.severity}),!f&&h.jsxs("span",{className:"text-[10px] font-mono text-orange-300",children:[c," finding",c===1?"":"s"]})]}),h.jsx("div",{className:"text-gray-500 mt-0.5",children:l.description})]})]},l.rule)})})]},o.group))]})]})}function lpe(e){return $.useMemo(()=>{const t={};for(const n of xL)t[n.code]=0;for(const n of e)n.owasp&&t[n.owasp]!==void 0&&t[n.owasp]++;return t},[e])}function cpe({counts:e,filter:t,onSelect:n}){return h.jsxs("div",{className:"bg-gray-900/40 border border-gray-800 rounded-xl p-4",children:[h.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[h.jsx(Ja,{className:"w-4 h-4 text-purple-400"}),h.jsx("h3",{className:"text-sm font-semibold text-white tracking-tight",children:"OWASP API Security Top 10 (2023)"}),h.jsx("span",{className:"text-[11px] text-gray-500",children:"coverage at a glance — click a cell to filter"})]}),h.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-2",children:xL.map(r=>{const i=e[r.code]??0,o=i===0?"border-success-500/30 bg-success-500/5 text-success-500":i<3?"border-yellow-500/30 bg-yellow-500/5 text-yellow-300":"border-red-500/40 bg-red-500/10 text-red-300",l=t===r.code;return h.jsxs("button",{onClick:()=>n(l?null:r.code),title:`${r.code} · ${r.label} — ${i} finding${i===1?"":"s"}`,className:ve("text-left p-2.5 rounded-lg border transition-colors",o,l?"ring-2 ring-primary-400/60":"hover:brightness-125"),children:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("span",{className:"text-[11px] font-mono font-medium",children:r.code.replace(":2023","")}),h.jsx("span",{className:"text-sm font-bold tabular-nums",children:i})]}),h.jsx("div",{className:"mt-1 text-[10px] leading-tight opacity-80 line-clamp-2",children:r.label})]},r.code)})})]})}function upe({finding:e,isNew:t,suppression:n,onSuppress:r,onUnsuppress:i,onOpenExchange:o,onOpenRoute:l,onOpenLogs:c}){const f=os[e.severity];return h.jsxs("div",{className:ve("rounded-lg border bg-gray-900/40 p-4 space-y-3 transition-opacity",f.ring,n&&"opacity-60"),children:[h.jsxs("div",{className:"flex items-start justify-between gap-4",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[h.jsx("span",{className:ve("inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-mono font-medium border",f.chip),children:e.severity}),e.owasp&&h.jsxs("span",{className:"text-[10px] font-mono text-purple-400",children:["OWASP ",e.owasp]}),t&&h.jsx(wj,{}),h.jsx("span",{className:"text-[10px] font-mono text-gray-600",children:e.rule})]}),h.jsx("h4",{className:"text-sm font-semibold text-white",children:e.title}),h.jsx("p",{className:"mt-1 text-xs text-gray-400 leading-relaxed",children:e.description}),e.fixHint&&h.jsxs("p",{className:"mt-2 text-xs text-success-500/80 leading-relaxed",children:[h.jsx("span",{className:"font-medium mr-1",children:"Fix:"}),e.fixHint]})]}),h.jsx(fpe,{finding:e,onOpenExchange:o,onOpenRoute:l,onOpenLogs:c})]}),h.jsx("div",{className:"flex items-center justify-end pt-1",children:h.jsx(T_,{prefixedId:`p:${e.id}`,suppression:n,onSuppress:r,onUnsuppress:i})})]})}function fpe({finding:e,onOpenExchange:t,onOpenRoute:n,onOpenLogs:r}){switch(e.evidence.kind){case"exchange":{const i=e.evidence.exchangeId;return h.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 ",h.jsx(Xa,{className:"w-3 h-3"})]})}case"route":return h.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:[h.jsxs("span",{className:"font-mono",children:[e.evidence.method," ",e.evidence.path]}),h.jsx(Xa,{className:"w-3 h-3"})]});case"log":return h.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 ",h.jsx(Xa,{className:"w-3 h-3"})]});case"file":{const i=e.evidence;return h.jsxs("button",{onClick:()=>ls({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:[h.jsx(Xi,{className:"w-3 h-3"})," Open file"]})}default:return null}}function SL({severity:e,count:t,children:n}){const r=os[e],i=dpe(e);return h.jsxs("div",{className:"space-y-3",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(i,{className:ve("w-4 h-4",r.text)}),h.jsx("h3",{className:ve("text-sm font-semibold capitalize",r.text),children:e.toLowerCase()}),h.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:["(",t,")"]})]}),h.jsx("div",{className:"space-y-3",children:n})]})}function dpe(e){switch(e){case"CRITICAL":return jp;case"HIGH":return Wr;case"MEDIUM":return JP;case"LOW":return Ja;default:return Kf}}function km(e){const t={};for(const n of e){const r=t[n.severity]??[];r.push(n),t[n.severity]=r}return t}function hl({icon:e,message:t,spin:n=!1,tone:r="default"}){return h.jsx("div",{className:"flex items-center justify-center py-16",children:h.jsxs("div",{className:"text-center max-w-md",children:[h.jsx(e,{className:ve("w-10 h-10 mx-auto mb-3",r==="success"?"text-success-500":"text-gray-600",n&&"animate-spin")}),h.jsx("p",{className:"text-sm text-gray-400 leading-relaxed",children:t})]})})}const $w=50,hpe={hasOne:"text-sky-300 bg-sky-950/40 border-sky-700/40",hasMany:"text-emerald-300 bg-emerald-950/40 border-emerald-700/40",belongsTo:"text-amber-300 bg-amber-950/40 border-amber-700/40",manyToMany:"text-purple-300 bg-purple-950/40 border-purple-700/40"};function ppe(e){if(!e||e<1024)return`${e} B`;const t=e/1024;return t<1024?`${t.toFixed(1)} KB`:`${(t/1024).toFixed(1)} MB`}function JR(e){return e===null?"null":e===void 0?"":e instanceof Date?e.toISOString():typeof e=="object"?JSON.stringify(e):String(e)}function mpe(){const e=ht(y=>y.databaseSnapshot),t=ht(y=>y.databaseTableData),{requestDatabaseSchema:n,requestDatabaseTable:r}=Yi(),[i,o]=$.useState(null),[l,c]=$.useState(0);$.useEffect(()=>{n()},[n]);const f=$.useMemo(()=>(e==null?void 0:e.entities)??[],[e]);$.useEffect(()=>{!i&&f.length>0&&o(f[0].name)},[f,i]),$.useEffect(()=>{i&&r(i,l,$w)},[i,l,r]);const d=$.useMemo(()=>f.find(y=>y.name===i)??null,[f,i]);return!e||!e.available?h.jsxs("div",{className:"flex flex-col items-center justify-center h-[60vh] text-gray-500",children:[h.jsx(dc,{className:"w-12 h-12 mb-4 opacity-50"}),h.jsx("p",{className:"text-lg",children:"No in-memory database detected"}),h.jsxs("p",{className:"text-sm mt-2 max-w-md text-center",children:["Register the ",h.jsx("code",{className:"text-gray-400",children:"InMemoryDBProvider"})," ","as a singleton in your app's ",h.jsx("code",{className:"text-gray-400",children:"configureServices()"})," ","to inspect its schema and data here."]})]}):h.jsxs("div",{className:"space-y-4",children:[h.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[h.jsx(Iw,{label:"Tables",value:e.tableCount}),h.jsx(Iw,{label:"Total records",value:e.totalRecords}),h.jsx(Iw,{label:"Captured",value:new Date(e.timestamp).toLocaleTimeString()})]}),h.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[260px_1fr] gap-4",children:[h.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-lg overflow-hidden",children:[h.jsxs("div",{className:"px-3 py-2 border-b border-gray-800 text-xs uppercase tracking-wide text-gray-500 flex items-center gap-2",children:[h.jsx(O7,{className:"w-3.5 h-3.5"})," Tables"]}),f.length===0?h.jsx("p",{className:"px-3 py-4 text-sm text-gray-500",children:"No tables created yet."}):h.jsx("ul",{children:f.map(y=>h.jsx("li",{children:h.jsxs("button",{onClick:()=>{o(y.name),c(0)},className:`flex items-center justify-between w-full px-3 py-2 text-left text-sm transition-colors ${i===y.name?"bg-primary-500/10 text-primary-300":"text-gray-300 hover:bg-gray-800"}`,children:[h.jsx("span",{className:"truncate",children:y.name}),h.jsx("span",{className:"ml-2 text-[10px] px-1.5 py-0.5 rounded bg-gray-800 text-gray-400",children:y.recordCount})]})},y.name))})]}),h.jsx("div",{className:"space-y-4 min-w-0",children:d?h.jsxs(h.Fragment,{children:[h.jsx(ype,{entity:d}),h.jsx(xpe,{entity:d,rows:(t==null?void 0:t.table)===d.name?t.rows:[],total:(t==null?void 0:t.table)===d.name?t.total:d.recordCount,offset:l,onPrev:()=>c(y=>Math.max(0,y-$w)),onNext:()=>c(y=>y+$w)})]}):h.jsx("div",{className:"flex items-center justify-center h-40 text-gray-500 text-sm",children:"Select a table to inspect its schema and data."})})]})]})}function ype({entity:e}){return h.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-lg",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-4 py-3 border-b border-gray-800",children:[h.jsx(dc,{className:"w-4 h-4 text-primary-400"}),h.jsx("h3",{className:"text-sm font-semibold text-white",children:e.name}),e.timestamps&&h.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded border border-gray-700 text-gray-400",children:[h.jsx(Zu,{className:"w-3 h-3"})," timestamps"]}),e.softDelete&&h.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded border border-gray-700 text-gray-400",children:[h.jsx(Ap,{className:"w-3 h-3"})," soft delete"]}),h.jsxs("span",{className:"ml-auto text-xs text-gray-500",children:[ppe(e.memoryEstimate)," · ",e.recordCount," rows"]})]}),h.jsxs("div",{className:"px-4 py-3",children:[h.jsx("h4",{className:"text-[11px] uppercase tracking-wide text-gray-500 mb-2",children:"Fields"}),h.jsx("div",{className:"flex flex-wrap gap-2",children:e.fields.map(t=>h.jsx(gpe,{field:t},t.name))})]}),e.relations.length>0&&h.jsxs("div",{className:"px-4 py-3 border-t border-gray-800",children:[h.jsx("h4",{className:"text-[11px] uppercase tracking-wide text-gray-500 mb-2",children:"Relations"}),h.jsx("ul",{className:"space-y-1.5",children:e.relations.map(t=>h.jsx(vpe,{relation:t},t.field))})]})]})}function gpe({field:e}){return h.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded border border-gray-700 bg-gray-800/60 text-xs text-gray-200",children:[e.isPrimaryKey&&h.jsx(u7,{className:"w-3 h-3 text-amber-400"}),e.isUnique&&!e.isPrimaryKey&&h.jsx(o7,{className:"w-3 h-3 text-sky-400"}),e.isIndexed&&!e.isUnique&&!e.isPrimaryKey&&h.jsx(c7,{className:"w-3 h-3 text-gray-400"}),h.jsx("span",{children:e.name}),e.autoGenerate&&h.jsx("span",{className:"text-[10px] text-emerald-400",children:e.autoGenerate}),e.isNullable&&h.jsx("span",{className:"text-[10px] text-gray-500",children:"nullable"})]})}function vpe({relation:e}){const t=hpe[e.type]||"text-gray-300 bg-gray-800 border-gray-700";return h.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[h.jsx(h7,{className:"w-3.5 h-3.5 text-gray-500"}),h.jsx("span",{className:"text-gray-200",children:e.field}),h.jsx("span",{className:`inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium border ${t}`,children:e.type}),h.jsxs("span",{className:"text-gray-500",children:["→ ",e.target]}),e.through&&h.jsxs("span",{className:"text-[10px] text-gray-500",children:["(via ",e.through,")"]}),e.foreignKey&&h.jsxs("span",{className:"text-[10px] text-gray-600",children:["fk: ",e.foreignKey]})]})}function xpe({entity:e,rows:t,total:n,offset:r,onPrev:i,onNext:o}){const l=$.useMemo(()=>{const p=e.fields.map(v=>v.name),g=new Set(p);for(const v of t)for(const w of Object.keys(v))g.has(w)||(g.add(w),p.push(w));return p},[e,t]),c=n===0?0:r+1,f=r+t.length,d=r>0,y=f<n;return h.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-lg",children:[h.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-gray-800",children:[h.jsx("h4",{className:"text-[11px] uppercase tracking-wide text-gray-500",children:"Rows"}),h.jsxs("div",{className:"flex items-center gap-2 text-xs text-gray-500",children:[h.jsxs("span",{children:[c,"–",f," of ",n]}),h.jsx("button",{onClick:i,disabled:!d,className:"p-1 rounded hover:bg-gray-800 disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Previous page",children:h.jsx(YP,{className:"w-4 h-4"})}),h.jsx("button",{onClick:o,disabled:!y,className:"p-1 rounded hover:bg-gray-800 disabled:opacity-30 disabled:cursor-not-allowed","aria-label":"Next page",children:h.jsx(ni,{className:"w-4 h-4"})})]})]}),t.length===0?h.jsx("p",{className:"px-4 py-6 text-sm text-gray-500 text-center",children:"No rows in this table."}):h.jsx("div",{className:"overflow-x-auto",children:h.jsxs("table",{className:"w-full text-xs",children:[h.jsx("thead",{children:h.jsx("tr",{className:"text-left text-gray-500 border-b border-gray-800",children:l.map(p=>h.jsx("th",{className:"px-3 py-2 font-medium whitespace-nowrap",children:p},p))})}),h.jsx("tbody",{children:t.map((p,g)=>h.jsx("tr",{className:"border-b border-gray-800/60 hover:bg-gray-800/40",children:l.map(v=>h.jsx("td",{className:"px-3 py-1.5 text-gray-300 max-w-[280px] truncate",title:JR(p[v]),children:JR(p[v])},v))},p.id??g))})]})})]})}function Iw({label:e,value:t}){return h.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-lg px-4 py-3",children:[h.jsx("div",{className:"text-xs text-gray-500",children:e}),h.jsx("div",{className:"text-xl font-semibold text-white mt-1",children:t})]})}const bpe=new fz({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}});function wpe(){const{currentView:e,selectedExchangeId:t,setSelectedExchangeId:n}=ht(),[r,i]=$.useState(!1);m9({onToggleHelp:()=>i(l=>!l),onCloseAll:()=>{r?i(!1):t&&n(null)}});const o=()=>{switch(e){case"status":return h.jsx(yhe,{});case"requests":return h.jsx(qE,{});case"architecture":return h.jsx(xK,{});case"metrics":return h.jsx(Bde,{});case"replay":return h.jsx(Qde,{});case"api-client":return h.jsx(Jde,{});case"container":return h.jsx(ihe,{});case"database":return h.jsx(mpe,{});case"logs":return h.jsx(fhe,{});case"security":return h.jsx(The,{});default:return h.jsx(qE,{})}};return h.jsxs(z7,{children:[o(),t&&h.jsx(uH,{}),r&&h.jsx(phe,{onClose:()=>i(!1)})]})}function Spe(){return h.jsx(hz,{client:bpe,children:h.jsx(d9,{children:h.jsx(wpe,{})})})}$B.createRoot(document.getElementById("root")).render(h.jsx($.StrictMode,{children:h.jsx(Spe,{})}));
|
|
567
|
+
//# sourceMappingURL=index-Beegyg-P.js.map
|