flowyml 1.7.1__py3-none-any.whl → 1.7.2__py3-none-any.whl
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.
- flowyml/assets/dataset.py +570 -17
- flowyml/assets/model.py +1052 -15
- flowyml/core/executor.py +70 -11
- flowyml/core/orchestrator.py +37 -2
- flowyml/core/pipeline.py +32 -4
- flowyml/core/scheduler.py +88 -5
- flowyml/integrations/keras.py +247 -82
- flowyml/ui/backend/routers/runs.py +112 -0
- flowyml/ui/backend/routers/schedules.py +35 -15
- flowyml/ui/frontend/dist/assets/index-B40RsQDq.css +1 -0
- flowyml/ui/frontend/dist/assets/index-CjI0zKCn.js +685 -0
- flowyml/ui/frontend/dist/index.html +2 -2
- flowyml/ui/frontend/package-lock.json +11 -0
- flowyml/ui/frontend/package.json +1 -0
- flowyml/ui/frontend/src/app/assets/page.jsx +890 -321
- flowyml/ui/frontend/src/app/projects/[projectId]/_components/ProjectMetricsPanel.jsx +1 -1
- flowyml/ui/frontend/src/app/runs/[runId]/page.jsx +589 -101
- flowyml/ui/frontend/src/components/ArtifactViewer.jsx +62 -2
- flowyml/ui/frontend/src/components/AssetDetailsPanel.jsx +401 -28
- flowyml/ui/frontend/src/components/AssetTreeHierarchy.jsx +119 -11
- flowyml/ui/frontend/src/components/DatasetViewer.jsx +753 -0
- flowyml/ui/frontend/src/components/TrainingHistoryChart.jsx +514 -0
- flowyml/ui/frontend/src/components/TrainingMetricsPanel.jsx +175 -0
- {flowyml-1.7.1.dist-info → flowyml-1.7.2.dist-info}/METADATA +1 -1
- {flowyml-1.7.1.dist-info → flowyml-1.7.2.dist-info}/RECORD +28 -25
- flowyml/ui/frontend/dist/assets/index-BqDQvp63.js +0 -630
- flowyml/ui/frontend/dist/assets/index-By4trVyv.css +0 -1
- {flowyml-1.7.1.dist-info → flowyml-1.7.2.dist-info}/WHEEL +0 -0
- {flowyml-1.7.1.dist-info → flowyml-1.7.2.dist-info}/entry_points.txt +0 -0
- {flowyml-1.7.1.dist-info → flowyml-1.7.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,630 +0,0 @@
|
|
|
1
|
-
var ZF=Object.defineProperty;var QF=(e,t,r)=>t in e?ZF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var jy=(e,t,r)=>QF(e,typeof t!="symbol"?t+"":t,r);function q$(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(n,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var hh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var G$={exports:{}},I0={},K$={exports:{}},Ve={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its 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 Lf=Symbol.for("react.element"),JF=Symbol.for("react.portal"),eB=Symbol.for("react.fragment"),tB=Symbol.for("react.strict_mode"),rB=Symbol.for("react.profiler"),nB=Symbol.for("react.provider"),aB=Symbol.for("react.context"),iB=Symbol.for("react.forward_ref"),sB=Symbol.for("react.suspense"),oB=Symbol.for("react.memo"),lB=Symbol.for("react.lazy"),bN=Symbol.iterator;function cB(e){return e===null||typeof e!="object"?null:(e=bN&&e[bN]||e["@@iterator"],typeof e=="function"?e:null)}var Y$={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X$=Object.assign,Z$={};function Rc(e,t,r){this.props=e,this.context=t,this.refs=Z$,this.updater=r||Y$}Rc.prototype.isReactComponent={};Rc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Rc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Q$(){}Q$.prototype=Rc.prototype;function Hj(e,t,r){this.props=e,this.context=t,this.refs=Z$,this.updater=r||Y$}var Wj=Hj.prototype=new Q$;Wj.constructor=Hj;X$(Wj,Rc.prototype);Wj.isPureReactComponent=!0;var wN=Array.isArray,J$=Object.prototype.hasOwnProperty,qj={current:null},eR={key:!0,ref:!0,__self:!0,__source:!0};function tR(e,t,r){var n,a={},i=null,s=null;if(t!=null)for(n in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)J$.call(t,n)&&!eR.hasOwnProperty(n)&&(a[n]=t[n]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var l=Array(o),u=0;u<o;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(n in o=e.defaultProps,o)a[n]===void 0&&(a[n]=o[n]);return{$$typeof:Lf,type:e,key:i,ref:s,props:a,_owner:qj.current}}function uB(e,t){return{$$typeof:Lf,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Gj(e){return typeof e=="object"&&e!==null&&e.$$typeof===Lf}function dB(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var jN=/\/+/g;function ky(e,t){return typeof e=="object"&&e!==null&&e.key!=null?dB(""+e.key):t.toString(36)}function yp(e,t,r,n,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Lf:case JF:s=!0}}if(s)return s=e,a=a(s),e=n===""?"."+ky(s,0):n,wN(a)?(r="",e!=null&&(r=e.replace(jN,"$&/")+"/"),yp(a,t,r,"",function(u){return u})):a!=null&&(Gj(a)&&(a=uB(a,r+(!a.key||s&&s.key===a.key?"":(""+a.key).replace(jN,"$&/")+"/")+e)),t.push(a)),1;if(s=0,n=n===""?".":n+":",wN(e))for(var o=0;o<e.length;o++){i=e[o];var l=n+ky(i,o);s+=yp(i,t,r,l,a)}else if(l=cB(e),typeof l=="function")for(e=l.call(e),o=0;!(i=e.next()).done;)i=i.value,l=n+ky(i,o++),s+=yp(i,t,r,l,a);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function ph(e,t,r){if(e==null)return e;var n=[],a=0;return yp(e,n,"","",function(i){return t.call(r,i,a++)}),n}function fB(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var zr={current:null},vp={transition:null},hB={ReactCurrentDispatcher:zr,ReactCurrentBatchConfig:vp,ReactCurrentOwner:qj};function rR(){throw Error("act(...) is not supported in production builds of React.")}Ve.Children={map:ph,forEach:function(e,t,r){ph(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return ph(e,function(){t++}),t},toArray:function(e){return ph(e,function(t){return t})||[]},only:function(e){if(!Gj(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Ve.Component=Rc;Ve.Fragment=eB;Ve.Profiler=rB;Ve.PureComponent=Hj;Ve.StrictMode=tB;Ve.Suspense=sB;Ve.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=hB;Ve.act=rR;Ve.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var n=X$({},e.props),a=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=qj.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(l in t)J$.call(t,l)&&!eR.hasOwnProperty(l)&&(n[l]=t[l]===void 0&&o!==void 0?o[l]:t[l])}var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){o=Array(l);for(var u=0;u<l;u++)o[u]=arguments[u+2];n.children=o}return{$$typeof:Lf,type:e.type,key:a,ref:i,props:n,_owner:s}};Ve.createContext=function(e){return e={$$typeof:aB,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:nB,_context:e},e.Consumer=e};Ve.createElement=tR;Ve.createFactory=function(e){var t=tR.bind(null,e);return t.type=e,t};Ve.createRef=function(){return{current:null}};Ve.forwardRef=function(e){return{$$typeof:iB,render:e}};Ve.isValidElement=Gj;Ve.lazy=function(e){return{$$typeof:lB,_payload:{_status:-1,_result:e},_init:fB}};Ve.memo=function(e,t){return{$$typeof:oB,type:e,compare:t===void 0?null:t}};Ve.startTransition=function(e){var t=vp.transition;vp.transition={};try{e()}finally{vp.transition=t}};Ve.unstable_act=rR;Ve.useCallback=function(e,t){return zr.current.useCallback(e,t)};Ve.useContext=function(e){return zr.current.useContext(e)};Ve.useDebugValue=function(){};Ve.useDeferredValue=function(e){return zr.current.useDeferredValue(e)};Ve.useEffect=function(e,t){return zr.current.useEffect(e,t)};Ve.useId=function(){return zr.current.useId()};Ve.useImperativeHandle=function(e,t,r){return zr.current.useImperativeHandle(e,t,r)};Ve.useInsertionEffect=function(e,t){return zr.current.useInsertionEffect(e,t)};Ve.useLayoutEffect=function(e,t){return zr.current.useLayoutEffect(e,t)};Ve.useMemo=function(e,t){return zr.current.useMemo(e,t)};Ve.useReducer=function(e,t,r){return zr.current.useReducer(e,t,r)};Ve.useRef=function(e){return zr.current.useRef(e)};Ve.useState=function(e){return zr.current.useState(e)};Ve.useSyncExternalStore=function(e,t,r){return zr.current.useSyncExternalStore(e,t,r)};Ve.useTransition=function(){return zr.current.useTransition()};Ve.version="18.3.1";K$.exports=Ve;var N=K$.exports;const T=Je(N),pB=q$({__proto__:null,default:T},[N]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its 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 mB=N,gB=Symbol.for("react.element"),yB=Symbol.for("react.fragment"),vB=Object.prototype.hasOwnProperty,xB=mB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bB={key:!0,ref:!0,__self:!0,__source:!0};function nR(e,t,r){var n,a={},i=null,s=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(n in t)vB.call(t,n)&&!bB.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)a[n]===void 0&&(a[n]=t[n]);return{$$typeof:gB,type:e,key:i,ref:s,props:a,_owner:xB.current}}I0.Fragment=yB;I0.jsx=nR;I0.jsxs=nR;G$.exports=I0;var c=G$.exports,Pb={},aR={exports:{}},dn={},iR={exports:{}},sR={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its 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
|
-
*/(function(e){function t(R,$){var z=R.length;R.push($);e:for(;0<z;){var U=z-1>>>1,V=R[U];if(0<a(V,$))R[U]=$,R[z]=V,z=U;else break e}}function r(R){return R.length===0?null:R[0]}function n(R){if(R.length===0)return null;var $=R[0],z=R.pop();if(z!==$){R[0]=z;e:for(var U=0,V=R.length,F=V>>>1;U<F;){var W=2*(U+1)-1,K=R[W],Q=W+1,ne=R[Q];if(0>a(K,z))Q<V&&0>a(ne,K)?(R[U]=ne,R[Q]=z,U=Q):(R[U]=K,R[W]=z,U=W);else if(Q<V&&0>a(ne,z))R[U]=ne,R[Q]=z,U=Q;else break e}}return $}function a(R,$){var z=R.sortIndex-$.sortIndex;return z!==0?z:R.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,o=s.now();e.unstable_now=function(){return s.now()-o}}var l=[],u=[],d=1,f=null,h=3,p=!1,m=!1,g=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(R){for(var $=r(u);$!==null;){if($.callback===null)n(u);else if($.startTime<=R)n(u),$.sortIndex=$.expirationTime,t(l,$);else break;$=r(u)}}function j(R){if(g=!1,x(R),!m)if(r(l)!==null)m=!0,I(w);else{var $=r(u);$!==null&&L(j,$.startTime-R)}}function w(R,$){m=!1,g&&(g=!1,v(_),_=-1),p=!0;var z=h;try{for(x($),f=r(l);f!==null&&(!(f.expirationTime>$)||R&&!C());){var U=f.callback;if(typeof U=="function"){f.callback=null,h=f.priorityLevel;var V=U(f.expirationTime<=$);$=e.unstable_now(),typeof V=="function"?f.callback=V:f===r(l)&&n(l),x($)}else n(l);f=r(l)}if(f!==null)var F=!0;else{var W=r(u);W!==null&&L(j,W.startTime-$),F=!1}return F}finally{f=null,h=z,p=!1}}var S=!1,k=null,_=-1,E=5,A=-1;function C(){return!(e.unstable_now()-A<E)}function M(){if(k!==null){var R=e.unstable_now();A=R;var $=!0;try{$=k(!0,R)}finally{$?O():(S=!1,k=null)}}else S=!1}var O;if(typeof y=="function")O=function(){y(M)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,D=P.port2;P.port1.onmessage=M,O=function(){D.postMessage(null)}}else O=function(){b(M,0)};function I(R){k=R,S||(S=!0,O())}function L(R,$){_=b(function(){R(e.unstable_now())},$)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(R){R.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,I(w))},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return r(l)},e.unstable_next=function(R){switch(h){case 1:case 2:case 3:var $=3;break;default:$=h}var z=h;h=$;try{return R()}finally{h=z}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(R,$){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var z=h;h=R;try{return $()}finally{h=z}},e.unstable_scheduleCallback=function(R,$,z){var U=e.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?U+z:U):z=U,R){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=z+V,R={id:d++,callback:$,priorityLevel:R,startTime:z,expirationTime:V,sortIndex:-1},z>U?(R.sortIndex=z,t(u,R),r(l)===null&&R===r(u)&&(g?(v(_),_=-1):g=!0,L(j,z-U))):(R.sortIndex=V,t(l,R),m||p||(m=!0,I(w))),R},e.unstable_shouldYield=C,e.unstable_wrapCallback=function(R){var $=h;return function(){var z=h;h=$;try{return R.apply(this,arguments)}finally{h=z}}}})(sR);iR.exports=sR;var wB=iR.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its 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 jB=N,ln=wB;function J(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var oR=new Set,jd={};function Do(e,t){Xl(e,t),Xl(e+"Capture",t)}function Xl(e,t){for(jd[e]=t,e=0;e<t.length;e++)oR.add(t[e])}var Ja=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ab=Object.prototype.hasOwnProperty,kB=/^[: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]*$/,kN={},SN={};function SB(e){return Ab.call(SN,e)?!0:Ab.call(kN,e)?!1:kB.test(e)?SN[e]=!0:(kN[e]=!0,!1)}function NB(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _B(e,t,r,n){if(t===null||typeof t>"u"||NB(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Fr(e,t,r,n,a,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var xr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xr[e]=new Fr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xr[t]=new Fr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xr[e]=new Fr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xr[e]=new Fr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xr[e]=new Fr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xr[e]=new Fr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xr[e]=new Fr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xr[e]=new Fr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xr[e]=new Fr(e,5,!1,e.toLowerCase(),null,!1,!1)});var Kj=/[\-:]([a-z])/g;function Yj(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Kj,Yj);xr[t]=new Fr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Kj,Yj);xr[t]=new Fr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Kj,Yj);xr[t]=new Fr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xr[e]=new Fr(e,1,!1,e.toLowerCase(),null,!1,!1)});xr.xlinkHref=new Fr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xr[e]=new Fr(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xj(e,t,r,n){var a=xr.hasOwnProperty(t)?xr[t]:null;(a!==null?a.type!==0:n||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_B(t,r,a,n)&&(r=null),n||a===null?SB(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,n=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,n?e.setAttributeNS(n,t,r):e.setAttribute(t,r))))}var gi=jB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mh=Symbol.for("react.element"),dl=Symbol.for("react.portal"),fl=Symbol.for("react.fragment"),Zj=Symbol.for("react.strict_mode"),Ob=Symbol.for("react.profiler"),lR=Symbol.for("react.provider"),cR=Symbol.for("react.context"),Qj=Symbol.for("react.forward_ref"),Cb=Symbol.for("react.suspense"),Tb=Symbol.for("react.suspense_list"),Jj=Symbol.for("react.memo"),Li=Symbol.for("react.lazy"),uR=Symbol.for("react.offscreen"),NN=Symbol.iterator;function uu(e){return e===null||typeof e!="object"?null:(e=NN&&e[NN]||e["@@iterator"],typeof e=="function"?e:null)}var Mt=Object.assign,Sy;function Uu(e){if(Sy===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Sy=t&&t[1]||""}return`
|
|
34
|
-
`+Sy+e}var Ny=!1;function _y(e,t){if(!e||Ny)return"";Ny=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var n=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){n=u}e.call(t.prototype)}else{try{throw Error()}catch(u){n=u}e()}}catch(u){if(u&&n&&typeof u.stack=="string"){for(var a=u.stack.split(`
|
|
35
|
-
`),i=n.stack.split(`
|
|
36
|
-
`),s=a.length-1,o=i.length-1;1<=s&&0<=o&&a[s]!==i[o];)o--;for(;1<=s&&0<=o;s--,o--)if(a[s]!==i[o]){if(s!==1||o!==1)do if(s--,o--,0>o||a[s]!==i[o]){var l=`
|
|
37
|
-
`+a[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=o);break}}}finally{Ny=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Uu(e):""}function EB(e){switch(e.tag){case 5:return Uu(e.type);case 16:return Uu("Lazy");case 13:return Uu("Suspense");case 19:return Uu("SuspenseList");case 0:case 2:case 15:return e=_y(e.type,!1),e;case 11:return e=_y(e.type.render,!1),e;case 1:return e=_y(e.type,!0),e;default:return""}}function Mb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fl:return"Fragment";case dl:return"Portal";case Ob:return"Profiler";case Zj:return"StrictMode";case Cb:return"Suspense";case Tb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case cR:return(e.displayName||"Context")+".Consumer";case lR:return(e._context.displayName||"Context")+".Provider";case Qj:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Jj:return t=e.displayName||null,t!==null?t:Mb(e.type)||"Memo";case Li:t=e._payload,e=e._init;try{return Mb(e(t))}catch{}}return null}function PB(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Mb(t);case 8:return t===Zj?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function fs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function dR(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function AB(e){var t=dR(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gh(e){e._valueTracker||(e._valueTracker=AB(e))}function fR(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=dR(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Bp(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function $b(e,t){var r=t.checked;return Mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function _N(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=fs(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function hR(e,t){t=t.checked,t!=null&&Xj(e,"checked",t,!1)}function Rb(e,t){hR(e,t);var r=fs(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Db(e,t.type,r):t.hasOwnProperty("defaultValue")&&Db(e,t.type,fs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function EN(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Db(e,t,r){(t!=="number"||Bp(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Hu=Array.isArray;function Ml(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&n&&(e[r].defaultSelected=!0)}else{for(r=""+fs(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Ib(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(J(91));return Mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function PN(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(J(92));if(Hu(r)){if(1<r.length)throw Error(J(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:fs(r)}}function pR(e,t){var r=fs(t.value),n=fs(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),n!=null&&(e.defaultValue=""+n)}function AN(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function mR(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Lb(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?mR(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var yh,gR=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,n,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,n,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(yh=yh||document.createElement("div"),yh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=yh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function kd(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var rd={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},OB=["Webkit","ms","Moz","O"];Object.keys(rd).forEach(function(e){OB.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rd[t]=rd[e]})});function yR(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||rd.hasOwnProperty(e)&&rd[e]?(""+t).trim():t+"px"}function vR(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=yR(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var CB=Mt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function zb(e,t){if(t){if(CB[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(J(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(J(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(J(61))}if(t.style!=null&&typeof t.style!="object")throw Error(J(62))}}function Fb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Bb=null;function ek(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vb=null,$l=null,Rl=null;function ON(e){if(e=Bf(e)){if(typeof Vb!="function")throw Error(J(280));var t=e.stateNode;t&&(t=V0(t),Vb(e.stateNode,e.type,t))}}function xR(e){$l?Rl?Rl.push(e):Rl=[e]:$l=e}function bR(){if($l){var e=$l,t=Rl;if(Rl=$l=null,ON(e),t)for(e=0;e<t.length;e++)ON(t[e])}}function wR(e,t){return e(t)}function jR(){}var Ey=!1;function kR(e,t,r){if(Ey)return e(t,r);Ey=!0;try{return wR(e,t,r)}finally{Ey=!1,($l!==null||Rl!==null)&&(jR(),bR())}}function Sd(e,t){var r=e.stateNode;if(r===null)return null;var n=V0(r);if(n===null)return null;r=n[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(J(231,t,typeof r));return r}var Ub=!1;if(Ja)try{var du={};Object.defineProperty(du,"passive",{get:function(){Ub=!0}}),window.addEventListener("test",du,du),window.removeEventListener("test",du,du)}catch{Ub=!1}function TB(e,t,r,n,a,i,s,o,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var nd=!1,Vp=null,Up=!1,Hb=null,MB={onError:function(e){nd=!0,Vp=e}};function $B(e,t,r,n,a,i,s,o,l){nd=!1,Vp=null,TB.apply(MB,arguments)}function RB(e,t,r,n,a,i,s,o,l){if($B.apply(this,arguments),nd){if(nd){var u=Vp;nd=!1,Vp=null}else throw Error(J(198));Up||(Up=!0,Hb=u)}}function Io(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function SR(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function CN(e){if(Io(e)!==e)throw Error(J(188))}function DB(e){var t=e.alternate;if(!t){if(t=Io(e),t===null)throw Error(J(188));return t!==e?null:e}for(var r=e,n=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){r=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return CN(a),e;if(i===n)return CN(a),t;i=i.sibling}throw Error(J(188))}if(r.return!==n.return)r=a,n=i;else{for(var s=!1,o=a.child;o;){if(o===r){s=!0,r=a,n=i;break}if(o===n){s=!0,n=a,r=i;break}o=o.sibling}if(!s){for(o=i.child;o;){if(o===r){s=!0,r=i,n=a;break}if(o===n){s=!0,n=i,r=a;break}o=o.sibling}if(!s)throw Error(J(189))}}if(r.alternate!==n)throw Error(J(190))}if(r.tag!==3)throw Error(J(188));return r.stateNode.current===r?e:t}function NR(e){return e=DB(e),e!==null?_R(e):null}function _R(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=_R(e);if(t!==null)return t;e=e.sibling}return null}var ER=ln.unstable_scheduleCallback,TN=ln.unstable_cancelCallback,IB=ln.unstable_shouldYield,LB=ln.unstable_requestPaint,Ft=ln.unstable_now,zB=ln.unstable_getCurrentPriorityLevel,tk=ln.unstable_ImmediatePriority,PR=ln.unstable_UserBlockingPriority,Hp=ln.unstable_NormalPriority,FB=ln.unstable_LowPriority,AR=ln.unstable_IdlePriority,L0=null,ba=null;function BB(e){if(ba&&typeof ba.onCommitFiberRoot=="function")try{ba.onCommitFiberRoot(L0,e,void 0,(e.current.flags&128)===128)}catch{}}var na=Math.clz32?Math.clz32:HB,VB=Math.log,UB=Math.LN2;function HB(e){return e>>>=0,e===0?32:31-(VB(e)/UB|0)|0}var vh=64,xh=4194304;function Wu(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wp(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,s=r&268435455;if(s!==0){var o=s&~a;o!==0?n=Wu(o):(i&=s,i!==0&&(n=Wu(i)))}else s=r&~a,s!==0?n=Wu(s):i!==0&&(n=Wu(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-na(t),a=1<<r,n|=e[r],t&=~a;return n}function WB(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qB(e,t){for(var r=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-na(i),o=1<<s,l=a[s];l===-1?(!(o&r)||o&n)&&(a[s]=WB(o,t)):l<=t&&(e.expiredLanes|=o),i&=~o}}function Wb(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function OR(){var e=vh;return vh<<=1,!(vh&4194240)&&(vh=64),e}function Py(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function zf(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-na(t),e[t]=r}function GB(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-na(r),i=1<<a;t[a]=0,n[a]=-1,e[a]=-1,r&=~i}}function rk(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-na(r),a=1<<n;a&t|e[n]&t&&(e[n]|=t),r&=~a}}var it=0;function CR(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var TR,nk,MR,$R,RR,qb=!1,bh=[],Ji=null,es=null,ts=null,Nd=new Map,_d=new Map,Vi=[],KB="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 submit".split(" ");function MN(e,t){switch(e){case"focusin":case"focusout":Ji=null;break;case"dragenter":case"dragleave":es=null;break;case"mouseover":case"mouseout":ts=null;break;case"pointerover":case"pointerout":Nd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_d.delete(t.pointerId)}}function fu(e,t,r,n,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Bf(t),t!==null&&nk(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function YB(e,t,r,n,a){switch(t){case"focusin":return Ji=fu(Ji,e,t,r,n,a),!0;case"dragenter":return es=fu(es,e,t,r,n,a),!0;case"mouseover":return ts=fu(ts,e,t,r,n,a),!0;case"pointerover":var i=a.pointerId;return Nd.set(i,fu(Nd.get(i)||null,e,t,r,n,a)),!0;case"gotpointercapture":return i=a.pointerId,_d.set(i,fu(_d.get(i)||null,e,t,r,n,a)),!0}return!1}function DR(e){var t=Zs(e.target);if(t!==null){var r=Io(t);if(r!==null){if(t=r.tag,t===13){if(t=SR(r),t!==null){e.blockedOn=t,RR(e.priority,function(){MR(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Gb(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var n=new r.constructor(r.type,r);Bb=n,r.target.dispatchEvent(n),Bb=null}else return t=Bf(r),t!==null&&nk(t),e.blockedOn=r,!1;t.shift()}return!0}function $N(e,t,r){xp(e)&&r.delete(t)}function XB(){qb=!1,Ji!==null&&xp(Ji)&&(Ji=null),es!==null&&xp(es)&&(es=null),ts!==null&&xp(ts)&&(ts=null),Nd.forEach($N),_d.forEach($N)}function hu(e,t){e.blockedOn===t&&(e.blockedOn=null,qb||(qb=!0,ln.unstable_scheduleCallback(ln.unstable_NormalPriority,XB)))}function Ed(e){function t(a){return hu(a,e)}if(0<bh.length){hu(bh[0],e);for(var r=1;r<bh.length;r++){var n=bh[r];n.blockedOn===e&&(n.blockedOn=null)}}for(Ji!==null&&hu(Ji,e),es!==null&&hu(es,e),ts!==null&&hu(ts,e),Nd.forEach(t),_d.forEach(t),r=0;r<Vi.length;r++)n=Vi[r],n.blockedOn===e&&(n.blockedOn=null);for(;0<Vi.length&&(r=Vi[0],r.blockedOn===null);)DR(r),r.blockedOn===null&&Vi.shift()}var Dl=gi.ReactCurrentBatchConfig,qp=!0;function ZB(e,t,r,n){var a=it,i=Dl.transition;Dl.transition=null;try{it=1,ak(e,t,r,n)}finally{it=a,Dl.transition=i}}function QB(e,t,r,n){var a=it,i=Dl.transition;Dl.transition=null;try{it=4,ak(e,t,r,n)}finally{it=a,Dl.transition=i}}function ak(e,t,r,n){if(qp){var a=Gb(e,t,r,n);if(a===null)Ly(e,t,n,Gp,r),MN(e,n);else if(YB(a,e,t,r,n))n.stopPropagation();else if(MN(e,n),t&4&&-1<KB.indexOf(e)){for(;a!==null;){var i=Bf(a);if(i!==null&&TR(i),i=Gb(e,t,r,n),i===null&&Ly(e,t,n,Gp,r),i===a)break;a=i}a!==null&&n.stopPropagation()}else Ly(e,t,n,null,r)}}var Gp=null;function Gb(e,t,r,n){if(Gp=null,e=ek(n),e=Zs(e),e!==null)if(t=Io(e),t===null)e=null;else if(r=t.tag,r===13){if(e=SR(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Gp=e,null}function IR(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(zB()){case tk:return 1;case PR:return 4;case Hp:case FB:return 16;case AR:return 536870912;default:return 16}default:return 16}}var Gi=null,ik=null,bp=null;function LR(){if(bp)return bp;var e,t=ik,r=t.length,n,a="value"in Gi?Gi.value:Gi.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var s=r-e;for(n=1;n<=s&&t[r-n]===a[i-n];n++);return bp=a.slice(e,1<n?1-n:void 0)}function wp(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function wh(){return!0}function RN(){return!1}function fn(e){function t(r,n,a,i,s){this._reactName=r,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?wh:RN,this.isPropagationStopped=RN,this}return Mt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=wh)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=wh)},persist:function(){},isPersistent:wh}),t}var Dc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sk=fn(Dc),Ff=Mt({},Dc,{view:0,detail:0}),JB=fn(Ff),Ay,Oy,pu,z0=Mt({},Ff,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ok,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==pu&&(pu&&e.type==="mousemove"?(Ay=e.screenX-pu.screenX,Oy=e.screenY-pu.screenY):Oy=Ay=0,pu=e),Ay)},movementY:function(e){return"movementY"in e?e.movementY:Oy}}),DN=fn(z0),e7=Mt({},z0,{dataTransfer:0}),t7=fn(e7),r7=Mt({},Ff,{relatedTarget:0}),Cy=fn(r7),n7=Mt({},Dc,{animationName:0,elapsedTime:0,pseudoElement:0}),a7=fn(n7),i7=Mt({},Dc,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),s7=fn(i7),o7=Mt({},Dc,{data:0}),IN=fn(o7),l7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},c7={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"},u7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function d7(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=u7[e])?!!t[e]:!1}function ok(){return d7}var f7=Mt({},Ff,{key:function(e){if(e.key){var t=l7[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=wp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?c7[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ok,charCode:function(e){return e.type==="keypress"?wp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?wp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),h7=fn(f7),p7=Mt({},z0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),LN=fn(p7),m7=Mt({},Ff,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ok}),g7=fn(m7),y7=Mt({},Dc,{propertyName:0,elapsedTime:0,pseudoElement:0}),v7=fn(y7),x7=Mt({},z0,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),b7=fn(x7),w7=[9,13,27,32],lk=Ja&&"CompositionEvent"in window,ad=null;Ja&&"documentMode"in document&&(ad=document.documentMode);var j7=Ja&&"TextEvent"in window&&!ad,zR=Ja&&(!lk||ad&&8<ad&&11>=ad),zN=" ",FN=!1;function FR(e,t){switch(e){case"keyup":return w7.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function BR(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hl=!1;function k7(e,t){switch(e){case"compositionend":return BR(t);case"keypress":return t.which!==32?null:(FN=!0,zN);case"textInput":return e=t.data,e===zN&&FN?null:e;default:return null}}function S7(e,t){if(hl)return e==="compositionend"||!lk&&FR(e,t)?(e=LR(),bp=ik=Gi=null,hl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zR&&t.locale!=="ko"?null:t.data;default:return null}}var N7={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 BN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!N7[e.type]:t==="textarea"}function VR(e,t,r,n){xR(n),t=Kp(t,"onChange"),0<t.length&&(r=new sk("onChange","change",null,r,n),e.push({event:r,listeners:t}))}var id=null,Pd=null;function _7(e){JR(e,0)}function F0(e){var t=gl(e);if(fR(t))return e}function E7(e,t){if(e==="change")return t}var UR=!1;if(Ja){var Ty;if(Ja){var My="oninput"in document;if(!My){var VN=document.createElement("div");VN.setAttribute("oninput","return;"),My=typeof VN.oninput=="function"}Ty=My}else Ty=!1;UR=Ty&&(!document.documentMode||9<document.documentMode)}function UN(){id&&(id.detachEvent("onpropertychange",HR),Pd=id=null)}function HR(e){if(e.propertyName==="value"&&F0(Pd)){var t=[];VR(t,Pd,e,ek(e)),kR(_7,t)}}function P7(e,t,r){e==="focusin"?(UN(),id=t,Pd=r,id.attachEvent("onpropertychange",HR)):e==="focusout"&&UN()}function A7(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return F0(Pd)}function O7(e,t){if(e==="click")return F0(t)}function C7(e,t){if(e==="input"||e==="change")return F0(t)}function T7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sa=typeof Object.is=="function"?Object.is:T7;function Ad(e,t){if(sa(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var a=r[n];if(!Ab.call(t,a)||!sa(e[a],t[a]))return!1}return!0}function HN(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function WN(e,t){var r=HN(e);e=0;for(var n;r;){if(r.nodeType===3){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=HN(r)}}function WR(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?WR(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qR(){for(var e=window,t=Bp();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Bp(e.document)}return t}function ck(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function M7(e){var t=qR(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&WR(r.ownerDocument.documentElement,r)){if(n!==null&&ck(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=WN(r,i);var s=WN(r,n);a&&s&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var $7=Ja&&"documentMode"in document&&11>=document.documentMode,pl=null,Kb=null,sd=null,Yb=!1;function qN(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Yb||pl==null||pl!==Bp(n)||(n=pl,"selectionStart"in n&&ck(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),sd&&Ad(sd,n)||(sd=n,n=Kp(Kb,"onSelect"),0<n.length&&(t=new sk("onSelect","select",null,t,r),e.push({event:t,listeners:n}),t.target=pl)))}function jh(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var ml={animationend:jh("Animation","AnimationEnd"),animationiteration:jh("Animation","AnimationIteration"),animationstart:jh("Animation","AnimationStart"),transitionend:jh("Transition","TransitionEnd")},$y={},GR={};Ja&&(GR=document.createElement("div").style,"AnimationEvent"in window||(delete ml.animationend.animation,delete ml.animationiteration.animation,delete ml.animationstart.animation),"TransitionEvent"in window||delete ml.transitionend.transition);function B0(e){if($y[e])return $y[e];if(!ml[e])return e;var t=ml[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in GR)return $y[e]=t[r];return e}var KR=B0("animationend"),YR=B0("animationiteration"),XR=B0("animationstart"),ZR=B0("transitionend"),QR=new Map,GN="abort auxClick 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(" ");function js(e,t){QR.set(e,t),Do(t,[e])}for(var Ry=0;Ry<GN.length;Ry++){var Dy=GN[Ry],R7=Dy.toLowerCase(),D7=Dy[0].toUpperCase()+Dy.slice(1);js(R7,"on"+D7)}js(KR,"onAnimationEnd");js(YR,"onAnimationIteration");js(XR,"onAnimationStart");js("dblclick","onDoubleClick");js("focusin","onFocus");js("focusout","onBlur");js(ZR,"onTransitionEnd");Xl("onMouseEnter",["mouseout","mouseover"]);Xl("onMouseLeave",["mouseout","mouseover"]);Xl("onPointerEnter",["pointerout","pointerover"]);Xl("onPointerLeave",["pointerout","pointerover"]);Do("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Do("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Do("onBeforeInput",["compositionend","keypress","textInput","paste"]);Do("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Do("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Do("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qu="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(" "),I7=new Set("cancel close invalid load scroll toggle".split(" ").concat(qu));function KN(e,t,r){var n=e.type||"unknown-event";e.currentTarget=r,RB(n,t,void 0,e),e.currentTarget=null}function JR(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var n=e[r],a=n.event;n=n.listeners;e:{var i=void 0;if(t)for(var s=n.length-1;0<=s;s--){var o=n[s],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==i&&a.isPropagationStopped())break e;KN(a,o,u),i=l}else for(s=0;s<n.length;s++){if(o=n[s],l=o.instance,u=o.currentTarget,o=o.listener,l!==i&&a.isPropagationStopped())break e;KN(a,o,u),i=l}}}if(Up)throw e=Hb,Up=!1,Hb=null,e}function vt(e,t){var r=t[ew];r===void 0&&(r=t[ew]=new Set);var n=e+"__bubble";r.has(n)||(e3(t,e,2,!1),r.add(n))}function Iy(e,t,r){var n=0;t&&(n|=4),e3(r,e,n,t)}var kh="_reactListening"+Math.random().toString(36).slice(2);function Od(e){if(!e[kh]){e[kh]=!0,oR.forEach(function(r){r!=="selectionchange"&&(I7.has(r)||Iy(r,!1,e),Iy(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kh]||(t[kh]=!0,Iy("selectionchange",!1,t))}}function e3(e,t,r,n){switch(IR(t)){case 1:var a=ZB;break;case 4:a=QB;break;default:a=ak}r=a.bind(null,t,r,e),a=void 0,!Ub||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function Ly(e,t,r,n,a){var i=n;if(!(t&1)&&!(t&2)&&n!==null)e:for(;;){if(n===null)return;var s=n.tag;if(s===3||s===4){var o=n.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(s===4)for(s=n.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===a||l.nodeType===8&&l.parentNode===a))return;s=s.return}for(;o!==null;){if(s=Zs(o),s===null)return;if(l=s.tag,l===5||l===6){n=i=s;continue e}o=o.parentNode}}n=n.return}kR(function(){var u=i,d=ek(r),f=[];e:{var h=QR.get(e);if(h!==void 0){var p=sk,m=e;switch(e){case"keypress":if(wp(r)===0)break e;case"keydown":case"keyup":p=h7;break;case"focusin":m="focus",p=Cy;break;case"focusout":m="blur",p=Cy;break;case"beforeblur":case"afterblur":p=Cy;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=DN;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=t7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=g7;break;case KR:case YR:case XR:p=a7;break;case ZR:p=v7;break;case"scroll":p=JB;break;case"wheel":p=b7;break;case"copy":case"cut":case"paste":p=s7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=LN}var g=(t&4)!==0,b=!g&&e==="scroll",v=g?h!==null?h+"Capture":null:h;g=[];for(var y=u,x;y!==null;){x=y;var j=x.stateNode;if(x.tag===5&&j!==null&&(x=j,v!==null&&(j=Sd(y,v),j!=null&&g.push(Cd(y,j,x)))),b)break;y=y.return}0<g.length&&(h=new p(h,m,null,r,d),f.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&r!==Bb&&(m=r.relatedTarget||r.fromElement)&&(Zs(m)||m[ei]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=r.relatedTarget||r.toElement,p=u,m=m?Zs(m):null,m!==null&&(b=Io(m),m!==b||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=DN,j="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=LN,j="onPointerLeave",v="onPointerEnter",y="pointer"),b=p==null?h:gl(p),x=m==null?h:gl(m),h=new g(j,y+"leave",p,r,d),h.target=b,h.relatedTarget=x,j=null,Zs(d)===u&&(g=new g(v,y+"enter",m,r,d),g.target=x,g.relatedTarget=b,j=g),b=j,p&&m)t:{for(g=p,v=m,y=0,x=g;x;x=Qo(x))y++;for(x=0,j=v;j;j=Qo(j))x++;for(;0<y-x;)g=Qo(g),y--;for(;0<x-y;)v=Qo(v),x--;for(;y--;){if(g===v||v!==null&&g===v.alternate)break t;g=Qo(g),v=Qo(v)}g=null}else g=null;p!==null&&YN(f,h,p,g,!1),m!==null&&b!==null&&YN(f,b,m,g,!0)}}e:{if(h=u?gl(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var w=E7;else if(BN(h))if(UR)w=C7;else{w=A7;var S=P7}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(w=O7);if(w&&(w=w(e,u))){VR(f,w,r,d);break e}S&&S(e,h,u),e==="focusout"&&(S=h._wrapperState)&&S.controlled&&h.type==="number"&&Db(h,"number",h.value)}switch(S=u?gl(u):window,e){case"focusin":(BN(S)||S.contentEditable==="true")&&(pl=S,Kb=u,sd=null);break;case"focusout":sd=Kb=pl=null;break;case"mousedown":Yb=!0;break;case"contextmenu":case"mouseup":case"dragend":Yb=!1,qN(f,r,d);break;case"selectionchange":if($7)break;case"keydown":case"keyup":qN(f,r,d)}var k;if(lk)e:{switch(e){case"compositionstart":var _="onCompositionStart";break e;case"compositionend":_="onCompositionEnd";break e;case"compositionupdate":_="onCompositionUpdate";break e}_=void 0}else hl?FR(e,r)&&(_="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(_="onCompositionStart");_&&(zR&&r.locale!=="ko"&&(hl||_!=="onCompositionStart"?_==="onCompositionEnd"&&hl&&(k=LR()):(Gi=d,ik="value"in Gi?Gi.value:Gi.textContent,hl=!0)),S=Kp(u,_),0<S.length&&(_=new IN(_,e,null,r,d),f.push({event:_,listeners:S}),k?_.data=k:(k=BR(r),k!==null&&(_.data=k)))),(k=j7?k7(e,r):S7(e,r))&&(u=Kp(u,"onBeforeInput"),0<u.length&&(d=new IN("onBeforeInput","beforeinput",null,r,d),f.push({event:d,listeners:u}),d.data=k))}JR(f,t)})}function Cd(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Kp(e,t){for(var r=t+"Capture",n=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Sd(e,r),i!=null&&n.unshift(Cd(e,i,a)),i=Sd(e,t),i!=null&&n.push(Cd(e,i,a))),e=e.return}return n}function Qo(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function YN(e,t,r,n,a){for(var i=t._reactName,s=[];r!==null&&r!==n;){var o=r,l=o.alternate,u=o.stateNode;if(l!==null&&l===n)break;o.tag===5&&u!==null&&(o=u,a?(l=Sd(r,i),l!=null&&s.unshift(Cd(r,l,o))):a||(l=Sd(r,i),l!=null&&s.push(Cd(r,l,o)))),r=r.return}s.length!==0&&e.push({event:t,listeners:s})}var L7=/\r\n?/g,z7=/\u0000|\uFFFD/g;function XN(e){return(typeof e=="string"?e:""+e).replace(L7,`
|
|
38
|
-
`).replace(z7,"")}function Sh(e,t,r){if(t=XN(t),XN(e)!==t&&r)throw Error(J(425))}function Yp(){}var Xb=null,Zb=null;function Qb(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Jb=typeof setTimeout=="function"?setTimeout:void 0,F7=typeof clearTimeout=="function"?clearTimeout:void 0,ZN=typeof Promise=="function"?Promise:void 0,B7=typeof queueMicrotask=="function"?queueMicrotask:typeof ZN<"u"?function(e){return ZN.resolve(null).then(e).catch(V7)}:Jb;function V7(e){setTimeout(function(){throw e})}function zy(e,t){var r=t,n=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(n===0){e.removeChild(a),Ed(t);return}n--}else r!=="$"&&r!=="$?"&&r!=="$!"||n++;r=a}while(r);Ed(t)}function rs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function QN(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Ic=Math.random().toString(36).slice(2),ga="__reactFiber$"+Ic,Td="__reactProps$"+Ic,ei="__reactContainer$"+Ic,ew="__reactEvents$"+Ic,U7="__reactListeners$"+Ic,H7="__reactHandles$"+Ic;function Zs(e){var t=e[ga];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ei]||r[ga]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=QN(e);e!==null;){if(r=e[ga])return r;e=QN(e)}return t}e=r,r=e.parentNode}return null}function Bf(e){return e=e[ga]||e[ei],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function gl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(J(33))}function V0(e){return e[Td]||null}var tw=[],yl=-1;function ks(e){return{current:e}}function wt(e){0>yl||(e.current=tw[yl],tw[yl]=null,yl--)}function ht(e,t){yl++,tw[yl]=e.current,e.current=t}var hs={},Pr=ks(hs),Kr=ks(!1),vo=hs;function Zl(e,t){var r=e.type.contextTypes;if(!r)return hs;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Yr(e){return e=e.childContextTypes,e!=null}function Xp(){wt(Kr),wt(Pr)}function JN(e,t,r){if(Pr.current!==hs)throw Error(J(168));ht(Pr,t),ht(Kr,r)}function t3(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(J(108,PB(e)||"Unknown",a));return Mt({},r,n)}function Zp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hs,vo=Pr.current,ht(Pr,e),ht(Kr,Kr.current),!0}function e_(e,t,r){var n=e.stateNode;if(!n)throw Error(J(169));r?(e=t3(e,t,vo),n.__reactInternalMemoizedMergedChildContext=e,wt(Kr),wt(Pr),ht(Pr,e)):wt(Kr),ht(Kr,r)}var Ia=null,U0=!1,Fy=!1;function r3(e){Ia===null?Ia=[e]:Ia.push(e)}function W7(e){U0=!0,r3(e)}function Ss(){if(!Fy&&Ia!==null){Fy=!0;var e=0,t=it;try{var r=Ia;for(it=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}Ia=null,U0=!1}catch(a){throw Ia!==null&&(Ia=Ia.slice(e+1)),ER(tk,Ss),a}finally{it=t,Fy=!1}}return null}var vl=[],xl=0,Qp=null,Jp=0,wn=[],jn=0,xo=null,La=1,za="";function Bs(e,t){vl[xl++]=Jp,vl[xl++]=Qp,Qp=e,Jp=t}function n3(e,t,r){wn[jn++]=La,wn[jn++]=za,wn[jn++]=xo,xo=e;var n=La;e=za;var a=32-na(n)-1;n&=~(1<<a),r+=1;var i=32-na(t)+a;if(30<i){var s=a-a%5;i=(n&(1<<s)-1).toString(32),n>>=s,a-=s,La=1<<32-na(t)+a|r<<a|n,za=i+e}else La=1<<i|r<<a|n,za=e}function uk(e){e.return!==null&&(Bs(e,1),n3(e,1,0))}function dk(e){for(;e===Qp;)Qp=vl[--xl],vl[xl]=null,Jp=vl[--xl],vl[xl]=null;for(;e===xo;)xo=wn[--jn],wn[jn]=null,za=wn[--jn],wn[jn]=null,La=wn[--jn],wn[jn]=null}var on=null,sn=null,_t=!1,Qn=null;function a3(e,t){var r=Sn(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function t_(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,on=e,sn=rs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,on=e,sn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=xo!==null?{id:La,overflow:za}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Sn(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,on=e,sn=null,!0):!1;default:return!1}}function rw(e){return(e.mode&1)!==0&&(e.flags&128)===0}function nw(e){if(_t){var t=sn;if(t){var r=t;if(!t_(e,t)){if(rw(e))throw Error(J(418));t=rs(r.nextSibling);var n=on;t&&t_(e,t)?a3(n,r):(e.flags=e.flags&-4097|2,_t=!1,on=e)}}else{if(rw(e))throw Error(J(418));e.flags=e.flags&-4097|2,_t=!1,on=e}}}function r_(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;on=e}function Nh(e){if(e!==on)return!1;if(!_t)return r_(e),_t=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Qb(e.type,e.memoizedProps)),t&&(t=sn)){if(rw(e))throw i3(),Error(J(418));for(;t;)a3(e,t),t=rs(t.nextSibling)}if(r_(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(J(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){sn=rs(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}sn=null}}else sn=on?rs(e.stateNode.nextSibling):null;return!0}function i3(){for(var e=sn;e;)e=rs(e.nextSibling)}function Ql(){sn=on=null,_t=!1}function fk(e){Qn===null?Qn=[e]:Qn.push(e)}var q7=gi.ReactCurrentBatchConfig;function mu(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(J(309));var n=r.stateNode}if(!n)throw Error(J(147,e));var a=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var o=a.refs;s===null?delete o[i]:o[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(J(284));if(!r._owner)throw Error(J(290,e))}return e}function _h(e,t){throw e=Object.prototype.toString.call(t),Error(J(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function n_(e){var t=e._init;return t(e._payload)}function s3(e){function t(v,y){if(e){var x=v.deletions;x===null?(v.deletions=[y],v.flags|=16):x.push(y)}}function r(v,y){if(!e)return null;for(;y!==null;)t(v,y),y=y.sibling;return null}function n(v,y){for(v=new Map;y!==null;)y.key!==null?v.set(y.key,y):v.set(y.index,y),y=y.sibling;return v}function a(v,y){return v=ss(v,y),v.index=0,v.sibling=null,v}function i(v,y,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<y?(v.flags|=2,y):x):(v.flags|=2,y)):(v.flags|=1048576,y)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function o(v,y,x,j){return y===null||y.tag!==6?(y=Gy(x,v.mode,j),y.return=v,y):(y=a(y,x),y.return=v,y)}function l(v,y,x,j){var w=x.type;return w===fl?d(v,y,x.props.children,j,x.key):y!==null&&(y.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Li&&n_(w)===y.type)?(j=a(y,x.props),j.ref=mu(v,y,x),j.return=v,j):(j=Pp(x.type,x.key,x.props,null,v.mode,j),j.ref=mu(v,y,x),j.return=v,j)}function u(v,y,x,j){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=Ky(x,v.mode,j),y.return=v,y):(y=a(y,x.children||[]),y.return=v,y)}function d(v,y,x,j,w){return y===null||y.tag!==7?(y=uo(x,v.mode,j,w),y.return=v,y):(y=a(y,x),y.return=v,y)}function f(v,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Gy(""+y,v.mode,x),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case mh:return x=Pp(y.type,y.key,y.props,null,v.mode,x),x.ref=mu(v,null,y),x.return=v,x;case dl:return y=Ky(y,v.mode,x),y.return=v,y;case Li:var j=y._init;return f(v,j(y._payload),x)}if(Hu(y)||uu(y))return y=uo(y,v.mode,x,null),y.return=v,y;_h(v,y)}return null}function h(v,y,x,j){var w=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return w!==null?null:o(v,y,""+x,j);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case mh:return x.key===w?l(v,y,x,j):null;case dl:return x.key===w?u(v,y,x,j):null;case Li:return w=x._init,h(v,y,w(x._payload),j)}if(Hu(x)||uu(x))return w!==null?null:d(v,y,x,j,null);_h(v,x)}return null}function p(v,y,x,j,w){if(typeof j=="string"&&j!==""||typeof j=="number")return v=v.get(x)||null,o(y,v,""+j,w);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case mh:return v=v.get(j.key===null?x:j.key)||null,l(y,v,j,w);case dl:return v=v.get(j.key===null?x:j.key)||null,u(y,v,j,w);case Li:var S=j._init;return p(v,y,x,S(j._payload),w)}if(Hu(j)||uu(j))return v=v.get(x)||null,d(y,v,j,w,null);_h(y,j)}return null}function m(v,y,x,j){for(var w=null,S=null,k=y,_=y=0,E=null;k!==null&&_<x.length;_++){k.index>_?(E=k,k=null):E=k.sibling;var A=h(v,k,x[_],j);if(A===null){k===null&&(k=E);break}e&&k&&A.alternate===null&&t(v,k),y=i(A,y,_),S===null?w=A:S.sibling=A,S=A,k=E}if(_===x.length)return r(v,k),_t&&Bs(v,_),w;if(k===null){for(;_<x.length;_++)k=f(v,x[_],j),k!==null&&(y=i(k,y,_),S===null?w=k:S.sibling=k,S=k);return _t&&Bs(v,_),w}for(k=n(v,k);_<x.length;_++)E=p(k,v,_,x[_],j),E!==null&&(e&&E.alternate!==null&&k.delete(E.key===null?_:E.key),y=i(E,y,_),S===null?w=E:S.sibling=E,S=E);return e&&k.forEach(function(C){return t(v,C)}),_t&&Bs(v,_),w}function g(v,y,x,j){var w=uu(x);if(typeof w!="function")throw Error(J(150));if(x=w.call(x),x==null)throw Error(J(151));for(var S=w=null,k=y,_=y=0,E=null,A=x.next();k!==null&&!A.done;_++,A=x.next()){k.index>_?(E=k,k=null):E=k.sibling;var C=h(v,k,A.value,j);if(C===null){k===null&&(k=E);break}e&&k&&C.alternate===null&&t(v,k),y=i(C,y,_),S===null?w=C:S.sibling=C,S=C,k=E}if(A.done)return r(v,k),_t&&Bs(v,_),w;if(k===null){for(;!A.done;_++,A=x.next())A=f(v,A.value,j),A!==null&&(y=i(A,y,_),S===null?w=A:S.sibling=A,S=A);return _t&&Bs(v,_),w}for(k=n(v,k);!A.done;_++,A=x.next())A=p(k,v,_,A.value,j),A!==null&&(e&&A.alternate!==null&&k.delete(A.key===null?_:A.key),y=i(A,y,_),S===null?w=A:S.sibling=A,S=A);return e&&k.forEach(function(M){return t(v,M)}),_t&&Bs(v,_),w}function b(v,y,x,j){if(typeof x=="object"&&x!==null&&x.type===fl&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case mh:e:{for(var w=x.key,S=y;S!==null;){if(S.key===w){if(w=x.type,w===fl){if(S.tag===7){r(v,S.sibling),y=a(S,x.props.children),y.return=v,v=y;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Li&&n_(w)===S.type){r(v,S.sibling),y=a(S,x.props),y.ref=mu(v,S,x),y.return=v,v=y;break e}r(v,S);break}else t(v,S);S=S.sibling}x.type===fl?(y=uo(x.props.children,v.mode,j,x.key),y.return=v,v=y):(j=Pp(x.type,x.key,x.props,null,v.mode,j),j.ref=mu(v,y,x),j.return=v,v=j)}return s(v);case dl:e:{for(S=x.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){r(v,y.sibling),y=a(y,x.children||[]),y.return=v,v=y;break e}else{r(v,y);break}else t(v,y);y=y.sibling}y=Ky(x,v.mode,j),y.return=v,v=y}return s(v);case Li:return S=x._init,b(v,y,S(x._payload),j)}if(Hu(x))return m(v,y,x,j);if(uu(x))return g(v,y,x,j);_h(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(r(v,y.sibling),y=a(y,x),y.return=v,v=y):(r(v,y),y=Gy(x,v.mode,j),y.return=v,v=y),s(v)):r(v,y)}return b}var Jl=s3(!0),o3=s3(!1),em=ks(null),tm=null,bl=null,hk=null;function pk(){hk=bl=tm=null}function mk(e){var t=em.current;wt(em),e._currentValue=t}function aw(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Il(e,t){tm=e,hk=bl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Wr=!0),e.firstContext=null)}function $n(e){var t=e._currentValue;if(hk!==e)if(e={context:e,memoizedValue:t,next:null},bl===null){if(tm===null)throw Error(J(308));bl=e,tm.dependencies={lanes:0,firstContext:e}}else bl=bl.next=e;return t}var Qs=null;function gk(e){Qs===null?Qs=[e]:Qs.push(e)}function l3(e,t,r,n){var a=t.interleaved;return a===null?(r.next=r,gk(t)):(r.next=a.next,a.next=r),t.interleaved=r,ti(e,n)}function ti(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var zi=!1;function yk(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function c3(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function qa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ns(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,Xe&2){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,ti(e,r)}return a=n.interleaved,a===null?(t.next=t,gk(n)):(t.next=a.next,a.next=t),n.interleaved=t,ti(e,r)}function jp(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,rk(e,r)}}function a_(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var s={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?a=i=s:i=i.next=s,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function rm(e,t,r,n){var a=e.updateQueue;zi=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var l=o,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==s&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=l))}if(i!==null){var f=a.baseState;s=0,d=u=l=null,o=i;do{var h=o.lane,p=o.eventTime;if((n&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var m=e,g=o;switch(h=t,p=r,g.tag){case 1:if(m=g.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=Mt({},f,h);break e;case 2:zi=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,h=a.effects,h===null?a.effects=[o]:h.push(o))}else p={eventTime:p,lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=p,l=f):d=d.next=p,s|=h;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;h=o,o=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);if(d===null&&(l=f),a.baseState=l,a.firstBaseUpdate=u,a.lastBaseUpdate=d,t=a.shared.interleaved,t!==null){a=t;do s|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);wo|=s,e.lanes=s,e.memoizedState=f}}function i_(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],a=n.callback;if(a!==null){if(n.callback=null,n=r,typeof a!="function")throw Error(J(191,a));a.call(n)}}}var Vf={},wa=ks(Vf),Md=ks(Vf),$d=ks(Vf);function Js(e){if(e===Vf)throw Error(J(174));return e}function vk(e,t){switch(ht($d,t),ht(Md,e),ht(wa,Vf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lb(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lb(t,e)}wt(wa),ht(wa,t)}function ec(){wt(wa),wt(Md),wt($d)}function u3(e){Js($d.current);var t=Js(wa.current),r=Lb(t,e.type);t!==r&&(ht(Md,e),ht(wa,r))}function xk(e){Md.current===e&&(wt(wa),wt(Md))}var Ot=ks(0);function nm(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var By=[];function bk(){for(var e=0;e<By.length;e++)By[e]._workInProgressVersionPrimary=null;By.length=0}var kp=gi.ReactCurrentDispatcher,Vy=gi.ReactCurrentBatchConfig,bo=0,Tt=null,tr=null,cr=null,am=!1,od=!1,Rd=0,G7=0;function wr(){throw Error(J(321))}function wk(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!sa(e[r],t[r]))return!1;return!0}function jk(e,t,r,n,a,i){if(bo=i,Tt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,kp.current=e===null||e.memoizedState===null?Z7:Q7,e=r(n,a),od){i=0;do{if(od=!1,Rd=0,25<=i)throw Error(J(301));i+=1,cr=tr=null,t.updateQueue=null,kp.current=J7,e=r(n,a)}while(od)}if(kp.current=im,t=tr!==null&&tr.next!==null,bo=0,cr=tr=Tt=null,am=!1,t)throw Error(J(300));return e}function kk(){var e=Rd!==0;return Rd=0,e}function pa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cr===null?Tt.memoizedState=cr=e:cr=cr.next=e,cr}function Rn(){if(tr===null){var e=Tt.alternate;e=e!==null?e.memoizedState:null}else e=tr.next;var t=cr===null?Tt.memoizedState:cr.next;if(t!==null)cr=t,tr=e;else{if(e===null)throw Error(J(310));tr=e,e={memoizedState:tr.memoizedState,baseState:tr.baseState,baseQueue:tr.baseQueue,queue:tr.queue,next:null},cr===null?Tt.memoizedState=cr=e:cr=cr.next=e}return cr}function Dd(e,t){return typeof t=="function"?t(e):t}function Uy(e){var t=Rn(),r=t.queue;if(r===null)throw Error(J(311));r.lastRenderedReducer=e;var n=tr,a=n.baseQueue,i=r.pending;if(i!==null){if(a!==null){var s=a.next;a.next=i.next,i.next=s}n.baseQueue=a=i,r.pending=null}if(a!==null){i=a.next,n=n.baseState;var o=s=null,l=null,u=i;do{var d=u.lane;if((bo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),n=u.hasEagerState?u.eagerState:e(n,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(o=l=f,s=n):l=l.next=f,Tt.lanes|=d,wo|=d}u=u.next}while(u!==null&&u!==i);l===null?s=n:l.next=o,sa(n,t.memoizedState)||(Wr=!0),t.memoizedState=n,t.baseState=s,t.baseQueue=l,r.lastRenderedState=n}if(e=r.interleaved,e!==null){a=e;do i=a.lane,Tt.lanes|=i,wo|=i,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function Hy(e){var t=Rn(),r=t.queue;if(r===null)throw Error(J(311));r.lastRenderedReducer=e;var n=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var s=a=a.next;do i=e(i,s.action),s=s.next;while(s!==a);sa(i,t.memoizedState)||(Wr=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function d3(){}function f3(e,t){var r=Tt,n=Rn(),a=t(),i=!sa(n.memoizedState,a);if(i&&(n.memoizedState=a,Wr=!0),n=n.queue,Sk(m3.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||cr!==null&&cr.memoizedState.tag&1){if(r.flags|=2048,Id(9,p3.bind(null,r,n,a,t),void 0,null),ur===null)throw Error(J(349));bo&30||h3(r,t,a)}return a}function h3(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Tt.updateQueue,t===null?(t={lastEffect:null,stores:null},Tt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function p3(e,t,r,n){t.value=r,t.getSnapshot=n,g3(t)&&y3(e)}function m3(e,t,r){return r(function(){g3(t)&&y3(e)})}function g3(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!sa(e,r)}catch{return!0}}function y3(e){var t=ti(e,1);t!==null&&aa(t,e,1,-1)}function s_(e){var t=pa();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Dd,lastRenderedState:e},t.queue=e,e=e.dispatch=X7.bind(null,Tt,e),[t.memoizedState,e]}function Id(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=Tt.updateQueue,t===null?(t={lastEffect:null,stores:null},Tt.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function v3(){return Rn().memoizedState}function Sp(e,t,r,n){var a=pa();Tt.flags|=e,a.memoizedState=Id(1|t,r,void 0,n===void 0?null:n)}function H0(e,t,r,n){var a=Rn();n=n===void 0?null:n;var i=void 0;if(tr!==null){var s=tr.memoizedState;if(i=s.destroy,n!==null&&wk(n,s.deps)){a.memoizedState=Id(t,r,i,n);return}}Tt.flags|=e,a.memoizedState=Id(1|t,r,i,n)}function o_(e,t){return Sp(8390656,8,e,t)}function Sk(e,t){return H0(2048,8,e,t)}function x3(e,t){return H0(4,2,e,t)}function b3(e,t){return H0(4,4,e,t)}function w3(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function j3(e,t,r){return r=r!=null?r.concat([e]):null,H0(4,4,w3.bind(null,t,e),r)}function Nk(){}function k3(e,t){var r=Rn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&wk(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function S3(e,t){var r=Rn();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&wk(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function N3(e,t,r){return bo&21?(sa(r,t)||(r=OR(),Tt.lanes|=r,wo|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Wr=!0),e.memoizedState=r)}function K7(e,t){var r=it;it=r!==0&&4>r?r:4,e(!0);var n=Vy.transition;Vy.transition={};try{e(!1),t()}finally{it=r,Vy.transition=n}}function _3(){return Rn().memoizedState}function Y7(e,t,r){var n=is(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},E3(e))P3(t,r);else if(r=l3(e,t,r,n),r!==null){var a=Rr();aa(r,e,n,a),A3(r,t,n)}}function X7(e,t,r){var n=is(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(E3(e))P3(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,o=i(s,r);if(a.hasEagerState=!0,a.eagerState=o,sa(o,s)){var l=t.interleaved;l===null?(a.next=a,gk(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=l3(e,t,a,n),r!==null&&(a=Rr(),aa(r,e,n,a),A3(r,t,n))}}function E3(e){var t=e.alternate;return e===Tt||t!==null&&t===Tt}function P3(e,t){od=am=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function A3(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,rk(e,r)}}var im={readContext:$n,useCallback:wr,useContext:wr,useEffect:wr,useImperativeHandle:wr,useInsertionEffect:wr,useLayoutEffect:wr,useMemo:wr,useReducer:wr,useRef:wr,useState:wr,useDebugValue:wr,useDeferredValue:wr,useTransition:wr,useMutableSource:wr,useSyncExternalStore:wr,useId:wr,unstable_isNewReconciler:!1},Z7={readContext:$n,useCallback:function(e,t){return pa().memoizedState=[e,t===void 0?null:t],e},useContext:$n,useEffect:o_,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Sp(4194308,4,w3.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Sp(4194308,4,e,t)},useInsertionEffect:function(e,t){return Sp(4,2,e,t)},useMemo:function(e,t){var r=pa();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=pa();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=Y7.bind(null,Tt,e),[n.memoizedState,e]},useRef:function(e){var t=pa();return e={current:e},t.memoizedState=e},useState:s_,useDebugValue:Nk,useDeferredValue:function(e){return pa().memoizedState=e},useTransition:function(){var e=s_(!1),t=e[0];return e=K7.bind(null,e[1]),pa().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Tt,a=pa();if(_t){if(r===void 0)throw Error(J(407));r=r()}else{if(r=t(),ur===null)throw Error(J(349));bo&30||h3(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,o_(m3.bind(null,n,i,e),[e]),n.flags|=2048,Id(9,p3.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=pa(),t=ur.identifierPrefix;if(_t){var r=za,n=La;r=(n&~(1<<32-na(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=Rd++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=G7++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Q7={readContext:$n,useCallback:k3,useContext:$n,useEffect:Sk,useImperativeHandle:j3,useInsertionEffect:x3,useLayoutEffect:b3,useMemo:S3,useReducer:Uy,useRef:v3,useState:function(){return Uy(Dd)},useDebugValue:Nk,useDeferredValue:function(e){var t=Rn();return N3(t,tr.memoizedState,e)},useTransition:function(){var e=Uy(Dd)[0],t=Rn().memoizedState;return[e,t]},useMutableSource:d3,useSyncExternalStore:f3,useId:_3,unstable_isNewReconciler:!1},J7={readContext:$n,useCallback:k3,useContext:$n,useEffect:Sk,useImperativeHandle:j3,useInsertionEffect:x3,useLayoutEffect:b3,useMemo:S3,useReducer:Hy,useRef:v3,useState:function(){return Hy(Dd)},useDebugValue:Nk,useDeferredValue:function(e){var t=Rn();return tr===null?t.memoizedState=e:N3(t,tr.memoizedState,e)},useTransition:function(){var e=Hy(Dd)[0],t=Rn().memoizedState;return[e,t]},useMutableSource:d3,useSyncExternalStore:f3,useId:_3,unstable_isNewReconciler:!1};function qn(e,t){if(e&&e.defaultProps){t=Mt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function iw(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:Mt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var W0={isMounted:function(e){return(e=e._reactInternals)?Io(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Rr(),a=is(e),i=qa(n,a);i.payload=t,r!=null&&(i.callback=r),t=ns(e,i,a),t!==null&&(aa(t,e,a,n),jp(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Rr(),a=is(e),i=qa(n,a);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=ns(e,i,a),t!==null&&(aa(t,e,a,n),jp(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Rr(),n=is(e),a=qa(r,n);a.tag=2,t!=null&&(a.callback=t),t=ns(e,a,n),t!==null&&(aa(t,e,n,r),jp(t,e,n))}};function l_(e,t,r,n,a,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,s):t.prototype&&t.prototype.isPureReactComponent?!Ad(r,n)||!Ad(a,i):!0}function O3(e,t,r){var n=!1,a=hs,i=t.contextType;return typeof i=="object"&&i!==null?i=$n(i):(a=Yr(t)?vo:Pr.current,n=t.contextTypes,i=(n=n!=null)?Zl(e,a):hs),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=W0,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function c_(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&W0.enqueueReplaceState(t,t.state,null)}function sw(e,t,r,n){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},yk(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=$n(i):(i=Yr(t)?vo:Pr.current,a.context=Zl(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(iw(e,t,i,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&W0.enqueueReplaceState(a,a.state,null),rm(e,r,a,n),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function tc(e,t){try{var r="",n=t;do r+=EB(n),n=n.return;while(n);var a=r}catch(i){a=`
|
|
39
|
-
Error generating stack: `+i.message+`
|
|
40
|
-
`+i.stack}return{value:e,source:t,stack:a,digest:null}}function Wy(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function ow(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var e9=typeof WeakMap=="function"?WeakMap:Map;function C3(e,t,r){r=qa(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){om||(om=!0,yw=n),ow(e,t)},r}function T3(e,t,r){r=qa(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var a=t.value;r.payload=function(){return n(a)},r.callback=function(){ow(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){ow(e,t),typeof n!="function"&&(as===null?as=new Set([this]):as.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),r}function u_(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new e9;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(r)||(a.add(r),e=p9.bind(null,e,t,r),t.then(e,e))}function d_(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function f_(e,t,r,n,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=qa(-1,1),t.tag=2,ns(r,t,1))),r.lanes|=1),e)}var t9=gi.ReactCurrentOwner,Wr=!1;function Tr(e,t,r,n){t.child=e===null?o3(t,null,r,n):Jl(t,e.child,r,n)}function h_(e,t,r,n,a){r=r.render;var i=t.ref;return Il(t,a),n=jk(e,t,r,n,i,a),r=kk(),e!==null&&!Wr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,ri(e,t,a)):(_t&&r&&uk(t),t.flags|=1,Tr(e,t,n,a),t.child)}function p_(e,t,r,n,a){if(e===null){var i=r.type;return typeof i=="function"&&!Mk(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,M3(e,t,i,n,a)):(e=Pp(r.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var s=i.memoizedProps;if(r=r.compare,r=r!==null?r:Ad,r(s,n)&&e.ref===t.ref)return ri(e,t,a)}return t.flags|=1,e=ss(i,n),e.ref=t.ref,e.return=t,t.child=e}function M3(e,t,r,n,a){if(e!==null){var i=e.memoizedProps;if(Ad(i,n)&&e.ref===t.ref)if(Wr=!1,t.pendingProps=n=i,(e.lanes&a)!==0)e.flags&131072&&(Wr=!0);else return t.lanes=e.lanes,ri(e,t,a)}return lw(e,t,r,n,a)}function $3(e,t,r){var n=t.pendingProps,a=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(jl,en),en|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ht(jl,en),en|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,ht(jl,en),en|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,ht(jl,en),en|=n;return Tr(e,t,a,r),t.child}function R3(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function lw(e,t,r,n,a){var i=Yr(r)?vo:Pr.current;return i=Zl(t,i),Il(t,a),r=jk(e,t,r,n,i,a),n=kk(),e!==null&&!Wr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,ri(e,t,a)):(_t&&n&&uk(t),t.flags|=1,Tr(e,t,r,a),t.child)}function m_(e,t,r,n,a){if(Yr(r)){var i=!0;Zp(t)}else i=!1;if(Il(t,a),t.stateNode===null)Np(e,t),O3(t,r,n),sw(t,r,n,a),n=!0;else if(e===null){var s=t.stateNode,o=t.memoizedProps;s.props=o;var l=s.context,u=r.contextType;typeof u=="object"&&u!==null?u=$n(u):(u=Yr(r)?vo:Pr.current,u=Zl(t,u));var d=r.getDerivedStateFromProps,f=typeof d=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==n||l!==u)&&c_(t,s,n,u),zi=!1;var h=t.memoizedState;s.state=h,rm(t,n,s,a),l=t.memoizedState,o!==n||h!==l||Kr.current||zi?(typeof d=="function"&&(iw(t,r,d,n),l=t.memoizedState),(o=zi||l_(t,r,o,n,h,l,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=l),s.props=n,s.state=l,s.context=u,n=o):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,c3(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:qn(t.type,o),s.props=u,f=t.pendingProps,h=s.context,l=r.contextType,typeof l=="object"&&l!==null?l=$n(l):(l=Yr(r)?vo:Pr.current,l=Zl(t,l));var p=r.getDerivedStateFromProps;(d=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o!==f||h!==l)&&c_(t,s,n,l),zi=!1,h=t.memoizedState,s.state=h,rm(t,n,s,a);var m=t.memoizedState;o!==f||h!==m||Kr.current||zi?(typeof p=="function"&&(iw(t,r,p,n),m=t.memoizedState),(u=zi||l_(t,r,u,n,h,m,l)||!1)?(d||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,m,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,m,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=m),s.props=n,s.state=m,s.context=l,n=u):(typeof s.componentDidUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),n=!1)}return cw(e,t,r,n,i,a)}function cw(e,t,r,n,a,i){R3(e,t);var s=(t.flags&128)!==0;if(!n&&!s)return a&&e_(t,r,!1),ri(e,t,i);n=t.stateNode,t9.current=t;var o=s&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&s?(t.child=Jl(t,e.child,null,i),t.child=Jl(t,null,o,i)):Tr(e,t,o,i),t.memoizedState=n.state,a&&e_(t,r,!0),t.child}function D3(e){var t=e.stateNode;t.pendingContext?JN(e,t.pendingContext,t.pendingContext!==t.context):t.context&&JN(e,t.context,!1),vk(e,t.containerInfo)}function g_(e,t,r,n,a){return Ql(),fk(a),t.flags|=256,Tr(e,t,r,n),t.child}var uw={dehydrated:null,treeContext:null,retryLane:0};function dw(e){return{baseLanes:e,cachePool:null,transitions:null}}function I3(e,t,r){var n=t.pendingProps,a=Ot.current,i=!1,s=(t.flags&128)!==0,o;if((o=s)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),ht(Ot,a&1),e===null)return nw(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=n.children,e=n.fallback,i?(n=t.mode,i=t.child,s={mode:"hidden",children:s},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=K0(s,n,0,null),e=uo(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=dw(r),t.memoizedState=uw,e):_k(t,s));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return r9(e,t,s,n,o,a,r);if(i){i=n.fallback,s=t.mode,a=e.child,o=a.sibling;var l={mode:"hidden",children:n.children};return!(s&1)&&t.child!==a?(n=t.child,n.childLanes=0,n.pendingProps=l,t.deletions=null):(n=ss(a,l),n.subtreeFlags=a.subtreeFlags&14680064),o!==null?i=ss(o,i):(i=uo(i,s,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,s=e.child.memoizedState,s=s===null?dw(r):{baseLanes:s.baseLanes|r,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~r,t.memoizedState=uw,n}return i=e.child,e=i.sibling,n=ss(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function _k(e,t){return t=K0({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Eh(e,t,r,n){return n!==null&&fk(n),Jl(t,e.child,null,r),e=_k(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function r9(e,t,r,n,a,i,s){if(r)return t.flags&256?(t.flags&=-257,n=Wy(Error(J(422))),Eh(e,t,s,n)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,a=t.mode,n=K0({mode:"visible",children:n.children},a,0,null),i=uo(i,a,s,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&Jl(t,e.child,null,s),t.child.memoizedState=dw(s),t.memoizedState=uw,i);if(!(t.mode&1))return Eh(e,t,s,null);if(a.data==="$!"){if(n=a.nextSibling&&a.nextSibling.dataset,n)var o=n.dgst;return n=o,i=Error(J(419)),n=Wy(i,n,void 0),Eh(e,t,s,n)}if(o=(s&e.childLanes)!==0,Wr||o){if(n=ur,n!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(n.suspendedLanes|s)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,ti(e,a),aa(n,e,a,-1))}return Tk(),n=Wy(Error(J(421))),Eh(e,t,s,n)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=m9.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,sn=rs(a.nextSibling),on=t,_t=!0,Qn=null,e!==null&&(wn[jn++]=La,wn[jn++]=za,wn[jn++]=xo,La=e.id,za=e.overflow,xo=t),t=_k(t,n.children),t.flags|=4096,t)}function y_(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),aw(e.return,t,r)}function qy(e,t,r,n,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=a)}function L3(e,t,r){var n=t.pendingProps,a=n.revealOrder,i=n.tail;if(Tr(e,t,n.children,r),n=Ot.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&y_(e,r,t);else if(e.tag===19)y_(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(ht(Ot,n),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&nm(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),qy(t,!1,a,r,i);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&nm(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}qy(t,!0,r,null,i);break;case"together":qy(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Np(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ri(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),wo|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(J(153));if(t.child!==null){for(e=t.child,r=ss(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ss(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function n9(e,t,r){switch(t.tag){case 3:D3(t),Ql();break;case 5:u3(t);break;case 1:Yr(t.type)&&Zp(t);break;case 4:vk(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,a=t.memoizedProps.value;ht(em,n._currentValue),n._currentValue=a;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(ht(Ot,Ot.current&1),t.flags|=128,null):r&t.child.childLanes?I3(e,t,r):(ht(Ot,Ot.current&1),e=ri(e,t,r),e!==null?e.sibling:null);ht(Ot,Ot.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return L3(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),ht(Ot,Ot.current),n)break;return null;case 22:case 23:return t.lanes=0,$3(e,t,r)}return ri(e,t,r)}var z3,fw,F3,B3;z3=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};fw=function(){};F3=function(e,t,r,n){var a=e.memoizedProps;if(a!==n){e=t.stateNode,Js(wa.current);var i=null;switch(r){case"input":a=$b(e,a),n=$b(e,n),i=[];break;case"select":a=Mt({},a,{value:void 0}),n=Mt({},n,{value:void 0}),i=[];break;case"textarea":a=Ib(e,a),n=Ib(e,n),i=[];break;default:typeof a.onClick!="function"&&typeof n.onClick=="function"&&(e.onclick=Yp)}zb(r,n);var s;r=null;for(u in a)if(!n.hasOwnProperty(u)&&a.hasOwnProperty(u)&&a[u]!=null)if(u==="style"){var o=a[u];for(s in o)o.hasOwnProperty(s)&&(r||(r={}),r[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(jd.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in n){var l=n[u];if(o=a!=null?a[u]:void 0,n.hasOwnProperty(u)&&l!==o&&(l!=null||o!=null))if(u==="style")if(o){for(s in o)!o.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(r||(r={}),r[s]="");for(s in l)l.hasOwnProperty(s)&&o[s]!==l[s]&&(r||(r={}),r[s]=l[s])}else r||(i||(i=[]),i.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(jd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&vt("scroll",e),i||o===l||(i=[])):(i=i||[]).push(u,l))}r&&(i=i||[]).push("style",r);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};B3=function(e,t,r,n){r!==n&&(t.flags|=4)};function gu(e,t){if(!_t)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function jr(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags&14680064,n|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function a9(e,t,r){var n=t.pendingProps;switch(dk(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return jr(t),null;case 1:return Yr(t.type)&&Xp(),jr(t),null;case 3:return n=t.stateNode,ec(),wt(Kr),wt(Pr),bk(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Nh(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Qn!==null&&(bw(Qn),Qn=null))),fw(e,t),jr(t),null;case 5:xk(t);var a=Js($d.current);if(r=t.type,e!==null&&t.stateNode!=null)F3(e,t,r,n,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!n){if(t.stateNode===null)throw Error(J(166));return jr(t),null}if(e=Js(wa.current),Nh(t)){n=t.stateNode,r=t.type;var i=t.memoizedProps;switch(n[ga]=t,n[Td]=i,e=(t.mode&1)!==0,r){case"dialog":vt("cancel",n),vt("close",n);break;case"iframe":case"object":case"embed":vt("load",n);break;case"video":case"audio":for(a=0;a<qu.length;a++)vt(qu[a],n);break;case"source":vt("error",n);break;case"img":case"image":case"link":vt("error",n),vt("load",n);break;case"details":vt("toggle",n);break;case"input":_N(n,i),vt("invalid",n);break;case"select":n._wrapperState={wasMultiple:!!i.multiple},vt("invalid",n);break;case"textarea":PN(n,i),vt("invalid",n)}zb(r,i),a=null;for(var s in i)if(i.hasOwnProperty(s)){var o=i[s];s==="children"?typeof o=="string"?n.textContent!==o&&(i.suppressHydrationWarning!==!0&&Sh(n.textContent,o,e),a=["children",o]):typeof o=="number"&&n.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Sh(n.textContent,o,e),a=["children",""+o]):jd.hasOwnProperty(s)&&o!=null&&s==="onScroll"&&vt("scroll",n)}switch(r){case"input":gh(n),EN(n,i,!0);break;case"textarea":gh(n),AN(n);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(n.onclick=Yp)}n=a,t.updateQueue=n,n!==null&&(t.flags|=4)}else{s=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=mR(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=s.createElement(r,{is:n.is}):(e=s.createElement(r),r==="select"&&(s=e,n.multiple?s.multiple=!0:n.size&&(s.size=n.size))):e=s.createElementNS(e,r),e[ga]=t,e[Td]=n,z3(e,t,!1,!1),t.stateNode=e;e:{switch(s=Fb(r,n),r){case"dialog":vt("cancel",e),vt("close",e),a=n;break;case"iframe":case"object":case"embed":vt("load",e),a=n;break;case"video":case"audio":for(a=0;a<qu.length;a++)vt(qu[a],e);a=n;break;case"source":vt("error",e),a=n;break;case"img":case"image":case"link":vt("error",e),vt("load",e),a=n;break;case"details":vt("toggle",e),a=n;break;case"input":_N(e,n),a=$b(e,n),vt("invalid",e);break;case"option":a=n;break;case"select":e._wrapperState={wasMultiple:!!n.multiple},a=Mt({},n,{value:void 0}),vt("invalid",e);break;case"textarea":PN(e,n),a=Ib(e,n),vt("invalid",e);break;default:a=n}zb(r,a),o=a;for(i in o)if(o.hasOwnProperty(i)){var l=o[i];i==="style"?vR(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&gR(e,l)):i==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&kd(e,l):typeof l=="number"&&kd(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(jd.hasOwnProperty(i)?l!=null&&i==="onScroll"&&vt("scroll",e):l!=null&&Xj(e,i,l,s))}switch(r){case"input":gh(e),EN(e,n,!1);break;case"textarea":gh(e),AN(e);break;case"option":n.value!=null&&e.setAttribute("value",""+fs(n.value));break;case"select":e.multiple=!!n.multiple,i=n.value,i!=null?Ml(e,!!n.multiple,i,!1):n.defaultValue!=null&&Ml(e,!!n.multiple,n.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=Yp)}switch(r){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}}n&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return jr(t),null;case 6:if(e&&t.stateNode!=null)B3(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error(J(166));if(r=Js($d.current),Js(wa.current),Nh(t)){if(n=t.stateNode,r=t.memoizedProps,n[ga]=t,(i=n.nodeValue!==r)&&(e=on,e!==null))switch(e.tag){case 3:Sh(n.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Sh(n.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else n=(r.nodeType===9?r:r.ownerDocument).createTextNode(n),n[ga]=t,t.stateNode=n}return jr(t),null;case 13:if(wt(Ot),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_t&&sn!==null&&t.mode&1&&!(t.flags&128))i3(),Ql(),t.flags|=98560,i=!1;else if(i=Nh(t),n!==null&&n.dehydrated!==null){if(e===null){if(!i)throw Error(J(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(J(317));i[ga]=t}else Ql(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;jr(t),i=!1}else Qn!==null&&(bw(Qn),Qn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(n=n!==null,n!==(e!==null&&e.memoizedState!==null)&&n&&(t.child.flags|=8192,t.mode&1&&(e===null||Ot.current&1?rr===0&&(rr=3):Tk())),t.updateQueue!==null&&(t.flags|=4),jr(t),null);case 4:return ec(),fw(e,t),e===null&&Od(t.stateNode.containerInfo),jr(t),null;case 10:return mk(t.type._context),jr(t),null;case 17:return Yr(t.type)&&Xp(),jr(t),null;case 19:if(wt(Ot),i=t.memoizedState,i===null)return jr(t),null;if(n=(t.flags&128)!==0,s=i.rendering,s===null)if(n)gu(i,!1);else{if(rr!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=nm(e),s!==null){for(t.flags|=128,gu(i,!1),n=s.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),t.subtreeFlags=0,n=r,r=t.child;r!==null;)i=r,e=n,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ht(Ot,Ot.current&1|2),t.child}e=e.sibling}i.tail!==null&&Ft()>rc&&(t.flags|=128,n=!0,gu(i,!1),t.lanes=4194304)}else{if(!n)if(e=nm(s),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),gu(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!_t)return jr(t),null}else 2*Ft()-i.renderingStartTime>rc&&r!==1073741824&&(t.flags|=128,n=!0,gu(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(r=i.last,r!==null?r.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Ft(),t.sibling=null,r=Ot.current,ht(Ot,n?r&1|2:r&1),t):(jr(t),null);case 22:case 23:return Ck(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?en&1073741824&&(jr(t),t.subtreeFlags&6&&(t.flags|=8192)):jr(t),null;case 24:return null;case 25:return null}throw Error(J(156,t.tag))}function i9(e,t){switch(dk(t),t.tag){case 1:return Yr(t.type)&&Xp(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ec(),wt(Kr),wt(Pr),bk(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return xk(t),null;case 13:if(wt(Ot),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(J(340));Ql()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return wt(Ot),null;case 4:return ec(),null;case 10:return mk(t.type._context),null;case 22:case 23:return Ck(),null;case 24:return null;default:return null}}var Ph=!1,Sr=!1,s9=typeof WeakSet=="function"?WeakSet:Set,ue=null;function wl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Rt(e,t,n)}else r.current=null}function hw(e,t,r){try{r()}catch(n){Rt(e,t,n)}}var v_=!1;function o9(e,t){if(Xb=qp,e=qR(),ck(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var s=0,o=-1,l=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==r||a!==0&&f.nodeType!==3||(o=s+a),f!==i||n!==0&&f.nodeType!==3||(l=s+n),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===r&&++u===a&&(o=s),h===i&&++d===n&&(l=s),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}r=o===-1||l===-1?null:{start:o,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Zb={focusedElem:e,selectionRange:r},qp=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,b=m.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:qn(t.type,g),b);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(J(163))}}catch(j){Rt(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return m=v_,v_=!1,m}function ld(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&hw(t,r,i)}a=a.next}while(a!==n)}}function q0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function pw(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function V3(e){var t=e.alternate;t!==null&&(e.alternate=null,V3(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ga],delete t[Td],delete t[ew],delete t[U7],delete t[H7])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function U3(e){return e.tag===5||e.tag===3||e.tag===4}function x_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||U3(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Yp));else if(n!==4&&(e=e.child,e!==null))for(mw(e,t,r),e=e.sibling;e!==null;)mw(e,t,r),e=e.sibling}function gw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(gw(e,t,r),e=e.sibling;e!==null;)gw(e,t,r),e=e.sibling}var pr=null,Gn=!1;function Oi(e,t,r){for(r=r.child;r!==null;)H3(e,t,r),r=r.sibling}function H3(e,t,r){if(ba&&typeof ba.onCommitFiberUnmount=="function")try{ba.onCommitFiberUnmount(L0,r)}catch{}switch(r.tag){case 5:Sr||wl(r,t);case 6:var n=pr,a=Gn;pr=null,Oi(e,t,r),pr=n,Gn=a,pr!==null&&(Gn?(e=pr,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):pr.removeChild(r.stateNode));break;case 18:pr!==null&&(Gn?(e=pr,r=r.stateNode,e.nodeType===8?zy(e.parentNode,r):e.nodeType===1&&zy(e,r),Ed(e)):zy(pr,r.stateNode));break;case 4:n=pr,a=Gn,pr=r.stateNode.containerInfo,Gn=!0,Oi(e,t,r),pr=n,Gn=a;break;case 0:case 11:case 14:case 15:if(!Sr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&hw(r,t,s),a=a.next}while(a!==n)}Oi(e,t,r);break;case 1:if(!Sr&&(wl(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){Rt(r,t,o)}Oi(e,t,r);break;case 21:Oi(e,t,r);break;case 22:r.mode&1?(Sr=(n=Sr)||r.memoizedState!==null,Oi(e,t,r),Sr=n):Oi(e,t,r);break;default:Oi(e,t,r)}}function b_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new s9),t.forEach(function(n){var a=g9.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function Un(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var a=r[n];try{var i=e,s=t,o=s;e:for(;o!==null;){switch(o.tag){case 5:pr=o.stateNode,Gn=!1;break e;case 3:pr=o.stateNode.containerInfo,Gn=!0;break e;case 4:pr=o.stateNode.containerInfo,Gn=!0;break e}o=o.return}if(pr===null)throw Error(J(160));H3(i,s,a),pr=null,Gn=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(u){Rt(a,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)W3(t,e),t=t.sibling}function W3(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Un(t,e),ha(e),n&4){try{ld(3,e,e.return),q0(3,e)}catch(g){Rt(e,e.return,g)}try{ld(5,e,e.return)}catch(g){Rt(e,e.return,g)}}break;case 1:Un(t,e),ha(e),n&512&&r!==null&&wl(r,r.return);break;case 5:if(Un(t,e),ha(e),n&512&&r!==null&&wl(r,r.return),e.flags&32){var a=e.stateNode;try{kd(a,"")}catch(g){Rt(e,e.return,g)}}if(n&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,s=r!==null?r.memoizedProps:i,o=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&hR(a,i),Fb(o,s);var u=Fb(o,i);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d==="style"?vR(a,f):d==="dangerouslySetInnerHTML"?gR(a,f):d==="children"?kd(a,f):Xj(a,d,f,u)}switch(o){case"input":Rb(a,i);break;case"textarea":pR(a,i);break;case"select":var h=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Ml(a,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?Ml(a,!!i.multiple,i.defaultValue,!0):Ml(a,!!i.multiple,i.multiple?[]:"",!1))}a[Td]=i}catch(g){Rt(e,e.return,g)}}break;case 6:if(Un(t,e),ha(e),n&4){if(e.stateNode===null)throw Error(J(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(g){Rt(e,e.return,g)}}break;case 3:if(Un(t,e),ha(e),n&4&&r!==null&&r.memoizedState.isDehydrated)try{Ed(t.containerInfo)}catch(g){Rt(e,e.return,g)}break;case 4:Un(t,e),ha(e);break;case 13:Un(t,e),ha(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(Ak=Ft())),n&4&&b_(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(Sr=(u=Sr)||d,Un(t,e),Sr=u):Un(t,e),ha(e),n&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(ue=e,d=e.child;d!==null;){for(f=ue=d;ue!==null;){switch(h=ue,p=h.child,h.tag){case 0:case 11:case 14:case 15:ld(4,h,h.return);break;case 1:wl(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){n=h,r=h.return;try{t=n,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Rt(n,r,g)}}break;case 5:wl(h,h.return);break;case 22:if(h.memoizedState!==null){j_(f);continue}}p!==null?(p.return=h,ue=p):j_(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=yR("display",s))}catch(g){Rt(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Rt(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Un(t,e),ha(e),n&4&&b_(e);break;case 21:break;default:Un(t,e),ha(e)}}function ha(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(U3(r)){var n=r;break e}r=r.return}throw Error(J(160))}switch(n.tag){case 5:var a=n.stateNode;n.flags&32&&(kd(a,""),n.flags&=-33);var i=x_(e);gw(e,i,a);break;case 3:case 4:var s=n.stateNode.containerInfo,o=x_(e);mw(e,o,s);break;default:throw Error(J(161))}}catch(l){Rt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function l9(e,t,r){ue=e,q3(e)}function q3(e,t,r){for(var n=(e.mode&1)!==0;ue!==null;){var a=ue,i=a.child;if(a.tag===22&&n){var s=a.memoizedState!==null||Ph;if(!s){var o=a.alternate,l=o!==null&&o.memoizedState!==null||Sr;o=Ph;var u=Sr;if(Ph=s,(Sr=l)&&!u)for(ue=a;ue!==null;)s=ue,l=s.child,s.tag===22&&s.memoizedState!==null?k_(a):l!==null?(l.return=s,ue=l):k_(a);for(;i!==null;)ue=i,q3(i),i=i.sibling;ue=a,Ph=o,Sr=u}w_(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,ue=i):w_(e)}}function w_(e){for(;ue!==null;){var t=ue;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Sr||q0(5,t);break;case 1:var n=t.stateNode;if(t.flags&4&&!Sr)if(r===null)n.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:qn(t.type,r.memoizedProps);n.componentDidUpdate(a,r.memoizedState,n.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&i_(t,i,n);break;case 3:var s=t.updateQueue;if(s!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}i_(t,s,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ed(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(J(163))}Sr||t.flags&512&&pw(t)}catch(h){Rt(t,t.return,h)}}if(t===e){ue=null;break}if(r=t.sibling,r!==null){r.return=t.return,ue=r;break}ue=t.return}}function j_(e){for(;ue!==null;){var t=ue;if(t===e){ue=null;break}var r=t.sibling;if(r!==null){r.return=t.return,ue=r;break}ue=t.return}}function k_(e){for(;ue!==null;){var t=ue;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{q0(4,t)}catch(l){Rt(t,r,l)}break;case 1:var n=t.stateNode;if(typeof n.componentDidMount=="function"){var a=t.return;try{n.componentDidMount()}catch(l){Rt(t,a,l)}}var i=t.return;try{pw(t)}catch(l){Rt(t,i,l)}break;case 5:var s=t.return;try{pw(t)}catch(l){Rt(t,s,l)}}}catch(l){Rt(t,t.return,l)}if(t===e){ue=null;break}var o=t.sibling;if(o!==null){o.return=t.return,ue=o;break}ue=t.return}}var c9=Math.ceil,sm=gi.ReactCurrentDispatcher,Ek=gi.ReactCurrentOwner,Pn=gi.ReactCurrentBatchConfig,Xe=0,ur=null,Kt=null,yr=0,en=0,jl=ks(0),rr=0,Ld=null,wo=0,G0=0,Pk=0,cd=null,Hr=null,Ak=0,rc=1/0,Da=null,om=!1,yw=null,as=null,Ah=!1,Ki=null,lm=0,ud=0,vw=null,_p=-1,Ep=0;function Rr(){return Xe&6?Ft():_p!==-1?_p:_p=Ft()}function is(e){return e.mode&1?Xe&2&&yr!==0?yr&-yr:q7.transition!==null?(Ep===0&&(Ep=OR()),Ep):(e=it,e!==0||(e=window.event,e=e===void 0?16:IR(e.type)),e):1}function aa(e,t,r,n){if(50<ud)throw ud=0,vw=null,Error(J(185));zf(e,r,n),(!(Xe&2)||e!==ur)&&(e===ur&&(!(Xe&2)&&(G0|=r),rr===4&&Ui(e,yr)),Xr(e,n),r===1&&Xe===0&&!(t.mode&1)&&(rc=Ft()+500,U0&&Ss()))}function Xr(e,t){var r=e.callbackNode;qB(e,t);var n=Wp(e,e===ur?yr:0);if(n===0)r!==null&&TN(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&TN(r),t===1)e.tag===0?W7(S_.bind(null,e)):r3(S_.bind(null,e)),B7(function(){!(Xe&6)&&Ss()}),r=null;else{switch(CR(n)){case 1:r=tk;break;case 4:r=PR;break;case 16:r=Hp;break;case 536870912:r=AR;break;default:r=Hp}r=eD(r,G3.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function G3(e,t){if(_p=-1,Ep=0,Xe&6)throw Error(J(327));var r=e.callbackNode;if(Ll()&&e.callbackNode!==r)return null;var n=Wp(e,e===ur?yr:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=cm(e,n);else{t=n;var a=Xe;Xe|=2;var i=Y3();(ur!==e||yr!==t)&&(Da=null,rc=Ft()+500,co(e,t));do try{f9();break}catch(o){K3(e,o)}while(!0);pk(),sm.current=i,Xe=a,Kt!==null?t=0:(ur=null,yr=0,t=rr)}if(t!==0){if(t===2&&(a=Wb(e),a!==0&&(n=a,t=xw(e,a))),t===1)throw r=Ld,co(e,0),Ui(e,n),Xr(e,Ft()),r;if(t===6)Ui(e,n);else{if(a=e.current.alternate,!(n&30)&&!u9(a)&&(t=cm(e,n),t===2&&(i=Wb(e),i!==0&&(n=i,t=xw(e,i))),t===1))throw r=Ld,co(e,0),Ui(e,n),Xr(e,Ft()),r;switch(e.finishedWork=a,e.finishedLanes=n,t){case 0:case 1:throw Error(J(345));case 2:Vs(e,Hr,Da);break;case 3:if(Ui(e,n),(n&130023424)===n&&(t=Ak+500-Ft(),10<t)){if(Wp(e,0)!==0)break;if(a=e.suspendedLanes,(a&n)!==n){Rr(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Jb(Vs.bind(null,e,Hr,Da),t);break}Vs(e,Hr,Da);break;case 4:if(Ui(e,n),(n&4194240)===n)break;for(t=e.eventTimes,a=-1;0<n;){var s=31-na(n);i=1<<s,s=t[s],s>a&&(a=s),n&=~i}if(n=a,n=Ft()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*c9(n/1960))-n,10<n){e.timeoutHandle=Jb(Vs.bind(null,e,Hr,Da),n);break}Vs(e,Hr,Da);break;case 5:Vs(e,Hr,Da);break;default:throw Error(J(329))}}}return Xr(e,Ft()),e.callbackNode===r?G3.bind(null,e):null}function xw(e,t){var r=cd;return e.current.memoizedState.isDehydrated&&(co(e,t).flags|=256),e=cm(e,t),e!==2&&(t=Hr,Hr=r,t!==null&&bw(t)),e}function bw(e){Hr===null?Hr=e:Hr.push.apply(Hr,e)}function u9(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var a=r[n],i=a.getSnapshot;a=a.value;try{if(!sa(i(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ui(e,t){for(t&=~Pk,t&=~G0,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-na(t),n=1<<r;e[r]=-1,t&=~n}}function S_(e){if(Xe&6)throw Error(J(327));Ll();var t=Wp(e,0);if(!(t&1))return Xr(e,Ft()),null;var r=cm(e,t);if(e.tag!==0&&r===2){var n=Wb(e);n!==0&&(t=n,r=xw(e,n))}if(r===1)throw r=Ld,co(e,0),Ui(e,t),Xr(e,Ft()),r;if(r===6)throw Error(J(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Vs(e,Hr,Da),Xr(e,Ft()),null}function Ok(e,t){var r=Xe;Xe|=1;try{return e(t)}finally{Xe=r,Xe===0&&(rc=Ft()+500,U0&&Ss())}}function jo(e){Ki!==null&&Ki.tag===0&&!(Xe&6)&&Ll();var t=Xe;Xe|=1;var r=Pn.transition,n=it;try{if(Pn.transition=null,it=1,e)return e()}finally{it=n,Pn.transition=r,Xe=t,!(Xe&6)&&Ss()}}function Ck(){en=jl.current,wt(jl)}function co(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,F7(r)),Kt!==null)for(r=Kt.return;r!==null;){var n=r;switch(dk(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Xp();break;case 3:ec(),wt(Kr),wt(Pr),bk();break;case 5:xk(n);break;case 4:ec();break;case 13:wt(Ot);break;case 19:wt(Ot);break;case 10:mk(n.type._context);break;case 22:case 23:Ck()}r=r.return}if(ur=e,Kt=e=ss(e.current,null),yr=en=t,rr=0,Ld=null,Pk=G0=wo=0,Hr=cd=null,Qs!==null){for(t=0;t<Qs.length;t++)if(r=Qs[t],n=r.interleaved,n!==null){r.interleaved=null;var a=n.next,i=r.pending;if(i!==null){var s=i.next;i.next=a,n.next=s}r.pending=n}Qs=null}return e}function K3(e,t){do{var r=Kt;try{if(pk(),kp.current=im,am){for(var n=Tt.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}am=!1}if(bo=0,cr=tr=Tt=null,od=!1,Rd=0,Ek.current=null,r===null||r.return===null){rr=1,Ld=t,Kt=null;break}e:{var i=e,s=r.return,o=r,l=t;if(t=yr,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=o,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=d_(s);if(p!==null){p.flags&=-257,f_(p,s,o,i,t),p.mode&1&&u_(i,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if(!(t&1)){u_(i,u,t),Tk();break e}l=Error(J(426))}}else if(_t&&o.mode&1){var b=d_(s);if(b!==null){!(b.flags&65536)&&(b.flags|=256),f_(b,s,o,i,t),fk(tc(l,o));break e}}i=l=tc(l,o),rr!==4&&(rr=2),cd===null?cd=[i]:cd.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=C3(i,l,t);a_(i,v);break e;case 1:o=l;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(as===null||!as.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=T3(i,o,t);a_(i,j);break e}}i=i.return}while(i!==null)}Z3(r)}catch(w){t=w,Kt===r&&r!==null&&(Kt=r=r.return);continue}break}while(!0)}function Y3(){var e=sm.current;return sm.current=im,e===null?im:e}function Tk(){(rr===0||rr===3||rr===2)&&(rr=4),ur===null||!(wo&268435455)&&!(G0&268435455)||Ui(ur,yr)}function cm(e,t){var r=Xe;Xe|=2;var n=Y3();(ur!==e||yr!==t)&&(Da=null,co(e,t));do try{d9();break}catch(a){K3(e,a)}while(!0);if(pk(),Xe=r,sm.current=n,Kt!==null)throw Error(J(261));return ur=null,yr=0,rr}function d9(){for(;Kt!==null;)X3(Kt)}function f9(){for(;Kt!==null&&!IB();)X3(Kt)}function X3(e){var t=J3(e.alternate,e,en);e.memoizedProps=e.pendingProps,t===null?Z3(e):Kt=t,Ek.current=null}function Z3(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=i9(r,t),r!==null){r.flags&=32767,Kt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{rr=6,Kt=null;return}}else if(r=a9(r,t,en),r!==null){Kt=r;return}if(t=t.sibling,t!==null){Kt=t;return}Kt=t=e}while(t!==null);rr===0&&(rr=5)}function Vs(e,t,r){var n=it,a=Pn.transition;try{Pn.transition=null,it=1,h9(e,t,r,n)}finally{Pn.transition=a,it=n}return null}function h9(e,t,r,n){do Ll();while(Ki!==null);if(Xe&6)throw Error(J(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(J(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(GB(e,i),e===ur&&(Kt=ur=null,yr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ah||(Ah=!0,eD(Hp,function(){return Ll(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Pn.transition,Pn.transition=null;var s=it;it=1;var o=Xe;Xe|=4,Ek.current=null,o9(e,r),W3(r,e),M7(Zb),qp=!!Xb,Zb=Xb=null,e.current=r,l9(r),LB(),Xe=o,it=s,Pn.transition=i}else e.current=r;if(Ah&&(Ah=!1,Ki=e,lm=a),i=e.pendingLanes,i===0&&(as=null),BB(r.stateNode),Xr(e,Ft()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],n(a.value,{componentStack:a.stack,digest:a.digest});if(om)throw om=!1,e=yw,yw=null,e;return lm&1&&e.tag!==0&&Ll(),i=e.pendingLanes,i&1?e===vw?ud++:(ud=0,vw=e):ud=0,Ss(),null}function Ll(){if(Ki!==null){var e=CR(lm),t=Pn.transition,r=it;try{if(Pn.transition=null,it=16>e?16:e,Ki===null)var n=!1;else{if(e=Ki,Ki=null,lm=0,Xe&6)throw Error(J(331));var a=Xe;for(Xe|=4,ue=e.current;ue!==null;){var i=ue,s=i.child;if(ue.flags&16){var o=i.deletions;if(o!==null){for(var l=0;l<o.length;l++){var u=o[l];for(ue=u;ue!==null;){var d=ue;switch(d.tag){case 0:case 11:case 15:ld(8,d,i)}var f=d.child;if(f!==null)f.return=d,ue=f;else for(;ue!==null;){d=ue;var h=d.sibling,p=d.return;if(V3(d),d===u){ue=null;break}if(h!==null){h.return=p,ue=h;break}ue=p}}}var m=i.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var b=g.sibling;g.sibling=null,g=b}while(g!==null)}}ue=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,ue=s;else e:for(;ue!==null;){if(i=ue,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ld(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,ue=v;break e}ue=i.return}}var y=e.current;for(ue=y;ue!==null;){s=ue;var x=s.child;if(s.subtreeFlags&2064&&x!==null)x.return=s,ue=x;else e:for(s=y;ue!==null;){if(o=ue,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:q0(9,o)}}catch(w){Rt(o,o.return,w)}if(o===s){ue=null;break e}var j=o.sibling;if(j!==null){j.return=o.return,ue=j;break e}ue=o.return}}if(Xe=a,Ss(),ba&&typeof ba.onPostCommitFiberRoot=="function")try{ba.onPostCommitFiberRoot(L0,e)}catch{}n=!0}return n}finally{it=r,Pn.transition=t}}return!1}function N_(e,t,r){t=tc(r,t),t=C3(e,t,1),e=ns(e,t,1),t=Rr(),e!==null&&(zf(e,1,t),Xr(e,t))}function Rt(e,t,r){if(e.tag===3)N_(e,e,r);else for(;t!==null;){if(t.tag===3){N_(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(as===null||!as.has(n))){e=tc(r,e),e=T3(t,e,1),t=ns(t,e,1),e=Rr(),t!==null&&(zf(t,1,e),Xr(t,e));break}}t=t.return}}function p9(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Rr(),e.pingedLanes|=e.suspendedLanes&r,ur===e&&(yr&r)===r&&(rr===4||rr===3&&(yr&130023424)===yr&&500>Ft()-Ak?co(e,0):Pk|=r),Xr(e,t)}function Q3(e,t){t===0&&(e.mode&1?(t=xh,xh<<=1,!(xh&130023424)&&(xh=4194304)):t=1);var r=Rr();e=ti(e,t),e!==null&&(zf(e,t,r),Xr(e,r))}function m9(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Q3(e,r)}function g9(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(J(314))}n!==null&&n.delete(t),Q3(e,r)}var J3;J3=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Kr.current)Wr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Wr=!1,n9(e,t,r);Wr=!!(e.flags&131072)}else Wr=!1,_t&&t.flags&1048576&&n3(t,Jp,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Np(e,t),e=t.pendingProps;var a=Zl(t,Pr.current);Il(t,r),a=jk(null,t,n,e,a,r);var i=kk();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Yr(n)?(i=!0,Zp(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,yk(t),a.updater=W0,t.stateNode=a,a._reactInternals=t,sw(t,n,e,r),t=cw(null,t,n,!0,i,r)):(t.tag=0,_t&&i&&uk(t),Tr(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Np(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=v9(n),e=qn(n,e),a){case 0:t=lw(null,t,n,e,r);break e;case 1:t=m_(null,t,n,e,r);break e;case 11:t=h_(null,t,n,e,r);break e;case 14:t=p_(null,t,n,qn(n.type,e),r);break e}throw Error(J(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:qn(n,a),lw(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:qn(n,a),m_(e,t,n,a,r);case 3:e:{if(D3(t),e===null)throw Error(J(387));n=t.pendingProps,i=t.memoizedState,a=i.element,c3(e,t),rm(t,n,null,r);var s=t.memoizedState;if(n=s.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=tc(Error(J(423)),t),t=g_(e,t,n,r,a);break e}else if(n!==a){a=tc(Error(J(424)),t),t=g_(e,t,n,r,a);break e}else for(sn=rs(t.stateNode.containerInfo.firstChild),on=t,_t=!0,Qn=null,r=o3(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Ql(),n===a){t=ri(e,t,r);break e}Tr(e,t,n,r)}t=t.child}return t;case 5:return u3(t),e===null&&nw(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,s=a.children,Qb(n,a)?s=null:i!==null&&Qb(n,i)&&(t.flags|=32),R3(e,t),Tr(e,t,s,r),t.child;case 6:return e===null&&nw(t),null;case 13:return I3(e,t,r);case 4:return vk(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Jl(t,null,n,r):Tr(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:qn(n,a),h_(e,t,n,a,r);case 7:return Tr(e,t,t.pendingProps,r),t.child;case 8:return Tr(e,t,t.pendingProps.children,r),t.child;case 12:return Tr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,s=a.value,ht(em,n._currentValue),n._currentValue=s,i!==null)if(sa(i.value,s)){if(i.children===a.children&&!Kr.current){t=ri(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){s=i.child;for(var l=o.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=qa(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),aw(i.return,r,t),o.lanes|=r;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(J(341));s.lanes|=r,o=s.alternate,o!==null&&(o.lanes|=r),aw(s,r,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Tr(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,Il(t,r),a=$n(a),n=n(a),t.flags|=1,Tr(e,t,n,r),t.child;case 14:return n=t.type,a=qn(n,t.pendingProps),a=qn(n.type,a),p_(e,t,n,a,r);case 15:return M3(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:qn(n,a),Np(e,t),t.tag=1,Yr(n)?(e=!0,Zp(t)):e=!1,Il(t,r),O3(t,n,a),sw(t,n,a,r),cw(null,t,n,!0,e,r);case 19:return L3(e,t,r);case 22:return $3(e,t,r)}throw Error(J(156,t.tag))};function eD(e,t){return ER(e,t)}function y9(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(e,t,r,n){return new y9(e,t,r,n)}function Mk(e){return e=e.prototype,!(!e||!e.isReactComponent)}function v9(e){if(typeof e=="function")return Mk(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qj)return 11;if(e===Jj)return 14}return 2}function ss(e,t){var r=e.alternate;return r===null?(r=Sn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Pp(e,t,r,n,a,i){var s=2;if(n=e,typeof e=="function")Mk(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case fl:return uo(r.children,a,i,t);case Zj:s=8,a|=8;break;case Ob:return e=Sn(12,r,t,a|2),e.elementType=Ob,e.lanes=i,e;case Cb:return e=Sn(13,r,t,a),e.elementType=Cb,e.lanes=i,e;case Tb:return e=Sn(19,r,t,a),e.elementType=Tb,e.lanes=i,e;case uR:return K0(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case lR:s=10;break e;case cR:s=9;break e;case Qj:s=11;break e;case Jj:s=14;break e;case Li:s=16,n=null;break e}throw Error(J(130,e==null?e:typeof e,""))}return t=Sn(s,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function uo(e,t,r,n){return e=Sn(7,e,n,t),e.lanes=r,e}function K0(e,t,r,n){return e=Sn(22,e,n,t),e.elementType=uR,e.lanes=r,e.stateNode={isHidden:!1},e}function Gy(e,t,r){return e=Sn(6,e,null,t),e.lanes=r,e}function Ky(e,t,r){return t=Sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function x9(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Py(0),this.expirationTimes=Py(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Py(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function $k(e,t,r,n,a,i,s,o,l){return e=new x9(e,t,r,o,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Sn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},yk(i),e}function b9(e,t,r){var n=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:dl,key:n==null?null:""+n,children:e,containerInfo:t,implementation:r}}function tD(e){if(!e)return hs;e=e._reactInternals;e:{if(Io(e)!==e||e.tag!==1)throw Error(J(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Yr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(J(171))}if(e.tag===1){var r=e.type;if(Yr(r))return t3(e,r,t)}return t}function rD(e,t,r,n,a,i,s,o,l){return e=$k(r,n,!0,e,a,i,s,o,l),e.context=tD(null),r=e.current,n=Rr(),a=is(r),i=qa(n,a),i.callback=t??null,ns(r,i,a),e.current.lanes=a,zf(e,a,n),Xr(e,n),e}function Y0(e,t,r,n){var a=t.current,i=Rr(),s=is(a);return r=tD(r),t.context===null?t.context=r:t.pendingContext=r,t=qa(i,s),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ns(a,t,s),e!==null&&(aa(e,a,s,i),jp(e,a,s)),s}function um(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function __(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Rk(e,t){__(e,t),(e=e.alternate)&&__(e,t)}function w9(){return null}var nD=typeof reportError=="function"?reportError:function(e){console.error(e)};function Dk(e){this._internalRoot=e}X0.prototype.render=Dk.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(J(409));Y0(e,t,null,null)};X0.prototype.unmount=Dk.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;jo(function(){Y0(null,e,null,null)}),t[ei]=null}};function X0(e){this._internalRoot=e}X0.prototype.unstable_scheduleHydration=function(e){if(e){var t=$R();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Vi.length&&t!==0&&t<Vi[r].priority;r++);Vi.splice(r,0,e),r===0&&DR(e)}};function Ik(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Z0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function E_(){}function j9(e,t,r,n,a){if(a){if(typeof n=="function"){var i=n;n=function(){var u=um(s);i.call(u)}}var s=rD(t,n,e,0,null,!1,!1,"",E_);return e._reactRootContainer=s,e[ei]=s.current,Od(e.nodeType===8?e.parentNode:e),jo(),s}for(;a=e.lastChild;)e.removeChild(a);if(typeof n=="function"){var o=n;n=function(){var u=um(l);o.call(u)}}var l=$k(e,0,!1,null,null,!1,!1,"",E_);return e._reactRootContainer=l,e[ei]=l.current,Od(e.nodeType===8?e.parentNode:e),jo(function(){Y0(t,l,r,n)}),l}function Q0(e,t,r,n,a){var i=r._reactRootContainer;if(i){var s=i;if(typeof a=="function"){var o=a;a=function(){var l=um(s);o.call(l)}}Y0(t,s,e,a)}else s=j9(r,t,e,a,n);return um(s)}TR=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Wu(t.pendingLanes);r!==0&&(rk(t,r|1),Xr(t,Ft()),!(Xe&6)&&(rc=Ft()+500,Ss()))}break;case 13:jo(function(){var n=ti(e,1);if(n!==null){var a=Rr();aa(n,e,1,a)}}),Rk(e,1)}};nk=function(e){if(e.tag===13){var t=ti(e,134217728);if(t!==null){var r=Rr();aa(t,e,134217728,r)}Rk(e,134217728)}};MR=function(e){if(e.tag===13){var t=is(e),r=ti(e,t);if(r!==null){var n=Rr();aa(r,e,t,n)}Rk(e,t)}};$R=function(){return it};RR=function(e,t){var r=it;try{return it=e,t()}finally{it=r}};Vb=function(e,t,r){switch(t){case"input":if(Rb(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var n=r[t];if(n!==e&&n.form===e.form){var a=V0(n);if(!a)throw Error(J(90));fR(n),Rb(n,a)}}}break;case"textarea":pR(e,r);break;case"select":t=r.value,t!=null&&Ml(e,!!r.multiple,t,!1)}};wR=Ok;jR=jo;var k9={usingClientEntryPoint:!1,Events:[Bf,gl,V0,xR,bR,Ok]},yu={findFiberByHostInstance:Zs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},S9={bundleType:yu.bundleType,version:yu.version,rendererPackageName:yu.rendererPackageName,rendererConfig:yu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:gi.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=NR(e),e===null?null:e.stateNode},findFiberByHostInstance:yu.findFiberByHostInstance||w9,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Oh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Oh.isDisabled&&Oh.supportsFiber)try{L0=Oh.inject(S9),ba=Oh}catch{}}dn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=k9;dn.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ik(t))throw Error(J(200));return b9(e,t,null,r)};dn.createRoot=function(e,t){if(!Ik(e))throw Error(J(299));var r=!1,n="",a=nD;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=$k(e,1,!1,null,null,r,!1,n,a),e[ei]=t.current,Od(e.nodeType===8?e.parentNode:e),new Dk(t)};dn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(J(188)):(e=Object.keys(e).join(","),Error(J(268,e)));return e=NR(t),e=e===null?null:e.stateNode,e};dn.flushSync=function(e){return jo(e)};dn.hydrate=function(e,t,r){if(!Z0(t))throw Error(J(200));return Q0(null,e,t,!0,r)};dn.hydrateRoot=function(e,t,r){if(!Ik(e))throw Error(J(405));var n=r!=null&&r.hydratedSources||null,a=!1,i="",s=nD;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(s=r.onRecoverableError)),t=rD(t,null,e,1,r??null,a,!1,i,s),e[ei]=t.current,Od(e),n)for(e=0;e<n.length;e++)r=n[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new X0(t)};dn.render=function(e,t,r){if(!Z0(t))throw Error(J(200));return Q0(null,e,t,!1,r)};dn.unmountComponentAtNode=function(e){if(!Z0(e))throw Error(J(40));return e._reactRootContainer?(jo(function(){Q0(null,null,e,!1,function(){e._reactRootContainer=null,e[ei]=null})}),!0):!1};dn.unstable_batchedUpdates=Ok;dn.unstable_renderSubtreeIntoContainer=function(e,t,r,n){if(!Z0(r))throw Error(J(200));if(e==null||e._reactInternals===void 0)throw Error(J(38));return Q0(e,t,r,!1,n)};dn.version="18.3.1-next-f1338f8080-20240426";function aD(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aD)}catch(e){console.error(e)}}aD(),aR.exports=dn;var Lk=aR.exports;const N9=Je(Lk),_9=q$({__proto__:null,default:N9},[Lk]);var P_=Lk;Pb.createRoot=P_.createRoot,Pb.hydrateRoot=P_.hydrateRoot;/**
|
|
41
|
-
* @remix-run/router v1.23.1
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Remix Software Inc.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
47
|
-
*
|
|
48
|
-
* @license MIT
|
|
49
|
-
*/function Nt(){return Nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nt.apply(this,arguments)}var qt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(qt||(qt={}));const A_="popstate";function E9(e){e===void 0&&(e={});function t(n,a){let{pathname:i,search:s,hash:o}=n.location;return zd("",{pathname:i,search:s,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:So(a)}return A9(t,r,null,e)}function Ie(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ko(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function P9(){return Math.random().toString(36).substr(2,8)}function O_(e,t){return{usr:e.state,key:e.key,idx:t}}function zd(e,t,r,n){return r===void 0&&(r=null),Nt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ns(t):t,{state:r,key:t&&t.key||n||P9()})}function So(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Ns(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function A9(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,s=a.history,o=qt.Pop,l=null,u=d();u==null&&(u=0,s.replaceState(Nt({},s.state,{idx:u}),""));function d(){return(s.state||{idx:null}).idx}function f(){o=qt.Pop;let b=d(),v=b==null?null:b-u;u=b,l&&l({action:o,location:g.location,delta:v})}function h(b,v){o=qt.Push;let y=zd(g.location,b,v);u=d()+1;let x=O_(y,u),j=g.createHref(y);try{s.pushState(x,"",j)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;a.location.assign(j)}i&&l&&l({action:o,location:g.location,delta:1})}function p(b,v){o=qt.Replace;let y=zd(g.location,b,v);u=d();let x=O_(y,u),j=g.createHref(y);s.replaceState(x,"",j),i&&l&&l({action:o,location:g.location,delta:0})}function m(b){let v=a.location.origin!=="null"?a.location.origin:a.location.href,y=typeof b=="string"?b:So(b);return y=y.replace(/ $/,"%20"),Ie(v,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,v)}let g={get action(){return o},get location(){return e(a,s)},listen(b){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(A_,f),l=b,()=>{a.removeEventListener(A_,f),l=null}},createHref(b){return t(a,b)},createURL:m,encodeLocation(b){let v=m(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:p,go(b){return s.go(b)}};return g}var at;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(at||(at={}));const O9=new Set(["lazy","caseSensitive","path","id","index","children"]);function C9(e){return e.index===!0}function dm(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,i)=>{let s=[...r,String(i)],o=typeof a.id=="string"?a.id:s.join("-");if(Ie(a.index!==!0||!a.children,"Cannot specify children on an index route"),Ie(!n[o],'Found a route id collision on id "'+o+`". Route id's must be globally unique within Data Router usages`),C9(a)){let l=Nt({},a,t(a),{id:o});return n[o]=l,l}else{let l=Nt({},a,t(a),{id:o,children:void 0});return n[o]=l,a.children&&(l.children=dm(a.children,t,s,n)),l}})}function Ys(e,t,r){return r===void 0&&(r="/"),Ap(e,t,r,!1)}function Ap(e,t,r,n){let a=typeof t=="string"?Ns(t):t,i=ni(a.pathname||"/",r);if(i==null)return null;let s=iD(e);M9(s);let o=null;for(let l=0;o==null&&l<s.length;++l){let u=H9(i);o=V9(s[l],u,n)}return o}function T9(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function iD(e,t,r,n){t===void 0&&(t=[]),r===void 0&&(r=[]),n===void 0&&(n="");let a=(i,s,o)=>{let l={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(Ie(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Ga([n,l.relativePath]),d=r.concat(l);i.children&&i.children.length>0&&(Ie(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),iD(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:F9(u,i.index),routesMeta:d})};return e.forEach((i,s)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,s);else for(let l of sD(i.path))a(i,s,l)}),t}function sD(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let s=sD(n.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function M9(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:B9(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const $9=/^:[\w-]+$/,R9=3,D9=2,I9=1,L9=10,z9=-2,C_=e=>e==="*";function F9(e,t){let r=e.split("/"),n=r.length;return r.some(C_)&&(n+=z9),t&&(n+=D9),r.filter(a=>!C_(a)).reduce((a,i)=>a+($9.test(i)?R9:i===""?I9:L9),n)}function B9(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function V9(e,t,r){r===void 0&&(r=!1);let{routesMeta:n}=e,a={},i="/",s=[];for(let o=0;o<n.length;++o){let l=n[o],u=o===n.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=fm({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),h=l.route;if(!f&&u&&r&&!n[n.length-1].route.index&&(f=fm({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!f)return null;Object.assign(a,f.params),s.push({params:a,pathname:Ga([i,f.pathname]),pathnameBase:K9(Ga([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=Ga([i,f.pathnameBase]))}return s}function fm(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=U9(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:n.reduce((u,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let g=o[f]||"";s=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=o[f];return p&&!m?u[h]=void 0:u[h]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:s,pattern:e}}function U9(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ko(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(n.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function H9(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ko(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function ni(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}const W9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,q9=e=>W9.test(e);function G9(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Ns(e):e,i;if(r)if(q9(r))i=r;else{if(r.includes("//")){let s=r;r=r.replace(/\/\/+/g,"/"),ko(!1,"Pathnames cannot have embedded double slashes - normalizing "+(s+" -> "+r))}r.startsWith("/")?i=T_(r.substring(1),"/"):i=T_(r,t)}else i=t;return{pathname:i,search:Y9(n),hash:X9(a)}}function T_(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Yy(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function oD(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function zk(e,t){let r=oD(e);return t?r.map((n,a)=>a===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function Fk(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Ns(e):(a=Nt({},e),Ie(!a.pathname||!a.pathname.includes("?"),Yy("?","pathname","search",a)),Ie(!a.pathname||!a.pathname.includes("#"),Yy("#","pathname","hash",a)),Ie(!a.search||!a.search.includes("#"),Yy("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=r;else{let f=t.length-1;if(!n&&s.startsWith("..")){let h=s.split("/");for(;h[0]==="..";)h.shift(),f-=1;a.pathname=h.join("/")}o=f>=0?t[f]:"/"}let l=G9(a,o),u=s&&s!=="/"&&s.endsWith("/"),d=(i||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const Ga=e=>e.join("/").replace(/\/\/+/g,"/"),K9=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Y9=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,X9=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class hm{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function Fd(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const lD=["post","put","patch","delete"],Z9=new Set(lD),Q9=["get",...lD],J9=new Set(Q9),eV=new Set([301,302,303,307,308]),tV=new Set([307,308]),Xy={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},rV={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},vu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Bk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,nV=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),cD="remix-router-transitions";function aV(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Ie(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let B=e.detectErrorBoundary;a=H=>({hasErrorBoundary:B(H)})}else a=nV;let i={},s=dm(e.routes,a,void 0,i),o,l=e.basename||"/",u=e.dataStrategy||lV,d=e.patchRoutesOnNavigation,f=Nt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,m=null,g=null,b=null,v=e.hydrationData!=null,y=Ys(s,e.history.location,l),x=!1,j=null;if(y==null&&!d){let B=Ur(404,{pathname:e.history.location.pathname}),{matches:H,route:q}=U_(s);y=H,j={[q.id]:B}}y&&!e.hydrationData&&Ko(y,s,e.history.location.pathname).active&&(y=null);let w;if(y)if(y.some(B=>B.route.lazy))w=!1;else if(!y.some(B=>B.route.loader))w=!0;else if(f.v7_partialHydration){let B=e.hydrationData?e.hydrationData.loaderData:null,H=e.hydrationData?e.hydrationData.errors:null;if(H){let q=y.findIndex(Z=>H[Z.route.id]!==void 0);w=y.slice(0,q+1).every(Z=>!jw(Z.route,B,H))}else w=y.every(q=>!jw(q.route,B,H))}else w=e.hydrationData!=null;else if(w=!1,y=[],f.v7_partialHydration){let B=Ko(null,s,e.history.location.pathname);B.active&&B.matches&&(x=!0,y=B.matches)}let S,k={historyAction:e.history.action,location:e.history.location,matches:y,initialized:w,navigation:Xy,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||j,fetchers:new Map,blockers:new Map},_=qt.Pop,E=!1,A,C=!1,M=new Map,O=null,P=!1,D=!1,I=[],L=new Set,R=new Map,$=0,z=-1,U=new Map,V=new Set,F=new Map,W=new Map,K=new Set,Q=new Map,ne=new Map,pe;function X(){if(h=e.history.listen(B=>{let{action:H,location:q,delta:Z}=B;if(pe){pe(),pe=void 0;return}ko(ne.size===0||Z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ae=_i({currentLocation:k.location,nextLocation:q,historyAction:H});if(ae&&Z!=null){let xe=new Promise(Ne=>{pe=Ne});e.history.go(Z*-1),Ni(ae,{state:"blocked",location:q,proceed(){Ni(ae,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),xe.then(()=>e.history.go(Z))},reset(){let Ne=new Map(k.blockers);Ne.set(ae,vu),G({blockers:Ne})}});return}return Ce(H,q)}),r){jV(t,M);let B=()=>kV(t,M);t.addEventListener("pagehide",B),O=()=>t.removeEventListener("pagehide",B)}return k.initialized||Ce(qt.Pop,k.location,{initialHydration:!0}),S}function ee(){h&&h(),O&&O(),p.clear(),A&&A.abort(),k.fetchers.forEach((B,H)=>se(H)),k.blockers.forEach((B,H)=>Si(H))}function ie(B){return p.add(B),()=>p.delete(B)}function G(B,H){H===void 0&&(H={}),k=Nt({},k,B);let q=[],Z=[];f.v7_fetcherPersist&&k.fetchers.forEach((ae,xe)=>{ae.state==="idle"&&(K.has(xe)?Z.push(xe):q.push(xe))}),K.forEach(ae=>{!k.fetchers.has(ae)&&!R.has(ae)&&Z.push(ae)}),[...p].forEach(ae=>ae(k,{deletedFetchers:Z,viewTransitionOpts:H.viewTransitionOpts,flushSync:H.flushSync===!0})),f.v7_fetcherPersist?(q.forEach(ae=>k.fetchers.delete(ae)),Z.forEach(ae=>se(ae))):Z.forEach(ae=>K.delete(ae))}function Ee(B,H,q){var Z,ae;let{flushSync:xe}=q===void 0?{}:q,Ne=k.actionData!=null&&k.navigation.formMethod!=null&&Kn(k.navigation.formMethod)&&k.navigation.state==="loading"&&((Z=B.state)==null?void 0:Z._isRedirect)!==!0,fe;H.actionData?Object.keys(H.actionData).length>0?fe=H.actionData:fe=null:Ne?fe=k.actionData:fe=null;let he=H.loaderData?B_(k.loaderData,H.loaderData,H.matches||[],H.errors):k.loaderData,le=k.blockers;le.size>0&&(le=new Map(le),le.forEach((We,Qt)=>le.set(Qt,vu)));let me=E===!0||k.navigation.formMethod!=null&&Kn(k.navigation.formMethod)&&((ae=B.state)==null?void 0:ae._isRedirect)!==!0;o&&(s=o,o=void 0),P||_===qt.Pop||(_===qt.Push?e.history.push(B,B.state):_===qt.Replace&&e.history.replace(B,B.state));let Te;if(_===qt.Pop){let We=M.get(k.location.pathname);We&&We.has(B.pathname)?Te={currentLocation:k.location,nextLocation:B}:M.has(B.pathname)&&(Te={currentLocation:B,nextLocation:k.location})}else if(C){let We=M.get(k.location.pathname);We?We.add(B.pathname):(We=new Set([B.pathname]),M.set(k.location.pathname,We)),Te={currentLocation:k.location,nextLocation:B}}G(Nt({},H,{actionData:fe,loaderData:he,historyAction:_,location:B,initialized:!0,navigation:Xy,revalidation:"idle",restoreScrollPosition:fh(B,H.matches||k.matches),preventScrollReset:me,blockers:le}),{viewTransitionOpts:Te,flushSync:xe===!0}),_=qt.Pop,E=!1,C=!1,P=!1,D=!1,I=[]}async function be(B,H){if(typeof B=="number"){e.history.go(B);return}let q=ww(k.location,k.matches,l,f.v7_prependBasename,B,f.v7_relativeSplatPath,H==null?void 0:H.fromRouteId,H==null?void 0:H.relative),{path:Z,submission:ae,error:xe}=M_(f.v7_normalizeFormMethod,!1,q,H),Ne=k.location,fe=zd(k.location,Z,H&&H.state);fe=Nt({},fe,e.history.encodeLocation(fe));let he=H&&H.replace!=null?H.replace:void 0,le=qt.Push;he===!0?le=qt.Replace:he===!1||ae!=null&&Kn(ae.formMethod)&&ae.formAction===k.location.pathname+k.location.search&&(le=qt.Replace);let me=H&&"preventScrollReset"in H?H.preventScrollReset===!0:void 0,Te=(H&&H.flushSync)===!0,We=_i({currentLocation:Ne,nextLocation:fe,historyAction:le});if(We){Ni(We,{state:"blocked",location:fe,proceed(){Ni(We,{state:"proceeding",proceed:void 0,reset:void 0,location:fe}),be(B,H)},reset(){let Qt=new Map(k.blockers);Qt.set(We,vu),G({blockers:Qt})}});return}return await Ce(le,fe,{submission:ae,pendingError:xe,preventScrollReset:me,replace:H&&H.replace,enableViewTransition:H&&H.viewTransition,flushSync:Te})}function Pe(){if(or(),G({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){Ce(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}Ce(_||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:C===!0})}}async function Ce(B,H,q){A&&A.abort(),A=null,_=B,P=(q&&q.startUninterruptedRevalidation)===!0,xy(k.location,k.matches),E=(q&&q.preventScrollReset)===!0,C=(q&&q.enableViewTransition)===!0;let Z=o||s,ae=q&&q.overrideNavigation,xe=q!=null&&q.initialHydration&&k.matches&&k.matches.length>0&&!x?k.matches:Ys(Z,H,l),Ne=(q&&q.flushSync)===!0;if(xe&&k.initialized&&!D&&pV(k.location,H)&&!(q&&q.submission&&Kn(q.submission.formMethod))){Ee(H,{matches:xe},{flushSync:Ne});return}let fe=Ko(xe,Z,H.pathname);if(fe.active&&fe.matches&&(xe=fe.matches),!xe){let{error:ot,notFoundMatches:Ye,route:kt}=Ds(H.pathname);Ee(H,{matches:Ye,loaderData:{},errors:{[kt.id]:ot}},{flushSync:Ne});return}A=new AbortController;let he=Jo(e.history,H,A.signal,q&&q.submission),le;if(q&&q.pendingError)le=[Xs(xe).route.id,{type:at.error,error:q.pendingError}];else if(q&&q.submission&&Kn(q.submission.formMethod)){let ot=await ke(he,H,q.submission,xe,fe.active,{replace:q.replace,flushSync:Ne});if(ot.shortCircuited)return;if(ot.pendingActionResult){let[Ye,kt]=ot.pendingActionResult;if(rn(kt)&&Fd(kt.error)&&kt.error.status===404){A=null,Ee(H,{matches:ot.matches,loaderData:{},errors:{[Ye]:kt.error}});return}}xe=ot.matches||xe,le=ot.pendingActionResult,ae=Zy(H,q.submission),Ne=!1,fe.active=!1,he=Jo(e.history,he.url,he.signal)}let{shortCircuited:me,matches:Te,loaderData:We,errors:Qt}=await oe(he,H,xe,fe.active,ae,q&&q.submission,q&&q.fetcherSubmission,q&&q.replace,q&&q.initialHydration===!0,Ne,le);me||(A=null,Ee(H,Nt({matches:Te||xe},V_(le),{loaderData:We,errors:Qt})))}async function ke(B,H,q,Z,ae,xe){xe===void 0&&(xe={}),or();let Ne=bV(H,q);if(G({navigation:Ne},{flushSync:xe.flushSync===!0}),ae){let le=await Yo(Z,H.pathname,B.signal);if(le.type==="aborted")return{shortCircuited:!0};if(le.type==="error"){let me=Xs(le.partialMatches).route.id;return{matches:le.partialMatches,pendingActionResult:[me,{type:at.error,error:le.error}]}}else if(le.matches)Z=le.matches;else{let{notFoundMatches:me,error:Te,route:We}=Ds(H.pathname);return{matches:me,pendingActionResult:[We.id,{type:at.error,error:Te}]}}}let fe,he=Gu(Z,H);if(!he.route.action&&!he.route.lazy)fe={type:at.error,error:Ur(405,{method:B.method,pathname:H.pathname,routeId:he.route.id})};else if(fe=(await He("action",k,B,[he],Z,null))[he.route.id],B.signal.aborted)return{shortCircuited:!0};if(eo(fe)){let le;return xe&&xe.replace!=null?le=xe.replace:le=L_(fe.response.headers.get("Location"),new URL(B.url),l)===k.location.pathname+k.location.search,await Ue(B,fe,!0,{submission:q,replace:le}),{shortCircuited:!0}}if(Yi(fe))throw Ur(400,{type:"defer-action"});if(rn(fe)){let le=Xs(Z,he.route.id);return(xe&&xe.replace)!==!0&&(_=qt.Push),{matches:Z,pendingActionResult:[le.route.id,fe]}}return{matches:Z,pendingActionResult:[he.route.id,fe]}}async function oe(B,H,q,Z,ae,xe,Ne,fe,he,le,me){let Te=ae||Zy(H,xe),We=xe||Ne||W_(Te),Qt=!P&&(!f.v7_partialHydration||!he);if(Z){if(Qt){let St=Ze(me);G(Nt({navigation:Te},St!==void 0?{actionData:St}:{}),{flushSync:le})}let Ge=await Yo(q,H.pathname,B.signal);if(Ge.type==="aborted")return{shortCircuited:!0};if(Ge.type==="error"){let St=Xs(Ge.partialMatches).route.id;return{matches:Ge.partialMatches,loaderData:{},errors:{[St]:Ge.error}}}else if(Ge.matches)q=Ge.matches;else{let{error:St,notFoundMatches:Ai,route:Ca}=Ds(H.pathname);return{matches:Ai,loaderData:{},errors:{[Ca.id]:St}}}}let ot=o||s,[Ye,kt]=R_(e.history,k,q,We,H,f.v7_partialHydration&&he===!0,f.v7_skipActionErrorRevalidation,D,I,L,K,F,V,ot,l,me);if(Go(Ge=>!(q&&q.some(St=>St.route.id===Ge))||Ye&&Ye.some(St=>St.route.id===Ge)),z=++$,Ye.length===0&&kt.length===0){let Ge=Cr();return Ee(H,Nt({matches:q,loaderData:{},errors:me&&rn(me[1])?{[me[0]]:me[1].error}:null},V_(me),Ge?{fetchers:new Map(k.fetchers)}:{}),{flushSync:le}),{shortCircuited:!0}}if(Qt){let Ge={};if(!Z){Ge.navigation=Te;let St=Ze(me);St!==void 0&&(Ge.actionData=St)}kt.length>0&&(Ge.fetchers=sr(kt)),G(Ge,{flushSync:le})}kt.forEach(Ge=>{Ae(Ge.key),Ge.controller&&R.set(Ge.key,Ge.controller)});let Ei=()=>kt.forEach(Ge=>Ae(Ge.key));A&&A.signal.addEventListener("abort",Ei);let{loaderResults:Pi,fetcherResults:Vn}=await Or(k,q,Ye,kt,B);if(B.signal.aborted)return{shortCircuited:!0};A&&A.signal.removeEventListener("abort",Ei),kt.forEach(Ge=>R.delete(Ge.key));let pn=Ch(Pi);if(pn)return await Ue(B,pn.result,!0,{replace:fe}),{shortCircuited:!0};if(pn=Ch(Vn),pn)return V.add(pn.key),await Ue(B,pn.result,!0,{replace:fe}),{shortCircuited:!0};let{loaderData:cu,errors:Is}=F_(k,q,Pi,me,kt,Vn,Q);Q.forEach((Ge,St)=>{Ge.subscribe(Ai=>{(Ai||Ge.done)&&Q.delete(St)})}),f.v7_partialHydration&&he&&k.errors&&(Is=Nt({},k.errors,Is));let Oa=Cr(),Xo=Vr(z),Ls=Oa||Xo||kt.length>0;return Nt({matches:q,loaderData:cu,errors:Is},Ls?{fetchers:new Map(k.fetchers)}:{})}function Ze(B){if(B&&!rn(B[1]))return{[B[0]]:B[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function sr(B){return B.forEach(H=>{let q=k.fetchers.get(H.key),Z=xu(void 0,q?q.data:void 0);k.fetchers.set(H.key,Z)}),new Map(k.fetchers)}function Xt(B,H,q,Z){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Ae(B);let ae=(Z&&Z.flushSync)===!0,xe=o||s,Ne=ww(k.location,k.matches,l,f.v7_prependBasename,q,f.v7_relativeSplatPath,H,Z==null?void 0:Z.relative),fe=Ys(xe,Ne,l),he=Ko(fe,xe,Ne);if(he.active&&he.matches&&(fe=he.matches),!fe){Ut(B,H,Ur(404,{pathname:Ne}),{flushSync:ae});return}let{path:le,submission:me,error:Te}=M_(f.v7_normalizeFormMethod,!0,Ne,Z);if(Te){Ut(B,H,Te,{flushSync:ae});return}let We=Gu(fe,le),Qt=(Z&&Z.preventScrollReset)===!0;if(me&&Kn(me.formMethod)){we(B,H,le,We,fe,he.active,ae,Qt,me);return}F.set(B,{routeId:H,path:le}),Ar(B,H,le,We,fe,he.active,ae,Qt,me)}async function we(B,H,q,Z,ae,xe,Ne,fe,he){or(),F.delete(B);function le(Ht){if(!Ht.route.action&&!Ht.route.lazy){let Zo=Ur(405,{method:he.formMethod,pathname:q,routeId:H});return Ut(B,H,Zo,{flushSync:Ne}),!0}return!1}if(!xe&&le(Z))return;let me=k.fetchers.get(B);Zt(B,wV(he,me),{flushSync:Ne});let Te=new AbortController,We=Jo(e.history,q,Te.signal,he);if(xe){let Ht=await Yo(ae,new URL(We.url).pathname,We.signal,B);if(Ht.type==="aborted")return;if(Ht.type==="error"){Ut(B,H,Ht.error,{flushSync:Ne});return}else if(Ht.matches){if(ae=Ht.matches,Z=Gu(ae,q),le(Z))return}else{Ut(B,H,Ur(404,{pathname:q}),{flushSync:Ne});return}}R.set(B,Te);let Qt=$,Ye=(await He("action",k,We,[Z],ae,B))[Z.route.id];if(We.signal.aborted){R.get(B)===Te&&R.delete(B);return}if(f.v7_fetcherPersist&&K.has(B)){if(eo(Ye)||rn(Ye)){Zt(B,Di(void 0));return}}else{if(eo(Ye))if(R.delete(B),z>Qt){Zt(B,Di(void 0));return}else return V.add(B),Zt(B,xu(he)),Ue(We,Ye,!1,{fetcherSubmission:he,preventScrollReset:fe});if(rn(Ye)){Ut(B,H,Ye.error);return}}if(Yi(Ye))throw Ur(400,{type:"defer-action"});let kt=k.navigation.location||k.location,Ei=Jo(e.history,kt,Te.signal),Pi=o||s,Vn=k.navigation.state!=="idle"?Ys(Pi,k.navigation.location,l):k.matches;Ie(Vn,"Didn't find any matches after fetcher action");let pn=++$;U.set(B,pn);let cu=xu(he,Ye.data);k.fetchers.set(B,cu);let[Is,Oa]=R_(e.history,k,Vn,he,kt,!1,f.v7_skipActionErrorRevalidation,D,I,L,K,F,V,Pi,l,[Z.route.id,Ye]);Oa.filter(Ht=>Ht.key!==B).forEach(Ht=>{let Zo=Ht.key,xN=k.fetchers.get(Zo),XF=xu(void 0,xN?xN.data:void 0);k.fetchers.set(Zo,XF),Ae(Zo),Ht.controller&&R.set(Zo,Ht.controller)}),G({fetchers:new Map(k.fetchers)});let Xo=()=>Oa.forEach(Ht=>Ae(Ht.key));Te.signal.addEventListener("abort",Xo);let{loaderResults:Ls,fetcherResults:Ge}=await Or(k,Vn,Is,Oa,Ei);if(Te.signal.aborted)return;Te.signal.removeEventListener("abort",Xo),U.delete(B),R.delete(B),Oa.forEach(Ht=>R.delete(Ht.key));let St=Ch(Ls);if(St)return Ue(Ei,St.result,!1,{preventScrollReset:fe});if(St=Ch(Ge),St)return V.add(St.key),Ue(Ei,St.result,!1,{preventScrollReset:fe});let{loaderData:Ai,errors:Ca}=F_(k,Vn,Ls,void 0,Oa,Ge,Q);if(k.fetchers.has(B)){let Ht=Di(Ye.data);k.fetchers.set(B,Ht)}Vr(pn),k.navigation.state==="loading"&&pn>z?(Ie(_,"Expected pending action"),A&&A.abort(),Ee(k.navigation.location,{matches:Vn,loaderData:Ai,errors:Ca,fetchers:new Map(k.fetchers)})):(G({errors:Ca,loaderData:B_(k.loaderData,Ai,Vn,Ca),fetchers:new Map(k.fetchers)}),D=!1)}async function Ar(B,H,q,Z,ae,xe,Ne,fe,he){let le=k.fetchers.get(B);Zt(B,xu(he,le?le.data:void 0),{flushSync:Ne});let me=new AbortController,Te=Jo(e.history,q,me.signal);if(xe){let Ye=await Yo(ae,new URL(Te.url).pathname,Te.signal,B);if(Ye.type==="aborted")return;if(Ye.type==="error"){Ut(B,H,Ye.error,{flushSync:Ne});return}else if(Ye.matches)ae=Ye.matches,Z=Gu(ae,q);else{Ut(B,H,Ur(404,{pathname:q}),{flushSync:Ne});return}}R.set(B,me);let We=$,ot=(await He("loader",k,Te,[Z],ae,B))[Z.route.id];if(Yi(ot)&&(ot=await Vk(ot,Te.signal,!0)||ot),R.get(B)===me&&R.delete(B),!Te.signal.aborted){if(K.has(B)){Zt(B,Di(void 0));return}if(eo(ot))if(z>We){Zt(B,Di(void 0));return}else{V.add(B),await Ue(Te,ot,!1,{preventScrollReset:fe});return}if(rn(ot)){Ut(B,H,ot.error);return}Ie(!Yi(ot),"Unhandled fetcher deferred data"),Zt(B,Di(ot.data))}}async function Ue(B,H,q,Z){let{submission:ae,fetcherSubmission:xe,preventScrollReset:Ne,replace:fe}=Z===void 0?{}:Z;H.response.headers.has("X-Remix-Revalidate")&&(D=!0);let he=H.response.headers.get("Location");Ie(he,"Expected a Location header on the redirect Response"),he=L_(he,new URL(B.url),l);let le=zd(k.location,he,{_isRedirect:!0});if(r){let Ye=!1;if(H.response.headers.has("X-Remix-Reload-Document"))Ye=!0;else if(Bk.test(he)){const kt=e.history.createURL(he);Ye=kt.origin!==t.location.origin||ni(kt.pathname,l)==null}if(Ye){fe?t.location.replace(he):t.location.assign(he);return}}A=null;let me=fe===!0||H.response.headers.has("X-Remix-Replace")?qt.Replace:qt.Push,{formMethod:Te,formAction:We,formEncType:Qt}=k.navigation;!ae&&!xe&&Te&&We&&Qt&&(ae=W_(k.navigation));let ot=ae||xe;if(tV.has(H.response.status)&&ot&&Kn(ot.formMethod))await Ce(me,le,{submission:Nt({},ot,{formAction:he}),preventScrollReset:Ne||E,enableViewTransition:q?C:void 0});else{let Ye=Zy(le,ae);await Ce(me,le,{overrideNavigation:Ye,fetcherSubmission:xe,preventScrollReset:Ne||E,enableViewTransition:q?C:void 0})}}async function He(B,H,q,Z,ae,xe){let Ne,fe={};try{Ne=await cV(u,B,H,q,Z,ae,xe,i,a)}catch(he){return Z.forEach(le=>{fe[le.route.id]={type:at.error,error:he}}),fe}for(let[he,le]of Object.entries(Ne))if(mV(le)){let me=le.result;fe[he]={type:at.redirect,response:fV(me,q,he,ae,l,f.v7_relativeSplatPath)}}else fe[he]=await dV(le);return fe}async function Or(B,H,q,Z,ae){let xe=B.matches,Ne=He("loader",B,ae,q,H,null),fe=Promise.all(Z.map(async me=>{if(me.matches&&me.match&&me.controller){let We=(await He("loader",B,Jo(e.history,me.path,me.controller.signal),[me.match],me.matches,me.key))[me.match.route.id];return{[me.key]:We}}else return Promise.resolve({[me.key]:{type:at.error,error:Ur(404,{pathname:me.path})}})})),he=await Ne,le=(await fe).reduce((me,Te)=>Object.assign(me,Te),{});return await Promise.all([vV(H,he,ae.signal,xe,B.loaderData),xV(H,le,Z)]),{loaderResults:he,fetcherResults:le}}function or(){D=!0,I.push(...Go()),F.forEach((B,H)=>{R.has(H)&&L.add(H),Ae(H)})}function Zt(B,H,q){q===void 0&&(q={}),k.fetchers.set(B,H),G({fetchers:new Map(k.fetchers)},{flushSync:(q&&q.flushSync)===!0})}function Ut(B,H,q,Z){Z===void 0&&(Z={});let ae=Xs(k.matches,H);se(B),G({errors:{[ae.route.id]:q},fetchers:new Map(k.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function ce(B){return W.set(B,(W.get(B)||0)+1),K.has(B)&&K.delete(B),k.fetchers.get(B)||rV}function se(B){let H=k.fetchers.get(B);R.has(B)&&!(H&&H.state==="loading"&&U.has(B))&&Ae(B),F.delete(B),U.delete(B),V.delete(B),f.v7_fetcherPersist&&K.delete(B),L.delete(B),k.fetchers.delete(B)}function je(B){let H=(W.get(B)||0)-1;H<=0?(W.delete(B),K.add(B),f.v7_fetcherPersist||se(B)):W.set(B,H),G({fetchers:new Map(k.fetchers)})}function Ae(B){let H=R.get(B);H&&(H.abort(),R.delete(B))}function gt(B){for(let H of B){let q=ce(H),Z=Di(q.data);k.fetchers.set(H,Z)}}function Cr(){let B=[],H=!1;for(let q of V){let Z=k.fetchers.get(q);Ie(Z,"Expected fetcher: "+q),Z.state==="loading"&&(V.delete(q),B.push(q),H=!0)}return gt(B),H}function Vr(B){let H=[];for(let[q,Z]of U)if(Z<B){let ae=k.fetchers.get(q);Ie(ae,"Expected fetcher: "+q),ae.state==="loading"&&(Ae(q),U.delete(q),H.push(q))}return gt(H),H.length>0}function hn(B,H){let q=k.blockers.get(B)||vu;return ne.get(B)!==H&&ne.set(B,H),q}function Si(B){k.blockers.delete(B),ne.delete(B)}function Ni(B,H){let q=k.blockers.get(B)||vu;Ie(q.state==="unblocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="blocked"||q.state==="blocked"&&H.state==="proceeding"||q.state==="blocked"&&H.state==="unblocked"||q.state==="proceeding"&&H.state==="unblocked","Invalid blocker state transition: "+q.state+" -> "+H.state);let Z=new Map(k.blockers);Z.set(B,H),G({blockers:Z})}function _i(B){let{currentLocation:H,nextLocation:q,historyAction:Z}=B;if(ne.size===0)return;ne.size>1&&ko(!1,"A router only supports one blocker at a time");let ae=Array.from(ne.entries()),[xe,Ne]=ae[ae.length-1],fe=k.blockers.get(xe);if(!(fe&&fe.state==="proceeding")&&Ne({currentLocation:H,nextLocation:q,historyAction:Z}))return xe}function Ds(B){let H=Ur(404,{pathname:B}),q=o||s,{matches:Z,route:ae}=U_(q);return Go(),{notFoundMatches:Z,route:ae,error:H}}function Go(B){let H=[];return Q.forEach((q,Z)=>{(!B||B(Z))&&(q.cancel(),H.push(Z),Q.delete(Z))}),H}function Aa(B,H,q){if(m=B,b=H,g=q||null,!v&&k.navigation===Xy){v=!0;let Z=fh(k.location,k.matches);Z!=null&&G({restoreScrollPosition:Z})}return()=>{m=null,b=null,g=null}}function dh(B,H){return g&&g(B,H.map(Z=>T9(Z,k.loaderData)))||B.key}function xy(B,H){if(m&&b){let q=dh(B,H);m[q]=b()}}function fh(B,H){if(m){let q=dh(B,H),Z=m[q];if(typeof Z=="number")return Z}return null}function Ko(B,H,q){if(d)if(B){if(Object.keys(B[0].params).length>0)return{active:!0,matches:Ap(H,q,l,!0)}}else return{active:!0,matches:Ap(H,q,l,!0)||[]};return{active:!1,matches:null}}async function Yo(B,H,q,Z){if(!d)return{type:"success",matches:B};let ae=B;for(;;){let xe=o==null,Ne=o||s,fe=i;try{await d({signal:q,path:H,matches:ae,fetcherKey:Z,patch:(me,Te)=>{q.aborted||I_(me,Te,Ne,fe,a)}})}catch(me){return{type:"error",error:me,partialMatches:ae}}finally{xe&&!q.aborted&&(s=[...s])}if(q.aborted)return{type:"aborted"};let he=Ys(Ne,H,l);if(he)return{type:"success",matches:he};let le=Ap(Ne,H,l,!0);if(!le||ae.length===le.length&&ae.every((me,Te)=>me.route.id===le[Te].route.id))return{type:"success",matches:null};ae=le}}function by(B){i={},o=dm(B,a,void 0,i)}function wy(B,H){let q=o==null;I_(B,H,o||s,i,a),q&&(s=[...s],G({}))}return S={get basename(){return l},get future(){return f},get state(){return k},get routes(){return s},get window(){return t},initialize:X,subscribe:ie,enableScrollRestoration:Aa,navigate:be,fetch:Xt,revalidate:Pe,createHref:B=>e.history.createHref(B),encodeLocation:B=>e.history.encodeLocation(B),getFetcher:ce,deleteFetcher:je,dispose:ee,getBlocker:hn,deleteBlocker:Si,patchRoutes:wy,_internalFetchControllers:R,_internalActiveDeferreds:Q,_internalSetRoutes:by},S}function iV(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ww(e,t,r,n,a,i,s,o){let l,u;if(s){l=[];for(let f of t)if(l.push(f),f.route.id===s){u=f;break}}else l=t,u=t[t.length-1];let d=Fk(a||".",zk(l,i),ni(e.pathname,r)||e.pathname,o==="path");if(a==null&&(d.search=e.search,d.hash=e.hash),(a==null||a===""||a===".")&&u){let f=Uk(d.search);if(u.route.index&&!f)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&f){let h=new URLSearchParams(d.search),p=h.getAll("index");h.delete("index"),p.filter(g=>g).forEach(g=>h.append("index",g));let m=h.toString();d.search=m?"?"+m:""}}return n&&r!=="/"&&(d.pathname=d.pathname==="/"?r:Ga([r,d.pathname])),So(d)}function M_(e,t,r,n){if(!n||!iV(n))return{path:r};if(n.formMethod&&!yV(n.formMethod))return{path:r,error:Ur(405,{method:n.formMethod})};let a=()=>({path:r,error:Ur(400,{type:"invalid-body"})}),i=n.formMethod||"get",s=e?i.toUpperCase():i.toLowerCase(),o=fD(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!Kn(s))return a();let h=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,m)=>{let[g,b]=m;return""+p+g+"="+b+`
|
|
50
|
-
`},""):String(n.body);return{path:r,submission:{formMethod:s,formAction:o,formEncType:n.formEncType,formData:void 0,json:void 0,text:h}}}else if(n.formEncType==="application/json"){if(!Kn(s))return a();try{let h=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:s,formAction:o,formEncType:n.formEncType,formData:void 0,json:h,text:void 0}}}catch{return a()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=kw(n.formData),u=n.formData;else if(n.body instanceof FormData)l=kw(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=z_(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=z_(l)}catch{return a()}let d={formMethod:s,formAction:o,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Kn(d.formMethod))return{path:r,submission:d};let f=Ns(r);return t&&f.search&&Uk(f.search)&&l.append("index",""),f.search="?"+l,{path:So(f),submission:d}}function $_(e,t,r){r===void 0&&(r=!1);let n=e.findIndex(a=>a.route.id===t);return n>=0?e.slice(0,r?n+1:n):e}function R_(e,t,r,n,a,i,s,o,l,u,d,f,h,p,m,g){let b=g?rn(g[1])?g[1].error:g[1].data:void 0,v=e.createURL(t.location),y=e.createURL(a),x=r;i&&t.errors?x=$_(r,Object.keys(t.errors)[0],!0):g&&rn(g[1])&&(x=$_(r,g[0]));let j=g?g[1].statusCode:void 0,w=s&&j&&j>=400,S=x.filter((_,E)=>{let{route:A}=_;if(A.lazy)return!0;if(A.loader==null)return!1;if(i)return jw(A,t.loaderData,t.errors);if(sV(t.loaderData,t.matches[E],_)||l.some(O=>O===_.route.id))return!0;let C=t.matches[E],M=_;return D_(_,Nt({currentUrl:v,currentParams:C.params,nextUrl:y,nextParams:M.params},n,{actionResult:b,actionStatus:j,defaultShouldRevalidate:w?!1:o||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||uD(C,M)}))}),k=[];return f.forEach((_,E)=>{if(i||!r.some(P=>P.route.id===_.routeId)||d.has(E))return;let A=Ys(p,_.path,m);if(!A){k.push({key:E,routeId:_.routeId,path:_.path,matches:null,match:null,controller:null});return}let C=t.fetchers.get(E),M=Gu(A,_.path),O=!1;h.has(E)?O=!1:u.has(E)?(u.delete(E),O=!0):C&&C.state!=="idle"&&C.data===void 0?O=o:O=D_(M,Nt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:b,actionStatus:j,defaultShouldRevalidate:w?!1:o})),O&&k.push({key:E,routeId:_.routeId,path:_.path,matches:A,match:M,controller:new AbortController})}),[S,k]}function jw(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&t[e.id]!==void 0,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function sV(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function uD(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function D_(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function I_(e,t,r,n,a){var i;let s;if(e){let u=n[e];Ie(u,"No route found to patch children into: routeId = "+e),u.children||(u.children=[]),s=u.children}else s=r;let o=t.filter(u=>!s.some(d=>dD(u,d))),l=dm(o,a,[e||"_","patch",String(((i=s)==null?void 0:i.length)||"0")],n);s.push(...l)}function dD(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>{var a;return(a=t.children)==null?void 0:a.some(i=>dD(r,i))}):!1}async function oV(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];Ie(a,"No route found in manifest");let i={};for(let s in n){let l=a[s]!==void 0&&s!=="hasErrorBoundary";ko(!l,'Route "'+a.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!O9.has(s)&&(i[s]=n[s])}Object.assign(a,i),Object.assign(a,Nt({},t(a),{lazy:void 0}))}async function lV(e){let{matches:t}=e,r=t.filter(a=>a.shouldLoad);return(await Promise.all(r.map(a=>a.resolve()))).reduce((a,i,s)=>Object.assign(a,{[r[s].route.id]:i}),{})}async function cV(e,t,r,n,a,i,s,o,l,u){let d=i.map(p=>p.route.lazy?oV(p.route,l,o):void 0),f=i.map((p,m)=>{let g=d[m],b=a.some(y=>y.route.id===p.route.id);return Nt({},p,{shouldLoad:b,resolve:async y=>(y&&n.method==="GET"&&(p.route.lazy||p.route.loader)&&(b=!0),b?uV(t,n,p,g,y,u):Promise.resolve({type:at.data,result:void 0}))})}),h=await e({matches:f,request:n,params:i[0].params,fetcherKey:s,context:u});try{await Promise.all(d)}catch{}return h}async function uV(e,t,r,n,a,i){let s,o,l=u=>{let d,f=new Promise((m,g)=>d=g);o=()=>d(),t.signal.addEventListener("abort",o);let h=m=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+r.route.id+"]"))):u({request:t,params:r.params,context:i},...m!==void 0?[m]:[]),p=(async()=>{try{return{type:"data",result:await(a?a(g=>h(g)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([p,f])};try{let u=r.route[e];if(n)if(u){let d,[f]=await Promise.all([l(u).catch(h=>{d=h}),n]);if(d!==void 0)throw d;s=f}else if(await n,u=r.route[e],u)s=await l(u);else if(e==="action"){let d=new URL(t.url),f=d.pathname+d.search;throw Ur(405,{method:t.method,pathname:f,routeId:r.route.id})}else return{type:at.data,result:void 0};else if(u)s=await l(u);else{let d=new URL(t.url),f=d.pathname+d.search;throw Ur(404,{pathname:f})}Ie(s.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:at.error,result:u}}finally{o&&t.signal.removeEventListener("abort",o)}return s}async function dV(e){let{result:t,type:r}=e;if(hD(t)){let f;try{let h=t.headers.get("Content-Type");h&&/\bapplication\/json\b/.test(h)?t.body==null?f=null:f=await t.json():f=await t.text()}catch(h){return{type:at.error,error:h}}return r===at.error?{type:at.error,error:new hm(t.status,t.statusText,f),statusCode:t.status,headers:t.headers}:{type:at.data,data:f,statusCode:t.status,headers:t.headers}}if(r===at.error){if(H_(t)){var n,a;if(t.data instanceof Error){var i,s;return{type:at.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:at.error,error:new hm(((n=t.init)==null?void 0:n.status)||500,void 0,t.data),statusCode:Fd(t)?t.status:void 0,headers:(a=t.init)!=null&&a.headers?new Headers(t.init.headers):void 0}}return{type:at.error,error:t,statusCode:Fd(t)?t.status:void 0}}if(gV(t)){var o,l;return{type:at.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(H_(t)){var u,d;return{type:at.data,data:t.data,statusCode:(u=t.init)==null?void 0:u.status,headers:(d=t.init)!=null&&d.headers?new Headers(t.init.headers):void 0}}return{type:at.data,data:t}}function fV(e,t,r,n,a,i){let s=e.headers.get("Location");if(Ie(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Bk.test(s)){let o=n.slice(0,n.findIndex(l=>l.route.id===r)+1);s=ww(new URL(t.url),o,a,!0,s,i),e.headers.set("Location",s)}return e}function L_(e,t,r){if(Bk.test(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),i=ni(a.pathname,r)!=null;if(a.origin===t.origin&&i)return a.pathname+a.search+a.hash}return e}function Jo(e,t,r,n){let a=e.createURL(fD(t)).toString(),i={signal:r};if(n&&Kn(n.formMethod)){let{formMethod:s,formEncType:o}=n;i.method=s.toUpperCase(),o==="application/json"?(i.headers=new Headers({"Content-Type":o}),i.body=JSON.stringify(n.json)):o==="text/plain"?i.body=n.text:o==="application/x-www-form-urlencoded"&&n.formData?i.body=kw(n.formData):i.body=n.formData}return new Request(a,i)}function kw(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function z_(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function hV(e,t,r,n,a){let i={},s=null,o,l=!1,u={},d=r&&rn(r[1])?r[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,p=t[h];if(Ie(!eo(p),"Cannot handle redirect results in processLoaderData"),rn(p)){let m=p.error;d!==void 0&&(m=d,d=void 0),s=s||{};{let g=Xs(e,h);s[g.route.id]==null&&(s[g.route.id]=m)}i[h]=void 0,l||(l=!0,o=Fd(p.error)?p.error.status:500),p.headers&&(u[h]=p.headers)}else Yi(p)?(n.set(h,p.deferredData),i[h]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!l&&(o=p.statusCode),p.headers&&(u[h]=p.headers)):(i[h]=p.data,p.statusCode&&p.statusCode!==200&&!l&&(o=p.statusCode),p.headers&&(u[h]=p.headers))}),d!==void 0&&r&&(s={[r[0]]:d},i[r[0]]=void 0),{loaderData:i,errors:s,statusCode:o||200,loaderHeaders:u}}function F_(e,t,r,n,a,i,s){let{loaderData:o,errors:l}=hV(t,r,n,s);return a.forEach(u=>{let{key:d,match:f,controller:h}=u,p=i[d];if(Ie(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(rn(p)){let m=Xs(e.matches,f==null?void 0:f.route.id);l&&l[m.route.id]||(l=Nt({},l,{[m.route.id]:p.error})),e.fetchers.delete(d)}else if(eo(p))Ie(!1,"Unhandled fetcher revalidation redirect");else if(Yi(p))Ie(!1,"Unhandled fetcher deferred data");else{let m=Di(p.data);e.fetchers.set(d,m)}}),{loaderData:o,errors:l}}function B_(e,t,r,n){let a=Nt({},t);for(let i of r){let s=i.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(a[s]=t[s]):e[s]!==void 0&&i.route.loader&&(a[s]=e[s]),n&&n.hasOwnProperty(s))break}return a}function V_(e){return e?rn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Xs(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function U_(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ur(e,t){let{pathname:r,routeId:n,method:a,type:i,message:s}=t===void 0?{}:t,o="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&r&&n?l="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(o="Forbidden",l='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",l='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",a&&r&&n?l="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new hm(e||500,o,new Error(l),!0)}function Ch(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(eo(a))return{key:n,result:a}}}function fD(e){let t=typeof e=="string"?Ns(e):e;return So(Nt({},t,{hash:""}))}function pV(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function mV(e){return hD(e.result)&&eV.has(e.result.status)}function Yi(e){return e.type===at.deferred}function rn(e){return e.type===at.error}function eo(e){return(e&&e.type)===at.redirect}function H_(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function gV(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function hD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function yV(e){return J9.has(e.toLowerCase())}function Kn(e){return Z9.has(e.toLowerCase())}async function vV(e,t,r,n,a){let i=Object.entries(t);for(let s=0;s<i.length;s++){let[o,l]=i[s],u=e.find(h=>(h==null?void 0:h.route.id)===o);if(!u)continue;let d=n.find(h=>h.route.id===u.route.id),f=d!=null&&!uD(d,u)&&(a&&a[u.route.id])!==void 0;Yi(l)&&f&&await Vk(l,r,!1).then(h=>{h&&(t[o]=h)})}}async function xV(e,t,r){for(let n=0;n<r.length;n++){let{key:a,routeId:i,controller:s}=r[n],o=t[a];e.find(u=>(u==null?void 0:u.route.id)===i)&&Yi(o)&&(Ie(s,"Expected an AbortController for revalidating fetcher deferred result"),await Vk(o,s.signal,!0).then(u=>{u&&(t[a]=u)}))}}async function Vk(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:at.data,data:e.deferredData.unwrappedData}}catch(a){return{type:at.error,error:a}}return{type:at.data,data:e.deferredData.data}}}function Uk(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Gu(e,t){let r=typeof t=="string"?Ns(t).search:t.search;if(e[e.length-1].route.index&&Uk(r||""))return e[e.length-1];let n=oD(e);return n[n.length-1]}function W_(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:i,json:s}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:s,text:void 0}}}function Zy(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function bV(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function xu(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function wV(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Di(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function jV(e,t){try{let r=e.sessionStorage.getItem(cD);if(r){let n=JSON.parse(r);for(let[a,i]of Object.entries(n||{}))i&&Array.isArray(i)&&t.set(a,new Set(i||[]))}}catch{}}function kV(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(cD,JSON.stringify(r))}catch(n){ko(!1,"Failed to save applied view transitions in sessionStorage ("+n+").")}}}/**
|
|
51
|
-
* React Router v6.30.2
|
|
52
|
-
*
|
|
53
|
-
* Copyright (c) Remix Software Inc.
|
|
54
|
-
*
|
|
55
|
-
* This source code is licensed under the MIT license found in the
|
|
56
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
-
*
|
|
58
|
-
* @license MIT
|
|
59
|
-
*/function pm(){return pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pm.apply(this,arguments)}const Uf=N.createContext(null),Hk=N.createContext(null),_s=N.createContext(null),Wk=N.createContext(null),yi=N.createContext({outlet:null,matches:[],isDataRoute:!1}),pD=N.createContext(null);function SV(e,t){let{relative:r}=t===void 0?{}:t;Hf()||Ie(!1);let{basename:n,navigator:a}=N.useContext(_s),{hash:i,pathname:s,search:o}=eg(e,{relative:r}),l=s;return n!=="/"&&(l=s==="/"?n:Ga([n,s])),a.createHref({pathname:l,search:o,hash:i})}function Hf(){return N.useContext(Wk)!=null}function Es(){return Hf()||Ie(!1),N.useContext(Wk).location}function mD(e){N.useContext(_s).static||N.useLayoutEffect(e)}function J0(){let{isDataRoute:e}=N.useContext(yi);return e?LV():NV()}function NV(){Hf()||Ie(!1);let e=N.useContext(Uf),{basename:t,future:r,navigator:n}=N.useContext(_s),{matches:a}=N.useContext(yi),{pathname:i}=Es(),s=JSON.stringify(zk(a,r.v7_relativeSplatPath)),o=N.useRef(!1);return mD(()=>{o.current=!0}),N.useCallback(function(u,d){if(d===void 0&&(d={}),!o.current)return;if(typeof u=="number"){n.go(u);return}let f=Fk(u,JSON.parse(s),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ga([t,f.pathname])),(d.replace?n.replace:n.push)(f,d.state,d)},[t,n,s,i,e])}const _V=N.createContext(null);function EV(e){let t=N.useContext(yi).outlet;return t&&N.createElement(_V.Provider,{value:e},t)}function qk(){let{matches:e}=N.useContext(yi),t=e[e.length-1];return t?t.params:{}}function eg(e,t){let{relative:r}=t===void 0?{}:t,{future:n}=N.useContext(_s),{matches:a}=N.useContext(yi),{pathname:i}=Es(),s=JSON.stringify(zk(a,n.v7_relativeSplatPath));return N.useMemo(()=>Fk(e,JSON.parse(s),i,r==="path"),[e,s,i,r])}function PV(e,t,r,n){Hf()||Ie(!1);let{navigator:a}=N.useContext(_s),{matches:i}=N.useContext(yi),s=i[i.length-1],o=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=Es(),d;d=u;let f=d.pathname||"/",h=f;if(l!=="/"){let g=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(g.length).join("/")}let p=Ys(e,{pathname:h});return MV(p&&p.map(g=>Object.assign({},g,{params:Object.assign({},o,g.params),pathname:Ga([l,a.encodeLocation?a.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Ga([l,a.encodeLocation?a.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,r,n)}function AV(){let e=IV(),t=Fd(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),r?N.createElement("pre",{style:a},r):null,null)}const OV=N.createElement(AV,null);class CV extends N.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?N.createElement(yi.Provider,{value:this.props.routeContext},N.createElement(pD.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function TV(e){let{routeContext:t,match:r,children:n}=e,a=N.useContext(Uf);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),N.createElement(yi.Provider,{value:t},n)}function MV(e,t,r,n){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),n===void 0&&(n=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=n)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let s=e,o=(a=r)==null?void 0:a.errors;if(o!=null){let d=s.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);d>=0||Ie(!1),s=s.slice(0,Math.min(s.length,d+1))}let l=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let d=0;d<s.length;d++){let f=s[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:p}=r,m=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||m){l=!0,u>=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((d,f,h)=>{let p,m=!1,g=null,b=null;r&&(p=o&&f.route.id?o[f.route.id]:void 0,g=f.route.errorElement||OV,l&&(u<0&&h===0?(zV("route-fallback"),m=!0,b=null):u===h&&(m=!0,b=f.route.hydrateFallbackElement||null)));let v=t.concat(s.slice(0,h+1)),y=()=>{let x;return p?x=g:m?x=b:f.route.Component?x=N.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,N.createElement(TV,{match:f,routeContext:{outlet:d,matches:v,isDataRoute:r!=null},children:x})};return r&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?N.createElement(CV,{location:r.location,revalidation:r.revalidation,component:g,error:p,children:y(),routeContext:{outlet:null,matches:v,isDataRoute:!0}}):y()},null)}var gD=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(gD||{}),yD=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(yD||{});function $V(e){let t=N.useContext(Uf);return t||Ie(!1),t}function RV(e){let t=N.useContext(Hk);return t||Ie(!1),t}function DV(e){let t=N.useContext(yi);return t||Ie(!1),t}function vD(e){let t=DV(),r=t.matches[t.matches.length-1];return r.route.id||Ie(!1),r.route.id}function IV(){var e;let t=N.useContext(pD),r=RV(yD.UseRouteError),n=vD();return t!==void 0?t:(e=r.errors)==null?void 0:e[n]}function LV(){let{router:e}=$V(gD.UseNavigateStable),t=vD(),r=N.useRef(!1);return mD(()=>{r.current=!0}),N.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,pm({fromRouteId:t},i)))},[e,t])}const q_={};function zV(e,t,r){q_[e]||(q_[e]=!0)}function FV(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function BV(e){return EV(e.context)}function VV(e){let{basename:t="/",children:r=null,location:n,navigationType:a=qt.Pop,navigator:i,static:s=!1,future:o}=e;Hf()&&Ie(!1);let l=t.replace(/^\/*/,"/"),u=N.useMemo(()=>({basename:l,navigator:i,static:s,future:pm({v7_relativeSplatPath:!1},o)}),[l,o,i,s]);typeof n=="string"&&(n=Ns(n));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:m="default"}=n,g=N.useMemo(()=>{let b=ni(d,l);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:m},navigationType:a}},[l,d,f,h,p,m,a]);return g==null?null:N.createElement(_s.Provider,{value:u},N.createElement(Wk.Provider,{children:r,value:g}))}new Promise(()=>{});function UV(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:N.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:N.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:N.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
|
|
60
|
-
* React Router DOM v6.30.2
|
|
61
|
-
*
|
|
62
|
-
* Copyright (c) Remix Software Inc.
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the MIT license found in the
|
|
65
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
66
|
-
*
|
|
67
|
-
* @license MIT
|
|
68
|
-
*/function nc(){return nc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nc.apply(this,arguments)}function xD(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function HV(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function WV(e,t){return e.button===0&&(!t||t==="_self")&&!HV(e)}function Sw(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(a=>[r,a]):[[r,n]])},[]))}function qV(e,t){let r=Sw(e);return t&&t.forEach((n,a)=>{r.has(a)||t.getAll(a).forEach(i=>{r.append(a,i)})}),r}const GV=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],KV=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],YV="6";try{window.__reactRouterVersion=YV}catch{}function XV(e,t){return aV({basename:void 0,future:nc({},void 0,{v7_prependBasename:!0}),history:E9({window:void 0}),hydrationData:ZV(),routes:e,mapRouteProperties:UV,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function ZV(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=nc({},t,{errors:QV(t.errors)})),t}function QV(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new hm(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let i=window[a.__subType];if(typeof i=="function")try{let s=new i(a.message);s.stack="",r[n]=s}catch{}}if(r[n]==null){let i=new Error(a.message);i.stack="",r[n]=i}}else r[n]=a;return r}const bD=N.createContext({isTransitioning:!1}),JV=N.createContext(new Map),eU="startTransition",G_=pB[eU],tU="flushSync",K_=_9[tU];function rU(e){G_?G_(e):e()}function bu(e){K_?K_(e):e()}class nU{constructor(){this.status="pending",this.promise=new Promise((t,r)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",t(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",r(n))}})}}function aU(e){let{fallbackElement:t,router:r,future:n}=e,[a,i]=N.useState(r.state),[s,o]=N.useState(),[l,u]=N.useState({isTransitioning:!1}),[d,f]=N.useState(),[h,p]=N.useState(),[m,g]=N.useState(),b=N.useRef(new Map),{v7_startTransition:v}=n||{},y=N.useCallback(_=>{v?rU(_):_()},[v]),x=N.useCallback((_,E)=>{let{deletedFetchers:A,flushSync:C,viewTransitionOpts:M}=E;_.fetchers.forEach((P,D)=>{P.data!==void 0&&b.current.set(D,P.data)}),A.forEach(P=>b.current.delete(P));let O=r.window==null||r.window.document==null||typeof r.window.document.startViewTransition!="function";if(!M||O){C?bu(()=>i(_)):y(()=>i(_));return}if(C){bu(()=>{h&&(d&&d.resolve(),h.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let P=r.window.document.startViewTransition(()=>{bu(()=>i(_))});P.finished.finally(()=>{bu(()=>{f(void 0),p(void 0),o(void 0),u({isTransitioning:!1})})}),bu(()=>p(P));return}h?(d&&d.resolve(),h.skipTransition(),g({state:_,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(o(_),u({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[r.window,h,d,b,y]);N.useLayoutEffect(()=>r.subscribe(x),[r,x]),N.useEffect(()=>{l.isTransitioning&&!l.flushSync&&f(new nU)},[l]),N.useEffect(()=>{if(d&&s&&r.window){let _=s,E=d.promise,A=r.window.document.startViewTransition(async()=>{y(()=>i(_)),await E});A.finished.finally(()=>{f(void 0),p(void 0),o(void 0),u({isTransitioning:!1})}),p(A)}},[y,s,d,r.window]),N.useEffect(()=>{d&&s&&a.location.key===s.location.key&&d.resolve()},[d,h,a.location,s]),N.useEffect(()=>{!l.isTransitioning&&m&&(o(m.state),u({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),g(void 0))},[l.isTransitioning,m]),N.useEffect(()=>{},[]);let j=N.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:_=>r.navigate(_),push:(_,E,A)=>r.navigate(_,{state:E,preventScrollReset:A==null?void 0:A.preventScrollReset}),replace:(_,E,A)=>r.navigate(_,{replace:!0,state:E,preventScrollReset:A==null?void 0:A.preventScrollReset})}),[r]),w=r.basename||"/",S=N.useMemo(()=>({router:r,navigator:j,static:!1,basename:w}),[r,j,w]),k=N.useMemo(()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath}),[r.future.v7_relativeSplatPath]);return N.useEffect(()=>FV(n,r.future),[n,r.future]),N.createElement(N.Fragment,null,N.createElement(Uf.Provider,{value:S},N.createElement(Hk.Provider,{value:a},N.createElement(JV.Provider,{value:b.current},N.createElement(bD.Provider,{value:l},N.createElement(VV,{basename:w,location:a.location,navigationType:a.historyAction,navigator:j,future:k},a.initialized||r.future.v7_partialHydration?N.createElement(iU,{routes:r.routes,future:r.future,state:a}):t))))),null)}const iU=N.memo(sU);function sU(e){let{routes:t,future:r,state:n}=e;return PV(t,void 0,n,r)}const oU=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lU=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rt=N.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:s,state:o,target:l,to:u,preventScrollReset:d,viewTransition:f}=t,h=xD(t,GV),{basename:p}=N.useContext(_s),m,g=!1;if(typeof u=="string"&&lU.test(u)&&(m=u,oU))try{let x=new URL(window.location.href),j=u.startsWith("//")?new URL(x.protocol+u):new URL(u),w=ni(j.pathname,p);j.origin===x.origin&&w!=null?u=w+j.search+j.hash:g=!0}catch{}let b=SV(u,{relative:a}),v=dU(u,{replace:s,state:o,target:l,preventScrollReset:d,relative:a,viewTransition:f});function y(x){n&&n(x),x.defaultPrevented||v(x)}return N.createElement("a",nc({},h,{href:m||b,onClick:g||i?n:y,ref:r,target:l}))}),cU=N.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:s=!1,style:o,to:l,viewTransition:u,children:d}=t,f=xD(t,KV),h=eg(l,{relative:f.relative}),p=Es(),m=N.useContext(Hk),{navigator:g,basename:b}=N.useContext(_s),v=m!=null&&fU(h)&&u===!0,y=g.encodeLocation?g.encodeLocation(h).pathname:h.pathname,x=p.pathname,j=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;a||(x=x.toLowerCase(),j=j?j.toLowerCase():null,y=y.toLowerCase()),j&&b&&(j=ni(j,b)||j);const w=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let S=x===y||!s&&x.startsWith(y)&&x.charAt(w)==="/",k=j!=null&&(j===y||!s&&j.startsWith(y)&&j.charAt(y.length)==="/"),_={isActive:S,isPending:k,isTransitioning:v},E=S?n:void 0,A;typeof i=="function"?A=i(_):A=[i,S?"active":null,k?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let C=typeof o=="function"?o(_):o;return N.createElement(rt,nc({},f,{"aria-current":E,className:A,ref:r,style:C,to:l,viewTransition:u}),typeof d=="function"?d(_):d)});var Nw;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Nw||(Nw={}));var Y_;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Y_||(Y_={}));function uU(e){let t=N.useContext(Uf);return t||Ie(!1),t}function dU(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:s,viewTransition:o}=t===void 0?{}:t,l=J0(),u=Es(),d=eg(e,{relative:s});return N.useCallback(f=>{if(WV(f,r)){f.preventDefault();let h=n!==void 0?n:So(u)===So(d);l(e,{replace:h,state:a,preventScrollReset:i,relative:s,viewTransition:o})}},[u,l,d,n,a,r,e,i,s,o])}function Gk(e){let t=N.useRef(Sw(e)),r=N.useRef(!1),n=Es(),a=N.useMemo(()=>qV(n.search,r.current?null:t.current),[n.search]),i=J0(),s=N.useCallback((o,l)=>{const u=Sw(typeof o=="function"?o(a):o);r.current=!0,i("?"+u,l)},[i,a]);return[a,s]}function fU(e,t){t===void 0&&(t={});let r=N.useContext(bD);r==null&&Ie(!1);let{basename:n}=uU(Nw.useViewTransitionState),a=eg(e,{relative:t.relative});if(!r.isTransitioning)return!1;let i=ni(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=ni(r.nextLocation.pathname,n)||r.nextLocation.pathname;return fm(a.pathname,s)!=null||fm(a.pathname,i)!=null}const wD=N.createContext();function hU({children:e}){const[t,r]=N.useState(()=>{const a=localStorage.getItem("flowyml-theme");return a?(document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(a),a):window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?(document.documentElement.classList.remove("light"),document.documentElement.classList.add("dark"),"dark"):(document.documentElement.classList.remove("dark"),document.documentElement.classList.add("light"),"light")});N.useEffect(()=>{document.documentElement.classList.remove("light","dark"),document.documentElement.classList.add(t),localStorage.setItem("flowyml-theme",t)},[t]);const n=()=>{r(a=>a==="light"?"dark":"light")};return c.jsx(wD.Provider,{value:{theme:t,setTheme:r,toggleTheme:n},children:e})}function pU(){const e=N.useContext(wD);if(!e)throw new Error("useTheme must be used within ThemeProvider");return e}const jD=N.createContext();function mU({children:e}){const[t,r]=N.useState(()=>localStorage.getItem("flowyml-selected-project")||null),[n,a]=N.useState([]),[i,s]=N.useState(!0);N.useEffect(()=>{fetch("/api/projects/").then(d=>d.json()).then(d=>{a(d.projects||[]),s(!1)}).catch(d=>{console.error("Failed to fetch projects:",d),s(!1)})},[]),N.useEffect(()=>{t?localStorage.setItem("flowyml-selected-project",t):localStorage.removeItem("flowyml-selected-project")},[t]);const o=d=>{r(d)},l=()=>{r(null)},u=async()=>{s(!0);try{const f=await(await fetch("/api/projects/")).json();a(f.projects||[])}catch(d){console.error("Failed to refresh projects:",d)}finally{s(!1)}};return c.jsx(jD.Provider,{value:{selectedProject:t,projects:n,loading:i,selectProject:o,clearProject:l,refreshProjects:u},children:e})}function vi(){const e=N.useContext(jD);if(!e)throw new Error("useProject must be used within ProjectProvider");return e}/**
|
|
69
|
-
* @license lucide-react v0.344.0 - ISC
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the ISC license.
|
|
72
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/var gU={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"};/**
|
|
74
|
-
* @license lucide-react v0.344.0 - ISC
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the ISC license.
|
|
77
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/const yU=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),te=(e,t)=>{const r=N.forwardRef(({color:n="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:o="",children:l,...u},d)=>N.createElement("svg",{ref:d,...gU,width:a,height:a,stroke:n,strokeWidth:s?Number(i)*24/Number(a):i,className:["lucide",`lucide-${yU(e)}`,o].join(" "),...u},[...t.map(([f,h])=>N.createElement(f,h)),...Array.isArray(l)?l:[l]]));return r.displayName=`${e}`,r};/**
|
|
79
|
-
* @license lucide-react v0.344.0 - ISC
|
|
80
|
-
*
|
|
81
|
-
* This source code is licensed under the ISC license.
|
|
82
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
83
|
-
*/const Be=te("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/**
|
|
84
|
-
* @license lucide-react v0.344.0 - ISC
|
|
85
|
-
*
|
|
86
|
-
* This source code is licensed under the ISC license.
|
|
87
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
88
|
-
*/const ai=te("AlertCircle",[["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"}]]);/**
|
|
89
|
-
* @license lucide-react v0.344.0 - ISC
|
|
90
|
-
*
|
|
91
|
-
* This source code is licensed under the ISC license.
|
|
92
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/const Kk=te("AlertTriangle",[["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-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
94
|
-
* @license lucide-react v0.344.0 - ISC
|
|
95
|
-
*
|
|
96
|
-
* This source code is licensed under the ISC license.
|
|
97
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
98
|
-
*/const vU=te("ArrowDownCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]]);/**
|
|
99
|
-
* @license lucide-react v0.344.0 - ISC
|
|
100
|
-
*
|
|
101
|
-
* This source code is licensed under the ISC license.
|
|
102
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
103
|
-
*/const kD=te("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
104
|
-
* @license lucide-react v0.344.0 - ISC
|
|
105
|
-
*
|
|
106
|
-
* This source code is licensed under the ISC license.
|
|
107
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
108
|
-
*/const ii=te("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
109
|
-
* @license lucide-react v0.344.0 - ISC
|
|
110
|
-
*
|
|
111
|
-
* This source code is licensed under the ISC license.
|
|
112
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
113
|
-
*/const xU=te("ArrowUpCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]);/**
|
|
114
|
-
* @license lucide-react v0.344.0 - ISC
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the ISC license.
|
|
117
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/const bU=te("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"}]]);/**
|
|
119
|
-
* @license lucide-react v0.344.0 - ISC
|
|
120
|
-
*
|
|
121
|
-
* This source code is licensed under the ISC license.
|
|
122
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
123
|
-
*/const _a=te("BarChart2",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
|
|
124
|
-
* @license lucide-react v0.344.0 - ISC
|
|
125
|
-
*
|
|
126
|
-
* This source code is licensed under the ISC license.
|
|
127
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
128
|
-
*/const wU=te("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
129
|
-
* @license lucide-react v0.344.0 - ISC
|
|
130
|
-
*
|
|
131
|
-
* This source code is licensed under the ISC license.
|
|
132
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
133
|
-
*/const Dr=te("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"}]]);/**
|
|
134
|
-
* @license lucide-react v0.344.0 - ISC
|
|
135
|
-
*
|
|
136
|
-
* This source code is licensed under the ISC license.
|
|
137
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
138
|
-
*/const jU=te("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"}]]);/**
|
|
139
|
-
* @license lucide-react v0.344.0 - ISC
|
|
140
|
-
*
|
|
141
|
-
* This source code is licensed under the ISC license.
|
|
142
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
143
|
-
*/const An=te("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/**
|
|
144
|
-
* @license lucide-react v0.344.0 - ISC
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the ISC license.
|
|
147
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/const kU=te("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
149
|
-
* @license lucide-react v0.344.0 - ISC
|
|
150
|
-
*
|
|
151
|
-
* This source code is licensed under the ISC license.
|
|
152
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
153
|
-
*/const Vt=te("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
154
|
-
* @license lucide-react v0.344.0 - ISC
|
|
155
|
-
*
|
|
156
|
-
* This source code is licensed under the ISC license.
|
|
157
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
158
|
-
*/const SU=te("CheckSquare",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/**
|
|
159
|
-
* @license lucide-react v0.344.0 - ISC
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the ISC license.
|
|
162
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
163
|
-
*/const Yk=te("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
164
|
-
* @license lucide-react v0.344.0 - ISC
|
|
165
|
-
*
|
|
166
|
-
* This source code is licensed under the ISC license.
|
|
167
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
168
|
-
*/const SD=te("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
169
|
-
* @license lucide-react v0.344.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*/const NU=te("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
174
|
-
* @license lucide-react v0.344.0 - ISC
|
|
175
|
-
*
|
|
176
|
-
* This source code is licensed under the ISC license.
|
|
177
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
178
|
-
*/const No=te("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
179
|
-
* @license lucide-react v0.344.0 - ISC
|
|
180
|
-
*
|
|
181
|
-
* This source code is licensed under the ISC license.
|
|
182
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
183
|
-
*/const ct=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
184
|
-
* @license lucide-react v0.344.0 - ISC
|
|
185
|
-
*
|
|
186
|
-
* This source code is licensed under the ISC license.
|
|
187
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
188
|
-
*/const _U=te("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]);/**
|
|
189
|
-
* @license lucide-react v0.344.0 - ISC
|
|
190
|
-
*
|
|
191
|
-
* This source code is licensed under the ISC license.
|
|
192
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
193
|
-
*/const EU=te("Code2",[["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"}]]);/**
|
|
194
|
-
* @license lucide-react v0.344.0 - ISC
|
|
195
|
-
*
|
|
196
|
-
* This source code is licensed under the ISC license.
|
|
197
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
198
|
-
*/const PU=te("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
|
|
199
|
-
* @license lucide-react v0.344.0 - ISC
|
|
200
|
-
*
|
|
201
|
-
* This source code is licensed under the ISC license.
|
|
202
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
203
|
-
*/const mm=te("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"}]]);/**
|
|
204
|
-
* @license lucide-react v0.344.0 - ISC
|
|
205
|
-
*
|
|
206
|
-
* This source code is licensed under the ISC license.
|
|
207
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
-
*/const Ir=te("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"}]]);/**
|
|
209
|
-
* @license lucide-react v0.344.0 - ISC
|
|
210
|
-
*
|
|
211
|
-
* This source code is licensed under the ISC license.
|
|
212
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
-
*/const AU=te("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
|
|
214
|
-
* @license lucide-react v0.344.0 - ISC
|
|
215
|
-
*
|
|
216
|
-
* This source code is licensed under the ISC license.
|
|
217
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
218
|
-
*/const Lo=te("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"}]]);/**
|
|
219
|
-
* @license lucide-react v0.344.0 - ISC
|
|
220
|
-
*
|
|
221
|
-
* This source code is licensed under the ISC license.
|
|
222
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
223
|
-
*/const dd=te("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"}]]);/**
|
|
224
|
-
* @license lucide-react v0.344.0 - ISC
|
|
225
|
-
*
|
|
226
|
-
* This source code is licensed under the ISC license.
|
|
227
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
228
|
-
*/const OU=te("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
|
|
229
|
-
* @license lucide-react v0.344.0 - ISC
|
|
230
|
-
*
|
|
231
|
-
* This source code is licensed under the ISC license.
|
|
232
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
233
|
-
*/const tg=te("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
234
|
-
* @license lucide-react v0.344.0 - ISC
|
|
235
|
-
*
|
|
236
|
-
* This source code is licensed under the ISC license.
|
|
237
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
238
|
-
*/const zl=te("FileBox",[["path",{d:"M14.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"16lz6z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M3 13.1a2 2 0 0 0-1 1.76v3.24a2 2 0 0 0 .97 1.78L6 21.7a2 2 0 0 0 2.03.01L11 19.9a2 2 0 0 0 1-1.76V14.9a2 2 0 0 0-.97-1.78L8 11.3a2 2 0 0 0-2.03-.01Z",key:"99pj1s"}],["path",{d:"M7 17v5",key:"1yj1jh"}],["path",{d:"M11.7 14.2 7 17l-4.7-2.8",key:"1yk8tc"}]]);/**
|
|
239
|
-
* @license lucide-react v0.344.0 - ISC
|
|
240
|
-
*
|
|
241
|
-
* This source code is licensed under the ISC license.
|
|
242
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
243
|
-
*/const ps=te("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"}]]);/**
|
|
244
|
-
* @license lucide-react v0.344.0 - ISC
|
|
245
|
-
*
|
|
246
|
-
* This source code is licensed under the ISC license.
|
|
247
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
248
|
-
*/const ND=te("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
249
|
-
* @license lucide-react v0.344.0 - ISC
|
|
250
|
-
*
|
|
251
|
-
* This source code is licensed under the ISC license.
|
|
252
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
-
*/const On=te("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/**
|
|
254
|
-
* @license lucide-react v0.344.0 - ISC
|
|
255
|
-
*
|
|
256
|
-
* This source code is licensed under the ISC license.
|
|
257
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
258
|
-
*/const CU=te("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]);/**
|
|
259
|
-
* @license lucide-react v0.344.0 - ISC
|
|
260
|
-
*
|
|
261
|
-
* This source code is licensed under the ISC license.
|
|
262
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
263
|
-
*/const X_=te("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
|
|
264
|
-
* @license lucide-react v0.344.0 - ISC
|
|
265
|
-
*
|
|
266
|
-
* This source code is licensed under the ISC license.
|
|
267
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
268
|
-
*/const Ka=te("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
|
|
269
|
-
* @license lucide-react v0.344.0 - ISC
|
|
270
|
-
*
|
|
271
|
-
* This source code is licensed under the ISC license.
|
|
272
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
273
|
-
*/const Bd=te("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"}]]);/**
|
|
274
|
-
* @license lucide-react v0.344.0 - ISC
|
|
275
|
-
*
|
|
276
|
-
* This source code is licensed under the ISC license.
|
|
277
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
278
|
-
*/const TU=te("GitCompare",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["path",{d:"M11 18H8a2 2 0 0 1-2-2V9",key:"19pyzm"}]]);/**
|
|
279
|
-
* @license lucide-react v0.344.0 - ISC
|
|
280
|
-
*
|
|
281
|
-
* This source code is licensed under the ISC license.
|
|
282
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
283
|
-
*/const gm=te("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
284
|
-
* @license lucide-react v0.344.0 - ISC
|
|
285
|
-
*
|
|
286
|
-
* This source code is licensed under the ISC license.
|
|
287
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
288
|
-
*/const MU=te("Grid3x3",[["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"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
|
|
289
|
-
* @license lucide-react v0.344.0 - ISC
|
|
290
|
-
*
|
|
291
|
-
* This source code is licensed under the ISC license.
|
|
292
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
-
*/const Xk=te("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"}]]);/**
|
|
294
|
-
* @license lucide-react v0.344.0 - ISC
|
|
295
|
-
*
|
|
296
|
-
* This source code is licensed under the ISC license.
|
|
297
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
298
|
-
*/const Qy=te("History",[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);/**
|
|
299
|
-
* @license lucide-react v0.344.0 - ISC
|
|
300
|
-
*
|
|
301
|
-
* This source code is licensed under the ISC license.
|
|
302
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
303
|
-
*/const $U=te("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
|
|
304
|
-
* @license lucide-react v0.344.0 - ISC
|
|
305
|
-
*
|
|
306
|
-
* This source code is licensed under the ISC license.
|
|
307
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
308
|
-
*/const RU=te("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
309
|
-
* @license lucide-react v0.344.0 - ISC
|
|
310
|
-
*
|
|
311
|
-
* This source code is licensed under the ISC license.
|
|
312
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
313
|
-
*/const ym=te("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
314
|
-
* @license lucide-react v0.344.0 - ISC
|
|
315
|
-
*
|
|
316
|
-
* This source code is licensed under the ISC license.
|
|
317
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
318
|
-
*/const Fl=te("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
|
|
319
|
-
* @license lucide-react v0.344.0 - ISC
|
|
320
|
-
*
|
|
321
|
-
* This source code is licensed under the ISC license.
|
|
322
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
-
*/const oa=te("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"}]]);/**
|
|
324
|
-
* @license lucide-react v0.344.0 - ISC
|
|
325
|
-
*
|
|
326
|
-
* This source code is licensed under the ISC license.
|
|
327
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
328
|
-
*/const _D=te("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"}]]);/**
|
|
329
|
-
* @license lucide-react v0.344.0 - ISC
|
|
330
|
-
*
|
|
331
|
-
* This source code is licensed under the ISC license.
|
|
332
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
-
*/const DU=te("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
|
|
334
|
-
* @license lucide-react v0.344.0 - ISC
|
|
335
|
-
*
|
|
336
|
-
* This source code is licensed under the ISC license.
|
|
337
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
338
|
-
*/const IU=te("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
|
|
339
|
-
* @license lucide-react v0.344.0 - ISC
|
|
340
|
-
*
|
|
341
|
-
* This source code is licensed under the ISC license.
|
|
342
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
343
|
-
*/const ED=te("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
|
|
344
|
-
* @license lucide-react v0.344.0 - ISC
|
|
345
|
-
*
|
|
346
|
-
* This source code is licensed under the ISC license.
|
|
347
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
348
|
-
*/const ac=te("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
349
|
-
* @license lucide-react v0.344.0 - ISC
|
|
350
|
-
*
|
|
351
|
-
* This source code is licensed under the ISC license.
|
|
352
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
353
|
-
*/const PD=te("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]);/**
|
|
354
|
-
* @license lucide-react v0.344.0 - ISC
|
|
355
|
-
*
|
|
356
|
-
* This source code is licensed under the ISC license.
|
|
357
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
-
*/const LU=te("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
|
|
359
|
-
* @license lucide-react v0.344.0 - ISC
|
|
360
|
-
*
|
|
361
|
-
* This source code is licensed under the ISC license.
|
|
362
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
363
|
-
*/const AD=te("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
364
|
-
* @license lucide-react v0.344.0 - ISC
|
|
365
|
-
*
|
|
366
|
-
* This source code is licensed under the ISC license.
|
|
367
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
368
|
-
*/const zU=te("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
369
|
-
* @license lucide-react v0.344.0 - ISC
|
|
370
|
-
*
|
|
371
|
-
* This source code is licensed under the ISC license.
|
|
372
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
373
|
-
*/const ms=te("Package",[["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["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"}]]);/**
|
|
374
|
-
* @license lucide-react v0.344.0 - ISC
|
|
375
|
-
*
|
|
376
|
-
* This source code is licensed under the ISC license.
|
|
377
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
378
|
-
*/const OD=te("PanelsTopLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]);/**
|
|
379
|
-
* @license lucide-react v0.344.0 - ISC
|
|
380
|
-
*
|
|
381
|
-
* This source code is licensed under the ISC license.
|
|
382
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
383
|
-
*/const Z_=te("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]);/**
|
|
384
|
-
* @license lucide-react v0.344.0 - ISC
|
|
385
|
-
*
|
|
386
|
-
* This source code is licensed under the ISC license.
|
|
387
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
388
|
-
*/const FU=te("PenTool",[["path",{d:"m12 19 7-7 3 3-7 7-3-3z",key:"rklqx2"}],["path",{d:"m18 13-1.5-7.5L2 2l3.5 14.5L13 18l5-5z",key:"1et58u"}],["path",{d:"m2 2 7.586 7.586",key:"etlp93"}],["circle",{cx:"11",cy:"11",r:"2",key:"xmgehs"}]]);/**
|
|
389
|
-
* @license lucide-react v0.344.0 - ISC
|
|
390
|
-
*
|
|
391
|
-
* This source code is licensed under the ISC license.
|
|
392
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
393
|
-
*/const Lr=te("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/**
|
|
394
|
-
* @license lucide-react v0.344.0 - ISC
|
|
395
|
-
*
|
|
396
|
-
* This source code is licensed under the ISC license.
|
|
397
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
398
|
-
*/const Q_=te("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/**
|
|
399
|
-
* @license lucide-react v0.344.0 - ISC
|
|
400
|
-
*
|
|
401
|
-
* This source code is licensed under the ISC license.
|
|
402
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
403
|
-
*/const os=te("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
404
|
-
* @license lucide-react v0.344.0 - ISC
|
|
405
|
-
*
|
|
406
|
-
* This source code is licensed under the ISC license.
|
|
407
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
408
|
-
*/const rg=te("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"}]]);/**
|
|
409
|
-
* @license lucide-react v0.344.0 - ISC
|
|
410
|
-
*
|
|
411
|
-
* This source code is licensed under the ISC license.
|
|
412
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
413
|
-
*/const vm=te("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
414
|
-
* @license lucide-react v0.344.0 - ISC
|
|
415
|
-
*
|
|
416
|
-
* This source code is licensed under the ISC license.
|
|
417
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
418
|
-
*/const Zk=te("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"}]]);/**
|
|
419
|
-
* @license lucide-react v0.344.0 - ISC
|
|
420
|
-
*
|
|
421
|
-
* This source code is licensed under the ISC license.
|
|
422
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
423
|
-
*/const CD=te("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"}]]);/**
|
|
424
|
-
* @license lucide-react v0.344.0 - ISC
|
|
425
|
-
*
|
|
426
|
-
* This source code is licensed under the ISC license.
|
|
427
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
428
|
-
*/const BU=te("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"}]]);/**
|
|
429
|
-
* @license lucide-react v0.344.0 - ISC
|
|
430
|
-
*
|
|
431
|
-
* This source code is licensed under the ISC license.
|
|
432
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
433
|
-
*/const xm=te("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"}]]);/**
|
|
434
|
-
* @license lucide-react v0.344.0 - ISC
|
|
435
|
-
*
|
|
436
|
-
* This source code is licensed under the ISC license.
|
|
437
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
438
|
-
*/const VU=te("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
|
|
439
|
-
* @license lucide-react v0.344.0 - ISC
|
|
440
|
-
*
|
|
441
|
-
* This source code is licensed under the ISC license.
|
|
442
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
443
|
-
*/const UU=te("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
444
|
-
* @license lucide-react v0.344.0 - ISC
|
|
445
|
-
*
|
|
446
|
-
* This source code is licensed under the ISC license.
|
|
447
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
448
|
-
*/const HU=te("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"}]]);/**
|
|
449
|
-
* @license lucide-react v0.344.0 - ISC
|
|
450
|
-
*
|
|
451
|
-
* This source code is licensed under the ISC license.
|
|
452
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
453
|
-
*/const bm=te("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/**
|
|
454
|
-
* @license lucide-react v0.344.0 - ISC
|
|
455
|
-
*
|
|
456
|
-
* This source code is licensed under the ISC license.
|
|
457
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
458
|
-
*/const Qk=te("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
459
|
-
* @license lucide-react v0.344.0 - ISC
|
|
460
|
-
*
|
|
461
|
-
* This source code is licensed under the ISC license.
|
|
462
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
463
|
-
*/const _o=te("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"}]]);/**
|
|
464
|
-
* @license lucide-react v0.344.0 - ISC
|
|
465
|
-
*
|
|
466
|
-
* This source code is licensed under the ISC license.
|
|
467
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
468
|
-
*/const WU=te("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
|
|
469
|
-
* @license lucide-react v0.344.0 - ISC
|
|
470
|
-
*
|
|
471
|
-
* This source code is licensed under the ISC license.
|
|
472
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
473
|
-
*/const gs=te("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/**
|
|
474
|
-
* @license lucide-react v0.344.0 - ISC
|
|
475
|
-
*
|
|
476
|
-
* This source code is licensed under the ISC license.
|
|
477
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
478
|
-
*/const ul=te("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]);/**
|
|
479
|
-
* @license lucide-react v0.344.0 - ISC
|
|
480
|
-
*
|
|
481
|
-
* This source code is licensed under the ISC license.
|
|
482
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
483
|
-
*/const vr=te("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
484
|
-
* @license lucide-react v0.344.0 - ISC
|
|
485
|
-
*
|
|
486
|
-
* This source code is licensed under the ISC license.
|
|
487
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
488
|
-
*/const Ps=te("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
489
|
-
* @license lucide-react v0.344.0 - ISC
|
|
490
|
-
*
|
|
491
|
-
* This source code is licensed under the ISC license.
|
|
492
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
493
|
-
*/const Eo=te("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),Jk=N.createContext({});function eS(e){const t=N.useRef(null);return t.current===null&&(t.current=e()),t.current}const tS=typeof window<"u",TD=tS?N.useLayoutEffect:N.useEffect,ng=N.createContext(null);function rS(e,t){e.indexOf(t)===-1&&e.push(t)}function nS(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}const si=(e,t,r)=>r>t?t:r<e?e:r;let aS=()=>{};const oi={},MD=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function $D(e){return typeof e=="object"&&e!==null}const RD=e=>/^0[^.\s]+$/u.test(e);function iS(e){let t;return()=>(t===void 0&&(t=e()),t)}const Cn=e=>e,qU=(e,t)=>r=>t(e(r)),Wf=(...e)=>e.reduce(qU),Vd=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n};class sS{constructor(){this.subscriptions=[]}add(t){return rS(this.subscriptions,t),()=>nS(this.subscriptions,t)}notify(t,r,n){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,r,n);else for(let i=0;i<a;i++){const s=this.subscriptions[i];s&&s(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ja=e=>e*1e3,Nn=e=>e/1e3;function DD(e,t){return t?e*(1e3/t):0}const ID=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,GU=1e-7,KU=12;function YU(e,t,r,n,a){let i,s,o=0;do s=t+(r-t)/2,i=ID(s,n,a)-e,i>0?r=s:t=s;while(Math.abs(i)>GU&&++o<KU);return s}function qf(e,t,r,n){if(e===t&&r===n)return Cn;const a=i=>YU(i,0,1,e,r);return i=>i===0||i===1?i:ID(a(i),t,n)}const LD=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zD=e=>t=>1-e(1-t),FD=qf(.33,1.53,.69,.99),oS=zD(FD),BD=LD(oS),VD=e=>(e*=2)<1?.5*oS(e):.5*(2-Math.pow(2,-10*(e-1))),lS=e=>1-Math.sin(Math.acos(e)),UD=zD(lS),HD=LD(lS),XU=qf(.42,0,1,1),ZU=qf(0,0,.58,1),WD=qf(.42,0,.58,1),QU=e=>Array.isArray(e)&&typeof e[0]!="number",qD=e=>Array.isArray(e)&&typeof e[0]=="number",JU={linear:Cn,easeIn:XU,easeInOut:WD,easeOut:ZU,circIn:lS,circInOut:HD,circOut:UD,backIn:oS,backInOut:BD,backOut:FD,anticipate:VD},eH=e=>typeof e=="string",J_=e=>{if(qD(e)){aS(e.length===4);const[t,r,n,a]=e;return qf(t,r,n,a)}else if(eH(e))return JU[e];return e},Th=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function tH(e,t){let r=new Set,n=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(d){s.has(d)&&(u.schedule(d),e()),d(o)}const u={schedule:(d,f=!1,h=!1)=>{const m=h&&a?r:n;return f&&s.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),s.delete(d)},process:d=>{if(o=d,a){i=!0;return}a=!0,[r,n]=[n,r],r.forEach(l),r.clear(),a=!1,i&&(i=!1,u.process(d))}};return u}const rH=40;function GD(e,t){let r=!1,n=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,s=Th.reduce((x,j)=>(x[j]=tH(i),x),{}),{setup:o,read:l,resolveKeyframes:u,preUpdate:d,update:f,preRender:h,render:p,postRender:m}=s,g=()=>{const x=oi.useManualTiming?a.timestamp:performance.now();r=!1,oi.useManualTiming||(a.delta=n?1e3/60:Math.max(Math.min(x-a.timestamp,rH),1)),a.timestamp=x,a.isProcessing=!0,o.process(a),l.process(a),u.process(a),d.process(a),f.process(a),h.process(a),p.process(a),m.process(a),a.isProcessing=!1,r&&t&&(n=!1,e(g))},b=()=>{r=!0,n=!0,a.isProcessing||e(g)};return{schedule:Th.reduce((x,j)=>{const w=s[j];return x[j]=(S,k=!1,_=!1)=>(r||b(),w.schedule(S,k,_)),x},{}),cancel:x=>{for(let j=0;j<Th.length;j++)s[Th[j]].cancel(x)},state:a,steps:s}}const{schedule:Et,cancel:ys,state:mr,steps:Jy}=GD(typeof requestAnimationFrame<"u"?requestAnimationFrame:Cn,!0);let Op;function nH(){Op=void 0}const qr={now:()=>(Op===void 0&&qr.set(mr.isProcessing||oi.useManualTiming?mr.timestamp:performance.now()),Op),set:e=>{Op=e,queueMicrotask(nH)}},KD=e=>t=>typeof t=="string"&&t.startsWith(e),cS=KD("--"),aH=KD("var(--"),uS=e=>aH(e)?iH.test(e.split("/*")[0].trim()):!1,iH=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Lc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ud={...Lc,transform:e=>si(0,1,e)},Mh={...Lc,default:1},fd=e=>Math.round(e*1e5)/1e5,dS=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function sH(e){return e==null}const oH=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fS=(e,t)=>r=>!!(typeof r=="string"&&oH.test(r)&&r.startsWith(e)||t&&!sH(r)&&Object.prototype.hasOwnProperty.call(r,t)),YD=(e,t,r)=>n=>{if(typeof n!="string")return n;const[a,i,s,o]=n.match(dS);return{[e]:parseFloat(a),[t]:parseFloat(i),[r]:parseFloat(s),alpha:o!==void 0?parseFloat(o):1}},lH=e=>si(0,255,e),ev={...Lc,transform:e=>Math.round(lH(e))},to={test:fS("rgb","red"),parse:YD("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+ev.transform(e)+", "+ev.transform(t)+", "+ev.transform(r)+", "+fd(Ud.transform(n))+")"};function cH(e){let t="",r="",n="",a="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),a=e.substring(4,5),t+=t,r+=r,n+=n,a+=a),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:a?parseInt(a,16)/255:1}}const _w={test:fS("#"),parse:cH,transform:to.transform},Gf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ii=Gf("deg"),ka=Gf("%"),_e=Gf("px"),uH=Gf("vh"),dH=Gf("vw"),eE={...ka,parse:e=>ka.parse(e)/100,transform:e=>ka.transform(e*100)},kl={test:fS("hsl","hue"),parse:YD("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+ka.transform(fd(t))+", "+ka.transform(fd(r))+", "+fd(Ud.transform(n))+")"},Gt={test:e=>to.test(e)||_w.test(e)||kl.test(e),parse:e=>to.test(e)?to.parse(e):kl.test(e)?kl.parse(e):_w.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?to.transform(e):kl.transform(e),getAnimatableNone:e=>{const t=Gt.parse(e);return t.alpha=0,Gt.transform(t)}},fH=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function hH(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(dS))==null?void 0:t.length)||0)+(((r=e.match(fH))==null?void 0:r.length)||0)>0}const XD="number",ZD="color",pH="var",mH="var(",tE="${}",gH=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Hd(e){const t=e.toString(),r=[],n={color:[],number:[],var:[]},a=[];let i=0;const o=t.replace(gH,l=>(Gt.test(l)?(n.color.push(i),a.push(ZD),r.push(Gt.parse(l))):l.startsWith(mH)?(n.var.push(i),a.push(pH),r.push(l)):(n.number.push(i),a.push(XD),r.push(parseFloat(l))),++i,tE)).split(tE);return{values:r,split:o,indexes:n,types:a}}function QD(e){return Hd(e).values}function JD(e){const{split:t,types:r}=Hd(e),n=t.length;return a=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],a[s]!==void 0){const o=r[s];o===XD?i+=fd(a[s]):o===ZD?i+=Gt.transform(a[s]):i+=a[s]}return i}}const yH=e=>typeof e=="number"?0:Gt.test(e)?Gt.getAnimatableNone(e):e;function vH(e){const t=QD(e);return JD(e)(t.map(yH))}const vs={test:hH,parse:QD,createTransformer:JD,getAnimatableNone:vH};function tv(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function xH({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let a=0,i=0,s=0;if(!t)a=i=s=r;else{const o=r<.5?r*(1+t):r+t-r*t,l=2*r-o;a=tv(l,o,e+1/3),i=tv(l,o,e),s=tv(l,o,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function wm(e,t){return r=>r>0?t:e}const Ct=(e,t,r)=>e+(t-e)*r,rv=(e,t,r)=>{const n=e*e,a=r*(t*t-n)+n;return a<0?0:Math.sqrt(a)},bH=[_w,to,kl],wH=e=>bH.find(t=>t.test(e));function rE(e){const t=wH(e);if(!t)return!1;let r=t.parse(e);return t===kl&&(r=xH(r)),r}const nE=(e,t)=>{const r=rE(e),n=rE(t);if(!r||!n)return wm(e,t);const a={...r};return i=>(a.red=rv(r.red,n.red,i),a.green=rv(r.green,n.green,i),a.blue=rv(r.blue,n.blue,i),a.alpha=Ct(r.alpha,n.alpha,i),to.transform(a))},Ew=new Set(["none","hidden"]);function jH(e,t){return Ew.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function kH(e,t){return r=>Ct(e,t,r)}function hS(e){return typeof e=="number"?kH:typeof e=="string"?uS(e)?wm:Gt.test(e)?nE:_H:Array.isArray(e)?e5:typeof e=="object"?Gt.test(e)?nE:SH:wm}function e5(e,t){const r=[...e],n=r.length,a=e.map((i,s)=>hS(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)r[s]=a[s](i);return r}}function SH(e,t){const r={...e,...t},n={};for(const a in r)e[a]!==void 0&&t[a]!==void 0&&(n[a]=hS(e[a])(e[a],t[a]));return a=>{for(const i in n)r[i]=n[i](a);return r}}function NH(e,t){const r=[],n={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const i=t.types[a],s=e.indexes[i][n[i]],o=e.values[s]??0;r[a]=o,n[i]++}return r}const _H=(e,t)=>{const r=vs.createTransformer(t),n=Hd(e),a=Hd(t);return n.indexes.var.length===a.indexes.var.length&&n.indexes.color.length===a.indexes.color.length&&n.indexes.number.length>=a.indexes.number.length?Ew.has(e)&&!a.values.length||Ew.has(t)&&!n.values.length?jH(e,t):Wf(e5(NH(n,a),a.values),r):wm(e,t)};function t5(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Ct(e,t,r):hS(e)(e,t)}const EH=e=>{const t=({timestamp:r})=>e(r);return{start:(r=!0)=>Et.update(t,r),stop:()=>ys(t),now:()=>mr.isProcessing?mr.timestamp:qr.now()}},r5=(e,t,r=10)=>{let n="";const a=Math.max(Math.round(t/r),2);for(let i=0;i<a;i++)n+=Math.round(e(i/(a-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`},jm=2e4;function pS(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<jm;)t+=r,n=e.next(t);return t>=jm?1/0:t}function PH(e,t=100,r){const n=r({...e,keyframes:[0,t]}),a=Math.min(pS(n),jm);return{type:"keyframes",ease:i=>n.next(a*i).value/t,duration:Nn(a)}}const AH=5;function n5(e,t,r){const n=Math.max(t-AH,0);return DD(r-e(n),t-n)}const $t={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},nv=.001;function OH({duration:e=$t.duration,bounce:t=$t.bounce,velocity:r=$t.velocity,mass:n=$t.mass}){let a,i,s=1-t;s=si($t.minDamping,$t.maxDamping,s),e=si($t.minDuration,$t.maxDuration,Nn(e)),s<1?(a=u=>{const d=u*s,f=d*e,h=d-r,p=Pw(u,s),m=Math.exp(-f);return nv-h/p*m},i=u=>{const f=u*s*e,h=f*r+r,p=Math.pow(s,2)*Math.pow(u,2)*e,m=Math.exp(-f),g=Pw(Math.pow(u,2),s);return(-a(u)+nv>0?-1:1)*((h-p)*m)/g}):(a=u=>{const d=Math.exp(-u*e),f=(u-r)*e+1;return-nv+d*f},i=u=>{const d=Math.exp(-u*e),f=(r-u)*(e*e);return d*f});const o=5/e,l=TH(a,i,o);if(e=ja(e),isNaN(l))return{stiffness:$t.stiffness,damping:$t.damping,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:s*2*Math.sqrt(n*u),duration:e}}}const CH=12;function TH(e,t,r){let n=r;for(let a=1;a<CH;a++)n=n-e(n)/t(n);return n}function Pw(e,t){return e*Math.sqrt(1-t*t)}const MH=["duration","bounce"],$H=["stiffness","damping","mass"];function aE(e,t){return t.some(r=>e[r]!==void 0)}function RH(e){let t={velocity:$t.velocity,stiffness:$t.stiffness,damping:$t.damping,mass:$t.mass,isResolvedFromDuration:!1,...e};if(!aE(e,$H)&&aE(e,MH))if(e.visualDuration){const r=e.visualDuration,n=2*Math.PI/(r*1.2),a=n*n,i=2*si(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:$t.mass,stiffness:a,damping:i}}else{const r=OH(e);t={...t,...r,mass:$t.mass},t.isResolvedFromDuration=!0}return t}function km(e=$t.visualDuration,t=$t.bounce){const r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:a}=r;const i=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],o={done:!1,value:i},{stiffness:l,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=RH({...r,velocity:-Nn(r.velocity||0)}),m=h||0,g=u/(2*Math.sqrt(l*d)),b=s-i,v=Nn(Math.sqrt(l/d)),y=Math.abs(b)<5;n||(n=y?$t.restSpeed.granular:$t.restSpeed.default),a||(a=y?$t.restDelta.granular:$t.restDelta.default);let x;if(g<1){const w=Pw(v,g);x=S=>{const k=Math.exp(-g*v*S);return s-k*((m+g*v*b)/w*Math.sin(w*S)+b*Math.cos(w*S))}}else if(g===1)x=w=>s-Math.exp(-v*w)*(b+(m+v*b)*w);else{const w=v*Math.sqrt(g*g-1);x=S=>{const k=Math.exp(-g*v*S),_=Math.min(w*S,300);return s-k*((m+g*v*b)*Math.sinh(_)+w*b*Math.cosh(_))/w}}const j={calculatedDuration:p&&f||null,next:w=>{const S=x(w);if(p)o.done=w>=f;else{let k=w===0?m:0;g<1&&(k=w===0?ja(m):n5(x,w,S));const _=Math.abs(k)<=n,E=Math.abs(s-S)<=a;o.done=_&&E}return o.value=o.done?s:S,o},toString:()=>{const w=Math.min(pS(j),jm),S=r5(k=>j.next(w*k).value,w,30);return w+"ms "+S},toTransition:()=>{}};return j}km.applyToOptions=e=>{const t=PH(e,100,km);return e.ease=t.ease,e.duration=ja(t.duration),e.type="keyframes",e};function Aw({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:s,min:o,max:l,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=_=>o!==void 0&&_<o||l!==void 0&&_>l,m=_=>o===void 0?l:l===void 0||Math.abs(o-_)<Math.abs(l-_)?o:l;let g=r*t;const b=f+g,v=s===void 0?b:s(b);v!==b&&(g=v-f);const y=_=>-g*Math.exp(-_/n),x=_=>v+y(_),j=_=>{const E=y(_),A=x(_);h.done=Math.abs(E)<=u,h.value=h.done?v:A};let w,S;const k=_=>{p(h.value)&&(w=_,S=km({keyframes:[h.value,m(h.value)],velocity:n5(x,_,h.value),damping:a,stiffness:i,restDelta:u,restSpeed:d}))};return k(0),{calculatedDuration:null,next:_=>{let E=!1;return!S&&w===void 0&&(E=!0,j(_),k(_)),w!==void 0&&_>=w?S.next(_-w):(!E&&j(_),h)}}}function DH(e,t,r){const n=[],a=r||oi.mix||t5,i=e.length-1;for(let s=0;s<i;s++){let o=a(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Cn:t;o=Wf(l,o)}n.push(o)}return n}function IH(e,t,{clamp:r=!0,ease:n,mixer:a}={}){const i=e.length;if(aS(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=DH(t,n,a),l=o.length,u=d=>{if(s&&d<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=Vd(e[f],e[f+1],d);return o[f](h)};return r?d=>u(si(e[0],e[i-1],d)):u}function LH(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const a=Vd(0,t,n);e.push(Ct(r,1,a))}}function zH(e){const t=[0];return LH(t,e.length-1),t}function FH(e,t){return e.map(r=>r*t)}function BH(e,t){return e.map(()=>t||WD).splice(0,e.length-1)}function hd({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const a=QU(n)?n.map(J_):J_(n),i={done:!1,value:t[0]},s=FH(r&&r.length===t.length?r:zH(t),e),o=IH(s,t,{ease:Array.isArray(a)?a:BH(t,a)});return{calculatedDuration:e,next:l=>(i.value=o(l),i.done=l>=e,i)}}const VH=e=>e!==null;function mS(e,{repeat:t,repeatType:r="loop"},n,a=1){const i=e.filter(VH),o=a<0||t&&r!=="loop"&&t%2===1?0:i.length-1;return!o||n===void 0?i[o]:n}const UH={decay:Aw,inertia:Aw,tween:hd,keyframes:hd,spring:km};function a5(e){typeof e.type=="string"&&(e.type=UH[e.type])}class gS{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}}const HH=e=>e/100;class yS extends gS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var n,a;const{motionValue:r}=this.options;r&&r.updatedAt!==qr.now()&&this.tick(qr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(a=(n=this.options).onStop)==null||a.call(n))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;a5(t);const{type:r=hd,repeat:n=0,repeatDelay:a=0,repeatType:i,velocity:s=0}=t;let{keyframes:o}=t;const l=r||hd;l!==hd&&typeof o[0]!="number"&&(this.mixKeyframes=Wf(HH,t5(o[0],o[1])),o=[0,100]);const u=l({...t,keyframes:o});i==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...o].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=pS(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+a,this.totalDuration=this.resolvedDuration*(n+1)-a,this.generator=u}updateTime(t){const r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){const{generator:n,totalDuration:a,mixKeyframes:i,mirroredGenerator:s,resolvedDuration:o,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);const{delay:u=0,keyframes:d,repeat:f,repeatType:h,repeatDelay:p,type:m,onUpdate:g,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?v<0:v>a;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let x=this.currentTime,j=n;if(f){const _=Math.min(this.currentTime,a)/o;let E=Math.floor(_),A=_%1;!A&&_>=1&&(A=1),A===1&&E--,E=Math.min(E,f+1),!!(E%2)&&(h==="reverse"?(A=1-A,p&&(A-=p/o)):h==="mirror"&&(j=s)),x=si(0,1,A)*o}const w=y?{done:!1,value:d[0]}:j.next(x);i&&(w.value=i(w.value));let{done:S}=w;!y&&l!==null&&(S=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);const k=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&S);return k&&m!==Aw&&(w.value=mS(d,this.options,b,this.speed)),g&&g(w.value),k&&this.finish(),w}then(t,r){return this.finished.then(t,r)}get duration(){return Nn(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Nn(t)}get time(){return Nn(this.currentTime)}set time(t){var r;t=ja(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(r=this.driver)==null||r.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(qr.now());const r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Nn(this.currentTime))}play(){var a,i;if(this.isStopped)return;const{driver:t=EH,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),(i=(a=this.options).onPlay)==null||i.call(a);const n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(qr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,r;this.notifyFinished(),this.teardown(),this.state="finished",(r=(t=this.options).onComplete)==null||r.call(t)}cancel(){var t,r;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(r=(t=this.options).onCancel)==null||r.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var r;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(r=this.driver)==null||r.stop(),t.observe(this)}}function WH(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const ro=e=>e*180/Math.PI,Ow=e=>{const t=ro(Math.atan2(e[1],e[0]));return Cw(t)},qH={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Ow,rotateZ:Ow,skewX:e=>ro(Math.atan(e[1])),skewY:e=>ro(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Cw=e=>(e=e%360,e<0&&(e+=360),e),iE=Ow,sE=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),oE=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),GH={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:sE,scaleY:oE,scale:e=>(sE(e)+oE(e))/2,rotateX:e=>Cw(ro(Math.atan2(e[6],e[5]))),rotateY:e=>Cw(ro(Math.atan2(-e[2],e[0]))),rotateZ:iE,rotate:iE,skewX:e=>ro(Math.atan(e[4])),skewY:e=>ro(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Tw(e){return e.includes("scale")?1:0}function Mw(e,t){if(!e||e==="none")return Tw(t);const r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,a;if(r)n=GH,a=r;else{const o=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=qH,a=o}if(!a)return Tw(t);const i=n[t],s=a[1].split(",").map(YH);return typeof i=="function"?i(s):s[i]}const KH=(e,t)=>{const{transform:r="none"}=getComputedStyle(e);return Mw(r,t)};function YH(e){return parseFloat(e.trim())}const zc=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Fc=new Set(zc),lE=e=>e===Lc||e===_e,XH=new Set(["x","y","z"]),ZH=zc.filter(e=>!XH.has(e));function QH(e){const t=[];return ZH.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}const fo={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Mw(t,"x"),y:(e,{transform:t})=>Mw(t,"y")};fo.translateX=fo.x;fo.translateY=fo.y;const ho=new Set;let $w=!1,Rw=!1,Dw=!1;function i5(){if(Rw){const e=Array.from(ho).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{const a=QH(n);a.length&&(r.set(n,a),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();const a=r.get(n);a&&a.forEach(([i,s])=>{var o;(o=n.getValue(i))==null||o.set(s)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Rw=!1,$w=!1,ho.forEach(e=>e.complete(Dw)),ho.clear()}function s5(){ho.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Rw=!0)})}function JH(){Dw=!0,s5(),i5(),Dw=!1}class vS{constructor(t,r,n,a,i,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=a,this.element=i,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(ho.add(this),$w||($w=!0,Et.read(s5),Et.resolveKeyframes(i5))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:r,element:n,motionValue:a}=this;if(t[0]===null){const i=a==null?void 0:a.get(),s=t[t.length-1];if(i!==void 0)t[0]=i;else if(n&&r){const o=n.readValue(r,s);o!=null&&(t[0]=o)}t[0]===void 0&&(t[0]=s),a&&i===void 0&&a.set(t[0])}WH(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ho.delete(this)}cancel(){this.state==="scheduled"&&(ho.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const eW=e=>e.startsWith("--");function tW(e,t,r){eW(t)?e.style.setProperty(t,r):e.style[t]=r}const rW=iS(()=>window.ScrollTimeline!==void 0),nW={};function aW(e,t){const r=iS(e);return()=>nW[t]??r()}const o5=aW(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ku=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,cE={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ku([0,.65,.55,1]),circOut:Ku([.55,0,1,.45]),backIn:Ku([.31,.01,.66,-.59]),backOut:Ku([.33,1.53,.69,.99])};function l5(e,t){if(e)return typeof e=="function"?o5()?r5(e,t):"ease-out":qD(e)?Ku(e):Array.isArray(e)?e.map(r=>l5(r,t)||cE.easeOut):cE[e]}function iW(e,t,r,{delay:n=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:l}={},u=void 0){const d={[t]:r};l&&(d.offset=l);const f=l5(o,a);Array.isArray(f)&&(d.easing=f);const h={delay:n,duration:a,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"};return u&&(h.pseudoElement=u),e.animate(d,h)}function c5(e){return typeof e=="function"&&"applyToOptions"in e}function sW({type:e,...t}){return c5(e)&&o5()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class oW extends gS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:r,name:n,keyframes:a,pseudoElement:i,allowFlatten:s=!1,finalKeyframe:o,onComplete:l}=t;this.isPseudoElement=!!i,this.allowFlatten=s,this.options=t,aS(typeof t.type!="string");const u=sW(t);this.animation=iW(r,n,a,u,i),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const d=mS(a,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(d):tW(r,n,d),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,r;(r=(t=this.animation).finish)==null||r.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,r;this.isPseudoElement||(r=(t=this.animation).commitStyles)==null||r.call(t)}get duration(){var r,n;const t=((n=(r=this.animation.effect)==null?void 0:r.getComputedTiming)==null?void 0:n.call(r).duration)||0;return Nn(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+Nn(t)}get time(){return Nn(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ja(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){var n;return this.allowFlatten&&((n=this.animation.effect)==null||n.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&rW()?(this.animation.timeline=t,Cn):r(this)}}const u5={anticipate:VD,backInOut:BD,circInOut:HD};function lW(e){return e in u5}function cW(e){typeof e.ease=="string"&&lW(e.ease)&&(e.ease=u5[e.ease])}const uE=10;class uW extends oW{constructor(t){cW(t),a5(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:r,onUpdate:n,onComplete:a,element:i,...s}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}const o=new yS({...s,autoplay:!1}),l=ja(this.finishedTime??this.time);r.setWithVelocity(o.sample(l-uE).value,o.sample(l).value,uE),o.stop()}}const dE=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(vs.test(e)||e==="0")&&!e.startsWith("url("));function dW(e){const t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function fW(e,t,r,n){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],s=dE(a,t),o=dE(i,t);return!s||!o?!1:dW(e)||(r==="spring"||c5(r))&&n}function Iw(e){e.duration=0,e.type="keyframes"}const hW=new Set(["opacity","clipPath","filter","transform"]),pW=iS(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function mW(e){var d;const{motionValue:t,name:r,repeatDelay:n,repeatType:a,damping:i,type:s}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=t.owner.getProps();return pW()&&r&&hW.has(r)&&(r!=="transform"||!u)&&!l&&!n&&a!=="mirror"&&i!==0&&s!=="inertia"}const gW=40;class yW extends gS{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:s="loop",keyframes:o,name:l,motionValue:u,element:d,...f}){var m;super(),this.stop=()=>{var g,b;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=qr.now();const h={autoplay:t,delay:r,type:n,repeat:a,repeatDelay:i,repeatType:s,name:l,motionValue:u,element:d,...f},p=(d==null?void 0:d.KeyframeResolver)||vS;this.keyframeResolver=new p(o,(g,b,v)=>this.onKeyframesResolved(g,b,h,!v),l,u,d),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,r,n,a){this.keyframeResolver=void 0;const{name:i,type:s,velocity:o,delay:l,isHandoff:u,onUpdate:d}=n;this.resolvedAt=qr.now(),fW(t,i,s,o)||((oi.instantAnimations||!l)&&(d==null||d(mS(t,n,r))),t[0]=t[t.length-1],Iw(n),n.repeat=0);const h={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>gW?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!u&&mW(h)?new uW({...h,element:h.motionValue.owner.current}):new yS(h);p.finished.then(()=>this.notifyFinished()).catch(Cn),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),JH()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const vW=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function xW(e){const t=vW.exec(e);if(!t)return[,];const[,r,n,a]=t;return[`--${r??n}`,a]}function d5(e,t,r=1){const[n,a]=xW(e);if(!n)return;const i=window.getComputedStyle(t).getPropertyValue(n);if(i){const s=i.trim();return MD(s)?parseFloat(s):s}return uS(a)?d5(a,t,r+1):a}function xS(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const f5=new Set(["width","height","top","left","right","bottom",...zc]),bW={test:e=>e==="auto",parse:e=>e},h5=e=>t=>t.test(e),p5=[Lc,_e,ka,Ii,dH,uH,bW],fE=e=>p5.find(h5(e));function wW(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||RD(e):!0}const jW=new Set(["brightness","contrast","saturate","opacity"]);function kW(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(dS)||[];if(!n)return e;const a=r.replace(n,"");let i=jW.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+a+")"}const SW=/\b([a-z-]*)\(.*?\)/gu,Lw={...vs,getAnimatableNone:e=>{const t=e.match(SW);return t?t.map(kW).join(" "):e}},hE={...Lc,transform:Math.round},NW={rotate:Ii,rotateX:Ii,rotateY:Ii,rotateZ:Ii,scale:Mh,scaleX:Mh,scaleY:Mh,scaleZ:Mh,skew:Ii,skewX:Ii,skewY:Ii,distance:_e,translateX:_e,translateY:_e,translateZ:_e,x:_e,y:_e,z:_e,perspective:_e,transformPerspective:_e,opacity:Ud,originX:eE,originY:eE,originZ:_e},bS={borderWidth:_e,borderTopWidth:_e,borderRightWidth:_e,borderBottomWidth:_e,borderLeftWidth:_e,borderRadius:_e,radius:_e,borderTopLeftRadius:_e,borderTopRightRadius:_e,borderBottomRightRadius:_e,borderBottomLeftRadius:_e,width:_e,maxWidth:_e,height:_e,maxHeight:_e,top:_e,right:_e,bottom:_e,left:_e,padding:_e,paddingTop:_e,paddingRight:_e,paddingBottom:_e,paddingLeft:_e,margin:_e,marginTop:_e,marginRight:_e,marginBottom:_e,marginLeft:_e,backgroundPositionX:_e,backgroundPositionY:_e,...NW,zIndex:hE,fillOpacity:Ud,strokeOpacity:Ud,numOctaves:hE},_W={...bS,color:Gt,backgroundColor:Gt,outlineColor:Gt,fill:Gt,stroke:Gt,borderColor:Gt,borderTopColor:Gt,borderRightColor:Gt,borderBottomColor:Gt,borderLeftColor:Gt,filter:Lw,WebkitFilter:Lw},m5=e=>_W[e];function g5(e,t){let r=m5(e);return r!==Lw&&(r=vs),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const EW=new Set(["auto","none","0"]);function PW(e,t,r){let n=0,a;for(;n<e.length&&!a;){const i=e[n];typeof i=="string"&&!EW.has(i)&&Hd(i).values.length&&(a=e[n]),n++}if(a&&r)for(const i of t)e[i]=g5(r,a)}class AW extends vS{constructor(t,r,n,a,i){super(t,r,n,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),uS(u))){const d=d5(u,r.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!f5.has(n)||t.length!==2)return;const[a,i]=t,s=fE(a),o=fE(i);if(s!==o)if(lE(s)&&lE(o))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else fo[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:r}=this,n=[];for(let a=0;a<t.length;a++)(t[a]===null||wW(t[a]))&&n.push(a);n.length&&PW(t,n,r)}measureInitialState(){const{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fo[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;const a=r[r.length-1];a!==void 0&&t.getValue(n,a).jump(a,!1)}measureEndState(){var o;const{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const a=t.getValue(r);a&&a.jump(this.measuredOrigin,!1);const i=n.length-1,s=n[i];n[i]=fo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(o=this.removedTransforms)!=null&&o.length&&this.removedTransforms.forEach(([l,u])=>{t.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function OW(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;const a=(r==null?void 0:r[e])??n.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const y5=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function v5(e){return $D(e)&&"offsetHeight"in e}const pE=30,CW=e=>!isNaN(parseFloat(e));class TW{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{var i;const a=qr.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=qr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=CW(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new sS);const n=this.events[t].add(r);return t==="change"?()=>{n(),Et.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=qr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>pE)return 0;const r=Math.min(this.updatedAt-this.prevUpdatedAt,pE);return DD(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,r;(t=this.dependents)==null||t.clear(),(r=this.events.destroy)==null||r.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ic(e,t){return new TW(e,t)}const{schedule:wS}=GD(queueMicrotask,!1),Wn={x:!1,y:!1};function x5(){return Wn.x||Wn.y}function MW(e){return e==="x"||e==="y"?Wn[e]?null:(Wn[e]=!0,()=>{Wn[e]=!1}):Wn.x||Wn.y?null:(Wn.x=Wn.y=!0,()=>{Wn.x=Wn.y=!1})}function b5(e,t){const r=OW(e),n=new AbortController,a={passive:!0,...t,signal:n.signal};return[r,a,()=>n.abort()]}function mE(e){return!(e.pointerType==="touch"||x5())}function $W(e,t,r={}){const[n,a,i]=b5(e,r),s=o=>{if(!mE(o))return;const{target:l}=o,u=t(l,o);if(typeof u!="function"||!l)return;const d=f=>{mE(f)&&(u(f),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,a)};return n.forEach(o=>{o.addEventListener("pointerenter",s,a)}),i}const w5=(e,t)=>t?e===t?!0:w5(e,t.parentElement):!1,jS=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,RW=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function DW(e){return RW.has(e.tagName)||e.tabIndex!==-1}const Cp=new WeakSet;function gE(e){return t=>{t.key==="Enter"&&e(t)}}function av(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const IW=(e,t)=>{const r=e.currentTarget;if(!r)return;const n=gE(()=>{if(Cp.has(r))return;av(r,"down");const a=gE(()=>{av(r,"up")}),i=()=>av(r,"cancel");r.addEventListener("keyup",a,t),r.addEventListener("blur",i,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function yE(e){return jS(e)&&!x5()}function LW(e,t,r={}){const[n,a,i]=b5(e,r),s=o=>{const l=o.currentTarget;if(!yE(o))return;Cp.add(l);const u=t(l,o),d=(p,m)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),Cp.has(l)&&Cp.delete(l),yE(p)&&typeof u=="function"&&u(p,{success:m})},f=p=>{d(p,l===window||l===document||r.useGlobalTarget||w5(l,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,a),window.addEventListener("pointercancel",h,a)};return n.forEach(o=>{(r.useGlobalTarget?window:o).addEventListener("pointerdown",s,a),v5(o)&&(o.addEventListener("focus",u=>IW(u,a)),!DW(o)&&!o.hasAttribute("tabindex")&&(o.tabIndex=0))}),i}function j5(e){return $D(e)&&"ownerSVGElement"in e}function zW(e){return j5(e)&&e.tagName==="svg"}const Er=e=>!!(e&&e.getVelocity),FW=[...p5,Gt,vs],BW=e=>FW.find(h5(e)),kS=N.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function vE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function VW(...e){return t=>{let r=!1;const n=e.map(a=>{const i=vE(a,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<n.length;a++){const i=n[a];typeof i=="function"?i():vE(e[a],null)}}}}function UW(...e){return N.useCallback(VW(...e),e)}class HW extends N.Component{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=r.offsetParent,a=v5(n)&&n.offsetWidth||0,i=this.props.sizeRef.current;i.height=r.offsetHeight||0,i.width=r.offsetWidth||0,i.top=r.offsetTop,i.left=r.offsetLeft,i.right=a-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function WW({children:e,isPresent:t,anchorX:r,root:n}){const a=N.useId(),i=N.useRef(null),s=N.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:o}=N.useContext(kS),l=UW(i,e==null?void 0:e.ref);return N.useInsertionEffect(()=>{const{width:u,height:d,top:f,left:h,right:p}=s.current;if(t||!i.current||!u||!d)return;const m=r==="left"?`left: ${h}`:`right: ${p}`;i.current.dataset.motionPopId=a;const g=document.createElement("style");o&&(g.nonce=o);const b=n??document.head;return b.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
494
|
-
[data-motion-pop-id="${a}"] {
|
|
495
|
-
position: absolute !important;
|
|
496
|
-
width: ${u}px !important;
|
|
497
|
-
height: ${d}px !important;
|
|
498
|
-
${m}px !important;
|
|
499
|
-
top: ${f}px !important;
|
|
500
|
-
}
|
|
501
|
-
`),()=>{b.contains(g)&&b.removeChild(g)}},[t]),c.jsx(HW,{isPresent:t,childRef:i,sizeRef:s,children:N.cloneElement(e,{ref:l})})}const qW=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:a,presenceAffectsLayout:i,mode:s,anchorX:o,root:l})=>{const u=eS(GW),d=N.useId();let f=!0,h=N.useMemo(()=>(f=!1,{id:d,initial:t,isPresent:r,custom:a,onExitComplete:p=>{u.set(p,!0);for(const m of u.values())if(!m)return;n&&n()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,n]);return i&&f&&(h={...h}),N.useMemo(()=>{u.forEach((p,m)=>u.set(m,!1))},[r]),N.useEffect(()=>{!r&&!u.size&&n&&n()},[r]),s==="popLayout"&&(e=c.jsx(WW,{isPresent:r,anchorX:o,root:l,children:e})),c.jsx(ng.Provider,{value:h,children:e})};function GW(){return new Map}function k5(e=!0){const t=N.useContext(ng);if(t===null)return[!0,null];const{isPresent:r,onExitComplete:n,register:a}=t,i=N.useId();N.useEffect(()=>{if(e)return a(i)},[e]);const s=N.useCallback(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,s]:[!0]}const $h=e=>e.key||"";function xE(e){const t=[];return N.Children.forEach(e,r=>{N.isValidElement(r)&&t.push(r)}),t}const xi=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:a=!0,mode:i="sync",propagate:s=!1,anchorX:o="left",root:l})=>{const[u,d]=k5(s),f=N.useMemo(()=>xE(e),[e]),h=s&&!u?[]:f.map($h),p=N.useRef(!0),m=N.useRef(f),g=eS(()=>new Map),[b,v]=N.useState(f),[y,x]=N.useState(f);TD(()=>{p.current=!1,m.current=f;for(let S=0;S<y.length;S++){const k=$h(y[S]);h.includes(k)?g.delete(k):g.get(k)!==!0&&g.set(k,!1)}},[y,h.length,h.join("-")]);const j=[];if(f!==b){let S=[...f];for(let k=0;k<y.length;k++){const _=y[k],E=$h(_);h.includes(E)||(S.splice(k,0,_),j.push(_))}return i==="wait"&&j.length&&(S=j),x(xE(S)),v(f),null}const{forceRender:w}=N.useContext(Jk);return c.jsx(c.Fragment,{children:y.map(S=>{const k=$h(S),_=s&&!u?!1:f===y||h.includes(k),E=()=>{if(g.has(k))g.set(k,!0);else return;let A=!0;g.forEach(C=>{C||(A=!1)}),A&&(w==null||w(),x(m.current),s&&(d==null||d()),n&&n())};return c.jsx(qW,{isPresent:_,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:a,mode:i,root:l,onExitComplete:_?void 0:E,anchorX:o,children:S},k)})})},S5=N.createContext({strict:!1}),bE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},sc={};for(const e in bE)sc[e]={isEnabled:t=>bE[e].some(r=>!!t[r])};function KW(e){for(const t in e)sc[t]={...sc[t],...e[t]}}const YW=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Sm(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||YW.has(e)}let N5=e=>!Sm(e);function XW(e){typeof e=="function"&&(N5=t=>t.startsWith("on")?!Sm(t):e(t))}try{XW(require("@emotion/is-prop-valid").default)}catch{}function ZW(e,t,r){const n={};for(const a in e)a==="values"&&typeof e.values=="object"||(N5(a)||r===!0&&Sm(a)||!t&&!Sm(a)||e.draggable&&a.startsWith("onDrag"))&&(n[a]=e[a]);return n}const ag=N.createContext({});function ig(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Wd(e){return typeof e=="string"||Array.isArray(e)}const SS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],NS=["initial",...SS];function sg(e){return ig(e.animate)||NS.some(t=>Wd(e[t]))}function _5(e){return!!(sg(e)||e.variants)}function QW(e,t){if(sg(e)){const{initial:r,animate:n}=e;return{initial:r===!1||Wd(r)?r:void 0,animate:Wd(n)?n:void 0}}return e.inherit!==!1?t:{}}function JW(e){const{initial:t,animate:r}=QW(e,N.useContext(ag));return N.useMemo(()=>({initial:t,animate:r}),[wE(t),wE(r)])}function wE(e){return Array.isArray(e)?e.join(" "):e}const qd={};function eq(e){for(const t in e)qd[t]=e[t],cS(t)&&(qd[t].isCSSVariable=!0)}function E5(e,{layout:t,layoutId:r}){return Fc.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!qd[e]||e==="opacity")}const tq={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rq=zc.length;function nq(e,t,r){let n="",a=!0;for(let i=0;i<rq;i++){const s=zc[i],o=e[s];if(o===void 0)continue;let l=!0;if(typeof o=="number"?l=o===(s.startsWith("scale")?1:0):l=parseFloat(o)===0,!l||r){const u=y5(o,bS[s]);if(!l){a=!1;const d=tq[s]||s;n+=`${d}(${u}) `}r&&(t[s]=u)}}return n=n.trim(),r?n=r(t,a?"":n):a&&(n="none"),n}function _S(e,t,r){const{style:n,vars:a,transformOrigin:i}=e;let s=!1,o=!1;for(const l in t){const u=t[l];if(Fc.has(l)){s=!0;continue}else if(cS(l)){a[l]=u;continue}else{const d=y5(u,bS[l]);l.startsWith("origin")?(o=!0,i[l]=d):n[l]=d}}if(t.transform||(s||r?n.transform=nq(t,e.transform,r):n.transform&&(n.transform="none")),o){const{originX:l="50%",originY:u="50%",originZ:d=0}=i;n.transformOrigin=`${l} ${u} ${d}`}}const ES=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function P5(e,t,r){for(const n in t)!Er(t[n])&&!E5(n,r)&&(e[n]=t[n])}function aq({transformTemplate:e},t){return N.useMemo(()=>{const r=ES();return _S(r,t,e),Object.assign({},r.vars,r.style)},[t])}function iq(e,t){const r=e.style||{},n={};return P5(n,r,e),Object.assign(n,aq(e,t)),n}function sq(e,t){const r={},n=iq(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}const oq={offset:"stroke-dashoffset",array:"stroke-dasharray"},lq={offset:"strokeDashoffset",array:"strokeDasharray"};function cq(e,t,r=1,n=0,a=!0){e.pathLength=1;const i=a?oq:lq;e[i.offset]=_e.transform(-n);const s=_e.transform(t),o=_e.transform(r);e[i.array]=`${s} ${o}`}function A5(e,{attrX:t,attrY:r,attrScale:n,pathLength:a,pathSpacing:i=1,pathOffset:s=0,...o},l,u,d){if(_S(e,o,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:h}=e;f.transform&&(h.transform=f.transform,delete f.transform),(h.transform||f.transformOrigin)&&(h.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),h.transform&&(h.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete f.transformBox),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),a!==void 0&&cq(f,a,i,s,!1)}const O5=()=>({...ES(),attrs:{}}),C5=e=>typeof e=="string"&&e.toLowerCase()==="svg";function uq(e,t,r,n){const a=N.useMemo(()=>{const i=O5();return A5(i,t,C5(n),e.transformTemplate,e.style),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};P5(i,e.style,e),a.style={...i,...a.style}}return a}const dq=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function PS(e){return typeof e!="string"||e.includes("-")?!1:!!(dq.indexOf(e)>-1||/[A-Z]/u.test(e))}function fq(e,t,r,{latestValues:n},a,i=!1){const o=(PS(e)?uq:sq)(t,n,a,e),l=ZW(t,typeof e=="string",i),u=e!==N.Fragment?{...l,...o,ref:r}:{},{children:d}=t,f=N.useMemo(()=>Er(d)?d.get():d,[d]);return N.createElement(e,{...u,children:f})}function jE(e){const t=[{},{}];return e==null||e.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function AS(e,t,r,n){if(typeof t=="function"){const[a,i]=jE(n);t=t(r!==void 0?r:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=jE(n);t=t(r!==void 0?r:e.custom,a,i)}return t}function Tp(e){return Er(e)?e.get():e}function hq({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,a){return{latestValues:pq(r,n,a,e),renderState:t()}}function pq(e,t,r,n){const a={},i=n(e,{});for(const h in i)a[h]=Tp(i[h]);let{initial:s,animate:o}=e;const l=sg(e),u=_5(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),o===void 0&&(o=t.animate));let d=r?r.initial===!1:!1;d=d||s===!1;const f=d?o:s;if(f&&typeof f!="boolean"&&!ig(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const m=AS(e,h[p]);if(m){const{transitionEnd:g,transition:b,...v}=m;for(const y in v){let x=v[y];if(Array.isArray(x)){const j=d?x.length-1:0;x=x[j]}x!==null&&(a[y]=x)}for(const y in g)a[y]=g[y]}}}return a}const T5=e=>(t,r)=>{const n=N.useContext(ag),a=N.useContext(ng),i=()=>hq(e,t,n,a);return r?i():eS(i)};function OS(e,t,r){var i;const{style:n}=e,a={};for(const s in n)(Er(n[s])||t.style&&Er(t.style[s])||E5(s,e)||((i=r==null?void 0:r.getValue(s))==null?void 0:i.liveStyle)!==void 0)&&(a[s]=n[s]);return a}const mq=T5({scrapeMotionValuesFromProps:OS,createRenderState:ES});function M5(e,t,r){const n=OS(e,t,r);for(const a in e)if(Er(e[a])||Er(t[a])){const i=zc.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;n[i]=e[a]}return n}const gq=T5({scrapeMotionValuesFromProps:M5,createRenderState:O5}),yq=Symbol.for("motionComponentSymbol");function Sl(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function vq(e,t,r){return N.useCallback(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):Sl(r)&&(r.current=n))},[t])}const CS=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),xq="framerAppearId",$5="data-"+CS(xq),R5=N.createContext({});function bq(e,t,r,n,a){var g,b;const{visualElement:i}=N.useContext(ag),s=N.useContext(S5),o=N.useContext(ng),l=N.useContext(kS).reducedMotion,u=N.useRef(null);n=n||s.renderer,!u.current&&n&&(u.current=n(e,{visualState:t,parent:i,props:r,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:l}));const d=u.current,f=N.useContext(R5);d&&!d.projection&&a&&(d.type==="html"||d.type==="svg")&&wq(u.current,r,a,f);const h=N.useRef(!1);N.useInsertionEffect(()=>{d&&h.current&&d.update(r,o)});const p=r[$5],m=N.useRef(!!p&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,p))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,p)));return TD(()=>{d&&(h.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),m.current&&d.animationState&&d.animationState.animateChanges())}),N.useEffect(()=>{d&&(!m.current&&d.animationState&&d.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,p)}),m.current=!1),d.enteringChildren=void 0)}),d}function wq(e,t,r,n){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:D5(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!s||o&&Sl(o),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,crossfade:d,layoutScroll:l,layoutRoot:u})}function D5(e){if(e)return e.options.allowProjection!==!1?e.projection:D5(e.parent)}function iv(e,{forwardMotionProps:t=!1}={},r,n){r&&KW(r);const a=PS(e)?gq:mq;function i(o,l){let u;const d={...N.useContext(kS),...o,layoutId:jq(o)},{isStatic:f}=d,h=JW(o),p=a(o,f);if(!f&&tS){kq();const m=Sq(d);u=m.MeasureLayout,h.visualElement=bq(e,p,d,n,m.ProjectionNode)}return c.jsxs(ag.Provider,{value:h,children:[u&&h.visualElement?c.jsx(u,{visualElement:h.visualElement,...d}):null,fq(e,o,vq(p,h.visualElement,l),p,f,t)]})}i.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const s=N.forwardRef(i);return s[yq]=e,s}function jq({layoutId:e}){const t=N.useContext(Jk).id;return t&&e!==void 0?t+"-"+e:e}function kq(e,t){N.useContext(S5).strict}function Sq(e){const{drag:t,layout:r}=sc;if(!t&&!r)return{};const n={...t,...r};return{MeasureLayout:t!=null&&t.isEnabled(e)||r!=null&&r.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function Nq(e,t){if(typeof Proxy>"u")return iv;const r=new Map,n=(i,s)=>iv(i,s,e,t),a=(i,s)=>n(i,s);return new Proxy(a,{get:(i,s)=>s==="create"?n:(r.has(s)||r.set(s,iv(s,void 0,e,t)),r.get(s))})}function I5({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function _q({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Eq(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function sv(e){return e===void 0||e===1}function zw({scale:e,scaleX:t,scaleY:r}){return!sv(e)||!sv(t)||!sv(r)}function Us(e){return zw(e)||L5(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function L5(e){return kE(e.x)||kE(e.y)}function kE(e){return e&&e!=="0%"}function Nm(e,t,r){const n=e-r,a=t*n;return r+a}function SE(e,t,r,n,a){return a!==void 0&&(e=Nm(e,a,n)),Nm(e,r,n)+t}function Fw(e,t=0,r=1,n,a){e.min=SE(e.min,t,r,n,a),e.max=SE(e.max,t,r,n,a)}function z5(e,{x:t,y:r}){Fw(e.x,t.translate,t.scale,t.originPoint),Fw(e.y,r.translate,r.scale,r.originPoint)}const NE=.999999999999,_E=1.0000000000001;function Pq(e,t,r,n=!1){const a=r.length;if(!a)return;t.x=t.y=1;let i,s;for(let o=0;o<a;o++){i=r[o],s=i.projectionDelta;const{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&_l(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,z5(e,s)),n&&Us(i.latestValues)&&_l(e,i.latestValues))}t.x<_E&&t.x>NE&&(t.x=1),t.y<_E&&t.y>NE&&(t.y=1)}function Nl(e,t){e.min=e.min+t,e.max=e.max+t}function EE(e,t,r,n,a=.5){const i=Ct(e.min,e.max,a);Fw(e,t,r,i,n)}function _l(e,t){EE(e.x,t.x,t.scaleX,t.scale,t.originX),EE(e.y,t.y,t.scaleY,t.scale,t.originY)}function F5(e,t){return I5(Eq(e.getBoundingClientRect(),t))}function Aq(e,t,r){const n=F5(e,r),{scroll:a}=t;return a&&(Nl(n.x,a.offset.x),Nl(n.y,a.offset.y)),n}const PE=()=>({translate:0,scale:1,origin:0,originPoint:0}),El=()=>({x:PE(),y:PE()}),AE=()=>({min:0,max:0}),zt=()=>({x:AE(),y:AE()}),Bw={current:null},B5={current:!1};function Oq(){if(B5.current=!0,!!tS)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Bw.current=e.matches;e.addEventListener("change",t),t()}else Bw.current=!1}const Cq=new WeakMap;function Tq(e,t,r){for(const n in t){const a=t[n],i=r[n];if(Er(a))e.addValue(n,a);else if(Er(i))e.addValue(n,ic(a,{owner:e}));else if(i!==a)if(e.hasValue(n)){const s=e.getValue(n);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{const s=e.getStaticValue(n);e.addValue(n,ic(s!==void 0?s:a,{owner:e}))}}for(const n in r)t[n]===void 0&&e.removeValue(n);return t}const OE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Mq{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:a,blockInitialAnimation:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=vS,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=qr.now();this.renderScheduledAt<h&&(this.renderScheduledAt=h,Et.render(this.render,!1,!0))};const{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=sg(r),this.isVariantNode=_5(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(const h in f){const p=f[h];l[h]!==void 0&&Er(p)&&p.set(l[h])}}mount(t){var r;this.current=t,Cq.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,a)=>this.bindToMotionValue(a,n)),B5.current||Oq(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Bw.current,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),ys(this.notifyUpdate),ys(this.render),this.valueSubscriptions.forEach(r=>r()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const r in this.events)this.events[r].clear();for(const r in this.features){const n=this.features[r];n&&(n.unmount(),n.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=Fc.has(t);n&&this.onBindTransform&&this.onBindTransform();const a=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Et.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{a(),i&&i(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in sc){const r=sc[t];if(!r)continue;const{isEnabled:n,Feature:a}=r;if(!this.features[t]&&a&&n(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):zt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<OE.length;n++){const a=OE[n];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,s=t[i];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=Tq(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){const n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=ic(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(MD(n)||RD(n))?n=parseFloat(n):!BW(n)&&vs.test(r)&&(n=g5(t,r)),this.setBaseTarget(t,Er(n)?n.get():n)),Er(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var i;const{initial:r}=this.props;let n;if(typeof r=="string"||typeof r=="object"){const s=AS(this.props,r,(i=this.presenceContext)==null?void 0:i.custom);s&&(n=s[t])}if(r&&n!==void 0)return n;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Er(a)?a:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new sS),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){wS.render(this.render)}}class V5 extends Mq{constructor(){super(...arguments),this.KeyframeResolver=AW}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Er(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}}function U5(e,{style:t,vars:r},n,a){const i=e.style;let s;for(s in t)i[s]=t[s];a==null||a.applyProjectionStyles(i,n);for(s in r)i.setProperty(s,r[s])}function $q(e){return window.getComputedStyle(e)}class Rq extends V5{constructor(){super(...arguments),this.type="html",this.renderInstance=U5}readValueFromInstance(t,r){var n;if(Fc.has(r))return(n=this.projection)!=null&&n.isProjecting?Tw(r):KH(t,r);{const a=$q(t),i=(cS(r)?a.getPropertyValue(r):a[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return F5(t,r)}build(t,r,n){_S(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return OS(t,r,n)}}const H5=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Dq(e,t,r,n){U5(e,t,void 0,n);for(const a in t.attrs)e.setAttribute(H5.has(a)?a:CS(a),t.attrs[a])}class Iq extends V5{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=zt}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Fc.has(r)){const n=m5(r);return n&&n.default||0}return r=H5.has(r)?r:CS(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return M5(t,r,n)}build(t,r,n){A5(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,a){Dq(t,r,n,a)}mount(t){this.isSVGTag=C5(t.tagName),super.mount(t)}}const Lq=(e,t)=>PS(e)?new Iq(t):new Rq(t,{allowProjection:e!==N.Fragment});function Bl(e,t,r){const n=e.getProps();return AS(n,t,r!==void 0?r:n.custom,e)}const Vw=e=>Array.isArray(e);function zq(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ic(r))}function Fq(e){return Vw(e)?e[e.length-1]||0:e}function Bq(e,t){const r=Bl(e,t);let{transitionEnd:n={},transition:a={},...i}=r||{};i={...i,...n};for(const s in i){const o=Fq(i[s]);zq(e,s,o)}}function Vq(e){return!!(Er(e)&&e.add)}function Uw(e,t){const r=e.getValue("willChange");if(Vq(r))return r.add(t);if(!r&&oi.WillChange){const n=new oi.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function W5(e){return e.props[$5]}const Uq=e=>e!==null;function Hq(e,{repeat:t,repeatType:r="loop"},n){const a=e.filter(Uq),i=t&&r!=="loop"&&t%2===1?0:a.length-1;return a[i]}const Wq={type:"spring",stiffness:500,damping:25,restSpeed:10},qq=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Gq={type:"keyframes",duration:.8},Kq={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yq=(e,{keyframes:t})=>t.length>2?Gq:Fc.has(e)?e.startsWith("scale")?qq(t[1]):Wq:Kq;function Xq({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:a,repeat:i,repeatType:s,repeatDelay:o,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const TS=(e,t,r,n={},a,i)=>s=>{const o=xS(n,e)||{},l=o.delay||n.delay||0;let{elapsed:u=0}=n;u=u-ja(l);const d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...o,delay:-u,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{s(),o.onComplete&&o.onComplete()},name:e,motionValue:t,element:i?void 0:a};Xq(o)||Object.assign(d,Yq(e,d)),d.duration&&(d.duration=ja(d.duration)),d.repeatDelay&&(d.repeatDelay=ja(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Iw(d),d.delay===0&&(f=!0)),(oi.instantAnimations||oi.skipAnimations)&&(f=!0,Iw(d),d.delay=0),d.allowFlatten=!o.type&&!o.ease,f&&!i&&t.get()!==void 0){const h=Hq(d.keyframes,o);if(h!==void 0){Et.update(()=>{d.onUpdate(h),d.onComplete()});return}}return o.isSync?new yS(d):new yW(d)};function Zq({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function q5(e,t,{delay:r=0,transitionOverride:n,type:a}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:s,...o}=t;n&&(i=n);const l=[],u=a&&e.animationState&&e.animationState.getState()[a];for(const d in o){const f=e.getValue(d,e.latestValues[d]??null),h=o[d];if(h===void 0||u&&Zq(u,d))continue;const p={delay:r,...xS(i||{},d)},m=f.get();if(m!==void 0&&!f.isAnimating&&!Array.isArray(h)&&h===m&&!p.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const v=W5(e);if(v){const y=window.MotionHandoffAnimation(v,d,Et);y!==null&&(p.startTime=y,g=!0)}}Uw(e,d),f.start(TS(d,f,h,e.shouldReduceMotion&&f5.has(d)?{type:!1}:p,e,g));const b=f.animation;b&&l.push(b)}return s&&Promise.all(l).then(()=>{Et.update(()=>{s&&Bq(e,s)})}),l}function G5(e,t,r,n=0,a=1){const i=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),s=e.size,o=(s-1)*n;return typeof r=="function"?r(i,s):a===1?i*n:o-i*n}function Hw(e,t,r={}){var l;const n=Bl(e,t,r.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(a=r.transitionOverride);const i=n?()=>Promise.all(q5(e,n,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=a;return Qq(e,t,u,d,f,h,r)}:()=>Promise.resolve(),{when:o}=a;if(o){const[u,d]=o==="beforeChildren"?[i,s]:[s,i];return u().then(()=>d())}else return Promise.all([i(),s(r.delay)])}function Qq(e,t,r=0,n=0,a=0,i=1,s){const o=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),o.push(Hw(l,t,{...s,delay:r+(typeof n=="function"?0:n)+G5(e.variantChildren,l,n,a,i)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}function Jq(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const a=t.map(i=>Hw(e,i,r));n=Promise.all(a)}else if(typeof t=="string")n=Hw(e,t,r);else{const a=typeof t=="function"?Bl(e,t,r.custom):t;n=Promise.all(q5(e,a,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function K5(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}const eG=NS.length;function Y5(e){if(!e)return;if(!e.isControllingVariants){const r=e.parent?Y5(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}const t={};for(let r=0;r<eG;r++){const n=NS[r],a=e.props[n];(Wd(a)||a===!1)&&(t[n]=a)}return t}const tG=[...SS].reverse(),rG=SS.length;function nG(e){return t=>Promise.all(t.map(({animation:r,options:n})=>Jq(e,r,n)))}function aG(e){let t=nG(e),r=CE(),n=!0;const a=l=>(u,d)=>{var h;const f=Bl(e,d,l==="exit"?(h=e.presenceContext)==null?void 0:h.custom:void 0);if(f){const{transition:p,transitionEnd:m,...g}=f;u={...u,...g,...m}}return u};function i(l){t=l(e)}function s(l){const{props:u}=e,d=Y5(e.parent)||{},f=[],h=new Set;let p={},m=1/0;for(let b=0;b<rG;b++){const v=tG[b],y=r[v],x=u[v]!==void 0?u[v]:d[v],j=Wd(x),w=v===l?y.isActive:null;w===!1&&(m=b);let S=x===d[v]&&x!==u[v]&&j;if(S&&n&&e.manuallyAnimateOnMount&&(S=!1),y.protectedKeys={...p},!y.isActive&&w===null||!x&&!y.prevProp||ig(x)||typeof x=="boolean")continue;const k=iG(y.prevProp,x);let _=k||v===l&&y.isActive&&!S&&j||b>m&&j,E=!1;const A=Array.isArray(x)?x:[x];let C=A.reduce(a(v),{});w===!1&&(C={});const{prevResolvedValues:M={}}=y,O={...M,...C},P=L=>{_=!0,h.has(L)&&(E=!0,h.delete(L)),y.needsAnimating[L]=!0;const R=e.getValue(L);R&&(R.liveStyle=!1)};for(const L in O){const R=C[L],$=M[L];if(p.hasOwnProperty(L))continue;let z=!1;Vw(R)&&Vw($)?z=!K5(R,$):z=R!==$,z?R!=null?P(L):h.add(L):R!==void 0&&h.has(L)?P(L):y.protectedKeys[L]=!0}y.prevProp=x,y.prevResolvedValues=C,y.isActive&&(p={...p,...C}),n&&e.blockInitialAnimation&&(_=!1);const D=S&&k;_&&(!D||E)&&f.push(...A.map(L=>{const R={type:v};if(typeof L=="string"&&n&&!D&&e.manuallyAnimateOnMount&&e.parent){const{parent:$}=e,z=Bl($,L);if($.enteringChildren&&z){const{delayChildren:U}=z.transition||{};R.delay=G5($.enteringChildren,e,U)}}return{animation:L,options:R}}))}if(h.size){const b={};if(typeof u.initial!="boolean"){const v=Bl(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(b.transition=v.transition)}h.forEach(v=>{const y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),b[v]=y??null}),f.push({animation:b})}let g=!!f.length;return n&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),n=!1,g?t(f):Promise.resolve()}function o(l,u){var f;if(r[l].isActive===u)return Promise.resolve();(f=e.variantChildren)==null||f.forEach(h=>{var p;return(p=h.animationState)==null?void 0:p.setActive(l,u)}),r[l].isActive=u;const d=s(l);for(const h in r)r[h].protectedKeys={};return d}return{animateChanges:s,setActive:o,setAnimateFunction:i,getState:()=>r,reset:()=>{r=CE()}}}function iG(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!K5(t,e):!1}function zs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function CE(){return{animate:zs(!0),whileInView:zs(),whileHover:zs(),whileTap:zs(),whileDrag:zs(),whileFocus:zs(),exit:zs()}}class As{constructor(t){this.isMounted=!1,this.node=t}update(){}}class sG extends As{constructor(t){super(t),t.animationState||(t.animationState=aG(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ig(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let oG=0;class lG extends As{constructor(){super(...arguments),this.id=oG++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const a=this.node.animationState.setActive("exit",!t);r&&!t&&a.then(()=>{r(this.id)})}mount(){const{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const cG={animation:{Feature:sG},exit:{Feature:lG}};function Gd(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Kf(e){return{point:{x:e.pageX,y:e.pageY}}}const uG=e=>t=>jS(t)&&e(t,Kf(t));function pd(e,t,r,n){return Gd(e,t,uG(r),n)}const X5=1e-4,dG=1-X5,fG=1+X5,Z5=.01,hG=0-Z5,pG=0+Z5;function Mr(e){return e.max-e.min}function mG(e,t,r){return Math.abs(e-t)<=r}function TE(e,t,r,n=.5){e.origin=n,e.originPoint=Ct(t.min,t.max,e.origin),e.scale=Mr(r)/Mr(t),e.translate=Ct(r.min,r.max,e.origin)-e.originPoint,(e.scale>=dG&&e.scale<=fG||isNaN(e.scale))&&(e.scale=1),(e.translate>=hG&&e.translate<=pG||isNaN(e.translate))&&(e.translate=0)}function md(e,t,r,n){TE(e.x,t.x,r.x,n?n.originX:void 0),TE(e.y,t.y,r.y,n?n.originY:void 0)}function ME(e,t,r){e.min=r.min+t.min,e.max=e.min+Mr(t)}function gG(e,t,r){ME(e.x,t.x,r.x),ME(e.y,t.y,r.y)}function $E(e,t,r){e.min=t.min-r.min,e.max=e.min+Mr(t)}function gd(e,t,r){$E(e.x,t.x,r.x),$E(e.y,t.y,r.y)}function bn(e){return[e("x"),e("y")]}const Q5=({current:e})=>e?e.ownerDocument.defaultView:null,RE=(e,t)=>Math.abs(e-t);function yG(e,t){const r=RE(e.x,t.x),n=RE(e.y,t.y);return Math.sqrt(r**2+n**2)}class J5{constructor(t,r,{transformPagePoint:n,contextWindow:a=window,dragSnapToOrigin:i=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=lv(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=yG(h.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;const{point:g}=h,{timestamp:b}=mr;this.history.push({...g,timestamp:b});const{onStart:v,onMove:y}=this.handlers;p||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,h)},this.handlePointerMove=(h,p)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=ov(p,this.transformPagePoint),Et.update(this.updatePoint,!0)},this.handlePointerUp=(h,p)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=lv(h.type==="pointercancel"?this.lastMoveEventInfo:ov(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(h,v),g&&g(h,v)},!jS(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=s,this.contextWindow=a||window;const o=Kf(t),l=ov(o,this.transformPagePoint),{point:u}=l,{timestamp:d}=mr;this.history=[{...u,timestamp:d}];const{onSessionStart:f}=r;f&&f(t,lv(l,this.history)),this.removeListeners=Wf(pd(this.contextWindow,"pointermove",this.handlePointerMove),pd(this.contextWindow,"pointerup",this.handlePointerUp),pd(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ys(this.updatePoint)}}function ov(e,t){return t?{point:t(e.point)}:e}function DE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function lv({point:e},t){return{point:e,delta:DE(e,e4(t)),offset:DE(e,vG(t)),velocity:xG(t,.1)}}function vG(e){return e[0]}function e4(e){return e[e.length-1]}function xG(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null;const a=e4(e);for(;r>=0&&(n=e[r],!(a.timestamp-n.timestamp>ja(t)));)r--;if(!n)return{x:0,y:0};const i=Nn(a.timestamp-n.timestamp);if(i===0)return{x:0,y:0};const s={x:(a.x-n.x)/i,y:(a.y-n.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function bG(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Ct(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Ct(r,e,n.max):Math.min(e,r)),e}function IE(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function wG(e,{top:t,left:r,bottom:n,right:a}){return{x:IE(e.x,r,a),y:IE(e.y,t,n)}}function LE(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function jG(e,t){return{x:LE(e.x,t.x),y:LE(e.y,t.y)}}function kG(e,t){let r=.5;const n=Mr(e),a=Mr(t);return a>n?r=Vd(t.min,t.max-n,e.min):n>a&&(r=Vd(e.min,e.max-a,t.min)),si(0,1,r)}function SG(e,t){const r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}const Ww=.35;function NG(e=Ww){return e===!1?e=0:e===!0&&(e=Ww),{x:zE(e,"left","right"),y:zE(e,"top","bottom")}}function zE(e,t,r){return{min:FE(e,t),max:FE(e,r)}}function FE(e,t){return typeof e=="number"?e:e[t]||0}const _G=new WeakMap;class EG{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=zt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){const{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;const i=f=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Kf(f).point)},s=(f,h)=>{const{drag:p,dragPropagation:m,onDragStart:g}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=MW(p),!this.openDragLock))return;this.latestPointerEvent=f,this.latestPanInfo=h,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),bn(v=>{let y=this.getAxisMotionValue(v).get()||0;if(ka.test(y)){const{projection:x}=this.visualElement;if(x&&x.layout){const j=x.layout.layoutBox[v];j&&(y=Mr(j)*(parseFloat(y)/100))}}this.originPoint[v]=y}),g&&Et.postRender(()=>g(f,h)),Uw(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},o=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h;const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:g,onDrag:b}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:v}=h;if(m&&this.currentDirection===null){this.currentDirection=PG(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),b&&b(f,h)},l=(f,h)=>{this.latestPointerEvent=f,this.latestPanInfo=h,this.stop(f,h),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>bn(f=>{var h;return this.getAnimationState(f)==="paused"&&((h=this.getAxisMotionValue(f).animation)==null?void 0:h.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new J5(t,{onSessionStart:i,onStart:s,onMove:o,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:n,contextWindow:Q5(this.visualElement)})}stop(t,r){const n=t||this.latestPointerEvent,a=r||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!a||!n)return;const{velocity:s}=a;this.startAnimation(s);const{onDragEnd:o}=this.getProps();o&&Et.postRender(()=>o(n,a))}cancel(){this.isDragging=!1;const{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){const{drag:a}=this.getProps();if(!n||!Rh(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=bG(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var i;const{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(i=this.visualElement.projection)==null?void 0:i.layout,a=this.constraints;t&&Sl(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=wG(n.layoutBox,t):this.constraints=!1,this.elastic=NG(r),a!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&bn(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=SG(n.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Sl(t))return!1;const n=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=Aq(n,a.root,this.visualElement.getTransformPagePoint());let s=jG(a.layout.layoutBox,i);if(r){const o=r(_q(s));this.hasMutatedConstraints=!!o,o&&(s=I5(o))}return s}startAnimation(t){const{drag:r,dragMomentum:n,dragElastic:a,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:o}=this.getProps(),l=this.constraints||{},u=bn(d=>{if(!Rh(d,r,this.currentDirection))return;let f=l&&l[d]||{};s&&(f={min:0,max:0});const h=a?200:1e6,p=a?40:1e7,m={type:"inertia",velocity:n?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(o)}startAxisValueAnimation(t,r){const n=this.getAxisMotionValue(t);return Uw(this.visualElement,t),n.start(TS(t,n,0,r,this.visualElement,!1))}stopAnimation(){bn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){bn(t=>{var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)==null?void 0:r.state}getAxisMotionValue(t){const r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),a=n[r];return a||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){bn(r=>{const{drag:n}=this.getProps();if(!Rh(r,n,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(r);if(a&&a.layout){const{min:s,max:o}=a.layout.layoutBox[r];i.set(t[r]-Ct(s,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!Sl(r)||!n||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};bn(s=>{const o=this.getAxisMotionValue(s);if(o&&this.constraints!==!1){const l=o.get();a[s]=kG({min:l,max:l},this.constraints[s])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),bn(s=>{if(!Rh(s,t,null))return;const o=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];o.set(Ct(l,u,a[s]))})}addListeners(){if(!this.visualElement.current)return;_G.set(this.visualElement,this);const t=this.visualElement.current,r=pd(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),n=()=>{const{dragConstraints:l}=this.getProps();Sl(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",n);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Et.read(n);const s=Gd(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(bn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].translate))}),this.visualElement.render())});return()=>{s(),r(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:s=Ww,dragMomentum:o=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:a,dragConstraints:i,dragElastic:s,dragMomentum:o}}}function Rh(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function PG(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}class AG extends As{constructor(t){super(t),this.removeGroupControls=Cn,this.removeListeners=Cn,this.controls=new EG(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Cn}unmount(){this.removeGroupControls(),this.removeListeners()}}const BE=e=>(t,r)=>{e&&Et.postRender(()=>e(t,r))};class OG extends As{constructor(){super(...arguments),this.removePointerDownListener=Cn}onPointerDown(t){this.session=new J5(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Q5(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:a}=this.node.getProps();return{onSessionStart:BE(t),onStart:BE(r),onMove:n,onEnd:(i,s)=>{delete this.session,a&&Et.postRender(()=>a(i,s))}}}mount(){this.removePointerDownListener=pd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Mp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function VE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const wu={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(_e.test(e))e=parseFloat(e);else return e;const r=VE(e,t.target.x),n=VE(e,t.target.y);return`${r}% ${n}%`}},CG={correct:(e,{treeScale:t,projectionDelta:r})=>{const n=e,a=vs.parse(e);if(a.length>5)return n;const i=vs.createTransformer(e),s=typeof a[0]!="number"?1:0,o=r.x.scale*t.x,l=r.y.scale*t.y;a[0+s]/=o,a[1+s]/=l;const u=Ct(o,l,.5);return typeof a[2+s]=="number"&&(a[2+s]/=u),typeof a[3+s]=="number"&&(a[3+s]/=u),i(a)}};let cv=!1;class TG extends N.Component{componentDidMount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:a}=this.props,{projection:i}=t;eq(MG),i&&(r.group&&r.group.add(i),n&&n.register&&a&&n.register(i),cv&&i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Mp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:r,visualElement:n,drag:a,isPresent:i}=this.props,{projection:s}=n;return s&&(s.isPresent=i,cv=!0,a||t.layoutDependency!==r||r===void 0||t.isPresent!==i?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||Et.postRender(()=>{const o=s.getStack();(!o||!o.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),wS.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:a}=t;cv=!0,a&&(a.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(a),n&&n.deregister&&n.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function t4(e){const[t,r]=k5(),n=N.useContext(Jk);return c.jsx(TG,{...e,layoutGroup:n,switchLayoutGroup:N.useContext(R5),isPresent:t,safeToRemove:r})}const MG={borderRadius:{...wu,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wu,borderTopRightRadius:wu,borderBottomLeftRadius:wu,borderBottomRightRadius:wu,boxShadow:CG};function $G(e,t,r){const n=Er(e)?e:ic(e);return n.start(TS("",n,t,r)),n.animation}const RG=(e,t)=>e.depth-t.depth;class DG{constructor(){this.children=[],this.isDirty=!1}add(t){rS(this.children,t),this.isDirty=!0}remove(t){nS(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(RG),this.isDirty=!1,this.children.forEach(t)}}function IG(e,t){const r=qr.now(),n=({timestamp:a})=>{const i=a-r;i>=t&&(ys(n),e(i-t))};return Et.setup(n,!0),()=>ys(n)}const r4=["TopLeft","TopRight","BottomLeft","BottomRight"],LG=r4.length,UE=e=>typeof e=="string"?parseFloat(e):e,HE=e=>typeof e=="number"||_e.test(e);function zG(e,t,r,n,a,i){a?(e.opacity=Ct(0,r.opacity??1,FG(n)),e.opacityExit=Ct(t.opacity??1,0,BG(n))):i&&(e.opacity=Ct(t.opacity??1,r.opacity??1,n));for(let s=0;s<LG;s++){const o=`border${r4[s]}Radius`;let l=WE(t,o),u=WE(r,o);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||HE(l)===HE(u)?(e[o]=Math.max(Ct(UE(l),UE(u),n),0),(ka.test(u)||ka.test(l))&&(e[o]+="%")):e[o]=u}(t.rotate||r.rotate)&&(e.rotate=Ct(t.rotate||0,r.rotate||0,n))}function WE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const FG=n4(0,.5,UD),BG=n4(.5,.95,Cn);function n4(e,t,r){return n=>n<e?0:n>t?1:r(Vd(e,t,n))}function qE(e,t){e.min=t.min,e.max=t.max}function mn(e,t){qE(e.x,t.x),qE(e.y,t.y)}function GE(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function KE(e,t,r,n,a){return e-=t,e=Nm(e,1/r,n),a!==void 0&&(e=Nm(e,1/a,n)),e}function VG(e,t=0,r=1,n=.5,a,i=e,s=e){if(ka.test(t)&&(t=parseFloat(t),t=Ct(s.min,s.max,t/100)-s.min),typeof t!="number")return;let o=Ct(i.min,i.max,n);e===i&&(o-=t),e.min=KE(e.min,t,r,o,a),e.max=KE(e.max,t,r,o,a)}function YE(e,t,[r,n,a],i,s){VG(e,t[r],t[n],t[a],t.scale,i,s)}const UG=["x","scaleX","originX"],HG=["y","scaleY","originY"];function XE(e,t,r,n){YE(e.x,t,UG,r?r.x:void 0,n?n.x:void 0),YE(e.y,t,HG,r?r.y:void 0,n?n.y:void 0)}function ZE(e){return e.translate===0&&e.scale===1}function a4(e){return ZE(e.x)&&ZE(e.y)}function QE(e,t){return e.min===t.min&&e.max===t.max}function WG(e,t){return QE(e.x,t.x)&&QE(e.y,t.y)}function JE(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function i4(e,t){return JE(e.x,t.x)&&JE(e.y,t.y)}function eP(e){return Mr(e.x)/Mr(e.y)}function tP(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class qG{constructor(){this.members=[]}add(t){rS(this.members,t),t.scheduleRender()}remove(t){if(nS(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){const r=this.members.findIndex(a=>t===a);if(r===0)return!1;let n;for(let a=r;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function GG(e,t,r){let n="";const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(r==null?void 0:r.z)||0;if((a||i||s)&&(n=`translate3d(${a}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:m}=r;u&&(n=`perspective(${u}px) ${n}`),d&&(n+=`rotate(${d}deg) `),f&&(n+=`rotateX(${f}deg) `),h&&(n+=`rotateY(${h}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}const o=e.x.scale*t.x,l=e.y.scale*t.y;return(o!==1||l!==1)&&(n+=`scale(${o}, ${l})`),n||"none"}const uv=["","X","Y","Z"],KG=1e3;let YG=0;function dv(e,t,r,n){const{latestValues:a}=t;a[e]&&(r[e]=a[e],t.setStaticValue(e,0),n&&(n[e]=0))}function s4(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const r=W5(t);if(window.MotionHasOptimisedAnimation(r,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Et,!(a||i))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&s4(n)}function o4({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:a}){return class{constructor(s={},o=t==null?void 0:t()){this.id=YG++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(QG),this.nodes.forEach(rK),this.nodes.forEach(nK),this.nodes.forEach(JG)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=o?o.root||o:this,this.path=o?[...o.path,o]:[],this.parent=o,this.depth=o?o.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new DG)}addEventListener(s,o){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new sS),this.eventHandlers.get(s).add(o)}notifyListeners(s,...o){const l=this.eventHandlers.get(s);l&&l.notify(...o)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=j5(s)&&!zW(s),this.instance=s;const{layoutId:o,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||o)&&(this.isLayoutDirty=!0),e){let d,f=0;const h=()=>this.root.updateBlockedByResize=!1;Et.read(()=>{f=window.innerWidth}),e(s,()=>{const p=window.innerWidth;p!==f&&(f=p,this.root.updateBlockedByResize=!0,d&&d(),d=IG(h,250),Mp.hasAnimatedSinceResize&&(Mp.hasAnimatedSinceResize=!1,this.nodes.forEach(aP)))})}o&&this.root.registerSharedNode(o,this),this.options.animate!==!1&&u&&(o||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeLayoutChanged:h,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||u.getDefaultTransition()||lK,{onLayoutAnimationStart:g,onLayoutAnimationComplete:b}=u.getProps(),v=!this.targetLayout||!i4(this.targetLayout,p),y=!f&&h;if(this.options.layoutRoot||this.resumeFrom||y||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const x={...xS(m,"layout"),onPlay:g,onComplete:b};(u.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(d,y)}else f||aP(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ys(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(aK),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&s4(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:o,layout:l}=this.options;if(o===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(rP);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(nP);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(tK),this.nodes.forEach(XG),this.nodes.forEach(ZG)):this.nodes.forEach(nP),this.clearAllSnapshots();const o=qr.now();mr.delta=si(0,1e3/60,o-mr.timestamp),mr.timestamp=o,mr.isProcessing=!0,Jy.update.process(mr),Jy.preRender.process(mr),Jy.render.process(mr),mr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,wS.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(eK),this.sharedNodes.forEach(iK)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Et.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Et.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Mr(this.snapshot.measuredBox.x)&&!Mr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=zt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:o}=this.options;o&&o.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let o=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(o=!1),o&&this.instance){const l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!a)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,o=this.projectionDelta&&!a4(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;s&&this.instance&&(o||Us(this.latestValues)||d)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const o=this.measurePageBox();let l=this.removeElementScroll(o);return s&&(l=this.removeTransform(l)),cK(l),{animationId:this.root.animationId,measuredBox:o,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:s}=this.options;if(!s)return zt();const o=s.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(uK))){const{scroll:d}=this.root;d&&(Nl(o.x,d.offset.x),Nl(o.y,d.offset.y))}return o}removeElementScroll(s){var l;const o=zt();if(mn(o,s),(l=this.scroll)!=null&&l.wasRoot)return o;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&mn(o,s),Nl(o.x,f.offset.x),Nl(o.y,f.offset.y))}return o}applyTransform(s,o=!1){const l=zt();mn(l,s);for(let u=0;u<this.path.length;u++){const d=this.path[u];!o&&d.options.layoutScroll&&d.scroll&&d!==d.root&&_l(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Us(d.latestValues)&&_l(l,d.latestValues)}return Us(this.latestValues)&&_l(l,this.latestValues),l}removeTransform(s){const o=zt();mn(o,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Us(u.latestValues))continue;zw(u.latestValues)&&u.updateSnapshot();const d=zt(),f=u.measurePageBox();mn(d,f),XE(o,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Us(this.latestValues)&&XE(o,this.latestValues),o}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==mr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var h;const o=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=o.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=o.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=o.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==o;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(h=this.parent)!=null&&h.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=mr.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),gd(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),mn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=zt(),this.targetWithTransforms=zt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gG(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):mn(this.target,this.layout.layoutBox),z5(this.target,this.targetDelta)):mn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=zt(),this.relativeTargetOrigin=zt(),gd(this.relativeTargetOrigin,this.target,p.target),mn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||zw(this.parent.latestValues)||L5(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const s=this.getLead(),o=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),o&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===mr.timestamp&&(l=!1),l)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;mn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;Pq(this.layoutCorrected,this.treeScale,this.path,o),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=zt());const{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(GE(this.prevProjectionDelta.x,this.projectionDelta.x),GE(this.prevProjectionDelta.y,this.projectionDelta.y)),md(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==h||!tP(this.projectionDelta.x,this.prevProjectionDelta.x)||!tP(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var o;if((o=this.options.visualElement)==null||o.scheduleRender(),s){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=El(),this.projectionDelta=El(),this.projectionDeltaWithTransform=El()}setAnimationOrigin(s,o=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},f=El();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!o;const h=zt(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=p!==m,b=this.getStack(),v=!b||b.members.length<=1,y=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(oK));this.animationProgress=0;let x;this.mixTargetDelta=j=>{const w=j/1e3;iP(f.x,s.x,w),iP(f.y,s.y,w),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(gd(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sK(this.relativeTarget,this.relativeTargetOrigin,h,w),x&&WG(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=zt()),mn(x,this.relativeTarget)),g&&(this.animationValues=d,zG(d,u,this.latestValues,w,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var o,l,u;this.notifyListeners("animationStart"),(o=this.currentAnimation)==null||o.stop(),(u=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||u.stop(),this.pendingAnimation&&(ys(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Et.update(()=>{Mp.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ic(0)),this.currentAnimation=$G(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),s.onUpdate&&s.onUpdate(d)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KG),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:o,target:l,layout:u,latestValues:d}=s;if(!(!o||!l||!u)){if(this!==s&&this.layout&&u&&l4(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||zt();const f=Mr(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+f;const h=Mr(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+h}mn(o,l),_l(o,d),md(this.projectionDeltaWithTransform,this.layoutCorrected,o,d)}}registerSharedNode(s,o){this.sharedNodes.has(s)||this.sharedNodes.set(s,new qG),this.sharedNodes.get(s).add(o);const u=o.options.initialPromotionConfig;o.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(o):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())==null?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())==null?void 0:o.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:o,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),o&&this.setOptions({transition:o})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let o=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(o=!0),!o)return;const u={};l.z&&dv("z",s,u,this.animationValues);for(let d=0;d<uv.length;d++)dv(`rotate${uv[d]}`,s,u,this.animationValues),dv(`skew${uv[d]}`,s,u,this.animationValues);s.render();for(const d in u)s.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);s.scheduleRender()}applyProjectionStyles(s,o){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Tp(o==null?void 0:o.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Tp(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Us(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let f=GG(this.projectionDeltaWithTransform,this.treeScale,d);l&&(f=l(d,f)),s.transform=f;const{x:h,y:p}=this.projectionDelta;s.transformOrigin=`${h.origin*100}% ${p.origin*100}% 0`,u.animationValues?s.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in qd){if(d[m]===void 0)continue;const{correct:g,applyTo:b,isCSSVariable:v}=qd[m],y=f==="none"?d[m]:g(d[m],u);if(b){const x=b.length;for(let j=0;j<x;j++)s[b[j]]=y}else v?this.options.visualElement.renderState.vars[m]=y:s[m]=y}this.options.layoutId&&(s.pointerEvents=u===this?Tp(o==null?void 0:o.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var o;return(o=s.currentAnimation)==null?void 0:o.stop()}),this.root.nodes.forEach(rP),this.root.sharedNodes.clear()}}}function XG(e){e.updateLayout()}function ZG(e){var r;const t=((r=e.resumeFrom)==null?void 0:r.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:a}=e.layout,{animationType:i}=e.options,s=t.source!==e.layout.source;i==="size"?bn(f=>{const h=s?t.measuredBox[f]:t.layoutBox[f],p=Mr(h);h.min=n[f].min,h.max=h.min+p}):l4(i,t.layoutBox,n)&&bn(f=>{const h=s?t.measuredBox[f]:t.layoutBox[f],p=Mr(n[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const o=El();md(o,n,t.layoutBox);const l=El();s?md(l,e.applyTransform(a,!0),t.measuredBox):md(l,n,t.layoutBox);const u=!a4(o);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const m=zt();gd(m,t.layoutBox,h.layoutBox);const g=zt();gd(g,n,p.layoutBox),i4(m,g)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:l,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function QG(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function JG(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function eK(e){e.clearSnapshot()}function rP(e){e.clearMeasurements()}function nP(e){e.isLayoutDirty=!1}function tK(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function aP(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rK(e){e.resolveTargetDelta()}function nK(e){e.calcProjection()}function aK(e){e.resetSkewAndRotation()}function iK(e){e.removeLeadSnapshot()}function iP(e,t,r){e.translate=Ct(t.translate,0,r),e.scale=Ct(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function sP(e,t,r,n){e.min=Ct(t.min,r.min,n),e.max=Ct(t.max,r.max,n)}function sK(e,t,r,n){sP(e.x,t.x,r.x,n),sP(e.y,t.y,r.y,n)}function oK(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const lK={duration:.45,ease:[.4,0,.1,1]},oP=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),lP=oP("applewebkit/")&&!oP("chrome/")?Math.round:Cn;function cP(e){e.min=lP(e.min),e.max=lP(e.max)}function cK(e){cP(e.x),cP(e.y)}function l4(e,t,r){return e==="position"||e==="preserve-aspect"&&!mG(eP(t),eP(r),.2)}function uK(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const dK=o4({attachResizeListener:(e,t)=>Gd(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),fv={current:void 0},c4=o4({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!fv.current){const e=new dK({});e.mount(window),e.setOptions({layoutScroll:!0}),fv.current=e}return fv.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fK={pan:{Feature:OG},drag:{Feature:AG,ProjectionNode:c4,MeasureLayout:t4}};function uP(e,t,r){const{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");const a="onHover"+r,i=n[a];i&&Et.postRender(()=>i(t,Kf(t)))}class hK extends As{mount(){const{current:t}=this.node;t&&(this.unmount=$W(t,(r,n)=>(uP(this.node,n,"Start"),a=>uP(this.node,a,"End"))))}unmount(){}}class pK extends As{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wf(Gd(this.node.current,"focus",()=>this.onFocus()),Gd(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dP(e,t,r){const{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");const a="onTap"+(r==="End"?"":r),i=n[a];i&&Et.postRender(()=>i(t,Kf(t)))}class mK extends As{mount(){const{current:t}=this.node;t&&(this.unmount=LW(t,(r,n)=>(dP(this.node,n,"Start"),(a,{success:i})=>dP(this.node,a,i?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const qw=new WeakMap,hv=new WeakMap,gK=e=>{const t=qw.get(e.target);t&&t(e)},yK=e=>{e.forEach(gK)};function vK({root:e,...t}){const r=e||document;hv.has(r)||hv.set(r,{});const n=hv.get(r),a=JSON.stringify(t);return n[a]||(n[a]=new IntersectionObserver(yK,{root:e,...t})),n[a]}function xK(e,t,r){const n=vK(t);return qw.set(e,r),n.observe(e),()=>{qw.delete(e),n.unobserve(e)}}const bK={some:0,all:1};class wK extends As{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:a="some",once:i}=t,s={root:r?r.current:void 0,rootMargin:n,threshold:typeof a=="number"?a:bK[a]},o=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(l)};return xK(this.node.current,s,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(jK(t,r))&&this.startObserver()}unmount(){}}function jK({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const kK={inView:{Feature:wK},tap:{Feature:mK},focus:{Feature:pK},hover:{Feature:hK}},SK={layout:{ProjectionNode:c4,MeasureLayout:t4}},NK={...cG,...kK,...fK,...SK},Le=Nq(NK,Lq),u4=N.createContext();function _K({children:e}){const[t,r]=N.useState([]),n=N.useCallback((u,d="info",f=5e3)=>{const h=Date.now()+Math.random();r(p=>[...p,{id:h,message:u,type:d,duration:f}]),f>0&&setTimeout(()=>{a(h)},f)},[]),a=N.useCallback(u=>{r(d=>d.filter(f=>f.id!==u))},[]),i=N.useCallback((u,d)=>n(u,"success",d),[n]),s=N.useCallback((u,d)=>n(u,"error",d),[n]),o=N.useCallback((u,d)=>n(u,"warning",d),[n]),l=N.useCallback((u,d)=>n(u,"info",d),[n]);return c.jsxs(u4.Provider,{value:{success:i,error:s,warning:o,info:l,addToast:n},children:[e,c.jsx(EK,{toasts:t,onRemove:a})]})}function d4(){const e=N.useContext(u4);if(!e)throw new Error("useToast must be used within ToastProvider");return e}function EK({toasts:e,onRemove:t}){return c.jsx("div",{className:"fixed top-4 right-4 z-50 flex flex-col gap-2 pointer-events-none",children:c.jsx(xi,{children:e.map(r=>c.jsx(PK,{toast:r,onRemove:()=>t(r.id)},r.id))})})}function PK({toast:e,onRemove:t}){const{message:r,type:n}=e,a={success:{icon:Vt,bgClass:"bg-emerald-50 dark:bg-emerald-900/20 border-emerald-200 dark:border-emerald-800",iconClass:"text-emerald-600 dark:text-emerald-400",textClass:"text-emerald-900 dark:text-emerald-100"},error:{icon:ai,bgClass:"bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800",iconClass:"text-red-600 dark:text-red-400",textClass:"text-red-900 dark:text-red-100"},warning:{icon:Kk,bgClass:"bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800",iconClass:"text-amber-600 dark:text-amber-400",textClass:"text-amber-900 dark:text-amber-100"},info:{icon:ym,bgClass:"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800",iconClass:"text-blue-600 dark:text-blue-400",textClass:"text-blue-900 dark:text-blue-100"}},{icon:i,bgClass:s,iconClass:o,textClass:l}=a[n]||a.info;return c.jsxs(Le.div,{initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,x:100,scale:.95},transition:{duration:.2},className:`pointer-events-auto ${s} border rounded-lg shadow-lg p-4 pr-12 max-w-md relative`,children:[c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(i,{className:`${o} shrink-0 mt-0.5`,size:20}),c.jsx("p",{className:`${l} text-sm font-medium leading-relaxed`,children:r})]}),c.jsx("button",{onClick:t,className:`absolute top-3 right-3 ${o} hover:opacity-70 transition-opacity`,children:c.jsx(Ps,{size:16})})]})}const AK=[{title:"Workspace",items:[{icon:_D,label:"Dashboard",path:"/"},{icon:CU,label:"Projects",path:"/projects"}]},{title:"Automation",items:[{icon:Lr,label:"Pipelines",path:"/pipelines"},{icon:An,label:"Schedules",path:"/schedules"},{icon:Lr,label:"Runs",path:"/runs"}]},{title:"Insights",items:[{icon:ul,label:"Leaderboard",path:"/leaderboard"},{icon:On,label:"Experiments",path:"/experiments"}]},{title:"Data & Observability",items:[{icon:Ir,label:"Assets",path:"/assets"},{icon:AD,label:"Traces",path:"/traces"},{icon:Be,label:"Observability",path:"/observability"}]}],OK=[{icon:ms,label:"Plugins",path:"/plugins"},{icon:Fl,label:"API Tokens",path:"/tokens"},{icon:CD,label:"Settings",path:"/settings"}];function CK({collapsed:e,setCollapsed:t}){const r=Es();return c.jsxs(Le.aside,{initial:!1,animate:{width:e?80:256},className:"h-screen bg-white dark:bg-slate-800 border-r border-slate-200 dark:border-slate-700 flex flex-col shadow-sm z-20 relative",children:[c.jsxs("div",{className:"p-6 border-b border-slate-100 dark:border-slate-700 flex items-center gap-3 h-[73px]",children:[c.jsx("div",{className:"w-8 h-8 min-w-[32px] bg-primary-600 rounded-lg flex items-center justify-center shadow-lg shadow-primary-500/30",children:c.jsx(Lr,{className:"text-white w-5 h-5"})}),c.jsx(xi,{children:!e&&c.jsx(Le.h1,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},className:"text-xl font-bold text-slate-900 dark:text-white tracking-tight whitespace-nowrap overflow-hidden",children:"flowyml"})})]}),c.jsxs("nav",{className:"flex-1 p-4 space-y-4 overflow-y-auto overflow-x-hidden scrollbar-thin scrollbar-thumb-slate-200 dark:scrollbar-thumb-slate-700",children:[AK.map(n=>c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:`px-4 text-xs font-semibold text-slate-400 dark:text-slate-500 uppercase tracking-wider transition-opacity duration-200 ${e?"opacity-0 h-0":"opacity-100"}`,children:n.title}),n.items.map(a=>c.jsx(fP,{to:a.path,icon:a.icon,label:a.label,collapsed:e,isActive:r.pathname===a.path},a.path))]},n.title)),c.jsx("div",{className:`px-4 py-2 text-xs font-semibold text-slate-400 dark:text-slate-500 uppercase tracking-wider mt-2 transition-opacity duration-200 ${e?"opacity-0 h-0":"opacity-100"}`,children:"Settings"}),OK.map(n=>c.jsx(fP,{to:n.path,icon:n.icon,label:n.label,collapsed:e,isActive:r.pathname===n.path},n.path))]}),c.jsx("div",{className:"p-4 border-t border-slate-100 dark:border-slate-700",children:c.jsx("div",{className:`bg-slate-50 dark:bg-slate-900 rounded-lg p-4 border border-slate-100 dark:border-slate-700 transition-all duration-200 ${e?"p-2 flex justify-center":""}`,children:e?c.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500",title:"Online"}):c.jsxs(c.Fragment,{children:[c.jsx("p",{className:"text-xs font-medium text-slate-500 dark:text-slate-400 whitespace-nowrap",children:"flowyml v1.3.0"}),c.jsx("p",{className:"text-xs text-slate-400 dark:text-slate-500 mt-1 whitespace-nowrap",children:"Local Environment"})]})})}),c.jsx("button",{onClick:()=>t(!e),className:"absolute -right-3 top-20 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-full p-1 shadow-md text-slate-500 hover:text-primary-600 dark:hover:text-primary-400 transition-colors",children:e?c.jsx(No,{size:14}):c.jsx(NU,{size:14})})]})}function fP({to:e,icon:t,label:r,collapsed:n,isActive:a}){return c.jsxs(cU,{to:e,className:`flex items-center gap-3 px-4 py-2.5 rounded-lg transition-all duration-200 group relative ${a?"bg-primary-50 dark:bg-primary-900/20 text-primary-700 dark:text-primary-400 font-medium shadow-sm":"text-slate-600 dark:text-slate-400 hover:bg-slate-50 dark:hover:bg-slate-700 hover:text-slate-900 dark:hover:text-white"}`,title:n?r:void 0,children:[c.jsx("span",{className:`transition-colors flex-shrink-0 ${a?"text-primary-600 dark:text-primary-400":"text-slate-400 group-hover:text-slate-600 dark:group-hover:text-slate-300"}`,children:c.jsx(t,{size:20})}),!n&&c.jsx("span",{className:"text-sm whitespace-nowrap overflow-hidden text-ellipsis",children:r}),n&&a&&c.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-8 bg-primary-600 rounded-r-full"})]})}function TK(){const{selectedProject:e,projects:t,loading:r,selectProject:n,clearProject:a}=vi(),[i,s]=T.useState(!1),o=t.find(l=>l.name===e);return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:()=>s(!i),className:"flex items-center gap-2 px-4 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors min-w-[200px]",children:[e?c.jsxs(c.Fragment,{children:[c.jsx(X_,{size:18,className:"text-primary-600 dark:text-primary-400"}),c.jsxs("div",{className:"flex-1 text-left",children:[c.jsx("div",{className:"text-sm font-medium text-slate-900 dark:text-white",children:(o==null?void 0:o.name)||e}),(o==null?void 0:o.description)&&c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400 truncate max-w-[150px]",children:o.description})]})]}):c.jsxs(c.Fragment,{children:[c.jsx(gm,{size:18,className:"text-slate-400"}),c.jsx("span",{className:"flex-1 text-left text-sm font-medium text-slate-700 dark:text-slate-300",children:"All Projects"})]}),c.jsx(SD,{size:16,className:`text-slate-400 transition-transform ${i?"rotate-180":""}`})]}),c.jsx(xi,{children:i&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>s(!1)}),c.jsxs(Le.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.15},className:"absolute top-full mt-2 left-0 w-full min-w-[280px] bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg shadow-xl z-20 max-h-[400px] overflow-y-auto",children:[c.jsxs("button",{onClick:()=>{a(),s(!1)},className:`w-full flex items-center gap-3 px-4 py-3 hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors ${e?"":"bg-primary-50 dark:bg-primary-900/20"}`,children:[c.jsx(gm,{size:18,className:"text-slate-400"}),c.jsxs("div",{className:"flex-1 text-left",children:[c.jsx("div",{className:"text-sm font-medium text-slate-900 dark:text-white",children:"All Projects"}),c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400",children:"View data from all projects"})]}),!e&&c.jsx("div",{className:"w-2 h-2 rounded-full bg-primary-600"})]}),c.jsx("div",{className:"border-t border-slate-200 dark:border-slate-700"}),r?c.jsx("div",{className:"px-4 py-8 text-center text-slate-500 dark:text-slate-400 text-sm",children:"Loading projects..."}):t.length===0?c.jsx("div",{className:"px-4 py-8 text-center text-slate-500 dark:text-slate-400 text-sm",children:"No projects yet"}):t.map(l=>c.jsxs("button",{onClick:()=>{n(l.name),s(!1)},className:`w-full flex items-center gap-3 px-4 py-3 hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors ${e===l.name?"bg-primary-50 dark:bg-primary-900/20":""}`,children:[c.jsx(X_,{size:18,className:e===l.name?"text-primary-600 dark:text-primary-400":"text-slate-400"}),c.jsxs("div",{className:"flex-1 text-left",children:[c.jsx("div",{className:"text-sm font-medium text-slate-900 dark:text-white",children:l.name}),l.description&&c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400",children:l.description})]}),e===l.name&&c.jsx("div",{className:"w-2 h-2 rounded-full bg-primary-600"})]},l.name))]})]})})]})}let Dh=null;const f4=async()=>{if(Dh)return Dh;try{return Dh=await(await fetch("/api/config")).json(),Dh}catch(e){return console.error("Failed to fetch config:",e),{execution_mode:"local"}}},h4=async()=>{const e=await f4();return e.execution_mode==="remote"&&e.remote_server_url?e.remote_server_url:""},ve=async(e,t={})=>{const r=await h4(),n=e.startsWith("/")?e:`/${e}`,a=`${r}${n}`;return fetch(a,t)},MK=()=>{const[e,t]=N.useState(null),[r,n]=N.useState(!0);return N.useEffect(()=>{f4().then(a=>{t(a),n(!1)})},[]),{config:e,loading:r}};function $K(){const{theme:e,toggleTheme:t}=pU(),r=Es(),{config:n,loading:a}=MK(),i=r.pathname.split("/").filter(l=>l),s=!a&&(n==null?void 0:n.execution_mode)==="remote",o=s&&Array.isArray(n==null?void 0:n.remote_services)?n.remote_services:[];return c.jsxs("header",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 px-6 py-4 flex items-center justify-between shadow-sm z-10",children:[c.jsx("div",{className:"flex items-center gap-4 flex-1",children:c.jsxs("nav",{className:"flex items-center text-sm text-slate-500 dark:text-slate-400",children:[c.jsx(rt,{to:"/",className:"hover:text-primary-600 dark:hover:text-primary-400 transition-colors",children:c.jsx($U,{size:16})}),i.length>0&&c.jsx(No,{size:14,className:"mx-2 text-slate-300 dark:text-slate-600"}),i.map((l,u)=>{const d=`/${i.slice(0,u+1).join("/")}`,f=u===i.length-1,h=l.charAt(0).toUpperCase()+l.slice(1).replace(/-/g," ");return c.jsxs(T.Fragment,{children:[f?c.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:h}):c.jsx(rt,{to:d,className:"hover:text-primary-600 dark:hover:text-primary-400 transition-colors",children:h}),!f&&c.jsx(No,{size:14,className:"mx-2 text-slate-300 dark:text-slate-600"})]},l)})]})}),c.jsxs("div",{className:"flex items-center gap-4",children:[s&&c.jsxs("div",{className:"flex flex-col gap-2 px-4 py-2 rounded-xl bg-primary-50 text-primary-800 border border-primary-100 dark:bg-primary-900/20 dark:text-primary-200 dark:border-primary-900/40",children:[c.jsxs("div",{className:"flex items-center gap-2 text-xs uppercase tracking-wide font-semibold",children:[c.jsx(Zk,{size:14})," Remote Stack"]}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(n==null?void 0:n.remote_ui_url)&&c.jsxs("a",{href:n.remote_ui_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs font-medium bg-white/70 dark:bg-slate-800/40 px-2 py-1 rounded-lg hover:underline",children:["UI ",c.jsx(dd,{size:12})]}),(n==null?void 0:n.remote_server_url)&&c.jsxs("a",{href:n.remote_server_url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs font-medium bg-white/70 dark:bg-slate-800/40 px-2 py-1 rounded-lg hover:underline",children:["API ",c.jsx(dd,{size:12})]}),o.map((l,u)=>c.jsxs("a",{href:(l==null?void 0:l.url)||(l==null?void 0:l.link),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs font-medium bg-white/70 dark:bg-slate-800/40 px-2 py-1 rounded-lg hover:underline",children:[(l==null?void 0:l.label)||(l==null?void 0:l.name)||"Service"," ",c.jsx(dd,{size:12})]},`${(l==null?void 0:l.name)||(l==null?void 0:l.label)||"service"}-${u}`))]})]}),c.jsx(TK,{}),c.jsx("div",{className:"h-6 w-px bg-slate-200 dark:bg-slate-700 mx-2"}),c.jsx("button",{onClick:t,className:"p-2 rounded-lg hover:bg-slate-100 dark:hover:bg-slate-700 transition-colors text-slate-500 hover:text-primary-600 dark:text-slate-400 dark:hover:text-primary-400","aria-label":"Toggle theme",children:e==="dark"?c.jsx(UU,{size:20}):c.jsx(zU,{size:20})})]})]})}function p4(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=p4(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Ke(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=p4(e))&&(n&&(n+=" "),n+=t);return n}const MS="-",RK=e=>{const t=IK(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{const o=s.split(MS);return o[0]===""&&o.length!==1&&o.shift(),m4(o,t)||DK(s)},getConflictingClassGroupIds:(s,o)=>{const l=r[s]||[];return o&&n[s]?[...l,...n[s]]:l}}},m4=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?m4(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(MS);return(s=t.validators.find(({validator:o})=>o(i)))==null?void 0:s.classGroupId},hP=/^\[(.+)\]$/,DK=e=>{if(hP.test(e)){const t=hP.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},IK=e=>{const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return zK(Object.entries(e.classGroups),r).forEach(([i,s])=>{Gw(s,n,i,t)}),n},Gw=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:pP(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(LK(a)){Gw(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,s])=>{Gw(s,pP(t,i),r,n)})})},pP=(e,t)=>{let r=e;return t.split(MS).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},LK=e=>e.isThemeGetter,zK=(e,t)=>t?e.map(([r,n])=>{const a=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,o])=>[t+s,o])):i);return[r,a]}):e,FK=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return a(i,s),s},set(i,s){r.has(i)?r.set(i,s):a(i,s)}}},g4="!",BK=e=>{const{separator:t,experimentalParseClassName:r}=e,n=t.length===1,a=t[0],i=t.length,s=o=>{const l=[];let u=0,d=0,f;for(let b=0;b<o.length;b++){let v=o[b];if(u===0){if(v===a&&(n||o.slice(b,b+i)===t)){l.push(o.slice(d,b)),d=b+i;continue}if(v==="/"){f=b;continue}}v==="["?u++:v==="]"&&u--}const h=l.length===0?o:o.substring(d),p=h.startsWith(g4),m=p?h.substring(1):h,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}};return r?o=>r({className:o,parseClassName:s}):s},VK=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},UK=e=>({cache:FK(e.cacheSize),parseClassName:BK(e),...RK(e)}),HK=/\s+/,WK=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a}=t,i=[],s=e.trim().split(HK);let o="";for(let l=s.length-1;l>=0;l-=1){const u=s[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=r(u);let m=!!p,g=n(m?h.substring(0,p):h);if(!g){if(!m){o=u+(o.length>0?" "+o:o);continue}if(g=n(h),!g){o=u+(o.length>0?" "+o:o);continue}m=!1}const b=VK(d).join(":"),v=f?b+g4:b,y=v+g;if(i.includes(y))continue;i.push(y);const x=a(g,m);for(let j=0;j<x.length;++j){const w=x[j];i.push(v+w)}o=u+(o.length>0?" "+o:o)}return o};function qK(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=y4(t))&&(n&&(n+=" "),n+=r);return n}const y4=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=y4(e[n]))&&(r&&(r+=" "),r+=t);return r};function GK(e,...t){let r,n,a,i=s;function s(l){const u=t.reduce((d,f)=>f(d),e());return r=UK(u),n=r.cache.get,a=r.cache.set,i=o,o(l)}function o(l){const u=n(l);if(u)return u;const d=WK(l,r);return a(l,d),d}return function(){return i(qK.apply(null,arguments))}}const yt=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},v4=/^\[(?:([a-z-]+):)?(.+)\]$/i,KK=/^\d+\/\d+$/,YK=new Set(["px","full","screen"]),XK=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ZK=/\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$/,QK=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JK=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eY=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ta=e=>Vl(e)||YK.has(e)||KK.test(e),Ci=e=>Bc(e,"length",lY),Vl=e=>!!e&&!Number.isNaN(Number(e)),pv=e=>Bc(e,"number",Vl),ju=e=>!!e&&Number.isInteger(Number(e)),tY=e=>e.endsWith("%")&&Vl(e.slice(0,-1)),Me=e=>v4.test(e),Ti=e=>XK.test(e),rY=new Set(["length","size","percentage"]),nY=e=>Bc(e,rY,x4),aY=e=>Bc(e,"position",x4),iY=new Set(["image","url"]),sY=e=>Bc(e,iY,uY),oY=e=>Bc(e,"",cY),ku=()=>!0,Bc=(e,t,r)=>{const n=v4.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},lY=e=>ZK.test(e)&&!QK.test(e),x4=()=>!1,cY=e=>JK.test(e),uY=e=>eY.test(e),dY=()=>{const e=yt("colors"),t=yt("spacing"),r=yt("blur"),n=yt("brightness"),a=yt("borderColor"),i=yt("borderRadius"),s=yt("borderSpacing"),o=yt("borderWidth"),l=yt("contrast"),u=yt("grayscale"),d=yt("hueRotate"),f=yt("invert"),h=yt("gap"),p=yt("gradientColorStops"),m=yt("gradientColorStopPositions"),g=yt("inset"),b=yt("margin"),v=yt("opacity"),y=yt("padding"),x=yt("saturate"),j=yt("scale"),w=yt("sepia"),S=yt("skew"),k=yt("space"),_=yt("translate"),E=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],C=()=>["auto",Me,t],M=()=>[Me,t],O=()=>["",Ta,Ci],P=()=>["auto",Vl,Me],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],I=()=>["solid","dashed","dotted","double","none"],L=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],R=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",Me],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[Vl,Me];return{cacheSize:500,separator:":",theme:{colors:[ku],spacing:[Ta,Ci],blur:["none","",Ti,Me],brightness:U(),borderColor:[e],borderRadius:["none","","full",Ti,Me],borderSpacing:M(),borderWidth:O(),contrast:U(),grayscale:$(),hueRotate:U(),invert:$(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[tY,Ci],inset:C(),margin:C(),opacity:U(),padding:M(),saturate:U(),scale:U(),sepia:$(),skew:U(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Me]}],container:["container"],columns:[{columns:[Ti]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:[...D(),Me]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ju,Me]}],basis:[{basis:C()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Me]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",ju,Me]}],"grid-cols":[{"grid-cols":[ku]}],"col-start-end":[{col:["auto",{span:["full",ju,Me]},Me]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[ku]}],"row-start-end":[{row:["auto",{span:[ju,Me]},Me]}],"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",Me]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Me]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...R()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...R(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...R(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],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":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Me,t]}],"min-w":[{"min-w":[Me,t,"min","max","fit"]}],"max-w":[{"max-w":[Me,t,"none","full","min","max","fit","prose",{screen:[Ti]},Ti]}],h:[{h:[Me,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Me,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Me,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Me,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ti,Ci]}],"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:[ku]}],"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",Me]}],"line-clamp":[{"line-clamp":["none",Vl,pv]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ta,Me]}],"list-image":[{"list-image":["none",Me]}],"list-style-type":[{list:["none","disc","decimal",Me]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...I(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ta,Ci]}],"underline-offset":[{"underline-offset":["auto",Ta,Me]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Me]}],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",Me]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),aY]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nY]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},sY]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...I(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:I()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...I()]}],"outline-offset":[{"outline-offset":[Ta,Me]}],"outline-w":[{outline:[Ta,Ci]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Ta,Ci]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ti,oY]}],"shadow-color":[{shadow:[ku]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...L(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":L()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ti,Me]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[w]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Me]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",Me]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",Me]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[ju,Me]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Me]}],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",Me]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Me]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ta,Ci,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"]}}},fY=GK(dY);function Vc(...e){return fY(Ke(e))}const hY={primary:"bg-primary-600 text-white hover:bg-primary-700 shadow-md shadow-primary-500/20",secondary:"bg-white text-slate-900 border border-slate-200 hover:bg-slate-50",ghost:"bg-transparent text-slate-600 hover:bg-slate-100",danger:"bg-rose-600 text-white hover:bg-rose-700 shadow-md shadow-rose-500/20"},pY={sm:"h-8 px-3 text-xs",md:"h-10 px-4 py-2",lg:"h-12 px-8 text-lg",icon:"h-10 w-10"};function ye({className:e,variant:t="primary",size:r="md",children:n,...a}){return c.jsx(Le.button,{whileTap:{scale:.98},className:Vc("inline-flex items-center justify-center rounded-lg font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 disabled:pointer-events-none disabled:opacity-50",hY[t],pY[r],e),...a,children:n})}class b4 extends T.Component{constructor(r){super(r);jy(this,"reportError",async(r,n)=>{if(!this.state.reported)try{await fetch("/api/client/errors",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:r.message||"Unknown error",stack:r.stack,component_stack:n==null?void 0:n.componentStack,url:window.location.href,user_agent:navigator.userAgent})}),this.setState({reported:!0})}catch(a){console.error("Failed to report error:",a)}});jy(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null,reported:!1}),this.props.onReset&&this.props.onReset()});this.state={hasError:!1,error:null,errorInfo:null,reported:!1}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){console.error("Uncaught error:",r,n),this.setState({errorInfo:n}),this.reportError(r,n)}render(){var r;return this.state.hasError?this.props.fallback?this.props.fallback:c.jsx("div",{className:"min-h-[400px] flex items-center justify-center p-6 w-full",children:c.jsxs("div",{className:"max-w-lg w-full bg-white dark:bg-gray-900 rounded-2xl shadow-xl overflow-hidden border border-gray-200 dark:border-gray-800",children:[c.jsx("div",{className:"bg-gradient-to-r from-pink-500 via-red-500 to-yellow-500 h-2"}),c.jsxs("div",{className:"p-8",children:[c.jsx("div",{className:"flex justify-center mb-6",children:c.jsxs("div",{className:"relative",children:[c.jsx("div",{className:"absolute inset-0 bg-red-100 dark:bg-red-900/30 rounded-full animate-ping opacity-75"}),c.jsx("div",{className:"relative p-4 bg-red-50 dark:bg-red-900/20 rounded-full",children:c.jsx(jU,{className:"w-12 h-12 text-red-500 dark:text-red-400"})})]})}),c.jsx("h2",{className:"text-2xl font-bold text-center text-gray-900 dark:text-white mb-2",children:"Well, this is awkward..."}),c.jsx("p",{className:"text-center text-gray-600 dark:text-gray-400 mb-6",children:"The hamsters powering this component decided to take an unscheduled nap. We've dispatched a team of digital veterinarians (aka developers) to wake them up."}),c.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 rounded-lg p-4 mb-6 font-mono text-xs text-left overflow-auto max-h-32 border border-gray-200 dark:border-gray-700",children:[c.jsxs("div",{className:"flex items-center text-red-500 mb-2",children:[c.jsx(Qk,{className:"w-3 h-3 mr-2"}),c.jsx("span",{className:"font-semibold",children:"Error Log"})]}),c.jsx("code",{className:"text-gray-700 dark:text-gray-300 break-all whitespace-pre-wrap",children:((r=this.state.error)==null?void 0:r.message)||"Unknown error"})]}),c.jsxs("div",{className:"flex justify-center gap-4",children:[c.jsx(ye,{onClick:()=>window.location.reload(),variant:"outline",className:"border-gray-300 dark:border-gray-700 hover:bg-gray-100 dark:hover:bg-gray-800",children:"Reload Page"}),c.jsxs(ye,{onClick:this.handleReset,className:"bg-gradient-to-r from-red-500 to-pink-600 hover:from-red-600 hover:to-pink-700 text-white border-0",children:[c.jsx(rg,{className:"w-4 h-4 mr-2"}),"Try Again"]})]})]})]})}):this.props.children}}function mY(){const[e,t]=N.useState(!1);return c.jsxs("div",{className:"flex h-screen bg-slate-50 dark:bg-slate-900 overflow-hidden",children:[c.jsx(CK,{collapsed:e,setCollapsed:t}),c.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[c.jsx($K,{}),c.jsx("main",{className:"flex-1 overflow-y-auto p-6 scrollbar-thin scrollbar-thumb-slate-200 dark:scrollbar-thumb-slate-700",children:c.jsx("div",{className:"max-w-7xl mx-auto w-full",children:c.jsx(b4,{children:c.jsx(BV,{})})})})]})]})}function ze({className:e,children:t,hover:r=!0,...n}){return c.jsx(Le.div,{whileHover:r?{y:-2,boxShadow:"0 10px 30px -10px rgba(0,0,0,0.1)"}:{},transition:{duration:.2},className:Vc("bg-white dark:bg-slate-800 rounded-xl border border-slate-100 dark:border-slate-700 shadow-sm p-6","transition-colors duration-200",e),...n,children:t})}function w4({className:e,children:t,...r}){return c.jsx("div",{className:Vc("flex flex-col space-y-1.5 mb-4",e),...r,children:t})}function j4({className:e,children:t,...r}){return c.jsx("h3",{className:Vc("font-semibold leading-none tracking-tight text-slate-900 dark:text-white",e),...r,children:t})}function Kw({className:e,children:t,...r}){return c.jsx("div",{className:Vc("",e),...r,children:t})}const gY={default:"bg-slate-100 text-slate-800",primary:"bg-primary-50 text-primary-700 border border-primary-100",success:"bg-emerald-50 text-emerald-700 border border-emerald-100",warning:"bg-amber-50 text-amber-700 border border-amber-100",danger:"bg-rose-50 text-rose-700 border border-rose-100",outline:"bg-transparent border border-slate-200 text-slate-600"};function jt({className:e,variant:t="default",children:r,...n}){return c.jsx("span",{className:Vc("inline-flex items-center rounded-md px-2 py-1 text-xs font-medium ring-1 ring-inset ring-black/5",gY[t],e),...n,children:r})}const mP={completed:{icon:Vt,label:"Completed",color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-900/20",border:"border-emerald-200 dark:border-emerald-800"},success:{icon:Vt,label:"Success",color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-900/20",border:"border-emerald-200 dark:border-emerald-800"},failed:{icon:vr,label:"Failed",color:"text-rose-600 dark:text-rose-400",bg:"bg-rose-50 dark:bg-rose-900/20",border:"border-rose-200 dark:border-rose-800"},running:{icon:PD,label:"Running",color:"text-blue-600 dark:text-blue-400",bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800",animate:!0},pending:{icon:ct,label:"Pending",color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-900/20",border:"border-amber-200 dark:border-amber-800"},queued:{icon:ct,label:"Queued",color:"text-slate-600 dark:text-slate-400",bg:"bg-slate-50 dark:bg-slate-900/20",border:"border-slate-200 dark:border-slate-700"},initializing:{icon:Lr,label:"Initializing",color:"text-blue-600 dark:text-blue-400",bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-200 dark:border-blue-800"},cached:{icon:Vt,label:"Cached",color:"text-cyan-600 dark:text-cyan-400",bg:"bg-cyan-50 dark:bg-cyan-900/20",border:"border-cyan-200 dark:border-cyan-800"}};function yY({status:e,size:t="md",showLabel:r=!0,className:n="",iconOnly:a=!1}){const i=mP[e==null?void 0:e.toLowerCase()]||mP.pending,s=i.icon,o={sm:{icon:14,text:"text-xs",padding:"px-2 py-0.5"},md:{icon:16,text:"text-sm",padding:"px-2.5 py-1"},lg:{icon:20,text:"text-base",padding:"px-3 py-1.5"}},{icon:l,text:u,padding:d}=o[t];return a?c.jsx(s,{size:l,className:`${i.color} ${i.animate?"animate-spin":""} ${n}`}):c.jsxs("div",{className:`inline-flex items-center gap-1.5 ${d} rounded-full border ${i.bg} ${i.border} ${n}`,children:[c.jsx(s,{size:l,className:`${i.color} ${i.animate?"animate-spin":""}`}),r&&c.jsx("span",{className:`font-medium ${i.color} ${u}`,children:i.label})]})}function oc({status:e,className:t=""}){return c.jsx(yY,{status:e,size:"sm",className:t})}const k4=6048e5,vY=864e5,gP=Symbol.for("constructDateFrom");function xs(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&gP in e?e[gP](t):e instanceof Date?new e.constructor(t):new Date(t)}function la(e,t){return xs(t||e,e)}let xY={};function og(){return xY}function Kd(e,t){var o,l,u,d;const r=og(),n=(t==null?void 0:t.weekStartsOn)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.weekStartsOn)??r.weekStartsOn??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,a=la(e,t==null?void 0:t.in),i=a.getDay(),s=(i<n?7:0)+i-n;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function _m(e,t){return Kd(e,{...t,weekStartsOn:1})}function S4(e,t){const r=la(e,t==null?void 0:t.in),n=r.getFullYear(),a=xs(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const i=_m(a),s=xs(r,0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);const o=_m(s);return r.getTime()>=i.getTime()?n+1:r.getTime()>=o.getTime()?n:n-1}function yP(e){const t=la(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function bY(e,...t){const r=xs.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function vP(e,t){const r=la(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function wY(e,t,r){const[n,a]=bY(r==null?void 0:r.in,e,t),i=vP(n),s=vP(a),o=+i-yP(i),l=+s-yP(s);return Math.round((o-l)/vY)}function jY(e,t){const r=S4(e,t),n=xs(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),_m(n)}function kY(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function N4(e){return!(!kY(e)&&typeof e!="number"||isNaN(+la(e)))}function SY(e,t){const r=la(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const NY={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},_Y=(e,t,r)=>{let n;const a=NY[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function mv(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const EY={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},PY={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},AY={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},OY={date:mv({formats:EY,defaultWidth:"full"}),time:mv({formats:PY,defaultWidth:"full"}),dateTime:mv({formats:AY,defaultWidth:"full"})},CY={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},TY=(e,t,r,n)=>CY[e];function Su(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):s;a=e.formattingValues[o]||e.formattingValues[s]}else{const s=e.defaultWidth,o=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[o]||e.values[s]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const MY={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},$Y={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},RY={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},DY={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},IY={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},LY={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},zY=(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},FY={ordinalNumber:zY,era:Su({values:MY,defaultWidth:"wide"}),quarter:Su({values:$Y,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Su({values:RY,defaultWidth:"wide"}),day:Su({values:DY,defaultWidth:"wide"}),dayPeriod:Su({values:IY,defaultWidth:"wide",formattingValues:LY,defaultFormattingWidth:"wide"})};function Nu(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const s=i[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?VY(o,f=>f.test(s)):BY(o,f=>f.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(s.length);return{value:u,rest:d}}}function BY(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function VY(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function UY(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],i=t.match(e.parsePattern);if(!i)return null;let s=e.valueCallback?e.valueCallback(i[0]):i[0];s=r.valueCallback?r.valueCallback(s):s;const o=t.slice(a.length);return{value:s,rest:o}}}const HY=/^(\d+)(th|st|nd|rd)?/i,WY=/\d+/i,qY={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},GY={any:[/^b/i,/^(a|c)/i]},KY={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YY={any:[/1/i,/2/i,/3/i,/4/i]},XY={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ZY={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},QY={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},JY={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},eX={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},tX={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rX={ordinalNumber:UY({matchPattern:HY,parsePattern:WY,valueCallback:e=>parseInt(e,10)}),era:Nu({matchPatterns:qY,defaultMatchWidth:"wide",parsePatterns:GY,defaultParseWidth:"any"}),quarter:Nu({matchPatterns:KY,defaultMatchWidth:"wide",parsePatterns:YY,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Nu({matchPatterns:XY,defaultMatchWidth:"wide",parsePatterns:ZY,defaultParseWidth:"any"}),day:Nu({matchPatterns:QY,defaultMatchWidth:"wide",parsePatterns:JY,defaultParseWidth:"any"}),dayPeriod:Nu({matchPatterns:eX,defaultMatchWidth:"any",parsePatterns:tX,defaultParseWidth:"any"})},nX={code:"en-US",formatDistance:_Y,formatLong:OY,formatRelative:TY,localize:FY,match:rX,options:{weekStartsOn:0,firstWeekContainsDate:1}};function aX(e,t){const r=la(e,t==null?void 0:t.in);return wY(r,SY(r))+1}function iX(e,t){const r=la(e,t==null?void 0:t.in),n=+_m(r)-+jY(r);return Math.round(n/k4)+1}function _4(e,t){var d,f,h,p;const r=la(e,t==null?void 0:t.in),n=r.getFullYear(),a=og(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(h=a.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=xs((t==null?void 0:t.in)||e,0);s.setFullYear(n+1,0,i),s.setHours(0,0,0,0);const o=Kd(s,t),l=xs((t==null?void 0:t.in)||e,0);l.setFullYear(n,0,i),l.setHours(0,0,0,0);const u=Kd(l,t);return+r>=+o?n+1:+r>=+u?n:n-1}function sX(e,t){var o,l,u,d;const r=og(),n=(t==null?void 0:t.firstWeekContainsDate)??((l=(o=t==null?void 0:t.locale)==null?void 0:o.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((d=(u=r.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,a=_4(e,t),i=xs((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),Kd(i,t)}function oX(e,t){const r=la(e,t==null?void 0:t.in),n=+Kd(r,t)-+sX(r,t);return Math.round(n/k4)+1}function nt(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const Mi={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return nt(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):nt(r+1,2)},d(e,t){return nt(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return nt(e.getHours()%12||12,t.length)},H(e,t){return nt(e.getHours(),t.length)},m(e,t){return nt(e.getMinutes(),t.length)},s(e,t){return nt(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return nt(a,t.length)}},el={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xP={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return Mi.y(e,t)},Y:function(e,t,r,n){const a=_4(e,n),i=a>0?a:1-a;if(t==="YY"){const s=i%100;return nt(s,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):nt(i,t.length)},R:function(e,t){const r=S4(e);return nt(r,t.length)},u:function(e,t){const r=e.getFullYear();return nt(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return nt(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return nt(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return Mi.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return nt(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=oX(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):nt(a,t.length)},I:function(e,t,r){const n=iX(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):nt(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Mi.d(e,t)},D:function(e,t,r){const n=aX(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):nt(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return nt(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return nt(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return nt(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=el.noon:n===0?a=el.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=el.evening:n>=12?a=el.afternoon:n>=4?a=el.morning:a=el.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Mi.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Mi.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):nt(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):nt(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Mi.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Mi.s(e,t)},S:function(e,t){return Mi.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return wP(n);case"XXXX":case"XX":return Hs(n);case"XXXXX":case"XXX":default:return Hs(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return wP(n);case"xxxx":case"xx":return Hs(n);case"xxxxx":case"xxx":default:return Hs(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+bP(n,":");case"OOOO":default:return"GMT"+Hs(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+bP(n,":");case"zzzz":default:return"GMT"+Hs(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return nt(n,t.length)},T:function(e,t,r){return nt(+e,t.length)}};function bP(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return i===0?r+String(a):r+String(a)+t+nt(i,2)}function wP(e,t){return e%60===0?(e>0?"-":"+")+nt(Math.abs(e)/60,2):Hs(e,t)}function Hs(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=nt(Math.trunc(n/60),2),i=nt(n%60,2);return r+a+t+i}const jP=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},E4=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},lX=(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return jP(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",jP(n,t)).replace("{{time}}",E4(a,t))},cX={p:E4,P:lX},uX=/^D+$/,dX=/^Y+$/,fX=["D","DD","YY","YYYY"];function hX(e){return uX.test(e)}function pX(e){return dX.test(e)}function mX(e,t,r){const n=gX(e,t,r);if(console.warn(n),fX.includes(e))throw new RangeError(n)}function gX(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const yX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xX=/^'([^]*?)'?$/,bX=/''/g,wX=/[a-zA-Z]/;function pt(e,t,r){var d,f,h,p;const n=og(),a=n.locale??nX,i=n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,s=n.weekStartsOn??((p=(h=n.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,o=la(e,r==null?void 0:r.in);if(!N4(o))throw new RangeError("Invalid time value");let l=t.match(vX).map(m=>{const g=m[0];if(g==="p"||g==="P"){const b=cX[g];return b(m,a.formatLong)}return m}).join("").match(yX).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const g=m[0];if(g==="'")return{isToken:!1,value:jX(m)};if(xP[g])return{isToken:!0,value:m};if(g.match(wX))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(l=a.localize.preprocessor(o,l));const u={firstWeekContainsDate:i,weekStartsOn:s,locale:a};return l.map(m=>{if(!m.isToken)return m.value;const g=m.value;(pX(g)||hX(g))&&mX(g,t,String(e));const b=xP[g[0]];return b(o,g,a.localize,u)}).join("")}function jX(e){const t=e.match(xX);return t?t[1].replace(bX,"'"):e}function kX(){const[e,t]=N.useState(null),[r,n]=N.useState([]),[a,i]=N.useState(!0),[s,o]=N.useState(null),{selectedProject:l}=vi(),u=d4();if(N.useEffect(()=>{(async()=>{i(!0),o(null);try{const p=l?`/api/stats?project=${encodeURIComponent(l)}`:"/api/stats",m=l?`/api/runs/?limit=5&project=${encodeURIComponent(l)}`:"/api/runs/?limit=5",[g,b]=await Promise.all([ve(p),ve(m)]);if(!g.ok)throw new Error(`Failed to fetch stats: ${g.statusText}`);if(!b.ok)throw new Error(`Failed to fetch runs: ${b.statusText}`);const v=await g.json(),y=await b.json();t(v),n(y.runs||[])}catch(p){console.error(p),o(p.message),u.error(`Failed to load dashboard: ${p.message}`)}finally{i(!1)}})()},[l]),a)return c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(s)return c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsxs("div",{className:"text-center p-8 bg-red-50 dark:bg-red-900/20 rounded-2xl border border-red-100 dark:border-red-800 max-w-md",children:[c.jsx(vr,{className:"w-12 h-12 text-red-500 mx-auto mb-4"}),c.jsx("h3",{className:"text-lg font-bold text-red-700 dark:text-red-300 mb-2",children:"Failed to load dashboard"}),c.jsx("p",{className:"text-red-600 dark:text-red-400 mb-6",children:s}),c.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg shadow-sm hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors text-slate-700 dark:text-slate-300 font-medium",children:"Retry Connection"})]})});const d={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},f={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return c.jsxs(Le.div,{initial:"hidden",animate:"show",variants:d,className:"space-y-8",children:[c.jsxs(Le.div,{variants:f,className:"relative overflow-hidden bg-gradient-to-br from-primary-500 via-primary-600 to-purple-600 rounded-2xl p-8 text-white shadow-xl",children:[c.jsx("div",{className:"absolute top-0 right-0 w-64 h-64 bg-white/10 rounded-full -mr-32 -mt-32"}),c.jsx("div",{className:"absolute bottom-0 left-0 w-48 h-48 bg-white/10 rounded-full -ml-24 -mb-24"}),c.jsxs("div",{className:"relative z-10",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[c.jsx(Eo,{size:32,className:"text-yellow-300"}),c.jsx("h1",{className:"text-4xl font-bold",children:"Welcome to flowyml"})]}),c.jsx("p",{className:"text-primary-100 text-lg max-w-2xl",children:"Your lightweight, artifact-centric ML orchestration platform. Build, run, and track your ML pipelines with ease."}),c.jsxs("div",{className:"mt-6 flex gap-3",children:[c.jsx(rt,{to:"/pipelines",children:c.jsx("button",{className:"px-6 py-2.5 bg-white text-primary-600 rounded-lg font-semibold hover:bg-primary-50 transition-colors shadow-lg",children:"View Pipelines"})}),c.jsx(rt,{to:"/runs",children:c.jsx("button",{className:"px-6 py-2.5 bg-primary-700/50 backdrop-blur-sm text-white rounded-lg font-semibold hover:bg-primary-700/70 transition-colors border border-white/20",children:"Recent Runs"})})]})]})]}),c.jsxs(Le.div,{variants:f,className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[c.jsx(Ih,{icon:c.jsx(oa,{size:24}),label:"Total Pipelines",value:(e==null?void 0:e.pipelines)||0,trend:"+12%",color:"blue"}),c.jsx(Ih,{icon:c.jsx(Be,{size:24}),label:"Pipeline Runs",value:(e==null?void 0:e.runs)||0,trend:"+23%",color:"purple"}),c.jsx(Ih,{icon:c.jsx(Ir,{size:24}),label:"Artifacts",value:(e==null?void 0:e.artifacts)||0,trend:"+8%",color:"emerald"}),c.jsx(Ih,{icon:c.jsx(Vt,{size:24}),label:"Success Rate",value:(e==null?void 0:e.runs)>0?`${Math.round(e.completed_runs/e.runs*100)}%`:"0%",trend:"+5%",color:"cyan"})]}),c.jsxs(Le.div,{variants:f,className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[c.jsxs("div",{className:"lg:col-span-2",children:[c.jsxs("div",{className:"flex items-center justify-between mb-6",children:[c.jsxs("h3",{className:"text-xl font-bold text-slate-900 flex items-center gap-2",children:[c.jsx(ct,{className:"text-primary-500",size:24}),"Recent Runs"]}),c.jsxs(rt,{to:"/runs",className:"text-sm font-semibold text-primary-600 hover:text-primary-700 flex items-center gap-1",children:["View All ",c.jsx(ii,{size:16})]})]}),c.jsx("div",{className:"space-y-3",children:r.length>0?r.map((h,p)=>c.jsx(SX,{run:h,index:p},h.run_id)):c.jsxs(ze,{className:"p-12 text-center border-dashed",children:[c.jsx(Be,{className:"mx-auto text-slate-300 mb-3",size:32}),c.jsx("p",{className:"text-slate-500",children:"No recent runs"})]})})]}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-xl font-bold text-slate-900 mb-6 flex items-center gap-2",children:[c.jsx(gs,{className:"text-primary-500",size:24}),"Quick Stats"]}),c.jsxs("div",{className:"space-y-3",children:[c.jsx(Lh,{label:"Completed Today",value:(e==null?void 0:e.completed_runs)||0,icon:c.jsx(Vt,{size:18}),color:"emerald"}),c.jsx(Lh,{label:"Failed Runs",value:(e==null?void 0:e.failed_runs)||0,icon:c.jsx(vr,{size:18}),color:"rose"}),c.jsx(Lh,{label:"Avg Duration",value:e!=null&&e.avg_duration?`${e.avg_duration.toFixed(1)}s`:"0s",icon:c.jsx(ct,{size:18}),color:"blue"}),c.jsx(Lh,{label:"Cache Hit Rate",value:"87%",icon:c.jsx(Eo,{size:18}),color:"amber"})]})]})]})]})}function Ih({icon:e,label:t,value:r,trend:n,color:a}){const i={blue:"from-blue-500 to-cyan-500",purple:"from-purple-500 to-pink-500",emerald:"from-emerald-500 to-teal-500",cyan:"from-cyan-500 to-blue-500"};return c.jsxs(ze,{className:"relative overflow-hidden group hover:shadow-lg transition-all duration-200",children:[c.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${i[a]} opacity-0 group-hover:opacity-5 transition-opacity`}),c.jsxs("div",{className:"relative",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsx("div",{className:`p-3 rounded-xl bg-gradient-to-br ${i[a]} text-white shadow-lg`,children:e}),c.jsx("span",{className:"text-xs font-semibold text-emerald-600 bg-emerald-50 px-2 py-1 rounded-full",children:n})]}),c.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:t}),c.jsx("p",{className:"text-3xl font-bold text-slate-900",children:r})]})]})}function SX({run:e,index:t}){var a;const r={completed:{icon:c.jsx(Vt,{size:16}),color:"text-emerald-500",bg:"bg-emerald-50"},failed:{icon:c.jsx(vr,{size:16}),color:"text-rose-500",bg:"bg-rose-50"},running:{icon:c.jsx(Be,{size:16,className:"animate-pulse"}),color:"text-amber-500",bg:"bg-amber-50"}},n=r[e.status]||r.completed;return c.jsx(Le.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:t*.1},children:c.jsx(rt,{to:`/runs/${e.run_id}`,children:c.jsx(ze,{className:"group hover:shadow-md hover:border-primary-200 transition-all duration-200",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:`p-2 rounded-lg ${n.bg} ${n.color}`,children:n.icon}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h4",{className:"font-semibold text-slate-900 truncate group-hover:text-primary-600 transition-colors",children:e.pipeline_name}),c.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 mt-0.5",children:[c.jsx("span",{className:"font-mono",children:((a=e.run_id)==null?void 0:a.substring(0,8))||"N/A"}),e.start_time&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"•"}),c.jsx("span",{children:pt(new Date(e.start_time),"MMM d, HH:mm")})]})]})]}),c.jsx(jt,{variant:e.status==="completed"?"success":e.status==="failed"?"danger":"warning",className:"text-xs",children:e.status})]})})})})}function Lh({label:e,value:t,icon:r,color:n}){const a={emerald:"bg-emerald-50 text-emerald-600",rose:"bg-rose-50 text-rose-600",blue:"bg-blue-50 text-blue-600",amber:"bg-amber-50 text-amber-600"};return c.jsx(ze,{className:"hover:shadow-md transition-shadow duration-200",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-slate-500 font-medium mb-1",children:e}),c.jsx("p",{className:"text-2xl font-bold text-slate-900",children:t})]}),c.jsx("div",{className:`p-2.5 rounded-lg ${a[n]}`,children:r})]})})}const NX=({item:e,columns:t})=>c.jsx("tr",{className:"bg-white dark:bg-slate-800 hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors",children:t.map((r,n)=>c.jsx("td",{className:"px-6 py-4",children:r.render?r.render(e):e[r.key]},n))});function Uc({title:e,subtitle:t,actions:r,items:n=[],columns:a=[],renderGrid:i,renderList:s,searchPlaceholder:o="Search...",initialView:l="table",emptyState:u,loading:d=!1}){const[f,h]=N.useState(l),[p,m]=N.useState(""),[g,b]=N.useState({key:null,direction:"asc"}),v=Array.isArray(n)?n:[],y=Array.isArray(a)?a:[],j=i||(E=>c.jsx("div",{className:"p-4 bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700",children:c.jsx("pre",{className:"text-xs overflow-auto",children:JSON.stringify(E,null,2)})})),w=s||j,k=[...v.filter(E=>{if(!p)return!0;const A=p.toLowerCase();return Object.values(E).some(C=>String(C).toLowerCase().includes(A))})].sort((E,A)=>{if(!g.key)return 0;const C=E[g.key],M=A[g.key];return C<M?g.direction==="asc"?-1:1:C>M?g.direction==="asc"?1:-1:0}),_=E=>{b(A=>({key:E,direction:A.key===E&&A.direction==="asc"?"desc":"asc"}))};return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:e}),t&&c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-1",children:t})]}),r&&c.jsx("div",{className:"flex gap-2",children:r})]}),c.jsxs("div",{className:"flex flex-col md:flex-row gap-4 items-center justify-between bg-white dark:bg-slate-800 p-4 rounded-xl border border-slate-200 dark:border-slate-700 shadow-sm",children:[c.jsxs("div",{className:"relative w-full md:w-96",children:[c.jsx(vm,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 w-4 h-4"}),c.jsx("input",{type:"text",placeholder:o,value:p,onChange:E=>m(E.target.value),className:"w-full pl-10 pr-4 py-2 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 text-sm text-slate-900 dark:text-white"})]}),c.jsx("div",{className:"flex items-center gap-2 w-full md:w-auto justify-end",children:c.jsxs("div",{className:"flex bg-slate-100 dark:bg-slate-900 p-1 rounded-lg border border-slate-200 dark:border-slate-700",children:[c.jsx("button",{onClick:()=>h("grid"),className:`p-2 rounded-md transition-all ${f==="grid"?"bg-white dark:bg-slate-800 shadow-sm text-primary-600":"text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"}`,title:"Grid View",children:c.jsx(DU,{size:18})}),c.jsx("button",{onClick:()=>h("list"),className:`p-2 rounded-md transition-all ${f==="list"?"bg-white dark:bg-slate-800 shadow-sm text-primary-600":"text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"}`,title:"List View",children:c.jsx(ED,{size:18})}),c.jsx("button",{onClick:()=>h("table"),className:`p-2 rounded-md transition-all ${f==="table"?"bg-white dark:bg-slate-800 shadow-sm text-primary-600":"text-slate-500 hover:text-slate-700 dark:hover:text-slate-300"}`,title:"Table View",children:c.jsx(HU,{size:18})})]})})]}),d?c.jsx("div",{className:"flex justify-center py-12",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500"})}):k.length===0?u||c.jsxs("div",{className:"text-center py-12 bg-slate-50 dark:bg-slate-800/50 rounded-xl border-2 border-dashed border-slate-200 dark:border-slate-700",children:[c.jsx("div",{className:"flex justify-center mb-4",children:c.jsx(vm,{className:"w-12 h-12 text-slate-300 dark:text-slate-600"})}),c.jsx("h3",{className:"text-lg font-medium text-slate-900 dark:text-white",children:"No items found"}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-1",children:p?`No results matching "${p}"`:"Get started by creating a new item."})]}):c.jsxs("div",{className:"animate-in fade-in duration-300",children:[f==="grid"&&c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:k.map((E,A)=>c.jsx("div",{children:j(E)},A))}),f==="list"&&c.jsx("div",{className:"space-y-4",children:k.map((E,A)=>c.jsx("div",{children:w(E)},A))}),f==="table"&&c.jsx("div",{className:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden shadow-sm",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-sm text-left",children:[c.jsx("thead",{className:"text-xs text-slate-500 uppercase bg-slate-50 dark:bg-slate-900/50 border-b border-slate-200 dark:border-slate-700",children:c.jsx("tr",{children:y.map((E,A)=>c.jsx("th",{className:"px-6 py-3 font-medium cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors",onClick:()=>E.sortable&&_(E.key),children:c.jsxs("div",{className:"flex items-center gap-2",children:[E.header,E.sortable&&c.jsx(bU,{size:14,className:"text-slate-400"})]})},A))})}),c.jsx("tbody",{className:"divide-y divide-slate-200 dark:divide-slate-700",children:k.map((E,A)=>c.jsx(NX,{item:E,columns:y},A))})]})})})]})]})}function li(e,t="MMM d, yyyy"){if(!e)return"-";const r=new Date(e);return N4(r)?pt(r,t):"-"}const _X=({status:e})=>{switch(e==null?void 0:e.toLowerCase()){case"completed":case"success":return c.jsx(Vt,{className:"w-3.5 h-3.5 text-emerald-500"});case"failed":return c.jsx(vr,{className:"w-3.5 h-3.5 text-rose-500"});case"running":return c.jsx(Be,{className:"w-3.5 h-3.5 text-amber-500 animate-spin"});default:return c.jsx(ct,{className:"w-3.5 h-3.5 text-slate-400"})}},tl=({label:e,icon:t,children:r,defaultExpanded:n=!1,actions:a,status:i,level:s=0,badge:o,onClick:l,isActive:u=!1,subLabel:d,checkable:f=!1,checked:h=!1,onCheck:p})=>{const[m,g]=N.useState(n),b=r&&r.length>0;return c.jsxs("div",{className:"select-none",children:[c.jsxs(Le.div,{initial:!1,animate:{backgroundColor:u?"rgba(59, 130, 246, 0.1)":"transparent"},className:`
|
|
502
|
-
group flex items-center gap-2 px-2 py-1.5 rounded-lg cursor-pointer transition-all
|
|
503
|
-
hover:bg-slate-100 dark:hover:bg-slate-800
|
|
504
|
-
${u?"bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400":"text-slate-700 dark:text-slate-300"}
|
|
505
|
-
${s===0?"mb-0.5":""}
|
|
506
|
-
`,style:{paddingLeft:`${s*1.25+.5}rem`},onClick:v=>{v.stopPropagation(),b&&g(!m),l==null||l()},children:[f&&c.jsx("div",{className:"shrink-0 mr-1",onClick:v=>v.stopPropagation(),children:c.jsx("input",{type:"checkbox",checked:h,onChange:v=>p==null?void 0:p(v.target.checked),className:"w-4 h-4 rounded border-slate-300 text-primary-600 focus:ring-primary-500 cursor-pointer accent-blue-600"})}),c.jsx("div",{className:"flex items-center gap-1 text-slate-400 shrink-0",children:b?c.jsx(Le.div,{animate:{rotate:m?90:0},transition:{duration:.2},children:c.jsx(No,{className:"w-3.5 h-3.5"})}):c.jsx("div",{className:"w-3.5"})}),t&&c.jsx(t,{className:`w-4 h-4 shrink-0 ${u?"text-blue-500":"text-slate-400 group-hover:text-slate-500 dark:text-slate-500 dark:group-hover:text-slate-400"}`}),c.jsxs("div",{className:"flex-1 flex items-center justify-between gap-2 min-w-0 overflow-hidden",children:[c.jsxs("div",{className:"flex flex-col min-w-0",children:[c.jsx("span",{className:`text-sm truncate ${u?"font-medium":""}`,children:e}),d&&c.jsx("span",{className:"text-[10px] text-slate-400 truncate",children:d})]}),c.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o,i&&c.jsx(_X,{status:i}),a]})]})]}),c.jsx(xi,{initial:!1,children:m&&b&&c.jsx(Le.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},children:r})})]})};function $S({projectId:e,onSelect:t,selectedId:r,mode:n="experiments",className:a="",selectionMode:i="single",selectedIds:s=[],onMultiSelect:o}){const[l,u]=N.useState({projects:[],items:[]}),[d,f]=N.useState(!0),[h,p]=N.useState(null),[m,g]=N.useState("");if(N.useEffect(()=>{(async()=>{f(!0),p(null);try{let w="",S="";switch(n){case"experiments":w=e?`/api/experiments/?project=${encodeURIComponent(e)}`:"/api/experiments/",S="experiments";break;case"pipelines":w=e?`/api/pipelines/?project=${encodeURIComponent(e)}`:"/api/pipelines/",S="pipelines";break;case"runs":w=e?`/api/runs/?project=${encodeURIComponent(e)}&limit=100`:"/api/runs/?limit=100",S="runs";break;default:break}const k=await ve(w);if(!k.ok)throw new Error(`Failed to fetch ${n}: ${k.statusText}`);const _=await k.json();let E=[];if(!e){const A=_[S]||[];E=[...new Set(A.map(M=>M.project).filter(Boolean))].map(M=>({name:M}))}u({projects:E,items:_[S]||[]})}catch(w){console.error("Failed to fetch navigation data:",w),p(w.message)}finally{f(!1)}})()},[e,n]),d)return c.jsx("div",{className:`p-4 ${a}`,children:c.jsx("div",{className:"animate-pulse space-y-3",children:[1,2,3,4,5].map(j=>c.jsx("div",{className:"h-8 bg-slate-100 dark:bg-slate-800 rounded-lg"},j))})});if(h)return c.jsx("div",{className:`p-4 text-center ${a}`,children:c.jsxs("div",{className:"bg-red-50 dark:bg-red-900/20 p-4 rounded-lg border border-red-100 dark:border-red-800",children:[c.jsx(vr,{className:"w-8 h-8 text-red-500 mx-auto mb-2"}),c.jsx("p",{className:"text-sm text-red-600 dark:text-red-400 font-medium",children:"Failed to load data"}),c.jsx("p",{className:"text-xs text-red-500 dark:text-red-500/80 mt-1",children:h}),c.jsx("button",{onClick:()=>window.location.reload(),className:"mt-3 text-xs bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 px-3 py-1.5 rounded-md hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors",children:"Retry"})]})});const b=l.items.filter(j=>(j.name||j.run_id||"").toLowerCase().includes(m.toLowerCase())),v=()=>{const j=(w,S)=>c.jsx(tl,{label:w.name,icon:On,level:S,isActive:r===w.experiment_id,onClick:()=>t==null?void 0:t(w),checkable:i==="multi",checked:s==null?void 0:s.includes(w.experiment_id),onCheck:k=>o==null?void 0:o(w.experiment_id,k),badge:c.jsx("span",{className:"text-[10px] bg-slate-100 dark:bg-slate-800 text-slate-500 px-1.5 py-0.5 rounded-full",children:w.run_count||0})},w.experiment_id);return e||l.projects.length===0?b.map(w=>j(w,0)):l.projects.map(w=>{const S=b.filter(k=>k.project===w.name);return S.length===0?null:c.jsx(tl,{label:w.name,icon:Ka,level:0,defaultExpanded:!0,badge:c.jsx("span",{className:"text-xs text-slate-400",children:S.length}),children:S.map(k=>j(k,1))},w.name)})},y=()=>{const j=(w,S)=>c.jsx(tl,{label:w.name,icon:oa,level:S,isActive:r===w.name,onClick:()=>t==null?void 0:t(w),badge:c.jsxs("span",{className:"text-[10px] bg-slate-100 dark:bg-slate-800 text-slate-500 px-1.5 py-0.5 rounded-full",children:["v",w.version||"1"]})},w.name);return e||l.projects.length===0?b.map(w=>j(w,0)):l.projects.map(w=>{const S=b.filter(k=>k.project===w.name);return S.length===0?null:c.jsx(tl,{label:w.name,icon:Ka,level:0,defaultExpanded:!0,children:S.map(k=>j(k,1))},w.name)})},x=()=>{const j=(S,k)=>c.jsx(tl,{label:S.name||S.run_id.slice(0,8),subLabel:li(S.created||S.start_time),icon:Lr,level:k,status:S.status,isActive:r===S.run_id,onClick:()=>t==null?void 0:t(S),checkable:i==="multi",checked:s==null?void 0:s.includes(S.run_id),onCheck:_=>o==null?void 0:o(S.run_id,_)},S.run_id);return[...new Set(b.map(S=>S.pipeline_name).filter(Boolean))].map(S=>{const k=b.filter(_=>_.pipeline_name===S);return c.jsx(tl,{label:S,icon:Be,level:0,defaultExpanded:!0,badge:c.jsx("span",{className:"text-xs text-slate-400",children:k.length}),children:k.map(_=>j(_,1))},S)})};return c.jsxs("div",{className:`flex flex-col h-full bg-slate-50/50 dark:bg-slate-900/50 ${a}`,children:[c.jsx("div",{className:"p-2 sticky top-0 bg-inherit z-10",children:c.jsxs("div",{className:"relative",children:[c.jsx(vm,{className:"absolute left-2.5 top-2.5 w-4 h-4 text-slate-400"}),c.jsx("input",{type:"text",placeholder:`Search ${n}...`,value:m,onChange:j=>g(j.target.value),className:"w-full pl-9 pr-3 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-primary-500/20 focus:border-primary-500"})]})}),c.jsx("div",{className:"flex-1 overflow-y-auto p-2 space-y-0.5",children:b.length===0?c.jsxs("div",{className:"text-center py-8 text-slate-400 text-sm",children:["No ",n," found"]}):c.jsxs(c.Fragment,{children:[n==="experiments"&&v(),n==="pipelines"&&y(),n==="runs"&&x()]})})]})}function lg({currentProject:e,onUpdate:t,type:r="default"}){const[n,a]=N.useState([]),[i,s]=N.useState(!1),[o,l]=N.useState(!1);N.useEffect(()=>{i&&n.length===0&&u()},[i]);const u=async()=>{l(!0);try{const h=await(await ve("/api/projects/")).json();a(h.projects||[])}catch(f){console.error("Failed to fetch projects:",f)}finally{l(!1)}},d=async f=>{if(f===e){s(!1);return}await t(f),s(!1)};return c.jsxs("div",{className:"relative",children:[c.jsxs("button",{onClick:()=>s(!i),className:`
|
|
507
|
-
flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm font-medium transition-all
|
|
508
|
-
${e?"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300 hover:bg-blue-100 dark:hover:bg-blue-900/30":"bg-slate-100 dark:bg-slate-800 text-slate-600 dark:text-slate-400 hover:bg-slate-200 dark:hover:bg-slate-700"}
|
|
509
|
-
`,children:[c.jsx(Ka,{size:14}),c.jsx("span",{children:e||"Assign Project"}),c.jsx(SD,{size:12,className:`transition-transform ${i?"rotate-180":""}`})]}),c.jsx(xi,{children:i&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>s(!1)}),c.jsxs(Le.div,{initial:{opacity:0,y:5,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:5,scale:.95},transition:{duration:.1},className:"absolute top-full left-0 mt-2 w-56 bg-white dark:bg-slate-800 rounded-xl shadow-xl border border-slate-200 dark:border-slate-700 z-50 overflow-hidden",children:[c.jsx("div",{className:"p-2 border-b border-slate-100 dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50",children:c.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider px-2",children:"Select Project"})}),c.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:o?c.jsx("div",{className:"p-4 text-center text-slate-400 text-xs",children:"Loading..."}):c.jsxs(c.Fragment,{children:[n.map(f=>c.jsxs("button",{onClick:()=>d(f.name),className:`
|
|
510
|
-
w-full flex items-center justify-between px-3 py-2 rounded-lg text-sm transition-colors
|
|
511
|
-
${e===f.name?"bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300":"text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700"}
|
|
512
|
-
`,children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Ka,{size:14}),c.jsx("span",{className:"truncate max-w-[140px]",children:f.name})]}),e===f.name&&c.jsx(Yk,{size:14})]},f.name)),n.length===0&&c.jsx("div",{className:"p-3 text-center text-slate-400 text-xs",children:"No projects found"})]})})]})]})})]})}function EX({pipeline:e,onClose:t,onProjectUpdate:r}){const[n,a]=N.useState([]),[i,s]=N.useState(!1),[o,l]=N.useState(e==null?void 0:e.project),u=d4();N.useEffect(()=>{e&&(d(),l(e.project))},[e]);const d=async()=>{s(!0);try{const m=`/api/runs?pipeline=${encodeURIComponent(e.name)}&limit=50`,b=await(await ve(m)).json();a(b.runs||[])}catch(m){console.error("Failed to fetch runs:",m),u.error(`Failed to load pipeline runs: ${m.message}`)}finally{s(!1)}},f=async m=>{try{await ve(`/api/pipelines/${e.name}/project`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:m})}),l(m),u.success(`Pipeline assigned to project: ${m}`),r&&r()}catch(g){console.error("Failed to update project:",g),u.error(`Failed to update project: ${g.message}`)}};if(!e)return null;const h={total:n.length,success:n.filter(m=>m.status==="completed").length,failed:n.filter(m=>m.status==="failed").length,avgDuration:n.length>0?n.reduce((m,g)=>m+(g.duration||0),0)/n.length:0},p=h.total>0?h.success/h.total*100:0;return c.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-slate-900",children:[c.jsxs("div",{className:"p-6 border-b border-slate-200 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-800/50",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:"p-3 bg-gradient-to-br from-primary-500 to-purple-500 rounded-xl text-white shadow-lg",children:c.jsx(oa,{size:24})}),c.jsxs("div",{children:[c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:e.name}),c.jsxs("div",{className:"flex items-center gap-2 mt-1 text-sm text-slate-500",children:[c.jsx(lg,{currentProject:o,onUpdate:f}),e.version&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"•"}),c.jsxs(jt,{variant:"secondary",className:"text-xs",children:["v",e.version]})]})]})]})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(ye,{variant:"ghost",size:"sm",onClick:t,children:c.jsx(Ps,{size:20,className:"text-slate-400"})})})]}),c.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[c.jsx(zh,{label:"Total Runs",value:h.total,icon:Be,color:"blue"}),c.jsx(zh,{label:"Success Rate",value:`${Math.round(p)}%`,icon:Vt,color:p>=80?"emerald":p>=50?"amber":"rose"}),c.jsx(zh,{label:"Avg Duration",value:`${h.avgDuration.toFixed(1)}s`,icon:ct,color:"purple"}),c.jsx(zh,{label:"Failed",value:h.failed,icon:vr,color:"rose"})]})]}),c.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[c.jsxs("div",{className:"p-4 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-white dark:bg-slate-900",children:[c.jsxs("h3",{className:"font-semibold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(Lr,{size:18,className:"text-slate-400"}),"Recent Executions"]}),c.jsx(rt,{to:`/runs?pipeline=${encodeURIComponent(e.name)}`,children:c.jsxs(ye,{variant:"ghost",size:"sm",className:"text-primary-600",children:["View All Runs ",c.jsx(ii,{size:16,className:"ml-1"})]})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-slate-50 dark:bg-slate-900/50",children:i?c.jsx("div",{className:"flex justify-center py-8",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):n.length===0?c.jsx("div",{className:"text-center py-12 text-slate-500",children:"No runs found for this pipeline"}):n.map(m=>c.jsx(rt,{to:`/runs/${m.run_id}`,children:c.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"bg-white dark:bg-slate-800 p-4 rounded-xl border border-slate-200 dark:border-slate-700 hover:shadow-md hover:border-primary-300 dark:hover:border-primary-700 transition-all group",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx(oc,{status:m.status}),c.jsxs("div",{children:[c.jsxs("div",{className:"font-medium text-slate-900 dark:text-white flex items-center gap-2",children:[m.name||`Run ${m.run_id.slice(0,8)}`,c.jsxs("span",{className:"text-xs font-mono text-slate-400",children:["#",m.run_id.slice(0,6)]})]}),c.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-500 mt-1",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(An,{size:12}),pt(new Date(m.created||m.start_time),"MMM d, HH:mm")]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(ct,{size:12}),m.duration?`${m.duration.toFixed(1)}s`:"-"]})]})]})]}),c.jsx(ii,{size:16,className:"text-slate-300 group-hover:text-primary-500 transition-colors"})]})})},m.run_id))})]})]})}function zh({label:e,value:t,icon:r,color:n}){const a={blue:"text-blue-600 bg-blue-50 dark:bg-blue-900/20",emerald:"text-emerald-600 bg-emerald-50 dark:bg-emerald-900/20",purple:"text-purple-600 bg-purple-50 dark:bg-purple-900/20",rose:"text-rose-600 bg-rose-50 dark:bg-rose-900/20",amber:"text-amber-600 bg-amber-50 dark:bg-amber-900/20"};return c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-3 rounded-xl border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("div",{className:`p-1 rounded-lg ${a[n]||a.blue}`,children:c.jsx(r,{size:14})}),c.jsx("span",{className:"text-xs text-slate-500 font-medium",children:e})]}),c.jsx("div",{className:"text-lg font-bold text-slate-900 dark:text-white pl-1",children:t})]})}function PX(){const[e,t]=N.useState([]),[r,n]=N.useState(!0),[a,i]=N.useState(null),[s,o]=N.useState(null),{selectedProject:l}=vi(),u=async()=>{n(!0),i(null);try{const f=l?`/api/pipelines/?project=${encodeURIComponent(l)}`:"/api/pipelines/",h=await ve(f);if(!h.ok)throw new Error(`Failed to fetch pipelines: ${h.statusText}`);const p=await h.json();t(p.pipelines||[])}catch(f){console.error(f),i(f.message)}finally{n(!1)}};N.useEffect(()=>{u()},[l]);const d=f=>{o(f)};return a?c.jsx("div",{className:"flex items-center justify-center h-screen bg-slate-50 dark:bg-slate-900",children:c.jsxs("div",{className:"text-center p-8 bg-red-50 dark:bg-red-900/20 rounded-2xl border border-red-100 dark:border-red-800 max-w-md",children:[c.jsx(vr,{className:"w-12 h-12 text-red-500 mx-auto mb-4"}),c.jsx("h3",{className:"text-lg font-bold text-red-700 dark:text-red-300 mb-2",children:"Failed to load pipelines"}),c.jsx("p",{className:"text-red-600 dark:text-red-400 mb-6",children:a}),c.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg shadow-sm hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors text-slate-700 dark:text-slate-300 font-medium",children:"Retry Connection"})]})}):c.jsxs("div",{className:"h-screen flex flex-col overflow-hidden bg-slate-50 dark:bg-slate-900",children:[c.jsx("div",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 px-6 py-4 shrink-0",children:c.jsx("div",{className:"flex items-center justify-between max-w-[1800px] mx-auto",children:c.jsxs("div",{children:[c.jsxs("h1",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(oa,{className:"text-primary-500"}),"Pipelines"]}),c.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"View and manage your ML pipelines"})]})})}),c.jsx("div",{className:"flex-1 overflow-hidden",children:c.jsx("div",{className:"h-full max-w-[1800px] mx-auto px-6 py-6",children:c.jsxs("div",{className:"h-full flex gap-6",children:[c.jsxs("div",{className:"w-[320px] shrink-0 flex flex-col bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden shadow-sm",children:[c.jsx("div",{className:"p-3 border-b border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50",children:c.jsx("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Explorer"})}),c.jsx("div",{className:"flex-1 min-h-0",children:c.jsx($S,{mode:"pipelines",projectId:l,onSelect:d,selectedId:s==null?void 0:s.name})})]}),c.jsx("div",{className:"flex-1 min-w-0 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden shadow-sm",children:s?c.jsx(EX,{pipeline:s,onClose:()=>o(null),onProjectUpdate:u}):c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center p-8 bg-slate-50/50 dark:bg-slate-900/50",children:[c.jsx("div",{className:"w-20 h-20 bg-primary-100 dark:bg-primary-900/30 rounded-full flex items-center justify-center mb-6 animate-pulse",children:c.jsx(oa,{size:40,className:"text-primary-500"})}),c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-2",children:"Select a Pipeline"}),c.jsx("p",{className:"text-slate-500 max-w-md",children:"Choose a pipeline from the sidebar to view execution history and statistics."})]})})]})})})]})}function br(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let r=0,n;r<e.length;r++)(n=br(e[r]))!==""&&(t+=(t&&" ")+n);else for(let r in e)e[r]&&(t+=(t&&" ")+r);return t}var P4={exports:{}},A4={},O4={exports:{}},C4={};/**
|
|
513
|
-
* @license React
|
|
514
|
-
* use-sync-external-store-shim.production.js
|
|
515
|
-
*
|
|
516
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
517
|
-
*
|
|
518
|
-
* This source code is licensed under the MIT license found in the
|
|
519
|
-
* LICENSE file in the root directory of this source tree.
|
|
520
|
-
*/var lc=N;function AX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OX=typeof Object.is=="function"?Object.is:AX,CX=lc.useState,TX=lc.useEffect,MX=lc.useLayoutEffect,$X=lc.useDebugValue;function RX(e,t){var r=t(),n=CX({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return MX(function(){a.value=r,a.getSnapshot=t,gv(a)&&i({inst:a})},[e,r,t]),TX(function(){return gv(a)&&i({inst:a}),e(function(){gv(a)&&i({inst:a})})},[e]),$X(r),r}function gv(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!OX(e,r)}catch{return!0}}function DX(e,t){return t()}var IX=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?DX:RX;C4.useSyncExternalStore=lc.useSyncExternalStore!==void 0?lc.useSyncExternalStore:IX;O4.exports=C4;var LX=O4.exports;/**
|
|
521
|
-
* @license React
|
|
522
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
523
|
-
*
|
|
524
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
525
|
-
*
|
|
526
|
-
* This source code is licensed under the MIT license found in the
|
|
527
|
-
* LICENSE file in the root directory of this source tree.
|
|
528
|
-
*/var cg=N,zX=LX;function FX(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var BX=typeof Object.is=="function"?Object.is:FX,VX=zX.useSyncExternalStore,UX=cg.useRef,HX=cg.useEffect,WX=cg.useMemo,qX=cg.useDebugValue;A4.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var i=UX(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=WX(function(){function l(p){if(!u){if(u=!0,d=p,p=n(p),a!==void 0&&s.hasValue){var m=s.value;if(a(m,p))return f=m}return f=p}if(m=f,BX(d,p))return m;var g=n(p);return a!==void 0&&a(m,g)?(d=p,m):(d=p,f=g)}var u=!1,d,f,h=r===void 0?null:r;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,r,n,a]);var o=VX(e,i[0],i[1]);return HX(function(){s.hasValue=!0,s.value=o},[o]),qX(o),o};P4.exports=A4;var GX=P4.exports;const KX=Je(GX),YX={},kP=e=>{let t;const r=new Set,n=(d,f)=>{const h=typeof d=="function"?d(t):d;if(!Object.is(h,t)){const p=t;t=f??(typeof h!="object"||h===null)?h:Object.assign({},t,h),r.forEach(m=>m(t,p))}},a=()=>t,l={setState:n,getState:a,getInitialState:()=>u,subscribe:d=>(r.add(d),()=>r.delete(d)),destroy:()=>{(YX?"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."),r.clear()}},u=t=e(n,a,l);return l},XX=e=>e?kP(e):kP,{useDebugValue:ZX}=T,{useSyncExternalStoreWithSelector:QX}=KX,JX=e=>e;function T4(e,t=JX,r){const n=QX(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return ZX(n),n}const SP=(e,t)=>{const r=XX(e),n=(a,i=t)=>T4(r,a,i);return Object.assign(n,r),n},eZ=(e,t)=>e?SP(e,t):SP;function dr(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[n,a]of e)if(!Object.is(a,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(const n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||!Object.is(e[n],t[n]))return!1;return!0}var tZ={value:()=>{}};function ug(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new $p(r)}function $p(e){this._=e}function rZ(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",a=r.indexOf(".");if(a>=0&&(n=r.slice(a+1),r=r.slice(0,a)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}$p.prototype=ug.prototype={constructor:$p,on:function(e,t){var r=this._,n=rZ(e+"",r),a,i=-1,s=n.length;if(arguments.length<2){for(;++i<s;)if((a=(e=n[i]).type)&&(a=nZ(r[a],e.name)))return a;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(a=(e=n[i]).type)r[a]=NP(r[a],e.name,t);else if(t==null)for(a in r)r[a]=NP(r[a],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new $p(e)},call:function(e,t){if((a=arguments.length-2)>0)for(var r=new Array(a),n=0,a,i;n<a;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],n=0,a=i.length;n<a;++n)i[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],a=0,i=n.length;a<i;++a)n[a].value.apply(t,r)}};function nZ(e,t){for(var r=0,n=e.length,a;r<n;++r)if((a=e[r]).name===t)return a.value}function NP(e,t,r){for(var n=0,a=e.length;n<a;++n)if(e[n].name===t){e[n]=tZ,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var Yw="http://www.w3.org/1999/xhtml";const _P={svg:"http://www.w3.org/2000/svg",xhtml:Yw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function dg(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),_P.hasOwnProperty(t)?{space:_P[t],local:e}:e}function aZ(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Yw&&t.documentElement.namespaceURI===Yw?t.createElement(e):t.createElementNS(r,e)}}function iZ(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function M4(e){var t=dg(e);return(t.local?iZ:aZ)(t)}function sZ(){}function RS(e){return e==null?sZ:function(){return this.querySelector(e)}}function oZ(e){typeof e!="function"&&(e=RS(e));for(var t=this._groups,r=t.length,n=new Array(r),a=0;a<r;++a)for(var i=t[a],s=i.length,o=n[a]=new Array(s),l,u,d=0;d<s;++d)(l=i[d])&&(u=e.call(l,l.__data__,d,i))&&("__data__"in l&&(u.__data__=l.__data__),o[d]=u);return new cn(n,this._parents)}function lZ(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function cZ(){return[]}function $4(e){return e==null?cZ:function(){return this.querySelectorAll(e)}}function uZ(e){return function(){return lZ(e.apply(this,arguments))}}function dZ(e){typeof e=="function"?e=uZ(e):e=$4(e);for(var t=this._groups,r=t.length,n=[],a=[],i=0;i<r;++i)for(var s=t[i],o=s.length,l,u=0;u<o;++u)(l=s[u])&&(n.push(e.call(l,l.__data__,u,s)),a.push(l));return new cn(n,a)}function R4(e){return function(){return this.matches(e)}}function D4(e){return function(t){return t.matches(e)}}var fZ=Array.prototype.find;function hZ(e){return function(){return fZ.call(this.children,e)}}function pZ(){return this.firstElementChild}function mZ(e){return this.select(e==null?pZ:hZ(typeof e=="function"?e:D4(e)))}var gZ=Array.prototype.filter;function yZ(){return Array.from(this.children)}function vZ(e){return function(){return gZ.call(this.children,e)}}function xZ(e){return this.selectAll(e==null?yZ:vZ(typeof e=="function"?e:D4(e)))}function bZ(e){typeof e!="function"&&(e=R4(e));for(var t=this._groups,r=t.length,n=new Array(r),a=0;a<r;++a)for(var i=t[a],s=i.length,o=n[a]=[],l,u=0;u<s;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&o.push(l);return new cn(n,this._parents)}function I4(e){return new Array(e.length)}function wZ(){return new cn(this._enter||this._groups.map(I4),this._parents)}function Em(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Em.prototype={constructor:Em,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 jZ(e){return function(){return e}}function kZ(e,t,r,n,a,i){for(var s=0,o,l=t.length,u=i.length;s<u;++s)(o=t[s])?(o.__data__=i[s],n[s]=o):r[s]=new Em(e,i[s]);for(;s<l;++s)(o=t[s])&&(a[s]=o)}function SZ(e,t,r,n,a,i,s){var o,l,u=new Map,d=t.length,f=i.length,h=new Array(d),p;for(o=0;o<d;++o)(l=t[o])&&(h[o]=p=s.call(l,l.__data__,o,t)+"",u.has(p)?a[o]=l:u.set(p,l));for(o=0;o<f;++o)p=s.call(e,i[o],o,i)+"",(l=u.get(p))?(n[o]=l,l.__data__=i[o],u.delete(p)):r[o]=new Em(e,i[o]);for(o=0;o<d;++o)(l=t[o])&&u.get(h[o])===l&&(a[o]=l)}function NZ(e){return e.__data__}function _Z(e,t){if(!arguments.length)return Array.from(this,NZ);var r=t?SZ:kZ,n=this._parents,a=this._groups;typeof e!="function"&&(e=jZ(e));for(var i=a.length,s=new Array(i),o=new Array(i),l=new Array(i),u=0;u<i;++u){var d=n[u],f=a[u],h=f.length,p=EZ(e.call(d,d&&d.__data__,u,n)),m=p.length,g=o[u]=new Array(m),b=s[u]=new Array(m),v=l[u]=new Array(h);r(d,f,g,b,v,p,t);for(var y=0,x=0,j,w;y<m;++y)if(j=g[y]){for(y>=x&&(x=y+1);!(w=b[x])&&++x<m;);j._next=w||null}}return s=new cn(s,n),s._enter=o,s._exit=l,s}function EZ(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function PZ(){return new cn(this._exit||this._groups.map(I4),this._parents)}function AZ(e,t,r){var n=this.enter(),a=this,i=this.exit();return typeof e=="function"?(n=e(n),n&&(n=n.selection())):n=n.append(e+""),t!=null&&(a=t(a),a&&(a=a.selection())),r==null?i.remove():r(i),n&&a?n.merge(a).order():a}function OZ(e){for(var t=e.selection?e.selection():e,r=this._groups,n=t._groups,a=r.length,i=n.length,s=Math.min(a,i),o=new Array(a),l=0;l<s;++l)for(var u=r[l],d=n[l],f=u.length,h=o[l]=new Array(f),p,m=0;m<f;++m)(p=u[m]||d[m])&&(h[m]=p);for(;l<a;++l)o[l]=r[l];return new cn(o,this._parents)}function CZ(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],a=n.length-1,i=n[a],s;--a>=0;)(s=n[a])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function TZ(e){e||(e=MZ);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var r=this._groups,n=r.length,a=new Array(n),i=0;i<n;++i){for(var s=r[i],o=s.length,l=a[i]=new Array(o),u,d=0;d<o;++d)(u=s[d])&&(l[d]=u);l.sort(t)}return new cn(a,this._parents).order()}function MZ(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $Z(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function RZ(){return Array.from(this)}function DZ(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],a=0,i=n.length;a<i;++a){var s=n[a];if(s)return s}return null}function IZ(){let e=0;for(const t of this)++e;return e}function LZ(){return!this.node()}function zZ(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var a=t[r],i=0,s=a.length,o;i<s;++i)(o=a[i])&&e.call(o,o.__data__,i,a);return this}function FZ(e){return function(){this.removeAttribute(e)}}function BZ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function VZ(e,t){return function(){this.setAttribute(e,t)}}function UZ(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function HZ(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function WZ(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function qZ(e,t){var r=dg(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?BZ:FZ:typeof t=="function"?r.local?WZ:HZ:r.local?UZ:VZ)(r,t))}function L4(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function GZ(e){return function(){this.style.removeProperty(e)}}function KZ(e,t,r){return function(){this.style.setProperty(e,t,r)}}function YZ(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function XZ(e,t,r){return arguments.length>1?this.each((t==null?GZ:typeof t=="function"?YZ:KZ)(e,t,r??"")):cc(this.node(),e)}function cc(e,t){return e.style.getPropertyValue(t)||L4(e).getComputedStyle(e,null).getPropertyValue(t)}function ZZ(e){return function(){delete this[e]}}function QZ(e,t){return function(){this[e]=t}}function JZ(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function eQ(e,t){return arguments.length>1?this.each((t==null?ZZ:typeof t=="function"?JZ:QZ)(e,t)):this.node()[e]}function z4(e){return e.trim().split(/^|\s+/)}function DS(e){return e.classList||new F4(e)}function F4(e){this._node=e,this._names=z4(e.getAttribute("class")||"")}F4.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 B4(e,t){for(var r=DS(e),n=-1,a=t.length;++n<a;)r.add(t[n])}function V4(e,t){for(var r=DS(e),n=-1,a=t.length;++n<a;)r.remove(t[n])}function tQ(e){return function(){B4(this,e)}}function rQ(e){return function(){V4(this,e)}}function nQ(e,t){return function(){(t.apply(this,arguments)?B4:V4)(this,e)}}function aQ(e,t){var r=z4(e+"");if(arguments.length<2){for(var n=DS(this.node()),a=-1,i=r.length;++a<i;)if(!n.contains(r[a]))return!1;return!0}return this.each((typeof t=="function"?nQ:t?tQ:rQ)(r,t))}function iQ(){this.textContent=""}function sQ(e){return function(){this.textContent=e}}function oQ(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function lQ(e){return arguments.length?this.each(e==null?iQ:(typeof e=="function"?oQ:sQ)(e)):this.node().textContent}function cQ(){this.innerHTML=""}function uQ(e){return function(){this.innerHTML=e}}function dQ(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function fQ(e){return arguments.length?this.each(e==null?cQ:(typeof e=="function"?dQ:uQ)(e)):this.node().innerHTML}function hQ(){this.nextSibling&&this.parentNode.appendChild(this)}function pQ(){return this.each(hQ)}function mQ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function gQ(){return this.each(mQ)}function yQ(e){var t=typeof e=="function"?e:M4(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function vQ(){return null}function xQ(e,t){var r=typeof e=="function"?e:M4(e),n=t==null?vQ:typeof t=="function"?t:RS(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function bQ(){var e=this.parentNode;e&&e.removeChild(this)}function wQ(){return this.each(bQ)}function jQ(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function kQ(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function SQ(e){return this.select(e?kQ:jQ)}function NQ(e){return arguments.length?this.property("__data__",e):this.node().__data__}function _Q(e){return function(t){e.call(this,t,this.__data__)}}function EQ(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function PQ(e){return function(){var t=this.__on;if(t){for(var r=0,n=-1,a=t.length,i;r<a;++r)i=t[r],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++n]=i;++n?t.length=n:delete this.__on}}}function AQ(e,t,r){return function(){var n=this.__on,a,i=_Q(t);if(n){for(var s=0,o=n.length;s<o;++s)if((a=n[s]).type===e.type&&a.name===e.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=r),a.value=t;return}}this.addEventListener(e.type,i,r),a={type:e.type,name:e.name,value:t,listener:i,options:r},n?n.push(a):this.__on=[a]}}function OQ(e,t,r){var n=EQ(e+""),a,i=n.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,d;l<u;++l)for(a=0,d=o[l];a<i;++a)if((s=n[a]).type===d.type&&s.name===d.name)return d.value}return}for(o=t?AQ:PQ,a=0;a<i;++a)this.each(o(n[a],t,r));return this}function U4(e,t,r){var n=L4(e),a=n.CustomEvent;typeof a=="function"?a=new a(t,r):(a=n.document.createEvent("Event"),r?(a.initEvent(t,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(t,!1,!1)),e.dispatchEvent(a)}function CQ(e,t){return function(){return U4(this,e,t)}}function TQ(e,t){return function(){return U4(this,e,t.apply(this,arguments))}}function MQ(e,t){return this.each((typeof t=="function"?TQ:CQ)(e,t))}function*$Q(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],a=0,i=n.length,s;a<i;++a)(s=n[a])&&(yield s)}var H4=[null];function cn(e,t){this._groups=e,this._parents=t}function Yf(){return new cn([[document.documentElement]],H4)}function RQ(){return this}cn.prototype=Yf.prototype={constructor:cn,select:oZ,selectAll:dZ,selectChild:mZ,selectChildren:xZ,filter:bZ,data:_Z,enter:wZ,exit:PZ,join:AZ,merge:OZ,selection:RQ,order:CZ,sort:TZ,call:$Z,nodes:RZ,node:DZ,size:IZ,empty:LZ,each:zZ,attr:qZ,style:XZ,property:eQ,classed:aQ,text:lQ,html:fQ,raise:pQ,lower:gQ,append:yQ,insert:xQ,remove:wQ,clone:SQ,datum:NQ,on:OQ,dispatch:MQ,[Symbol.iterator]:$Q};function kn(e){return typeof e=="string"?new cn([[document.querySelector(e)]],[document.documentElement]):new cn([[e]],H4)}function DQ(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Yn(e,t){if(e=DQ(e),t===void 0&&(t=e.currentTarget),t){var r=t.ownerSVGElement||t;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=e.clientX,n.y=e.clientY,n=n.matrixTransform(t.getScreenCTM().inverse()),[n.x,n.y]}if(t.getBoundingClientRect){var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}}return[e.pageX,e.pageY]}const IQ={passive:!1},Yd={capture:!0,passive:!1};function yv(e){e.stopImmediatePropagation()}function Ul(e){e.preventDefault(),e.stopImmediatePropagation()}function W4(e){var t=e.document.documentElement,r=kn(e).on("dragstart.drag",Ul,Yd);"onselectstart"in t?r.on("selectstart.drag",Ul,Yd):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function q4(e,t){var r=e.document.documentElement,n=kn(e).on("dragstart.drag",null);t&&(n.on("click.drag",Ul,Yd),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Fh=e=>()=>e;function Xw(e,{sourceEvent:t,subject:r,target:n,identifier:a,active:i,x:s,y:o,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Xw.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function LQ(e){return!e.ctrlKey&&!e.button}function zQ(){return this.parentNode}function FQ(e,t){return t??{x:e.x,y:e.y}}function BQ(){return navigator.maxTouchPoints||"ontouchstart"in this}function VQ(){var e=LQ,t=zQ,r=FQ,n=BQ,a={},i=ug("start","drag","end"),s=0,o,l,u,d,f=0;function h(j){j.on("mousedown.drag",p).filter(n).on("touchstart.drag",b).on("touchmove.drag",v,IQ).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(j,w){if(!(d||!e.call(this,j,w))){var S=x(this,t.call(this,j,w),j,w,"mouse");S&&(kn(j.view).on("mousemove.drag",m,Yd).on("mouseup.drag",g,Yd),W4(j.view),yv(j),u=!1,o=j.clientX,l=j.clientY,S("start",j))}}function m(j){if(Ul(j),!u){var w=j.clientX-o,S=j.clientY-l;u=w*w+S*S>f}a.mouse("drag",j)}function g(j){kn(j.view).on("mousemove.drag mouseup.drag",null),q4(j.view,u),Ul(j),a.mouse("end",j)}function b(j,w){if(e.call(this,j,w)){var S=j.changedTouches,k=t.call(this,j,w),_=S.length,E,A;for(E=0;E<_;++E)(A=x(this,k,j,w,S[E].identifier,S[E]))&&(yv(j),A("start",j,S[E]))}}function v(j){var w=j.changedTouches,S=w.length,k,_;for(k=0;k<S;++k)(_=a[w[k].identifier])&&(Ul(j),_("drag",j,w[k]))}function y(j){var w=j.changedTouches,S=w.length,k,_;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),k=0;k<S;++k)(_=a[w[k].identifier])&&(yv(j),_("end",j,w[k]))}function x(j,w,S,k,_,E){var A=i.copy(),C=Yn(E||S,w),M,O,P;if((P=r.call(j,new Xw("beforestart",{sourceEvent:S,target:h,identifier:_,active:s,x:C[0],y:C[1],dx:0,dy:0,dispatch:A}),k))!=null)return M=P.x-C[0]||0,O=P.y-C[1]||0,function D(I,L,R){var $=C,z;switch(I){case"start":a[_]=D,z=s++;break;case"end":delete a[_],--s;case"drag":C=Yn(R||L,w),z=s;break}A.call(I,j,new Xw(I,{sourceEvent:L,subject:P,target:h,identifier:_,active:z,x:C[0]+M,y:C[1]+O,dx:C[0]-$[0],dy:C[1]-$[1],dispatch:A}),k)}}return h.filter=function(j){return arguments.length?(e=typeof j=="function"?j:Fh(!!j),h):e},h.container=function(j){return arguments.length?(t=typeof j=="function"?j:Fh(j),h):t},h.subject=function(j){return arguments.length?(r=typeof j=="function"?j:Fh(j),h):r},h.touchable=function(j){return arguments.length?(n=typeof j=="function"?j:Fh(!!j),h):n},h.on=function(){var j=i.on.apply(i,arguments);return j===i?h:j},h.clickDistance=function(j){return arguments.length?(f=(j=+j)*j,h):Math.sqrt(f)},h}function IS(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function G4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Xf(){}var Xd=.7,Pm=1/Xd,Hl="\\s*([+-]?\\d+)\\s*",Zd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Sa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",UQ=/^#([0-9a-f]{3,8})$/,HQ=new RegExp(`^rgb\\(${Hl},${Hl},${Hl}\\)$`),WQ=new RegExp(`^rgb\\(${Sa},${Sa},${Sa}\\)$`),qQ=new RegExp(`^rgba\\(${Hl},${Hl},${Hl},${Zd}\\)$`),GQ=new RegExp(`^rgba\\(${Sa},${Sa},${Sa},${Zd}\\)$`),KQ=new RegExp(`^hsl\\(${Zd},${Sa},${Sa}\\)$`),YQ=new RegExp(`^hsla\\(${Zd},${Sa},${Sa},${Zd}\\)$`),EP={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};IS(Xf,Po,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:PP,formatHex:PP,formatHex8:XQ,formatHsl:ZQ,formatRgb:AP,toString:AP});function PP(){return this.rgb().formatHex()}function XQ(){return this.rgb().formatHex8()}function ZQ(){return K4(this).formatHsl()}function AP(){return this.rgb().formatRgb()}function Po(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=UQ.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?OP(t):r===3?new Gr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?Bh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===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=HQ.exec(e))?new Gr(t[1],t[2],t[3],1):(t=WQ.exec(e))?new Gr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=qQ.exec(e))?Bh(t[1],t[2],t[3],t[4]):(t=GQ.exec(e))?Bh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=KQ.exec(e))?MP(t[1],t[2]/100,t[3]/100,1):(t=YQ.exec(e))?MP(t[1],t[2]/100,t[3]/100,t[4]):EP.hasOwnProperty(e)?OP(EP[e]):e==="transparent"?new Gr(NaN,NaN,NaN,0):null}function OP(e){return new Gr(e>>16&255,e>>8&255,e&255,1)}function Bh(e,t,r,n){return n<=0&&(e=t=r=NaN),new Gr(e,t,r,n)}function QQ(e){return e instanceof Xf||(e=Po(e)),e?(e=e.rgb(),new Gr(e.r,e.g,e.b,e.opacity)):new Gr}function Zw(e,t,r,n){return arguments.length===1?QQ(e):new Gr(e,t,r,n??1)}function Gr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}IS(Gr,Zw,G4(Xf,{brighter(e){return e=e==null?Pm:Math.pow(Pm,e),new Gr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Xd:Math.pow(Xd,e),new Gr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Gr(po(this.r),po(this.g),po(this.b),Am(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:CP,formatHex:CP,formatHex8:JQ,formatRgb:TP,toString:TP}));function CP(){return`#${no(this.r)}${no(this.g)}${no(this.b)}`}function JQ(){return`#${no(this.r)}${no(this.g)}${no(this.b)}${no((isNaN(this.opacity)?1:this.opacity)*255)}`}function TP(){const e=Am(this.opacity);return`${e===1?"rgb(":"rgba("}${po(this.r)}, ${po(this.g)}, ${po(this.b)}${e===1?")":`, ${e})`}`}function Am(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function po(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function no(e){return e=po(e),(e<16?"0":"")+e.toString(16)}function MP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ta(e,t,r,n)}function K4(e){if(e instanceof ta)return new ta(e.h,e.s,e.l,e.opacity);if(e instanceof Xf||(e=Po(e)),!e)return new ta;if(e instanceof ta)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),s=NaN,o=i-a,l=(i+a)/2;return o?(t===i?s=(r-n)/o+(r<n)*6:r===i?s=(n-t)/o+2:s=(t-r)/o+4,o/=l<.5?i+a:2-i-a,s*=60):o=l>0&&l<1?0:s,new ta(s,o,l,e.opacity)}function eJ(e,t,r,n){return arguments.length===1?K4(e):new ta(e,t,r,n??1)}function ta(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}IS(ta,eJ,G4(Xf,{brighter(e){return e=e==null?Pm:Math.pow(Pm,e),new ta(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Xd:Math.pow(Xd,e),new ta(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,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Gr(vv(e>=240?e-240:e+120,a,n),vv(e,a,n),vv(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new ta($P(this.h),Vh(this.s),Vh(this.l),Am(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=Am(this.opacity);return`${e===1?"hsl(":"hsla("}${$P(this.h)}, ${Vh(this.s)*100}%, ${Vh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $P(e){return e=(e||0)%360,e<0?e+360:e}function Vh(e){return Math.max(0,Math.min(1,e||0))}function vv(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const LS=e=>()=>e;function tJ(e,t){return function(r){return e+r*t}}function rJ(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function nJ(e){return(e=+e)==1?Y4:function(t,r){return r-t?rJ(t,r,e):LS(isNaN(t)?r:t)}}function Y4(e,t){var r=t-e;return r?tJ(e,r):LS(isNaN(e)?t:e)}const Om=function e(t){var r=nJ(t);function n(a,i){var s=r((a=Zw(a)).r,(i=Zw(i)).r),o=r(a.g,i.g),l=r(a.b,i.b),u=Y4(a.opacity,i.opacity);return function(d){return a.r=s(d),a.g=o(d),a.b=l(d),a.opacity=u(d),a+""}}return n.gamma=e,n}(1);function aJ(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a<r;++a)n[a]=e[a]*(1-i)+t[a]*i;return n}}function iJ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function sJ(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),s;for(s=0;s<n;++s)a[s]=Hc(e[s],t[s]);for(;s<r;++s)i[s]=t[s];return function(o){for(s=0;s<n;++s)i[s]=a[s](o);return i}}function oJ(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Jn(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function lJ(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Hc(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var Qw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,xv=new RegExp(Qw.source,"g");function cJ(e){return function(){return e}}function uJ(e){return function(t){return e(t)+""}}function X4(e,t){var r=Qw.lastIndex=xv.lastIndex=0,n,a,i,s=-1,o=[],l=[];for(e=e+"",t=t+"";(n=Qw.exec(e))&&(a=xv.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),o[s]?o[s]+=i:o[++s]=i),(n=n[0])===(a=a[0])?o[s]?o[s]+=a:o[++s]=a:(o[++s]=null,l.push({i:s,x:Jn(n,a)})),r=xv.lastIndex;return r<t.length&&(i=t.slice(r),o[s]?o[s]+=i:o[++s]=i),o.length<2?l[0]?uJ(l[0].x):cJ(t):(t=l.length,function(u){for(var d=0,f;d<t;++d)o[(f=l[d]).i]=f.x(u);return o.join("")})}function Hc(e,t){var r=typeof t,n;return t==null||r==="boolean"?LS(t):(r==="number"?Jn:r==="string"?(n=Po(t))?(t=n,Om):X4:t instanceof Po?Om:t instanceof Date?oJ:iJ(t)?aJ:Array.isArray(t)?sJ:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?lJ:Jn)(e,t)}function zS(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var RP=180/Math.PI,Jw={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Z4(e,t,r,n,a,i){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n<t*r&&(e=-e,t=-t,l=-l,s=-s),{translateX:a,translateY:i,rotate:Math.atan2(t,e)*RP,skewX:Math.atan(l)*RP,scaleX:s,scaleY:o}}var Uh;function dJ(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Jw:Z4(t.a,t.b,t.c,t.d,t.e,t.f)}function fJ(e){return e==null||(Uh||(Uh=document.createElementNS("http://www.w3.org/2000/svg","g")),Uh.setAttribute("transform",e),!(e=Uh.transform.baseVal.consolidate()))?Jw:(e=e.matrix,Z4(e.a,e.b,e.c,e.d,e.e,e.f))}function Q4(e,t,r,n){function a(u){return u.length?u.pop()+" ":""}function i(u,d,f,h,p,m){if(u!==f||d!==h){var g=p.push("translate(",null,t,null,r);m.push({i:g-4,x:Jn(u,f)},{i:g-2,x:Jn(d,h)})}else(f||h)&&p.push("translate("+f+t+h+r)}function s(u,d,f,h){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),h.push({i:f.push(a(f)+"rotate(",null,n)-2,x:Jn(u,d)})):d&&f.push(a(f)+"rotate("+d+n)}function o(u,d,f,h){u!==d?h.push({i:f.push(a(f)+"skewX(",null,n)-2,x:Jn(u,d)}):d&&f.push(a(f)+"skewX("+d+n)}function l(u,d,f,h,p,m){if(u!==f||d!==h){var g=p.push(a(p)+"scale(",null,",",null,")");m.push({i:g-4,x:Jn(u,f)},{i:g-2,x:Jn(d,h)})}else(f!==1||h!==1)&&p.push(a(p)+"scale("+f+","+h+")")}return function(u,d){var f=[],h=[];return u=e(u),d=e(d),i(u.translateX,u.translateY,d.translateX,d.translateY,f,h),s(u.rotate,d.rotate,f,h),o(u.skewX,d.skewX,f,h),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,h),u=d=null,function(p){for(var m=-1,g=h.length,b;++m<g;)f[(b=h[m]).i]=b.x(p);return f.join("")}}}var hJ=Q4(dJ,"px, ","px)","deg)"),pJ=Q4(fJ,", ",")",")"),mJ=1e-12;function DP(e){return((e=Math.exp(e))+1/e)/2}function gJ(e){return((e=Math.exp(e))-1/e)/2}function yJ(e){return((e=Math.exp(2*e))-1)/(e+1)}const vJ=function e(t,r,n){function a(i,s){var o=i[0],l=i[1],u=i[2],d=s[0],f=s[1],h=s[2],p=d-o,m=f-l,g=p*p+m*m,b,v;if(g<mJ)v=Math.log(h/u)/t,b=function(k){return[o+k*p,l+k*m,u*Math.exp(t*k*v)]};else{var y=Math.sqrt(g),x=(h*h-u*u+n*g)/(2*u*r*y),j=(h*h-u*u-n*g)/(2*h*r*y),w=Math.log(Math.sqrt(x*x+1)-x),S=Math.log(Math.sqrt(j*j+1)-j);v=(S-w)/t,b=function(k){var _=k*v,E=DP(w),A=u/(r*y)*(E*yJ(t*_+w)-gJ(w));return[o+A*p,l+A*m,u*E/DP(t*_+w)]}}return b.duration=v*1e3*t/Math.SQRT2,b}return a.rho=function(i){var s=Math.max(.001,+i),o=s*s,l=o*o;return e(s,o,l)},a}(Math.SQRT2,2,4);function xJ(e,t){t===void 0&&(t=e,e=Hc);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r<n;)i[r]=e(a,a=t[++r]);return function(s){var o=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return i[o](s-o)}}var uc=0,Yu=0,_u=0,J4=1e3,Cm,Xu,Tm=0,Ao=0,fg=0,Qd=typeof performance=="object"&&performance.now?performance:Date,eI=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function FS(){return Ao||(eI(bJ),Ao=Qd.now()+fg)}function bJ(){Ao=0}function Mm(){this._call=this._time=this._next=null}Mm.prototype=tI.prototype={constructor:Mm,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?FS():+r)+(t==null?0:+t),!this._next&&Xu!==this&&(Xu?Xu._next=this:Cm=this,Xu=this),this._call=e,this._time=r,e1()},stop:function(){this._call&&(this._call=null,this._time=1/0,e1())}};function tI(e,t,r){var n=new Mm;return n.restart(e,t,r),n}function wJ(){FS(),++uc;for(var e=Cm,t;e;)(t=Ao-e._time)>=0&&e._call.call(void 0,t),e=e._next;--uc}function IP(){Ao=(Tm=Qd.now())+fg,uc=Yu=0;try{wJ()}finally{uc=0,kJ(),Ao=0}}function jJ(){var e=Qd.now(),t=e-Tm;t>J4&&(fg-=t,Tm=e)}function kJ(){for(var e,t=Cm,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Cm=r);Xu=e,e1(n)}function e1(e){if(!uc){Yu&&(Yu=clearTimeout(Yu));var t=e-Ao;t>24?(e<1/0&&(Yu=setTimeout(IP,e-Qd.now()-fg)),_u&&(_u=clearInterval(_u))):(_u||(Tm=Qd.now(),_u=setInterval(jJ,J4)),uc=1,eI(IP))}}function LP(e,t,r){var n=new Mm;return t=t==null?0:+t,n.restart(a=>{n.stop(),e(a+t)},t,r),n}var SJ=ug("start","end","cancel","interrupt"),NJ=[],rI=0,zP=1,t1=2,Rp=3,FP=4,r1=5,Dp=6;function hg(e,t,r,n,a,i){var s=e.__transition;if(!s)e.__transition={};else if(r in s)return;_J(e,r,{name:t,index:n,group:a,on:SJ,tween:NJ,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:rI})}function BS(e,t){var r=ca(e,t);if(r.state>rI)throw new Error("too late; already scheduled");return r}function Pa(e,t){var r=ca(e,t);if(r.state>Rp)throw new Error("too late; already running");return r}function ca(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function _J(e,t,r){var n=e.__transition,a;n[t]=r,r.timer=tI(i,0,r.time);function i(u){r.state=zP,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var d,f,h,p;if(r.state!==zP)return l();for(d in n)if(p=n[d],p.name===r.name){if(p.state===Rp)return LP(s);p.state===FP?(p.state=Dp,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[d]):+d<t&&(p.state=Dp,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[d])}if(LP(function(){r.state===Rp&&(r.state=FP,r.timer.restart(o,r.delay,r.time),o(u))}),r.state=t1,r.on.call("start",e,e.__data__,r.index,r.group),r.state===t1){for(r.state=Rp,a=new Array(h=r.tween.length),d=0,f=-1;d<h;++d)(p=r.tween[d].value.call(e,e.__data__,r.index,r.group))&&(a[++f]=p);a.length=f+1}}function o(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(l),r.state=r1,1),f=-1,h=a.length;++f<h;)a[f].call(e,d);r.state===r1&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=Dp,r.timer.stop(),delete n[t];for(var u in n)return;delete e.__transition}}function Ip(e,t){var r=e.__transition,n,a,i=!0,s;if(r){t=t==null?null:t+"";for(s in r){if((n=r[s]).name!==t){i=!1;continue}a=n.state>t1&&n.state<r1,n.state=Dp,n.timer.stop(),n.on.call(a?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[s]}i&&delete e.__transition}}function EJ(e){return this.each(function(){Ip(this,e)})}function PJ(e,t){var r,n;return function(){var a=Pa(this,e),i=a.tween;if(i!==r){n=r=i;for(var s=0,o=n.length;s<o;++s)if(n[s].name===t){n=n.slice(),n.splice(s,1);break}}a.tween=n}}function AJ(e,t,r){var n,a;if(typeof r!="function")throw new Error;return function(){var i=Pa(this,e),s=i.tween;if(s!==n){a=(n=s).slice();for(var o={name:t,value:r},l=0,u=a.length;l<u;++l)if(a[l].name===t){a[l]=o;break}l===u&&a.push(o)}i.tween=a}}function OJ(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=ca(this.node(),r).tween,a=0,i=n.length,s;a<i;++a)if((s=n[a]).name===e)return s.value;return null}return this.each((t==null?PJ:AJ)(r,e,t))}function VS(e,t,r){var n=e._id;return e.each(function(){var a=Pa(this,n);(a.value||(a.value={}))[t]=r.apply(this,arguments)}),function(a){return ca(a,n).value[t]}}function nI(e,t){var r;return(typeof t=="number"?Jn:t instanceof Po?Om:(r=Po(t))?(t=r,Om):X4)(e,t)}function CJ(e){return function(){this.removeAttribute(e)}}function TJ(e){return function(){this.removeAttributeNS(e.space,e.local)}}function MJ(e,t,r){var n,a=r+"",i;return function(){var s=this.getAttribute(e);return s===a?null:s===n?i:i=t(n=s,r)}}function $J(e,t,r){var n,a=r+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===a?null:s===n?i:i=t(n=s,r)}}function RJ(e,t,r){var n,a,i;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=o+"",s===l?null:s===n&&l===a?i:(a=l,i=t(n=s,o)))}}function DJ(e,t,r){var n,a,i;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=o+"",s===l?null:s===n&&l===a?i:(a=l,i=t(n=s,o)))}}function IJ(e,t){var r=dg(e),n=r==="transform"?pJ:nI;return this.attrTween(e,typeof t=="function"?(r.local?DJ:RJ)(r,n,VS(this,"attr."+e,t)):t==null?(r.local?TJ:CJ)(r):(r.local?$J:MJ)(r,n,t))}function LJ(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function zJ(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function FJ(e,t){var r,n;function a(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&zJ(e,i)),r}return a._value=t,a}function BJ(e,t){var r,n;function a(){var i=t.apply(this,arguments);return i!==n&&(r=(n=i)&&LJ(e,i)),r}return a._value=t,a}function VJ(e,t){var r="attr."+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;var n=dg(e);return this.tween(r,(n.local?FJ:BJ)(n,t))}function UJ(e,t){return function(){BS(this,e).delay=+t.apply(this,arguments)}}function HJ(e,t){return t=+t,function(){BS(this,e).delay=t}}function WJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?UJ:HJ)(t,e)):ca(this.node(),t).delay}function qJ(e,t){return function(){Pa(this,e).duration=+t.apply(this,arguments)}}function GJ(e,t){return t=+t,function(){Pa(this,e).duration=t}}function KJ(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?qJ:GJ)(t,e)):ca(this.node(),t).duration}function YJ(e,t){if(typeof t!="function")throw new Error;return function(){Pa(this,e).ease=t}}function XJ(e){var t=this._id;return arguments.length?this.each(YJ(t,e)):ca(this.node(),t).ease}function ZJ(e,t){return function(){var r=t.apply(this,arguments);if(typeof r!="function")throw new Error;Pa(this,e).ease=r}}function QJ(e){if(typeof e!="function")throw new Error;return this.each(ZJ(this._id,e))}function JJ(e){typeof e!="function"&&(e=R4(e));for(var t=this._groups,r=t.length,n=new Array(r),a=0;a<r;++a)for(var i=t[a],s=i.length,o=n[a]=[],l,u=0;u<s;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&o.push(l);return new ci(n,this._parents,this._name,this._id)}function eee(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,a=r.length,i=Math.min(n,a),s=new Array(n),o=0;o<i;++o)for(var l=t[o],u=r[o],d=l.length,f=s[o]=new Array(d),h,p=0;p<d;++p)(h=l[p]||u[p])&&(f[p]=h);for(;o<n;++o)s[o]=t[o];return new ci(s,this._parents,this._name,this._id)}function tee(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function ree(e,t,r){var n,a,i=tee(t)?BS:Pa;return function(){var s=i(this,e),o=s.on;o!==n&&(a=(n=o).copy()).on(t,r),s.on=a}}function nee(e,t){var r=this._id;return arguments.length<2?ca(this.node(),r).on.on(e):this.each(ree(r,e,t))}function aee(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function iee(){return this.on("end.remove",aee(this._id))}function see(e){var t=this._name,r=this._id;typeof e!="function"&&(e=RS(e));for(var n=this._groups,a=n.length,i=new Array(a),s=0;s<a;++s)for(var o=n[s],l=o.length,u=i[s]=new Array(l),d,f,h=0;h<l;++h)(d=o[h])&&(f=e.call(d,d.__data__,h,o))&&("__data__"in d&&(f.__data__=d.__data__),u[h]=f,hg(u[h],t,r,h,u,ca(d,r)));return new ci(i,this._parents,t,r)}function oee(e){var t=this._name,r=this._id;typeof e!="function"&&(e=$4(e));for(var n=this._groups,a=n.length,i=[],s=[],o=0;o<a;++o)for(var l=n[o],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var h=e.call(d,d.__data__,f,l),p,m=ca(d,r),g=0,b=h.length;g<b;++g)(p=h[g])&&hg(p,t,r,g,h,m);i.push(h),s.push(d)}return new ci(i,s,t,r)}var lee=Yf.prototype.constructor;function cee(){return new lee(this._groups,this._parents)}function uee(e,t){var r,n,a;return function(){var i=cc(this,e),s=(this.style.removeProperty(e),cc(this,e));return i===s?null:i===r&&s===n?a:a=t(r=i,n=s)}}function aI(e){return function(){this.style.removeProperty(e)}}function dee(e,t,r){var n,a=r+"",i;return function(){var s=cc(this,e);return s===a?null:s===n?i:i=t(n=s,r)}}function fee(e,t,r){var n,a,i;return function(){var s=cc(this,e),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(e),cc(this,e))),s===l?null:s===n&&l===a?i:(a=l,i=t(n=s,o))}}function hee(e,t){var r,n,a,i="style."+t,s="end."+i,o;return function(){var l=Pa(this,e),u=l.on,d=l.value[i]==null?o||(o=aI(t)):void 0;(u!==r||a!==d)&&(n=(r=u).copy()).on(s,a=d),l.on=n}}function pee(e,t,r){var n=(e+="")=="transform"?hJ:nI;return t==null?this.styleTween(e,uee(e,n)).on("end.style."+e,aI(e)):typeof t=="function"?this.styleTween(e,fee(e,n,VS(this,"style."+e,t))).each(hee(this._id,e)):this.styleTween(e,dee(e,n,t),r).on("end.style."+e,null)}function mee(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function gee(e,t,r){var n,a;function i(){var s=t.apply(this,arguments);return s!==a&&(n=(a=s)&&mee(e,s,r)),n}return i._value=t,i}function yee(e,t,r){var n="style."+(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;return this.tween(n,gee(e,t,r??""))}function vee(e){return function(){this.textContent=e}}function xee(e){return function(){var t=e(this);this.textContent=t??""}}function bee(e){return this.tween("text",typeof e=="function"?xee(VS(this,"text",e)):vee(e==null?"":e+""))}function wee(e){return function(t){this.textContent=e.call(this,t)}}function jee(e){var t,r;function n(){var a=e.apply(this,arguments);return a!==r&&(t=(r=a)&&wee(a)),t}return n._value=e,n}function kee(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,jee(e))}function See(){for(var e=this._name,t=this._id,r=iI(),n=this._groups,a=n.length,i=0;i<a;++i)for(var s=n[i],o=s.length,l,u=0;u<o;++u)if(l=s[u]){var d=ca(l,t);hg(l,e,r,u,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ci(n,this._parents,e,r)}function Nee(){var e,t,r=this,n=r._id,a=r.size();return new Promise(function(i,s){var o={value:s},l={value:function(){--a===0&&i()}};r.each(function(){var u=Pa(this,n),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(o),t._.interrupt.push(o),t._.end.push(l)),u.on=t}),a===0&&i()})}var _ee=0;function ci(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function iI(){return++_ee}var Ma=Yf.prototype;ci.prototype={constructor:ci,select:see,selectAll:oee,selectChild:Ma.selectChild,selectChildren:Ma.selectChildren,filter:JJ,merge:eee,selection:cee,transition:See,call:Ma.call,nodes:Ma.nodes,node:Ma.node,size:Ma.size,empty:Ma.empty,each:Ma.each,on:nee,attr:IJ,attrTween:VJ,style:pee,styleTween:yee,text:bee,textTween:kee,remove:iee,tween:OJ,delay:WJ,duration:KJ,ease:XJ,easeVarying:QJ,end:Nee,[Symbol.iterator]:Ma[Symbol.iterator]};function Eee(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Pee={time:null,delay:0,duration:250,ease:Eee};function Aee(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return r}function Oee(e){var t,r;e instanceof ci?(t=e._id,e=e._name):(t=iI(),(r=Pee).time=FS(),e=e==null?null:e+"");for(var n=this._groups,a=n.length,i=0;i<a;++i)for(var s=n[i],o=s.length,l,u=0;u<o;++u)(l=s[u])&&hg(l,e,t,u,s,r||Aee(l,t));return new ci(n,this._parents,e,t)}Yf.prototype.interrupt=EJ;Yf.prototype.transition=Oee;const Hh=e=>()=>e;function Cee(e,{sourceEvent:t,target:r,transform:n,dispatch:a}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:n,enumerable:!0,configurable:!0},_:{value:a}})}function Fa(e,t,r){this.k=e,this.x=t,this.y=r}Fa.prototype={constructor:Fa,scale:function(e){return e===1?this:new Fa(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Fa(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 Ya=new Fa(1,0,0);Fa.prototype;function bv(e){e.stopImmediatePropagation()}function Eu(e){e.preventDefault(),e.stopImmediatePropagation()}function Tee(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Mee(){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 BP(){return this.__zoom||Ya}function $ee(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Ree(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dee(e,t,r){var n=e.invertX(t[0][0])-r[0][0],a=e.invertX(t[1][0])-r[1][0],i=e.invertY(t[0][1])-r[0][1],s=e.invertY(t[1][1])-r[1][1];return e.translate(a>n?(n+a)/2:Math.min(0,n)||Math.max(0,a),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function sI(){var e=Tee,t=Mee,r=Dee,n=$ee,a=Ree,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],o=250,l=vJ,u=ug("start","zoom","end"),d,f,h,p=500,m=150,g=0,b=10;function v(P){P.property("__zoom",BP).on("wheel.zoom",_,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",A).filter(a).on("touchstart.zoom",C).on("touchmove.zoom",M).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(P,D,I,L){var R=P.selection?P.selection():P;R.property("__zoom",BP),P!==R?w(P,D,I,L):R.interrupt().each(function(){S(this,arguments).event(L).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},v.scaleBy=function(P,D,I,L){v.scaleTo(P,function(){var R=this.__zoom.k,$=typeof D=="function"?D.apply(this,arguments):D;return R*$},I,L)},v.scaleTo=function(P,D,I,L){v.transform(P,function(){var R=t.apply(this,arguments),$=this.__zoom,z=I==null?j(R):typeof I=="function"?I.apply(this,arguments):I,U=$.invert(z),V=typeof D=="function"?D.apply(this,arguments):D;return r(x(y($,V),z,U),R,s)},I,L)},v.translateBy=function(P,D,I,L){v.transform(P,function(){return r(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),s)},null,L)},v.translateTo=function(P,D,I,L,R){v.transform(P,function(){var $=t.apply(this,arguments),z=this.__zoom,U=L==null?j($):typeof L=="function"?L.apply(this,arguments):L;return r(Ya.translate(U[0],U[1]).scale(z.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof I=="function"?-I.apply(this,arguments):-I),$,s)},L,R)};function y(P,D){return D=Math.max(i[0],Math.min(i[1],D)),D===P.k?P:new Fa(D,P.x,P.y)}function x(P,D,I){var L=D[0]-I[0]*P.k,R=D[1]-I[1]*P.k;return L===P.x&&R===P.y?P:new Fa(P.k,L,R)}function j(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function w(P,D,I,L){P.on("start.zoom",function(){S(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(L).end()}).tween("zoom",function(){var R=this,$=arguments,z=S(R,$).event(L),U=t.apply(R,$),V=I==null?j(U):typeof I=="function"?I.apply(R,$):I,F=Math.max(U[1][0]-U[0][0],U[1][1]-U[0][1]),W=R.__zoom,K=typeof D=="function"?D.apply(R,$):D,Q=l(W.invert(V).concat(F/W.k),K.invert(V).concat(F/K.k));return function(ne){if(ne===1)ne=K;else{var pe=Q(ne),X=F/pe[2];ne=new Fa(X,V[0]-pe[0]*X,V[1]-pe[1]*X)}z.zoom(null,ne)}})}function S(P,D,I){return!I&&P.__zooming||new k(P,D)}function k(P,D){this.that=P,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(P,D),this.taps=0}k.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,D){return this.mouse&&P!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){var D=kn(this.that).datum();u.call(P,this.that,new Cee(P,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:u}),D)}};function _(P,...D){if(!e.apply(this,arguments))return;var I=S(this,D).event(P),L=this.__zoom,R=Math.max(i[0],Math.min(i[1],L.k*Math.pow(2,n.apply(this,arguments)))),$=Yn(P);if(I.wheel)(I.mouse[0][0]!==$[0]||I.mouse[0][1]!==$[1])&&(I.mouse[1]=L.invert(I.mouse[0]=$)),clearTimeout(I.wheel);else{if(L.k===R)return;I.mouse=[$,L.invert($)],Ip(this),I.start()}Eu(P),I.wheel=setTimeout(z,m),I.zoom("mouse",r(x(y(L,R),I.mouse[0],I.mouse[1]),I.extent,s));function z(){I.wheel=null,I.end()}}function E(P,...D){if(h||!e.apply(this,arguments))return;var I=P.currentTarget,L=S(this,D,!0).event(P),R=kn(P.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",F,!0),$=Yn(P,I),z=P.clientX,U=P.clientY;W4(P.view),bv(P),L.mouse=[$,this.__zoom.invert($)],Ip(this),L.start();function V(W){if(Eu(W),!L.moved){var K=W.clientX-z,Q=W.clientY-U;L.moved=K*K+Q*Q>g}L.event(W).zoom("mouse",r(x(L.that.__zoom,L.mouse[0]=Yn(W,I),L.mouse[1]),L.extent,s))}function F(W){R.on("mousemove.zoom mouseup.zoom",null),q4(W.view,L.moved),Eu(W),L.event(W).end()}}function A(P,...D){if(e.apply(this,arguments)){var I=this.__zoom,L=Yn(P.changedTouches?P.changedTouches[0]:P,this),R=I.invert(L),$=I.k*(P.shiftKey?.5:2),z=r(x(y(I,$),L,R),t.apply(this,D),s);Eu(P),o>0?kn(this).transition().duration(o).call(w,z,L,P):kn(this).call(v.transform,z,L,P)}}function C(P,...D){if(e.apply(this,arguments)){var I=P.touches,L=I.length,R=S(this,D,P.changedTouches.length===L).event(P),$,z,U,V;for(bv(P),z=0;z<L;++z)U=I[z],V=Yn(U,this),V=[V,this.__zoom.invert(V),U.identifier],R.touch0?!R.touch1&&R.touch0[2]!==V[2]&&(R.touch1=V,R.taps=0):(R.touch0=V,$=!0,R.taps=1+!!d);d&&(d=clearTimeout(d)),$&&(R.taps<2&&(f=V[0],d=setTimeout(function(){d=null},p)),Ip(this),R.start())}}function M(P,...D){if(this.__zooming){var I=S(this,D).event(P),L=P.changedTouches,R=L.length,$,z,U,V;for(Eu(P),$=0;$<R;++$)z=L[$],U=Yn(z,this),I.touch0&&I.touch0[2]===z.identifier?I.touch0[0]=U:I.touch1&&I.touch1[2]===z.identifier&&(I.touch1[0]=U);if(z=I.that.__zoom,I.touch1){var F=I.touch0[0],W=I.touch0[1],K=I.touch1[0],Q=I.touch1[1],ne=(ne=K[0]-F[0])*ne+(ne=K[1]-F[1])*ne,pe=(pe=Q[0]-W[0])*pe+(pe=Q[1]-W[1])*pe;z=y(z,Math.sqrt(ne/pe)),U=[(F[0]+K[0])/2,(F[1]+K[1])/2],V=[(W[0]+Q[0])/2,(W[1]+Q[1])/2]}else if(I.touch0)U=I.touch0[0],V=I.touch0[1];else return;I.zoom("touch",r(x(z,U,V),I.extent,s))}}function O(P,...D){if(this.__zooming){var I=S(this,D).event(P),L=P.changedTouches,R=L.length,$,z;for(bv(P),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),$=0;$<R;++$)z=L[$],I.touch0&&I.touch0[2]===z.identifier?delete I.touch0:I.touch1&&I.touch1[2]===z.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(z=Yn(z,this),Math.hypot(f[0]-z[0],f[1]-z[1])<b)){var U=kn(this).on("dblclick.zoom");U&&U.apply(this,arguments)}}}return v.wheelDelta=function(P){return arguments.length?(n=typeof P=="function"?P:Hh(+P),v):n},v.filter=function(P){return arguments.length?(e=typeof P=="function"?P:Hh(!!P),v):e},v.touchable=function(P){return arguments.length?(a=typeof P=="function"?P:Hh(!!P),v):a},v.extent=function(P){return arguments.length?(t=typeof P=="function"?P:Hh([[+P[0][0],+P[0][1]],[+P[1][0],+P[1][1]]]),v):t},v.scaleExtent=function(P){return arguments.length?(i[0]=+P[0],i[1]=+P[1],v):[i[0],i[1]]},v.translateExtent=function(P){return arguments.length?(s[0][0]=+P[0][0],s[1][0]=+P[1][0],s[0][1]=+P[0][1],s[1][1]=+P[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(P){return arguments.length?(r=P,v):r},v.duration=function(P){return arguments.length?(o=+P,v):o},v.interpolate=function(P){return arguments.length?(l=P,v):l},v.on=function(){var P=u.on.apply(u,arguments);return P===u?v:P},v.clickDistance=function(P){return arguments.length?(g=(P=+P)*P,v):Math.sqrt(g)},v.tapDistance=function(P){return arguments.length?(b=+P,v):b},v}const pg=N.createContext(null),Iee=pg.Provider,ui={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,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,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.`},oI=ui.error001();function mt(e,t){const r=N.useContext(pg);if(r===null)throw new Error(oI);return T4(r,e,t)}const ar=()=>{const e=N.useContext(pg);if(e===null)throw new Error(oI);return N.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},Lee=e=>e.userSelectionActive?"none":"all";function US({position:e,children:t,className:r,style:n,...a}){const i=mt(Lee),s=`${e}`.split("-");return T.createElement("div",{className:br(["react-flow__panel",r,...s]),style:{...n,pointerEvents:i},...a},t)}function zee({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:T.createElement(US,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},T.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const Fee=({x:e,y:t,label:r,labelStyle:n={},labelShowBg:a=!0,labelBgStyle:i={},labelBgPadding:s=[2,4],labelBgBorderRadius:o=2,children:l,className:u,...d})=>{const f=N.useRef(null),[h,p]=N.useState({x:0,y:0,width:0,height:0}),m=br(["react-flow__edge-textwrapper",u]);return N.useEffect(()=>{if(f.current){const g=f.current.getBBox();p({x:g.x,y:g.y,width:g.width,height:g.height})}},[r]),typeof r>"u"||!r?null:T.createElement("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:m,visibility:h.width?"visible":"hidden",...d},a&&T.createElement("rect",{width:h.width+2*s[0],x:-s[0],y:-s[1],height:h.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:o,ry:o}),T.createElement("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:f,style:n},r),l)};var Bee=N.memo(Fee);const HS=e=>({width:e.offsetWidth,height:e.offsetHeight}),dc=(e,t=0,r=1)=>Math.min(Math.max(e,t),r),WS=(e={x:0,y:0},t)=>({x:dc(e.x,t[0][0],t[1][0]),y:dc(e.y,t[0][1],t[1][1])}),VP=(e,t,r)=>e<t?dc(Math.abs(e-t),1,50)/50:e>r?-dc(Math.abs(e-r),1,50)/50:0,lI=(e,t)=>{const r=VP(e.x,35,t.width-35)*20,n=VP(e.y,35,t.height-35)*20;return[r,n]},cI=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},uI=(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)}),Jd=({x:e,y:t,width:r,height:n})=>({x:e,y:t,x2:e+r,y2:t+n}),dI=({x:e,y:t,x2:r,y2:n})=>({x:e,y:t,width:r-e,height:n-t}),UP=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),Vee=(e,t)=>dI(uI(Jd(e),Jd(t))),n1=(e,t)=>{const r=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),n=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(r*n)},Uee=e=>_n(e.width)&&_n(e.height)&&_n(e.x)&&_n(e.y),_n=e=>!isNaN(e)&&isFinite(e),It=Symbol.for("internals"),fI=["Enter"," ","Escape"],Hee=(e,t)=>{},Wee=e=>"nativeEvent"in e;function a1(e){var a,i;const t=Wee(e)?e.nativeEvent:e,r=((i=(a=t.composedPath)==null?void 0:a.call(t))==null?void 0:i[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(r==null?void 0:r.nodeName)||(r==null?void 0:r.hasAttribute("contenteditable"))||!!(r!=null&&r.closest(".nokey"))}const hI=e=>"clientX"in e,ls=(e,t)=>{var i,s;const r=hI(e),n=r?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,a=r?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:n-((t==null?void 0:t.left)??0),y:a-((t==null?void 0:t.top)??0)}},$m=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},Zf=({id:e,path:t,labelX:r,labelY:n,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:h,interactionWidth:p=20})=>T.createElement(T.Fragment,null,T.createElement("path",{id:e,style:d,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:h}),p&&T.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),a&&_n(r)&&_n(n)?T.createElement(Bee,{x:r,y:n,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u}):null);Zf.displayName="BaseEdge";function Pu(e,t,r){return r===void 0?r:n=>{const a=t().edges.find(i=>i.id===e);a&&r(n,{...a})}}function pI({sourceX:e,sourceY:t,targetX:r,targetY:n}){const a=Math.abs(r-e)/2,i=r<e?r+a:r-a,s=Math.abs(n-t)/2,o=n<t?n+s:n-s;return[i,o,a,s]}function mI({sourceX:e,sourceY:t,targetX:r,targetY:n,sourceControlX:a,sourceControlY:i,targetControlX:s,targetControlY:o}){const l=e*.125+a*.375+s*.375+r*.125,u=t*.125+i*.375+o*.375+n*.125,d=Math.abs(l-e),f=Math.abs(u-t);return[l,u,d,f]}var Oo;(function(e){e.Strict="strict",e.Loose="loose"})(Oo||(Oo={}));var ao;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(ao||(ao={}));var ef;(function(e){e.Partial="partial",e.Full="full"})(ef||(ef={}));var Hi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Hi||(Hi={}));var fc;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(fc||(fc={}));var ge;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(ge||(ge={}));function HP({pos:e,x1:t,y1:r,x2:n,y2:a}){return e===ge.Left||e===ge.Right?[.5*(t+n),r]:[t,.5*(r+a)]}function gI({sourceX:e,sourceY:t,sourcePosition:r=ge.Bottom,targetX:n,targetY:a,targetPosition:i=ge.Top}){const[s,o]=HP({pos:r,x1:e,y1:t,x2:n,y2:a}),[l,u]=HP({pos:i,x1:n,y1:a,x2:e,y2:t}),[d,f,h,p]=mI({sourceX:e,sourceY:t,targetX:n,targetY:a,sourceControlX:s,sourceControlY:o,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${o} ${l},${u} ${n},${a}`,d,f,h,p]}const qS=N.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:a=ge.Bottom,targetPosition:i=ge.Top,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:m,interactionWidth:g})=>{const[b,v,y]=gI({sourceX:e,sourceY:t,sourcePosition:a,targetX:r,targetY:n,targetPosition:i});return T.createElement(Zf,{path:b,labelX:v,labelY:y,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:m,interactionWidth:g})});qS.displayName="SimpleBezierEdge";const WP={[ge.Left]:{x:-1,y:0},[ge.Right]:{x:1,y:0},[ge.Top]:{x:0,y:-1},[ge.Bottom]:{x:0,y:1}},qee=({source:e,sourcePosition:t=ge.Bottom,target:r})=>t===ge.Left||t===ge.Right?e.x<r.x?{x:1,y:0}:{x:-1,y:0}:e.y<r.y?{x:0,y:1}:{x:0,y:-1},qP=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Gee({source:e,sourcePosition:t=ge.Bottom,target:r,targetPosition:n=ge.Top,center:a,offset:i}){const s=WP[t],o=WP[n],l={x:e.x+s.x*i,y:e.y+s.y*i},u={x:r.x+o.x*i,y:r.y+o.y*i},d=qee({source:l,sourcePosition:t,target:u}),f=d.x!==0?"x":"y",h=d[f];let p=[],m,g;const b={x:0,y:0},v={x:0,y:0},[y,x,j,w]=pI({sourceX:e.x,sourceY:e.y,targetX:r.x,targetY:r.y});if(s[f]*o[f]===-1){m=a.x??y,g=a.y??x;const k=[{x:m,y:l.y},{x:m,y:u.y}],_=[{x:l.x,y:g},{x:u.x,y:g}];s[f]===h?p=f==="x"?k:_:p=f==="x"?_:k}else{const k=[{x:l.x,y:u.y}],_=[{x:u.x,y:l.y}];if(f==="x"?p=s.x===h?_:k:p=s.y===h?k:_,t===n){const O=Math.abs(e[f]-r[f]);if(O<=i){const P=Math.min(i-1,i-O);s[f]===h?b[f]=(l[f]>e[f]?-1:1)*P:v[f]=(u[f]>r[f]?-1:1)*P}}if(t!==n){const O=f==="x"?"y":"x",P=s[f]===o[O],D=l[O]>u[O],I=l[O]<u[O];(s[f]===1&&(!P&&D||P&&I)||s[f]!==1&&(!P&&I||P&&D))&&(p=f==="x"?k:_)}const E={x:l.x+b.x,y:l.y+b.y},A={x:u.x+v.x,y:u.y+v.y},C=Math.max(Math.abs(E.x-p[0].x),Math.abs(A.x-p[0].x)),M=Math.max(Math.abs(E.y-p[0].y),Math.abs(A.y-p[0].y));C>=M?(m=(E.x+A.x)/2,g=p[0].y):(m=p[0].x,g=(E.y+A.y)/2)}return[[e,{x:l.x+b.x,y:l.y+b.y},...p,{x:u.x+v.x,y:u.y+v.y},r],m,g,j,w]}function Kee(e,t,r,n){const a=Math.min(qP(e,t)/2,qP(t,r)/2,n),{x:i,y:s}=t;if(e.x===i&&i===r.x||e.y===s&&s===r.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<r.x?-1:1,d=e.y<r.y?1:-1;return`L ${i+a*u},${s}Q ${i},${s} ${i},${s+a*d}`}const o=e.x<r.x?1:-1,l=e.y<r.y?-1:1;return`L ${i},${s+a*l}Q ${i},${s} ${i+a*o},${s}`}function i1({sourceX:e,sourceY:t,sourcePosition:r=ge.Bottom,targetX:n,targetY:a,targetPosition:i=ge.Top,borderRadius:s=5,centerX:o,centerY:l,offset:u=20}){const[d,f,h,p,m]=Gee({source:{x:e,y:t},sourcePosition:r,target:{x:n,y:a},targetPosition:i,center:{x:o,y:l},offset:u});return[d.reduce((b,v,y)=>{let x="";return y>0&&y<d.length-1?x=Kee(d[y-1],v,d[y+1],s):x=`${y===0?"M":"L"}${v.x} ${v.y}`,b+=x,b},""),f,h,p,m]}const mg=N.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,style:d,sourcePosition:f=ge.Bottom,targetPosition:h=ge.Top,markerEnd:p,markerStart:m,pathOptions:g,interactionWidth:b})=>{const[v,y,x]=i1({sourceX:e,sourceY:t,sourcePosition:f,targetX:r,targetY:n,targetPosition:h,borderRadius:g==null?void 0:g.borderRadius,offset:g==null?void 0:g.offset});return T.createElement(Zf,{path:v,labelX:y,labelY:x,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,style:d,markerEnd:p,markerStart:m,interactionWidth:b})});mg.displayName="SmoothStepEdge";const GS=N.memo(e=>{var t;return T.createElement(mg,{...e,pathOptions:N.useMemo(()=>{var r;return{borderRadius:0,offset:(r=e.pathOptions)==null?void 0:r.offset}},[(t=e.pathOptions)==null?void 0:t.offset])})});GS.displayName="StepEdge";function Yee({sourceX:e,sourceY:t,targetX:r,targetY:n}){const[a,i,s,o]=pI({sourceX:e,sourceY:t,targetX:r,targetY:n});return[`M ${e},${t}L ${r},${n}`,a,i,s,o]}const KS=N.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:h,interactionWidth:p})=>{const[m,g,b]=Yee({sourceX:e,sourceY:t,targetX:r,targetY:n});return T.createElement(Zf,{path:m,labelX:g,labelY:b,label:a,labelStyle:i,labelShowBg:s,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:h,interactionWidth:p})});KS.displayName="StraightEdge";function Wh(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function GP({pos:e,x1:t,y1:r,x2:n,y2:a,c:i}){switch(e){case ge.Left:return[t-Wh(t-n,i),r];case ge.Right:return[t+Wh(n-t,i),r];case ge.Top:return[t,r-Wh(r-a,i)];case ge.Bottom:return[t,r+Wh(a-r,i)]}}function yI({sourceX:e,sourceY:t,sourcePosition:r=ge.Bottom,targetX:n,targetY:a,targetPosition:i=ge.Top,curvature:s=.25}){const[o,l]=GP({pos:r,x1:e,y1:t,x2:n,y2:a,c:s}),[u,d]=GP({pos:i,x1:n,y1:a,x2:e,y2:t,c:s}),[f,h,p,m]=mI({sourceX:e,sourceY:t,targetX:n,targetY:a,sourceControlX:o,sourceControlY:l,targetControlX:u,targetControlY:d});return[`M${e},${t} C${o},${l} ${u},${d} ${n},${a}`,f,h,p,m]}const Rm=N.memo(({sourceX:e,sourceY:t,targetX:r,targetY:n,sourcePosition:a=ge.Bottom,targetPosition:i=ge.Top,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:m,pathOptions:g,interactionWidth:b})=>{const[v,y,x]=yI({sourceX:e,sourceY:t,sourcePosition:a,targetX:r,targetY:n,targetPosition:i,curvature:g==null?void 0:g.curvature});return T.createElement(Zf,{path:v,labelX:y,labelY:x,label:s,labelStyle:o,labelShowBg:l,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:h,markerEnd:p,markerStart:m,interactionWidth:b})});Rm.displayName="BezierEdge";const YS=N.createContext(null),Xee=YS.Provider;YS.Consumer;const Zee=()=>N.useContext(YS),Qee=e=>"id"in e&&"source"in e&&"target"in e,Jee=({source:e,sourceHandle:t,target:r,targetHandle:n})=>`reactflow__edge-${e}${t||""}-${r}${n||""}`,s1=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(n=>`${n}=${e[n]}`).join("&")}`,ete=(e,t)=>t.some(r=>r.source===e.source&&r.target===e.target&&(r.sourceHandle===e.sourceHandle||!r.sourceHandle&&!e.sourceHandle)&&(r.targetHandle===e.targetHandle||!r.targetHandle&&!e.targetHandle)),tte=(e,t)=>{if(!e.source||!e.target)return t;let r;return Qee(e)?r={...e}:r={...e,id:Jee(e)},ete(r,t)?t:t.concat(r)},o1=({x:e,y:t},[r,n,a],i,[s,o])=>{const l={x:(e-r)/a,y:(t-n)/a};return i?{x:s*Math.round(l.x/s),y:o*Math.round(l.y/o)}:l},vI=({x:e,y:t},[r,n,a])=>({x:e*a+r,y:t*a+n}),mo=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const r=(e.width??0)*t[0],n=(e.height??0)*t[1],a={x:e.position.x-r,y:e.position.y-n};return{...a,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-r,y:e.positionAbsolute.y-n}:a}},gg=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const r=e.reduce((n,a)=>{const{x:i,y:s}=mo(a,t).positionAbsolute;return uI(n,Jd({x:i,y:s,width:a.width||0,height:a.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return dI(r)},xI=(e,t,[r,n,a]=[0,0,1],i=!1,s=!1,o=[0,0])=>{const l={x:(t.x-r)/a,y:(t.y-n)/a,width:t.width/a,height:t.height/a},u=[];return e.forEach(d=>{const{width:f,height:h,selectable:p=!0,hidden:m=!1}=d;if(s&&!p||m)return!1;const{positionAbsolute:g}=mo(d,o),b={x:g.x,y:g.y,width:f||0,height:h||0},v=n1(l,b),y=typeof f>"u"||typeof h>"u"||f===null||h===null,x=i&&v>0,j=(f||0)*(h||0);(y||x||v>=j||d.dragging)&&u.push(d)}),u},bI=(e,t)=>{const r=e.map(n=>n.id);return t.filter(n=>r.includes(n.source)||r.includes(n.target))},wI=(e,t,r,n,a,i=.1)=>{const s=t/(e.width*(1+i)),o=r/(e.height*(1+i)),l=Math.min(s,o),u=dc(l,n,a),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*u,p=r/2-f*u;return{x:h,y:p,zoom:u}},Ws=(e,t=0)=>e.transition().duration(t);function KP(e,t,r,n){return(t[r]||[]).reduce((a,i)=>{var s,o;return`${e.id}-${i.id}-${r}`!==n&&a.push({id:i.id||null,type:r,nodeId:e.id,x:(((s=e.positionAbsolute)==null?void 0:s.x)??0)+i.x+i.width/2,y:(((o=e.positionAbsolute)==null?void 0:o.y)??0)+i.y+i.height/2}),a},[])}function rte(e,t,r,n,a,i){const{x:s,y:o}=ls(e),u=t.elementsFromPoint(s,o).find(m=>m.classList.contains("react-flow__handle"));if(u){const m=u.getAttribute("data-nodeid");if(m){const g=XS(void 0,u),b=u.getAttribute("data-handleid"),v=i({nodeId:m,id:b,type:g});if(v){const y=a.find(x=>x.nodeId===m&&x.type===g&&x.id===b);return{handle:{id:b,type:g,nodeId:m,x:(y==null?void 0:y.x)||r.x,y:(y==null?void 0:y.y)||r.y},validHandleResult:v}}}}let d=[],f=1/0;if(a.forEach(m=>{const g=Math.sqrt((m.x-r.x)**2+(m.y-r.y)**2);if(g<=n){const b=i(m);g<=f&&(g<f?d=[{handle:m,validHandleResult:b}]:g===f&&d.push({handle:m,validHandleResult:b}),f=g)}}),!d.length)return{handle:null,validHandleResult:jI()};if(d.length===1)return d[0];const h=d.some(({validHandleResult:m})=>m.isValid),p=d.some(({handle:m})=>m.type==="target");return d.find(({handle:m,validHandleResult:g})=>p?m.type==="target":h?g.isValid:!0)||d[0]}const nte={source:null,target:null,sourceHandle:null,targetHandle:null},jI=()=>({handleDomNode:null,isValid:!1,connection:nte,endHandle:null});function kI(e,t,r,n,a,i,s){const o=a==="target",l=s.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),u={...jI(),handleDomNode:l};if(l){const d=XS(void 0,l),f=l.getAttribute("data-nodeid"),h=l.getAttribute("data-handleid"),p=l.classList.contains("connectable"),m=l.classList.contains("connectableend"),g={source:o?f:r,sourceHandle:o?h:n,target:o?r:f,targetHandle:o?n:h};u.connection=g,p&&m&&(t===Oo.Strict?o&&d==="source"||!o&&d==="target":f!==r||h!==n)&&(u.endHandle={nodeId:f,handleId:h,type:d},u.isValid=i(g))}return u}function ate({nodes:e,nodeId:t,handleId:r,handleType:n}){return e.reduce((a,i)=>{if(i[It]){const{handleBounds:s}=i[It];let o=[],l=[];s&&(o=KP(i,s,"source",`${t}-${r}-${n}`),l=KP(i,s,"target",`${t}-${r}-${n}`)),a.push(...o,...l)}return a},[])}function XS(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function wv(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function ite(e,t){let r=null;return t?r="valid":e&&!t&&(r="invalid"),r}function SI({event:e,handleId:t,nodeId:r,onConnect:n,isTarget:a,getState:i,setState:s,isValidConnection:o,edgeUpdaterType:l,onReconnectEnd:u}){const d=cI(e.target),{connectionMode:f,domNode:h,autoPanOnConnect:p,connectionRadius:m,onConnectStart:g,panBy:b,getNodes:v,cancelConnection:y}=i();let x=0,j;const{x:w,y:S}=ls(e),k=d==null?void 0:d.elementFromPoint(w,S),_=XS(l,k),E=h==null?void 0:h.getBoundingClientRect();if(!E||!_)return;let A,C=ls(e,E),M=!1,O=null,P=!1,D=null;const I=ate({nodes:v(),nodeId:r,handleId:t,handleType:_}),L=()=>{if(!p)return;const[z,U]=lI(C,E);b({x:z,y:U}),x=requestAnimationFrame(L)};s({connectionPosition:C,connectionStatus:null,connectionNodeId:r,connectionHandleId:t,connectionHandleType:_,connectionStartHandle:{nodeId:r,handleId:t,type:_},connectionEndHandle:null}),g==null||g(e,{nodeId:r,handleId:t,handleType:_});function R(z){const{transform:U}=i();C=ls(z,E);const{handle:V,validHandleResult:F}=rte(z,d,o1(C,U,!1,[1,1]),m,I,W=>kI(W,f,r,t,a?"target":"source",o,d));if(j=V,M||(L(),M=!0),D=F.handleDomNode,O=F.connection,P=F.isValid,s({connectionPosition:j&&P?vI({x:j.x,y:j.y},U):C,connectionStatus:ite(!!j,P),connectionEndHandle:F.endHandle}),!j&&!P&&!D)return wv(A);O.source!==O.target&&D&&(wv(A),A=D,D.classList.add("connecting","react-flow__handle-connecting"),D.classList.toggle("valid",P),D.classList.toggle("react-flow__handle-valid",P))}function $(z){var U,V;(j||D)&&O&&P&&(n==null||n(O)),(V=(U=i()).onConnectEnd)==null||V.call(U,z),l&&(u==null||u(z)),wv(A),y(),cancelAnimationFrame(x),M=!1,P=!1,O=null,D=null,d.removeEventListener("mousemove",R),d.removeEventListener("mouseup",$),d.removeEventListener("touchmove",R),d.removeEventListener("touchend",$)}d.addEventListener("mousemove",R),d.addEventListener("mouseup",$),d.addEventListener("touchmove",R),d.addEventListener("touchend",$)}const YP=()=>!0,ste=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),ote=(e,t,r)=>n=>{const{connectionStartHandle:a,connectionEndHandle:i,connectionClickStartHandle:s}=n;return{connecting:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.handleId)===t&&(a==null?void 0:a.type)===r||(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===r,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===r}},NI=N.forwardRef(({type:e="source",position:t=ge.Top,isValidConnection:r,isConnectable:n=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:s,onConnect:o,children:l,className:u,onMouseDown:d,onTouchStart:f,...h},p)=>{var E,A;const m=s||null,g=e==="target",b=ar(),v=Zee(),{connectOnClick:y,noPanClassName:x}=mt(ste,dr),{connecting:j,clickConnecting:w}=mt(ote(v,m,e),dr);v||(A=(E=b.getState()).onError)==null||A.call(E,"010",ui.error010());const S=C=>{const{defaultEdgeOptions:M,onConnect:O,hasDefaultEdges:P}=b.getState(),D={...M,...C};if(P){const{edges:I,setEdges:L}=b.getState();L(tte(D,I))}O==null||O(D),o==null||o(D)},k=C=>{if(!v)return;const M=hI(C);a&&(M&&C.button===0||!M)&&SI({event:C,handleId:m,nodeId:v,onConnect:S,isTarget:g,getState:b.getState,setState:b.setState,isValidConnection:r||b.getState().isValidConnection||YP}),M?d==null||d(C):f==null||f(C)},_=C=>{const{onClickConnectStart:M,onClickConnectEnd:O,connectionClickStartHandle:P,connectionMode:D,isValidConnection:I}=b.getState();if(!v||!P&&!a)return;if(!P){M==null||M(C,{nodeId:v,handleId:m,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,handleId:m}});return}const L=cI(C.target),R=r||I||YP,{connection:$,isValid:z}=kI({nodeId:v,id:m,type:e},D,P.nodeId,P.handleId||null,P.type,R,L);z&&S($),O==null||O(C),b.setState({connectionClickStartHandle:null})};return T.createElement("div",{"data-handleid":m,"data-nodeid":v,"data-handlepos":t,"data-id":`${v}-${m}-${e}`,className:br(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",x,u,{source:!g,target:g,connectable:n,connectablestart:a,connectableend:i,connecting:w,connectionindicator:n&&(a&&!j||i&&j)}]),onMouseDown:k,onTouchStart:k,onClick:y?_:void 0,ref:p,...h},l)});NI.displayName="Handle";var bs=N.memo(NI);const _I=({data:e,isConnectable:t,targetPosition:r=ge.Top,sourcePosition:n=ge.Bottom})=>T.createElement(T.Fragment,null,T.createElement(bs,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label,T.createElement(bs,{type:"source",position:n,isConnectable:t}));_I.displayName="DefaultNode";var l1=N.memo(_I);const EI=({data:e,isConnectable:t,sourcePosition:r=ge.Bottom})=>T.createElement(T.Fragment,null,e==null?void 0:e.label,T.createElement(bs,{type:"source",position:r,isConnectable:t}));EI.displayName="InputNode";var PI=N.memo(EI);const AI=({data:e,isConnectable:t,targetPosition:r=ge.Top})=>T.createElement(T.Fragment,null,T.createElement(bs,{type:"target",position:r,isConnectable:t}),e==null?void 0:e.label);AI.displayName="OutputNode";var OI=N.memo(AI);const ZS=()=>null;ZS.displayName="GroupNode";const lte=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),qh=e=>e.id;function cte(e,t){return dr(e.selectedNodes.map(qh),t.selectedNodes.map(qh))&&dr(e.selectedEdges.map(qh),t.selectedEdges.map(qh))}const CI=N.memo(({onSelectionChange:e})=>{const t=ar(),{selectedNodes:r,selectedEdges:n}=mt(lte,cte);return N.useEffect(()=>{const a={nodes:r,edges:n};e==null||e(a),t.getState().onSelectionChange.forEach(i=>i(a))},[r,n,e]),null});CI.displayName="SelectionListener";const ute=e=>!!e.onSelectionChange;function dte({onSelectionChange:e}){const t=mt(ute);return e||t?T.createElement(CI,{onSelectionChange:e}):null}const fte=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function rl(e,t){N.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function De(e,t,r){N.useEffect(()=>{typeof t<"u"&&r({[e]:t})},[t])}const hte=({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:a,onConnectStart:i,onConnectEnd:s,onClickConnectStart:o,onClickConnectEnd:l,nodesDraggable:u,nodesConnectable:d,nodesFocusable:f,edgesFocusable:h,edgesUpdatable:p,elevateNodesOnSelect:m,minZoom:g,maxZoom:b,nodeExtent:v,onNodesChange:y,onEdgesChange:x,elementsSelectable:j,connectionMode:w,snapGrid:S,snapToGrid:k,translateExtent:_,connectOnClick:E,defaultEdgeOptions:A,fitView:C,fitViewOptions:M,onNodesDelete:O,onEdgesDelete:P,onNodeDrag:D,onNodeDragStart:I,onNodeDragStop:L,onSelectionDrag:R,onSelectionDragStart:$,onSelectionDragStop:z,noPanClassName:U,nodeOrigin:V,rfId:F,autoPanOnConnect:W,autoPanOnNodeDrag:K,onError:Q,connectionRadius:ne,isValidConnection:pe,nodeDragThreshold:X})=>{const{setNodes:ee,setEdges:ie,setDefaultNodesAndEdges:G,setMinZoom:Ee,setMaxZoom:be,setTranslateExtent:Pe,setNodeExtent:Ce,reset:ke}=mt(fte,dr),oe=ar();return N.useEffect(()=>{const Ze=n==null?void 0:n.map(sr=>({...sr,...A}));return G(r,Ze),()=>{ke()}},[]),De("defaultEdgeOptions",A,oe.setState),De("connectionMode",w,oe.setState),De("onConnect",a,oe.setState),De("onConnectStart",i,oe.setState),De("onConnectEnd",s,oe.setState),De("onClickConnectStart",o,oe.setState),De("onClickConnectEnd",l,oe.setState),De("nodesDraggable",u,oe.setState),De("nodesConnectable",d,oe.setState),De("nodesFocusable",f,oe.setState),De("edgesFocusable",h,oe.setState),De("edgesUpdatable",p,oe.setState),De("elementsSelectable",j,oe.setState),De("elevateNodesOnSelect",m,oe.setState),De("snapToGrid",k,oe.setState),De("snapGrid",S,oe.setState),De("onNodesChange",y,oe.setState),De("onEdgesChange",x,oe.setState),De("connectOnClick",E,oe.setState),De("fitViewOnInit",C,oe.setState),De("fitViewOnInitOptions",M,oe.setState),De("onNodesDelete",O,oe.setState),De("onEdgesDelete",P,oe.setState),De("onNodeDrag",D,oe.setState),De("onNodeDragStart",I,oe.setState),De("onNodeDragStop",L,oe.setState),De("onSelectionDrag",R,oe.setState),De("onSelectionDragStart",$,oe.setState),De("onSelectionDragStop",z,oe.setState),De("noPanClassName",U,oe.setState),De("nodeOrigin",V,oe.setState),De("rfId",F,oe.setState),De("autoPanOnConnect",W,oe.setState),De("autoPanOnNodeDrag",K,oe.setState),De("onError",Q,oe.setState),De("connectionRadius",ne,oe.setState),De("isValidConnection",pe,oe.setState),De("nodeDragThreshold",X,oe.setState),rl(e,ee),rl(t,ie),rl(g,Ee),rl(b,be),rl(_,Pe),rl(v,Ce),null},XP={display:"none"},pte={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},TI="react-flow__node-desc",MI="react-flow__edge-desc",mte="react-flow__aria-live",gte=e=>e.ariaLiveMessage;function yte({rfId:e}){const t=mt(gte);return T.createElement("div",{id:`${mte}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:pte},t)}function vte({rfId:e,disableKeyboardA11y:t}){return T.createElement(T.Fragment,null,T.createElement("div",{id:`${TI}-${e}`,style:XP},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),T.createElement("div",{id:`${MI}-${e}`,style:XP},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&T.createElement(yte,{rfId:e}))}var tf=(e=null,t={actInsideInputWithModifier:!0})=>{const[r,n]=N.useState(!1),a=N.useRef(!1),i=N.useRef(new Set([])),[s,o]=N.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.split("+")),d=u.reduce((f,h)=>f.concat(...h),[]);return[u,d]}return[[],[]]},[e]);return N.useEffect(()=>{const l=typeof document<"u"?document:null,u=(t==null?void 0:t.target)||l;if(e!==null){const d=p=>{if(a.current=p.ctrlKey||p.metaKey||p.shiftKey,(!a.current||a.current&&!t.actInsideInputWithModifier)&&a1(p))return!1;const g=QP(p.code,o);i.current.add(p[g]),ZP(s,i.current,!1)&&(p.preventDefault(),n(!0))},f=p=>{if((!a.current||a.current&&!t.actInsideInputWithModifier)&&a1(p))return!1;const g=QP(p.code,o);ZP(s,i.current,!0)?(n(!1),i.current.clear()):i.current.delete(p[g]),p.key==="Meta"&&i.current.clear(),a.current=!1},h=()=>{i.current.clear(),n(!1)};return u==null||u.addEventListener("keydown",d),u==null||u.addEventListener("keyup",f),window.addEventListener("blur",h),()=>{u==null||u.removeEventListener("keydown",d),u==null||u.removeEventListener("keyup",f),window.removeEventListener("blur",h)}}},[e,n]),r};function ZP(e,t,r){return e.filter(n=>r||n.length===t.size).some(n=>n.every(a=>t.has(a)))}function QP(e,t){return t.includes(e)?"code":"key"}function $I(e,t,r,n){var o,l;const a=e.parentNode||e.parentId;if(!a)return r;const i=t.get(a),s=mo(i,n);return $I(i,t,{x:(r.x??0)+s.x,y:(r.y??0)+s.y,z:(((o=i[It])==null?void 0:o.z)??0)>(r.z??0)?((l=i[It])==null?void 0:l.z)??0:r.z??0},n)}function RI(e,t,r){e.forEach(n=>{var i;const a=n.parentNode||n.parentId;if(a&&!e.has(a))throw new Error(`Parent node ${a} not found`);if(a||r!=null&&r[n.id]){const{x:s,y:o,z:l}=$I(n,e,{...n.position,z:((i=n[It])==null?void 0:i.z)??0},t);n.positionAbsolute={x:s,y:o},n[It].z=l,r!=null&&r[n.id]&&(n[It].isParent=!0)}})}function jv(e,t,r,n){const a=new Map,i={},s=n?1e3:0;return e.forEach(o=>{var p;const l=(_n(o.zIndex)?o.zIndex:0)+(o.selected?s:0),u=t.get(o.id),d={...o,positionAbsolute:{x:o.position.x,y:o.position.y}},f=o.parentNode||o.parentId;f&&(i[f]=!0);const h=(u==null?void 0:u.type)&&(u==null?void 0:u.type)!==o.type;Object.defineProperty(d,It,{enumerable:!1,value:{handleBounds:h||(p=u==null?void 0:u[It])==null?void 0:p.handleBounds,z:l}}),a.set(o.id,d)}),RI(a,r,i),a}function DI(e,t={}){const{getNodes:r,width:n,height:a,minZoom:i,maxZoom:s,d3Zoom:o,d3Selection:l,fitViewOnInitDone:u,fitViewOnInit:d,nodeOrigin:f}=e(),h=t.initial&&!u&&d;if(o&&l&&(h||!t.initial)){const m=r().filter(b=>{var y;const v=t.includeHiddenNodes?b.width&&b.height:!b.hidden;return(y=t.nodes)!=null&&y.length?v&&t.nodes.some(x=>x.id===b.id):v}),g=m.every(b=>b.width&&b.height);if(m.length>0&&g){const b=gg(m,f),{x:v,y,zoom:x}=wI(b,n,a,t.minZoom??i,t.maxZoom??s,t.padding??.1),j=Ya.translate(v,y).scale(x);return typeof t.duration=="number"&&t.duration>0?o.transform(Ws(l,t.duration),j):o.transform(l,j),!0}}return!1}function xte(e,t){return e.forEach(r=>{const n=t.get(r.id);n&&t.set(n.id,{...n,[It]:n[It],selected:r.selected})}),new Map(t)}function bte(e,t){return t.map(r=>{const n=e.find(a=>a.id===r.id);return n&&(r.selected=n.selected),r})}function Gh({changedNodes:e,changedEdges:t,get:r,set:n}){const{nodeInternals:a,edges:i,onNodesChange:s,onEdgesChange:o,hasDefaultNodes:l,hasDefaultEdges:u}=r();e!=null&&e.length&&(l&&n({nodeInternals:xte(e,a)}),s==null||s(e)),t!=null&&t.length&&(u&&n({edges:bte(t,i)}),o==null||o(t))}const nl=()=>{},wte={zoomIn:nl,zoomOut:nl,zoomTo:nl,getZoom:()=>1,setViewport:nl,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:nl,fitBounds:nl,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},jte=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),kte=()=>{const e=ar(),{d3Zoom:t,d3Selection:r}=mt(jte,dr);return N.useMemo(()=>r&&t?{zoomIn:a=>t.scaleBy(Ws(r,a==null?void 0:a.duration),1.2),zoomOut:a=>t.scaleBy(Ws(r,a==null?void 0:a.duration),1/1.2),zoomTo:(a,i)=>t.scaleTo(Ws(r,i==null?void 0:i.duration),a),getZoom:()=>e.getState().transform[2],setViewport:(a,i)=>{const[s,o,l]=e.getState().transform,u=Ya.translate(a.x??s,a.y??o).scale(a.zoom??l);t.transform(Ws(r,i==null?void 0:i.duration),u)},getViewport:()=>{const[a,i,s]=e.getState().transform;return{x:a,y:i,zoom:s}},fitView:a=>DI(e.getState,a),setCenter:(a,i,s)=>{const{width:o,height:l,maxZoom:u}=e.getState(),d=typeof(s==null?void 0:s.zoom)<"u"?s.zoom:u,f=o/2-a*d,h=l/2-i*d,p=Ya.translate(f,h).scale(d);t.transform(Ws(r,s==null?void 0:s.duration),p)},fitBounds:(a,i)=>{const{width:s,height:o,minZoom:l,maxZoom:u}=e.getState(),{x:d,y:f,zoom:h}=wI(a,s,o,l,u,(i==null?void 0:i.padding)??.1),p=Ya.translate(d,f).scale(h);t.transform(Ws(r,i==null?void 0:i.duration),p)},project:a=>{const{transform:i,snapToGrid:s,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),o1(a,i,s,o)},screenToFlowPosition:a=>{const{transform:i,snapToGrid:s,snapGrid:o,domNode:l}=e.getState();if(!l)return a;const{x:u,y:d}=l.getBoundingClientRect(),f={x:a.x-u,y:a.y-d};return o1(f,i,s,o)},flowToScreenPosition:a=>{const{transform:i,domNode:s}=e.getState();if(!s)return a;const{x:o,y:l}=s.getBoundingClientRect(),u=vI(a,i);return{x:u.x+o,y:u.y+l}},viewportInitialized:!0}:wte,[t,r])};function QS(){const e=kte(),t=ar(),r=N.useCallback(()=>t.getState().getNodes().map(g=>({...g})),[]),n=N.useCallback(g=>t.getState().nodeInternals.get(g),[]),a=N.useCallback(()=>{const{edges:g=[]}=t.getState();return g.map(b=>({...b}))},[]),i=N.useCallback(g=>{const{edges:b=[]}=t.getState();return b.find(v=>v.id===g)},[]),s=N.useCallback(g=>{const{getNodes:b,setNodes:v,hasDefaultNodes:y,onNodesChange:x}=t.getState(),j=b(),w=typeof g=="function"?g(j):g;if(y)v(w);else if(x){const S=w.length===0?j.map(k=>({type:"remove",id:k.id})):w.map(k=>({item:k,type:"reset"}));x(S)}},[]),o=N.useCallback(g=>{const{edges:b=[],setEdges:v,hasDefaultEdges:y,onEdgesChange:x}=t.getState(),j=typeof g=="function"?g(b):g;if(y)v(j);else if(x){const w=j.length===0?b.map(S=>({type:"remove",id:S.id})):j.map(S=>({item:S,type:"reset"}));x(w)}},[]),l=N.useCallback(g=>{const b=Array.isArray(g)?g:[g],{getNodes:v,setNodes:y,hasDefaultNodes:x,onNodesChange:j}=t.getState();if(x){const S=[...v(),...b];y(S)}else if(j){const w=b.map(S=>({item:S,type:"add"}));j(w)}},[]),u=N.useCallback(g=>{const b=Array.isArray(g)?g:[g],{edges:v=[],setEdges:y,hasDefaultEdges:x,onEdgesChange:j}=t.getState();if(x)y([...v,...b]);else if(j){const w=b.map(S=>({item:S,type:"add"}));j(w)}},[]),d=N.useCallback(()=>{const{getNodes:g,edges:b=[],transform:v}=t.getState(),[y,x,j]=v;return{nodes:g().map(w=>({...w})),edges:b.map(w=>({...w})),viewport:{x:y,y:x,zoom:j}}},[]),f=N.useCallback(({nodes:g,edges:b})=>{const{nodeInternals:v,getNodes:y,edges:x,hasDefaultNodes:j,hasDefaultEdges:w,onNodesDelete:S,onEdgesDelete:k,onNodesChange:_,onEdgesChange:E}=t.getState(),A=(g||[]).map(D=>D.id),C=(b||[]).map(D=>D.id),M=y().reduce((D,I)=>{const L=I.parentNode||I.parentId,R=!A.includes(I.id)&&L&&D.find(z=>z.id===L);return(typeof I.deletable=="boolean"?I.deletable:!0)&&(A.includes(I.id)||R)&&D.push(I),D},[]),O=x.filter(D=>typeof D.deletable=="boolean"?D.deletable:!0),P=O.filter(D=>C.includes(D.id));if(M||P){const D=bI(M,O),I=[...P,...D],L=I.reduce((R,$)=>(R.includes($.id)||R.push($.id),R),[]);if((w||j)&&(w&&t.setState({edges:x.filter(R=>!L.includes(R.id))}),j&&(M.forEach(R=>{v.delete(R.id)}),t.setState({nodeInternals:new Map(v)}))),L.length>0&&(k==null||k(I),E&&E(L.map(R=>({id:R,type:"remove"})))),M.length>0&&(S==null||S(M),_)){const R=M.map($=>({id:$.id,type:"remove"}));_(R)}}},[]),h=N.useCallback(g=>{const b=Uee(g),v=b?null:t.getState().nodeInternals.get(g.id);return!b&&!v?[null,null,b]:[b?g:UP(v),v,b]},[]),p=N.useCallback((g,b=!0,v)=>{const[y,x,j]=h(g);return y?(v||t.getState().getNodes()).filter(w=>{if(!j&&(w.id===x.id||!w.positionAbsolute))return!1;const S=UP(w),k=n1(S,y);return b&&k>0||k>=y.width*y.height}):[]},[]),m=N.useCallback((g,b,v=!0)=>{const[y]=h(g);if(!y)return!1;const x=n1(y,b);return v&&x>0||x>=y.width*y.height},[]);return N.useMemo(()=>({...e,getNodes:r,getNode:n,getEdges:a,getEdge:i,setNodes:s,setEdges:o,addNodes:l,addEdges:u,toObject:d,deleteElements:f,getIntersectingNodes:p,isNodeIntersecting:m}),[e,r,n,a,i,s,o,l,u,d,f,p,m])}const Ste={actInsideInputWithModifier:!1};var Nte=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const r=ar(),{deleteElements:n}=QS(),a=tf(e,Ste),i=tf(t);N.useEffect(()=>{if(a){const{edges:s,getNodes:o}=r.getState(),l=o().filter(d=>d.selected),u=s.filter(d=>d.selected);n({nodes:l,edges:u}),r.setState({nodesSelectionActive:!1})}},[a]),N.useEffect(()=>{r.setState({multiSelectionActive:i})},[i])};function _te(e){const t=ar();N.useEffect(()=>{let r;const n=()=>{var i,s;if(!e.current)return;const a=HS(e.current);(a.height===0||a.width===0)&&((s=(i=t.getState()).onError)==null||s.call(i,"004",ui.error004())),t.setState({width:a.width||500,height:a.height||500})};return n(),window.addEventListener("resize",n),e.current&&(r=new ResizeObserver(()=>n()),r.observe(e.current)),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}},[])}const JS={position:"absolute",width:"100%",height:"100%",top:0,left:0},Ete=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Kh=e=>({x:e.x,y:e.y,zoom:e.k}),al=(e,t)=>e.target.closest(`.${t}`),JP=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),eA=e=>{const t=e.ctrlKey&&$m()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},Pte=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),Ate=({onMove:e,onMoveStart:t,onMoveEnd:r,onPaneContextMenu:n,zoomOnScroll:a=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:o=.5,panOnScrollMode:l=ao.Free,zoomOnDoubleClick:u=!0,elementsSelectable:d,panOnDrag:f=!0,defaultViewport:h,translateExtent:p,minZoom:m,maxZoom:g,zoomActivationKeyCode:b,preventScrolling:v=!0,children:y,noWheelClassName:x,noPanClassName:j})=>{const w=N.useRef(),S=ar(),k=N.useRef(!1),_=N.useRef(!1),E=N.useRef(null),A=N.useRef({x:0,y:0,zoom:0}),{d3Zoom:C,d3Selection:M,d3ZoomHandler:O,userSelectionActive:P}=mt(Pte,dr),D=tf(b),I=N.useRef(0),L=N.useRef(!1),R=N.useRef();return _te(E),N.useEffect(()=>{if(E.current){const $=E.current.getBoundingClientRect(),z=sI().scaleExtent([m,g]).translateExtent(p),U=kn(E.current).call(z),V=Ya.translate(h.x,h.y).scale(dc(h.zoom,m,g)),F=[[0,0],[$.width,$.height]],W=z.constrain()(V,F,p);z.transform(U,W),z.wheelDelta(eA),S.setState({d3Zoom:z,d3Selection:U,d3ZoomHandler:U.on("wheel.zoom"),transform:[W.x,W.y,W.k],domNode:E.current.closest(".react-flow")})}},[]),N.useEffect(()=>{M&&C&&(s&&!D&&!P?M.on("wheel.zoom",$=>{if(al($,x))return!1;$.preventDefault(),$.stopImmediatePropagation();const z=M.property("__zoom").k||1;if($.ctrlKey&&i){const pe=Yn($),X=eA($),ee=z*Math.pow(2,X);C.scaleTo(M,ee,pe,$);return}const U=$.deltaMode===1?20:1;let V=l===ao.Vertical?0:$.deltaX*U,F=l===ao.Horizontal?0:$.deltaY*U;!$m()&&$.shiftKey&&l!==ao.Vertical&&(V=$.deltaY*U,F=0),C.translateBy(M,-(V/z)*o,-(F/z)*o,{internal:!0});const W=Kh(M.property("__zoom")),{onViewportChangeStart:K,onViewportChange:Q,onViewportChangeEnd:ne}=S.getState();clearTimeout(R.current),L.current||(L.current=!0,t==null||t($,W),K==null||K(W)),L.current&&(e==null||e($,W),Q==null||Q(W),R.current=setTimeout(()=>{r==null||r($,W),ne==null||ne(W),L.current=!1},150))},{passive:!1}):typeof O<"u"&&M.on("wheel.zoom",function($,z){if(!v&&$.type==="wheel"&&!$.ctrlKey||al($,x))return null;$.preventDefault(),O.call(this,$,z)},{passive:!1}))},[P,s,l,M,C,O,D,i,v,x,t,e,r]),N.useEffect(()=>{C&&C.on("start",$=>{var V,F;if(!$.sourceEvent||$.sourceEvent.internal)return null;I.current=(V=$.sourceEvent)==null?void 0:V.button;const{onViewportChangeStart:z}=S.getState(),U=Kh($.transform);k.current=!0,A.current=U,((F=$.sourceEvent)==null?void 0:F.type)==="mousedown"&&S.setState({paneDragging:!0}),z==null||z(U),t==null||t($.sourceEvent,U)})},[C,t]),N.useEffect(()=>{C&&(P&&!k.current?C.on("zoom",null):P||C.on("zoom",$=>{var U;const{onViewportChange:z}=S.getState();if(S.setState({transform:[$.transform.x,$.transform.y,$.transform.k]}),_.current=!!(n&&JP(f,I.current??0)),(e||z)&&!((U=$.sourceEvent)!=null&&U.internal)){const V=Kh($.transform);z==null||z(V),e==null||e($.sourceEvent,V)}}))},[P,C,e,f,n]),N.useEffect(()=>{C&&C.on("end",$=>{if(!$.sourceEvent||$.sourceEvent.internal)return null;const{onViewportChangeEnd:z}=S.getState();if(k.current=!1,S.setState({paneDragging:!1}),n&&JP(f,I.current??0)&&!_.current&&n($.sourceEvent),_.current=!1,(r||z)&&Ete(A.current,$.transform)){const U=Kh($.transform);A.current=U,clearTimeout(w.current),w.current=setTimeout(()=>{z==null||z(U),r==null||r($.sourceEvent,U)},s?150:0)}})},[C,s,f,r,n]),N.useEffect(()=>{C&&C.filter($=>{const z=D||a,U=i&&$.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&$.button===1&&$.type==="mousedown"&&(al($,"react-flow__node")||al($,"react-flow__edge")))return!0;if(!f&&!z&&!s&&!u&&!i||P||!u&&$.type==="dblclick"||al($,x)&&$.type==="wheel"||al($,j)&&($.type!=="wheel"||s&&$.type==="wheel"&&!D)||!i&&$.ctrlKey&&$.type==="wheel"||!z&&!s&&!U&&$.type==="wheel"||!f&&($.type==="mousedown"||$.type==="touchstart")||Array.isArray(f)&&!f.includes($.button)&&$.type==="mousedown")return!1;const V=Array.isArray(f)&&f.includes($.button)||!$.button||$.button<=1;return(!$.ctrlKey||$.type==="wheel")&&V})},[P,C,a,i,s,u,f,d,D]),T.createElement("div",{className:"react-flow__renderer",ref:E,style:JS},y)},Ote=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Cte(){const{userSelectionActive:e,userSelectionRect:t}=mt(Ote,dr);return e&&t?T.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function tA(e,t){const r=t.parentNode||t.parentId,n=e.find(a=>a.id===r);if(n){const a=t.position.x+t.width-n.width,i=t.position.y+t.height-n.height;if(a>0||i>0||t.position.x<0||t.position.y<0){if(n.style={...n.style},n.style.width=n.style.width??n.width,n.style.height=n.style.height??n.height,a>0&&(n.style.width+=a),i>0&&(n.style.height+=i),t.position.x<0){const s=Math.abs(t.position.x);n.position.x=n.position.x-s,n.style.width+=s,t.position.x=0}if(t.position.y<0){const s=Math.abs(t.position.y);n.position.y=n.position.y-s,n.style.height+=s,t.position.y=0}n.width=n.style.width,n.height=n.style.height}}}function II(e,t){if(e.some(n=>n.type==="reset"))return e.filter(n=>n.type==="reset").map(n=>n.item);const r=e.filter(n=>n.type==="add").map(n=>n.item);return t.reduce((n,a)=>{const i=e.filter(o=>o.id===a.id);if(i.length===0)return n.push(a),n;const s={...a};for(const o of i)if(o)switch(o.type){case"select":{s.selected=o.selected;break}case"position":{typeof o.position<"u"&&(s.position=o.position),typeof o.positionAbsolute<"u"&&(s.positionAbsolute=o.positionAbsolute),typeof o.dragging<"u"&&(s.dragging=o.dragging),s.expandParent&&tA(n,s);break}case"dimensions":{typeof o.dimensions<"u"&&(s.width=o.dimensions.width,s.height=o.dimensions.height),typeof o.updateStyle<"u"&&(s.style={...s.style||{},...o.dimensions}),typeof o.resizing=="boolean"&&(s.resizing=o.resizing),s.expandParent&&tA(n,s);break}case"remove":return n}return n.push(s),n},r)}function LI(e,t){return II(e,t)}function Tte(e,t){return II(e,t)}const Fi=(e,t)=>({id:e,type:"select",selected:t});function Pl(e,t){return e.reduce((r,n)=>{const a=t.includes(n.id);return!n.selected&&a?(n.selected=!0,r.push(Fi(n.id,!0))):n.selected&&!a&&(n.selected=!1,r.push(Fi(n.id,!1))),r},[])}const kv=(e,t)=>r=>{r.target===t.current&&(e==null||e(r))},Mte=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),zI=N.memo(({isSelecting:e,selectionMode:t=ef.Full,panOnDrag:r,onSelectionStart:n,onSelectionEnd:a,onPaneClick:i,onPaneContextMenu:s,onPaneScroll:o,onPaneMouseEnter:l,onPaneMouseMove:u,onPaneMouseLeave:d,children:f})=>{const h=N.useRef(null),p=ar(),m=N.useRef(0),g=N.useRef(0),b=N.useRef(),{userSelectionActive:v,elementsSelectable:y,dragging:x}=mt(Mte,dr),j=()=>{p.setState({userSelectionActive:!1,userSelectionRect:null}),m.current=0,g.current=0},w=O=>{i==null||i(O),p.getState().resetSelectedElements(),p.setState({nodesSelectionActive:!1})},S=O=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){O.preventDefault();return}s==null||s(O)},k=o?O=>o(O):void 0,_=O=>{const{resetSelectedElements:P,domNode:D}=p.getState();if(b.current=D==null?void 0:D.getBoundingClientRect(),!y||!e||O.button!==0||O.target!==h.current||!b.current)return;const{x:I,y:L}=ls(O,b.current);P(),p.setState({userSelectionRect:{width:0,height:0,startX:I,startY:L,x:I,y:L}}),n==null||n(O)},E=O=>{const{userSelectionRect:P,nodeInternals:D,edges:I,transform:L,onNodesChange:R,onEdgesChange:$,nodeOrigin:z,getNodes:U}=p.getState();if(!e||!b.current||!P)return;p.setState({userSelectionActive:!0,nodesSelectionActive:!1});const V=ls(O,b.current),F=P.startX??0,W=P.startY??0,K={...P,x:V.x<F?V.x:F,y:V.y<W?V.y:W,width:Math.abs(V.x-F),height:Math.abs(V.y-W)},Q=U(),ne=xI(D,K,L,t===ef.Partial,!0,z),pe=bI(ne,I).map(ee=>ee.id),X=ne.map(ee=>ee.id);if(m.current!==X.length){m.current=X.length;const ee=Pl(Q,X);ee.length&&(R==null||R(ee))}if(g.current!==pe.length){g.current=pe.length;const ee=Pl(I,pe);ee.length&&($==null||$(ee))}p.setState({userSelectionRect:K})},A=O=>{if(O.button!==0)return;const{userSelectionRect:P}=p.getState();!v&&P&&O.target===h.current&&(w==null||w(O)),p.setState({nodesSelectionActive:m.current>0}),j(),a==null||a(O)},C=O=>{v&&(p.setState({nodesSelectionActive:m.current>0}),a==null||a(O)),j()},M=y&&(e||v);return T.createElement("div",{className:br(["react-flow__pane",{dragging:x,selection:e}]),onClick:M?void 0:kv(w,h),onContextMenu:kv(S,h),onWheel:kv(k,h),onMouseEnter:M?void 0:l,onMouseDown:M?_:void 0,onMouseMove:M?E:u,onMouseUp:M?A:void 0,onMouseLeave:M?C:d,ref:h,style:JS},f,T.createElement(Cte,null))});zI.displayName="Pane";function FI(e,t){const r=e.parentNode||e.parentId;if(!r)return!1;const n=t.get(r);return n?n.selected?!0:FI(n,t):!1}function rA(e,t,r){let n=e;do{if(n!=null&&n.matches(t))return!0;if(n===r.current)return!1;n=n.parentElement}while(n);return!1}function $te(e,t,r,n){return Array.from(e.values()).filter(a=>(a.selected||a.id===n)&&(!a.parentNode||a.parentId||!FI(a,e))&&(a.draggable||t&&typeof a.draggable>"u")).map(a=>{var i,s;return{id:a.id,position:a.position||{x:0,y:0},positionAbsolute:a.positionAbsolute||{x:0,y:0},distance:{x:r.x-(((i=a.positionAbsolute)==null?void 0:i.x)??0),y:r.y-(((s=a.positionAbsolute)==null?void 0:s.y)??0)},delta:{x:0,y:0},extent:a.extent,parentNode:a.parentNode||a.parentId,parentId:a.parentNode||a.parentId,width:a.width,height:a.height,expandParent:a.expandParent}})}function Rte(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function BI(e,t,r,n,a=[0,0],i){const s=Rte(e,e.extent||n);let o=s;const l=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(l&&e.width&&e.height){const f=r.get(l),{x:h,y:p}=mo(f,a).positionAbsolute;o=f&&_n(h)&&_n(p)&&_n(f.width)&&_n(f.height)?[[h+e.width*a[0],p+e.height*a[1]],[h+f.width-e.width+e.width*a[0],p+f.height-e.height+e.height*a[1]]]:o}else i==null||i("005",ui.error005()),o=s;else if(e.extent&&l&&e.extent!=="parent"){const f=r.get(l),{x:h,y:p}=mo(f,a).positionAbsolute;o=[[e.extent[0][0]+h,e.extent[0][1]+p],[e.extent[1][0]+h,e.extent[1][1]+p]]}let u={x:0,y:0};if(l){const f=r.get(l);u=mo(f,a).positionAbsolute}const d=o&&o!=="parent"?WS(t,o):t;return{position:{x:d.x-u.x,y:d.y-u.y},positionAbsolute:d}}function Sv({nodeId:e,dragItems:t,nodeInternals:r}){const n=t.map(a=>({...r.get(a.id),position:a.position,positionAbsolute:a.positionAbsolute}));return[e?n.find(a=>a.id===e):n[0],n]}const nA=(e,t,r,n)=>{const a=t.querySelectorAll(e);if(!a||!a.length)return null;const i=Array.from(a),s=t.getBoundingClientRect(),o={x:s.width*n[0],y:s.height*n[1]};return i.map(l=>{const u=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(u.left-s.left-o.x)/r,y:(u.top-s.top-o.y)/r,...HS(l)}})};function Au(e,t,r){return r===void 0?r:n=>{const a=t().nodeInternals.get(e);a&&r(n,{...a})}}function c1({id:e,store:t,unselect:r=!1,nodeRef:n}){const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:s,nodeInternals:o,onError:l}=t.getState(),u=o.get(e);if(!u){l==null||l("012",ui.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(r||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var d;return(d=n==null?void 0:n.current)==null?void 0:d.blur()})):a([e])}function Dte(){const e=ar();return N.useCallback(({sourceEvent:r})=>{const{transform:n,snapGrid:a,snapToGrid:i}=e.getState(),s=r.touches?r.touches[0].clientX:r.clientX,o=r.touches?r.touches[0].clientY:r.clientY,l={x:(s-n[0])/n[2],y:(o-n[1])/n[2]};return{xSnapped:i?a[0]*Math.round(l.x/a[0]):l.x,ySnapped:i?a[1]*Math.round(l.y/a[1]):l.y,...l}},[])}function Nv(e){return(t,r,n)=>e==null?void 0:e(t,n)}function VI({nodeRef:e,disabled:t=!1,noDragClassName:r,handleSelector:n,nodeId:a,isSelectable:i,selectNodesOnDrag:s}){const o=ar(),[l,u]=N.useState(!1),d=N.useRef([]),f=N.useRef({x:null,y:null}),h=N.useRef(0),p=N.useRef(null),m=N.useRef({x:0,y:0}),g=N.useRef(null),b=N.useRef(!1),v=N.useRef(!1),y=N.useRef(!1),x=Dte();return N.useEffect(()=>{if(e!=null&&e.current){const j=kn(e.current),w=({x:_,y:E})=>{const{nodeInternals:A,onNodeDrag:C,onSelectionDrag:M,updateNodePositions:O,nodeExtent:P,snapGrid:D,snapToGrid:I,nodeOrigin:L,onError:R}=o.getState();f.current={x:_,y:E};let $=!1,z={x:0,y:0,x2:0,y2:0};if(d.current.length>1&&P){const V=gg(d.current,L);z=Jd(V)}if(d.current=d.current.map(V=>{const F={x:_-V.distance.x,y:E-V.distance.y};I&&(F.x=D[0]*Math.round(F.x/D[0]),F.y=D[1]*Math.round(F.y/D[1]));const W=[[P[0][0],P[0][1]],[P[1][0],P[1][1]]];d.current.length>1&&P&&!V.extent&&(W[0][0]=V.positionAbsolute.x-z.x+P[0][0],W[1][0]=V.positionAbsolute.x+(V.width??0)-z.x2+P[1][0],W[0][1]=V.positionAbsolute.y-z.y+P[0][1],W[1][1]=V.positionAbsolute.y+(V.height??0)-z.y2+P[1][1]);const K=BI(V,F,A,W,L,R);return $=$||V.position.x!==K.position.x||V.position.y!==K.position.y,V.position=K.position,V.positionAbsolute=K.positionAbsolute,V}),!$)return;O(d.current,!0,!0),u(!0);const U=a?C:Nv(M);if(U&&g.current){const[V,F]=Sv({nodeId:a,dragItems:d.current,nodeInternals:A});U(g.current,V,F)}},S=()=>{if(!p.current)return;const[_,E]=lI(m.current,p.current);if(_!==0||E!==0){const{transform:A,panBy:C}=o.getState();f.current.x=(f.current.x??0)-_/A[2],f.current.y=(f.current.y??0)-E/A[2],C({x:_,y:E})&&w(f.current)}h.current=requestAnimationFrame(S)},k=_=>{var L;const{nodeInternals:E,multiSelectionActive:A,nodesDraggable:C,unselectNodesAndEdges:M,onNodeDragStart:O,onSelectionDragStart:P}=o.getState();v.current=!0;const D=a?O:Nv(P);(!s||!i)&&!A&&a&&((L=E.get(a))!=null&&L.selected||M()),a&&i&&s&&c1({id:a,store:o,nodeRef:e});const I=x(_);if(f.current=I,d.current=$te(E,C,I,a),D&&d.current){const[R,$]=Sv({nodeId:a,dragItems:d.current,nodeInternals:E});D(_.sourceEvent,R,$)}};if(t)j.on(".drag",null);else{const _=VQ().on("start",E=>{const{domNode:A,nodeDragThreshold:C}=o.getState();C===0&&k(E),y.current=!1;const M=x(E);f.current=M,p.current=(A==null?void 0:A.getBoundingClientRect())||null,m.current=ls(E.sourceEvent,p.current)}).on("drag",E=>{var O,P;const A=x(E),{autoPanOnNodeDrag:C,nodeDragThreshold:M}=o.getState();if(E.sourceEvent.type==="touchmove"&&E.sourceEvent.touches.length>1&&(y.current=!0),!y.current){if(!b.current&&v.current&&C&&(b.current=!0,S()),!v.current){const D=A.xSnapped-(((O=f==null?void 0:f.current)==null?void 0:O.x)??0),I=A.ySnapped-(((P=f==null?void 0:f.current)==null?void 0:P.y)??0);Math.sqrt(D*D+I*I)>M&&k(E)}(f.current.x!==A.xSnapped||f.current.y!==A.ySnapped)&&d.current&&v.current&&(g.current=E.sourceEvent,m.current=ls(E.sourceEvent,p.current),w(A))}}).on("end",E=>{if(!(!v.current||y.current)&&(u(!1),b.current=!1,v.current=!1,cancelAnimationFrame(h.current),d.current)){const{updateNodePositions:A,nodeInternals:C,onNodeDragStop:M,onSelectionDragStop:O}=o.getState(),P=a?M:Nv(O);if(A(d.current,!1,!1),P){const[D,I]=Sv({nodeId:a,dragItems:d.current,nodeInternals:C});P(E.sourceEvent,D,I)}}}).filter(E=>{const A=E.target;return!E.button&&(!r||!rA(A,`.${r}`,e))&&(!n||rA(A,n,e))});return j.call(_),()=>{j.on(".drag",null)}}}},[e,t,r,n,i,o,a,s,x]),l}function UI(){const e=ar();return N.useCallback(r=>{const{nodeInternals:n,nodeExtent:a,updateNodePositions:i,getNodes:s,snapToGrid:o,snapGrid:l,onError:u,nodesDraggable:d}=e.getState(),f=s().filter(y=>y.selected&&(y.draggable||d&&typeof y.draggable>"u")),h=o?l[0]:5,p=o?l[1]:5,m=r.isShiftPressed?4:1,g=r.x*h*m,b=r.y*p*m,v=f.map(y=>{if(y.positionAbsolute){const x={x:y.positionAbsolute.x+g,y:y.positionAbsolute.y+b};o&&(x.x=l[0]*Math.round(x.x/l[0]),x.y=l[1]*Math.round(x.y/l[1]));const{positionAbsolute:j,position:w}=BI(y,x,n,a,void 0,u);y.position=w,y.positionAbsolute=j}return y});i(v,!0,!1)},[])}const Wl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Ou=e=>{const t=({id:r,type:n,data:a,xPos:i,yPos:s,xPosOrigin:o,yPosOrigin:l,selected:u,onClick:d,onMouseEnter:f,onMouseMove:h,onMouseLeave:p,onContextMenu:m,onDoubleClick:g,style:b,className:v,isDraggable:y,isSelectable:x,isConnectable:j,isFocusable:w,selectNodesOnDrag:S,sourcePosition:k,targetPosition:_,hidden:E,resizeObserver:A,dragHandle:C,zIndex:M,isParent:O,noDragClassName:P,noPanClassName:D,initialized:I,disableKeyboardA11y:L,ariaLabel:R,rfId:$,hasHandleBounds:z})=>{const U=ar(),V=N.useRef(null),F=N.useRef(null),W=N.useRef(k),K=N.useRef(_),Q=N.useRef(n),ne=x||y||d||f||h||p,pe=UI(),X=Au(r,U.getState,f),ee=Au(r,U.getState,h),ie=Au(r,U.getState,p),G=Au(r,U.getState,m),Ee=Au(r,U.getState,g),be=ke=>{const{nodeDragThreshold:oe}=U.getState();if(x&&(!S||!y||oe>0)&&c1({id:r,store:U,nodeRef:V}),d){const Ze=U.getState().nodeInternals.get(r);Ze&&d(ke,{...Ze})}},Pe=ke=>{if(!a1(ke)&&!L)if(fI.includes(ke.key)&&x){const oe=ke.key==="Escape";c1({id:r,store:U,unselect:oe,nodeRef:V})}else y&&u&&Object.prototype.hasOwnProperty.call(Wl,ke.key)&&(U.setState({ariaLiveMessage:`Moved selected node ${ke.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~s}`}),pe({x:Wl[ke.key].x,y:Wl[ke.key].y,isShiftPressed:ke.shiftKey}))};N.useEffect(()=>()=>{F.current&&(A==null||A.unobserve(F.current),F.current=null)},[]),N.useEffect(()=>{if(V.current&&!E){const ke=V.current;(!I||!z||F.current!==ke)&&(F.current&&(A==null||A.unobserve(F.current)),A==null||A.observe(ke),F.current=ke)}},[E,I,z]),N.useEffect(()=>{const ke=Q.current!==n,oe=W.current!==k,Ze=K.current!==_;V.current&&(ke||oe||Ze)&&(ke&&(Q.current=n),oe&&(W.current=k),Ze&&(K.current=_),U.getState().updateNodeDimensions([{id:r,nodeElement:V.current,forceUpdate:!0}]))},[r,n,k,_]);const Ce=VI({nodeRef:V,disabled:E||!y,noDragClassName:P,handleSelector:C,nodeId:r,isSelectable:x,selectNodesOnDrag:S});return E?null:T.createElement("div",{className:br(["react-flow__node",`react-flow__node-${n}`,{[D]:y},v,{selected:u,selectable:x,parent:O,dragging:Ce}]),ref:V,style:{zIndex:M,transform:`translate(${o}px,${l}px)`,pointerEvents:ne?"all":"none",visibility:I?"visible":"hidden",...b},"data-id":r,"data-testid":`rf__node-${r}`,onMouseEnter:X,onMouseMove:ee,onMouseLeave:ie,onContextMenu:G,onClick:be,onDoubleClick:Ee,onKeyDown:w?Pe:void 0,tabIndex:w?0:void 0,role:w?"button":void 0,"aria-describedby":L?void 0:`${TI}-${$}`,"aria-label":R},T.createElement(Xee,{value:r},T.createElement(e,{id:r,data:a,type:n,xPos:i,yPos:s,selected:u,isConnectable:j,sourcePosition:k,targetPosition:_,dragging:Ce,dragHandle:C,zIndex:M})))};return t.displayName="NodeWrapper",N.memo(t)};const Ite=e=>{const t=e.getNodes().filter(r=>r.selected);return{...gg(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function Lte({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:r}){const n=ar(),{width:a,height:i,x:s,y:o,transformString:l,userSelectionActive:u}=mt(Ite,dr),d=UI(),f=N.useRef(null);if(N.useEffect(()=>{var m;r||(m=f.current)==null||m.focus({preventScroll:!0})},[r]),VI({nodeRef:f}),u||!a||!i)return null;const h=e?m=>{const g=n.getState().getNodes().filter(b=>b.selected);e(m,g)}:void 0,p=m=>{Object.prototype.hasOwnProperty.call(Wl,m.key)&&d({x:Wl[m.key].x,y:Wl[m.key].y,isShiftPressed:m.shiftKey})};return T.createElement("div",{className:br(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},T.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:r?void 0:-1,onKeyDown:r?void 0:p,style:{width:a,height:i,top:o,left:s}}))}var zte=N.memo(Lte);const Fte=e=>e.nodesSelectionActive,HI=({children:e,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,deleteKeyCode:o,onMove:l,onMoveStart:u,onMoveEnd:d,selectionKeyCode:f,selectionOnDrag:h,selectionMode:p,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:b,panActivationKeyCode:v,zoomActivationKeyCode:y,elementsSelectable:x,zoomOnScroll:j,zoomOnPinch:w,panOnScroll:S,panOnScrollSpeed:k,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:A,defaultViewport:C,translateExtent:M,minZoom:O,maxZoom:P,preventScrolling:D,onSelectionContextMenu:I,noWheelClassName:L,noPanClassName:R,disableKeyboardA11y:$})=>{const z=mt(Fte),U=tf(f),V=tf(v),F=V||A,W=V||S,K=U||h&&F!==!0;return Nte({deleteKeyCode:o,multiSelectionKeyCode:b}),T.createElement(Ate,{onMove:l,onMoveStart:u,onMoveEnd:d,onPaneContextMenu:i,elementsSelectable:x,zoomOnScroll:j,zoomOnPinch:w,panOnScroll:W,panOnScrollSpeed:k,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!U&&F,defaultViewport:C,translateExtent:M,minZoom:O,maxZoom:P,zoomActivationKeyCode:y,preventScrolling:D,noWheelClassName:L,noPanClassName:R},T.createElement(zI,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:r,onPaneMouseMove:n,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:F,isSelecting:!!K,selectionMode:p},e,z&&T.createElement(zte,{onSelectionContextMenu:I,noPanClassName:R,disableKeyboardA11y:$})))};HI.displayName="FlowRenderer";var Bte=N.memo(HI);function Vte(e){return mt(N.useCallback(r=>e?xI(r.nodeInternals,{x:0,y:0,width:r.width,height:r.height},r.transform,!0):r.getNodes(),[e]))}function Ute(e){const t={input:Ou(e.input||PI),default:Ou(e.default||l1),output:Ou(e.output||OI),group:Ou(e.group||ZS)},r={},n=Object.keys(e).filter(a=>!["input","default","output","group"].includes(a)).reduce((a,i)=>(a[i]=Ou(e[i]||l1),a),r);return{...t,...n}}const Hte=({x:e,y:t,width:r,height:n,origin:a})=>!r||!n?{x:e,y:t}:a[0]<0||a[1]<0||a[0]>1||a[1]>1?{x:e,y:t}:{x:e-r*a[0],y:t-n*a[1]},Wte=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),WI=e=>{const{nodesDraggable:t,nodesConnectable:r,nodesFocusable:n,elementsSelectable:a,updateNodeDimensions:i,onError:s}=mt(Wte,dr),o=Vte(e.onlyRenderVisibleElements),l=N.useRef(),u=N.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const d=new ResizeObserver(f=>{const h=f.map(p=>({id:p.target.getAttribute("data-id"),nodeElement:p.target,forceUpdate:!0}));i(h)});return l.current=d,d},[]);return N.useEffect(()=>()=>{var d;(d=l==null?void 0:l.current)==null||d.disconnect()},[]),T.createElement("div",{className:"react-flow__nodes",style:JS},o.map(d=>{var w,S,k;let f=d.type||"default";e.nodeTypes[f]||(s==null||s("003",ui.error003(f)),f="default");const h=e.nodeTypes[f]||e.nodeTypes.default,p=!!(d.draggable||t&&typeof d.draggable>"u"),m=!!(d.selectable||a&&typeof d.selectable>"u"),g=!!(d.connectable||r&&typeof d.connectable>"u"),b=!!(d.focusable||n&&typeof d.focusable>"u"),v=e.nodeExtent?WS(d.positionAbsolute,e.nodeExtent):d.positionAbsolute,y=(v==null?void 0:v.x)??0,x=(v==null?void 0:v.y)??0,j=Hte({x:y,y:x,width:d.width??0,height:d.height??0,origin:e.nodeOrigin});return T.createElement(h,{key:d.id,id:d.id,className:d.className,style:d.style,type:f,data:d.data,sourcePosition:d.sourcePosition||ge.Bottom,targetPosition:d.targetPosition||ge.Top,hidden:d.hidden,xPos:y,yPos:x,xPosOrigin:j.x,yPosOrigin:j.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!d.selected,isDraggable:p,isSelectable:m,isConnectable:g,isFocusable:b,resizeObserver:u,dragHandle:d.dragHandle,zIndex:((w=d[It])==null?void 0:w.z)??0,isParent:!!((S=d[It])!=null&&S.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!d.width&&!!d.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:d.ariaLabel,hasHandleBounds:!!((k=d[It])!=null&&k.handleBounds)})}))};WI.displayName="NodeRenderer";var qte=N.memo(WI);const Gte=(e,t,r)=>r===ge.Left?e-t:r===ge.Right?e+t:e,Kte=(e,t,r)=>r===ge.Top?e-t:r===ge.Bottom?e+t:e,aA="react-flow__edgeupdater",iA=({position:e,centerX:t,centerY:r,radius:n=10,onMouseDown:a,onMouseEnter:i,onMouseOut:s,type:o})=>T.createElement("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:s,className:br([aA,`${aA}-${o}`]),cx:Gte(t,n,e),cy:Kte(r,n,e),r:n,stroke:"transparent",fill:"transparent"}),Yte=()=>!0;var il=e=>{const t=({id:r,className:n,type:a,data:i,onClick:s,onEdgeDoubleClick:o,selected:l,animated:u,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,style:b,source:v,target:y,sourceX:x,sourceY:j,targetX:w,targetY:S,sourcePosition:k,targetPosition:_,elementsSelectable:E,hidden:A,sourceHandleId:C,targetHandleId:M,onContextMenu:O,onMouseEnter:P,onMouseMove:D,onMouseLeave:I,reconnectRadius:L,onReconnect:R,onReconnectStart:$,onReconnectEnd:z,markerEnd:U,markerStart:V,rfId:F,ariaLabel:W,isFocusable:K,isReconnectable:Q,pathOptions:ne,interactionWidth:pe,disableKeyboardA11y:X})=>{const ee=N.useRef(null),[ie,G]=N.useState(!1),[Ee,be]=N.useState(!1),Pe=ar(),Ce=N.useMemo(()=>`url('#${s1(V,F)}')`,[V,F]),ke=N.useMemo(()=>`url('#${s1(U,F)}')`,[U,F]);if(A)return null;const oe=se=>{var hn;const{edges:je,addSelectedEdges:Ae,unselectNodesAndEdges:gt,multiSelectionActive:Cr}=Pe.getState(),Vr=je.find(Si=>Si.id===r);Vr&&(E&&(Pe.setState({nodesSelectionActive:!1}),Vr.selected&&Cr?(gt({nodes:[],edges:[Vr]}),(hn=ee.current)==null||hn.blur()):Ae([r])),s&&s(se,Vr))},Ze=Pu(r,Pe.getState,o),sr=Pu(r,Pe.getState,O),Xt=Pu(r,Pe.getState,P),we=Pu(r,Pe.getState,D),Ar=Pu(r,Pe.getState,I),Ue=(se,je)=>{if(se.button!==0)return;const{edges:Ae,isValidConnection:gt}=Pe.getState(),Cr=je?y:v,Vr=(je?M:C)||null,hn=je?"target":"source",Si=gt||Yte,Ni=je,_i=Ae.find(Aa=>Aa.id===r);be(!0),$==null||$(se,_i,hn);const Ds=Aa=>{be(!1),z==null||z(Aa,_i,hn)};SI({event:se,handleId:Vr,nodeId:Cr,onConnect:Aa=>R==null?void 0:R(_i,Aa),isTarget:Ni,getState:Pe.getState,setState:Pe.setState,isValidConnection:Si,edgeUpdaterType:hn,onReconnectEnd:Ds})},He=se=>Ue(se,!0),Or=se=>Ue(se,!1),or=()=>G(!0),Zt=()=>G(!1),Ut=!E&&!s,ce=se=>{var je;if(!X&&fI.includes(se.key)&&E){const{unselectNodesAndEdges:Ae,addSelectedEdges:gt,edges:Cr}=Pe.getState();se.key==="Escape"?((je=ee.current)==null||je.blur(),Ae({edges:[Cr.find(hn=>hn.id===r)]})):gt([r])}};return T.createElement("g",{className:br(["react-flow__edge",`react-flow__edge-${a}`,n,{selected:l,animated:u,inactive:Ut,updating:ie}]),onClick:oe,onDoubleClick:Ze,onContextMenu:sr,onMouseEnter:Xt,onMouseMove:we,onMouseLeave:Ar,onKeyDown:K?ce:void 0,tabIndex:K?0:void 0,role:K?"button":"img","data-testid":`rf__edge-${r}`,"aria-label":W===null?void 0:W||`Edge from ${v} to ${y}`,"aria-describedby":K?`${MI}-${F}`:void 0,ref:ee},!Ee&&T.createElement(e,{id:r,source:v,target:y,selected:l,animated:u,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:g,data:i,style:b,sourceX:x,sourceY:j,targetX:w,targetY:S,sourcePosition:k,targetPosition:_,sourceHandleId:C,targetHandleId:M,markerStart:Ce,markerEnd:ke,pathOptions:ne,interactionWidth:pe}),Q&&T.createElement(T.Fragment,null,(Q==="source"||Q===!0)&&T.createElement(iA,{position:k,centerX:x,centerY:j,radius:L,onMouseDown:He,onMouseEnter:or,onMouseOut:Zt,type:"source"}),(Q==="target"||Q===!0)&&T.createElement(iA,{position:_,centerX:w,centerY:S,radius:L,onMouseDown:Or,onMouseEnter:or,onMouseOut:Zt,type:"target"})))};return t.displayName="EdgeWrapper",N.memo(t)};function Xte(e){const t={default:il(e.default||Rm),straight:il(e.bezier||KS),step:il(e.step||GS),smoothstep:il(e.step||mg),simplebezier:il(e.simplebezier||qS)},r={},n=Object.keys(e).filter(a=>!["default","bezier"].includes(a)).reduce((a,i)=>(a[i]=il(e[i]||Rm),a),r);return{...t,...n}}function sA(e,t,r=null){const n=((r==null?void 0:r.x)||0)+t.x,a=((r==null?void 0:r.y)||0)+t.y,i=(r==null?void 0:r.width)||t.width,s=(r==null?void 0:r.height)||t.height;switch(e){case ge.Top:return{x:n+i/2,y:a};case ge.Right:return{x:n+i,y:a+s/2};case ge.Bottom:return{x:n+i/2,y:a+s};case ge.Left:return{x:n,y:a+s/2}}}function oA(e,t){return e?e.length===1||!t?e[0]:t&&e.find(r=>r.id===t)||null:null}const Zte=(e,t,r,n,a,i)=>{const s=sA(r,e,t),o=sA(i,n,a);return{sourceX:s.x,sourceY:s.y,targetX:o.x,targetY:o.y}};function Qte({sourcePos:e,targetPos:t,sourceWidth:r,sourceHeight:n,targetWidth:a,targetHeight:i,width:s,height:o,transform:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+r,t.x+a),y2:Math.max(e.y+n,t.y+i)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const d=Jd({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:s/l[2],height:o/l[2]}),f=Math.max(0,Math.min(d.x2,u.x2)-Math.max(d.x,u.x)),h=Math.max(0,Math.min(d.y2,u.y2)-Math.max(d.y,u.y));return Math.ceil(f*h)>0}function lA(e){var n,a,i,s,o;const t=((n=e==null?void 0:e[It])==null?void 0:n.handleBounds)||null,r=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((a=e==null?void 0:e.positionAbsolute)==null?void 0:a.x)<"u"&&typeof((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.y)<"u";return[{x:((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.x)||0,y:((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!r]}const Jte=[{level:0,isMaxLevel:!0,edges:[]}];function ere(e,t,r=!1){let n=-1;const a=e.reduce((s,o)=>{var d,f;const l=_n(o.zIndex);let u=l?o.zIndex:0;if(r){const h=t.get(o.target),p=t.get(o.source),m=o.selected||(h==null?void 0:h.selected)||(p==null?void 0:p.selected),g=Math.max(((d=p==null?void 0:p[It])==null?void 0:d.z)||0,((f=h==null?void 0:h[It])==null?void 0:f.z)||0,1e3);u=(l?o.zIndex:0)+(m?g:0)}return s[u]?s[u].push(o):s[u]=[o],n=u>n?u:n,s},{}),i=Object.entries(a).map(([s,o])=>{const l=+s;return{edges:o,level:l,isMaxLevel:l===n}});return i.length===0?Jte:i}function tre(e,t,r){const n=mt(N.useCallback(a=>e?a.edges.filter(i=>{const s=t.get(i.source),o=t.get(i.target);return(s==null?void 0:s.width)&&(s==null?void 0:s.height)&&(o==null?void 0:o.width)&&(o==null?void 0:o.height)&&Qte({sourcePos:s.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:s.width,sourceHeight:s.height,targetWidth:o.width,targetHeight:o.height,width:a.width,height:a.height,transform:a.transform})}):a.edges,[e,t]));return ere(n,t,r)}const rre=({color:e="none",strokeWidth:t=1})=>T.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),nre=({color:e="none",strokeWidth:t=1})=>T.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),cA={[fc.Arrow]:rre,[fc.ArrowClosed]:nre};function are(e){const t=ar();return N.useMemo(()=>{var a,i;return Object.prototype.hasOwnProperty.call(cA,e)?cA[e]:((i=(a=t.getState()).onError)==null||i.call(a,"009",ui.error009(e)),null)},[e])}const ire=({id:e,type:t,color:r,width:n=12.5,height:a=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:o="auto-start-reverse"})=>{const l=are(t);return l?T.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${n}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:o,refX:"0",refY:"0"},T.createElement(l,{color:r,strokeWidth:s})):null},sre=({defaultColor:e,rfId:t})=>r=>{const n=[];return r.edges.reduce((a,i)=>([i.markerStart,i.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const o=s1(s,t);n.includes(o)||(a.push({id:o,color:s.color||e,...s}),n.push(o))}}),a),[]).sort((a,i)=>a.id.localeCompare(i.id))},qI=({defaultColor:e,rfId:t})=>{const r=mt(N.useCallback(sre({defaultColor:e,rfId:t}),[e,t]),(n,a)=>!(n.length!==a.length||n.some((i,s)=>i.id!==a[s].id)));return T.createElement("defs",null,r.map(n=>T.createElement(ire,{id:n.id,key:n.id,type:n.type,color:n.color,width:n.width,height:n.height,markerUnits:n.markerUnits,strokeWidth:n.strokeWidth,orient:n.orient})))};qI.displayName="MarkerDefinitions";var ore=N.memo(qI);const lre=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),GI=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:r,rfId:n,edgeTypes:a,noPanClassName:i,onEdgeContextMenu:s,onEdgeMouseEnter:o,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:d,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:m,reconnectRadius:g,children:b,disableKeyboardA11y:v})=>{const{edgesFocusable:y,edgesUpdatable:x,elementsSelectable:j,width:w,height:S,connectionMode:k,nodeInternals:_,onError:E}=mt(lre,dr),A=tre(t,_,r);return w?T.createElement(T.Fragment,null,A.map(({level:C,edges:M,isMaxLevel:O})=>T.createElement("svg",{key:C,style:{zIndex:C},width:w,height:S,className:"react-flow__edges react-flow__container"},O&&T.createElement(ore,{defaultColor:e,rfId:n}),T.createElement("g",null,M.map(P=>{const[D,I,L]=lA(_.get(P.source)),[R,$,z]=lA(_.get(P.target));if(!L||!z)return null;let U=P.type||"default";a[U]||(E==null||E("011",ui.error011(U)),U="default");const V=a[U]||a.default,F=k===Oo.Strict?$.target:($.target??[]).concat($.source??[]),W=oA(I.source,P.sourceHandle),K=oA(F,P.targetHandle),Q=(W==null?void 0:W.position)||ge.Bottom,ne=(K==null?void 0:K.position)||ge.Top,pe=!!(P.focusable||y&&typeof P.focusable>"u"),X=P.reconnectable||P.updatable,ee=typeof h<"u"&&(X||x&&typeof X>"u");if(!W||!K)return E==null||E("008",ui.error008(W,P)),null;const{sourceX:ie,sourceY:G,targetX:Ee,targetY:be}=Zte(D,W,Q,R,K,ne);return T.createElement(V,{key:P.id,id:P.id,className:br([P.className,i]),type:U,data:P.data,selected:!!P.selected,animated:!!P.animated,hidden:!!P.hidden,label:P.label,labelStyle:P.labelStyle,labelShowBg:P.labelShowBg,labelBgStyle:P.labelBgStyle,labelBgPadding:P.labelBgPadding,labelBgBorderRadius:P.labelBgBorderRadius,style:P.style,source:P.source,target:P.target,sourceHandleId:P.sourceHandle,targetHandleId:P.targetHandle,markerEnd:P.markerEnd,markerStart:P.markerStart,sourceX:ie,sourceY:G,targetX:Ee,targetY:be,sourcePosition:Q,targetPosition:ne,elementsSelectable:j,onContextMenu:s,onMouseEnter:o,onMouseMove:l,onMouseLeave:u,onClick:d,onEdgeDoubleClick:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:m,reconnectRadius:g,rfId:n,ariaLabel:P.ariaLabel,isFocusable:pe,isReconnectable:ee,pathOptions:"pathOptions"in P?P.pathOptions:void 0,interactionWidth:P.interactionWidth,disableKeyboardA11y:v})})))),b):null};GI.displayName="EdgeRenderer";var cre=N.memo(GI);const ure=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function dre({children:e}){const t=mt(ure);return T.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function fre(e){const t=QS(),r=N.useRef(!1);N.useEffect(()=>{!r.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),r.current=!0)},[e,t.viewportInitialized])}const hre={[ge.Left]:ge.Right,[ge.Right]:ge.Left,[ge.Top]:ge.Bottom,[ge.Bottom]:ge.Top},KI=({nodeId:e,handleType:t,style:r,type:n=Hi.Bezier,CustomComponent:a,connectionStatus:i})=>{var S,k,_;const{fromNode:s,handleId:o,toX:l,toY:u,connectionMode:d}=mt(N.useCallback(E=>({fromNode:E.nodeInternals.get(e),handleId:E.connectionHandleId,toX:(E.connectionPosition.x-E.transform[0])/E.transform[2],toY:(E.connectionPosition.y-E.transform[1])/E.transform[2],connectionMode:E.connectionMode}),[e]),dr),f=(S=s==null?void 0:s[It])==null?void 0:S.handleBounds;let h=f==null?void 0:f[t];if(d===Oo.Loose&&(h=h||(f==null?void 0:f[t==="source"?"target":"source"])),!s||!h)return null;const p=o?h.find(E=>E.id===o):h[0],m=p?p.x+p.width/2:(s.width??0)/2,g=p?p.y+p.height/2:s.height??0,b=(((k=s.positionAbsolute)==null?void 0:k.x)??0)+m,v=(((_=s.positionAbsolute)==null?void 0:_.y)??0)+g,y=p==null?void 0:p.position,x=y?hre[y]:null;if(!y||!x)return null;if(a)return T.createElement(a,{connectionLineType:n,connectionLineStyle:r,fromNode:s,fromHandle:p,fromX:b,fromY:v,toX:l,toY:u,fromPosition:y,toPosition:x,connectionStatus:i});let j="";const w={sourceX:b,sourceY:v,sourcePosition:y,targetX:l,targetY:u,targetPosition:x};return n===Hi.Bezier?[j]=yI(w):n===Hi.Step?[j]=i1({...w,borderRadius:0}):n===Hi.SmoothStep?[j]=i1(w):n===Hi.SimpleBezier?[j]=gI(w):j=`M${b},${v} ${l},${u}`,T.createElement("path",{d:j,fill:"none",className:"react-flow__connection-path",style:r})};KI.displayName="ConnectionLine";const pre=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function mre({containerStyle:e,style:t,type:r,component:n}){const{nodeId:a,handleType:i,nodesConnectable:s,width:o,height:l,connectionStatus:u}=mt(pre,dr);return!(a&&i&&o&&s)?null:T.createElement("svg",{style:e,width:o,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},T.createElement("g",{className:br(["react-flow__connection",u])},T.createElement(KI,{nodeId:a,handleType:i,style:t,type:r,CustomComponent:n,connectionStatus:u})))}function uA(e,t){return N.useRef(null),ar(),N.useMemo(()=>t(e),[e])}const YI=({nodeTypes:e,edgeTypes:t,onMove:r,onMoveStart:n,onMoveEnd:a,onInit:i,onNodeClick:s,onEdgeClick:o,onNodeDoubleClick:l,onEdgeDoubleClick:u,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:m,onSelectionStart:g,onSelectionEnd:b,connectionLineType:v,connectionLineStyle:y,connectionLineComponent:x,connectionLineContainerStyle:j,selectionKeyCode:w,selectionOnDrag:S,selectionMode:k,multiSelectionKeyCode:_,panActivationKeyCode:E,zoomActivationKeyCode:A,deleteKeyCode:C,onlyRenderVisibleElements:M,elementsSelectable:O,selectNodesOnDrag:P,defaultViewport:D,translateExtent:I,minZoom:L,maxZoom:R,preventScrolling:$,defaultMarkerColor:z,zoomOnScroll:U,zoomOnPinch:V,panOnScroll:F,panOnScrollSpeed:W,panOnScrollMode:K,zoomOnDoubleClick:Q,panOnDrag:ne,onPaneClick:pe,onPaneMouseEnter:X,onPaneMouseMove:ee,onPaneMouseLeave:ie,onPaneScroll:G,onPaneContextMenu:Ee,onEdgeContextMenu:be,onEdgeMouseEnter:Pe,onEdgeMouseMove:Ce,onEdgeMouseLeave:ke,onReconnect:oe,onReconnectStart:Ze,onReconnectEnd:sr,reconnectRadius:Xt,noDragClassName:we,noWheelClassName:Ar,noPanClassName:Ue,elevateEdgesOnSelect:He,disableKeyboardA11y:Or,nodeOrigin:or,nodeExtent:Zt,rfId:Ut})=>{const ce=uA(e,Ute),se=uA(t,Xte);return fre(i),T.createElement(Bte,{onPaneClick:pe,onPaneMouseEnter:X,onPaneMouseMove:ee,onPaneMouseLeave:ie,onPaneContextMenu:Ee,onPaneScroll:G,deleteKeyCode:C,selectionKeyCode:w,selectionOnDrag:S,selectionMode:k,onSelectionStart:g,onSelectionEnd:b,multiSelectionKeyCode:_,panActivationKeyCode:E,zoomActivationKeyCode:A,elementsSelectable:O,onMove:r,onMoveStart:n,onMoveEnd:a,zoomOnScroll:U,zoomOnPinch:V,zoomOnDoubleClick:Q,panOnScroll:F,panOnScrollSpeed:W,panOnScrollMode:K,panOnDrag:ne,defaultViewport:D,translateExtent:I,minZoom:L,maxZoom:R,onSelectionContextMenu:m,preventScrolling:$,noDragClassName:we,noWheelClassName:Ar,noPanClassName:Ue,disableKeyboardA11y:Or},T.createElement(dre,null,T.createElement(cre,{edgeTypes:se,onEdgeClick:o,onEdgeDoubleClick:u,onlyRenderVisibleElements:M,onEdgeContextMenu:be,onEdgeMouseEnter:Pe,onEdgeMouseMove:Ce,onEdgeMouseLeave:ke,onReconnect:oe,onReconnectStart:Ze,onReconnectEnd:sr,reconnectRadius:Xt,defaultMarkerColor:z,noPanClassName:Ue,elevateEdgesOnSelect:!!He,disableKeyboardA11y:Or,rfId:Ut},T.createElement(mre,{style:y,type:v,component:x,containerStyle:j})),T.createElement("div",{className:"react-flow__edgelabel-renderer"}),T.createElement(qte,{nodeTypes:ce,onNodeClick:s,onNodeDoubleClick:l,onNodeMouseEnter:d,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,selectNodesOnDrag:P,onlyRenderVisibleElements:M,noPanClassName:Ue,noDragClassName:we,disableKeyboardA11y:Or,nodeOrigin:or,nodeExtent:Zt,rfId:Ut})))};YI.displayName="GraphView";var gre=N.memo(YI);const u1=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],$i={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:u1,nodeExtent:u1,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Oo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:Hee,isValidConnection:void 0},yre=()=>eZ((e,t)=>({...$i,setNodes:r=>{const{nodeInternals:n,nodeOrigin:a,elevateNodesOnSelect:i}=t();e({nodeInternals:jv(r,n,a,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:r=>{const{defaultEdgeOptions:n={}}=t();e({edges:r.map(a=>({...n,...a}))})},setDefaultNodesAndEdges:(r,n)=>{const a=typeof r<"u",i=typeof n<"u",s=a?jv(r,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:s,edges:i?n:[],hasDefaultNodes:a,hasDefaultEdges:i})},updateNodeDimensions:r=>{const{onNodesChange:n,nodeInternals:a,fitViewOnInit:i,fitViewOnInitDone:s,fitViewOnInitOptions:o,domNode:l,nodeOrigin:u}=t(),d=l==null?void 0:l.querySelector(".react-flow__viewport");if(!d)return;const f=window.getComputedStyle(d),{m22:h}=new window.DOMMatrixReadOnly(f.transform),p=r.reduce((g,b)=>{const v=a.get(b.id);if(v!=null&&v.hidden)a.set(v.id,{...v,[It]:{...v[It],handleBounds:void 0}});else if(v){const y=HS(b.nodeElement);!!(y.width&&y.height&&(v.width!==y.width||v.height!==y.height||b.forceUpdate))&&(a.set(v.id,{...v,[It]:{...v[It],handleBounds:{source:nA(".source",b.nodeElement,h,u),target:nA(".target",b.nodeElement,h,u)}},...y}),g.push({id:v.id,type:"dimensions",dimensions:y}))}return g},[]);RI(a,u);const m=s||i&&!s&&DI(t,{initial:!0,...o});e({nodeInternals:new Map(a),fitViewOnInitDone:m}),(p==null?void 0:p.length)>0&&(n==null||n(p))},updateNodePositions:(r,n=!0,a=!1)=>{const{triggerNodeChanges:i}=t(),s=r.map(o=>{const l={id:o.id,type:"position",dragging:a};return n&&(l.positionAbsolute=o.positionAbsolute,l.position=o.position),l});i(s)},triggerNodeChanges:r=>{const{onNodesChange:n,nodeInternals:a,hasDefaultNodes:i,nodeOrigin:s,getNodes:o,elevateNodesOnSelect:l}=t();if(r!=null&&r.length){if(i){const u=LI(r,o()),d=jv(u,a,s,l);e({nodeInternals:d})}n==null||n(r)}},addSelectedNodes:r=>{const{multiSelectionActive:n,edges:a,getNodes:i}=t();let s,o=null;n?s=r.map(l=>Fi(l,!0)):(s=Pl(i(),r),o=Pl(a,[])),Gh({changedNodes:s,changedEdges:o,get:t,set:e})},addSelectedEdges:r=>{const{multiSelectionActive:n,edges:a,getNodes:i}=t();let s,o=null;n?s=r.map(l=>Fi(l,!0)):(s=Pl(a,r),o=Pl(i(),[])),Gh({changedNodes:o,changedEdges:s,get:t,set:e})},unselectNodesAndEdges:({nodes:r,edges:n}={})=>{const{edges:a,getNodes:i}=t(),s=r||i(),o=n||a,l=s.map(d=>(d.selected=!1,Fi(d.id,!1))),u=o.map(d=>Fi(d.id,!1));Gh({changedNodes:l,changedEdges:u,get:t,set:e})},setMinZoom:r=>{const{d3Zoom:n,maxZoom:a}=t();n==null||n.scaleExtent([r,a]),e({minZoom:r})},setMaxZoom:r=>{const{d3Zoom:n,minZoom:a}=t();n==null||n.scaleExtent([a,r]),e({maxZoom:r})},setTranslateExtent:r=>{var n;(n=t().d3Zoom)==null||n.translateExtent(r),e({translateExtent:r})},resetSelectedElements:()=>{const{edges:r,getNodes:n}=t(),i=n().filter(o=>o.selected).map(o=>Fi(o.id,!1)),s=r.filter(o=>o.selected).map(o=>Fi(o.id,!1));Gh({changedNodes:i,changedEdges:s,get:t,set:e})},setNodeExtent:r=>{const{nodeInternals:n}=t();n.forEach(a=>{a.positionAbsolute=WS(a.position,r)}),e({nodeExtent:r,nodeInternals:new Map(n)})},panBy:r=>{const{transform:n,width:a,height:i,d3Zoom:s,d3Selection:o,translateExtent:l}=t();if(!s||!o||!r.x&&!r.y)return!1;const u=Ya.translate(n[0]+r.x,n[1]+r.y).scale(n[2]),d=[[0,0],[a,i]],f=s==null?void 0:s.constrain()(u,d,l);return s.transform(o,f),n[0]!==f.x||n[1]!==f.y||n[2]!==f.k},cancelConnection:()=>e({connectionNodeId:$i.connectionNodeId,connectionHandleId:$i.connectionHandleId,connectionHandleType:$i.connectionHandleType,connectionStatus:$i.connectionStatus,connectionStartHandle:$i.connectionStartHandle,connectionEndHandle:$i.connectionEndHandle}),reset:()=>e({...$i})}),Object.is),XI=({children:e})=>{const t=N.useRef(null);return t.current||(t.current=yre()),T.createElement(Iee,{value:t.current},e)};XI.displayName="ReactFlowProvider";const ZI=({children:e})=>N.useContext(pg)?T.createElement(T.Fragment,null,e):T.createElement(XI,null,e);ZI.displayName="ReactFlowWrapper";const vre={input:PI,default:l1,output:OI,group:ZS},xre={default:Rm,straight:KS,step:GS,smoothstep:mg,simplebezier:qS},bre=[0,0],wre=[15,15],jre={x:0,y:0,zoom:1},kre={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},QI=N.forwardRef(({nodes:e,edges:t,defaultNodes:r,defaultEdges:n,className:a,nodeTypes:i=vre,edgeTypes:s=xre,onNodeClick:o,onEdgeClick:l,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:h,onConnect:p,onConnectStart:m,onConnectEnd:g,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:j,onNodeContextMenu:w,onNodeDoubleClick:S,onNodeDragStart:k,onNodeDrag:_,onNodeDragStop:E,onNodesDelete:A,onEdgesDelete:C,onSelectionChange:M,onSelectionDragStart:O,onSelectionDrag:P,onSelectionDragStop:D,onSelectionContextMenu:I,onSelectionStart:L,onSelectionEnd:R,connectionMode:$=Oo.Strict,connectionLineType:z=Hi.Bezier,connectionLineStyle:U,connectionLineComponent:V,connectionLineContainerStyle:F,deleteKeyCode:W="Backspace",selectionKeyCode:K="Shift",selectionOnDrag:Q=!1,selectionMode:ne=ef.Full,panActivationKeyCode:pe="Space",multiSelectionKeyCode:X=$m()?"Meta":"Control",zoomActivationKeyCode:ee=$m()?"Meta":"Control",snapToGrid:ie=!1,snapGrid:G=wre,onlyRenderVisibleElements:Ee=!1,selectNodesOnDrag:be=!0,nodesDraggable:Pe,nodesConnectable:Ce,nodesFocusable:ke,nodeOrigin:oe=bre,edgesFocusable:Ze,edgesUpdatable:sr,elementsSelectable:Xt,defaultViewport:we=jre,minZoom:Ar=.5,maxZoom:Ue=2,translateExtent:He=u1,preventScrolling:Or=!0,nodeExtent:or,defaultMarkerColor:Zt="#b1b1b7",zoomOnScroll:Ut=!0,zoomOnPinch:ce=!0,panOnScroll:se=!1,panOnScrollSpeed:je=.5,panOnScrollMode:Ae=ao.Free,zoomOnDoubleClick:gt=!0,panOnDrag:Cr=!0,onPaneClick:Vr,onPaneMouseEnter:hn,onPaneMouseMove:Si,onPaneMouseLeave:Ni,onPaneScroll:_i,onPaneContextMenu:Ds,children:Go,onEdgeContextMenu:Aa,onEdgeDoubleClick:dh,onEdgeMouseEnter:xy,onEdgeMouseMove:fh,onEdgeMouseLeave:Ko,onEdgeUpdate:Yo,onEdgeUpdateStart:by,onEdgeUpdateEnd:wy,onReconnect:B,onReconnectStart:H,onReconnectEnd:q,reconnectRadius:Z=10,edgeUpdaterRadius:ae=10,onNodesChange:xe,onEdgesChange:Ne,noDragClassName:fe="nodrag",noWheelClassName:he="nowheel",noPanClassName:le="nopan",fitView:me=!1,fitViewOptions:Te,connectOnClick:We=!0,attributionPosition:Qt,proOptions:ot,defaultEdgeOptions:Ye,elevateNodesOnSelect:kt=!0,elevateEdgesOnSelect:Ei=!1,disableKeyboardA11y:Pi=!1,autoPanOnConnect:Vn=!0,autoPanOnNodeDrag:pn=!0,connectionRadius:cu=20,isValidConnection:Is,onError:Oa,style:Xo,id:Ls,nodeDragThreshold:Ge,...St},Ai)=>{const Ca=Ls||"1";return T.createElement("div",{...St,style:{...Xo,...kre},ref:Ai,className:br(["react-flow",a]),"data-testid":"rf__wrapper",id:Ls},T.createElement(ZI,null,T.createElement(gre,{onInit:u,onMove:d,onMoveStart:f,onMoveEnd:h,onNodeClick:o,onEdgeClick:l,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:j,onNodeContextMenu:w,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:z,connectionLineStyle:U,connectionLineComponent:V,connectionLineContainerStyle:F,selectionKeyCode:K,selectionOnDrag:Q,selectionMode:ne,deleteKeyCode:W,multiSelectionKeyCode:X,panActivationKeyCode:pe,zoomActivationKeyCode:ee,onlyRenderVisibleElements:Ee,selectNodesOnDrag:be,defaultViewport:we,translateExtent:He,minZoom:Ar,maxZoom:Ue,preventScrolling:Or,zoomOnScroll:Ut,zoomOnPinch:ce,zoomOnDoubleClick:gt,panOnScroll:se,panOnScrollSpeed:je,panOnScrollMode:Ae,panOnDrag:Cr,onPaneClick:Vr,onPaneMouseEnter:hn,onPaneMouseMove:Si,onPaneMouseLeave:Ni,onPaneScroll:_i,onPaneContextMenu:Ds,onSelectionContextMenu:I,onSelectionStart:L,onSelectionEnd:R,onEdgeContextMenu:Aa,onEdgeDoubleClick:dh,onEdgeMouseEnter:xy,onEdgeMouseMove:fh,onEdgeMouseLeave:Ko,onReconnect:B??Yo,onReconnectStart:H??by,onReconnectEnd:q??wy,reconnectRadius:Z??ae,defaultMarkerColor:Zt,noDragClassName:fe,noWheelClassName:he,noPanClassName:le,elevateEdgesOnSelect:Ei,rfId:Ca,disableKeyboardA11y:Pi,nodeOrigin:oe,nodeExtent:or}),T.createElement(hte,{nodes:e,edges:t,defaultNodes:r,defaultEdges:n,onConnect:p,onConnectStart:m,onConnectEnd:g,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:Pe,nodesConnectable:Ce,nodesFocusable:ke,edgesFocusable:Ze,edgesUpdatable:sr,elementsSelectable:Xt,elevateNodesOnSelect:kt,minZoom:Ar,maxZoom:Ue,nodeExtent:or,onNodesChange:xe,onEdgesChange:Ne,snapToGrid:ie,snapGrid:G,connectionMode:$,translateExtent:He,connectOnClick:We,defaultEdgeOptions:Ye,fitView:me,fitViewOptions:Te,onNodesDelete:A,onEdgesDelete:C,onNodeDragStart:k,onNodeDrag:_,onNodeDragStop:E,onSelectionDrag:P,onSelectionDragStart:O,onSelectionDragStop:D,noPanClassName:le,nodeOrigin:oe,rfId:Ca,autoPanOnConnect:Vn,autoPanOnNodeDrag:pn,onError:Oa,connectionRadius:cu,isValidConnection:Is,nodeDragThreshold:Ge}),T.createElement(dte,{onSelectionChange:M}),Go,T.createElement(zee,{proOptions:ot,position:Qt}),T.createElement(vte,{rfId:Ca,disableKeyboardA11y:Pi})))});QI.displayName="ReactFlow";function JI(e){return t=>{const[r,n]=N.useState(t),a=N.useCallback(i=>n(s=>e(i,s)),[]);return[r,n,a]}}const Sre=JI(LI),Nre=JI(Tte),eL=({id:e,x:t,y:r,width:n,height:a,style:i,color:s,strokeColor:o,strokeWidth:l,className:u,borderRadius:d,shapeRendering:f,onClick:h,selected:p})=>{const{background:m,backgroundColor:g}=i||{},b=s||m||g;return T.createElement("rect",{className:br(["react-flow__minimap-node",{selected:p},u]),x:t,y:r,rx:d,ry:d,width:n,height:a,fill:b,stroke:o,strokeWidth:l,shapeRendering:f,onClick:h?v=>h(v,e):void 0})};eL.displayName="MiniMapNode";var _re=N.memo(eL);const Ere=e=>e.nodeOrigin,Pre=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),_v=e=>e instanceof Function?e:()=>e;function Are({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:r="",nodeBorderRadius:n=5,nodeStrokeWidth:a=2,nodeComponent:i=_re,onClick:s}){const o=mt(Pre,dr),l=mt(Ere),u=_v(t),d=_v(e),f=_v(r),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return T.createElement(T.Fragment,null,o.map(p=>{const{x:m,y:g}=mo(p,l).positionAbsolute;return T.createElement(i,{key:p.id,x:m,y:g,width:p.width,height:p.height,style:p.style,selected:p.selected,className:f(p),color:u(p),borderRadius:n,strokeColor:d(p),strokeWidth:a,shapeRendering:h,onClick:s,id:p.id})}))}var Ore=N.memo(Are);const Cre=200,Tre=150,Mre=e=>{const t=e.getNodes(),r={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:r,boundingRect:t.length>0?Vee(gg(t,e.nodeOrigin),r):r,rfId:e.rfId}},$re="react-flow__minimap-desc";function tL({style:e,className:t,nodeStrokeColor:r="transparent",nodeColor:n="#e2e2e2",nodeClassName:a="",nodeBorderRadius:i=5,nodeStrokeWidth:s=2,nodeComponent:o,maskColor:l="rgb(240, 240, 240, 0.6)",maskStrokeColor:u="none",maskStrokeWidth:d=1,position:f="bottom-right",onClick:h,onNodeClick:p,pannable:m=!1,zoomable:g=!1,ariaLabel:b="React Flow mini map",inversePan:v=!1,zoomStep:y=10,offsetScale:x=5}){const j=ar(),w=N.useRef(null),{boundingRect:S,viewBB:k,rfId:_}=mt(Mre,dr),E=(e==null?void 0:e.width)??Cre,A=(e==null?void 0:e.height)??Tre,C=S.width/E,M=S.height/A,O=Math.max(C,M),P=O*E,D=O*A,I=x*O,L=S.x-(P-S.width)/2-I,R=S.y-(D-S.height)/2-I,$=P+I*2,z=D+I*2,U=`${$re}-${_}`,V=N.useRef(0);V.current=O,N.useEffect(()=>{if(w.current){const K=kn(w.current),Q=X=>{const{transform:ee,d3Selection:ie,d3Zoom:G}=j.getState();if(X.sourceEvent.type!=="wheel"||!ie||!G)return;const Ee=-X.sourceEvent.deltaY*(X.sourceEvent.deltaMode===1?.05:X.sourceEvent.deltaMode?1:.002)*y,be=ee[2]*Math.pow(2,Ee);G.scaleTo(ie,be)},ne=X=>{const{transform:ee,d3Selection:ie,d3Zoom:G,translateExtent:Ee,width:be,height:Pe}=j.getState();if(X.sourceEvent.type!=="mousemove"||!ie||!G)return;const Ce=V.current*Math.max(1,ee[2])*(v?-1:1),ke={x:ee[0]-X.sourceEvent.movementX*Ce,y:ee[1]-X.sourceEvent.movementY*Ce},oe=[[0,0],[be,Pe]],Ze=Ya.translate(ke.x,ke.y).scale(ee[2]),sr=G.constrain()(Ze,oe,Ee);G.transform(ie,sr)},pe=sI().on("zoom",m?ne:null).on("zoom.wheel",g?Q:null);return K.call(pe),()=>{K.on("zoom",null)}}},[m,g,v,y]);const F=h?K=>{const Q=Yn(K);h(K,{x:Q[0],y:Q[1]})}:void 0,W=p?(K,Q)=>{const ne=j.getState().nodeInternals.get(Q);p(K,ne)}:void 0;return T.createElement(US,{position:f,style:e,className:br(["react-flow__minimap",t]),"data-testid":"rf__minimap"},T.createElement("svg",{width:E,height:A,viewBox:`${L} ${R} ${$} ${z}`,role:"img","aria-labelledby":U,ref:w,onClick:F},b&&T.createElement("title",{id:U},b),T.createElement(Ore,{onClick:W,nodeColor:n,nodeStrokeColor:r,nodeBorderRadius:i,nodeClassName:a,nodeStrokeWidth:s,nodeComponent:o}),T.createElement("path",{className:"react-flow__minimap-mask",d:`M${L-I},${R-I}h${$+I*2}v${z+I*2}h${-$-I*2}z
|
|
529
|
-
M${k.x},${k.y}h${k.width}v${k.height}h${-k.width}z`,fill:l,fillRule:"evenodd",stroke:u,strokeWidth:d,pointerEvents:"none"})))}tL.displayName="MiniMap";var Rre=N.memo(tL);function Dre(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},T.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function Ire(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},T.createElement("path",{d:"M0 0h32v4.2H0z"}))}function Lre(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},T.createElement("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 zre(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.createElement("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 Fre(){return T.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},T.createElement("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"}))}const Zu=({children:e,className:t,...r})=>T.createElement("button",{type:"button",className:br(["react-flow__controls-button",t]),...r},e);Zu.displayName="ControlButton";const Bre=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),rL=({style:e,showZoom:t=!0,showFitView:r=!0,showInteractive:n=!0,fitViewOptions:a,onZoomIn:i,onZoomOut:s,onFitView:o,onInteractiveChange:l,className:u,children:d,position:f="bottom-left"})=>{const h=ar(),[p,m]=N.useState(!1),{isInteractive:g,minZoomReached:b,maxZoomReached:v}=mt(Bre,dr),{zoomIn:y,zoomOut:x,fitView:j}=QS();if(N.useEffect(()=>{m(!0)},[]),!p)return null;const w=()=>{y(),i==null||i()},S=()=>{x(),s==null||s()},k=()=>{j(a),o==null||o()},_=()=>{h.setState({nodesDraggable:!g,nodesConnectable:!g,elementsSelectable:!g}),l==null||l(!g)};return T.createElement(US,{className:br(["react-flow__controls",u]),position:f,style:e,"data-testid":"rf__controls"},t&&T.createElement(T.Fragment,null,T.createElement(Zu,{onClick:w,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:v},T.createElement(Dre,null)),T.createElement(Zu,{onClick:S,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:b},T.createElement(Ire,null))),r&&T.createElement(Zu,{className:"react-flow__controls-fitview",onClick:k,title:"fit view","aria-label":"fit view"},T.createElement(Lre,null)),n&&T.createElement(Zu,{className:"react-flow__controls-interactive",onClick:_,title:"toggle interactivity","aria-label":"toggle interactivity"},g?T.createElement(Fre,null):T.createElement(zre,null)),d)};rL.displayName="Controls";var Vre=N.memo(rL),ia;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(ia||(ia={}));function Ure({color:e,dimensions:t,lineWidth:r}){return T.createElement("path",{stroke:e,strokeWidth:r,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function Hre({color:e,radius:t}){return T.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const Wre={[ia.Dots]:"#91919a",[ia.Lines]:"#eee",[ia.Cross]:"#e2e2e2"},qre={[ia.Dots]:1,[ia.Lines]:1,[ia.Cross]:6},Gre=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function nL({id:e,variant:t=ia.Dots,gap:r=20,size:n,lineWidth:a=1,offset:i=2,color:s,style:o,className:l}){const u=N.useRef(null),{transform:d,patternId:f}=mt(Gre,dr),h=s||Wre[t],p=n||qre[t],m=t===ia.Dots,g=t===ia.Cross,b=Array.isArray(r)?r:[r,r],v=[b[0]*d[2]||1,b[1]*d[2]||1],y=p*d[2],x=g?[y,y]:v,j=m?[y/i,y/i]:[x[0]/i,x[1]/i];return T.createElement("svg",{className:br(["react-flow__background",l]),style:{...o,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:u,"data-testid":"rf__background"},T.createElement("pattern",{id:f+e,x:d[0]%v[0],y:d[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${j[0]},-${j[1]})`},m?T.createElement(Hre,{color:h,radius:y/i}):T.createElement(Ure,{dimensions:x,color:h,lineWidth:a})),T.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+e})`}))}nL.displayName="Background";var Kre=N.memo(nL);function e2(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function Yre(){this.__data__=[],this.size=0}var Xre=Yre;function Zre(e,t){return e===t||e!==e&&t!==t}var Wc=Zre,Qre=Wc;function Jre(e,t){for(var r=e.length;r--;)if(Qre(e[r][0],t))return r;return-1}var yg=Jre,ene=yg,tne=Array.prototype,rne=tne.splice;function nne(e){var t=this.__data__,r=ene(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():rne.call(t,r,1),--this.size,!0}var ane=nne,ine=yg;function sne(e){var t=this.__data__,r=ine(t,e);return r<0?void 0:t[r][1]}var one=sne,lne=yg;function cne(e){return lne(this.__data__,e)>-1}var une=cne,dne=yg;function fne(e,t){var r=this.__data__,n=dne(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var hne=fne,pne=Xre,mne=ane,gne=one,yne=une,vne=hne;function qc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}qc.prototype.clear=pne;qc.prototype.delete=mne;qc.prototype.get=gne;qc.prototype.has=yne;qc.prototype.set=vne;var vg=qc,xne=vg;function bne(){this.__data__=new xne,this.size=0}var wne=bne;function jne(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var kne=jne;function Sne(e){return this.__data__.get(e)}var Nne=Sne;function _ne(e){return this.__data__.has(e)}var Ene=_ne,Pne=typeof hh=="object"&&hh&&hh.Object===Object&&hh,aL=Pne,Ane=aL,One=typeof self=="object"&&self&&self.Object===Object&&self,Cne=Ane||One||Function("return this")(),ua=Cne,Tne=ua,Mne=Tne.Symbol,Gc=Mne,dA=Gc,iL=Object.prototype,$ne=iL.hasOwnProperty,Rne=iL.toString,Cu=dA?dA.toStringTag:void 0;function Dne(e){var t=$ne.call(e,Cu),r=e[Cu];try{e[Cu]=void 0;var n=!0}catch{}var a=Rne.call(e);return n&&(t?e[Cu]=r:delete e[Cu]),a}var Ine=Dne,Lne=Object.prototype,zne=Lne.toString;function Fne(e){return zne.call(e)}var Bne=Fne,fA=Gc,Vne=Ine,Une=Bne,Hne="[object Null]",Wne="[object Undefined]",hA=fA?fA.toStringTag:void 0;function qne(e){return e==null?e===void 0?Wne:Hne:hA&&hA in Object(e)?Vne(e):Une(e)}var bi=qne;function Gne(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Br=Gne;const Kc=Je(Br);var Kne=bi,Yne=Br,Xne="[object AsyncFunction]",Zne="[object Function]",Qne="[object GeneratorFunction]",Jne="[object Proxy]";function eae(e){if(!Yne(e))return!1;var t=Kne(e);return t==Zne||t==Qne||t==Xne||t==Jne}var Yc=eae;const $e=Je(Yc);var tae=ua,rae=tae["__core-js_shared__"],nae=rae,Ev=nae,pA=function(){var e=/[^.]+$/.exec(Ev&&Ev.keys&&Ev.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function aae(e){return!!pA&&pA in e}var iae=aae,sae=Function.prototype,oae=sae.toString;function lae(e){if(e!=null){try{return oae.call(e)}catch{}try{return e+""}catch{}}return""}var sL=lae,cae=Yc,uae=iae,dae=Br,fae=sL,hae=/[\\^$.*+?()[\]{}|]/g,pae=/^\[object .+?Constructor\]$/,mae=Function.prototype,gae=Object.prototype,yae=mae.toString,vae=gae.hasOwnProperty,xae=RegExp("^"+yae.call(vae).replace(hae,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bae(e){if(!dae(e)||uae(e))return!1;var t=cae(e)?xae:pae;return t.test(fae(e))}var wae=bae;function jae(e,t){return e==null?void 0:e[t]}var kae=jae,Sae=wae,Nae=kae;function _ae(e,t){var r=Nae(e,t);return Sae(r)?r:void 0}var zo=_ae,Eae=zo,Pae=ua,Aae=Eae(Pae,"Map"),t2=Aae,Oae=zo,Cae=Oae(Object,"create"),xg=Cae,mA=xg;function Tae(){this.__data__=mA?mA(null):{},this.size=0}var Mae=Tae;function $ae(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Rae=$ae,Dae=xg,Iae="__lodash_hash_undefined__",Lae=Object.prototype,zae=Lae.hasOwnProperty;function Fae(e){var t=this.__data__;if(Dae){var r=t[e];return r===Iae?void 0:r}return zae.call(t,e)?t[e]:void 0}var Bae=Fae,Vae=xg,Uae=Object.prototype,Hae=Uae.hasOwnProperty;function Wae(e){var t=this.__data__;return Vae?t[e]!==void 0:Hae.call(t,e)}var qae=Wae,Gae=xg,Kae="__lodash_hash_undefined__";function Yae(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Gae&&t===void 0?Kae:t,this}var Xae=Yae,Zae=Mae,Qae=Rae,Jae=Bae,eie=qae,tie=Xae;function Xc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Xc.prototype.clear=Zae;Xc.prototype.delete=Qae;Xc.prototype.get=Jae;Xc.prototype.has=eie;Xc.prototype.set=tie;var rie=Xc,gA=rie,nie=vg,aie=t2;function iie(){this.size=0,this.__data__={hash:new gA,map:new(aie||nie),string:new gA}}var sie=iie;function oie(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var lie=oie,cie=lie;function uie(e,t){var r=e.__data__;return cie(t)?r[typeof t=="string"?"string":"hash"]:r.map}var bg=uie,die=bg;function fie(e){var t=die(this,e).delete(e);return this.size-=t?1:0,t}var hie=fie,pie=bg;function mie(e){return pie(this,e).get(e)}var gie=mie,yie=bg;function vie(e){return yie(this,e).has(e)}var xie=vie,bie=bg;function wie(e,t){var r=bie(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var jie=wie,kie=sie,Sie=hie,Nie=gie,_ie=xie,Eie=jie;function Zc(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Zc.prototype.clear=kie;Zc.prototype.delete=Sie;Zc.prototype.get=Nie;Zc.prototype.has=_ie;Zc.prototype.set=Eie;var r2=Zc,Pie=vg,Aie=t2,Oie=r2,Cie=200;function Tie(e,t){var r=this.__data__;if(r instanceof Pie){var n=r.__data__;if(!Aie||n.length<Cie-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Oie(n)}return r.set(e,t),this.size=r.size,this}var Mie=Tie,$ie=vg,Rie=wne,Die=kne,Iie=Nne,Lie=Ene,zie=Mie;function Qc(e){var t=this.__data__=new $ie(e);this.size=t.size}Qc.prototype.clear=Rie;Qc.prototype.delete=Die;Qc.prototype.get=Iie;Qc.prototype.has=Lie;Qc.prototype.set=zie;var wg=Qc;function Fie(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var n2=Fie,Bie=zo,Vie=function(){try{var e=Bie(Object,"defineProperty");return e({},"",{}),e}catch{}}(),oL=Vie,yA=oL;function Uie(e,t,r){t=="__proto__"&&yA?yA(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var jg=Uie,Hie=jg,Wie=Wc,qie=Object.prototype,Gie=qie.hasOwnProperty;function Kie(e,t,r){var n=e[t];(!(Gie.call(e,t)&&Wie(n,r))||r===void 0&&!(t in e))&&Hie(e,t,r)}var kg=Kie,Yie=kg,Xie=jg;function Zie(e,t,r,n){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var o=t[i],l=n?n(r[o],e[o],o,r,e):void 0;l===void 0&&(l=e[o]),a?Xie(r,o,l):Yie(r,o,l)}return r}var Qf=Zie;function Qie(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Jie=Qie;function ese(e){return e!=null&&typeof e=="object"}var In=ese,tse=bi,rse=In,nse="[object Arguments]";function ase(e){return rse(e)&&tse(e)==nse}var ise=ase,vA=ise,sse=In,lL=Object.prototype,ose=lL.hasOwnProperty,lse=lL.propertyIsEnumerable,cse=vA(function(){return arguments}())?vA:function(e){return sse(e)&&ose.call(e,"callee")&&!lse.call(e,"callee")},Jf=cse,use=Array.isArray,Lt=use,Dm={exports:{}};function dse(){return!1}var fse=dse;Dm.exports;(function(e,t){var r=ua,n=fse,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,o=s?r.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||n;e.exports=u})(Dm,Dm.exports);var Jc=Dm.exports,hse=9007199254740991,pse=/^(?:0|[1-9]\d*)$/;function mse(e,t){var r=typeof e;return t=t??hse,!!t&&(r=="number"||r!="symbol"&&pse.test(e))&&e>-1&&e%1==0&&e<t}var Sg=mse,gse=9007199254740991;function yse(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gse}var a2=yse,vse=bi,xse=a2,bse=In,wse="[object Arguments]",jse="[object Array]",kse="[object Boolean]",Sse="[object Date]",Nse="[object Error]",_se="[object Function]",Ese="[object Map]",Pse="[object Number]",Ase="[object Object]",Ose="[object RegExp]",Cse="[object Set]",Tse="[object String]",Mse="[object WeakMap]",$se="[object ArrayBuffer]",Rse="[object DataView]",Dse="[object Float32Array]",Ise="[object Float64Array]",Lse="[object Int8Array]",zse="[object Int16Array]",Fse="[object Int32Array]",Bse="[object Uint8Array]",Vse="[object Uint8ClampedArray]",Use="[object Uint16Array]",Hse="[object Uint32Array]",xt={};xt[Dse]=xt[Ise]=xt[Lse]=xt[zse]=xt[Fse]=xt[Bse]=xt[Vse]=xt[Use]=xt[Hse]=!0;xt[wse]=xt[jse]=xt[$se]=xt[kse]=xt[Rse]=xt[Sse]=xt[Nse]=xt[_se]=xt[Ese]=xt[Pse]=xt[Ase]=xt[Ose]=xt[Cse]=xt[Tse]=xt[Mse]=!1;function Wse(e){return bse(e)&&xse(e.length)&&!!xt[vse(e)]}var qse=Wse;function Gse(e){return function(t){return e(t)}}var Ng=Gse,Im={exports:{}};Im.exports;(function(e,t){var r=aL,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,o=function(){try{var l=a&&a.require&&a.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=o})(Im,Im.exports);var i2=Im.exports,Kse=qse,Yse=Ng,xA=i2,bA=xA&&xA.isTypedArray,Xse=bA?Yse(bA):Kse,eh=Xse,Zse=Jie,Qse=Jf,Jse=Lt,eoe=Jc,toe=Sg,roe=eh,noe=Object.prototype,aoe=noe.hasOwnProperty;function ioe(e,t){var r=Jse(e),n=!r&&Qse(e),a=!r&&!n&&eoe(e),i=!r&&!n&&!a&&roe(e),s=r||n||a||i,o=s?Zse(e.length,String):[],l=o.length;for(var u in e)(t||aoe.call(e,u))&&!(s&&(u=="length"||a&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||toe(u,l)))&&o.push(u);return o}var cL=ioe,soe=Object.prototype;function ooe(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||soe;return e===r}var _g=ooe;function loe(e,t){return function(r){return e(t(r))}}var uL=loe,coe=uL,uoe=coe(Object.keys,Object),doe=uoe,foe=_g,hoe=doe,poe=Object.prototype,moe=poe.hasOwnProperty;function goe(e){if(!foe(e))return hoe(e);var t=[];for(var r in Object(e))moe.call(e,r)&&r!="constructor"&&t.push(r);return t}var s2=goe,yoe=Yc,voe=a2;function xoe(e){return e!=null&&voe(e.length)&&!yoe(e)}var wi=xoe,boe=cL,woe=s2,joe=wi;function koe(e){return joe(e)?boe(e):woe(e)}var Os=koe,Soe=Qf,Noe=Os;function _oe(e,t){return e&&Soe(t,Noe(t),e)}var Eoe=_oe;function Poe(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Aoe=Poe,Ooe=Br,Coe=_g,Toe=Aoe,Moe=Object.prototype,$oe=Moe.hasOwnProperty;function Roe(e){if(!Ooe(e))return Toe(e);var t=Coe(e),r=[];for(var n in e)n=="constructor"&&(t||!$oe.call(e,n))||r.push(n);return r}var Doe=Roe,Ioe=cL,Loe=Doe,zoe=wi;function Foe(e){return zoe(e)?Ioe(e,!0):Loe(e)}var Fo=Foe,Boe=Qf,Voe=Fo;function Uoe(e,t){return e&&Boe(t,Voe(t),e)}var Hoe=Uoe,Lm={exports:{}};Lm.exports;(function(e,t){var r=ua,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?r.Buffer:void 0,o=s?s.allocUnsafe:void 0;function l(u,d){if(d)return u.slice();var f=u.length,h=o?o(f):new u.constructor(f);return u.copy(h),h}e.exports=l})(Lm,Lm.exports);var dL=Lm.exports;function Woe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var fL=Woe,Pv,wA;function hL(){if(wA)return Pv;wA=1;function e(t,r){for(var n=-1,a=t==null?0:t.length,i=0,s=[];++n<a;){var o=t[n];r(o,n,t)&&(s[i++]=o)}return s}return Pv=e,Pv}function qoe(){return[]}var pL=qoe,Goe=hL(),Koe=pL,Yoe=Object.prototype,Xoe=Yoe.propertyIsEnumerable,jA=Object.getOwnPropertySymbols,Zoe=jA?function(e){return e==null?[]:(e=Object(e),Goe(jA(e),function(t){return Xoe.call(e,t)}))}:Koe,o2=Zoe,Qoe=Qf,Joe=o2;function ele(e,t){return Qoe(e,Joe(e),t)}var tle=ele;function rle(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var l2=rle,nle=uL,ale=nle(Object.getPrototypeOf,Object),Eg=ale,ile=l2,sle=Eg,ole=o2,lle=pL,cle=Object.getOwnPropertySymbols,ule=cle?function(e){for(var t=[];e;)ile(t,ole(e)),e=sle(e);return t}:lle,mL=ule,dle=Qf,fle=mL;function hle(e,t){return dle(e,fle(e),t)}var ple=hle,mle=l2,gle=Lt;function yle(e,t,r){var n=t(e);return gle(e)?n:mle(n,r(e))}var gL=yle,vle=gL,xle=o2,ble=Os;function wle(e){return vle(e,ble,xle)}var yL=wle,jle=gL,kle=mL,Sle=Fo;function Nle(e){return jle(e,Sle,kle)}var _le=Nle,Ele=zo,Ple=ua,Ale=Ele(Ple,"DataView"),Ole=Ale,Cle=zo,Tle=ua,Mle=Cle(Tle,"Promise"),$le=Mle,Rle=zo,Dle=ua,Ile=Rle(Dle,"Set"),vL=Ile,Lle=zo,zle=ua,Fle=Lle(zle,"WeakMap"),Ble=Fle,d1=Ole,f1=t2,h1=$le,p1=vL,m1=Ble,xL=bi,eu=sL,kA="[object Map]",Vle="[object Object]",SA="[object Promise]",NA="[object Set]",_A="[object WeakMap]",EA="[object DataView]",Ule=eu(d1),Hle=eu(f1),Wle=eu(h1),qle=eu(p1),Gle=eu(m1),qs=xL;(d1&&qs(new d1(new ArrayBuffer(1)))!=EA||f1&&qs(new f1)!=kA||h1&&qs(h1.resolve())!=SA||p1&&qs(new p1)!=NA||m1&&qs(new m1)!=_A)&&(qs=function(e){var t=xL(e),r=t==Vle?e.constructor:void 0,n=r?eu(r):"";if(n)switch(n){case Ule:return EA;case Hle:return kA;case Wle:return SA;case qle:return NA;case Gle:return _A}return t});var tu=qs,Kle=Object.prototype,Yle=Kle.hasOwnProperty;function Xle(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Yle.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Zle=Xle,Qle=ua,Jle=Qle.Uint8Array,bL=Jle,PA=bL;function ece(e){var t=new e.constructor(e.byteLength);return new PA(t).set(new PA(e)),t}var c2=ece,tce=c2;function rce(e,t){var r=t?tce(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var nce=rce,ace=/\w*$/;function ice(e){var t=new e.constructor(e.source,ace.exec(e));return t.lastIndex=e.lastIndex,t}var sce=ice,AA=Gc,OA=AA?AA.prototype:void 0,CA=OA?OA.valueOf:void 0;function oce(e){return CA?Object(CA.call(e)):{}}var lce=oce,cce=c2;function uce(e,t){var r=t?cce(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var wL=uce,dce=c2,fce=nce,hce=sce,pce=lce,mce=wL,gce="[object Boolean]",yce="[object Date]",vce="[object Map]",xce="[object Number]",bce="[object RegExp]",wce="[object Set]",jce="[object String]",kce="[object Symbol]",Sce="[object ArrayBuffer]",Nce="[object DataView]",_ce="[object Float32Array]",Ece="[object Float64Array]",Pce="[object Int8Array]",Ace="[object Int16Array]",Oce="[object Int32Array]",Cce="[object Uint8Array]",Tce="[object Uint8ClampedArray]",Mce="[object Uint16Array]",$ce="[object Uint32Array]";function Rce(e,t,r){var n=e.constructor;switch(t){case Sce:return dce(e);case gce:case yce:return new n(+e);case Nce:return fce(e,r);case _ce:case Ece:case Pce:case Ace:case Oce:case Cce:case Tce:case Mce:case $ce:return mce(e,r);case vce:return new n;case xce:case jce:return new n(e);case bce:return hce(e);case wce:return new n;case kce:return pce(e)}}var Dce=Rce,Ice=Br,TA=Object.create,Lce=function(){function e(){}return function(t){if(!Ice(t))return{};if(TA)return TA(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),jL=Lce,zce=jL,Fce=Eg,Bce=_g;function Vce(e){return typeof e.constructor=="function"&&!Bce(e)?zce(Fce(e)):{}}var kL=Vce,Uce=tu,Hce=In,Wce="[object Map]";function qce(e){return Hce(e)&&Uce(e)==Wce}var Gce=qce,Kce=Gce,Yce=Ng,MA=i2,$A=MA&&MA.isMap,Xce=$A?Yce($A):Kce,Zce=Xce,Qce=tu,Jce=In,eue="[object Set]";function tue(e){return Jce(e)&&Qce(e)==eue}var rue=tue,nue=rue,aue=Ng,RA=i2,DA=RA&&RA.isSet,iue=DA?aue(DA):nue,sue=iue,oue=wg,lue=n2,cue=kg,uue=Eoe,due=Hoe,fue=dL,hue=fL,pue=tle,mue=ple,gue=yL,yue=_le,vue=tu,xue=Zle,bue=Dce,wue=kL,jue=Lt,kue=Jc,Sue=Zce,Nue=Br,_ue=sue,Eue=Os,Pue=Fo,Aue=1,Oue=2,Cue=4,SL="[object Arguments]",Tue="[object Array]",Mue="[object Boolean]",$ue="[object Date]",Rue="[object Error]",NL="[object Function]",Due="[object GeneratorFunction]",Iue="[object Map]",Lue="[object Number]",_L="[object Object]",zue="[object RegExp]",Fue="[object Set]",Bue="[object String]",Vue="[object Symbol]",Uue="[object WeakMap]",Hue="[object ArrayBuffer]",Wue="[object DataView]",que="[object Float32Array]",Gue="[object Float64Array]",Kue="[object Int8Array]",Yue="[object Int16Array]",Xue="[object Int32Array]",Zue="[object Uint8Array]",Que="[object Uint8ClampedArray]",Jue="[object Uint16Array]",ede="[object Uint32Array]",dt={};dt[SL]=dt[Tue]=dt[Hue]=dt[Wue]=dt[Mue]=dt[$ue]=dt[que]=dt[Gue]=dt[Kue]=dt[Yue]=dt[Xue]=dt[Iue]=dt[Lue]=dt[_L]=dt[zue]=dt[Fue]=dt[Bue]=dt[Vue]=dt[Zue]=dt[Que]=dt[Jue]=dt[ede]=!0;dt[Rue]=dt[NL]=dt[Uue]=!1;function Lp(e,t,r,n,a,i){var s,o=t&Aue,l=t&Oue,u=t&Cue;if(r&&(s=a?r(e,n,a,i):r(e)),s!==void 0)return s;if(!Nue(e))return e;var d=jue(e);if(d){if(s=xue(e),!o)return hue(e,s)}else{var f=vue(e),h=f==NL||f==Due;if(kue(e))return fue(e,o);if(f==_L||f==SL||h&&!a){if(s=l||h?{}:wue(e),!o)return l?mue(e,due(s,e)):pue(e,uue(s,e))}else{if(!dt[f])return a?e:{};s=bue(e,f,o)}}i||(i=new oue);var p=i.get(e);if(p)return p;i.set(e,s),_ue(e)?e.forEach(function(b){s.add(Lp(b,t,r,b,e,i))}):Sue(e)&&e.forEach(function(b,v){s.set(v,Lp(b,t,r,v,e,i))});var m=u?l?yue:gue:l?Pue:Eue,g=d?void 0:m(e);return lue(g||e,function(b,v){g&&(v=b,b=e[v]),cue(s,v,Lp(b,t,r,v,e,i))}),s}var EL=Lp,Av,IA;function tde(){if(IA)return Av;IA=1;var e=EL,t=4;function r(n){return e(n,t)}return Av=r,Av}var Ov,LA;function u2(){if(LA)return Ov;LA=1;function e(t){return function(){return t}}return Ov=e,Ov}function rde(e){return function(t,r,n){for(var a=-1,i=Object(t),s=n(t),o=s.length;o--;){var l=s[e?o:++a];if(r(i[l],l,i)===!1)break}return t}}var nde=rde,ade=nde,ide=ade(),d2=ide,sde=d2,ode=Os;function lde(e,t){return e&&sde(e,t,ode)}var f2=lde,cde=wi;function ude(e,t){return function(r,n){if(r==null)return r;if(!cde(r))return e(r,n);for(var a=r.length,i=t?a:-1,s=Object(r);(t?i--:++i<a)&&n(s[i],i,s)!==!1;);return r}}var dde=ude,fde=f2,hde=dde,pde=hde(fde),ru=pde;function mde(e){return e}var Bo=mde,Cv,zA;function PL(){if(zA)return Cv;zA=1;var e=Bo;function t(r){return typeof r=="function"?r:e}return Cv=t,Cv}var Tv,FA;function AL(){if(FA)return Tv;FA=1;var e=n2,t=ru,r=PL(),n=Lt;function a(i,s){var o=n(i)?e:t;return o(i,r(s))}return Tv=a,Tv}var Mv,BA;function OL(){return BA||(BA=1,Mv=AL()),Mv}var $v,VA;function gde(){if(VA)return $v;VA=1;var e=ru;function t(r,n){var a=[];return e(r,function(i,s,o){n(i,s,o)&&a.push(i)}),a}return $v=t,$v}var yde="__lodash_hash_undefined__";function vde(e){return this.__data__.set(e,yde),this}var xde=vde;function bde(e){return this.__data__.has(e)}var wde=bde,jde=r2,kde=xde,Sde=wde;function zm(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new jde;++t<r;)this.add(e[t])}zm.prototype.add=zm.prototype.push=kde;zm.prototype.has=Sde;var CL=zm;function Nde(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var TL=Nde;function _de(e,t){return e.has(t)}var ML=_de,Ede=CL,Pde=TL,Ade=ML,Ode=1,Cde=2;function Tde(e,t,r,n,a,i){var s=r&Ode,o=e.length,l=t.length;if(o!=l&&!(s&&l>o))return!1;var u=i.get(e),d=i.get(t);if(u&&d)return u==t&&d==e;var f=-1,h=!0,p=r&Cde?new Ede:void 0;for(i.set(e,t),i.set(t,e);++f<o;){var m=e[f],g=t[f];if(n)var b=s?n(g,m,f,t,e,i):n(m,g,f,e,t,i);if(b!==void 0){if(b)continue;h=!1;break}if(p){if(!Pde(t,function(v,y){if(!Ade(p,y)&&(m===v||a(m,v,r,n,i)))return p.push(y)})){h=!1;break}}else if(!(m===g||a(m,g,r,n,i))){h=!1;break}}return i.delete(e),i.delete(t),h}var $L=Tde;function Mde(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var $de=Mde;function Rde(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var h2=Rde,UA=Gc,HA=bL,Dde=Wc,Ide=$L,Lde=$de,zde=h2,Fde=1,Bde=2,Vde="[object Boolean]",Ude="[object Date]",Hde="[object Error]",Wde="[object Map]",qde="[object Number]",Gde="[object RegExp]",Kde="[object Set]",Yde="[object String]",Xde="[object Symbol]",Zde="[object ArrayBuffer]",Qde="[object DataView]",WA=UA?UA.prototype:void 0,Rv=WA?WA.valueOf:void 0;function Jde(e,t,r,n,a,i,s){switch(r){case Qde:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Zde:return!(e.byteLength!=t.byteLength||!i(new HA(e),new HA(t)));case Vde:case Ude:case qde:return Dde(+e,+t);case Hde:return e.name==t.name&&e.message==t.message;case Gde:case Yde:return e==t+"";case Wde:var o=Lde;case Kde:var l=n&Fde;if(o||(o=zde),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;n|=Bde,s.set(e,t);var d=Ide(o(e),o(t),n,a,i,s);return s.delete(e),d;case Xde:if(Rv)return Rv.call(e)==Rv.call(t)}return!1}var efe=Jde,qA=yL,tfe=1,rfe=Object.prototype,nfe=rfe.hasOwnProperty;function afe(e,t,r,n,a,i){var s=r&tfe,o=qA(e),l=o.length,u=qA(t),d=u.length;if(l!=d&&!s)return!1;for(var f=l;f--;){var h=o[f];if(!(s?h in t:nfe.call(t,h)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var b=s;++f<l;){h=o[f];var v=e[h],y=t[h];if(n)var x=s?n(y,v,h,t,e,i):n(v,y,h,e,t,i);if(!(x===void 0?v===y||a(v,y,r,n,i):x)){g=!1;break}b||(b=h=="constructor")}if(g&&!b){var j=e.constructor,w=t.constructor;j!=w&&"constructor"in e&&"constructor"in t&&!(typeof j=="function"&&j instanceof j&&typeof w=="function"&&w instanceof w)&&(g=!1)}return i.delete(e),i.delete(t),g}var ife=afe,Dv=wg,sfe=$L,ofe=efe,lfe=ife,GA=tu,KA=Lt,YA=Jc,cfe=eh,ufe=1,XA="[object Arguments]",ZA="[object Array]",Yh="[object Object]",dfe=Object.prototype,QA=dfe.hasOwnProperty;function ffe(e,t,r,n,a,i){var s=KA(e),o=KA(t),l=s?ZA:GA(e),u=o?ZA:GA(t);l=l==XA?Yh:l,u=u==XA?Yh:u;var d=l==Yh,f=u==Yh,h=l==u;if(h&&YA(e)){if(!YA(t))return!1;s=!0,d=!1}if(h&&!d)return i||(i=new Dv),s||cfe(e)?sfe(e,t,r,n,a,i):ofe(e,t,l,r,n,a,i);if(!(r&ufe)){var p=d&&QA.call(e,"__wrapped__"),m=f&&QA.call(t,"__wrapped__");if(p||m){var g=p?e.value():e,b=m?t.value():t;return i||(i=new Dv),a(g,b,r,n,i)}}return h?(i||(i=new Dv),lfe(e,t,r,n,a,i)):!1}var hfe=ffe,pfe=hfe,JA=In;function RL(e,t,r,n,a){return e===t?!0:e==null||t==null||!JA(e)&&!JA(t)?e!==e&&t!==t:pfe(e,t,r,n,RL,a)}var p2=RL,mfe=wg,gfe=p2,yfe=1,vfe=2;function xfe(e,t,r,n){var a=r.length,i=a,s=!n;if(e==null)return!i;for(e=Object(e);a--;){var o=r[a];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++a<i;){o=r[a];var l=o[0],u=e[l],d=o[1];if(s&&o[2]){if(u===void 0&&!(l in e))return!1}else{var f=new mfe;if(n)var h=n(u,d,l,e,t,f);if(!(h===void 0?gfe(d,u,yfe|vfe,n,f):h))return!1}}return!0}var bfe=xfe,wfe=Br;function jfe(e){return e===e&&!wfe(e)}var DL=jfe,kfe=DL,Sfe=Os;function Nfe(e){for(var t=Sfe(e),r=t.length;r--;){var n=t[r],a=e[n];t[r]=[n,a,kfe(a)]}return t}var _fe=Nfe;function Efe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var IL=Efe,Pfe=bfe,Afe=_fe,Ofe=IL;function Cfe(e){var t=Afe(e);return t.length==1&&t[0][2]?Ofe(t[0][0],t[0][1]):function(r){return r===e||Pfe(r,e,t)}}var Tfe=Cfe,Mfe=bi,$fe=In,Rfe="[object Symbol]";function Dfe(e){return typeof e=="symbol"||$fe(e)&&Mfe(e)==Rfe}var nu=Dfe,Ife=Lt,Lfe=nu,zfe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ffe=/^\w*$/;function Bfe(e,t){if(Ife(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Lfe(e)?!0:Ffe.test(e)||!zfe.test(e)||t!=null&&e in Object(t)}var m2=Bfe,LL=r2,Vfe="Expected a function";function g2(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Vfe);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],i=r.cache;if(i.has(a))return i.get(a);var s=e.apply(this,n);return r.cache=i.set(a,s)||i,s};return r.cache=new(g2.Cache||LL),r}g2.Cache=LL;var zL=g2;const Ufe=Je(zL);var Hfe=zL,Wfe=500;function qfe(e){var t=Hfe(e,function(n){return r.size===Wfe&&r.clear(),n}),r=t.cache;return t}var Gfe=qfe,Kfe=Gfe,Yfe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xfe=/\\(\\)?/g,Zfe=Kfe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Yfe,function(r,n,a,i){t.push(a?i.replace(Xfe,"$1"):n||r)}),t}),Qfe=Zfe;function Jfe(e,t){for(var r=-1,n=e==null?0:e.length,a=Array(n);++r<n;)a[r]=t(e[r],r,e);return a}var Pg=Jfe,eO=Gc,ehe=Pg,the=Lt,rhe=nu,tO=eO?eO.prototype:void 0,rO=tO?tO.toString:void 0;function FL(e){if(typeof e=="string")return e;if(the(e))return ehe(e,FL)+"";if(rhe(e))return rO?rO.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var nhe=FL,ahe=nhe;function ihe(e){return e==null?"":ahe(e)}var y2=ihe,she=Lt,ohe=m2,lhe=Qfe,che=y2;function uhe(e,t){return she(e)?e:ohe(e,t)?[e]:lhe(che(e))}var Ag=uhe,dhe=nu;function fhe(e){if(typeof e=="string"||dhe(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}var th=fhe,hhe=Ag,phe=th;function mhe(e,t){t=hhe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[phe(t[r++])];return r&&r==n?e:void 0}var Og=mhe,ghe=Og;function yhe(e,t,r){var n=e==null?void 0:ghe(e,t);return n===void 0?r:n}var BL=yhe;const Tn=Je(BL);function vhe(e,t){return e!=null&&t in Object(e)}var xhe=vhe,Iv,nO;function VL(){if(nO)return Iv;nO=1;var e=Ag,t=Jf,r=Lt,n=Sg,a=a2,i=th;function s(o,l,u){l=e(l,o);for(var d=-1,f=l.length,h=!1;++d<f;){var p=i(l[d]);if(!(h=o!=null&&u(o,p)))break;o=o[p]}return h||++d!=f?h:(f=o==null?0:o.length,!!f&&a(f)&&n(p,f)&&(r(o)||t(o)))}return Iv=s,Iv}var bhe=xhe,whe=VL();function jhe(e,t){return e!=null&&whe(e,t,bhe)}var UL=jhe,khe=p2,She=BL,Nhe=UL,_he=m2,Ehe=DL,Phe=IL,Ahe=th,Ohe=1,Che=2;function The(e,t){return _he(e)&&Ehe(t)?Phe(Ahe(e),t):function(r){var n=She(r,e);return n===void 0&&n===t?Nhe(r,e):khe(t,n,Ohe|Che)}}var Mhe=The;function $he(e){return function(t){return t==null?void 0:t[e]}}var HL=$he,Rhe=Og;function Dhe(e){return function(t){return Rhe(t,e)}}var Ihe=Dhe,Lhe=HL,zhe=Ihe,Fhe=m2,Bhe=th;function Vhe(e){return Fhe(e)?Lhe(Bhe(e)):zhe(e)}var Uhe=Vhe,Hhe=Tfe,Whe=Mhe,qhe=Bo,Ghe=Lt,Khe=Uhe;function Yhe(e){return typeof e=="function"?e:e==null?qhe:typeof e=="object"?Ghe(e)?Whe(e[0],e[1]):Hhe(e):Khe(e)}var Ln=Yhe,Lv,aO;function WL(){if(aO)return Lv;aO=1;var e=hL(),t=gde(),r=Ln,n=Lt;function a(i,s){var o=n(i)?e:t;return o(i,r(s))}return Lv=a,Lv}var zv,iO;function Xhe(){if(iO)return zv;iO=1;var e=Object.prototype,t=e.hasOwnProperty;function r(n,a){return n!=null&&t.call(n,a)}return zv=r,zv}var Fv,sO;function qL(){if(sO)return Fv;sO=1;var e=Xhe(),t=VL();function r(n,a){return n!=null&&t(n,a,e)}return Fv=r,Fv}var Bv,oO;function Zhe(){if(oO)return Bv;oO=1;var e=s2,t=tu,r=Jf,n=Lt,a=wi,i=Jc,s=_g,o=eh,l="[object Map]",u="[object Set]",d=Object.prototype,f=d.hasOwnProperty;function h(p){if(p==null)return!0;if(a(p)&&(n(p)||typeof p=="string"||typeof p.splice=="function"||i(p)||o(p)||r(p)))return!p.length;var m=t(p);if(m==l||m==u)return!p.size;if(s(p))return!e(p).length;for(var g in p)if(f.call(p,g))return!1;return!0}return Bv=h,Bv}var Vv,lO;function GL(){if(lO)return Vv;lO=1;function e(t){return t===void 0}return Vv=e,Vv}var Qhe=ru,Jhe=wi;function epe(e,t){var r=-1,n=Jhe(e)?Array(e.length):[];return Qhe(e,function(a,i,s){n[++r]=t(a,i,s)}),n}var KL=epe,tpe=Pg,rpe=Ln,npe=KL,ape=Lt;function ipe(e,t){var r=ape(e)?tpe:npe;return r(e,rpe(t))}var v2=ipe,Uv,cO;function spe(){if(cO)return Uv;cO=1;function e(t,r,n,a){var i=-1,s=t==null?0:t.length;for(a&&s&&(n=t[++i]);++i<s;)n=r(n,t[i],i,t);return n}return Uv=e,Uv}var Hv,uO;function ope(){if(uO)return Hv;uO=1;function e(t,r,n,a,i){return i(t,function(s,o,l){n=a?(a=!1,s):r(n,s,o,l)}),n}return Hv=e,Hv}var Wv,dO;function YL(){if(dO)return Wv;dO=1;var e=spe(),t=ru,r=Ln,n=ope(),a=Lt;function i(s,o,l){var u=a(s)?e:n,d=arguments.length<3;return u(s,r(o),l,d,t)}return Wv=i,Wv}var lpe=bi,cpe=Lt,upe=In,dpe="[object String]";function fpe(e){return typeof e=="string"||!cpe(e)&&upe(e)&&lpe(e)==dpe}var XL=fpe;const Co=Je(XL);var qv,fO;function hpe(){if(fO)return qv;fO=1;var e=HL,t=e("length");return qv=t,qv}var ppe="\\ud800-\\udfff",mpe="\\u0300-\\u036f",gpe="\\ufe20-\\ufe2f",ype="\\u20d0-\\u20ff",vpe=mpe+gpe+ype,xpe="\\ufe0e\\ufe0f",bpe="\\u200d",wpe=RegExp("["+bpe+ppe+vpe+xpe+"]");function jpe(e){return wpe.test(e)}var x2=jpe,Gv,hO;function kpe(){if(hO)return Gv;hO=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",a=t+r+n,i="\\ufe0e\\ufe0f",s="["+e+"]",o="["+a+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+o+"|"+l+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",m=u+"?",g="["+i+"]?",b="(?:"+p+"(?:"+[d,f,h].join("|")+")"+g+m+")*",v=g+m+b,y="(?:"+[d+o+"?",o,f,h,s].join("|")+")",x=RegExp(l+"(?="+l+")|"+y+v,"g");function j(w){for(var S=x.lastIndex=0;x.test(w);)++S;return S}return Gv=j,Gv}var Kv,pO;function Spe(){if(pO)return Kv;pO=1;var e=hpe(),t=x2,r=kpe();function n(a){return t(a)?r(a):e(a)}return Kv=n,Kv}var Yv,mO;function Npe(){if(mO)return Yv;mO=1;var e=s2,t=tu,r=wi,n=XL,a=Spe(),i="[object Map]",s="[object Set]";function o(l){if(l==null)return 0;if(r(l))return n(l)?a(l):l.length;var u=t(l);return u==i||u==s?l.size:e(l).length}return Yv=o,Yv}var Xv,gO;function _pe(){if(gO)return Xv;gO=1;var e=n2,t=jL,r=f2,n=Ln,a=Eg,i=Lt,s=Jc,o=Yc,l=Br,u=eh;function d(f,h,p){var m=i(f),g=m||s(f)||u(f);if(h=n(h),p==null){var b=f&&f.constructor;g?p=m?new b:[]:l(f)?p=o(b)?t(a(f)):{}:p={}}return(g?e:r)(f,function(v,y,x){return h(p,v,y,x)}),p}return Xv=d,Xv}var yO=Gc,Epe=Jf,Ppe=Lt,vO=yO?yO.isConcatSpreadable:void 0;function Ape(e){return Ppe(e)||Epe(e)||!!(vO&&e&&e[vO])}var Ope=Ape,Cpe=l2,Tpe=Ope;function ZL(e,t,r,n,a){var i=-1,s=e.length;for(r||(r=Tpe),a||(a=[]);++i<s;){var o=e[i];t>0&&r(o)?t>1?ZL(o,t-1,r,n,a):Cpe(a,o):n||(a[a.length]=o)}return a}var Cg=ZL;function Mpe(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var $pe=Mpe,Rpe=$pe,xO=Math.max;function Dpe(e,t,r){return t=xO(t===void 0?e.length-1:t,0),function(){for(var n=arguments,a=-1,i=xO(n.length-t,0),s=Array(i);++a<i;)s[a]=n[t+a];a=-1;for(var o=Array(t+1);++a<t;)o[a]=n[a];return o[t]=r(s),Rpe(e,this,o)}}var QL=Dpe,Ipe=u2(),bO=oL,Lpe=Bo,zpe=bO?function(e,t){return bO(e,"toString",{configurable:!0,enumerable:!1,value:Ipe(t),writable:!0})}:Lpe,Fpe=zpe,Bpe=800,Vpe=16,Upe=Date.now;function Hpe(e){var t=0,r=0;return function(){var n=Upe(),a=Vpe-(n-r);if(r=n,a>0){if(++t>=Bpe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Wpe=Hpe,qpe=Fpe,Gpe=Wpe,Kpe=Gpe(qpe),JL=Kpe,Ype=Bo,Xpe=QL,Zpe=JL;function Qpe(e,t){return Zpe(Xpe(e,t,Ype),e+"")}var Tg=Qpe,Zv,wO;function e6(){if(wO)return Zv;wO=1;function e(t,r,n,a){for(var i=t.length,s=n+(a?1:-1);a?s--:++s<i;)if(r(t[s],s,t))return s;return-1}return Zv=e,Zv}function Jpe(e){return e!==e}var eme=Jpe;function tme(e,t,r){for(var n=r-1,a=e.length;++n<a;)if(e[n]===t)return n;return-1}var rme=tme,nme=e6(),ame=eme,ime=rme;function sme(e,t,r){return t===t?ime(e,t,r):nme(e,ame,r)}var ome=sme,lme=ome;function cme(e,t){var r=e==null?0:e.length;return!!r&&lme(e,t,0)>-1}var ume=cme;function dme(e,t,r){for(var n=-1,a=e==null?0:e.length;++n<a;)if(r(t,e[n]))return!0;return!1}var fme=dme;function hme(){}var pme=hme,Qv=vL,mme=pme,gme=h2,yme=1/0,vme=Qv&&1/gme(new Qv([,-0]))[1]==yme?function(e){return new Qv(e)}:mme,xme=vme,bme=CL,wme=ume,jme=fme,kme=ML,Sme=xme,Nme=h2,_me=200;function Eme(e,t,r){var n=-1,a=wme,i=e.length,s=!0,o=[],l=o;if(r)s=!1,a=jme;else if(i>=_me){var u=t?null:Sme(e);if(u)return Nme(u);s=!1,a=kme,l=new bme}else l=t?[]:o;e:for(;++n<i;){var d=e[n],f=t?t(d):d;if(d=r||d!==0?d:0,s&&f===f){for(var h=l.length;h--;)if(l[h]===f)continue e;t&&l.push(f),o.push(d)}else a(l,f,r)||(l!==o&&l.push(f),o.push(d))}return o}var t6=Eme,Jv,jO;function r6(){if(jO)return Jv;jO=1;var e=wi,t=In;function r(n){return t(n)&&e(n)}return Jv=r,Jv}var ex,kO;function Pme(){if(kO)return ex;kO=1;var e=Cg,t=Tg,r=t6,n=r6(),a=t(function(i){return r(e(i,1,n,!0))});return ex=a,ex}var tx,SO;function Ame(){if(SO)return tx;SO=1;var e=Pg;function t(r,n){return e(n,function(a){return r[a]})}return tx=t,tx}var rx,NO;function n6(){if(NO)return rx;NO=1;var e=Ame(),t=Os;function r(n){return n==null?[]:e(n,t(n))}return rx=r,rx}var nx,_O;function zn(){if(_O)return nx;_O=1;var e;if(typeof e2=="function")try{e={clone:tde(),constant:u2(),each:OL(),filter:WL(),has:qL(),isArray:Lt,isEmpty:Zhe(),isFunction:Yc,isUndefined:GL(),keys:Os,map:v2,reduce:YL(),size:Npe(),transform:_pe(),union:Pme(),values:n6()}}catch{}return e||(e=window._),nx=e,nx}var ax,EO;function b2(){if(EO)return ax;EO=1;var e=zn();ax=a;var t="\0",r="\0",n="";function a(d){this._isDirected=e.has(d,"directed")?d.directed:!0,this._isMultigraph=e.has(d,"multigraph")?d.multigraph:!1,this._isCompound=e.has(d,"compound")?d.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[r]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(d){return this._label=d,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return e.keys(this._nodes)},a.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(f){return e.isEmpty(d._in[f])})},a.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(f){return e.isEmpty(d._out[f])})},a.prototype.setNodes=function(d,f){var h=arguments,p=this;return e.each(d,function(m){h.length>1?p.setNode(m,f):p.setNode(m)}),this},a.prototype.setNode=function(d,f){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=f),this):(this._nodes[d]=arguments.length>1?f:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=r,this._children[d]={},this._children[r][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},a.prototype.node=function(d){return this._nodes[d]},a.prototype.hasNode=function(d){return e.has(this._nodes,d)},a.prototype.removeNode=function(d){var f=this;if(e.has(this._nodes,d)){var h=function(p){f.removeEdge(f._edgeObjs[p])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(p){f.setParent(p)}),delete this._children[d]),e.each(e.keys(this._in[d]),h),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),h),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},a.prototype.setParent=function(d,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(f))f=r;else{f+="";for(var h=f;!e.isUndefined(h);h=this.parent(h))if(h===d)throw new Error("Setting "+f+" as parent of "+d+" would create a cycle");this.setNode(f)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=f,this._children[f][d]=!0,this},a.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},a.prototype.parent=function(d){if(this._isCompound){var f=this._parent[d];if(f!==r)return f}},a.prototype.children=function(d){if(e.isUndefined(d)&&(d=r),this._isCompound){var f=this._children[d];if(f)return e.keys(f)}else{if(d===r)return this.nodes();if(this.hasNode(d))return[]}},a.prototype.predecessors=function(d){var f=this._preds[d];if(f)return e.keys(f)},a.prototype.successors=function(d){var f=this._sucs[d];if(f)return e.keys(f)},a.prototype.neighbors=function(d){var f=this.predecessors(d);if(f)return e.union(f,this.successors(d))},a.prototype.isLeaf=function(d){var f;return this.isDirected()?f=this.successors(d):f=this.neighbors(d),f.length===0},a.prototype.filterNodes=function(d){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var h=this;e.each(this._nodes,function(g,b){d(b)&&f.setNode(b,g)}),e.each(this._edgeObjs,function(g){f.hasNode(g.v)&&f.hasNode(g.w)&&f.setEdge(g,h.edge(g))});var p={};function m(g){var b=h.parent(g);return b===void 0||f.hasNode(b)?(p[g]=b,b):b in p?p[b]:m(b)}return this._isCompound&&e.each(f.nodes(),function(g){f.setParent(g,m(g))}),f},a.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return e.values(this._edgeObjs)},a.prototype.setPath=function(d,f){var h=this,p=arguments;return e.reduce(d,function(m,g){return p.length>1?h.setEdge(m,g,f):h.setEdge(m,g),g}),this},a.prototype.setEdge=function(){var d,f,h,p,m=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(d=g.v,f=g.w,h=g.name,arguments.length===2&&(p=arguments[1],m=!0)):(d=g,f=arguments[1],h=arguments[3],arguments.length>2&&(p=arguments[2],m=!0)),d=""+d,f=""+f,e.isUndefined(h)||(h=""+h);var b=o(this._isDirected,d,f,h);if(e.has(this._edgeLabels,b))return m&&(this._edgeLabels[b]=p),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(f),this._edgeLabels[b]=m?p:this._defaultEdgeLabelFn(d,f,h);var v=l(this._isDirected,d,f,h);return d=v.v,f=v.w,Object.freeze(v),this._edgeObjs[b]=v,i(this._preds[f],d),i(this._sucs[d],f),this._in[f][b]=v,this._out[d][b]=v,this._edgeCount++,this},a.prototype.edge=function(d,f,h){var p=arguments.length===1?u(this._isDirected,arguments[0]):o(this._isDirected,d,f,h);return this._edgeLabels[p]},a.prototype.hasEdge=function(d,f,h){var p=arguments.length===1?u(this._isDirected,arguments[0]):o(this._isDirected,d,f,h);return e.has(this._edgeLabels,p)},a.prototype.removeEdge=function(d,f,h){var p=arguments.length===1?u(this._isDirected,arguments[0]):o(this._isDirected,d,f,h),m=this._edgeObjs[p];return m&&(d=m.v,f=m.w,delete this._edgeLabels[p],delete this._edgeObjs[p],s(this._preds[f],d),s(this._sucs[d],f),delete this._in[f][p],delete this._out[d][p],this._edgeCount--),this},a.prototype.inEdges=function(d,f){var h=this._in[d];if(h){var p=e.values(h);return f?e.filter(p,function(m){return m.v===f}):p}},a.prototype.outEdges=function(d,f){var h=this._out[d];if(h){var p=e.values(h);return f?e.filter(p,function(m){return m.w===f}):p}},a.prototype.nodeEdges=function(d,f){var h=this.inEdges(d,f);if(h)return h.concat(this.outEdges(d,f))};function i(d,f){d[f]?d[f]++:d[f]=1}function s(d,f){--d[f]||delete d[f]}function o(d,f,h,p){var m=""+f,g=""+h;if(!d&&m>g){var b=m;m=g,g=b}return m+n+g+n+(e.isUndefined(p)?t:p)}function l(d,f,h,p){var m=""+f,g=""+h;if(!d&&m>g){var b=m;m=g,g=b}var v={v:m,w:g};return p&&(v.name=p),v}function u(d,f){return o(d,f.v,f.w,f.name)}return ax}var ix,PO;function Ome(){return PO||(PO=1,ix="2.1.8"),ix}var sx,AO;function Cme(){return AO||(AO=1,sx={Graph:b2(),version:Ome()}),sx}var ox,OO;function Tme(){if(OO)return ox;OO=1;var e=zn(),t=b2();ox={write:r,read:i};function r(s){var o={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:n(s),edges:a(s)};return e.isUndefined(s.graph())||(o.value=e.clone(s.graph())),o}function n(s){return e.map(s.nodes(),function(o){var l=s.node(o),u=s.parent(o),d={v:o};return e.isUndefined(l)||(d.value=l),e.isUndefined(u)||(d.parent=u),d})}function a(s){return e.map(s.edges(),function(o){var l=s.edge(o),u={v:o.v,w:o.w};return e.isUndefined(o.name)||(u.name=o.name),e.isUndefined(l)||(u.value=l),u})}function i(s){var o=new t(s.options).setGraph(s.value);return e.each(s.nodes,function(l){o.setNode(l.v,l.value),l.parent&&o.setParent(l.v,l.parent)}),e.each(s.edges,function(l){o.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),o}return ox}var lx,CO;function Mme(){if(CO)return lx;CO=1;var e=zn();lx=t;function t(r){var n={},a=[],i;function s(o){e.has(n,o)||(n[o]=!0,i.push(o),e.each(r.successors(o),s),e.each(r.predecessors(o),s))}return e.each(r.nodes(),function(o){i=[],s(o),i.length&&a.push(i)}),a}return lx}var cx,TO;function a6(){if(TO)return cx;TO=1;var e=zn();cx=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(r){return r.key})},t.prototype.has=function(r){return e.has(this._keyIndices,r)},t.prototype.priority=function(r){var n=this._keyIndices[r];if(n!==void 0)return this._arr[n].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(r,n){var a=this._keyIndices;if(r=String(r),!e.has(a,r)){var i=this._arr,s=i.length;return a[r]=s,i.push({key:r,priority:n}),this._decrease(s),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var r=this._arr.pop();return delete this._keyIndices[r.key],this._heapify(0),r.key},t.prototype.decrease=function(r,n){var a=this._keyIndices[r];if(n>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+r+" Old: "+this._arr[a].priority+" New: "+n);this._arr[a].priority=n,this._decrease(a)},t.prototype._heapify=function(r){var n=this._arr,a=2*r,i=a+1,s=r;a<n.length&&(s=n[a].priority<n[s].priority?a:s,i<n.length&&(s=n[i].priority<n[s].priority?i:s),s!==r&&(this._swap(r,s),this._heapify(s)))},t.prototype._decrease=function(r){for(var n=this._arr,a=n[r].priority,i;r!==0&&(i=r>>1,!(n[i].priority<a));)this._swap(r,i),r=i},t.prototype._swap=function(r,n){var a=this._arr,i=this._keyIndices,s=a[r],o=a[n];a[r]=o,a[n]=s,i[o.key]=r,i[s.key]=n},cx}var ux,MO;function i6(){if(MO)return ux;MO=1;var e=zn(),t=a6();ux=n;var r=e.constant(1);function n(i,s,o,l){return a(i,String(s),o||r,l||function(u){return i.outEdges(u)})}function a(i,s,o,l){var u={},d=new t,f,h,p=function(m){var g=m.v!==f?m.v:m.w,b=u[g],v=o(m),y=h.distance+v;if(v<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+v);y<b.distance&&(b.distance=y,b.predecessor=f,d.decrease(g,y))};for(i.nodes().forEach(function(m){var g=m===s?0:Number.POSITIVE_INFINITY;u[m]={distance:g},d.add(m,g)});d.size()>0&&(f=d.removeMin(),h=u[f],h.distance!==Number.POSITIVE_INFINITY);)l(f).forEach(p);return u}return ux}var dx,$O;function $me(){if($O)return dx;$O=1;var e=i6(),t=zn();dx=r;function r(n,a,i){return t.transform(n.nodes(),function(s,o){s[o]=e(n,o,a,i)},{})}return dx}var fx,RO;function s6(){if(RO)return fx;RO=1;var e=zn();fx=t;function t(r){var n=0,a=[],i={},s=[];function o(l){var u=i[l]={onStack:!0,lowlink:n,index:n++};if(a.push(l),r.successors(l).forEach(function(h){e.has(i,h)?i[h].onStack&&(u.lowlink=Math.min(u.lowlink,i[h].index)):(o(h),u.lowlink=Math.min(u.lowlink,i[h].lowlink))}),u.lowlink===u.index){var d=[],f;do f=a.pop(),i[f].onStack=!1,d.push(f);while(l!==f);s.push(d)}}return r.nodes().forEach(function(l){e.has(i,l)||o(l)}),s}return fx}var hx,DO;function Rme(){if(DO)return hx;DO=1;var e=zn(),t=s6();hx=r;function r(n){return e.filter(t(n),function(a){return a.length>1||a.length===1&&n.hasEdge(a[0],a[0])})}return hx}var px,IO;function Dme(){if(IO)return px;IO=1;var e=zn();px=r;var t=e.constant(1);function r(a,i,s){return n(a,i||t,s||function(o){return a.outEdges(o)})}function n(a,i,s){var o={},l=a.nodes();return l.forEach(function(u){o[u]={},o[u][u]={distance:0},l.forEach(function(d){u!==d&&(o[u][d]={distance:Number.POSITIVE_INFINITY})}),s(u).forEach(function(d){var f=d.v===u?d.w:d.v,h=i(d);o[u][f]={distance:h,predecessor:u}})}),l.forEach(function(u){var d=o[u];l.forEach(function(f){var h=o[f];l.forEach(function(p){var m=h[u],g=d[p],b=h[p],v=m.distance+g.distance;v<b.distance&&(b.distance=v,b.predecessor=g.predecessor)})})}),o}return px}var mx,LO;function o6(){if(LO)return mx;LO=1;var e=zn();mx=t,t.CycleException=r;function t(n){var a={},i={},s=[];function o(l){if(e.has(i,l))throw new r;e.has(a,l)||(i[l]=!0,a[l]=!0,e.each(n.predecessors(l),o),delete i[l],s.push(l))}if(e.each(n.sinks(),o),e.size(a)!==n.nodeCount())throw new r;return s}function r(){}return r.prototype=new Error,mx}var gx,zO;function Ime(){if(zO)return gx;zO=1;var e=o6();gx=t;function t(r){try{e(r)}catch(n){if(n instanceof e.CycleException)return!1;throw n}return!0}return gx}var yx,FO;function l6(){if(FO)return yx;FO=1;var e=zn();yx=t;function t(n,a,i){e.isArray(a)||(a=[a]);var s=(n.isDirected()?n.successors:n.neighbors).bind(n),o=[],l={};return e.each(a,function(u){if(!n.hasNode(u))throw new Error("Graph does not have node: "+u);r(n,u,i==="post",l,s,o)}),o}function r(n,a,i,s,o,l){e.has(s,a)||(s[a]=!0,i||l.push(a),e.each(o(a),function(u){r(n,u,i,s,o,l)}),i&&l.push(a))}return yx}var vx,BO;function Lme(){if(BO)return vx;BO=1;var e=l6();vx=t;function t(r,n){return e(r,n,"post")}return vx}var xx,VO;function zme(){if(VO)return xx;VO=1;var e=l6();xx=t;function t(r,n){return e(r,n,"pre")}return xx}var bx,UO;function Fme(){if(UO)return bx;UO=1;var e=zn(),t=b2(),r=a6();bx=n;function n(a,i){var s=new t,o={},l=new r,u;function d(h){var p=h.v===u?h.w:h.v,m=l.priority(p);if(m!==void 0){var g=i(h);g<m&&(o[p]=u,l.decrease(p,g))}}if(a.nodeCount()===0)return s;e.each(a.nodes(),function(h){l.add(h,Number.POSITIVE_INFINITY),s.setNode(h)}),l.decrease(a.nodes()[0],0);for(var f=!1;l.size()>0;){if(u=l.removeMin(),e.has(o,u))s.setEdge(u,o[u]);else{if(f)throw new Error("Input graph is not connected: "+a);f=!0}a.nodeEdges(u).forEach(d)}return s}return bx}var wx,HO;function Bme(){return HO||(HO=1,wx={components:Mme(),dijkstra:i6(),dijkstraAll:$me(),findCycles:Rme(),floydWarshall:Dme(),isAcyclic:Ime(),postorder:Lme(),preorder:zme(),prim:Fme(),tarjan:s6(),topsort:o6()}),wx}var jx,WO;function Vme(){if(WO)return jx;WO=1;var e=Cme();return jx={Graph:e.Graph,json:Tme(),alg:Bme(),version:e.version},jx}var Fm;if(typeof e2=="function")try{Fm=Vme()}catch{}Fm||(Fm=window.graphlib);var da=Fm,kx,qO;function Ume(){if(qO)return kx;qO=1;var e=EL,t=1,r=4;function n(a){return e(a,t|r)}return kx=n,kx}var Hme=Wc,Wme=wi,qme=Sg,Gme=Br;function Kme(e,t,r){if(!Gme(r))return!1;var n=typeof t;return(n=="number"?Wme(r)&&qme(t,r.length):n=="string"&&t in r)?Hme(r[t],e):!1}var au=Kme,Sx,GO;function Yme(){if(GO)return Sx;GO=1;var e=Tg,t=Wc,r=au,n=Fo,a=Object.prototype,i=a.hasOwnProperty,s=e(function(o,l){o=Object(o);var u=-1,d=l.length,f=d>2?l[2]:void 0;for(f&&r(l[0],l[1],f)&&(d=1);++u<d;)for(var h=l[u],p=n(h),m=-1,g=p.length;++m<g;){var b=p[m],v=o[b];(v===void 0||t(v,a[b])&&!i.call(o,b))&&(o[b]=h[b])}return o});return Sx=s,Sx}var Nx,KO;function Xme(){if(KO)return Nx;KO=1;var e=Ln,t=wi,r=Os;function n(a){return function(i,s,o){var l=Object(i);if(!t(i)){var u=e(s);i=r(i),s=function(f){return u(l[f],f,l)}}var d=a(i,s,o);return d>-1?l[u?i[d]:d]:void 0}}return Nx=n,Nx}var Zme=/\s/;function Qme(e){for(var t=e.length;t--&&Zme.test(e.charAt(t)););return t}var Jme=Qme,e0e=Jme,t0e=/^\s+/;function r0e(e){return e&&e.slice(0,e0e(e)+1).replace(t0e,"")}var n0e=r0e,a0e=n0e,YO=Br,i0e=nu,XO=NaN,s0e=/^[-+]0x[0-9a-f]+$/i,o0e=/^0b[01]+$/i,l0e=/^0o[0-7]+$/i,c0e=parseInt;function u0e(e){if(typeof e=="number")return e;if(i0e(e))return XO;if(YO(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=YO(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=a0e(e);var r=o0e.test(e);return r||l0e.test(e)?c0e(e.slice(2),r?2:8):s0e.test(e)?XO:+e}var c6=u0e,d0e=c6,ZO=1/0,f0e=17976931348623157e292;function h0e(e){if(!e)return e===0?e:0;if(e=d0e(e),e===ZO||e===-ZO){var t=e<0?-1:1;return t*f0e}return e===e?e:0}var u6=h0e,_x,QO;function p0e(){if(QO)return _x;QO=1;var e=u6;function t(r){var n=e(r),a=n%1;return n===n?a?n-a:n:0}return _x=t,_x}var Ex,JO;function m0e(){if(JO)return Ex;JO=1;var e=e6(),t=Ln,r=p0e(),n=Math.max;function a(i,s,o){var l=i==null?0:i.length;if(!l)return-1;var u=o==null?0:r(o);return u<0&&(u=n(l+u,0)),e(i,t(s),u)}return Ex=a,Ex}var Px,eC;function d6(){if(eC)return Px;eC=1;var e=Xme(),t=m0e(),r=e(t);return Px=r,Px}var g0e=Cg;function y0e(e){var t=e==null?0:e.length;return t?g0e(e,1):[]}var f6=y0e,Ax,tC;function v0e(){if(tC)return Ax;tC=1;var e=d2,t=PL(),r=Fo;function n(a,i){return a==null?a:e(a,t(i),r)}return Ax=n,Ax}function x0e(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var h6=x0e;const b0e=Je(h6);var Ox,rC;function p6(){if(rC)return Ox;rC=1;var e=jg,t=f2,r=Ln;function n(a,i){var s={};return i=r(i),t(a,function(o,l,u){e(s,l,i(o,l,u))}),s}return Ox=n,Ox}var w0e=nu;function j0e(e,t,r){for(var n=-1,a=e.length;++n<a;){var i=e[n],s=t(i);if(s!=null&&(o===void 0?s===s&&!w0e(s):r(s,o)))var o=s,l=i}return l}var w2=j0e;function k0e(e,t){return e>t}var S0e=k0e,N0e=w2,_0e=S0e,E0e=Bo;function P0e(e){return e&&e.length?N0e(e,E0e,_0e):void 0}var m6=P0e;const Mg=Je(m6);var Cx,nC;function g6(){if(nC)return Cx;nC=1;var e=jg,t=Wc;function r(n,a,i){(i!==void 0&&!t(n[a],i)||i===void 0&&!(a in n))&&e(n,a,i)}return Cx=r,Cx}var A0e=bi,O0e=Eg,C0e=In,T0e="[object Object]",M0e=Function.prototype,$0e=Object.prototype,y6=M0e.toString,R0e=$0e.hasOwnProperty,D0e=y6.call(Object);function I0e(e){if(!C0e(e)||A0e(e)!=T0e)return!1;var t=O0e(e);if(t===null)return!0;var r=R0e.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&y6.call(r)==D0e}var v6=I0e;const L0e=Je(v6);var Tx,aC;function x6(){if(aC)return Tx;aC=1;function e(t,r){if(!(r==="constructor"&&typeof t[r]=="function")&&r!="__proto__")return t[r]}return Tx=e,Tx}var Mx,iC;function z0e(){if(iC)return Mx;iC=1;var e=Qf,t=Fo;function r(n){return e(n,t(n))}return Mx=r,Mx}var $x,sC;function F0e(){if(sC)return $x;sC=1;var e=g6(),t=dL,r=wL,n=fL,a=kL,i=Jf,s=Lt,o=r6(),l=Jc,u=Yc,d=Br,f=v6,h=eh,p=x6(),m=z0e();function g(b,v,y,x,j,w,S){var k=p(b,y),_=p(v,y),E=S.get(_);if(E){e(b,y,E);return}var A=w?w(k,_,y+"",b,v,S):void 0,C=A===void 0;if(C){var M=s(_),O=!M&&l(_),P=!M&&!O&&h(_);A=_,M||O||P?s(k)?A=k:o(k)?A=n(k):O?(C=!1,A=t(_,!0)):P?(C=!1,A=r(_,!0)):A=[]:f(_)||i(_)?(A=k,i(k)?A=m(k):(!d(k)||u(k))&&(A=a(_))):C=!1}C&&(S.set(_,A),j(A,_,x,w,S),S.delete(_)),e(b,y,A)}return $x=g,$x}var Rx,oC;function B0e(){if(oC)return Rx;oC=1;var e=wg,t=g6(),r=d2,n=F0e(),a=Br,i=Fo,s=x6();function o(l,u,d,f,h){l!==u&&r(u,function(p,m){if(h||(h=new e),a(p))n(l,u,m,d,o,f,h);else{var g=f?f(s(l,m),p,m+"",l,u,h):void 0;g===void 0&&(g=p),t(l,m,g)}},i)}return Rx=o,Rx}var Dx,lC;function V0e(){if(lC)return Dx;lC=1;var e=Tg,t=au;function r(n){return e(function(a,i){var s=-1,o=i.length,l=o>1?i[o-1]:void 0,u=o>2?i[2]:void 0;for(l=n.length>3&&typeof l=="function"?(o--,l):void 0,u&&t(i[0],i[1],u)&&(l=o<3?void 0:l,o=1),a=Object(a);++s<o;){var d=i[s];d&&n(a,d,s,l)}return a})}return Dx=r,Dx}var Ix,cC;function U0e(){if(cC)return Ix;cC=1;var e=B0e(),t=V0e(),r=t(function(n,a,i){e(n,a,i)});return Ix=r,Ix}function H0e(e,t){return e<t}var b6=H0e,W0e=w2,q0e=b6,G0e=Bo;function K0e(e){return e&&e.length?W0e(e,G0e,q0e):void 0}var w6=K0e;const $g=Je(w6);var Y0e=w2,X0e=Ln,Z0e=b6;function Q0e(e,t){return e&&e.length?Y0e(e,X0e(t),Z0e):void 0}var J0e=Q0e,ege=ua,tge=function(){return ege.Date.now()},j6=tge,Lx,uC;function rge(){if(uC)return Lx;uC=1;var e=kg,t=Ag,r=Sg,n=Br,a=th;function i(s,o,l,u){if(!n(s))return s;o=t(o,s);for(var d=-1,f=o.length,h=f-1,p=s;p!=null&&++d<f;){var m=a(o[d]),g=l;if(m==="__proto__"||m==="constructor"||m==="prototype")return s;if(d!=h){var b=p[m];g=u?u(b,m,p):void 0,g===void 0&&(g=n(b)?b:r(o[d+1])?[]:{})}e(p,m,g),p=p[m]}return s}return Lx=i,Lx}var zx,dC;function nge(){if(dC)return zx;dC=1;var e=Og,t=rge(),r=Ag;function n(a,i,s){for(var o=-1,l=i.length,u={};++o<l;){var d=i[o],f=e(a,d);s(f,d)&&t(u,r(d,a),f)}return u}return zx=n,zx}var Fx,fC;function age(){if(fC)return Fx;fC=1;var e=nge(),t=UL;function r(n,a){return e(n,a,function(i,s){return t(n,s)})}return Fx=r,Fx}var ige=f6,sge=QL,oge=JL;function lge(e){return oge(sge(e,void 0,ige),e+"")}var cge=lge,Bx,hC;function uge(){if(hC)return Bx;hC=1;var e=age(),t=cge,r=t(function(n,a){return n==null?{}:e(n,a)});return Bx=r,Bx}var dge=Math.ceil,fge=Math.max;function hge(e,t,r,n){for(var a=-1,i=fge(dge((t-e)/(r||1)),0),s=Array(i);i--;)s[n?i:++a]=e,e+=r;return s}var pge=hge,mge=pge,gge=au,Vx=u6;function yge(e){return function(t,r,n){return n&&typeof n!="number"&&gge(t,r,n)&&(r=n=void 0),t=Vx(t),r===void 0?(r=t,t=0):r=Vx(r),n=n===void 0?t<r?1:-1:Vx(n),mge(t,r,n,e)}}var vge=yge,xge=vge,bge=xge(),k6=bge;const Bm=Je(k6);function wge(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var jge=wge,pC=nu;function kge(e,t){if(e!==t){var r=e!==void 0,n=e===null,a=e===e,i=pC(e),s=t!==void 0,o=t===null,l=t===t,u=pC(t);if(!o&&!u&&!i&&e>t||i&&s&&l&&!o&&!u||n&&s&&l||!r&&l||!a)return 1;if(!n&&!i&&!u&&e<t||u&&r&&a&&!n&&!i||o&&r&&a||!s&&a||!l)return-1}return 0}var Sge=kge,Nge=Sge;function _ge(e,t,r){for(var n=-1,a=e.criteria,i=t.criteria,s=a.length,o=r.length;++n<s;){var l=Nge(a[n],i[n]);if(l){if(n>=o)return l;var u=r[n];return l*(u=="desc"?-1:1)}}return e.index-t.index}var Ege=_ge,Ux=Pg,Pge=Og,Age=Ln,Oge=KL,Cge=jge,Tge=Ng,Mge=Ege,$ge=Bo,Rge=Lt;function Dge(e,t,r){t.length?t=Ux(t,function(i){return Rge(i)?function(s){return Pge(s,i.length===1?i[0]:i)}:i}):t=[$ge];var n=-1;t=Ux(t,Tge(Age));var a=Oge(e,function(i,s,o){var l=Ux(t,function(u){return u(i)});return{criteria:l,index:++n,value:i}});return Cge(a,function(i,s){return Mge(i,s,r)})}var Ige=Dge,Lge=Cg,zge=Ige,Fge=Tg,mC=au,Bge=Fge(function(e,t){if(e==null)return[];var r=t.length;return r>1&&mC(e,t[0],t[1])?t=[]:r>2&&mC(t[0],t[1],t[2])&&(t=[t[0]]),zge(e,Lge(t,1),[])}),S6=Bge;const j2=Je(S6);var Hx,gC;function Vge(){if(gC)return Hx;gC=1;var e=y2,t=0;function r(n){var a=++t;return e(n)+a}return Hx=r,Hx}var Wx,yC;function Uge(){if(yC)return Wx;yC=1;function e(t,r,n){for(var a=-1,i=t.length,s=r.length,o={};++a<i;){var l=a<s?r[a]:void 0;n(o,t[a],l)}return o}return Wx=e,Wx}var qx,vC;function Hge(){if(vC)return qx;vC=1;var e=kg,t=Uge();function r(n,a){return t(n||[],a||[],e)}return qx=r,qx}var Vm;if(typeof e2=="function")try{Vm={cloneDeep:Ume(),constant:u2(),defaults:Yme(),each:OL(),filter:WL(),find:d6(),flatten:f6,forEach:AL(),forIn:v0e(),has:qL(),isUndefined:GL(),last:h6,map:v2,mapValues:p6(),max:m6,merge:U0e(),min:w6,minBy:J0e,now:j6,pick:uge(),range:k6,reduce:YL(),sortBy:S6,uniqueId:Vge(),values:n6(),zipObject:Hge()}}catch{}Vm||(Vm=window._);var At=Vm,Wge=Rg;function Rg(){var e={};e._next=e._prev=e,this._sentinel=e}Rg.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return N6(t),t};Rg.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&N6(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};Rg.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,qge)),r=r._prev;return"["+e.join(", ")+"]"};function N6(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function qge(e,t){if(e!=="_next"&&e!=="_prev")return t}var Ba=At,Gge=da.Graph,Kge=Wge,Yge=Zge,Xge=Ba.constant(1);function Zge(e,t){if(e.nodeCount()<=1)return[];var r=Jge(e,t||Xge),n=Qge(r.graph,r.buckets,r.zeroIdx);return Ba.flatten(Ba.map(n,function(a){return e.outEdges(a.v,a.w)}),!0)}function Qge(e,t,r){for(var n=[],a=t[t.length-1],i=t[0],s;e.nodeCount();){for(;s=i.dequeue();)Gx(e,t,r,s);for(;s=a.dequeue();)Gx(e,t,r,s);if(e.nodeCount()){for(var o=t.length-2;o>0;--o)if(s=t[o].dequeue(),s){n=n.concat(Gx(e,t,r,s,!0));break}}}return n}function Gx(e,t,r,n,a){var i=a?[]:void 0;return Ba.forEach(e.inEdges(n.v),function(s){var o=e.edge(s),l=e.node(s.v);a&&i.push({v:s.v,w:s.w}),l.out-=o,g1(t,r,l)}),Ba.forEach(e.outEdges(n.v),function(s){var o=e.edge(s),l=s.w,u=e.node(l);u.in-=o,g1(t,r,u)}),e.removeNode(n.v),i}function Jge(e,t){var r=new Gge,n=0,a=0;Ba.forEach(e.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),Ba.forEach(e.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=t(o),d=l+u;r.setEdge(o.v,o.w,d),a=Math.max(a,r.node(o.v).out+=u),n=Math.max(n,r.node(o.w).in+=u)});var i=Ba.range(a+n+3).map(function(){return new Kge}),s=n+1;return Ba.forEach(r.nodes(),function(o){g1(i,s,r.node(o))}),{graph:r,buckets:i,zeroIdx:s}}function g1(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}var io=At,eye=Yge,tye={run:rye,undo:aye};function rye(e){var t=e.graph().acyclicer==="greedy"?eye(e,r(e)):nye(e);io.forEach(t,function(n){var a=e.edge(n);e.removeEdge(n),a.forwardName=n.name,a.reversed=!0,e.setEdge(n.w,n.v,a,io.uniqueId("rev"))});function r(n){return function(a){return n.edge(a).weight}}}function nye(e){var t=[],r={},n={};function a(i){io.has(n,i)||(n[i]=!0,r[i]=!0,io.forEach(e.outEdges(i),function(s){io.has(r,s.w)?t.push(s):a(s.w)}),delete r[i])}return io.forEach(e.nodes(),a),t}function aye(e){io.forEach(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}var et=At,_6=da.Graph,Zr={addDummyNode:E6,simplify:iye,asNonCompoundGraph:sye,successorWeights:oye,predecessorWeights:lye,intersectRect:cye,buildLayerMatrix:uye,normalizeRanks:dye,removeEmptyRanks:fye,addBorderNode:hye,maxRank:P6,partition:pye,time:mye,notime:gye};function E6(e,t,r,n){var a;do a=et.uniqueId(n);while(e.hasNode(a));return r.dummy=t,e.setNode(a,r),a}function iye(e){var t=new _6().setGraph(e.graph());return et.forEach(e.nodes(),function(r){t.setNode(r,e.node(r))}),et.forEach(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},a=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+a.weight,minlen:Math.max(n.minlen,a.minlen)})}),t}function sye(e){var t=new _6({multigraph:e.isMultigraph()}).setGraph(e.graph());return et.forEach(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),et.forEach(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function oye(e){var t=et.map(e.nodes(),function(r){var n={};return et.forEach(e.outEdges(r),function(a){n[a.w]=(n[a.w]||0)+e.edge(a).weight}),n});return et.zipObject(e.nodes(),t)}function lye(e){var t=et.map(e.nodes(),function(r){var n={};return et.forEach(e.inEdges(r),function(a){n[a.v]=(n[a.v]||0)+e.edge(a).weight}),n});return et.zipObject(e.nodes(),t)}function cye(e,t){var r=e.x,n=e.y,a=t.x-r,i=t.y-n,s=e.width/2,o=e.height/2;if(!a&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(i)*s>Math.abs(a)*o?(i<0&&(o=-o),l=o*a/i,u=o):(a<0&&(s=-s),l=s,u=s*i/a),{x:r+l,y:n+u}}function uye(e){var t=et.map(et.range(P6(e)+1),function(){return[]});return et.forEach(e.nodes(),function(r){var n=e.node(r),a=n.rank;et.isUndefined(a)||(t[a][n.order]=r)}),t}function dye(e){var t=et.min(et.map(e.nodes(),function(r){return e.node(r).rank}));et.forEach(e.nodes(),function(r){var n=e.node(r);et.has(n,"rank")&&(n.rank-=t)})}function fye(e){var t=et.min(et.map(e.nodes(),function(i){return e.node(i).rank})),r=[];et.forEach(e.nodes(),function(i){var s=e.node(i).rank-t;r[s]||(r[s]=[]),r[s].push(i)});var n=0,a=e.graph().nodeRankFactor;et.forEach(r,function(i,s){et.isUndefined(i)&&s%a!==0?--n:n&&et.forEach(i,function(o){e.node(o).rank+=n})})}function hye(e,t,r,n){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=n),E6(e,"border",a,t)}function P6(e){return et.max(et.map(e.nodes(),function(t){var r=e.node(t).rank;if(!et.isUndefined(r))return r}))}function pye(e,t){var r={lhs:[],rhs:[]};return et.forEach(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function mye(e,t){var r=et.now();try{return t()}finally{console.log(e+" time: "+(et.now()-r)+"ms")}}function gye(e,t){return t()}var A6=At,yye=Zr,vye={run:xye,undo:wye};function xye(e){e.graph().dummyChains=[],A6.forEach(e.edges(),function(t){bye(e,t)})}function bye(e,t){var r=t.v,n=e.node(r).rank,a=t.w,i=e.node(a).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(i!==n+1){e.removeEdge(t);var u,d,f;for(f=0,++n;n<i;++f,++n)o.points=[],d={width:0,height:0,edgeLabel:o,edgeObj:t,rank:n},u=yye.addDummyNode(e,"edge",d,"_d"),n===l&&(d.width=o.width,d.height=o.height,d.dummy="edge-label",d.labelpos=o.labelpos),e.setEdge(r,u,{weight:o.weight},s),f===0&&e.graph().dummyChains.push(u),r=u;e.setEdge(r,a,{weight:o.weight},s)}}function wye(e){A6.forEach(e.graph().dummyChains,function(t){var r=e.node(t),n=r.edgeLabel,a;for(e.setEdge(r.edgeObj,n);r.dummy;)a=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=a,r=e.node(t)})}var Xh=At,Dg={longestPath:jye,slack:kye};function jye(e){var t={};function r(n){var a=e.node(n);if(Xh.has(t,n))return a.rank;t[n]=!0;var i=Xh.min(Xh.map(e.outEdges(n),function(s){return r(s.w)-e.edge(s).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),a.rank=i}Xh.forEach(e.sources(),r)}function kye(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Um=At,Sye=da.Graph,Hm=Dg.slack,O6=Nye;function Nye(e){var t=new Sye({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var a,i;_ye(t,e)<n;)a=Eye(t,e),i=t.hasNode(a.v)?Hm(e,a):-Hm(e,a),Pye(t,e,i);return t}function _ye(e,t){function r(n){Um.forEach(t.nodeEdges(n),function(a){var i=a.v,s=n===i?a.w:i;!e.hasNode(s)&&!Hm(t,a)&&(e.setNode(s,{}),e.setEdge(n,s,{}),r(s))})}return Um.forEach(e.nodes(),r),e.nodeCount()}function Eye(e,t){return Um.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return Hm(t,r)})}function Pye(e,t,r){Um.forEach(e.nodes(),function(n){t.node(n).rank+=r})}var di=At,Aye=O6,Oye=Dg.slack,Cye=Dg.longestPath,Tye=da.alg.preorder,Mye=da.alg.postorder,$ye=Zr.simplify,Rye=Vo;Vo.initLowLimValues=S2;Vo.initCutValues=k2;Vo.calcCutValue=C6;Vo.leaveEdge=M6;Vo.enterEdge=$6;Vo.exchangeEdges=R6;function Vo(e){e=$ye(e),Cye(e);var t=Aye(e);S2(t),k2(t,e);for(var r,n;r=M6(t);)n=$6(t,e,r),R6(t,e,r,n)}function k2(e,t){var r=Mye(e,e.nodes());r=r.slice(0,r.length-1),di.forEach(r,function(n){Dye(e,t,n)})}function Dye(e,t,r){var n=e.node(r),a=n.parent;e.edge(r,a).cutvalue=C6(e,t,r)}function C6(e,t,r){var n=e.node(r),a=n.parent,i=!0,s=t.edge(r,a),o=0;return s||(i=!1,s=t.edge(a,r)),o=s.weight,di.forEach(t.nodeEdges(r),function(l){var u=l.v===r,d=u?l.w:l.v;if(d!==a){var f=u===i,h=t.edge(l).weight;if(o+=f?h:-h,Lye(e,r,d)){var p=e.edge(r,d).cutvalue;o+=f?-p:p}}}),o}function S2(e,t){arguments.length<2&&(t=e.nodes()[0]),T6(e,{},1,t)}function T6(e,t,r,n,a){var i=r,s=e.node(n);return t[n]=!0,di.forEach(e.neighbors(n),function(o){di.has(t,o)||(r=T6(e,t,r,o,n))}),s.low=i,s.lim=r++,a?s.parent=a:delete s.parent,r}function M6(e){return di.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function $6(e,t,r){var n=r.v,a=r.w;t.hasEdge(n,a)||(n=r.w,a=r.v);var i=e.node(n),s=e.node(a),o=i,l=!1;i.lim>s.lim&&(o=s,l=!0);var u=di.filter(t.edges(),function(d){return l===xC(e,e.node(d.v),o)&&l!==xC(e,e.node(d.w),o)});return di.minBy(u,function(d){return Oye(t,d)})}function R6(e,t,r,n){var a=r.v,i=r.w;e.removeEdge(a,i),e.setEdge(n.v,n.w,{}),S2(e),k2(e,t),Iye(e,t)}function Iye(e,t){var r=di.find(e.nodes(),function(a){return!t.node(a).parent}),n=Tye(e,r);n=n.slice(1),di.forEach(n,function(a){var i=e.node(a).parent,s=t.edge(a,i),o=!1;s||(s=t.edge(i,a),o=!0),t.node(a).rank=t.node(i).rank+(o?s.minlen:-s.minlen)})}function Lye(e,t,r){return e.hasEdge(t,r)}function xC(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var zye=Dg,D6=zye.longestPath,Fye=O6,Bye=Rye,Vye=Uye;function Uye(e){switch(e.graph().ranker){case"network-simplex":bC(e);break;case"tight-tree":Wye(e);break;case"longest-path":Hye(e);break;default:bC(e)}}var Hye=D6;function Wye(e){D6(e),Fye(e)}function bC(e){Bye(e)}var y1=At,qye=Gye;function Gye(e){var t=Yye(e);y1.forEach(e.graph().dummyChains,function(r){for(var n=e.node(r),a=n.edgeObj,i=Kye(e,t,a.v,a.w),s=i.path,o=i.lca,l=0,u=s[l],d=!0;r!==a.w;){if(n=e.node(r),d){for(;(u=s[l])!==o&&e.node(u).maxRank<n.rank;)l++;u===o&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=n.rank;)l++;u=s[l]}e.setParent(r,u),r=e.successors(r)[0]}})}function Kye(e,t,r,n){var a=[],i=[],s=Math.min(t[r].low,t[n].low),o=Math.max(t[r].lim,t[n].lim),l,u;l=r;do l=e.parent(l),a.push(l);while(l&&(t[l].low>s||o>t[l].lim));for(u=l,l=n;(l=e.parent(l))!==u;)i.push(l);return{path:a.concat(i.reverse()),lca:u}}function Yye(e){var t={},r=0;function n(a){var i=r;y1.forEach(e.children(a),n),t[a]={low:i,lim:r++}}return y1.forEach(e.children(),n),t}var Va=At,v1=Zr,Xye={run:Zye,cleanup:eve};function Zye(e){var t=v1.addDummyNode(e,"root",{},"_root"),r=Qye(e),n=Va.max(Va.values(r))-1,a=2*n+1;e.graph().nestingRoot=t,Va.forEach(e.edges(),function(s){e.edge(s).minlen*=a});var i=Jye(e)+1;Va.forEach(e.children(),function(s){I6(e,t,a,i,n,r,s)}),e.graph().nodeRankFactor=a}function I6(e,t,r,n,a,i,s){var o=e.children(s);if(!o.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:r});return}var l=v1.addBorderNode(e,"_bt"),u=v1.addBorderNode(e,"_bb"),d=e.node(s);e.setParent(l,s),d.borderTop=l,e.setParent(u,s),d.borderBottom=u,Va.forEach(o,function(f){I6(e,t,r,n,a,i,f);var h=e.node(f),p=h.borderTop?h.borderTop:f,m=h.borderBottom?h.borderBottom:f,g=h.borderTop?n:2*n,b=p!==m?1:a-i[s]+1;e.setEdge(l,p,{weight:g,minlen:b,nestingEdge:!0}),e.setEdge(m,u,{weight:g,minlen:b,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,l,{weight:0,minlen:a+i[s]})}function Qye(e){var t={};function r(n,a){var i=e.children(n);i&&i.length&&Va.forEach(i,function(s){r(s,a+1)}),t[n]=a}return Va.forEach(e.children(),function(n){r(n,1)}),t}function Jye(e){return Va.reduce(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function eve(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Va.forEach(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}var Kx=At,tve=Zr,rve=nve;function nve(e){function t(r){var n=e.children(r),a=e.node(r);if(n.length&&Kx.forEach(n,t),Kx.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var i=a.minRank,s=a.maxRank+1;i<s;++i)wC(e,"borderLeft","_bl",r,a,i),wC(e,"borderRight","_br",r,a,i)}}Kx.forEach(e.children(),t)}function wC(e,t,r,n,a,i){var s={width:0,height:0,rank:i,borderType:t},o=a[t][i-1],l=tve.addDummyNode(e,"border",s,r);a[t][i]=l,e.setParent(l,n),o&&e.setEdge(o,l,{weight:1})}var va=At,ave={adjust:ive,undo:sve};function ive(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&L6(e)}function sve(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&ove(e),(t==="lr"||t==="rl")&&(lve(e),L6(e))}function L6(e){va.forEach(e.nodes(),function(t){jC(e.node(t))}),va.forEach(e.edges(),function(t){jC(e.edge(t))})}function jC(e){var t=e.width;e.width=e.height,e.height=t}function ove(e){va.forEach(e.nodes(),function(t){Yx(e.node(t))}),va.forEach(e.edges(),function(t){var r=e.edge(t);va.forEach(r.points,Yx),va.has(r,"y")&&Yx(r)})}function Yx(e){e.y=-e.y}function lve(e){va.forEach(e.nodes(),function(t){Xx(e.node(t))}),va.forEach(e.edges(),function(t){var r=e.edge(t);va.forEach(r.points,Xx),va.has(r,"x")&&Xx(r)})}function Xx(e){var t=e.x;e.x=e.y,e.y=t}var $a=At,cve=uve;function uve(e){var t={},r=$a.filter(e.nodes(),function(o){return!e.children(o).length}),n=$a.max($a.map(r,function(o){return e.node(o).rank})),a=$a.map($a.range(n+1),function(){return[]});function i(o){if(!$a.has(t,o)){t[o]=!0;var l=e.node(o);a[l.rank].push(o),$a.forEach(e.successors(o),i)}}var s=$a.sortBy(r,function(o){return e.node(o).rank});return $a.forEach(s,i),a}var Ri=At,dve=fve;function fve(e,t){for(var r=0,n=1;n<t.length;++n)r+=hve(e,t[n-1],t[n]);return r}function hve(e,t,r){for(var n=Ri.zipObject(r,Ri.map(r,function(u,d){return d})),a=Ri.flatten(Ri.map(t,function(u){return Ri.sortBy(Ri.map(e.outEdges(u),function(d){return{pos:n[d.w],weight:e.edge(d).weight}}),"pos")}),!0),i=1;i<r.length;)i<<=1;var s=2*i-1;i-=1;var o=Ri.map(new Array(s),function(){return 0}),l=0;return Ri.forEach(a.forEach(function(u){var d=u.pos+i;o[d]+=u.weight;for(var f=0;d>0;)d%2&&(f+=o[d+1]),d=d-1>>1,o[d]+=u.weight;l+=u.weight*f})),l}var kC=At,pve=mve;function mve(e,t){return kC.map(t,function(r){var n=e.inEdges(r);if(n.length){var a=kC.reduce(n,function(i,s){var o=e.edge(s),l=e.node(s.v);return{sum:i.sum+o.weight*l.order,weight:i.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}var nn=At,gve=yve;function yve(e,t){var r={};nn.forEach(e,function(a,i){var s=r[a.v]={indegree:0,in:[],out:[],vs:[a.v],i};nn.isUndefined(a.barycenter)||(s.barycenter=a.barycenter,s.weight=a.weight)}),nn.forEach(t.edges(),function(a){var i=r[a.v],s=r[a.w];!nn.isUndefined(i)&&!nn.isUndefined(s)&&(s.indegree++,i.out.push(r[a.w]))});var n=nn.filter(r,function(a){return!a.indegree});return vve(n)}function vve(e){var t=[];function r(i){return function(s){s.merged||(nn.isUndefined(s.barycenter)||nn.isUndefined(i.barycenter)||s.barycenter>=i.barycenter)&&xve(i,s)}}function n(i){return function(s){s.in.push(i),--s.indegree===0&&e.push(s)}}for(;e.length;){var a=e.pop();t.push(a),nn.forEach(a.in.reverse(),r(a)),nn.forEach(a.out,n(a))}return nn.map(nn.filter(t,function(i){return!i.merged}),function(i){return nn.pick(i,["vs","i","barycenter","weight"])})}function xve(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var Qu=At,bve=Zr,wve=jve;function jve(e,t){var r=bve.partition(e,function(d){return Qu.has(d,"barycenter")}),n=r.lhs,a=Qu.sortBy(r.rhs,function(d){return-d.i}),i=[],s=0,o=0,l=0;n.sort(kve(!!t)),l=SC(i,a,l),Qu.forEach(n,function(d){l+=d.vs.length,i.push(d.vs),s+=d.barycenter*d.weight,o+=d.weight,l=SC(i,a,l)});var u={vs:Qu.flatten(i,!0)};return o&&(u.barycenter=s/o,u.weight=o),u}function SC(e,t,r){for(var n;t.length&&(n=Qu.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function kve(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}var Wi=At,Sve=pve,Nve=gve,_ve=wve,Eve=z6;function z6(e,t,r,n){var a=e.children(t),i=e.node(t),s=i?i.borderLeft:void 0,o=i?i.borderRight:void 0,l={};s&&(a=Wi.filter(a,function(m){return m!==s&&m!==o}));var u=Sve(e,a);Wi.forEach(u,function(m){if(e.children(m.v).length){var g=z6(e,m.v,r,n);l[m.v]=g,Wi.has(g,"barycenter")&&Ave(m,g)}});var d=Nve(u,r);Pve(d,l);var f=_ve(d,n);if(s&&(f.vs=Wi.flatten([s,f.vs,o],!0),e.predecessors(s).length)){var h=e.node(e.predecessors(s)[0]),p=e.node(e.predecessors(o)[0]);Wi.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+h.order+p.order)/(f.weight+2),f.weight+=2}return f}function Pve(e,t){Wi.forEach(e,function(r){r.vs=Wi.flatten(r.vs.map(function(n){return t[n]?t[n].vs:n}),!0)})}function Ave(e,t){Wi.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Ju=At,Ove=da.Graph,Cve=Tve;function Tve(e,t,r){var n=Mve(e),a=new Ove({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(i){return e.node(i)});return Ju.forEach(e.nodes(),function(i){var s=e.node(i),o=e.parent(i);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(a.setNode(i),a.setParent(i,o||n),Ju.forEach(e[r](i),function(l){var u=l.v===i?l.w:l.v,d=a.edge(u,i),f=Ju.isUndefined(d)?0:d.weight;a.setEdge(u,i,{weight:e.edge(l).weight+f})}),Ju.has(s,"minRank")&&a.setNode(i,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),a}function Mve(e){for(var t;e.hasNode(t=Ju.uniqueId("_root")););return t}var $ve=At,Rve=Dve;function Dve(e,t,r){var n={},a;$ve.forEach(r,function(i){for(var s=e.parent(i),o,l;s;){if(o=e.parent(s),o?(l=n[o],n[o]=s):(l=a,a=s),l&&l!==s){t.setEdge(l,s);return}s=o}})}var cs=At,Ive=cve,Lve=dve,zve=Eve,Fve=Cve,Bve=Rve,Vve=da.Graph,NC=Zr,Uve=Hve;function Hve(e){var t=NC.maxRank(e),r=_C(e,cs.range(1,t+1),"inEdges"),n=_C(e,cs.range(t-1,-1,-1),"outEdges"),a=Ive(e);EC(e,a);for(var i=Number.POSITIVE_INFINITY,s,o=0,l=0;l<4;++o,++l){Wve(o%2?r:n,o%4>=2),a=NC.buildLayerMatrix(e);var u=Lve(e,a);u<i&&(l=0,s=cs.cloneDeep(a),i=u)}EC(e,s)}function _C(e,t,r){return cs.map(t,function(n){return Fve(e,n,r)})}function Wve(e,t){var r=new Vve;cs.forEach(e,function(n){var a=n.graph().root,i=zve(n,a,r,t);cs.forEach(i.vs,function(s,o){n.node(s).order=o}),Bve(n,r,i.vs)})}function EC(e,t){cs.forEach(t,function(r){cs.forEach(r,function(n,a){e.node(n).order=a})})}var Oe=At,qve=da.Graph,Gve=Zr,Kve={positionX:ixe};function Yve(e,t){var r={};function n(a,i){var s=0,o=0,l=a.length,u=Oe.last(i);return Oe.forEach(i,function(d,f){var h=Zve(e,d),p=h?e.node(h).order:l;(h||d===u)&&(Oe.forEach(i.slice(o,f+1),function(m){Oe.forEach(e.predecessors(m),function(g){var b=e.node(g),v=b.order;(v<s||p<v)&&!(b.dummy&&e.node(m).dummy)&&F6(r,g,m)})}),o=f+1,s=p)}),i}return Oe.reduce(t,n),r}function Xve(e,t){var r={};function n(i,s,o,l,u){var d;Oe.forEach(Oe.range(s,o),function(f){d=i[f],e.node(d).dummy&&Oe.forEach(e.predecessors(d),function(h){var p=e.node(h);p.dummy&&(p.order<l||p.order>u)&&F6(r,h,d)})})}function a(i,s){var o=-1,l,u=0;return Oe.forEach(s,function(d,f){if(e.node(d).dummy==="border"){var h=e.predecessors(d);h.length&&(l=e.node(h[0]).order,n(s,u,f,o,l),u=f,o=l)}n(s,u,s.length,l,i.length)}),s}return Oe.reduce(t,a),r}function Zve(e,t){if(e.node(t).dummy)return Oe.find(e.predecessors(t),function(r){return e.node(r).dummy})}function F6(e,t,r){if(t>r){var n=t;t=r,r=n}var a=e[t];a||(e[t]=a={}),a[r]=!0}function Qve(e,t,r){if(t>r){var n=t;t=r,r=n}return Oe.has(e[t],r)}function Jve(e,t,r,n){var a={},i={},s={};return Oe.forEach(t,function(o){Oe.forEach(o,function(l,u){a[l]=l,i[l]=l,s[l]=u})}),Oe.forEach(t,function(o){var l=-1;Oe.forEach(o,function(u){var d=n(u);if(d.length){d=Oe.sortBy(d,function(g){return s[g]});for(var f=(d.length-1)/2,h=Math.floor(f),p=Math.ceil(f);h<=p;++h){var m=d[h];i[u]===u&&l<s[m]&&!Qve(r,u,m)&&(i[m]=u,i[u]=a[u]=a[m],l=s[m])}}})}),{root:a,align:i}}function exe(e,t,r,n,a){var i={},s=txe(e,t,r,a),o=a?"borderLeft":"borderRight";function l(f,h){for(var p=s.nodes(),m=p.pop(),g={};m;)g[m]?f(m):(g[m]=!0,p.push(m),p=p.concat(h(m))),m=p.pop()}function u(f){i[f]=s.inEdges(f).reduce(function(h,p){return Math.max(h,i[p.v]+s.edge(p))},0)}function d(f){var h=s.outEdges(f).reduce(function(m,g){return Math.min(m,i[g.w]-s.edge(g))},Number.POSITIVE_INFINITY),p=e.node(f);h!==Number.POSITIVE_INFINITY&&p.borderType!==o&&(i[f]=Math.max(i[f],h))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),Oe.forEach(n,function(f){i[f]=i[r[f]]}),i}function txe(e,t,r,n){var a=new qve,i=e.graph(),s=sxe(i.nodesep,i.edgesep,n);return Oe.forEach(t,function(o){var l;Oe.forEach(o,function(u){var d=r[u];if(a.setNode(d),l){var f=r[l],h=a.edge(f,d);a.setEdge(f,d,Math.max(s(e,u,l),h||0))}l=u})}),a}function rxe(e,t){return Oe.minBy(Oe.values(t),function(r){var n=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return Oe.forIn(r,function(i,s){var o=oxe(e,s)/2;n=Math.max(i+o,n),a=Math.min(i-o,a)}),n-a})}function nxe(e,t){var r=Oe.values(t),n=Oe.min(r),a=Oe.max(r);Oe.forEach(["u","d"],function(i){Oe.forEach(["l","r"],function(s){var o=i+s,l=e[o],u;if(l!==t){var d=Oe.values(l);u=s==="l"?n-Oe.min(d):a-Oe.max(d),u&&(e[o]=Oe.mapValues(l,function(f){return f+u}))}})})}function axe(e,t){return Oe.mapValues(e.ul,function(r,n){if(t)return e[t.toLowerCase()][n];var a=Oe.sortBy(Oe.map(e,n));return(a[1]+a[2])/2})}function ixe(e){var t=Gve.buildLayerMatrix(e),r=Oe.merge(Yve(e,t),Xve(e,t)),n={},a;Oe.forEach(["u","d"],function(s){a=s==="u"?t:Oe.values(t).reverse(),Oe.forEach(["l","r"],function(o){o==="r"&&(a=Oe.map(a,function(f){return Oe.values(f).reverse()}));var l=(s==="u"?e.predecessors:e.successors).bind(e),u=Jve(e,a,r,l),d=exe(e,a,u.root,u.align,o==="r");o==="r"&&(d=Oe.mapValues(d,function(f){return-f})),n[s+o]=d})});var i=rxe(e,n);return nxe(n,i),axe(n,e.graph().align)}function sxe(e,t,r){return function(n,a,i){var s=n.node(a),o=n.node(i),l=0,u;if(l+=s.width/2,Oe.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(s.dummy?t:e)/2,l+=(o.dummy?t:e)/2,l+=o.width/2,Oe.has(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=o.width/2;break;case"r":u=-o.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function oxe(e,t){return e.node(t).width}var ed=At,B6=Zr,lxe=Kve.positionX,cxe=uxe;function uxe(e){e=B6.asNonCompoundGraph(e),dxe(e),ed.forEach(lxe(e),function(t,r){e.node(r).x=t})}function dxe(e){var t=B6.buildLayerMatrix(e),r=e.graph().ranksep,n=0;ed.forEach(t,function(a){var i=ed.max(ed.map(a,function(s){return e.node(s).height}));ed.forEach(a,function(s){e.node(s).y=n+i/2}),n+=i+r})}var Re=At,PC=tye,AC=vye,fxe=Vye,hxe=Zr.normalizeRanks,pxe=qye,mxe=Zr.removeEmptyRanks,OC=Xye,gxe=rve,CC=ave,yxe=Uve,vxe=cxe,ws=Zr,xxe=da.Graph,bxe=wxe;function wxe(e,t){var r=t&&t.debugTiming?ws.time:ws.notime;r("layout",function(){var n=r(" buildLayoutGraph",function(){return Txe(e)});r(" runLayout",function(){jxe(n,r)}),r(" updateInputGraph",function(){kxe(e,n)})})}function jxe(e,t){t(" makeSpaceForEdgeLabels",function(){Mxe(e)}),t(" removeSelfEdges",function(){Vxe(e)}),t(" acyclic",function(){PC.run(e)}),t(" nestingGraph.run",function(){OC.run(e)}),t(" rank",function(){fxe(ws.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){$xe(e)}),t(" removeEmptyRanks",function(){mxe(e)}),t(" nestingGraph.cleanup",function(){OC.cleanup(e)}),t(" normalizeRanks",function(){hxe(e)}),t(" assignRankMinMax",function(){Rxe(e)}),t(" removeEdgeLabelProxies",function(){Dxe(e)}),t(" normalize.run",function(){AC.run(e)}),t(" parentDummyChains",function(){pxe(e)}),t(" addBorderSegments",function(){gxe(e)}),t(" order",function(){yxe(e)}),t(" insertSelfEdges",function(){Uxe(e)}),t(" adjustCoordinateSystem",function(){CC.adjust(e)}),t(" position",function(){vxe(e)}),t(" positionSelfEdges",function(){Hxe(e)}),t(" removeBorderNodes",function(){Bxe(e)}),t(" normalize.undo",function(){AC.undo(e)}),t(" fixupEdgeLabelCoords",function(){zxe(e)}),t(" undoCoordinateSystem",function(){CC.undo(e)}),t(" translateGraph",function(){Ixe(e)}),t(" assignNodeIntersects",function(){Lxe(e)}),t(" reversePoints",function(){Fxe(e)}),t(" acyclic.undo",function(){PC.undo(e)})}function kxe(e,t){Re.forEach(e.nodes(),function(r){var n=e.node(r),a=t.node(r);n&&(n.x=a.x,n.y=a.y,t.children(r).length&&(n.width=a.width,n.height=a.height))}),Re.forEach(e.edges(),function(r){var n=e.edge(r),a=t.edge(r);n.points=a.points,Re.has(a,"x")&&(n.x=a.x,n.y=a.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Sxe=["nodesep","edgesep","ranksep","marginx","marginy"],Nxe={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_xe=["acyclicer","ranker","rankdir","align"],Exe=["width","height"],Pxe={width:0,height:0},Axe=["minlen","weight","width","height","labeloffset"],Oxe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Cxe=["labelpos"];function Txe(e){var t=new xxe({multigraph:!0,compound:!0}),r=Qx(e.graph());return t.setGraph(Re.merge({},Nxe,Zx(r,Sxe),Re.pick(r,_xe))),Re.forEach(e.nodes(),function(n){var a=Qx(e.node(n));t.setNode(n,Re.defaults(Zx(a,Exe),Pxe)),t.setParent(n,e.parent(n))}),Re.forEach(e.edges(),function(n){var a=Qx(e.edge(n));t.setEdge(n,Re.merge({},Oxe,Zx(a,Axe),Re.pick(a,Cxe)))}),t}function Mxe(e){var t=e.graph();t.ranksep/=2,Re.forEach(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function $xe(e){Re.forEach(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),a=e.node(t.w),i={rank:(a.rank-n.rank)/2+n.rank,e:t};ws.addDummyNode(e,"edge-proxy",i,"_ep")}})}function Rxe(e){var t=0;Re.forEach(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=Re.max(t,n.maxRank))}),e.graph().maxRank=t}function Dxe(e){Re.forEach(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function Ixe(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,a=0,i=e.graph(),s=i.marginx||0,o=i.marginy||0;function l(u){var d=u.x,f=u.y,h=u.width,p=u.height;t=Math.min(t,d-h/2),r=Math.max(r,d+h/2),n=Math.min(n,f-p/2),a=Math.max(a,f+p/2)}Re.forEach(e.nodes(),function(u){l(e.node(u))}),Re.forEach(e.edges(),function(u){var d=e.edge(u);Re.has(d,"x")&&l(d)}),t-=s,n-=o,Re.forEach(e.nodes(),function(u){var d=e.node(u);d.x-=t,d.y-=n}),Re.forEach(e.edges(),function(u){var d=e.edge(u);Re.forEach(d.points,function(f){f.x-=t,f.y-=n}),Re.has(d,"x")&&(d.x-=t),Re.has(d,"y")&&(d.y-=n)}),i.width=r-t+s,i.height=a-n+o}function Lxe(e){Re.forEach(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),a=e.node(t.w),i,s;r.points?(i=r.points[0],s=r.points[r.points.length-1]):(r.points=[],i=a,s=n),r.points.unshift(ws.intersectRect(n,i)),r.points.push(ws.intersectRect(a,s))})}function zxe(e){Re.forEach(e.edges(),function(t){var r=e.edge(t);if(Re.has(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Fxe(e){Re.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function Bxe(e){Re.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),a=e.node(r.borderBottom),i=e.node(Re.last(r.borderLeft)),s=e.node(Re.last(r.borderRight));r.width=Math.abs(s.x-i.x),r.height=Math.abs(a.y-n.y),r.x=i.x+r.width/2,r.y=n.y+r.height/2}}),Re.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function Vxe(e){Re.forEach(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function Uxe(e){var t=ws.buildLayerMatrix(e);Re.forEach(t,function(r){var n=0;Re.forEach(r,function(a,i){var s=e.node(a);s.order=i+n,Re.forEach(s.selfEdges,function(o){ws.addDummyNode(e,"selfedge",{width:o.label.width,height:o.label.height,rank:s.rank,order:i+ ++n,e:o.e,label:o.label},"_se")}),delete s.selfEdges})})}function Hxe(e){Re.forEach(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),a=n.x+n.width/2,i=n.y,s=r.x-a,o=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:a+2*s/3,y:i-o},{x:a+5*s/6,y:i-o},{x:a+s,y:i},{x:a+5*s/6,y:i+o},{x:a+2*s/3,y:i+o}],r.label.x=r.x,r.label.y=r.y}})}function Zx(e,t){return Re.mapValues(Re.pick(e,t),Number)}function Qx(e){var t={};return Re.forEach(e,function(r,n){t[n.toLowerCase()]=r}),t}var Zh=At,Wxe=Zr,qxe=da.Graph,Gxe={debugOrdering:Kxe};function Kxe(e){var t=Wxe.buildLayerMatrix(e),r=new qxe({compound:!0,multigraph:!0}).setGraph({});return Zh.forEach(e.nodes(),function(n){r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),Zh.forEach(e.edges(),function(n){r.setEdge(n.v,n.w,{},n.name)}),Zh.forEach(t,function(n,a){var i="layer"+a;r.setNode(i,{rank:"same"}),Zh.reduce(n,function(s,o){return r.setEdge(s,o,{style:"invis"}),o})}),r}var Yxe="0.8.5",Xxe={graphlib:da,layout:bxe,debug:Gxe,util:{time:Zr.time,notime:Zr.notime},version:Yxe};const TC=Je(Xxe),x1=240,b1=100,MC=180,w1=50,Zxe=(e,t,r="TB")=>{const n=new TC.graphlib.Graph;n.setDefaultEdgeLabel(()=>({}));const a=r==="LR";return n.setGraph({rankdir:r,nodesep:80,ranksep:100}),e.forEach(i=>{const s=i.type==="artifact"?MC:x1,o=i.type==="artifact"?w1:b1;n.setNode(i.id,{width:s,height:o})}),t.forEach(i=>{n.setEdge(i.source,i.target)}),TC.layout(n),e.forEach(i=>{const s=n.node(i.id);i.targetPosition=a?"left":"top",i.sourcePosition=a?"right":"bottom";const o=i.type==="artifact"?MC:x1,l=i.type==="artifact"?w1:b1;return i.position={x:s.x-o/2,y:s.y-l/2},i}),{nodes:e,edges:t}};function V6({dag:e,steps:t,selectedStep:r,onStepSelect:n,onArtifactSelect:a}){const{nodes:i,edges:s}=N.useMemo(()=>{if(!e||!e.nodes)return{nodes:[],edges:[]};const v=[],y=[],x=new Set,j=new Map,w=E=>{if(j.has(E))return j.get(E);const A=`artifact-${E}`;return x.has(A)||(v.push({id:A,type:"artifact",data:{label:E}}),x.add(A),j.set(E,A)),A},S={},k=[{bg:"bg-blue-50 dark:bg-blue-900/20",border:"border-blue-400 dark:border-blue-500",text:"text-blue-700 dark:text-blue-300",badge:"bg-blue-100 dark:bg-blue-800 text-blue-700 dark:text-blue-300"},{bg:"bg-purple-50 dark:bg-purple-900/20",border:"border-purple-400 dark:border-purple-500",text:"text-purple-700 dark:text-purple-300",badge:"bg-purple-100 dark:bg-purple-800 text-purple-700 dark:text-purple-300"},{bg:"bg-green-50 dark:bg-green-900/20",border:"border-green-400 dark:border-green-500",text:"text-green-700 dark:text-green-300",badge:"bg-green-100 dark:bg-green-800 text-green-700 dark:text-green-300"},{bg:"bg-orange-50 dark:bg-orange-900/20",border:"border-orange-400 dark:border-orange-500",text:"text-orange-700 dark:text-orange-300",badge:"bg-orange-100 dark:bg-orange-800 text-orange-700 dark:text-orange-300"},{bg:"bg-pink-50 dark:bg-pink-900/20",border:"border-pink-400 dark:border-pink-500",text:"text-pink-700 dark:text-pink-300",badge:"bg-pink-100 dark:bg-pink-800 text-pink-700 dark:text-pink-300"},{bg:"bg-cyan-50 dark:bg-cyan-900/20",border:"border-cyan-400 dark:border-cyan-500",text:"text-cyan-700 dark:text-cyan-300",badge:"bg-cyan-100 dark:bg-cyan-800 text-cyan-700 dark:text-cyan-300"}],_=new Set;return e.nodes.forEach(E=>{const A=(t==null?void 0:t[E.id])||{};A.execution_group&&_.add(A.execution_group)}),Array.from(_).forEach((E,A)=>{S[E]=k[A%k.length]}),e.nodes.forEach(E=>{var P,D;const A=(t==null?void 0:t[E.id])||{},C=A.success?"success":A.error?"failed":A.running?"running":"pending",M=A.execution_group,O=M?S[M]:null;v.push({id:E.id,type:"step",data:{label:E.name,status:C,duration:A.duration,cached:A.cached,selected:r===E.id,execution_group:M,groupColor:O}}),(P=E.inputs)==null||P.forEach(I=>{const L=w(I);y.push({id:`e-${L}-${E.id}`,source:L,target:E.id,type:"smoothstep",animated:!0,style:{stroke:"#94a3b8",strokeWidth:2},markerEnd:{type:fc.ArrowClosed,color:"#94a3b8"}})}),(D=E.outputs)==null||D.forEach(I=>{const L=w(I);y.push({id:`e-${E.id}-${L}`,source:E.id,target:L,type:"smoothstep",animated:!0,style:{stroke:"#94a3b8",strokeWidth:2},markerEnd:{type:fc.ArrowClosed,color:"#94a3b8"}})})}),{nodes:v,edges:y}},[e,t,r]),{nodes:o,edges:l}=N.useMemo(()=>Zxe(i,s,"TB"),[i,s]),[u,d,f]=Sre(o),[h,p,m]=Nre(l);N.useEffect(()=>{d(o.map(v=>v.type==="step"?{...v,data:{...v.data,selected:r===v.id}}:v)),p(l)},[o,l,r,d,p]);const g=N.useCallback((v,y)=>{y.type==="step"&&n?n(y.id):y.type==="artifact"&&a&&a(y.data.label)},[n,a]),b=N.useMemo(()=>({step:Qxe,artifact:Jxe}),[]);return c.jsx("div",{className:"w-full h-full bg-slate-50/50 dark:bg-slate-900/50 rounded-xl border border-slate-200 dark:border-slate-800 overflow-hidden",children:c.jsxs(QI,{nodes:u,edges:h,onNodesChange:f,onEdgesChange:m,onNodeClick:g,nodeTypes:b,fitView:!0,attributionPosition:"bottom-left",minZoom:.2,maxZoom:1.5,defaultViewport:{x:0,y:0,zoom:.8},fitViewOptions:{padding:.2},children:[c.jsx(Kre,{color:"#e2e8f0",gap:20,size:1}),c.jsx(Vre,{className:"bg-white border border-slate-200 shadow-sm rounded-lg"}),c.jsx(Rre,{nodeColor:v=>v.type==="step"?"#3b82f6":"#cbd5e1",maskColor:"rgba(241, 245, 249, 0.7)",className:"bg-white border border-slate-200 shadow-sm rounded-lg"})]})})}function Qxe({data:e}){const t={success:{icon:c.jsx(Vt,{size:18}),color:"text-emerald-600 dark:text-emerald-400",bg:"bg-white dark:bg-slate-800",border:"border-emerald-500 dark:border-emerald-500",ring:"ring-emerald-200 dark:ring-emerald-900",shadow:"shadow-emerald-100 dark:shadow-none"},failed:{icon:c.jsx(vr,{size:18}),color:"text-rose-600 dark:text-rose-400",bg:"bg-white dark:bg-slate-800",border:"border-rose-500 dark:border-rose-500",ring:"ring-rose-200 dark:ring-rose-900",shadow:"shadow-rose-100 dark:shadow-none"},running:{icon:c.jsx(PD,{size:18,className:"animate-spin"}),color:"text-amber-600 dark:text-amber-400",bg:"bg-white dark:bg-slate-800",border:"border-amber-500 dark:border-amber-500",ring:"ring-amber-200 dark:ring-amber-900",shadow:"shadow-amber-100 dark:shadow-none"},pending:{icon:c.jsx(ct,{size:18}),color:"text-slate-400 dark:text-slate-500",bg:"bg-slate-50 dark:bg-slate-800/50",border:"border-slate-300 dark:border-slate-700",ring:"ring-slate-200 dark:ring-slate-800",shadow:"shadow-slate-100 dark:shadow-none"}},r=t[e.status]||t.pending,n=e.groupColor,a=e.execution_group&&n;return c.jsxs("div",{className:`
|
|
530
|
-
relative px-4 py-3 rounded-lg border-2 transition-all duration-200
|
|
531
|
-
${a?n.bg:r.bg}
|
|
532
|
-
${a?n.border:r.border}
|
|
533
|
-
${e.selected?`ring-4 ${r.ring} shadow-lg`:`hover:shadow-md ${r.shadow}`}
|
|
534
|
-
`,style:{width:x1,height:b1},children:[c.jsx(bs,{type:"target",position:ge.Top,className:"!bg-slate-400 !w-2 !h-2"}),c.jsxs("div",{className:"flex flex-col h-full justify-between",children:[c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx("div",{className:`p-1.5 rounded-md bg-slate-50 border border-slate-100 ${r.color}`,children:r.icon}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("h3",{className:`font-bold text-sm truncate ${a?n.text:"text-slate-900 dark:text-white"}`,title:e.label,children:e.label}),c.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[c.jsx("p",{className:"text-xs text-slate-500 capitalize",children:e.status}),a&&c.jsx("span",{className:`text-[10px] font-semibold px-1.5 py-0.5 rounded ${n.badge}`,children:e.execution_group})]})]})]}),e.duration!==void 0&&c.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-slate-100 mt-1",children:[c.jsxs("span",{className:"text-xs text-slate-400 font-mono",children:[e.duration.toFixed(2),"s"]}),e.cached&&c.jsx("span",{className:"text-[10px] font-bold text-blue-600 bg-blue-50 px-1.5 py-0.5 rounded uppercase tracking-wider",children:"Cached"})]})]}),c.jsx(bs,{type:"source",position:ge.Bottom,className:"!bg-slate-400 !w-2 !h-2"})]})}function Jxe({data:e}){const r=(a=>{const i=a.toLowerCase();return i.includes("model")||i.includes("weights")?{icon:Dr,bgColor:"bg-purple-100 dark:bg-purple-900/30",borderColor:"border-purple-400 dark:border-purple-600",iconColor:"text-purple-600 dark:text-purple-400",textColor:"text-purple-900 dark:text-purple-100"}:i.includes("feature")||i.includes("train_set")||i.includes("test_set")?{icon:oa,bgColor:"bg-emerald-100 dark:bg-emerald-900/30",borderColor:"border-emerald-400 dark:border-emerald-600",iconColor:"text-emerald-600 dark:text-emerald-400",textColor:"text-emerald-900 dark:text-emerald-100"}:i.includes("data")||i.includes("batch")||i.includes("set")?{icon:Ir,bgColor:"bg-blue-100 dark:bg-blue-900/30",borderColor:"border-blue-400 dark:border-blue-600",iconColor:"text-blue-600 dark:text-blue-400",textColor:"text-blue-900 dark:text-blue-100"}:i.includes("metrics")||i.includes("report")||i.includes("status")?{icon:_a,bgColor:"bg-orange-100 dark:bg-orange-900/30",borderColor:"border-orange-400 dark:border-orange-600",iconColor:"text-orange-600 dark:text-orange-400",textColor:"text-orange-900 dark:text-orange-100"}:i.includes("image")||i.includes("docker")?{icon:Dr,bgColor:"bg-cyan-100 dark:bg-cyan-900/30",borderColor:"border-cyan-400 dark:border-cyan-600",iconColor:"text-cyan-600 dark:text-cyan-400",textColor:"text-cyan-900 dark:text-cyan-100"}:{icon:ps,bgColor:"bg-slate-100 dark:bg-slate-800",borderColor:"border-slate-300 dark:border-slate-600",iconColor:"text-slate-500 dark:text-slate-400",textColor:"text-slate-700 dark:text-slate-300"}})(e.label),n=r.icon;return c.jsxs("div",{className:`px-3 py-2 rounded-lg ${r.bgColor} border-2 ${r.borderColor} flex items-center justify-center gap-2 shadow-md hover:shadow-lg transition-all min-w-[140px] cursor-pointer`,style:{height:w1},children:[c.jsx(bs,{type:"target",position:ge.Top,className:"!bg-slate-400 !w-2 !h-2"}),c.jsx(n,{size:14,className:r.iconColor}),c.jsx("span",{className:`text-xs font-semibold ${r.textColor} truncate max-w-[100px]`,title:e.label,children:e.label}),c.jsx(bs,{type:"source",position:ge.Bottom,className:"!bg-slate-400 !w-2 !h-2"})]})}function ebe({run:e,onClose:t}){var g;const[r,n]=N.useState(null),[a,i]=N.useState([]),[s,o]=N.useState(!1),[l,u]=N.useState("overview"),[d,f]=N.useState(e==null?void 0:e.project);N.useEffect(()=>{e&&(h(),f(e.project))},[e]);const h=async()=>{o(!0);try{const[b,v]=await Promise.all([ve(`/api/runs/${e.run_id}`),ve(`/api/assets?run_id=${e.run_id}`)]),y=await b.json(),x=await v.json();n(y),i(x.assets||[]),y.project&&f(y.project)}catch(b){console.error("Failed to fetch run details:",b)}finally{o(!1)}},p=async b=>{try{await ve(`/api/runs/${e.run_id}/project`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:b})}),f(b)}catch(v){console.error("Failed to update project:",v)}};if(!e)return null;const m=r||e;return c.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-slate-900",children:[c.jsxs("div",{className:"p-6 border-b border-slate-200 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-800/50",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:"p-3 bg-blue-100 dark:bg-blue-900/30 rounded-xl text-blue-600 dark:text-blue-400",children:c.jsx(Lr,{size:24})}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:m.name||`Run ${(g=m.run_id)==null?void 0:g.slice(0,8)}`}),c.jsx(oc,{status:m.status})]}),c.jsxs("div",{className:"flex items-center gap-2 mt-1 text-sm text-slate-500",children:[c.jsx("span",{className:"font-mono text-xs bg-slate-100 dark:bg-slate-800 px-1.5 py-0.5 rounded",children:m.run_id}),c.jsx("span",{children:"•"}),c.jsx(lg,{currentProject:d,onUpdate:p}),m.pipeline_name&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"•"}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(oa,{size:12}),m.pipeline_name]})]})]})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(rt,{to:`/runs/${m.run_id}`,children:c.jsxs(ye,{variant:"outline",size:"sm",children:["Full View ",c.jsx(ii,{size:16,className:"ml-1"})]})}),c.jsx(ye,{variant:"ghost",size:"sm",onClick:t,children:c.jsx(Ps,{size:20,className:"text-slate-400"})})]})]}),c.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[c.jsx(Jx,{label:"Duration",value:m.duration?`${m.duration.toFixed(2)}s`:"-",icon:ct,color:"blue"}),c.jsx(Jx,{label:"Started",value:m.start_time?pt(new Date(m.start_time),"MMM d, HH:mm"):"-",icon:An,color:"purple"}),c.jsx(Jx,{label:"Steps",value:m.steps?Object.keys(m.steps).length:0,icon:Be,color:"emerald"})]})]}),c.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[c.jsxs("div",{className:"flex items-center gap-1 p-2 border-b border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900",children:[c.jsx(eb,{active:l==="overview",onClick:()=>u("overview"),icon:Be,label:"Overview"}),c.jsx(eb,{active:l==="steps",onClick:()=>u("steps"),icon:oa,label:"Steps"}),c.jsx(eb,{active:l==="artifacts",onClick:()=>u("artifacts"),icon:Dr,label:"Artifacts"})]}),c.jsx("div",{className:"flex-1 overflow-y-auto bg-slate-50 dark:bg-slate-900/50 p-4",children:s?c.jsx("div",{className:"flex justify-center py-12",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):c.jsxs(c.Fragment,{children:[l==="overview"&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden h-[400px] flex flex-col bg-white dark:bg-slate-800",children:[c.jsx("div",{className:"p-3 border-b border-slate-100 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50 flex justify-between items-center shrink-0",children:c.jsx("h3",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Pipeline Graph"})}),c.jsx("div",{className:"flex-1 min-h-0 bg-slate-50/50 dark:bg-slate-900/50",children:m.dag?c.jsx(V6,{dag:m.dag,steps:m.steps}):c.jsx("div",{className:"h-full flex items-center justify-center text-slate-400 text-sm",children:"No graph data available"})})]}),m.status==="failed"&&m.error&&c.jsxs("div",{className:"bg-rose-50 dark:bg-rose-900/20 border border-rose-200 dark:border-rose-800 rounded-xl p-4",children:[c.jsxs("h3",{className:"text-rose-700 dark:text-rose-400 font-semibold flex items-center gap-2 mb-2",children:[c.jsx(vr,{size:18}),"Execution Failed"]}),c.jsx("pre",{className:"text-xs font-mono text-rose-600 dark:text-rose-300 whitespace-pre-wrap overflow-x-auto",children:m.error})]})]}),l==="steps"&&c.jsxs("div",{className:"space-y-3",children:[m.steps&&Object.entries(m.steps).map(([b,v])=>c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-3 rounded-xl border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(oc,{status:v.success?"completed":v.error?"failed":"running",size:"sm"}),c.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:b})]}),c.jsx("span",{className:"text-xs text-slate-500 font-mono",children:v.duration?`${v.duration.toFixed(2)}s`:"-"})]}),v.error&&c.jsx("div",{className:"text-xs text-rose-600 bg-rose-50 dark:bg-rose-900/20 p-2 rounded mt-2 font-mono",children:v.error})]},b)),(!m.steps||Object.keys(m.steps).length===0)&&c.jsx("div",{className:"text-center py-8 text-slate-500",children:"No steps recorded"})]}),l==="artifacts"&&c.jsx("div",{className:"space-y-3",children:a.length>0?a.map(b=>c.jsxs("div",{className:"flex items-center gap-3 p-3 bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 hover:border-primary-300 dark:hover:border-primary-700 transition-colors",children:[c.jsx("div",{className:"p-2 bg-slate-50 dark:bg-slate-700 rounded-md text-slate-500 dark:text-slate-400",children:c.jsx(ps,{size:18})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"text-sm font-semibold text-slate-900 dark:text-white truncate",children:b.name}),c.jsx("p",{className:"text-xs text-slate-500 truncate",children:b.type})]}),c.jsx(rt,{to:`/runs/${e.run_id}`,children:c.jsx(ye,{variant:"ghost",size:"sm",children:c.jsx(ii,{size:14})})})]},b.artifact_id)):c.jsx("div",{className:"text-center py-8 text-slate-500",children:"No artifacts found for this run."})})]})})]})]})}function Jx({label:e,value:t,icon:r,color:n}){const a={blue:"text-blue-600 bg-blue-50 dark:bg-blue-900/20",emerald:"text-emerald-600 bg-emerald-50 dark:bg-emerald-900/20",purple:"text-purple-600 bg-purple-50 dark:bg-purple-900/20",rose:"text-rose-600 bg-rose-50 dark:bg-rose-900/20"};return c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-3 rounded-xl border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("div",{className:`p-1 rounded-lg ${a[n]}`,children:c.jsx(r,{size:14})}),c.jsx("span",{className:"text-xs text-slate-500 font-medium",children:e})]}),c.jsx("div",{className:"text-sm font-bold text-slate-900 dark:text-white pl-1 truncate",title:t,children:t})]})}function eb({active:e,onClick:t,icon:r,label:n}){return c.jsxs("button",{onClick:t,className:`
|
|
535
|
-
flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium transition-all
|
|
536
|
-
${e?"bg-slate-100 dark:bg-slate-800 text-slate-900 dark:text-white":"text-slate-500 hover:bg-slate-50 dark:hover:bg-slate-800/50 hover:text-slate-700 dark:hover:text-slate-300"}
|
|
537
|
-
`,children:[c.jsx(r,{size:16}),n]})}function tbe(){const[e,t]=N.useState([]),[r,n]=N.useState(!0),[a,i]=N.useState(null),[s]=Gk(),o=J0(),{selectedProject:l}=vi(),[u,d]=N.useState("single"),[f,h]=N.useState([]),[p,m]=N.useState("all"),g=s.get("pipeline"),b=async()=>{n(!0);try{let w="/api/runs/?limit=100";l&&(w+=`&project=${encodeURIComponent(l)}`),g&&(w+=`&pipeline=${encodeURIComponent(g)}`);const k=await(await ve(w)).json();t(k.runs||[])}catch(w){console.error(w)}finally{n(!1)}};N.useEffect(()=>{b()},[l,g]);const v=w=>{u==="single"&&i(w)},y=()=>{u==="single"?(d("multi"),h([])):(d("single"),h([]))},x=(w,S)=>{h(S?k=>[...k,w]:k=>k.filter(_=>_!==w))},j=()=>{f.length>=2&&o(`/compare?runs=${f.join(",")}`)};return c.jsxs("div",{className:"h-screen flex flex-col overflow-hidden bg-slate-50 dark:bg-slate-900",children:[c.jsx("div",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 px-6 py-4 shrink-0",children:c.jsxs("div",{className:"flex items-center justify-between max-w-[1800px] mx-auto",children:[c.jsxs("div",{children:[c.jsxs("h1",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(Lr,{className:"text-blue-500"}),"Pipeline Runs"]}),c.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"Monitor and track all your pipeline executions"})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[u==="multi"?c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"text-sm text-slate-500 mr-2",children:[f.length," selected"]}),c.jsxs(ye,{size:"sm",variant:"primary",disabled:f.length<2,onClick:j,children:[c.jsx(TU,{size:16,className:"mr-2"}),"Compare"]}),c.jsxs(ye,{variant:"ghost",size:"sm",onClick:y,children:[c.jsx(Ps,{size:16,className:"mr-2"}),"Cancel"]})]}):c.jsxs(ye,{variant:"outline",size:"sm",onClick:y,children:[c.jsx(SU,{size:16,className:"mr-2"}),"Select to Compare"]}),c.jsxs(ye,{variant:"outline",size:"sm",onClick:b,disabled:r,children:[c.jsx(rg,{size:16,className:`mr-2 ${r?"animate-spin":""}`}),"Refresh"]})]})]})}),c.jsx("div",{className:"flex-1 overflow-hidden",children:c.jsx("div",{className:"h-full max-w-[1800px] mx-auto px-6 py-6",children:c.jsxs("div",{className:"h-full flex gap-6",children:[c.jsxs("div",{className:"w-[320px] shrink-0 flex flex-col bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden shadow-sm",children:[c.jsxs("div",{className:"p-3 border-b border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50 flex justify-between items-center",children:[c.jsx("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Explorer"}),g&&c.jsxs(jt,{variant:"secondary",className:"text-[10px]",children:["Filtered: ",g]})]}),c.jsx("div",{className:"flex-1 min-h-0",children:c.jsx($S,{mode:"runs",projectId:l,onSelect:v,selectedId:a==null?void 0:a.run_id,selectionMode:u,selectedIds:f,onMultiSelect:x})})]}),c.jsx("div",{className:"flex-1 min-w-0 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden shadow-sm",children:a?c.jsx(ebe,{run:a,onClose:()=>i(null)}):c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center p-8 bg-slate-50/50 dark:bg-slate-900/50",children:[c.jsx("div",{className:"w-20 h-20 bg-blue-100 dark:bg-blue-900/30 rounded-full flex items-center justify-center mb-6 animate-pulse",children:c.jsx(Lr,{size:40,className:"text-blue-500"})}),c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-2",children:"Select a Run"}),c.jsx("p",{className:"text-slate-500 max-w-md",children:"Choose a run from the sidebar to view execution details, logs, and artifacts."})]})})]})})})]})}const rh=async e=>{if(!e)return;const r=`${await h4()}/api/assets/${e}/download`;window.open(r,"_blank","noopener,noreferrer")};function rbe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function nbe(e,t){if(e==null)return{};var r,n,a=rbe(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function j1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function abe(e){if(Array.isArray(e))return j1(e)}function ibe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function sbe(e,t){if(e){if(typeof e=="string")return j1(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j1(e,t):void 0}}function obe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
538
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function k1(e){return abe(e)||ibe(e)||sbe(e)||obe()}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 lbe(e,t){if(rf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(rf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cbe(e){var t=lbe(e,"string");return rf(t)=="symbol"?t:t+""}function U6(e,t,r){return(t=cbe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function S1(){return S1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S1.apply(null,arguments)}function $C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$C(Object(r),!0).forEach(function(n){U6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$C(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ube(e){var t=e.length;if(t===0||t===1)return e;if(t===2)return[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])];if(t===3)return[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])];if(t>=4)return[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]}var tb={};function dbe(e){if(e.length===0||e.length===1)return e;var t=e.join(".");return tb[t]||(tb[t]=ube(e)),tb[t]}function fbe(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,n=e.filter(function(i){return i!=="token"}),a=dbe(n);return a.reduce(function(i,s){return Al(Al({},i),r[s])},t)}function RC(e){return e.join(" ")}function hbe(e,t){var r=0;return function(n){return r+=1,n.map(function(a,i){return H6({node:a,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(r,"-").concat(i)})})}}function H6(e){var t=e.node,r=e.stylesheet,n=e.style,a=n===void 0?{}:n,i=e.useInlineStyles,s=e.key,o=t.properties,l=t.type,u=t.tagName,d=t.value;if(l==="text")return d;if(u){var f=hbe(r,i),h;if(!i)h=Al(Al({},o),{},{className:RC(o.className)});else{var p=Object.keys(r).reduce(function(v,y){return y.split(".").forEach(function(x){v.includes(x)||v.push(x)}),v},[]),m=o.className&&o.className.includes("token")?["token"]:[],g=o.className&&m.concat(o.className.filter(function(v){return!p.includes(v)}));h=Al(Al({},o),{},{className:RC(g)||void 0,style:fbe(o.className,Object.assign({},o.style,a),r)})}var b=f(t.children);return T.createElement(u,S1({key:s},h),b)}}const pbe=function(e,t){var r=e.listLanguages();return r.indexOf(t)!==-1};var mbe=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function DC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DC(Object(r),!0).forEach(function(n){U6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var gbe=/\n/g;function ybe(e){return e.match(gbe)}function vbe(e){var t=e.lines,r=e.startingLineNumber,n=e.style;return t.map(function(a,i){var s=i+r;return T.createElement("span",{key:"line-".concat(i),className:"react-syntax-highlighter-line-number",style:typeof n=="function"?n(s):n},"".concat(s,`
|
|
539
|
-
`))})}function xbe(e){var t=e.codeString,r=e.codeStyle,n=e.containerStyle,a=n===void 0?{float:"left",paddingRight:"10px"}:n,i=e.numberStyle,s=i===void 0?{}:i,o=e.startingLineNumber;return T.createElement("code",{style:Object.assign({},r,a)},vbe({lines:t.replace(/\n$/,"").split(`
|
|
540
|
-
`),style:s,startingLineNumber:o}))}function bbe(e){return"".concat(e.toString().length,".25em")}function W6(e,t){return{type:"element",tagName:"span",properties:{key:"line-number--".concat(e),className:["comment","linenumber","react-syntax-highlighter-line-number"],style:t},children:[{type:"text",value:e}]}}function q6(e,t,r){var n={display:"inline-block",minWidth:bbe(r),paddingRight:"1em",textAlign:"right",userSelect:"none"},a=typeof e=="function"?e(t):e,i=Xi(Xi({},n),a);return i}function zp(e){var t=e.children,r=e.lineNumber,n=e.lineNumberStyle,a=e.largestLineNumber,i=e.showInlineLineNumbers,s=e.lineProps,o=s===void 0?{}:s,l=e.className,u=l===void 0?[]:l,d=e.showLineNumbers,f=e.wrapLongLines,h=e.wrapLines,p=h===void 0?!1:h,m=p?Xi({},typeof o=="function"?o(r):o):{};if(m.className=m.className?[].concat(k1(m.className.trim().split(/\s+/)),k1(u)):u,r&&i){var g=q6(n,r,a);t.unshift(W6(r,g))}return f&d&&(m.style=Xi({display:"flex"},m.style)),{type:"element",tagName:"span",properties:m,children:t}}function G6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];e.length===void 0&&(e=[e]);for(var n=0;n<e.length;n++){var a=e[n];if(a.type==="text")r.push(zp({children:[a],className:k1(new Set(t))}));else if(a.children){var i,s=t.concat(((i=a.properties)===null||i===void 0?void 0:i.className)||[]);G6(a.children,s).forEach(function(o){return r.push(o)})}}return r}function wbe(e,t,r,n,a,i,s,o,l){var u,d=G6(e.value),f=[],h=-1,p=0;function m(w,S){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return zp({children:w,lineNumber:S,lineNumberStyle:o,largestLineNumber:s,showInlineLineNumbers:a,lineProps:r,className:k,showLineNumbers:n,wrapLongLines:l,wrapLines:t})}function g(w,S){if(n&&S&&a){var k=q6(o,S,s);w.unshift(W6(S,k))}return w}function b(w,S){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return t||k.length>0?m(w,S,k):g(w,S)}for(var v=function(){var S=d[p],k=S.children[0].value,_=ybe(k);if(_){var E=k.split(`
|
|
541
|
-
`);E.forEach(function(A,C){var M=n&&f.length+i,O={type:"text",value:"".concat(A,`
|
|
542
|
-
`)};if(C===0){var P=d.slice(h+1,p).concat(zp({children:[O],className:S.properties.className})),D=b(P,M);f.push(D)}else if(C===E.length-1){var I=d[p+1]&&d[p+1].children&&d[p+1].children[0],L={type:"text",value:"".concat(A)};if(I){var R=zp({children:[L],className:S.properties.className});d.splice(p+1,0,R)}else{var $=[L],z=b($,M,S.properties.className);f.push(z)}}else{var U=[O],V=b(U,M,S.properties.className);f.push(V)}}),h=p}p++};p<d.length;)v();if(h!==d.length-1){var y=d.slice(h+1,d.length);if(y&&y.length){var x=n&&f.length+i,j=b(y,x);f.push(j)}}return t?f:(u=[]).concat.apply(u,f)}function jbe(e){var t=e.rows,r=e.stylesheet,n=e.useInlineStyles;return t.map(function(a,i){return H6({node:a,stylesheet:r,useInlineStyles:n,key:"code-segment-".concat(i)})})}function K6(e){return e&&typeof e.highlightAuto<"u"}function kbe(e){var t=e.astGenerator,r=e.language,n=e.code,a=e.defaultCodeValue;if(K6(t)){var i=pbe(t,r);return r==="text"?{value:a,language:"text"}:i?t.highlight(r,n):t.highlightAuto(n)}try{return r&&r!=="text"?{value:t.highlight(n,r)}:{value:a}}catch{return{value:a}}}function Sbe(e,t){return function(n){var a,i,s=n.language,o=n.children,l=n.style,u=l===void 0?t:l,d=n.customStyle,f=d===void 0?{}:d,h=n.codeTagProps,p=h===void 0?{className:s?"language-".concat(s):void 0,style:Xi(Xi({},u['code[class*="language-"]']),u['code[class*="language-'.concat(s,'"]')])}:h,m=n.useInlineStyles,g=m===void 0?!0:m,b=n.showLineNumbers,v=b===void 0?!1:b,y=n.showInlineLineNumbers,x=y===void 0?!0:y,j=n.startingLineNumber,w=j===void 0?1:j,S=n.lineNumberContainerStyle,k=n.lineNumberStyle,_=k===void 0?{}:k,E=n.wrapLines,A=n.wrapLongLines,C=A===void 0?!1:A,M=n.lineProps,O=M===void 0?{}:M,P=n.renderer,D=n.PreTag,I=D===void 0?"pre":D,L=n.CodeTag,R=L===void 0?"code":L,$=n.code,z=$===void 0?(Array.isArray(o)?o[0]:o)||"":$,U=n.astGenerator,V=nbe(n,mbe);U=U||e;var F=v?T.createElement(xbe,{containerStyle:S,codeStyle:p.style||{},numberStyle:_,startingLineNumber:w,codeString:z}):null,W=u.hljs||u['pre[class*="language-"]']||{backgroundColor:"#fff"},K=K6(U)?"hljs":"prismjs",Q=g?Object.assign({},V,{style:Object.assign({},W,f)}):Object.assign({},V,{className:V.className?"".concat(K," ").concat(V.className):K,style:Object.assign({},f)});if(C?p.style=Xi({whiteSpace:"pre-wrap"},p.style):p.style=Xi({whiteSpace:"pre"},p.style),!U)return T.createElement(I,Q,F,T.createElement(R,p,z));(E===void 0&&P||C)&&(E=!0),P=P||jbe;var ne=[{type:"text",value:z}],pe=kbe({astGenerator:U,language:s,code:z,defaultCodeValue:ne});pe.language===null&&(pe.value=ne);var X=(a=(i=z.match(/\n/g))===null||i===void 0?void 0:i.length)!==null&&a!==void 0?a:0,ee=w+X,ie=wbe(pe,E,O,v,x,w,ee,_,C);return T.createElement(I,Q,T.createElement(R,p,!x&&F,P({rows:ie,stylesheet:u,useInlineStyles:g})))}}var Uo={};function N2(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(function(t){var r=e[t];typeof r=="object"&&!Object.isFrozen(r)&&N2(r)}),e}var Y6=N2,Nbe=N2;Y6.default=Nbe;class IC{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function ql(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Zi(e,...t){const r=Object.create(null);for(const n in e)r[n]=e[n];return t.forEach(function(n){for(const a in n)r[a]=n[a]}),r}const _be="</span>",LC=e=>!!e.kind;class Ebe{constructor(t,r){this.buffer="",this.classPrefix=r.classPrefix,t.walk(this)}addText(t){this.buffer+=ql(t)}openNode(t){if(!LC(t))return;let r=t.kind;t.sublanguage||(r=`${this.classPrefix}${r}`),this.span(r)}closeNode(t){LC(t)&&(this.buffer+=_be)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}}class _2{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){const r={kind:t,children:[]};this.add(r),this.stack.push(r)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,r){return typeof r=="string"?t.addText(r):r.children&&(t.openNode(r),r.children.forEach(n=>this._walk(t,n)),t.closeNode(r)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(r=>typeof r=="string")?t.children=[t.children.join("")]:t.children.forEach(r=>{_2._collapse(r)}))}}class Pbe extends _2{constructor(t){super(),this.options=t}addKeyword(t,r){t!==""&&(this.openNode(r),this.addText(t),this.closeNode())}addText(t){t!==""&&this.add(t)}addSublanguage(t,r){const n=t.root;n.kind=r,n.sublanguage=!0,this.add(n)}toHTML(){return new Ebe(this,this.options).value()}finalize(){return!0}}function Abe(e){return new RegExp(e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function nf(e){return e?typeof e=="string"?e:e.source:null}function Obe(...e){return e.map(r=>nf(r)).join("")}function Cbe(...e){return"("+e.map(r=>nf(r)).join("|")+")"}function Tbe(e){return new RegExp(e.toString()+"|").exec("").length-1}function Mbe(e,t){const r=e&&e.exec(t);return r&&r.index===0}const $be=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function Rbe(e,t="|"){let r=0;return e.map(n=>{r+=1;const a=r;let i=nf(n),s="";for(;i.length>0;){const o=$be.exec(i);if(!o){s+=i;break}s+=i.substring(0,o.index),i=i.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?s+="\\"+String(Number(o[1])+a):(s+=o[0],o[0]==="("&&r++)}return s}).map(n=>`(${n})`).join(t)}const Dbe=/\b\B/,X6="[a-zA-Z]\\w*",E2="[a-zA-Z_]\\w*",P2="\\b\\d+(\\.\\d+)?",Z6="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Q6="\\b(0b[01]+)",Ibe="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Lbe=(e={})=>{const t=/^#![ ]*\//;return e.binary&&(e.begin=Obe(t,/.*\b/,e.binary,/\b.*/)),Zi({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(r,n)=>{r.index!==0&&n.ignoreMatch()}},e)},af={begin:"\\\\[\\s\\S]",relevance:0},zbe={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[af]},Fbe={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[af]},J6={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Ig=function(e,t,r={}){const n=Zi({className:"comment",begin:e,end:t,contains:[]},r);return n.contains.push(J6),n.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),n},Bbe=Ig("//","$"),Vbe=Ig("/\\*","\\*/"),Ube=Ig("#","$"),Hbe={className:"number",begin:P2,relevance:0},Wbe={className:"number",begin:Z6,relevance:0},qbe={className:"number",begin:Q6,relevance:0},Gbe={className:"number",begin:P2+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},Kbe={begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[af,{begin:/\[/,end:/\]/,relevance:0,contains:[af]}]}]},Ybe={className:"title",begin:X6,relevance:0},Xbe={className:"title",begin:E2,relevance:0},Zbe={begin:"\\.\\s*"+E2,relevance:0},Qbe=function(e){return Object.assign(e,{"on:begin":(t,r)=>{r.data._beginMatch=t[1]},"on:end":(t,r)=>{r.data._beginMatch!==t[1]&&r.ignoreMatch()}})};var Qh=Object.freeze({__proto__:null,MATCH_NOTHING_RE:Dbe,IDENT_RE:X6,UNDERSCORE_IDENT_RE:E2,NUMBER_RE:P2,C_NUMBER_RE:Z6,BINARY_NUMBER_RE:Q6,RE_STARTERS_RE:Ibe,SHEBANG:Lbe,BACKSLASH_ESCAPE:af,APOS_STRING_MODE:zbe,QUOTE_STRING_MODE:Fbe,PHRASAL_WORDS_MODE:J6,COMMENT:Ig,C_LINE_COMMENT_MODE:Bbe,C_BLOCK_COMMENT_MODE:Vbe,HASH_COMMENT_MODE:Ube,NUMBER_MODE:Hbe,C_NUMBER_MODE:Wbe,BINARY_NUMBER_MODE:qbe,CSS_NUMBER_MODE:Gbe,REGEXP_MODE:Kbe,TITLE_MODE:Ybe,UNDERSCORE_TITLE_MODE:Xbe,METHOD_GUARD:Zbe,END_SAME_AS_BEGIN:Qbe});function Jbe(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function ewe(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=Jbe,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function twe(e,t){Array.isArray(e.illegal)&&(e.illegal=Cbe(...e.illegal))}function rwe(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function nwe(e,t){e.relevance===void 0&&(e.relevance=1)}const awe=["of","and","for","in","not","or","if","then","parent","list","value"],iwe="keyword";function ez(e,t,r=iwe){const n={};return typeof e=="string"?a(r,e.split(" ")):Array.isArray(e)?a(r,e):Object.keys(e).forEach(function(i){Object.assign(n,ez(e[i],t,i))}),n;function a(i,s){t&&(s=s.map(o=>o.toLowerCase())),s.forEach(function(o){const l=o.split("|");n[l[0]]=[i,swe(l[0],l[1])]})}}function swe(e,t){return t?Number(t):owe(e)?0:1}function owe(e){return awe.includes(e.toLowerCase())}function lwe(e,{plugins:t}){function r(o,l){return new RegExp(nf(o),"m"+(e.case_insensitive?"i":"")+(l?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(l,u){u.position=this.position++,this.matchIndexes[this.matchAt]=u,this.regexes.push([u,l]),this.matchAt+=Tbe(l)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const l=this.regexes.map(u=>u[1]);this.matcherRe=r(Rbe(l),!0),this.lastIndex=0}exec(l){this.matcherRe.lastIndex=this.lastIndex;const u=this.matcherRe.exec(l);if(!u)return null;const d=u.findIndex((h,p)=>p>0&&h!==void 0),f=this.matchIndexes[d];return u.splice(0,d),Object.assign(u,f)}}class a{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(l){if(this.multiRegexes[l])return this.multiRegexes[l];const u=new n;return this.rules.slice(l).forEach(([d,f])=>u.addRule(d,f)),u.compile(),this.multiRegexes[l]=u,u}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(l,u){this.rules.push([l,u]),u.type==="begin"&&this.count++}exec(l){const u=this.getMatcher(this.regexIndex);u.lastIndex=this.lastIndex;let d=u.exec(l);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){const f=this.getMatcher(0);f.lastIndex=this.lastIndex+1,d=f.exec(l)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function i(o){const l=new a;return o.contains.forEach(u=>l.addRule(u.begin,{rule:u,type:"begin"})),o.terminatorEnd&&l.addRule(o.terminatorEnd,{type:"end"}),o.illegal&&l.addRule(o.illegal,{type:"illegal"}),l}function s(o,l){const u=o;if(o.isCompiled)return u;[rwe].forEach(f=>f(o,l)),e.compilerExtensions.forEach(f=>f(o,l)),o.__beforeBegin=null,[ewe,twe,nwe].forEach(f=>f(o,l)),o.isCompiled=!0;let d=null;if(typeof o.keywords=="object"&&(d=o.keywords.$pattern,delete o.keywords.$pattern),o.keywords&&(o.keywords=ez(o.keywords,e.case_insensitive)),o.lexemes&&d)throw new Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ");return d=d||o.lexemes||/\w+/,u.keywordPatternRe=r(d,!0),l&&(o.begin||(o.begin=/\B|\b/),u.beginRe=r(o.begin),o.endSameAsBegin&&(o.end=o.begin),!o.end&&!o.endsWithParent&&(o.end=/\B|\b/),o.end&&(u.endRe=r(o.end)),u.terminatorEnd=nf(o.end)||"",o.endsWithParent&&l.terminatorEnd&&(u.terminatorEnd+=(o.end?"|":"")+l.terminatorEnd)),o.illegal&&(u.illegalRe=r(o.illegal)),o.contains||(o.contains=[]),o.contains=[].concat(...o.contains.map(function(f){return cwe(f==="self"?o:f)})),o.contains.forEach(function(f){s(f,u)}),o.starts&&s(o.starts,l),u.matcher=i(u),u}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=Zi(e.classNameAliases||{}),s(e)}function tz(e){return e?e.endsWithParent||tz(e.starts):!1}function cwe(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return Zi(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:tz(e)?Zi(e,{starts:e.starts?Zi(e.starts):null}):Object.isFrozen(e)?Zi(e):e}var uwe="10.7.3";function dwe(e){return!!(e||e==="")}function fwe(e){const t={props:["language","code","autodetect"],data:function(){return{detectedLanguage:"",unknownLanguage:!1}},computed:{className(){return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`),this.unknownLanguage=!0,ql(this.code);let n={};return this.autoDetect?(n=e.highlightAuto(this.code),this.detectedLanguage=n.language):(n=e.highlight(this.language,this.code,this.ignoreIllegals),this.detectedLanguage=this.language),n.value},autoDetect(){return!this.language||dwe(this.autodetect)},ignoreIllegals(){return!0}},render(n){return n("pre",{},[n("code",{class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{Component:t,VuePlugin:{install(n){n.component("highlightjs",t)}}}}const hwe={"after:highlightElement":({el:e,result:t,text:r})=>{const n=zC(e);if(!n.length)return;const a=document.createElement("div");a.innerHTML=t.value,t.value=pwe(n,zC(a),r)}};function N1(e){return e.nodeName.toLowerCase()}function zC(e){const t=[];return function r(n,a){for(let i=n.firstChild;i;i=i.nextSibling)i.nodeType===3?a+=i.nodeValue.length:i.nodeType===1&&(t.push({event:"start",offset:a,node:i}),a=r(i,a),N1(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:a,node:i}));return a}(e,0),t}function pwe(e,t,r){let n=0,a="";const i=[];function s(){return!e.length||!t.length?e.length?e:t:e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:t[0].event==="start"?e:t}function o(d){function f(h){return" "+h.nodeName+'="'+ql(h.value)+'"'}a+="<"+N1(d)+[].map.call(d.attributes,f).join("")+">"}function l(d){a+="</"+N1(d)+">"}function u(d){(d.event==="start"?o:l)(d.node)}for(;e.length||t.length;){let d=s();if(a+=ql(r.substring(n,d[0].offset)),n=d[0].offset,d===e){i.reverse().forEach(l);do u(d.splice(0,1)[0]),d=s();while(d===e&&d.length&&d[0].offset===n);i.reverse().forEach(o)}else d[0].event==="start"?i.push(d[0].node):i.pop(),u(d.splice(0,1)[0])}return a+ql(r.substr(n))}const FC={},rb=e=>{console.error(e)},BC=(e,...t)=>{console.log(`WARN: ${e}`,...t)},gn=(e,t)=>{FC[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),FC[`${e}/${t}`]=!0)},nb=ql,VC=Zi,UC=Symbol("nomatch"),mwe=function(e){const t=Object.create(null),r=Object.create(null),n=[];let a=!0;const i=/(^(<[^>]+>|\t|)+|\n)/gm,s="Could not find the language '{}', did you forget to load/include a language module?",o={disableAutodetect:!0,name:"Plain text",contains:[]};let l={noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:null,__emitter:Pbe};function u(F){return l.noHighlightRe.test(F)}function d(F){let W=F.className+" ";W+=F.parentNode?F.parentNode.className:"";const K=l.languageDetectRe.exec(W);if(K){const Q=D(K[1]);return Q||(BC(s.replace("{}",K[1])),BC("Falling back to no-highlight mode for this block.",F)),Q?K[1]:"no-highlight"}return W.split(/\s+/).find(Q=>u(Q)||D(Q))}function f(F,W,K,Q){let ne="",pe="";typeof W=="object"?(ne=F,K=W.ignoreIllegals,pe=W.language,Q=void 0):(gn("10.7.0","highlight(lang, code, ...args) has been deprecated."),gn("10.7.0",`Please use highlight(code, options) instead.
|
|
543
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),pe=F,ne=W);const X={code:ne,language:pe};z("before:highlight",X);const ee=X.result?X.result:h(X.language,X.code,K,Q);return ee.code=X.code,z("after:highlight",ee),ee}function h(F,W,K,Q){function ne(ce,se){const je=Ze.case_insensitive?se[0].toLowerCase():se[0];return Object.prototype.hasOwnProperty.call(ce.keywords,je)&&ce.keywords[je]}function pe(){if(!we.keywords){Ue.addText(He);return}let ce=0;we.keywordPatternRe.lastIndex=0;let se=we.keywordPatternRe.exec(He),je="";for(;se;){je+=He.substring(ce,se.index);const Ae=ne(we,se);if(Ae){const[gt,Cr]=Ae;if(Ue.addText(je),je="",Or+=Cr,gt.startsWith("_"))je+=se[0];else{const Vr=Ze.classNameAliases[gt]||gt;Ue.addKeyword(se[0],Vr)}}else je+=se[0];ce=we.keywordPatternRe.lastIndex,se=we.keywordPatternRe.exec(He)}je+=He.substr(ce),Ue.addText(je)}function X(){if(He==="")return;let ce=null;if(typeof we.subLanguage=="string"){if(!t[we.subLanguage]){Ue.addText(He);return}ce=h(we.subLanguage,He,!0,Ar[we.subLanguage]),Ar[we.subLanguage]=ce.top}else ce=m(He,we.subLanguage.length?we.subLanguage:null);we.relevance>0&&(Or+=ce.relevance),Ue.addSublanguage(ce.emitter,ce.language)}function ee(){we.subLanguage!=null?X():pe(),He=""}function ie(ce){return ce.className&&Ue.openNode(Ze.classNameAliases[ce.className]||ce.className),we=Object.create(ce,{parent:{value:we}}),we}function G(ce,se,je){let Ae=Mbe(ce.endRe,je);if(Ae){if(ce["on:end"]){const gt=new IC(ce);ce["on:end"](se,gt),gt.isMatchIgnored&&(Ae=!1)}if(Ae){for(;ce.endsParent&&ce.parent;)ce=ce.parent;return ce}}if(ce.endsWithParent)return G(ce.parent,se,je)}function Ee(ce){return we.matcher.regexIndex===0?(He+=ce[0],1):(Ut=!0,0)}function be(ce){const se=ce[0],je=ce.rule,Ae=new IC(je),gt=[je.__beforeBegin,je["on:begin"]];for(const Cr of gt)if(Cr&&(Cr(ce,Ae),Ae.isMatchIgnored))return Ee(se);return je&&je.endSameAsBegin&&(je.endRe=Abe(se)),je.skip?He+=se:(je.excludeBegin&&(He+=se),ee(),!je.returnBegin&&!je.excludeBegin&&(He=se)),ie(je),je.returnBegin?0:se.length}function Pe(ce){const se=ce[0],je=W.substr(ce.index),Ae=G(we,ce,je);if(!Ae)return UC;const gt=we;gt.skip?He+=se:(gt.returnEnd||gt.excludeEnd||(He+=se),ee(),gt.excludeEnd&&(He=se));do we.className&&Ue.closeNode(),!we.skip&&!we.subLanguage&&(Or+=we.relevance),we=we.parent;while(we!==Ae.parent);return Ae.starts&&(Ae.endSameAsBegin&&(Ae.starts.endRe=Ae.endRe),ie(Ae.starts)),gt.returnEnd?0:se.length}function Ce(){const ce=[];for(let se=we;se!==Ze;se=se.parent)se.className&&ce.unshift(se.className);ce.forEach(se=>Ue.openNode(se))}let ke={};function oe(ce,se){const je=se&&se[0];if(He+=ce,je==null)return ee(),0;if(ke.type==="begin"&&se.type==="end"&&ke.index===se.index&&je===""){if(He+=W.slice(se.index,se.index+1),!a){const Ae=new Error("0 width match regex");throw Ae.languageName=F,Ae.badRule=ke.rule,Ae}return 1}if(ke=se,se.type==="begin")return be(se);if(se.type==="illegal"&&!K){const Ae=new Error('Illegal lexeme "'+je+'" for mode "'+(we.className||"<unnamed>")+'"');throw Ae.mode=we,Ae}else if(se.type==="end"){const Ae=Pe(se);if(Ae!==UC)return Ae}if(se.type==="illegal"&&je==="")return 1;if(Zt>1e5&&Zt>se.index*3)throw new Error("potential infinite loop, way more iterations than matches");return He+=je,je.length}const Ze=D(F);if(!Ze)throw rb(s.replace("{}",F)),new Error('Unknown language: "'+F+'"');const sr=lwe(Ze,{plugins:n});let Xt="",we=Q||sr;const Ar={},Ue=new l.__emitter(l);Ce();let He="",Or=0,or=0,Zt=0,Ut=!1;try{for(we.matcher.considerAll();;){Zt++,Ut?Ut=!1:we.matcher.considerAll(),we.matcher.lastIndex=or;const ce=we.matcher.exec(W);if(!ce)break;const se=W.substring(or,ce.index),je=oe(se,ce);or=ce.index+je}return oe(W.substr(or)),Ue.closeAllNodes(),Ue.finalize(),Xt=Ue.toHTML(),{relevance:Math.floor(Or),value:Xt,language:F,illegal:!1,emitter:Ue,top:we}}catch(ce){if(ce.message&&ce.message.includes("Illegal"))return{illegal:!0,illegalBy:{msg:ce.message,context:W.slice(or-100,or+100),mode:ce.mode},sofar:Xt,relevance:0,value:nb(W),emitter:Ue};if(a)return{illegal:!1,relevance:0,value:nb(W),emitter:Ue,language:F,top:we,errorRaised:ce};throw ce}}function p(F){const W={relevance:0,emitter:new l.__emitter(l),value:nb(F),illegal:!1,top:o};return W.emitter.addText(F),W}function m(F,W){W=W||l.languages||Object.keys(t);const K=p(F),Q=W.filter(D).filter(L).map(ie=>h(ie,F,!1));Q.unshift(K);const ne=Q.sort((ie,G)=>{if(ie.relevance!==G.relevance)return G.relevance-ie.relevance;if(ie.language&&G.language){if(D(ie.language).supersetOf===G.language)return 1;if(D(G.language).supersetOf===ie.language)return-1}return 0}),[pe,X]=ne,ee=pe;return ee.second_best=X,ee}function g(F){return l.tabReplace||l.useBR?F.replace(i,W=>W===`
|
|
544
|
-
`?l.useBR?"<br>":W:l.tabReplace?W.replace(/\t/g,l.tabReplace):W):F}function b(F,W,K){const Q=W?r[W]:K;F.classList.add("hljs"),Q&&F.classList.add(Q)}const v={"before:highlightElement":({el:F})=>{l.useBR&&(F.innerHTML=F.innerHTML.replace(/\n/g,"").replace(/<br[ /]*>/g,`
|
|
545
|
-
`))},"after:highlightElement":({result:F})=>{l.useBR&&(F.value=F.value.replace(/\n/g,"<br>"))}},y=/^(<[^>]+>|\t)+/gm,x={"after:highlightElement":({result:F})=>{l.tabReplace&&(F.value=F.value.replace(y,W=>W.replace(/\t/g,l.tabReplace)))}};function j(F){let W=null;const K=d(F);if(u(K))return;z("before:highlightElement",{el:F,language:K}),W=F;const Q=W.textContent,ne=K?f(Q,{language:K,ignoreIllegals:!0}):m(Q);z("after:highlightElement",{el:F,result:ne,text:Q}),F.innerHTML=ne.value,b(F,K,ne.language),F.result={language:ne.language,re:ne.relevance,relavance:ne.relevance},ne.second_best&&(F.second_best={language:ne.second_best.language,re:ne.second_best.relevance,relavance:ne.second_best.relevance})}function w(F){F.useBR&&(gn("10.3.0","'useBR' will be removed entirely in v11.0"),gn("10.3.0","Please see https://github.com/highlightjs/highlight.js/issues/2559")),l=VC(l,F)}const S=()=>{if(S.called)return;S.called=!0,gn("10.6.0","initHighlighting() is deprecated. Use highlightAll() instead."),document.querySelectorAll("pre code").forEach(j)};function k(){gn("10.6.0","initHighlightingOnLoad() is deprecated. Use highlightAll() instead."),_=!0}let _=!1;function E(){if(document.readyState==="loading"){_=!0;return}document.querySelectorAll("pre code").forEach(j)}function A(){_&&E()}typeof window<"u"&&window.addEventListener&&window.addEventListener("DOMContentLoaded",A,!1);function C(F,W){let K=null;try{K=W(e)}catch(Q){if(rb("Language definition for '{}' could not be registered.".replace("{}",F)),a)rb(Q);else throw Q;K=o}K.name||(K.name=F),t[F]=K,K.rawDefinition=W.bind(null,e),K.aliases&&I(K.aliases,{languageName:F})}function M(F){delete t[F];for(const W of Object.keys(r))r[W]===F&&delete r[W]}function O(){return Object.keys(t)}function P(F){gn("10.4.0","requireLanguage will be removed entirely in v11."),gn("10.4.0","Please see https://github.com/highlightjs/highlight.js/pull/2844");const W=D(F);if(W)return W;throw new Error("The '{}' language is required, but not loaded.".replace("{}",F))}function D(F){return F=(F||"").toLowerCase(),t[F]||t[r[F]]}function I(F,{languageName:W}){typeof F=="string"&&(F=[F]),F.forEach(K=>{r[K.toLowerCase()]=W})}function L(F){const W=D(F);return W&&!W.disableAutodetect}function R(F){F["before:highlightBlock"]&&!F["before:highlightElement"]&&(F["before:highlightElement"]=W=>{F["before:highlightBlock"](Object.assign({block:W.el},W))}),F["after:highlightBlock"]&&!F["after:highlightElement"]&&(F["after:highlightElement"]=W=>{F["after:highlightBlock"](Object.assign({block:W.el},W))})}function $(F){R(F),n.push(F)}function z(F,W){const K=F;n.forEach(function(Q){Q[K]&&Q[K](W)})}function U(F){return gn("10.2.0","fixMarkup will be removed entirely in v11.0"),gn("10.2.0","Please see https://github.com/highlightjs/highlight.js/issues/2534"),g(F)}function V(F){return gn("10.7.0","highlightBlock will be removed entirely in v12.0"),gn("10.7.0","Please use highlightElement now."),j(F)}Object.assign(e,{highlight:f,highlightAuto:m,highlightAll:E,fixMarkup:U,highlightElement:j,highlightBlock:V,configure:w,initHighlighting:S,initHighlightingOnLoad:k,registerLanguage:C,unregisterLanguage:M,listLanguages:O,getLanguage:D,registerAliases:I,requireLanguage:P,autoDetection:L,inherit:VC,addPlugin:$,vuePlugin:fwe(e).VuePlugin}),e.debugMode=function(){a=!1},e.safeMode=function(){a=!0},e.versionString=uwe;for(const F in Qh)typeof Qh[F]=="object"&&Y6(Qh[F]);return Object.assign(e,Qh),e.addPlugin(v),e.addPlugin(hwe),e.addPlugin(x),e};var gwe=mwe({}),ywe=gwe,rz={exports:{}};(function(e){(function(){var t;t=e.exports=a,t.format=a,t.vsprintf=n,typeof console<"u"&&typeof console.log=="function"&&(t.printf=r);function r(){console.log(a.apply(null,arguments))}function n(i,s){return a.apply(null,[i].concat(s))}function a(i){for(var s=1,o=[].slice.call(arguments),l=0,u=i.length,d="",f,h=!1,p,m,g=!1,b,v=function(){return o[s++]},y=function(){for(var x="";/\d/.test(i[l]);)x+=i[l++],f=i[l];return x.length>0?parseInt(x):null};l<u;++l)if(f=i[l],h)switch(h=!1,f=="."?(g=!1,f=i[++l]):f=="0"&&i[l+1]=="."?(g=!0,l+=2,f=i[l]):g=!0,b=y(),f){case"b":d+=parseInt(v(),10).toString(2);break;case"c":p=v(),typeof p=="string"||p instanceof String?d+=p:d+=String.fromCharCode(parseInt(p,10));break;case"d":d+=parseInt(v(),10);break;case"f":m=String(parseFloat(v()).toFixed(b||6)),d+=g?m:m.replace(/^0/,"");break;case"j":d+=JSON.stringify(v());break;case"o":d+="0"+parseInt(v(),10).toString(8);break;case"s":d+=v();break;case"x":d+="0x"+parseInt(v(),10).toString(16);break;case"X":d+="0x"+parseInt(v(),10).toString(16).toUpperCase();break;default:d+=f;break}else f==="%"?h=!0:d+=f;return d}})()})(rz);var vwe=rz.exports,xwe=vwe,Cs=Ts(Error),bwe=Cs;Cs.eval=Ts(EvalError);Cs.range=Ts(RangeError);Cs.reference=Ts(ReferenceError);Cs.syntax=Ts(SyntaxError);Cs.type=Ts(TypeError);Cs.uri=Ts(URIError);Cs.create=Ts;function Ts(e){return t.displayName=e.displayName||e.name,t;function t(r){return r&&(r=xwe.apply(null,arguments)),new e(r)}}var ya=ywe,Fp=bwe;Uo.highlight=nz;Uo.highlightAuto=jwe;Uo.registerLanguage=kwe;Uo.listLanguages=Swe;Uo.registerAlias=Nwe;ji.prototype.addText=Pwe;ji.prototype.addKeyword=_we;ji.prototype.addSublanguage=Ewe;ji.prototype.openNode=Awe;ji.prototype.closeNode=Owe;ji.prototype.closeAllNodes=az;ji.prototype.finalize=az;ji.prototype.toHTML=Cwe;var wwe="hljs-";function nz(e,t,r){var n=ya.configure({}),a=r||{},i=a.prefix,s;if(typeof e!="string")throw Fp("Expected `string` for name, got `%s`",e);if(!ya.getLanguage(e))throw Fp("Unknown language: `%s` is not registered",e);if(typeof t!="string")throw Fp("Expected `string` for value, got `%s`",t);if(i==null&&(i=wwe),ya.configure({__emitter:ji,classPrefix:i}),s=ya.highlight(t,{language:e,ignoreIllegals:!0}),ya.configure(n||{}),s.errorRaised)throw s.errorRaised;return{relevance:s.relevance,language:s.language,value:s.emitter.rootNode.children}}function jwe(e,t){var r=t||{},n=r.subset||ya.listLanguages();r.prefix;var a=n.length,i=-1,s,o,l,u;if(typeof e!="string")throw Fp("Expected `string` for value, got `%s`",e);for(o={relevance:0,language:null,value:[]},s={relevance:0,language:null,value:[]};++i<a;)u=n[i],ya.getLanguage(u)&&(l=nz(u,e,t),l.language=u,l.relevance>o.relevance&&(o=l),l.relevance>s.relevance&&(o=s,s=l));return o.language&&(s.secondBest=o),s}function kwe(e,t){ya.registerLanguage(e,t)}function Swe(){return ya.listLanguages()}function Nwe(e,t){var r=e,n;t&&(r={},r[e]=t);for(n in r)ya.registerAliases(r[n],{languageName:n})}function ji(e){this.options=e,this.rootNode={children:[]},this.stack=[this.rootNode]}function _we(e,t){this.openNode(t),this.addText(e),this.closeNode()}function Ewe(e,t){var r=this.stack,n=r[r.length-1],a=e.rootNode.children,i=t?{type:"element",tagName:"span",properties:{className:[t]},children:a}:a;n.children=n.children.concat(i)}function Pwe(e){var t=this.stack,r,n;e!==""&&(r=t[t.length-1],n=r.children[r.children.length-1],n&&n.type==="text"?n.value+=e:r.children.push({type:"text",value:e}))}function Awe(e){var t=this.stack,r=this.options.classPrefix+e,n=t[t.length-1],a={type:"element",tagName:"span",properties:{className:[r]},children:[]};n.children.push(a),t.push(a)}function Owe(){this.stack.pop()}function Cwe(){return""}function az(){}function Twe(e){const t={literal:"true false null"},r=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],n=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],a={end:",",endsWithParent:!0,excludeEnd:!0,contains:n,keywords:t},i={begin:/\{/,end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n"},e.inherit(a,{begin:/:/})].concat(r),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[e.inherit(a)],illegal:"\\S"};return n.push(i,s),r.forEach(function(o){n.push(o)}),{name:"JSON",contains:n,keywords:t,illegal:"\\S"}}var Mwe=Twe;const $we=Je(Mwe);function Rwe(e){return e?typeof e=="string"?e:e.source:null}function Dwe(e){return Iwe("(?=",e,")")}function Iwe(...e){return e.map(r=>Rwe(r)).join("")}function Lwe(e){const i={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},s={className:"meta",begin:/^(>>>|\.\.\.) /},o={className:"subst",begin:/\{/,end:/\}/,keywords:i,illegal:/#/},l={begin:/\{\{/,relevance:0},u={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,s,l,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,s,l,o]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,l,o]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,l,o]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",f=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,h={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${f}))[eE][+-]?(${d})[jJ]?\\b`},{begin:`(${f})[jJ]?`},{begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${d})[jJ]\\b`}]},p={className:"comment",begin:Dwe(/# type:/),end:/$/,keywords:i,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:i,contains:["self",s,h,u,e.HASH_COMMENT_MODE]}]};return o.contains=[u,h,s],{name:"Python",aliases:["py","gyp","ipython"],keywords:i,illegal:/(<\/|->|\?)|=>/,contains:[s,h,{begin:/\bself\b/},{beginKeywords:"if",relevance:0},u,p,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,m,{begin:/->/,endsWithParent:!0,keywords:i}]},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[h,m,u]}]}}var zwe=Lwe;const Fwe=Je(zwe);var Lg=Sbe(Uo,{});Lg.registerLanguage=Uo.registerLanguage;const Bwe={hljs:{display:"block",overflowX:"auto",padding:"0.5em",color:"#000",background:"#f8f8ff"},"hljs-comment":{color:"#408080",fontStyle:"italic"},"hljs-quote":{color:"#408080",fontStyle:"italic"},"hljs-keyword":{color:"#954121"},"hljs-selector-tag":{color:"#954121"},"hljs-literal":{color:"#954121"},"hljs-subst":{color:"#954121"},"hljs-number":{color:"#40a070"},"hljs-string":{color:"#219161"},"hljs-doctag":{color:"#219161"},"hljs-selector-id":{color:"#19469d"},"hljs-selector-class":{color:"#19469d"},"hljs-section":{color:"#19469d"},"hljs-type":{color:"#19469d"},"hljs-params":{color:"#00f"},"hljs-title":{color:"#458",fontWeight:"bold"},"hljs-tag":{color:"#000080",fontWeight:"normal"},"hljs-name":{color:"#000080",fontWeight:"normal"},"hljs-attribute":{color:"#000080",fontWeight:"normal"},"hljs-variable":{color:"#008080"},"hljs-template-variable":{color:"#008080"},"hljs-regexp":{color:"#b68"},"hljs-link":{color:"#b68"},"hljs-symbol":{color:"#990073"},"hljs-bullet":{color:"#990073"},"hljs-built_in":{color:"#0086b3"},"hljs-builtin-name":{color:"#0086b3"},"hljs-meta":{color:"#999",fontWeight:"bold"},"hljs-deletion":{background:"#fdd"},"hljs-addition":{background:"#dfd"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}};Lg.registerLanguage("json",$we);Lg.registerLanguage("python",Fwe);function Vwe({artifact:e}){const[t,r]=N.useState(null),[n,a]=N.useState(null),[i,s]=N.useState(!1),[o,l]=N.useState(null);N.useEffect(()=>{e!=null&&e.artifact_id&&u()},[e]);const u=async()=>{s(!0),l(null);try{let d="text";if(e.path){const h=e.path.split(".").pop().toLowerCase();["png","jpg","jpeg","svg","gif"].includes(h)?d="image":["json"].includes(h)?d="json":["csv","tsv"].includes(h)&&(d="table")}if(!e.path&&e.value){try{const h=JSON.parse(e.value);r(h),a("json")}catch{r(e.value),a("text")}s(!1);return}const f=await ve(`/api/assets/${e.artifact_id}/content`);if(f.ok){const h=await f.blob(),p=h.type;if(p.startsWith("image/")||d==="image"){const m=URL.createObjectURL(h);r(m),a("image")}else if(p.includes("json")||d==="json"){const m=await h.text();r(JSON.parse(m)),a("json")}else{const m=await h.text();r(m),a("text")}}else if(e.value)r(e.value),a("text");else throw new Error("Failed to load artifact content")}catch(d){console.error("Failed to load artifact:",d),l("Could not load full content. Showing metadata only.")}finally{s(!1)}};return i?c.jsxs("div",{className:"flex flex-col items-center justify-center p-12 text-slate-400",children:[c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500 mb-2"}),c.jsx("p",{className:"text-sm",children:"Loading content..."})]}):o?c.jsxs("div",{className:"flex flex-col items-center justify-center p-8 text-rose-500 bg-rose-50 rounded-lg border border-rose-100",children:[c.jsx(ai,{size:24,className:"mb-2"}),c.jsx("p",{className:"text-sm font-medium",children:o})]}):n==="image"?c.jsxs("div",{className:"flex flex-col items-center bg-slate-50 dark:bg-slate-900 p-4 rounded-lg border border-slate-200 dark:border-slate-700",children:[c.jsx("div",{className:"relative rounded-lg overflow-hidden shadow-sm bg-white dark:bg-black",children:c.jsx("img",{src:t,alt:e.name,className:"max-w-full max-h-[60vh] object-contain"})}),c.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-2 flex items-center gap-1",children:[c.jsx(RU,{size:12}),"Image Preview"]})]}):n==="json"?c.jsxs("div",{className:"rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700 shadow-sm",children:[c.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 px-3 py-2 border-b border-slate-200 dark:border-slate-700 flex items-center gap-2",children:[c.jsx(PU,{size:14,className:"text-slate-500 dark:text-slate-400"}),c.jsx("span",{className:"text-xs font-semibold text-slate-600 dark:text-slate-300",children:"JSON Viewer"})]}),c.jsx("div",{className:"max-h-[50vh] overflow-y-auto bg-white",children:c.jsx(Lg,{language:"json",style:Bwe,customStyle:{margin:0,padding:"1rem",fontSize:"0.85rem"},children:JSON.stringify(t,null,2)})})]}):c.jsxs("div",{className:"rounded-lg overflow-hidden border border-slate-200 dark:border-slate-700 shadow-sm",children:[c.jsxs("div",{className:"bg-slate-50 dark:bg-slate-800 px-3 py-2 border-b border-slate-200 dark:border-slate-700 flex items-center gap-2",children:[c.jsx(ps,{size:14,className:"text-slate-500 dark:text-slate-400"}),c.jsx("span",{className:"text-xs font-semibold text-slate-600 dark:text-slate-300",children:"Text Content"})]}),c.jsx("pre",{className:"p-4 bg-white dark:bg-slate-900 text-slate-800 dark:text-slate-200 text-xs font-mono overflow-x-auto whitespace-pre-wrap max-h-[50vh] overflow-y-auto",children:typeof t=="string"?t:JSON.stringify(t,null,2)})]})}function Uwe({code:e,language:t="python",title:r,className:n=""}){const[a,i]=N.useState(!1),s=()=>{navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)};return c.jsxs("div",{className:`relative group ${n}`,children:[r&&c.jsxs("div",{className:"flex items-center justify-between px-4 py-2 bg-slate-800 dark:bg-slate-900 border-b border-slate-700 rounded-t-lg",children:[c.jsx("span",{className:"text-sm font-medium text-slate-300",children:r}),c.jsx("span",{className:"text-xs text-slate-500 uppercase font-mono",children:t})]}),c.jsxs("div",{className:"relative",children:[c.jsx("pre",{className:`p-4 bg-slate-900 dark:bg-slate-950 text-slate-100 text-sm font-mono overflow-x-auto leading-relaxed ${r?"":"rounded-t-lg"} rounded-b-lg`,children:c.jsx("code",{className:`language-${t}`,children:e})}),c.jsx("button",{onClick:s,className:"absolute top-3 right-3 p-2 bg-slate-800 hover:bg-slate-700 text-slate-400 hover:text-slate-200 rounded-md transition-all opacity-0 group-hover:opacity-100",title:"Copy to clipboard",children:a?c.jsx(Yk,{size:14}):c.jsx(mm,{size:14})})]})]})}function Hwe(){var O,P,D,I;const{runId:e}=qk(),[t,r]=N.useState(null),[n,a]=N.useState([]),[i,s]=N.useState([]),[o,l]=N.useState(!0),[u,d]=N.useState(null),[f,h]=N.useState("overview"),[p,m]=N.useState(null),[g,b]=N.useState(null),[v,y]=N.useState(!1),[x,j]=N.useState(!1),[w,S]=N.useState({}),k=async()=>{if(confirm("Are you sure you want to stop this run?")){j(!0);try{await ve(`/api/runs/${e}/stop`,{method:"POST"});const R=await(await ve(`/api/runs/${e}`)).json();r(R)}catch(L){console.error("Failed to stop run:",L),alert("Failed to stop run")}finally{j(!1)}}},_=async L=>{try{await ve(`/api/runs/${e}/project`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:L})}),r(R=>({...R,project:L}))}catch(R){console.error("Failed to update project:",R)}};if(N.useEffect(()=>{if(!t)return;const L=async()=>{try{const z=await(await ve(`/api/runs/${e}/cloud-status`)).json();b(z),z.is_remote&&z.cloud_status&&!z.cloud_status.is_finished?y(!0):y(!1)}catch($){console.error("Failed to fetch cloud status:",$),y(!1)}};L();let R;return v&&(R=setInterval(L,5e3)),()=>{R&&clearInterval(R)}},[e,t,v]),N.useEffect(()=>{(async()=>{try{const[R,$]=await Promise.all([ve(`/api/runs/${e}`),ve(`/api/assets?run_id=${e}`)]),z=await R.json(),U=await $.json();let V=[];try{const F=await ve(`/api/runs/${e}/metrics`);F.ok&&(V=(await F.json()).metrics||[])}catch(F){console.warn("Failed to fetch metrics",F)}r(z),a(U.assets||[]),s(V),z.steps&&Object.keys(z.steps).length>0&&d(Object.keys(z.steps)[0]),l(!1)}catch(R){console.error(R),l(!1)}})()},[e]),o)return c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(!t)return c.jsx("div",{className:"p-8 text-center text-slate-500",children:"Run not found"});const E=t.status==="completed"?"success":t.status==="failed"?"danger":"warning",A=u?(O=t.steps)==null?void 0:O[u]:null,C=n.filter(L=>L.step===u),M=i.filter(L=>L.step===u||L.name.startsWith(u));return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between bg-white dark:bg-slate-800 p-6 rounded-xl border border-slate-100 dark:border-slate-700 shadow-sm",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(rt,{to:"/runs",className:"text-sm text-slate-500 hover:text-slate-700 transition-colors",children:"Runs"}),c.jsx(No,{size:14,className:"text-slate-300"}),c.jsx("span",{className:"text-sm text-slate-900 dark:text-white font-medium",children:t.run_id})]}),c.jsxs("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white flex items-center gap-3",children:[c.jsx("div",{className:`w-3 h-3 rounded-full ${t.status==="completed"?"bg-emerald-500":t.status==="failed"?"bg-rose-500":"bg-amber-500"}`}),"Run: ",c.jsx("span",{className:"font-mono text-slate-500",children:((P=t.run_id)==null?void 0:P.substring(0,8))||(e==null?void 0:e.substring(0,8))||"N/A"})]}),c.jsxs("p",{className:"text-slate-500 dark:text-slate-400 mt-1 flex items-center gap-2",children:[c.jsx(oa,{size:16}),"Pipeline: ",c.jsx("span",{className:"font-medium text-slate-700 dark:text-slate-200",children:t.pipeline_name}),(g==null?void 0:g.is_remote)&&c.jsxs(jt,{variant:"secondary",className:"text-xs bg-blue-50 dark:bg-blue-900/20 text-blue-600 dark:text-blue-400 flex items-center gap-1",children:[c.jsx(_U,{size:12}),g.orchestrator_type]}),(g==null?void 0:g.is_remote)&&v&&c.jsxs("span",{className:"text-xs text-amber-600 flex items-center gap-1 animate-pulse",children:[c.jsx(Be,{size:12}),"Live"]})]})]}),c.jsxs("div",{className:"flex flex-col items-end gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(lg,{currentProject:t.project,onUpdate:_}),c.jsx(jt,{variant:E,className:"text-sm px-4 py-1.5 uppercase tracking-wide shadow-sm",children:((D=g==null?void 0:g.cloud_status)==null?void 0:D.status)||t.status})]}),c.jsxs("span",{className:"text-xs text-slate-400 font-mono",children:["ID: ",t.run_id]}),t.status==="running"&&c.jsx(ye,{variant:"danger",size:"sm",onClick:k,disabled:x,className:"mt-2",children:x?"Stopping...":"Stop Run"})]})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[c.jsx(ab,{icon:c.jsx(ct,{size:24}),label:"Duration",value:t.duration?`${t.duration.toFixed(2)}s`:"-",color:"blue"}),c.jsx(ab,{icon:c.jsx(An,{size:24}),label:"Started At",value:t.start_time?pt(new Date(t.start_time),"MMM d, HH:mm:ss"):"-",color:"purple"}),c.jsx(ab,{icon:c.jsx(Vt,{size:24}),label:"Steps Completed",value:`${t.steps?Object.values(t.steps).filter(L=>L.success).length:0} / ${t.steps?Object.keys(t.steps).length:0}`,color:"emerald"})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[c.jsxs("div",{className:"lg:col-span-2",children:[c.jsxs("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(Be,{className:"text-primary-500"})," Pipeline Execution Graph"]}),c.jsx("div",{className:"h-[calc(100vh-240px)] min-h-[600px]",children:t.dag?c.jsx(V6,{dag:t.dag,steps:t.steps,selectedStep:u,onStepSelect:d,onArtifactSelect:L=>{const R=n.find($=>$.name===L);R?m(R):console.warn(`Artifact ${L} not found in assets list`)}}):c.jsx(ze,{className:"h-full flex items-center justify-center",children:c.jsx("p",{className:"text-slate-500",children:"DAG visualization not available"})})})]}),c.jsxs("div",{children:[c.jsxs("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(ym,{className:"text-primary-500"})," Step Details"]}),A?c.jsxs(ze,{className:"overflow-hidden",children:[c.jsxs("div",{className:"pb-4 border-b border-slate-100 dark:border-slate-700",children:[c.jsx("h4",{className:"text-lg font-bold text-slate-900 dark:text-white mb-2",children:u}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(jt,{variant:A.success?"success":"danger",className:"text-xs",children:A.success?"Success":"Failed"}),A.cached&&c.jsx(jt,{variant:"secondary",className:"text-xs bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-300",children:"Cached"}),c.jsxs("span",{className:"text-xs font-mono text-slate-500 dark:text-slate-400 bg-slate-100 dark:bg-slate-800 px-2 py-0.5 rounded",children:[(I=A.duration)==null?void 0:I.toFixed(2),"s"]})]})]}),A.status==="running"&&c.jsxs("div",{className:"px-4 py-2 bg-blue-50 dark:bg-blue-900/20 border-b border-blue-100 dark:border-blue-800 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2 text-sm text-blue-700 dark:text-blue-300",children:[c.jsx(Be,{size:14,className:"animate-pulse"}),c.jsx("span",{children:"Step is running"})]}),A.last_heartbeat&&c.jsxs("span",{className:"text-xs text-blue-600 dark:text-blue-400 font-mono",children:["Last heartbeat: ",(Date.now()/1e3-A.last_heartbeat).toFixed(1),"s ago"]})]}),A.status==="dead"&&c.jsxs("div",{className:"px-4 py-2 bg-rose-50 dark:bg-rose-900/20 border-b border-rose-100 dark:border-rose-800 flex items-center gap-2",children:[c.jsx(ai,{size:14,className:"text-rose-600 dark:text-rose-400"}),c.jsx("span",{className:"text-sm font-medium text-rose-700 dark:text-rose-300",children:"Step detected as DEAD (missed heartbeats)"})]}),c.jsxs("div",{className:"flex gap-2 border-b border-slate-100 dark:border-slate-700 mt-4",children:[c.jsxs(Jh,{active:f==="overview",onClick:()=>h("overview"),children:[c.jsx(ym,{size:16})," Overview"]}),c.jsxs(Jh,{active:f==="code",onClick:()=>h("code"),children:[c.jsx(EU,{size:16})," Code"]}),c.jsxs(Jh,{active:f==="artifacts",onClick:()=>h("artifacts"),children:[c.jsx(ms,{size:16})," Artifacts"]}),c.jsxs(Jh,{active:f==="logs",onClick:()=>h("logs"),"data-tab":"logs",children:[c.jsx(Qk,{size:16})," Logs"]})]}),c.jsxs("div",{className:"mt-4 max-h-[450px] overflow-y-auto",children:[f==="overview"&&c.jsx(Wwe,{stepData:A,metrics:M,runId:e,stepName:u}),f==="code"&&c.jsx(Gwe,{sourceCode:A.source_code}),f==="artifacts"&&c.jsx(Kwe,{artifacts:C,onArtifactClick:m}),f==="logs"&&c.jsx(iz,{runId:e,stepName:u,isRunning:t.status==="running"})]})]}):c.jsx(ze,{className:"p-12 text-center",children:c.jsx("p",{className:"text-slate-500",children:"Select a step to view details"})})]})]}),c.jsx(Ywe,{artifact:p,onClose:()=>m(null)})]})}function ab({icon:e,label:t,value:r,color:n}){const a={blue:"bg-blue-50 text-blue-600",purple:"bg-purple-50 text-purple-600",emerald:"bg-emerald-50 text-emerald-600"};return c.jsx(ze,{className:"hover:shadow-md transition-shadow duration-200",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:`p-3 rounded-xl ${a[n]}`,children:e}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 font-medium",children:t}),c.jsx("p",{className:"text-xl font-bold text-slate-900 dark:text-white",children:r})]})]})})}function Jh({active:e,onClick:t,children:r,...n}){return c.jsx("button",{onClick:t,...n,className:`
|
|
546
|
-
flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors border-b-2
|
|
547
|
-
${e?"text-primary-600 dark:text-primary-400 border-primary-600 dark:border-primary-400":"text-slate-500 dark:text-slate-400 border-transparent hover:text-slate-700 dark:hover:text-slate-200"}
|
|
548
|
-
`,children:r})}function Wwe({stepData:e,metrics:t,runId:r,stepName:n}){var i,s,o,l;const a=u=>{if(!u)return"N/A";if(u<1)return`${(u*1e3).toFixed(0)}ms`;if(u<60)return`${u.toFixed(2)}s`;const d=Math.floor(u/60),f=(u%60).toFixed(0);return`${d}m ${f}s`};return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"p-4 bg-gradient-to-br from-slate-50 to-white dark:from-slate-800 dark:to-slate-900 rounded-xl border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(ct,{size:14,className:"text-slate-400"}),c.jsx("span",{className:"text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wide",children:"Duration"})]}),c.jsx("p",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:a(e.duration)})]}),c.jsxs("div",{className:"p-4 bg-gradient-to-br from-slate-50 to-white dark:from-slate-800 dark:to-slate-900 rounded-xl border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(Be,{size:14,className:"text-slate-400"}),c.jsx("span",{className:"text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wide",children:"Status"})]}),c.jsx("div",{className:"flex items-center gap-2",children:e.status==="dead"?c.jsxs(c.Fragment,{children:[c.jsx(ai,{size:20,className:"text-rose-500"}),c.jsx("span",{className:"text-lg font-bold text-rose-700 dark:text-rose-400",children:"Dead"})]}):e.success?c.jsxs(c.Fragment,{children:[c.jsx(Vt,{size:20,className:"text-emerald-500"}),c.jsx("span",{className:"text-lg font-bold text-emerald-700",children:"Success"})]}):e.error?c.jsxs(c.Fragment,{children:[c.jsx(vr,{size:20,className:"text-rose-500"}),c.jsx("span",{className:"text-lg font-bold text-rose-700",children:"Failed"})]}):c.jsxs(c.Fragment,{children:[c.jsx(ct,{size:20,className:"text-amber-500"}),c.jsx("span",{className:"text-lg font-bold text-amber-700 dark:text-amber-500",children:"Pending"})]})})]})]}),e.last_heartbeat&&c.jsxs("div",{className:"p-4 bg-slate-50 dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700",children:[c.jsxs("h5",{className:"text-sm font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wide mb-2 flex items-center gap-2",children:[c.jsx(Be,{size:16,className:"text-blue-500"}),"System Heartbeat"]}),c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-sm text-slate-500 dark:text-slate-400",children:"Last received:"}),c.jsxs("span",{className:"font-mono font-medium text-slate-900 dark:text-white",children:[new Date(e.last_heartbeat*1e3).toLocaleTimeString(),c.jsxs("span",{className:"text-xs text-slate-400 ml-2",children:["(",(Date.now()/1e3-e.last_heartbeat).toFixed(1),"s ago)"]})]})]})]}),c.jsxs("div",{className:"mt-6",children:[c.jsxs("h5",{className:"text-sm font-bold text-slate-700 dark:text-slate-300 uppercase tracking-wide mb-3 flex items-center gap-2",children:[c.jsx(Qk,{size:16}),"Logs Preview"]}),c.jsx(iz,{runId:r,stepName:n,isRunning:e.status==="running",maxHeight:"max-h-48",minimal:!0}),c.jsx("div",{className:"mt-2 text-right",children:c.jsx("button",{onClick:()=>{var u;return(u=document.querySelector('[data-tab="logs"]'))==null?void 0:u.click()},className:"text-xs text-primary-600 hover:text-primary-700 dark:text-primary-400 font-medium",children:"View Full Logs →"})})]}),(((i=e.inputs)==null?void 0:i.length)>0||((s=e.outputs)==null?void 0:s.length)>0)&&c.jsxs("div",{className:"space-y-4",children:[c.jsxs("h5",{className:"text-sm font-bold text-slate-700 uppercase tracking-wide flex items-center gap-2",children:[c.jsx(Ir,{size:16}),"Data Flow"]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[((o=e.inputs)==null?void 0:o.length)>0&&c.jsxs("div",{className:"p-4 bg-blue-50/50 dark:bg-blue-900/10 rounded-xl border border-blue-100 dark:border-blue-800",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx(vU,{size:16,className:"text-blue-600"}),c.jsx("span",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100",children:"Inputs"}),c.jsx(jt,{variant:"secondary",className:"ml-auto text-xs",children:e.inputs.length})]}),c.jsx("div",{className:"space-y-1.5",children:e.inputs.map((u,d)=>c.jsxs("div",{className:"flex items-center gap-2 p-2 bg-white dark:bg-slate-800 rounded-lg border border-blue-100 dark:border-blue-800/50",children:[c.jsx(Ir,{size:12,className:"text-blue-500 flex-shrink-0"}),c.jsx("span",{className:"text-sm font-mono text-slate-700 dark:text-slate-200 truncate",children:u})]},d))})]}),((l=e.outputs)==null?void 0:l.length)>0&&c.jsxs("div",{className:"p-4 bg-purple-50/50 dark:bg-purple-900/10 rounded-xl border border-purple-100 dark:border-purple-800",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx(xU,{size:16,className:"text-purple-600"}),c.jsx("span",{className:"text-sm font-semibold text-purple-900 dark:text-purple-100",children:"Outputs"}),c.jsx(jt,{variant:"secondary",className:"ml-auto text-xs",children:e.outputs.length})]}),c.jsx("div",{className:"space-y-1.5",children:e.outputs.map((u,d)=>c.jsxs("div",{className:"flex items-center gap-2 p-2 bg-white dark:bg-slate-800 rounded-lg border border-purple-100 dark:border-purple-800/50",children:[c.jsx(Dr,{size:12,className:"text-purple-500 flex-shrink-0"}),c.jsx("span",{className:"text-sm font-mono text-slate-700 dark:text-slate-200 truncate",children:u})]},d))})]})]})]}),e.tags&&Object.keys(e.tags).length>0&&c.jsxs("div",{children:[c.jsxs("h5",{className:"text-sm font-bold text-slate-700 uppercase tracking-wide mb-3 flex items-center gap-2",children:[c.jsx(bm,{size:16}),"Metadata"]}),c.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(e.tags).map(([u,d])=>c.jsxs("div",{className:"p-3 bg-slate-50 dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700",children:[c.jsx("div",{className:"text-xs text-slate-500 dark:text-slate-400 mb-1",children:u}),c.jsx("div",{className:"text-sm font-mono font-medium text-slate-900 dark:text-white truncate",children:String(d)})]},u))})]}),e.cached&&c.jsx("div",{className:"p-4 bg-gradient-to-r from-blue-50 to-cyan-50 dark:from-blue-900/20 dark:to-cyan-900/20 rounded-xl border-2 border-blue-200 dark:border-blue-800",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx(Eo,{size:24,className:"text-blue-600"}),c.jsxs("div",{children:[c.jsx("h6",{className:"font-bold text-blue-900 dark:text-blue-100",children:"Cached Result"}),c.jsx("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:"This step used cached results from a previous run"})]})]})}),e.error&&c.jsxs("div",{children:[c.jsxs("h5",{className:"text-sm font-bold text-rose-700 uppercase tracking-wide mb-3 flex items-center gap-2",children:[c.jsx(ai,{size:16}),"Error Details"]}),c.jsx("div",{className:"p-4 bg-rose-50 dark:bg-rose-900/20 rounded-xl border-2 border-rose-200 dark:border-rose-800",children:c.jsx("pre",{className:"text-sm font-mono text-rose-700 dark:text-rose-300 whitespace-pre-wrap overflow-x-auto",children:e.error})})]}),(t==null?void 0:t.length)>0&&c.jsxs("div",{children:[c.jsxs("h5",{className:"text-sm font-bold text-slate-700 uppercase tracking-wide mb-3 flex items-center gap-2",children:[c.jsx(gs,{size:16}),"Performance Metrics"]}),c.jsx("div",{className:"grid grid-cols-2 gap-3",children:t.map((u,d)=>c.jsx(qwe,{metric:u},d))})]})]})}function qwe({metric:e}){const t=typeof e.value=="number",r=t?e.value.toFixed(4):e.value;return c.jsxs("div",{className:"p-3 bg-gradient-to-br from-slate-50 to-white dark:from-slate-800 dark:to-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 hover:border-primary-300 dark:hover:border-primary-700 transition-all group",children:[c.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400 block truncate mb-1",title:e.name,children:e.name}),c.jsxs("div",{className:"flex items-baseline gap-2",children:[c.jsx("span",{className:"text-xl font-mono font-bold text-slate-900 dark:text-white group-hover:text-primary-600 dark:group-hover:text-primary-400 transition-colors",children:r}),t&&e.value>0&&c.jsx(gs,{size:14,className:"text-emerald-500"})]})]})}function Gwe({sourceCode:e}){return c.jsx(Uwe,{code:e||"# Source code not available",language:"python",title:"Step Source Code"})}function Kwe({artifacts:e,onArtifactClick:t}){return c.jsxs("div",{children:[c.jsx("h5",{className:"text-sm font-semibold text-slate-700 mb-3",children:"Produced Artifacts"}),(e==null?void 0:e.length)>0?c.jsx("div",{className:"space-y-2",children:e.map(r=>c.jsxs(Le.div,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:()=>t(r),className:"group flex items-center gap-3 p-3 bg-slate-50 hover:bg-white rounded-lg border border-slate-100 hover:border-primary-300 hover:shadow-md transition-all cursor-pointer",children:[c.jsx("div",{className:"p-2 bg-white rounded-md text-slate-500 shadow-sm group-hover:text-primary-600 group-hover:scale-110 transition-all",children:r.type==="Dataset"?c.jsx(Ir,{size:18}):r.type==="Model"?c.jsx(Dr,{size:18}):r.type==="Metrics"?c.jsx(_a,{size:18}):c.jsx(ps,{size:18})}),c.jsxs("div",{className:"min-w-0 flex-1",children:[c.jsx("p",{className:"text-sm font-semibold text-slate-900 truncate group-hover:text-primary-600 transition-colors",children:r.name}),c.jsx("p",{className:"text-xs text-slate-500 truncate",children:r.type})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{className:"p-2 rounded-lg hover:bg-white transition-colors text-slate-400 hover:text-primary-600 disabled:opacity-40",onClick:n=>{n.stopPropagation(),rh(r.artifact_id)},disabled:!r.artifact_id,children:c.jsx(Lo,{size:14})}),c.jsx(LU,{size:14,className:"text-slate-300 group-hover:text-primary-400 transition-colors"}),c.jsx(ii,{size:14,className:"text-slate-300 group-hover:text-primary-400 opacity-0 group-hover:opacity-100 transition-all"})]})]},r.artifact_id))}):c.jsx("p",{className:"text-sm text-slate-500 italic",children:"No artifacts produced by this step"})]})}function Ywe({artifact:e,onClose:t}){return e?c.jsx(xi,{children:c.jsx(Le.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:t,children:c.jsxs(Le.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:r=>r.stopPropagation(),className:"bg-white rounded-2xl shadow-2xl max-w-3xl w-full max-h-[80vh] overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-slate-100 bg-gradient-to-r from-primary-50 to-purple-50",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-3 bg-white rounded-xl shadow-sm",children:e.type==="Dataset"?c.jsx(Ir,{size:24,className:"text-blue-600"}):e.type==="Model"?c.jsx(Dr,{size:24,className:"text-purple-600"}):e.type==="Metrics"?c.jsx(_a,{size:24,className:"text-emerald-600"}):c.jsx(ps,{size:24,className:"text-slate-600"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xl font-bold text-slate-900",children:e.name}),c.jsx("p",{className:"text-sm text-slate-500",children:e.type})]})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("button",{onClick:()=>rh(e.artifact_id),className:"inline-flex items-center gap-2 px-3 py-2 rounded-lg bg-primary-600 text-white text-sm font-semibold hover:bg-primary-500 transition-colors disabled:opacity-50",disabled:!e.artifact_id,children:[c.jsx(Lo,{size:16})," Download"]}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-white rounded-lg transition-colors",children:c.jsx(Ps,{size:20,className:"text-slate-400"})})]})]}),c.jsx("div",{className:"p-6 overflow-y-auto max-h-[60vh]",children:c.jsxs("div",{className:"space-y-4",children:[c.jsx(Vwe,{artifact:e}),e.properties&&Object.keys(e.properties).length>0&&c.jsxs("div",{className:"mt-6 pt-6 border-t border-slate-100",children:[c.jsx("h4",{className:"text-sm font-semibold text-slate-700 mb-3",children:"Properties"}),c.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(e.properties).map(([r,n])=>c.jsxs("div",{className:"p-3 bg-slate-50 rounded-lg border border-slate-100",children:[c.jsx("span",{className:"text-xs text-slate-500 block mb-1",children:r}),c.jsx("span",{className:"text-sm font-mono font-semibold text-slate-900",children:typeof n=="object"?JSON.stringify(n):String(n)})]},r))})]}),c.jsxs("div",{className:"mt-6",children:[c.jsx("h4",{className:"text-sm font-semibold text-slate-700 mb-3",children:"Metadata"}),c.jsxs("div",{className:"space-y-2 text-sm",children:[c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-slate-500",children:"Artifact ID:"}),c.jsx("span",{className:"font-mono text-xs text-slate-700",children:e.artifact_id})]}),c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-slate-500",children:"Step:"}),c.jsx("span",{className:"font-medium text-slate-700",children:e.step})]}),e.created_at&&c.jsxs("div",{className:"flex justify-between",children:[c.jsx("span",{className:"text-slate-500",children:"Created:"}),c.jsx("span",{className:"text-slate-700",children:pt(new Date(e.created_at),"MMM d, yyyy HH:mm:ss")})]})]})]})]})}),c.jsxs("div",{className:"p-4 border-t border-slate-100 bg-slate-50 flex justify-end gap-2",children:[c.jsx(ye,{variant:"ghost",onClick:t,children:"Close"}),c.jsx(ye,{variant:"primary",children:"Download"})]})]})})}):null}function iz({runId:e,stepName:t,isRunning:r,maxHeight:n="max-h-96",minimal:a=!1}){const[i,s]=N.useState(""),[o,l]=N.useState(!0),[u,d]=N.useState(!0),f=T.useRef(null),h=T.useRef(null);return N.useEffect(()=>{h.current&&h.current.scrollIntoView({behavior:"smooth"})},[i]),N.useEffect(()=>{s(""),l(!0),f.current&&(f.current.close(),f.current=null)},[t]),N.useEffect(()=>{let p=!0;if((async()=>{try{const v=await(await ve(`/api/runs/${e}/steps/${t}/logs`)).json();p&&v.logs&&s(v.logs)}catch(b){console.error("Failed to fetch logs:",b)}finally{p&&l(!1)}})(),r&&u)try{const v=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/runs/${e}/steps/${t}/logs`,y=new WebSocket(v);y.onopen=()=>{console.log("WebSocket connected for logs")},y.onmessage=x=>{try{const j=JSON.parse(x.data);j.type==="log"&&p&&s(w=>w+j.content+`
|
|
549
|
-
`)}catch{p&&x.data!=="pong"&&s(w=>w+x.data+`
|
|
550
|
-
`)}},y.onerror=()=>{console.log("WebSocket error, falling back to polling"),d(!1)},y.onclose=()=>{console.log("WebSocket closed")},f.current=y}catch(b){console.error("Failed to create WebSocket:",b),d(!1)}let g;if(r&&!u){let b=0;g=setInterval(async()=>{try{const y=await(await ve(`/api/runs/${e}/steps/${t}/logs?offset=${b}`)).json();p&&y.logs&&(s(x=>x+y.logs),b=y.offset)}catch(v){console.error("Failed to fetch logs:",v)}},2e3)}return()=>{p=!1,f.current&&(f.current.close(),f.current=null),g&&clearInterval(g)}},[e,t,r,u]),o&&!i?c.jsx("div",{className:"flex items-center justify-center h-40",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):c.jsxs("div",{className:`bg-slate-900 rounded-lg p-4 font-mono text-sm overflow-x-auto ${n} overflow-y-auto`,children:[i?c.jsxs(c.Fragment,{children:[c.jsx("pre",{className:"text-green-400 whitespace-pre-wrap break-words",children:a?i.split(`
|
|
551
|
-
`).slice(-10).join(`
|
|
552
|
-
`):i}),c.jsx("div",{ref:h})]}):c.jsx("div",{className:"text-slate-500 italic",children:"No logs available for this step."}),!a&&r&&c.jsxs("div",{className:"mt-2 text-amber-500 flex items-center gap-2 animate-pulse",children:[c.jsx(Be,{size:14}),u?"Live streaming...":"Polling for logs..."]})]})}function A2({icon:e,title:t,description:r,action:n,actionLabel:a,onAction:i,className:s=""}){return c.jsxs("div",{className:`flex flex-col items-center justify-center py-16 px-4 text-center ${s}`,children:[c.jsx("div",{className:"w-20 h-20 bg-gradient-to-br from-slate-100 to-slate-200 dark:from-slate-800 dark:to-slate-700 rounded-2xl flex items-center justify-center mb-6 shadow-inner",children:e&&c.jsx(e,{className:"text-slate-400 dark:text-slate-500",size:40})}),c.jsx("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-2",children:t}),r&&c.jsx("p",{className:"text-slate-500 dark:text-slate-400 max-w-md mb-6",children:r}),(n||a&&i)&&c.jsx("div",{children:n||c.jsx(ye,{onClick:i,children:a})})]})}const Xwe=({status:e})=>{switch(e==null?void 0:e.toLowerCase()){case"completed":case"success":return c.jsx(Vt,{className:"w-4 h-4 text-green-500"});case"failed":return c.jsx(vr,{className:"w-4 h-4 text-red-500"});case"running":return c.jsx(Be,{className:"w-4 h-4 text-blue-500 animate-spin"});default:return c.jsx(ct,{className:"w-4 h-4 text-slate-400"})}},Zwe=({type:e})=>{const t={className:"w-4 h-4"};switch(e==null?void 0:e.toLowerCase()){case"model":return c.jsx(Dr,{...t,className:"w-4 h-4 text-purple-500"});case"dataset":case"data":return c.jsx(Ir,{...t,className:"w-4 h-4 text-blue-500"});case"metrics":return c.jsx(_a,{...t,className:"w-4 h-4 text-emerald-500"});default:return c.jsx(zl,{...t,className:"w-4 h-4 text-slate-400"})}},ep=({label:e,icon:t,children:r,defaultExpanded:n=!1,actions:a,status:i,level:s=0,badge:o,onClick:l})=>{const[u,d]=N.useState(n),f=r&&r.length>0;return c.jsxs("div",{className:"select-none",children:[c.jsxs(Le.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2},className:`
|
|
553
|
-
flex items-center gap-2 p-2 rounded-lg cursor-pointer transition-all
|
|
554
|
-
hover:bg-slate-100 dark:hover:bg-slate-800
|
|
555
|
-
${s===0?"bg-slate-50 dark:bg-slate-800/50 mb-1 font-semibold":""}
|
|
556
|
-
`,style:{paddingLeft:`${s*1.5+.5}rem`},onClick:()=>{f&&d(!u),l==null||l()},children:[c.jsx("div",{className:"flex items-center gap-1 text-slate-400",children:f?c.jsx(Le.div,{animate:{rotate:u?90:0},transition:{duration:.2},children:c.jsx(No,{className:"w-4 h-4"})}):c.jsx("div",{className:"w-4"})}),t&&c.jsx(t,{className:`w-4 h-4 ${s===0?"text-blue-500":"text-slate-500 dark:text-slate-400"}`}),c.jsxs("div",{className:"flex-1 flex items-center justify-between gap-3",children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("span",{className:`text-sm truncate ${s===0?"font-semibold text-slate-900 dark:text-white":"text-slate-700 dark:text-slate-300"}`,children:e}),o]}),c.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[i&&c.jsx(Xwe,{status:i}),a]})]})]}),c.jsx(xi,{children:u&&f&&c.jsx(Le.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},children:r})})]})};function sz({projectId:e,onAssetSelect:t,compact:r=!1}){const[n,a]=N.useState({projects:[],pipelines:[],runs:[],artifacts:[]}),[i,s]=N.useState(!0),[o,l]=N.useState(""),[u,d]=N.useState("all");if(N.useEffect(()=>{(async()=>{s(!0);try{const x=e?[ve(`/api/pipelines?project=${e}`),ve(`/api/runs?project=${e}&limit=200`),ve(`/api/assets?project=${e}&limit=500`)]:[ve("/api/pipelines?limit=100"),ve("/api/runs?limit=200"),ve("/api/assets?limit=500")],[j,w,S]=await Promise.all(x),k=await j.json(),_=await w.json(),E=await S.json();let A=[];if(!e){const C=new Set(((E==null?void 0:E.assets)||[]).map(O=>O.project).filter(Boolean)),M=new Set(((_==null?void 0:_.runs)||[]).map(O=>O.project).filter(Boolean));A=[...new Set([...C,...M])].map(O=>({name:O}))}a({projects:A,pipelines:Array.isArray(k==null?void 0:k.pipelines)?k.pipelines:[],runs:Array.isArray(_==null?void 0:_.runs)?_.runs:[],artifacts:Array.isArray(E==null?void 0:E.assets)?E.assets:[]})}catch(x){console.error("Failed to fetch hierarchy data:",x)}finally{s(!1)}})()},[e]),i)return c.jsx("div",{className:`w-full bg-slate-50 dark:bg-slate-800/50 animate-pulse flex items-center justify-center ${r?"h-full min-h-[200px]":"h-[600px] rounded-xl"}`,children:c.jsxs("div",{className:"text-center",children:[c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600 mx-auto mb-3"}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:"Loading..."})]})});const f=(y,x=null)=>n.runs.filter(j=>j.pipeline_name===y&&(!x||j.project===x)),h=y=>{let x=n.artifacts.filter(j=>j.run_id===y);return u!=="all"&&(x=x.filter(j=>{var w;return((w=j.type)==null?void 0:w.toLowerCase())===u})),x},p=y=>{const x=n.runs.filter(w=>w.project===y),j=[...new Set(x.map(w=>w.pipeline_name))];return n.pipelines.filter(w=>j.includes(w.name))},m=()=>e||n.projects.length===0?n.pipelines.map((y,x)=>{const j=f(y.name,e);return g(y,j,0,x<3)}):n.projects.map((y,x)=>{const j=p(y.name);return c.jsx(ep,{label:y.name,icon:Ka,level:0,defaultExpanded:x===0,badge:c.jsxs("span",{className:"text-xs text-slate-400",children:[j.length," pipeline",j.length!==1?"s":""]}),children:j.map((w,S)=>{const k=f(w.name,y.name);return g(w,k,1,x===0&&S<2)})},y.name)}),g=(y,x,j,w=!1)=>{const S=x.reduce((k,_)=>k+h(_.run_id).length,0);return c.jsxs(ep,{label:y.name,icon:Be,level:j,defaultExpanded:w,badge:c.jsx("div",{className:"flex gap-1",children:S>0&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[10px] bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400 px-1.5 py-0.5 rounded-full",children:[c.jsx(zl,{className:"w-3 h-3"})," ",S]})}),actions:c.jsx(rt,{to:`/pipelines/${y.name}`,className:"text-xs text-blue-500 hover:underline px-2 py-1 rounded hover:bg-blue-50 dark:hover:bg-blue-900/20",onClick:k=>k.stopPropagation(),children:"View"}),children:[x.length===0&&c.jsx("div",{className:"pl-12 py-2 text-xs text-slate-400 italic",children:"No runs yet"}),x.map(k=>b(k,j+1))]},y.name)},b=(y,x)=>{const j=h(y.run_id),w=j.filter(S=>{var k;return((k=S.type)==null?void 0:k.toLowerCase())==="model"}).length;return c.jsxs(ep,{label:y.name||`Run ${y.run_id.slice(0,8)}`,icon:Lr,level:x,status:y.status,defaultExpanded:j.length>0&&j.length<=5,badge:j.length>0&&c.jsxs("div",{className:"flex gap-1",children:[w>0&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[10px] bg-purple-100 text-purple-600 dark:bg-purple-900/30 dark:text-purple-400 px-1.5 py-0.5 rounded-full",children:[c.jsx(Dr,{className:"w-3 h-3"})," ",w]}),c.jsxs("span",{className:"flex items-center gap-0.5 text-[10px] bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-400 px-1.5 py-0.5 rounded-full",children:[c.jsx(zl,{className:"w-3 h-3"})," ",j.length]})]}),actions:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs text-slate-400",children:li(y.created)}),c.jsx(rt,{to:`/runs/${y.run_id}`,className:"text-xs text-blue-500 hover:underline",onClick:S=>S.stopPropagation(),children:"Details"})]}),children:[j.length===0&&c.jsx("div",{className:"pl-16 py-1 text-xs text-slate-400 italic",children:"No artifacts"}),j.map(S=>v(S,x+1))]},y.run_id)},v=(y,x)=>{var S;const j={model:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300",dataset:"bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-300",metrics:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-300",default:"bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-400"},w=j[(S=y.type)==null?void 0:S.toLowerCase()]||j.default;return c.jsx(ep,{label:y.name,icon:()=>c.jsx(Zwe,{type:y.type}),level:x,onClick:()=>t==null?void 0:t(y),badge:c.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${w}`,children:y.type}),actions:c.jsxs("div",{className:"flex items-center gap-2",children:[y.properties&&Object.keys(y.properties).length>0&&c.jsxs("span",{className:"text-xs text-slate-400",children:[Object.keys(y.properties).length," props"]}),c.jsx("button",{onClick:k=>{k.stopPropagation(),t==null||t(y)},className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors",children:c.jsx(tg,{className:"w-3 h-3 text-slate-400"})}),c.jsx("button",{onClick:k=>{k.stopPropagation(),rh(y.artifact_id)},className:"p-1 rounded hover:bg-slate-100 dark:hover:bg-slate-800 transition-colors disabled:opacity-40",disabled:!y.artifact_id,children:c.jsx(Lo,{className:"w-3 h-3 text-slate-400"})})]})},y.artifact_id)};return c.jsxs("div",{className:r?"h-full flex flex-col":"bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-800 overflow-hidden",children:[!r&&c.jsx("div",{className:"p-4 border-b border-slate-200 dark:border-slate-800 bg-gradient-to-r from-blue-50 to-purple-50 dark:from-slate-800 dark:to-slate-800",children:c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("h3",{className:"font-semibold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(Bd,{className:"w-4 h-4 text-blue-500"}),"Asset Hierarchy"]}),c.jsxs("span",{className:"text-xs text-slate-500",children:[n.artifacts.length," asset",n.artifacts.length!==1?"s":""]})]})}),c.jsx("div",{className:`${r?"p-2 border-b border-slate-100 dark:border-slate-700":"p-4 border-b border-slate-200 dark:border-slate-800 bg-gradient-to-r from-blue-50 to-purple-50 dark:from-slate-800 dark:to-slate-800"}`,children:c.jsxs("div",{className:`flex ${r?"justify-between":"gap-2"}`,children:[c.jsxs("button",{onClick:()=>d("all"),title:"All Assets",className:`flex items-center justify-center gap-1.5 ${r?"p-1.5 rounded-md":"px-3 py-1.5 rounded-lg"} text-sm font-medium transition-all ${u==="all"?"bg-primary-500 text-white shadow-md":"bg-white dark:bg-slate-700 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-600"}`,children:[c.jsx(zl,{className:"w-3.5 h-3.5"}),!r&&c.jsxs(c.Fragment,{children:["All Assets ",c.jsxs("span",{className:"text-xs opacity-75",children:["(",n.artifacts.length,")"]})]})]}),c.jsxs("button",{onClick:()=>d("model"),title:"Models",className:`flex items-center justify-center gap-1.5 ${r?"p-1.5 rounded-md":"px-3 py-1.5 rounded-lg"} text-sm font-medium transition-all ${u==="model"?"bg-gradient-to-r from-purple-500 to-pink-500 text-white shadow-md":"bg-white dark:bg-slate-700 text-purple-600 dark:text-purple-400 hover:bg-purple-50 dark:hover:bg-purple-900/20"}`,children:[c.jsx(Dr,{className:"w-3.5 h-3.5"}),!r&&c.jsxs(c.Fragment,{children:["Models ",c.jsxs("span",{className:"text-xs opacity-75",children:["(",n.artifacts.filter(y=>{var x;return((x=y.type)==null?void 0:x.toLowerCase())==="model"}).length,")"]})]})]}),c.jsxs("button",{onClick:()=>d("dataset"),title:"Datasets",className:`flex items-center justify-center gap-1.5 ${r?"p-1.5 rounded-md":"px-3 py-1.5 rounded-lg"} text-sm font-medium transition-all ${u==="dataset"?"bg-gradient-to-r from-blue-500 to-cyan-500 text-white shadow-md":"bg-white dark:bg-slate-700 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20"}`,children:[c.jsx(Ir,{className:"w-3.5 h-3.5"}),!r&&c.jsxs(c.Fragment,{children:["Datasets ",c.jsxs("span",{className:"text-xs opacity-75",children:["(",n.artifacts.filter(y=>{var x;return((x=y.type)==null?void 0:x.toLowerCase())==="dataset"}).length,")"]})]})]})]})}),c.jsx("div",{className:r?"flex-1 overflow-y-auto p-2":"p-3 max-h-[700px] overflow-y-auto",children:n.pipelines.length===0&&n.projects.length===0?c.jsxs("div",{className:"p-8 text-center",children:[c.jsx(Ir,{className:"h-12 w-12 text-slate-300 dark:text-slate-600 mx-auto mb-3"}),c.jsx("p",{className:"text-slate-600 dark:text-slate-400 font-medium mb-1",children:"No assets found"}),c.jsx("p",{className:"text-slate-500 text-sm",children:"Run a pipeline to generate artifacts"})]}):m()})]})}function oz({asset:e,onClose:t}){var f;const[r,n]=N.useState("overview"),[a,i]=N.useState(e==null?void 0:e.project);if(!e)return null;const s=async h=>{try{await ve(`/api/assets/${e.artifact_id}/project`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({project_name:h})}),i(h)}catch(p){console.error("Failed to update project:",p)}},o={model:{icon:Dr,color:"from-purple-500 to-pink-500",bgColor:"bg-purple-50 dark:bg-purple-900/20",textColor:"text-purple-600 dark:text-purple-400",borderColor:"border-purple-200 dark:border-purple-800"},dataset:{icon:Ir,color:"from-blue-500 to-cyan-500",bgColor:"bg-blue-50 dark:bg-blue-900/20",textColor:"text-blue-600 dark:text-blue-400",borderColor:"border-blue-200 dark:border-blue-800"},metrics:{icon:_a,color:"from-emerald-500 to-teal-500",bgColor:"bg-emerald-50 dark:bg-emerald-900/20",textColor:"text-emerald-600 dark:text-emerald-400",borderColor:"border-emerald-200 dark:border-emerald-800"},default:{icon:ps,color:"from-slate-500 to-slate-600",bgColor:"bg-slate-50 dark:bg-slate-900/20",textColor:"text-slate-600 dark:text-slate-400",borderColor:"border-slate-200 dark:border-slate-800"}},l=o[(f=e.type)==null?void 0:f.toLowerCase()]||o.default,u=l.icon,d=h=>{if(!h||h===0)return"N/A";const p=1024,m=["Bytes","KB","MB","GB","TB"],g=Math.floor(Math.log(h)/Math.log(p));return parseFloat((h/Math.pow(p,g)).toFixed(2))+" "+m[g]};return c.jsx(Le.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:{duration:.2},className:"h-full flex flex-col",children:c.jsxs(ze,{className:"flex-1 flex flex-col overflow-hidden",children:[c.jsxs("div",{className:`p-6 ${l.bgColor} border-b ${l.borderColor}`,children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsx("div",{className:`p-3 rounded-xl bg-gradient-to-br ${l.color} text-white shadow-lg`,children:c.jsx(u,{size:32})}),c.jsx("button",{onClick:t,className:"p-2 hover:bg-white/50 dark:hover:bg-slate-800/50 rounded-lg transition-colors",children:c.jsx(Ps,{size:20,className:"text-slate-400"})})]}),c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-2",children:e.name}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsx(jt,{className:`bg-gradient-to-r ${l.color} text-white border-0`,children:e.type}),c.jsx(lg,{currentProject:a,onUpdate:s})]})]}),c.jsxs("div",{className:"flex items-center gap-1 p-2 border-b border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900",children:[c.jsx(sb,{active:r==="overview",onClick:()=>n("overview"),icon:ym,label:"Overview"}),c.jsx(sb,{active:r==="properties",onClick:()=>n("properties"),icon:bm,label:"Properties"}),c.jsx(sb,{active:r==="metadata",onClick:()=>n("metadata"),icon:zl,label:"Metadata"})]}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[r==="overview"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider mb-3 flex items-center gap-2",children:[c.jsx(zl,{size:16}),"Asset Information"]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsx(tp,{icon:An,label:"Created",value:e.created_at?pt(new Date(e.created_at),"MMM d, yyyy HH:mm"):"N/A"}),c.jsx(tp,{icon:Xk,label:"Size",value:d(e.size||e.storage_bytes)}),c.jsx(tp,{icon:oa,label:"Step",value:e.step||"N/A"}),c.jsx(tp,{icon:Bd,label:"Version",value:e.version||"N/A"})]})]}),(e.run_id||e.pipeline_name||a)&&c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider mb-3 flex items-center gap-2",children:[c.jsx(Bd,{size:16}),"Context"]}),c.jsxs("div",{className:"space-y-2",children:[a&&c.jsx(ib,{icon:Dr,label:"Project",value:a,to:`/assets?project=${encodeURIComponent(a)}`}),e.pipeline_name&&c.jsx(ib,{icon:Be,label:"Pipeline",value:e.pipeline_name,to:`/pipelines?project=${encodeURIComponent(a||"")}`}),e.run_id&&c.jsx(ib,{icon:Be,label:"Run",value:e.run_id.slice(0,12)+"...",to:`/runs/${e.run_id}`})]})]})]}),r==="properties"&&c.jsxs("div",{children:[c.jsxs("h3",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider mb-3 flex items-center gap-2",children:[c.jsx(bm,{size:16}),"Properties (",e.properties?Object.keys(e.properties).length:0,")"]}),e.properties&&Object.keys(e.properties).length>0?c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800/50 rounded-lg p-4 space-y-2",children:Object.entries(e.properties).map(([h,p])=>c.jsx(Qwe,{name:h,value:p},h))}):c.jsx("div",{className:"text-center py-8 text-slate-500 italic",children:"No properties available"})]}),r==="metadata"&&c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider mb-2",children:"Artifact ID"}),c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800/50 rounded-lg p-3",children:c.jsx("code",{className:"text-xs text-slate-600 dark:text-slate-400 font-mono break-all",children:e.artifact_id})})]}),e.uri&&c.jsxs("div",{children:[c.jsx("h3",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300 uppercase tracking-wider mb-2",children:"Location"}),c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800/50 rounded-lg p-3",children:c.jsx("code",{className:"text-xs text-slate-600 dark:text-slate-400 break-all",children:e.uri})})]})]})]}),c.jsx("div",{className:"p-4 border-t border-slate-200 dark:border-slate-800 bg-slate-50 dark:bg-slate-800/50",children:c.jsxs("div",{className:"flex gap-2",children:[c.jsxs(ye,{onClick:()=>rh(e.artifact_id),disabled:!e.artifact_id,className:"flex-1",children:[c.jsx(Lo,{size:16,className:"mr-2"}),"Download Asset"]}),e.run_id&&c.jsx(rt,{to:`/runs/${e.run_id}`,children:c.jsxs(ye,{variant:"outline",children:[c.jsx(dd,{size:16,className:"mr-2"}),"View in Run"]})})]})})]})})}function tp({icon:e,label:t,value:r,mono:n=!1}){return c.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-lg p-3 border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx(e,{size:14,className:"text-slate-400"}),c.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:t})]}),c.jsx("p",{className:`text-sm font-semibold text-slate-900 dark:text-white ${n?"font-mono":""}`,children:r})]})}function ib({icon:e,label:t,value:r,to:n}){return c.jsxs(rt,{to:n,className:"flex items-center gap-3 p-3 bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 hover:border-primary-300 dark:hover:border-primary-700 hover:shadow-md transition-all group",children:[c.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-700 rounded-lg group-hover:bg-primary-100 dark:group-hover:bg-primary-900/30 transition-colors",children:c.jsx(e,{size:16,className:"text-slate-600 dark:text-slate-400 group-hover:text-primary-600 dark:group-hover:text-primary-400"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:t}),c.jsx("p",{className:"text-sm font-medium text-slate-900 dark:text-white truncate",children:r})]}),c.jsx(dd,{size:14,className:"text-slate-400 opacity-0 group-hover:opacity-100 transition-opacity"})]})}function Qwe({name:e,value:t}){const r=()=>typeof t=="object"?JSON.stringify(t,null,2):typeof t=="boolean"?t?"true":"false":typeof t=="number"?t.toLocaleString():String(t);return c.jsxs("div",{className:"flex items-start justify-between gap-4 py-2 border-b border-slate-200 dark:border-slate-700 last:border-0",children:[c.jsx("span",{className:"text-sm font-medium text-slate-700 dark:text-slate-300 shrink-0",children:e}),c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400 text-right font-mono break-all",children:r()})]})}function sb({active:e,onClick:t,icon:r,label:n}){return c.jsxs("button",{onClick:t,className:`
|
|
557
|
-
flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium transition-all
|
|
558
|
-
${e?"bg-slate-100 dark:bg-slate-800 text-slate-900 dark:text-white":"text-slate-500 hover:bg-slate-50 dark:hover:bg-slate-800/50 hover:text-slate-700 dark:hover:text-slate-300"}
|
|
559
|
-
`,children:[c.jsx(r,{size:16}),n]})}function Jwe(){const[e,t]=N.useState([]),[r,n]=N.useState(!0),[a,i]=N.useState(null),[s,o]=N.useState("all"),[l,u]=N.useState(null),[d,f]=N.useState("table"),[h,p]=N.useState(null),{selectedProject:m}=vi();N.useEffect(()=>{(async()=>{n(!0),i(null);try{const j=m?`/api/assets/?limit=50&project=${encodeURIComponent(m)}`:"/api/assets/?limit=50",w=await ve(j);if(!w.ok)throw new Error(`Failed to fetch assets: ${w.statusText}`);const S=await w.json();t(S.assets||[])}catch(j){console.error(j),i(j.message)}finally{n(!1)}})()},[m]),N.useEffect(()=>{(async()=>{try{const j=m?`/api/assets/stats?project=${encodeURIComponent(m)}`:"/api/assets/stats",w=await ve(j);if(w.ok){const S=await w.json();p(S)}}catch(j){console.error("Failed to fetch stats:",j)}})()},[m]);const g=["all",...new Set(e.map(x=>x.type))],b=e.filter(x=>s==="all"||x.type===s),v=[{header:"Type",key:"type",sortable:!0,render:x=>{const j={Dataset:{icon:c.jsx(Ir,{size:14}),color:"text-blue-600",bg:"bg-blue-50 dark:bg-blue-900/20"},Model:{icon:c.jsx(Dr,{size:14}),color:"text-purple-600",bg:"bg-purple-50 dark:bg-purple-900/20"},Metrics:{icon:c.jsx(_a,{size:14}),color:"text-emerald-600",bg:"bg-emerald-50 dark:bg-emerald-900/20"},default:{icon:c.jsx(ps,{size:14}),color:"text-slate-600",bg:"bg-slate-50 dark:bg-slate-800"}},w=j[x.type]||j.default;return c.jsxs("div",{className:`flex items-center gap-2 px-2 py-1 rounded-md w-fit ${w.bg} ${w.color}`,children:[w.icon,c.jsx("span",{className:"text-xs font-medium",children:x.type})]})}},{header:"Name",key:"name",sortable:!0,render:x=>c.jsx("span",{className:"font-medium text-slate-900 dark:text-white",children:x.name})},{header:"Step",key:"step",sortable:!0,render:x=>c.jsx("span",{className:"font-mono text-xs text-slate-500",children:x.step})},{header:"Pipeline",key:"pipeline",sortable:!0,render:x=>c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:x.pipeline_name||"-"})},{header:"Project",key:"project",sortable:!0,render:x=>c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400",children:x.project||"-"})},{header:"Run ID",key:"run_id",render:x=>{var j;return x.run_id?c.jsx(rt,{to:`/runs/${x.run_id}`,className:"font-mono text-xs text-primary-600 hover:underline",onClick:w=>w.stopPropagation(),children:((j=x.run_id)==null?void 0:j.substring(0,8))||"N/A"}):c.jsx("span",{className:"font-mono text-xs text-slate-400",children:"-"})}},{header:"Created",key:"created_at",sortable:!0,render:x=>c.jsx("span",{className:"text-sm text-slate-500",children:x.created_at?pt(new Date(x.created_at),"MMM d, HH:mm"):"-"})},{header:"",key:"actions",render:x=>c.jsxs("div",{className:"flex items-center justify-end gap-2 opacity-0 group-hover:opacity-100 transition-opacity",children:[c.jsx("button",{onClick:()=>u(x),className:"p-1 hover:bg-slate-100 dark:hover:bg-slate-800 rounded text-slate-500 hover:text-primary-600",title:"View Details",children:c.jsx(tg,{size:16})}),c.jsx("button",{onClick:j=>{j.stopPropagation(),rh(x.artifact_id)},className:"p-1 hover:bg-slate-100 dark:hover:bg-slate-800 rounded text-slate-500 hover:text-primary-600",disabled:!x.artifact_id,title:"Download",children:c.jsx(Lo,{size:16})})]})}],y=x=>{const j={Dataset:{icon:c.jsx(Ir,{size:18}),color:"text-blue-600",bg:"bg-blue-50 dark:bg-blue-900/20"},Model:{icon:c.jsx(Dr,{size:18}),color:"text-purple-600",bg:"bg-purple-50 dark:bg-purple-900/20"},Metrics:{icon:c.jsx(_a,{size:18}),color:"text-emerald-600",bg:"bg-emerald-50 dark:bg-emerald-900/20"},default:{icon:c.jsx(ps,{size:18}),color:"text-slate-600",bg:"bg-slate-50 dark:bg-slate-800"}},w=j[x.type]||j.default;return c.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},whileHover:{y:-2},transition:{duration:.2},children:c.jsx(ze,{className:"group cursor-pointer hover:shadow-md hover:border-primary-200 dark:hover:border-primary-800 transition-all duration-200 h-full border border-slate-200 dark:border-slate-800",onClick:()=>u(x),children:c.jsxs("div",{className:"p-4",children:[c.jsxs("div",{className:"flex items-start justify-between mb-3",children:[c.jsx("div",{className:`p-2 rounded-lg ${w.bg} ${w.color}`,children:w.icon}),c.jsx(jt,{variant:"outline",className:"text-[10px] px-1.5 py-0 h-5 border-slate-200 dark:border-slate-700 text-slate-500",children:x.type})]}),c.jsx("h4",{className:"font-medium text-slate-900 dark:text-white mb-1 truncate group-hover:text-primary-600 transition-colors",children:x.name}),c.jsxs("div",{className:"flex items-center gap-2 mb-4 text-xs text-slate-500",children:[c.jsx("span",{className:"truncate max-w-[120px]",children:x.step}),x.project&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"•"}),c.jsx("span",{className:"truncate max-w-[80px]",children:x.project})]})]}),c.jsxs("div",{className:"pt-3 border-t border-slate-100 dark:border-slate-800 flex items-center justify-between text-xs text-slate-400",children:[c.jsx("span",{children:x.created_at?pt(new Date(x.created_at),"MMM d"):"-"}),x.run_id&&c.jsx("span",{className:"font-mono bg-slate-50 dark:bg-slate-800 px-1.5 py-0.5 rounded",children:x.run_id.slice(0,6)})]})]})})})};return r?c.jsx("div",{className:"flex items-center justify-center h-screen bg-slate-50 dark:bg-slate-900",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):a?c.jsx("div",{className:"flex items-center justify-center h-screen bg-slate-50 dark:bg-slate-900",children:c.jsxs("div",{className:"text-center p-8 bg-red-50 dark:bg-red-900/20 rounded-2xl border border-red-100 dark:border-red-800 max-w-md",children:[c.jsx(XCircle,{className:"w-12 h-12 text-red-500 mx-auto mb-4"}),c.jsx("h3",{className:"text-lg font-bold text-red-700 dark:text-red-300 mb-2",children:"Failed to load assets"}),c.jsx("p",{className:"text-red-600 dark:text-red-400 mb-6",children:a}),c.jsx("button",{onClick:()=>window.location.reload(),className:"px-4 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg shadow-sm hover:bg-slate-50 dark:hover:bg-slate-700 transition-colors text-slate-700 dark:text-slate-300 font-medium",children:"Retry Connection"})]})}):c.jsxs("div",{className:"h-screen flex flex-col overflow-hidden bg-slate-50 dark:bg-slate-900",children:[c.jsx("div",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 px-6 py-4",children:c.jsxs("div",{className:"flex items-center justify-between max-w-[1800px] mx-auto",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-xl font-bold text-slate-900 dark:text-white",children:"Assets"}),c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-0.5",children:"Manage and track your pipeline artifacts"})]}),!l&&c.jsxs("div",{className:"flex items-center gap-2 bg-slate-100 dark:bg-slate-700 p-1 rounded-lg",children:[c.jsx("button",{onClick:()=>f("grid"),className:`p-1.5 rounded transition-all ${d==="grid"?"bg-white dark:bg-slate-600 text-slate-900 dark:text-white shadow-sm":"text-slate-500 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white"}`,title:"Grid View",children:c.jsx(MU,{size:16})}),c.jsx("button",{onClick:()=>f("table"),className:`p-1.5 rounded transition-all ${d==="table"?"bg-white dark:bg-slate-600 text-slate-900 dark:text-white shadow-sm":"text-slate-500 dark:text-slate-400 hover:text-slate-900 dark:hover:text-white"}`,title:"Table View",children:c.jsx(ED,{size:16})})]})]})}),c.jsx("div",{className:"flex-1 overflow-hidden",children:c.jsx("div",{className:"h-full max-w-[1800px] mx-auto px-6 py-6",children:c.jsxs("div",{className:"h-full flex gap-6",children:[c.jsxs("div",{className:"w-[380px] shrink-0 flex flex-col gap-4 overflow-y-auto pb-6",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[c.jsx(HC,{icon:ms,label:"Total",value:(h==null?void 0:h.total_assets)||0}),c.jsx(HC,{icon:Xk,label:"Size",value:e1e((h==null?void 0:h.total_storage_bytes)||0)})]}),c.jsxs("div",{className:"flex-1 min-h-0 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden flex flex-col",children:[c.jsx("div",{className:"p-3 border-b border-slate-100 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50",children:c.jsx("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Explorer"})}),c.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:c.jsx(sz,{projectId:m,onAssetSelect:x=>u(x),compact:!0})})]})]}),c.jsx("div",{className:"flex-1 min-w-0 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden flex flex-col shadow-sm",children:l?c.jsx(oz,{asset:l,onClose:()=>u(null)}):c.jsxs("div",{className:"h-full flex flex-col",children:[c.jsxs("div",{className:"p-4 border-b border-slate-100 dark:border-slate-700 flex items-center gap-4 overflow-x-auto",children:[c.jsx(ND,{size:16,className:"text-slate-400 shrink-0"}),c.jsx("div",{className:"flex gap-2",children:g.map(x=>c.jsx("button",{onClick:()=>o(x),className:`px-3 py-1.5 rounded-full text-xs font-medium transition-all whitespace-nowrap border ${s===x?"bg-slate-900 text-white border-slate-900 dark:bg-white dark:text-slate-900 dark:border-white":"bg-white text-slate-600 border-slate-200 hover:border-slate-300 dark:bg-slate-800 dark:text-slate-300 dark:border-slate-700 dark:hover:border-slate-600"}`,children:x==="all"?"All":x},x))})]}),c.jsx("div",{className:"flex-1 min-h-0 overflow-hidden",children:c.jsx(Uc,{items:b,loading:r,columns:v,renderGrid:y,initialView:d,emptyState:c.jsx(A2,{icon:ms,title:"No artifacts found",description:"Try adjusting your filters or run a pipeline to generate artifacts."})})})]})})]})})})]})}function HC({icon:e,label:t,value:r}){return c.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl p-3 border border-slate-200 dark:border-slate-700 shadow-sm",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx(e,{size:14,className:"text-slate-400"}),c.jsx("span",{className:"text-xs text-slate-500 dark:text-slate-400",children:t})]}),c.jsx("p",{className:"text-lg font-semibold text-slate-900 dark:text-white",children:typeof r=="number"?r.toLocaleString():r})]})}function e1e(e){if(!e||e===0)return"0 B";const t=1024,r=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(1))+" "+r[n]}function t1e({experiment:e,onClose:t}){const[r,n]=N.useState([]),[a,i]=N.useState(!1);N.useEffect(()=>{e&&s()},[e]);const s=async()=>{i(!0);try{const l=e.pipeline_name?`/api/runs?pipeline=${encodeURIComponent(e.pipeline_name)}&limit=50`:"/api/runs?limit=50",f=(await(await ve(l)).json()).runs.filter(h=>h.pipeline_name===e.pipeline_name||e.runs&&e.runs.includes(h.run_id));n(f)}catch(l){console.error("Failed to fetch runs:",l)}finally{i(!1)}};if(!e)return null;const o={total:r.length,success:r.filter(l=>l.status==="completed").length,failed:r.filter(l=>l.status==="failed").length,avgDuration:r.length>0?r.reduce((l,u)=>l+(u.duration||0),0)/r.length:0};return c.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-slate-900",children:[c.jsxs("div",{className:"p-6 border-b border-slate-200 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-800/50",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:"p-3 bg-purple-100 dark:bg-purple-900/30 rounded-xl text-purple-600 dark:text-purple-400",children:c.jsx(On,{size:24})}),c.jsxs("div",{children:[c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:e.name}),c.jsxs("div",{className:"flex items-center gap-2 mt-1 text-sm text-slate-500",children:[e.project&&c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx("span",{className:"opacity-50",children:"Project:"}),c.jsx("span",{className:"font-medium text-slate-700 dark:text-slate-300",children:e.project})]}),c.jsx("span",{children:"•"}),c.jsx("span",{children:pt(new Date(e.created_at||Date.now()),"MMM d, yyyy")})]})]})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(ye,{variant:"ghost",size:"sm",onClick:t,children:c.jsx(Ps,{size:20,className:"text-slate-400"})})})]}),e.description&&c.jsx("p",{className:"text-slate-600 dark:text-slate-400 text-sm mb-6 max-w-3xl",children:e.description}),c.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[c.jsx(rp,{label:"Total Runs",value:o.total,icon:Be,color:"blue"}),c.jsx(rp,{label:"Success Rate",value:`${o.total>0?Math.round(o.success/o.total*100):0}%`,icon:Vt,color:"emerald"}),c.jsx(rp,{label:"Avg Duration",value:`${o.avgDuration.toFixed(1)}s`,icon:ct,color:"purple"}),c.jsx(rp,{label:"Failed",value:o.failed,icon:vr,color:"rose"})]})]}),c.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col",children:[c.jsxs("div",{className:"p-4 border-b border-slate-200 dark:border-slate-800 flex items-center justify-between bg-white dark:bg-slate-900",children:[c.jsxs("h3",{className:"font-semibold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(Lr,{size:18,className:"text-slate-400"}),"Recent Runs"]}),c.jsx(rt,{to:`/runs?pipeline=${encodeURIComponent(e.pipeline_name||"")}`,children:c.jsxs(ye,{variant:"ghost",size:"sm",className:"text-primary-600",children:["View All Runs ",c.jsx(ii,{size:16,className:"ml-1"})]})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-3 bg-slate-50 dark:bg-slate-900/50",children:a?c.jsx("div",{className:"flex justify-center py-8",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-600"})}):r.length===0?c.jsx("div",{className:"text-center py-12 text-slate-500",children:"No runs found for this experiment"}):r.map(l=>c.jsx(rt,{to:`/runs/${l.run_id}`,children:c.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"bg-white dark:bg-slate-800 p-4 rounded-xl border border-slate-200 dark:border-slate-700 hover:shadow-md hover:border-primary-300 dark:hover:border-primary-700 transition-all group",children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx(oc,{status:l.status}),c.jsxs("div",{children:[c.jsxs("div",{className:"font-medium text-slate-900 dark:text-white flex items-center gap-2",children:[l.name||`Run ${l.run_id.slice(0,8)}`,c.jsxs("span",{className:"text-xs font-mono text-slate-400",children:["#",l.run_id.slice(0,6)]})]}),c.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-500 mt-1",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(An,{size:12}),pt(new Date(l.created||l.start_time),"MMM d, HH:mm")]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(ct,{size:12}),l.duration?`${l.duration.toFixed(1)}s`:"-"]})]})]})]}),c.jsx(ii,{size:16,className:"text-slate-300 group-hover:text-primary-500 transition-colors"})]})})},l.run_id))})]})]})}function rp({label:e,value:t,icon:r,color:n}){const a={blue:"text-blue-600 bg-blue-50 dark:bg-blue-900/20",emerald:"text-emerald-600 bg-emerald-50 dark:bg-emerald-900/20",purple:"text-purple-600 bg-purple-50 dark:bg-purple-900/20",rose:"text-rose-600 bg-rose-50 dark:bg-rose-900/20"};return c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-3 rounded-xl border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("div",{className:`p-1 rounded-lg ${a[n]}`,children:c.jsx(r,{size:14})}),c.jsx("span",{className:"text-xs text-slate-500 font-medium",children:e})]}),c.jsx("div",{className:"text-lg font-bold text-slate-900 dark:text-white pl-1",children:t})]})}function r1e(){const[e,t]=N.useState([]),[r,n]=N.useState(!0),[a,i]=N.useState(null),{selectedProject:s}=vi(),o=J0(),[l,u]=N.useState("single"),[d,f]=N.useState([]);N.useEffect(()=>{(async()=>{n(!0);try{const v=s?`/api/experiments/?project=${encodeURIComponent(s)}`:"/api/experiments/",x=await(await fetch(v)).json();t(x.experiments||[])}catch(v){console.error(v)}finally{n(!1)}})()},[s]);const h=b=>{l==="single"&&i(b)},p=()=>{l==="single"?(u("multi"),f([])):(u("single"),f([]))},m=(b,v)=>{f(v?y=>[...y,b]:y=>y.filter(x=>x!==b))},g=()=>{d.length>=2&&o(`/experiments/compare?ids=${d.join(",")}`)};return c.jsxs("div",{className:"h-screen flex flex-col overflow-hidden bg-slate-50 dark:bg-slate-900",children:[c.jsx("div",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 px-6 py-4 shrink-0",children:c.jsxs("div",{className:"flex items-center justify-between max-w-[1800px] mx-auto",children:[c.jsxs("div",{children:[c.jsxs("h1",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(On,{className:"text-purple-500"}),"Experiments"]}),c.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400",children:"Manage and track your ML experiments"})]}),c.jsx("div",{className:"flex items-center gap-3",children:l==="multi"?c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"text-sm text-slate-500 mr-2",children:[d.length," selected"]}),c.jsxs(ye,{size:"sm",variant:"primary",disabled:d.length<2,onClick:g,children:[c.jsx(Be,{size:16,className:"mr-2"}),"Compare"]}),c.jsxs(ye,{variant:"ghost",size:"sm",onClick:p,children:[c.jsx(OD,{size:16,className:"mr-2"}),"Cancel"]})]}):c.jsxs(ye,{variant:"outline",size:"sm",onClick:p,children:[c.jsx(Be,{size:16,className:"mr-2"}),"Select to Compare"]})})]})}),c.jsx("div",{className:"flex-1 overflow-hidden",children:c.jsx("div",{className:"h-full max-w-[1800px] mx-auto px-6 py-6",children:c.jsxs("div",{className:"h-full flex gap-6",children:[c.jsxs("div",{className:"w-[320px] shrink-0 flex flex-col bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden shadow-sm",children:[c.jsx("div",{className:"p-3 border-b border-slate-200 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50",children:c.jsx("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Explorer"})}),c.jsx("div",{className:"flex-1 min-h-0",children:c.jsx($S,{mode:"experiments",projectId:s,onSelect:h,selectedId:a==null?void 0:a.experiment_id,selectionMode:l,selectedIds:d,onMultiSelect:m})})]}),c.jsx("div",{className:"flex-1 min-w-0 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden shadow-sm",children:a?c.jsx(t1e,{experiment:a,onClose:()=>i(null)}):c.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center p-8 bg-slate-50/50 dark:bg-slate-900/50",children:[c.jsx("div",{className:"w-20 h-20 bg-purple-100 dark:bg-purple-900/30 rounded-full flex items-center justify-center mb-6 animate-pulse",children:c.jsx(On,{size:40,className:"text-purple-500"})}),c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-2",children:"Select an Experiment"}),c.jsx("p",{className:"text-slate-500 max-w-md",children:"Choose an experiment from the sidebar to view detailed metrics, runs, and analysis."})]})})]})})})]})}function n1e(){var o;const{experimentId:e}=qk(),[t,r]=N.useState(null),[n,a]=N.useState(!0);if(N.useEffect(()=>{ve(`/api/experiments/${e}`).then(l=>l.json()).then(l=>{r(l),a(!1)}).catch(l=>{console.error(l),a(!1)})},[e]),n)return c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});if(!t)return c.jsx("div",{className:"p-8 text-center",children:c.jsx("p",{className:"text-slate-500",children:"Experiment not found"})});const i={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},s={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return c.jsxs(Le.div,{initial:"hidden",animate:"show",variants:i,className:"space-y-8",children:[c.jsxs(Le.div,{variants:s,className:"bg-white p-6 rounded-xl border border-slate-100 shadow-sm",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx(rt,{to:"/experiments",className:"text-sm text-slate-500 hover:text-slate-700 transition-colors",children:"Experiments"}),c.jsx(No,{size:14,className:"text-slate-300"}),c.jsx("span",{className:"text-sm text-slate-900 font-medium",children:t.name})]}),c.jsx("div",{className:"flex items-start justify-between",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:"p-3 bg-gradient-to-br from-purple-500 to-pink-500 rounded-xl shadow-lg",children:c.jsx(On,{className:"text-white",size:28})}),c.jsxs("div",{children:[c.jsx("h2",{className:"text-3xl font-bold text-slate-900 tracking-tight",children:t.name}),c.jsx("p",{className:"text-slate-500 mt-1",children:t.description||"No description"})]})]})})]}),c.jsxs(Le.div,{variants:s,className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[c.jsx(ob,{icon:c.jsx(Be,{size:24}),label:"Total Runs",value:((o=t.runs)==null?void 0:o.length)||0,color:"blue"}),c.jsx(ob,{icon:c.jsx(gs,{size:24}),label:"Best Performance",value:a1e(t.runs),color:"emerald"}),c.jsx(ob,{icon:c.jsx(An,{size:24}),label:"Last Run",value:i1e(t.runs),color:"purple"})]}),c.jsxs(Le.div,{variants:s,children:[c.jsxs("div",{className:"flex items-center gap-2 mb-6",children:[c.jsx(wU,{className:"text-primary-500",size:24}),c.jsx("h3",{className:"text-xl font-bold text-slate-900",children:"Runs Comparison"})]}),t.runs&&t.runs.length>0?c.jsx(ze,{className:"p-0 overflow-hidden",children:c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-left",children:[c.jsx("thead",{className:"bg-gradient-to-r from-slate-50 to-slate-100/50 border-b border-slate-200",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider",children:"Run ID"}),c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider",children:"Date"}),c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider",children:"Metrics"}),c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider",children:"Parameters"}),c.jsx("th",{className:"px-6 py-4 font-semibold text-xs text-slate-600 uppercase tracking-wider"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100",children:t.runs.map((l,u)=>{var d;return c.jsxs(Le.tr,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:u*.05},className:"hover:bg-slate-50/70 transition-colors group",children:[c.jsx("td",{className:"px-6 py-4 font-mono text-sm text-slate-700 font-medium",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"w-2 h-2 rounded-full bg-primary-400 opacity-0 group-hover:opacity-100 transition-opacity"}),((d=l.run_id)==null?void 0:d.substring(0,12))||"N/A"]})}),c.jsx("td",{className:"px-6 py-4 text-sm text-slate-500",children:l.timestamp?pt(new Date(l.timestamp),"MMM d, HH:mm:ss"):"-"}),c.jsx("td",{className:"px-6 py-4",children:c.jsxs("div",{className:"flex flex-wrap gap-2",children:[Object.entries(l.metrics||{}).map(([f,h])=>c.jsxs(jt,{variant:"outline",className:"font-mono text-xs bg-blue-50 text-blue-700 border-blue-200",children:[f,": ",typeof h=="number"?h.toFixed(4):h]},f)),Object.keys(l.metrics||{}).length===0&&c.jsx("span",{className:"text-xs text-slate-400 italic",children:"No metrics"})]})}),c.jsx("td",{className:"px-6 py-4",children:c.jsxs("div",{className:"flex flex-wrap gap-2",children:[Object.entries(l.parameters||{}).map(([f,h])=>c.jsxs("span",{className:"text-xs text-slate-600 bg-slate-100 px-2.5 py-1 rounded-md font-medium",children:[f,"=",String(h)]},f)),Object.keys(l.parameters||{}).length===0&&c.jsx("span",{className:"text-xs text-slate-400 italic",children:"No params"})]})}),c.jsx("td",{className:"px-6 py-4 text-right",children:c.jsx(rt,{to:`/runs/${l.run_id}`,children:c.jsx(ye,{variant:"ghost",size:"sm",className:"opacity-0 group-hover:opacity-100 transition-opacity",children:"View Run"})})})]},l.run_id)})})]})})}):c.jsx(ze,{className:"p-12 text-center border-dashed",children:c.jsx("p",{className:"text-slate-500",children:"No runs recorded for this experiment yet."})})]})]})}function ob({icon:e,label:t,value:r,color:n}){const a={blue:"bg-blue-50 text-blue-600",purple:"bg-purple-50 text-purple-600",emerald:"bg-emerald-50 text-emerald-600"};return c.jsx(ze,{className:"hover:shadow-md transition-shadow duration-200",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:`p-3 rounded-xl ${a[n]}`,children:e}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-slate-500 font-medium",children:t}),c.jsx("p",{className:"text-2xl font-bold text-slate-900",children:r})]})]})})}function a1e(e){if(!e||e.length===0)return"-";const t=["accuracy","f1_score","precision","recall"];for(const r of t){const n=e.map(a=>{var i;return(i=a.metrics)==null?void 0:i[r]}).filter(a=>typeof a=="number");if(n.length>0)return`${Math.max(...n).toFixed(4)} (${r})`}return"N/A"}function i1e(e){var r;if(!e||e.length===0)return"-";const t=[...e].sort((n,a)=>{const i=n.timestamp?new Date(n.timestamp):new Date(0);return(a.timestamp?new Date(a.timestamp):new Date(0))-i});return(r=t[0])!=null&&r.timestamp?pt(new Date(t[0].timestamp),"MMM d, HH:mm"):"-"}function s1e(){const[e,t]=N.useState([]),[r,n]=N.useState(null),[a,i]=N.useState(!0),[s,o]=N.useState("all"),{selectedProject:l}=vi();N.useEffect(()=>{u()},[s,l]);const u=async()=>{i(!0);try{const g=new URLSearchParams;s!=="all"&&g.append("event_type",s),l&&g.append("project",l);const v=await(await ve(`/api/traces?${g}`)).json();t(v)}catch(g){console.error("Failed to fetch traces:",g)}finally{i(!1)}},d=async g=>{try{const v=await(await ve(`/api/traces/${g}`)).json();n(v)}catch(b){console.error("Failed to fetch trace details:",b)}},f=g=>g?`${(g*1e3).toFixed(0)}ms`:"N/A",h=g=>{switch(g){case"success":return"text-green-400";case"error":return"text-red-400";case"running":return"text-yellow-400";default:return"text-gray-400"}},p=g=>{switch(g){case"llm":return c.jsx(AD,{className:"w-4 h-4"});case"tool":return c.jsx(Eo,{className:"w-4 h-4"});default:return c.jsx(Be,{className:"w-4 h-4"})}},m=({events:g,level:b=0})=>g?c.jsx("div",{className:`pl-${b*4}`,children:g.map((v,y)=>c.jsxs("div",{className:"mb-2",children:[c.jsxs("div",{className:"flex items-center gap-2 p-2 bg-gray-800/50 rounded border border-gray-700/50 hover:border-blue-500/50 transition-colors",children:[c.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[p(v.event_type),c.jsx("span",{className:"font-medium",children:v.name}),c.jsx("span",{className:`text-sm ${h(v.status)}`,children:v.status})]}),c.jsxs("div",{className:"flex items-center gap-4 text-sm text-gray-400",children:[v.duration&&c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(ct,{className:"w-3 h-3"}),f(v.duration)]}),v.total_tokens>0&&c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Be,{className:"w-3 h-3"}),v.total_tokens," tokens"]}),v.cost>0&&c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(AU,{className:"w-3 h-3"}),"$",v.cost.toFixed(4)]})]})]}),v.children&&v.children.length>0&&c.jsx("div",{className:"ml-6 mt-2 border-l-2 border-gray-700/50 pl-2",children:c.jsx(m,{events:v.children,level:b+1})})]},y))}):null;return c.jsxs("div",{className:"p-6",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsx("h1",{className:"text-2xl font-bold",children:"🔍 LLM Traces"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsxs("select",{value:s,onChange:g=>o(g.target.value),className:"px-4 py-2 bg-gray-800 border border-gray-700 rounded-lg",children:[c.jsx("option",{value:"all",children:"All Types"}),c.jsx("option",{value:"llm",children:"LLM Calls"}),c.jsx("option",{value:"tool",children:"Tool Calls"}),c.jsx("option",{value:"chain",children:"Chains"}),c.jsx("option",{value:"agent",children:"Agents"})]}),c.jsx("button",{onClick:u,className:"px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors",children:"Refresh"})]})]}),a?c.jsxs("div",{className:"text-center py-12",children:[c.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500"}),c.jsx("p",{className:"mt-4 text-gray-400",children:"Loading traces..."})]}):e.length===0?c.jsxs("div",{className:"text-center py-12 bg-gray-800/30 rounded-lg border-2 border-dashed border-gray-700",children:[c.jsx(Be,{className:"w-12 h-12 mx-auto text-gray-600 mb-4"}),c.jsx("p",{className:"text-gray-400",children:"No traces found"}),c.jsx("p",{className:"text-sm text-gray-500 mt-2",children:"Use @trace_llm decorator to track LLM calls"})]}):c.jsx("div",{className:"grid gap-4",children:e.map(g=>{const b=g.trace_id;return c.jsxs("div",{className:"bg-gray-800/50 rounded-lg border border-gray-700/50 p-4 hover:border-blue-500/50 transition-all cursor-pointer",onClick:()=>d(b),children:[c.jsxs("div",{className:"flex items-start justify-between mb-3",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[p(g.event_type),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-lg",children:g.name}),c.jsxs("p",{className:"text-sm text-gray-400",children:["Trace ID: ",b.slice(0,8),"..."]})]})]}),c.jsx("span",{className:`px-3 py-1 rounded-full text-sm ${h(g.status)}`,children:g.status})]}),c.jsxs("div",{className:"grid grid-cols-4 gap-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-500",children:"Duration:"}),c.jsx("span",{className:"ml-2 text-gray-300",children:f(g.duration)})]}),g.model&&c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-500",children:"Model:"}),c.jsx("span",{className:"ml-2 text-gray-300",children:g.model})]}),g.total_tokens>0&&c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-500",children:"Tokens:"}),c.jsxs("span",{className:"ml-2 text-gray-300",children:[g.total_tokens," (",g.prompt_tokens,"/",g.completion_tokens,")"]})]}),g.cost>0&&c.jsxs("div",{children:[c.jsx("span",{className:"text-gray-500",children:"Cost:"}),c.jsxs("span",{className:"ml-2 text-gray-300",children:["$",g.cost.toFixed(4)]})]})]})]},g.event_id)})}),r&&c.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center p-6 z-50",children:c.jsxs("div",{className:"bg-gray-900 rounded-lg max-w-4xl w-full max-h-[80vh] overflow-auto border border-gray-700",children:[c.jsxs("div",{className:"sticky top-0 bg-gray-900 border-b border-gray-700 p-4 flex justify-between items-center",children:[c.jsx("h2",{className:"text-xl font-bold",children:"Trace Details"}),c.jsx("button",{onClick:()=>n(null),className:"px-4 py-2 bg-gray-800 hover:bg-gray-700 rounded-lg",children:"Close"})]}),c.jsx("div",{className:"p-6",children:c.jsx(m,{events:r})})]})})]})}function o1e(){const[e,t]=N.useState([]),[r,n]=N.useState(!0),[a,i]=N.useState(!1),[s,o]=N.useState(""),[l,u]=N.useState(""),[d,f]=N.useState({}),{setSelectedProject:h}=vi();N.useEffect(()=>{p()},[]);const p=async()=>{try{const x=await(await ve("/api/projects/")).json(),j=Array.isArray(x)?x:x.projects||[],w=await Promise.all(j.map(async S=>{try{const _=await(await fetch(`/api/runs?project=${encodeURIComponent(S.name)}`)).json(),E=new Set((_.runs||[]).map(M=>M.pipeline_name)),C=await(await fetch(`/api/assets?project=${encodeURIComponent(S.name)}`)).json();return{...S,runs:(_.runs||[]).length,pipelines:E.size,artifacts:(C.artifacts||[]).length}}catch(k){return console.error(`Failed to fetch stats for project ${S.name}:`,k),{...S,runs:0,pipelines:0,artifacts:0}}}));t(w)}catch(y){console.error("Failed to fetch projects:",y)}finally{n(!1)}},m=async y=>{y.preventDefault();try{(await ve("/api/projects/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s,description:l})})).ok&&(i(!1),o(""),u(""),p())}catch(x){console.error("Failed to create project:",x)}},g=async y=>{if(confirm(`Are you sure you want to delete project "${y}"?`))try{(await ve(`/api/projects/${y}`,{method:"DELETE"})).ok&&p()}catch(x){console.error("Failed to delete project:",x)}},b=[{header:"Project Name",key:"name",sortable:!0,render:y=>c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg",children:c.jsx(Ka,{className:"w-5 h-5 text-blue-500"})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white",children:y.name}),c.jsxs("div",{className:"text-xs text-slate-500",children:["Created ",pt(new Date(y.created_at),"MMM d, yyyy")]})]})]})},{header:"Description",key:"description",render:y=>c.jsx("span",{className:"text-slate-500 dark:text-slate-400 truncate max-w-xs block",children:y.description||"No description"})},{header:"Stats",key:"stats",render:y=>{const x={runs:y.runs||0,pipelines:y.pipelines||0,artifacts:y.artifacts||0};return c.jsxs("div",{className:"flex gap-4 text-sm text-slate-500",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(Be,{size:14})," ",x.pipelines||0]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(ct,{size:14})," ",x.runs||0]}),c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(Ir,{size:14})," ",x.artifacts||0]})]})}},{header:"Actions",key:"actions",render:y=>c.jsx("button",{onClick:x=>{x.stopPropagation(),g(y.name)},className:"p-2 text-slate-400 hover:text-red-500 transition-colors",children:c.jsx(_o,{size:16})})}],v=y=>{const x={runs:y.runs||0,pipelines:y.pipelines||0,artifacts:y.artifacts||0};return c.jsx(rt,{to:`/projects/${encodeURIComponent(y.name)}`,onClick:()=>h(y.name),className:"block",children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 p-6 hover:border-blue-500/50 hover:shadow-md transition-all group cursor-pointer",children:[c.jsxs("div",{className:"flex justify-between items-start mb-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-3 bg-blue-500/10 rounded-xl group-hover:bg-blue-500/20 transition-colors",children:c.jsx(Ka,{className:"w-6 h-6 text-blue-600 dark:text-blue-400"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-lg text-slate-900 dark:text-white",children:y.name}),c.jsxs("p",{className:"text-xs text-slate-500",children:["Created ",pt(new Date(y.created_at),"MMM d, yyyy")]})]})]}),c.jsx("button",{onClick:j=>{j.preventDefault(),j.stopPropagation(),g(y.name)},className:"text-slate-400 hover:text-red-500 transition-colors opacity-0 group-hover:opacity-100",children:c.jsx(_o,{className:"w-4 h-4"})})]}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mb-6 h-10 overflow-hidden text-sm line-clamp-2",children:y.description||"No description provided."}),c.jsxs("div",{className:"grid grid-cols-3 gap-4 border-t border-slate-100 dark:border-slate-700 pt-4",children:[c.jsxs("div",{className:"text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-1 text-slate-400 text-xs mb-1",children:[c.jsx(Be,{className:"w-3 h-3"})," Pipelines"]}),c.jsx("span",{className:"font-bold text-slate-700 dark:text-slate-200",children:x.pipelines||0})]}),c.jsxs("div",{className:"text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-1 text-slate-400 text-xs mb-1",children:[c.jsx(ct,{className:"w-3 h-3"})," Runs"]}),c.jsx("span",{className:"font-bold text-slate-700 dark:text-slate-200",children:x.runs||0})]}),c.jsxs("div",{className:"text-center",children:[c.jsxs("div",{className:"flex items-center justify-center gap-1 text-slate-400 text-xs mb-1",children:[c.jsx(Ir,{className:"w-3 h-3"})," Artifacts"]}),c.jsx("span",{className:"font-bold text-slate-700 dark:text-slate-200",children:x.artifacts||0})]})]})]})})};return c.jsxs("div",{className:"p-6 max-w-7xl mx-auto",children:[c.jsx(Uc,{title:"Projects",subtitle:"Manage your ML projects and workspaces",items:e,loading:r,columns:b,initialView:"grid",renderGrid:v,actions:c.jsxs(ye,{onClick:()=>i(!0),className:"flex items-center gap-2",children:[c.jsx(os,{size:18}),"New Project"]}),emptyState:c.jsxs("div",{className:"text-center py-12 bg-slate-50 dark:bg-slate-800/30 rounded-xl border-2 border-dashed border-slate-200 dark:border-slate-700",children:[c.jsx(Ka,{className:"w-12 h-12 mx-auto text-slate-400 mb-4"}),c.jsx("h3",{className:"text-lg font-medium text-slate-900 dark:text-white",children:"No projects found"}),c.jsx("p",{className:"text-slate-500 mb-6",children:"Get started by creating your first project."}),c.jsx(ye,{onClick:()=>i(!0),children:"Create Project"})]})}),a&&c.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 animate-in fade-in duration-200",children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-xl w-full max-w-md border border-slate-200 dark:border-slate-700 shadow-xl",children:[c.jsx("h2",{className:"text-xl font-bold mb-4 text-slate-900 dark:text-white",children:"Create New Project"}),c.jsxs("form",{onSubmit:m,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Project Name"}),c.jsx("input",{type:"text",value:s,onChange:y=>o(y.target.value),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-700 rounded-lg border border-slate-200 dark:border-slate-600 focus:border-blue-500 outline-none text-slate-900 dark:text-white",required:!0,placeholder:"e.g., recommendation-system"})]}),c.jsxs("div",{className:"mb-6",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Description"}),c.jsx("textarea",{value:l,onChange:y=>u(y.target.value),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-700 rounded-lg border border-slate-200 dark:border-slate-600 focus:border-blue-500 outline-none text-slate-900 dark:text-white",rows:"3",placeholder:"Brief description of the project..."})]}),c.jsxs("div",{className:"flex justify-end gap-3",children:[c.jsx("button",{type:"button",onClick:()=>i(!1),className:"px-4 py-2 text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg transition-colors",children:"Cancel"}),c.jsx(ye,{type:"submit",children:"Create Project"})]})]})]})})]})}function l1e({project:e,stats:t,loading:r}){var n,a,i;return r||!e?c.jsxs("div",{className:"animate-pulse space-y-4",children:[c.jsx("div",{className:"h-8 bg-slate-200 dark:bg-slate-700 rounded w-1/3"}),c.jsx("div",{className:"h-4 bg-slate-200 dark:bg-slate-700 rounded w-1/2"}),c.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[c.jsx("div",{className:"h-24 bg-slate-200 dark:bg-slate-700 rounded-xl"}),c.jsx("div",{className:"h-24 bg-slate-200 dark:bg-slate-700 rounded-xl"}),c.jsx("div",{className:"h-24 bg-slate-200 dark:bg-slate-700 rounded-xl"}),c.jsx("div",{className:"h-24 bg-slate-200 dark:bg-slate-700 rounded-xl"})]})]}):c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:"p-3 bg-blue-600 rounded-xl shadow-lg shadow-blue-500/20",children:c.jsx(Ka,{className:"w-6 h-6 text-white"})}),c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-1",children:e.name}),c.jsxs("div",{className:"flex items-center gap-4 text-sm text-slate-500 dark:text-slate-400",children:[c.jsxs("span",{children:["Created ",li(((n=e.metadata)==null?void 0:n.created_at)||e.created_at)]}),(((a=e.metadata)==null?void 0:a.description)||e.description)&&c.jsxs(c.Fragment,{children:[c.jsx("span",{children:"•"}),c.jsx("span",{children:((i=e.metadata)==null?void 0:i.description)||e.description})]})]})]})]}),c.jsx("div",{className:"flex gap-2"})]})}function c1e(e){return e==null}var u1e=c1e;const Fe=Je(u1e);var lz={exports:{}},st={};/**
|
|
560
|
-
* @license React
|
|
561
|
-
* react-is.production.min.js
|
|
562
|
-
*
|
|
563
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
564
|
-
*
|
|
565
|
-
* This source code is licensed under the MIT license found in the
|
|
566
|
-
* LICENSE file in the root directory of this source tree.
|
|
567
|
-
*/var O2=Symbol.for("react.element"),C2=Symbol.for("react.portal"),zg=Symbol.for("react.fragment"),Fg=Symbol.for("react.strict_mode"),Bg=Symbol.for("react.profiler"),Vg=Symbol.for("react.provider"),Ug=Symbol.for("react.context"),d1e=Symbol.for("react.server_context"),Hg=Symbol.for("react.forward_ref"),Wg=Symbol.for("react.suspense"),qg=Symbol.for("react.suspense_list"),Gg=Symbol.for("react.memo"),Kg=Symbol.for("react.lazy"),f1e=Symbol.for("react.offscreen"),cz;cz=Symbol.for("react.module.reference");function Fn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case O2:switch(e=e.type,e){case zg:case Bg:case Fg:case Wg:case qg:return e;default:switch(e=e&&e.$$typeof,e){case d1e:case Ug:case Hg:case Kg:case Gg:case Vg:return e;default:return t}}case C2:return t}}}st.ContextConsumer=Ug;st.ContextProvider=Vg;st.Element=O2;st.ForwardRef=Hg;st.Fragment=zg;st.Lazy=Kg;st.Memo=Gg;st.Portal=C2;st.Profiler=Bg;st.StrictMode=Fg;st.Suspense=Wg;st.SuspenseList=qg;st.isAsyncMode=function(){return!1};st.isConcurrentMode=function(){return!1};st.isContextConsumer=function(e){return Fn(e)===Ug};st.isContextProvider=function(e){return Fn(e)===Vg};st.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===O2};st.isForwardRef=function(e){return Fn(e)===Hg};st.isFragment=function(e){return Fn(e)===zg};st.isLazy=function(e){return Fn(e)===Kg};st.isMemo=function(e){return Fn(e)===Gg};st.isPortal=function(e){return Fn(e)===C2};st.isProfiler=function(e){return Fn(e)===Bg};st.isStrictMode=function(e){return Fn(e)===Fg};st.isSuspense=function(e){return Fn(e)===Wg};st.isSuspenseList=function(e){return Fn(e)===qg};st.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===zg||e===Bg||e===Fg||e===Wg||e===qg||e===f1e||typeof e=="object"&&e!==null&&(e.$$typeof===Kg||e.$$typeof===Gg||e.$$typeof===Vg||e.$$typeof===Ug||e.$$typeof===Hg||e.$$typeof===cz||e.getModuleId!==void 0)};st.typeOf=Fn;lz.exports=st;var h1e=lz.exports,p1e=bi,m1e=In,g1e="[object Number]";function y1e(e){return typeof e=="number"||m1e(e)&&p1e(e)==g1e}var uz=y1e;const v1e=Je(uz);var x1e=uz;function b1e(e){return x1e(e)&&e!=+e}var w1e=b1e;const nh=Je(w1e);var ra=function(t){return t===0?0:t>0?1:-1},so=function(t){return Co(t)&&t.indexOf("%")===t.length-1},re=function(t){return v1e(t)&&!nh(t)},j1e=function(t){return Fe(t)},nr=function(t){return re(t)||Co(t)},k1e=0,ah=function(t){var r=++k1e;return"".concat(t||"").concat(r)},To=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!re(t)&&!Co(t))return n;var i;if(so(t)){var s=t.indexOf("%");i=r*parseFloat(t.slice(0,s))/100}else i=+t;return nh(i)&&(i=n),a&&i>r&&(i=r),i},qi=function(t){if(!t)return null;var r=Object.keys(t);return r&&r.length?t[r[0]]:null},S1e=function(t){if(!Array.isArray(t))return!1;for(var r=t.length,n={},a=0;a<r;a++)if(!n[t[a]])n[t[a]]=!0;else return!0;return!1},ea=function(t,r){return re(t)&&re(r)?function(n){return t+n*(r-t)}:function(){return r}};function Wm(e,t,r){return!e||!e.length?null:e.find(function(n){return n&&(typeof t=="function"?t(n):Tn(n,t))===r})}var N1e=function(t,r){return re(t)&&re(r)?t-r:Co(t)&&Co(r)?t.localeCompare(r):t instanceof Date&&r instanceof Date?t.getTime()-r.getTime():String(t).localeCompare(String(r))};function Gl(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function _1(e){"@babel/helpers - typeof";return _1=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},_1(e)}var _1e=["viewBox","children"],E1e=["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"],WC=["points","pathLength"],lb={svg:_1e,polygon:WC,polyline:WC},T2=["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"],qm=function(t,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var n=t;if(N.isValidElement(t)&&(n=t.props),!Kc(n))return null;var a={};return Object.keys(n).forEach(function(i){T2.includes(i)&&(a[i]=r||function(s){return n[i](n,s)})}),a},P1e=function(t,r,n){return function(a){return t(r,n,a),null}},Gm=function(t,r,n){if(!Kc(t)||_1(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var s=t[i];T2.includes(i)&&typeof s=="function"&&(a||(a={}),a[i]=P1e(s,r,n))}),a},A1e=["children"],O1e=["children"];function qC(e,t){if(e==null)return{};var r=C1e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function C1e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function E1(e){"@babel/helpers - typeof";return E1=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},E1(e)}var GC={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"},Xa=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},KC=null,cb=null,M2=function e(t){if(t===KC&&Array.isArray(cb))return cb;var r=[];return N.Children.forEach(t,function(n){Fe(n)||(h1e.isFragment(n)?r=r.concat(e(n.props.children)):r.push(n))}),cb=r,KC=t,r};function Mn(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(function(a){return Xa(a)}):n=[Xa(t)],M2(e).forEach(function(a){var i=Tn(a,"type.displayName")||Tn(a,"type.name");n.indexOf(i)!==-1&&r.push(a)}),r}function tn(e,t){var r=Mn(e,t);return r&&r[0]}var YC=function(t){if(!t||!t.props)return!1;var r=t.props,n=r.width,a=r.height;return!(!re(n)||n<=0||!re(a)||a<=0)},T1e=["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"],M1e=function(t){return t&&t.type&&Co(t.type)&&T1e.indexOf(t.type)>=0},$1e=function(t){return t&&E1(t)==="object"&&"clipDot"in t},R1e=function(t,r,n,a){var i,s=(i=lb==null?void 0:lb[a])!==null&&i!==void 0?i:[];return r.startsWith("data-")||!$e(t)&&(a&&s.includes(r)||E1e.includes(r))||n&&T2.includes(r)},qe=function(t,r,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(N.isValidElement(t)&&(a=t.props),!Kc(a))return null;var i={};return Object.keys(a).forEach(function(s){var o;R1e((o=a)===null||o===void 0?void 0:o[s],s,r,n)&&(i[s]=a[s])}),i},P1=function e(t,r){if(t===r)return!0;var n=N.Children.count(t);if(n!==N.Children.count(r))return!1;if(n===0)return!0;if(n===1)return XC(Array.isArray(t)?t[0]:t,Array.isArray(r)?r[0]:r);for(var a=0;a<n;a++){var i=t[a],s=r[a];if(Array.isArray(i)||Array.isArray(s)){if(!e(i,s))return!1}else if(!XC(i,s))return!1}return!0},XC=function(t,r){if(Fe(t)&&Fe(r))return!0;if(!Fe(t)&&!Fe(r)){var n=t.props||{},a=n.children,i=qC(n,A1e),s=r.props||{},o=s.children,l=qC(s,O1e);return a&&o?Gl(i,l)&&P1(a,o):!a&&!o?Gl(i,l):!1}return!1},ZC=function(t,r){var n=[],a={};return M2(t).forEach(function(i,s){if(M1e(i))n.push(i);else if(i){var o=Xa(i.type),l=r[o]||{},u=l.handler,d=l.once;if(u&&(!d||!a[o])){var f=u(i,o,s);n.push(f),a[o]=!0}}}),n},D1e=function(t){var r=t&&t.type;return r&&GC[r]?GC[r]:null},I1e=function(t,r){return M2(r).indexOf(t)},L1e=["children","width","height","viewBox","className","style","title","desc"];function A1(){return A1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},A1.apply(this,arguments)}function z1e(e,t){if(e==null)return{};var r=F1e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function F1e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function O1(e){var t=e.children,r=e.width,n=e.height,a=e.viewBox,i=e.className,s=e.style,o=e.title,l=e.desc,u=z1e(e,L1e),d=a||{width:r,height:n,x:0,y:0},f=Ke("recharts-surface",i);return T.createElement("svg",A1({},qe(u,!0,"svg"),{className:f,width:r,height:n,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),T.createElement("title",null,o),T.createElement("desc",null,l),t)}var B1e=["children","className"];function C1(){return C1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C1.apply(this,arguments)}function V1e(e,t){if(e==null)return{};var r=U1e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function U1e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Bt=T.forwardRef(function(e,t){var r=e.children,n=e.className,a=V1e(e,B1e),i=Ke("recharts-layer",n);return T.createElement("g",C1({className:i},qe(a,!0),{ref:t}),r)}),Za=function(t,r){for(var n=arguments.length,a=new Array(n>2?n-2:0),i=2;i<n;i++)a[i-2]=arguments[i]};function H1e(e,t,r){var n=-1,a=e.length;t<0&&(t=-t>a?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n<a;)i[n]=e[n+t];return i}var W1e=H1e,q1e=W1e;function G1e(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:q1e(e,t,r)}var K1e=G1e;function Y1e(e){return e.split("")}var X1e=Y1e,dz="\\ud800-\\udfff",Z1e="\\u0300-\\u036f",Q1e="\\ufe20-\\ufe2f",J1e="\\u20d0-\\u20ff",eje=Z1e+Q1e+J1e,tje="\\ufe0e\\ufe0f",rje="["+dz+"]",T1="["+eje+"]",M1="\\ud83c[\\udffb-\\udfff]",nje="(?:"+T1+"|"+M1+")",fz="[^"+dz+"]",hz="(?:\\ud83c[\\udde6-\\uddff]){2}",pz="[\\ud800-\\udbff][\\udc00-\\udfff]",aje="\\u200d",mz=nje+"?",gz="["+tje+"]?",ije="(?:"+aje+"(?:"+[fz,hz,pz].join("|")+")"+gz+mz+")*",sje=gz+mz+ije,oje="(?:"+[fz+T1+"?",T1,hz,pz,rje].join("|")+")",lje=RegExp(M1+"(?="+M1+")|"+oje+sje,"g");function cje(e){return e.match(lje)||[]}var uje=cje,dje=X1e,fje=x2,hje=uje;function pje(e){return fje(e)?hje(e):dje(e)}var mje=pje,gje=K1e,yje=x2,vje=mje,xje=y2;function bje(e){return function(t){t=xje(t);var r=yje(t)?vje(t):void 0,n=r?r[0]:t.charAt(0),a=r?gje(r,1).join(""):t.slice(1);return n[e]()+a}}var wje=bje,jje=wje,kje=jje("toUpperCase"),Sje=kje;const Yg=Je(Sje);function ft(e){return function(){return e}}const yz=Math.cos,Km=Math.sin,fa=Math.sqrt,Ym=Math.PI,Xg=2*Ym,$1=Math.PI,R1=2*$1,Gs=1e-6,Nje=R1-Gs;function vz(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function _je(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return vz;const r=10**t;return function(n){this._+=n[0];for(let a=1,i=n.length;a<i;++a)this._+=Math.round(arguments[a]*r)/r+n[a]}}class Eje{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?vz:_je(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,a){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+a}`}bezierCurveTo(t,r,n,a,i,s){this._append`C${+t},${+r},${+n},${+a},${this._x1=+i},${this._y1=+s}`}arcTo(t,r,n,a,i){if(t=+t,r=+r,n=+n,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let s=this._x1,o=this._y1,l=n-t,u=a-r,d=s-t,f=o-r,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(h>Gs)if(!(Math.abs(f*l-u*d)>Gs)||!i)this._append`L${this._x1=t},${this._y1=r}`;else{let p=n-s,m=a-o,g=l*l+u*u,b=p*p+m*m,v=Math.sqrt(g),y=Math.sqrt(h),x=i*Math.tan(($1-Math.acos((g+h-b)/(2*v*y)))/2),j=x/y,w=x/v;Math.abs(j-1)>Gs&&this._append`L${t+j*d},${r+j*f}`,this._append`A${i},${i},0,0,${+(f*p>d*m)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,n,a,i,s){if(t=+t,r=+r,n=+n,s=!!s,n<0)throw new Error(`negative radius: ${n}`);let o=n*Math.cos(a),l=n*Math.sin(a),u=t+o,d=r+l,f=1^s,h=s?a-i:i-a;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>Gs||Math.abs(this._y1-d)>Gs)&&this._append`L${u},${d}`,n&&(h<0&&(h=h%R1+R1),h>Nje?this._append`A${n},${n},0,1,${f},${t-o},${r-l}A${n},${n},0,1,${f},${this._x1=u},${this._y1=d}`:h>Gs&&this._append`A${n},${n},0,${+(h>=$1)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=r+n*Math.sin(i)}`)}rect(t,r,n,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+a}h${-n}Z`}toString(){return this._}}function $2(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new Eje(t)}function R2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xz(e){this._context=e}xz.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 Zg(e){return new xz(e)}function bz(e){return e[0]}function wz(e){return e[1]}function jz(e,t){var r=ft(!0),n=null,a=Zg,i=null,s=$2(o);e=typeof e=="function"?e:e===void 0?bz:ft(e),t=typeof t=="function"?t:t===void 0?wz:ft(t);function o(l){var u,d=(l=R2(l)).length,f,h=!1,p;for(n==null&&(i=a(p=s())),u=0;u<=d;++u)!(u<d&&r(f=l[u],u,l))===h&&((h=!h)?i.lineStart():i.lineEnd()),h&&i.point(+e(f,u,l),+t(f,u,l));if(p)return i=null,p+""||null}return o.x=function(l){return arguments.length?(e=typeof l=="function"?l:ft(+l),o):e},o.y=function(l){return arguments.length?(t=typeof l=="function"?l:ft(+l),o):t},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:ft(!!l),o):r},o.curve=function(l){return arguments.length?(a=l,n!=null&&(i=a(n)),o):a},o.context=function(l){return arguments.length?(l==null?n=i=null:i=a(n=l),o):n},o}function np(e,t,r){var n=null,a=ft(!0),i=null,s=Zg,o=null,l=$2(u);e=typeof e=="function"?e:e===void 0?bz:ft(+e),t=typeof t=="function"?t:ft(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?wz:ft(+r);function u(f){var h,p,m,g=(f=R2(f)).length,b,v=!1,y,x=new Array(g),j=new Array(g);for(i==null&&(o=s(y=l())),h=0;h<=g;++h){if(!(h<g&&a(b=f[h],h,f))===v)if(v=!v)p=h,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),m=h-1;m>=p;--m)o.point(x[m],j[m]);o.lineEnd(),o.areaEnd()}v&&(x[h]=+e(b,h,f),j[h]=+t(b,h,f),o.point(n?+n(b,h,f):x[h],r?+r(b,h,f):j[h]))}if(y)return o=null,y+""||null}function d(){return jz().defined(a).curve(s).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:ft(+f),n=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:ft(+f),u):e},u.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:ft(+f),u):n},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:ft(+f),r=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:ft(+f),u):t},u.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:ft(+f),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(n).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:ft(!!f),u):a},u.curve=function(f){return arguments.length?(s=f,i!=null&&(o=s(i)),u):s},u.context=function(f){return arguments.length?(f==null?i=o=null:o=s(i=f),u):i},u}class kz{constructor(t,r){this._context=t,this._x=r}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,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function Pje(e){return new kz(e,!0)}function Aje(e){return new kz(e,!1)}const D2={draw(e,t){const r=fa(t/Ym);e.moveTo(r,0),e.arc(0,0,r,0,Xg)}},Oje={draw(e,t){const r=fa(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},Sz=fa(1/3),Cje=Sz*2,Tje={draw(e,t){const r=fa(t/Cje),n=r*Sz;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Mje={draw(e,t){const r=fa(t),n=-r/2;e.rect(n,n,r,r)}},$je=.8908130915292852,Nz=Km(Ym/10)/Km(7*Ym/10),Rje=Km(Xg/10)*Nz,Dje=-yz(Xg/10)*Nz,Ije={draw(e,t){const r=fa(t*$je),n=Rje*r,a=Dje*r;e.moveTo(0,-r),e.lineTo(n,a);for(let i=1;i<5;++i){const s=Xg*i/5,o=yz(s),l=Km(s);e.lineTo(l*r,-o*r),e.lineTo(o*n-l*a,l*n+o*a)}e.closePath()}},ub=fa(3),Lje={draw(e,t){const r=-fa(t/(ub*3));e.moveTo(0,r*2),e.lineTo(-ub*r,-r),e.lineTo(ub*r,-r),e.closePath()}},yn=-.5,vn=fa(3)/2,D1=1/fa(12),zje=(D1/2+1)*3,Fje={draw(e,t){const r=fa(t/zje),n=r/2,a=r*D1,i=n,s=r*D1+r,o=-i,l=s;e.moveTo(n,a),e.lineTo(i,s),e.lineTo(o,l),e.lineTo(yn*n-vn*a,vn*n+yn*a),e.lineTo(yn*i-vn*s,vn*i+yn*s),e.lineTo(yn*o-vn*l,vn*o+yn*l),e.lineTo(yn*n+vn*a,yn*a-vn*n),e.lineTo(yn*i+vn*s,yn*s-vn*i),e.lineTo(yn*o+vn*l,yn*l-vn*o),e.closePath()}};function Bje(e,t){let r=null,n=$2(a);e=typeof e=="function"?e:ft(e||D2),t=typeof t=="function"?t:ft(t===void 0?64:+t);function a(){let i;if(r||(r=i=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:ft(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:ft(+i),a):t},a.context=function(i){return arguments.length?(r=i??null,a):r},a}function Xm(){}function Zm(e,t,r){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+r)/6)}function _z(e){this._context=e}_z.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:Zm(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:Zm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Vje(e){return new _z(e)}function Ez(e){this._context=e}Ez.prototype={areaStart:Xm,areaEnd:Xm,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:Zm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Uje(e){return new Ez(e)}function Pz(e){this._context=e}Pz.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 r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Zm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Hje(e){return new Pz(e)}function Az(e){this._context=e}Az.prototype={areaStart:Xm,areaEnd:Xm,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 Wje(e){return new Az(e)}function QC(e){return e<0?-1:1}function JC(e,t,r){var n=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(n||a<0&&-0),s=(r-e._y1)/(a||n<0&&-0),o=(i*a+s*n)/(n+a);return(QC(i)+QC(s))*Math.min(Math.abs(i),Math.abs(s),.5*Math.abs(o))||0}function eT(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function db(e,t,r){var n=e._x0,a=e._y0,i=e._x1,s=e._y1,o=(i-n)/3;e._context.bezierCurveTo(n+o,a+o*t,i-o,s-o*r,i,s)}function Qm(e){this._context=e}Qm.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:db(this,this._t0,eT(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 r=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,db(this,eT(this,r=JC(this,e,t)),r);break;default:db(this,this._t0,r=JC(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Oz(e){this._context=new Cz(e)}(Oz.prototype=Object.create(Qm.prototype)).point=function(e,t){Qm.prototype.point.call(this,t,e)};function Cz(e){this._context=e}Cz.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,r,n,a,i){this._context.bezierCurveTo(t,e,n,r,i,a)}};function qje(e){return new Qm(e)}function Gje(e){return new Oz(e)}function Tz(e){this._context=e}Tz.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=tT(e),a=tT(t),i=0,s=1;s<r;++i,++s)this._context.bezierCurveTo(n[0][i],a[0][i],n[1][i],a[1][i],e[s],t[s]);(this._line||this._line!==0&&r===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 tT(e){var t,r=e.length-1,n,a=new Array(r),i=new Array(r),s=new Array(r);for(a[0]=0,i[0]=2,s[0]=e[0]+2*e[1],t=1;t<r-1;++t)a[t]=1,i[t]=4,s[t]=4*e[t]+2*e[t+1];for(a[r-1]=2,i[r-1]=7,s[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=a[t]/i[t-1],i[t]-=n,s[t]-=n*s[t-1];for(a[r-1]=s[r-1]/i[r-1],t=r-2;t>=0;--t)a[t]=(s[t]-a[t+1])/i[t];for(i[r-1]=(e[r]+a[r-1])/2,t=0;t<r-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Kje(e){return new Tz(e)}function Qg(e,t){this._context=e,this._t=t}Qg.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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Yje(e){return new Qg(e,.5)}function Xje(e){return new Qg(e,0)}function Zje(e){return new Qg(e,1)}function hc(e,t){if((s=e.length)>1)for(var r=1,n,a,i=e[t[0]],s,o=i.length;r<s;++r)for(a=i,i=e[t[r]],n=0;n<o;++n)i[n][1]+=i[n][0]=isNaN(a[n][1])?a[n][0]:a[n][1]}function I1(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Qje(e,t){return e[t]}function Jje(e){const t=[];return t.key=e,t}function eke(){var e=ft([]),t=I1,r=hc,n=Qje;function a(i){var s=Array.from(e.apply(this,arguments),Jje),o,l=s.length,u=-1,d;for(const f of i)for(o=0,++u;o<l;++o)(s[o][u]=[0,+n(f,s[o].key,u,i)]).data=f;for(o=0,d=R2(t(s));o<l;++o)s[d[o]].index=o;return r(s,d),s}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:ft(Array.from(i)),a):e},a.value=function(i){return arguments.length?(n=typeof i=="function"?i:ft(+i),a):n},a.order=function(i){return arguments.length?(t=i==null?I1:typeof i=="function"?i:ft(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(r=i??hc,a):r},a}function tke(e,t){if((n=e.length)>0){for(var r,n,a=0,i=e[0].length,s;a<i;++a){for(s=r=0;r<n;++r)s+=e[r][a][1]||0;if(s)for(r=0;r<n;++r)e[r][a][1]/=s}hc(e,t)}}function rke(e,t){if((a=e.length)>0){for(var r=0,n=e[t[0]],a,i=n.length;r<i;++r){for(var s=0,o=0;s<a;++s)o+=e[s][r][1]||0;n[r][1]+=n[r][0]=-o/2}hc(e,t)}}function nke(e,t){if(!(!((s=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var r=0,n=1,a,i,s;n<i;++n){for(var o=0,l=0,u=0;o<s;++o){for(var d=e[t[o]],f=d[n][1]||0,h=d[n-1][1]||0,p=(f-h)/2,m=0;m<o;++m){var g=e[t[m]],b=g[n][1]||0,v=g[n-1][1]||0;p+=b-v}l+=f,u+=p*f}a[n-1][1]+=a[n-1][0]=r,l&&(r-=u/l)}a[n-1][1]+=a[n-1][0]=r,hc(e,t)}}function sf(e){"@babel/helpers - typeof";return sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sf(e)}var ake=["type","size","sizeType"];function L1(){return L1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L1.apply(this,arguments)}function rT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function nT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rT(Object(r),!0).forEach(function(n){ike(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ike(e,t,r){return t=ske(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ske(e){var t=oke(e,"string");return sf(t)=="symbol"?t:t+""}function oke(e,t){if(sf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(sf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lke(e,t){if(e==null)return{};var r=cke(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cke(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Mz={symbolCircle:D2,symbolCross:Oje,symbolDiamond:Tje,symbolSquare:Mje,symbolStar:Ije,symbolTriangle:Lje,symbolWye:Fje},uke=Math.PI/180,dke=function(t){var r="symbol".concat(Yg(t));return Mz[r]||D2},fke=function(t,r,n){if(r==="area")return t;switch(n){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*uke;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),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}},hke=function(t,r){Mz["symbol".concat(Yg(t))]=r},I2=function(t){var r=t.type,n=r===void 0?"circle":r,a=t.size,i=a===void 0?64:a,s=t.sizeType,o=s===void 0?"area":s,l=lke(t,ake),u=nT(nT({},l),{},{type:n,size:i,sizeType:o}),d=function(){var b=dke(n),v=Bje().type(b).size(fke(i,o,n));return v()},f=u.className,h=u.cx,p=u.cy,m=qe(u,!0);return h===+h&&p===+p&&i===+i?T.createElement("path",L1({},m,{className:Ke("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};I2.registerSymbol=hke;function pc(e){"@babel/helpers - typeof";return pc=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},pc(e)}function z1(){return z1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},z1.apply(this,arguments)}function aT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function pke(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aT(Object(r),!0).forEach(function(n){of(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gke(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Rz(n.key),n)}}function yke(e,t,r){return t&&gke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vke(e,t,r){return t=Jm(t),xke(e,$z()?Reflect.construct(t,r||[],Jm(e).constructor):t.apply(e,r))}function xke(e,t){if(t&&(pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bke(e)}function bke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($z=function(){return!!e})()}function Jm(e){return Jm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Jm(e)}function wke(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&&F1(e,t)}function F1(e,t){return F1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},F1(e,t)}function of(e,t,r){return t=Rz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Rz(e){var t=jke(e,"string");return pc(t)=="symbol"?t:t+""}function jke(e,t){if(pc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(pc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xn=32,L2=function(e){function t(){return mke(this,t),vke(this,t,arguments)}return wke(t,e),yke(t,[{key:"renderIcon",value:function(n){var a=this.props.inactiveColor,i=xn/2,s=xn/6,o=xn/3,l=n.inactive?a:n.color;if(n.type==="plainline")return T.createElement("line",{strokeWidth:4,fill:"none",stroke:l,strokeDasharray:n.payload.strokeDasharray,x1:0,y1:i,x2:xn,y2:i,className:"recharts-legend-icon"});if(n.type==="line")return T.createElement("path",{strokeWidth:4,fill:"none",stroke:l,d:"M0,".concat(i,"h").concat(o,`
|
|
568
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(2*o,",").concat(i,`
|
|
569
|
-
H`).concat(xn,"M").concat(2*o,",").concat(i,`
|
|
570
|
-
A`).concat(s,",").concat(s,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(n.type==="rect")return T.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(xn/8,"h").concat(xn,"v").concat(xn*3/4,"h").concat(-xn,"z"),className:"recharts-legend-icon"});if(T.isValidElement(n.legendIcon)){var u=pke({},n);return delete u.legendIcon,T.cloneElement(n.legendIcon,u)}return T.createElement(I2,{fill:l,cx:i,cy:i,size:xn,sizeType:"diameter",type:n.type})}},{key:"renderItems",value:function(){var n=this,a=this.props,i=a.payload,s=a.iconSize,o=a.layout,l=a.formatter,u=a.inactiveColor,d={x:0,y:0,width:xn,height:xn},f={display:o==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,m){var g=p.formatter||l,b=Ke(of(of({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var v=$e(p.value)?null:p.value;Za(!$e(p.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 y=p.inactive?u:p.color;return T.createElement("li",z1({className:b,style:f,key:"legend-item-".concat(m)},Gm(n.props,p,m)),T.createElement(O1,{width:s,height:s,viewBox:d,style:h},n.renderIcon(p)),T.createElement("span",{className:"recharts-legend-item-text",style:{color:y}},g?g(v,p,m):v))})}},{key:"render",value:function(){var n=this.props,a=n.payload,i=n.layout,s=n.align;if(!a||!a.length)return null;var o={padding:0,margin:0,textAlign:i==="horizontal"?s:"left"};return T.createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}])}(N.PureComponent);of(L2,"displayName","Legend");of(L2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var kke=Ln,Ske=t6;function Nke(e,t){return e&&e.length?Ske(e,kke(t)):[]}var _ke=Nke;const iT=Je(_ke);function Dz(e,t,r){return t===!0?iT(e,r):$e(t)?iT(e,t):e}function mc(e){"@babel/helpers - typeof";return mc=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},mc(e)}var Eke=["ref"];function sT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Ra(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sT(Object(r),!0).forEach(function(n){Jg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Lz(n.key),n)}}function Ake(e,t,r){return t&&oT(e.prototype,t),r&&oT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oke(e,t,r){return t=e0(t),Cke(e,Iz()?Reflect.construct(t,r||[],e0(e).constructor):t.apply(e,r))}function Cke(e,t){if(t&&(mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Tke(e)}function Tke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Iz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Iz=function(){return!!e})()}function e0(e){return e0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},e0(e)}function Mke(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&&B1(e,t)}function B1(e,t){return B1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},B1(e,t)}function Jg(e,t,r){return t=Lz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lz(e){var t=$ke(e,"string");return mc(t)=="symbol"?t:t+""}function $ke(e,t){if(mc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(mc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Rke(e,t){if(e==null)return{};var r=Dke(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Dke(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Ike(e){return e.value}function Lke(e,t){if(T.isValidElement(e))return T.cloneElement(e,t);if(typeof e=="function")return T.createElement(e,t);t.ref;var r=Rke(t,Eke);return T.createElement(L2,r)}var lT=1,go=function(e){function t(){var r;Pke(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=Oke(this,t,[].concat(a)),Jg(r,"lastBoundingBox",{width:-1,height:-1}),r}return Mke(t,e),Ake(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();return n.height=this.wrapperNode.offsetHeight,n.width=this.wrapperNode.offsetWidth,n}return null}},{key:"updateBBox",value:function(){var n=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>lT||Math.abs(a.height-this.lastBoundingBox.height)>lT)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,n&&n(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,n&&n(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ra({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(n){var a=this.props,i=a.layout,s=a.align,o=a.verticalAlign,l=a.margin,u=a.chartWidth,d=a.chartHeight,f,h;if(!n||(n.left===void 0||n.left===null)&&(n.right===void 0||n.right===null))if(s==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();f={left:((u||0)-p.width)/2}}else f=s==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!n||(n.top===void 0||n.top===null)&&(n.bottom===void 0||n.bottom===null))if(o==="middle"){var m=this.getBBoxSnapshot();h={top:((d||0)-m.height)/2}}else h=o==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return Ra(Ra({},f),h)}},{key:"render",value:function(){var n=this,a=this.props,i=a.content,s=a.width,o=a.height,l=a.wrapperStyle,u=a.payloadUniqBy,d=a.payload,f=Ra(Ra({position:"absolute",width:s||"auto",height:o||"auto"},this.getDefaultPosition(l)),l);return T.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){n.wrapperNode=p}},Lke(i,Ra(Ra({},this.props),{},{payload:Dz(d,u,Ike)})))}}],[{key:"getWithHeight",value:function(n,a){var i=Ra(Ra({},this.defaultProps),n.props),s=i.layout;return s==="vertical"&&re(n.props.height)?{height:n.props.height}:s==="horizontal"?{width:n.props.width||a}:null}}])}(N.PureComponent);Jg(go,"displayName","Legend");Jg(go,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});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 V1(){return V1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},V1.apply(this,arguments)}function zke(e,t){return Uke(e)||Vke(e,t)||Bke(e,t)||Fke()}function Fke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
571
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bke(e,t){if(e){if(typeof e=="string")return cT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return cT(e,t)}}function cT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vke(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function Uke(e){if(Array.isArray(e))return e}function uT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(r),!0).forEach(function(n){Hke(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hke(e,t,r){return t=Wke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wke(e){var t=qke(e,"string");return lf(t)=="symbol"?t:t+""}function qke(e,t){if(lf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(lf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gke(e){return Array.isArray(e)&&nr(e[0])&&nr(e[1])?e.join(" ~ "):e}var Kke=function(t){var r=t.separator,n=r===void 0?" : ":r,a=t.contentStyle,i=a===void 0?{}:a,s=t.itemStyle,o=s===void 0?{}:s,l=t.labelStyle,u=l===void 0?{}:l,d=t.payload,f=t.formatter,h=t.itemSorter,p=t.wrapperClassName,m=t.labelClassName,g=t.label,b=t.labelFormatter,v=t.accessibilityLayer,y=v===void 0?!1:v,x=function(){if(d&&d.length){var M={padding:0,margin:0},O=(h?j2(d,h):d).map(function(P,D){if(P.type==="none")return null;var I=fb({display:"block",paddingTop:4,paddingBottom:4,color:P.color||"#000"},o),L=P.formatter||f||Gke,R=P.value,$=P.name,z=R,U=$;if(L&&z!=null&&U!=null){var V=L(R,$,P,D,d);if(Array.isArray(V)){var F=zke(V,2);z=F[0],U=F[1]}else z=V}return T.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:I},nr(U)?T.createElement("span",{className:"recharts-tooltip-item-name"},U):null,nr(U)?T.createElement("span",{className:"recharts-tooltip-item-separator"},n):null,T.createElement("span",{className:"recharts-tooltip-item-value"},z),T.createElement("span",{className:"recharts-tooltip-item-unit"},P.unit||""))});return T.createElement("ul",{className:"recharts-tooltip-item-list",style:M},O)}return null},j=fb({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),w=fb({margin:0},u),S=!Fe(g),k=S?g:"",_=Ke("recharts-default-tooltip",p),E=Ke("recharts-tooltip-label",m);S&&b&&d!==void 0&&d!==null&&(k=b(g,d));var A=y?{role:"status","aria-live":"assertive"}:{};return T.createElement("div",V1({className:_,style:j},A),T.createElement("p",{className:E,style:w},T.isValidElement(k)?k:"".concat(k)),x())};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 ap(e,t,r){return t=Yke(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Yke(e){var t=Xke(e,"string");return cf(t)=="symbol"?t:t+""}function Xke(e,t){if(cf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(cf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tu="recharts-tooltip-wrapper",Zke={visibility:"hidden"};function Qke(e){var t=e.coordinate,r=e.translateX,n=e.translateY;return Ke(Tu,ap(ap(ap(ap({},"".concat(Tu,"-right"),re(r)&&t&&re(t.x)&&r>=t.x),"".concat(Tu,"-left"),re(r)&&t&&re(t.x)&&r<t.x),"".concat(Tu,"-bottom"),re(n)&&t&&re(t.y)&&n>=t.y),"".concat(Tu,"-top"),re(n)&&t&&re(t.y)&&n<t.y))}function dT(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.key,a=e.offsetTopLeft,i=e.position,s=e.reverseDirection,o=e.tooltipDimension,l=e.viewBox,u=e.viewBoxDimension;if(i&&re(i[n]))return i[n];var d=r[n]-o-a,f=r[n]+a;if(t[n])return s[n]?d:f;if(s[n]){var h=d,p=l[n];return h<p?Math.max(f,l[n]):Math.max(d,l[n])}var m=f+o,g=l[n]+u;return m>g?Math.max(d,l[n]):Math.max(f,l[n])}function Jke(e){var t=e.translateX,r=e.translateY,n=e.useTranslate3d;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function eSe(e){var t=e.allowEscapeViewBox,r=e.coordinate,n=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipBox,o=e.useTranslate3d,l=e.viewBox,u,d,f;return s.height>0&&s.width>0&&r?(d=dT({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:l,viewBoxDimension:l.width}),f=dT({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:l,viewBoxDimension:l.height}),u=Jke({translateX:d,translateY:f,useTranslate3d:o})):u=Zke,{cssProperties:u,cssClasses:Qke({translateX:d,translateY:f,coordinate:r})}}function gc(e){"@babel/helpers - typeof";return gc=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},gc(e)}function fT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fT(Object(r),!0).forEach(function(n){H1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rSe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Fz(n.key),n)}}function nSe(e,t,r){return t&&rSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function aSe(e,t,r){return t=t0(t),iSe(e,zz()?Reflect.construct(t,r||[],t0(e).constructor):t.apply(e,r))}function iSe(e,t){if(t&&(gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sSe(e)}function sSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zz=function(){return!!e})()}function t0(e){return t0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},t0(e)}function oSe(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&&U1(e,t)}function U1(e,t){return U1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},U1(e,t)}function H1(e,t,r){return t=Fz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fz(e){var t=lSe(e,"string");return gc(t)=="symbol"?t:t+""}function lSe(e,t){if(gc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(gc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pT=1,cSe=function(e){function t(){var r;tSe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=aSe(this,t,[].concat(a)),H1(r,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),H1(r,"handleKeyDown",function(s){if(s.key==="Escape"){var o,l,u,d;r.setState({dismissed:!0,dismissedAtCoordinate:{x:(o=(l=r.props.coordinate)===null||l===void 0?void 0:l.x)!==null&&o!==void 0?o:0,y:(u=(d=r.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&u!==void 0?u:0}})}}),r}return oSe(t,e),nSe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var n=this.wrapperNode.getBoundingClientRect();(Math.abs(n.width-this.state.lastBoundingBox.width)>pT||Math.abs(n.height-this.state.lastBoundingBox.height)>pT)&&this.setState({lastBoundingBox:{width:n.width,height:n.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 n,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,l=a.animationEasing,u=a.children,d=a.coordinate,f=a.hasPayload,h=a.isAnimationActive,p=a.offset,m=a.position,g=a.reverseDirection,b=a.useTranslate3d,v=a.viewBox,y=a.wrapperStyle,x=eSe({allowEscapeViewBox:s,coordinate:d,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:v}),j=x.cssClasses,w=x.cssProperties,S=hT(hT({transition:h&&i?"transform ".concat(o,"ms ").concat(l):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},y);return T.createElement("div",{tabIndex:-1,className:j,style:S,ref:function(_){n.wrapperNode=_}},u)}}])}(N.PureComponent),uSe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},iu={isSsr:uSe()};function yc(e){"@babel/helpers - typeof";return yc=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},yc(e)}function mT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function gT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mT(Object(r),!0).forEach(function(n){z2(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fSe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vz(n.key),n)}}function hSe(e,t,r){return t&&fSe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function pSe(e,t,r){return t=r0(t),mSe(e,Bz()?Reflect.construct(t,r||[],r0(e).constructor):t.apply(e,r))}function mSe(e,t){if(t&&(yc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gSe(e)}function gSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Bz=function(){return!!e})()}function r0(e){return r0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},r0(e)}function ySe(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&&W1(e,t)}function W1(e,t){return W1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},W1(e,t)}function z2(e,t,r){return t=Vz(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vz(e){var t=vSe(e,"string");return yc(t)=="symbol"?t:t+""}function vSe(e,t){if(yc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function xSe(e){return e.dataKey}function bSe(e,t){return T.isValidElement(e)?T.cloneElement(e,t):typeof e=="function"?T.createElement(e,t):T.createElement(Kke,t)}var ma=function(e){function t(){return dSe(this,t),pSe(this,t,arguments)}return ySe(t,e),hSe(t,[{key:"render",value:function(){var n=this,a=this.props,i=a.active,s=a.allowEscapeViewBox,o=a.animationDuration,l=a.animationEasing,u=a.content,d=a.coordinate,f=a.filterNull,h=a.isAnimationActive,p=a.offset,m=a.payload,g=a.payloadUniqBy,b=a.position,v=a.reverseDirection,y=a.useTranslate3d,x=a.viewBox,j=a.wrapperStyle,w=m??[];f&&w.length&&(w=Dz(m.filter(function(k){return k.value!=null&&(k.hide!==!0||n.props.includeHidden)}),g,xSe));var S=w.length>0;return T.createElement(cSe,{allowEscapeViewBox:s,animationDuration:o,animationEasing:l,isAnimationActive:h,active:i,coordinate:d,hasPayload:S,offset:p,position:b,reverseDirection:v,useTranslate3d:y,viewBox:x,wrapperStyle:j},bSe(u,gT(gT({},this.props),{},{payload:w})))}}])}(N.PureComponent);z2(ma,"displayName","Tooltip");z2(ma,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!iu.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 wSe=Br,hb=j6,yT=c6,jSe="Expected a function",kSe=Math.max,SSe=Math.min;function NSe(e,t,r){var n,a,i,s,o,l,u=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(jSe);t=yT(t)||0,wSe(r)&&(d=!!r.leading,f="maxWait"in r,i=f?kSe(yT(r.maxWait)||0,t):i,h="trailing"in r?!!r.trailing:h);function p(S){var k=n,_=a;return n=a=void 0,u=S,s=e.apply(_,k),s}function m(S){return u=S,o=setTimeout(v,t),d?p(S):s}function g(S){var k=S-l,_=S-u,E=t-k;return f?SSe(E,i-_):E}function b(S){var k=S-l,_=S-u;return l===void 0||k>=t||k<0||f&&_>=i}function v(){var S=hb();if(b(S))return y(S);o=setTimeout(v,g(S))}function y(S){return o=void 0,h&&n?p(S):(n=a=void 0,s)}function x(){o!==void 0&&clearTimeout(o),u=0,n=l=a=o=void 0}function j(){return o===void 0?s:y(hb())}function w(){var S=hb(),k=b(S);if(n=arguments,a=this,l=S,k){if(o===void 0)return m(l);if(f)return clearTimeout(o),o=setTimeout(v,t),p(l)}return o===void 0&&(o=setTimeout(v,t)),s}return w.cancel=x,w.flush=j,w}var _Se=NSe,ESe=_Se,PSe=Br,ASe="Expected a function";function OSe(e,t,r){var n=!0,a=!0;if(typeof e!="function")throw new TypeError(ASe);return PSe(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),ESe(e,t,{leading:n,maxWait:t,trailing:a})}var CSe=OSe;const Uz=Je(CSe);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 vT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function ip(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vT(Object(r),!0).forEach(function(n){TSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TSe(e,t,r){return t=MSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MSe(e){var t=$Se(e,"string");return uf(t)=="symbol"?t:t+""}function $Se(e,t){if(uf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(uf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RSe(e,t){return zSe(e)||LSe(e,t)||ISe(e,t)||DSe()}function DSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
572
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ISe(e,t){if(e){if(typeof e=="string")return xT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return xT(e,t)}}function xT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function LSe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function zSe(e){if(Array.isArray(e))return e}var FSe=N.forwardRef(function(e,t){var r=e.aspect,n=e.initialDimension,a=n===void 0?{width:-1,height:-1}:n,i=e.width,s=i===void 0?"100%":i,o=e.height,l=o===void 0?"100%":o,u=e.minWidth,d=u===void 0?0:u,f=e.minHeight,h=e.maxHeight,p=e.children,m=e.debounce,g=m===void 0?0:m,b=e.id,v=e.className,y=e.onResize,x=e.style,j=x===void 0?{}:x,w=N.useRef(null),S=N.useRef();S.current=y,N.useImperativeHandle(t,function(){return Object.defineProperty(w.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),w.current},configurable:!0})});var k=N.useState({containerWidth:a.width,containerHeight:a.height}),_=RSe(k,2),E=_[0],A=_[1],C=N.useCallback(function(O,P){A(function(D){var I=Math.round(O),L=Math.round(P);return D.containerWidth===I&&D.containerHeight===L?D:{containerWidth:I,containerHeight:L}})},[]);N.useEffect(function(){var O=function($){var z,U=$[0].contentRect,V=U.width,F=U.height;C(V,F),(z=S.current)===null||z===void 0||z.call(S,V,F)};g>0&&(O=Uz(O,g,{trailing:!0,leading:!1}));var P=new ResizeObserver(O),D=w.current.getBoundingClientRect(),I=D.width,L=D.height;return C(I,L),P.observe(w.current),function(){P.disconnect()}},[C,g]);var M=N.useMemo(function(){var O=E.containerWidth,P=E.containerHeight;if(O<0||P<0)return null;Za(so(s)||so(l),`The width(%s) and height(%s) are both fixed numbers,
|
|
573
|
-
maybe you don't need to use a ResponsiveContainer.`,s,l),Za(!r||r>0,"The aspect(%s) must be greater than zero.",r);var D=so(s)?O:s,I=so(l)?P:l;r&&r>0&&(D?I=D/r:I&&(D=I*r),h&&I>h&&(I=h)),Za(D>0||I>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
574
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
575
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
576
|
-
height and width.`,D,I,s,l,d,f,r);var L=!Array.isArray(p)&&Xa(p.type).endsWith("Chart");return T.Children.map(p,function(R){return T.isValidElement(R)?N.cloneElement(R,ip({width:D,height:I},L?{style:ip({height:"100%",width:"100%",maxHeight:I,maxWidth:D},R.props.style)}:{})):R})},[r,p,l,h,f,d,E,s]);return T.createElement("div",{id:b?"".concat(b):void 0,className:Ke("recharts-responsive-container",v),style:ip(ip({},j),{},{width:s,height:l,minWidth:d,minHeight:f,maxHeight:h}),ref:w},M)}),Hz=function(t){return null};Hz.displayName="Cell";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 bT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function q1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bT(Object(r),!0).forEach(function(n){BSe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BSe(e,t,r){return t=VSe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VSe(e){var t=USe(e,"string");return df(t)=="symbol"?t:t+""}function USe(e,t){if(df(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(df(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sl={widthCache:{},cacheCount:0},HSe=2e3,WSe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},wT="recharts_measurement_span";function qSe(e){var t=q1({},e);return Object.keys(t).forEach(function(r){t[r]||delete t[r]}),t}var yd=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||iu.isSsr)return{width:0,height:0};var n=qSe(r),a=JSON.stringify({text:t,copyStyle:n});if(sl.widthCache[a])return sl.widthCache[a];try{var i=document.getElementById(wT);i||(i=document.createElement("span"),i.setAttribute("id",wT),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var s=q1(q1({},WSe),n);Object.assign(i.style,s),i.textContent="".concat(t);var o=i.getBoundingClientRect(),l={width:o.width,height:o.height};return sl.widthCache[a]=l,++sl.cacheCount>HSe&&(sl.cacheCount=0,sl.widthCache={}),l}catch{return{width:0,height:0}}},GSe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function ff(e){"@babel/helpers - typeof";return ff=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ff(e)}function n0(e,t){return ZSe(e)||XSe(e,t)||YSe(e,t)||KSe()}function KSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
577
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function YSe(e,t){if(e){if(typeof e=="string")return jT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jT(e,t)}}function jT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function XSe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function ZSe(e){if(Array.isArray(e))return e}function QSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kT(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,e2e(n.key),n)}}function JSe(e,t,r){return t&&kT(e.prototype,t),r&&kT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function e2e(e){var t=t2e(e,"string");return ff(t)=="symbol"?t:t+""}function t2e(e,t){if(ff(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(ff(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ST=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,NT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,r2e=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,n2e=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Wz={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},a2e=Object.keys(Wz),Ol="NaN";function i2e(e,t){return e*Wz[t]}var sp=function(){function e(t,r){QSe(this,e),this.num=t,this.unit=r,this.num=t,this.unit=r,Number.isNaN(t)&&(this.unit=""),r!==""&&!r2e.test(r)&&(this.num=NaN,this.unit=""),a2e.includes(r)&&(this.num=i2e(t,r),this.unit="px")}return JSe(e,[{key:"add",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num+r.num,this.unit)}},{key:"subtract",value:function(r){return this.unit!==r.unit?new e(NaN,""):new e(this.num-r.num,this.unit)}},{key:"multiply",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num*r.num,this.unit||r.unit)}},{key:"divide",value:function(r){return this.unit!==""&&r.unit!==""&&this.unit!==r.unit?new e(NaN,""):new e(this.num/r.num,this.unit||r.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(r){var n,a=(n=n2e.exec(r))!==null&&n!==void 0?n:[],i=n0(a,3),s=i[1],o=i[2];return new e(parseFloat(s),o??"")}}])}();function qz(e){if(e.includes(Ol))return Ol;for(var t=e;t.includes("*")||t.includes("/");){var r,n=(r=ST.exec(t))!==null&&r!==void 0?r:[],a=n0(n,4),i=a[1],s=a[2],o=a[3],l=sp.parse(i??""),u=sp.parse(o??""),d=s==="*"?l.multiply(u):l.divide(u);if(d.isNaN())return Ol;t=t.replace(ST,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,h=(f=NT.exec(t))!==null&&f!==void 0?f:[],p=n0(h,4),m=p[1],g=p[2],b=p[3],v=sp.parse(m??""),y=sp.parse(b??""),x=g==="+"?v.add(y):v.subtract(y);if(x.isNaN())return Ol;t=t.replace(NT,x.toString())}return t}var _T=/\(([^()]*)\)/;function s2e(e){for(var t=e;t.includes("(");){var r=_T.exec(t),n=n0(r,2),a=n[1];t=t.replace(_T,qz(a))}return t}function o2e(e){var t=e.replace(/\s+/g,"");return t=s2e(t),t=qz(t),t}function l2e(e){try{return o2e(e)}catch{return Ol}}function pb(e){var t=l2e(e.slice(5,-1));return t===Ol?"":t}var c2e=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],u2e=["dx","dy","angle","className","breakAll"];function G1(){return G1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},G1.apply(this,arguments)}function ET(e,t){if(e==null)return{};var r=d2e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function d2e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function PT(e,t){return m2e(e)||p2e(e,t)||h2e(e,t)||f2e()}function f2e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
578
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function h2e(e,t){if(e){if(typeof e=="string")return AT(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return AT(e,t)}}function AT(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function p2e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function m2e(e){if(Array.isArray(e))return e}var Gz=/[ \f\n\r\t\v\u2028\u2029]+/,Kz=function(t){var r=t.children,n=t.breakAll,a=t.style;try{var i=[];Fe(r)||(n?i=r.toString().split(""):i=r.toString().split(Gz));var s=i.map(function(l){return{word:l,width:yd(l,a).width}}),o=n?0:yd(" ",a).width;return{wordsWithComputedWidth:s,spaceWidth:o}}catch{return null}},g2e=function(t,r,n,a,i){var s=t.maxLines,o=t.children,l=t.style,u=t.breakAll,d=re(s),f=o,h=function(){var D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return D.reduce(function(I,L){var R=L.word,$=L.width,z=I[I.length-1];if(z&&(a==null||i||z.width+$+n<Number(a)))z.words.push(R),z.width+=$+n;else{var U={words:[R],width:$};I.push(U)}return I},[])},p=h(r),m=function(D){return D.reduce(function(I,L){return I.width>L.width?I:L})};if(!d)return p;for(var g="…",b=function(D){var I=f.slice(0,D),L=Kz({breakAll:u,style:l,children:I+g}).wordsWithComputedWidth,R=h(L),$=R.length>s||m(R).width>Number(a);return[$,R]},v=0,y=f.length-1,x=0,j;v<=y&&x<=f.length-1;){var w=Math.floor((v+y)/2),S=w-1,k=b(S),_=PT(k,2),E=_[0],A=_[1],C=b(w),M=PT(C,1),O=M[0];if(!E&&!O&&(v=w+1),E&&O&&(y=w-1),!E&&O){j=A;break}x++}return j||p},OT=function(t){var r=Fe(t)?[]:t.toString().split(Gz);return[{words:r}]},y2e=function(t){var r=t.width,n=t.scaleToFit,a=t.children,i=t.style,s=t.breakAll,o=t.maxLines;if((r||n)&&!iu.isSsr){var l,u,d=Kz({breakAll:s,children:a,style:i});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;l=f,u=h}else return OT(a);return g2e({breakAll:s,children:a,maxLines:o,style:i},l,u,r,n)}return OT(a)},CT="#808080",a0=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.lineHeight,o=s===void 0?"1em":s,l=t.capHeight,u=l===void 0?"0.71em":l,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,g=m===void 0?"end":m,b=t.fill,v=b===void 0?CT:b,y=ET(t,c2e),x=N.useMemo(function(){return y2e({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),j=y.dx,w=y.dy,S=y.angle,k=y.className,_=y.breakAll,E=ET(y,u2e);if(!nr(n)||!nr(i))return null;var A=n+(re(j)?j:0),C=i+(re(w)?w:0),M;switch(g){case"start":M=pb("calc(".concat(u,")"));break;case"middle":M=pb("calc(".concat((x.length-1)/2," * -").concat(o," + (").concat(u," / 2))"));break;default:M=pb("calc(".concat(x.length-1," * -").concat(o,")"));break}var O=[];if(f){var P=x[0].width,D=y.width;O.push("scale(".concat((re(D)?D/P:1)/P,")"))}return S&&O.push("rotate(".concat(S,", ").concat(A,", ").concat(C,")")),O.length&&(E.transform=O.join(" ")),T.createElement("text",G1({},qe(E,!0),{x:A,y:C,className:Ke("recharts-text",k),textAnchor:p,fill:v.includes("url")?CT:v}),x.map(function(I,L){var R=I.words.join(_?"":" ");return T.createElement("tspan",{x:A,dy:L===0?M:o,key:"".concat(R,"-").concat(L)},R)}))};function us(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function v2e(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function F2(e){let t,r,n;e.length!==2?(t=us,r=(o,l)=>us(e(o),l),n=(o,l)=>e(o)-l):(t=e===us||e===v2e?e:x2e,r=e,n=e);function a(o,l,u=0,d=o.length){if(u<d){if(t(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<0?u=f+1:d=f}while(u<d)}return u}function i(o,l,u=0,d=o.length){if(u<d){if(t(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<=0?u=f+1:d=f}while(u<d)}return u}function s(o,l,u=0,d=o.length){const f=a(o,l,u,d-1);return f>u&&n(o[f-1],l)>-n(o[f],l)?f-1:f}return{left:a,center:s,right:i}}function x2e(){return 0}function Yz(e){return e===null?NaN:+e}function*b2e(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const w2e=F2(us),ih=w2e.right;F2(Yz).center;class TT extends Map{constructor(t,r=S2e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,a]of t)this.set(n,a)}get(t){return super.get(MT(this,t))}has(t){return super.has(MT(this,t))}set(t,r){return super.set(j2e(this,t),r)}delete(t){return super.delete(k2e(this,t))}}function MT({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function j2e({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function k2e({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function S2e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function N2e(e=us){if(e===us)return Xz;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function Xz(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const _2e=Math.sqrt(50),E2e=Math.sqrt(10),P2e=Math.sqrt(2);function i0(e,t,r){const n=(t-e)/Math.max(0,r),a=Math.floor(Math.log10(n)),i=n/Math.pow(10,a),s=i>=_2e?10:i>=E2e?5:i>=P2e?2:1;let o,l,u;return a<0?(u=Math.pow(10,-a)/s,o=Math.round(e*u),l=Math.round(t*u),o/u<e&&++o,l/u>t&&--l,u=-u):(u=Math.pow(10,a)*s,o=Math.round(e/u),l=Math.round(t/u),o*u<e&&++o,l*u>t&&--l),l<o&&.5<=r&&r<2?i0(e,t,r*2):[o,l,u]}function K1(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[a,i,s]=n?i0(t,e,r):i0(e,t,r);if(!(i>=a))return[];const o=i-a+1,l=new Array(o);if(n)if(s<0)for(let u=0;u<o;++u)l[u]=(i-u)/-s;else for(let u=0;u<o;++u)l[u]=(i-u)*s;else if(s<0)for(let u=0;u<o;++u)l[u]=(a+u)/-s;else for(let u=0;u<o;++u)l[u]=(a+u)*s;return l}function Y1(e,t,r){return t=+t,e=+e,r=+r,i0(e,t,r)[2]}function X1(e,t,r){t=+t,e=+e,r=+r;const n=t<e,a=n?Y1(t,e,r):Y1(e,t,r);return(n?-1:1)*(a<0?1/-a:a)}function $T(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function RT(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function Zz(e,t,r=0,n=1/0,a){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(a=a===void 0?Xz:N2e(a);n>r;){if(n-r>600){const l=n-r+1,u=t-r+1,d=Math.log(l),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(l-f)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*f/l+h)),m=Math.min(n,Math.floor(t+(l-u)*f/l+h));Zz(e,t,p,m,a)}const i=e[t];let s=r,o=n;for(Mu(e,r,t),a(e[n],i)>0&&Mu(e,r,n);s<o;){for(Mu(e,s,o),++s,--o;a(e[s],i)<0;)++s;for(;a(e[o],i)>0;)--o}a(e[r],i)===0?Mu(e,r,o):(++o,Mu(e,o,n)),o<=t&&(r=o+1),t<=o&&(n=o-1)}return e}function Mu(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function A2e(e,t,r){if(e=Float64Array.from(b2e(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return RT(e);if(t>=1)return $T(e);var n,a=(n-1)*t,i=Math.floor(a),s=$T(Zz(e,i).subarray(0,i+1)),o=RT(e.subarray(i+1));return s+(o-s)*(a-i)}}function O2e(e,t,r=Yz){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,i=Math.floor(a),s=+r(e[i],i,e),o=+r(e[i+1],i+1,e);return s+(o-s)*(a-i)}}function C2e(e,t,r){e=+e,t=+t,r=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+r;for(var n=-1,a=Math.max(0,Math.ceil((t-e)/r))|0,i=new Array(a);++n<a;)i[n]=e+n*r;return i}function Bn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ki(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 Z1=Symbol("implicit");function B2(){var e=new TT,t=[],r=[],n=Z1;function a(i){let s=e.get(i);if(s===void 0){if(n!==Z1)return n;e.set(i,s=t.push(i)-1)}return r[s%r.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new TT;for(const s of i)e.has(s)||e.set(s,t.push(s)-1);return a},a.range=function(i){return arguments.length?(r=Array.from(i),a):r.slice()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return B2(t,r).unknown(n)},Bn.apply(a,arguments),a}function hf(){var e=B2().unknown(void 0),t=e.domain,r=e.range,n=0,a=1,i,s,o=!1,l=0,u=0,d=.5;delete e.unknown;function f(){var h=t().length,p=a<n,m=p?a:n,g=p?n:a;i=(g-m)/Math.max(1,h-l+u*2),o&&(i=Math.floor(i)),m+=(g-m-i*(h-l))*d,s=i*(1-l),o&&(m=Math.round(m),s=Math.round(s));var b=C2e(h).map(function(v){return m+i*v});return r(p?b.reverse():b)}return e.domain=function(h){return arguments.length?(t(h),f()):t()},e.range=function(h){return arguments.length?([n,a]=h,n=+n,a=+a,f()):[n,a]},e.rangeRound=function(h){return[n,a]=h,n=+n,a=+a,o=!0,f()},e.bandwidth=function(){return s},e.step=function(){return i},e.round=function(h){return arguments.length?(o=!!h,f()):o},e.padding=function(h){return arguments.length?(l=Math.min(1,u=+h),f()):l},e.paddingInner=function(h){return arguments.length?(l=Math.min(1,h),f()):l},e.paddingOuter=function(h){return arguments.length?(u=+h,f()):u},e.align=function(h){return arguments.length?(d=Math.max(0,Math.min(1,h)),f()):d},e.copy=function(){return hf(t(),[n,a]).round(o).paddingInner(l).paddingOuter(u).align(d)},Bn.apply(f(),arguments)}function Qz(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Qz(t())},e}function vd(){return Qz(hf.apply(null,arguments).paddingInner(1))}function T2e(e){return function(){return e}}function s0(e){return+e}var DT=[0,1];function $r(e){return e}function Q1(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:T2e(isNaN(t)?NaN:.5)}function M2e(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function $2e(e,t,r){var n=e[0],a=e[1],i=t[0],s=t[1];return a<n?(n=Q1(a,n),i=r(s,i)):(n=Q1(n,a),i=r(i,s)),function(o){return i(n(o))}}function R2e(e,t,r){var n=Math.min(e.length,t.length)-1,a=new Array(n),i=new Array(n),s=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<n;)a[s]=Q1(e[s],e[s+1]),i[s]=r(t[s],t[s+1]);return function(o){var l=ih(e,o,1,n)-1;return i[l](a[l](o))}}function sh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function ey(){var e=DT,t=DT,r=Hc,n,a,i,s=$r,o,l,u;function d(){var h=Math.min(e.length,t.length);return s!==$r&&(s=M2e(e[0],e[h-1])),o=h>2?R2e:$2e,l=u=null,f}function f(h){return h==null||isNaN(h=+h)?i:(l||(l=o(e.map(n),t,r)))(n(s(h)))}return f.invert=function(h){return s(a((u||(u=o(t,e.map(n),Jn)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,s0),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),r=zS,d()},f.clamp=function(h){return arguments.length?(s=h?!0:$r,d()):s!==$r},f.interpolate=function(h){return arguments.length?(r=h,d()):r},f.unknown=function(h){return arguments.length?(i=h,f):i},function(h,p){return n=h,a=p,d()}}function V2(){return ey()($r,$r)}function D2e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function o0(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function vc(e){return e=o0(Math.abs(e)),e?e[1]:NaN}function I2e(e,t){return function(r,n){for(var a=r.length,i=[],s=0,o=e[0],l=0;a>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),i.push(r.substring(a-=o,a+o)),!((l+=o+1)>n));)o=e[s=(s+1)%e.length];return i.reverse().join(t)}}function L2e(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var z2e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function pf(e){if(!(t=z2e.exec(e)))throw new Error("invalid format: "+e);var t;return new U2({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]})}pf.prototype=U2.prototype;function U2(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+""}U2.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 F2e(e){e:for(var t=e.length,r=1,n=-1,a;r<t;++r)switch(e[r]){case".":n=a=r;break;case"0":n===0&&(n=r),a=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(a+1):e}var Jz;function B2e(e,t){var r=o0(e,t);if(!r)return e+"";var n=r[0],a=r[1],i=a-(Jz=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=n.length;return i===s?n:i>s?n+new Array(i-s+1).join("0"):i>0?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+o0(e,Math.max(0,t+i-1))[0]}function IT(e,t){var r=o0(e,t);if(!r)return e+"";var n=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+new Array(a-n.length+2).join("0")}const LT={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:D2e,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)=>IT(e*100,t),r:IT,s:B2e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function zT(e){return e}var FT=Array.prototype.map,BT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function V2e(e){var t=e.grouping===void 0||e.thousands===void 0?zT:I2e(FT.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?zT:L2e(FT.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(f){f=pf(f);var h=f.fill,p=f.align,m=f.sign,g=f.symbol,b=f.zero,v=f.width,y=f.comma,x=f.precision,j=f.trim,w=f.type;w==="n"?(y=!0,w="g"):LT[w]||(x===void 0&&(x=12),j=!0,w="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var S=g==="$"?r:g==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k=g==="$"?n:/[%p]/.test(w)?s:"",_=LT[w],E=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function A(C){var M=S,O=k,P,D,I;if(w==="c")O=_(C)+O,C="";else{C=+C;var L=C<0||1/C<0;if(C=isNaN(C)?l:_(Math.abs(C),x),j&&(C=F2e(C)),L&&+C==0&&m!=="+"&&(L=!1),M=(L?m==="("?m:o:m==="-"||m==="("?"":m)+M,O=(w==="s"?BT[8+Jz/3]:"")+O+(L&&m==="("?")":""),E){for(P=-1,D=C.length;++P<D;)if(I=C.charCodeAt(P),48>I||I>57){O=(I===46?a+C.slice(P+1):C.slice(P))+O,C=C.slice(0,P);break}}}y&&!b&&(C=t(C,1/0));var R=M.length+C.length+O.length,$=R<v?new Array(v-R+1).join(h):"";switch(y&&b&&(C=t($+C,$.length?v-O.length:1/0),$=""),p){case"<":C=M+C+O+$;break;case"=":C=M+$+C+O;break;case"^":C=$.slice(0,R=$.length>>1)+M+C+O+$.slice(R);break;default:C=$+M+C+O;break}return i(C)}return A.toString=function(){return f+""},A}function d(f,h){var p=u((f=pf(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(vc(h)/3)))*3,g=Math.pow(10,-m),b=BT[8+m/3];return function(v){return p(g*v)+b}}return{format:u,formatPrefix:d}}var op,H2,e8;U2e({thousands:",",grouping:[3],currency:["$",""]});function U2e(e){return op=V2e(e),H2=op.format,e8=op.formatPrefix,op}function H2e(e){return Math.max(0,-vc(Math.abs(e)))}function W2e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vc(t)/3)))*3-vc(Math.abs(e)))}function q2e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vc(t)-vc(e))+1}function t8(e,t,r,n){var a=X1(e,t,r),i;switch(n=pf(n??",f"),n.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(i=W2e(a,s))&&(n.precision=i),e8(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(i=q2e(a,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=i-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(i=H2e(a))&&(n.precision=i-(n.type==="%")*2);break}}return H2(n)}function Ms(e){var t=e.domain;return e.ticks=function(r){var n=t();return K1(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var a=t();return t8(a[0],a[a.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),a=0,i=n.length-1,s=n[a],o=n[i],l,u,d=10;for(o<s&&(u=s,s=o,o=u,u=a,a=i,i=u);d-- >0;){if(u=Y1(s,o,r),u===l)return n[a]=s,n[i]=o,t(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function l0(){var e=V2();return e.copy=function(){return sh(e,l0())},Bn.apply(e,arguments),Ms(e)}function r8(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,s0),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return r8(e).unknown(t)},e=arguments.length?Array.from(e,s0):[0,1],Ms(r)}function n8(e,t){e=e.slice();var r=0,n=e.length-1,a=e[r],i=e[n],s;return i<a&&(s=r,r=n,n=s,s=a,a=i,i=s),e[r]=t.floor(a),e[n]=t.ceil(i),e}function VT(e){return Math.log(e)}function UT(e){return Math.exp(e)}function G2e(e){return-Math.log(-e)}function K2e(e){return-Math.exp(-e)}function Y2e(e){return isFinite(e)?+("1e"+e):e<0?0:e}function X2e(e){return e===10?Y2e:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Z2e(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 HT(e){return(t,r)=>-e(-t,r)}function W2(e){const t=e(VT,UT),r=t.domain;let n=10,a,i;function s(){return a=Z2e(n),i=X2e(n),r()[0]<0?(a=HT(a),i=HT(i),e(G2e,K2e)):e(VT,UT),t}return t.base=function(o){return arguments.length?(n=+o,s()):n},t.domain=function(o){return arguments.length?(r(o),s()):r()},t.ticks=o=>{const l=r();let u=l[0],d=l[l.length-1];const f=d<u;f&&([u,d]=[d,u]);let h=a(u),p=a(d),m,g;const b=o==null?10:+o;let v=[];if(!(n%1)&&p-h<b){if(h=Math.floor(h),p=Math.ceil(p),u>0){for(;h<=p;++h)for(m=1;m<n;++m)if(g=h<0?m/i(-h):m*i(h),!(g<u)){if(g>d)break;v.push(g)}}else for(;h<=p;++h)for(m=n-1;m>=1;--m)if(g=h>0?m/i(-h):m*i(h),!(g<u)){if(g>d)break;v.push(g)}v.length*2<b&&(v=K1(u,d,b))}else v=K1(h,p,Math.min(p-h,b)).map(i);return f?v.reverse():v},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=pf(l)).precision==null&&(l.trim=!0),l=H2(l)),o===1/0)return l;const u=Math.max(1,n*o/t.ticks().length);return d=>{let f=d/i(Math.round(a(d)));return f*n<n-.5&&(f*=n),f<=u?l(d):""}},t.nice=()=>r(n8(r(),{floor:o=>i(Math.floor(a(o))),ceil:o=>i(Math.ceil(a(o)))})),t}function a8(){const e=W2(ey()).domain([1,10]);return e.copy=()=>sh(e,a8()).base(e.base()),Bn.apply(e,arguments),e}function WT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function qT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function q2(e){var t=1,r=e(WT(t),qT(t));return r.constant=function(n){return arguments.length?e(WT(t=+n),qT(t)):t},Ms(r)}function i8(){var e=q2(ey());return e.copy=function(){return sh(e,i8()).constant(e.constant())},Bn.apply(e,arguments)}function GT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Q2e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function J2e(e){return e<0?-e*e:e*e}function G2(e){var t=e($r,$r),r=1;function n(){return r===1?e($r,$r):r===.5?e(Q2e,J2e):e(GT(r),GT(1/r))}return t.exponent=function(a){return arguments.length?(r=+a,n()):r},Ms(t)}function K2(){var e=G2(ey());return e.copy=function(){return sh(e,K2()).exponent(e.exponent())},Bn.apply(e,arguments),e}function eNe(){return K2.apply(null,arguments).exponent(.5)}function KT(e){return Math.sign(e)*e*e}function tNe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function s8(){var e=V2(),t=[0,1],r=!1,n;function a(i){var s=tNe(e(i));return isNaN(s)?n:r?Math.round(s):s}return a.invert=function(i){return e.invert(KT(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,s0)).map(KT)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(r=!!i,a):r},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return s8(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Bn.apply(a,arguments),Ms(a)}function o8(){var e=[],t=[],r=[],n;function a(){var s=0,o=Math.max(1,t.length);for(r=new Array(o-1);++s<o;)r[s-1]=O2e(e,s/o);return i}function i(s){return s==null||isNaN(s=+s)?n:t[ih(r,s)]}return i.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?r[o-1]:e[0],o<r.length?r[o]:e[e.length-1]]},i.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(us),a()},i.range=function(s){return arguments.length?(t=Array.from(s),a()):t.slice()},i.unknown=function(s){return arguments.length?(n=s,i):n},i.quantiles=function(){return r.slice()},i.copy=function(){return o8().domain(e).range(t).unknown(n)},Bn.apply(i,arguments)}function l8(){var e=0,t=1,r=1,n=[.5],a=[0,1],i;function s(l){return l!=null&&l<=l?a[ih(n,l,0,r)]:i}function o(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},s.range=function(l){return arguments.length?(r=(a=Array.from(l)).length-1,o()):a.slice()},s.invertExtent=function(l){var u=a.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,n[0]]:u>=r?[n[r-1],t]:[n[u-1],n[u]]},s.unknown=function(l){return arguments.length&&(i=l),s},s.thresholds=function(){return n.slice()},s.copy=function(){return l8().domain([e,t]).range(a).unknown(i)},Bn.apply(Ms(s),arguments)}function c8(){var e=[.5],t=[0,1],r,n=1;function a(i){return i!=null&&i<=i?t[ih(e,i,0,n)]:r}return a.domain=function(i){return arguments.length?(e=Array.from(i),n=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),n=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var s=t.indexOf(i);return[e[s-1],e[s]]},a.unknown=function(i){return arguments.length?(r=i,a):r},a.copy=function(){return c8().domain(e).range(t).unknown(r)},Bn.apply(a,arguments)}const mb=new Date,gb=new Date;function ir(e,t,r,n){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const s=a(i),o=a.ceil(i);return i-s<o-i?s:o},a.offset=(i,s)=>(t(i=new Date(+i),s==null?1:Math.floor(s)),i),a.range=(i,s,o)=>{const l=[];if(i=a.ceil(i),o=o==null?1:Math.floor(o),!(i<s)||!(o>0))return l;let u;do l.push(u=new Date(+i)),t(i,o),e(i);while(u<i&&i<s);return l},a.filter=i=>ir(s=>{if(s>=s)for(;e(s),!i(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!i(s););else for(;--o>=0;)for(;t(s,1),!i(s););}),r&&(a.count=(i,s)=>(mb.setTime(+i),gb.setTime(+s),e(mb),e(gb),Math.floor(r(mb,gb))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(n?s=>n(s)%i===0:s=>a.count(0,s)%i===0):a)),a}const c0=ir(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);c0.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?ir(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):c0);c0.range;const Ua=1e3,En=Ua*60,Ha=En*60,fi=Ha*24,Y2=fi*7,YT=fi*30,yb=fi*365,oo=ir(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ua)},(e,t)=>(t-e)/Ua,e=>e.getUTCSeconds());oo.range;const X2=ir(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ua)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getMinutes());X2.range;const Z2=ir(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCMinutes());Z2.range;const Q2=ir(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ua-e.getMinutes()*En)},(e,t)=>{e.setTime(+e+t*Ha)},(e,t)=>(t-e)/Ha,e=>e.getHours());Q2.range;const J2=ir(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ha)},(e,t)=>(t-e)/Ha,e=>e.getUTCHours());J2.range;const oh=ir(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*En)/fi,e=>e.getDate()-1);oh.range;const ty=ir(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fi,e=>e.getUTCDate()-1);ty.range;const u8=ir(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fi,e=>Math.floor(e/fi));u8.range;function Ho(e){return ir(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*En)/Y2)}const ry=Ho(0),u0=Ho(1),rNe=Ho(2),nNe=Ho(3),xc=Ho(4),aNe=Ho(5),iNe=Ho(6);ry.range;u0.range;rNe.range;nNe.range;xc.range;aNe.range;iNe.range;function Wo(e){return ir(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Y2)}const ny=Wo(0),d0=Wo(1),sNe=Wo(2),oNe=Wo(3),bc=Wo(4),lNe=Wo(5),cNe=Wo(6);ny.range;d0.range;sNe.range;oNe.range;bc.range;lNe.range;cNe.range;const eN=ir(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());eN.range;const tN=ir(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());tN.range;const hi=ir(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());hi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ir(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});hi.range;const pi=ir(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());pi.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:ir(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});pi.range;function d8(e,t,r,n,a,i){const s=[[oo,1,Ua],[oo,5,5*Ua],[oo,15,15*Ua],[oo,30,30*Ua],[i,1,En],[i,5,5*En],[i,15,15*En],[i,30,30*En],[a,1,Ha],[a,3,3*Ha],[a,6,6*Ha],[a,12,12*Ha],[n,1,fi],[n,2,2*fi],[r,1,Y2],[t,1,YT],[t,3,3*YT],[e,1,yb]];function o(u,d,f){const h=d<u;h&&([u,d]=[d,u]);const p=f&&typeof f.range=="function"?f:l(u,d,f),m=p?p.range(u,+d+1):[];return h?m.reverse():m}function l(u,d,f){const h=Math.abs(d-u)/f,p=F2(([,,b])=>b).right(s,h);if(p===s.length)return e.every(X1(u/yb,d/yb,f));if(p===0)return c0.every(Math.max(X1(u,d,f),1));const[m,g]=s[h/s[p-1][2]<s[p][2]/h?p-1:p];return m.every(g)}return[o,l]}const[uNe,dNe]=d8(pi,tN,ny,u8,J2,Z2),[fNe,hNe]=d8(hi,eN,ry,oh,Q2,X2);function vb(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 xb(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 $u(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function pNe(e){var t=e.dateTime,r=e.date,n=e.time,a=e.periods,i=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=Ru(a),d=Du(a),f=Ru(i),h=Du(i),p=Ru(s),m=Du(s),g=Ru(o),b=Du(o),v=Ru(l),y=Du(l),x={a:L,A:R,b:$,B:z,c:null,d:tM,e:tM,f:INe,g:GNe,G:YNe,H:$Ne,I:RNe,j:DNe,L:f8,m:LNe,M:zNe,p:U,q:V,Q:aM,s:iM,S:FNe,u:BNe,U:VNe,V:UNe,w:HNe,W:WNe,x:null,X:null,y:qNe,Y:KNe,Z:XNe,"%":nM},j={a:F,A:W,b:K,B:Q,c:null,d:rM,e:rM,f:e_e,g:u_e,G:f_e,H:ZNe,I:QNe,j:JNe,L:p8,m:t_e,M:r_e,p:ne,q:pe,Q:aM,s:iM,S:n_e,u:a_e,U:i_e,V:s_e,w:o_e,W:l_e,x:null,X:null,y:c_e,Y:d_e,Z:h_e,"%":nM},w={a:A,A:C,b:M,B:O,c:P,d:JT,e:JT,f:ONe,g:QT,G:ZT,H:eM,I:eM,j:_Ne,L:ANe,m:NNe,M:ENe,p:E,q:SNe,Q:TNe,s:MNe,S:PNe,u:xNe,U:bNe,V:wNe,w:vNe,W:jNe,x:D,X:I,y:QT,Y:ZT,Z:kNe,"%":CNe};x.x=S(r,x),x.X=S(n,x),x.c=S(t,x),j.x=S(r,j),j.X=S(n,j),j.c=S(t,j);function S(X,ee){return function(ie){var G=[],Ee=-1,be=0,Pe=X.length,Ce,ke,oe;for(ie instanceof Date||(ie=new Date(+ie));++Ee<Pe;)X.charCodeAt(Ee)===37&&(G.push(X.slice(be,Ee)),(ke=XT[Ce=X.charAt(++Ee)])!=null?Ce=X.charAt(++Ee):ke=Ce==="e"?" ":"0",(oe=ee[Ce])&&(Ce=oe(ie,ke)),G.push(Ce),be=Ee+1);return G.push(X.slice(be,Ee)),G.join("")}}function k(X,ee){return function(ie){var G=$u(1900,void 0,1),Ee=_(G,X,ie+="",0),be,Pe;if(Ee!=ie.length)return null;if("Q"in G)return new Date(G.Q);if("s"in G)return new Date(G.s*1e3+("L"in G?G.L:0));if(ee&&!("Z"in G)&&(G.Z=0),"p"in G&&(G.H=G.H%12+G.p*12),G.m===void 0&&(G.m="q"in G?G.q:0),"V"in G){if(G.V<1||G.V>53)return null;"w"in G||(G.w=1),"Z"in G?(be=xb($u(G.y,0,1)),Pe=be.getUTCDay(),be=Pe>4||Pe===0?d0.ceil(be):d0(be),be=ty.offset(be,(G.V-1)*7),G.y=be.getUTCFullYear(),G.m=be.getUTCMonth(),G.d=be.getUTCDate()+(G.w+6)%7):(be=vb($u(G.y,0,1)),Pe=be.getDay(),be=Pe>4||Pe===0?u0.ceil(be):u0(be),be=oh.offset(be,(G.V-1)*7),G.y=be.getFullYear(),G.m=be.getMonth(),G.d=be.getDate()+(G.w+6)%7)}else("W"in G||"U"in G)&&("w"in G||(G.w="u"in G?G.u%7:"W"in G?1:0),Pe="Z"in G?xb($u(G.y,0,1)).getUTCDay():vb($u(G.y,0,1)).getDay(),G.m=0,G.d="W"in G?(G.w+6)%7+G.W*7-(Pe+5)%7:G.w+G.U*7-(Pe+6)%7);return"Z"in G?(G.H+=G.Z/100|0,G.M+=G.Z%100,xb(G)):vb(G)}}function _(X,ee,ie,G){for(var Ee=0,be=ee.length,Pe=ie.length,Ce,ke;Ee<be;){if(G>=Pe)return-1;if(Ce=ee.charCodeAt(Ee++),Ce===37){if(Ce=ee.charAt(Ee++),ke=w[Ce in XT?ee.charAt(Ee++):Ce],!ke||(G=ke(X,ie,G))<0)return-1}else if(Ce!=ie.charCodeAt(G++))return-1}return G}function E(X,ee,ie){var G=u.exec(ee.slice(ie));return G?(X.p=d.get(G[0].toLowerCase()),ie+G[0].length):-1}function A(X,ee,ie){var G=p.exec(ee.slice(ie));return G?(X.w=m.get(G[0].toLowerCase()),ie+G[0].length):-1}function C(X,ee,ie){var G=f.exec(ee.slice(ie));return G?(X.w=h.get(G[0].toLowerCase()),ie+G[0].length):-1}function M(X,ee,ie){var G=v.exec(ee.slice(ie));return G?(X.m=y.get(G[0].toLowerCase()),ie+G[0].length):-1}function O(X,ee,ie){var G=g.exec(ee.slice(ie));return G?(X.m=b.get(G[0].toLowerCase()),ie+G[0].length):-1}function P(X,ee,ie){return _(X,t,ee,ie)}function D(X,ee,ie){return _(X,r,ee,ie)}function I(X,ee,ie){return _(X,n,ee,ie)}function L(X){return s[X.getDay()]}function R(X){return i[X.getDay()]}function $(X){return l[X.getMonth()]}function z(X){return o[X.getMonth()]}function U(X){return a[+(X.getHours()>=12)]}function V(X){return 1+~~(X.getMonth()/3)}function F(X){return s[X.getUTCDay()]}function W(X){return i[X.getUTCDay()]}function K(X){return l[X.getUTCMonth()]}function Q(X){return o[X.getUTCMonth()]}function ne(X){return a[+(X.getUTCHours()>=12)]}function pe(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var ee=S(X+="",x);return ee.toString=function(){return X},ee},parse:function(X){var ee=k(X+="",!1);return ee.toString=function(){return X},ee},utcFormat:function(X){var ee=S(X+="",j);return ee.toString=function(){return X},ee},utcParse:function(X){var ee=k(X+="",!0);return ee.toString=function(){return X},ee}}}var XT={"-":"",_:" ",0:"0"},fr=/^\s*\d+/,mNe=/^%/,gNe=/[\\^$*+?|[\]().{}]/g;function Qe(e,t,r){var n=e<0?"-":"",a=(n?-e:e)+"",i=a.length;return n+(i<r?new Array(r-i+1).join(t)+a:a)}function yNe(e){return e.replace(gNe,"\\$&")}function Ru(e){return new RegExp("^(?:"+e.map(yNe).join("|")+")","i")}function Du(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function vNe(e,t,r){var n=fr.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function xNe(e,t,r){var n=fr.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function bNe(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function wNe(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function jNe(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function ZT(e,t,r){var n=fr.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function QT(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function kNe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function SNe(e,t,r){var n=fr.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function NNe(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function JT(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function _Ne(e,t,r){var n=fr.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function eM(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function ENe(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function PNe(e,t,r){var n=fr.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function ANe(e,t,r){var n=fr.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function ONe(e,t,r){var n=fr.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function CNe(e,t,r){var n=mNe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function TNe(e,t,r){var n=fr.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function MNe(e,t,r){var n=fr.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function tM(e,t){return Qe(e.getDate(),t,2)}function $Ne(e,t){return Qe(e.getHours(),t,2)}function RNe(e,t){return Qe(e.getHours()%12||12,t,2)}function DNe(e,t){return Qe(1+oh.count(hi(e),e),t,3)}function f8(e,t){return Qe(e.getMilliseconds(),t,3)}function INe(e,t){return f8(e,t)+"000"}function LNe(e,t){return Qe(e.getMonth()+1,t,2)}function zNe(e,t){return Qe(e.getMinutes(),t,2)}function FNe(e,t){return Qe(e.getSeconds(),t,2)}function BNe(e){var t=e.getDay();return t===0?7:t}function VNe(e,t){return Qe(ry.count(hi(e)-1,e),t,2)}function h8(e){var t=e.getDay();return t>=4||t===0?xc(e):xc.ceil(e)}function UNe(e,t){return e=h8(e),Qe(xc.count(hi(e),e)+(hi(e).getDay()===4),t,2)}function HNe(e){return e.getDay()}function WNe(e,t){return Qe(u0.count(hi(e)-1,e),t,2)}function qNe(e,t){return Qe(e.getFullYear()%100,t,2)}function GNe(e,t){return e=h8(e),Qe(e.getFullYear()%100,t,2)}function KNe(e,t){return Qe(e.getFullYear()%1e4,t,4)}function YNe(e,t){var r=e.getDay();return e=r>=4||r===0?xc(e):xc.ceil(e),Qe(e.getFullYear()%1e4,t,4)}function XNe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Qe(t/60|0,"0",2)+Qe(t%60,"0",2)}function rM(e,t){return Qe(e.getUTCDate(),t,2)}function ZNe(e,t){return Qe(e.getUTCHours(),t,2)}function QNe(e,t){return Qe(e.getUTCHours()%12||12,t,2)}function JNe(e,t){return Qe(1+ty.count(pi(e),e),t,3)}function p8(e,t){return Qe(e.getUTCMilliseconds(),t,3)}function e_e(e,t){return p8(e,t)+"000"}function t_e(e,t){return Qe(e.getUTCMonth()+1,t,2)}function r_e(e,t){return Qe(e.getUTCMinutes(),t,2)}function n_e(e,t){return Qe(e.getUTCSeconds(),t,2)}function a_e(e){var t=e.getUTCDay();return t===0?7:t}function i_e(e,t){return Qe(ny.count(pi(e)-1,e),t,2)}function m8(e){var t=e.getUTCDay();return t>=4||t===0?bc(e):bc.ceil(e)}function s_e(e,t){return e=m8(e),Qe(bc.count(pi(e),e)+(pi(e).getUTCDay()===4),t,2)}function o_e(e){return e.getUTCDay()}function l_e(e,t){return Qe(d0.count(pi(e)-1,e),t,2)}function c_e(e,t){return Qe(e.getUTCFullYear()%100,t,2)}function u_e(e,t){return e=m8(e),Qe(e.getUTCFullYear()%100,t,2)}function d_e(e,t){return Qe(e.getUTCFullYear()%1e4,t,4)}function f_e(e,t){var r=e.getUTCDay();return e=r>=4||r===0?bc(e):bc.ceil(e),Qe(e.getUTCFullYear()%1e4,t,4)}function h_e(){return"+0000"}function nM(){return"%"}function aM(e){return+e}function iM(e){return Math.floor(+e/1e3)}var ol,g8,y8;p_e({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 p_e(e){return ol=pNe(e),g8=ol.format,ol.parse,y8=ol.utcFormat,ol.utcParse,ol}function m_e(e){return new Date(e)}function g_e(e){return e instanceof Date?+e:+new Date(+e)}function rN(e,t,r,n,a,i,s,o,l,u){var d=V2(),f=d.invert,h=d.domain,p=u(".%L"),m=u(":%S"),g=u("%I:%M"),b=u("%I %p"),v=u("%a %d"),y=u("%b %d"),x=u("%B"),j=u("%Y");function w(S){return(l(S)<S?p:o(S)<S?m:s(S)<S?g:i(S)<S?b:n(S)<S?a(S)<S?v:y:r(S)<S?x:j)(S)}return d.invert=function(S){return new Date(f(S))},d.domain=function(S){return arguments.length?h(Array.from(S,g_e)):h().map(m_e)},d.ticks=function(S){var k=h();return e(k[0],k[k.length-1],S??10)},d.tickFormat=function(S,k){return k==null?w:u(k)},d.nice=function(S){var k=h();return(!S||typeof S.range!="function")&&(S=t(k[0],k[k.length-1],S??10)),S?h(n8(k,S)):d},d.copy=function(){return sh(d,rN(e,t,r,n,a,i,s,o,l,u))},d}function y_e(){return Bn.apply(rN(fNe,hNe,hi,eN,ry,oh,Q2,X2,oo,g8).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function v_e(){return Bn.apply(rN(uNe,dNe,pi,tN,ny,ty,J2,Z2,oo,y8).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function ay(){var e=0,t=1,r,n,a,i,s=$r,o=!1,l;function u(f){return f==null||isNaN(f=+f)?l:s(a===0?.5:(f=(i(f)-r)*a,o?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,r=i(e=+e),n=i(t=+t),a=r===n?0:1/(n-r),u):[e,t]},u.clamp=function(f){return arguments.length?(o=!!f,u):o},u.interpolator=function(f){return arguments.length?(s=f,u):s};function d(f){return function(h){var p,m;return arguments.length?([p,m]=h,s=f(p,m),u):[s(0),s(1)]}}return u.range=d(Hc),u.rangeRound=d(zS),u.unknown=function(f){return arguments.length?(l=f,u):l},function(f){return i=f,r=f(e),n=f(t),a=r===n?0:1/(n-r),u}}function $s(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function v8(){var e=Ms(ay()($r));return e.copy=function(){return $s(e,v8())},ki.apply(e,arguments)}function x8(){var e=W2(ay()).domain([1,10]);return e.copy=function(){return $s(e,x8()).base(e.base())},ki.apply(e,arguments)}function b8(){var e=q2(ay());return e.copy=function(){return $s(e,b8()).constant(e.constant())},ki.apply(e,arguments)}function nN(){var e=G2(ay());return e.copy=function(){return $s(e,nN()).exponent(e.exponent())},ki.apply(e,arguments)}function x_e(){return nN.apply(null,arguments).exponent(.5)}function w8(){var e=[],t=$r;function r(n){if(n!=null&&!isNaN(n=+n))return t((ih(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let a of n)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(us),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,a)=>t(a/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(a,i)=>A2e(e,i/n))},r.copy=function(){return w8(t).domain(e)},ki.apply(r,arguments)}function iy(){var e=0,t=.5,r=1,n=1,a,i,s,o,l,u=$r,d,f=!1,h;function p(g){return isNaN(g=+g)?h:(g=.5+((g=+d(g))-i)*(n*g<n*i?o:l),u(f?Math.max(0,Math.min(1,g)):g))}p.domain=function(g){return arguments.length?([e,t,r]=g,a=d(e=+e),i=d(t=+t),s=d(r=+r),o=a===i?0:.5/(i-a),l=i===s?0:.5/(s-i),n=i<a?-1:1,p):[e,t,r]},p.clamp=function(g){return arguments.length?(f=!!g,p):f},p.interpolator=function(g){return arguments.length?(u=g,p):u};function m(g){return function(b){var v,y,x;return arguments.length?([v,y,x]=b,u=xJ(g,[v,y,x]),p):[u(0),u(.5),u(1)]}}return p.range=m(Hc),p.rangeRound=m(zS),p.unknown=function(g){return arguments.length?(h=g,p):h},function(g){return d=g,a=g(e),i=g(t),s=g(r),o=a===i?0:.5/(i-a),l=i===s?0:.5/(s-i),n=i<a?-1:1,p}}function j8(){var e=Ms(iy()($r));return e.copy=function(){return $s(e,j8())},ki.apply(e,arguments)}function k8(){var e=W2(iy()).domain([.1,1,10]);return e.copy=function(){return $s(e,k8()).base(e.base())},ki.apply(e,arguments)}function S8(){var e=q2(iy());return e.copy=function(){return $s(e,S8()).constant(e.constant())},ki.apply(e,arguments)}function aN(){var e=G2(iy());return e.copy=function(){return $s(e,aN()).exponent(e.exponent())},ki.apply(e,arguments)}function b_e(){return aN.apply(null,arguments).exponent(.5)}const sM=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:hf,scaleDiverging:j8,scaleDivergingLog:k8,scaleDivergingPow:aN,scaleDivergingSqrt:b_e,scaleDivergingSymlog:S8,scaleIdentity:r8,scaleImplicit:Z1,scaleLinear:l0,scaleLog:a8,scaleOrdinal:B2,scalePoint:vd,scalePow:K2,scaleQuantile:o8,scaleQuantize:l8,scaleRadial:s8,scaleSequential:v8,scaleSequentialLog:x8,scaleSequentialPow:nN,scaleSequentialQuantile:w8,scaleSequentialSqrt:x_e,scaleSequentialSymlog:b8,scaleSqrt:eNe,scaleSymlog:i8,scaleThreshold:c8,scaleTime:y_e,scaleUtc:v_e,tickFormat:t8},Symbol.toStringTag,{value:"Module"}));var w_e=Cg,j_e=v2;function k_e(e,t){return w_e(j_e(e,t),1)}var S_e=k_e;const N_e=Je(S_e);var __e=p2;function E_e(e,t){return __e(e,t)}var P_e=E_e;const sy=Je(P_e);var su=1e9,A_e={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},sN,Pt=!0,Dn="[DecimalError] ",yo=Dn+"Invalid argument: ",iN=Dn+"Exponent out of range: ",ou=Math.floor,Ks=Math.pow,O_e=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,an,lr=1e7,bt=7,N8=9007199254740991,f0=ou(N8/bt),de={};de.absoluteValue=de.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};de.comparedTo=de.cmp=function(e){var t,r,n,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(n=i.d.length,a=e.d.length,t=0,r=n<a?n:a;t<r;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return n===a?0:n>a^i.s<0?1:-1};de.decimalPlaces=de.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*bt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};de.dividedBy=de.div=function(e){return Qa(this,new this.constructor(e))};de.dividedToIntegerBy=de.idiv=function(e){var t=this,r=t.constructor;return ut(Qa(t,new r(e),0,1),r.precision)};de.equals=de.eq=function(e){return!this.cmp(e)};de.exponent=function(){return Yt(this)};de.greaterThan=de.gt=function(e){return this.cmp(e)>0};de.greaterThanOrEqualTo=de.gte=function(e){return this.cmp(e)>=0};de.isInteger=de.isint=function(){return this.e>this.d.length-2};de.isNegative=de.isneg=function(){return this.s<0};de.isPositive=de.ispos=function(){return this.s>0};de.isZero=function(){return this.s===0};de.lessThan=de.lt=function(e){return this.cmp(e)<0};de.lessThanOrEqualTo=de.lte=function(e){return this.cmp(e)<1};de.logarithm=de.log=function(e){var t,r=this,n=r.constructor,a=n.precision,i=a+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(an))throw Error(Dn+"NaN");if(r.s<1)throw Error(Dn+(r.s?"NaN":"-Infinity"));return r.eq(an)?new n(0):(Pt=!1,t=Qa(mf(r,i),mf(e,i),i),Pt=!0,ut(t,a))};de.minus=de.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?P8(t,e):_8(t,(e.s=-e.s,e))};de.modulo=de.mod=function(e){var t,r=this,n=r.constructor,a=n.precision;if(e=new n(e),!e.s)throw Error(Dn+"NaN");return r.s?(Pt=!1,t=Qa(r,e,0,1).times(e),Pt=!0,r.minus(t)):ut(new n(r),a)};de.naturalExponential=de.exp=function(){return E8(this)};de.naturalLogarithm=de.ln=function(){return mf(this)};de.negated=de.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};de.plus=de.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_8(t,e):P8(t,(e.s=-e.s,e))};de.precision=de.sd=function(e){var t,r,n,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(yo+e);if(t=Yt(a)+1,n=a.d.length-1,r=n*bt+1,n=a.d[n],n){for(;n%10==0;n/=10)r--;for(n=a.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};de.squareRoot=de.sqrt=function(){var e,t,r,n,a,i,s,o=this,l=o.constructor;if(o.s<1){if(!o.s)return new l(0);throw Error(Dn+"NaN")}for(e=Yt(o),Pt=!1,a=Math.sqrt(+o),a==0||a==1/0?(t=xa(o.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=ou((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(a.toString()),r=l.precision,a=s=r+3;;)if(i=n,n=i.plus(Qa(o,i,s+2)).times(.5),xa(i.d).slice(0,s)===(t=xa(n.d)).slice(0,s)){if(t=t.slice(s-3,s+1),a==s&&t=="4999"){if(ut(i,r+1,0),i.times(i).eq(o)){n=i;break}}else if(t!="9999")break;s+=4}return Pt=!0,ut(n,r)};de.times=de.mul=function(e){var t,r,n,a,i,s,o,l,u,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,r=d.e+e.e,l=h.length,u=p.length,l<u&&(i=h,h=p,p=i,s=l,l=u,u=s),i=[],s=l+u,n=s;n--;)i.push(0);for(n=u;--n>=0;){for(t=0,a=l+n;a>n;)o=i[a]+p[n]*h[a-n-1]+t,i[a--]=o%lr|0,t=o/lr|0;i[a]=(i[a]+t)%lr|0}for(;!i[--s];)i.pop();return t?++r:i.shift(),e.d=i,e.e=r,Pt?ut(e,f.precision):e};de.toDecimalPlaces=de.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Ea(e,0,su),t===void 0?t=n.rounding:Ea(t,0,8),ut(r,e+Yt(r)+1,t))};de.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=Mo(n,!0):(Ea(e,0,su),t===void 0?t=a.rounding:Ea(t,0,8),n=ut(new a(n),e+1,t),r=Mo(n,!0,e+1)),r};de.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?Mo(a):(Ea(e,0,su),t===void 0?t=i.rounding:Ea(t,0,8),n=ut(new i(a),e+Yt(a)+1,t),r=Mo(n.abs(),!1,e+Yt(n)+1),a.isneg()&&!a.isZero()?"-"+r:r)};de.toInteger=de.toint=function(){var e=this,t=e.constructor;return ut(new t(e),Yt(e)+1,t.rounding)};de.toNumber=function(){return+this};de.toPower=de.pow=function(e){var t,r,n,a,i,s,o=this,l=o.constructor,u=12,d=+(e=new l(e));if(!e.s)return new l(an);if(o=new l(o),!o.s){if(e.s<1)throw Error(Dn+"Infinity");return o}if(o.eq(an))return o;if(n=l.precision,e.eq(an))return ut(o,n);if(t=e.e,r=e.d.length-1,s=t>=r,i=o.s,s){if((r=d<0?-d:d)<=N8){for(a=new l(an),t=Math.ceil(n/bt+4),Pt=!1;r%2&&(a=a.times(o),lM(a.d,t)),r=ou(r/2),r!==0;)o=o.times(o),lM(o.d,t);return Pt=!0,e.s<0?new l(an).div(a):ut(a,n)}}else if(i<0)throw Error(Dn+"NaN");return i=i<0&&e.d[Math.max(t,r)]&1?-1:1,o.s=1,Pt=!1,a=e.times(mf(o,n+u)),Pt=!0,a=E8(a),a.s=i,a};de.toPrecision=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?(r=Yt(a),n=Mo(a,r<=i.toExpNeg||r>=i.toExpPos)):(Ea(e,1,su),t===void 0?t=i.rounding:Ea(t,0,8),a=ut(new i(a),e,t),r=Yt(a),n=Mo(a,e<=r||r<=i.toExpNeg,e)),n};de.toSignificantDigits=de.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Ea(e,1,su),t===void 0?t=n.rounding:Ea(t,0,8)),ut(new n(r),e,t)};de.toString=de.valueOf=de.val=de.toJSON=de[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Yt(e),r=e.constructor;return Mo(e,t<=r.toExpNeg||t>=r.toExpPos)};function _8(e,t){var r,n,a,i,s,o,l,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Pt?ut(t,f):t;if(l=e.d,u=t.d,s=e.e,a=t.e,l=l.slice(),i=s-a,i){for(i<0?(n=l,i=-i,o=u.length):(n=u,a=s,o=l.length),s=Math.ceil(f/bt),o=s>o?s+1:o+1,i>o&&(i=o,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for(o=l.length,i=u.length,o-i<0&&(i=o,n=u,u=l,l=n),r=0;i;)r=(l[--i]=l[i]+u[i]+r)/lr|0,l[i]%=lr;for(r&&(l.unshift(r),++a),o=l.length;l[--o]==0;)l.pop();return t.d=l,t.e=a,Pt?ut(t,f):t}function Ea(e,t,r){if(e!==~~e||e<t||e>r)throw Error(yo+e)}function xa(e){var t,r,n,a=e.length-1,i="",s=e[0];if(a>0){for(i+=s,t=1;t<a;t++)n=e[t]+"",r=bt-n.length,r&&(i+=Bi(r)),i+=n;s=e[t],n=s+"",r=bt-n.length,r&&(i+=Bi(r))}else if(s===0)return"0";for(;s%10===0;)s/=10;return i+s}var Qa=function(){function e(n,a){var i,s=0,o=n.length;for(n=n.slice();o--;)i=n[o]*a+s,n[o]=i%lr|0,s=i/lr|0;return s&&n.unshift(s),n}function t(n,a,i,s){var o,l;if(i!=s)l=i>s?1:-1;else for(o=l=0;o<i;o++)if(n[o]!=a[o]){l=n[o]>a[o]?1:-1;break}return l}function r(n,a,i){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*lr+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,s){var o,l,u,d,f,h,p,m,g,b,v,y,x,j,w,S,k,_,E=n.constructor,A=n.s==a.s?1:-1,C=n.d,M=a.d;if(!n.s)return new E(n);if(!a.s)throw Error(Dn+"Division by zero");for(l=n.e-a.e,k=M.length,w=C.length,p=new E(A),m=p.d=[],u=0;M[u]==(C[u]||0);)++u;if(M[u]>(C[u]||0)&&--l,i==null?y=i=E.precision:s?y=i+(Yt(n)-Yt(a))+1:y=i,y<0)return new E(0);if(y=y/bt+2|0,u=0,k==1)for(d=0,M=M[0],y++;(u<w||d)&&y--;u++)x=d*lr+(C[u]||0),m[u]=x/M|0,d=x%M|0;else{for(d=lr/(M[0]+1)|0,d>1&&(M=e(M,d),C=e(C,d),k=M.length,w=C.length),j=k,g=C.slice(0,k),b=g.length;b<k;)g[b++]=0;_=M.slice(),_.unshift(0),S=M[0],M[1]>=lr/2&&++S;do d=0,o=t(M,g,k,b),o<0?(v=g[0],k!=b&&(v=v*lr+(g[1]||0)),d=v/S|0,d>1?(d>=lr&&(d=lr-1),f=e(M,d),h=f.length,b=g.length,o=t(f,g,h,b),o==1&&(d--,r(f,k<h?_:M,h))):(d==0&&(o=d=1),f=M.slice()),h=f.length,h<b&&f.unshift(0),r(g,f,b),o==-1&&(b=g.length,o=t(M,g,k,b),o<1&&(d++,r(g,k<b?_:M,b))),b=g.length):o===0&&(d++,g=[0]),m[u++]=d,o&&g[0]?g[b++]=C[j]||0:(g=[C[j]],b=1);while((j++<w||g[0]!==void 0)&&y--)}return m[0]||m.shift(),p.e=l,ut(p,s?i+Yt(p)+1:i)}}();function E8(e,t){var r,n,a,i,s,o,l=0,u=0,d=e.constructor,f=d.precision;if(Yt(e)>16)throw Error(iN+Yt(e));if(!e.s)return new d(an);for(Pt=!1,o=f,s=new d(.03125);e.abs().gte(.1);)e=e.times(s),u+=5;for(n=Math.log(Ks(2,u))/Math.LN10*2+5|0,o+=n,r=a=i=new d(an),d.precision=o;;){if(a=ut(a.times(e),o),r=r.times(++l),s=i.plus(Qa(a,r,o)),xa(s.d).slice(0,o)===xa(i.d).slice(0,o)){for(;u--;)i=ut(i.times(i),o);return d.precision=f,t==null?(Pt=!0,ut(i,f)):i}i=s}}function Yt(e){for(var t=e.e*bt,r=e.d[0];r>=10;r/=10)t++;return t}function bb(e,t,r){if(t>e.LN10.sd())throw Pt=!0,r&&(e.precision=r),Error(Dn+"LN10 precision limit exceeded");return ut(new e(e.LN10),t)}function Bi(e){for(var t="";e--;)t+="0";return t}function mf(e,t){var r,n,a,i,s,o,l,u,d,f=1,h=10,p=e,m=p.d,g=p.constructor,b=g.precision;if(p.s<1)throw Error(Dn+(p.s?"NaN":"-Infinity"));if(p.eq(an))return new g(0);if(t==null?(Pt=!1,u=b):u=t,p.eq(10))return t==null&&(Pt=!0),bb(g,u);if(u+=h,g.precision=u,r=xa(m),n=r.charAt(0),i=Yt(p),Math.abs(i)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=xa(p.d),n=r.charAt(0),f++;i=Yt(p),n>1?(p=new g("0."+r),i++):p=new g(n+"."+r.slice(1))}else return l=bb(g,u+2,b).times(i+""),p=mf(new g(n+"."+r.slice(1)),u-h).plus(l),g.precision=b,t==null?(Pt=!0,ut(p,b)):p;for(o=s=p=Qa(p.minus(an),p.plus(an),u),d=ut(p.times(p),u),a=3;;){if(s=ut(s.times(d),u),l=o.plus(Qa(s,new g(a),u)),xa(l.d).slice(0,u)===xa(o.d).slice(0,u))return o=o.times(2),i!==0&&(o=o.plus(bb(g,u+2,b).times(i+""))),o=Qa(o,new g(f),u),g.precision=b,t==null?(Pt=!0,ut(o,b)):o;o=l,a+=2}}function oM(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(n,a),t){if(a-=n,r=r-n-1,e.e=ou(r/bt),e.d=[],n=(r+1)%bt,r<0&&(n+=bt),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=bt;n<a;)e.d.push(+t.slice(n,n+=bt));t=t.slice(n),n=bt-t.length}else n-=a;for(;n--;)t+="0";if(e.d.push(+t),Pt&&(e.e>f0||e.e<-f0))throw Error(iN+r)}else e.s=0,e.e=0,e.d=[0];return e}function ut(e,t,r){var n,a,i,s,o,l,u,d,f=e.d;for(s=1,i=f[0];i>=10;i/=10)s++;if(n=t-s,n<0)n+=bt,a=t,u=f[d=0];else{if(d=Math.ceil((n+1)/bt),i=f.length,d>=i)return e;for(u=i=f[d],s=1;i>=10;i/=10)s++;n%=bt,a=n-bt+s}if(r!==void 0&&(i=Ks(10,s-a-1),o=u/i%10|0,l=t<0||f[d+1]!==void 0||u%i,l=r<4?(o||l)&&(r==0||r==(e.s<0?3:2)):o>5||o==5&&(r==4||l||r==6&&(n>0?a>0?u/Ks(10,s-a):0:f[d-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(i=Yt(e),f.length=1,t=t-i-1,f[0]=Ks(10,(bt-t%bt)%bt),e.e=ou(-t/bt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=d,i=1,d--):(f.length=d+1,i=Ks(10,bt-n),f[d]=a>0?(u/Ks(10,s-a)%Ks(10,a)|0)*i:0),l)for(;;)if(d==0){(f[0]+=i)==lr&&(f[0]=1,++e.e);break}else{if(f[d]+=i,f[d]!=lr)break;f[d--]=0,i=1}for(n=f.length;f[--n]===0;)f.pop();if(Pt&&(e.e>f0||e.e<-f0))throw Error(iN+Yt(e));return e}function P8(e,t){var r,n,a,i,s,o,l,u,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Pt?ut(t,p):t;if(l=e.d,f=t.d,n=t.e,u=e.e,l=l.slice(),s=u-n,s){for(d=s<0,d?(r=l,s=-s,o=f.length):(r=f,n=u,o=l.length),a=Math.max(Math.ceil(p/bt),o)+2,s>a&&(s=a,r.length=1),r.reverse(),a=s;a--;)r.push(0);r.reverse()}else{for(a=l.length,o=f.length,d=a<o,d&&(o=a),a=0;a<o;a++)if(l[a]!=f[a]){d=l[a]<f[a];break}s=0}for(d&&(r=l,l=f,f=r,t.s=-t.s),o=l.length,a=f.length-o;a>0;--a)l[o++]=0;for(a=f.length;a>s;){if(l[--a]<f[a]){for(i=a;i&&l[--i]===0;)l[i]=lr-1;--l[i],l[a]+=lr}l[a]-=f[a]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,Pt?ut(t,p):t):new h(0)}function Mo(e,t,r){var n,a=Yt(e),i=xa(e.d),s=i.length;return t?(r&&(n=r-s)>0?i=i.charAt(0)+"."+i.slice(1)+Bi(n):s>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+Bi(-a-1)+i,r&&(n=r-s)>0&&(i+=Bi(n))):a>=s?(i+=Bi(a+1-s),r&&(n=r-a-1)>0&&(i=i+"."+Bi(n))):((n=a+1)<s&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-s)>0&&(a+1===s&&(i+="."),i+=Bi(n))),e.s<0?"-"+i:i}function lM(e,t){if(e.length>t)return e.length=t,!0}function A8(e){var t,r,n;function a(i){var s=this;if(!(s instanceof a))return new a(i);if(s.constructor=a,i instanceof a){s.s=i.s,s.e=i.e,s.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(yo+i);if(i>0)s.s=1;else if(i<0)i=-i,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(i===~~i&&i<1e7){s.e=0,s.d=[i];return}return oM(s,i.toString())}else if(typeof i!="string")throw Error(yo+i);if(i.charCodeAt(0)===45?(i=i.slice(1),s.s=-1):s.s=1,O_e.test(i))oM(s,i);else throw Error(yo+i)}if(a.prototype=de,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=A8,a.config=a.set=C_e,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function C_e(e){if(!e||typeof e!="object")throw Error(Dn+"Object expected");var t,r,n,a=["precision",1,su,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((n=e[r=a[t]])!==void 0)if(ou(n)===n&&n>=a[t+1]&&n<=a[t+2])this[r]=n;else throw Error(yo+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(yo+r+": "+n);return this}var sN=A8(A_e);an=new sN(1);const lt=sN;function T_e(e){return D_e(e)||R_e(e)||$_e(e)||M_e()}function M_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
579
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $_e(e,t){if(e){if(typeof e=="string")return J1(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J1(e,t)}}function R_e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function D_e(e){if(Array.isArray(e))return J1(e)}function J1(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var I_e=function(t){return t},O8={},C8=function(t){return t===O8},cM=function(t){return function r(){return arguments.length===0||arguments.length===1&&C8(arguments.length<=0?void 0:arguments[0])?r:t.apply(void 0,arguments)}},L_e=function e(t,r){return t===1?r:cM(function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var s=a.filter(function(o){return o!==O8}).length;return s>=t?r.apply(void 0,a):e(t-s,cM(function(){for(var o=arguments.length,l=new Array(o),u=0;u<o;u++)l[u]=arguments[u];var d=a.map(function(f){return C8(f)?l.shift():f});return r.apply(void 0,T_e(d).concat(l))}))})},oy=function(t){return L_e(t.length,t)},ej=function(t,r){for(var n=[],a=t;a<r;++a)n[a-t]=a;return n},z_e=oy(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(r){return t[r]}).map(e)}),F_e=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return I_e;var a=r.reverse(),i=a[0],s=a.slice(1);return function(){return s.reduce(function(o,l){return l(o)},i.apply(void 0,arguments))}},tj=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},T8=function(t){var r=null,n=null;return function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return r&&i.every(function(o,l){return o===r[l]})||(r=i,n=t.apply(void 0,i)),n}};function B_e(e){var t;return e===0?t=1:t=Math.floor(new lt(e).abs().log(10).toNumber())+1,t}function V_e(e,t,r){for(var n=new lt(e),a=0,i=[];n.lt(t)&&a<1e5;)i.push(n.toNumber()),n=n.add(r),a++;return i}var U_e=oy(function(e,t,r){var n=+e,a=+t;return n+r*(a-n)}),H_e=oy(function(e,t,r){var n=t-+e;return n=n||1/0,(r-e)/n}),W_e=oy(function(e,t,r){var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});const ly={rangeStep:V_e,getDigitCount:B_e,interpolateNumber:U_e,uninterpolateNumber:H_e,uninterpolateTruncation:W_e};function rj(e){return K_e(e)||G_e(e)||M8(e)||q_e()}function q_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
580
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function G_e(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function K_e(e){if(Array.isArray(e))return nj(e)}function gf(e,t){return Z_e(e)||X_e(e,t)||M8(e,t)||Y_e()}function Y_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
581
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M8(e,t){if(e){if(typeof e=="string")return nj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nj(e,t)}}function nj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function X_e(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var r=[],n=!0,a=!1,i=void 0;try{for(var s=e[Symbol.iterator](),o;!(n=(o=s.next()).done)&&(r.push(o.value),!(t&&r.length===t));n=!0);}catch(l){a=!0,i=l}finally{try{!n&&s.return!=null&&s.return()}finally{if(a)throw i}}return r}}function Z_e(e){if(Array.isArray(e))return e}function $8(e){var t=gf(e,2),r=t[0],n=t[1],a=r,i=n;return r>n&&(a=n,i=r),[a,i]}function R8(e,t,r){if(e.lte(0))return new lt(0);var n=ly.getDigitCount(e.toNumber()),a=new lt(10).pow(n),i=e.div(a),s=n!==1?.05:.1,o=new lt(Math.ceil(i.div(s).toNumber())).add(r).mul(s),l=o.mul(a);return t?l:new lt(Math.ceil(l))}function Q_e(e,t,r){var n=1,a=new lt(e);if(!a.isint()&&r){var i=Math.abs(e);i<1?(n=new lt(10).pow(ly.getDigitCount(e)-1),a=new lt(Math.floor(a.div(n).toNumber())).mul(n)):i>1&&(a=new lt(Math.floor(e)))}else e===0?a=new lt(Math.floor((t-1)/2)):r||(a=new lt(Math.floor(e)));var s=Math.floor((t-1)/2),o=F_e(z_e(function(l){return a.add(new lt(l-s).mul(n)).toNumber()}),ej);return o(0,t)}function D8(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(r-1)))return{step:new lt(0),tickMin:new lt(0),tickMax:new lt(0)};var i=R8(new lt(t).sub(e).div(r-1),n,a),s;e<=0&&t>=0?s=new lt(0):(s=new lt(e).add(t).div(2),s=s.sub(new lt(s).mod(i)));var o=Math.ceil(s.sub(e).div(i).toNumber()),l=Math.ceil(new lt(t).sub(s).div(i).toNumber()),u=o+l+1;return u>r?D8(e,t,r,n,a+1):(u<r&&(l=t>0?l+(r-u):l,o=t>0?o:o+(r-u)),{step:i,tickMin:s.sub(new lt(o).mul(i)),tickMax:s.add(new lt(l).mul(i))})}function J_e(e){var t=gf(e,2),r=t[0],n=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=Math.max(a,2),o=$8([r,n]),l=gf(o,2),u=l[0],d=l[1];if(u===-1/0||d===1/0){var f=d===1/0?[u].concat(rj(ej(0,a-1).map(function(){return 1/0}))):[].concat(rj(ej(0,a-1).map(function(){return-1/0})),[d]);return r>n?tj(f):f}if(u===d)return Q_e(u,a,i);var h=D8(u,d,s,i),p=h.step,m=h.tickMin,g=h.tickMax,b=ly.rangeStep(m,g.add(new lt(.1).mul(p)),p);return r>n?tj(b):b}function eEe(e,t){var r=gf(e,2),n=r[0],a=r[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=$8([n,a]),o=gf(s,2),l=o[0],u=o[1];if(l===-1/0||u===1/0)return[n,a];if(l===u)return[l];var d=Math.max(t,2),f=R8(new lt(u).sub(l).div(d-1),i,0),h=[].concat(rj(ly.rangeStep(new lt(l),new lt(u).sub(new lt(.99).mul(f)),f)),[u]);return n>a?tj(h):h}var tEe=T8(J_e),rEe=T8(eEe),nEe="Invariant failed";function $o(e,t){throw new Error(nEe)}var aEe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function wc(e){"@babel/helpers - typeof";return wc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wc(e)}function h0(){return h0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},h0.apply(this,arguments)}function iEe(e,t){return cEe(e)||lEe(e,t)||oEe(e,t)||sEe()}function sEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
582
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oEe(e,t){if(e){if(typeof e=="string")return uM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return uM(e,t)}}function uM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lEe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function cEe(e){if(Array.isArray(e))return e}function uEe(e,t){if(e==null)return{};var r=dEe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dEe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function fEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hEe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,z8(n.key),n)}}function pEe(e,t,r){return t&&hEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mEe(e,t,r){return t=p0(t),gEe(e,I8()?Reflect.construct(t,r||[],p0(e).constructor):t.apply(e,r))}function gEe(e,t){if(t&&(wc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yEe(e)}function yEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I8(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(I8=function(){return!!e})()}function p0(e){return p0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},p0(e)}function vEe(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&&aj(e,t)}function aj(e,t){return aj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},aj(e,t)}function L8(e,t,r){return t=z8(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z8(e){var t=xEe(e,"string");return wc(t)=="symbol"?t:t+""}function xEe(e,t){if(wc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(wc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lh=function(e){function t(){return fEe(this,t),mEe(this,t,arguments)}return vEe(t,e),pEe(t,[{key:"render",value:function(){var n=this.props,a=n.offset,i=n.layout,s=n.width,o=n.dataKey,l=n.data,u=n.dataPointFormatter,d=n.xAxis,f=n.yAxis,h=uEe(n,aEe),p=qe(h,!1);this.props.direction==="x"&&d.type!=="number"&&$o();var m=l.map(function(g){var b=u(g,o),v=b.x,y=b.y,x=b.value,j=b.errorVal;if(!j)return null;var w=[],S,k;if(Array.isArray(j)){var _=iEe(j,2);S=_[0],k=_[1]}else S=k=j;if(i==="vertical"){var E=d.scale,A=y+a,C=A+s,M=A-s,O=E(x-S),P=E(x+k);w.push({x1:P,y1:C,x2:P,y2:M}),w.push({x1:O,y1:A,x2:P,y2:A}),w.push({x1:O,y1:C,x2:O,y2:M})}else if(i==="horizontal"){var D=f.scale,I=v+a,L=I-s,R=I+s,$=D(x-S),z=D(x+k);w.push({x1:L,y1:z,x2:R,y2:z}),w.push({x1:I,y1:$,x2:I,y2:z}),w.push({x1:L,y1:$,x2:R,y2:$})}return T.createElement(Bt,h0({className:"recharts-errorBar",key:"bar-".concat(w.map(function(U){return"".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))},p),w.map(function(U){return T.createElement("line",h0({},U,{key:"line-".concat(U.x1,"-").concat(U.x2,"-").concat(U.y1,"-").concat(U.y2)}))}))});return T.createElement(Bt,{className:"recharts-errorBars"},m)}}])}(T.Component);L8(lh,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});L8(lh,"displayName","ErrorBar");function yf(e){"@babel/helpers - typeof";return yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yf(e)}function dM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fs(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dM(Object(r),!0).forEach(function(n){bEe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bEe(e,t,r){return t=wEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wEe(e){var t=jEe(e,"string");return yf(t)=="symbol"?t:t+""}function jEe(e,t){if(yf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(yf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F8=function(t){var r=t.children,n=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,s=tn(r,go);if(!s)return null;var o=go.defaultProps,l=o!==void 0?Fs(Fs({},o),s.props):{},u;return s.props&&s.props.payload?u=s.props&&s.props.payload:i==="children"?u=(n||[]).reduce(function(d,f){var h=f.item,p=f.props,m=p.sectors||p.data||[];return d.concat(m.map(function(g){return{type:s.props.iconType||h.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):u=(n||[]).map(function(d){var f=d.item,h=f.type.defaultProps,p=h!==void 0?Fs(Fs({},h),f.props):{},m=p.dataKey,g=p.name,b=p.legendType,v=p.hide;return{inactive:v,dataKey:m,type:l.iconType||b||"square",color:oN(f),value:g||m,payload:p}}),Fs(Fs(Fs({},l),go.getWithHeight(s,a)),{},{payload:u,item:s})};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 fM(e){return _Ee(e)||NEe(e)||SEe(e)||kEe()}function kEe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
583
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function SEe(e,t){if(e){if(typeof e=="string")return ij(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ij(e,t)}}function NEe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Ee(e){if(Array.isArray(e))return ij(e)}function ij(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function hM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hM(Object(r),!0).forEach(function(n){Kl(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kl(e,t,r){return t=EEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EEe(e){var t=PEe(e,"string");return vf(t)=="symbol"?t:t+""}function PEe(e,t){if(vf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(vf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function un(e,t,r){return Fe(e)||Fe(t)?r:nr(t)?Tn(e,t,r):$e(t)?t(e):r}function xd(e,t,r,n){var a=N_e(e,function(o){return un(o,t)});if(r==="number"){var i=a.filter(function(o){return re(o)||parseFloat(o)});return i.length?[$g(i),Mg(i)]:[1/0,-1/0]}var s=n?a.filter(function(o){return!Fe(o)}):a;return s.map(function(o){return nr(o)||o instanceof Date?o:""})}var AEe=function(t){var r,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,s=-1,o=(r=n==null?void 0:n.length)!==null&&r!==void 0?r:0;if(o<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,u=0;u<o;u++){var d=u>0?a[u-1].coordinate:a[o-1].coordinate,f=a[u].coordinate,h=u>=o-1?a[0].coordinate:a[u+1].coordinate,p=void 0;if(ra(f-d)!==ra(h-f)){var m=[];if(ra(h-f)===ra(l[1]-l[0])){p=h;var g=f+l[1]-l[0];m[0]=Math.min(g,(g+d)/2),m[1]=Math.max(g,(g+d)/2)}else{p=d;var b=h+l[1]-l[0];m[0]=Math.min(f,(b+f)/2),m[1]=Math.max(f,(b+f)/2)}var v=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>v[0]&&t<=v[1]||t>=m[0]&&t<=m[1]){s=a[u].index;break}}else{var y=Math.min(d,h),x=Math.max(d,h);if(t>(y+f)/2&&t<=(x+f)/2){s=a[u].index;break}}}else for(var j=0;j<o;j++)if(j===0&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j>0&&j<o-1&&t>(n[j].coordinate+n[j-1].coordinate)/2&&t<=(n[j].coordinate+n[j+1].coordinate)/2||j===o-1&&t>(n[j].coordinate+n[j-1].coordinate)/2){s=n[j].index;break}return s},oN=function(t){var r,n=t,a=n.type.displayName,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?Dt(Dt({},t.type.defaultProps),t.props):t.props,s=i.stroke,o=i.fill,l;switch(a){case"Line":l=s;break;case"Area":case"Radar":l=s&&s!=="none"?s:o;break;default:l=o;break}return l},OEe=function(t){var r=t.barSize,n=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var s={},o=Object.keys(i),l=0,u=o.length;l<u;l++)for(var d=i[o[l]].stackGroups,f=Object.keys(d),h=0,p=f.length;h<p;h++){var m=d[f[h]],g=m.items,b=m.cateAxisId,v=g.filter(function(k){return Xa(k.type).indexOf("Bar")>=0});if(v&&v.length){var y=v[0].type.defaultProps,x=y!==void 0?Dt(Dt({},y),v[0].props):v[0].props,j=x.barSize,w=x[b];s[w]||(s[w]=[]);var S=Fe(j)?r:j;s[w].push({item:v[0],stackList:v.slice(1),barSize:Fe(S)?void 0:To(S,n,0)})}}return s},CEe=function(t){var r=t.barGap,n=t.barCategoryGap,a=t.bandSize,i=t.sizeList,s=i===void 0?[]:i,o=t.maxBarSize,l=s.length;if(l<1)return null;var u=To(r,a,0,!0),d,f=[];if(s[0].barSize===+s[0].barSize){var h=!1,p=a/l,m=s.reduce(function(j,w){return j+w.barSize||0},0);m+=(l-1)*u,m>=a&&(m-=(l-1)*u,u=0),m>=a&&p>0&&(h=!0,p*=.9,m=l*p);var g=(a-m)/2>>0,b={offset:g-u,size:0};d=s.reduce(function(j,w){var S={item:w.item,position:{offset:b.offset+b.size+u,size:h?p:w.barSize}},k=[].concat(fM(j),[S]);return b=k[k.length-1].position,w.stackList&&w.stackList.length&&w.stackList.forEach(function(_){k.push({item:_,position:b})}),k},f)}else{var v=To(n,a,0,!0);a-2*v-(l-1)*u<=0&&(u=0);var y=(a-2*v-(l-1)*u)/l;y>1&&(y>>=0);var x=o===+o?Math.min(y,o):y;d=s.reduce(function(j,w,S){var k=[].concat(fM(j),[{item:w.item,position:{offset:v+(y+u)*S+(y-x)/2,size:x}}]);return w.stackList&&w.stackList.length&&w.stackList.forEach(function(_){k.push({item:_,position:k[k.length-1].position})}),k},f)}return d},TEe=function(t,r,n,a){var i=n.children,s=n.width,o=n.margin,l=s-(o.left||0)-(o.right||0),u=F8({children:i,legendWidth:l});if(u){var d=a||{},f=d.width,h=d.height,p=u.align,m=u.verticalAlign,g=u.layout;if((g==="vertical"||g==="horizontal"&&m==="middle")&&p!=="center"&&re(t[p]))return Dt(Dt({},t),{},Kl({},p,t[p]+(f||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&m!=="middle"&&re(t[m]))return Dt(Dt({},t),{},Kl({},m,t[m]+(h||0)))}return t},MEe=function(t,r,n){return Fe(r)?!0:t==="horizontal"?r==="yAxis":t==="vertical"||n==="x"?r==="xAxis":n==="y"?r==="yAxis":!0},B8=function(t,r,n,a,i){var s=r.props.children,o=Mn(s,lh).filter(function(u){return MEe(a,i,u.props.direction)});if(o&&o.length){var l=o.map(function(u){return u.props.dataKey});return t.reduce(function(u,d){var f=un(d,n);if(Fe(f))return u;var h=Array.isArray(f)?[$g(f),Mg(f)]:[f,f],p=l.reduce(function(m,g){var b=un(d,g,0),v=h[0]-Math.abs(Array.isArray(b)?b[0]:b),y=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(v,m[0]),Math.max(y,m[1])]},[1/0,-1/0]);return[Math.min(p[0],u[0]),Math.max(p[1],u[1])]},[1/0,-1/0])}return null},$Ee=function(t,r,n,a,i){var s=r.map(function(o){return B8(t,o,n,i,a)}).filter(function(o){return!Fe(o)});return s&&s.length?s.reduce(function(o,l){return[Math.min(o[0],l[0]),Math.max(o[1],l[1])]},[1/0,-1/0]):null},V8=function(t,r,n,a,i){var s=r.map(function(l){var u=l.props.dataKey;return n==="number"&&u&&B8(t,l,u,a)||xd(t,u,n,i)});if(n==="number")return s.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]);var o={};return s.reduce(function(l,u){for(var d=0,f=u.length;d<f;d++)o[u[d]]||(o[u[d]]=!0,l.push(u[d]));return l},[])},U8=function(t,r){return t==="horizontal"&&r==="xAxis"||t==="vertical"&&r==="yAxis"||t==="centric"&&r==="angleAxis"||t==="radial"&&r==="radiusAxis"},H8=function(t,r,n,a){if(a)return t.map(function(l){return l.coordinate});var i,s,o=t.map(function(l){return l.coordinate===r&&(i=!0),l.coordinate===n&&(s=!0),l.coordinate});return i||o.push(r),s||o.push(n),o},Wa=function(t,r,n){if(!t)return null;var a=t.scale,i=t.duplicateDomain,s=t.type,o=t.range,l=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(r||n)&&s==="category"&&a.bandwidth?a.bandwidth()/l:0;if(u=t.axisType==="angleAxis"&&(o==null?void 0:o.length)>=2?ra(o[0]-o[1])*2*u:u,r&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=i?i.indexOf(f):f;return{coordinate:a(h)+u,value:f,offset:u}});return d.filter(function(f){return!nh(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:a(f)+u,value:f,index:h,offset:u}}):a.ticks&&!n?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,h){return{coordinate:a(f)+u,value:i?i[f]:f,index:h,offset:u}})},wb=new WeakMap,lp=function(t,r){if(typeof r!="function")return t;wb.has(t)||wb.set(t,new WeakMap);var n=wb.get(t);if(n.has(r))return n.get(r);var a=function(){t.apply(void 0,arguments),r.apply(void 0,arguments)};return n.set(r,a),a},REe=function(t,r,n){var a=t.scale,i=t.type,s=t.layout,o=t.axisType;if(a==="auto")return s==="radial"&&o==="radiusAxis"?{scale:hf(),realScaleType:"band"}:s==="radial"&&o==="angleAxis"?{scale:l0(),realScaleType:"linear"}:i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?{scale:vd(),realScaleType:"point"}:i==="category"?{scale:hf(),realScaleType:"band"}:{scale:l0(),realScaleType:"linear"};if(Co(a)){var l="scale".concat(Yg(a));return{scale:(sM[l]||vd)(),realScaleType:sM[l]?l:"point"}}return $e(a)?{scale:a}:{scale:vd(),realScaleType:"point"}},pM=1e-4,DEe=function(t){var r=t.domain();if(!(!r||r.length<=2)){var n=r.length,a=t.range(),i=Math.min(a[0],a[1])-pM,s=Math.max(a[0],a[1])+pM,o=t(r[0]),l=t(r[n-1]);(o<i||o>s||l<i||l>s)&&t.domain([r[0],r[n-1]])}},IEe=function(t,r){if(!t)return null;for(var n=0,a=t.length;n<a;n++)if(t[n].item===r)return t[n].position;return null},LEe=function(t,r){if(!r||r.length!==2||!re(r[0])||!re(r[1]))return t;var n=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]),i=[t[0],t[1]];return(!re(t[0])||t[0]<n)&&(i[0]=n),(!re(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<n&&(i[1]=n),i},zEe=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0,o=0;o<r;++o){var l=nh(t[o][n][1])?t[o][n][0]:t[o][n][1];l>=0?(t[o][n][0]=i,t[o][n][1]=i+l,i=t[o][n][1]):(t[o][n][0]=s,t[o][n][1]=s+l,s=t[o][n][1])}},FEe=function(t){var r=t.length;if(!(r<=0))for(var n=0,a=t[0].length;n<a;++n)for(var i=0,s=0;s<r;++s){var o=nh(t[s][n][1])?t[s][n][0]:t[s][n][1];o>=0?(t[s][n][0]=i,t[s][n][1]=i+o,i=t[s][n][1]):(t[s][n][0]=0,t[s][n][1]=0)}},BEe={sign:zEe,expand:tke,none:hc,silhouette:rke,wiggle:nke,positive:FEe},VEe=function(t,r,n){var a=r.map(function(o){return o.props.dataKey}),i=BEe[n],s=eke().keys(a).value(function(o,l){return+un(o,l,0)}).order(I1).offset(i);return s(t)},UEe=function(t,r,n,a,i,s){if(!t)return null;var o=s?r.reverse():r,l={},u=o.reduce(function(f,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?Dt(Dt({},h.type.defaultProps),h.props):h.props,g=m.stackId,b=m.hide;if(b)return f;var v=m[n],y=f[v]||{hasStack:!1,stackGroups:{}};if(nr(g)){var x=y.stackGroups[g]||{numericAxisId:n,cateAxisId:a,items:[]};x.items.push(h),y.hasStack=!0,y.stackGroups[g]=x}else y.stackGroups[ah("_stackId_")]={numericAxisId:n,cateAxisId:a,items:[h]};return Dt(Dt({},f),{},Kl({},v,y))},l),d={};return Object.keys(u).reduce(function(f,h){var p=u[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,b){var v=p.stackGroups[b];return Dt(Dt({},g),{},Kl({},b,{numericAxisId:n,cateAxisId:a,items:v.items,stackedData:VEe(t,v.items,i)}))},m)}return Dt(Dt({},f),{},Kl({},h,p))},d)},HEe=function(t,r){var n=r.realScaleType,a=r.type,i=r.tickCount,s=r.originalDomain,o=r.allowDecimals,l=n||r.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&a==="number"&&s&&(s[0]==="auto"||s[1]==="auto")){var u=t.domain();if(!u.length)return null;var d=tEe(u,i,o);return t.domain([$g(d),Mg(d)]),{niceTicks:d}}if(i&&a==="number"){var f=t.domain(),h=rEe(f,i,o);return{niceTicks:h}}return null};function mM(e){var t=e.axis,r=e.ticks,n=e.bandSize,a=e.entry,i=e.index,s=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Fe(a[t.dataKey])){var o=Wm(r,"value",a[t.dataKey]);if(o)return o.coordinate+n/2}return r[i]?r[i].coordinate+n/2:null}var l=un(a,Fe(s)?t.dataKey:s);return Fe(l)?null:t.scale(l)}var gM=function(t){var r=t.axis,n=t.ticks,a=t.offset,i=t.bandSize,s=t.entry,o=t.index;if(r.type==="category")return n[o]?n[o].coordinate+a:null;var l=un(s,r.dataKey,r.domain[o]);return Fe(l)?null:r.scale(l)-i/2+a},WEe=function(t){var r=t.numericAxis,n=r.scale.domain();if(r.type==="number"){var a=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return a<=0&&i>=0?0:i<0?i:a}return n[0]},qEe=function(t,r){var n,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?Dt(Dt({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(nr(i)){var s=r[i];if(s){var o=s.items.indexOf(t);return o>=0?s.stackedData[o]:null}}return null},GEe=function(t){return t.reduce(function(r,n){return[$g(n.concat([r[0]]).filter(re)),Mg(n.concat([r[1]]).filter(re))]},[1/0,-1/0])},W8=function(t,r,n){return Object.keys(t).reduce(function(a,i){var s=t[i],o=s.stackedData,l=o.reduce(function(u,d){var f=GEe(d.slice(r,n+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],a[0]),Math.max(l[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},yM=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,vM=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,sj=function(t,r,n){if($e(t))return t(r,n);if(!Array.isArray(t))return r;var a=[];if(re(t[0]))a[0]=n?t[0]:Math.min(t[0],r[0]);else if(yM.test(t[0])){var i=+yM.exec(t[0])[1];a[0]=r[0]-i}else $e(t[0])?a[0]=t[0](r[0]):a[0]=r[0];if(re(t[1]))a[1]=n?t[1]:Math.max(t[1],r[1]);else if(vM.test(t[1])){var s=+vM.exec(t[1])[1];a[1]=r[1]+s}else $e(t[1])?a[1]=t[1](r[1]):a[1]=r[1];return a},m0=function(t,r,n){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!n||a>0)return a}if(t&&r&&r.length>=2){for(var i=j2(r,function(f){return f.coordinate}),s=1/0,o=1,l=i.length;o<l;o++){var u=i[o],d=i[o-1];s=Math.min((u.coordinate||0)-(d.coordinate||0),s)}return s===1/0?0:s}return n?void 0:0},xM=function(t,r,n){return!t||!t.length||sy(t,Tn(n,"type.defaultProps.domain"))?r:t},q8=function(t,r){var n=t.type.defaultProps?Dt(Dt({},t.type.defaultProps),t.props):t.props,a=n.dataKey,i=n.name,s=n.unit,o=n.formatter,l=n.tooltipType,u=n.chartType,d=n.hide;return Dt(Dt({},qe(t,!1)),{},{dataKey:a,unit:s,formatter:o,name:i||a,color:oN(t),value:un(r,a),type:l,payload:r,chartType:u,hide:d})};function xf(e){"@babel/helpers - typeof";return xf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xf(e)}function bM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function wM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bM(Object(r),!0).forEach(function(n){KEe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KEe(e,t,r){return t=YEe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YEe(e){var t=XEe(e,"string");return xf(t)=="symbol"?t:t+""}function XEe(e,t){if(xf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(xf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var g0=Math.PI/180,ZEe=function(t){return t*180/Math.PI},gr=function(t,r,n,a){return{x:t+Math.cos(-g0*a)*n,y:r+Math.sin(-g0*a)*n}},QEe=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return Math.sqrt(Math.pow(n-i,2)+Math.pow(a-s,2))},JEe=function(t,r){var n=t.x,a=t.y,i=r.cx,s=r.cy,o=QEe({x:n,y:a},{x:i,y:s});if(o<=0)return{radius:o};var l=(n-i)/o,u=Math.acos(l);return a>s&&(u=2*Math.PI-u),{radius:o,angle:ZEe(u),angleInRadian:u}},ePe=function(t){var r=t.startAngle,n=t.endAngle,a=Math.floor(r/360),i=Math.floor(n/360),s=Math.min(a,i);return{startAngle:r-s*360,endAngle:n-s*360}},tPe=function(t,r){var n=r.startAngle,a=r.endAngle,i=Math.floor(n/360),s=Math.floor(a/360),o=Math.min(i,s);return t+o*360},jM=function(t,r){var n=t.x,a=t.y,i=JEe({x:n,y:a},r),s=i.radius,o=i.angle,l=r.innerRadius,u=r.outerRadius;if(s<l||s>u)return!1;if(s===0)return!0;var d=ePe(r),f=d.startAngle,h=d.endAngle,p=o,m;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;m=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;m=p>=h&&p<=f}return m?wM(wM({},r),{},{radius:s,angle:tPe(p,r)}):null};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)}var rPe=["offset"];function nPe(e){return oPe(e)||sPe(e)||iPe(e)||aPe()}function aPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
584
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iPe(e,t){if(e){if(typeof e=="string")return oj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return oj(e,t)}}function sPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oPe(e){if(Array.isArray(e))return oj(e)}function oj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lPe(e,t){if(e==null)return{};var r=cPe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function cPe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function kM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kM(Object(r),!0).forEach(function(n){uPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uPe(e,t,r){return t=dPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dPe(e){var t=fPe(e,"string");return bf(t)=="symbol"?t:t+""}function fPe(e,t){if(bf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(bf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wf(){return wf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wf.apply(this,arguments)}var hPe=function(t){var r=t.value,n=t.formatter,a=Fe(t.children)?r:t.children;return $e(n)?n(a):a},pPe=function(t,r){var n=ra(r-t),a=Math.min(Math.abs(r-t),360);return n*a},mPe=function(t,r,n){var a=t.position,i=t.viewBox,s=t.offset,o=t.className,l=i,u=l.cx,d=l.cy,f=l.innerRadius,h=l.outerRadius,p=l.startAngle,m=l.endAngle,g=l.clockWise,b=(f+h)/2,v=pPe(p,m),y=v>=0?1:-1,x,j;a==="insideStart"?(x=p+y*s,j=g):a==="insideEnd"?(x=m-y*s,j=!g):a==="end"&&(x=m+y*s,j=g),j=v<=0?j:!j;var w=gr(u,d,b,x),S=gr(u,d,b,x+(j?1:-1)*359),k="M".concat(w.x,",").concat(w.y,`
|
|
585
|
-
A`).concat(b,",").concat(b,",0,1,").concat(j?0:1,`,
|
|
586
|
-
`).concat(S.x,",").concat(S.y),_=Fe(t.id)?ah("recharts-radial-line-"):t.id;return T.createElement("text",wf({},n,{dominantBaseline:"central",className:Ke("recharts-radial-bar-label",o)}),T.createElement("defs",null,T.createElement("path",{id:_,d:k})),T.createElement("textPath",{xlinkHref:"#".concat(_)},r))},gPe=function(t){var r=t.viewBox,n=t.offset,a=t.position,i=r,s=i.cx,o=i.cy,l=i.innerRadius,u=i.outerRadius,d=i.startAngle,f=i.endAngle,h=(d+f)/2;if(a==="outside"){var p=gr(s,o,u+n,h),m=p.x,g=p.y;return{x:m,y:g,textAnchor:m>=s?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:s,y:o,textAnchor:"middle",verticalAnchor:"end"};var b=(l+u)/2,v=gr(s,o,b,h),y=v.x,x=v.y;return{x:y,y:x,textAnchor:"middle",verticalAnchor:"middle"}},yPe=function(t){var r=t.viewBox,n=t.parentViewBox,a=t.offset,i=t.position,s=r,o=s.x,l=s.y,u=s.width,d=s.height,f=d>=0?1:-1,h=f*a,p=f>0?"end":"start",m=f>0?"start":"end",g=u>=0?1:-1,b=g*a,v=g>0?"end":"start",y=g>0?"start":"end";if(i==="top"){var x={x:o+u/2,y:l-f*a,textAnchor:"middle",verticalAnchor:p};return er(er({},x),n?{height:Math.max(l-n.y,0),width:u}:{})}if(i==="bottom"){var j={x:o+u/2,y:l+d+h,textAnchor:"middle",verticalAnchor:m};return er(er({},j),n?{height:Math.max(n.y+n.height-(l+d),0),width:u}:{})}if(i==="left"){var w={x:o-b,y:l+d/2,textAnchor:v,verticalAnchor:"middle"};return er(er({},w),n?{width:Math.max(w.x-n.x,0),height:d}:{})}if(i==="right"){var S={x:o+u+b,y:l+d/2,textAnchor:y,verticalAnchor:"middle"};return er(er({},S),n?{width:Math.max(n.x+n.width-S.x,0),height:d}:{})}var k=n?{width:u,height:d}:{};return i==="insideLeft"?er({x:o+b,y:l+d/2,textAnchor:y,verticalAnchor:"middle"},k):i==="insideRight"?er({x:o+u-b,y:l+d/2,textAnchor:v,verticalAnchor:"middle"},k):i==="insideTop"?er({x:o+u/2,y:l+h,textAnchor:"middle",verticalAnchor:m},k):i==="insideBottom"?er({x:o+u/2,y:l+d-h,textAnchor:"middle",verticalAnchor:p},k):i==="insideTopLeft"?er({x:o+b,y:l+h,textAnchor:y,verticalAnchor:m},k):i==="insideTopRight"?er({x:o+u-b,y:l+h,textAnchor:v,verticalAnchor:m},k):i==="insideBottomLeft"?er({x:o+b,y:l+d-h,textAnchor:y,verticalAnchor:p},k):i==="insideBottomRight"?er({x:o+u-b,y:l+d-h,textAnchor:v,verticalAnchor:p},k):Kc(i)&&(re(i.x)||so(i.x))&&(re(i.y)||so(i.y))?er({x:o+To(i.x,u),y:l+To(i.y,d),textAnchor:"end",verticalAnchor:"end"},k):er({x:o+u/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},k)},vPe=function(t){return"cx"in t&&re(t.cx)};function Nr(e){var t=e.offset,r=t===void 0?5:t,n=lPe(e,rPe),a=er({offset:r},n),i=a.viewBox,s=a.position,o=a.value,l=a.children,u=a.content,d=a.className,f=d===void 0?"":d,h=a.textBreakAll;if(!i||Fe(o)&&Fe(l)&&!N.isValidElement(u)&&!$e(u))return null;if(N.isValidElement(u))return N.cloneElement(u,a);var p;if($e(u)){if(p=N.createElement(u,a),N.isValidElement(p))return p}else p=hPe(a);var m=vPe(i),g=qe(a,!0);if(m&&(s==="insideStart"||s==="insideEnd"||s==="end"))return mPe(a,p,g);var b=m?gPe(a):yPe(a);return T.createElement(a0,wf({className:Ke("recharts-label",f)},g,b,{breakAll:h}),p)}Nr.displayName="Label";var G8=function(t){var r=t.cx,n=t.cy,a=t.angle,i=t.startAngle,s=t.endAngle,o=t.r,l=t.radius,u=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,m=t.left,g=t.width,b=t.height,v=t.clockWise,y=t.labelViewBox;if(y)return y;if(re(g)&&re(b)){if(re(f)&&re(h))return{x:f,y:h,width:g,height:b};if(re(p)&&re(m))return{x:p,y:m,width:g,height:b}}return re(f)&&re(h)?{x:f,y:h,width:0,height:0}:re(r)&&re(n)?{cx:r,cy:n,startAngle:i||a||0,endAngle:s||a||0,innerRadius:u||0,outerRadius:d||l||o||0,clockWise:v}:t.viewBox?t.viewBox:{}},xPe=function(t,r){return t?t===!0?T.createElement(Nr,{key:"label-implicit",viewBox:r}):nr(t)?T.createElement(Nr,{key:"label-implicit",viewBox:r,value:t}):N.isValidElement(t)?t.type===Nr?N.cloneElement(t,{key:"label-implicit",viewBox:r}):T.createElement(Nr,{key:"label-implicit",content:t,viewBox:r}):$e(t)?T.createElement(Nr,{key:"label-implicit",content:t,viewBox:r}):Kc(t)?T.createElement(Nr,wf({viewBox:r},t,{key:"label-implicit"})):null:null},bPe=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&n&&!t.label)return null;var a=t.children,i=G8(t),s=Mn(a,Nr).map(function(l,u){return N.cloneElement(l,{viewBox:r||i,key:"label-".concat(u)})});if(!n)return s;var o=xPe(t.label,r||i);return[o].concat(nPe(s))};Nr.parseViewBox=G8;Nr.renderCallByParent=bPe;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)}var wPe=["valueAccessor"],jPe=["data","dataKey","clockWise","id","textBreakAll"];function kPe(e){return EPe(e)||_Pe(e)||NPe(e)||SPe()}function SPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
587
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NPe(e,t){if(e){if(typeof e=="string")return lj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return lj(e,t)}}function _Pe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function EPe(e){if(Array.isArray(e))return lj(e)}function lj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function y0(){return y0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},y0.apply(this,arguments)}function SM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function NM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SM(Object(r),!0).forEach(function(n){PPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PPe(e,t,r){return t=APe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function APe(e){var t=OPe(e,"string");return jf(t)=="symbol"?t:t+""}function OPe(e,t){if(jf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _M(e,t){if(e==null)return{};var r=CPe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function CPe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var TPe=function(t){return Array.isArray(t.value)?b0e(t.value):t.value};function ds(e){var t=e.valueAccessor,r=t===void 0?TPe:t,n=_M(e,wPe),a=n.data,i=n.dataKey,s=n.clockWise,o=n.id,l=n.textBreakAll,u=_M(n,jPe);return!a||!a.length?null:T.createElement(Bt,{className:"recharts-label-list"},a.map(function(d,f){var h=Fe(i)?r(d,f):un(d&&d.payload,i),p=Fe(o)?{}:{id:"".concat(o,"-").concat(f)};return T.createElement(Nr,y0({},qe(d,!0),u,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:l,viewBox:Nr.parseViewBox(Fe(s)?d:NM(NM({},d),{},{clockWise:s})),key:"label-".concat(f),index:f}))}))}ds.displayName="LabelList";function MPe(e,t){return e?e===!0?T.createElement(ds,{key:"labelList-implicit",data:t}):T.isValidElement(e)||$e(e)?T.createElement(ds,{key:"labelList-implicit",data:t,content:e}):Kc(e)?T.createElement(ds,y0({data:t},e,{key:"labelList-implicit"})):null:null}function $Pe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&r&&!e.label)return null;var n=e.children,a=Mn(n,ds).map(function(s,o){return N.cloneElement(s,{data:t,key:"labelList-".concat(o)})});if(!r)return a;var i=MPe(e.label,t);return[i].concat(kPe(a))}ds.renderCallByParent=$Pe;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 cj(){return cj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cj.apply(this,arguments)}function EM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function PM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EM(Object(r),!0).forEach(function(n){RPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RPe(e,t,r){return t=DPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DPe(e){var t=IPe(e,"string");return kf(t)=="symbol"?t:t+""}function IPe(e,t){if(kf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LPe=function(t,r){var n=ra(r-t),a=Math.min(Math.abs(r-t),359.999);return n*a},cp=function(t){var r=t.cx,n=t.cy,a=t.radius,i=t.angle,s=t.sign,o=t.isExternal,l=t.cornerRadius,u=t.cornerIsExternal,d=l*(o?1:-1)+a,f=Math.asin(l/d)/g0,h=u?i:i+s*f,p=gr(r,n,d,h),m=gr(r,n,a,h),g=u?i-s*f:i,b=gr(r,n,d*Math.cos(f*g0),g);return{center:p,circleTangency:m,lineTangency:b,theta:f}},K8=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.startAngle,o=t.endAngle,l=LPe(s,o),u=s+l,d=gr(r,n,i,s),f=gr(r,n,i,u),h="M ".concat(d.x,",").concat(d.y,`
|
|
588
|
-
A `).concat(i,",").concat(i,`,0,
|
|
589
|
-
`).concat(+(Math.abs(l)>180),",").concat(+(s>u),`,
|
|
590
|
-
`).concat(f.x,",").concat(f.y,`
|
|
591
|
-
`);if(a>0){var p=gr(r,n,a,s),m=gr(r,n,a,u);h+="L ".concat(m.x,",").concat(m.y,`
|
|
592
|
-
A `).concat(a,",").concat(a,`,0,
|
|
593
|
-
`).concat(+(Math.abs(l)>180),",").concat(+(s<=u),`,
|
|
594
|
-
`).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(r,",").concat(n," Z");return h},zPe=function(t){var r=t.cx,n=t.cy,a=t.innerRadius,i=t.outerRadius,s=t.cornerRadius,o=t.forceCornerRadius,l=t.cornerIsExternal,u=t.startAngle,d=t.endAngle,f=ra(d-u),h=cp({cx:r,cy:n,radius:i,angle:u,sign:f,cornerRadius:s,cornerIsExternal:l}),p=h.circleTangency,m=h.lineTangency,g=h.theta,b=cp({cx:r,cy:n,radius:i,angle:d,sign:-f,cornerRadius:s,cornerIsExternal:l}),v=b.circleTangency,y=b.lineTangency,x=b.theta,j=l?Math.abs(u-d):Math.abs(u-d)-g-x;if(j<0)return o?"M ".concat(m.x,",").concat(m.y,`
|
|
595
|
-
a`).concat(s,",").concat(s,",0,0,1,").concat(s*2,`,0
|
|
596
|
-
a`).concat(s,",").concat(s,",0,0,1,").concat(-s*2,`,0
|
|
597
|
-
`):K8({cx:r,cy:n,innerRadius:a,outerRadius:i,startAngle:u,endAngle:d});var w="M ".concat(m.x,",").concat(m.y,`
|
|
598
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,`
|
|
599
|
-
A`).concat(i,",").concat(i,",0,").concat(+(j>180),",").concat(+(f<0),",").concat(v.x,",").concat(v.y,`
|
|
600
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(y.x,",").concat(y.y,`
|
|
601
|
-
`);if(a>0){var S=cp({cx:r,cy:n,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),k=S.circleTangency,_=S.lineTangency,E=S.theta,A=cp({cx:r,cy:n,radius:a,angle:d,sign:-f,isExternal:!0,cornerRadius:s,cornerIsExternal:l}),C=A.circleTangency,M=A.lineTangency,O=A.theta,P=l?Math.abs(u-d):Math.abs(u-d)-E-O;if(P<0&&s===0)return"".concat(w,"L").concat(r,",").concat(n,"Z");w+="L".concat(M.x,",").concat(M.y,`
|
|
602
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(C.x,",").concat(C.y,`
|
|
603
|
-
A`).concat(a,",").concat(a,",0,").concat(+(P>180),",").concat(+(f>0),",").concat(k.x,",").concat(k.y,`
|
|
604
|
-
A`).concat(s,",").concat(s,",0,0,").concat(+(f<0),",").concat(_.x,",").concat(_.y,"Z")}else w+="L".concat(r,",").concat(n,"Z");return w},FPe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Y8=function(t){var r=PM(PM({},FPe),t),n=r.cx,a=r.cy,i=r.innerRadius,s=r.outerRadius,o=r.cornerRadius,l=r.forceCornerRadius,u=r.cornerIsExternal,d=r.startAngle,f=r.endAngle,h=r.className;if(s<i||d===f)return null;var p=Ke("recharts-sector",h),m=s-i,g=To(o,m,0,!0),b;return g>0&&Math.abs(d-f)<360?b=zPe({cx:n,cy:a,innerRadius:i,outerRadius:s,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:u,startAngle:d,endAngle:f}):b=K8({cx:n,cy:a,innerRadius:i,outerRadius:s,startAngle:d,endAngle:f}),T.createElement("path",cj({},qe(r,!0),{className:p,d:b,role:"img"}))};function Sf(e){"@babel/helpers - typeof";return Sf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sf(e)}function uj(){return uj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},uj.apply(this,arguments)}function AM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function OM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AM(Object(r),!0).forEach(function(n){BPe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BPe(e,t,r){return t=VPe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VPe(e){var t=UPe(e,"string");return Sf(t)=="symbol"?t:t+""}function UPe(e,t){if(Sf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Sf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var CM={curveBasisClosed:Uje,curveBasisOpen:Hje,curveBasis:Vje,curveBumpX:Pje,curveBumpY:Aje,curveLinearClosed:Wje,curveLinear:Zg,curveMonotoneX:qje,curveMonotoneY:Gje,curveNatural:Kje,curveStep:Yje,curveStepAfter:Zje,curveStepBefore:Xje},up=function(t){return t.x===+t.x&&t.y===+t.y},Iu=function(t){return t.x},Lu=function(t){return t.y},HPe=function(t,r){if($e(t))return t;var n="curve".concat(Yg(t));return(n==="curveMonotone"||n==="curveBump")&&r?CM["".concat(n).concat(r==="vertical"?"Y":"X")]:CM[n]||Zg},WPe=function(t){var r=t.type,n=r===void 0?"linear":r,a=t.points,i=a===void 0?[]:a,s=t.baseLine,o=t.layout,l=t.connectNulls,u=l===void 0?!1:l,d=HPe(n,o),f=u?i.filter(function(g){return up(g)}):i,h;if(Array.isArray(s)){var p=u?s.filter(function(g){return up(g)}):s,m=f.map(function(g,b){return OM(OM({},g),{},{base:p[b]})});return o==="vertical"?h=np().y(Lu).x1(Iu).x0(function(g){return g.base.x}):h=np().x(Iu).y1(Lu).y0(function(g){return g.base.y}),h.defined(up).curve(d),h(m)}return o==="vertical"&&re(s)?h=np().y(Lu).x1(Iu).x0(s):re(s)?h=np().x(Iu).y1(Lu).y0(s):h=jz().x(Iu).y(Lu),h.defined(up).curve(d),h(f)},dj=function(t){var r=t.className,n=t.points,a=t.path,i=t.pathRef;if((!n||!n.length)&&!a)return null;var s=n&&n.length?WPe(t):a;return N.createElement("path",uj({},qe(t,!1),qm(t),{className:Ke("recharts-curve",r),d:s,ref:i}))},X8={exports:{}},qPe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",GPe=qPe,KPe=GPe;function Z8(){}function Q8(){}Q8.resetWarningCache=Z8;var YPe=function(){function e(n,a,i,s,o,l){if(l!==KPe){var u=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 u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Q8,resetWarningCache:Z8};return r.PropTypes=r,r};X8.exports=YPe();var XPe=X8.exports;const tt=Je(XPe);var ZPe=Object.getOwnPropertyNames,QPe=Object.getOwnPropertySymbols,JPe=Object.prototype.hasOwnProperty;function TM(e,t){return function(n,a,i){return e(n,a,i)&&t(n,a,i)}}function dp(e){return function(r,n,a){if(!r||!n||typeof r!="object"||typeof n!="object")return e(r,n,a);var i=a.cache,s=i.get(r),o=i.get(n);if(s&&o)return s===n&&o===r;i.set(r,n),i.set(n,r);var l=e(r,n,a);return i.delete(r),i.delete(n),l}}function eAe(e){return e!=null?e[Symbol.toStringTag]:void 0}function MM(e){return ZPe(e).concat(QPe(e))}var tAe=Object.hasOwn||function(e,t){return JPe.call(e,t)};function qo(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var rAe="__v",nAe="__o",aAe="_owner",$M=Object.getOwnPropertyDescriptor,RM=Object.keys;function iAe(e,t,r){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function sAe(e,t){return qo(e.getTime(),t.getTime())}function oAe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function lAe(e,t){return e===t}function DM(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.entries(),s,o,l=0;(s=i.next())&&!s.done;){for(var u=t.entries(),d=!1,f=0;(o=u.next())&&!o.done;){if(a[f]){f++;continue}var h=s.value,p=o.value;if(r.equals(h[0],p[0],l,f,e,t,r)&&r.equals(h[1],p[1],h[0],p[0],e,t,r)){d=a[f]=!0;break}f++}if(!d)return!1;l++}return!0}var cAe=qo;function uAe(e,t,r){var n=RM(e),a=n.length;if(RM(t).length!==a)return!1;for(;a-- >0;)if(!J8(e,t,r,n[a]))return!1;return!0}function zu(e,t,r){var n=MM(e),a=n.length;if(MM(t).length!==a)return!1;for(var i,s,o;a-- >0;)if(i=n[a],!J8(e,t,r,i)||(s=$M(e,i),o=$M(t,i),(s||o)&&(!s||!o||s.configurable!==o.configurable||s.enumerable!==o.enumerable||s.writable!==o.writable)))return!1;return!0}function dAe(e,t){return qo(e.valueOf(),t.valueOf())}function fAe(e,t){return e.source===t.source&&e.flags===t.flags}function IM(e,t,r){var n=e.size;if(n!==t.size)return!1;if(!n)return!0;for(var a=new Array(n),i=e.values(),s,o;(s=i.next())&&!s.done;){for(var l=t.values(),u=!1,d=0;(o=l.next())&&!o.done;){if(!a[d]&&r.equals(s.value,o.value,s.value,o.value,e,t,r)){u=a[d]=!0;break}d++}if(!u)return!1}return!0}function hAe(e,t){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function pAe(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 J8(e,t,r,n){return(n===aAe||n===nAe||n===rAe)&&(e.$$typeof||t.$$typeof)?!0:tAe(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}var mAe="[object Arguments]",gAe="[object Boolean]",yAe="[object Date]",vAe="[object Error]",xAe="[object Map]",bAe="[object Number]",wAe="[object Object]",jAe="[object RegExp]",kAe="[object Set]",SAe="[object String]",NAe="[object URL]",_Ae=Array.isArray,LM=typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView:null,zM=Object.assign,EAe=Object.prototype.toString.call.bind(Object.prototype.toString);function PAe(e){var t=e.areArraysEqual,r=e.areDatesEqual,n=e.areErrorsEqual,a=e.areFunctionsEqual,i=e.areMapsEqual,s=e.areNumbersEqual,o=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,u=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual,p=e.unknownTagComparators;return function(g,b,v){if(g===b)return!0;if(g==null||b==null)return!1;var y=typeof g;if(y!==typeof b)return!1;if(y!=="object")return y==="number"?s(g,b,v):y==="function"?a(g,b,v):!1;var x=g.constructor;if(x!==b.constructor)return!1;if(x===Object)return o(g,b,v);if(_Ae(g))return t(g,b,v);if(LM!=null&&LM(g))return f(g,b,v);if(x===Date)return r(g,b,v);if(x===RegExp)return u(g,b,v);if(x===Map)return i(g,b,v);if(x===Set)return d(g,b,v);var j=EAe(g);if(j===yAe)return r(g,b,v);if(j===jAe)return u(g,b,v);if(j===xAe)return i(g,b,v);if(j===kAe)return d(g,b,v);if(j===wAe)return typeof g.then!="function"&&typeof b.then!="function"&&o(g,b,v);if(j===NAe)return h(g,b,v);if(j===vAe)return n(g,b,v);if(j===mAe)return o(g,b,v);if(j===gAe||j===bAe||j===SAe)return l(g,b,v);if(p){var w=p[j];if(!w){var S=eAe(g);S&&(w=p[S])}if(w)return w(g,b,v)}return!1}}function AAe(e){var t=e.circular,r=e.createCustomConfig,n=e.strict,a={areArraysEqual:n?zu:iAe,areDatesEqual:sAe,areErrorsEqual:oAe,areFunctionsEqual:lAe,areMapsEqual:n?TM(DM,zu):DM,areNumbersEqual:cAe,areObjectsEqual:n?zu:uAe,arePrimitiveWrappersEqual:dAe,areRegExpsEqual:fAe,areSetsEqual:n?TM(IM,zu):IM,areTypedArraysEqual:n?zu:hAe,areUrlsEqual:pAe,unknownTagComparators:void 0};if(r&&(a=zM({},a,r(a))),t){var i=dp(a.areArraysEqual),s=dp(a.areMapsEqual),o=dp(a.areObjectsEqual),l=dp(a.areSetsEqual);a=zM({},a,{areArraysEqual:i,areMapsEqual:s,areObjectsEqual:o,areSetsEqual:l})}return a}function OAe(e){return function(t,r,n,a,i,s,o){return e(t,r,o)}}function CAe(e){var t=e.circular,r=e.comparator,n=e.createState,a=e.equals,i=e.strict;if(n)return function(l,u){var d=n(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return r(l,u,{cache:h,equals:a,meta:p,strict:i})};if(t)return function(l,u){return r(l,u,{cache:new WeakMap,equals:a,meta:void 0,strict:i})};var s={cache:void 0,equals:a,meta:void 0,strict:i};return function(l,u){return r(l,u,s)}}var TAe=Rs();Rs({strict:!0});Rs({circular:!0});Rs({circular:!0,strict:!0});Rs({createInternalComparator:function(){return qo}});Rs({strict:!0,createInternalComparator:function(){return qo}});Rs({circular:!0,createInternalComparator:function(){return qo}});Rs({circular:!0,createInternalComparator:function(){return qo},strict:!0});function Rs(e){e===void 0&&(e={});var t=e.circular,r=t===void 0?!1:t,n=e.createInternalComparator,a=e.createState,i=e.strict,s=i===void 0?!1:i,o=AAe(e),l=PAe(o),u=n?n(l):OAe(l);return CAe({circular:r,comparator:l,createState:a,equals:u,strict:s})}function MAe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function FM(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=-1,n=function a(i){r<0&&(r=i),i-r>t?(e(i),r=-1):MAe(a)};requestAnimationFrame(n)}function fj(e){"@babel/helpers - typeof";return fj=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},fj(e)}function $Ae(e){return LAe(e)||IAe(e)||DAe(e)||RAe()}function RAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
605
|
-
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 BM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return BM(e,t)}}function BM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function IAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function LAe(e){if(Array.isArray(e))return e}function zAe(){var e={},t=function(){return null},r=!1,n=function a(i){if(!r){if(Array.isArray(i)){if(!i.length)return;var s=i,o=$Ae(s),l=o[0],u=o.slice(1);if(typeof l=="number"){FM(a.bind(null,u),l);return}a(l),FM(a.bind(null,u));return}fj(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){r=!0},start:function(i){r=!1,n(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Nf(e){"@babel/helpers - typeof";return Nf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nf(e)}function VM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function UM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VM(Object(r),!0).forEach(function(n){eF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eF(e,t,r){return t=FAe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FAe(e){var t=BAe(e,"string");return Nf(t)==="symbol"?t:String(t)}function BAe(e,t){if(Nf(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nf(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VAe=function(t,r){return[Object.keys(t),Object.keys(r)].reduce(function(n,a){return n.filter(function(i){return a.includes(i)})})},UAe=function(t){return t},HAe=function(t){return t.replace(/([A-Z])/g,function(r){return"-".concat(r.toLowerCase())})},bd=function(t,r){return Object.keys(r).reduce(function(n,a){return UM(UM({},n),{},eF({},a,t(a,r[a])))},{})},HM=function(t,r,n){return t.map(function(a){return"".concat(HAe(a)," ").concat(r,"ms ").concat(n)}).join(",")};function WAe(e,t){return KAe(e)||GAe(e,t)||tF(e,t)||qAe()}function qAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
606
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GAe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function KAe(e){if(Array.isArray(e))return e}function YAe(e){return QAe(e)||ZAe(e)||tF(e)||XAe()}function XAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
607
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tF(e,t){if(e){if(typeof e=="string")return hj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hj(e,t)}}function ZAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function QAe(e){if(Array.isArray(e))return hj(e)}function hj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var v0=1e-4,rF=function(t,r){return[0,3*t,3*r-6*t,3*t-3*r+1]},nF=function(t,r){return t.map(function(n,a){return n*Math.pow(r,a)}).reduce(function(n,a){return n+a})},WM=function(t,r){return function(n){var a=rF(t,r);return nF(a,n)}},JAe=function(t,r){return function(n){var a=rF(t,r),i=[].concat(YAe(a.map(function(s,o){return s*o}).slice(1)),[0]);return nF(i,n)}},qM=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0],i=r[1],s=r[2],o=r[3];if(r.length===1)switch(r[0]){case"linear":a=0,i=0,s=1,o=1;break;case"ease":a=.25,i=.1,s=.25,o=1;break;case"ease-in":a=.42,i=0,s=1,o=1;break;case"ease-out":a=.42,i=0,s=.58,o=1;break;case"ease-in-out":a=0,i=0,s=.58,o=1;break;default:{var l=r[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var u=l[1].split(")")[0].split(",").map(function(b){return parseFloat(b)}),d=WAe(u,4);a=d[0],i=d[1],s=d[2],o=d[3]}}}var f=WM(a,s),h=WM(i,o),p=JAe(a,s),m=function(v){return v>1?1:v<0?0:v},g=function(v){for(var y=v>1?1:v,x=y,j=0;j<8;++j){var w=f(x)-y,S=p(x);if(Math.abs(w-y)<v0||S<v0)return h(x);x=m(x-w/S)}return h(x)};return g.isStepper=!1,g},eOe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.stiff,n=r===void 0?100:r,a=t.damping,i=a===void 0?8:a,s=t.dt,o=s===void 0?17:s,l=function(d,f,h){var p=-(d-f)*n,m=h*i,g=h+(p-m)*o/1e3,b=h*o/1e3+d;return Math.abs(b-f)<v0&&Math.abs(g)<v0?[f,0]:[b,g]};return l.isStepper=!0,l.dt=o,l},tOe=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var a=r[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return qM(a);case"spring":return eOe();default:if(a.split("(")[0]==="cubic-bezier")return qM(a)}return typeof a=="function"?a:null};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 GM(e){return aOe(e)||nOe(e)||aF(e)||rOe()}function rOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
608
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nOe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function aOe(e){if(Array.isArray(e))return mj(e)}function KM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?KM(Object(r),!0).forEach(function(n){pj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pj(e,t,r){return t=iOe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iOe(e){var t=sOe(e,"string");return _f(t)==="symbol"?t:String(t)}function sOe(e,t){if(_f(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_f(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oOe(e,t){return uOe(e)||cOe(e,t)||aF(e,t)||lOe()}function lOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
609
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aF(e,t){if(e){if(typeof e=="string")return mj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mj(e,t)}}function mj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function cOe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function uOe(e){if(Array.isArray(e))return e}var x0=function(t,r,n){return t+(r-t)*n},gj=function(t){var r=t.from,n=t.to;return r!==n},dOe=function e(t,r,n){var a=bd(function(i,s){if(gj(s)){var o=t(s.from,s.to,s.velocity),l=oOe(o,2),u=l[0],d=l[1];return hr(hr({},s),{},{from:u,velocity:d})}return s},r);return n<1?bd(function(i,s){return gj(s)?hr(hr({},s),{},{velocity:x0(s.velocity,a[i].velocity,n),from:x0(s.from,a[i].from,n)}):s},r):e(t,a,n-1)};const fOe=function(e,t,r,n,a){var i=VAe(e,t),s=i.reduce(function(b,v){return hr(hr({},b),{},pj({},v,[e[v],t[v]]))},{}),o=i.reduce(function(b,v){return hr(hr({},b),{},pj({},v,{from:e[v],velocity:0,to:t[v]}))},{}),l=-1,u,d,f=function(){return null},h=function(){return bd(function(v,y){return y.from},o)},p=function(){return!Object.values(o).filter(gj).length},m=function(v){u||(u=v);var y=v-u,x=y/r.dt;o=dOe(r,o,x),a(hr(hr(hr({},e),t),h())),u=v,p()||(l=requestAnimationFrame(f))},g=function(v){d||(d=v);var y=(v-d)/n,x=bd(function(w,S){return x0.apply(void 0,GM(S).concat([r(y)]))},s);if(a(hr(hr(hr({},e),t),x)),y<1)l=requestAnimationFrame(f);else{var j=bd(function(w,S){return x0.apply(void 0,GM(S).concat([r(1)]))},s);a(hr(hr(hr({},e),t),j))}};return f=r.isStepper?m:g,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}};function jc(e){"@babel/helpers - typeof";return jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jc(e)}var hOe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function pOe(e,t){if(e==null)return{};var r=mOe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function mOe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function jb(e){return xOe(e)||vOe(e)||yOe(e)||gOe()}function gOe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
610
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yOe(e,t){if(e){if(typeof e=="string")return yj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yj(e,t)}}function vOe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xOe(e){if(Array.isArray(e))return yj(e)}function yj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function YM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Hn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YM(Object(r),!0).forEach(function(n){td(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function td(e,t,r){return t=iF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wOe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,iF(n.key),n)}}function jOe(e,t,r){return t&&wOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iF(e){var t=kOe(e,"string");return jc(t)==="symbol"?t:String(t)}function kOe(e,t){if(jc(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(jc(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SOe(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&&vj(e,t)}function vj(e,t){return vj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},vj(e,t)}function NOe(e){var t=_Oe();return function(){var n=b0(e),a;if(t){var i=b0(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return xj(this,a)}}function xj(e,t){if(t&&(jc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bj(e)}function bj(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _Oe(){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 b0(e){return b0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},b0(e)}var mi=function(e){SOe(r,e);var t=NOe(r);function r(n,a){var i;bOe(this,r),i=t.call(this,n,a);var s=i.props,o=s.isActive,l=s.attributeName,u=s.from,d=s.to,f=s.steps,h=s.children,p=s.duration;if(i.handleStyleChange=i.handleStyleChange.bind(bj(i)),i.changeStyle=i.changeStyle.bind(bj(i)),!o||p<=0)return i.state={style:{}},typeof h=="function"&&(i.state={style:d}),xj(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof h=="function")return i.state={style:u},xj(i);i.state={style:l?td({},l,u):u}}else i.state={style:{}};return i}return jOe(r,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,s=a.canBegin;this.mounted=!0,!(!i||!s)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,s=i.isActive,o=i.canBegin,l=i.attributeName,u=i.shouldReAnimate,d=i.to,f=i.from,h=this.state.style;if(o){if(!s){var p={style:l?td({},l,d):d};this.state&&h&&(l&&h[l]!==d||!l&&h!==d)&&this.setState(p);return}if(!(TAe(a.to,d)&&a.canBegin&&a.isActive)){var m=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=m||u?f:a.to;if(this.state&&h){var b={style:l?td({},l,g):g};(l&&h[l]!==g||!l&&h!==g)&&this.setState(b)}this.runAnimation(Hn(Hn({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,s=a.from,o=a.to,l=a.duration,u=a.easing,d=a.begin,f=a.onAnimationEnd,h=a.onAnimationStart,p=fOe(s,o,tOe(u),l,this.changeStyle),m=function(){i.stopJSAnimation=p()};this.manager.start([h,d,m,l,f])}},{key:"runStepAnimation",value:function(a){var i=this,s=a.steps,o=a.begin,l=a.onAnimationStart,u=s[0],d=u.style,f=u.duration,h=f===void 0?0:f,p=function(g,b,v){if(v===0)return g;var y=b.duration,x=b.easing,j=x===void 0?"ease":x,w=b.style,S=b.properties,k=b.onAnimationEnd,_=v>0?s[v-1]:b,E=S||Object.keys(w);if(typeof j=="function"||j==="spring")return[].concat(jb(g),[i.runJSAnimation.bind(i,{from:_.style,to:w,duration:y,easing:j}),y]);var A=HM(E,y,j),C=Hn(Hn(Hn({},_.style),w),{},{transition:A});return[].concat(jb(g),[C,y,k]).filter(UAe)};return this.manager.start([l].concat(jb(s.reduce(p,[d,Math.max(h,o)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=zAe());var i=a.begin,s=a.duration,o=a.attributeName,l=a.to,u=a.easing,d=a.onAnimationStart,f=a.onAnimationEnd,h=a.steps,p=a.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof u=="function"||typeof p=="function"||u==="spring"){this.runJSAnimation(a);return}if(h.length>1){this.runStepAnimation(a);return}var g=o?td({},o,l):l,b=HM(Object.keys(g),s,u);m.start([d,i,Hn(Hn({},g),{},{transition:b}),s,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var s=a.duration;a.attributeName,a.easing;var o=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var l=pOe(a,hOe),u=N.Children.count(i),d=this.state.style;if(typeof i=="function")return i(d);if(!o||u===0||s<=0)return i;var f=function(p){var m=p.props,g=m.style,b=g===void 0?{}:g,v=m.className,y=N.cloneElement(p,Hn(Hn({},l),{},{style:Hn(Hn({},b),d),className:v}));return y};return u===1?f(N.Children.only(i)):T.createElement("div",null,N.Children.map(i,function(h){return f(h)}))}}]),r}(N.PureComponent);mi.displayName="Animate";mi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};mi.propTypes={from:tt.oneOfType([tt.object,tt.string]),to:tt.oneOfType([tt.object,tt.string]),attributeName:tt.string,duration:tt.number,begin:tt.number,easing:tt.oneOfType([tt.string,tt.func]),steps:tt.arrayOf(tt.shape({duration:tt.number.isRequired,style:tt.object.isRequired,easing:tt.oneOfType([tt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),tt.func]),properties:tt.arrayOf("string"),onAnimationEnd:tt.func})),children:tt.oneOfType([tt.node,tt.func]),isActive:tt.bool,canBegin:tt.bool,onAnimationEnd:tt.func,shouldReAnimate:tt.bool,onAnimationStart:tt.func,onAnimationReStart:tt.func};function Ef(e){"@babel/helpers - typeof";return Ef=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(e)}function w0(){return w0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},w0.apply(this,arguments)}function EOe(e,t){return COe(e)||OOe(e,t)||AOe(e,t)||POe()}function POe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
611
|
-
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 XM(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return XM(e,t)}}function XM(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function OOe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function COe(e){if(Array.isArray(e))return e}function ZM(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function QM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZM(Object(r),!0).forEach(function(n){TOe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZM(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TOe(e,t,r){return t=MOe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MOe(e){var t=$Oe(e,"string");return Ef(t)=="symbol"?t:t+""}function $Oe(e,t){if(Ef(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ef(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JM=function(t,r,n,a,i){var s=Math.min(Math.abs(n)/2,Math.abs(a)/2),o=a>=0?1:-1,l=n>=0?1:-1,u=a>=0&&n>=0||a<0&&n<0?1:0,d;if(s>0&&i instanceof Array){for(var f=[0,0,0,0],h=0,p=4;h<p;h++)f[h]=i[h]>s?s:i[h];d="M".concat(t,",").concat(r+o*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+l*f[0],",").concat(r)),d+="L ".concat(t+n-l*f[1],",").concat(r),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`,
|
|
612
|
-
`).concat(t+n,",").concat(r+o*f[1])),d+="L ".concat(t+n,",").concat(r+a-o*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`,
|
|
613
|
-
`).concat(t+n-l*f[2],",").concat(r+a)),d+="L ".concat(t+l*f[3],",").concat(r+a),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`,
|
|
614
|
-
`).concat(t,",").concat(r+a-o*f[3])),d+="Z"}else if(s>0&&i===+i&&i>0){var m=Math.min(s,i);d="M ".concat(t,",").concat(r+o*m,`
|
|
615
|
-
A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+l*m,",").concat(r,`
|
|
616
|
-
L `).concat(t+n-l*m,",").concat(r,`
|
|
617
|
-
A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n,",").concat(r+o*m,`
|
|
618
|
-
L `).concat(t+n,",").concat(r+a-o*m,`
|
|
619
|
-
A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t+n-l*m,",").concat(r+a,`
|
|
620
|
-
L `).concat(t+l*m,",").concat(r+a,`
|
|
621
|
-
A `).concat(m,",").concat(m,",0,0,").concat(u,",").concat(t,",").concat(r+a-o*m," Z")}else d="M ".concat(t,",").concat(r," h ").concat(n," v ").concat(a," h ").concat(-n," Z");return d},ROe=function(t,r){if(!t||!r)return!1;var n=t.x,a=t.y,i=r.x,s=r.y,o=r.width,l=r.height;if(Math.abs(o)>0&&Math.abs(l)>0){var u=Math.min(i,i+o),d=Math.max(i,i+o),f=Math.min(s,s+l),h=Math.max(s,s+l);return n>=u&&n<=d&&a>=f&&a<=h}return!1},DOe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},lN=function(t){var r=QM(QM({},DOe),t),n=N.useRef(),a=N.useState(-1),i=EOe(a,2),s=i[0],o=i[1];N.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var j=n.current.getTotalLength();j&&o(j)}catch{}},[]);var l=r.x,u=r.y,d=r.width,f=r.height,h=r.radius,p=r.className,m=r.animationEasing,g=r.animationDuration,b=r.animationBegin,v=r.isAnimationActive,y=r.isUpdateAnimationActive;if(l!==+l||u!==+u||d!==+d||f!==+f||d===0||f===0)return null;var x=Ke("recharts-rectangle",p);return y?T.createElement(mi,{canBegin:s>0,from:{width:d,height:f,x:l,y:u},to:{width:d,height:f,x:l,y:u},duration:g,animationEasing:m,isActive:y},function(j){var w=j.width,S=j.height,k=j.x,_=j.y;return T.createElement(mi,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:g,isActive:v,easing:m},T.createElement("path",w0({},qe(r,!0),{className:x,d:JM(k,_,w,S,h),ref:n})))}):T.createElement("path",w0({},qe(r,!0),{className:x,d:JM(l,u,d,f,h)}))};function wj(){return wj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wj.apply(this,arguments)}var cN=function(t){var r=t.cx,n=t.cy,a=t.r,i=t.className,s=Ke("recharts-dot",i);return r===+r&&n===+n&&a===+a?N.createElement("circle",wj({},qe(t,!1),qm(t),{className:s,cx:r,cy:n,r:a})):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 IOe=["x","y","top","left","width","height","className"];function jj(){return jj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},jj.apply(this,arguments)}function e$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function LOe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e$(Object(r),!0).forEach(function(n){zOe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zOe(e,t,r){return t=FOe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FOe(e){var t=BOe(e,"string");return Pf(t)=="symbol"?t:t+""}function BOe(e,t){if(Pf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VOe(e,t){if(e==null)return{};var r=UOe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function UOe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var HOe=function(t,r,n,a,i,s){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(s,",").concat(r,"h").concat(n)},WOe=function(t){var r=t.x,n=r===void 0?0:r,a=t.y,i=a===void 0?0:a,s=t.top,o=s===void 0?0:s,l=t.left,u=l===void 0?0:l,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,m=t.className,g=VOe(t,IOe),b=LOe({x:n,y:i,top:o,left:u,width:f,height:p},g);return!re(n)||!re(i)||!re(f)||!re(p)||!re(o)||!re(u)?null:T.createElement("path",jj({},qe(b,!0),{className:Ke("recharts-cross",m),d:HOe(n,i,f,p,o,u)}))},qOe=bi,GOe=In,KOe="[object Boolean]";function YOe(e){return e===!0||e===!1||GOe(e)&&qOe(e)==KOe}var XOe=YOe;const ZOe=Je(XOe);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 j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},j0.apply(this,arguments)}function QOe(e,t){return rCe(e)||tCe(e,t)||eCe(e,t)||JOe()}function JOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
622
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eCe(e,t){if(e){if(typeof e=="string")return t$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return t$(e,t)}}function t$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function tCe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function rCe(e){if(Array.isArray(e))return e}function r$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function n$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r$(Object(r),!0).forEach(function(n){nCe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nCe(e,t,r){return t=aCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aCe(e){var t=iCe(e,"string");return Af(t)=="symbol"?t:t+""}function iCe(e,t){if(Af(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Af(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var a$=function(t,r,n,a,i){var s=n-a,o;return o="M ".concat(t,",").concat(r),o+="L ".concat(t+n,",").concat(r),o+="L ".concat(t+n-s/2,",").concat(r+i),o+="L ".concat(t+n-s/2-a,",").concat(r+i),o+="L ".concat(t,",").concat(r," Z"),o},sCe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oCe=function(t){var r=n$(n$({},sCe),t),n=N.useRef(),a=N.useState(-1),i=QOe(a,2),s=i[0],o=i[1];N.useEffect(function(){if(n.current&&n.current.getTotalLength)try{var x=n.current.getTotalLength();x&&o(x)}catch{}},[]);var l=r.x,u=r.y,d=r.upperWidth,f=r.lowerWidth,h=r.height,p=r.className,m=r.animationEasing,g=r.animationDuration,b=r.animationBegin,v=r.isUpdateAnimationActive;if(l!==+l||u!==+u||d!==+d||f!==+f||h!==+h||d===0&&f===0||h===0)return null;var y=Ke("recharts-trapezoid",p);return v?T.createElement(mi,{canBegin:s>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:u},to:{upperWidth:d,lowerWidth:f,height:h,x:l,y:u},duration:g,animationEasing:m,isActive:v},function(x){var j=x.upperWidth,w=x.lowerWidth,S=x.height,k=x.x,_=x.y;return T.createElement(mi,{canBegin:s>0,from:"0px ".concat(s===-1?1:s,"px"),to:"".concat(s,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:g,easing:m},T.createElement("path",j0({},qe(r,!0),{className:y,d:a$(k,_,j,w,S),ref:n})))}):T.createElement("g",null,T.createElement("path",j0({},qe(r,!0),{className:y,d:a$(l,u,d,f,h)})))},lCe=["option","shapeType","propTransformer","activeClassName","isActive"];function Of(e){"@babel/helpers - typeof";return Of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Of(e)}function cCe(e,t){if(e==null)return{};var r=uCe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function uCe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function i$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function k0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i$(Object(r),!0).forEach(function(n){dCe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dCe(e,t,r){return t=fCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fCe(e){var t=hCe(e,"string");return Of(t)=="symbol"?t:t+""}function hCe(e,t){if(Of(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Of(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pCe(e,t){return k0(k0({},t),e)}function mCe(e,t){return e==="symbols"}function s$(e){var t=e.shapeType,r=e.elementProps;switch(t){case"rectangle":return T.createElement(lN,r);case"trapezoid":return T.createElement(oCe,r);case"sector":return T.createElement(Y8,r);case"symbols":if(mCe(t))return T.createElement(I2,r);break;default:return null}}function gCe(e){return N.isValidElement(e)?e.props:e}function yCe(e){var t=e.option,r=e.shapeType,n=e.propTransformer,a=n===void 0?pCe:n,i=e.activeClassName,s=i===void 0?"recharts-active-shape":i,o=e.isActive,l=cCe(e,lCe),u;if(N.isValidElement(t))u=N.cloneElement(t,k0(k0({},l),gCe(t)));else if($e(t))u=t(l);else if(L0e(t)&&!ZOe(t)){var d=a(t,l);u=T.createElement(s$,{shapeType:r,elementProps:d})}else{var f=l;u=T.createElement(s$,{shapeType:r,elementProps:f})}return o?T.createElement(Bt,{className:s},u):u}function cy(e,t){return t!=null&&"trapezoids"in e.props}function uy(e,t){return t!=null&&"sectors"in e.props}function Cf(e,t){return t!=null&&"points"in e.props}function vCe(e,t){var r,n,a=e.x===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.x)||e.x===t.x,i=e.y===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.y)||e.y===t.y;return a&&i}function xCe(e,t){var r=e.endAngle===t.endAngle,n=e.startAngle===t.startAngle;return r&&n}function bCe(e,t){var r=e.x===t.x,n=e.y===t.y,a=e.z===t.z;return r&&n&&a}function wCe(e,t){var r;return cy(e,t)?r=vCe:uy(e,t)?r=xCe:Cf(e,t)&&(r=bCe),r}function jCe(e,t){var r;return cy(e,t)?r="trapezoids":uy(e,t)?r="sectors":Cf(e,t)&&(r="points"),r}function kCe(e,t){if(cy(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}if(uy(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}return Cf(e,t)?t.payload:{}}function SCe(e){var t=e.activeTooltipItem,r=e.graphicalItem,n=e.itemData,a=jCe(r,t),i=kCe(r,t),s=n.filter(function(l,u){var d=sy(i,l),f=r.props[a].filter(function(m){var g=wCe(r,t);return g(m,t)}),h=r.props[a].indexOf(f[f.length-1]),p=u===h;return d&&p}),o=n.indexOf(s[s.length-1]);return o}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 o$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function l$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?o$(Object(r),!0).forEach(function(n){sF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sF(e,t,r){return t=NCe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NCe(e){var t=_Ce(e,"string");return Tf(t)=="symbol"?t:t+""}function _Ce(e,t){if(Tf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ECe=["Webkit","Moz","O","ms"],PCe=function(t,r){var n=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=ECe.reduce(function(i,s){return l$(l$({},i),{},sF({},s+n,r))},{});return a[t]=r,a};function kc(e){"@babel/helpers - typeof";return kc=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},kc(e)}function S0(){return S0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S0.apply(this,arguments)}function c$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?c$(Object(r),!0).forEach(function(n){Jr(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ACe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,lF(n.key),n)}}function OCe(e,t,r){return t&&u$(e.prototype,t),r&&u$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function CCe(e,t,r){return t=N0(t),TCe(e,oF()?Reflect.construct(t,r||[],N0(e).constructor):t.apply(e,r))}function TCe(e,t){if(t&&(kc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MCe(e)}function MCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function oF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(oF=function(){return!!e})()}function N0(e){return N0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},N0(e)}function $Ce(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&&kj(e,t)}function kj(e,t){return kj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},kj(e,t)}function Jr(e,t,r){return t=lF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lF(e){var t=RCe(e,"string");return kc(t)=="symbol"?t:t+""}function RCe(e,t){if(kc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(kc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var DCe=function(t){var r=t.data,n=t.startIndex,a=t.endIndex,i=t.x,s=t.width,o=t.travellerWidth;if(!r||!r.length)return{};var l=r.length,u=vd().domain(Bm(0,l)).range([i,i+s-o]),d=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(n),endX:u(a),scale:u,scaleValues:d}},d$=function(t){return t.changedTouches&&!!t.changedTouches.length},Sc=function(e){function t(r){var n;return ACe(this,t),n=CCe(this,t,[r]),Jr(n,"handleDrag",function(a){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(a):n.state.isSlideMoving&&n.handleSlideDrag(a)}),Jr(n,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&n.handleDrag(a.changedTouches[0])}),Jr(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=n.props,i=a.endIndex,s=a.onDragEnd,o=a.startIndex;s==null||s({endIndex:i,startIndex:o})}),n.detachDragEndListener()}),Jr(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),Jr(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),Jr(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),Jr(n,"handleSlideDragStart",function(a){var i=d$(a)?a.changedTouches[0]:a;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return $Ce(t,e),OCe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(n){var a=n.startX,i=n.endX,s=this.state.scaleValues,o=this.props,l=o.gap,u=o.data,d=u.length-1,f=Math.min(a,i),h=Math.max(a,i),p=t.getIndexInRange(s,f),m=t.getIndexInRange(s,h);return{startIndex:p-p%l,endIndex:m===d?d:m-m%l}}},{key:"getTextOfTick",value:function(n){var a=this.props,i=a.data,s=a.tickFormatter,o=a.dataKey,l=un(i[n],o,n);return $e(s)?s(l,n):l}},{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(n){var a=this.state,i=a.slideMoveStartX,s=a.startX,o=a.endX,l=this.props,u=l.x,d=l.width,f=l.travellerWidth,h=l.startIndex,p=l.endIndex,m=l.onChange,g=n.pageX-i;g>0?g=Math.min(g,u+d-f-o,u+d-f-s):g<0&&(g=Math.max(g,u-s,u-o));var b=this.getIndex({startX:s+g,endX:o+g});(b.startIndex!==h||b.endIndex!==p)&&m&&m(b),this.setState({startX:s+g,endX:o+g,slideMoveStartX:n.pageX})}},{key:"handleTravellerDragStart",value:function(n,a){var i=d$(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:n,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(n){var a=this.state,i=a.brushMoveStartX,s=a.movingTravellerId,o=a.endX,l=a.startX,u=this.state[s],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,m=d.onChange,g=d.gap,b=d.data,v={startX:this.state.startX,endX:this.state.endX},y=n.pageX-i;y>0?y=Math.min(y,f+h-p-u):y<0&&(y=Math.max(y,f-u)),v[s]=u+y;var x=this.getIndex(v),j=x.startIndex,w=x.endIndex,S=function(){var _=b.length-1;return s==="startX"&&(o>l?j%g===0:w%g===0)||o<l&&w===_||s==="endX"&&(o>l?w%g===0:j%g===0)||o>l&&w===_};this.setState(Jr(Jr({},s,u+y),"brushMoveStartX",n.pageX),function(){m&&S()&&m(x)})}},{key:"handleTravellerMoveKeyboard",value:function(n,a){var i=this,s=this.state,o=s.scaleValues,l=s.startX,u=s.endX,d=this.state[a],f=o.indexOf(d);if(f!==-1){var h=f+n;if(!(h===-1||h>=o.length)){var p=o[h];a==="startX"&&p>=u||a==="endX"&&p<=l||this.setState(Jr({},a,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,o=n.height,l=n.fill,u=n.stroke;return T.createElement("rect",{stroke:u,fill:l,x:a,y:i,width:s,height:o})}},{key:"renderPanorama",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,o=n.height,l=n.data,u=n.children,d=n.padding,f=N.Children.only(u);return f?T.cloneElement(f,{x:a,y:i,width:s,height:o,margin:d,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(n,a){var i,s,o=this,l=this.props,u=l.y,d=l.travellerWidth,f=l.height,h=l.traveller,p=l.ariaLabel,m=l.data,g=l.startIndex,b=l.endIndex,v=Math.max(n,this.props.x),y=kb(kb({},qe(this.props,!1)),{},{x:v,y:u,width:d,height:f}),x=p||"Min value: ".concat((i=m[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((s=m[b])===null||s===void 0?void 0:s.name);return T.createElement(Bt,{tabIndex:0,role:"slider","aria-label":x,"aria-valuenow":n,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(w){["ArrowLeft","ArrowRight"].includes(w.key)&&(w.preventDefault(),w.stopPropagation(),o.handleTravellerMoveKeyboard(w.key==="ArrowRight"?1:-1,a))},onFocus:function(){o.setState({isTravellerFocused:!0})},onBlur:function(){o.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,y))}},{key:"renderSlide",value:function(n,a){var i=this.props,s=i.y,o=i.height,l=i.stroke,u=i.travellerWidth,d=Math.min(n,a)+u,f=Math.max(Math.abs(a-n)-u,0);return T.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:d,y:s,width:f,height:o})}},{key:"renderText",value:function(){var n=this.props,a=n.startIndex,i=n.endIndex,s=n.y,o=n.height,l=n.travellerWidth,u=n.stroke,d=this.state,f=d.startX,h=d.endX,p=5,m={pointerEvents:"none",fill:u};return T.createElement(Bt,{className:"recharts-brush-texts"},T.createElement(a0,S0({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:s+o/2},m),this.getTextOfTick(a)),T.createElement(a0,S0({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+p,y:s+o/2},m),this.getTextOfTick(i)))}},{key:"render",value:function(){var n=this.props,a=n.data,i=n.className,s=n.children,o=n.x,l=n.y,u=n.width,d=n.height,f=n.alwaysShowText,h=this.state,p=h.startX,m=h.endX,g=h.isTextActive,b=h.isSlideMoving,v=h.isTravellerMoving,y=h.isTravellerFocused;if(!a||!a.length||!re(o)||!re(l)||!re(u)||!re(d)||u<=0||d<=0)return null;var x=Ke("recharts-brush",i),j=T.Children.count(s)===1,w=PCe("userSelect","none");return T.createElement(Bt,{className:x,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),j&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(g||b||v||y||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(n){var a=n.x,i=n.y,s=n.width,o=n.height,l=n.stroke,u=Math.floor(i+o/2)-1;return T.createElement(T.Fragment,null,T.createElement("rect",{x:a,y:i,width:s,height:o,fill:l,stroke:"none"}),T.createElement("line",{x1:a+1,y1:u,x2:a+s-1,y2:u,fill:"none",stroke:"#fff"}),T.createElement("line",{x1:a+1,y1:u+2,x2:a+s-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(n,a){var i;return T.isValidElement(n)?i=T.cloneElement(n,a):$e(n)?i=n(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(n,a){var i=n.data,s=n.width,o=n.x,l=n.travellerWidth,u=n.updateId,d=n.startIndex,f=n.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return kb({prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:o,prevWidth:s},i&&i.length?DCe({data:i,width:s,x:o,travellerWidth:l,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(s!==a.prevWidth||o!==a.prevX||l!==a.prevTravellerWidth)){a.scale.range([o,o+s-l]);var h=a.scale.domain().map(function(p){return a.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:u,prevX:o,prevWidth:s,startX:a.scale(n.startIndex),endX:a.scale(n.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(n,a){for(var i=n.length,s=0,o=i-1;o-s>1;){var l=Math.floor((s+o)/2);n[l]>a?o=l:s=l}return a>=n[o]?o:s}}])}(N.PureComponent);Jr(Sc,"displayName","Brush");Jr(Sc,"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 ICe=ru;function LCe(e,t){var r;return ICe(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}var zCe=LCe,FCe=TL,BCe=Ln,VCe=zCe,UCe=Lt,HCe=au;function WCe(e,t,r){var n=UCe(e)?FCe:VCe;return r&&HCe(e,t,r)&&(t=void 0),n(e,BCe(t))}var qCe=WCe;const GCe=Je(qCe);var Na=function(t,r){var n=t.alwaysShow,a=t.ifOverflow;return n&&(a="extendDomain"),a===r},KCe=p6();const YCe=Je(KCe);function XCe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var ZCe=XCe,QCe=ru;function JCe(e,t){var r=!0;return QCe(e,function(n,a,i){return r=!!t(n,a,i),r}),r}var eTe=JCe,tTe=ZCe,rTe=eTe,nTe=Ln,aTe=Lt,iTe=au;function sTe(e,t,r){var n=aTe(e)?tTe:rTe;return r&&iTe(e,t,r)&&(t=void 0),n(e,nTe(t))}var oTe=sTe;const cF=Je(oTe);var lTe=["x","y"];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 Sj(){return Sj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sj.apply(this,arguments)}function f$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Fu(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?f$(Object(r),!0).forEach(function(n){cTe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cTe(e,t,r){return t=uTe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uTe(e){var t=dTe(e,"string");return Mf(t)=="symbol"?t:t+""}function dTe(e,t){if(Mf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fTe(e,t){if(e==null)return{};var r=hTe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function hTe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function pTe(e,t){var r=e.x,n=e.y,a=fTe(e,lTe),i="".concat(r),s=parseInt(i,10),o="".concat(n),l=parseInt(o,10),u="".concat(t.height||a.height),d=parseInt(u,10),f="".concat(t.width||a.width),h=parseInt(f,10);return Fu(Fu(Fu(Fu(Fu({},t),a),s?{x:s}:{}),l?{y:l}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function h$(e){return T.createElement(yCe,Sj({shapeType:"rectangle",propTransformer:pTe,activeClassName:"recharts-active-bar"},e))}var mTe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(n,a){if(typeof t=="number")return t;var i=re(n)||j1e(n);return i?t(n,a):(i||$o(),r)}},gTe=["value","background"],uF;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 yTe(e,t){if(e==null)return{};var r=vTe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function vTe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_0.apply(this,arguments)}function p$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?p$(Object(r),!0).forEach(function(n){Qi(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fF(n.key),n)}}function bTe(e,t,r){return t&&m$(e.prototype,t),r&&m$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function wTe(e,t,r){return t=E0(t),jTe(e,dF()?Reflect.construct(t,r||[],E0(e).constructor):t.apply(e,r))}function jTe(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 kTe(e)}function kTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dF=function(){return!!e})()}function E0(e){return E0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},E0(e)}function STe(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&&Nj(e,t)}function Nj(e,t){return Nj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Nj(e,t)}function Qi(e,t,r){return t=fF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fF(e){var t=NTe(e,"string");return Nc(t)=="symbol"?t:t+""}function NTe(e,t){if(Nc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Nc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ch=function(e){function t(){var r;xTe(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=wTe(this,t,[].concat(a)),Qi(r,"state",{isAnimationFinished:!1}),Qi(r,"id",ah("recharts-bar-")),Qi(r,"handleAnimationEnd",function(){var s=r.props.onAnimationEnd;r.setState({isAnimationFinished:!0}),s&&s()}),Qi(r,"handleAnimationStart",function(){var s=r.props.onAnimationStart;r.setState({isAnimationFinished:!1}),s&&s()}),r}return STe(t,e),bTe(t,[{key:"renderRectanglesStatically",value:function(n){var a=this,i=this.props,s=i.shape,o=i.dataKey,l=i.activeIndex,u=i.activeBar,d=qe(this.props,!1);return n&&n.map(function(f,h){var p=h===l,m=p?u:s,g=Wt(Wt(Wt({},d),f),{},{isActive:p,option:m,index:h,dataKey:o,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return T.createElement(Bt,_0({className:"recharts-bar-rectangle"},Gm(a.props,f,h),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(h)}),T.createElement(h$,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var n=this,a=this.props,i=a.data,s=a.layout,o=a.isAnimationActive,l=a.animationBegin,u=a.animationDuration,d=a.animationEasing,f=a.animationId,h=this.state.prevData;return T.createElement(mi,{begin:l,duration:u,isActive:o,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(p){var m=p.t,g=i.map(function(b,v){var y=h&&h[v];if(y){var x=ea(y.x,b.x),j=ea(y.y,b.y),w=ea(y.width,b.width),S=ea(y.height,b.height);return Wt(Wt({},b),{},{x:x(m),y:j(m),width:w(m),height:S(m)})}if(s==="horizontal"){var k=ea(0,b.height),_=k(m);return Wt(Wt({},b),{},{y:b.y+b.height-_,height:_})}var E=ea(0,b.width),A=E(m);return Wt(Wt({},b),{},{width:A})});return T.createElement(Bt,null,n.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var n=this.props,a=n.data,i=n.isAnimationActive,s=this.state.prevData;return i&&a&&a.length&&(!s||!sy(s,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var n=this,a=this.props,i=a.data,s=a.dataKey,o=a.activeIndex,l=qe(this.props.background,!1);return i.map(function(u,d){u.value;var f=u.background,h=yTe(u,gTe);if(!f)return null;var p=Wt(Wt(Wt(Wt(Wt({},h),{},{fill:"#eee"},f),l),Gm(n.props,u,d)),{},{onAnimationStart:n.handleAnimationStart,onAnimationEnd:n.handleAnimationEnd,dataKey:s,index:d,className:"recharts-bar-background-rectangle"});return T.createElement(h$,_0({key:"background-bar-".concat(d),option:n.props.background,isActive:d===o},p))})}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.data,o=i.xAxis,l=i.yAxis,u=i.layout,d=i.children,f=Mn(d,lh);if(!f)return null;var h=u==="vertical"?s[0].height/2:s[0].width/2,p=function(b,v){var y=Array.isArray(b.value)?b.value[1]:b.value;return{x:b.x,y:b.y,value:y,errorVal:un(b,v)}},m={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(Bt,m,f.map(function(g){return T.cloneElement(g,{key:"error-bar-".concat(a,"-").concat(g.props.dataKey),data:s,xAxis:o,yAxis:l,layout:u,offset:h,dataPointFormatter:p})}))}},{key:"render",value:function(){var n=this.props,a=n.hide,i=n.data,s=n.className,o=n.xAxis,l=n.yAxis,u=n.left,d=n.top,f=n.width,h=n.height,p=n.isAnimationActive,m=n.background,g=n.id;if(a||!i||!i.length)return null;var b=this.state.isAnimationFinished,v=Ke("recharts-bar",s),y=o&&o.allowDataOverflow,x=l&&l.allowDataOverflow,j=y||x,w=Fe(g)?this.id:g;return T.createElement(Bt,{className:v},y||x?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(w)},T.createElement("rect",{x:y?u:u-f/2,y:x?d:d-h/2,width:y?f:f*2,height:x?h:h*2}))):null,T.createElement(Bt,{className:"recharts-bar-rectangles",clipPath:j?"url(#clipPath-".concat(w,")"):null},m?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(j,w),(!p||b)&&ds.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curData:n.data,prevData:a.curData}:n.data!==a.curData?{curData:n.data}:null}}])}(N.PureComponent);uF=ch;Qi(ch,"displayName","Bar");Qi(ch,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!iu.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});Qi(ch,"getComposedData",function(e){var t=e.props,r=e.item,n=e.barPosition,a=e.bandSize,i=e.xAxis,s=e.yAxis,o=e.xAxisTicks,l=e.yAxisTicks,u=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=IEe(n,r);if(!p)return null;var m=t.layout,g=r.type.defaultProps,b=g!==void 0?Wt(Wt({},g),r.props):r.props,v=b.dataKey,y=b.children,x=b.minPointSize,j=m==="horizontal"?s:i,w=u?j.scale.domain():null,S=WEe({numericAxis:j}),k=Mn(y,Hz),_=f.map(function(E,A){var C,M,O,P,D,I;u?C=LEe(u[d+A],w):(C=un(E,v),Array.isArray(C)||(C=[S,C]));var L=mTe(x,uF.defaultProps.minPointSize)(C[1],A);if(m==="horizontal"){var R,$=[s.scale(C[0]),s.scale(C[1])],z=$[0],U=$[1];M=gM({axis:i,ticks:o,bandSize:a,offset:p.offset,entry:E,index:A}),O=(R=U??z)!==null&&R!==void 0?R:void 0,P=p.size;var V=z-U;if(D=Number.isNaN(V)?0:V,I={x:M,y:s.y,width:P,height:s.height},Math.abs(L)>0&&Math.abs(D)<Math.abs(L)){var F=ra(D||L)*(Math.abs(L)-Math.abs(D));O-=F,D+=F}}else{var W=[i.scale(C[0]),i.scale(C[1])],K=W[0],Q=W[1];if(M=K,O=gM({axis:s,ticks:l,bandSize:a,offset:p.offset,entry:E,index:A}),P=Q-K,D=p.size,I={x:i.x,y:O,width:i.width,height:D},Math.abs(L)>0&&Math.abs(P)<Math.abs(L)){var ne=ra(P||L)*(Math.abs(L)-Math.abs(P));P+=ne}}return Wt(Wt(Wt({},E),{},{x:M,y:O,width:P,height:D,value:u?C:C[1],payload:E,background:I},k&&k[A]&&k[A].props),{},{tooltipPayload:[q8(r,E)],tooltipPosition:{x:M+P/2,y:O+D/2}})});return Wt({data:_,layout:m},h)});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 _Te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,hF(n.key),n)}}function ETe(e,t,r){return t&&g$(e.prototype,t),r&&g$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Xn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y$(Object(r),!0).forEach(function(n){dy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dy(e,t,r){return t=hF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hF(e){var t=PTe(e,"string");return $f(t)=="symbol"?t:t+""}function PTe(e,t){if($f(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if($f(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ATe=function(t,r,n,a,i){var s=t.width,o=t.height,l=t.layout,u=t.children,d=Object.keys(r),f={left:n.left,leftMirror:n.left,right:s-n.right,rightMirror:s-n.right,top:n.top,topMirror:n.top,bottom:o-n.bottom,bottomMirror:o-n.bottom},h=!!tn(u,ch);return d.reduce(function(p,m){var g=r[m],b=g.orientation,v=g.domain,y=g.padding,x=y===void 0?{}:y,j=g.mirror,w=g.reversed,S="".concat(b).concat(j?"Mirror":""),k,_,E,A,C;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var M=v[1]-v[0],O=1/0,P=g.categoricalDomain.sort(N1e);if(P.forEach(function(W,K){K>0&&(O=Math.min((W||0)-(P[K-1]||0),O))}),Number.isFinite(O)){var D=O/M,I=g.layout==="vertical"?n.height:n.width;if(g.padding==="gap"&&(k=D*I/2),g.padding==="no-gap"){var L=To(t.barCategoryGap,D*I),R=D*I/2;k=R-L-(R-L)/I*L}}}a==="xAxis"?_=[n.left+(x.left||0)+(k||0),n.left+n.width-(x.right||0)-(k||0)]:a==="yAxis"?_=l==="horizontal"?[n.top+n.height-(x.bottom||0),n.top+(x.top||0)]:[n.top+(x.top||0)+(k||0),n.top+n.height-(x.bottom||0)-(k||0)]:_=g.range,w&&(_=[_[1],_[0]]);var $=REe(g,i,h),z=$.scale,U=$.realScaleType;z.domain(v).range(_),DEe(z);var V=HEe(z,Xn(Xn({},g),{},{realScaleType:U}));a==="xAxis"?(C=b==="top"&&!j||b==="bottom"&&j,E=n.left,A=f[S]-C*g.height):a==="yAxis"&&(C=b==="left"&&!j||b==="right"&&j,E=f[S]-C*g.width,A=n.top);var F=Xn(Xn(Xn({},g),V),{},{realScaleType:U,x:E,y:A,scale:z,width:a==="xAxis"?n.width:g.width,height:a==="yAxis"?n.height:g.height});return F.bandSize=m0(F,V),!g.hide&&a==="xAxis"?f[S]+=(C?-1:1)*F.height:g.hide||(f[S]+=(C?-1:1)*F.width),Xn(Xn({},p),{},dy({},m,F))},{})},pF=function(t,r){var n=t.x,a=t.y,i=r.x,s=r.y;return{x:Math.min(n,i),y:Math.min(a,s),width:Math.abs(i-n),height:Math.abs(s-a)}},OTe=function(t){var r=t.x1,n=t.y1,a=t.x2,i=t.y2;return pF({x:r,y:n},{x:a,y:i})},mF=function(){function e(t){_Te(this,e),this.scale=t}return ETe(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(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=n.bandAware,i=n.position;if(r!==void 0){if(i)switch(i){case"start":return this.scale(r);case"middle":{var s=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+s}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(r)+o}default:return this.scale(r)}if(a){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(r)+l}return this.scale(r)}}},{key:"isInRange",value:function(r){var n=this.range(),a=n[0],i=n[n.length-1];return a<=i?r>=a&&r<=i:r>=i&&r<=a}}],[{key:"create",value:function(r){return new e(r)}}])}();dy(mF,"EPS",1e-4);var uN=function(t){var r=Object.keys(t).reduce(function(n,a){return Xn(Xn({},n),{},dy({},a,mF.create(t[a])))},{});return Xn(Xn({},r),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=i.bandAware,o=i.position;return YCe(a,function(l,u){return r[u].apply(l,{bandAware:s,position:o})})},isInRange:function(a){return cF(a,function(i,s){return r[s].isInRange(i)})}})};function CTe(e){return(e%180+180)%180}var TTe=function(t){var r=t.width,n=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=CTe(a),s=i*Math.PI/180,o=Math.atan(n/r),l=s>o&&s<Math.PI-o?n/Math.sin(s):r/Math.cos(s);return Math.abs(l)},MTe=d6();const $Te=Je(MTe);var RTe=Ufe(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("")}),dN=N.createContext(void 0),fN=N.createContext(void 0),gF=N.createContext(void 0),yF=N.createContext({}),vF=N.createContext(void 0),xF=N.createContext(0),bF=N.createContext(0),v$=function(t){var r=t.state,n=r.xAxisMap,a=r.yAxisMap,i=r.offset,s=t.clipPathId,o=t.children,l=t.width,u=t.height,d=RTe(i);return T.createElement(dN.Provider,{value:n},T.createElement(fN.Provider,{value:a},T.createElement(yF.Provider,{value:i},T.createElement(gF.Provider,{value:d},T.createElement(vF.Provider,{value:s},T.createElement(xF.Provider,{value:u},T.createElement(bF.Provider,{value:l},o)))))))},DTe=function(){return N.useContext(vF)},wF=function(t){var r=N.useContext(dN);r==null&&$o();var n=r[t];return n==null&&$o(),n},ITe=function(){var t=N.useContext(dN);return qi(t)},LTe=function(){var t=N.useContext(fN),r=$Te(t,function(n){return cF(n.domain,Number.isFinite)});return r||qi(t)},jF=function(t){var r=N.useContext(fN);r==null&&$o();var n=r[t];return n==null&&$o(),n},zTe=function(){var t=N.useContext(gF);return t},FTe=function(){return N.useContext(yF)},hN=function(){return N.useContext(bF)},pN=function(){return N.useContext(xF)};function _c(e){"@babel/helpers - typeof";return _c=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},_c(e)}function BTe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function VTe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,SF(n.key),n)}}function UTe(e,t,r){return t&&VTe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function HTe(e,t,r){return t=P0(t),WTe(e,kF()?Reflect.construct(t,r||[],P0(e).constructor):t.apply(e,r))}function WTe(e,t){if(t&&(_c(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qTe(e)}function qTe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(kF=function(){return!!e})()}function P0(e){return P0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},P0(e)}function GTe(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&&_j(e,t)}function _j(e,t){return _j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},_j(e,t)}function x$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function b$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x$(Object(r),!0).forEach(function(n){mN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mN(e,t,r){return t=SF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SF(e){var t=KTe(e,"string");return _c(t)=="symbol"?t:t+""}function KTe(e,t){if(_c(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(_c(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function YTe(e,t){return JTe(e)||QTe(e,t)||ZTe(e,t)||XTe()}function XTe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
623
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZTe(e,t){if(e){if(typeof e=="string")return w$(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w$(e,t)}}function w$(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function QTe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function JTe(e){if(Array.isArray(e))return e}function Ej(){return Ej=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ej.apply(this,arguments)}var eMe=function(t,r){var n;return T.isValidElement(t)?n=T.cloneElement(t,r):$e(t)?n=t(r):n=T.createElement("line",Ej({},r,{className:"recharts-reference-line-line"})),n},tMe=function(t,r,n,a,i,s,o,l,u){var d=i.x,f=i.y,h=i.width,p=i.height;if(n){var m=u.y,g=t.y.apply(m,{position:s});if(Na(u,"discard")&&!t.y.isInRange(g))return null;var b=[{x:d+h,y:g},{x:d,y:g}];return l==="left"?b.reverse():b}if(r){var v=u.x,y=t.x.apply(v,{position:s});if(Na(u,"discard")&&!t.x.isInRange(y))return null;var x=[{x:y,y:f+p},{x:y,y:f}];return o==="top"?x.reverse():x}if(a){var j=u.segment,w=j.map(function(S){return t.apply(S,{position:s})});return Na(u,"discard")&&GCe(w,function(S){return!t.isInRange(S)})?null:w}return null};function rMe(e){var t=e.x,r=e.y,n=e.segment,a=e.xAxisId,i=e.yAxisId,s=e.shape,o=e.className,l=e.alwaysShow,u=DTe(),d=wF(a),f=jF(i),h=zTe();if(!u||!h)return null;Za(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=uN({x:d.scale,y:f.scale}),m=nr(t),g=nr(r),b=n&&n.length===2,v=tMe(p,m,g,b,h,e.position,d.orientation,f.orientation,e);if(!v)return null;var y=YTe(v,2),x=y[0],j=x.x,w=x.y,S=y[1],k=S.x,_=S.y,E=Na(e,"hidden")?"url(#".concat(u,")"):void 0,A=b$(b$({clipPath:E},qe(e,!0)),{},{x1:j,y1:w,x2:k,y2:_});return T.createElement(Bt,{className:Ke("recharts-reference-line",o)},eMe(s,A),Nr.renderCallByParent(e,OTe({x1:j,y1:w,x2:k,y2:_})))}var gN=function(e){function t(){return BTe(this,t),HTe(this,t,arguments)}return GTe(t,e),UTe(t,[{key:"render",value:function(){return T.createElement(rMe,this.props)}}])}(T.Component);mN(gN,"displayName","ReferenceLine");mN(gN,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Pj(){return Pj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pj.apply(this,arguments)}function Ec(e){"@babel/helpers - typeof";return Ec=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},Ec(e)}function j$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function k$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j$(Object(r),!0).forEach(function(n){fy(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aMe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_F(n.key),n)}}function iMe(e,t,r){return t&&aMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sMe(e,t,r){return t=A0(t),oMe(e,NF()?Reflect.construct(t,r||[],A0(e).constructor):t.apply(e,r))}function oMe(e,t){if(t&&(Ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return lMe(e)}function lMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function NF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(NF=function(){return!!e})()}function A0(e){return A0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},A0(e)}function cMe(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&&Aj(e,t)}function Aj(e,t){return Aj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Aj(e,t)}function fy(e,t,r){return t=_F(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _F(e){var t=uMe(e,"string");return Ec(t)=="symbol"?t:t+""}function uMe(e,t){if(Ec(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ec(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var dMe=function(t){var r=t.x,n=t.y,a=t.xAxis,i=t.yAxis,s=uN({x:a.scale,y:i.scale}),o=s.apply({x:r,y:n},{bandAware:!0});return Na(t,"discard")&&!s.isInRange(o)?null:o},hy=function(e){function t(){return nMe(this,t),sMe(this,t,arguments)}return cMe(t,e),iMe(t,[{key:"render",value:function(){var n=this.props,a=n.x,i=n.y,s=n.r,o=n.alwaysShow,l=n.clipPathId,u=nr(a),d=nr(i);if(Za(o===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!d)return null;var f=dMe(this.props);if(!f)return null;var h=f.x,p=f.y,m=this.props,g=m.shape,b=m.className,v=Na(this.props,"hidden")?"url(#".concat(l,")"):void 0,y=k$(k$({clipPath:v},qe(this.props,!0)),{},{cx:h,cy:p});return T.createElement(Bt,{className:Ke("recharts-reference-dot",b)},t.renderDot(g,y),Nr.renderCallByParent(this.props,{x:h-s,y:p-s,width:2*s,height:2*s}))}}])}(T.Component);fy(hy,"displayName","ReferenceDot");fy(hy,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});fy(hy,"renderDot",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):$e(e)?r=e(t):r=T.createElement(cN,Pj({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),r});function Oj(){return Oj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oj.apply(this,arguments)}function Pc(e){"@babel/helpers - typeof";return Pc=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},Pc(e)}function S$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function N$(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S$(Object(r),!0).forEach(function(n){py(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hMe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,PF(n.key),n)}}function pMe(e,t,r){return t&&hMe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function mMe(e,t,r){return t=O0(t),gMe(e,EF()?Reflect.construct(t,r||[],O0(e).constructor):t.apply(e,r))}function gMe(e,t){if(t&&(Pc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yMe(e)}function yMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function EF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(EF=function(){return!!e})()}function O0(e){return O0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},O0(e)}function vMe(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&&Cj(e,t)}function Cj(e,t){return Cj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Cj(e,t)}function py(e,t,r){return t=PF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PF(e){var t=xMe(e,"string");return Pc(t)=="symbol"?t:t+""}function xMe(e,t){if(Pc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Pc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var bMe=function(t,r,n,a,i){var s=i.x1,o=i.x2,l=i.y1,u=i.y2,d=i.xAxis,f=i.yAxis;if(!d||!f)return null;var h=uN({x:d.scale,y:f.scale}),p={x:t?h.x.apply(s,{position:"start"}):h.x.rangeMin,y:n?h.y.apply(l,{position:"start"}):h.y.rangeMin},m={x:r?h.x.apply(o,{position:"end"}):h.x.rangeMax,y:a?h.y.apply(u,{position:"end"}):h.y.rangeMax};return Na(i,"discard")&&(!h.isInRange(p)||!h.isInRange(m))?null:pF(p,m)},my=function(e){function t(){return fMe(this,t),mMe(this,t,arguments)}return vMe(t,e),pMe(t,[{key:"render",value:function(){var n=this.props,a=n.x1,i=n.x2,s=n.y1,o=n.y2,l=n.className,u=n.alwaysShow,d=n.clipPathId;Za(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=nr(a),h=nr(i),p=nr(s),m=nr(o),g=this.props.shape;if(!f&&!h&&!p&&!m&&!g)return null;var b=bMe(f,h,p,m,this.props);if(!b&&!g)return null;var v=Na(this.props,"hidden")?"url(#".concat(d,")"):void 0;return T.createElement(Bt,{className:Ke("recharts-reference-area",l)},t.renderRect(g,N$(N$({clipPath:v},qe(this.props,!0)),b)),Nr.renderCallByParent(this.props,b))}}])}(T.Component);py(my,"displayName","ReferenceArea");py(my,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});py(my,"renderRect",function(e,t){var r;return T.isValidElement(e)?r=T.cloneElement(e,t):$e(e)?r=e(t):r=T.createElement(lN,Oj({},t,{className:"recharts-reference-area-rect"})),r});function AF(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],a=0;a<e.length;a+=t)n.push(e[a]);return n}function wMe(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return TTe(n,r)}function jMe(e,t,r){var n=r==="width",a=e.x,i=e.y,s=e.width,o=e.height;return t===1?{start:n?a:i,end:n?a+s:i+o}:{start:n?a+s:i+o,end:n?a:i}}function C0(e,t,r,n,a){if(e*t<e*n||e*t>e*a)return!1;var i=r();return e*(t-e*i/2-n)>=0&&e*(t+e*i/2-a)<=0}function kMe(e,t){return AF(e,t+1)}function SMe(e,t,r,n,a){for(var i=(n||[]).slice(),s=t.start,o=t.end,l=0,u=1,d=s,f=function(){var m=n==null?void 0:n[l];if(m===void 0)return{v:AF(n,u)};var g=l,b,v=function(){return b===void 0&&(b=r(m,g)),b},y=m.coordinate,x=l===0||C0(e,y,v,d,o);x||(l=0,d=s,u+=1),x&&(d=y+e*(v()/2+a),l+=u)},h;u<=i.length;)if(h=f(),h)return h.v;return[]}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 _$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function kr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_$(Object(r),!0).forEach(function(n){NMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NMe(e,t,r){return t=_Me(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _Me(e){var t=EMe(e,"string");return Rf(t)=="symbol"?t:t+""}function EMe(e,t){if(Rf(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Rf(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PMe(e,t,r,n,a){for(var i=(n||[]).slice(),s=i.length,o=t.start,l=t.end,u=function(h){var p=i[h],m,g=function(){return m===void 0&&(m=r(p,h)),m};if(h===s-1){var b=e*(p.coordinate+e*g()/2-l);i[h]=p=kr(kr({},p),{},{tickCoord:b>0?p.coordinate-b*e:p.coordinate})}else i[h]=p=kr(kr({},p),{},{tickCoord:p.coordinate});var v=C0(e,p.tickCoord,g,o,l);v&&(l=p.tickCoord-e*(g()/2+a),i[h]=kr(kr({},p),{},{isShow:!0}))},d=s-1;d>=0;d--)u(d);return i}function AMe(e,t,r,n,a,i){var s=(n||[]).slice(),o=s.length,l=t.start,u=t.end;if(i){var d=n[o-1],f=r(d,o-1),h=e*(d.coordinate+e*f/2-u);s[o-1]=d=kr(kr({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=C0(e,d.tickCoord,function(){return f},l,u);p&&(u=d.tickCoord-e*(f/2+a),s[o-1]=kr(kr({},d),{},{isShow:!0}))}for(var m=i?o-1:o,g=function(y){var x=s[y],j,w=function(){return j===void 0&&(j=r(x,y)),j};if(y===0){var S=e*(x.coordinate-e*w()/2-l);s[y]=x=kr(kr({},x),{},{tickCoord:S<0?x.coordinate-S*e:x.coordinate})}else s[y]=x=kr(kr({},x),{},{tickCoord:x.coordinate});var k=C0(e,x.tickCoord,w,l,u);k&&(l=x.tickCoord+e*(w()/2+a),s[y]=kr(kr({},x),{},{isShow:!0}))},b=0;b<m;b++)g(b);return s}function yN(e,t,r){var n=e.tick,a=e.ticks,i=e.viewBox,s=e.minTickGap,o=e.orientation,l=e.interval,u=e.tickFormatter,d=e.unit,f=e.angle;if(!a||!a.length||!n)return[];if(re(l)||iu.isSsr)return kMe(a,typeof l=="number"&&re(l)?l:0);var h=[],p=o==="top"||o==="bottom"?"width":"height",m=d&&p==="width"?yd(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=function(x,j){var w=$e(u)?u(x.value,j):x.value;return p==="width"?wMe(yd(w,{fontSize:t,letterSpacing:r}),m,f):yd(w,{fontSize:t,letterSpacing:r})[p]},b=a.length>=2?ra(a[1].coordinate-a[0].coordinate):1,v=jMe(i,b,p);return l==="equidistantPreserveStart"?SMe(b,v,g,a,s):(l==="preserveStart"||l==="preserveStartEnd"?h=AMe(b,v,g,a,s,l==="preserveStartEnd"):h=PMe(b,v,g,a,s),h.filter(function(y){return y.isShow}))}var OMe=["viewBox"],CMe=["viewBox"],TMe=["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 Cl(){return Cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Cl.apply(this,arguments)}function E$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E$(Object(r),!0).forEach(function(n){vN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sb(e,t){if(e==null)return{};var r=MMe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function MMe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function $Me(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,CF(n.key),n)}}function RMe(e,t,r){return t&&P$(e.prototype,t),r&&P$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function DMe(e,t,r){return t=T0(t),IMe(e,OF()?Reflect.construct(t,r||[],T0(e).constructor):t.apply(e,r))}function IMe(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 LMe(e)}function LMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function OF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OF=function(){return!!e})()}function T0(e){return T0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},T0(e)}function zMe(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&&Tj(e,t)}function Tj(e,t){return Tj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Tj(e,t)}function vN(e,t,r){return t=CF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CF(e){var t=FMe(e,"string");return Ac(t)=="symbol"?t:t+""}function FMe(e,t){if(Ac(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ac(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var lu=function(e){function t(r){var n;return $Me(this,t),n=DMe(this,t,[r]),n.state={fontSize:"",letterSpacing:""},n}return zMe(t,e),RMe(t,[{key:"shouldComponentUpdate",value:function(n,a){var i=n.viewBox,s=Sb(n,OMe),o=this.props,l=o.viewBox,u=Sb(o,CMe);return!Gl(i,l)||!Gl(s,u)||!Gl(a,this.state)}},{key:"componentDidMount",value:function(){var n=this.layerReference;if(n){var a=n.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(n){var a=this.props,i=a.x,s=a.y,o=a.width,l=a.height,u=a.orientation,d=a.tickSize,f=a.mirror,h=a.tickMargin,p,m,g,b,v,y,x=f?-1:1,j=n.tickSize||d,w=re(n.tickCoord)?n.tickCoord:n.coordinate;switch(u){case"top":p=m=n.coordinate,b=s+ +!f*l,g=b-x*j,y=g-x*h,v=w;break;case"left":g=b=n.coordinate,m=i+ +!f*o,p=m-x*j,v=p-x*h,y=w;break;case"right":g=b=n.coordinate,m=i+ +f*o,p=m+x*j,v=p+x*h,y=w;break;default:p=m=n.coordinate,b=s+ +f*l,g=b+x*j,y=g+x*h,v=w;break}return{line:{x1:p,y1:g,x2:m,y2:b},tick:{x:v,y}}}},{key:"getTickTextAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s;switch(a){case"left":s=i?"start":"end";break;case"right":s=i?"end":"start";break;default:s="middle";break}return s}},{key:"getTickVerticalAnchor",value:function(){var n=this.props,a=n.orientation,i=n.mirror,s="end";switch(a){case"left":case"right":s="middle";break;case"top":s=i?"start":"end";break;default:s=i?"end":"start";break}return s}},{key:"renderAxisLine",value:function(){var n=this.props,a=n.x,i=n.y,s=n.width,o=n.height,l=n.orientation,u=n.mirror,d=n.axisLine,f=Jt(Jt(Jt({},qe(this.props,!1)),qe(d,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!u||l==="bottom"&&u);f=Jt(Jt({},f),{},{x1:a,y1:i+h*o,x2:a+s,y2:i+h*o})}else{var p=+(l==="left"&&!u||l==="right"&&u);f=Jt(Jt({},f),{},{x1:a+p*s,y1:i,x2:a+p*s,y2:i+o})}return T.createElement("line",Cl({},f,{className:Ke("recharts-cartesian-axis-line",Tn(d,"className"))}))}},{key:"renderTicks",value:function(n,a,i){var s=this,o=this.props,l=o.tickLine,u=o.stroke,d=o.tick,f=o.tickFormatter,h=o.unit,p=yN(Jt(Jt({},this.props),{},{ticks:n}),a,i),m=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),b=qe(this.props,!1),v=qe(d,!1),y=Jt(Jt({},b),{},{fill:"none"},qe(l,!1)),x=p.map(function(j,w){var S=s.getTickLineCoord(j),k=S.line,_=S.tick,E=Jt(Jt(Jt(Jt({textAnchor:m,verticalAnchor:g},b),{},{stroke:"none",fill:u},v),_),{},{index:w,payload:j,visibleTicksCount:p.length,tickFormatter:f});return T.createElement(Bt,Cl({className:"recharts-cartesian-axis-tick",key:"tick-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},Gm(s.props,j,w)),l&&T.createElement("line",Cl({},y,k,{className:Ke("recharts-cartesian-axis-tick-line",Tn(l,"className"))})),d&&t.renderTickItem(d,E,"".concat($e(f)?f(j.value,w):j.value).concat(h||"")))});return T.createElement("g",{className:"recharts-cartesian-axis-ticks"},x)}},{key:"render",value:function(){var n=this,a=this.props,i=a.axisLine,s=a.width,o=a.height,l=a.ticksGenerator,u=a.className,d=a.hide;if(d)return null;var f=this.props,h=f.ticks,p=Sb(f,TMe),m=h;return $e(l)&&(m=h&&h.length>0?l(this.props):l(p)),s<=0||o<=0||!m||!m.length?null:T.createElement(Bt,{className:Ke("recharts-cartesian-axis",u),ref:function(b){n.layerReference=b}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),Nr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(n,a,i){var s,o=Ke(a.className,"recharts-cartesian-axis-tick-value");return T.isValidElement(n)?s=T.cloneElement(n,Jt(Jt({},a),{},{className:o})):$e(n)?s=n(Jt(Jt({},a),{},{className:o})):s=T.createElement(a0,Cl({},a,{className:"recharts-cartesian-axis-tick-value"}),i),s}}])}(N.Component);vN(lu,"displayName","CartesianAxis");vN(lu,"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 BMe=["x1","y1","x2","y2","key"],VMe=["offset"];function Ro(e){"@babel/helpers - typeof";return Ro=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},Ro(e)}function A$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _r(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A$(Object(r),!0).forEach(function(n){UMe(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UMe(e,t,r){return t=HMe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function HMe(e){var t=WMe(e,"string");return Ro(t)=="symbol"?t:t+""}function WMe(e,t){if(Ro(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Ro(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lo(){return lo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lo.apply(this,arguments)}function O$(e,t){if(e==null)return{};var r=qMe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function qMe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var GMe=function(t){var r=t.fill;if(!r||r==="none")return null;var n=t.fillOpacity,a=t.x,i=t.y,s=t.width,o=t.height,l=t.ry;return T.createElement("rect",{x:a,y:i,ry:l,width:s,height:o,stroke:"none",fill:r,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function TF(e,t){var r;if(T.isValidElement(e))r=T.cloneElement(e,t);else if($e(e))r=e(t);else{var n=t.x1,a=t.y1,i=t.x2,s=t.y2,o=t.key,l=O$(t,BMe),u=qe(l,!1);u.offset;var d=O$(u,VMe);r=T.createElement("line",lo({},d,{x1:n,y1:a,x2:i,y2:s,fill:"none",key:o}))}return r}function KMe(e){var t=e.x,r=e.width,n=e.horizontal,a=n===void 0?!0:n,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(o,l){var u=_r(_r({},e),{},{x1:t,y1:o,x2:t+r,y2:o,key:"line-".concat(l),index:l});return TF(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-horizontal"},s)}function YMe(e){var t=e.y,r=e.height,n=e.vertical,a=n===void 0?!0:n,i=e.verticalPoints;if(!a||!i||!i.length)return null;var s=i.map(function(o,l){var u=_r(_r({},e),{},{x1:o,y1:t,x2:o,y2:t+r,key:"line-".concat(l),index:l});return TF(a,u)});return T.createElement("g",{className:"recharts-cartesian-grid-vertical"},s)}function XMe(e){var t=e.horizontalFill,r=e.fillOpacity,n=e.x,a=e.y,i=e.width,s=e.height,o=e.horizontalPoints,l=e.horizontal,u=l===void 0?!0:l;if(!u||!t||!t.length)return null;var d=o.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var m=!d[p+1],g=m?a+s-h:d[p+1]-h;if(g<=0)return null;var b=p%t.length;return T.createElement("rect",{key:"react-".concat(p),y:h,x:n,height:g,width:i,stroke:"none",fill:t[b],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function ZMe(e){var t=e.vertical,r=t===void 0?!0:t,n=e.verticalFill,a=e.fillOpacity,i=e.x,s=e.y,o=e.width,l=e.height,u=e.verticalPoints;if(!r||!n||!n.length)return null;var d=u.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var m=!d[p+1],g=m?i+o-h:d[p+1]-h;if(g<=0)return null;var b=p%n.length;return T.createElement("rect",{key:"react-".concat(p),x:h,y:s,width:g,height:l,stroke:"none",fill:n[b],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return T.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var QMe=function(t,r){var n=t.xAxis,a=t.width,i=t.height,s=t.offset;return H8(yN(_r(_r(_r({},lu.defaultProps),n),{},{ticks:Wa(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.left,s.left+s.width,r)},JMe=function(t,r){var n=t.yAxis,a=t.width,i=t.height,s=t.offset;return H8(yN(_r(_r(_r({},lu.defaultProps),n),{},{ticks:Wa(n,!0),viewBox:{x:0,y:0,width:a,height:i}})),s.top,s.top+s.height,r)},ll={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function MF(e){var t,r,n,a,i,s,o=hN(),l=pN(),u=FTe(),d=_r(_r({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:ll.stroke,fill:(r=e.fill)!==null&&r!==void 0?r:ll.fill,horizontal:(n=e.horizontal)!==null&&n!==void 0?n:ll.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:ll.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:ll.vertical,verticalFill:(s=e.verticalFill)!==null&&s!==void 0?s:ll.verticalFill,x:re(e.x)?e.x:u.left,y:re(e.y)?e.y:u.top,width:re(e.width)?e.width:u.width,height:re(e.height)?e.height:u.height}),f=d.x,h=d.y,p=d.width,m=d.height,g=d.syncWithTicks,b=d.horizontalValues,v=d.verticalValues,y=ITe(),x=LTe();if(!re(p)||p<=0||!re(m)||m<=0||!re(f)||f!==+f||!re(h)||h!==+h)return null;var j=d.verticalCoordinatesGenerator||QMe,w=d.horizontalCoordinatesGenerator||JMe,S=d.horizontalPoints,k=d.verticalPoints;if((!S||!S.length)&&$e(w)){var _=b&&b.length,E=w({yAxis:x?_r(_r({},x),{},{ticks:_?b:x.ticks}):void 0,width:o,height:l,offset:u},_?!0:g);Za(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ro(E),"]")),Array.isArray(E)&&(S=E)}if((!k||!k.length)&&$e(j)){var A=v&&v.length,C=j({xAxis:y?_r(_r({},y),{},{ticks:A?v:y.ticks}):void 0,width:o,height:l,offset:u},A?!0:g);Za(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ro(C),"]")),Array.isArray(C)&&(k=C)}return T.createElement("g",{className:"recharts-cartesian-grid"},T.createElement(GMe,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),T.createElement(KMe,lo({},d,{offset:u,horizontalPoints:S,xAxis:y,yAxis:x})),T.createElement(YMe,lo({},d,{offset:u,verticalPoints:k,xAxis:y,yAxis:x})),T.createElement(XMe,lo({},d,{horizontalPoints:S})),T.createElement(ZMe,lo({},d,{verticalPoints:k})))}MF.displayName="CartesianGrid";var e$e=["type","layout","connectNulls","ref"],t$e=["key"];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 C$(e,t){if(e==null)return{};var r=r$e(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function r$e(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function wd(){return wd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wd.apply(this,arguments)}function T$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T$(Object(r),!0).forEach(function(n){Zn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cl(e){return s$e(e)||i$e(e)||a$e(e)||n$e()}function n$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
624
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function a$e(e,t){if(e){if(typeof e=="string")return Mj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Mj(e,t)}}function i$e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s$e(e){if(Array.isArray(e))return Mj(e)}function Mj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function o$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M$(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,RF(n.key),n)}}function l$e(e,t,r){return t&&M$(e.prototype,t),r&&M$(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function c$e(e,t,r){return t=M0(t),u$e(e,$F()?Reflect.construct(t,r||[],M0(e).constructor):t.apply(e,r))}function u$e(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 d$e(e)}function d$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return($F=function(){return!!e})()}function M0(e){return M0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},M0(e)}function f$e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$j(e,t)}function $j(e,t){return $j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},$j(e,t)}function Zn(e,t,r){return t=RF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RF(e){var t=h$e(e,"string");return Oc(t)=="symbol"?t:t+""}function h$e(e,t){if(Oc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Oc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uh=function(e){function t(){var r;o$e(this,t);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return r=c$e(this,t,[].concat(a)),Zn(r,"state",{isAnimationFinished:!0,totalLength:0}),Zn(r,"generateSimpleStrokeDasharray",function(s,o){return"".concat(o,"px ").concat(s-o,"px")}),Zn(r,"getStrokeDasharray",function(s,o,l){var u=l.reduce(function(v,y){return v+y});if(!u)return r.generateSimpleStrokeDasharray(o,s);for(var d=Math.floor(s/u),f=s%u,h=o-s,p=[],m=0,g=0;m<l.length;g+=l[m],++m)if(g+l[m]>f){p=[].concat(cl(l.slice(0,m)),[f-g]);break}var b=p.length%2===0?[0,h]:[h];return[].concat(cl(t.repeat(l,d)),cl(p),b).map(function(v){return"".concat(v,"px")}).join(", ")}),Zn(r,"id",ah("recharts-line-")),Zn(r,"pathRef",function(s){r.mainCurve=s}),Zn(r,"handleAnimationEnd",function(){r.setState({isAnimationFinished:!0}),r.props.onAnimationEnd&&r.props.onAnimationEnd()}),Zn(r,"handleAnimationStart",function(){r.setState({isAnimationFinished:!1}),r.props.onAnimationStart&&r.props.onAnimationStart()}),r}return f$e(t,e),l$e(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();this.setState({totalLength:n})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var n=this.getTotalLength();n!==this.state.totalLength&&this.setState({totalLength:n})}}},{key:"getTotalLength",value:function(){var n=this.mainCurve;try{return n&&n.getTotalLength&&n.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(n,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,s=i.points,o=i.xAxis,l=i.yAxis,u=i.layout,d=i.children,f=Mn(d,lh);if(!f)return null;var h=function(g,b){return{x:g.x,y:g.y,value:g.value,errorVal:un(g.payload,b)}},p={clipPath:n?"url(#clipPath-".concat(a,")"):null};return T.createElement(Bt,p,f.map(function(m){return T.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:s,xAxis:o,yAxis:l,layout:u,dataPointFormatter:h})}))}},{key:"renderDots",value:function(n,a,i){var s=this.props.isAnimationActive;if(s&&!this.state.isAnimationFinished)return null;var o=this.props,l=o.dot,u=o.points,d=o.dataKey,f=qe(this.props,!1),h=qe(l,!0),p=u.map(function(g,b){var v=Qr(Qr(Qr({key:"dot-".concat(b),r:3},f),h),{},{index:b,cx:g.x,cy:g.y,value:g.value,dataKey:d,payload:g.payload,points:u});return t.renderDotItem(l,v)}),m={clipPath:n?"url(#clipPath-".concat(a?"":"dots-").concat(i,")"):null};return T.createElement(Bt,wd({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(n,a,i,s){var o=this.props,l=o.type,u=o.layout,d=o.connectNulls;o.ref;var f=C$(o,e$e),h=Qr(Qr(Qr({},qe(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:a?"url(#clipPath-".concat(i,")"):null,points:n},s),{},{type:l,layout:u,connectNulls:d});return T.createElement(dj,wd({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(n,a){var i=this,s=this.props,o=s.points,l=s.strokeDasharray,u=s.isAnimationActive,d=s.animationBegin,f=s.animationDuration,h=s.animationEasing,p=s.animationId,m=s.animateNewValues,g=s.width,b=s.height,v=this.state,y=v.prevPoints,x=v.totalLength;return T.createElement(mi,{begin:d,duration:f,isActive:u,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(j){var w=j.t;if(y){var S=y.length/o.length,k=o.map(function(M,O){var P=Math.floor(O*S);if(y[P]){var D=y[P],I=ea(D.x,M.x),L=ea(D.y,M.y);return Qr(Qr({},M),{},{x:I(w),y:L(w)})}if(m){var R=ea(g*2,M.x),$=ea(b/2,M.y);return Qr(Qr({},M),{},{x:R(w),y:$(w)})}return Qr(Qr({},M),{},{x:M.x,y:M.y})});return i.renderCurveStatically(k,n,a)}var _=ea(0,x),E=_(w),A;if(l){var C="".concat(l).split(/[,\s]+/gim).map(function(M){return parseFloat(M)});A=i.getStrokeDasharray(E,x,C)}else A=i.generateSimpleStrokeDasharray(x,E);return i.renderCurveStatically(o,n,a,{strokeDasharray:A})})}},{key:"renderCurve",value:function(n,a){var i=this.props,s=i.points,o=i.isAnimationActive,l=this.state,u=l.prevPoints,d=l.totalLength;return o&&s&&s.length&&(!u&&d>0||!sy(u,s))?this.renderCurveWithAnimation(n,a):this.renderCurveStatically(s,n,a)}},{key:"render",value:function(){var n,a=this.props,i=a.hide,s=a.dot,o=a.points,l=a.className,u=a.xAxis,d=a.yAxis,f=a.top,h=a.left,p=a.width,m=a.height,g=a.isAnimationActive,b=a.id;if(i||!o||!o.length)return null;var v=this.state.isAnimationFinished,y=o.length===1,x=Ke("recharts-line",l),j=u&&u.allowDataOverflow,w=d&&d.allowDataOverflow,S=j||w,k=Fe(b)?this.id:b,_=(n=qe(s,!1))!==null&&n!==void 0?n:{r:3,strokeWidth:2},E=_.r,A=E===void 0?3:E,C=_.strokeWidth,M=C===void 0?2:C,O=$1e(s)?s:{},P=O.clipDot,D=P===void 0?!0:P,I=A*2+M;return T.createElement(Bt,{className:x},j||w?T.createElement("defs",null,T.createElement("clipPath",{id:"clipPath-".concat(k)},T.createElement("rect",{x:j?h:h-p/2,y:w?f:f-m/2,width:j?p:p*2,height:w?m:m*2})),!D&&T.createElement("clipPath",{id:"clipPath-dots-".concat(k)},T.createElement("rect",{x:h-I/2,y:f-I/2,width:p+I,height:m+I}))):null,!y&&this.renderCurve(S,k),this.renderErrorBar(S,k),(y||s)&&this.renderDots(S,D,k),(!g||v)&&ds.renderCallByParent(this.props,o))}}],[{key:"getDerivedStateFromProps",value:function(n,a){return n.animationId!==a.prevAnimationId?{prevAnimationId:n.animationId,curPoints:n.points,prevPoints:a.curPoints}:n.points!==a.curPoints?{curPoints:n.points}:null}},{key:"repeat",value:function(n,a){for(var i=n.length%2!==0?[].concat(cl(n),[0]):n,s=[],o=0;o<a;++o)s=[].concat(cl(s),cl(i));return s}},{key:"renderDotItem",value:function(n,a){var i;if(T.isValidElement(n))i=T.cloneElement(n,a);else if($e(n))i=n(a);else{var s=a.key,o=C$(a,t$e),l=Ke("recharts-line-dot",typeof n!="boolean"?n.className:"");i=T.createElement(cN,wd({key:s},o,{className:l}))}return i}}])}(N.PureComponent);Zn(uh,"displayName","Line");Zn(uh,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!iu.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1});Zn(uh,"getComposedData",function(e){var t=e.props,r=e.xAxis,n=e.yAxis,a=e.xAxisTicks,i=e.yAxisTicks,s=e.dataKey,o=e.bandSize,l=e.displayedData,u=e.offset,d=t.layout,f=l.map(function(h,p){var m=un(h,s);return d==="horizontal"?{x:mM({axis:r,ticks:a,bandSize:o,entry:h,index:p}),y:Fe(m)?null:n.scale(m),value:m,payload:h}:{x:Fe(m)?null:r.scale(m),y:mM({axis:n,ticks:i,bandSize:o,entry:h,index:p}),value:m,payload:h}});return Qr({points:f,layout:d},u)});function Cc(e){"@babel/helpers - typeof";return Cc=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},Cc(e)}function p$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m$e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,LF(n.key),n)}}function g$e(e,t,r){return t&&m$e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function y$e(e,t,r){return t=$0(t),v$e(e,DF()?Reflect.construct(t,r||[],$0(e).constructor):t.apply(e,r))}function v$e(e,t){if(t&&(Cc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return x$e(e)}function x$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function DF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(DF=function(){return!!e})()}function $0(e){return $0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$0(e)}function b$e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rj(e,t)}function Rj(e,t){return Rj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Rj(e,t)}function IF(e,t,r){return t=LF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LF(e){var t=w$e(e,"string");return Cc(t)=="symbol"?t:t+""}function w$e(e,t){if(Cc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Cc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Dj(){return Dj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Dj.apply(this,arguments)}function j$e(e){var t=e.xAxisId,r=hN(),n=pN(),a=wF(t);return a==null?null:N.createElement(lu,Dj({},a,{className:Ke("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:n},ticksGenerator:function(s){return Wa(s,!0)}}))}var gy=function(e){function t(){return p$e(this,t),y$e(this,t,arguments)}return b$e(t,e),g$e(t,[{key:"render",value:function(){return N.createElement(j$e,this.props)}}])}(N.Component);IF(gy,"displayName","XAxis");IF(gy,"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 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 k$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S$e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,BF(n.key),n)}}function N$e(e,t,r){return t&&S$e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _$e(e,t,r){return t=R0(t),E$e(e,zF()?Reflect.construct(t,r||[],R0(e).constructor):t.apply(e,r))}function E$e(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 P$e(e)}function P$e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zF=function(){return!!e})()}function R0(e){return R0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},R0(e)}function A$e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ij(e,t)}function Ij(e,t){return Ij=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Ij(e,t)}function FF(e,t,r){return t=BF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BF(e){var t=O$e(e,"string");return Tc(t)=="symbol"?t:t+""}function O$e(e,t){if(Tc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Tc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Lj(){return Lj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Lj.apply(this,arguments)}var C$e=function(t){var r=t.yAxisId,n=hN(),a=pN(),i=jF(r);return i==null?null:N.createElement(lu,Lj({},i,{className:Ke("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:a},ticksGenerator:function(o){return Wa(o,!0)}}))},yy=function(e){function t(){return k$e(this,t),_$e(this,t,arguments)}return A$e(t,e),N$e(t,[{key:"render",value:function(){return N.createElement(C$e,this.props)}}])}(N.Component);FF(yy,"displayName","YAxis");FF(yy,"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 $$(e){return R$e(e)||$$e(e)||M$e(e)||T$e()}function T$e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
625
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function M$e(e,t){if(e){if(typeof e=="string")return zj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zj(e,t)}}function $$e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function R$e(e){if(Array.isArray(e))return zj(e)}function zj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var Fj=function(t,r,n,a,i){var s=Mn(t,gN),o=Mn(t,hy),l=[].concat($$(s),$$(o)),u=Mn(t,my),d="".concat(a,"Id"),f=a[0],h=r;if(l.length&&(h=l.reduce(function(g,b){if(b.props[d]===n&&Na(b.props,"extendDomain")&&re(b.props[f])){var v=b.props[f];return[Math.min(g[0],v),Math.max(g[1],v)]}return g},h)),u.length){var p="".concat(f,"1"),m="".concat(f,"2");h=u.reduce(function(g,b){if(b.props[d]===n&&Na(b.props,"extendDomain")&&re(b.props[p])&&re(b.props[m])){var v=b.props[p],y=b.props[m];return[Math.min(g[0],v,y),Math.max(g[1],v,y)]}return g},h)}return i&&i.length&&(h=i.reduce(function(g,b){return re(b)?[Math.min(g[0],b),Math.max(g[1],b)]:g},h)),h},VF={exports:{}};(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function a(l,u,d){this.fn=l,this.context=u,this.once=d||!1}function i(l,u,d,f,h){if(typeof d!="function")throw new TypeError("The listener must be a function");var p=new a(d,f||l,h),m=r?r+u:u;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function s(l,u){--l._eventsCount===0?l._events=new n:delete l._events[u]}function o(){this._events=new n,this._eventsCount=0}o.prototype.eventNames=function(){var u=[],d,f;if(this._eventsCount===0)return u;for(f in d=this._events)t.call(d,f)&&u.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},o.prototype.listeners=function(u){var d=r?r+u:u,f=this._events[d];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,p=f.length,m=new Array(p);h<p;h++)m[h]=f[h].fn;return m},o.prototype.listenerCount=function(u){var d=r?r+u:u,f=this._events[d];return f?f.fn?1:f.length:0},o.prototype.emit=function(u,d,f,h,p,m){var g=r?r+u:u;if(!this._events[g])return!1;var b=this._events[g],v=arguments.length,y,x;if(b.fn){switch(b.once&&this.removeListener(u,b.fn,void 0,!0),v){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,d),!0;case 3:return b.fn.call(b.context,d,f),!0;case 4:return b.fn.call(b.context,d,f,h),!0;case 5:return b.fn.call(b.context,d,f,h,p),!0;case 6:return b.fn.call(b.context,d,f,h,p,m),!0}for(x=1,y=new Array(v-1);x<v;x++)y[x-1]=arguments[x];b.fn.apply(b.context,y)}else{var j=b.length,w;for(x=0;x<j;x++)switch(b[x].once&&this.removeListener(u,b[x].fn,void 0,!0),v){case 1:b[x].fn.call(b[x].context);break;case 2:b[x].fn.call(b[x].context,d);break;case 3:b[x].fn.call(b[x].context,d,f);break;case 4:b[x].fn.call(b[x].context,d,f,h);break;default:if(!y)for(w=1,y=new Array(v-1);w<v;w++)y[w-1]=arguments[w];b[x].fn.apply(b[x].context,y)}}return!0},o.prototype.on=function(u,d,f){return i(this,u,d,f,!1)},o.prototype.once=function(u,d,f){return i(this,u,d,f,!0)},o.prototype.removeListener=function(u,d,f,h){var p=r?r+u:u;if(!this._events[p])return this;if(!d)return s(this,p),this;var m=this._events[p];if(m.fn)m.fn===d&&(!h||m.once)&&(!f||m.context===f)&&s(this,p);else{for(var g=0,b=[],v=m.length;g<v;g++)(m[g].fn!==d||h&&!m[g].once||f&&m[g].context!==f)&&b.push(m[g]);b.length?this._events[p]=b.length===1?b[0]:b:s(this,p)}return this},o.prototype.removeAllListeners=function(u){var d;return u?(d=r?r+u:u,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=r,o.EventEmitter=o,e.exports=o})(VF);var D$e=VF.exports;const I$e=Je(D$e);var Nb=new I$e,_b="recharts.syncMouseEvents";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 L$e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function z$e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,UF(n.key),n)}}function F$e(e,t,r){return t&&z$e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Eb(e,t,r){return t=UF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UF(e){var t=B$e(e,"string");return Df(t)=="symbol"?t:t+""}function B$e(e,t){if(Df(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Df(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var V$e=function(){function e(){L$e(this,e),Eb(this,"activeIndex",0),Eb(this,"coordinateList",[]),Eb(this,"layout","horizontal")}return F$e(e,[{key:"setDetails",value:function(r){var n,a=r.coordinateList,i=a===void 0?null:a,s=r.container,o=s===void 0?null:s,l=r.layout,u=l===void 0?null:l,d=r.offset,f=d===void 0?null:d,h=r.mouseHandlerCallback,p=h===void 0?null:h;this.coordinateList=(n=i??this.coordinateList)!==null&&n!==void 0?n:[],this.container=o??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=p??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(r){if(this.coordinateList.length!==0)switch(r.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(r){this.activeIndex=r}},{key:"spoofMouse",value:function(){var r,n;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,s=a.y,o=a.height,l=this.coordinateList[this.activeIndex].coordinate,u=((r=window)===null||r===void 0?void 0:r.scrollX)||0,d=((n=window)===null||n===void 0?void 0:n.scrollY)||0,f=i+l+u,h=s+this.offset.top+o/2+d;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])}();function U$e(e,t,r){if(r==="number"&&t===!0&&Array.isArray(e)){var n=e==null?void 0:e[0],a=e==null?void 0:e[1];if(n&&a&&re(n)&&re(a))return!0}return!1}function H$e(e,t,r,n){var a=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-a,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function HF(e){var t=e.cx,r=e.cy,n=e.radius,a=e.startAngle,i=e.endAngle,s=gr(t,r,n,a),o=gr(t,r,n,i);return{points:[s,o],cx:t,cy:r,radius:n,startAngle:a,endAngle:i}}function W$e(e,t,r){var n,a,i,s;if(e==="horizontal")n=t.x,i=n,a=r.top,s=r.top+r.height;else if(e==="vertical")a=t.y,s=a,n=r.left,i=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var o=t.cx,l=t.cy,u=t.innerRadius,d=t.outerRadius,f=t.angle,h=gr(o,l,u,f),p=gr(o,l,d,f);n=h.x,a=h.y,i=p.x,s=p.y}else return HF(t);return[{x:n,y:a},{x:i,y:s}]}function If(e){"@babel/helpers - typeof";return If=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},If(e)}function R$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function fp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?R$(Object(r),!0).forEach(function(n){q$e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q$e(e,t,r){return t=G$e(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G$e(e){var t=K$e(e,"string");return If(t)=="symbol"?t:t+""}function K$e(e,t){if(If(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(If(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Y$e(e){var t,r,n=e.element,a=e.tooltipEventType,i=e.isActive,s=e.activeCoordinate,o=e.activePayload,l=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,p=(t=n.props.cursor)!==null&&t!==void 0?t:(r=n.type.defaultProps)===null||r===void 0?void 0:r.cursor;if(!n||!p||!i||!s||h!=="ScatterChart"&&a!=="axis")return null;var m,g=dj;if(h==="ScatterChart")m=s,g=WOe;else if(h==="BarChart")m=H$e(f,s,l,d),g=lN;else if(f==="radial"){var b=HF(s),v=b.cx,y=b.cy,x=b.radius,j=b.startAngle,w=b.endAngle;m={cx:v,cy:y,startAngle:j,endAngle:w,innerRadius:x,outerRadius:x},g=Y8}else m={points:W$e(f,s,l)},g=dj;var S=fp(fp(fp(fp({stroke:"#ccc",pointerEvents:"none"},l),m),qe(p,!1)),{},{payload:o,payloadIndex:u,className:Ke("recharts-tooltip-cursor",p.className)});return N.isValidElement(p)?N.cloneElement(p,S):N.createElement(g,S)}var X$e=["item"],Z$e=["children","className","width","height","style","compact","title","desc"];function Mc(e){"@babel/helpers - typeof";return Mc=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},Mc(e)}function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Tl.apply(this,arguments)}function D$(e,t){return eRe(e)||J$e(e,t)||qF(e,t)||Q$e()}function Q$e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
626
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J$e(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,s,o=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==t);l=!0);}catch(d){u=!0,a=d}finally{try{if(!l&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(u)throw a}}return o}}function eRe(e){if(Array.isArray(e))return e}function I$(e,t){if(e==null)return{};var r=tRe(e,t),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)n=i[a],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tRe(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function rRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nRe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,GF(n.key),n)}}function aRe(e,t,r){return t&&nRe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iRe(e,t,r){return t=D0(t),sRe(e,WF()?Reflect.construct(t,r||[],D0(e).constructor):t.apply(e,r))}function sRe(e,t){if(t&&(Mc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return oRe(e)}function oRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function WF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(WF=function(){return!!e})()}function D0(e){return D0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},D0(e)}function lRe(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&&Bj(e,t)}function Bj(e,t){return Bj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},Bj(e,t)}function $c(e){return dRe(e)||uRe(e)||qF(e)||cRe()}function cRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
627
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qF(e,t){if(e){if(typeof e=="string")return Vj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vj(e,t)}}function uRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dRe(e){if(Array.isArray(e))return Vj(e)}function Vj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function L$(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L$(Object(r),!0).forEach(function(n){Se(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L$(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Se(e,t,r){return t=GF(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GF(e){var t=fRe(e,"string");return Mc(t)=="symbol"?t:t+""}function fRe(e,t){if(Mc(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Mc(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hRe={xAxis:["bottom","top"],yAxis:["left","right"]},pRe={width:"100%",height:"100%"},KF={x:0,y:0};function hp(e){return e}var mRe=function(t,r){return r==="horizontal"?t.x:r==="vertical"?t.y:r==="centric"?t.angle:t.radius},gRe=function(t,r,n,a){var i=r.find(function(d){return d&&d.index===n});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var s=i.coordinate,o=a.radius;return Y(Y(Y({},a),gr(a.cx,a.cy,o,s)),{},{angle:s,radius:o})}var l=i.coordinate,u=a.angle;return Y(Y(Y({},a),gr(a.cx,a.cy,l,u)),{},{angle:u,radius:l})}return KF},vy=function(t,r){var n=r.graphicalItems,a=r.dataStartIndex,i=r.dataEndIndex,s=(n??[]).reduce(function(o,l){var u=l.props.data;return u&&u.length?[].concat($c(o),$c(u)):o},[]);return s.length>0?s:t&&t.length&&re(a)&&re(i)?t.slice(a,i+1):[]};function YF(e){return e==="number"?[0,"auto"]:void 0}var Uj=function(t,r,n,a){var i=t.graphicalItems,s=t.tooltipAxis,o=vy(r,t);return n<0||!i||!i.length||n>=o.length?null:i.reduce(function(l,u){var d,f=(d=u.props.data)!==null&&d!==void 0?d:r;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=n&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(s.dataKey&&!s.allowDuplicatedCategory){var p=f===void 0?o:f;h=Wm(p,s.dataKey,a)}else h=f&&f[n]||o[n];return h?[].concat($c(l),[q8(u,h)]):l},[])},z$=function(t,r,n,a){var i=a||{x:t.chartX,y:t.chartY},s=mRe(i,n),o=t.orderedTooltipTicks,l=t.tooltipAxis,u=t.tooltipTicks,d=AEe(s,o,u,l);if(d>=0&&u){var f=u[d]&&u[d].value,h=Uj(t,r,d,f),p=gRe(n,o,d,i);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},yRe=function(t,r){var n=r.axes,a=r.graphicalItems,i=r.axisType,s=r.axisIdKey,o=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=U8(d,i);return n.reduce(function(m,g){var b,v=g.type.defaultProps!==void 0?Y(Y({},g.type.defaultProps),g.props):g.props,y=v.type,x=v.dataKey,j=v.allowDataOverflow,w=v.allowDuplicatedCategory,S=v.scale,k=v.ticks,_=v.includeHidden,E=v[s];if(m[E])return m;var A=vy(t.data,{graphicalItems:a.filter(function(V){var F,W=s in V.props?V.props[s]:(F=V.type.defaultProps)===null||F===void 0?void 0:F[s];return W===E}),dataStartIndex:l,dataEndIndex:u}),C=A.length,M,O,P;U$e(v.domain,j,y)&&(M=sj(v.domain,null,j),p&&(y==="number"||S!=="auto")&&(P=xd(A,x,"category")));var D=YF(y);if(!M||M.length===0){var I,L=(I=v.domain)!==null&&I!==void 0?I:D;if(x){if(M=xd(A,x,y),y==="category"&&p){var R=S1e(M);w&&R?(O=M,M=Bm(0,C)):w||(M=xM(L,M,g).reduce(function(V,F){return V.indexOf(F)>=0?V:[].concat($c(V),[F])},[]))}else if(y==="category")w?M=M.filter(function(V){return V!==""&&!Fe(V)}):M=xM(L,M,g).reduce(function(V,F){return V.indexOf(F)>=0||F===""||Fe(F)?V:[].concat($c(V),[F])},[]);else if(y==="number"){var $=$Ee(A,a.filter(function(V){var F,W,K=s in V.props?V.props[s]:(F=V.type.defaultProps)===null||F===void 0?void 0:F[s],Q="hide"in V.props?V.props.hide:(W=V.type.defaultProps)===null||W===void 0?void 0:W.hide;return K===E&&(_||!Q)}),x,i,d);$&&(M=$)}p&&(y==="number"||S!=="auto")&&(P=xd(A,x,"category"))}else p?M=Bm(0,C):o&&o[E]&&o[E].hasStack&&y==="number"?M=h==="expand"?[0,1]:W8(o[E].stackGroups,l,u):M=V8(A,a.filter(function(V){var F=s in V.props?V.props[s]:V.type.defaultProps[s],W="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return F===E&&(_||!W)}),y,d,!0);if(y==="number")M=Fj(f,M,E,i,k),L&&(M=sj(L,M,j));else if(y==="category"&&L){var z=L,U=M.every(function(V){return z.indexOf(V)>=0});U&&(M=z)}}return Y(Y({},m),{},Se({},E,Y(Y({},v),{},{axisType:i,domain:M,categoricalDomain:P,duplicateDomain:O,originalDomain:(b=v.domain)!==null&&b!==void 0?b:D,isCategorical:p,layout:d})))},{})},vRe=function(t,r){var n=r.graphicalItems,a=r.Axis,i=r.axisType,s=r.axisIdKey,o=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,d=t.layout,f=t.children,h=vy(t.data,{graphicalItems:n,dataStartIndex:l,dataEndIndex:u}),p=h.length,m=U8(d,i),g=-1;return n.reduce(function(b,v){var y=v.type.defaultProps!==void 0?Y(Y({},v.type.defaultProps),v.props):v.props,x=y[s],j=YF("number");if(!b[x]){g++;var w;return m?w=Bm(0,p):o&&o[x]&&o[x].hasStack?(w=W8(o[x].stackGroups,l,u),w=Fj(f,w,x,i)):(w=sj(j,V8(h,n.filter(function(S){var k,_,E=s in S.props?S.props[s]:(k=S.type.defaultProps)===null||k===void 0?void 0:k[s],A="hide"in S.props?S.props.hide:(_=S.type.defaultProps)===null||_===void 0?void 0:_.hide;return E===x&&!A}),"number",d),a.defaultProps.allowDataOverflow),w=Fj(f,w,x,i)),Y(Y({},b),{},Se({},x,Y(Y({axisType:i},a.defaultProps),{},{hide:!0,orientation:Tn(hRe,"".concat(i,".").concat(g%2),null),domain:w,originalDomain:j,isCategorical:m,layout:d})))}return b},{})},xRe=function(t,r){var n=r.axisType,a=n===void 0?"xAxis":n,i=r.AxisComp,s=r.graphicalItems,o=r.stackGroups,l=r.dataStartIndex,u=r.dataEndIndex,d=t.children,f="".concat(a,"Id"),h=Mn(d,i),p={};return h&&h.length?p=yRe(t,{axes:h,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:o,dataStartIndex:l,dataEndIndex:u}):s&&s.length&&(p=vRe(t,{Axis:i,graphicalItems:s,axisType:a,axisIdKey:f,stackGroups:o,dataStartIndex:l,dataEndIndex:u})),p},bRe=function(t){var r=qi(t),n=Wa(r,!1,!0);return{tooltipTicks:n,orderedTooltipTicks:j2(n,function(a){return a.coordinate}),tooltipAxis:r,tooltipAxisBandSize:m0(r,n)}},F$=function(t){var r=t.children,n=t.defaultShowTooltip,a=tn(r,Sc),i=0,s=0;return t.data&&t.data.length!==0&&(s=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(s=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:s,activeTooltipIndex:-1,isTooltipActive:!!n}},wRe=function(t){return!t||!t.length?!1:t.some(function(r){var n=Xa(r&&r.type);return n&&n.indexOf("Bar")>=0})},B$=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"}},jRe=function(t,r){var n=t.props,a=t.graphicalItems,i=t.xAxisMap,s=i===void 0?{}:i,o=t.yAxisMap,l=o===void 0?{}:o,u=n.width,d=n.height,f=n.children,h=n.margin||{},p=tn(f,Sc),m=tn(f,go),g=Object.keys(l).reduce(function(w,S){var k=l[S],_=k.orientation;return!k.mirror&&!k.hide?Y(Y({},w),{},Se({},_,w[_]+k.width)):w},{left:h.left||0,right:h.right||0}),b=Object.keys(s).reduce(function(w,S){var k=s[S],_=k.orientation;return!k.mirror&&!k.hide?Y(Y({},w),{},Se({},_,Tn(w,"".concat(_))+k.height)):w},{top:h.top||0,bottom:h.bottom||0}),v=Y(Y({},b),g),y=v.bottom;p&&(v.bottom+=p.props.height||Sc.defaultProps.height),m&&r&&(v=TEe(v,a,n,r));var x=u-v.left-v.right,j=d-v.top-v.bottom;return Y(Y({brushBottom:y},v),{},{width:Math.max(x,0),height:Math.max(j,0)})},kRe=function(t,r){if(r==="xAxis")return t[r].width;if(r==="yAxis")return t[r].height},SRe=function(t){var r=t.chartName,n=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,s=t.validateTooltipEventTypes,o=s===void 0?["axis"]:s,l=t.axisComponents,u=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(v,y){var x=y.graphicalItems,j=y.stackGroups,w=y.offset,S=y.updateId,k=y.dataStartIndex,_=y.dataEndIndex,E=v.barSize,A=v.layout,C=v.barGap,M=v.barCategoryGap,O=v.maxBarSize,P=B$(A),D=P.numericAxisName,I=P.cateAxisName,L=wRe(x),R=[];return x.forEach(function($,z){var U=vy(v.data,{graphicalItems:[$],dataStartIndex:k,dataEndIndex:_}),V=$.type.defaultProps!==void 0?Y(Y({},$.type.defaultProps),$.props):$.props,F=V.dataKey,W=V.maxBarSize,K=V["".concat(D,"Id")],Q=V["".concat(I,"Id")],ne={},pe=l.reduce(function(Xt,we){var Ar=y["".concat(we.axisType,"Map")],Ue=V["".concat(we.axisType,"Id")];Ar&&Ar[Ue]||we.axisType==="zAxis"||$o();var He=Ar[Ue];return Y(Y({},Xt),{},Se(Se({},we.axisType,He),"".concat(we.axisType,"Ticks"),Wa(He)))},ne),X=pe[I],ee=pe["".concat(I,"Ticks")],ie=j&&j[K]&&j[K].hasStack&&qEe($,j[K].stackGroups),G=Xa($.type).indexOf("Bar")>=0,Ee=m0(X,ee),be=[],Pe=L&&OEe({barSize:E,stackGroups:j,totalSize:kRe(pe,I)});if(G){var Ce,ke,oe=Fe(W)?O:W,Ze=(Ce=(ke=m0(X,ee,!0))!==null&&ke!==void 0?ke:oe)!==null&&Ce!==void 0?Ce:0;be=CEe({barGap:C,barCategoryGap:M,bandSize:Ze!==Ee?Ze:Ee,sizeList:Pe[Q],maxBarSize:oe}),Ze!==Ee&&(be=be.map(function(Xt){return Y(Y({},Xt),{},{position:Y(Y({},Xt.position),{},{offset:Xt.position.offset-Ze/2})})}))}var sr=$&&$.type&&$.type.getComposedData;sr&&R.push({props:Y(Y({},sr(Y(Y({},pe),{},{displayedData:U,props:v,dataKey:F,item:$,bandSize:Ee,barPosition:be,offset:w,stackedData:ie,layout:A,dataStartIndex:k,dataEndIndex:_}))),{},Se(Se(Se({key:$.key||"item-".concat(z)},D,pe[D]),I,pe[I]),"animationId",S)),childIndex:I1e($,v.children),item:$})}),R},p=function(v,y){var x=v.props,j=v.dataStartIndex,w=v.dataEndIndex,S=v.updateId;if(!YC({props:x}))return null;var k=x.children,_=x.layout,E=x.stackOffset,A=x.data,C=x.reverseStackOrder,M=B$(_),O=M.numericAxisName,P=M.cateAxisName,D=Mn(k,n),I=UEe(A,D,"".concat(O,"Id"),"".concat(P,"Id"),E,C),L=l.reduce(function(V,F){var W="".concat(F.axisType,"Map");return Y(Y({},V),{},Se({},W,xRe(x,Y(Y({},F),{},{graphicalItems:D,stackGroups:F.axisType===O&&I,dataStartIndex:j,dataEndIndex:w}))))},{}),R=jRe(Y(Y({},L),{},{props:x,graphicalItems:D}),y==null?void 0:y.legendBBox);Object.keys(L).forEach(function(V){L[V]=d(x,L[V],R,V.replace("Map",""),r)});var $=L["".concat(P,"Map")],z=bRe($),U=h(x,Y(Y({},L),{},{dataStartIndex:j,dataEndIndex:w,updateId:S,graphicalItems:D,stackGroups:I,offset:R}));return Y(Y({formattedGraphicalItems:U,graphicalItems:D,offset:R,stackGroups:I},z),L)},m=function(b){function v(y){var x,j,w;return rRe(this,v),w=iRe(this,v,[y]),Se(w,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Se(w,"accessibilityManager",new V$e),Se(w,"handleLegendBBoxUpdate",function(S){if(S){var k=w.state,_=k.dataStartIndex,E=k.dataEndIndex,A=k.updateId;w.setState(Y({legendBBox:S},p({props:w.props,dataStartIndex:_,dataEndIndex:E,updateId:A},Y(Y({},w.state),{},{legendBBox:S}))))}}),Se(w,"handleReceiveSyncEvent",function(S,k,_){if(w.props.syncId===S){if(_===w.eventEmitterSymbol&&typeof w.props.syncMethod!="function")return;w.applySyncEvent(k)}}),Se(w,"handleBrushChange",function(S){var k=S.startIndex,_=S.endIndex;if(k!==w.state.dataStartIndex||_!==w.state.dataEndIndex){var E=w.state.updateId;w.setState(function(){return Y({dataStartIndex:k,dataEndIndex:_},p({props:w.props,dataStartIndex:k,dataEndIndex:_,updateId:E},w.state))}),w.triggerSyncEvent({dataStartIndex:k,dataEndIndex:_})}}),Se(w,"handleMouseEnter",function(S){var k=w.getMouseInfo(S);if(k){var _=Y(Y({},k),{},{isTooltipActive:!0});w.setState(_),w.triggerSyncEvent(_);var E=w.props.onMouseEnter;$e(E)&&E(_,S)}}),Se(w,"triggeredAfterMouseMove",function(S){var k=w.getMouseInfo(S),_=k?Y(Y({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};w.setState(_),w.triggerSyncEvent(_);var E=w.props.onMouseMove;$e(E)&&E(_,S)}),Se(w,"handleItemMouseEnter",function(S){w.setState(function(){return{isTooltipActive:!0,activeItem:S,activePayload:S.tooltipPayload,activeCoordinate:S.tooltipPosition||{x:S.cx,y:S.cy}}})}),Se(w,"handleItemMouseLeave",function(){w.setState(function(){return{isTooltipActive:!1}})}),Se(w,"handleMouseMove",function(S){S.persist(),w.throttleTriggeredAfterMouseMove(S)}),Se(w,"handleMouseLeave",function(S){w.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};w.setState(k),w.triggerSyncEvent(k);var _=w.props.onMouseLeave;$e(_)&&_(k,S)}),Se(w,"handleOuterEvent",function(S){var k=D1e(S),_=Tn(w.props,"".concat(k));if(k&&$e(_)){var E,A;/.*touch.*/i.test(k)?A=w.getMouseInfo(S.changedTouches[0]):A=w.getMouseInfo(S),_((E=A)!==null&&E!==void 0?E:{},S)}}),Se(w,"handleClick",function(S){var k=w.getMouseInfo(S);if(k){var _=Y(Y({},k),{},{isTooltipActive:!0});w.setState(_),w.triggerSyncEvent(_);var E=w.props.onClick;$e(E)&&E(_,S)}}),Se(w,"handleMouseDown",function(S){var k=w.props.onMouseDown;if($e(k)){var _=w.getMouseInfo(S);k(_,S)}}),Se(w,"handleMouseUp",function(S){var k=w.props.onMouseUp;if($e(k)){var _=w.getMouseInfo(S);k(_,S)}}),Se(w,"handleTouchMove",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.throttleTriggeredAfterMouseMove(S.changedTouches[0])}),Se(w,"handleTouchStart",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseDown(S.changedTouches[0])}),Se(w,"handleTouchEnd",function(S){S.changedTouches!=null&&S.changedTouches.length>0&&w.handleMouseUp(S.changedTouches[0])}),Se(w,"handleDoubleClick",function(S){var k=w.props.onDoubleClick;if($e(k)){var _=w.getMouseInfo(S);k(_,S)}}),Se(w,"handleContextMenu",function(S){var k=w.props.onContextMenu;if($e(k)){var _=w.getMouseInfo(S);k(_,S)}}),Se(w,"triggerSyncEvent",function(S){w.props.syncId!==void 0&&Nb.emit(_b,w.props.syncId,S,w.eventEmitterSymbol)}),Se(w,"applySyncEvent",function(S){var k=w.props,_=k.layout,E=k.syncMethod,A=w.state.updateId,C=S.dataStartIndex,M=S.dataEndIndex;if(S.dataStartIndex!==void 0||S.dataEndIndex!==void 0)w.setState(Y({dataStartIndex:C,dataEndIndex:M},p({props:w.props,dataStartIndex:C,dataEndIndex:M,updateId:A},w.state)));else if(S.activeTooltipIndex!==void 0){var O=S.chartX,P=S.chartY,D=S.activeTooltipIndex,I=w.state,L=I.offset,R=I.tooltipTicks;if(!L)return;if(typeof E=="function")D=E(R,S);else if(E==="value"){D=-1;for(var $=0;$<R.length;$++)if(R[$].value===S.activeLabel){D=$;break}}var z=Y(Y({},L),{},{x:L.left,y:L.top}),U=Math.min(O,z.x+z.width),V=Math.min(P,z.y+z.height),F=R[D]&&R[D].value,W=Uj(w.state,w.props.data,D),K=R[D]?{x:_==="horizontal"?R[D].coordinate:U,y:_==="horizontal"?V:R[D].coordinate}:KF;w.setState(Y(Y({},S),{},{activeLabel:F,activeCoordinate:K,activePayload:W,activeTooltipIndex:D}))}else w.setState(S)}),Se(w,"renderCursor",function(S){var k,_=w.state,E=_.isTooltipActive,A=_.activeCoordinate,C=_.activePayload,M=_.offset,O=_.activeTooltipIndex,P=_.tooltipAxisBandSize,D=w.getTooltipEventType(),I=(k=S.props.active)!==null&&k!==void 0?k:E,L=w.props.layout,R=S.key||"_recharts-cursor";return T.createElement(Y$e,{key:R,activeCoordinate:A,activePayload:C,activeTooltipIndex:O,chartName:r,element:S,isActive:I,layout:L,offset:M,tooltipAxisBandSize:P,tooltipEventType:D})}),Se(w,"renderPolarAxis",function(S,k,_){var E=Tn(S,"type.axisType"),A=Tn(w.state,"".concat(E,"Map")),C=S.type.defaultProps,M=C!==void 0?Y(Y({},C),S.props):S.props,O=A&&A[M["".concat(E,"Id")]];return N.cloneElement(S,Y(Y({},O),{},{className:Ke(E,O.className),key:S.key||"".concat(k,"-").concat(_),ticks:Wa(O,!0)}))}),Se(w,"renderPolarGrid",function(S){var k=S.props,_=k.radialLines,E=k.polarAngles,A=k.polarRadius,C=w.state,M=C.radiusAxisMap,O=C.angleAxisMap,P=qi(M),D=qi(O),I=D.cx,L=D.cy,R=D.innerRadius,$=D.outerRadius;return N.cloneElement(S,{polarAngles:Array.isArray(E)?E:Wa(D,!0).map(function(z){return z.coordinate}),polarRadius:Array.isArray(A)?A:Wa(P,!0).map(function(z){return z.coordinate}),cx:I,cy:L,innerRadius:R,outerRadius:$,key:S.key||"polar-grid",radialLines:_})}),Se(w,"renderLegend",function(){var S=w.state.formattedGraphicalItems,k=w.props,_=k.children,E=k.width,A=k.height,C=w.props.margin||{},M=E-(C.left||0)-(C.right||0),O=F8({children:_,formattedGraphicalItems:S,legendWidth:M,legendContent:u});if(!O)return null;var P=O.item,D=I$(O,X$e);return N.cloneElement(P,Y(Y({},D),{},{chartWidth:E,chartHeight:A,margin:C,onBBoxUpdate:w.handleLegendBBoxUpdate}))}),Se(w,"renderTooltip",function(){var S,k=w.props,_=k.children,E=k.accessibilityLayer,A=tn(_,ma);if(!A)return null;var C=w.state,M=C.isTooltipActive,O=C.activeCoordinate,P=C.activePayload,D=C.activeLabel,I=C.offset,L=(S=A.props.active)!==null&&S!==void 0?S:M;return N.cloneElement(A,{viewBox:Y(Y({},I),{},{x:I.left,y:I.top}),active:L,label:D,payload:L?P:[],coordinate:O,accessibilityLayer:E})}),Se(w,"renderBrush",function(S){var k=w.props,_=k.margin,E=k.data,A=w.state,C=A.offset,M=A.dataStartIndex,O=A.dataEndIndex,P=A.updateId;return N.cloneElement(S,{key:S.key||"_recharts-brush",onChange:lp(w.handleBrushChange,S.props.onChange),data:E,x:re(S.props.x)?S.props.x:C.left,y:re(S.props.y)?S.props.y:C.top+C.height+C.brushBottom-(_.bottom||0),width:re(S.props.width)?S.props.width:C.width,startIndex:M,endIndex:O,updateId:"brush-".concat(P)})}),Se(w,"renderReferenceElement",function(S,k,_){if(!S)return null;var E=w,A=E.clipPathId,C=w.state,M=C.xAxisMap,O=C.yAxisMap,P=C.offset,D=S.type.defaultProps||{},I=S.props,L=I.xAxisId,R=L===void 0?D.xAxisId:L,$=I.yAxisId,z=$===void 0?D.yAxisId:$;return N.cloneElement(S,{key:S.key||"".concat(k,"-").concat(_),xAxis:M[R],yAxis:O[z],viewBox:{x:P.left,y:P.top,width:P.width,height:P.height},clipPathId:A})}),Se(w,"renderActivePoints",function(S){var k=S.item,_=S.activePoint,E=S.basePoint,A=S.childIndex,C=S.isRange,M=[],O=k.props.key,P=k.item.type.defaultProps!==void 0?Y(Y({},k.item.type.defaultProps),k.item.props):k.item.props,D=P.activeDot,I=P.dataKey,L=Y(Y({index:A,dataKey:I,cx:_.x,cy:_.y,r:4,fill:oN(k.item),strokeWidth:2,stroke:"#fff",payload:_.payload,value:_.value},qe(D,!1)),qm(D));return M.push(v.renderActiveDot(D,L,"".concat(O,"-activePoint-").concat(A))),E?M.push(v.renderActiveDot(D,Y(Y({},L),{},{cx:E.x,cy:E.y}),"".concat(O,"-basePoint-").concat(A))):C&&M.push(null),M}),Se(w,"renderGraphicChild",function(S,k,_){var E=w.filterFormatItem(S,k,_);if(!E)return null;var A=w.getTooltipEventType(),C=w.state,M=C.isTooltipActive,O=C.tooltipAxis,P=C.activeTooltipIndex,D=C.activeLabel,I=w.props.children,L=tn(I,ma),R=E.props,$=R.points,z=R.isRange,U=R.baseLine,V=E.item.type.defaultProps!==void 0?Y(Y({},E.item.type.defaultProps),E.item.props):E.item.props,F=V.activeDot,W=V.hide,K=V.activeBar,Q=V.activeShape,ne=!!(!W&&M&&L&&(F||K||Q)),pe={};A!=="axis"&&L&&L.props.trigger==="click"?pe={onClick:lp(w.handleItemMouseEnter,S.props.onClick)}:A!=="axis"&&(pe={onMouseLeave:lp(w.handleItemMouseLeave,S.props.onMouseLeave),onMouseEnter:lp(w.handleItemMouseEnter,S.props.onMouseEnter)});var X=N.cloneElement(S,Y(Y({},E.props),pe));function ee(we){return typeof O.dataKey=="function"?O.dataKey(we.payload):null}if(ne)if(P>=0){var ie,G;if(O.dataKey&&!O.allowDuplicatedCategory){var Ee=typeof O.dataKey=="function"?ee:"payload.".concat(O.dataKey.toString());ie=Wm($,Ee,D),G=z&&U&&Wm(U,Ee,D)}else ie=$==null?void 0:$[P],G=z&&U&&U[P];if(Q||K){var be=S.props.activeIndex!==void 0?S.props.activeIndex:P;return[N.cloneElement(S,Y(Y(Y({},E.props),pe),{},{activeIndex:be})),null,null]}if(!Fe(ie))return[X].concat($c(w.renderActivePoints({item:E,activePoint:ie,basePoint:G,childIndex:P,isRange:z})))}else{var Pe,Ce=(Pe=w.getItemByXY(w.state.activeCoordinate))!==null&&Pe!==void 0?Pe:{graphicalItem:X},ke=Ce.graphicalItem,oe=ke.item,Ze=oe===void 0?S:oe,sr=ke.childIndex,Xt=Y(Y(Y({},E.props),pe),{},{activeIndex:sr});return[N.cloneElement(Ze,Xt),null,null]}return z?[X,null,null]:[X,null]}),Se(w,"renderCustomized",function(S,k,_){return N.cloneElement(S,Y(Y({key:"recharts-customized-".concat(_)},w.props),w.state))}),Se(w,"renderMap",{CartesianGrid:{handler:hp,once:!0},ReferenceArea:{handler:w.renderReferenceElement},ReferenceLine:{handler:hp},ReferenceDot:{handler:w.renderReferenceElement},XAxis:{handler:hp},YAxis:{handler:hp},Brush:{handler:w.renderBrush,once:!0},Bar:{handler:w.renderGraphicChild},Line:{handler:w.renderGraphicChild},Area:{handler:w.renderGraphicChild},Radar:{handler:w.renderGraphicChild},RadialBar:{handler:w.renderGraphicChild},Scatter:{handler:w.renderGraphicChild},Pie:{handler:w.renderGraphicChild},Funnel:{handler:w.renderGraphicChild},Tooltip:{handler:w.renderCursor,once:!0},PolarGrid:{handler:w.renderPolarGrid,once:!0},PolarAngleAxis:{handler:w.renderPolarAxis},PolarRadiusAxis:{handler:w.renderPolarAxis},Customized:{handler:w.renderCustomized}}),w.clipPathId="".concat((x=y.id)!==null&&x!==void 0?x:ah("recharts"),"-clip"),w.throttleTriggeredAfterMouseMove=Uz(w.triggeredAfterMouseMove,(j=y.throttleDelay)!==null&&j!==void 0?j:1e3/60),w.state={},w}return lRe(v,b),aRe(v,[{key:"componentDidMount",value:function(){var x,j;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(x=this.props.margin.left)!==null&&x!==void 0?x:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var x=this.props,j=x.children,w=x.data,S=x.height,k=x.layout,_=tn(j,ma);if(_){var E=_.props.defaultIndex;if(!(typeof E!="number"||E<0||E>this.state.tooltipTicks.length-1)){var A=this.state.tooltipTicks[E]&&this.state.tooltipTicks[E].value,C=Uj(this.state,w,E,A),M=this.state.tooltipTicks[E].coordinate,O=(this.state.offset.top+S)/2,P=k==="horizontal",D=P?{x:M,y:O}:{y:M,x:O},I=this.state.formattedGraphicalItems.find(function(R){var $=R.item;return $.type.name==="Scatter"});I&&(D=Y(Y({},D),I.props.points[E].tooltipPosition),C=I.props.points[E].tooltipPayload);var L={activeTooltipIndex:E,isTooltipActive:!0,activeLabel:A,activePayload:C,activeCoordinate:D};this.setState(L),this.renderCursor(_),this.accessibilityManager.setIndex(E)}}}},{key:"getSnapshotBeforeUpdate",value:function(x,j){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==j.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==x.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==x.margin){var w,S;this.accessibilityManager.setDetails({offset:{left:(w=this.props.margin.left)!==null&&w!==void 0?w:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0}})}return null}},{key:"componentDidUpdate",value:function(x){P1([tn(x.children,ma)],[tn(this.props.children,ma)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var x=tn(this.props.children,ma);if(x&&typeof x.props.shared=="boolean"){var j=x.props.shared?"axis":"item";return o.indexOf(j)>=0?j:i}return i}},{key:"getMouseInfo",value:function(x){if(!this.container)return null;var j=this.container,w=j.getBoundingClientRect(),S=GSe(w),k={chartX:Math.round(x.pageX-S.left),chartY:Math.round(x.pageY-S.top)},_=w.width/j.offsetWidth||1,E=this.inRange(k.chartX,k.chartY,_);if(!E)return null;var A=this.state,C=A.xAxisMap,M=A.yAxisMap,O=this.getTooltipEventType(),P=z$(this.state,this.props.data,this.props.layout,E);if(O!=="axis"&&C&&M){var D=qi(C).scale,I=qi(M).scale,L=D&&D.invert?D.invert(k.chartX):null,R=I&&I.invert?I.invert(k.chartY):null;return Y(Y({},k),{},{xValue:L,yValue:R},P)}return P?Y(Y({},k),P):null}},{key:"inRange",value:function(x,j){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,S=this.props.layout,k=x/w,_=j/w;if(S==="horizontal"||S==="vertical"){var E=this.state.offset,A=k>=E.left&&k<=E.left+E.width&&_>=E.top&&_<=E.top+E.height;return A?{x:k,y:_}:null}var C=this.state,M=C.angleAxisMap,O=C.radiusAxisMap;if(M&&O){var P=qi(M);return jM({x:k,y:_},P)}return null}},{key:"parseEventsOfWrapper",value:function(){var x=this.props.children,j=this.getTooltipEventType(),w=tn(x,ma),S={};w&&j==="axis"&&(w.props.trigger==="click"?S={onClick:this.handleClick}:S={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 k=qm(this.props,this.handleOuterEvent);return Y(Y({},k),S)}},{key:"addListener",value:function(){Nb.on(_b,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){Nb.removeListener(_b,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(x,j,w){for(var S=this.state.formattedGraphicalItems,k=0,_=S.length;k<_;k++){var E=S[k];if(E.item===x||E.props.key===x.key||j===Xa(E.item.type)&&w===E.childIndex)return E}return null}},{key:"renderClipPath",value:function(){var x=this.clipPathId,j=this.state.offset,w=j.left,S=j.top,k=j.height,_=j.width;return T.createElement("defs",null,T.createElement("clipPath",{id:x},T.createElement("rect",{x:w,y:S,height:k,width:_})))}},{key:"getXScales",value:function(){var x=this.state.xAxisMap;return x?Object.entries(x).reduce(function(j,w){var S=D$(w,2),k=S[0],_=S[1];return Y(Y({},j),{},Se({},k,_.scale))},{}):null}},{key:"getYScales",value:function(){var x=this.state.yAxisMap;return x?Object.entries(x).reduce(function(j,w){var S=D$(w,2),k=S[0],_=S[1];return Y(Y({},j),{},Se({},k,_.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(x){var j;return(j=this.state.xAxisMap)===null||j===void 0||(j=j[x])===null||j===void 0?void 0:j.scale}},{key:"getYScaleByAxisId",value:function(x){var j;return(j=this.state.yAxisMap)===null||j===void 0||(j=j[x])===null||j===void 0?void 0:j.scale}},{key:"getItemByXY",value:function(x){var j=this.state,w=j.formattedGraphicalItems,S=j.activeItem;if(w&&w.length)for(var k=0,_=w.length;k<_;k++){var E=w[k],A=E.props,C=E.item,M=C.type.defaultProps!==void 0?Y(Y({},C.type.defaultProps),C.props):C.props,O=Xa(C.type);if(O==="Bar"){var P=(A.data||[]).find(function(R){return ROe(x,R)});if(P)return{graphicalItem:E,payload:P}}else if(O==="RadialBar"){var D=(A.data||[]).find(function(R){return jM(x,R)});if(D)return{graphicalItem:E,payload:D}}else if(cy(E,S)||uy(E,S)||Cf(E,S)){var I=SCe({graphicalItem:E,activeTooltipItem:S,itemData:M.data}),L=M.activeIndex===void 0?I:M.activeIndex;return{graphicalItem:Y(Y({},E),{},{childIndex:L}),payload:Cf(E,S)?M.data[I]:E.props.data[I]}}}return null}},{key:"render",value:function(){var x=this;if(!YC(this))return null;var j=this.props,w=j.children,S=j.className,k=j.width,_=j.height,E=j.style,A=j.compact,C=j.title,M=j.desc,O=I$(j,Z$e),P=qe(O,!1);if(A)return T.createElement(v$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement(O1,Tl({},P,{width:k,height:_,title:C,desc:M}),this.renderClipPath(),ZC(w,this.renderMap)));if(this.props.accessibilityLayer){var D,I;P.tabIndex=(D=this.props.tabIndex)!==null&&D!==void 0?D:0,P.role=(I=this.props.role)!==null&&I!==void 0?I:"application",P.onKeyDown=function(R){x.accessibilityManager.keyboardEvent(R)},P.onFocus=function(){x.accessibilityManager.focus()}}var L=this.parseEventsOfWrapper();return T.createElement(v$,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},T.createElement("div",Tl({className:Ke("recharts-wrapper",S),style:Y({position:"relative",cursor:"default",width:k,height:_},E)},L,{ref:function($){x.container=$}}),T.createElement(O1,Tl({},P,{width:k,height:_,title:C,desc:M,style:pRe}),this.renderClipPath(),ZC(w,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])}(N.Component);Se(m,"displayName",r),Se(m,"defaultProps",Y({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),Se(m,"getDerivedStateFromProps",function(b,v){var y=b.dataKey,x=b.data,j=b.children,w=b.width,S=b.height,k=b.layout,_=b.stackOffset,E=b.margin,A=v.dataStartIndex,C=v.dataEndIndex;if(v.updateId===void 0){var M=F$(b);return Y(Y(Y({},M),{},{updateId:0},p(Y(Y({props:b},M),{},{updateId:0}),v)),{},{prevDataKey:y,prevData:x,prevWidth:w,prevHeight:S,prevLayout:k,prevStackOffset:_,prevMargin:E,prevChildren:j})}if(y!==v.prevDataKey||x!==v.prevData||w!==v.prevWidth||S!==v.prevHeight||k!==v.prevLayout||_!==v.prevStackOffset||!Gl(E,v.prevMargin)){var O=F$(b),P={chartX:v.chartX,chartY:v.chartY,isTooltipActive:v.isTooltipActive},D=Y(Y({},z$(v,x,k)),{},{updateId:v.updateId+1}),I=Y(Y(Y({},O),P),D);return Y(Y(Y({},I),p(Y({props:b},I),v)),{},{prevDataKey:y,prevData:x,prevWidth:w,prevHeight:S,prevLayout:k,prevStackOffset:_,prevMargin:E,prevChildren:j})}if(!P1(j,v.prevChildren)){var L,R,$,z,U=tn(j,Sc),V=U&&(L=(R=U.props)===null||R===void 0?void 0:R.startIndex)!==null&&L!==void 0?L:A,F=U&&($=(z=U.props)===null||z===void 0?void 0:z.endIndex)!==null&&$!==void 0?$:C,W=V!==A||F!==C,K=!Fe(x),Q=K&&!W?v.updateId:v.updateId+1;return Y(Y({updateId:Q},p(Y(Y({props:b},v),{},{updateId:Q,dataStartIndex:V,dataEndIndex:F}),v)),{},{prevChildren:j,dataStartIndex:V,dataEndIndex:F})}return null}),Se(m,"renderActiveDot",function(b,v,y){var x;return N.isValidElement(b)?x=N.cloneElement(b,v):$e(b)?x=b(v):x=T.createElement(cN,v),T.createElement(Bt,{className:"recharts-active-dot",key:y},x)});var g=N.forwardRef(function(v,y){return T.createElement(m,Tl({},v,{ref:y}))});return g.displayName=m.displayName,g},NRe=SRe({chartName:"LineChart",GraphicalChild:uh,axisComponents:[{axisType:"xAxis",AxisComp:gy},{axisType:"yAxis",AxisComp:yy}],formatAxisMap:ATe});function V$({projectId:e}){const[t,r]=N.useState([]),[n,a]=N.useState(!0),[i,s]=N.useState(null);if(N.useEffect(()=>{e&&(async()=>{a(!0);try{const d=await(await ve(`/api/projects/${e}/metrics?limit=500`)).json();r(Array.isArray(d==null?void 0:d.metrics)?d.metrics:[])}catch(u){console.error("Failed to load project metrics",u),s("Unable to load metrics")}finally{a(!1)}})()},[e]),n)return c.jsx(ERe,{});if(i)return c.jsx(PRe,{error:i});if(!t.length)return c.jsx(ARe,{});const o=t.reduce((l,u)=>(l[u.model_name]||(l[u.model_name]=[]),l[u.model_name].push(u),l),{});return c.jsx("div",{className:"space-y-8",children:Object.entries(o).map(([l,u])=>c.jsx(_Re,{modelName:l,metrics:u},l))})}function _Re({modelName:e,metrics:t}){const r=[...t].sort((d,f)=>new Date(d.created_at)-new Date(f.created_at)),n=r[r.length-1],a=r.reduce((d,f)=>{const h=f.created_at;return d[h]||(d[h]={timestamp:h,displayDate:pt(new Date(h),"MMM d HH:mm"),tags:f.tags,run_id:f.run_id,environment:f.environment}),d[h][f.metric_name]=typeof f.metric_value=="number"?parseFloat(f.metric_value.toFixed(4)):f.metric_value,d},{}),i=Object.values(a),o=[...new Set(t.map(d=>d.metric_name))].filter(d=>i.some(f=>typeof f[d]=="number")),l=o.filter(d=>!d.includes("latency")&&!d.includes("loss")),u=o.filter(d=>d.includes("latency"));return c.jsxs(ze,{className:"overflow-hidden border-slate-200 dark:border-slate-800",children:[c.jsxs("div",{className:"p-4 border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-800/50 flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg",children:c.jsx(Dr,{className:"w-5 h-5 text-purple-600 dark:text-purple-400"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-slate-900 dark:text-white",children:e}),c.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[c.jsx(ct,{size:12}),"Last updated: ",pt(new Date(n.created_at),"MMM d, yyyy HH:mm")]})]})]}),c.jsxs("div",{className:"flex gap-2",children:[n.environment&&c.jsx(jt,{variant:"outline",className:"bg-white dark:bg-slate-800",children:n.environment}),c.jsxs(jt,{className:"bg-purple-100 text-purple-700 dark:bg-purple-900/30 dark:text-purple-300 border-0",children:[i.length," logs"]})]})]}),c.jsxs("div",{className:"p-6 grid grid-cols-1 lg:grid-cols-3 gap-6",children:[c.jsxs("div",{className:"space-y-4",children:[c.jsx("h4",{className:"text-sm font-medium text-slate-500 uppercase tracking-wider",children:"Latest Performance"}),c.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[l.map(d=>c.jsxs("div",{className:"p-3 bg-slate-50 dark:bg-slate-800/50 rounded-lg border border-slate-100 dark:border-slate-800",children:[c.jsx("p",{className:"text-xs text-slate-500 mb-1 capitalize",children:d.replace(/_/g," ")}),c.jsx("p",{className:"text-lg font-bold text-slate-900 dark:text-white",children:i[i.length-1][d]})]},d)),u.map(d=>c.jsxs("div",{className:"p-3 bg-slate-50 dark:bg-slate-800/50 rounded-lg border border-slate-100 dark:border-slate-800",children:[c.jsx("p",{className:"text-xs text-slate-500 mb-1 capitalize",children:d.replace(/_/g," ")}),c.jsxs("p",{className:"text-lg font-bold text-slate-900 dark:text-white",children:[i[i.length-1][d]," ",c.jsx("span",{className:"text-xs font-normal text-slate-400",children:"ms"})]})]},d))]})]}),c.jsx("div",{className:"lg:col-span-2 space-y-6",children:l.length>0&&c.jsxs("div",{className:"h-[250px] w-full",children:[c.jsx("h4",{className:"text-sm font-medium text-slate-500 uppercase tracking-wider mb-4",children:"Score Trends"}),c.jsx(FSe,{width:"100%",height:"100%",children:c.jsxs(NRe,{data:i,children:[c.jsx(MF,{strokeDasharray:"3 3",stroke:"#e2e8f0",vertical:!1}),c.jsx(gy,{dataKey:"displayDate",stroke:"#94a3b8",fontSize:12,tickLine:!1,axisLine:!1}),c.jsx(yy,{domain:[0,1],stroke:"#94a3b8",fontSize:12,tickLine:!1,axisLine:!1}),c.jsx(ma,{contentStyle:{backgroundColor:"#fff",borderRadius:"8px",border:"1px solid #e2e8f0",boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)"},itemStyle:{fontSize:"12px"}}),c.jsx(go,{}),l.map((d,f)=>c.jsx(uh,{type:"monotone",dataKey:d,stroke:pp[f%pp.length],strokeWidth:2,dot:{r:3,fill:pp[f%pp.length]},activeDot:{r:5}},d))]})})]})})]})]})}const pp=["#8b5cf6","#3b82f6","#10b981","#f59e0b","#ef4444","#ec4899"];function ERe(){return c.jsx("div",{className:"h-64 flex items-center justify-center border border-dashed border-slate-200 dark:border-slate-700 rounded-xl",children:c.jsxs("div",{className:"flex flex-col items-center gap-3",children:[c.jsx(Be,{className:"w-8 h-8 text-primary-500 animate-spin"}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400",children:"Loading metrics..."})]})})}function PRe({error:e}){return c.jsx("div",{className:"h-64 flex items-center justify-center border border-rose-200 dark:border-rose-900 bg-rose-50 dark:bg-rose-900/10 rounded-xl",children:c.jsx("p",{className:"text-rose-600 dark:text-rose-400",children:e})})}function ARe(){return c.jsx("div",{className:"h-64 flex items-center justify-center border border-dashed border-slate-200 dark:border-slate-700 rounded-xl",children:c.jsxs("div",{className:"text-center",children:[c.jsx(BarChart2,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400",children:"No metrics logged yet"}),c.jsx("p",{className:"text-xs text-slate-400 mt-1",children:"Run a pipeline with model evaluation to see metrics here"})]})})}function ORe({projectId:e}){const[t,r]=N.useState([]),[n,a]=N.useState(!0);N.useEffect(()=>{e&&(async()=>{try{const l=await(await ve(`/api/experiments?project=${e}`)).json();l.experiments&&Array.isArray(l.experiments)?r(l.experiments):r([])}catch(o){console.error("Failed to fetch experiments:",o)}finally{a(!1)}})()},[e]);const i=[{key:"name",label:"Name",sortable:!0,render:s=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(On,{className:"w-4 h-4 text-purple-500"}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white",children:s.name}),s.description&&c.jsx("div",{className:"text-xs text-slate-500 truncate max-w-[200px]",children:s.description})]})]})},{key:"run_count",label:"Runs",sortable:!0,render:s=>c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Lr,{className:"w-3 h-3 text-slate-400"}),c.jsx("span",{children:s.run_count||0})]})},{key:"created_at",label:"Created",sortable:!0,render:s=>c.jsxs("div",{className:"flex items-center gap-1 text-slate-500",children:[c.jsx(ct,{className:"w-3 h-3"}),c.jsx("span",{children:li(s.created_at)})]})},{key:"tags",label:"Tags",render:s=>c.jsx("div",{className:"flex flex-wrap gap-1",children:Object.entries(s.tags||{}).map(([o,l])=>c.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-400",children:[c.jsx(bm,{className:"w-3 h-3 mr-1"}),o,": ",l]},o))})}];return c.jsx(Uc,{items:t,loading:n,columns:i,initialView:"table",searchKeys:["name","description"],renderGrid:s=>c.jsxs("div",{className:"p-4 bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 hover:shadow-md transition-shadow",children:[c.jsxs("div",{className:"flex items-start justify-between mb-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"p-2 bg-purple-50 dark:bg-purple-900/20 rounded-lg",children:c.jsx(On,{className:"w-5 h-5 text-purple-500"})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-slate-900 dark:text-white",children:s.name}),c.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-1",children:[c.jsx(ct,{className:"w-3 h-3"}),li(s.created_at)]})]})]}),c.jsxs("div",{className:"flex items-center gap-1 text-xs font-medium bg-slate-100 dark:bg-slate-800 px-2 py-1 rounded-full",children:[c.jsx(Lr,{className:"w-3 h-3"}),s.run_count||0," runs"]})]}),s.description&&c.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400 mb-3 line-clamp-2",children:s.description}),c.jsx("div",{className:"flex flex-wrap gap-1",children:Object.entries(s.tags||{}).map(([o,l])=>c.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-slate-100 text-slate-600 dark:bg-slate-800 dark:text-slate-400",children:[o,": ",l]},o))})]}),emptyState:c.jsxs("div",{className:"text-center py-12",children:[c.jsx("div",{className:"inline-flex items-center justify-center w-12 h-12 rounded-full bg-slate-100 dark:bg-slate-800 mb-4",children:c.jsx(On,{className:"w-6 h-6 text-slate-400"})}),c.jsx("h3",{className:"text-lg font-medium text-slate-900 dark:text-white mb-1",children:"No experiments found"}),c.jsx("p",{className:"text-slate-500",children:"Create an experiment to track your model development."})]})})}const U$=({status:e})=>{switch(e==null?void 0:e.toLowerCase()){case"completed":case"success":return c.jsx(Vt,{className:"w-4 h-4 text-green-500"});case"failed":return c.jsx(vr,{className:"w-4 h-4 text-red-500"});case"running":return c.jsx(ac,{className:"w-4 h-4 text-blue-500 animate-spin"});default:return c.jsx(ai,{className:"w-4 h-4 text-slate-400"})}};function H$({projectId:e}){const[t,r]=N.useState([]),[n,a]=N.useState(!0);N.useEffect(()=>{e&&(async()=>{try{const l=await(await ve(`/api/runs?project=${e}`)).json();r(Array.isArray(l==null?void 0:l.runs)?l.runs:[])}catch(o){console.error("Failed to fetch runs:",o)}finally{a(!1)}})()},[e]);const i=[{header:"Run Name",key:"name",render:s=>{var o;return c.jsxs(rt,{to:`/runs/${s.run_id}`,className:"flex items-center gap-3 group",children:[c.jsx("div",{className:"p-2 bg-slate-100 dark:bg-slate-700 rounded-lg group-hover:bg-slate-200 dark:group-hover:bg-slate-600 transition-colors",children:c.jsx(ct,{className:"w-4 h-4 text-slate-500"})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors",children:s.name||((o=s.run_id)==null?void 0:o.substring(0,8))||"N/A"}),c.jsx("div",{className:"text-xs text-slate-500",children:s.pipeline_name})]})]})}},{header:"Status",key:"status",render:s=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(U$,{status:s.status}),c.jsx("span",{className:"capitalize text-sm",children:s.status})]})},{header:"Created",key:"created",render:s=>c.jsx("span",{className:"text-slate-500 text-sm",children:li(s.created,"MMM d, yyyy HH:mm")})}];return c.jsx(Uc,{items:t,loading:n,columns:i,initialView:"table",renderGrid:s=>{var o,l;return c.jsx(rt,{to:`/runs/${s.run_id}`,className:"block",children:c.jsxs("div",{className:"group p-5 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 hover:border-blue-500/50 hover:shadow-md transition-all duration-300",children:[c.jsxs("div",{className:"flex items-start justify-between mb-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(U$,{status:s.status}),c.jsx("span",{className:`text-sm font-medium capitalize ${s.status==="completed"?"text-green-600 dark:text-green-400":s.status==="failed"?"text-red-600 dark:text-red-400":"text-slate-600 dark:text-slate-400"}`,children:s.status})]}),c.jsx("span",{className:"text-xs font-mono text-slate-400 bg-slate-50 dark:bg-slate-900 px-2 py-1 rounded",children:((o=s.run_id)==null?void 0:o.substring(0,8))||"N/A"})]}),c.jsx("h3",{className:"font-semibold text-slate-900 dark:text-white mb-1 truncate group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors",children:s.name||`Run ${((l=s.run_id)==null?void 0:l.substring(0,8))||"N/A"}`}),c.jsxs("p",{className:"text-sm text-slate-500 dark:text-slate-400 mb-4 flex items-center gap-1",children:[c.jsx("span",{className:"opacity-75",children:"Pipeline:"}),c.jsx("span",{className:"font-medium text-slate-700 dark:text-slate-300",children:s.pipeline_name})]}),c.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-500 dark:text-slate-400 pt-3 border-t border-slate-100 dark:border-slate-700/50",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(ct,{className:"w-3.5 h-3.5"}),c.jsx("span",{children:li(s.created,"MMM d, HH:mm")})]}),s.duration&&c.jsxs("span",{children:[s.duration.toFixed(2),"s"]})]})]})})},emptyState:c.jsxs("div",{className:"text-center py-8",children:[c.jsx(ct,{className:"w-10 h-10 mx-auto text-slate-300 mb-2"}),c.jsx("p",{className:"text-slate-500",children:"No runs found for this project"})]})})}function W$({projectId:e}){const[t,r]=N.useState([]),[n,a]=N.useState(!0);N.useEffect(()=>{e&&(async()=>{try{const l=await(await ve(`/api/pipelines?project=${e}`)).json();r(Array.isArray(l==null?void 0:l.pipelines)?l.pipelines:[])}catch(o){console.error("Failed to fetch pipelines:",o)}finally{a(!1)}})()},[e]);const i=[{header:"Pipeline Name",key:"name",render:s=>c.jsxs(rt,{to:`/pipelines/${s.id||s.name}`,className:"flex items-center gap-3 group",children:[c.jsx("div",{className:"p-2 bg-blue-500/10 rounded-lg group-hover:bg-blue-500/20 transition-colors",children:c.jsx(Be,{className:"w-4 h-4 text-blue-500"})}),c.jsx("span",{className:"font-medium text-slate-900 dark:text-white group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors",children:s.name})]})},{header:"Version",key:"version",render:s=>c.jsxs("span",{className:"px-2 py-1 bg-slate-100 dark:bg-slate-700 rounded text-xs font-medium",children:["v",s.version||"1.0"]})},{header:"Created",key:"created",render:s=>c.jsx("span",{className:"text-slate-500 text-sm",children:li(s.created)})}];return c.jsx(Uc,{items:t,loading:n,columns:i,initialView:"table",renderGrid:s=>c.jsx(rt,{to:`/pipelines/${s.id||s.name}`,className:"block",children:c.jsxs("div",{className:"group p-5 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 hover:border-blue-500/50 hover:shadow-md transition-all duration-300",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsx("div",{className:"p-2.5 bg-blue-50 dark:bg-blue-900/20 rounded-lg group-hover:bg-blue-100 dark:group-hover:bg-blue-900/40 transition-colors",children:c.jsx(Be,{className:"w-6 h-6 text-blue-600 dark:text-blue-400"})}),c.jsxs("span",{className:"px-2.5 py-1 bg-slate-100 dark:bg-slate-700 rounded-full text-xs font-medium text-slate-600 dark:text-slate-300",children:["v",s.version||"1.0"]})]}),c.jsx("h3",{className:"font-semibold text-lg text-slate-900 dark:text-white mb-1 truncate",title:s.name,children:s.name}),c.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-500 dark:text-slate-400 mt-4 pt-4 border-t border-slate-100 dark:border-slate-700/50",children:[c.jsx(ct,{className:"w-4 h-4"}),c.jsxs("span",{children:["Created ",li(s.created)]})]})]})}),emptyState:c.jsxs("div",{className:"text-center py-8",children:[c.jsx(Be,{className:"w-10 h-10 mx-auto text-slate-300 mb-2"}),c.jsx("p",{className:"text-slate-500",children:"No pipelines found for this project"})]})})}function CRe(){const{projectId:e}=qk(),[t,r]=N.useState(null),[n,a]=N.useState(null),[i,s]=N.useState(!0),[o,l]=N.useState("overview"),[u,d]=N.useState(null);N.useEffect(()=>{e&&(async()=>{try{const g=await(await ve(`/api/projects/${e}`)).json();g.pipelines&&!Array.isArray(g.pipelines)&&(g.pipelines=[]),r(g);const[b,v,y]=await Promise.all([ve(`/api/runs?project=${e}&limit=1000`),ve(`/api/assets?project=${e}&limit=1000`),ve(`/api/experiments?project=${e}`)]),x=await b.json(),j=await v.json(),w=await y.json(),S=Array.isArray(x==null?void 0:x.runs)?x.runs:[],k=Array.isArray(j==null?void 0:j.assets)?j.assets:[],_=Array.isArray(w==null?void 0:w.experiments)?w.experiments:[],E=new Set(S.map(C=>C.pipeline_name).filter(Boolean)),A=k.filter(C=>C.type==="Model");a({runs:S.length,pipelines:E.size,artifacts:k.length,models:A.length,experiments:_.length,total_storage_bytes:k.reduce((C,M)=>C+(M.size_bytes||0),0)})}catch(m){console.error("Failed to fetch project details:",m)}finally{s(!1)}})()},[e]);const f=p=>{d(p)},h=()=>{if(u)return c.jsx(oz,{asset:u,onClose:()=>d(null)});switch(o){case"overview":return c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[c.jsx(mp,{icon:Be,label:"Total Runs",value:(n==null?void 0:n.runs)||0,color:"text-blue-500",bg:"bg-blue-50 dark:bg-blue-900/20"}),c.jsx(mp,{icon:Dr,label:"Models",value:(n==null?void 0:n.models)||0,color:"text-purple-500",bg:"bg-purple-50 dark:bg-purple-900/20"}),c.jsx(mp,{icon:On,label:"Experiments",value:(n==null?void 0:n.experiments)||0,color:"text-pink-500",bg:"bg-pink-50 dark:bg-pink-900/20"}),c.jsx(mp,{icon:Xk,label:"Storage",value:TRe((n==null?void 0:n.total_storage_bytes)||0),color:"text-slate-500",bg:"bg-slate-50 dark:bg-slate-800"})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[c.jsxs(ze,{className:"p-0 overflow-hidden border-slate-200 dark:border-slate-800",children:[c.jsxs("div",{className:"p-4 border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-800/50 flex items-center justify-between",children:[c.jsxs("h3",{className:"font-semibold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(Bd,{size:16,className:"text-slate-400"}),"Recent Pipelines"]}),c.jsx("button",{onClick:()=>l("pipelines"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),c.jsx("div",{className:"p-4",children:c.jsx(W$,{projectId:e,limit:5,compact:!0})})]}),c.jsxs(ze,{className:"p-0 overflow-hidden border-slate-200 dark:border-slate-800",children:[c.jsxs("div",{className:"p-4 border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-800/50 flex items-center justify-between",children:[c.jsxs("h3",{className:"font-semibold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(Lr,{size:16,className:"text-slate-400"}),"Recent Runs"]}),c.jsx("button",{onClick:()=>l("runs"),className:"text-xs text-primary-600 hover:text-primary-700 font-medium",children:"View All"})]}),c.jsx("div",{className:"p-4",children:c.jsx(H$,{projectId:e,limit:5,compact:!0})})]})]}),c.jsxs(ze,{className:"p-0 overflow-hidden border-slate-200 dark:border-slate-800",children:[c.jsx("div",{className:"p-4 border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-800/50",children:c.jsxs("h3",{className:"font-semibold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(_a,{size:16,className:"text-slate-400"}),"Production Metrics"]})}),c.jsx("div",{className:"p-4",children:c.jsx(V$,{projectId:e})})]})]});case"pipelines":return c.jsx(W$,{projectId:e});case"runs":return c.jsx(H$,{projectId:e});case"experiments":return c.jsx(ORe,{projectId:e});case"metrics":return c.jsx(V$,{projectId:e});default:return null}};return c.jsxs("div",{className:"h-screen flex flex-col overflow-hidden bg-slate-50 dark:bg-slate-900",children:[c.jsx("div",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 px-6 py-4 shrink-0",children:c.jsx(l1e,{project:t,stats:n,loading:i})}),c.jsx("div",{className:"flex-1 overflow-hidden",children:c.jsx("div",{className:"h-full max-w-[1800px] mx-auto px-6 py-6",children:c.jsxs("div",{className:"h-full flex gap-6",children:[c.jsxs("div",{className:"w-[380px] shrink-0 flex flex-col gap-4 overflow-y-auto pb-6",children:[c.jsxs("nav",{className:"space-y-1",children:[c.jsx(Bu,{active:o==="overview"&&!u,onClick:()=>{l("overview"),d(null)},icon:_D,label:"Overview"}),c.jsx(Bu,{active:o==="pipelines"&&!u,onClick:()=>{l("pipelines"),d(null)},icon:Bd,label:"Pipelines"}),c.jsx(Bu,{active:o==="runs"&&!u,onClick:()=>{l("runs"),d(null)},icon:Lr,label:"Runs"}),c.jsx(Bu,{active:o==="experiments"&&!u,onClick:()=>{l("experiments"),d(null)},icon:On,label:"Experiments"}),c.jsx(Bu,{active:o==="metrics"&&!u,onClick:()=>{l("metrics"),d(null)},icon:_a,label:"Metrics"})]}),c.jsxs("div",{className:"flex-1 min-h-0 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden flex flex-col shadow-sm",children:[c.jsx("div",{className:"p-3 border-b border-slate-100 dark:border-slate-700 bg-slate-50/50 dark:bg-slate-800/50",children:c.jsx("h3",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Project Assets"})}),c.jsx("div",{className:"flex-1 overflow-y-auto p-2",children:c.jsx(sz,{projectId:e,onAssetSelect:f,compact:!0})})]})]}),c.jsx("div",{className:"flex-1 min-w-0 bg-white dark:bg-slate-800 rounded-xl border border-slate-200 dark:border-slate-700 overflow-hidden flex flex-col shadow-sm",children:c.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c.jsx(b4,{children:c.jsx(xi,{mode:"wait",children:c.jsx(Le.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"h-full",children:h()},u?"asset":o)})})})})]})})})]})}function Bu({active:e,onClick:t,icon:r,label:n}){return c.jsxs("button",{onClick:t,className:`w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200 ${e?"bg-primary-50 text-primary-700 dark:bg-primary-900/20 dark:text-primary-400 shadow-sm":"text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-900 dark:hover:text-white"}`,children:[c.jsx(r,{size:18,className:e?"text-primary-600 dark:text-primary-400":"text-slate-400"}),n]})}function mp({icon:e,label:t,value:r,color:n,bg:a}){return c.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl p-4 border border-slate-200 dark:border-slate-700 shadow-sm flex items-center gap-4",children:[c.jsx("div",{className:`p-3 rounded-lg ${a}`,children:c.jsx(e,{size:20,className:n})}),c.jsxs("div",{children:[c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:t}),c.jsx("p",{className:"text-xl font-bold text-slate-900 dark:text-white",children:typeof r=="number"?r.toLocaleString():r})]})]})}function TRe(e){if(!e||e===0)return"0 B";const t=1024,r=["B","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(1))+" "+r[n]}function MRe(){const{selectedProject:e}=vi(),[t,r]=N.useState([]),[n,a]=N.useState({registered:[],templates:[],metadata:[]}),[i,s]=N.useState(null),[o,l]=N.useState(!0),[u,d]=N.useState(!1),[f,h]=N.useState(!1),[p,m]=N.useState(null),[g,b]=N.useState([]),[v,y]=N.useState(!1),[x,j]=N.useState({name:"",pipeline_name:"",schedule_type:"daily",hour:0,minute:0,interval_seconds:3600,cron_expression:"* * * * *",timezone:"UTC",project_name:e||null});N.useEffect(()=>{w();const O=setInterval(w,1e4);return()=>clearInterval(O)},[e]);const w=async()=>{try{const O=e?`?project=${e}`:"",[P,D,I]=await Promise.all([fetch(`/api/schedules/${O}`),fetch(`/api/schedules/registered-pipelines${O}`),fetch("/api/schedules/health")]),L=await P.json(),R=await D.json();let $=null;I.ok&&($=await I.json()),r(L),a(R),s($)}catch(O){console.error("Failed to fetch data:",O)}finally{l(!1)}},S=async O=>{y(!0);try{const D=await(await fetch(`/api/schedules/${O}/history`)).json();b(D)}catch(P){console.error("Failed to fetch history:",P)}finally{y(!1)}},k=O=>{m(O),h(!0),S(O.pipeline_name)},_=async O=>{O.preventDefault();try{const P=await fetch("/api/schedules",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...x,project_name:e||null})});if(P.ok)d(!1),j({name:"",pipeline_name:"",schedule_type:"daily",hour:0,minute:0,interval_seconds:3600,cron_expression:"* * * * *",timezone:"UTC"}),w();else{const D=await P.json();alert(`Failed to create schedule: ${D.detail}`)}}catch(P){console.error("Failed to create schedule:",P)}},E=async(O,P)=>{try{await fetch(`/api/schedules/${O}/${P?"disable":"enable"}`,{method:"POST"}),w()}catch(D){console.error("Failed to toggle schedule:",D)}},A=async O=>{if(confirm(`Delete schedule "${O}"?`))try{await fetch(`/api/schedules/${O}`,{method:"DELETE"}),w()}catch(P){console.error("Failed to delete schedule:",P)}},C=[{header:"Pipeline",key:"pipeline_name",sortable:!0,render:O=>c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:`p-2 rounded-lg ${O.enabled?"bg-emerald-50 text-emerald-600":"bg-slate-100 text-slate-400"}`,children:c.jsx(ct,{size:16})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white",children:O.pipeline_name}),c.jsxs("div",{className:"text-xs text-slate-500 flex items-center gap-1",children:[c.jsx(gm,{size:10})," ",O.timezone]})]})]})},{header:"Type",key:"schedule_type",sortable:!0,render:O=>c.jsxs("div",{className:"flex flex-col",children:[c.jsx(jt,{variant:"secondary",className:"capitalize w-fit mb-1",children:O.schedule_type}),c.jsx("span",{className:"text-xs font-mono text-slate-500",children:O.schedule_value})]})},{header:"Next Run",key:"next_run",sortable:!0,render:O=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-500",children:[c.jsx(An,{size:14}),O.next_run?pt(new Date(O.next_run),"MMM d, HH:mm:ss"):"N/A"]})},{header:"Status",key:"enabled",sortable:!0,render:O=>c.jsxs("div",{className:`flex items-center gap-2 text-sm ${O.enabled?"text-emerald-600":"text-slate-400"}`,children:[O.enabled?c.jsx(Vt,{size:14}):c.jsx(vr,{size:14}),c.jsx("span",{className:"font-medium",children:O.enabled?"Active":"Paused"})]})},{header:"Actions",key:"actions",render:O=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("button",{onClick:()=>k(O),className:"p-1.5 rounded-lg bg-blue-50 text-blue-600 hover:bg-blue-100 transition-colors",title:"History",children:c.jsx(Qy,{size:16})}),c.jsx("button",{onClick:()=>E(O.pipeline_name,O.enabled),className:`p-1.5 rounded-lg transition-colors ${O.enabled?"bg-amber-50 text-amber-600 hover:bg-amber-100":"bg-emerald-50 text-emerald-600 hover:bg-emerald-100"}`,title:O.enabled?"Pause":"Resume",children:O.enabled?c.jsx(Z_,{size:16}):c.jsx(Q_,{size:16})}),c.jsx("button",{onClick:()=>A(O.pipeline_name),className:"p-1.5 rounded-lg bg-rose-50 text-rose-600 hover:bg-rose-100 transition-colors",title:"Delete",children:c.jsx(_o,{size:16})})]})}],M=O=>c.jsxs(ze,{className:"group hover:shadow-lg transition-all duration-200 border-l-4 border-l-transparent hover:border-l-primary-500 h-full",children:[c.jsxs("div",{className:"flex items-start justify-between mb-4",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:`p-3 rounded-xl ${O.enabled?"bg-emerald-50 text-emerald-600":"bg-slate-100 text-slate-400"}`,children:c.jsx(ct,{size:24})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-slate-900 dark:text-white truncate max-w-[150px]",title:O.pipeline_name,children:O.pipeline_name}),c.jsxs("div",{className:`text-xs font-medium flex items-center gap-1 ${O.enabled?"text-emerald-600":"text-slate-400"}`,children:[O.enabled?c.jsx(Vt,{size:12}):c.jsx(vr,{size:12}),O.enabled?"Active":"Paused"]})]})]}),c.jsx(jt,{variant:"secondary",className:"capitalize",children:O.schedule_type})]}),c.jsxs("div",{className:"space-y-3 mb-4",children:[c.jsxs("div",{className:"flex items-center justify-between text-sm",children:[c.jsxs("span",{className:"text-slate-500 flex items-center gap-2",children:[c.jsx(An,{size:14})," Next Run"]}),c.jsx("span",{className:"font-mono text-slate-700 dark:text-slate-300",children:O.next_run?pt(new Date(O.next_run),"MMM d, HH:mm"):"N/A"})]}),c.jsxs("div",{className:"flex items-center justify-between text-sm",children:[c.jsxs("span",{className:"text-slate-500 flex items-center gap-2",children:[c.jsx(gm,{size:14})," Timezone"]}),c.jsx("span",{className:"text-slate-700 dark:text-slate-300",children:O.timezone})]})]}),c.jsxs("div",{className:"flex items-center gap-2 pt-4 border-t border-slate-100 dark:border-slate-700",children:[c.jsx(ye,{variant:"ghost",className:"text-blue-600 hover:bg-blue-50 hover:text-blue-700",onClick:()=>k(O),title:"History",children:c.jsx(Qy,{size:16})}),c.jsx(ye,{variant:"outline",className:`flex-1 flex items-center justify-center gap-2 ${O.enabled?"text-amber-600 border-amber-200 hover:bg-amber-50":"text-emerald-600 border-emerald-200 hover:bg-emerald-50"}`,onClick:()=>E(O.pipeline_name,O.enabled),children:O.enabled?c.jsxs(c.Fragment,{children:[c.jsx(Z_,{size:14})," Pause"]}):c.jsxs(c.Fragment,{children:[c.jsx(Q_,{size:14})," Resume"]})}),c.jsx(ye,{variant:"ghost",className:"text-rose-600 hover:bg-rose-50 hover:text-rose-700",onClick:()=>A(O.pipeline_name),children:c.jsx(_o,{size:16})})]})]});return c.jsxs("div",{className:"p-6 max-w-7xl mx-auto",children:[i&&i.metrics&&c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-8",children:[c.jsxs(ze,{className:"p-4 flex items-center gap-4",children:[c.jsx("div",{className:`p-3 rounded-full ${i.status==="running"?"bg-emerald-100 text-emerald-600":"bg-rose-100 text-rose-600"}`,children:c.jsx(Be,{size:24})}),c.jsxs("div",{children:[c.jsx("div",{className:"text-sm text-slate-500",children:"Scheduler Status"}),c.jsx("div",{className:"text-lg font-bold capitalize",children:i.status})]})]}),c.jsxs(ze,{className:"p-4",children:[c.jsx("div",{className:"text-sm text-slate-500 mb-1",children:"Total Runs"}),c.jsx("div",{className:"text-2xl font-bold",children:i.metrics.total_runs})]}),c.jsxs(ze,{className:"p-4",children:[c.jsx("div",{className:"text-sm text-slate-500 mb-1",children:"Success Rate"}),c.jsxs("div",{className:"text-2xl font-bold text-emerald-600",children:[(i.metrics.success_rate*100).toFixed(1),"%"]})]}),c.jsxs(ze,{className:"p-4",children:[c.jsx("div",{className:"text-sm text-slate-500 mb-1",children:"Active Schedules"}),c.jsxs("div",{className:"text-2xl font-bold",children:[i.enabled_schedules," / ",i.num_schedules]})]})]}),c.jsx(Uc,{title:"Schedules",subtitle:"Manage automated pipeline executions",items:t,loading:o,columns:C,renderGrid:M,actions:c.jsxs(ye,{onClick:()=>d(!0),className:"flex items-center gap-2",children:[c.jsx(os,{size:18}),"New Schedule"]}),emptyState:c.jsx(A2,{icon:An,title:"No active schedules",description:"Automate your pipelines by creating a schedule.",action:c.jsx(ye,{onClick:()=>d(!0),children:"Create your first schedule"})})}),u&&c.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-2xl w-full max-w-md border border-slate-200 dark:border-slate-700 shadow-2xl animate-in fade-in zoom-in duration-200 max-h-[90vh] overflow-y-auto",children:[c.jsx("h2",{className:"text-xl font-bold mb-4 text-slate-900 dark:text-white",children:"Create Schedule"}),c.jsxs("form",{onSubmit:_,children:[c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Schedule Name"}),c.jsx("input",{type:"text",value:x.name,onChange:O=>j({...x,name:O.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all",required:!0,placeholder:"e.g., daily_etl_job"})]}),c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Pipeline"}),c.jsxs("select",{value:x.pipeline_name,onChange:O=>j({...x,pipeline_name:O.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all",required:!0,children:[c.jsx("option",{value:"",children:"Select a pipeline..."}),n.registered.length>0&&c.jsx("optgroup",{label:`Registered Pipelines (${n.registered.length})`,children:n.registered.map(O=>c.jsx("option",{value:O,children:O},O))}),n.templates.length>0&&c.jsx("optgroup",{label:`Templates (${n.templates.length})`,children:n.templates.map(O=>c.jsx("option",{value:O,children:O},O))}),n.metadata.length>0&&c.jsx("optgroup",{label:`Historical Pipelines (${n.metadata.length})`,children:n.metadata.map(O=>c.jsx("option",{value:O,children:O},`meta-${O}`))})]}),n.registered.length===0&&n.templates.length===0&&n.metadata.length===0&&c.jsx("p",{className:"text-xs text-amber-600 mt-1",children:"No pipelines available. Run a pipeline first or register one using @register_pipeline."})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Type"}),c.jsxs("select",{value:x.schedule_type,onChange:O=>j({...x,schedule_type:O.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all",children:[c.jsx("option",{value:"daily",children:"Daily"}),c.jsx("option",{value:"hourly",children:"Hourly"}),c.jsx("option",{value:"interval",children:"Interval"}),c.jsx("option",{value:"cron",children:"Cron"})]})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Timezone"}),c.jsxs("select",{value:x.timezone,onChange:O=>j({...x,timezone:O.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all",children:[c.jsx("option",{value:"UTC",children:"UTC"}),c.jsx("option",{value:"America/New_York",children:"New York (EST/EDT)"}),c.jsx("option",{value:"America/Los_Angeles",children:"Los Angeles (PST/PDT)"}),c.jsx("option",{value:"Europe/London",children:"London (GMT/BST)"}),c.jsx("option",{value:"Europe/Paris",children:"Paris (CET/CEST)"}),c.jsx("option",{value:"Asia/Tokyo",children:"Tokyo (JST)"}),c.jsx("option",{value:"Asia/Shanghai",children:"Shanghai (CST)"})]})]})]}),x.schedule_type==="daily"&&c.jsxs("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Hour (0-23)"}),c.jsx("input",{type:"number",min:"0",max:"23",value:x.hour,onChange:O=>j({...x,hour:parseInt(O.target.value)}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Minute (0-59)"}),c.jsx("input",{type:"number",min:"0",max:"59",value:x.minute,onChange:O=>j({...x,minute:parseInt(O.target.value)}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all"})]})]}),x.schedule_type==="hourly"&&c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Minute (0-59)"}),c.jsx("input",{type:"number",min:"0",max:"59",value:x.minute,onChange:O=>j({...x,minute:parseInt(O.target.value)}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all"})]}),x.schedule_type==="interval"&&c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Interval (seconds)"}),c.jsx("input",{type:"number",min:"1",value:x.interval_seconds,onChange:O=>j({...x,interval_seconds:parseInt(O.target.value)}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all"})]}),x.schedule_type==="cron"&&c.jsxs("div",{className:"mb-4",children:[c.jsx("label",{className:"block text-sm font-medium mb-1 text-slate-700 dark:text-slate-300",children:"Cron Expression"}),c.jsx("input",{type:"text",value:x.cron_expression,onChange:O=>j({...x,cron_expression:O.target.value}),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 rounded-lg border border-slate-200 dark:border-slate-700 focus:ring-2 focus:ring-primary-500 outline-none transition-all font-mono",placeholder:"* * * * *"}),c.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"Format: minute hour day month day-of-week"})]}),c.jsxs("div",{className:"flex justify-end gap-3 mt-6",children:[c.jsx(ye,{variant:"ghost",type:"button",onClick:()=>d(!1),children:"Cancel"}),c.jsx(ye,{type:"submit",variant:"primary",children:"Create Schedule"})]})]})]})}),f&&p&&c.jsx("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-2xl w-full max-w-2xl border border-slate-200 dark:border-slate-700 shadow-2xl animate-in fade-in zoom-in duration-200 max-h-[90vh] overflow-y-auto",children:[c.jsxs("div",{className:"flex items-center justify-between mb-6",children:[c.jsxs("div",{children:[c.jsxs("h2",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:[c.jsx(Qy,{size:20}),"Execution History"]}),c.jsx("p",{className:"text-slate-500 text-sm",children:p.pipeline_name})]}),c.jsx(ye,{variant:"ghost",onClick:()=>h(!1),children:c.jsx(vr,{size:20})})]}),v?c.jsx("div",{className:"flex justify-center py-8",children:c.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-primary-500"})}):g.length>0?c.jsx("div",{className:"space-y-4",children:g.map((O,P)=>c.jsxs("div",{className:"flex items-center justify-between p-4 bg-slate-50 dark:bg-slate-900 rounded-xl border border-slate-100 dark:border-slate-700",children:[c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:`p-2 rounded-full ${O.success?"bg-emerald-100 text-emerald-600":"bg-rose-100 text-rose-600"}`,children:O.success?c.jsx(Vt,{size:16}):c.jsx(ai,{size:16})}),c.jsxs("div",{children:[c.jsx("div",{className:"font-medium text-slate-900 dark:text-white",children:pt(new Date(O.started_at),"MMM d, yyyy HH:mm:ss")}),c.jsxs("div",{className:"text-xs text-slate-500",children:["Duration: ",O.duration_seconds?`${O.duration_seconds.toFixed(2)}s`:"N/A"]})]})]}),!O.success&&c.jsx("div",{className:"text-sm text-rose-600 max-w-xs truncate",title:O.error,children:O.error})]},P))}):c.jsx("div",{className:"text-center py-8 text-slate-500",children:"No execution history found."})]})})]})}function $Re(){const[e,t]=N.useState(null),[r,n]=N.useState(null),[a,i]=N.useState(!0);if(N.useEffect(()=>{const l=async()=>{try{const[d,f]=await Promise.all([ve("/api/metrics/observability/orchestrator"),ve("/api/metrics/observability/cache")]),h=await d.json(),p=await f.json();t(h),n(p)}catch(d){console.error("Failed to fetch metrics:",d)}finally{i(!1)}};l();const u=setInterval(l,3e4);return()=>clearInterval(u)},[]),a)return c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})});const s=(e==null?void 0:e.success_rate)||0,o=(r==null?void 0:r.cache_hit_rate)||0;return c.jsxs("div",{className:"p-6 space-y-6 max-w-7xl mx-auto",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsxs("h1",{className:"text-3xl font-bold text-slate-900 dark:text-white flex items-center gap-3",children:[c.jsx(Be,{className:"text-primary-500",size:32}),"Observability Dashboard"]}),c.jsx("p",{className:"text-slate-500 mt-1",children:"System performance and metrics (Last 30 days)"})]}),c.jsx(jt,{variant:"secondary",className:"text-xs",children:"Auto-refresh: 30s"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6",children:[c.jsx(gp,{icon:c.jsx(_a,{size:24}),label:"Total Runs",value:(e==null?void 0:e.total_runs)||0,color:"blue"}),c.jsx(gp,{icon:c.jsx(Vt,{size:24}),label:"Success Rate",value:`${(s*100).toFixed(1)}%`,color:"emerald",trend:s>=.9?"positive":s>=.7?"neutral":"negative"}),c.jsx(gp,{icon:c.jsx(ct,{size:24}),label:"Avg Duration",value:`${((e==null?void 0:e.avg_duration_seconds)||0).toFixed(2)}s`,color:"purple"}),c.jsx(gp,{icon:c.jsx(Eo,{size:24}),label:"Cache Hit Rate",value:`${(o*100).toFixed(1)}%`,color:"amber",trend:o>=.5?"positive":o>=.2?"neutral":"negative"})]}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[c.jsxs(ze,{className:"p-6",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(gs,{className:"text-primary-500",size:20}),"Orchestrator Performance"]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("h4",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300 mb-3",children:"Status Distribution"}),c.jsx("div",{className:"space-y-2",children:(e==null?void 0:e.status_distribution)&&Object.entries(e.status_distribution).map(([l,u])=>c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:`w-3 h-3 rounded-full ${l==="completed"?"bg-emerald-500":l==="failed"?"bg-rose-500":"bg-amber-500"}`}),c.jsx("span",{className:"text-sm text-slate-600 dark:text-slate-400 capitalize",children:l})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("span",{className:"text-sm font-mono font-semibold text-slate-900 dark:text-white",children:u}),c.jsx("div",{className:"w-24 bg-slate-200 dark:bg-slate-700 rounded-full h-2",children:c.jsx("div",{className:`h-2 rounded-full ${l==="completed"?"bg-emerald-500":l==="failed"?"bg-rose-500":"bg-amber-500"}`,style:{width:`${u/e.total_runs*100}%`}})})]})]},l))})]}),c.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-4 border-t border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"p-3 bg-emerald-50 dark:bg-emerald-900/20 rounded-lg",children:[c.jsx("div",{className:"text-xs text-emerald-600 dark:text-emerald-400 mb-1",children:"Success Rate"}),c.jsxs("div",{className:"text-2xl font-bold text-emerald-700 dark:text-emerald-300",children:[(s*100).toFixed(1),"%"]})]}),c.jsxs("div",{className:"p-3 bg-blue-50 dark:bg-blue-900/20 rounded-lg",children:[c.jsx("div",{className:"text-xs text-blue-600 dark:text-blue-400 mb-1",children:"Avg Duration"}),c.jsxs("div",{className:"text-2xl font-bold text-blue-700 dark:text-blue-300",children:[((e==null?void 0:e.avg_duration_seconds)||0).toFixed(1),"s"]})]})]})]})]}),c.jsxs(ze,{className:"p-6",children:[c.jsxs("h3",{className:"text-lg font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(Eo,{className:"text-amber-500",size:20}),"Cache Performance"]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[c.jsxs("div",{className:"p-4 bg-gradient-to-br from-amber-50 to-orange-50 dark:from-amber-900/20 dark:to-orange-900/20 rounded-xl border border-amber-100 dark:border-amber-800",children:[c.jsx("div",{className:"text-xs text-amber-600 dark:text-amber-400 mb-1",children:"Total Steps"}),c.jsx("div",{className:"text-3xl font-bold text-amber-700 dark:text-amber-300",children:(r==null?void 0:r.total_steps)||0})]}),c.jsxs("div",{className:"p-4 bg-gradient-to-br from-emerald-50 to-teal-50 dark:from-emerald-900/20 dark:to-teal-900/20 rounded-xl border border-emerald-100 dark:border-emerald-800",children:[c.jsx("div",{className:"text-xs text-emerald-600 dark:text-emerald-400 mb-1",children:"Cached Steps"}),c.jsx("div",{className:"text-3xl font-bold text-emerald-700 dark:text-emerald-300",children:(r==null?void 0:r.cached_steps)||0})]})]}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center justify-between mb-2",children:[c.jsx("span",{className:"text-sm font-semibold text-slate-700 dark:text-slate-300",children:"Cache Hit Rate"}),c.jsxs("span",{className:"text-lg font-bold text-slate-900 dark:text-white",children:[(o*100).toFixed(1),"%"]})]}),c.jsx("div",{className:"relative h-8 bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden",children:c.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-emerald-500 to-teal-500 flex items-center justify-end px-3 transition-all duration-500",style:{width:`${o*100}%`},children:o>.1&&c.jsxs("span",{className:"text-xs font-bold text-white",children:[(o*100).toFixed(0),"%"]})})})]}),c.jsxs("div",{className:"p-4 bg-blue-50 dark:bg-blue-900/20 rounded-xl border border-blue-100 dark:border-blue-800",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(gs,{size:16,className:"text-blue-600"}),c.jsx("span",{className:"text-sm font-semibold text-blue-900 dark:text-blue-100",children:"Performance Impact"})]}),c.jsxs("p",{className:"text-sm text-blue-700 dark:text-blue-300",children:["Cache saved approximately"," ",c.jsx("strong",{children:(r==null?void 0:r.cached_steps)||0})," step executions, improving pipeline efficiency."]})]})]})]})]})]})}function gp({icon:e,label:t,value:r,color:n,trend:a}){const i={blue:"bg-blue-50 text-blue-600 dark:bg-blue-900/20 dark:text-blue-400",emerald:"bg-emerald-50 text-emerald-600 dark:bg-emerald-900/20 dark:text-emerald-400",purple:"bg-purple-50 text-purple-600 dark:bg-purple-900/20 dark:text-purple-400",amber:"bg-amber-50 text-amber-600 dark:bg-amber-900/20 dark:text-amber-400"},s={positive:"text-emerald-600 dark:text-emerald-400",neutral:"text-amber-600 dark:text-amber-400",negative:"text-rose-600 dark:text-rose-400"};return c.jsx(ze,{className:"hover:shadow-lg transition-shadow duration-200",children:c.jsxs("div",{className:"flex items-center gap-4",children:[c.jsx("div",{className:`p-3 rounded-xl ${i[n]}`,children:e}),c.jsxs("div",{className:"flex-1",children:[c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 font-medium",children:t}),c.jsxs("div",{className:"flex items-baseline gap-2",children:[c.jsx("p",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:r}),a&&c.jsx(gs,{size:16,className:`${s[a]} ${a==="negative"?"rotate-180":""}`})]})]})]})})}function RRe(){const[e,t]=N.useState("accuracy"),[r,n]=N.useState(null),[a,i]=N.useState(!0);N.useEffect(()=>{s()},[e]);const s=async()=>{i(!0);try{const l=await(await ve(`/api/leaderboard/${e}`)).json();n(l)}catch(o){console.error("Failed to fetch leaderboard:",o)}finally{i(!1)}};return c.jsxs("div",{className:"p-6",children:[c.jsxs("div",{className:"flex justify-between items-center mb-6",children:[c.jsxs("h1",{className:"text-2xl font-bold flex items-center gap-2 text-slate-900 dark:text-white",children:[c.jsx(ul,{className:"text-yellow-500"}),"Model Leaderboard"]}),c.jsxs("div",{className:"flex items-center gap-2 bg-white dark:bg-slate-800 rounded-lg p-1 border border-slate-200 dark:border-slate-700",children:[c.jsx(ND,{className:"w-4 h-4 ml-2 text-slate-400 dark:text-slate-500"}),c.jsxs("select",{value:e,onChange:o=>t(o.target.value),className:"bg-transparent border-none outline-none text-sm px-2 py-1 text-slate-700 dark:text-slate-200",children:[c.jsx("option",{value:"accuracy",children:"Accuracy"}),c.jsx("option",{value:"loss",children:"Loss"}),c.jsx("option",{value:"f1_score",children:"F1 Score"}),c.jsx("option",{value:"latency",children:"Latency"})]})]})]}),a?c.jsx("div",{className:"text-center py-12",children:c.jsx("div",{className:"inline-block animate-spin rounded-full h-8 w-8 border-b-2 border-yellow-500"})}):!r||r.models.length===0?c.jsx(A2,{icon:ul,title:`No models found for metric: ${e}`,description:"Generate sample data to populate the leaderboard.",action:c.jsxs(ye,{onClick:async()=>{i(!0);try{await ve("/api/leaderboard/generate_sample_data",{method:"POST"}),s()}catch(o){console.error("Failed to generate sample data:",o),i(!1)}},className:"flex items-center gap-2",children:[c.jsx(rg,{size:16}),"Generate Sample Data"]})}):c.jsx("div",{className:"bg-white dark:bg-slate-800/50 rounded-lg border border-slate-200 dark:border-slate-700 overflow-hidden",children:c.jsxs("table",{className:"w-full",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"bg-slate-50 dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700",children:[c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Rank"}),c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Model"}),c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Score"}),c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Run ID"}),c.jsx("th",{className:"px-6 py-3 text-left text-xs font-medium text-slate-500 dark:text-slate-400 uppercase tracking-wider",children:"Date"})]})}),c.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:r.models.map((o,l)=>{var u;return c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-700/50 transition-colors",children:[c.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:c.jsxs("div",{className:"flex items-center gap-2",children:[l===0&&c.jsx(ul,{className:"w-4 h-4 text-yellow-500"}),l===1&&c.jsx(ul,{className:"w-4 h-4 text-slate-400"}),l===2&&c.jsx(ul,{className:"w-4 h-4 text-amber-600"}),c.jsxs("span",{className:`font-bold ${l<3?"text-slate-900 dark:text-white":"text-slate-500 dark:text-slate-400"}`,children:["#",o.rank]})]})}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap font-medium text-slate-900 dark:text-white",children:o.model_name}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-lg font-bold text-blue-600 dark:text-blue-400",children:o.score.toFixed(4)}),r.higher_is_better?c.jsx(gs,{className:"w-4 h-4 text-green-500"}):c.jsx(WU,{className:"w-4 h-4 text-green-500"})]})}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-slate-500 dark:text-slate-400 font-mono",children:((u=o.run_id)==null?void 0:u.substring(0,8))||"N/A"}),c.jsx("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-slate-500 dark:text-slate-400",children:o.timestamp?pt(new Date(o.timestamp),"MMM d, HH:mm"):"-"})]},o.run_id)})})]})})]})}const Vu="/api";class DRe{async getAvailablePlugins(){try{const t=await fetch(`${Vu}/plugins/available`);if(!t.ok)throw new Error("Failed to fetch available plugins");return await t.json()}catch(t){return console.error("Error fetching available plugins:",t),[]}}async getInstalledPlugins(){try{const t=await fetch(`${Vu}/plugins/installed`);if(!t.ok)throw new Error("Failed to fetch installed plugins");return await t.json()}catch(t){return console.error("Error fetching installed plugins:",t),[]}}async installPlugin(t){try{const r=await fetch(`${Vu}/plugins/install`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({plugin_id:t})});if(!r.ok){const n=await r.json();throw new Error(n.detail||"Installation failed")}return await r.json()}catch(r){throw console.error("Error installing plugin:",r),r}}async uninstallPlugin(t){try{const r=await fetch(`${Vu}/plugins/uninstall/${t}`,{method:"POST"});if(!r.ok){const n=await r.json();throw new Error(n.detail||"Uninstall failed")}return await r.json()}catch(r){throw console.error("Error uninstalling plugin:",r),r}}async importZenMLStack(t){try{const r=await fetch(`${Vu}/plugins/import-stack`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({stack_name:t})});if(!r.ok){const n=await r.json();throw new Error(n.detail||"Import failed")}return await r.json()}catch(r){throw console.error("Error importing stack:",r),r}}}const Yl=new DRe;function IRe({isOpen:e,onClose:t,onAdd:r}){const[n,a]=N.useState("package"),[i,s]=N.useState(""),[o,l]=N.useState(""),u=()=>{n==="package"&&i?(r({type:"package",value:i}),s(""),t()):n==="url"&&o&&(r({type:"url",value:o}),l(""),t())};return e?c.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:t,children:c.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl p-6 max-w-md w-full mx-4 shadow-2xl",onClick:d=>d.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white",children:"Add Plugin"}),c.jsx("button",{onClick:t,className:"p-1 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-lg transition-colors",children:c.jsx(Ps,{size:20,className:"text-slate-500"})})]}),c.jsxs("div",{className:"flex gap-2 mb-4 bg-slate-100 dark:bg-slate-900 p-1 rounded-lg",children:[c.jsx("button",{onClick:()=>a("package"),className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-all ${n==="package"?"bg-white dark:bg-slate-700 text-slate-900 dark:text-white shadow-sm":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-300"}`,children:c.jsxs("div",{className:"flex items-center justify-center gap-2",children:[c.jsx(ms,{size:16}),"Package Name"]})}),c.jsx("button",{onClick:()=>a("url"),className:`flex-1 px-4 py-2 rounded-md text-sm font-medium transition-all ${n==="url"?"bg-white dark:bg-slate-700 text-slate-900 dark:text-white shadow-sm":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-300"}`,children:c.jsxs("div",{className:"flex items-center justify-center gap-2",children:[c.jsx(IU,{size:16}),"URL/Git"]})})]}),c.jsx("div",{className:"mb-4",children:n==="package"?c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Package Name"}),c.jsx("input",{type:"text",placeholder:"e.g., zenml-kubernetes",value:i,onChange:d=>s(d.target.value),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Install from PyPI by package name"})]}):c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"URL"}),c.jsx("input",{type:"text",placeholder:"e.g., git+https://github.com/...",value:o,onChange:d=>l(d.target.value),className:"w-full px-3 py-2 bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Install from Git repository or URL"})]})}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ye,{variant:"outline",onClick:t,className:"flex-1",children:"Cancel"}),c.jsx(ye,{onClick:u,disabled:n==="package"?!i:!o,className:"flex-1",children:"Install"})]})]})}):null}function LRe(){const[e,t]=N.useState(""),[r,n]=N.useState([]),[a,i]=N.useState(!0),[s,o]=N.useState(null),[l,u]=N.useState(!1);N.useEffect(()=>{d()},[]);const d=async()=>{try{i(!0);const m=await Yl.getAvailablePlugins();n(m)}catch(m){console.error("Failed to load plugins:",m)}finally{i(!1)}},f=r.filter(m=>m.name.toLowerCase().includes(e.toLowerCase())||m.description.toLowerCase().includes(e.toLowerCase())),h=async m=>{o(m);try{await Yl.installPlugin(m),n(g=>g.map(b=>b.id===m?{...b,installed:!0}:b))}catch(g){console.error("Install failed:",g),alert(`Installation failed: ${g.message}`)}finally{o(null)}},p=async({type:m,value:g})=>{o("manual");try{await Yl.installPlugin(g),await d(),alert(`Successfully installed ${g}`)}catch(b){console.error("Install failed:",b),alert(`Installation failed: ${b.message}`)}finally{o(null)}};return a?c.jsx("div",{className:"flex justify-center items-center py-12",children:c.jsx(ac,{className:"animate-spin text-primary-500",size:32})}):c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"space-y-6",children:[c.jsxs("div",{className:"flex gap-4",children:[c.jsxs("div",{className:"relative flex-1",children:[c.jsx(vm,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",size:18}),c.jsx("input",{type:"text",placeholder:"Search plugins...",value:e,onChange:m=>t(m.target.value),className:"w-full pl-10 pr-4 py-2 bg-slate-50 dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"})]}),c.jsxs(ye,{onClick:()=>u(!0),className:"flex items-center gap-2",children:[c.jsx(os,{size:18}),"Add Plugin"]})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:f.map(m=>c.jsxs("div",{className:"p-4 border border-slate-200 dark:border-slate-700 rounded-xl hover:border-primary-500/50 dark:hover:border-primary-500/50 transition-colors bg-white dark:bg-slate-800/50",children:[c.jsxs("div",{className:"flex justify-between items-start mb-2",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-slate-900 dark:text-white",children:m.name}),c.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 dark:text-slate-400 mt-1",children:[c.jsxs("span",{children:["v",m.version]}),c.jsx("span",{children:"•"}),c.jsxs("span",{children:["by ",m.author]})]})]}),m.installed?c.jsxs(jt,{variant:"success",className:"flex items-center gap-1",children:[c.jsx(Vt,{size:12})," Installed"]}):c.jsx(ye,{size:"sm",variant:"outline",onClick:()=>h(m.id),disabled:s===m.id||s==="manual",children:s===m.id?c.jsxs(c.Fragment,{children:[c.jsx(ac,{size:12,className:"animate-spin mr-1"}),"Installing..."]}):"Install"})]}),c.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-300 mb-4 line-clamp-2",children:m.description}),c.jsxs("div",{className:"flex items-center justify-between mt-auto",children:[c.jsx("div",{className:"flex gap-2",children:m.tags.map(g=>c.jsx("span",{className:"px-2 py-0.5 bg-slate-100 dark:bg-slate-700 text-slate-600 dark:text-slate-300 text-xs rounded-full",children:g},g))}),c.jsxs("div",{className:"flex items-center gap-3 text-xs text-slate-400",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(Lo,{size:12})," ",m.downloads]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx(VU,{size:12})," ",m.stars]})]})]})]},m.id))})]}),c.jsx(IRe,{isOpen:l,onClose:()=>u(!1),onAdd:p})]})}function zRe(){const[e,t]=N.useState([]),[r,n]=N.useState(!0),[a,i]=N.useState(null),[s,o]=N.useState(!1);N.useEffect(()=>{l()},[]);const l=async()=>{try{n(!0);const f=await Yl.getInstalledPlugins();t(f)}catch(f){console.error("Failed to load installed plugins:",f)}finally{n(!1),o(!1)}},u=async()=>{o(!0),await l()},d=async f=>{if(confirm("Are you sure you want to uninstall this plugin?")){i(f);try{await Yl.uninstallPlugin(f),t(h=>h.filter(p=>p.id!==f))}catch(h){console.error("Uninstall failed:",h),alert(`Uninstall failed: ${h.message}`)}finally{i(null)}}};return r?c.jsx("div",{className:"flex justify-center items-center py-12",children:c.jsx(ac,{className:"animate-spin text-primary-500",size:32})}):e.length===0?c.jsxs("div",{className:"text-center py-12 text-slate-500 dark:text-slate-400",children:[c.jsx("p",{children:"No plugins installed yet."}),c.jsx("p",{className:"text-sm mt-2",children:"Install plugins from the Browser tab"})]}):c.jsxs("div",{className:"space-y-4",children:[c.jsx("div",{className:"flex justify-end",children:c.jsxs(ye,{variant:"outline",size:"sm",onClick:u,disabled:s,className:"flex items-center gap-2",children:[c.jsx(rg,{size:14,className:s?"animate-spin":""}),"Refresh"]})}),e.map(f=>c.jsxs("div",{className:"flex items-center justify-between p-4 bg-white dark:bg-slate-800/50 border border-slate-200 dark:border-slate-700 rounded-xl",children:[c.jsxs("div",{className:"flex items-start gap-4",children:[c.jsx("div",{className:"p-2 bg-primary-50 dark:bg-primary-900/20 rounded-lg",children:c.jsx(CD,{className:"text-primary-500",size:24})}),c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("h3",{className:"font-semibold text-slate-900 dark:text-white",children:f.name}),c.jsxs(jt,{variant:"outline",className:"text-xs",children:["v",f.version]}),c.jsx(jt,{variant:"success",className:"text-xs",children:"Active"})]}),c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:f.description})]})]}),c.jsx("div",{className:"flex items-center gap-2",children:c.jsx(ye,{variant:"ghost",size:"sm",className:"text-red-500 hover:text-red-600 hover:bg-red-50 dark:hover:bg-red-900/20",title:"Uninstall",onClick:()=>d(f.id),disabled:a===f.id,children:a===f.id?c.jsx(ac,{size:16,className:"animate-spin"}):c.jsx(_o,{size:16})})})]},f.id))]})}function FRe(){const[e,t]=N.useState(""),[r,n]=N.useState("idle"),[a,i]=N.useState([]),s=async()=>{if(e){n("importing"),i(["Connecting to ZenML client...","Fetching stack details..."]);try{const o=await Yl.importZenMLStack(e);i(l=>[...l,`Found stack '${e}' with ${o.components.length} components.`]),await new Promise(l=>setTimeout(l,800)),i(l=>[...l,"Generating flowyml configuration...","Import successful!"]),n("success")}catch(o){console.error("Import failed:",o),i(l=>[...l,`Error: ${o.message}`]),n("error")}}};return c.jsxs("div",{className:"space-y-6",children:[c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800/50 p-4 rounded-xl border border-slate-200 dark:border-slate-700",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(Zk,{className:"text-primary-500 mt-1",size:20}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-medium text-slate-900 dark:text-white",children:"Import ZenML Stack"}),c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:"Migrate your existing ZenML infrastructure to flowyml. We'll automatically detect your components and generate the necessary configuration."})]})]})}),c.jsxs("div",{className:"flex gap-4 items-end",children:[c.jsxs("div",{className:"flex-1 space-y-2",children:[c.jsx("label",{className:"text-sm font-medium text-slate-700 dark:text-slate-300",children:"ZenML Stack Name"}),c.jsx("input",{type:"text",placeholder:"e.g., production-stack",value:e,onChange:o=>t(o.target.value),className:"w-full px-3 py-2 bg-white dark:bg-slate-800 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500"})]}),c.jsx(ye,{onClick:s,disabled:r==="importing"||!e,className:"flex items-center gap-2",children:r==="importing"?c.jsxs(c.Fragment,{children:[c.jsx(ac,{size:16,className:"animate-spin"}),"Importing..."]}):c.jsxs(c.Fragment,{children:["Start Import",c.jsx(ii,{size:16})]})})]}),r!=="idle"&&c.jsxs("div",{className:"bg-slate-900 rounded-xl p-4 font-mono text-sm overflow-hidden",children:[c.jsx("div",{className:"space-y-1",children:a.map((o,l)=>c.jsxs("div",{className:"flex items-center gap-2 text-slate-300",children:[c.jsx("span",{className:"text-slate-600",children:"➜"}),o]},l))}),r==="success"&&c.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-800 flex items-center gap-2 text-green-400",children:[c.jsx(Vt,{size:16}),c.jsx("span",{children:"Stack imported successfully! You can now use it in your pipelines."})]}),r==="error"&&c.jsxs("div",{className:"mt-4 pt-4 border-t border-slate-800 flex items-center gap-2 text-red-400",children:[c.jsx(ai,{size:16}),c.jsx("span",{children:"Failed to import stack. Please check the name and try again."})]})]})]})}function BRe(){const[e,t]=N.useState("browser"),r=[{id:"browser",label:"Plugin Browser",icon:ms},{id:"installed",label:"Installed",icon:Lo},{id:"zenml",label:"ZenML Integration",icon:Zk}];return c.jsxs(ze,{className:"overflow-hidden",children:[c.jsxs(w4,{className:"border-b border-slate-100 dark:border-slate-800 bg-slate-50/50 dark:bg-slate-900/50 pb-0",children:[c.jsx("div",{className:"flex items-center justify-between mb-4",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(ms,{size:20,className:"text-primary-500"}),c.jsx(j4,{children:"Plugins & Integrations"})]})}),c.jsx("div",{className:"flex gap-6",children:r.map(n=>{const a=n.icon,i=e===n.id;return c.jsxs("button",{onClick:()=>t(n.id),className:`
|
|
628
|
-
flex items-center gap-2 pb-3 text-sm font-medium transition-all relative
|
|
629
|
-
${i?"text-primary-600 dark:text-primary-400":"text-slate-500 dark:text-slate-400 hover:text-slate-700 dark:hover:text-slate-200"}
|
|
630
|
-
`,children:[c.jsx(a,{size:16}),n.label,i&&c.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary-500 rounded-t-full"})]},n.id)})})]}),c.jsxs(Kw,{className:"p-6",children:[e==="browser"&&c.jsx(LRe,{}),e==="installed"&&c.jsx(zRe,{}),e==="zenml"&&c.jsx(FRe,{})]})]})}function VRe(){const e={hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.1}}},t={hidden:{opacity:0,y:20},show:{opacity:1,y:0}};return c.jsxs(Le.div,{initial:"hidden",animate:"show",variants:e,className:"space-y-6",children:[c.jsxs(Le.div,{variants:t,children:[c.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[c.jsx("div",{className:"p-2 bg-gradient-to-br from-purple-600 to-purple-800 rounded-lg",children:c.jsx(ms,{className:"text-white",size:24})}),c.jsx("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white tracking-tight",children:"Plugins & Integrations"})]}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-2",children:"Extend flowyml with plugins from ZenML, Airflow, and other ecosystems. Browse, install, and manage integrations seamlessly."})]}),c.jsx(Le.div,{variants:t,children:c.jsx(BRe,{})})]})}function URe(){const[e,t]=N.useState([]),[r,n]=N.useState(!0),[a,i]=N.useState(!1),[s,o]=N.useState(""),[l,u]=N.useState(null),[d,f]=N.useState(new Set);N.useEffect(()=>{h()},[]);const h=async()=>{try{const x=await(await fetch("/api/execution/tokens")).json();t(x.tokens||[])}catch(y){console.error("Failed to fetch tokens:",y)}finally{n(!1)}},p=async y=>{y.preventDefault();try{const j=await(await fetch("/api/execution/tokens",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s})})).json();u(j.token),o(""),h()}catch(x){console.error("Failed to create token:",x)}},m=async y=>{if(confirm("Are you sure you want to delete this token? This action cannot be undone."))try{await fetch(`/api/execution/tokens/${y}`,{method:"DELETE"}),h()}catch(x){console.error("Failed to delete token:",x)}},g=y=>{navigator.clipboard.writeText(y)},b=y=>{f(x=>{const j=new Set(x);return j.has(y)?j.delete(y):j.add(y),j})},v=y=>!y||typeof y!="string"?"••••••••••••••••••••••••••••••••••••••••••••••••":`${y.substring(0,8)}${"•".repeat(32)}${y.substring(y.length-8)}`;return r?c.jsx("div",{className:"flex items-center justify-center min-h-screen",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):c.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-6",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsxs("h1",{className:"text-3xl font-bold text-slate-900 dark:text-white flex items-center gap-3",children:[c.jsx("div",{className:"p-3 bg-gradient-to-br from-primary-500 to-purple-500 rounded-xl text-white",children:c.jsx(Fl,{size:28})}),"API Tokens"]}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-2",children:"Manage API tokens for programmatic access to flowyml"})]}),c.jsxs(ye,{onClick:()=>i(!0),className:"flex items-center gap-2 bg-gradient-to-r from-primary-600 to-purple-600 hover:from-primary-700 hover:to-purple-700",children:[c.jsx(os,{size:16}),"Create Token"]})]}),c.jsx(ze,{className:"border-l-4 border-l-amber-500 bg-amber-50 dark:bg-amber-900/10",children:c.jsxs("div",{className:"flex items-start gap-3",children:[c.jsx(xm,{className:"text-amber-600 dark:text-amber-400 flex-shrink-0 mt-0.5",size:20}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-semibold text-amber-900 dark:text-amber-200",children:"Security Notice"}),c.jsx("p",{className:"text-sm text-amber-800 dark:text-amber-300 mt-1",children:"Treat your API tokens like passwords. Never share them publicly or commit them to version control."})]})]})}),c.jsx("div",{className:"grid gap-4",children:e.length===0?c.jsxs(ze,{className:"text-center py-16 bg-slate-50 dark:bg-slate-800/30",children:[c.jsx("div",{className:"mx-auto w-20 h-20 bg-slate-100 dark:bg-slate-700 rounded-2xl flex items-center justify-center mb-6",children:c.jsx(Fl,{className:"text-slate-400",size:32})}),c.jsx("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-2",children:"No API tokens yet"}),c.jsx("p",{className:"text-slate-500 max-w-md mx-auto mb-6",children:"Create your first API token to start making programmatic requests to flowyml"}),c.jsxs(ye,{onClick:()=>i(!0),className:"bg-primary-600 hover:bg-primary-700",children:[c.jsx(os,{size:16,className:"mr-2"}),"Create Your First Token"]})]}):Array.isArray(e)&&e.map(y=>c.jsx(ze,{className:"hover:shadow-lg transition-all duration-200",children:c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[c.jsx("div",{className:"p-2 bg-primary-50 dark:bg-primary-900/20 rounded-lg",children:c.jsx(Fl,{className:"text-primary-600 dark:text-primary-400",size:20})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-white truncate",children:y.name}),c.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[c.jsxs("span",{className:"text-xs text-slate-500 dark:text-slate-400 flex items-center gap-1",children:[c.jsx(An,{size:12}),"Created ",pt(new Date(y.created_at),"MMM d, yyyy")]}),c.jsx(jt,{variant:"secondary",className:"text-xs",children:y.id})]})]})]}),c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-3 font-mono text-sm border border-slate-200 dark:border-slate-700",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("code",{className:"flex-1 truncate text-slate-700 dark:text-slate-300",children:d.has(y.id)?y.token:v(y.token)}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("button",{onClick:()=>b(y.id),className:"p-1.5 hover:bg-slate-200 dark:hover:bg-slate-700 rounded transition-colors",title:d.has(y.id)?"Hide token":"Show token",children:d.has(y.id)?c.jsx(OU,{size:16,className:"text-slate-500"}):c.jsx(tg,{size:16,className:"text-slate-500"})}),c.jsx("button",{onClick:()=>g(y.token),className:"p-1.5 hover:bg-slate-200 dark:hover:bg-slate-700 rounded transition-colors",title:"Copy to clipboard",children:c.jsx(mm,{size:16,className:"text-slate-500"})})]})]})})]}),c.jsx(ye,{onClick:()=>m(y.id),variant:"ghost",className:"text-rose-600 hover:text-rose-700 hover:bg-rose-50 dark:hover:bg-rose-900/20 flex-shrink-0",children:c.jsx(_o,{size:18})})]})},y.id))}),a&&c.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:c.jsxs(ze,{className:"max-w-lg w-full",children:[c.jsxs("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(os,{className:"text-primary-600",size:24}),"Create New Token"]}),c.jsxs("form",{onSubmit:p,className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Token Name"}),c.jsx("input",{type:"text",value:s,onChange:y=>o(y.target.value),placeholder:"e.g., Production API, CI/CD Pipeline",className:"w-full px-4 py-2 border border-slate-300 dark:border-slate-600 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-transparent bg-white dark:bg-slate-800 text-slate-900 dark:text-white",required:!0}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Choose a descriptive name to identify this token's purpose"})]}),c.jsxs("div",{className:"flex gap-3 justify-end pt-4",children:[c.jsx(ye,{type:"button",variant:"ghost",onClick:()=>i(!1),children:"Cancel"}),c.jsx(ye,{type:"submit",className:"bg-primary-600 hover:bg-primary-700",children:"Create Token"})]})]})]})}),l&&c.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",children:c.jsxs(ze,{className:"max-w-2xl w-full",children:[c.jsxs("div",{className:"text-center mb-6",children:[c.jsx("div",{className:"mx-auto w-16 h-16 bg-green-100 dark:bg-green-900/20 rounded-full flex items-center justify-center mb-4",children:c.jsx(kU,{className:"text-green-600 dark:text-green-400",size:32})}),c.jsx("h2",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:"Token Created Successfully!"}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-2",children:"Copy this token now. You won't be able to see it again."})]}),c.jsx("div",{className:"bg-slate-50 dark:bg-slate-800 rounded-lg p-4 mb-6 border-2 border-primary-200 dark:border-primary-800",children:c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("code",{className:"flex-1 font-mono text-sm break-all text-slate-900 dark:text-white",children:l}),c.jsx("button",{onClick:()=>g(l),className:"p-2 bg-primary-600 hover:bg-primary-700 text-white rounded-lg transition-colors flex-shrink-0",title:"Copy to clipboard",children:c.jsx(mm,{size:18})})]})}),c.jsx("div",{className:"bg-amber-50 dark:bg-amber-900/10 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-6",children:c.jsxs("div",{className:"flex gap-2",children:[c.jsx(xm,{className:"text-amber-600 dark:text-amber-400 flex-shrink-0",size:20}),c.jsxs("div",{className:"text-sm text-amber-800 dark:text-amber-200",children:[c.jsx("strong",{children:"Important:"})," Store this token securely. It won't be displayed again."]})]})}),c.jsx(ye,{onClick:()=>{u(null),i(!1)},className:"w-full bg-primary-600 hover:bg-primary-700",children:"I've Saved My Token"})]})})]})}function HRe(){const[e,t]=N.useState([]),[r,n]=N.useState(!0),[a,i]=N.useState(!1),[s,o]=N.useState(null),[l,u]=N.useState(null);N.useEffect(()=>{d()},[]);const d=async()=>{try{const h=await ve("/api/execution/tokens");if(h.status===401){t([]),n(!1);return}const p=await h.json();console.log("Tokens fetched:",p),t(p.tokens||[])}catch(h){console.error("Failed to fetch tokens:",h),u("Failed to load tokens")}finally{n(!1)}},f=async()=>{try{const h=await ve("/api/execution/tokens/init",{method:"POST"}),p=await h.json();h.ok?(o(p.token),await d()):u(p.detail)}catch{u("Failed to create initial token")}};return r?c.jsx("div",{className:"flex items-center justify-center h-96",children:c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600"})}):c.jsxs("div",{className:"space-y-6 max-w-6xl mx-auto",children:[c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[c.jsx("div",{className:"p-2 bg-gradient-to-br from-amber-600 to-orange-800 rounded-lg",children:c.jsx(Fl,{className:"text-white",size:24})}),c.jsx("h2",{className:"text-3xl font-bold text-slate-900 dark:text-white tracking-tight",children:"API Tokens"})]}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 mt-2",children:"Manage API tokens for authenticating CLI and SDK requests"})]}),l&&c.jsxs("div",{className:"bg-rose-50 dark:bg-rose-900/20 border border-rose-200 dark:border-rose-800 rounded-lg p-4 flex items-start gap-3",children:[c.jsx(ai,{className:"text-rose-600 shrink-0",size:20}),c.jsxs("div",{children:[c.jsx("h4",{className:"font-medium text-rose-900 dark:text-rose-200",children:"Error"}),c.jsx("p",{className:"text-sm text-rose-700 dark:text-rose-300 mt-1",children:l})]})]}),s&&c.jsx(KRe,{token:s,onClose:()=>o(null)}),e.length===0&&!s&&c.jsx(ze,{children:c.jsxs(Kw,{className:"py-16 text-center",children:[c.jsx("div",{className:"mx-auto w-20 h-20 bg-amber-100 dark:bg-amber-900/30 rounded-2xl flex items-center justify-center mb-6",children:c.jsx(Fl,{className:"text-amber-600",size:32})}),c.jsx("h3",{className:"text-xl font-bold text-slate-900 dark:text-white mb-2",children:"No API Tokens Yet"}),c.jsx("p",{className:"text-slate-500 dark:text-slate-400 max-w-md mx-auto mb-6",children:"Create your first admin token to start using the flowyml API"}),c.jsxs(ye,{onClick:f,className:"flex items-center gap-2 mx-auto",children:[c.jsx(os,{size:18}),"Create Initial Token"]})]})}),Array.isArray(e)&&e.length>0&&c.jsxs(ze,{children:[c.jsx(w4,{children:c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx(j4,{children:"Active Tokens"}),c.jsxs(ye,{onClick:()=>i(!0),variant:"primary",className:"flex items-center gap-2",children:[c.jsx(os,{size:18}),"Create Token"]})]})}),c.jsx(Kw,{children:c.jsx("div",{className:"space-y-3",children:e.map((h,p)=>c.jsx(GRe,{token:h,onRevoke:d},p))})})]}),a&&c.jsx(YRe,{onClose:()=>i(!1),onCreate:h=>{o(h),i(!1),d()}})]})}const WRe={read:{label:"Read",icon:tg,className:"bg-blue-50 text-blue-700 border-blue-200 dark:bg-blue-900/30 dark:text-blue-200 dark:border-blue-800"},write:{label:"Write",icon:FU,className:"bg-emerald-50 text-emerald-700 border-emerald-200 dark:bg-emerald-900/30 dark:text-emerald-200 dark:border-emerald-800"},execute:{label:"Execute",icon:Eo,className:"bg-purple-50 text-purple-700 border-purple-200 dark:bg-purple-900/30 dark:text-purple-200 dark:border-purple-800"},admin:{label:"Admin",icon:BU,className:"bg-rose-50 text-rose-700 border-rose-200 dark:bg-rose-900/30 dark:text-rose-200 dark:border-rose-800"}};function qRe({perm:e}){const t=WRe[e]||{label:e,icon:xm,className:"bg-slate-100 text-slate-700 border-slate-200 dark:bg-slate-800/60 dark:text-slate-100 dark:border-slate-700"},r=t.icon;return c.jsxs("span",{className:`inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold border ${t.className}`,children:[c.jsx(r,{size:12}),t.label]})}function GRe({token:e,onRevoke:t}){const[r,n]=N.useState(!1),a=async()=>{try{await ve(`/api/execution/tokens/${e.name}`,{method:"DELETE"}),t()}catch(i){console.error("Failed to revoke token:",i)}};return c.jsxs("div",{className:"p-4 bg-slate-50 dark:bg-slate-800/50 rounded-lg border border-slate-200 dark:border-slate-700 hover:border-primary-300 dark:hover:border-primary-700 transition-colors",children:[c.jsxs("div",{className:"flex items-start justify-between",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[c.jsx("h4",{className:"font-semibold text-slate-900 dark:text-white",children:e.name}),e.project&&c.jsx(jt,{variant:"secondary",className:"text-xs",children:e.project})]}),c.jsx("div",{className:"flex flex-wrap gap-2 mb-3",children:Array.isArray(e.permissions)&&e.permissions.length>0?e.permissions.map(i=>c.jsx(qRe,{perm:i},i)):c.jsx("span",{className:"text-xs text-slate-400",children:"No permissions assigned"})}),c.jsxs("div",{className:"flex items-center gap-4 text-xs text-slate-500 dark:text-slate-400",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(An,{size:12}),"Created: ",pt(new Date(e.created_at),"MMM d, yyyy")]}),e.last_used&&c.jsxs("span",{children:["Last used: ",pt(new Date(e.last_used),"MMM d, yyyy")]})]})]}),c.jsx("button",{onClick:()=>n(!0),className:"p-2 hover:bg-rose-100 dark:hover:bg-rose-900/30 text-slate-400 hover:text-rose-600 rounded-lg transition-colors",children:c.jsx(_o,{size:16})})]}),r&&c.jsxs("div",{className:"mt-3 pt-3 border-t border-slate-200 dark:border-slate-700",children:[c.jsx("p",{className:"text-sm text-slate-600 dark:text-slate-400 mb-3",children:"Are you sure you want to revoke this token? This action cannot be undone."}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(ye,{variant:"danger",size:"sm",onClick:a,children:"Yes, Revoke"}),c.jsx(ye,{variant:"ghost",size:"sm",onClick:()=>n(!1),children:"Cancel"})]})]})]})}function KRe({token:e,onClose:t}){const[r,n]=N.useState(!1),a=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)};return c.jsxs(Le.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"bg-gradient-to-br from-emerald-50 to-teal-50 dark:from-emerald-900/20 dark:to-teal-900/20 border-2 border-emerald-300 dark:border-emerald-700 rounded-lg p-6",children:[c.jsx("div",{className:"flex items-start justify-between mb-4",children:c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-2 bg-emerald-500 rounded-lg",children:c.jsx(xm,{className:"text-white",size:20})}),c.jsxs("div",{children:[c.jsx("h3",{className:"font-bold text-emerald-900 dark:text-emerald-200",children:"Token Created Successfully!"}),c.jsx("p",{className:"text-sm text-emerald-700 dark:text-emerald-300 mt-1",children:"Save this token now - it won't be shown again"})]})]})}),c.jsx("div",{className:"bg-white dark:bg-slate-800 rounded-lg p-4 border border-emerald-200 dark:border-emerald-800",children:c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx("code",{className:"flex-1 font-mono text-sm text-slate-900 dark:text-white break-all",children:e}),c.jsx("button",{onClick:a,className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded transition-colors shrink-0",children:r?c.jsx(Yk,{className:"text-emerald-600",size:18}):c.jsx(mm,{className:"text-slate-400",size:18})})]})}),c.jsx(ye,{variant:"ghost",onClick:t,className:"mt-4 w-full",children:"I've saved my token"})]})}function YRe({onClose:e,onCreate:t}){const[r,n]=N.useState(""),[a,i]=N.useState(""),[s,o]=N.useState(["read","write","execute"]),[l,u]=N.useState(!1),[d,f]=N.useState(null),[h,p]=N.useState([]),[m,g]=N.useState(!0);N.useEffect(()=>{b()},[]);const b=async()=>{try{const j=await(await ve("/api/projects/")).json();p(j.projects||[])}catch(x){console.error("Failed to fetch projects:",x),p([])}finally{g(!1)}},v=async()=>{if(!r){f("Token name is required");return}u(!0),f(null);try{const x=await ve("/api/execution/tokens",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r,project:a||null,permissions:s})}),j=await x.json();x.ok?t(j.token):f(j.detail)}catch{f("Failed to create token")}finally{u(!1)}},y=x=>{o(j=>j.includes(x)?j.filter(w=>w!==x):[...j,x])};return c.jsx(xi,{children:c.jsx(Le.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-50 flex items-center justify-center p-4",onClick:e,children:c.jsxs(Le.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},onClick:x=>x.stopPropagation(),className:"bg-white dark:bg-slate-800 rounded-2xl shadow-2xl max-w-lg w-full border border-slate-200 dark:border-slate-700",children:[c.jsxs("div",{className:"p-6 border-b border-slate-100 dark:border-slate-700",children:[c.jsx("h3",{className:"text-2xl font-bold text-slate-900 dark:text-white",children:"Create New Token"}),c.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400 mt-1",children:"Generate a new API token for authentication"})]}),c.jsxs("div",{className:"p-6 space-y-4",children:[d&&c.jsx("div",{className:"bg-rose-50 dark:bg-rose-900/20 border border-rose-200 dark:border-rose-800 rounded-lg p-3 text-sm text-rose-700 dark:text-rose-300",children:d}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1",children:"Token Name *"}),c.jsx("input",{type:"text",value:r,onChange:x=>n(x.target.value),placeholder:"e.g., Production CLI Token",className:"w-full px-3 py-2 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 bg-white dark:bg-slate-900 text-slate-900 dark:text-white"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-1",children:"Project Scope"}),c.jsxs("select",{value:a,onChange:x=>i(x.target.value),disabled:m,className:"w-full px-3 py-2 border border-slate-200 dark:border-slate-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 bg-white dark:bg-slate-900 text-slate-900 dark:text-white",children:[c.jsx("option",{value:"",children:"All Projects"}),Array.isArray(h)&&h.map(x=>c.jsx("option",{value:x.name,children:x.name},x.name))]}),c.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:"Restrict this token to a specific project or allow access to all"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2",children:"Permissions"}),c.jsx("div",{className:"space-y-2",children:["read","write","execute","admin"].map(x=>c.jsxs("label",{className:"flex items-center gap-3 p-3 bg-slate-50 dark:bg-slate-900/50 rounded-lg cursor-pointer hover:bg-slate-100 dark:hover:bg-slate-700/50",children:[c.jsx("input",{type:"checkbox",checked:s.includes(x),onChange:()=>y(x),className:"w-4 h-4 text-primary-600 border-slate-300 rounded focus:ring-primary-500"}),c.jsxs("div",{className:"flex-1",children:[c.jsx("span",{className:"font-medium text-slate-900 dark:text-white capitalize",children:x}),c.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-0.5",children:[x==="read"&&"View pipelines, runs, and artifacts",x==="write"&&"Modify configurations and metadata",x==="execute"&&"Run pipelines and workflows",x==="admin"&&"Full access including token management"]})]})]},x))})]})]}),c.jsxs("div",{className:"p-6 border-t border-slate-100 dark:border-slate-700 flex gap-3",children:[c.jsx(ye,{variant:"ghost",onClick:e,className:"flex-1",children:"Cancel"}),c.jsx(ye,{onClick:v,disabled:l,className:"flex-1",children:l?"Creating...":"Create Token"})]})]})})})}function XRe(){const[e]=Gk(),[t,r]=N.useState([]),[n,a]=N.useState(!0),[i,s]=N.useState(null),o=e.get("runs"),l=e.get("run1"),u=e.get("run2"),d=o?o.split(",").filter(Boolean):[l,u].filter(Boolean);N.useEffect(()=>{if(d.length<2){s("Please select at least two runs to compare."),a(!1);return}f()},[o,l,u]);const f=async()=>{a(!0);try{const m=d.map(v=>ve(`/api/runs/${v}`)),g=await Promise.all(m),b=[];for(const v of g){if(!v.ok)throw new Error("Failed to fetch run details");b.push(await v.json())}r(b)}catch(m){s(m.message)}finally{a(!1)}};if(n)return c.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-slate-50 dark:bg-slate-900",children:[c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mb-4"}),c.jsx("p",{className:"text-slate-500",children:"Loading comparison..."})]});if(i)return c.jsx("div",{className:"flex flex-col items-center justify-center h-screen bg-slate-50 dark:bg-slate-900",children:c.jsxs("div",{className:"bg-red-50 p-6 rounded-xl border border-red-100 max-w-md text-center",children:[c.jsx(Kk,{className:"mx-auto text-red-500 mb-2",size:32}),c.jsx("h2",{className:"text-xl font-bold text-slate-800 mb-2",children:"Error"}),c.jsx("p",{className:"text-slate-600 mb-4",children:i}),c.jsx(rt,{to:"/runs",children:c.jsx(ye,{children:"Back to Runs"})})]})});const h=Math.min(...t.map(m=>m.duration||1/0)),p=Array.from(new Set(t.flatMap(m=>Object.keys(m.steps||{}))));return c.jsxs("div",{className:"min-h-screen bg-slate-50 dark:bg-slate-900 overflow-y-auto",children:[c.jsx("div",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 sticky top-0 z-10 w-full overflow-x-auto",children:c.jsxs("div",{className:"w-full min-w-max px-6 py-4",children:[c.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[c.jsx(rt,{to:"/runs",className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-full transition-colors",children:c.jsx(kD,{size:20,className:"text-slate-500"})}),c.jsxs("h1",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:["Run Comparison",c.jsxs(jt,{variant:"secondary",className:"ml-2",children:["(",t.length," runs)"]})]})]}),c.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${t.length}, minmax(300px, 1fr))`},children:t.map(m=>c.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700",children:[c.jsx(oc,{status:m.status}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"font-bold text-slate-900 dark:text-white truncate",title:m.run_id,children:m.run_id}),c.jsx("p",{className:"text-xs text-slate-500",children:pt(new Date(m.start_time),"MMM d, HH:mm:ss")})]})]},m.run_id))})]})}),c.jsx("div",{className:"w-full overflow-x-auto",children:c.jsxs("div",{className:"min-w-max px-6 py-8 space-y-8",children:[c.jsxs("section",{children:[c.jsxs("h2",{className:"text-lg font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(Be,{size:18})," Performance Metrics"]}),c.jsx(ze,{className:"overflow-hidden",children:c.jsxs("table",{className:"w-full text-sm text-left",children:[c.jsx("thead",{className:"bg-slate-50 dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 text-xs uppercase text-slate-500 font-medium",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-6 py-3 w-48 sticky left-0 bg-slate-50 dark:bg-slate-800 z-10 border-r border-slate-200 dark:border-slate-700",children:"Metric"}),t.map((m,g)=>c.jsx("th",{className:`px-6 py-3 min-w-[200px] ${g<t.length-1?"border-r border-slate-200 dark:border-slate-700":""}`,children:m.run_id.slice(0,8)},m.run_id))]})}),c.jsxs("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:[c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Duration"}),t.map((m,g)=>{var b;return c.jsxs("td",{className:`px-6 py-3 ${g<t.length-1?"border-r border-slate-100 dark:border-slate-700":""} ${m.duration===h?"text-emerald-600 font-bold":"text-slate-600"}`,children:[(b=m.duration)==null?void 0:b.toFixed(2),"s",m.duration===h&&t.length>1&&c.jsx("span",{className:"ml-2 text-xs bg-emerald-100 dark:bg-emerald-900/30 text-emerald-600 px-1.5 py-0.5 rounded-full",children:"Fastest"})]},m.run_id)})]}),c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Step Count"}),t.map((m,g)=>c.jsx("td",{className:`px-6 py-3 text-slate-600 ${g<t.length-1?"border-r border-slate-100 dark:border-slate-700":""}`,children:Object.keys(m.steps||{}).length},m.run_id))]})]})]})})]}),c.jsxs("section",{children:[c.jsxs("h2",{className:"text-lg font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(oa,{size:18})," Step Execution"]}),c.jsx(ze,{className:"overflow-hidden",children:c.jsxs("table",{className:"w-full text-sm text-left",children:[c.jsx("thead",{className:"bg-slate-50 dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 text-xs uppercase text-slate-500 font-medium",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-6 py-3 w-48 sticky left-0 bg-slate-50 dark:bg-slate-800 z-10 border-r border-slate-200 dark:border-slate-700",children:"Step Name"}),t.map((m,g)=>c.jsx("th",{className:`px-6 py-3 min-w-[200px] ${g<t.length-1?"border-r border-slate-200 dark:border-slate-700":""}`,children:m.run_id.slice(0,8)},m.run_id))]})}),c.jsx("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:p.map(m=>{const g=t.map(v=>{var y,x;return((x=(y=v.steps)==null?void 0:y[m])==null?void 0:x.duration)||1/0}),b=Math.min(...g);return c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:m}),t.map((v,y)=>{var j,w;const x=(j=v.steps)==null?void 0:j[m];return c.jsx("td",{className:`px-6 py-3 ${y<t.length-1?"border-r border-slate-100 dark:border-slate-700":""}`,children:x?c.jsxs("div",{className:"flex items-center justify-between gap-4",children:[c.jsx(oc,{status:x.success?"completed":x.error?"failed":"pending",size:"sm"}),c.jsxs("span",{className:`font-mono text-xs ${x.duration===b&&t.length>1?"text-emerald-600 font-bold":"text-slate-500"}`,children:[(w=x.duration)==null?void 0:w.toFixed(2),"s"]})]}):c.jsx("span",{className:"text-slate-400 italic text-xs",children:"Not executed"})},v.run_id)})]},m)})})]})})]})]})})]})}function ZRe(){const[e]=Gk(),[t,r]=N.useState([]),[n,a]=N.useState(!0),[i,s]=N.useState(null),o=e.get("ids"),l=o?o.split(",").filter(Boolean):[];N.useEffect(()=>{if(l.length<2){s("Please select at least two experiments to compare."),a(!1);return}u()},[o]);const u=async()=>{a(!0);try{const g=((await(await ve("/api/experiments/?limit=1000")).json()).experiments||[]).filter(y=>l.includes(y.experiment_id)),b=await Promise.all(g.map(async y=>{try{const x=y.pipeline_name?`/api/runs?pipeline=${encodeURIComponent(y.pipeline_name)}&limit=100`:"/api/runs?limit=100",S=((await(await ve(x)).json()).runs||[]).filter(M=>M.pipeline_name===y.pipeline_name||y.runs&&y.runs.includes(M.run_id)),k=S.length,_=S.filter(M=>M.status==="completed").length,E=S.filter(M=>M.status==="failed").length,A=S.map(M=>M.duration||0).filter(M=>M>0),C=A.length>0?A.reduce((M,O)=>M+O,0)/A.length:0;return{...y,stats:{total:k,success:_,failed:E,avgDuration:C,successRate:k>0?_/k*100:0}}}catch(x){return console.error(`Failed to fetch stats for experiment ${y.name}`,x),{...y,stats:{total:0,success:0,failed:0,avgDuration:0,successRate:0}}}})),v=l.map(y=>b.find(x=>x.experiment_id===y)).filter(Boolean);r(v)}catch(h){s(h.message)}finally{a(!1)}};if(n)return c.jsxs("div",{className:"flex flex-col items-center justify-center h-screen bg-slate-50 dark:bg-slate-900",children:[c.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary-600 mb-4"}),c.jsx("p",{className:"text-slate-500",children:"Loading experiments..."})]});if(i)return c.jsx("div",{className:"flex flex-col items-center justify-center h-screen bg-slate-50 dark:bg-slate-900",children:c.jsxs("div",{className:"bg-red-50 p-6 rounded-xl border border-red-100 max-w-md text-center",children:[c.jsx(Kk,{className:"mx-auto text-red-500 mb-2",size:32}),c.jsx("h2",{className:"text-xl font-bold text-slate-800 mb-2",children:"Error"}),c.jsx("p",{className:"text-slate-600 mb-4",children:i}),c.jsx(rt,{to:"/experiments",children:c.jsx(ye,{children:"Back to Experiments"})})]})});const d=Math.max(...t.map(h=>h.stats.successRate)),f=Math.min(...t.map(h=>h.stats.avgDuration).filter(h=>h>0));return c.jsxs("div",{className:"min-h-screen bg-slate-50 dark:bg-slate-900 overflow-y-auto",children:[c.jsx("div",{className:"bg-white dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 sticky top-0 z-10 w-full overflow-x-auto",children:c.jsxs("div",{className:"w-full min-w-max px-6 py-4",children:[c.jsxs("div",{className:"flex items-center gap-4 mb-4",children:[c.jsx(rt,{to:"/experiments",className:"p-2 hover:bg-slate-100 dark:hover:bg-slate-700 rounded-full transition-colors",children:c.jsx(kD,{size:20,className:"text-slate-500"})}),c.jsxs("h1",{className:"text-xl font-bold text-slate-900 dark:text-white flex items-center gap-2",children:["Experiment Comparison",c.jsxs(jt,{variant:"secondary",className:"ml-2",children:["(",t.length," selected)"]})]})]}),c.jsx("div",{className:"grid gap-4",style:{gridTemplateColumns:`repeat(${t.length}, minmax(300px, 1fr))`},children:t.map(h=>c.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-slate-50 dark:bg-slate-900 border border-slate-200 dark:border-slate-700",children:[c.jsx("div",{className:"p-2 bg-purple-100 dark:bg-purple-900/30 rounded-lg text-purple-600",children:c.jsx(On,{size:20})}),c.jsxs("div",{className:"min-w-0",children:[c.jsx("h3",{className:"font-bold text-slate-900 dark:text-white truncate",title:h.name,children:h.name}),c.jsx("p",{className:"text-xs text-slate-500",children:pt(new Date(h.created_at||Date.now()),"MMM d, yyyy")})]})]},h.experiment_id))})]})}),c.jsx("div",{className:"w-full overflow-x-auto",children:c.jsxs("div",{className:"min-w-max px-6 py-8 space-y-8",children:[c.jsxs("section",{children:[c.jsxs("h2",{className:"text-lg font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(OD,{size:18})," Overview"]}),c.jsx(ze,{className:"overflow-hidden",children:c.jsxs("table",{className:"w-full text-sm text-left",children:[c.jsx("thead",{className:"bg-slate-50 dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 text-xs uppercase text-slate-500 font-medium",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-6 py-3 w-48 sticky left-0 bg-slate-50 dark:bg-slate-800 z-10 border-r border-slate-200 dark:border-slate-700",children:"Attribute"}),t.map((h,p)=>c.jsx("th",{className:`px-6 py-3 min-w-[300px] ${p<t.length-1?"border-r border-slate-200 dark:border-slate-700":""}`,children:h.name},h.experiment_id))]})}),c.jsxs("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:[c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Description"}),t.map((h,p)=>c.jsx("td",{className:`px-6 py-3 text-slate-600 ${p<t.length-1?"border-r border-slate-100 dark:border-slate-700":""}`,children:h.description||"-"},h.experiment_id))]}),c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Project"}),t.map((h,p)=>c.jsx("td",{className:`px-6 py-3 text-slate-600 ${p<t.length-1?"border-r border-slate-100 dark:border-slate-700":""}`,children:h.project||"-"},h.experiment_id))]}),c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Pipeline Base"}),t.map((h,p)=>c.jsxs("td",{className:`px-6 py-3 text-slate-600 ${p<t.length-1?"border-r border-slate-100 dark:border-slate-700":""}`,children:[h.pipeline_name||"-",h.pipeline_version&&c.jsxs(jt,{variant:"outline",className:"ml-2",children:["v",h.pipeline_version]})]},h.experiment_id))]})]})]})})]}),c.jsxs("section",{children:[c.jsxs("h2",{className:"text-lg font-bold text-slate-900 dark:text-white mb-4 flex items-center gap-2",children:[c.jsx(Be,{size:18})," Performance Stats"]}),c.jsx(ze,{className:"overflow-hidden",children:c.jsxs("table",{className:"w-full text-sm text-left",children:[c.jsx("thead",{className:"bg-slate-50 dark:bg-slate-800 border-b border-slate-200 dark:border-slate-700 text-xs uppercase text-slate-500 font-medium",children:c.jsxs("tr",{children:[c.jsx("th",{className:"px-6 py-3 w-48 sticky left-0 bg-slate-50 dark:bg-slate-800 z-10 border-r border-slate-200 dark:border-slate-700",children:"Metric"}),t.map((h,p)=>c.jsx("th",{className:`px-6 py-3 min-w-[300px] ${p<t.length-1?"border-r border-slate-200 dark:border-slate-700":""}`,children:h.name},h.experiment_id))]})}),c.jsxs("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:[c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Success Rate"}),t.map((h,p)=>c.jsxs("td",{className:`px-6 py-3 ${p<t.length-1?"border-r border-slate-100 dark:border-slate-700":""} ${h.stats.successRate===d&&h.stats.successRate>0?"text-emerald-600 font-bold":"text-slate-600"}`,children:[h.stats.successRate.toFixed(1),"%",h.stats.successRate===d&&h.stats.successRate>0&&t.length>1&&c.jsx("span",{className:"ml-2 text-xs bg-emerald-100 dark:bg-emerald-900/30 text-emerald-600 px-1.5 py-0.5 rounded-full",children:"Best"})]},h.experiment_id))]}),c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Avg Duration"}),t.map((h,p)=>c.jsxs("td",{className:`px-6 py-3 ${p<t.length-1?"border-r border-slate-100 dark:border-slate-700":""} ${h.stats.avgDuration===f&&h.stats.avgDuration>0?"text-emerald-600 font-bold":"text-slate-600"}`,children:[h.stats.avgDuration.toFixed(1),"s",h.stats.avgDuration===f&&h.stats.avgDuration>0&&t.length>1&&c.jsx("span",{className:"ml-2 text-xs bg-emerald-100 dark:bg-emerald-900/30 text-emerald-600 px-1.5 py-0.5 rounded-full",children:"Fastest"})]},h.experiment_id))]}),c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Total Runs"}),t.map((h,p)=>c.jsx("td",{className:`px-6 py-3 text-slate-600 ${p<t.length-1?"border-r border-slate-100 dark:border-slate-700":""}`,children:h.stats.total},h.experiment_id))]}),c.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-800/50",children:[c.jsx("td",{className:"px-6 py-3 font-medium text-slate-700 dark:text-slate-300 sticky left-0 bg-white dark:bg-slate-900 border-r border-slate-100 dark:border-slate-700",children:"Failures"}),t.map((h,p)=>c.jsx("td",{className:`px-6 py-3 ${p<t.length-1?"border-r border-slate-100 dark:border-slate-700":""} ${h.stats.failed>0?"text-rose-600":"text-emerald-600"}`,children:h.stats.failed},h.experiment_id))]})]})]})})]})]})})]})}const QRe=XV([{path:"/",element:c.jsx(mY,{}),children:[{index:!0,element:c.jsx(kX,{})},{path:"pipelines",element:c.jsx(PX,{})},{path:"runs",element:c.jsx(tbe,{})},{path:"compare",element:c.jsx(XRe,{})},{path:"runs/:runId",element:c.jsx(Hwe,{})},{path:"assets",element:c.jsx(Jwe,{})},{path:"experiments",element:c.jsx(r1e,{})},{path:"experiments/compare",element:c.jsx(ZRe,{})},{path:"experiments/:experimentId",element:c.jsx(n1e,{})},{path:"traces",element:c.jsx(s1e,{})},{path:"projects",element:c.jsx(o1e,{})},{path:"projects/:projectId",element:c.jsx(CRe,{})},{path:"schedules",element:c.jsx(MRe,{})},{path:"observability",element:c.jsx($Re,{})},{path:"leaderboard",element:c.jsx(RRe,{})},{path:"plugins",element:c.jsx(VRe,{})},{path:"settings",element:c.jsx(URe,{})},{path:"tokens",element:c.jsx(HRe,{})}]}]);function JRe(){return c.jsx(hU,{children:c.jsx(mU,{children:c.jsx(_K,{children:c.jsx(aU,{router:QRe})})})})}Pb.createRoot(document.getElementById("root")).render(c.jsx(T.StrictMode,{children:c.jsx(JRe,{})}));
|