@getworkbench/core 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/index.d.ts +665 -0
- package/dist/index.js +2047 -0
- package/dist/index.js.map +1 -0
- package/dist/ui/assets/index.css +1 -0
- package/dist/ui/assets/index.js +454 -0
- package/dist/ui/index.html +32 -0
- package/package.json +81 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
var l$=e=>{throw TypeError(e)};var mS=(e,t,n)=>t.has(e)||l$("Cannot "+n);var te=(e,t,n)=>(mS(e,t,"read from private field"),n?n.call(e):t.get(e)),De=(e,t,n)=>t.has(e)?l$("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ae=(e,t,n,r)=>(mS(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(mS(e,t,"access private method"),n);var Ov=(e,t,n,r)=>({set _(i){Ae(e,t,i,n)},get _(){return te(e,t,r)}});function pie(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var jv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gS={exports:{}},Th={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var u$;function mie(){if(u$)return Th;u$=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,a){var o=null;if(a!==void 0&&(o=""+a),i.key!==void 0&&(o=""+i.key),"key"in i){a={};for(var l in i)l!=="key"&&(a[l]=i[l])}else a=i;return i=a.ref,{$$typeof:e,type:r,key:o,ref:i!==void 0?i:null,props:a}}return Th.Fragment=t,Th.jsx=n,Th.jsxs=n,Th}var c$;function gie(){return c$||(c$=1,gS.exports=mie()),gS.exports}var x=gie(),vS={exports:{}},ze={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var f$;function vie(){if(f$)return ze;f$=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),m=Symbol.iterator;function g(H){return H===null||typeof H!="object"?null:(H=m&&H[m]||H["@@iterator"],typeof H=="function"?H:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,y={};function S(H,V,X){this.props=H,this.context=V,this.refs=y,this.updater=X||b}S.prototype.isReactComponent={},S.prototype.setState=function(H,V){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,V,"setState")},S.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function E(){}E.prototype=S.prototype;function _(H,V,X){this.props=H,this.context=V,this.refs=y,this.updater=X||b}var A=_.prototype=new E;A.constructor=_,w(A,S.prototype),A.isPureReactComponent=!0;var T=Array.isArray;function O(){}var P={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function R(H,V,X){var Y=X.ref;return{$$typeof:e,type:H,key:V,ref:Y!==void 0?Y:null,props:X}}function D(H,V){return R(H.type,V,H.props)}function I(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function k(H){var V={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(X){return V[X]})}var F=/\/+/g;function $(H,V){return typeof H=="object"&&H!==null&&H.key!=null?k(""+H.key):V.toString(36)}function q(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(O,O):(H.status="pending",H.then(function(V){H.status==="pending"&&(H.status="fulfilled",H.value=V)},function(V){H.status==="pending"&&(H.status="rejected",H.reason=V)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function L(H,V,X,Y,G){var Q=typeof H;(Q==="undefined"||Q==="boolean")&&(H=null);var J=!1;if(H===null)J=!0;else switch(Q){case"bigint":case"string":case"number":J=!0;break;case"object":switch(H.$$typeof){case e:case t:J=!0;break;case d:return J=H._init,L(J(H._payload),V,X,Y,G)}}if(J)return G=G(H),J=Y===""?"."+$(H,0):Y,T(G)?(X="",J!=null&&(X=J.replace(F,"$&/")+"/"),L(G,V,X,"",function(fe){return fe})):G!=null&&(I(G)&&(G=D(G,X+(G.key==null||H&&H.key===G.key?"":(""+G.key).replace(F,"$&/")+"/")+J)),V.push(G)),1;J=0;var re=Y===""?".":Y+":";if(T(H))for(var ne=0;ne<H.length;ne++)Y=H[ne],Q=re+$(Y,ne),J+=L(Y,V,X,Q,G);else if(ne=g(H),typeof ne=="function")for(H=ne.call(H),ne=0;!(Y=H.next()).done;)Y=Y.value,Q=re+$(Y,ne++),J+=L(Y,V,X,Q,G);else if(Q==="object"){if(typeof H.then=="function")return L(q(H),V,X,Y,G);throw V=String(H),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return J}function z(H,V,X){if(H==null)return H;var Y=[],G=0;return L(H,Y,"","",function(Q){return V.call(X,Q,G++)}),Y}function U(H){if(H._status===-1){var V=H._result;V=V(),V.then(function(X){(H._status===0||H._status===-1)&&(H._status=1,H._result=X)},function(X){(H._status===0||H._status===-1)&&(H._status=2,H._result=X)}),H._status===-1&&(H._status=0,H._result=V)}if(H._status===1)return H._result.default;throw H._result}var K=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},Z={map:z,forEach:function(H,V,X){z(H,function(){V.apply(this,arguments)},X)},count:function(H){var V=0;return z(H,function(){V++}),V},toArray:function(H){return z(H,function(V){return V})||[]},only:function(H){if(!I(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return ze.Activity=h,ze.Children=Z,ze.Component=S,ze.Fragment=n,ze.Profiler=i,ze.PureComponent=_,ze.StrictMode=r,ze.Suspense=u,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,ze.__COMPILER_RUNTIME={__proto__:null,c:function(H){return P.H.useMemoCache(H)}},ze.cache=function(H){return function(){return H.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(H,V,X){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var Y=w({},H.props),G=H.key;if(V!=null)for(Q in V.key!==void 0&&(G=""+V.key),V)!M.call(V,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&V.ref===void 0||(Y[Q]=V[Q]);var Q=arguments.length-2;if(Q===1)Y.children=X;else if(1<Q){for(var J=Array(Q),re=0;re<Q;re++)J[re]=arguments[re+2];Y.children=J}return R(H.type,G,Y)},ze.createContext=function(H){return H={$$typeof:o,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:a,_context:H},H},ze.createElement=function(H,V,X){var Y,G={},Q=null;if(V!=null)for(Y in V.key!==void 0&&(Q=""+V.key),V)M.call(V,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(G[Y]=V[Y]);var J=arguments.length-2;if(J===1)G.children=X;else if(1<J){for(var re=Array(J),ne=0;ne<J;ne++)re[ne]=arguments[ne+2];G.children=re}if(H&&H.defaultProps)for(Y in J=H.defaultProps,J)G[Y]===void 0&&(G[Y]=J[Y]);return R(H,Q,G)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(H){return{$$typeof:l,render:H}},ze.isValidElement=I,ze.lazy=function(H){return{$$typeof:d,_payload:{_status:-1,_result:H},_init:U}},ze.memo=function(H,V){return{$$typeof:f,type:H,compare:V===void 0?null:V}},ze.startTransition=function(H){var V=P.T,X={};P.T=X;try{var Y=H(),G=P.S;G!==null&&G(X,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(O,K)}catch(Q){K(Q)}finally{V!==null&&X.types!==null&&(V.types=X.types),P.T=V}},ze.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},ze.use=function(H){return P.H.use(H)},ze.useActionState=function(H,V,X){return P.H.useActionState(H,V,X)},ze.useCallback=function(H,V){return P.H.useCallback(H,V)},ze.useContext=function(H){return P.H.useContext(H)},ze.useDebugValue=function(){},ze.useDeferredValue=function(H,V){return P.H.useDeferredValue(H,V)},ze.useEffect=function(H,V){return P.H.useEffect(H,V)},ze.useEffectEvent=function(H){return P.H.useEffectEvent(H)},ze.useId=function(){return P.H.useId()},ze.useImperativeHandle=function(H,V,X){return P.H.useImperativeHandle(H,V,X)},ze.useInsertionEffect=function(H,V){return P.H.useInsertionEffect(H,V)},ze.useLayoutEffect=function(H,V){return P.H.useLayoutEffect(H,V)},ze.useMemo=function(H,V){return P.H.useMemo(H,V)},ze.useOptimistic=function(H,V){return P.H.useOptimistic(H,V)},ze.useReducer=function(H,V,X){return P.H.useReducer(H,V,X)},ze.useRef=function(H){return P.H.useRef(H)},ze.useState=function(H){return P.H.useState(H)},ze.useSyncExternalStore=function(H,V,X){return P.H.useSyncExternalStore(H,V,X)},ze.useTransition=function(){return P.H.useTransition()},ze.version="19.2.5",ze}var d$;function Om(){return d$||(d$=1,vS.exports=vie()),vS.exports}var j=Om();const ie=yt(j),EM=pie({__proto__:null,default:ie},[j]);var yS={exports:{}},Ch={},bS={exports:{}},xS={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var h$;function yie(){return h$||(h$=1,(function(e){function t(L,z){var U=L.length;L.push(z);e:for(;0<U;){var K=U-1>>>1,Z=L[K];if(0<i(Z,z))L[K]=z,L[U]=Z,U=K;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var z=L[0],U=L.pop();if(U!==z){L[0]=U;e:for(var K=0,Z=L.length,H=Z>>>1;K<H;){var V=2*(K+1)-1,X=L[V],Y=V+1,G=L[Y];if(0>i(X,U))Y<Z&&0>i(G,X)?(L[K]=G,L[Y]=U,K=Y):(L[K]=X,L[V]=U,K=V);else if(Y<Z&&0>i(G,U))L[K]=G,L[Y]=U,K=Y;else break e}}return z}function i(L,z){var U=L.sortIndex-z.sortIndex;return U!==0?U:L.id-z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],f=[],d=1,h=null,m=3,g=!1,b=!1,w=!1,y=!1,S=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function A(L){for(var z=n(f);z!==null;){if(z.callback===null)r(f);else if(z.startTime<=L)r(f),z.sortIndex=z.expirationTime,t(u,z);else break;z=n(f)}}function T(L){if(w=!1,A(L),!b)if(n(u)!==null)b=!0,O||(O=!0,k());else{var z=n(f);z!==null&&q(T,z.startTime-L)}}var O=!1,P=-1,M=5,R=-1;function D(){return y?!0:!(e.unstable_now()-R<M)}function I(){if(y=!1,O){var L=e.unstable_now();R=L;var z=!0;try{e:{b=!1,w&&(w=!1,E(P),P=-1),g=!0;var U=m;try{t:{for(A(L),h=n(u);h!==null&&!(h.expirationTime>L&&D());){var K=h.callback;if(typeof K=="function"){h.callback=null,m=h.priorityLevel;var Z=K(h.expirationTime<=L);if(L=e.unstable_now(),typeof Z=="function"){h.callback=Z,A(L),z=!0;break t}h===n(u)&&r(u),A(L)}else r(u);h=n(u)}if(h!==null)z=!0;else{var H=n(f);H!==null&&q(T,H.startTime-L),z=!1}}break e}finally{h=null,m=U,g=!1}z=void 0}}finally{z?k():O=!1}}}var k;if(typeof _=="function")k=function(){_(I)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,$=F.port2;F.port1.onmessage=I,k=function(){$.postMessage(null)}}else k=function(){S(I,0)};function q(L,z){P=S(function(){L(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(L){switch(m){case 1:case 2:case 3:var z=3;break;default:z=m}var U=m;m=z;try{return L()}finally{m=U}},e.unstable_requestPaint=function(){y=!0},e.unstable_runWithPriority=function(L,z){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var U=m;m=L;try{return z()}finally{m=U}},e.unstable_scheduleCallback=function(L,z,U){var K=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?K+U:K):U=K,L){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=U+Z,L={id:d++,callback:z,priorityLevel:L,startTime:U,expirationTime:Z,sortIndex:-1},U>K?(L.sortIndex=U,t(f,L),n(u)===null&&L===n(f)&&(w?(E(P),P=-1):w=!0,q(T,U-K))):(L.sortIndex=Z,t(u,L),b||g||(b=!0,O||(O=!0,k()))),L},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(L){var z=m;return function(){var U=m;m=z;try{return L.apply(this,arguments)}finally{m=U}}}})(xS)),xS}var p$;function bie(){return p$||(p$=1,bS.exports=yie()),bS.exports}var wS={exports:{}},Hn={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var m$;function xie(){if(m$)return Hn;m$=1;var e=Om();function t(u){var f="https://react.dev/errors/"+u;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)f+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+u+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function a(u,f,d){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:h==null?null:""+h,children:u,containerInfo:f,implementation:d}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(u,f){if(u==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Hn.createPortal=function(u,f){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return a(u,f,null,d)},Hn.flushSync=function(u){var f=o.T,d=r.p;try{if(o.T=null,r.p=2,u)return u()}finally{o.T=f,r.p=d,r.d.f()}},Hn.preconnect=function(u,f){typeof u=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(u,f))},Hn.prefetchDNS=function(u){typeof u=="string"&&r.d.D(u)},Hn.preinit=function(u,f){if(typeof u=="string"&&f&&typeof f.as=="string"){var d=f.as,h=l(d,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,g=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;d==="style"?r.d.S(u,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:h,integrity:m,fetchPriority:g}):d==="script"&&r.d.X(u,{crossOrigin:h,integrity:m,fetchPriority:g,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Hn.preinitModule=function(u,f){if(typeof u=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var d=l(f.as,f.crossOrigin);r.d.M(u,{crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(u)},Hn.preload=function(u,f){if(typeof u=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var d=f.as,h=l(d,f.crossOrigin);r.d.L(u,d,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Hn.preloadModule=function(u,f){if(typeof u=="string")if(f){var d=l(f.as,f.crossOrigin);r.d.m(u,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:d,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(u)},Hn.requestFormReset=function(u){r.d.r(u)},Hn.unstable_batchedUpdates=function(u,f){return u(f)},Hn.useFormState=function(u,f,d){return o.H.useFormState(u,f,d)},Hn.useFormStatus=function(){return o.H.useHostTransitionStatus()},Hn.version="19.2.5",Hn}var g$;function w9(){if(g$)return wS.exports;g$=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),wS.exports=xie(),wS.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var v$;function wie(){if(v$)return Ch;v$=1;var e=bie(),t=Om(),n=w9();function r(s){var c="https://react.dev/errors/"+s;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)c+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+s+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function a(s){var c=s,p=s;if(s.alternate)for(;c.return;)c=c.return;else{s=c;do c=s,(c.flags&4098)!==0&&(p=c.return),s=c.return;while(s)}return c.tag===3?p:null}function o(s){if(s.tag===13){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function l(s){if(s.tag===31){var c=s.memoizedState;if(c===null&&(s=s.alternate,s!==null&&(c=s.memoizedState)),c!==null)return c.dehydrated}return null}function u(s){if(a(s)!==s)throw Error(r(188))}function f(s){var c=s.alternate;if(!c){if(c=a(s),c===null)throw Error(r(188));return c!==s?null:s}for(var p=s,v=c;;){var C=p.return;if(C===null)break;var N=C.alternate;if(N===null){if(v=C.return,v!==null){p=v;continue}break}if(C.child===N.child){for(N=C.child;N;){if(N===p)return u(C),s;if(N===v)return u(C),c;N=N.sibling}throw Error(r(188))}if(p.return!==v.return)p=C,v=N;else{for(var B=!1,W=C.child;W;){if(W===p){B=!0,p=C,v=N;break}if(W===v){B=!0,v=C,p=N;break}W=W.sibling}if(!B){for(W=N.child;W;){if(W===p){B=!0,p=N,v=C;break}if(W===v){B=!0,v=N,p=C;break}W=W.sibling}if(!B)throw Error(r(189))}}if(p.alternate!==v)throw Error(r(190))}if(p.tag!==3)throw Error(r(188));return p.stateNode.current===p?s:c}function d(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s;for(s=s.child;s!==null;){if(c=d(s),c!==null)return c;s=s.sibling}return null}var h=Object.assign,m=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),_=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function k(s){return s===null||typeof s!="object"?null:(s=I&&s[I]||s["@@iterator"],typeof s=="function"?s:null)}var F=Symbol.for("react.client.reference");function $(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===F?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case w:return"Fragment";case S:return"Profiler";case y:return"StrictMode";case T:return"Suspense";case O:return"SuspenseList";case R:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case _:return s.displayName||"Context";case E:return(s._context.displayName||"Context")+".Consumer";case A:var c=s.render;return s=s.displayName,s||(s=c.displayName||c.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case P:return c=s.displayName||null,c!==null?c:$(s.type)||"Memo";case M:c=s._payload,s=s._init;try{return $(s(c))}catch{}}return null}var q=Array.isArray,L=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},K=[],Z=-1;function H(s){return{current:s}}function V(s){0>Z||(s.current=K[Z],K[Z]=null,Z--)}function X(s,c){Z++,K[Z]=s.current,s.current=c}var Y=H(null),G=H(null),Q=H(null),J=H(null);function re(s,c){switch(X(Q,c),X(G,s),X(Y,null),c.nodeType){case 9:case 11:s=(s=c.documentElement)&&(s=s.namespaceURI)?PL(s):0;break;default:if(s=c.tagName,c=c.namespaceURI)c=PL(c),s=ML(c,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}V(Y),X(Y,s)}function ne(){V(Y),V(G),V(Q)}function fe(s){s.memoizedState!==null&&X(J,s);var c=Y.current,p=ML(c,s.type);c!==p&&(X(G,s),X(Y,p))}function he(s){G.current===s&&(V(Y),V(G)),J.current===s&&(V(J),Sh._currentValue=U)}var oe,ye;function be(s){if(oe===void 0)try{throw Error()}catch(p){var c=p.stack.trim().match(/\n( *(at )?)/);oe=c&&c[1]||"",ye=-1<p.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<p.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+oe+s+ye}var xe=!1;function Ee(s,c){if(!s||xe)return"";xe=!0;var p=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var v={DetermineComponentFrameRoot:function(){try{if(c){var ve=function(){throw Error()};if(Object.defineProperty(ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ve,[])}catch(de){var ce=de}Reflect.construct(s,[],ve)}else{try{ve.call()}catch(de){ce=de}s.call(ve.prototype)}}else{try{throw Error()}catch(de){ce=de}(ve=s())&&typeof ve.catch=="function"&&ve.catch(function(){})}}catch(de){if(de&&ce&&typeof de.stack=="string")return[de.stack,ce.stack]}return[null,null]}};v.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var C=Object.getOwnPropertyDescriptor(v.DetermineComponentFrameRoot,"name");C&&C.configurable&&Object.defineProperty(v.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=v.DetermineComponentFrameRoot(),B=N[0],W=N[1];if(B&&W){var ee=B.split(`
|
|
44
|
+
`),ue=W.split(`
|
|
45
|
+
`);for(C=v=0;v<ee.length&&!ee[v].includes("DetermineComponentFrameRoot");)v++;for(;C<ue.length&&!ue[C].includes("DetermineComponentFrameRoot");)C++;if(v===ee.length||C===ue.length)for(v=ee.length-1,C=ue.length-1;1<=v&&0<=C&&ee[v]!==ue[C];)C--;for(;1<=v&&0<=C;v--,C--)if(ee[v]!==ue[C]){if(v!==1||C!==1)do if(v--,C--,0>C||ee[v]!==ue[C]){var pe=`
|
|
46
|
+
`+ee[v].replace(" at new "," at ");return s.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",s.displayName)),pe}while(1<=v&&0<=C);break}}}finally{xe=!1,Error.prepareStackTrace=p}return(p=s?s.displayName||s.name:"")?be(p):""}function _e(s,c){switch(s.tag){case 26:case 27:case 5:return be(s.type);case 16:return be("Lazy");case 13:return s.child!==c&&c!==null?be("Suspense Fallback"):be("Suspense");case 19:return be("SuspenseList");case 0:case 15:return Ee(s.type,!1);case 11:return Ee(s.type.render,!1);case 1:return Ee(s.type,!0);case 31:return be("Activity");default:return""}}function tt(s){try{var c="",p=null;do c+=_e(s,p),p=s,s=s.return;while(s);return c}catch(v){return`
|
|
47
|
+
Error generating stack: `+v.message+`
|
|
48
|
+
`+v.stack}}var nt=Object.prototype.hasOwnProperty,It=e.unstable_scheduleCallback,Ut=e.unstable_cancelCallback,Pt=e.unstable_shouldYield,Et=e.unstable_requestPaint,At=e.unstable_now,Ge=e.unstable_getCurrentPriorityLevel,Lt=e.unstable_ImmediatePriority,bn=e.unstable_UserBlockingPriority,Vn=e.unstable_NormalPriority,Bu=e.unstable_LowPriority,wa=e.unstable_IdlePriority,Md=e.log,qu=e.unstable_setDisableYieldValue,Fn=null,Qt=null;function Gi(s){if(typeof Md=="function"&&qu(s),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(Fn,s)}catch{}}var Zn=Math.clz32?Math.clz32:rw,tw=Math.log,nw=Math.LN2;function rw(s){return s>>>=0,s===0?32:31-(tw(s)/nw|0)|0}var zu=256,Vu=262144,Fu=4194304;function Sa(s){var c=s&42;if(c!==0)return c;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Uu(s,c,p){var v=s.pendingLanes;if(v===0)return 0;var C=0,N=s.suspendedLanes,B=s.pingedLanes;s=s.warmLanes;var W=v&134217727;return W!==0?(v=W&~N,v!==0?C=Sa(v):(B&=W,B!==0?C=Sa(B):p||(p=W&~s,p!==0&&(C=Sa(p))))):(W=v&~N,W!==0?C=Sa(W):B!==0?C=Sa(B):p||(p=v&~s,p!==0&&(C=Sa(p)))),C===0?0:c!==0&&c!==C&&(c&N)===0&&(N=C&-C,p=c&-c,N>=p||N===32&&(p&4194048)!==0)?c:C}function sl(s,c){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&c)===0}function iw(s,c){switch(s){case 1:case 2:case 4:case 8:case 64:return c+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return c+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ag(){var s=Fu;return Fu<<=1,(Fu&62914560)===0&&(Fu=4194304),s}function Rd(s){for(var c=[],p=0;31>p;p++)c.push(s);return c}function ll(s,c){s.pendingLanes|=c,c!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function aw(s,c,p,v,C,N){var B=s.pendingLanes;s.pendingLanes=p,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=p,s.entangledLanes&=p,s.errorRecoveryDisabledLanes&=p,s.shellSuspendCounter=0;var W=s.entanglements,ee=s.expirationTimes,ue=s.hiddenUpdates;for(p=B&~p;0<p;){var pe=31-Zn(p),ve=1<<pe;W[pe]=0,ee[pe]=-1;var ce=ue[pe];if(ce!==null)for(ue[pe]=null,pe=0;pe<ce.length;pe++){var de=ce[pe];de!==null&&(de.lane&=-536870913)}p&=~ve}v!==0&&og(s,v,0),N!==0&&C===0&&s.tag!==0&&(s.suspendedLanes|=N&~(B&~c))}function og(s,c,p){s.pendingLanes|=c,s.suspendedLanes&=~c;var v=31-Zn(c);s.entangledLanes|=c,s.entanglements[v]=s.entanglements[v]|1073741824|p&261930}function sg(s,c){var p=s.entangledLanes|=c;for(s=s.entanglements;p;){var v=31-Zn(p),C=1<<v;C&c|s[v]&c&&(s[v]|=c),p&=~C}}function lg(s,c){var p=c&-c;return p=(p&42)!==0?1:kd(p),(p&(s.suspendedLanes|c))!==0?0:p}function kd(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Dd(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function ug(){var s=z.p;return s!==0?s:(s=window.event,s===void 0?32:t$(s.type))}function cg(s,c){var p=z.p;try{return z.p=s,c()}finally{z.p=p}}var Wi=Math.random().toString(36).slice(2),xn="__reactFiber$"+Wi,Un="__reactProps$"+Wi,_a="__reactContainer$"+Wi,Hu="__reactEvents$"+Wi,fg="__reactListeners$"+Wi,ow="__reactHandles$"+Wi,dg="__reactResources$"+Wi,ul="__reactMarker$"+Wi;function Id(s){delete s[xn],delete s[Un],delete s[Hu],delete s[fg],delete s[ow]}function Eo(s){var c=s[xn];if(c)return c;for(var p=s.parentNode;p;){if(c=p[_a]||p[xn]){if(p=c.alternate,c.child!==null||p!==null&&p.child!==null)for(s=BL(s);s!==null;){if(p=s[xn])return p;s=BL(s)}return c}s=p,p=s.parentNode}return null}function Ao(s){if(s=s[xn]||s[_a]){var c=s.tag;if(c===5||c===6||c===13||c===31||c===26||c===27||c===3)return s}return null}function To(s){var c=s.tag;if(c===5||c===26||c===27||c===6)return s.stateNode;throw Error(r(33))}function Co(s){var c=s[dg];return c||(c=s[dg]={hoistableStyles:new Map,hoistableScripts:new Map}),c}function un(s){s[ul]=!0}var hg=new Set,pg={};function Ea(s,c){Oo(s,c),Oo(s+"Capture",c)}function Oo(s,c){for(pg[s]=c,s=0;s<c.length;s++)hg.add(c[s])}var sw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ld={},mg={};function lw(s){return nt.call(mg,s)?!0:nt.call(Ld,s)?!1:sw.test(s)?mg[s]=!0:(Ld[s]=!0,!1)}function Gu(s,c,p){if(lw(c))if(p===null)s.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":s.removeAttribute(c);return;case"boolean":var v=c.toLowerCase().slice(0,5);if(v!=="data-"&&v!=="aria-"){s.removeAttribute(c);return}}s.setAttribute(c,""+p)}}function Wu(s,c,p){if(p===null)s.removeAttribute(c);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(c);return}s.setAttribute(c,""+p)}}function vi(s,c,p,v){if(v===null)s.removeAttribute(p);else{switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(p);return}s.setAttributeNS(c,p,""+v)}}function ur(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function gg(s){var c=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function uw(s,c,p){var v=Object.getOwnPropertyDescriptor(s.constructor.prototype,c);if(!s.hasOwnProperty(c)&&typeof v<"u"&&typeof v.get=="function"&&typeof v.set=="function"){var C=v.get,N=v.set;return Object.defineProperty(s,c,{configurable:!0,get:function(){return C.call(this)},set:function(B){p=""+B,N.call(this,B)}}),Object.defineProperty(s,c,{enumerable:v.enumerable}),{getValue:function(){return p},setValue:function(B){p=""+B},stopTracking:function(){s._valueTracker=null,delete s[c]}}}}function jo(s){if(!s._valueTracker){var c=gg(s)?"checked":"value";s._valueTracker=uw(s,c,""+s[c])}}function vg(s){if(!s)return!1;var c=s._valueTracker;if(!c)return!0;var p=c.getValue(),v="";return s&&(v=gg(s)?s.checked?"true":"false":s.value),s=v,s!==p?(c.setValue(s),!0):!1}function cl(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var cw=/[\n"\\]/g;function cr(s){return s.replace(cw,function(c){return"\\"+c.charCodeAt(0).toString(16)+" "})}function fl(s,c,p,v,C,N,B,W){s.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?s.type=B:s.removeAttribute("type"),c!=null?B==="number"?(c===0&&s.value===""||s.value!=c)&&(s.value=""+ur(c)):s.value!==""+ur(c)&&(s.value=""+ur(c)):B!=="submit"&&B!=="reset"||s.removeAttribute("value"),c!=null?$d(s,B,ur(c)):p!=null?$d(s,B,ur(p)):v!=null&&s.removeAttribute("value"),C==null&&N!=null&&(s.defaultChecked=!!N),C!=null&&(s.checked=C&&typeof C!="function"&&typeof C!="symbol"),W!=null&&typeof W!="function"&&typeof W!="symbol"&&typeof W!="boolean"?s.name=""+ur(W):s.removeAttribute("name")}function yg(s,c,p,v,C,N,B,W){if(N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(s.type=N),c!=null||p!=null){if(!(N!=="submit"&&N!=="reset"||c!=null)){jo(s);return}p=p!=null?""+ur(p):"",c=c!=null?""+ur(c):p,W||c===s.value||(s.value=c),s.defaultValue=c}v=v??C,v=typeof v!="function"&&typeof v!="symbol"&&!!v,s.checked=W?s.checked:!!v,s.defaultChecked=!!v,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(s.name=B),jo(s)}function $d(s,c,p){c==="number"&&cl(s.ownerDocument)===s||s.defaultValue===""+p||(s.defaultValue=""+p)}function Aa(s,c,p,v){if(s=s.options,c){c={};for(var C=0;C<p.length;C++)c["$"+p[C]]=!0;for(p=0;p<s.length;p++)C=c.hasOwnProperty("$"+s[p].value),s[p].selected!==C&&(s[p].selected=C),C&&v&&(s[p].defaultSelected=!0)}else{for(p=""+ur(p),c=null,C=0;C<s.length;C++){if(s[C].value===p){s[C].selected=!0,v&&(s[C].defaultSelected=!0);return}c!==null||s[C].disabled||(c=s[C])}c!==null&&(c.selected=!0)}}function Tk(s,c,p){if(c!=null&&(c=""+ur(c),c!==s.value&&(s.value=c),p==null)){s.defaultValue!==c&&(s.defaultValue=c);return}s.defaultValue=p!=null?""+ur(p):""}function Ck(s,c,p,v){if(c==null){if(v!=null){if(p!=null)throw Error(r(92));if(q(v)){if(1<v.length)throw Error(r(93));v=v[0]}p=v}p==null&&(p=""),c=p}p=ur(c),s.defaultValue=p,v=s.textContent,v===p&&v!==""&&v!==null&&(s.value=v),jo(s)}function Ku(s,c){if(c){var p=s.firstChild;if(p&&p===s.lastChild&&p.nodeType===3){p.nodeValue=c;return}}s.textContent=c}var une=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ok(s,c,p){var v=c.indexOf("--")===0;p==null||typeof p=="boolean"||p===""?v?s.setProperty(c,""):c==="float"?s.cssFloat="":s[c]="":v?s.setProperty(c,p):typeof p!="number"||p===0||une.has(c)?c==="float"?s.cssFloat=p:s[c]=(""+p).trim():s[c]=p+"px"}function jk(s,c,p){if(c!=null&&typeof c!="object")throw Error(r(62));if(s=s.style,p!=null){for(var v in p)!p.hasOwnProperty(v)||c!=null&&c.hasOwnProperty(v)||(v.indexOf("--")===0?s.setProperty(v,""):v==="float"?s.cssFloat="":s[v]="");for(var C in c)v=c[C],c.hasOwnProperty(C)&&p[C]!==v&&Ok(s,C,v)}else for(var N in c)c.hasOwnProperty(N)&&Ok(s,N,c[N])}function fw(s){if(s.indexOf("-")===-1)return!1;switch(s){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 cne=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),fne=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function bg(s){return fne.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function Ta(){}var dw=null;function hw(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Yu=null,Xu=null;function Nk(s){var c=Ao(s);if(c&&(s=c.stateNode)){var p=s[Un]||null;e:switch(s=c.stateNode,c.type){case"input":if(fl(s,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name),c=p.name,p.type==="radio"&&c!=null){for(p=s;p.parentNode;)p=p.parentNode;for(p=p.querySelectorAll('input[name="'+cr(""+c)+'"][type="radio"]'),c=0;c<p.length;c++){var v=p[c];if(v!==s&&v.form===s.form){var C=v[Un]||null;if(!C)throw Error(r(90));fl(v,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(c=0;c<p.length;c++)v=p[c],v.form===s.form&&vg(v)}break e;case"textarea":Tk(s,p.value,p.defaultValue);break e;case"select":c=p.value,c!=null&&Aa(s,!!p.multiple,c,!1)}}}var pw=!1;function Pk(s,c,p){if(pw)return s(c,p);pw=!0;try{var v=s(c);return v}finally{if(pw=!1,(Yu!==null||Xu!==null)&&(ov(),Yu&&(c=Yu,s=Xu,Xu=Yu=null,Nk(c),s)))for(c=0;c<s.length;c++)Nk(s[c])}}function Bd(s,c){var p=s.stateNode;if(p===null)return null;var v=p[Un]||null;if(v===null)return null;p=v[c];e:switch(c){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(v=!v.disabled)||(s=s.type,v=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!v;break e;default:s=!1}if(s)return null;if(p&&typeof p!="function")throw Error(r(231,c,typeof p));return p}var Ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mw=!1;if(Ca)try{var qd={};Object.defineProperty(qd,"passive",{get:function(){mw=!0}}),window.addEventListener("test",qd,qd),window.removeEventListener("test",qd,qd)}catch{mw=!1}var No=null,gw=null,xg=null;function Mk(){if(xg)return xg;var s,c=gw,p=c.length,v,C="value"in No?No.value:No.textContent,N=C.length;for(s=0;s<p&&c[s]===C[s];s++);var B=p-s;for(v=1;v<=B&&c[p-v]===C[N-v];v++);return xg=C.slice(s,1<v?1-v:void 0)}function wg(s){var c=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&c===13&&(s=13)):s=c,s===10&&(s=13),32<=s||s===13?s:0}function Sg(){return!0}function Rk(){return!1}function fr(s){function c(p,v,C,N,B){this._reactName=p,this._targetInst=C,this.type=v,this.nativeEvent=N,this.target=B,this.currentTarget=null;for(var W in s)s.hasOwnProperty(W)&&(p=s[W],this[W]=p?p(N):N[W]);return this.isDefaultPrevented=(N.defaultPrevented!=null?N.defaultPrevented:N.returnValue===!1)?Sg:Rk,this.isPropagationStopped=Rk,this}return h(c.prototype,{preventDefault:function(){this.defaultPrevented=!0;var p=this.nativeEvent;p&&(p.preventDefault?p.preventDefault():typeof p.returnValue!="unknown"&&(p.returnValue=!1),this.isDefaultPrevented=Sg)},stopPropagation:function(){var p=this.nativeEvent;p&&(p.stopPropagation?p.stopPropagation():typeof p.cancelBubble!="unknown"&&(p.cancelBubble=!0),this.isPropagationStopped=Sg)},persist:function(){},isPersistent:Sg}),c}var dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},_g=fr(dl),zd=h({},dl,{view:0,detail:0}),dne=fr(zd),vw,yw,Vd,Eg=h({},zd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xw,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Vd&&(Vd&&s.type==="mousemove"?(vw=s.screenX-Vd.screenX,yw=s.screenY-Vd.screenY):yw=vw=0,Vd=s),vw)},movementY:function(s){return"movementY"in s?s.movementY:yw}}),kk=fr(Eg),hne=h({},Eg,{dataTransfer:0}),pne=fr(hne),mne=h({},zd,{relatedTarget:0}),bw=fr(mne),gne=h({},dl,{animationName:0,elapsedTime:0,pseudoElement:0}),vne=fr(gne),yne=h({},dl,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),bne=fr(yne),xne=h({},dl,{data:0}),Dk=fr(xne),wne={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sne={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"},_ne={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ene(s){var c=this.nativeEvent;return c.getModifierState?c.getModifierState(s):(s=_ne[s])?!!c[s]:!1}function xw(){return Ene}var Ane=h({},zd,{key:function(s){if(s.key){var c=wne[s.key]||s.key;if(c!=="Unidentified")return c}return s.type==="keypress"?(s=wg(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Sne[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xw,charCode:function(s){return s.type==="keypress"?wg(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?wg(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Tne=fr(Ane),Cne=h({},Eg,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ik=fr(Cne),One=h({},zd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xw}),jne=fr(One),Nne=h({},dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pne=fr(Nne),Mne=h({},Eg,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Rne=fr(Mne),kne=h({},dl,{newState:0,oldState:0}),Dne=fr(kne),Ine=[9,13,27,32],ww=Ca&&"CompositionEvent"in window,Fd=null;Ca&&"documentMode"in document&&(Fd=document.documentMode);var Lne=Ca&&"TextEvent"in window&&!Fd,Lk=Ca&&(!ww||Fd&&8<Fd&&11>=Fd),$k=" ",Bk=!1;function qk(s,c){switch(s){case"keyup":return Ine.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zk(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Zu=!1;function $ne(s,c){switch(s){case"compositionend":return zk(c);case"keypress":return c.which!==32?null:(Bk=!0,$k);case"textInput":return s=c.data,s===$k&&Bk?null:s;default:return null}}function Bne(s,c){if(Zu)return s==="compositionend"||!ww&&qk(s,c)?(s=Mk(),xg=gw=No=null,Zu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1<c.char.length)return c.char;if(c.which)return String.fromCharCode(c.which)}return null;case"compositionend":return Lk&&c.locale!=="ko"?null:c.data;default:return null}}var qne={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 Vk(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c==="input"?!!qne[s.type]:c==="textarea"}function Fk(s,c,p,v){Yu?Xu?Xu.push(v):Xu=[v]:Yu=v,c=hv(c,"onChange"),0<c.length&&(p=new _g("onChange","change",null,p,v),s.push({event:p,listeners:c}))}var Ud=null,Hd=null;function zne(s){AL(s,0)}function Ag(s){var c=To(s);if(vg(c))return s}function Uk(s,c){if(s==="change")return c}var Hk=!1;if(Ca){var Sw;if(Ca){var _w="oninput"in document;if(!_w){var Gk=document.createElement("div");Gk.setAttribute("oninput","return;"),_w=typeof Gk.oninput=="function"}Sw=_w}else Sw=!1;Hk=Sw&&(!document.documentMode||9<document.documentMode)}function Wk(){Ud&&(Ud.detachEvent("onpropertychange",Kk),Hd=Ud=null)}function Kk(s){if(s.propertyName==="value"&&Ag(Hd)){var c=[];Fk(c,Hd,s,hw(s)),Pk(zne,c)}}function Vne(s,c,p){s==="focusin"?(Wk(),Ud=c,Hd=p,Ud.attachEvent("onpropertychange",Kk)):s==="focusout"&&Wk()}function Fne(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Ag(Hd)}function Une(s,c){if(s==="click")return Ag(c)}function Hne(s,c){if(s==="input"||s==="change")return Ag(c)}function Gne(s,c){return s===c&&(s!==0||1/s===1/c)||s!==s&&c!==c}var Tr=typeof Object.is=="function"?Object.is:Gne;function Gd(s,c){if(Tr(s,c))return!0;if(typeof s!="object"||s===null||typeof c!="object"||c===null)return!1;var p=Object.keys(s),v=Object.keys(c);if(p.length!==v.length)return!1;for(v=0;v<p.length;v++){var C=p[v];if(!nt.call(c,C)||!Tr(s[C],c[C]))return!1}return!0}function Yk(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Xk(s,c){var p=Yk(s);s=0;for(var v;p;){if(p.nodeType===3){if(v=s+p.textContent.length,s<=c&&v>=c)return{node:p,offset:c-s};s=v}e:{for(;p;){if(p.nextSibling){p=p.nextSibling;break e}p=p.parentNode}p=void 0}p=Yk(p)}}function Zk(s,c){return s&&c?s===c?!0:s&&s.nodeType===3?!1:c&&c.nodeType===3?Zk(s,c.parentNode):"contains"in s?s.contains(c):s.compareDocumentPosition?!!(s.compareDocumentPosition(c)&16):!1:!1}function Qk(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var c=cl(s.document);c instanceof s.HTMLIFrameElement;){try{var p=typeof c.contentWindow.location.href=="string"}catch{p=!1}if(p)s=c.contentWindow;else break;c=cl(s.document)}return c}function Ew(s){var c=s&&s.nodeName&&s.nodeName.toLowerCase();return c&&(c==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||c==="textarea"||s.contentEditable==="true")}var Wne=Ca&&"documentMode"in document&&11>=document.documentMode,Qu=null,Aw=null,Wd=null,Tw=!1;function Jk(s,c,p){var v=p.window===p?p.document:p.nodeType===9?p:p.ownerDocument;Tw||Qu==null||Qu!==cl(v)||(v=Qu,"selectionStart"in v&&Ew(v)?v={start:v.selectionStart,end:v.selectionEnd}:(v=(v.ownerDocument&&v.ownerDocument.defaultView||window).getSelection(),v={anchorNode:v.anchorNode,anchorOffset:v.anchorOffset,focusNode:v.focusNode,focusOffset:v.focusOffset}),Wd&&Gd(Wd,v)||(Wd=v,v=hv(Aw,"onSelect"),0<v.length&&(c=new _g("onSelect","select",null,c,p),s.push({event:c,listeners:v}),c.target=Qu)))}function hl(s,c){var p={};return p[s.toLowerCase()]=c.toLowerCase(),p["Webkit"+s]="webkit"+c,p["Moz"+s]="moz"+c,p}var Ju={animationend:hl("Animation","AnimationEnd"),animationiteration:hl("Animation","AnimationIteration"),animationstart:hl("Animation","AnimationStart"),transitionrun:hl("Transition","TransitionRun"),transitionstart:hl("Transition","TransitionStart"),transitioncancel:hl("Transition","TransitionCancel"),transitionend:hl("Transition","TransitionEnd")},Cw={},eD={};Ca&&(eD=document.createElement("div").style,"AnimationEvent"in window||(delete Ju.animationend.animation,delete Ju.animationiteration.animation,delete Ju.animationstart.animation),"TransitionEvent"in window||delete Ju.transitionend.transition);function pl(s){if(Cw[s])return Cw[s];if(!Ju[s])return s;var c=Ju[s],p;for(p in c)if(c.hasOwnProperty(p)&&p in eD)return Cw[s]=c[p];return s}var tD=pl("animationend"),nD=pl("animationiteration"),rD=pl("animationstart"),Kne=pl("transitionrun"),Yne=pl("transitionstart"),Xne=pl("transitioncancel"),iD=pl("transitionend"),aD=new Map,Ow="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Ow.push("scrollEnd");function yi(s,c){aD.set(s,c),Ea(c,[s])}var Tg=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var c=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(c))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},Hr=[],ec=0,jw=0;function Cg(){for(var s=ec,c=jw=ec=0;c<s;){var p=Hr[c];Hr[c++]=null;var v=Hr[c];Hr[c++]=null;var C=Hr[c];Hr[c++]=null;var N=Hr[c];if(Hr[c++]=null,v!==null&&C!==null){var B=v.pending;B===null?C.next=C:(C.next=B.next,B.next=C),v.pending=C}N!==0&&oD(p,C,N)}}function Og(s,c,p,v){Hr[ec++]=s,Hr[ec++]=c,Hr[ec++]=p,Hr[ec++]=v,jw|=v,s.lanes|=v,s=s.alternate,s!==null&&(s.lanes|=v)}function Nw(s,c,p,v){return Og(s,c,p,v),jg(s)}function ml(s,c){return Og(s,null,null,c),jg(s)}function oD(s,c,p){s.lanes|=p;var v=s.alternate;v!==null&&(v.lanes|=p);for(var C=!1,N=s.return;N!==null;)N.childLanes|=p,v=N.alternate,v!==null&&(v.childLanes|=p),N.tag===22&&(s=N.stateNode,s===null||s._visibility&1||(C=!0)),s=N,N=N.return;return s.tag===3?(N=s.stateNode,C&&c!==null&&(C=31-Zn(p),s=N.hiddenUpdates,v=s[C],v===null?s[C]=[c]:v.push(c),c.lane=p|536870912),N):null}function jg(s){if(50<mh)throw mh=0,B1=null,Error(r(185));for(var c=s.return;c!==null;)s=c,c=s.return;return s.tag===3?s.stateNode:null}var tc={};function Zne(s,c,p,v){this.tag=s,this.key=p,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=v,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cr(s,c,p,v){return new Zne(s,c,p,v)}function Pw(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Oa(s,c){var p=s.alternate;return p===null?(p=Cr(s.tag,c,s.key,s.mode),p.elementType=s.elementType,p.type=s.type,p.stateNode=s.stateNode,p.alternate=s,s.alternate=p):(p.pendingProps=c,p.type=s.type,p.flags=0,p.subtreeFlags=0,p.deletions=null),p.flags=s.flags&65011712,p.childLanes=s.childLanes,p.lanes=s.lanes,p.child=s.child,p.memoizedProps=s.memoizedProps,p.memoizedState=s.memoizedState,p.updateQueue=s.updateQueue,c=s.dependencies,p.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},p.sibling=s.sibling,p.index=s.index,p.ref=s.ref,p.refCleanup=s.refCleanup,p}function sD(s,c){s.flags&=65011714;var p=s.alternate;return p===null?(s.childLanes=0,s.lanes=c,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=p.childLanes,s.lanes=p.lanes,s.child=p.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=p.memoizedProps,s.memoizedState=p.memoizedState,s.updateQueue=p.updateQueue,s.type=p.type,c=p.dependencies,s.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext}),s}function Ng(s,c,p,v,C,N){var B=0;if(v=s,typeof s=="function")Pw(s)&&(B=1);else if(typeof s=="string")B=nie(s,p,Y.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case R:return s=Cr(31,p,c,C),s.elementType=R,s.lanes=N,s;case w:return gl(p.children,C,N,c);case y:B=8,C|=24;break;case S:return s=Cr(12,p,c,C|2),s.elementType=S,s.lanes=N,s;case T:return s=Cr(13,p,c,C),s.elementType=T,s.lanes=N,s;case O:return s=Cr(19,p,c,C),s.elementType=O,s.lanes=N,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case _:B=10;break e;case E:B=9;break e;case A:B=11;break e;case P:B=14;break e;case M:B=16,v=null;break e}B=29,p=Error(r(130,s===null?"null":typeof s,"")),v=null}return c=Cr(B,p,c,C),c.elementType=s,c.type=v,c.lanes=N,c}function gl(s,c,p,v){return s=Cr(7,s,v,c),s.lanes=p,s}function Mw(s,c,p){return s=Cr(6,s,null,c),s.lanes=p,s}function lD(s){var c=Cr(18,null,null,0);return c.stateNode=s,c}function Rw(s,c,p){return c=Cr(4,s.children!==null?s.children:[],s.key,c),c.lanes=p,c.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},c}var uD=new WeakMap;function Gr(s,c){if(typeof s=="object"&&s!==null){var p=uD.get(s);return p!==void 0?p:(c={value:s,source:c,stack:tt(c)},uD.set(s,c),c)}return{value:s,source:c,stack:tt(c)}}var nc=[],rc=0,Pg=null,Kd=0,Wr=[],Kr=0,Po=null,Ki=1,Yi="";function ja(s,c){nc[rc++]=Kd,nc[rc++]=Pg,Pg=s,Kd=c}function cD(s,c,p){Wr[Kr++]=Ki,Wr[Kr++]=Yi,Wr[Kr++]=Po,Po=s;var v=Ki;s=Yi;var C=32-Zn(v)-1;v&=~(1<<C),p+=1;var N=32-Zn(c)+C;if(30<N){var B=C-C%5;N=(v&(1<<B)-1).toString(32),v>>=B,C-=B,Ki=1<<32-Zn(c)+C|p<<C|v,Yi=N+s}else Ki=1<<N|p<<C|v,Yi=s}function kw(s){s.return!==null&&(ja(s,1),cD(s,1,0))}function Dw(s){for(;s===Pg;)Pg=nc[--rc],nc[rc]=null,Kd=nc[--rc],nc[rc]=null;for(;s===Po;)Po=Wr[--Kr],Wr[Kr]=null,Yi=Wr[--Kr],Wr[Kr]=null,Ki=Wr[--Kr],Wr[Kr]=null}function fD(s,c){Wr[Kr++]=Ki,Wr[Kr++]=Yi,Wr[Kr++]=Po,Ki=c.id,Yi=c.overflow,Po=s}var Rn=null,Bt=null,st=!1,Mo=null,Yr=!1,Iw=Error(r(519));function Ro(s){var c=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yd(Gr(c,s)),Iw}function dD(s){var c=s.stateNode,p=s.type,v=s.memoizedProps;switch(c[xn]=s,c[Un]=v,p){case"dialog":Je("cancel",c),Je("close",c);break;case"iframe":case"object":case"embed":Je("load",c);break;case"video":case"audio":for(p=0;p<vh.length;p++)Je(vh[p],c);break;case"source":Je("error",c);break;case"img":case"image":case"link":Je("error",c),Je("load",c);break;case"details":Je("toggle",c);break;case"input":Je("invalid",c),yg(c,v.value,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name,!0);break;case"select":Je("invalid",c);break;case"textarea":Je("invalid",c),Ck(c,v.value,v.defaultValue,v.children)}p=v.children,typeof p!="string"&&typeof p!="number"&&typeof p!="bigint"||c.textContent===""+p||v.suppressHydrationWarning===!0||jL(c.textContent,p)?(v.popover!=null&&(Je("beforetoggle",c),Je("toggle",c)),v.onScroll!=null&&Je("scroll",c),v.onScrollEnd!=null&&Je("scrollend",c),v.onClick!=null&&(c.onclick=Ta),c=!0):c=!1,c||Ro(s,!0)}function hD(s){for(Rn=s.return;Rn;)switch(Rn.tag){case 5:case 31:case 13:Yr=!1;return;case 27:case 3:Yr=!0;return;default:Rn=Rn.return}}function ic(s){if(s!==Rn)return!1;if(!st)return hD(s),st=!0,!1;var c=s.tag,p;if((p=c!==3&&c!==27)&&((p=c===5)&&(p=s.type,p=!(p!=="form"&&p!=="button")||eS(s.type,s.memoizedProps)),p=!p),p&&Bt&&Ro(s),hD(s),c===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Bt=$L(s)}else if(c===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Bt=$L(s)}else c===27?(c=Bt,Wo(s.type)?(s=aS,aS=null,Bt=s):Bt=c):Bt=Rn?Zr(s.stateNode.nextSibling):null;return!0}function vl(){Bt=Rn=null,st=!1}function Lw(){var s=Mo;return s!==null&&(mr===null?mr=s:mr.push.apply(mr,s),Mo=null),s}function Yd(s){Mo===null?Mo=[s]:Mo.push(s)}var $w=H(null),yl=null,Na=null;function ko(s,c,p){X($w,c._currentValue),c._currentValue=p}function Pa(s){s._currentValue=$w.current,V($w)}function Bw(s,c,p){for(;s!==null;){var v=s.alternate;if((s.childLanes&c)!==c?(s.childLanes|=c,v!==null&&(v.childLanes|=c)):v!==null&&(v.childLanes&c)!==c&&(v.childLanes|=c),s===p)break;s=s.return}}function qw(s,c,p,v){var C=s.child;for(C!==null&&(C.return=s);C!==null;){var N=C.dependencies;if(N!==null){var B=C.child;N=N.firstContext;e:for(;N!==null;){var W=N;N=C;for(var ee=0;ee<c.length;ee++)if(W.context===c[ee]){N.lanes|=p,W=N.alternate,W!==null&&(W.lanes|=p),Bw(N.return,p,s),v||(B=null);break e}N=W.next}}else if(C.tag===18){if(B=C.return,B===null)throw Error(r(341));B.lanes|=p,N=B.alternate,N!==null&&(N.lanes|=p),Bw(B,p,s),B=null}else B=C.child;if(B!==null)B.return=C;else for(B=C;B!==null;){if(B===s){B=null;break}if(C=B.sibling,C!==null){C.return=B.return,B=C;break}B=B.return}C=B}}function ac(s,c,p,v){s=null;for(var C=c,N=!1;C!==null;){if(!N){if((C.flags&524288)!==0)N=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var B=C.alternate;if(B===null)throw Error(r(387));if(B=B.memoizedProps,B!==null){var W=C.type;Tr(C.pendingProps.value,B.value)||(s!==null?s.push(W):s=[W])}}else if(C===J.current){if(B=C.alternate,B===null)throw Error(r(387));B.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(s!==null?s.push(Sh):s=[Sh])}C=C.return}s!==null&&qw(c,s,p,v),c.flags|=262144}function Mg(s){for(s=s.firstContext;s!==null;){if(!Tr(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function bl(s){yl=s,Na=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function kn(s){return pD(yl,s)}function Rg(s,c){return yl===null&&bl(s),pD(s,c)}function pD(s,c){var p=c._currentValue;if(c={context:c,memoizedValue:p,next:null},Na===null){if(s===null)throw Error(r(308));Na=c,s.dependencies={lanes:0,firstContext:c},s.flags|=524288}else Na=Na.next=c;return p}var Qne=typeof AbortController<"u"?AbortController:function(){var s=[],c=this.signal={aborted:!1,addEventListener:function(p,v){s.push(v)}};this.abort=function(){c.aborted=!0,s.forEach(function(p){return p()})}},Jne=e.unstable_scheduleCallback,ere=e.unstable_NormalPriority,cn={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zw(){return{controller:new Qne,data:new Map,refCount:0}}function Xd(s){s.refCount--,s.refCount===0&&Jne(ere,function(){s.controller.abort()})}var Zd=null,Vw=0,oc=0,sc=null;function tre(s,c){if(Zd===null){var p=Zd=[];Vw=0,oc=H1(),sc={status:"pending",value:void 0,then:function(v){p.push(v)}}}return Vw++,c.then(mD,mD),c}function mD(){if(--Vw===0&&Zd!==null){sc!==null&&(sc.status="fulfilled");var s=Zd;Zd=null,oc=0,sc=null;for(var c=0;c<s.length;c++)(0,s[c])()}}function nre(s,c){var p=[],v={status:"pending",value:null,reason:null,then:function(C){p.push(C)}};return s.then(function(){v.status="fulfilled",v.value=c;for(var C=0;C<p.length;C++)(0,p[C])(c)},function(C){for(v.status="rejected",v.reason=C,C=0;C<p.length;C++)(0,p[C])(void 0)}),v}var gD=L.S;L.S=function(s,c){JI=At(),typeof c=="object"&&c!==null&&typeof c.then=="function"&&tre(s,c),gD!==null&&gD(s,c)};var xl=H(null);function Fw(){var s=xl.current;return s!==null?s:Mt.pooledCache}function kg(s,c){c===null?X(xl,xl.current):X(xl,c.pool)}function vD(){var s=Fw();return s===null?null:{parent:cn._currentValue,pool:s}}var lc=Error(r(460)),Uw=Error(r(474)),Dg=Error(r(542)),Ig={then:function(){}};function yD(s){return s=s.status,s==="fulfilled"||s==="rejected"}function bD(s,c,p){switch(p=s[p],p===void 0?s.push(c):p!==c&&(c.then(Ta,Ta),c=p),c.status){case"fulfilled":return c.value;case"rejected":throw s=c.reason,wD(s),s;default:if(typeof c.status=="string")c.then(Ta,Ta);else{if(s=Mt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=c,s.status="pending",s.then(function(v){if(c.status==="pending"){var C=c;C.status="fulfilled",C.value=v}},function(v){if(c.status==="pending"){var C=c;C.status="rejected",C.reason=v}})}switch(c.status){case"fulfilled":return c.value;case"rejected":throw s=c.reason,wD(s),s}throw Sl=c,lc}}function wl(s){try{var c=s._init;return c(s._payload)}catch(p){throw p!==null&&typeof p=="object"&&typeof p.then=="function"?(Sl=p,lc):p}}var Sl=null;function xD(){if(Sl===null)throw Error(r(459));var s=Sl;return Sl=null,s}function wD(s){if(s===lc||s===Dg)throw Error(r(483))}var uc=null,Qd=0;function Lg(s){var c=Qd;return Qd+=1,uc===null&&(uc=[]),bD(uc,s,c)}function Jd(s,c){c=c.props.ref,s.ref=c!==void 0?c:null}function $g(s,c){throw c.$$typeof===m?Error(r(525)):(s=Object.prototype.toString.call(c),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(c).join(", ")+"}":s)))}function SD(s){function c(se,ae){if(s){var le=se.deletions;le===null?(se.deletions=[ae],se.flags|=16):le.push(ae)}}function p(se,ae){if(!s)return null;for(;ae!==null;)c(se,ae),ae=ae.sibling;return null}function v(se){for(var ae=new Map;se!==null;)se.key!==null?ae.set(se.key,se):ae.set(se.index,se),se=se.sibling;return ae}function C(se,ae){return se=Oa(se,ae),se.index=0,se.sibling=null,se}function N(se,ae,le){return se.index=le,s?(le=se.alternate,le!==null?(le=le.index,le<ae?(se.flags|=67108866,ae):le):(se.flags|=67108866,ae)):(se.flags|=1048576,ae)}function B(se){return s&&se.alternate===null&&(se.flags|=67108866),se}function W(se,ae,le,ge){return ae===null||ae.tag!==6?(ae=Mw(le,se.mode,ge),ae.return=se,ae):(ae=C(ae,le),ae.return=se,ae)}function ee(se,ae,le,ge){var Le=le.type;return Le===w?pe(se,ae,le.props.children,ge,le.key):ae!==null&&(ae.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===M&&wl(Le)===ae.type)?(ae=C(ae,le.props),Jd(ae,le),ae.return=se,ae):(ae=Ng(le.type,le.key,le.props,null,se.mode,ge),Jd(ae,le),ae.return=se,ae)}function ue(se,ae,le,ge){return ae===null||ae.tag!==4||ae.stateNode.containerInfo!==le.containerInfo||ae.stateNode.implementation!==le.implementation?(ae=Rw(le,se.mode,ge),ae.return=se,ae):(ae=C(ae,le.children||[]),ae.return=se,ae)}function pe(se,ae,le,ge,Le){return ae===null||ae.tag!==7?(ae=gl(le,se.mode,ge,Le),ae.return=se,ae):(ae=C(ae,le),ae.return=se,ae)}function ve(se,ae,le){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return ae=Mw(""+ae,se.mode,le),ae.return=se,ae;if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case g:return le=Ng(ae.type,ae.key,ae.props,null,se.mode,le),Jd(le,ae),le.return=se,le;case b:return ae=Rw(ae,se.mode,le),ae.return=se,ae;case M:return ae=wl(ae),ve(se,ae,le)}if(q(ae)||k(ae))return ae=gl(ae,se.mode,le,null),ae.return=se,ae;if(typeof ae.then=="function")return ve(se,Lg(ae),le);if(ae.$$typeof===_)return ve(se,Rg(se,ae),le);$g(se,ae)}return null}function ce(se,ae,le,ge){var Le=ae!==null?ae.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Le!==null?null:W(se,ae,""+le,ge);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case g:return le.key===Le?ee(se,ae,le,ge):null;case b:return le.key===Le?ue(se,ae,le,ge):null;case M:return le=wl(le),ce(se,ae,le,ge)}if(q(le)||k(le))return Le!==null?null:pe(se,ae,le,ge,null);if(typeof le.then=="function")return ce(se,ae,Lg(le),ge);if(le.$$typeof===_)return ce(se,ae,Rg(se,le),ge);$g(se,le)}return null}function de(se,ae,le,ge,Le){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return se=se.get(le)||null,W(ae,se,""+ge,Le);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case g:return se=se.get(ge.key===null?le:ge.key)||null,ee(ae,se,ge,Le);case b:return se=se.get(ge.key===null?le:ge.key)||null,ue(ae,se,ge,Le);case M:return ge=wl(ge),de(se,ae,le,ge,Le)}if(q(ge)||k(ge))return se=se.get(le)||null,pe(ae,se,ge,Le,null);if(typeof ge.then=="function")return de(se,ae,le,Lg(ge),Le);if(ge.$$typeof===_)return de(se,ae,le,Rg(ae,ge),Le);$g(ae,ge)}return null}function je(se,ae,le,ge){for(var Le=null,ht=null,Me=ae,We=ae=0,it=null;Me!==null&&We<le.length;We++){Me.index>We?(it=Me,Me=null):it=Me.sibling;var pt=ce(se,Me,le[We],ge);if(pt===null){Me===null&&(Me=it);break}s&&Me&&pt.alternate===null&&c(se,Me),ae=N(pt,ae,We),ht===null?Le=pt:ht.sibling=pt,ht=pt,Me=it}if(We===le.length)return p(se,Me),st&&ja(se,We),Le;if(Me===null){for(;We<le.length;We++)Me=ve(se,le[We],ge),Me!==null&&(ae=N(Me,ae,We),ht===null?Le=Me:ht.sibling=Me,ht=Me);return st&&ja(se,We),Le}for(Me=v(Me);We<le.length;We++)it=de(Me,se,We,le[We],ge),it!==null&&(s&&it.alternate!==null&&Me.delete(it.key===null?We:it.key),ae=N(it,ae,We),ht===null?Le=it:ht.sibling=it,ht=it);return s&&Me.forEach(function(Qo){return c(se,Qo)}),st&&ja(se,We),Le}function $e(se,ae,le,ge){if(le==null)throw Error(r(151));for(var Le=null,ht=null,Me=ae,We=ae=0,it=null,pt=le.next();Me!==null&&!pt.done;We++,pt=le.next()){Me.index>We?(it=Me,Me=null):it=Me.sibling;var Qo=ce(se,Me,pt.value,ge);if(Qo===null){Me===null&&(Me=it);break}s&&Me&&Qo.alternate===null&&c(se,Me),ae=N(Qo,ae,We),ht===null?Le=Qo:ht.sibling=Qo,ht=Qo,Me=it}if(pt.done)return p(se,Me),st&&ja(se,We),Le;if(Me===null){for(;!pt.done;We++,pt=le.next())pt=ve(se,pt.value,ge),pt!==null&&(ae=N(pt,ae,We),ht===null?Le=pt:ht.sibling=pt,ht=pt);return st&&ja(se,We),Le}for(Me=v(Me);!pt.done;We++,pt=le.next())pt=de(Me,se,We,pt.value,ge),pt!==null&&(s&&pt.alternate!==null&&Me.delete(pt.key===null?We:pt.key),ae=N(pt,ae,We),ht===null?Le=pt:ht.sibling=pt,ht=pt);return s&&Me.forEach(function(hie){return c(se,hie)}),st&&ja(se,We),Le}function Ot(se,ae,le,ge){if(typeof le=="object"&&le!==null&&le.type===w&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case g:e:{for(var Le=le.key;ae!==null;){if(ae.key===Le){if(Le=le.type,Le===w){if(ae.tag===7){p(se,ae.sibling),ge=C(ae,le.props.children),ge.return=se,se=ge;break e}}else if(ae.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===M&&wl(Le)===ae.type){p(se,ae.sibling),ge=C(ae,le.props),Jd(ge,le),ge.return=se,se=ge;break e}p(se,ae);break}else c(se,ae);ae=ae.sibling}le.type===w?(ge=gl(le.props.children,se.mode,ge,le.key),ge.return=se,se=ge):(ge=Ng(le.type,le.key,le.props,null,se.mode,ge),Jd(ge,le),ge.return=se,se=ge)}return B(se);case b:e:{for(Le=le.key;ae!==null;){if(ae.key===Le)if(ae.tag===4&&ae.stateNode.containerInfo===le.containerInfo&&ae.stateNode.implementation===le.implementation){p(se,ae.sibling),ge=C(ae,le.children||[]),ge.return=se,se=ge;break e}else{p(se,ae);break}else c(se,ae);ae=ae.sibling}ge=Rw(le,se.mode,ge),ge.return=se,se=ge}return B(se);case M:return le=wl(le),Ot(se,ae,le,ge)}if(q(le))return je(se,ae,le,ge);if(k(le)){if(Le=k(le),typeof Le!="function")throw Error(r(150));return le=Le.call(le),$e(se,ae,le,ge)}if(typeof le.then=="function")return Ot(se,ae,Lg(le),ge);if(le.$$typeof===_)return Ot(se,ae,Rg(se,le),ge);$g(se,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,ae!==null&&ae.tag===6?(p(se,ae.sibling),ge=C(ae,le),ge.return=se,se=ge):(p(se,ae),ge=Mw(le,se.mode,ge),ge.return=se,se=ge),B(se)):p(se,ae)}return function(se,ae,le,ge){try{Qd=0;var Le=Ot(se,ae,le,ge);return uc=null,Le}catch(Me){if(Me===lc||Me===Dg)throw Me;var ht=Cr(29,Me,null,se.mode);return ht.lanes=ge,ht.return=se,ht}finally{}}}var _l=SD(!0),_D=SD(!1),Do=!1;function Hw(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gw(s,c){s=s.updateQueue,c.updateQueue===s&&(c.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function Io(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Lo(s,c,p){var v=s.updateQueue;if(v===null)return null;if(v=v.shared,(vt&2)!==0){var C=v.pending;return C===null?c.next=c:(c.next=C.next,C.next=c),v.pending=c,c=jg(s),oD(s,null,p),c}return Og(s,v,c,p),jg(s)}function eh(s,c,p){if(c=c.updateQueue,c!==null&&(c=c.shared,(p&4194048)!==0)){var v=c.lanes;v&=s.pendingLanes,p|=v,c.lanes=p,sg(s,p)}}function Ww(s,c){var p=s.updateQueue,v=s.alternate;if(v!==null&&(v=v.updateQueue,p===v)){var C=null,N=null;if(p=p.firstBaseUpdate,p!==null){do{var B={lane:p.lane,tag:p.tag,payload:p.payload,callback:null,next:null};N===null?C=N=B:N=N.next=B,p=p.next}while(p!==null);N===null?C=N=c:N=N.next=c}else C=N=c;p={baseState:v.baseState,firstBaseUpdate:C,lastBaseUpdate:N,shared:v.shared,callbacks:v.callbacks},s.updateQueue=p;return}s=p.lastBaseUpdate,s===null?p.firstBaseUpdate=c:s.next=c,p.lastBaseUpdate=c}var Kw=!1;function th(){if(Kw){var s=sc;if(s!==null)throw s}}function nh(s,c,p,v){Kw=!1;var C=s.updateQueue;Do=!1;var N=C.firstBaseUpdate,B=C.lastBaseUpdate,W=C.shared.pending;if(W!==null){C.shared.pending=null;var ee=W,ue=ee.next;ee.next=null,B===null?N=ue:B.next=ue,B=ee;var pe=s.alternate;pe!==null&&(pe=pe.updateQueue,W=pe.lastBaseUpdate,W!==B&&(W===null?pe.firstBaseUpdate=ue:W.next=ue,pe.lastBaseUpdate=ee))}if(N!==null){var ve=C.baseState;B=0,pe=ue=ee=null,W=N;do{var ce=W.lane&-536870913,de=ce!==W.lane;if(de?(rt&ce)===ce:(v&ce)===ce){ce!==0&&ce===oc&&(Kw=!0),pe!==null&&(pe=pe.next={lane:0,tag:W.tag,payload:W.payload,callback:null,next:null});e:{var je=s,$e=W;ce=c;var Ot=p;switch($e.tag){case 1:if(je=$e.payload,typeof je=="function"){ve=je.call(Ot,ve,ce);break e}ve=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=$e.payload,ce=typeof je=="function"?je.call(Ot,ve,ce):je,ce==null)break e;ve=h({},ve,ce);break e;case 2:Do=!0}}ce=W.callback,ce!==null&&(s.flags|=64,de&&(s.flags|=8192),de=C.callbacks,de===null?C.callbacks=[ce]:de.push(ce))}else de={lane:ce,tag:W.tag,payload:W.payload,callback:W.callback,next:null},pe===null?(ue=pe=de,ee=ve):pe=pe.next=de,B|=ce;if(W=W.next,W===null){if(W=C.shared.pending,W===null)break;de=W,W=de.next,de.next=null,C.lastBaseUpdate=de,C.shared.pending=null}}while(!0);pe===null&&(ee=ve),C.baseState=ee,C.firstBaseUpdate=ue,C.lastBaseUpdate=pe,N===null&&(C.shared.lanes=0),Vo|=B,s.lanes=B,s.memoizedState=ve}}function ED(s,c){if(typeof s!="function")throw Error(r(191,s));s.call(c)}function AD(s,c){var p=s.callbacks;if(p!==null)for(s.callbacks=null,s=0;s<p.length;s++)ED(p[s],c)}var cc=H(null),Bg=H(0);function TD(s,c){s=qa,X(Bg,s),X(cc,c),qa=s|c.baseLanes}function Yw(){X(Bg,qa),X(cc,cc.current)}function Xw(){qa=Bg.current,V(cc),V(Bg)}var Or=H(null),Xr=null;function $o(s){var c=s.alternate;X(sn,sn.current&1),X(Or,s),Xr===null&&(c===null||cc.current!==null||c.memoizedState!==null)&&(Xr=s)}function Zw(s){X(sn,sn.current),X(Or,s),Xr===null&&(Xr=s)}function CD(s){s.tag===22?(X(sn,sn.current),X(Or,s),Xr===null&&(Xr=s)):Bo()}function Bo(){X(sn,sn.current),X(Or,Or.current)}function jr(s){V(Or),Xr===s&&(Xr=null),V(sn)}var sn=H(0);function qg(s){for(var c=s;c!==null;){if(c.tag===13){var p=c.memoizedState;if(p!==null&&(p=p.dehydrated,p===null||rS(p)||iS(p)))return c}else if(c.tag===19&&(c.memoizedProps.revealOrder==="forwards"||c.memoizedProps.revealOrder==="backwards"||c.memoizedProps.revealOrder==="unstable_legacy-backwards"||c.memoizedProps.revealOrder==="together")){if((c.flags&128)!==0)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Ma=0,Ue=null,Tt=null,fn=null,zg=!1,fc=!1,El=!1,Vg=0,rh=0,dc=null,rre=0;function en(){throw Error(r(321))}function Qw(s,c){if(c===null)return!1;for(var p=0;p<c.length&&p<s.length;p++)if(!Tr(s[p],c[p]))return!1;return!0}function Jw(s,c,p,v,C,N){return Ma=N,Ue=c,c.memoizedState=null,c.updateQueue=null,c.lanes=0,L.H=s===null||s.memoizedState===null?cI:p1,El=!1,N=p(v,C),El=!1,fc&&(N=jD(c,p,v,C)),OD(s),N}function OD(s){L.H=oh;var c=Tt!==null&&Tt.next!==null;if(Ma=0,fn=Tt=Ue=null,zg=!1,rh=0,dc=null,c)throw Error(r(300));s===null||dn||(s=s.dependencies,s!==null&&Mg(s)&&(dn=!0))}function jD(s,c,p,v){Ue=s;var C=0;do{if(fc&&(dc=null),rh=0,fc=!1,25<=C)throw Error(r(301));if(C+=1,fn=Tt=null,s.updateQueue!=null){var N=s.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}L.H=fI,N=c(p,v)}while(fc);return N}function ire(){var s=L.H,c=s.useState()[0];return c=typeof c.then=="function"?ih(c):c,s=s.useState()[0],(Tt!==null?Tt.memoizedState:null)!==s&&(Ue.flags|=1024),c}function e1(){var s=Vg!==0;return Vg=0,s}function t1(s,c,p){c.updateQueue=s.updateQueue,c.flags&=-2053,s.lanes&=~p}function n1(s){if(zg){for(s=s.memoizedState;s!==null;){var c=s.queue;c!==null&&(c.pending=null),s=s.next}zg=!1}Ma=0,fn=Tt=Ue=null,fc=!1,rh=Vg=0,dc=null}function Qn(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?Ue.memoizedState=fn=s:fn=fn.next=s,fn}function ln(){if(Tt===null){var s=Ue.alternate;s=s!==null?s.memoizedState:null}else s=Tt.next;var c=fn===null?Ue.memoizedState:fn.next;if(c!==null)fn=c,Tt=s;else{if(s===null)throw Ue.alternate===null?Error(r(467)):Error(r(310));Tt=s,s={memoizedState:Tt.memoizedState,baseState:Tt.baseState,baseQueue:Tt.baseQueue,queue:Tt.queue,next:null},fn===null?Ue.memoizedState=fn=s:fn=fn.next=s}return fn}function Fg(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ih(s){var c=rh;return rh+=1,dc===null&&(dc=[]),s=bD(dc,s,c),c=Ue,(fn===null?c.memoizedState:fn.next)===null&&(c=c.alternate,L.H=c===null||c.memoizedState===null?cI:p1),s}function Ug(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return ih(s);if(s.$$typeof===_)return kn(s)}throw Error(r(438,String(s)))}function r1(s){var c=null,p=Ue.updateQueue;if(p!==null&&(c=p.memoCache),c==null){var v=Ue.alternate;v!==null&&(v=v.updateQueue,v!==null&&(v=v.memoCache,v!=null&&(c={data:v.data.map(function(C){return C.slice()}),index:0})))}if(c==null&&(c={data:[],index:0}),p===null&&(p=Fg(),Ue.updateQueue=p),p.memoCache=c,p=c.data[c.index],p===void 0)for(p=c.data[c.index]=Array(s),v=0;v<s;v++)p[v]=D;return c.index++,p}function Ra(s,c){return typeof c=="function"?c(s):c}function Hg(s){var c=ln();return i1(c,Tt,s)}function i1(s,c,p){var v=s.queue;if(v===null)throw Error(r(311));v.lastRenderedReducer=p;var C=s.baseQueue,N=v.pending;if(N!==null){if(C!==null){var B=C.next;C.next=N.next,N.next=B}c.baseQueue=C=N,v.pending=null}if(N=s.baseState,C===null)s.memoizedState=N;else{c=C.next;var W=B=null,ee=null,ue=c,pe=!1;do{var ve=ue.lane&-536870913;if(ve!==ue.lane?(rt&ve)===ve:(Ma&ve)===ve){var ce=ue.revertLane;if(ce===0)ee!==null&&(ee=ee.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),ve===oc&&(pe=!0);else if((Ma&ce)===ce){ue=ue.next,ce===oc&&(pe=!0);continue}else ve={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},ee===null?(W=ee=ve,B=N):ee=ee.next=ve,Ue.lanes|=ce,Vo|=ce;ve=ue.action,El&&p(N,ve),N=ue.hasEagerState?ue.eagerState:p(N,ve)}else ce={lane:ve,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},ee===null?(W=ee=ce,B=N):ee=ee.next=ce,Ue.lanes|=ve,Vo|=ve;ue=ue.next}while(ue!==null&&ue!==c);if(ee===null?B=N:ee.next=W,!Tr(N,s.memoizedState)&&(dn=!0,pe&&(p=sc,p!==null)))throw p;s.memoizedState=N,s.baseState=B,s.baseQueue=ee,v.lastRenderedState=N}return C===null&&(v.lanes=0),[s.memoizedState,v.dispatch]}function a1(s){var c=ln(),p=c.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=s;var v=p.dispatch,C=p.pending,N=c.memoizedState;if(C!==null){p.pending=null;var B=C=C.next;do N=s(N,B.action),B=B.next;while(B!==C);Tr(N,c.memoizedState)||(dn=!0),c.memoizedState=N,c.baseQueue===null&&(c.baseState=N),p.lastRenderedState=N}return[N,v]}function ND(s,c,p){var v=Ue,C=ln(),N=st;if(N){if(p===void 0)throw Error(r(407));p=p()}else p=c();var B=!Tr((Tt||C).memoizedState,p);if(B&&(C.memoizedState=p,dn=!0),C=C.queue,l1(RD.bind(null,v,C,s),[s]),C.getSnapshot!==c||B||fn!==null&&fn.memoizedState.tag&1){if(v.flags|=2048,hc(9,{destroy:void 0},MD.bind(null,v,C,p,c),null),Mt===null)throw Error(r(349));N||(Ma&127)!==0||PD(v,c,p)}return p}function PD(s,c,p){s.flags|=16384,s={getSnapshot:c,value:p},c=Ue.updateQueue,c===null?(c=Fg(),Ue.updateQueue=c,c.stores=[s]):(p=c.stores,p===null?c.stores=[s]:p.push(s))}function MD(s,c,p,v){c.value=p,c.getSnapshot=v,kD(c)&&DD(s)}function RD(s,c,p){return p(function(){kD(c)&&DD(s)})}function kD(s){var c=s.getSnapshot;s=s.value;try{var p=c();return!Tr(s,p)}catch{return!0}}function DD(s){var c=ml(s,2);c!==null&&gr(c,s,2)}function o1(s){var c=Qn();if(typeof s=="function"){var p=s;if(s=p(),El){Gi(!0);try{p()}finally{Gi(!1)}}}return c.memoizedState=c.baseState=s,c.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:s},c}function ID(s,c,p,v){return s.baseState=p,i1(s,Tt,typeof v=="function"?v:Ra)}function are(s,c,p,v,C){if(Kg(s))throw Error(r(485));if(s=c.action,s!==null){var N={payload:C,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){N.listeners.push(B)}};L.T!==null?p(!0):N.isTransition=!1,v(N),p=c.pending,p===null?(N.next=c.pending=N,LD(c,N)):(N.next=p.next,c.pending=p.next=N)}}function LD(s,c){var p=c.action,v=c.payload,C=s.state;if(c.isTransition){var N=L.T,B={};L.T=B;try{var W=p(C,v),ee=L.S;ee!==null&&ee(B,W),$D(s,c,W)}catch(ue){s1(s,c,ue)}finally{N!==null&&B.types!==null&&(N.types=B.types),L.T=N}}else try{N=p(C,v),$D(s,c,N)}catch(ue){s1(s,c,ue)}}function $D(s,c,p){p!==null&&typeof p=="object"&&typeof p.then=="function"?p.then(function(v){BD(s,c,v)},function(v){return s1(s,c,v)}):BD(s,c,p)}function BD(s,c,p){c.status="fulfilled",c.value=p,qD(c),s.state=p,c=s.pending,c!==null&&(p=c.next,p===c?s.pending=null:(p=p.next,c.next=p,LD(s,p)))}function s1(s,c,p){var v=s.pending;if(s.pending=null,v!==null){v=v.next;do c.status="rejected",c.reason=p,qD(c),c=c.next;while(c!==v)}s.action=null}function qD(s){s=s.listeners;for(var c=0;c<s.length;c++)(0,s[c])()}function zD(s,c){return c}function VD(s,c){if(st){var p=Mt.formState;if(p!==null){e:{var v=Ue;if(st){if(Bt){t:{for(var C=Bt,N=Yr;C.nodeType!==8;){if(!N){C=null;break t}if(C=Zr(C.nextSibling),C===null){C=null;break t}}N=C.data,C=N==="F!"||N==="F"?C:null}if(C){Bt=Zr(C.nextSibling),v=C.data==="F!";break e}}Ro(v)}v=!1}v&&(c=p[0])}}return p=Qn(),p.memoizedState=p.baseState=c,v={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zD,lastRenderedState:c},p.queue=v,p=sI.bind(null,Ue,v),v.dispatch=p,v=o1(!1),N=h1.bind(null,Ue,!1,v.queue),v=Qn(),C={state:c,dispatch:null,action:s,pending:null},v.queue=C,p=are.bind(null,Ue,C,N,p),C.dispatch=p,v.memoizedState=s,[c,p,!1]}function FD(s){var c=ln();return UD(c,Tt,s)}function UD(s,c,p){if(c=i1(s,c,zD)[0],s=Hg(Ra)[0],typeof c=="object"&&c!==null&&typeof c.then=="function")try{var v=ih(c)}catch(B){throw B===lc?Dg:B}else v=c;c=ln();var C=c.queue,N=C.dispatch;return p!==c.memoizedState&&(Ue.flags|=2048,hc(9,{destroy:void 0},ore.bind(null,C,p),null)),[v,N,s]}function ore(s,c){s.action=c}function HD(s){var c=ln(),p=Tt;if(p!==null)return UD(c,p,s);ln(),c=c.memoizedState,p=ln();var v=p.queue.dispatch;return p.memoizedState=s,[c,v,!1]}function hc(s,c,p,v){return s={tag:s,create:p,deps:v,inst:c,next:null},c=Ue.updateQueue,c===null&&(c=Fg(),Ue.updateQueue=c),p=c.lastEffect,p===null?c.lastEffect=s.next=s:(v=p.next,p.next=s,s.next=v,c.lastEffect=s),s}function GD(){return ln().memoizedState}function Gg(s,c,p,v){var C=Qn();Ue.flags|=s,C.memoizedState=hc(1|c,{destroy:void 0},p,v===void 0?null:v)}function Wg(s,c,p,v){var C=ln();v=v===void 0?null:v;var N=C.memoizedState.inst;Tt!==null&&v!==null&&Qw(v,Tt.memoizedState.deps)?C.memoizedState=hc(c,N,p,v):(Ue.flags|=s,C.memoizedState=hc(1|c,N,p,v))}function WD(s,c){Gg(8390656,8,s,c)}function l1(s,c){Wg(2048,8,s,c)}function sre(s){Ue.flags|=4;var c=Ue.updateQueue;if(c===null)c=Fg(),Ue.updateQueue=c,c.events=[s];else{var p=c.events;p===null?c.events=[s]:p.push(s)}}function KD(s){var c=ln().memoizedState;return sre({ref:c,nextImpl:s}),function(){if((vt&2)!==0)throw Error(r(440));return c.impl.apply(void 0,arguments)}}function YD(s,c){return Wg(4,2,s,c)}function XD(s,c){return Wg(4,4,s,c)}function ZD(s,c){if(typeof c=="function"){s=s();var p=c(s);return function(){typeof p=="function"?p():c(null)}}if(c!=null)return s=s(),c.current=s,function(){c.current=null}}function QD(s,c,p){p=p!=null?p.concat([s]):null,Wg(4,4,ZD.bind(null,c,s),p)}function u1(){}function JD(s,c){var p=ln();c=c===void 0?null:c;var v=p.memoizedState;return c!==null&&Qw(c,v[1])?v[0]:(p.memoizedState=[s,c],s)}function eI(s,c){var p=ln();c=c===void 0?null:c;var v=p.memoizedState;if(c!==null&&Qw(c,v[1]))return v[0];if(v=s(),El){Gi(!0);try{s()}finally{Gi(!1)}}return p.memoizedState=[v,c],v}function c1(s,c,p){return p===void 0||(Ma&1073741824)!==0&&(rt&261930)===0?s.memoizedState=c:(s.memoizedState=p,s=tL(),Ue.lanes|=s,Vo|=s,p)}function tI(s,c,p,v){return Tr(p,c)?p:cc.current!==null?(s=c1(s,p,v),Tr(s,c)||(dn=!0),s):(Ma&42)===0||(Ma&1073741824)!==0&&(rt&261930)===0?(dn=!0,s.memoizedState=p):(s=tL(),Ue.lanes|=s,Vo|=s,c)}function nI(s,c,p,v,C){var N=z.p;z.p=N!==0&&8>N?N:8;var B=L.T,W={};L.T=W,h1(s,!1,c,p);try{var ee=C(),ue=L.S;if(ue!==null&&ue(W,ee),ee!==null&&typeof ee=="object"&&typeof ee.then=="function"){var pe=nre(ee,v);ah(s,c,pe,Mr(s))}else ah(s,c,v,Mr(s))}catch(ve){ah(s,c,{then:function(){},status:"rejected",reason:ve},Mr())}finally{z.p=N,B!==null&&W.types!==null&&(B.types=W.types),L.T=B}}function lre(){}function f1(s,c,p,v){if(s.tag!==5)throw Error(r(476));var C=rI(s).queue;nI(s,C,c,U,p===null?lre:function(){return iI(s),p(v)})}function rI(s){var c=s.memoizedState;if(c!==null)return c;c={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:U},next:null};var p={};return c.next={memoizedState:p,baseState:p,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ra,lastRenderedState:p},next:null},s.memoizedState=c,s=s.alternate,s!==null&&(s.memoizedState=c),c}function iI(s){var c=rI(s);c.next===null&&(c=s.alternate.memoizedState),ah(s,c.next.queue,{},Mr())}function d1(){return kn(Sh)}function aI(){return ln().memoizedState}function oI(){return ln().memoizedState}function ure(s){for(var c=s.return;c!==null;){switch(c.tag){case 24:case 3:var p=Mr();s=Io(p);var v=Lo(c,s,p);v!==null&&(gr(v,c,p),eh(v,c,p)),c={cache:zw()},s.payload=c;return}c=c.return}}function cre(s,c,p){var v=Mr();p={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Kg(s)?lI(c,p):(p=Nw(s,c,p,v),p!==null&&(gr(p,s,v),uI(p,c,v)))}function sI(s,c,p){var v=Mr();ah(s,c,p,v)}function ah(s,c,p,v){var C={lane:v,revertLane:0,gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null};if(Kg(s))lI(c,C);else{var N=s.alternate;if(s.lanes===0&&(N===null||N.lanes===0)&&(N=c.lastRenderedReducer,N!==null))try{var B=c.lastRenderedState,W=N(B,p);if(C.hasEagerState=!0,C.eagerState=W,Tr(W,B))return Og(s,c,C,0),Mt===null&&Cg(),!1}catch{}finally{}if(p=Nw(s,c,C,v),p!==null)return gr(p,s,v),uI(p,c,v),!0}return!1}function h1(s,c,p,v){if(v={lane:2,revertLane:H1(),gesture:null,action:v,hasEagerState:!1,eagerState:null,next:null},Kg(s)){if(c)throw Error(r(479))}else c=Nw(s,p,v,2),c!==null&&gr(c,s,2)}function Kg(s){var c=s.alternate;return s===Ue||c!==null&&c===Ue}function lI(s,c){fc=zg=!0;var p=s.pending;p===null?c.next=c:(c.next=p.next,p.next=c),s.pending=c}function uI(s,c,p){if((p&4194048)!==0){var v=c.lanes;v&=s.pendingLanes,p|=v,c.lanes=p,sg(s,p)}}var oh={readContext:kn,use:Ug,useCallback:en,useContext:en,useEffect:en,useImperativeHandle:en,useLayoutEffect:en,useInsertionEffect:en,useMemo:en,useReducer:en,useRef:en,useState:en,useDebugValue:en,useDeferredValue:en,useTransition:en,useSyncExternalStore:en,useId:en,useHostTransitionStatus:en,useFormState:en,useActionState:en,useOptimistic:en,useMemoCache:en,useCacheRefresh:en};oh.useEffectEvent=en;var cI={readContext:kn,use:Ug,useCallback:function(s,c){return Qn().memoizedState=[s,c===void 0?null:c],s},useContext:kn,useEffect:WD,useImperativeHandle:function(s,c,p){p=p!=null?p.concat([s]):null,Gg(4194308,4,ZD.bind(null,c,s),p)},useLayoutEffect:function(s,c){return Gg(4194308,4,s,c)},useInsertionEffect:function(s,c){Gg(4,2,s,c)},useMemo:function(s,c){var p=Qn();c=c===void 0?null:c;var v=s();if(El){Gi(!0);try{s()}finally{Gi(!1)}}return p.memoizedState=[v,c],v},useReducer:function(s,c,p){var v=Qn();if(p!==void 0){var C=p(c);if(El){Gi(!0);try{p(c)}finally{Gi(!1)}}}else C=c;return v.memoizedState=v.baseState=C,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:C},v.queue=s,s=s.dispatch=cre.bind(null,Ue,s),[v.memoizedState,s]},useRef:function(s){var c=Qn();return s={current:s},c.memoizedState=s},useState:function(s){s=o1(s);var c=s.queue,p=sI.bind(null,Ue,c);return c.dispatch=p,[s.memoizedState,p]},useDebugValue:u1,useDeferredValue:function(s,c){var p=Qn();return c1(p,s,c)},useTransition:function(){var s=o1(!1);return s=nI.bind(null,Ue,s.queue,!0,!1),Qn().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,c,p){var v=Ue,C=Qn();if(st){if(p===void 0)throw Error(r(407));p=p()}else{if(p=c(),Mt===null)throw Error(r(349));(rt&127)!==0||PD(v,c,p)}C.memoizedState=p;var N={value:p,getSnapshot:c};return C.queue=N,WD(RD.bind(null,v,N,s),[s]),v.flags|=2048,hc(9,{destroy:void 0},MD.bind(null,v,N,p,c),null),p},useId:function(){var s=Qn(),c=Mt.identifierPrefix;if(st){var p=Yi,v=Ki;p=(v&~(1<<32-Zn(v)-1)).toString(32)+p,c="_"+c+"R_"+p,p=Vg++,0<p&&(c+="H"+p.toString(32)),c+="_"}else p=rre++,c="_"+c+"r_"+p.toString(32)+"_";return s.memoizedState=c},useHostTransitionStatus:d1,useFormState:VD,useActionState:VD,useOptimistic:function(s){var c=Qn();c.memoizedState=c.baseState=s;var p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return c.queue=p,c=h1.bind(null,Ue,!0,p),p.dispatch=c,[s,c]},useMemoCache:r1,useCacheRefresh:function(){return Qn().memoizedState=ure.bind(null,Ue)},useEffectEvent:function(s){var c=Qn(),p={impl:s};return c.memoizedState=p,function(){if((vt&2)!==0)throw Error(r(440));return p.impl.apply(void 0,arguments)}}},p1={readContext:kn,use:Ug,useCallback:JD,useContext:kn,useEffect:l1,useImperativeHandle:QD,useInsertionEffect:YD,useLayoutEffect:XD,useMemo:eI,useReducer:Hg,useRef:GD,useState:function(){return Hg(Ra)},useDebugValue:u1,useDeferredValue:function(s,c){var p=ln();return tI(p,Tt.memoizedState,s,c)},useTransition:function(){var s=Hg(Ra)[0],c=ln().memoizedState;return[typeof s=="boolean"?s:ih(s),c]},useSyncExternalStore:ND,useId:aI,useHostTransitionStatus:d1,useFormState:FD,useActionState:FD,useOptimistic:function(s,c){var p=ln();return ID(p,Tt,s,c)},useMemoCache:r1,useCacheRefresh:oI};p1.useEffectEvent=KD;var fI={readContext:kn,use:Ug,useCallback:JD,useContext:kn,useEffect:l1,useImperativeHandle:QD,useInsertionEffect:YD,useLayoutEffect:XD,useMemo:eI,useReducer:a1,useRef:GD,useState:function(){return a1(Ra)},useDebugValue:u1,useDeferredValue:function(s,c){var p=ln();return Tt===null?c1(p,s,c):tI(p,Tt.memoizedState,s,c)},useTransition:function(){var s=a1(Ra)[0],c=ln().memoizedState;return[typeof s=="boolean"?s:ih(s),c]},useSyncExternalStore:ND,useId:aI,useHostTransitionStatus:d1,useFormState:HD,useActionState:HD,useOptimistic:function(s,c){var p=ln();return Tt!==null?ID(p,Tt,s,c):(p.baseState=s,[s,p.queue.dispatch])},useMemoCache:r1,useCacheRefresh:oI};fI.useEffectEvent=KD;function m1(s,c,p,v){c=s.memoizedState,p=p(v,c),p=p==null?c:h({},c,p),s.memoizedState=p,s.lanes===0&&(s.updateQueue.baseState=p)}var g1={enqueueSetState:function(s,c,p){s=s._reactInternals;var v=Mr(),C=Io(v);C.payload=c,p!=null&&(C.callback=p),c=Lo(s,C,v),c!==null&&(gr(c,s,v),eh(c,s,v))},enqueueReplaceState:function(s,c,p){s=s._reactInternals;var v=Mr(),C=Io(v);C.tag=1,C.payload=c,p!=null&&(C.callback=p),c=Lo(s,C,v),c!==null&&(gr(c,s,v),eh(c,s,v))},enqueueForceUpdate:function(s,c){s=s._reactInternals;var p=Mr(),v=Io(p);v.tag=2,c!=null&&(v.callback=c),c=Lo(s,v,p),c!==null&&(gr(c,s,p),eh(c,s,p))}};function dI(s,c,p,v,C,N,B){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(v,N,B):c.prototype&&c.prototype.isPureReactComponent?!Gd(p,v)||!Gd(C,N):!0}function hI(s,c,p,v){s=c.state,typeof c.componentWillReceiveProps=="function"&&c.componentWillReceiveProps(p,v),typeof c.UNSAFE_componentWillReceiveProps=="function"&&c.UNSAFE_componentWillReceiveProps(p,v),c.state!==s&&g1.enqueueReplaceState(c,c.state,null)}function Al(s,c){var p=c;if("ref"in c){p={};for(var v in c)v!=="ref"&&(p[v]=c[v])}if(s=s.defaultProps){p===c&&(p=h({},p));for(var C in s)p[C]===void 0&&(p[C]=s[C])}return p}function pI(s){Tg(s)}function mI(s){console.error(s)}function gI(s){Tg(s)}function Yg(s,c){try{var p=s.onUncaughtError;p(c.value,{componentStack:c.stack})}catch(v){setTimeout(function(){throw v})}}function vI(s,c,p){try{var v=s.onCaughtError;v(p.value,{componentStack:p.stack,errorBoundary:c.tag===1?c.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function v1(s,c,p){return p=Io(p),p.tag=3,p.payload={element:null},p.callback=function(){Yg(s,c)},p}function yI(s){return s=Io(s),s.tag=3,s}function bI(s,c,p,v){var C=p.type.getDerivedStateFromError;if(typeof C=="function"){var N=v.value;s.payload=function(){return C(N)},s.callback=function(){vI(c,p,v)}}var B=p.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(s.callback=function(){vI(c,p,v),typeof C!="function"&&(Fo===null?Fo=new Set([this]):Fo.add(this));var W=v.stack;this.componentDidCatch(v.value,{componentStack:W!==null?W:""})})}function fre(s,c,p,v,C){if(p.flags|=32768,v!==null&&typeof v=="object"&&typeof v.then=="function"){if(c=p.alternate,c!==null&&ac(c,p,C,!0),p=Or.current,p!==null){switch(p.tag){case 31:case 13:return Xr===null?sv():p.alternate===null&&tn===0&&(tn=3),p.flags&=-257,p.flags|=65536,p.lanes=C,v===Ig?p.flags|=16384:(c=p.updateQueue,c===null?p.updateQueue=new Set([v]):c.add(v),V1(s,v,C)),!1;case 22:return p.flags|=65536,v===Ig?p.flags|=16384:(c=p.updateQueue,c===null?(c={transitions:null,markerInstances:null,retryQueue:new Set([v])},p.updateQueue=c):(p=c.retryQueue,p===null?c.retryQueue=new Set([v]):p.add(v)),V1(s,v,C)),!1}throw Error(r(435,p.tag))}return V1(s,v,C),sv(),!1}if(st)return c=Or.current,c!==null?((c.flags&65536)===0&&(c.flags|=256),c.flags|=65536,c.lanes=C,v!==Iw&&(s=Error(r(422),{cause:v}),Yd(Gr(s,p)))):(v!==Iw&&(c=Error(r(423),{cause:v}),Yd(Gr(c,p))),s=s.current.alternate,s.flags|=65536,C&=-C,s.lanes|=C,v=Gr(v,p),C=v1(s.stateNode,v,C),Ww(s,C),tn!==4&&(tn=2)),!1;var N=Error(r(520),{cause:v});if(N=Gr(N,p),ph===null?ph=[N]:ph.push(N),tn!==4&&(tn=2),c===null)return!0;v=Gr(v,p),p=c;do{switch(p.tag){case 3:return p.flags|=65536,s=C&-C,p.lanes|=s,s=v1(p.stateNode,v,s),Ww(p,s),!1;case 1:if(c=p.type,N=p.stateNode,(p.flags&128)===0&&(typeof c.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(Fo===null||!Fo.has(N))))return p.flags|=65536,C&=-C,p.lanes|=C,C=yI(C),bI(C,s,p,v),Ww(p,C),!1}p=p.return}while(p!==null);return!1}var y1=Error(r(461)),dn=!1;function Dn(s,c,p,v){c.child=s===null?_D(c,null,p,v):_l(c,s.child,p,v)}function xI(s,c,p,v,C){p=p.render;var N=c.ref;if("ref"in v){var B={};for(var W in v)W!=="ref"&&(B[W]=v[W])}else B=v;return bl(c),v=Jw(s,c,p,B,N,C),W=e1(),s!==null&&!dn?(t1(s,c,C),ka(s,c,C)):(st&&W&&kw(c),c.flags|=1,Dn(s,c,v,C),c.child)}function wI(s,c,p,v,C){if(s===null){var N=p.type;return typeof N=="function"&&!Pw(N)&&N.defaultProps===void 0&&p.compare===null?(c.tag=15,c.type=N,SI(s,c,N,v,C)):(s=Ng(p.type,null,v,c,c.mode,C),s.ref=c.ref,s.return=c,c.child=s)}if(N=s.child,!T1(s,C)){var B=N.memoizedProps;if(p=p.compare,p=p!==null?p:Gd,p(B,v)&&s.ref===c.ref)return ka(s,c,C)}return c.flags|=1,s=Oa(N,v),s.ref=c.ref,s.return=c,c.child=s}function SI(s,c,p,v,C){if(s!==null){var N=s.memoizedProps;if(Gd(N,v)&&s.ref===c.ref)if(dn=!1,c.pendingProps=v=N,T1(s,C))(s.flags&131072)!==0&&(dn=!0);else return c.lanes=s.lanes,ka(s,c,C)}return b1(s,c,p,v,C)}function _I(s,c,p,v){var C=v.children,N=s!==null?s.memoizedState:null;if(s===null&&c.stateNode===null&&(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),v.mode==="hidden"){if((c.flags&128)!==0){if(N=N!==null?N.baseLanes|p:p,s!==null){for(v=c.child=s.child,C=0;v!==null;)C=C|v.lanes|v.childLanes,v=v.sibling;v=C&~N}else v=0,c.child=null;return EI(s,c,N,p,v)}if((p&536870912)!==0)c.memoizedState={baseLanes:0,cachePool:null},s!==null&&kg(c,N!==null?N.cachePool:null),N!==null?TD(c,N):Yw(),CD(c);else return v=c.lanes=536870912,EI(s,c,N!==null?N.baseLanes|p:p,p,v)}else N!==null?(kg(c,N.cachePool),TD(c,N),Bo(),c.memoizedState=null):(s!==null&&kg(c,null),Yw(),Bo());return Dn(s,c,C,p),c.child}function sh(s,c){return s!==null&&s.tag===22||c.stateNode!==null||(c.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.sibling}function EI(s,c,p,v,C){var N=Fw();return N=N===null?null:{parent:cn._currentValue,pool:N},c.memoizedState={baseLanes:p,cachePool:N},s!==null&&kg(c,null),Yw(),CD(c),s!==null&&ac(s,c,v,!0),c.childLanes=C,null}function Xg(s,c){return c=Qg({mode:c.mode,children:c.children},s.mode),c.ref=s.ref,s.child=c,c.return=s,c}function AI(s,c,p){return _l(c,s.child,null,p),s=Xg(c,c.pendingProps),s.flags|=2,jr(c),c.memoizedState=null,s}function dre(s,c,p){var v=c.pendingProps,C=(c.flags&128)!==0;if(c.flags&=-129,s===null){if(st){if(v.mode==="hidden")return s=Xg(c,v),c.lanes=536870912,sh(null,s);if(Zw(c),(s=Bt)?(s=LL(s,Yr),s=s!==null&&s.data==="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:Po!==null?{id:Ki,overflow:Yi}:null,retryLane:536870912,hydrationErrors:null},p=lD(s),p.return=c,c.child=p,Rn=c,Bt=null)):s=null,s===null)throw Ro(c);return c.lanes=536870912,null}return Xg(c,v)}var N=s.memoizedState;if(N!==null){var B=N.dehydrated;if(Zw(c),C)if(c.flags&256)c.flags&=-257,c=AI(s,c,p);else if(c.memoizedState!==null)c.child=s.child,c.flags|=128,c=null;else throw Error(r(558));else if(dn||ac(s,c,p,!1),C=(p&s.childLanes)!==0,dn||C){if(v=Mt,v!==null&&(B=lg(v,p),B!==0&&B!==N.retryLane))throw N.retryLane=B,ml(s,B),gr(v,s,B),y1;sv(),c=AI(s,c,p)}else s=N.treeContext,Bt=Zr(B.nextSibling),Rn=c,st=!0,Mo=null,Yr=!1,s!==null&&fD(c,s),c=Xg(c,v),c.flags|=4096;return c}return s=Oa(s.child,{mode:v.mode,children:v.children}),s.ref=c.ref,c.child=s,s.return=c,s}function Zg(s,c){var p=c.ref;if(p===null)s!==null&&s.ref!==null&&(c.flags|=4194816);else{if(typeof p!="function"&&typeof p!="object")throw Error(r(284));(s===null||s.ref!==p)&&(c.flags|=4194816)}}function b1(s,c,p,v,C){return bl(c),p=Jw(s,c,p,v,void 0,C),v=e1(),s!==null&&!dn?(t1(s,c,C),ka(s,c,C)):(st&&v&&kw(c),c.flags|=1,Dn(s,c,p,C),c.child)}function TI(s,c,p,v,C,N){return bl(c),c.updateQueue=null,p=jD(c,v,p,C),OD(s),v=e1(),s!==null&&!dn?(t1(s,c,N),ka(s,c,N)):(st&&v&&kw(c),c.flags|=1,Dn(s,c,p,N),c.child)}function CI(s,c,p,v,C){if(bl(c),c.stateNode===null){var N=tc,B=p.contextType;typeof B=="object"&&B!==null&&(N=kn(B)),N=new p(v,N),c.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=g1,c.stateNode=N,N._reactInternals=c,N=c.stateNode,N.props=v,N.state=c.memoizedState,N.refs={},Hw(c),B=p.contextType,N.context=typeof B=="object"&&B!==null?kn(B):tc,N.state=c.memoizedState,B=p.getDerivedStateFromProps,typeof B=="function"&&(m1(c,p,B,v),N.state=c.memoizedState),typeof p.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(B=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),B!==N.state&&g1.enqueueReplaceState(N,N.state,null),nh(c,v,N,C),th(),N.state=c.memoizedState),typeof N.componentDidMount=="function"&&(c.flags|=4194308),v=!0}else if(s===null){N=c.stateNode;var W=c.memoizedProps,ee=Al(p,W);N.props=ee;var ue=N.context,pe=p.contextType;B=tc,typeof pe=="object"&&pe!==null&&(B=kn(pe));var ve=p.getDerivedStateFromProps;pe=typeof ve=="function"||typeof N.getSnapshotBeforeUpdate=="function",W=c.pendingProps!==W,pe||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(W||ue!==B)&&hI(c,N,v,B),Do=!1;var ce=c.memoizedState;N.state=ce,nh(c,v,N,C),th(),ue=c.memoizedState,W||ce!==ue||Do?(typeof ve=="function"&&(m1(c,p,ve,v),ue=c.memoizedState),(ee=Do||dI(c,p,ee,v,ce,ue,B))?(pe||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(c.flags|=4194308)):(typeof N.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=v,c.memoizedState=ue),N.props=v,N.state=ue,N.context=B,v=ee):(typeof N.componentDidMount=="function"&&(c.flags|=4194308),v=!1)}else{N=c.stateNode,Gw(s,c),B=c.memoizedProps,pe=Al(p,B),N.props=pe,ve=c.pendingProps,ce=N.context,ue=p.contextType,ee=tc,typeof ue=="object"&&ue!==null&&(ee=kn(ue)),W=p.getDerivedStateFromProps,(ue=typeof W=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(B!==ve||ce!==ee)&&hI(c,N,v,ee),Do=!1,ce=c.memoizedState,N.state=ce,nh(c,v,N,C),th();var de=c.memoizedState;B!==ve||ce!==de||Do||s!==null&&s.dependencies!==null&&Mg(s.dependencies)?(typeof W=="function"&&(m1(c,p,W,v),de=c.memoizedState),(pe=Do||dI(c,p,pe,v,ce,de,ee)||s!==null&&s.dependencies!==null&&Mg(s.dependencies))?(ue||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(v,de,ee),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(v,de,ee)),typeof N.componentDidUpdate=="function"&&(c.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof N.componentDidUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),c.memoizedProps=v,c.memoizedState=de),N.props=v,N.state=de,N.context=ee,v=pe):(typeof N.componentDidUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||B===s.memoizedProps&&ce===s.memoizedState||(c.flags|=1024),v=!1)}return N=v,Zg(s,c),v=(c.flags&128)!==0,N||v?(N=c.stateNode,p=v&&typeof p.getDerivedStateFromError!="function"?null:N.render(),c.flags|=1,s!==null&&v?(c.child=_l(c,s.child,null,C),c.child=_l(c,null,p,C)):Dn(s,c,p,C),c.memoizedState=N.state,s=c.child):s=ka(s,c,C),s}function OI(s,c,p,v){return vl(),c.flags|=256,Dn(s,c,p,v),c.child}var x1={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function w1(s){return{baseLanes:s,cachePool:vD()}}function S1(s,c,p){return s=s!==null?s.childLanes&~p:0,c&&(s|=Pr),s}function jI(s,c,p){var v=c.pendingProps,C=!1,N=(c.flags&128)!==0,B;if((B=N)||(B=s!==null&&s.memoizedState===null?!1:(sn.current&2)!==0),B&&(C=!0,c.flags&=-129),B=(c.flags&32)!==0,c.flags&=-33,s===null){if(st){if(C?$o(c):Bo(),(s=Bt)?(s=LL(s,Yr),s=s!==null&&s.data!=="&"?s:null,s!==null&&(c.memoizedState={dehydrated:s,treeContext:Po!==null?{id:Ki,overflow:Yi}:null,retryLane:536870912,hydrationErrors:null},p=lD(s),p.return=c,c.child=p,Rn=c,Bt=null)):s=null,s===null)throw Ro(c);return iS(s)?c.lanes=32:c.lanes=536870912,null}var W=v.children;return v=v.fallback,C?(Bo(),C=c.mode,W=Qg({mode:"hidden",children:W},C),v=gl(v,C,p,null),W.return=c,v.return=c,W.sibling=v,c.child=W,v=c.child,v.memoizedState=w1(p),v.childLanes=S1(s,B,p),c.memoizedState=x1,sh(null,v)):($o(c),_1(c,W))}var ee=s.memoizedState;if(ee!==null&&(W=ee.dehydrated,W!==null)){if(N)c.flags&256?($o(c),c.flags&=-257,c=E1(s,c,p)):c.memoizedState!==null?(Bo(),c.child=s.child,c.flags|=128,c=null):(Bo(),W=v.fallback,C=c.mode,v=Qg({mode:"visible",children:v.children},C),W=gl(W,C,p,null),W.flags|=2,v.return=c,W.return=c,v.sibling=W,c.child=v,_l(c,s.child,null,p),v=c.child,v.memoizedState=w1(p),v.childLanes=S1(s,B,p),c.memoizedState=x1,c=sh(null,v));else if($o(c),iS(W)){if(B=W.nextSibling&&W.nextSibling.dataset,B)var ue=B.dgst;B=ue,v=Error(r(419)),v.stack="",v.digest=B,Yd({value:v,source:null,stack:null}),c=E1(s,c,p)}else if(dn||ac(s,c,p,!1),B=(p&s.childLanes)!==0,dn||B){if(B=Mt,B!==null&&(v=lg(B,p),v!==0&&v!==ee.retryLane))throw ee.retryLane=v,ml(s,v),gr(B,s,v),y1;rS(W)||sv(),c=E1(s,c,p)}else rS(W)?(c.flags|=192,c.child=s.child,c=null):(s=ee.treeContext,Bt=Zr(W.nextSibling),Rn=c,st=!0,Mo=null,Yr=!1,s!==null&&fD(c,s),c=_1(c,v.children),c.flags|=4096);return c}return C?(Bo(),W=v.fallback,C=c.mode,ee=s.child,ue=ee.sibling,v=Oa(ee,{mode:"hidden",children:v.children}),v.subtreeFlags=ee.subtreeFlags&65011712,ue!==null?W=Oa(ue,W):(W=gl(W,C,p,null),W.flags|=2),W.return=c,v.return=c,v.sibling=W,c.child=v,sh(null,v),v=c.child,W=s.child.memoizedState,W===null?W=w1(p):(C=W.cachePool,C!==null?(ee=cn._currentValue,C=C.parent!==ee?{parent:ee,pool:ee}:C):C=vD(),W={baseLanes:W.baseLanes|p,cachePool:C}),v.memoizedState=W,v.childLanes=S1(s,B,p),c.memoizedState=x1,sh(s.child,v)):($o(c),p=s.child,s=p.sibling,p=Oa(p,{mode:"visible",children:v.children}),p.return=c,p.sibling=null,s!==null&&(B=c.deletions,B===null?(c.deletions=[s],c.flags|=16):B.push(s)),c.child=p,c.memoizedState=null,p)}function _1(s,c){return c=Qg({mode:"visible",children:c},s.mode),c.return=s,s.child=c}function Qg(s,c){return s=Cr(22,s,null,c),s.lanes=0,s}function E1(s,c,p){return _l(c,s.child,null,p),s=_1(c,c.pendingProps.children),s.flags|=2,c.memoizedState=null,s}function NI(s,c,p){s.lanes|=c;var v=s.alternate;v!==null&&(v.lanes|=c),Bw(s.return,c,p)}function A1(s,c,p,v,C,N){var B=s.memoizedState;B===null?s.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:v,tail:p,tailMode:C,treeForkCount:N}:(B.isBackwards=c,B.rendering=null,B.renderingStartTime=0,B.last=v,B.tail=p,B.tailMode=C,B.treeForkCount=N)}function PI(s,c,p){var v=c.pendingProps,C=v.revealOrder,N=v.tail;v=v.children;var B=sn.current,W=(B&2)!==0;if(W?(B=B&1|2,c.flags|=128):B&=1,X(sn,B),Dn(s,c,v,p),v=st?Kd:0,!W&&s!==null&&(s.flags&128)!==0)e:for(s=c.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&NI(s,p,c);else if(s.tag===19)NI(s,p,c);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===c)break e;for(;s.sibling===null;){if(s.return===null||s.return===c)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(C){case"forwards":for(p=c.child,C=null;p!==null;)s=p.alternate,s!==null&&qg(s)===null&&(C=p),p=p.sibling;p=C,p===null?(C=c.child,c.child=null):(C=p.sibling,p.sibling=null),A1(c,!1,C,p,N,v);break;case"backwards":case"unstable_legacy-backwards":for(p=null,C=c.child,c.child=null;C!==null;){if(s=C.alternate,s!==null&&qg(s)===null){c.child=C;break}s=C.sibling,C.sibling=p,p=C,C=s}A1(c,!0,p,null,N,v);break;case"together":A1(c,!1,null,null,void 0,v);break;default:c.memoizedState=null}return c.child}function ka(s,c,p){if(s!==null&&(c.dependencies=s.dependencies),Vo|=c.lanes,(p&c.childLanes)===0)if(s!==null){if(ac(s,c,p,!1),(p&c.childLanes)===0)return null}else return null;if(s!==null&&c.child!==s.child)throw Error(r(153));if(c.child!==null){for(s=c.child,p=Oa(s,s.pendingProps),c.child=p,p.return=c;s.sibling!==null;)s=s.sibling,p=p.sibling=Oa(s,s.pendingProps),p.return=c;p.sibling=null}return c.child}function T1(s,c){return(s.lanes&c)!==0?!0:(s=s.dependencies,!!(s!==null&&Mg(s)))}function hre(s,c,p){switch(c.tag){case 3:re(c,c.stateNode.containerInfo),ko(c,cn,s.memoizedState.cache),vl();break;case 27:case 5:fe(c);break;case 4:re(c,c.stateNode.containerInfo);break;case 10:ko(c,c.type,c.memoizedProps.value);break;case 31:if(c.memoizedState!==null)return c.flags|=128,Zw(c),null;break;case 13:var v=c.memoizedState;if(v!==null)return v.dehydrated!==null?($o(c),c.flags|=128,null):(p&c.child.childLanes)!==0?jI(s,c,p):($o(c),s=ka(s,c,p),s!==null?s.sibling:null);$o(c);break;case 19:var C=(s.flags&128)!==0;if(v=(p&c.childLanes)!==0,v||(ac(s,c,p,!1),v=(p&c.childLanes)!==0),C){if(v)return PI(s,c,p);c.flags|=128}if(C=c.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),X(sn,sn.current),v)break;return null;case 22:return c.lanes=0,_I(s,c,p,c.pendingProps);case 24:ko(c,cn,s.memoizedState.cache)}return ka(s,c,p)}function MI(s,c,p){if(s!==null)if(s.memoizedProps!==c.pendingProps)dn=!0;else{if(!T1(s,p)&&(c.flags&128)===0)return dn=!1,hre(s,c,p);dn=(s.flags&131072)!==0}else dn=!1,st&&(c.flags&1048576)!==0&&cD(c,Kd,c.index);switch(c.lanes=0,c.tag){case 16:e:{var v=c.pendingProps;if(s=wl(c.elementType),c.type=s,typeof s=="function")Pw(s)?(v=Al(s,v),c.tag=1,c=CI(null,c,s,v,p)):(c.tag=0,c=b1(null,c,s,v,p));else{if(s!=null){var C=s.$$typeof;if(C===A){c.tag=11,c=xI(null,c,s,v,p);break e}else if(C===P){c.tag=14,c=wI(null,c,s,v,p);break e}}throw c=$(s)||s,Error(r(306,c,""))}}return c;case 0:return b1(s,c,c.type,c.pendingProps,p);case 1:return v=c.type,C=Al(v,c.pendingProps),CI(s,c,v,C,p);case 3:e:{if(re(c,c.stateNode.containerInfo),s===null)throw Error(r(387));v=c.pendingProps;var N=c.memoizedState;C=N.element,Gw(s,c),nh(c,v,null,p);var B=c.memoizedState;if(v=B.cache,ko(c,cn,v),v!==N.cache&&qw(c,[cn],p,!0),th(),v=B.element,N.isDehydrated)if(N={element:v,isDehydrated:!1,cache:B.cache},c.updateQueue.baseState=N,c.memoizedState=N,c.flags&256){c=OI(s,c,v,p);break e}else if(v!==C){C=Gr(Error(r(424)),c),Yd(C),c=OI(s,c,v,p);break e}else{switch(s=c.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Bt=Zr(s.firstChild),Rn=c,st=!0,Mo=null,Yr=!0,p=_D(c,null,v,p),c.child=p;p;)p.flags=p.flags&-3|4096,p=p.sibling}else{if(vl(),v===C){c=ka(s,c,p);break e}Dn(s,c,v,p)}c=c.child}return c;case 26:return Zg(s,c),s===null?(p=FL(c.type,null,c.pendingProps,null))?c.memoizedState=p:st||(p=c.type,s=c.pendingProps,v=pv(Q.current).createElement(p),v[xn]=c,v[Un]=s,In(v,p,s),un(v),c.stateNode=v):c.memoizedState=FL(c.type,s.memoizedProps,c.pendingProps,s.memoizedState),null;case 27:return fe(c),s===null&&st&&(v=c.stateNode=qL(c.type,c.pendingProps,Q.current),Rn=c,Yr=!0,C=Bt,Wo(c.type)?(aS=C,Bt=Zr(v.firstChild)):Bt=C),Dn(s,c,c.pendingProps.children,p),Zg(s,c),s===null&&(c.flags|=4194304),c.child;case 5:return s===null&&st&&((C=v=Bt)&&(v=Fre(v,c.type,c.pendingProps,Yr),v!==null?(c.stateNode=v,Rn=c,Bt=Zr(v.firstChild),Yr=!1,C=!0):C=!1),C||Ro(c)),fe(c),C=c.type,N=c.pendingProps,B=s!==null?s.memoizedProps:null,v=N.children,eS(C,N)?v=null:B!==null&&eS(C,B)&&(c.flags|=32),c.memoizedState!==null&&(C=Jw(s,c,ire,null,null,p),Sh._currentValue=C),Zg(s,c),Dn(s,c,v,p),c.child;case 6:return s===null&&st&&((s=p=Bt)&&(p=Ure(p,c.pendingProps,Yr),p!==null?(c.stateNode=p,Rn=c,Bt=null,s=!0):s=!1),s||Ro(c)),null;case 13:return jI(s,c,p);case 4:return re(c,c.stateNode.containerInfo),v=c.pendingProps,s===null?c.child=_l(c,null,v,p):Dn(s,c,v,p),c.child;case 11:return xI(s,c,c.type,c.pendingProps,p);case 7:return Dn(s,c,c.pendingProps,p),c.child;case 8:return Dn(s,c,c.pendingProps.children,p),c.child;case 12:return Dn(s,c,c.pendingProps.children,p),c.child;case 10:return v=c.pendingProps,ko(c,c.type,v.value),Dn(s,c,v.children,p),c.child;case 9:return C=c.type._context,v=c.pendingProps.children,bl(c),C=kn(C),v=v(C),c.flags|=1,Dn(s,c,v,p),c.child;case 14:return wI(s,c,c.type,c.pendingProps,p);case 15:return SI(s,c,c.type,c.pendingProps,p);case 19:return PI(s,c,p);case 31:return dre(s,c,p);case 22:return _I(s,c,p,c.pendingProps);case 24:return bl(c),v=kn(cn),s===null?(C=Fw(),C===null&&(C=Mt,N=zw(),C.pooledCache=N,N.refCount++,N!==null&&(C.pooledCacheLanes|=p),C=N),c.memoizedState={parent:v,cache:C},Hw(c),ko(c,cn,C)):((s.lanes&p)!==0&&(Gw(s,c),nh(c,null,null,p),th()),C=s.memoizedState,N=c.memoizedState,C.parent!==v?(C={parent:v,cache:v},c.memoizedState=C,c.lanes===0&&(c.memoizedState=c.updateQueue.baseState=C),ko(c,cn,v)):(v=N.cache,ko(c,cn,v),v!==C.cache&&qw(c,[cn],p,!0))),Dn(s,c,c.pendingProps.children,p),c.child;case 29:throw c.pendingProps}throw Error(r(156,c.tag))}function Da(s){s.flags|=4}function C1(s,c,p,v,C){if((c=(s.mode&32)!==0)&&(c=!1),c){if(s.flags|=16777216,(C&335544128)===C)if(s.stateNode.complete)s.flags|=8192;else if(aL())s.flags|=8192;else throw Sl=Ig,Uw}else s.flags&=-16777217}function RI(s,c){if(c.type!=="stylesheet"||(c.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!KL(c))if(aL())s.flags|=8192;else throw Sl=Ig,Uw}function Jg(s,c){c!==null&&(s.flags|=4),s.flags&16384&&(c=s.tag!==22?ag():536870912,s.lanes|=c,vc|=c)}function lh(s,c){if(!st)switch(s.tailMode){case"hidden":c=s.tail;for(var p=null;c!==null;)c.alternate!==null&&(p=c),c=c.sibling;p===null?s.tail=null:p.sibling=null;break;case"collapsed":p=s.tail;for(var v=null;p!==null;)p.alternate!==null&&(v=p),p=p.sibling;v===null?c||s.tail===null?s.tail=null:s.tail.sibling=null:v.sibling=null}}function qt(s){var c=s.alternate!==null&&s.alternate.child===s.child,p=0,v=0;if(c)for(var C=s.child;C!==null;)p|=C.lanes|C.childLanes,v|=C.subtreeFlags&65011712,v|=C.flags&65011712,C.return=s,C=C.sibling;else for(C=s.child;C!==null;)p|=C.lanes|C.childLanes,v|=C.subtreeFlags,v|=C.flags,C.return=s,C=C.sibling;return s.subtreeFlags|=v,s.childLanes=p,c}function pre(s,c,p){var v=c.pendingProps;switch(Dw(c),c.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qt(c),null;case 1:return qt(c),null;case 3:return p=c.stateNode,v=null,s!==null&&(v=s.memoizedState.cache),c.memoizedState.cache!==v&&(c.flags|=2048),Pa(cn),ne(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(ic(c)?Da(c):s===null||s.memoizedState.isDehydrated&&(c.flags&256)===0||(c.flags|=1024,Lw())),qt(c),null;case 26:var C=c.type,N=c.memoizedState;return s===null?(Da(c),N!==null?(qt(c),RI(c,N)):(qt(c),C1(c,C,null,v,p))):N?N!==s.memoizedState?(Da(c),qt(c),RI(c,N)):(qt(c),c.flags&=-16777217):(s=s.memoizedProps,s!==v&&Da(c),qt(c),C1(c,C,s,v,p)),null;case 27:if(he(c),p=Q.current,C=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&Da(c);else{if(!v){if(c.stateNode===null)throw Error(r(166));return qt(c),null}s=Y.current,ic(c)?dD(c):(s=qL(C,v,p),c.stateNode=s,Da(c))}return qt(c),null;case 5:if(he(c),C=c.type,s!==null&&c.stateNode!=null)s.memoizedProps!==v&&Da(c);else{if(!v){if(c.stateNode===null)throw Error(r(166));return qt(c),null}if(N=Y.current,ic(c))dD(c);else{var B=pv(Q.current);switch(N){case 1:N=B.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:N=B.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":N=B.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":N=B.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":N=B.createElement("div"),N.innerHTML="<script><\/script>",N=N.removeChild(N.firstChild);break;case"select":N=typeof v.is=="string"?B.createElement("select",{is:v.is}):B.createElement("select"),v.multiple?N.multiple=!0:v.size&&(N.size=v.size);break;default:N=typeof v.is=="string"?B.createElement(C,{is:v.is}):B.createElement(C)}}N[xn]=c,N[Un]=v;e:for(B=c.child;B!==null;){if(B.tag===5||B.tag===6)N.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===c)break e;for(;B.sibling===null;){if(B.return===null||B.return===c)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}c.stateNode=N;e:switch(In(N,C,v),C){case"button":case"input":case"select":case"textarea":v=!!v.autoFocus;break e;case"img":v=!0;break e;default:v=!1}v&&Da(c)}}return qt(c),C1(c,c.type,s===null?null:s.memoizedProps,c.pendingProps,p),null;case 6:if(s&&c.stateNode!=null)s.memoizedProps!==v&&Da(c);else{if(typeof v!="string"&&c.stateNode===null)throw Error(r(166));if(s=Q.current,ic(c)){if(s=c.stateNode,p=c.memoizedProps,v=null,C=Rn,C!==null)switch(C.tag){case 27:case 5:v=C.memoizedProps}s[xn]=c,s=!!(s.nodeValue===p||v!==null&&v.suppressHydrationWarning===!0||jL(s.nodeValue,p)),s||Ro(c,!0)}else s=pv(s).createTextNode(v),s[xn]=c,c.stateNode=s}return qt(c),null;case 31:if(p=c.memoizedState,s===null||s.memoizedState!==null){if(v=ic(c),p!==null){if(s===null){if(!v)throw Error(r(318));if(s=c.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[xn]=c}else vl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;qt(c),s=!1}else p=Lw(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=p),s=!0;if(!s)return c.flags&256?(jr(c),c):(jr(c),null);if((c.flags&128)!==0)throw Error(r(558))}return qt(c),null;case 13:if(v=c.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(C=ic(c),v!==null&&v.dehydrated!==null){if(s===null){if(!C)throw Error(r(318));if(C=c.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(r(317));C[xn]=c}else vl(),(c.flags&128)===0&&(c.memoizedState=null),c.flags|=4;qt(c),C=!1}else C=Lw(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=C),C=!0;if(!C)return c.flags&256?(jr(c),c):(jr(c),null)}return jr(c),(c.flags&128)!==0?(c.lanes=p,c):(p=v!==null,s=s!==null&&s.memoizedState!==null,p&&(v=c.child,C=null,v.alternate!==null&&v.alternate.memoizedState!==null&&v.alternate.memoizedState.cachePool!==null&&(C=v.alternate.memoizedState.cachePool.pool),N=null,v.memoizedState!==null&&v.memoizedState.cachePool!==null&&(N=v.memoizedState.cachePool.pool),N!==C&&(v.flags|=2048)),p!==s&&p&&(c.child.flags|=8192),Jg(c,c.updateQueue),qt(c),null);case 4:return ne(),s===null&&Y1(c.stateNode.containerInfo),qt(c),null;case 10:return Pa(c.type),qt(c),null;case 19:if(V(sn),v=c.memoizedState,v===null)return qt(c),null;if(C=(c.flags&128)!==0,N=v.rendering,N===null)if(C)lh(v,!1);else{if(tn!==0||s!==null&&(s.flags&128)!==0)for(s=c.child;s!==null;){if(N=qg(s),N!==null){for(c.flags|=128,lh(v,!1),s=N.updateQueue,c.updateQueue=s,Jg(c,s),c.subtreeFlags=0,s=p,p=c.child;p!==null;)sD(p,s),p=p.sibling;return X(sn,sn.current&1|2),st&&ja(c,v.treeForkCount),c.child}s=s.sibling}v.tail!==null&&At()>iv&&(c.flags|=128,C=!0,lh(v,!1),c.lanes=4194304)}else{if(!C)if(s=qg(N),s!==null){if(c.flags|=128,C=!0,s=s.updateQueue,c.updateQueue=s,Jg(c,s),lh(v,!0),v.tail===null&&v.tailMode==="hidden"&&!N.alternate&&!st)return qt(c),null}else 2*At()-v.renderingStartTime>iv&&p!==536870912&&(c.flags|=128,C=!0,lh(v,!1),c.lanes=4194304);v.isBackwards?(N.sibling=c.child,c.child=N):(s=v.last,s!==null?s.sibling=N:c.child=N,v.last=N)}return v.tail!==null?(s=v.tail,v.rendering=s,v.tail=s.sibling,v.renderingStartTime=At(),s.sibling=null,p=sn.current,X(sn,C?p&1|2:p&1),st&&ja(c,v.treeForkCount),s):(qt(c),null);case 22:case 23:return jr(c),Xw(),v=c.memoizedState!==null,s!==null?s.memoizedState!==null!==v&&(c.flags|=8192):v&&(c.flags|=8192),v?(p&536870912)!==0&&(c.flags&128)===0&&(qt(c),c.subtreeFlags&6&&(c.flags|=8192)):qt(c),p=c.updateQueue,p!==null&&Jg(c,p.retryQueue),p=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),v=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(v=c.memoizedState.cachePool.pool),v!==p&&(c.flags|=2048),s!==null&&V(xl),null;case 24:return p=null,s!==null&&(p=s.memoizedState.cache),c.memoizedState.cache!==p&&(c.flags|=2048),Pa(cn),qt(c),null;case 25:return null;case 30:return null}throw Error(r(156,c.tag))}function mre(s,c){switch(Dw(c),c.tag){case 1:return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 3:return Pa(cn),ne(),s=c.flags,(s&65536)!==0&&(s&128)===0?(c.flags=s&-65537|128,c):null;case 26:case 27:case 5:return he(c),null;case 31:if(c.memoizedState!==null){if(jr(c),c.alternate===null)throw Error(r(340));vl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 13:if(jr(c),s=c.memoizedState,s!==null&&s.dehydrated!==null){if(c.alternate===null)throw Error(r(340));vl()}return s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 19:return V(sn),null;case 4:return ne(),null;case 10:return Pa(c.type),null;case 22:case 23:return jr(c),Xw(),s!==null&&V(xl),s=c.flags,s&65536?(c.flags=s&-65537|128,c):null;case 24:return Pa(cn),null;case 25:return null;default:return null}}function kI(s,c){switch(Dw(c),c.tag){case 3:Pa(cn),ne();break;case 26:case 27:case 5:he(c);break;case 4:ne();break;case 31:c.memoizedState!==null&&jr(c);break;case 13:jr(c);break;case 19:V(sn);break;case 10:Pa(c.type);break;case 22:case 23:jr(c),Xw(),s!==null&&V(xl);break;case 24:Pa(cn)}}function uh(s,c){try{var p=c.updateQueue,v=p!==null?p.lastEffect:null;if(v!==null){var C=v.next;p=C;do{if((p.tag&s)===s){v=void 0;var N=p.create,B=p.inst;v=N(),B.destroy=v}p=p.next}while(p!==C)}}catch(W){_t(c,c.return,W)}}function qo(s,c,p){try{var v=c.updateQueue,C=v!==null?v.lastEffect:null;if(C!==null){var N=C.next;v=N;do{if((v.tag&s)===s){var B=v.inst,W=B.destroy;if(W!==void 0){B.destroy=void 0,C=c;var ee=p,ue=W;try{ue()}catch(pe){_t(C,ee,pe)}}}v=v.next}while(v!==N)}}catch(pe){_t(c,c.return,pe)}}function DI(s){var c=s.updateQueue;if(c!==null){var p=s.stateNode;try{AD(c,p)}catch(v){_t(s,s.return,v)}}}function II(s,c,p){p.props=Al(s.type,s.memoizedProps),p.state=s.memoizedState;try{p.componentWillUnmount()}catch(v){_t(s,c,v)}}function ch(s,c){try{var p=s.ref;if(p!==null){switch(s.tag){case 26:case 27:case 5:var v=s.stateNode;break;case 30:v=s.stateNode;break;default:v=s.stateNode}typeof p=="function"?s.refCleanup=p(v):p.current=v}}catch(C){_t(s,c,C)}}function Xi(s,c){var p=s.ref,v=s.refCleanup;if(p!==null)if(typeof v=="function")try{v()}catch(C){_t(s,c,C)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof p=="function")try{p(null)}catch(C){_t(s,c,C)}else p.current=null}function LI(s){var c=s.type,p=s.memoizedProps,v=s.stateNode;try{e:switch(c){case"button":case"input":case"select":case"textarea":p.autoFocus&&v.focus();break e;case"img":p.src?v.src=p.src:p.srcSet&&(v.srcset=p.srcSet)}}catch(C){_t(s,s.return,C)}}function O1(s,c,p){try{var v=s.stateNode;Lre(v,s.type,p,c),v[Un]=c}catch(C){_t(s,s.return,C)}}function $I(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&Wo(s.type)||s.tag===4}function j1(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||$I(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&Wo(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function N1(s,c,p){var v=s.tag;if(v===5||v===6)s=s.stateNode,c?(p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p).insertBefore(s,c):(c=p.nodeType===9?p.body:p.nodeName==="HTML"?p.ownerDocument.body:p,c.appendChild(s),p=p._reactRootContainer,p!=null||c.onclick!==null||(c.onclick=Ta));else if(v!==4&&(v===27&&Wo(s.type)&&(p=s.stateNode,c=null),s=s.child,s!==null))for(N1(s,c,p),s=s.sibling;s!==null;)N1(s,c,p),s=s.sibling}function ev(s,c,p){var v=s.tag;if(v===5||v===6)s=s.stateNode,c?p.insertBefore(s,c):p.appendChild(s);else if(v!==4&&(v===27&&Wo(s.type)&&(p=s.stateNode),s=s.child,s!==null))for(ev(s,c,p),s=s.sibling;s!==null;)ev(s,c,p),s=s.sibling}function BI(s){var c=s.stateNode,p=s.memoizedProps;try{for(var v=s.type,C=c.attributes;C.length;)c.removeAttributeNode(C[0]);In(c,v,p),c[xn]=s,c[Un]=p}catch(N){_t(s,s.return,N)}}var Ia=!1,hn=!1,P1=!1,qI=typeof WeakSet=="function"?WeakSet:Set,On=null;function gre(s,c){if(s=s.containerInfo,Q1=wv,s=Qk(s),Ew(s)){if("selectionStart"in s)var p={start:s.selectionStart,end:s.selectionEnd};else e:{p=(p=s.ownerDocument)&&p.defaultView||window;var v=p.getSelection&&p.getSelection();if(v&&v.rangeCount!==0){p=v.anchorNode;var C=v.anchorOffset,N=v.focusNode;v=v.focusOffset;try{p.nodeType,N.nodeType}catch{p=null;break e}var B=0,W=-1,ee=-1,ue=0,pe=0,ve=s,ce=null;t:for(;;){for(var de;ve!==p||C!==0&&ve.nodeType!==3||(W=B+C),ve!==N||v!==0&&ve.nodeType!==3||(ee=B+v),ve.nodeType===3&&(B+=ve.nodeValue.length),(de=ve.firstChild)!==null;)ce=ve,ve=de;for(;;){if(ve===s)break t;if(ce===p&&++ue===C&&(W=B),ce===N&&++pe===v&&(ee=B),(de=ve.nextSibling)!==null)break;ve=ce,ce=ve.parentNode}ve=de}p=W===-1||ee===-1?null:{start:W,end:ee}}else p=null}p=p||{start:0,end:0}}else p=null;for(J1={focusedElem:s,selectionRange:p},wv=!1,On=c;On!==null;)if(c=On,s=c.child,(c.subtreeFlags&1028)!==0&&s!==null)s.return=c,On=s;else for(;On!==null;){switch(c=On,N=c.alternate,s=c.flags,c.tag){case 0:if((s&4)!==0&&(s=c.updateQueue,s=s!==null?s.events:null,s!==null))for(p=0;p<s.length;p++)C=s[p],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&N!==null){s=void 0,p=c,C=N.memoizedProps,N=N.memoizedState,v=p.stateNode;try{var je=Al(p.type,C);s=v.getSnapshotBeforeUpdate(je,N),v.__reactInternalSnapshotBeforeUpdate=s}catch($e){_t(p,p.return,$e)}}break;case 3:if((s&1024)!==0){if(s=c.stateNode.containerInfo,p=s.nodeType,p===9)nS(s);else if(p===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":nS(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=c.sibling,s!==null){s.return=c.return,On=s;break}On=c.return}}function zI(s,c,p){var v=p.flags;switch(p.tag){case 0:case 11:case 15:$a(s,p),v&4&&uh(5,p);break;case 1:if($a(s,p),v&4)if(s=p.stateNode,c===null)try{s.componentDidMount()}catch(B){_t(p,p.return,B)}else{var C=Al(p.type,c.memoizedProps);c=c.memoizedState;try{s.componentDidUpdate(C,c,s.__reactInternalSnapshotBeforeUpdate)}catch(B){_t(p,p.return,B)}}v&64&&DI(p),v&512&&ch(p,p.return);break;case 3:if($a(s,p),v&64&&(s=p.updateQueue,s!==null)){if(c=null,p.child!==null)switch(p.child.tag){case 27:case 5:c=p.child.stateNode;break;case 1:c=p.child.stateNode}try{AD(s,c)}catch(B){_t(p,p.return,B)}}break;case 27:c===null&&v&4&&BI(p);case 26:case 5:$a(s,p),c===null&&v&4&&LI(p),v&512&&ch(p,p.return);break;case 12:$a(s,p);break;case 31:$a(s,p),v&4&&UI(s,p);break;case 13:$a(s,p),v&4&&HI(s,p),v&64&&(s=p.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(p=Are.bind(null,p),Hre(s,p))));break;case 22:if(v=p.memoizedState!==null||Ia,!v){c=c!==null&&c.memoizedState!==null||hn,C=Ia;var N=hn;Ia=v,(hn=c)&&!N?Ba(s,p,(p.subtreeFlags&8772)!==0):$a(s,p),Ia=C,hn=N}break;case 30:break;default:$a(s,p)}}function VI(s){var c=s.alternate;c!==null&&(s.alternate=null,VI(c)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(c=s.stateNode,c!==null&&Id(c)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var Ht=null,dr=!1;function La(s,c,p){for(p=p.child;p!==null;)FI(s,c,p),p=p.sibling}function FI(s,c,p){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(Fn,p)}catch{}switch(p.tag){case 26:hn||Xi(p,c),La(s,c,p),p.memoizedState?p.memoizedState.count--:p.stateNode&&(p=p.stateNode,p.parentNode.removeChild(p));break;case 27:hn||Xi(p,c);var v=Ht,C=dr;Wo(p.type)&&(Ht=p.stateNode,dr=!1),La(s,c,p),bh(p.stateNode),Ht=v,dr=C;break;case 5:hn||Xi(p,c);case 6:if(v=Ht,C=dr,Ht=null,La(s,c,p),Ht=v,dr=C,Ht!==null)if(dr)try{(Ht.nodeType===9?Ht.body:Ht.nodeName==="HTML"?Ht.ownerDocument.body:Ht).removeChild(p.stateNode)}catch(N){_t(p,c,N)}else try{Ht.removeChild(p.stateNode)}catch(N){_t(p,c,N)}break;case 18:Ht!==null&&(dr?(s=Ht,DL(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,p.stateNode),Ac(s)):DL(Ht,p.stateNode));break;case 4:v=Ht,C=dr,Ht=p.stateNode.containerInfo,dr=!0,La(s,c,p),Ht=v,dr=C;break;case 0:case 11:case 14:case 15:qo(2,p,c),hn||qo(4,p,c),La(s,c,p);break;case 1:hn||(Xi(p,c),v=p.stateNode,typeof v.componentWillUnmount=="function"&&II(p,c,v)),La(s,c,p);break;case 21:La(s,c,p);break;case 22:hn=(v=hn)||p.memoizedState!==null,La(s,c,p),hn=v;break;default:La(s,c,p)}}function UI(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Ac(s)}catch(p){_t(c,c.return,p)}}}function HI(s,c){if(c.memoizedState===null&&(s=c.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Ac(s)}catch(p){_t(c,c.return,p)}}function vre(s){switch(s.tag){case 31:case 13:case 19:var c=s.stateNode;return c===null&&(c=s.stateNode=new qI),c;case 22:return s=s.stateNode,c=s._retryCache,c===null&&(c=s._retryCache=new qI),c;default:throw Error(r(435,s.tag))}}function tv(s,c){var p=vre(s);c.forEach(function(v){if(!p.has(v)){p.add(v);var C=Tre.bind(null,s,v);v.then(C,C)}})}function hr(s,c){var p=c.deletions;if(p!==null)for(var v=0;v<p.length;v++){var C=p[v],N=s,B=c,W=B;e:for(;W!==null;){switch(W.tag){case 27:if(Wo(W.type)){Ht=W.stateNode,dr=!1;break e}break;case 5:Ht=W.stateNode,dr=!1;break e;case 3:case 4:Ht=W.stateNode.containerInfo,dr=!0;break e}W=W.return}if(Ht===null)throw Error(r(160));FI(N,B,C),Ht=null,dr=!1,N=C.alternate,N!==null&&(N.return=null),C.return=null}if(c.subtreeFlags&13886)for(c=c.child;c!==null;)GI(c,s),c=c.sibling}var bi=null;function GI(s,c){var p=s.alternate,v=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:hr(c,s),pr(s),v&4&&(qo(3,s,s.return),uh(3,s),qo(5,s,s.return));break;case 1:hr(c,s),pr(s),v&512&&(hn||p===null||Xi(p,p.return)),v&64&&Ia&&(s=s.updateQueue,s!==null&&(v=s.callbacks,v!==null&&(p=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=p===null?v:p.concat(v))));break;case 26:var C=bi;if(hr(c,s),pr(s),v&512&&(hn||p===null||Xi(p,p.return)),v&4){var N=p!==null?p.memoizedState:null;if(v=s.memoizedState,p===null)if(v===null)if(s.stateNode===null){e:{v=s.type,p=s.memoizedProps,C=C.ownerDocument||C;t:switch(v){case"title":N=C.getElementsByTagName("title")[0],(!N||N[ul]||N[xn]||N.namespaceURI==="http://www.w3.org/2000/svg"||N.hasAttribute("itemprop"))&&(N=C.createElement(v),C.head.insertBefore(N,C.querySelector("head > title"))),In(N,v,p),N[xn]=s,un(N),v=N;break e;case"link":var B=GL("link","href",C).get(v+(p.href||""));if(B){for(var W=0;W<B.length;W++)if(N=B[W],N.getAttribute("href")===(p.href==null||p.href===""?null:p.href)&&N.getAttribute("rel")===(p.rel==null?null:p.rel)&&N.getAttribute("title")===(p.title==null?null:p.title)&&N.getAttribute("crossorigin")===(p.crossOrigin==null?null:p.crossOrigin)){B.splice(W,1);break t}}N=C.createElement(v),In(N,v,p),C.head.appendChild(N);break;case"meta":if(B=GL("meta","content",C).get(v+(p.content||""))){for(W=0;W<B.length;W++)if(N=B[W],N.getAttribute("content")===(p.content==null?null:""+p.content)&&N.getAttribute("name")===(p.name==null?null:p.name)&&N.getAttribute("property")===(p.property==null?null:p.property)&&N.getAttribute("http-equiv")===(p.httpEquiv==null?null:p.httpEquiv)&&N.getAttribute("charset")===(p.charSet==null?null:p.charSet)){B.splice(W,1);break t}}N=C.createElement(v),In(N,v,p),C.head.appendChild(N);break;default:throw Error(r(468,v))}N[xn]=s,un(N),v=N}s.stateNode=v}else WL(C,s.type,s.stateNode);else s.stateNode=HL(C,v,s.memoizedProps);else N!==v?(N===null?p.stateNode!==null&&(p=p.stateNode,p.parentNode.removeChild(p)):N.count--,v===null?WL(C,s.type,s.stateNode):HL(C,v,s.memoizedProps)):v===null&&s.stateNode!==null&&O1(s,s.memoizedProps,p.memoizedProps)}break;case 27:hr(c,s),pr(s),v&512&&(hn||p===null||Xi(p,p.return)),p!==null&&v&4&&O1(s,s.memoizedProps,p.memoizedProps);break;case 5:if(hr(c,s),pr(s),v&512&&(hn||p===null||Xi(p,p.return)),s.flags&32){C=s.stateNode;try{Ku(C,"")}catch(je){_t(s,s.return,je)}}v&4&&s.stateNode!=null&&(C=s.memoizedProps,O1(s,C,p!==null?p.memoizedProps:C)),v&1024&&(P1=!0);break;case 6:if(hr(c,s),pr(s),v&4){if(s.stateNode===null)throw Error(r(162));v=s.memoizedProps,p=s.stateNode;try{p.nodeValue=v}catch(je){_t(s,s.return,je)}}break;case 3:if(vv=null,C=bi,bi=mv(c.containerInfo),hr(c,s),bi=C,pr(s),v&4&&p!==null&&p.memoizedState.isDehydrated)try{Ac(c.containerInfo)}catch(je){_t(s,s.return,je)}P1&&(P1=!1,WI(s));break;case 4:v=bi,bi=mv(s.stateNode.containerInfo),hr(c,s),pr(s),bi=v;break;case 12:hr(c,s),pr(s);break;case 31:hr(c,s),pr(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,tv(s,v)));break;case 13:hr(c,s),pr(s),s.child.flags&8192&&s.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(rv=At()),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,tv(s,v)));break;case 22:C=s.memoizedState!==null;var ee=p!==null&&p.memoizedState!==null,ue=Ia,pe=hn;if(Ia=ue||C,hn=pe||ee,hr(c,s),hn=pe,Ia=ue,pr(s),v&8192)e:for(c=s.stateNode,c._visibility=C?c._visibility&-2:c._visibility|1,C&&(p===null||ee||Ia||hn||Tl(s)),p=null,c=s;;){if(c.tag===5||c.tag===26){if(p===null){ee=p=c;try{if(N=ee.stateNode,C)B=N.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{W=ee.stateNode;var ve=ee.memoizedProps.style,ce=ve!=null&&ve.hasOwnProperty("display")?ve.display:null;W.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(je){_t(ee,ee.return,je)}}}else if(c.tag===6){if(p===null){ee=c;try{ee.stateNode.nodeValue=C?"":ee.memoizedProps}catch(je){_t(ee,ee.return,je)}}}else if(c.tag===18){if(p===null){ee=c;try{var de=ee.stateNode;C?IL(de,!0):IL(ee.stateNode,!1)}catch(je){_t(ee,ee.return,je)}}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===s)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break e;for(;c.sibling===null;){if(c.return===null||c.return===s)break e;p===c&&(p=null),c=c.return}p===c&&(p=null),c.sibling.return=c.return,c=c.sibling}v&4&&(v=s.updateQueue,v!==null&&(p=v.retryQueue,p!==null&&(v.retryQueue=null,tv(s,p))));break;case 19:hr(c,s),pr(s),v&4&&(v=s.updateQueue,v!==null&&(s.updateQueue=null,tv(s,v)));break;case 30:break;case 21:break;default:hr(c,s),pr(s)}}function pr(s){var c=s.flags;if(c&2){try{for(var p,v=s.return;v!==null;){if($I(v)){p=v;break}v=v.return}if(p==null)throw Error(r(160));switch(p.tag){case 27:var C=p.stateNode,N=j1(s);ev(s,N,C);break;case 5:var B=p.stateNode;p.flags&32&&(Ku(B,""),p.flags&=-33);var W=j1(s);ev(s,W,B);break;case 3:case 4:var ee=p.stateNode.containerInfo,ue=j1(s);N1(s,ue,ee);break;default:throw Error(r(161))}}catch(pe){_t(s,s.return,pe)}s.flags&=-3}c&4096&&(s.flags&=-4097)}function WI(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var c=s;WI(c),c.tag===5&&c.flags&1024&&c.stateNode.reset(),s=s.sibling}}function $a(s,c){if(c.subtreeFlags&8772)for(c=c.child;c!==null;)zI(s,c.alternate,c),c=c.sibling}function Tl(s){for(s=s.child;s!==null;){var c=s;switch(c.tag){case 0:case 11:case 14:case 15:qo(4,c,c.return),Tl(c);break;case 1:Xi(c,c.return);var p=c.stateNode;typeof p.componentWillUnmount=="function"&&II(c,c.return,p),Tl(c);break;case 27:bh(c.stateNode);case 26:case 5:Xi(c,c.return),Tl(c);break;case 22:c.memoizedState===null&&Tl(c);break;case 30:Tl(c);break;default:Tl(c)}s=s.sibling}}function Ba(s,c,p){for(p=p&&(c.subtreeFlags&8772)!==0,c=c.child;c!==null;){var v=c.alternate,C=s,N=c,B=N.flags;switch(N.tag){case 0:case 11:case 15:Ba(C,N,p),uh(4,N);break;case 1:if(Ba(C,N,p),v=N,C=v.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(ue){_t(v,v.return,ue)}if(v=N,C=v.updateQueue,C!==null){var W=v.stateNode;try{var ee=C.shared.hiddenCallbacks;if(ee!==null)for(C.shared.hiddenCallbacks=null,C=0;C<ee.length;C++)ED(ee[C],W)}catch(ue){_t(v,v.return,ue)}}p&&B&64&&DI(N),ch(N,N.return);break;case 27:BI(N);case 26:case 5:Ba(C,N,p),p&&v===null&&B&4&&LI(N),ch(N,N.return);break;case 12:Ba(C,N,p);break;case 31:Ba(C,N,p),p&&B&4&&UI(C,N);break;case 13:Ba(C,N,p),p&&B&4&&HI(C,N);break;case 22:N.memoizedState===null&&Ba(C,N,p),ch(N,N.return);break;case 30:break;default:Ba(C,N,p)}c=c.sibling}}function M1(s,c){var p=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(p=s.memoizedState.cachePool.pool),s=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(s=c.memoizedState.cachePool.pool),s!==p&&(s!=null&&s.refCount++,p!=null&&Xd(p))}function R1(s,c){s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&Xd(s))}function xi(s,c,p,v){if(c.subtreeFlags&10256)for(c=c.child;c!==null;)KI(s,c,p,v),c=c.sibling}function KI(s,c,p,v){var C=c.flags;switch(c.tag){case 0:case 11:case 15:xi(s,c,p,v),C&2048&&uh(9,c);break;case 1:xi(s,c,p,v);break;case 3:xi(s,c,p,v),C&2048&&(s=null,c.alternate!==null&&(s=c.alternate.memoizedState.cache),c=c.memoizedState.cache,c!==s&&(c.refCount++,s!=null&&Xd(s)));break;case 12:if(C&2048){xi(s,c,p,v),s=c.stateNode;try{var N=c.memoizedProps,B=N.id,W=N.onPostCommit;typeof W=="function"&&W(B,c.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(ee){_t(c,c.return,ee)}}else xi(s,c,p,v);break;case 31:xi(s,c,p,v);break;case 13:xi(s,c,p,v);break;case 23:break;case 22:N=c.stateNode,B=c.alternate,c.memoizedState!==null?N._visibility&2?xi(s,c,p,v):fh(s,c):N._visibility&2?xi(s,c,p,v):(N._visibility|=2,pc(s,c,p,v,(c.subtreeFlags&10256)!==0||!1)),C&2048&&M1(B,c);break;case 24:xi(s,c,p,v),C&2048&&R1(c.alternate,c);break;default:xi(s,c,p,v)}}function pc(s,c,p,v,C){for(C=C&&((c.subtreeFlags&10256)!==0||!1),c=c.child;c!==null;){var N=s,B=c,W=p,ee=v,ue=B.flags;switch(B.tag){case 0:case 11:case 15:pc(N,B,W,ee,C),uh(8,B);break;case 23:break;case 22:var pe=B.stateNode;B.memoizedState!==null?pe._visibility&2?pc(N,B,W,ee,C):fh(N,B):(pe._visibility|=2,pc(N,B,W,ee,C)),C&&ue&2048&&M1(B.alternate,B);break;case 24:pc(N,B,W,ee,C),C&&ue&2048&&R1(B.alternate,B);break;default:pc(N,B,W,ee,C)}c=c.sibling}}function fh(s,c){if(c.subtreeFlags&10256)for(c=c.child;c!==null;){var p=s,v=c,C=v.flags;switch(v.tag){case 22:fh(p,v),C&2048&&M1(v.alternate,v);break;case 24:fh(p,v),C&2048&&R1(v.alternate,v);break;default:fh(p,v)}c=c.sibling}}var dh=8192;function mc(s,c,p){if(s.subtreeFlags&dh)for(s=s.child;s!==null;)YI(s,c,p),s=s.sibling}function YI(s,c,p){switch(s.tag){case 26:mc(s,c,p),s.flags&dh&&s.memoizedState!==null&&rie(p,bi,s.memoizedState,s.memoizedProps);break;case 5:mc(s,c,p);break;case 3:case 4:var v=bi;bi=mv(s.stateNode.containerInfo),mc(s,c,p),bi=v;break;case 22:s.memoizedState===null&&(v=s.alternate,v!==null&&v.memoizedState!==null?(v=dh,dh=16777216,mc(s,c,p),dh=v):mc(s,c,p));break;default:mc(s,c,p)}}function XI(s){var c=s.alternate;if(c!==null&&(s=c.child,s!==null)){c.child=null;do c=s.sibling,s.sibling=null,s=c;while(s!==null)}}function hh(s){var c=s.deletions;if((s.flags&16)!==0){if(c!==null)for(var p=0;p<c.length;p++){var v=c[p];On=v,QI(v,s)}XI(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)ZI(s),s=s.sibling}function ZI(s){switch(s.tag){case 0:case 11:case 15:hh(s),s.flags&2048&&qo(9,s,s.return);break;case 3:hh(s);break;case 12:hh(s);break;case 22:var c=s.stateNode;s.memoizedState!==null&&c._visibility&2&&(s.return===null||s.return.tag!==13)?(c._visibility&=-3,nv(s)):hh(s);break;default:hh(s)}}function nv(s){var c=s.deletions;if((s.flags&16)!==0){if(c!==null)for(var p=0;p<c.length;p++){var v=c[p];On=v,QI(v,s)}XI(s)}for(s=s.child;s!==null;){switch(c=s,c.tag){case 0:case 11:case 15:qo(8,c,c.return),nv(c);break;case 22:p=c.stateNode,p._visibility&2&&(p._visibility&=-3,nv(c));break;default:nv(c)}s=s.sibling}}function QI(s,c){for(;On!==null;){var p=On;switch(p.tag){case 0:case 11:case 15:qo(8,p,c);break;case 23:case 22:if(p.memoizedState!==null&&p.memoizedState.cachePool!==null){var v=p.memoizedState.cachePool.pool;v!=null&&v.refCount++}break;case 24:Xd(p.memoizedState.cache)}if(v=p.child,v!==null)v.return=p,On=v;else e:for(p=s;On!==null;){v=On;var C=v.sibling,N=v.return;if(VI(v),v===p){On=null;break e}if(C!==null){C.return=N,On=C;break e}On=N}}}var yre={getCacheForType:function(s){var c=kn(cn),p=c.data.get(s);return p===void 0&&(p=s(),c.data.set(s,p)),p},cacheSignal:function(){return kn(cn).controller.signal}},bre=typeof WeakMap=="function"?WeakMap:Map,vt=0,Mt=null,Qe=null,rt=0,St=0,Nr=null,zo=!1,gc=!1,k1=!1,qa=0,tn=0,Vo=0,Cl=0,D1=0,Pr=0,vc=0,ph=null,mr=null,I1=!1,rv=0,JI=0,iv=1/0,av=null,Fo=null,wn=0,Uo=null,yc=null,za=0,L1=0,$1=null,eL=null,mh=0,B1=null;function Mr(){return(vt&2)!==0&&rt!==0?rt&-rt:L.T!==null?H1():ug()}function tL(){if(Pr===0)if((rt&536870912)===0||st){var s=Vu;Vu<<=1,(Vu&3932160)===0&&(Vu=262144),Pr=s}else Pr=536870912;return s=Or.current,s!==null&&(s.flags|=32),Pr}function gr(s,c,p){(s===Mt&&(St===2||St===9)||s.cancelPendingCommit!==null)&&(bc(s,0),Ho(s,rt,Pr,!1)),ll(s,p),((vt&2)===0||s!==Mt)&&(s===Mt&&((vt&2)===0&&(Cl|=p),tn===4&&Ho(s,rt,Pr,!1)),Zi(s))}function nL(s,c,p){if((vt&6)!==0)throw Error(r(327));var v=!p&&(c&127)===0&&(c&s.expiredLanes)===0||sl(s,c),C=v?Sre(s,c):z1(s,c,!0),N=v;do{if(C===0){gc&&!v&&Ho(s,c,0,!1);break}else{if(p=s.current.alternate,N&&!xre(p)){C=z1(s,c,!1),N=!1;continue}if(C===2){if(N=c,s.errorRecoveryDisabledLanes&N)var B=0;else B=s.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){c=B;e:{var W=s;C=ph;var ee=W.current.memoizedState.isDehydrated;if(ee&&(bc(W,B).flags|=256),B=z1(W,B,!1),B!==2){if(k1&&!ee){W.errorRecoveryDisabledLanes|=N,Cl|=N,C=4;break e}N=mr,mr=C,N!==null&&(mr===null?mr=N:mr.push.apply(mr,N))}C=B}if(N=!1,C!==2)continue}}if(C===1){bc(s,0),Ho(s,c,0,!0);break}e:{switch(v=s,N=C,N){case 0:case 1:throw Error(r(345));case 4:if((c&4194048)!==c)break;case 6:Ho(v,c,Pr,!zo);break e;case 2:mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((c&62914560)===c&&(C=rv+300-At(),10<C)){if(Ho(v,c,Pr,!zo),Uu(v,0,!0)!==0)break e;za=c,v.timeoutHandle=RL(rL.bind(null,v,p,mr,av,I1,c,Pr,Cl,vc,zo,N,"Throttled",-0,0),C);break e}rL(v,p,mr,av,I1,c,Pr,Cl,vc,zo,N,null,-0,0)}}break}while(!0);Zi(s)}function rL(s,c,p,v,C,N,B,W,ee,ue,pe,ve,ce,de){if(s.timeoutHandle=-1,ve=c.subtreeFlags,ve&8192||(ve&16785408)===16785408){ve={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ta},YI(c,N,ve);var je=(N&62914560)===N?rv-At():(N&4194048)===N?JI-At():0;if(je=iie(ve,je),je!==null){za=N,s.cancelPendingCommit=je(fL.bind(null,s,c,N,p,v,C,B,W,ee,pe,ve,null,ce,de)),Ho(s,N,B,!ue);return}}fL(s,c,N,p,v,C,B,W,ee)}function xre(s){for(var c=s;;){var p=c.tag;if((p===0||p===11||p===15)&&c.flags&16384&&(p=c.updateQueue,p!==null&&(p=p.stores,p!==null)))for(var v=0;v<p.length;v++){var C=p[v],N=C.getSnapshot;C=C.value;try{if(!Tr(N(),C))return!1}catch{return!1}}if(p=c.child,c.subtreeFlags&16384&&p!==null)p.return=c,c=p;else{if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return!0;c=c.return}c.sibling.return=c.return,c=c.sibling}}return!0}function Ho(s,c,p,v){c&=~D1,c&=~Cl,s.suspendedLanes|=c,s.pingedLanes&=~c,v&&(s.warmLanes|=c),v=s.expirationTimes;for(var C=c;0<C;){var N=31-Zn(C),B=1<<N;v[N]=-1,C&=~B}p!==0&&og(s,p,c)}function ov(){return(vt&6)===0?(gh(0),!1):!0}function q1(){if(Qe!==null){if(St===0)var s=Qe.return;else s=Qe,Na=yl=null,n1(s),uc=null,Qd=0,s=Qe;for(;s!==null;)kI(s.alternate,s),s=s.return;Qe=null}}function bc(s,c){var p=s.timeoutHandle;p!==-1&&(s.timeoutHandle=-1,qre(p)),p=s.cancelPendingCommit,p!==null&&(s.cancelPendingCommit=null,p()),za=0,q1(),Mt=s,Qe=p=Oa(s.current,null),rt=c,St=0,Nr=null,zo=!1,gc=sl(s,c),k1=!1,vc=Pr=D1=Cl=Vo=tn=0,mr=ph=null,I1=!1,(c&8)!==0&&(c|=c&32);var v=s.entangledLanes;if(v!==0)for(s=s.entanglements,v&=c;0<v;){var C=31-Zn(v),N=1<<C;c|=s[C],v&=~N}return qa=c,Cg(),p}function iL(s,c){Ue=null,L.H=oh,c===lc||c===Dg?(c=xD(),St=3):c===Uw?(c=xD(),St=4):St=c===y1?8:c!==null&&typeof c=="object"&&typeof c.then=="function"?6:1,Nr=c,Qe===null&&(tn=1,Yg(s,Gr(c,s.current)))}function aL(){var s=Or.current;return s===null?!0:(rt&4194048)===rt?Xr===null:(rt&62914560)===rt||(rt&536870912)!==0?s===Xr:!1}function oL(){var s=L.H;return L.H=oh,s===null?oh:s}function sL(){var s=L.A;return L.A=yre,s}function sv(){tn=4,zo||(rt&4194048)!==rt&&Or.current!==null||(gc=!0),(Vo&134217727)===0&&(Cl&134217727)===0||Mt===null||Ho(Mt,rt,Pr,!1)}function z1(s,c,p){var v=vt;vt|=2;var C=oL(),N=sL();(Mt!==s||rt!==c)&&(av=null,bc(s,c)),c=!1;var B=tn;e:do try{if(St!==0&&Qe!==null){var W=Qe,ee=Nr;switch(St){case 8:q1(),B=6;break e;case 3:case 2:case 9:case 6:Or.current===null&&(c=!0);var ue=St;if(St=0,Nr=null,xc(s,W,ee,ue),p&&gc){B=0;break e}break;default:ue=St,St=0,Nr=null,xc(s,W,ee,ue)}}wre(),B=tn;break}catch(pe){iL(s,pe)}while(!0);return c&&s.shellSuspendCounter++,Na=yl=null,vt=v,L.H=C,L.A=N,Qe===null&&(Mt=null,rt=0,Cg()),B}function wre(){for(;Qe!==null;)lL(Qe)}function Sre(s,c){var p=vt;vt|=2;var v=oL(),C=sL();Mt!==s||rt!==c?(av=null,iv=At()+500,bc(s,c)):gc=sl(s,c);e:do try{if(St!==0&&Qe!==null){c=Qe;var N=Nr;t:switch(St){case 1:St=0,Nr=null,xc(s,c,N,1);break;case 2:case 9:if(yD(N)){St=0,Nr=null,uL(c);break}c=function(){St!==2&&St!==9||Mt!==s||(St=7),Zi(s)},N.then(c,c);break e;case 3:St=7;break e;case 4:St=5;break e;case 7:yD(N)?(St=0,Nr=null,uL(c)):(St=0,Nr=null,xc(s,c,N,7));break;case 5:var B=null;switch(Qe.tag){case 26:B=Qe.memoizedState;case 5:case 27:var W=Qe;if(B?KL(B):W.stateNode.complete){St=0,Nr=null;var ee=W.sibling;if(ee!==null)Qe=ee;else{var ue=W.return;ue!==null?(Qe=ue,lv(ue)):Qe=null}break t}}St=0,Nr=null,xc(s,c,N,5);break;case 6:St=0,Nr=null,xc(s,c,N,6);break;case 8:q1(),tn=6;break e;default:throw Error(r(462))}}_re();break}catch(pe){iL(s,pe)}while(!0);return Na=yl=null,L.H=v,L.A=C,vt=p,Qe!==null?0:(Mt=null,rt=0,Cg(),tn)}function _re(){for(;Qe!==null&&!Pt();)lL(Qe)}function lL(s){var c=MI(s.alternate,s,qa);s.memoizedProps=s.pendingProps,c===null?lv(s):Qe=c}function uL(s){var c=s,p=c.alternate;switch(c.tag){case 15:case 0:c=TI(p,c,c.pendingProps,c.type,void 0,rt);break;case 11:c=TI(p,c,c.pendingProps,c.type.render,c.ref,rt);break;case 5:n1(c);default:kI(p,c),c=Qe=sD(c,qa),c=MI(p,c,qa)}s.memoizedProps=s.pendingProps,c===null?lv(s):Qe=c}function xc(s,c,p,v){Na=yl=null,n1(c),uc=null,Qd=0;var C=c.return;try{if(fre(s,C,c,p,rt)){tn=1,Yg(s,Gr(p,s.current)),Qe=null;return}}catch(N){if(C!==null)throw Qe=C,N;tn=1,Yg(s,Gr(p,s.current)),Qe=null;return}c.flags&32768?(st||v===1?s=!0:gc||(rt&536870912)!==0?s=!1:(zo=s=!0,(v===2||v===9||v===3||v===6)&&(v=Or.current,v!==null&&v.tag===13&&(v.flags|=16384))),cL(c,s)):lv(c)}function lv(s){var c=s;do{if((c.flags&32768)!==0){cL(c,zo);return}s=c.return;var p=pre(c.alternate,c,qa);if(p!==null){Qe=p;return}if(c=c.sibling,c!==null){Qe=c;return}Qe=c=s}while(c!==null);tn===0&&(tn=5)}function cL(s,c){do{var p=mre(s.alternate,s);if(p!==null){p.flags&=32767,Qe=p;return}if(p=s.return,p!==null&&(p.flags|=32768,p.subtreeFlags=0,p.deletions=null),!c&&(s=s.sibling,s!==null)){Qe=s;return}Qe=s=p}while(s!==null);tn=6,Qe=null}function fL(s,c,p,v,C,N,B,W,ee){s.cancelPendingCommit=null;do uv();while(wn!==0);if((vt&6)!==0)throw Error(r(327));if(c!==null){if(c===s.current)throw Error(r(177));if(N=c.lanes|c.childLanes,N|=jw,aw(s,p,N,B,W,ee),s===Mt&&(Qe=Mt=null,rt=0),yc=c,Uo=s,za=p,L1=N,$1=C,eL=v,(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,Cre(Vn,function(){return gL(),null})):(s.callbackNode=null,s.callbackPriority=0),v=(c.flags&13878)!==0,(c.subtreeFlags&13878)!==0||v){v=L.T,L.T=null,C=z.p,z.p=2,B=vt,vt|=4;try{gre(s,c,p)}finally{vt=B,z.p=C,L.T=v}}wn=1,dL(),hL(),pL()}}function dL(){if(wn===1){wn=0;var s=Uo,c=yc,p=(c.flags&13878)!==0;if((c.subtreeFlags&13878)!==0||p){p=L.T,L.T=null;var v=z.p;z.p=2;var C=vt;vt|=4;try{GI(c,s);var N=J1,B=Qk(s.containerInfo),W=N.focusedElem,ee=N.selectionRange;if(B!==W&&W&&W.ownerDocument&&Zk(W.ownerDocument.documentElement,W)){if(ee!==null&&Ew(W)){var ue=ee.start,pe=ee.end;if(pe===void 0&&(pe=ue),"selectionStart"in W)W.selectionStart=ue,W.selectionEnd=Math.min(pe,W.value.length);else{var ve=W.ownerDocument||document,ce=ve&&ve.defaultView||window;if(ce.getSelection){var de=ce.getSelection(),je=W.textContent.length,$e=Math.min(ee.start,je),Ot=ee.end===void 0?$e:Math.min(ee.end,je);!de.extend&&$e>Ot&&(B=Ot,Ot=$e,$e=B);var se=Xk(W,$e),ae=Xk(W,Ot);if(se&&ae&&(de.rangeCount!==1||de.anchorNode!==se.node||de.anchorOffset!==se.offset||de.focusNode!==ae.node||de.focusOffset!==ae.offset)){var le=ve.createRange();le.setStart(se.node,se.offset),de.removeAllRanges(),$e>Ot?(de.addRange(le),de.extend(ae.node,ae.offset)):(le.setEnd(ae.node,ae.offset),de.addRange(le))}}}}for(ve=[],de=W;de=de.parentNode;)de.nodeType===1&&ve.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof W.focus=="function"&&W.focus(),W=0;W<ve.length;W++){var ge=ve[W];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}wv=!!Q1,J1=Q1=null}finally{vt=C,z.p=v,L.T=p}}s.current=c,wn=2}}function hL(){if(wn===2){wn=0;var s=Uo,c=yc,p=(c.flags&8772)!==0;if((c.subtreeFlags&8772)!==0||p){p=L.T,L.T=null;var v=z.p;z.p=2;var C=vt;vt|=4;try{zI(s,c.alternate,c)}finally{vt=C,z.p=v,L.T=p}}wn=3}}function pL(){if(wn===4||wn===3){wn=0,Et();var s=Uo,c=yc,p=za,v=eL;(c.subtreeFlags&10256)!==0||(c.flags&10256)!==0?wn=5:(wn=0,yc=Uo=null,mL(s,s.pendingLanes));var C=s.pendingLanes;if(C===0&&(Fo=null),Dd(p),c=c.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(Fn,c,void 0,(c.current.flags&128)===128)}catch{}if(v!==null){c=L.T,C=z.p,z.p=2,L.T=null;try{for(var N=s.onRecoverableError,B=0;B<v.length;B++){var W=v[B];N(W.value,{componentStack:W.stack})}}finally{L.T=c,z.p=C}}(za&3)!==0&&uv(),Zi(s),C=s.pendingLanes,(p&261930)!==0&&(C&42)!==0?s===B1?mh++:(mh=0,B1=s):mh=0,gh(0)}}function mL(s,c){(s.pooledCacheLanes&=c)===0&&(c=s.pooledCache,c!=null&&(s.pooledCache=null,Xd(c)))}function uv(){return dL(),hL(),pL(),gL()}function gL(){if(wn!==5)return!1;var s=Uo,c=L1;L1=0;var p=Dd(za),v=L.T,C=z.p;try{z.p=32>p?32:p,L.T=null,p=$1,$1=null;var N=Uo,B=za;if(wn=0,yc=Uo=null,za=0,(vt&6)!==0)throw Error(r(331));var W=vt;if(vt|=4,ZI(N.current),KI(N,N.current,B,p),vt=W,gh(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(Fn,N)}catch{}return!0}finally{z.p=C,L.T=v,mL(s,c)}}function vL(s,c,p){c=Gr(p,c),c=v1(s.stateNode,c,2),s=Lo(s,c,2),s!==null&&(ll(s,2),Zi(s))}function _t(s,c,p){if(s.tag===3)vL(s,s,p);else for(;c!==null;){if(c.tag===3){vL(c,s,p);break}else if(c.tag===1){var v=c.stateNode;if(typeof c.type.getDerivedStateFromError=="function"||typeof v.componentDidCatch=="function"&&(Fo===null||!Fo.has(v))){s=Gr(p,s),p=yI(2),v=Lo(c,p,2),v!==null&&(bI(p,v,c,s),ll(v,2),Zi(v));break}}c=c.return}}function V1(s,c,p){var v=s.pingCache;if(v===null){v=s.pingCache=new bre;var C=new Set;v.set(c,C)}else C=v.get(c),C===void 0&&(C=new Set,v.set(c,C));C.has(p)||(k1=!0,C.add(p),s=Ere.bind(null,s,c,p),c.then(s,s))}function Ere(s,c,p){var v=s.pingCache;v!==null&&v.delete(c),s.pingedLanes|=s.suspendedLanes&p,s.warmLanes&=~p,Mt===s&&(rt&p)===p&&(tn===4||tn===3&&(rt&62914560)===rt&&300>At()-rv?(vt&2)===0&&bc(s,0):D1|=p,vc===rt&&(vc=0)),Zi(s)}function yL(s,c){c===0&&(c=ag()),s=ml(s,c),s!==null&&(ll(s,c),Zi(s))}function Are(s){var c=s.memoizedState,p=0;c!==null&&(p=c.retryLane),yL(s,p)}function Tre(s,c){var p=0;switch(s.tag){case 31:case 13:var v=s.stateNode,C=s.memoizedState;C!==null&&(p=C.retryLane);break;case 19:v=s.stateNode;break;case 22:v=s.stateNode._retryCache;break;default:throw Error(r(314))}v!==null&&v.delete(c),yL(s,p)}function Cre(s,c){return It(s,c)}var cv=null,wc=null,F1=!1,fv=!1,U1=!1,Go=0;function Zi(s){s!==wc&&s.next===null&&(wc===null?cv=wc=s:wc=wc.next=s),fv=!0,F1||(F1=!0,jre())}function gh(s,c){if(!U1&&fv){U1=!0;do for(var p=!1,v=cv;v!==null;){if(s!==0){var C=v.pendingLanes;if(C===0)var N=0;else{var B=v.suspendedLanes,W=v.pingedLanes;N=(1<<31-Zn(42|s)+1)-1,N&=C&~(B&~W),N=N&201326741?N&201326741|1:N?N|2:0}N!==0&&(p=!0,SL(v,N))}else N=rt,N=Uu(v,v===Mt?N:0,v.cancelPendingCommit!==null||v.timeoutHandle!==-1),(N&3)===0||sl(v,N)||(p=!0,SL(v,N));v=v.next}while(p);U1=!1}}function Ore(){bL()}function bL(){fv=F1=!1;var s=0;Go!==0&&Bre()&&(s=Go);for(var c=At(),p=null,v=cv;v!==null;){var C=v.next,N=xL(v,c);N===0?(v.next=null,p===null?cv=C:p.next=C,C===null&&(wc=p)):(p=v,(s!==0||(N&3)!==0)&&(fv=!0)),v=C}wn!==0&&wn!==5||gh(s),Go!==0&&(Go=0)}function xL(s,c){for(var p=s.suspendedLanes,v=s.pingedLanes,C=s.expirationTimes,N=s.pendingLanes&-62914561;0<N;){var B=31-Zn(N),W=1<<B,ee=C[B];ee===-1?((W&p)===0||(W&v)!==0)&&(C[B]=iw(W,c)):ee<=c&&(s.expiredLanes|=W),N&=~W}if(c=Mt,p=rt,p=Uu(s,s===c?p:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v=s.callbackNode,p===0||s===c&&(St===2||St===9)||s.cancelPendingCommit!==null)return v!==null&&v!==null&&Ut(v),s.callbackNode=null,s.callbackPriority=0;if((p&3)===0||sl(s,p)){if(c=p&-p,c===s.callbackPriority)return c;switch(v!==null&&Ut(v),Dd(p)){case 2:case 8:p=bn;break;case 32:p=Vn;break;case 268435456:p=wa;break;default:p=Vn}return v=wL.bind(null,s),p=It(p,v),s.callbackPriority=c,s.callbackNode=p,c}return v!==null&&v!==null&&Ut(v),s.callbackPriority=2,s.callbackNode=null,2}function wL(s,c){if(wn!==0&&wn!==5)return s.callbackNode=null,s.callbackPriority=0,null;var p=s.callbackNode;if(uv()&&s.callbackNode!==p)return null;var v=rt;return v=Uu(s,s===Mt?v:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),v===0?null:(nL(s,v,c),xL(s,At()),s.callbackNode!=null&&s.callbackNode===p?wL.bind(null,s):null)}function SL(s,c){if(uv())return null;nL(s,c,!0)}function jre(){zre(function(){(vt&6)!==0?It(Lt,Ore):bL()})}function H1(){if(Go===0){var s=oc;s===0&&(s=zu,zu<<=1,(zu&261888)===0&&(zu=256)),Go=s}return Go}function _L(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:bg(""+s)}function EL(s,c){var p=c.ownerDocument.createElement("input");return p.name=c.name,p.value=c.value,s.id&&p.setAttribute("form",s.id),c.parentNode.insertBefore(p,c),s=new FormData(s),p.parentNode.removeChild(p),s}function Nre(s,c,p,v,C){if(c==="submit"&&p&&p.stateNode===C){var N=_L((C[Un]||null).action),B=v.submitter;B&&(c=(c=B[Un]||null)?_L(c.formAction):B.getAttribute("formAction"),c!==null&&(N=c,B=null));var W=new _g("action","action",null,v,C);s.push({event:W,listeners:[{instance:null,listener:function(){if(v.defaultPrevented){if(Go!==0){var ee=B?EL(C,B):new FormData(C);f1(p,{pending:!0,data:ee,method:C.method,action:N},null,ee)}}else typeof N=="function"&&(W.preventDefault(),ee=B?EL(C,B):new FormData(C),f1(p,{pending:!0,data:ee,method:C.method,action:N},N,ee))},currentTarget:C}]})}}for(var G1=0;G1<Ow.length;G1++){var W1=Ow[G1],Pre=W1.toLowerCase(),Mre=W1[0].toUpperCase()+W1.slice(1);yi(Pre,"on"+Mre)}yi(tD,"onAnimationEnd"),yi(nD,"onAnimationIteration"),yi(rD,"onAnimationStart"),yi("dblclick","onDoubleClick"),yi("focusin","onFocus"),yi("focusout","onBlur"),yi(Kne,"onTransitionRun"),yi(Yne,"onTransitionStart"),yi(Xne,"onTransitionCancel"),yi(iD,"onTransitionEnd"),Oo("onMouseEnter",["mouseout","mouseover"]),Oo("onMouseLeave",["mouseout","mouseover"]),Oo("onPointerEnter",["pointerout","pointerover"]),Oo("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vh="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(" "),Rre=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(vh));function AL(s,c){c=(c&4)!==0;for(var p=0;p<s.length;p++){var v=s[p],C=v.event;v=v.listeners;e:{var N=void 0;if(c)for(var B=v.length-1;0<=B;B--){var W=v[B],ee=W.instance,ue=W.currentTarget;if(W=W.listener,ee!==N&&C.isPropagationStopped())break e;N=W,C.currentTarget=ue;try{N(C)}catch(pe){Tg(pe)}C.currentTarget=null,N=ee}else for(B=0;B<v.length;B++){if(W=v[B],ee=W.instance,ue=W.currentTarget,W=W.listener,ee!==N&&C.isPropagationStopped())break e;N=W,C.currentTarget=ue;try{N(C)}catch(pe){Tg(pe)}C.currentTarget=null,N=ee}}}}function Je(s,c){var p=c[Hu];p===void 0&&(p=c[Hu]=new Set);var v=s+"__bubble";p.has(v)||(TL(c,s,2,!1),p.add(v))}function K1(s,c,p){var v=0;c&&(v|=4),TL(p,s,v,c)}var dv="_reactListening"+Math.random().toString(36).slice(2);function Y1(s){if(!s[dv]){s[dv]=!0,hg.forEach(function(p){p!=="selectionchange"&&(Rre.has(p)||K1(p,!1,s),K1(p,!0,s))});var c=s.nodeType===9?s:s.ownerDocument;c===null||c[dv]||(c[dv]=!0,K1("selectionchange",!1,c))}}function TL(s,c,p,v){switch(t$(c)){case 2:var C=sie;break;case 8:C=lie;break;default:C=cS}p=C.bind(null,c,p,s),C=void 0,!mw||c!=="touchstart"&&c!=="touchmove"&&c!=="wheel"||(C=!0),v?C!==void 0?s.addEventListener(c,p,{capture:!0,passive:C}):s.addEventListener(c,p,!0):C!==void 0?s.addEventListener(c,p,{passive:C}):s.addEventListener(c,p,!1)}function X1(s,c,p,v,C){var N=v;if((c&1)===0&&(c&2)===0&&v!==null)e:for(;;){if(v===null)return;var B=v.tag;if(B===3||B===4){var W=v.stateNode.containerInfo;if(W===C)break;if(B===4)for(B=v.return;B!==null;){var ee=B.tag;if((ee===3||ee===4)&&B.stateNode.containerInfo===C)return;B=B.return}for(;W!==null;){if(B=Eo(W),B===null)return;if(ee=B.tag,ee===5||ee===6||ee===26||ee===27){v=N=B;continue e}W=W.parentNode}}v=v.return}Pk(function(){var ue=N,pe=hw(p),ve=[];e:{var ce=aD.get(s);if(ce!==void 0){var de=_g,je=s;switch(s){case"keypress":if(wg(p)===0)break e;case"keydown":case"keyup":de=Tne;break;case"focusin":je="focus",de=bw;break;case"focusout":je="blur",de=bw;break;case"beforeblur":case"afterblur":de=bw;break;case"click":if(p.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=kk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=pne;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=jne;break;case tD:case nD:case rD:de=vne;break;case iD:de=Pne;break;case"scroll":case"scrollend":de=dne;break;case"wheel":de=Rne;break;case"copy":case"cut":case"paste":de=bne;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=Ik;break;case"toggle":case"beforetoggle":de=Dne}var $e=(c&4)!==0,Ot=!$e&&(s==="scroll"||s==="scrollend"),se=$e?ce!==null?ce+"Capture":null:ce;$e=[];for(var ae=ue,le;ae!==null;){var ge=ae;if(le=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||le===null||se===null||(ge=Bd(ae,se),ge!=null&&$e.push(yh(ae,ge,le))),Ot)break;ae=ae.return}0<$e.length&&(ce=new de(ce,je,null,p,pe),ve.push({event:ce,listeners:$e}))}}if((c&7)===0){e:{if(ce=s==="mouseover"||s==="pointerover",de=s==="mouseout"||s==="pointerout",ce&&p!==dw&&(je=p.relatedTarget||p.fromElement)&&(Eo(je)||je[_a]))break e;if((de||ce)&&(ce=pe.window===pe?pe:(ce=pe.ownerDocument)?ce.defaultView||ce.parentWindow:window,de?(je=p.relatedTarget||p.toElement,de=ue,je=je?Eo(je):null,je!==null&&(Ot=a(je),$e=je.tag,je!==Ot||$e!==5&&$e!==27&&$e!==6)&&(je=null)):(de=null,je=ue),de!==je)){if($e=kk,ge="onMouseLeave",se="onMouseEnter",ae="mouse",(s==="pointerout"||s==="pointerover")&&($e=Ik,ge="onPointerLeave",se="onPointerEnter",ae="pointer"),Ot=de==null?ce:To(de),le=je==null?ce:To(je),ce=new $e(ge,ae+"leave",de,p,pe),ce.target=Ot,ce.relatedTarget=le,ge=null,Eo(pe)===ue&&($e=new $e(se,ae+"enter",je,p,pe),$e.target=le,$e.relatedTarget=Ot,ge=$e),Ot=ge,de&&je)t:{for($e=kre,se=de,ae=je,le=0,ge=se;ge;ge=$e(ge))le++;ge=0;for(var Le=ae;Le;Le=$e(Le))ge++;for(;0<le-ge;)se=$e(se),le--;for(;0<ge-le;)ae=$e(ae),ge--;for(;le--;){if(se===ae||ae!==null&&se===ae.alternate){$e=se;break t}se=$e(se),ae=$e(ae)}$e=null}else $e=null;de!==null&&CL(ve,ce,de,$e,!1),je!==null&&Ot!==null&&CL(ve,Ot,je,$e,!0)}}e:{if(ce=ue?To(ue):window,de=ce.nodeName&&ce.nodeName.toLowerCase(),de==="select"||de==="input"&&ce.type==="file")var ht=Uk;else if(Vk(ce))if(Hk)ht=Hne;else{ht=Fne;var Me=Vne}else de=ce.nodeName,!de||de.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?ue&&fw(ue.elementType)&&(ht=Uk):ht=Une;if(ht&&(ht=ht(s,ue))){Fk(ve,ht,p,pe);break e}Me&&Me(s,ce,ue),s==="focusout"&&ue&&ce.type==="number"&&ue.memoizedProps.value!=null&&$d(ce,"number",ce.value)}switch(Me=ue?To(ue):window,s){case"focusin":(Vk(Me)||Me.contentEditable==="true")&&(Qu=Me,Aw=ue,Wd=null);break;case"focusout":Wd=Aw=Qu=null;break;case"mousedown":Tw=!0;break;case"contextmenu":case"mouseup":case"dragend":Tw=!1,Jk(ve,p,pe);break;case"selectionchange":if(Wne)break;case"keydown":case"keyup":Jk(ve,p,pe)}var We;if(ww)e:{switch(s){case"compositionstart":var it="onCompositionStart";break e;case"compositionend":it="onCompositionEnd";break e;case"compositionupdate":it="onCompositionUpdate";break e}it=void 0}else Zu?qk(s,p)&&(it="onCompositionEnd"):s==="keydown"&&p.keyCode===229&&(it="onCompositionStart");it&&(Lk&&p.locale!=="ko"&&(Zu||it!=="onCompositionStart"?it==="onCompositionEnd"&&Zu&&(We=Mk()):(No=pe,gw="value"in No?No.value:No.textContent,Zu=!0)),Me=hv(ue,it),0<Me.length&&(it=new Dk(it,s,null,p,pe),ve.push({event:it,listeners:Me}),We?it.data=We:(We=zk(p),We!==null&&(it.data=We)))),(We=Lne?$ne(s,p):Bne(s,p))&&(it=hv(ue,"onBeforeInput"),0<it.length&&(Me=new Dk("onBeforeInput","beforeinput",null,p,pe),ve.push({event:Me,listeners:it}),Me.data=We)),Nre(ve,s,ue,p,pe)}AL(ve,c)})}function yh(s,c,p){return{instance:s,listener:c,currentTarget:p}}function hv(s,c){for(var p=c+"Capture",v=[];s!==null;){var C=s,N=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||N===null||(C=Bd(s,p),C!=null&&v.unshift(yh(s,C,N)),C=Bd(s,c),C!=null&&v.push(yh(s,C,N))),s.tag===3)return v;s=s.return}return[]}function kre(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function CL(s,c,p,v,C){for(var N=c._reactName,B=[];p!==null&&p!==v;){var W=p,ee=W.alternate,ue=W.stateNode;if(W=W.tag,ee!==null&&ee===v)break;W!==5&&W!==26&&W!==27||ue===null||(ee=ue,C?(ue=Bd(p,N),ue!=null&&B.unshift(yh(p,ue,ee))):C||(ue=Bd(p,N),ue!=null&&B.push(yh(p,ue,ee)))),p=p.return}B.length!==0&&s.push({event:c,listeners:B})}var Dre=/\r\n?/g,Ire=/\u0000|\uFFFD/g;function OL(s){return(typeof s=="string"?s:""+s).replace(Dre,`
|
|
49
|
+
`).replace(Ire,"")}function jL(s,c){return c=OL(c),OL(s)===c}function Ct(s,c,p,v,C,N){switch(p){case"children":typeof v=="string"?c==="body"||c==="textarea"&&v===""||Ku(s,v):(typeof v=="number"||typeof v=="bigint")&&c!=="body"&&Ku(s,""+v);break;case"className":Wu(s,"class",v);break;case"tabIndex":Wu(s,"tabindex",v);break;case"dir":case"role":case"viewBox":case"width":case"height":Wu(s,p,v);break;case"style":jk(s,v,N);break;case"data":if(c!=="object"){Wu(s,"data",v);break}case"src":case"href":if(v===""&&(c!=="a"||p!=="href")){s.removeAttribute(p);break}if(v==null||typeof v=="function"||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(p);break}v=bg(""+v),s.setAttribute(p,v);break;case"action":case"formAction":if(typeof v=="function"){s.setAttribute(p,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof N=="function"&&(p==="formAction"?(c!=="input"&&Ct(s,c,"name",C.name,C,null),Ct(s,c,"formEncType",C.formEncType,C,null),Ct(s,c,"formMethod",C.formMethod,C,null),Ct(s,c,"formTarget",C.formTarget,C,null)):(Ct(s,c,"encType",C.encType,C,null),Ct(s,c,"method",C.method,C,null),Ct(s,c,"target",C.target,C,null)));if(v==null||typeof v=="symbol"||typeof v=="boolean"){s.removeAttribute(p);break}v=bg(""+v),s.setAttribute(p,v);break;case"onClick":v!=null&&(s.onclick=Ta);break;case"onScroll":v!=null&&Je("scroll",s);break;case"onScrollEnd":v!=null&&Je("scrollend",s);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(p=v.__html,p!=null){if(C.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"multiple":s.multiple=v&&typeof v!="function"&&typeof v!="symbol";break;case"muted":s.muted=v&&typeof v!="function"&&typeof v!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(v==null||typeof v=="function"||typeof v=="boolean"||typeof v=="symbol"){s.removeAttribute("xlink:href");break}p=bg(""+v),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",p);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":v!=null&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(p,""+v):s.removeAttribute(p);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":v&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(p,""):s.removeAttribute(p);break;case"capture":case"download":v===!0?s.setAttribute(p,""):v!==!1&&v!=null&&typeof v!="function"&&typeof v!="symbol"?s.setAttribute(p,v):s.removeAttribute(p);break;case"cols":case"rows":case"size":case"span":v!=null&&typeof v!="function"&&typeof v!="symbol"&&!isNaN(v)&&1<=v?s.setAttribute(p,v):s.removeAttribute(p);break;case"rowSpan":case"start":v==null||typeof v=="function"||typeof v=="symbol"||isNaN(v)?s.removeAttribute(p):s.setAttribute(p,v);break;case"popover":Je("beforetoggle",s),Je("toggle",s),Gu(s,"popover",v);break;case"xlinkActuate":vi(s,"http://www.w3.org/1999/xlink","xlink:actuate",v);break;case"xlinkArcrole":vi(s,"http://www.w3.org/1999/xlink","xlink:arcrole",v);break;case"xlinkRole":vi(s,"http://www.w3.org/1999/xlink","xlink:role",v);break;case"xlinkShow":vi(s,"http://www.w3.org/1999/xlink","xlink:show",v);break;case"xlinkTitle":vi(s,"http://www.w3.org/1999/xlink","xlink:title",v);break;case"xlinkType":vi(s,"http://www.w3.org/1999/xlink","xlink:type",v);break;case"xmlBase":vi(s,"http://www.w3.org/XML/1998/namespace","xml:base",v);break;case"xmlLang":vi(s,"http://www.w3.org/XML/1998/namespace","xml:lang",v);break;case"xmlSpace":vi(s,"http://www.w3.org/XML/1998/namespace","xml:space",v);break;case"is":Gu(s,"is",v);break;case"innerText":case"textContent":break;default:(!(2<p.length)||p[0]!=="o"&&p[0]!=="O"||p[1]!=="n"&&p[1]!=="N")&&(p=cne.get(p)||p,Gu(s,p,v))}}function Z1(s,c,p,v,C,N){switch(p){case"style":jk(s,v,N);break;case"dangerouslySetInnerHTML":if(v!=null){if(typeof v!="object"||!("__html"in v))throw Error(r(61));if(p=v.__html,p!=null){if(C.children!=null)throw Error(r(60));s.innerHTML=p}}break;case"children":typeof v=="string"?Ku(s,v):(typeof v=="number"||typeof v=="bigint")&&Ku(s,""+v);break;case"onScroll":v!=null&&Je("scroll",s);break;case"onScrollEnd":v!=null&&Je("scrollend",s);break;case"onClick":v!=null&&(s.onclick=Ta);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!pg.hasOwnProperty(p))e:{if(p[0]==="o"&&p[1]==="n"&&(C=p.endsWith("Capture"),c=p.slice(2,C?p.length-7:void 0),N=s[Un]||null,N=N!=null?N[p]:null,typeof N=="function"&&s.removeEventListener(c,N,C),typeof v=="function")){typeof N!="function"&&N!==null&&(p in s?s[p]=null:s.hasAttribute(p)&&s.removeAttribute(p)),s.addEventListener(c,v,C);break e}p in s?s[p]=v:v===!0?s.setAttribute(p,""):Gu(s,p,v)}}}function In(s,c,p){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Je("error",s),Je("load",s);var v=!1,C=!1,N;for(N in p)if(p.hasOwnProperty(N)){var B=p[N];if(B!=null)switch(N){case"src":v=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:Ct(s,c,N,B,p,null)}}C&&Ct(s,c,"srcSet",p.srcSet,p,null),v&&Ct(s,c,"src",p.src,p,null);return;case"input":Je("invalid",s);var W=N=B=C=null,ee=null,ue=null;for(v in p)if(p.hasOwnProperty(v)){var pe=p[v];if(pe!=null)switch(v){case"name":C=pe;break;case"type":B=pe;break;case"checked":ee=pe;break;case"defaultChecked":ue=pe;break;case"value":N=pe;break;case"defaultValue":W=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,c));break;default:Ct(s,c,v,pe,p,null)}}yg(s,N,W,ee,ue,B,C,!1);return;case"select":Je("invalid",s),v=B=N=null;for(C in p)if(p.hasOwnProperty(C)&&(W=p[C],W!=null))switch(C){case"value":N=W;break;case"defaultValue":B=W;break;case"multiple":v=W;default:Ct(s,c,C,W,p,null)}c=N,p=B,s.multiple=!!v,c!=null?Aa(s,!!v,c,!1):p!=null&&Aa(s,!!v,p,!0);return;case"textarea":Je("invalid",s),N=C=v=null;for(B in p)if(p.hasOwnProperty(B)&&(W=p[B],W!=null))switch(B){case"value":v=W;break;case"defaultValue":C=W;break;case"children":N=W;break;case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(91));break;default:Ct(s,c,B,W,p,null)}Ck(s,v,C,N);return;case"option":for(ee in p)if(p.hasOwnProperty(ee)&&(v=p[ee],v!=null))switch(ee){case"selected":s.selected=v&&typeof v!="function"&&typeof v!="symbol";break;default:Ct(s,c,ee,v,p,null)}return;case"dialog":Je("beforetoggle",s),Je("toggle",s),Je("cancel",s),Je("close",s);break;case"iframe":case"object":Je("load",s);break;case"video":case"audio":for(v=0;v<vh.length;v++)Je(vh[v],s);break;case"image":Je("error",s),Je("load",s);break;case"details":Je("toggle",s);break;case"embed":case"source":case"link":Je("error",s),Je("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in p)if(p.hasOwnProperty(ue)&&(v=p[ue],v!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,c));default:Ct(s,c,ue,v,p,null)}return;default:if(fw(c)){for(pe in p)p.hasOwnProperty(pe)&&(v=p[pe],v!==void 0&&Z1(s,c,pe,v,p,void 0));return}}for(W in p)p.hasOwnProperty(W)&&(v=p[W],v!=null&&Ct(s,c,W,v,p,null))}function Lre(s,c,p,v){switch(c){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,N=null,B=null,W=null,ee=null,ue=null,pe=null;for(de in p){var ve=p[de];if(p.hasOwnProperty(de)&&ve!=null)switch(de){case"checked":break;case"value":break;case"defaultValue":ee=ve;default:v.hasOwnProperty(de)||Ct(s,c,de,null,v,ve)}}for(var ce in v){var de=v[ce];if(ve=p[ce],v.hasOwnProperty(ce)&&(de!=null||ve!=null))switch(ce){case"type":N=de;break;case"name":C=de;break;case"checked":ue=de;break;case"defaultChecked":pe=de;break;case"value":B=de;break;case"defaultValue":W=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,c));break;default:de!==ve&&Ct(s,c,ce,de,v,ve)}}fl(s,B,W,ee,ue,pe,N,C);return;case"select":de=B=W=ce=null;for(N in p)if(ee=p[N],p.hasOwnProperty(N)&&ee!=null)switch(N){case"value":break;case"multiple":de=ee;default:v.hasOwnProperty(N)||Ct(s,c,N,null,v,ee)}for(C in v)if(N=v[C],ee=p[C],v.hasOwnProperty(C)&&(N!=null||ee!=null))switch(C){case"value":ce=N;break;case"defaultValue":W=N;break;case"multiple":B=N;default:N!==ee&&Ct(s,c,C,N,v,ee)}c=W,p=B,v=de,ce!=null?Aa(s,!!p,ce,!1):!!v!=!!p&&(c!=null?Aa(s,!!p,c,!0):Aa(s,!!p,p?[]:"",!1));return;case"textarea":de=ce=null;for(W in p)if(C=p[W],p.hasOwnProperty(W)&&C!=null&&!v.hasOwnProperty(W))switch(W){case"value":break;case"children":break;default:Ct(s,c,W,null,v,C)}for(B in v)if(C=v[B],N=p[B],v.hasOwnProperty(B)&&(C!=null||N!=null))switch(B){case"value":ce=C;break;case"defaultValue":de=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(r(91));break;default:C!==N&&Ct(s,c,B,C,v,N)}Tk(s,ce,de);return;case"option":for(var je in p)if(ce=p[je],p.hasOwnProperty(je)&&ce!=null&&!v.hasOwnProperty(je))switch(je){case"selected":s.selected=!1;break;default:Ct(s,c,je,null,v,ce)}for(ee in v)if(ce=v[ee],de=p[ee],v.hasOwnProperty(ee)&&ce!==de&&(ce!=null||de!=null))switch(ee){case"selected":s.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:Ct(s,c,ee,ce,v,de)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var $e in p)ce=p[$e],p.hasOwnProperty($e)&&ce!=null&&!v.hasOwnProperty($e)&&Ct(s,c,$e,null,v,ce);for(ue in v)if(ce=v[ue],de=p[ue],v.hasOwnProperty(ue)&&ce!==de&&(ce!=null||de!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,c));break;default:Ct(s,c,ue,ce,v,de)}return;default:if(fw(c)){for(var Ot in p)ce=p[Ot],p.hasOwnProperty(Ot)&&ce!==void 0&&!v.hasOwnProperty(Ot)&&Z1(s,c,Ot,void 0,v,ce);for(pe in v)ce=v[pe],de=p[pe],!v.hasOwnProperty(pe)||ce===de||ce===void 0&&de===void 0||Z1(s,c,pe,ce,v,de);return}}for(var se in p)ce=p[se],p.hasOwnProperty(se)&&ce!=null&&!v.hasOwnProperty(se)&&Ct(s,c,se,null,v,ce);for(ve in v)ce=v[ve],de=p[ve],!v.hasOwnProperty(ve)||ce===de||ce==null&&de==null||Ct(s,c,ve,ce,v,de)}function NL(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $re(){if(typeof performance.getEntriesByType=="function"){for(var s=0,c=0,p=performance.getEntriesByType("resource"),v=0;v<p.length;v++){var C=p[v],N=C.transferSize,B=C.initiatorType,W=C.duration;if(N&&W&&NL(B)){for(B=0,W=C.responseEnd,v+=1;v<p.length;v++){var ee=p[v],ue=ee.startTime;if(ue>W)break;var pe=ee.transferSize,ve=ee.initiatorType;pe&&NL(ve)&&(ee=ee.responseEnd,B+=pe*(ee<W?1:(W-ue)/(ee-ue)))}if(--v,c+=8*(N+B)/(C.duration/1e3),s++,10<s)break}}if(0<s)return c/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var Q1=null,J1=null;function pv(s){return s.nodeType===9?s:s.ownerDocument}function PL(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ML(s,c){if(s===0)switch(c){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&c==="foreignObject"?0:s}function eS(s,c){return s==="textarea"||s==="noscript"||typeof c.children=="string"||typeof c.children=="number"||typeof c.children=="bigint"||typeof c.dangerouslySetInnerHTML=="object"&&c.dangerouslySetInnerHTML!==null&&c.dangerouslySetInnerHTML.__html!=null}var tS=null;function Bre(){var s=window.event;return s&&s.type==="popstate"?s===tS?!1:(tS=s,!0):(tS=null,!1)}var RL=typeof setTimeout=="function"?setTimeout:void 0,qre=typeof clearTimeout=="function"?clearTimeout:void 0,kL=typeof Promise=="function"?Promise:void 0,zre=typeof queueMicrotask=="function"?queueMicrotask:typeof kL<"u"?function(s){return kL.resolve(null).then(s).catch(Vre)}:RL;function Vre(s){setTimeout(function(){throw s})}function Wo(s){return s==="head"}function DL(s,c){var p=c,v=0;do{var C=p.nextSibling;if(s.removeChild(p),C&&C.nodeType===8)if(p=C.data,p==="/$"||p==="/&"){if(v===0){s.removeChild(C),Ac(c);return}v--}else if(p==="$"||p==="$?"||p==="$~"||p==="$!"||p==="&")v++;else if(p==="html")bh(s.ownerDocument.documentElement);else if(p==="head"){p=s.ownerDocument.head,bh(p);for(var N=p.firstChild;N;){var B=N.nextSibling,W=N.nodeName;N[ul]||W==="SCRIPT"||W==="STYLE"||W==="LINK"&&N.rel.toLowerCase()==="stylesheet"||p.removeChild(N),N=B}}else p==="body"&&bh(s.ownerDocument.body);p=C}while(p);Ac(c)}function IL(s,c){var p=s;s=0;do{var v=p.nextSibling;if(p.nodeType===1?c?(p._stashedDisplay=p.style.display,p.style.display="none"):(p.style.display=p._stashedDisplay||"",p.getAttribute("style")===""&&p.removeAttribute("style")):p.nodeType===3&&(c?(p._stashedText=p.nodeValue,p.nodeValue=""):p.nodeValue=p._stashedText||""),v&&v.nodeType===8)if(p=v.data,p==="/$"){if(s===0)break;s--}else p!=="$"&&p!=="$?"&&p!=="$~"&&p!=="$!"||s++;p=v}while(p)}function nS(s){var c=s.firstChild;for(c&&c.nodeType===10&&(c=c.nextSibling);c;){var p=c;switch(c=c.nextSibling,p.nodeName){case"HTML":case"HEAD":case"BODY":nS(p),Id(p);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(p.rel.toLowerCase()==="stylesheet")continue}s.removeChild(p)}}function Fre(s,c,p,v){for(;s.nodeType===1;){var C=p;if(s.nodeName.toLowerCase()!==c.toLowerCase()){if(!v&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(v){if(!s[ul])switch(c){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(N=s.getAttribute("rel"),N==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(N!==C.rel||s.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||s.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||s.getAttribute("title")!==(C.title==null?null:C.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(N=s.getAttribute("src"),(N!==(C.src==null?null:C.src)||s.getAttribute("type")!==(C.type==null?null:C.type)||s.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&N&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(c==="input"&&s.type==="hidden"){var N=C.name==null?null:""+C.name;if(C.type==="hidden"&&s.getAttribute("name")===N)return s}else return s;if(s=Zr(s.nextSibling),s===null)break}return null}function Ure(s,c,p){if(c==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!p||(s=Zr(s.nextSibling),s===null))return null;return s}function LL(s,c){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!c||(s=Zr(s.nextSibling),s===null))return null;return s}function rS(s){return s.data==="$?"||s.data==="$~"}function iS(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function Hre(s,c){var p=s.ownerDocument;if(s.data==="$~")s._reactRetry=c;else if(s.data!=="$?"||p.readyState!=="loading")c();else{var v=function(){c(),p.removeEventListener("DOMContentLoaded",v)};p.addEventListener("DOMContentLoaded",v),s._reactRetry=v}}function Zr(s){for(;s!=null;s=s.nextSibling){var c=s.nodeType;if(c===1||c===3)break;if(c===8){if(c=s.data,c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"||c==="F!"||c==="F")break;if(c==="/$"||c==="/&")return null}}return s}var aS=null;function $L(s){s=s.nextSibling;for(var c=0;s;){if(s.nodeType===8){var p=s.data;if(p==="/$"||p==="/&"){if(c===0)return Zr(s.nextSibling);c--}else p!=="$"&&p!=="$!"&&p!=="$?"&&p!=="$~"&&p!=="&"||c++}s=s.nextSibling}return null}function BL(s){s=s.previousSibling;for(var c=0;s;){if(s.nodeType===8){var p=s.data;if(p==="$"||p==="$!"||p==="$?"||p==="$~"||p==="&"){if(c===0)return s;c--}else p!=="/$"&&p!=="/&"||c++}s=s.previousSibling}return null}function qL(s,c,p){switch(c=pv(p),s){case"html":if(s=c.documentElement,!s)throw Error(r(452));return s;case"head":if(s=c.head,!s)throw Error(r(453));return s;case"body":if(s=c.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function bh(s){for(var c=s.attributes;c.length;)s.removeAttributeNode(c[0]);Id(s)}var Qr=new Map,zL=new Set;function mv(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Va=z.d;z.d={f:Gre,r:Wre,D:Kre,C:Yre,L:Xre,m:Zre,X:Jre,S:Qre,M:eie};function Gre(){var s=Va.f(),c=ov();return s||c}function Wre(s){var c=Ao(s);c!==null&&c.tag===5&&c.type==="form"?iI(c):Va.r(s)}var Sc=typeof document>"u"?null:document;function VL(s,c,p){var v=Sc;if(v&&typeof c=="string"&&c){var C=cr(c);C='link[rel="'+s+'"][href="'+C+'"]',typeof p=="string"&&(C+='[crossorigin="'+p+'"]'),zL.has(C)||(zL.add(C),s={rel:s,crossOrigin:p,href:c},v.querySelector(C)===null&&(c=v.createElement("link"),In(c,"link",s),un(c),v.head.appendChild(c)))}}function Kre(s){Va.D(s),VL("dns-prefetch",s,null)}function Yre(s,c){Va.C(s,c),VL("preconnect",s,c)}function Xre(s,c,p){Va.L(s,c,p);var v=Sc;if(v&&s&&c){var C='link[rel="preload"][as="'+cr(c)+'"]';c==="image"&&p&&p.imageSrcSet?(C+='[imagesrcset="'+cr(p.imageSrcSet)+'"]',typeof p.imageSizes=="string"&&(C+='[imagesizes="'+cr(p.imageSizes)+'"]')):C+='[href="'+cr(s)+'"]';var N=C;switch(c){case"style":N=_c(s);break;case"script":N=Ec(s)}Qr.has(N)||(s=h({rel:"preload",href:c==="image"&&p&&p.imageSrcSet?void 0:s,as:c},p),Qr.set(N,s),v.querySelector(C)!==null||c==="style"&&v.querySelector(xh(N))||c==="script"&&v.querySelector(wh(N))||(c=v.createElement("link"),In(c,"link",s),un(c),v.head.appendChild(c)))}}function Zre(s,c){Va.m(s,c);var p=Sc;if(p&&s){var v=c&&typeof c.as=="string"?c.as:"script",C='link[rel="modulepreload"][as="'+cr(v)+'"][href="'+cr(s)+'"]',N=C;switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":N=Ec(s)}if(!Qr.has(N)&&(s=h({rel:"modulepreload",href:s},c),Qr.set(N,s),p.querySelector(C)===null)){switch(v){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(p.querySelector(wh(N)))return}v=p.createElement("link"),In(v,"link",s),un(v),p.head.appendChild(v)}}}function Qre(s,c,p){Va.S(s,c,p);var v=Sc;if(v&&s){var C=Co(v).hoistableStyles,N=_c(s);c=c||"default";var B=C.get(N);if(!B){var W={loading:0,preload:null};if(B=v.querySelector(xh(N)))W.loading=5;else{s=h({rel:"stylesheet",href:s,"data-precedence":c},p),(p=Qr.get(N))&&oS(s,p);var ee=B=v.createElement("link");un(ee),In(ee,"link",s),ee._p=new Promise(function(ue,pe){ee.onload=ue,ee.onerror=pe}),ee.addEventListener("load",function(){W.loading|=1}),ee.addEventListener("error",function(){W.loading|=2}),W.loading|=4,gv(B,c,v)}B={type:"stylesheet",instance:B,count:1,state:W},C.set(N,B)}}}function Jre(s,c){Va.X(s,c);var p=Sc;if(p&&s){var v=Co(p).hoistableScripts,C=Ec(s),N=v.get(C);N||(N=p.querySelector(wh(C)),N||(s=h({src:s,async:!0},c),(c=Qr.get(C))&&sS(s,c),N=p.createElement("script"),un(N),In(N,"link",s),p.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},v.set(C,N))}}function eie(s,c){Va.M(s,c);var p=Sc;if(p&&s){var v=Co(p).hoistableScripts,C=Ec(s),N=v.get(C);N||(N=p.querySelector(wh(C)),N||(s=h({src:s,async:!0,type:"module"},c),(c=Qr.get(C))&&sS(s,c),N=p.createElement("script"),un(N),In(N,"link",s),p.head.appendChild(N)),N={type:"script",instance:N,count:1,state:null},v.set(C,N))}}function FL(s,c,p,v){var C=(C=Q.current)?mv(C):null;if(!C)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof p.precedence=="string"&&typeof p.href=="string"?(c=_c(p.href),p=Co(C).hoistableStyles,v=p.get(c),v||(v={type:"style",instance:null,count:0,state:null},p.set(c,v)),v):{type:"void",instance:null,count:0,state:null};case"link":if(p.rel==="stylesheet"&&typeof p.href=="string"&&typeof p.precedence=="string"){s=_c(p.href);var N=Co(C).hoistableStyles,B=N.get(s);if(B||(C=C.ownerDocument||C,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},N.set(s,B),(N=C.querySelector(xh(s)))&&!N._p&&(B.instance=N,B.state.loading=5),Qr.has(s)||(p={rel:"preload",as:"style",href:p.href,crossOrigin:p.crossOrigin,integrity:p.integrity,media:p.media,hrefLang:p.hrefLang,referrerPolicy:p.referrerPolicy},Qr.set(s,p),N||tie(C,s,p,B.state))),c&&v===null)throw Error(r(528,""));return B}if(c&&v!==null)throw Error(r(529,""));return null;case"script":return c=p.async,p=p.src,typeof p=="string"&&c&&typeof c!="function"&&typeof c!="symbol"?(c=Ec(p),p=Co(C).hoistableScripts,v=p.get(c),v||(v={type:"script",instance:null,count:0,state:null},p.set(c,v)),v):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function _c(s){return'href="'+cr(s)+'"'}function xh(s){return'link[rel="stylesheet"]['+s+"]"}function UL(s){return h({},s,{"data-precedence":s.precedence,precedence:null})}function tie(s,c,p,v){s.querySelector('link[rel="preload"][as="style"]['+c+"]")?v.loading=1:(c=s.createElement("link"),v.preload=c,c.addEventListener("load",function(){return v.loading|=1}),c.addEventListener("error",function(){return v.loading|=2}),In(c,"link",p),un(c),s.head.appendChild(c))}function Ec(s){return'[src="'+cr(s)+'"]'}function wh(s){return"script[async]"+s}function HL(s,c,p){if(c.count++,c.instance===null)switch(c.type){case"style":var v=s.querySelector('style[data-href~="'+cr(p.href)+'"]');if(v)return c.instance=v,un(v),v;var C=h({},p,{"data-href":p.href,"data-precedence":p.precedence,href:null,precedence:null});return v=(s.ownerDocument||s).createElement("style"),un(v),In(v,"style",C),gv(v,p.precedence,s),c.instance=v;case"stylesheet":C=_c(p.href);var N=s.querySelector(xh(C));if(N)return c.state.loading|=4,c.instance=N,un(N),N;v=UL(p),(C=Qr.get(C))&&oS(v,C),N=(s.ownerDocument||s).createElement("link"),un(N);var B=N;return B._p=new Promise(function(W,ee){B.onload=W,B.onerror=ee}),In(N,"link",v),c.state.loading|=4,gv(N,p.precedence,s),c.instance=N;case"script":return N=Ec(p.src),(C=s.querySelector(wh(N)))?(c.instance=C,un(C),C):(v=p,(C=Qr.get(N))&&(v=h({},p),sS(v,C)),s=s.ownerDocument||s,C=s.createElement("script"),un(C),In(C,"link",v),s.head.appendChild(C),c.instance=C);case"void":return null;default:throw Error(r(443,c.type))}else c.type==="stylesheet"&&(c.state.loading&4)===0&&(v=c.instance,c.state.loading|=4,gv(v,p.precedence,s));return c.instance}function gv(s,c,p){for(var v=p.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=v.length?v[v.length-1]:null,N=C,B=0;B<v.length;B++){var W=v[B];if(W.dataset.precedence===c)N=W;else if(N!==C)break}N?N.parentNode.insertBefore(s,N.nextSibling):(c=p.nodeType===9?p.head:p,c.insertBefore(s,c.firstChild))}function oS(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.title==null&&(s.title=c.title)}function sS(s,c){s.crossOrigin==null&&(s.crossOrigin=c.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=c.referrerPolicy),s.integrity==null&&(s.integrity=c.integrity)}var vv=null;function GL(s,c,p){if(vv===null){var v=new Map,C=vv=new Map;C.set(p,v)}else C=vv,v=C.get(p),v||(v=new Map,C.set(p,v));if(v.has(s))return v;for(v.set(s,null),p=p.getElementsByTagName(s),C=0;C<p.length;C++){var N=p[C];if(!(N[ul]||N[xn]||s==="link"&&N.getAttribute("rel")==="stylesheet")&&N.namespaceURI!=="http://www.w3.org/2000/svg"){var B=N.getAttribute(c)||"";B=s+B;var W=v.get(B);W?W.push(N):v.set(B,[N])}}return v}function WL(s,c,p){s=s.ownerDocument||s,s.head.insertBefore(p,c==="title"?s.querySelector("head > title"):null)}function nie(s,c,p){if(p===1||c.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof c.precedence!="string"||typeof c.href!="string"||c.href==="")break;return!0;case"link":if(typeof c.rel!="string"||typeof c.href!="string"||c.href===""||c.onLoad||c.onError)break;switch(c.rel){case"stylesheet":return s=c.disabled,typeof c.precedence=="string"&&s==null;default:return!0}case"script":if(c.async&&typeof c.async!="function"&&typeof c.async!="symbol"&&!c.onLoad&&!c.onError&&c.src&&typeof c.src=="string")return!0}return!1}function KL(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function rie(s,c,p,v){if(p.type==="stylesheet"&&(typeof v.media!="string"||matchMedia(v.media).matches!==!1)&&(p.state.loading&4)===0){if(p.instance===null){var C=_c(v.href),N=c.querySelector(xh(C));if(N){c=N._p,c!==null&&typeof c=="object"&&typeof c.then=="function"&&(s.count++,s=yv.bind(s),c.then(s,s)),p.state.loading|=4,p.instance=N,un(N);return}N=c.ownerDocument||c,v=UL(v),(C=Qr.get(C))&&oS(v,C),N=N.createElement("link"),un(N);var B=N;B._p=new Promise(function(W,ee){B.onload=W,B.onerror=ee}),In(N,"link",v),p.instance=N}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(p,c),(c=p.state.preload)&&(p.state.loading&3)===0&&(s.count++,p=yv.bind(s),c.addEventListener("load",p),c.addEventListener("error",p))}}var lS=0;function iie(s,c){return s.stylesheets&&s.count===0&&xv(s,s.stylesheets),0<s.count||0<s.imgCount?function(p){var v=setTimeout(function(){if(s.stylesheets&&xv(s,s.stylesheets),s.unsuspend){var N=s.unsuspend;s.unsuspend=null,N()}},6e4+c);0<s.imgBytes&&lS===0&&(lS=62500*$re());var C=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&xv(s,s.stylesheets),s.unsuspend)){var N=s.unsuspend;s.unsuspend=null,N()}},(s.imgBytes>lS?50:800)+c);return s.unsuspend=p,function(){s.unsuspend=null,clearTimeout(v),clearTimeout(C)}}:null}function yv(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xv(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var bv=null;function xv(s,c){s.stylesheets=null,s.unsuspend!==null&&(s.count++,bv=new Map,c.forEach(aie,s),bv=null,yv.call(s))}function aie(s,c){if(!(c.state.loading&4)){var p=bv.get(s);if(p)var v=p.get(null);else{p=new Map,bv.set(s,p);for(var C=s.querySelectorAll("link[data-precedence],style[data-precedence]"),N=0;N<C.length;N++){var B=C[N];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(p.set(B.dataset.precedence,B),v=B)}v&&p.set(null,v)}C=c.instance,B=C.getAttribute("data-precedence"),N=p.get(B)||v,N===v&&p.set(null,C),p.set(B,C),this.count++,v=yv.bind(this),C.addEventListener("load",v),C.addEventListener("error",v),N?N.parentNode.insertBefore(C,N.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(C,s.firstChild)),c.state.loading|=4}}var Sh={$$typeof:_,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function oie(s,c,p,v,C,N,B,W,ee){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Rd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rd(0),this.hiddenUpdates=Rd(null),this.identifierPrefix=v,this.onUncaughtError=C,this.onCaughtError=N,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=ee,this.incompleteTransitions=new Map}function YL(s,c,p,v,C,N,B,W,ee,ue,pe,ve){return s=new oie(s,c,p,B,ee,ue,pe,ve,W),c=1,N===!0&&(c|=24),N=Cr(3,null,null,c),s.current=N,N.stateNode=s,c=zw(),c.refCount++,s.pooledCache=c,c.refCount++,N.memoizedState={element:v,isDehydrated:p,cache:c},Hw(N),s}function XL(s){return s?(s=tc,s):tc}function ZL(s,c,p,v,C,N){C=XL(C),v.context===null?v.context=C:v.pendingContext=C,v=Io(c),v.payload={element:p},N=N===void 0?null:N,N!==null&&(v.callback=N),p=Lo(s,v,c),p!==null&&(gr(p,s,c),eh(p,s,c))}function QL(s,c){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var p=s.retryLane;s.retryLane=p!==0&&p<c?p:c}}function uS(s,c){QL(s,c),(s=s.alternate)&&QL(s,c)}function JL(s){if(s.tag===13||s.tag===31){var c=ml(s,67108864);c!==null&&gr(c,s,67108864),uS(s,67108864)}}function e$(s){if(s.tag===13||s.tag===31){var c=Mr();c=kd(c);var p=ml(s,c);p!==null&&gr(p,s,c),uS(s,c)}}var wv=!0;function sie(s,c,p,v){var C=L.T;L.T=null;var N=z.p;try{z.p=2,cS(s,c,p,v)}finally{z.p=N,L.T=C}}function lie(s,c,p,v){var C=L.T;L.T=null;var N=z.p;try{z.p=8,cS(s,c,p,v)}finally{z.p=N,L.T=C}}function cS(s,c,p,v){if(wv){var C=fS(v);if(C===null)X1(s,c,v,Sv,p),n$(s,v);else if(cie(C,s,c,p,v))v.stopPropagation();else if(n$(s,v),c&4&&-1<uie.indexOf(s)){for(;C!==null;){var N=Ao(C);if(N!==null)switch(N.tag){case 3:if(N=N.stateNode,N.current.memoizedState.isDehydrated){var B=Sa(N.pendingLanes);if(B!==0){var W=N;for(W.pendingLanes|=2,W.entangledLanes|=2;B;){var ee=1<<31-Zn(B);W.entanglements[1]|=ee,B&=~ee}Zi(N),(vt&6)===0&&(iv=At()+500,gh(0))}}break;case 31:case 13:W=ml(N,2),W!==null&&gr(W,N,2),ov(),uS(N,2)}if(N=fS(v),N===null&&X1(s,c,v,Sv,p),N===C)break;C=N}C!==null&&v.stopPropagation()}else X1(s,c,v,null,p)}}function fS(s){return s=hw(s),dS(s)}var Sv=null;function dS(s){if(Sv=null,s=Eo(s),s!==null){var c=a(s);if(c===null)s=null;else{var p=c.tag;if(p===13){if(s=o(c),s!==null)return s;s=null}else if(p===31){if(s=l(c),s!==null)return s;s=null}else if(p===3){if(c.stateNode.current.memoizedState.isDehydrated)return c.tag===3?c.stateNode.containerInfo:null;s=null}else c!==s&&(s=null)}}return Sv=s,null}function t$(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ge()){case Lt:return 2;case bn:return 8;case Vn:case Bu:return 32;case wa:return 268435456;default:return 32}default:return 32}}var hS=!1,Ko=null,Yo=null,Xo=null,_h=new Map,Eh=new Map,Zo=[],uie="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function n$(s,c){switch(s){case"focusin":case"focusout":Ko=null;break;case"dragenter":case"dragleave":Yo=null;break;case"mouseover":case"mouseout":Xo=null;break;case"pointerover":case"pointerout":_h.delete(c.pointerId);break;case"gotpointercapture":case"lostpointercapture":Eh.delete(c.pointerId)}}function Ah(s,c,p,v,C,N){return s===null||s.nativeEvent!==N?(s={blockedOn:c,domEventName:p,eventSystemFlags:v,nativeEvent:N,targetContainers:[C]},c!==null&&(c=Ao(c),c!==null&&JL(c)),s):(s.eventSystemFlags|=v,c=s.targetContainers,C!==null&&c.indexOf(C)===-1&&c.push(C),s)}function cie(s,c,p,v,C){switch(c){case"focusin":return Ko=Ah(Ko,s,c,p,v,C),!0;case"dragenter":return Yo=Ah(Yo,s,c,p,v,C),!0;case"mouseover":return Xo=Ah(Xo,s,c,p,v,C),!0;case"pointerover":var N=C.pointerId;return _h.set(N,Ah(_h.get(N)||null,s,c,p,v,C)),!0;case"gotpointercapture":return N=C.pointerId,Eh.set(N,Ah(Eh.get(N)||null,s,c,p,v,C)),!0}return!1}function r$(s){var c=Eo(s.target);if(c!==null){var p=a(c);if(p!==null){if(c=p.tag,c===13){if(c=o(p),c!==null){s.blockedOn=c,cg(s.priority,function(){e$(p)});return}}else if(c===31){if(c=l(p),c!==null){s.blockedOn=c,cg(s.priority,function(){e$(p)});return}}else if(c===3&&p.stateNode.current.memoizedState.isDehydrated){s.blockedOn=p.tag===3?p.stateNode.containerInfo:null;return}}}s.blockedOn=null}function _v(s){if(s.blockedOn!==null)return!1;for(var c=s.targetContainers;0<c.length;){var p=fS(s.nativeEvent);if(p===null){p=s.nativeEvent;var v=new p.constructor(p.type,p);dw=v,p.target.dispatchEvent(v),dw=null}else return c=Ao(p),c!==null&&JL(c),s.blockedOn=p,!1;c.shift()}return!0}function i$(s,c,p){_v(s)&&p.delete(c)}function fie(){hS=!1,Ko!==null&&_v(Ko)&&(Ko=null),Yo!==null&&_v(Yo)&&(Yo=null),Xo!==null&&_v(Xo)&&(Xo=null),_h.forEach(i$),Eh.forEach(i$)}function Ev(s,c){s.blockedOn===c&&(s.blockedOn=null,hS||(hS=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,fie)))}var Av=null;function a$(s){Av!==s&&(Av=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Av===s&&(Av=null);for(var c=0;c<s.length;c+=3){var p=s[c],v=s[c+1],C=s[c+2];if(typeof v!="function"){if(dS(v||p)===null)continue;break}var N=Ao(p);N!==null&&(s.splice(c,3),c-=3,f1(N,{pending:!0,data:C,method:p.method,action:v},v,C))}}))}function Ac(s){function c(ee){return Ev(ee,s)}Ko!==null&&Ev(Ko,s),Yo!==null&&Ev(Yo,s),Xo!==null&&Ev(Xo,s),_h.forEach(c),Eh.forEach(c);for(var p=0;p<Zo.length;p++){var v=Zo[p];v.blockedOn===s&&(v.blockedOn=null)}for(;0<Zo.length&&(p=Zo[0],p.blockedOn===null);)r$(p),p.blockedOn===null&&Zo.shift();if(p=(s.ownerDocument||s).$$reactFormReplay,p!=null)for(v=0;v<p.length;v+=3){var C=p[v],N=p[v+1],B=C[Un]||null;if(typeof N=="function")B||a$(p);else if(B){var W=null;if(N&&N.hasAttribute("formAction")){if(C=N,B=N[Un]||null)W=B.formAction;else if(dS(C)!==null)continue}else W=B.action;typeof W=="function"?p[v+1]=W:(p.splice(v,3),v-=3),a$(p)}}}function o$(){function s(N){N.canIntercept&&N.info==="react-transition"&&N.intercept({handler:function(){return new Promise(function(B){return C=B})},focusReset:"manual",scroll:"manual"})}function c(){C!==null&&(C(),C=null),v||setTimeout(p,20)}function p(){if(!v&&!navigation.transition){var N=navigation.currentEntry;N&&N.url!=null&&navigation.navigate(N.url,{state:N.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var v=!1,C=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",c),navigation.addEventListener("navigateerror",c),setTimeout(p,100),function(){v=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",c),navigation.removeEventListener("navigateerror",c),C!==null&&(C(),C=null)}}}function pS(s){this._internalRoot=s}Tv.prototype.render=pS.prototype.render=function(s){var c=this._internalRoot;if(c===null)throw Error(r(409));var p=c.current,v=Mr();ZL(p,v,s,c,null,null)},Tv.prototype.unmount=pS.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var c=s.containerInfo;ZL(s.current,2,null,s,null,null),ov(),c[_a]=null}};function Tv(s){this._internalRoot=s}Tv.prototype.unstable_scheduleHydration=function(s){if(s){var c=ug();s={blockedOn:null,target:s,priority:c};for(var p=0;p<Zo.length&&c!==0&&c<Zo[p].priority;p++);Zo.splice(p,0,s),p===0&&r$(s)}};var s$=t.version;if(s$!=="19.2.5")throw Error(r(527,s$,"19.2.5"));z.findDOMNode=function(s){var c=s._reactInternals;if(c===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(c),s=s!==null?d(s):null,s=s===null?null:s.stateNode,s};var die={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cv.isDisabled&&Cv.supportsFiber)try{Fn=Cv.inject(die),Qt=Cv}catch{}}return Ch.createRoot=function(s,c){if(!i(s))throw Error(r(299));var p=!1,v="",C=pI,N=mI,B=gI;return c!=null&&(c.unstable_strictMode===!0&&(p=!0),c.identifierPrefix!==void 0&&(v=c.identifierPrefix),c.onUncaughtError!==void 0&&(C=c.onUncaughtError),c.onCaughtError!==void 0&&(N=c.onCaughtError),c.onRecoverableError!==void 0&&(B=c.onRecoverableError)),c=YL(s,1,!1,null,null,p,v,null,C,N,B,o$),s[_a]=c.current,Y1(s),new pS(c)},Ch.hydrateRoot=function(s,c,p){if(!i(s))throw Error(r(299));var v=!1,C="",N=pI,B=mI,W=gI,ee=null;return p!=null&&(p.unstable_strictMode===!0&&(v=!0),p.identifierPrefix!==void 0&&(C=p.identifierPrefix),p.onUncaughtError!==void 0&&(N=p.onUncaughtError),p.onCaughtError!==void 0&&(B=p.onCaughtError),p.onRecoverableError!==void 0&&(W=p.onRecoverableError),p.formState!==void 0&&(ee=p.formState)),c=YL(s,1,!0,c,p??null,v,C,ee,N,B,W,o$),c.context=XL(null),p=c.current,v=Mr(),v=kd(v),C=Io(v),C.callback=null,Lo(p,C,v),p=v,c.current.lanes=p,ll(c,p),Zi(c),s[_a]=c.current,Y1(s),new Tv(c)},Ch.version="19.2.5",Ch}var y$;function Sie(){if(y$)return yS.exports;y$=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yS.exports=wie(),yS.exports}var _ie=Sie();const Eie=yt(_ie);var sd=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Kl,ms,nf,c9,Aie=(c9=class extends sd{constructor(){super();De(this,Kl);De(this,ms);De(this,nf);Ae(this,nf,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){te(this,ms)||this.setEventListener(te(this,nf))}onUnsubscribe(){var t;this.hasListeners()||((t=te(this,ms))==null||t.call(this),Ae(this,ms,void 0))}setEventListener(t){var n;Ae(this,nf,t),(n=te(this,ms))==null||n.call(this),Ae(this,ms,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){te(this,Kl)!==t&&(Ae(this,Kl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof te(this,Kl)=="boolean"?te(this,Kl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Kl=new WeakMap,ms=new WeakMap,nf=new WeakMap,c9),AM=new Aie,Tie={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},gs,_M,f9,Cie=(f9=class{constructor(){De(this,gs,Tie);De(this,_M,!1)}setTimeoutProvider(e){Ae(this,gs,e)}setTimeout(e,t){return te(this,gs).setTimeout(e,t)}clearTimeout(e){te(this,gs).clearTimeout(e)}setInterval(e,t){return te(this,gs).setInterval(e,t)}clearInterval(e){te(this,gs).clearInterval(e)}},gs=new WeakMap,_M=new WeakMap,f9),$l=new Cie;function Oie(e){setTimeout(e,0)}var jie=typeof window>"u"||"Deno"in globalThis;function er(){}function Nie(e,t){return typeof e=="function"?e(t):e}function Rj(e){return typeof e=="number"&&e>=0&&e!==1/0}function S9(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ps(e,t){return typeof e=="function"?e(t):e}function ri(e,t){return typeof e=="function"?e(t):e}function b$(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==TM(o,t.options))return!1}else if(!vp(t.queryKey,o))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function x$(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(fu(t.options.mutationKey)!==fu(a))return!1}else if(!vp(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function TM(e,t){return((t==null?void 0:t.queryKeyHashFn)||fu)(e)}function fu(e){return JSON.stringify(e,(t,n)=>kj(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function vp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>vp(e[n],t[n])):!1}var Pie=Object.prototype.hasOwnProperty;function _9(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=w$(e)&&w$(t);if(!r&&!(kj(e)&&kj(t)))return t;const a=(r?e:Object.keys(e)).length,o=r?t:Object.keys(t),l=o.length,u=r?new Array(l):{};let f=0;for(let d=0;d<l;d++){const h=r?d:o[d],m=e[h],g=t[h];if(m===g){u[h]=m,(r?d<a:Pie.call(e,h))&&f++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){u[h]=g;continue}const b=_9(m,g,n+1);u[h]=b,b===m&&f++}return a===l&&f===a?e:u}function Ry(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function w$(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function kj(e){if(!S$(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!S$(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function S$(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mie(e){return new Promise(t=>{$l.setTimeout(t,e)})}function Dj(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?_9(e,t):t}function Rie(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function kie(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var CM=Symbol();function E9(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===CM?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function OM(e,t){return typeof e=="function"?e(...t):!!e}function Die(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var yp=(()=>{let e=()=>jie;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ij(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var Iie=Oie;function Lie(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=Iie;const a=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(u=>{n(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||o()}return u},batchCalls:l=>(...u)=>{a(()=>{l(...u)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var An=Lie(),rf,vs,af,d9,$ie=(d9=class extends sd{constructor(){super();De(this,rf,!0);De(this,vs);De(this,af);Ae(this,af,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){te(this,vs)||this.setEventListener(te(this,af))}onUnsubscribe(){var t;this.hasListeners()||((t=te(this,vs))==null||t.call(this),Ae(this,vs,void 0))}setEventListener(t){var n;Ae(this,af,t),(n=te(this,vs))==null||n.call(this),Ae(this,vs,t(this.setOnline.bind(this)))}setOnline(t){te(this,rf)!==t&&(Ae(this,rf,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return te(this,rf)}},rf=new WeakMap,vs=new WeakMap,af=new WeakMap,d9),ky=new $ie;function Bie(e){return Math.min(1e3*2**e,3e4)}function A9(e){return(e??"online")==="online"?ky.isOnline():!0}var Lj=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function T9(e){let t=!1,n=0,r;const i=Ij(),a=()=>i.status!=="pending",o=w=>{var y;if(!a()){const S=new Lj(w);m(S),(y=e.onCancel)==null||y.call(e,S)}},l=()=>{t=!0},u=()=>{t=!1},f=()=>AM.isFocused()&&(e.networkMode==="always"||ky.isOnline())&&e.canRun(),d=()=>A9(e.networkMode)&&e.canRun(),h=w=>{a()||(r==null||r(),i.resolve(w))},m=w=>{a()||(r==null||r(),i.reject(w))},g=()=>new Promise(w=>{var y;r=S=>{(a()||f())&&w(S)},(y=e.onPause)==null||y.call(e)}).then(()=>{var w;r=void 0,a()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(a())return;let w;const y=n===0?e.initialPromise:void 0;try{w=y??e.fn()}catch(S){w=Promise.reject(S)}Promise.resolve(w).then(h).catch(S=>{var O;if(a())return;const E=e.retry??(yp.isServer()?0:3),_=e.retryDelay??Bie,A=typeof _=="function"?_(n,S):_,T=E===!0||typeof E=="number"&&n<E||typeof E=="function"&&E(n,S);if(t||!T){m(S);return}n++,(O=e.onFail)==null||O.call(e,n,S),Mie(A).then(()=>f()?void 0:g()).then(()=>{t?m(S):b()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:u,canStart:d,start:()=>(d()?b():g().then(b),i)}}var Yl,h9,C9=(h9=class{constructor(){De(this,Yl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rj(this.gcTime)&&Ae(this,Yl,$l.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(yp.isServer()?1/0:300*1e3))}clearGcTimeout(){te(this,Yl)!==void 0&&($l.clearTimeout(te(this,Yl)),Ae(this,Yl,void 0))}},Yl=new WeakMap,h9),Xl,of,ni,Zl,jn,_m,Ql,Dr,O9,Ga,p9,qie=(p9=class extends C9{constructor(t){super();De(this,Dr);De(this,Xl);De(this,of);De(this,ni);De(this,Zl);De(this,jn);De(this,_m);De(this,Ql);Ae(this,Ql,!1),Ae(this,_m,t.defaultOptions),this.setOptions(t.options),this.observers=[],Ae(this,Zl,t.client),Ae(this,ni,te(this,Zl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Ae(this,Xl,E$(this.options)),this.state=t.state??te(this,Xl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=te(this,jn))==null?void 0:t.promise}setOptions(t){if(this.options={...te(this,_m),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=E$(this.options);n.data!==void 0&&(this.setState(_$(n.data,n.dataUpdatedAt)),Ae(this,Xl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&te(this,ni).remove(this)}setData(t,n){const r=Dj(this.state.data,t,this.options);return Ke(this,Dr,Ga).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Ke(this,Dr,Ga).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=te(this,jn))==null?void 0:r.promise;return(i=te(this,jn))==null||i.cancel(t),n?n.then(er).catch(er):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return te(this,Xl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>ri(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===CM||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ps(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!S9(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=te(this,jn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=te(this,jn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),te(this,ni).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(te(this,jn)&&(te(this,Ql)||Ke(this,Dr,O9).call(this)?te(this,jn).cancel({revert:!0}):te(this,jn).cancelRetry()),this.scheduleGc()),te(this,ni).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,Dr,Ga).call(this,{type:"invalidate"})}async fetch(t,n){var u,f,d,h,m,g,b,w,y,S,E,_;if(this.state.fetchStatus!=="idle"&&((u=te(this,jn))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(te(this,jn))return te(this,jn).continueRetry(),te(this,jn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(T=>T.options.queryFn);A&&this.setOptions(A.options)}const r=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(Ae(this,Ql,!0),r.signal)})},a=()=>{const A=E9(this.options,n),O=(()=>{const P={client:te(this,Zl),queryKey:this.queryKey,meta:this.meta};return i(P),P})();return Ae(this,Ql,!1),this.options.persister?this.options.persister(A,O,this):A(O)},l=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:te(this,Zl),state:this.state,fetchFn:a};return i(A),A})();(f=this.options.behavior)==null||f.onFetch(l,this),Ae(this,of,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Ke(this,Dr,Ga).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),Ae(this,jn,T9({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:A=>{A instanceof Lj&&A.revert&&this.setState({...te(this,of),fetchStatus:"idle"}),r.abort()},onFail:(A,T)=>{Ke(this,Dr,Ga).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{Ke(this,Dr,Ga).call(this,{type:"pause"})},onContinue:()=>{Ke(this,Dr,Ga).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const A=await te(this,jn).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(g=(m=te(this,ni).config).onSuccess)==null||g.call(m,A,this),(w=(b=te(this,ni).config).onSettled)==null||w.call(b,A,this.state.error,this),A}catch(A){if(A instanceof Lj){if(A.silent)return te(this,jn).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Ke(this,Dr,Ga).call(this,{type:"error",error:A}),(S=(y=te(this,ni).config).onError)==null||S.call(y,A,this),(_=(E=te(this,ni).config).onSettled)==null||_.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},Xl=new WeakMap,of=new WeakMap,ni=new WeakMap,Zl=new WeakMap,jn=new WeakMap,_m=new WeakMap,Ql=new WeakMap,Dr=new WeakSet,O9=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ga=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...j9(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,..._$(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ae(this,of,t.manual?i:void 0),i;case"error":const a=t.error;return{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),An.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),te(this,ni).notify({query:this,type:"updated",action:t})})},p9);function j9(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:A9(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function _$(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function E$(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var vr,lt,Em,Jn,Jl,sf,Wa,ys,Am,lf,uf,eu,tu,bs,cf,wt,Yh,$j,Bj,qj,zj,Vj,Fj,Uj,P9,m9,N9=(m9=class extends sd{constructor(t,n){super();De(this,wt);De(this,vr);De(this,lt);De(this,Em);De(this,Jn);De(this,Jl);De(this,sf);De(this,Wa);De(this,ys);De(this,Am);De(this,lf);De(this,uf);De(this,eu);De(this,tu);De(this,bs);De(this,cf,new Set);this.options=n,Ae(this,vr,t),Ae(this,ys,null),Ae(this,Wa,Ij()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(te(this,lt).addObserver(this),A$(te(this,lt),this.options)?Ke(this,wt,Yh).call(this):this.updateResult(),Ke(this,wt,zj).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Hj(te(this,lt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Hj(te(this,lt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,wt,Vj).call(this),Ke(this,wt,Fj).call(this),te(this,lt).removeObserver(this)}setOptions(t){const n=this.options,r=te(this,lt);if(this.options=te(this,vr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ri(this.options.enabled,te(this,lt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,wt,Uj).call(this),te(this,lt).setOptions(this.options),n._defaulted&&!Ry(this.options,n)&&te(this,vr).getQueryCache().notify({type:"observerOptionsUpdated",query:te(this,lt),observer:this});const i=this.hasListeners();i&&T$(te(this,lt),r,this.options,n)&&Ke(this,wt,Yh).call(this),this.updateResult(),i&&(te(this,lt)!==r||ri(this.options.enabled,te(this,lt))!==ri(n.enabled,te(this,lt))||Ps(this.options.staleTime,te(this,lt))!==Ps(n.staleTime,te(this,lt)))&&Ke(this,wt,$j).call(this);const a=Ke(this,wt,Bj).call(this);i&&(te(this,lt)!==r||ri(this.options.enabled,te(this,lt))!==ri(n.enabled,te(this,lt))||a!==te(this,bs))&&Ke(this,wt,qj).call(this,a)}getOptimisticResult(t){const n=te(this,vr).getQueryCache().build(te(this,vr),t),r=this.createResult(n,t);return Vie(this,r)&&(Ae(this,Jn,r),Ae(this,sf,this.options),Ae(this,Jl,te(this,lt).state)),r}getCurrentResult(){return te(this,Jn)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&te(this,Wa).status==="pending"&&te(this,Wa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){te(this,cf).add(t)}getCurrentQuery(){return te(this,lt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=te(this,vr).defaultQueryOptions(t),r=te(this,vr).getQueryCache().build(te(this,vr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Ke(this,wt,Yh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),te(this,Jn)))}createResult(t,n){var R;const r=te(this,lt),i=this.options,a=te(this,Jn),o=te(this,Jl),l=te(this,sf),f=t!==r?t.state:te(this,Em),{state:d}=t;let h={...d},m=!1,g;if(n._optimisticResults){const D=this.hasListeners(),I=!D&&A$(t,n),k=D&&T$(t,r,n,i);(I||k)&&(h={...h,...j9(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:y}=h;g=h.data;let S=!1;if(n.placeholderData!==void 0&&g===void 0&&y==="pending"){let D;a!=null&&a.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(D=a.data,S=!0):D=typeof n.placeholderData=="function"?n.placeholderData((R=te(this,uf))==null?void 0:R.state.data,te(this,uf)):n.placeholderData,D!==void 0&&(y="success",g=Dj(a==null?void 0:a.data,D,n),m=!0)}if(n.select&&g!==void 0&&!S)if(a&&g===(o==null?void 0:o.data)&&n.select===te(this,Am))g=te(this,lf);else try{Ae(this,Am,n.select),g=n.select(g),g=Dj(a==null?void 0:a.data,g,n),Ae(this,lf,g),Ae(this,ys,null)}catch(D){Ae(this,ys,D)}te(this,ys)&&(b=te(this,ys),g=te(this,lf),w=Date.now(),y="error");const E=h.fetchStatus==="fetching",_=y==="pending",A=y==="error",T=_&&E,O=g!==void 0,M={status:y,fetchStatus:h.fetchStatus,isPending:_,isSuccess:y==="success",isError:A,isInitialLoading:T,isLoading:T,data:g,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>f.dataUpdateCount||h.errorUpdateCount>f.errorUpdateCount,isFetching:E,isRefetching:E&&!_,isLoadingError:A&&!O,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&O,isStale:jM(t,n),refetch:this.refetch,promise:te(this,Wa),isEnabled:ri(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=M.data!==void 0,I=M.status==="error"&&!D,k=q=>{I?q.reject(M.error):D&&q.resolve(M.data)},F=()=>{const q=Ae(this,Wa,M.promise=Ij());k(q)},$=te(this,Wa);switch($.status){case"pending":t.queryHash===r.queryHash&&k($);break;case"fulfilled":(I||M.data!==$.value)&&F();break;case"rejected":(!I||M.error!==$.reason)&&F();break}}return M}updateResult(){const t=te(this,Jn),n=this.createResult(te(this,lt),this.options);if(Ae(this,Jl,te(this,lt).state),Ae(this,sf,this.options),te(this,Jl).data!==void 0&&Ae(this,uf,te(this,lt)),Ry(n,t))return;Ae(this,Jn,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!te(this,cf).size)return!0;const o=new Set(a??te(this,cf));return this.options.throwOnError&&o.add("error"),Object.keys(te(this,Jn)).some(l=>{const u=l;return te(this,Jn)[u]!==t[u]&&o.has(u)})};Ke(this,wt,P9).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,wt,zj).call(this)}},vr=new WeakMap,lt=new WeakMap,Em=new WeakMap,Jn=new WeakMap,Jl=new WeakMap,sf=new WeakMap,Wa=new WeakMap,ys=new WeakMap,Am=new WeakMap,lf=new WeakMap,uf=new WeakMap,eu=new WeakMap,tu=new WeakMap,bs=new WeakMap,cf=new WeakMap,wt=new WeakSet,Yh=function(t){Ke(this,wt,Uj).call(this);let n=te(this,lt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(er)),n},$j=function(){Ke(this,wt,Vj).call(this);const t=Ps(this.options.staleTime,te(this,lt));if(yp.isServer()||te(this,Jn).isStale||!Rj(t))return;const r=S9(te(this,Jn).dataUpdatedAt,t)+1;Ae(this,eu,$l.setTimeout(()=>{te(this,Jn).isStale||this.updateResult()},r))},Bj=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(te(this,lt)):this.options.refetchInterval)??!1},qj=function(t){Ke(this,wt,Fj).call(this),Ae(this,bs,t),!(yp.isServer()||ri(this.options.enabled,te(this,lt))===!1||!Rj(te(this,bs))||te(this,bs)===0)&&Ae(this,tu,$l.setInterval(()=>{(this.options.refetchIntervalInBackground||AM.isFocused())&&Ke(this,wt,Yh).call(this)},te(this,bs)))},zj=function(){Ke(this,wt,$j).call(this),Ke(this,wt,qj).call(this,Ke(this,wt,Bj).call(this))},Vj=function(){te(this,eu)!==void 0&&($l.clearTimeout(te(this,eu)),Ae(this,eu,void 0))},Fj=function(){te(this,tu)!==void 0&&($l.clearInterval(te(this,tu)),Ae(this,tu,void 0))},Uj=function(){const t=te(this,vr).getQueryCache().build(te(this,vr),this.options);if(t===te(this,lt))return;const n=te(this,lt);Ae(this,lt,t),Ae(this,Em,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},P9=function(t){An.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(te(this,Jn))}),te(this,vr).getQueryCache().notify({query:te(this,lt),type:"observerResultsUpdated"})})},m9);function zie(e,t){return ri(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function A$(e,t){return zie(e,t)||e.state.data!==void 0&&Hj(e,t,t.refetchOnMount)}function Hj(e,t,n){if(ri(t.enabled,e)!==!1&&Ps(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&jM(e,t)}return!1}function T$(e,t,n,r){return(e!==t||ri(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&jM(e,n)}function jM(e,t){return ri(t.enabled,e)!==!1&&e.isStaleByTime(Ps(t.staleTime,e))}function Vie(e,t){return!Ry(e.getCurrentResult(),t)}function Dy(e){return{onFetch:(t,n)=>{var d,h,m,g,b;const r=t.options,i=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,a=((g=t.state.data)==null?void 0:g.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},u=0;const f=async()=>{let w=!1;const y=_=>{Die(_,()=>t.signal,()=>w=!0)},S=E9(t.options,t.fetchOptions),E=async(_,A,T)=>{if(w)return Promise.reject();if(A==null&&_.pages.length)return Promise.resolve(_);const P=(()=>{const I={client:t.client,queryKey:t.queryKey,pageParam:A,direction:T?"backward":"forward",meta:t.options.meta};return y(I),I})(),M=await S(P),{maxPages:R}=t.options,D=T?kie:Rie;return{pages:D(_.pages,M,R),pageParams:D(_.pageParams,A,R)}};if(i&&a.length){const _=i==="backward",A=_?M9:Gj,T={pages:a,pageParams:o},O=A(r,T);l=await E(T,O,_)}else{const _=e??a.length;do{const A=u===0?o[0]??r.initialPageParam:Gj(r,l);if(u>0&&A==null)break;l=await E(l,A),u++}while(u<_)}return l};t.options.persister?t.fetchFn=()=>{var w,y;return(y=(w=t.options).persister)==null?void 0:y.call(w,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function Gj(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function M9(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function Fie(e,t){return t?Gj(e,t)!=null:!1}function Uie(e,t){return!t||!e.getPreviousPageParam?!1:M9(e,t)!=null}var Hie=class extends N9{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:Dy()})}getOptimisticResult(e){return e.behavior=Dy(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,w;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:l}=r,u=(w=(b=n.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:w.direction,f=o&&u==="forward",d=i&&u==="forward",h=o&&u==="backward",m=i&&u==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Fie(t,n.data),hasPreviousPage:Uie(t,n.data),isFetchNextPageError:f,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:m,isRefetchError:l&&!f&&!h,isRefetching:a&&!d&&!m}}},Tm,ea,Gn,nu,ta,rs,g9,Gie=(g9=class extends C9{constructor(t){super();De(this,ta);De(this,Tm);De(this,ea);De(this,Gn);De(this,nu);Ae(this,Tm,t.client),this.mutationId=t.mutationId,Ae(this,Gn,t.mutationCache),Ae(this,ea,[]),this.state=t.state||R9(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){te(this,ea).includes(t)||(te(this,ea).push(t),this.clearGcTimeout(),te(this,Gn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Ae(this,ea,te(this,ea).filter(n=>n!==t)),this.scheduleGc(),te(this,Gn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){te(this,ea).length||(this.state.status==="pending"?this.scheduleGc():te(this,Gn).remove(this))}continue(){var t;return((t=te(this,nu))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,u,f,d,h,m,g,b,w,y,S,E,_,A,T,O,P;const n=()=>{Ke(this,ta,rs).call(this,{type:"continue"})},r={client:te(this,Tm),meta:this.options.meta,mutationKey:this.options.mutationKey};Ae(this,nu,T9({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,R)=>{Ke(this,ta,rs).call(this,{type:"failed",failureCount:M,error:R})},onPause:()=>{Ke(this,ta,rs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>te(this,Gn).canRun(this)}));const i=this.state.status==="pending",a=!te(this,nu).canStart();try{if(i)n();else{Ke(this,ta,rs).call(this,{type:"pending",variables:t,isPaused:a}),te(this,Gn).config.onMutate&&await te(this,Gn).config.onMutate(t,this,r);const R=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,r));R!==this.state.context&&Ke(this,ta,rs).call(this,{type:"pending",context:R,variables:t,isPaused:a})}const M=await te(this,nu).start();return await((f=(u=te(this,Gn).config).onSuccess)==null?void 0:f.call(u,M,t,this.state.context,this,r)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,M,t,this.state.context,r)),await((g=(m=te(this,Gn).config).onSettled)==null?void 0:g.call(m,M,null,this.state.variables,this.state.context,this,r)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,M,null,t,this.state.context,r)),Ke(this,ta,rs).call(this,{type:"success",data:M}),M}catch(M){try{await((S=(y=te(this,Gn).config).onError)==null?void 0:S.call(y,M,t,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((_=(E=this.options).onError)==null?void 0:_.call(E,M,t,this.state.context,r))}catch(R){Promise.reject(R)}try{await((T=(A=te(this,Gn).config).onSettled)==null?void 0:T.call(A,void 0,M,this.state.variables,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((P=(O=this.options).onSettled)==null?void 0:P.call(O,void 0,M,t,this.state.context,r))}catch(R){Promise.reject(R)}throw Ke(this,ta,rs).call(this,{type:"error",error:M}),M}finally{te(this,Gn).runNext(this)}}},Tm=new WeakMap,ea=new WeakMap,Gn=new WeakMap,nu=new WeakMap,ta=new WeakSet,rs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),An.batch(()=>{te(this,ea).forEach(r=>{r.onMutationUpdate(t)}),te(this,Gn).notify({mutation:this,type:"updated",action:t})})},g9);function R9(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ka,Ai,Cm,v9,Wie=(v9=class extends sd{constructor(t={}){super();De(this,Ka);De(this,Ai);De(this,Cm);this.config=t,Ae(this,Ka,new Set),Ae(this,Ai,new Map),Ae(this,Cm,0)}build(t,n,r){const i=new Gie({client:t,mutationCache:this,mutationId:++Ov(this,Cm)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){te(this,Ka).add(t);const n=Nv(t);if(typeof n=="string"){const r=te(this,Ai).get(n);r?r.push(t):te(this,Ai).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(te(this,Ka).delete(t)){const n=Nv(t);if(typeof n=="string"){const r=te(this,Ai).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&te(this,Ai).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Nv(t);if(typeof n=="string"){const r=te(this,Ai).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Nv(t);if(typeof n=="string"){const i=(r=te(this,Ai).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){An.batch(()=>{te(this,Ka).forEach(t=>{this.notify({type:"removed",mutation:t})}),te(this,Ka).clear(),te(this,Ai).clear()})}getAll(){return Array.from(te(this,Ka))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>x$(n,r))}findAll(t={}){return this.getAll().filter(n=>x$(t,n))}notify(t){An.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return An.batch(()=>Promise.all(t.map(n=>n.continue().catch(er))))}},Ka=new WeakMap,Ai=new WeakMap,Cm=new WeakMap,v9);function Nv(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Ya,xs,yr,Xa,so,fy,Wj,y9,Kie=(y9=class extends sd{constructor(n,r){super();De(this,so);De(this,Ya);De(this,xs);De(this,yr);De(this,Xa);Ae(this,Ya,n),this.setOptions(r),this.bindMethods(),Ke(this,so,fy).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=te(this,Ya).defaultMutationOptions(n),Ry(this.options,r)||te(this,Ya).getMutationCache().notify({type:"observerOptionsUpdated",mutation:te(this,yr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&fu(r.mutationKey)!==fu(this.options.mutationKey)?this.reset():((i=te(this,yr))==null?void 0:i.state.status)==="pending"&&te(this,yr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=te(this,yr))==null||n.removeObserver(this)}onMutationUpdate(n){Ke(this,so,fy).call(this),Ke(this,so,Wj).call(this,n)}getCurrentResult(){return te(this,xs)}reset(){var n;(n=te(this,yr))==null||n.removeObserver(this),Ae(this,yr,void 0),Ke(this,so,fy).call(this),Ke(this,so,Wj).call(this)}mutate(n,r){var i;return Ae(this,Xa,r),(i=te(this,yr))==null||i.removeObserver(this),Ae(this,yr,te(this,Ya).getMutationCache().build(te(this,Ya),this.options)),te(this,yr).addObserver(this),te(this,yr).execute(n)}},Ya=new WeakMap,xs=new WeakMap,yr=new WeakMap,Xa=new WeakMap,so=new WeakSet,fy=function(){var r;const n=((r=te(this,yr))==null?void 0:r.state)??R9();Ae(this,xs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Wj=function(n){An.batch(()=>{var r,i,a,o,l,u,f,d;if(te(this,Xa)&&this.hasListeners()){const h=te(this,xs).variables,m=te(this,xs).context,g={client:te(this,Ya),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=te(this,Xa)).onSuccess)==null||i.call(r,n.data,h,m,g)}catch(b){Promise.reject(b)}try{(o=(a=te(this,Xa)).onSettled)==null||o.call(a,n.data,null,h,m,g)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(u=(l=te(this,Xa)).onError)==null||u.call(l,n.error,h,m,g)}catch(b){Promise.reject(b)}try{(d=(f=te(this,Xa)).onSettled)==null||d.call(f,void 0,n.error,h,m,g)}catch(b){Promise.reject(b)}}}this.listeners.forEach(h=>{h(te(this,xs))})})},y9),na,b9,Yie=(b9=class extends sd{constructor(t={}){super();De(this,na);this.config=t,Ae(this,na,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??TM(i,n);let o=this.get(a);return o||(o=new qie({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){te(this,na).has(t.queryHash)||(te(this,na).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=te(this,na).get(t.queryHash);n&&(t.destroy(),n===t&&te(this,na).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){An.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return te(this,na).get(t)}getAll(){return[...te(this,na).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>b$(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>b$(t,r)):n}notify(t){An.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){An.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){An.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},na=new WeakMap,b9),nn,ws,Ss,ff,df,_s,hf,pf,x9,Xie=(x9=class{constructor(e={}){De(this,nn);De(this,ws);De(this,Ss);De(this,ff);De(this,df);De(this,_s);De(this,hf);De(this,pf);Ae(this,nn,e.queryCache||new Yie),Ae(this,ws,e.mutationCache||new Wie),Ae(this,Ss,e.defaultOptions||{}),Ae(this,ff,new Map),Ae(this,df,new Map),Ae(this,_s,0)}mount(){Ov(this,_s)._++,te(this,_s)===1&&(Ae(this,hf,AM.subscribe(async e=>{e&&(await this.resumePausedMutations(),te(this,nn).onFocus())})),Ae(this,pf,ky.subscribe(async e=>{e&&(await this.resumePausedMutations(),te(this,nn).onOnline())})))}unmount(){var e,t;Ov(this,_s)._--,te(this,_s)===0&&((e=te(this,hf))==null||e.call(this),Ae(this,hf,void 0),(t=te(this,pf))==null||t.call(this),Ae(this,pf,void 0))}isFetching(e){return te(this,nn).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return te(this,ws).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=te(this,nn).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=te(this,nn).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ps(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return te(this,nn).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=te(this,nn).get(r.queryHash),a=i==null?void 0:i.state.data,o=Nie(t,a);if(o!==void 0)return te(this,nn).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return An.batch(()=>te(this,nn).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=te(this,nn).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=te(this,nn);An.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=te(this,nn);return An.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=An.batch(()=>te(this,nn).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(er).catch(er)}invalidateQueries(e,t={}){return An.batch(()=>(te(this,nn).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=An.batch(()=>te(this,nn).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(er)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(er)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=te(this,nn).build(this,t);return n.isStaleByTime(Ps(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(er).catch(er)}fetchInfiniteQuery(e){return e.behavior=Dy(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(er).catch(er)}ensureInfiniteQueryData(e){return e.behavior=Dy(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ky.isOnline()?te(this,ws).resumePausedMutations():Promise.resolve()}getQueryCache(){return te(this,nn)}getMutationCache(){return te(this,ws)}getDefaultOptions(){return te(this,Ss)}setDefaultOptions(e){Ae(this,Ss,e)}setQueryDefaults(e,t){te(this,ff).set(fu(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...te(this,ff).values()],n={};return t.forEach(r=>{vp(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){te(this,df).set(fu(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...te(this,df).values()],n={};return t.forEach(r=>{vp(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...te(this,Ss).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=TM(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===CM&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...te(this,Ss).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){te(this,nn).clear(),te(this,ws).clear()}},nn=new WeakMap,ws=new WeakMap,Ss=new WeakMap,ff=new WeakMap,df=new WeakMap,_s=new WeakMap,hf=new WeakMap,pf=new WeakMap,x9),k9=j.createContext(void 0),sr=e=>{const t=j.useContext(k9);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Zie=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(k9.Provider,{value:e,children:t})),D9=j.createContext(!1),Qie=()=>j.useContext(D9);D9.Provider;function Jie(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var eae=j.createContext(Jie()),tae=()=>j.useContext(eae),nae=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?OM(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},rae=e=>{j.useEffect(()=>{e.clearReset()},[e])},iae=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||OM(n,[e.error,r])),aae=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},oae=(e,t)=>e.isLoading&&e.isFetching&&!t,sae=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,C$=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function I9(e,t,n){var m,g,b,w;const r=Qie(),i=tae(),a=sr(),o=a.defaultQueryOptions(e);(g=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||g.call(m,o);const l=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?"isRestoring":"optimistic",aae(o),nae(o,i,l),rae(i);const u=!a.getQueryCache().get(o.queryHash),[f]=j.useState(()=>new t(a,o)),d=f.getOptimisticResult(o),h=!r&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(y=>{const S=h?f.subscribe(An.batchCalls(y)):er;return f.updateResult(),S},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),j.useEffect(()=>{f.setOptions(o)},[o,f]),sae(o,d))throw C$(o,f,i);if(iae({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw d.error;if((w=(b=a.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||w.call(b,o,d),o.experimental_prefetchInRender&&!yp.isServer()&&oae(d,r)){const y=u?C$(o,f,i):l==null?void 0:l.promise;y==null||y.catch(er).finally(()=>{f.updateResult()})}return o.notifyOnChangeProps?d:f.trackResult(d)}function ci(e,t){return I9(e,N9)}function ga(e,t){const n=sr(),[r]=j.useState(()=>new Kie(n,e));j.useEffect(()=>{r.setOptions(e)},[r,e]);const i=j.useSyncExternalStore(j.useCallback(o=>r.subscribe(An.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=j.useCallback((o,l)=>{r.mutate(o,l).catch(er)},[r]);if(i.error&&OM(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}function L9(e,t){return I9(e,Hie)}var Xh=typeof window<"u"?j.useLayoutEffect:j.useEffect;function SS(e){const t=j.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function lae(e,t,n={},r={}){j.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([a])=>{t(a)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function uae(e){const t=j.useRef(null);return j.useImperativeHandle(e,()=>t.current,[]),t}var $9=!1;function bp(e){return e[e.length-1]}function cae(e){return typeof e=="function"}function Es(e,t){return cae(e)?e(t):e}var fae=Object.prototype.hasOwnProperty,O$=Object.prototype.propertyIsEnumerable,dae=()=>Object.create(null),Ol=(e,t)=>As(e,t,dae);function As(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,a=P$(e)&&P$(i);if(!a&&!(mf(e)&&mf(i)))return i;const o=a?e:j$(e);if(!o)return i;const l=a?i:j$(i);if(!l)return i;const u=o.length,f=l.length,d=a?new Array(f):n();let h=0;for(let m=0;m<f;m++){const g=a?m:l[m],b=e[g],w=i[g];if(b===w){d[g]=b,(a?m<u:fae.call(e,g))&&h++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){d[g]=w;continue}const y=As(b,w,n,r+1);d[g]=y,y===b&&h++}return u===f&&h===u?e:d}function j$(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!O$.call(e,i))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const i of n){if(!O$.call(e,i))return!1;r.push(i)}return r}function mf(e){if(!N$(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!N$(n)||!n.hasOwnProperty("isPrototypeOf"))}function N$(e){return Object.prototype.toString.call(e)==="[object Object]"}function P$(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ru(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!ru(e[r],t[r],n))return!1;return!0}if(mf(e)&&mf(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const o in t)if((!r||t[o]!==void 0)&&!ru(e[o],t[o],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&i++;let a=0;for(const o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!ru(e[o],t[o],n)))return!1;return i===a}return!1}function gf(e){let t,n;const r=new Promise((i,a)=>{t=i,n=a});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e==null||e(i)},r.reject=i=>{r.status="rejected",n(i)},r}function xp(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function hae(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function M$(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return hae(t)}var pae=["http:","https:","mailto:","tel:"];function Iy(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Oh(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",i;for(;(i=t.exec(e))!==null;)r+=M$(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+M$(n?e.slice(n):e);let a=!1;return r.startsWith("//")&&(a=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:a}}function mae(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function gae(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function no(){throw new Error("Invariant failed")}function wp(e){const t=new Map;let n,r;const i=a=>{a.next&&(a.prev?(a.prev.next=a.next,a.next.prev=a.prev,a.next=void 0,r&&(r.next=a,a.prev=r)):(a.next.prev=void 0,n=a.next,a.next=void 0,r&&(a.prev=r,r.next=a)),r=a)};return{get(a){const o=t.get(a);if(o)return i(o),o.value},set(a,o){if(t.size>=e&&n){const u=n;t.delete(u.key),u.next&&(n=u.next,u.next.prev=void 0),u===r&&(r=void 0)}const l=t.get(a);if(l)l.value=o,i(l);else{const u={key:a,value:o,prev:r};r&&(r.next=u),r=u,n||(n=u),t.set(a,u)}},clear(){t.clear(),n=void 0,r=void 0}}}var Bl=4,B9=5;function vae(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function NM(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a==="$"){const l=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=l,n[4]=l,n[5]=l,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const o=vae(a);if(o){const[l,u]=o,f=a.charCodeAt(l+1);if(f===45){if(l+2<a.length&&a.charCodeAt(l+2)===36){const d=l+3,h=u;if(d<h)return n[0]=3,n[1]=t+l,n[2]=t+d,n[3]=t+h,n[4]=t+u+1,n[5]=i,n}}else if(f===36){const d=l+1,h=l+2;return h===u?(n[0]=2,n[1]=t+l,n[2]=t+d,n[3]=t+h,n[4]=t+u+1,n[5]=e.length,n):(n[0]=1,n[1]=t+l,n[2]=t+h,n[3]=t+u,n[4]=t+u+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function E0(e,t,n,r,i,a,o){var u,f,d,h,m,g,b,w,y,S,E,_,A;o==null||o(n);let l=r;{const T=n.fullPath??n.from,O=T.length,P=((u=n.options)==null?void 0:u.caseSensitive)??e,M=!!((d=(f=n.options)==null?void 0:f.params)!=null&&d.parse&&((m=(h=n.options)==null?void 0:h.skipRouteOnParseError)!=null&&m.params));for(;l<O;){const D=NM(T,l,t);let I;const k=l,F=D[5];switch(l=F+1,a++,D[0]){case 0:{const $=T.substring(D[2],D[3]);if(P){const q=(g=i.static)==null?void 0:g.get($);if(q)I=q;else{i.static??(i.static=new Map);const L=ql(n.fullPath??n.from);L.parent=i,L.depth=a,I=L,i.static.set($,L)}}else{const q=$.toLowerCase(),L=(b=i.staticInsensitive)==null?void 0:b.get(q);if(L)I=L;else{i.staticInsensitive??(i.staticInsensitive=new Map);const z=ql(n.fullPath??n.from);z.parent=i,z.depth=a,I=z,i.staticInsensitive.set(q,z)}}break}case 1:{const $=T.substring(k,D[1]),q=T.substring(D[4],F),L=P&&!!($||q),z=$?L?$:$.toLowerCase():void 0,U=q?L?q:q.toLowerCase():void 0,K=!M&&((w=i.dynamic)==null?void 0:w.find(Z=>!Z.skipOnParamError&&Z.caseSensitive===L&&Z.prefix===z&&Z.suffix===U));if(K)I=K;else{const Z=ES(1,n.fullPath??n.from,L,z,U);I=Z,Z.depth=a,Z.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(Z)}break}case 3:{const $=T.substring(k,D[1]),q=T.substring(D[4],F),L=P&&!!($||q),z=$?L?$:$.toLowerCase():void 0,U=q?L?q:q.toLowerCase():void 0,K=!M&&((y=i.optional)==null?void 0:y.find(Z=>!Z.skipOnParamError&&Z.caseSensitive===L&&Z.prefix===z&&Z.suffix===U));if(K)I=K;else{const Z=ES(3,n.fullPath??n.from,L,z,U);I=Z,Z.parent=i,Z.depth=a,i.optional??(i.optional=[]),i.optional.push(Z)}break}case 2:{const $=T.substring(k,D[1]),q=T.substring(D[4],F),L=P&&!!($||q),z=$?L?$:$.toLowerCase():void 0,U=q?L?q:q.toLowerCase():void 0,K=ES(2,n.fullPath??n.from,L,z,U);I=K,K.parent=i,K.depth=a,i.wildcard??(i.wildcard=[]),i.wildcard.push(K)}}i=I}if(M&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const D=ql(n.fullPath??n.from);D.kind=B9,D.parent=i,a++,D.depth=a,i.pathless??(i.pathless=[]),i.pathless.push(D),i=D}const R=(n.path||!n.children)&&!n.isRoot;if(R&&T.endsWith("/")){const D=ql(n.fullPath??n.from);D.kind=Bl,D.parent=i,a++,D.depth=a,i.index=D,i=D}i.parse=((E=(S=n.options)==null?void 0:S.params)==null?void 0:E.parse)??null,i.skipOnParamError=M,i.parsingPriority=((A=(_=n.options)==null?void 0:_.skipRouteOnParseError)==null?void 0:A.priority)??0,R&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const T of n.children)E0(e,t,T,l,i,a,o)}function _S(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function us(e){var t,n,r;if(e.pathless)for(const i of e.pathless)us(i);if(e.static)for(const i of e.static.values())us(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())us(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(_S);for(const i of e.dynamic)us(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(_S);for(const i of e.optional)us(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(_S);for(const i of e.wildcard)us(i)}}function ql(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function ES(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function yae(e,t){const n=ql("/"),r=new Uint16Array(6);for(const i of e)E0(!1,r,i,1,n,0);us(n),t.masksTree=n,t.flatCache=wp(1e3)}function bae(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=PM(e,t.masksTree);return t.flatCache.set(e,r),r}function xae(e,t,n,r,i){e||(e="/"),r||(r="/");const a=t?`case\0${e}`:e;let o=i.singleCache.get(a);return o||(o=ql("/"),E0(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),PM(r,o,n)}function wae(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||(e="/");let a;try{a=PM(e,t.segmentTree,n)}catch(o){if(o instanceof URIError)a=null;else throw o}return a&&(a.branch=Eae(a.route)),t.matchCache.set(r,a),a}function Sae(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function _ae(e,t=!1,n){const r=ql(e.fullPath),i=new Uint16Array(6),a={},o={};let l=0;return E0(t,i,e,1,r,0,u=>{if(n==null||n(u,l),u.id in a&&no(),a[u.id]=u,l!==0&&u.path){const f=Sae(u.fullPath);(!o[f]||u.fullPath.endsWith("/"))&&(o[f]=u)}l++}),us(r),{processedTree:{segmentTree:r,singleCache:wp(1e3),matchCache:wp(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function PM(e,t,n=!1){const r=e.split("/"),i=Tae(e,r,t,n);if(!i)return null;const[a]=q9(e,r,i);return{route:i.node.route,rawParams:a,parsedParams:i.parsedParams}}function q9(e,t,n){var d,h,m,g,b,w,y,S,E,_;const r=Aae(n.node);let i=null;const a=Object.create(null);let o=((d=n.extract)==null?void 0:d.part)??0,l=((h=n.extract)==null?void 0:h.node)??0,u=((m=n.extract)==null?void 0:m.path)??0,f=((g=n.extract)==null?void 0:g.segment)??0;for(;l<r.length;o++,l++,u++,f++){const A=r[l];if(A.kind===Bl)break;if(A.kind===B9){f--,o--,u--;continue}const T=t[o],O=u;if(T&&(u+=T.length),A.kind===1){i??(i=n.node.fullPath.split("/"));const P=i[f],M=((b=A.prefix)==null?void 0:b.length)??0;if(P.charCodeAt(M)===123){const R=((w=A.suffix)==null?void 0:w.length)??0,D=P.substring(M+2,P.length-R-1),I=T.substring(M,T.length-R);a[D]=decodeURIComponent(I)}else{const R=P.substring(1);a[R]=decodeURIComponent(T)}}else if(A.kind===3){if(n.skipped&1<<l){o--,u=O-1;continue}i??(i=n.node.fullPath.split("/"));const P=i[f],M=((y=A.prefix)==null?void 0:y.length)??0,R=((S=A.suffix)==null?void 0:S.length)??0,D=P.substring(M+3,P.length-R-1),I=A.suffix||A.prefix?T.substring(M,T.length-R):T;I&&(a[D]=decodeURIComponent(I))}else if(A.kind===2){const P=A,M=e.substring(O+(((E=P.prefix)==null?void 0:E.length)??0),e.length-(((_=P.suffix)==null?void 0:_.length)??0)),R=decodeURIComponent(M);a["*"]=R,a._splat=R;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:l,path:u,segment:f}]}function Eae(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Aae(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Tae(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!bp(t),a=i&&e!=="/",o=t.length-(i?1:0),l=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let u=null,f=null,d=null;for(;l.length;){const h=l.pop(),{node:m,index:g,skipped:b,depth:w,statics:y,dynamics:S,optionals:E}=h;let{extract:_,rawParams:A,parsedParams:T}=h;if(m.skipOnParamError){if(!AS(e,t,h))continue;A=h.rawParams,_=h.extract,T=h.parsedParams}r&&m.route&&m.kind!==Bl&&jh(f,h)&&(f=h);const O=g===o;if(O&&(m.route&&!a&&jh(d,h)&&(d=h),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const P=O?void 0:t[g];let M;if(O&&m.index){const R={node:m.index,index:g,skipped:b,depth:w+1,statics:y,dynamics:S,optionals:E,extract:_,rawParams:A,parsedParams:T};let D=!0;if(m.index.skipOnParamError&&(AS(e,t,R)||(D=!1)),D){if(y===o&&!S&&!E&&!b)return R;jh(d,R)&&(d=R)}}if(m.wildcard&&jh(u,h))for(const R of m.wildcard){const{prefix:D,suffix:I}=R;if(D&&(O||!(R.caseSensitive?P:M??(M=P.toLowerCase())).startsWith(D)))continue;if(I){if(O)continue;const F=t.slice(g).join("/").slice(-I.length);if((R.caseSensitive?F:F.toLowerCase())!==I)continue}const k={node:R,index:o,skipped:b,depth:w,statics:y,dynamics:S,optionals:E,extract:_,rawParams:A,parsedParams:T};if(!(R.skipOnParamError&&!AS(e,t,k))){u=k;break}}if(m.optional){const R=b|1<<w,D=w+1;for(let I=m.optional.length-1;I>=0;I--){const k=m.optional[I];l.push({node:k,index:g,skipped:R,depth:D,statics:y,dynamics:S,optionals:E,extract:_,rawParams:A,parsedParams:T})}if(!O)for(let I=m.optional.length-1;I>=0;I--){const k=m.optional[I],{prefix:F,suffix:$}=k;if(F||$){const q=k.caseSensitive?P:M??(M=P.toLowerCase());if(F&&!q.startsWith(F)||$&&!q.endsWith($))continue}l.push({node:k,index:g+1,skipped:b,depth:D,statics:y,dynamics:S,optionals:E+1,extract:_,rawParams:A,parsedParams:T})}}if(!O&&m.dynamic&&P)for(let R=m.dynamic.length-1;R>=0;R--){const D=m.dynamic[R],{prefix:I,suffix:k}=D;if(I||k){const F=D.caseSensitive?P:M??(M=P.toLowerCase());if(I&&!F.startsWith(I)||k&&!F.endsWith(k))continue}l.push({node:D,index:g+1,skipped:b,depth:w+1,statics:y,dynamics:S+1,optionals:E,extract:_,rawParams:A,parsedParams:T})}if(!O&&m.staticInsensitive){const R=m.staticInsensitive.get(M??(M=P.toLowerCase()));R&&l.push({node:R,index:g+1,skipped:b,depth:w+1,statics:y+1,dynamics:S,optionals:E,extract:_,rawParams:A,parsedParams:T})}if(!O&&m.static){const R=m.static.get(P);R&&l.push({node:R,index:g+1,skipped:b,depth:w+1,statics:y+1,dynamics:S,optionals:E,extract:_,rawParams:A,parsedParams:T})}if(m.pathless){const R=w+1;for(let D=m.pathless.length-1;D>=0;D--){const I=m.pathless[D];l.push({node:I,index:g,skipped:b,depth:R,statics:y,dynamics:S,optionals:E,extract:_,rawParams:A,parsedParams:T})}}}if(d&&u)return jh(u,d)?d:u;if(d)return d;if(u)return u;if(r&&f){let h=f.index;for(let g=0;g<f.index;g++)h+=t[g].length;const m=h===e.length?"/":e.slice(h);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(m),f}return null}function AS(e,t,n){try{const[r,i]=q9(e,t,n);n.rawParams=r,n.extract=i;const a=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,a),!0}catch{return null}}function jh(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Bl)>(e.node.kind===Bl)||t.node.kind===Bl==(e.node.kind===Bl)&&t.depth>e.depth))):!0}function dy(e){return MM(e.filter(t=>t!==void 0).join("/"))}function MM(e){return e.replace(/\/{2,}/g,"/")}function z9(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ms(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function V9(e){return Ms(z9(e))}function Ly(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Cae(e,t,n){return Ly(e,n)===Ly(t,n)}function Oae({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),a=!i&&t===".";let o;if(r){o=i?t:a?e:e+"\0"+t;const h=r.get(o);if(h)return h}let l;if(a)l=e.split("/");else if(i)l=t.split("/");else{for(l=e.split("/");l.length>1&&bp(l)==="";)l.pop();const h=t.split("/");for(let m=0,g=h.length;m<g;m++){const b=h[m];b===""?m?m===g-1&&l.push(b):l=[b]:b===".."?l.pop():b==="."||l.push(b)}}l.length>1&&(bp(l)===""?n==="never"&&l.pop():n==="always"&&l.push(""));let u,f="";for(let h=0;h<l.length;h++){h>0&&(f+="/");const m=l[h];if(!m)continue;u=NM(m,0,u);const g=u[0];if(g===0){f+=m;continue}const b=u[5],w=m.substring(0,u[1]),y=m.substring(u[4],b),S=m.substring(u[2],u[3]);g===1?f+=w||y?`${w}{$${S}}${y}`:`$${S}`:g===2?f+=w||y?`${w}{$}${y}`:"$":f+=`${w}{-$${S}}${y}`}f=MM(f);const d=f||"/";return o&&r&&r.set(o,d),d}function jae(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,a=>t.get(a)??a)}function TS(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>k$(i,n)).join("/"):k$(r,n)}function R$({path:e,params:t,decoder:n,...r}){let i=!1;const a=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:a,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:a,isMissingParams:i};const o=e.length;let l=0,u,f="";for(;l<o;){const d=l;u=NM(e,d,u);const h=u[5];if(l=h+1,d===h)continue;const m=u[0];if(m===0){f+="/"+e.substring(d,h);continue}if(m===2){const g=t._splat;a._splat=g,a["*"]=g;const b=e.substring(d,u[1]),w=e.substring(u[4],h);if(!g){i=!0,(b||w)&&(f+="/"+b+w);continue}const y=TS("_splat",t,n);f+="/"+b+y+w;continue}if(m===1){const g=e.substring(u[2],u[3]);!i&&!(g in t)&&(i=!0),a[g]=t[g];const b=e.substring(d,u[1]),w=e.substring(u[4],h),y=TS(g,t,n)??"undefined";f+="/"+b+y+w;continue}if(m===3){const g=e.substring(u[2],u[3]),b=t[g];if(b==null)continue;a[g]=b;const w=e.substring(d,u[1]),y=e.substring(u[4],h),S=TS(g,t,n)??"";f+="/"+w+S+y;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:a,interpolatedPath:f||"/",isMissingParams:i}}function k$(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Xn(e){return(e==null?void 0:e.isNotFound)===!0}function Nae(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var Pae="tsr-scroll-restoration-v1_3";function Mae(){const e=Nae();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");mf(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=Es(r,t)||t},persist:()=>{try{e.setItem(Pae,JSON.stringify(t))}catch{}}}}var D$=Mae(),Rae=e=>e.state.__TSR_key||e.href;function kae(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}var Pv=!1,Nh="window",I$="data-scroll-restoration-id";function Dae(e,t){if(!D$)return;const n=D$;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,Pv=!1;const r=e.options.getScrollRestorationKey||Rae,i=new Map;window.history.scrollRestoration="manual";const a=l=>{if(!(Pv||!e.isScrollRestoring))if(l.target===document||l.target===window)i.set(Nh,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const u=l.target;i.set(u,{scrollX:u.scrollLeft||0,scrollY:u.scrollTop||0})}},o=l=>{var f;if(!e.isScrollRestoring||!l||i.size===0||!n)return;const u=(f=n.state)[l]||(f[l]={});for(const[d,h]of i){let m;if(d===Nh)m=Nh;else if(d.isConnected){const g=d.getAttribute(I$);m=g?`[${I$}="${g}"]`:kae(d)}m&&(u[m]=h)}};document.addEventListener("scroll",a,!0),e.subscribe("onBeforeLoad",l=>{o(l.fromLocation?r(l.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",l=>{var h;const u=r(l.toLocation),f=e.options.scrollRestorationBehavior,d=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Pv=!0;try{const m=e.isScrollRestoring?n.state[u]:void 0;let g=!1;if(m)for(const b in m){const w=m[b];if(!mf(w))continue;const{scrollX:y,scrollY:S}=w;if(!(!Number.isFinite(y)||!Number.isFinite(S))){if(b===Nh)window.scrollTo({top:S,left:y,behavior:f}),g=!0;else if(b){let E;try{E=document.querySelector(b)}catch{continue}E&&(E.scrollLeft=y,E.scrollTop=S,g=!0)}}}if(!g){const b=e.history.location.hash.slice(1);if(b){const w=((h=window.history.state)==null?void 0:h.__hashScrollIntoViewOptions)??!0;if(w){const y=document.getElementById(b);y&&y.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:f};if(window.scrollTo(w),d)for(const y of d){if(y===Nh)continue;const S=typeof y=="function"?y():document.querySelector(y);S&&S.scrollTo(w)}}}}finally{Pv=!1}e.isScrollRestoring&&n.set(m=>(m[u]||(m[u]={}),m))}})}function Iae(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function CS(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function Lae(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,i]of t.entries()){const a=n[r];a==null?n[r]=CS(i):Array.isArray(a)?a.push(CS(i)):n[r]=[a,CS(i)]}return n}var $ae=qae(JSON.parse),Bae=zae(JSON.stringify,JSON.parse);function qae(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=Lae(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function zae(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const a=Iae(i,r);return a?`?${a}`:""}}var iu="__root__";function Vae(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function br(e){return e instanceof Response&&!!e.options}function Fae(e){return{input:({url:t})=>{for(const n of e)t=Kj(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=F9(e[n],t);return t}}}function Uae(e){const t=V9(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),a=e.caseSensitive?r:r.toLowerCase();return{input:({url:o})=>{const l=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return l===i?o.pathname="/":l.startsWith(a)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=dy(["/",t,o.pathname]),o)}}function Kj(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function F9(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Hae(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,l=new Map,u=new Map,f=n(e.status),d=n(e.loadedAt),h=n(e.isLoading),m=n(e.isTransitioning),g=n(e.location),b=n(e.resolvedLocation),w=n(e.statusCode),y=n(e.redirect),S=n([]),E=n([]),_=n([]),A=r(()=>OS(o,S.get())),T=r(()=>OS(l,E.get())),O=r(()=>OS(u,_.get())),P=r(()=>S.get()[0]),M=r(()=>S.get().some(z=>{var U;return((U=o.get(z))==null?void 0:U.get().status)==="pending"})),R=r(()=>{var z;return{locationHref:g.get().href,resolvedLocationHref:(z=b.get())==null?void 0:z.href,status:f.get()}}),D=r(()=>({status:f.get(),loadedAt:d.get(),isLoading:h.get(),isTransitioning:m.get(),matches:A.get(),location:g.get(),resolvedLocation:b.get(),statusCode:w.get(),redirect:y.get()})),I=wp(64);function k(z){let U=I.get(z);return U||(U=r(()=>{const K=S.get();for(const Z of K){const H=o.get(Z);if(H&&H.routeId===z)return H.get()}}),I.set(z,U)),U}const F={status:f,loadedAt:d,isLoading:h,isTransitioning:m,location:g,resolvedLocation:b,statusCode:w,redirect:y,matchesId:S,pendingIds:E,cachedIds:_,matches:A,pendingMatches:T,cachedMatches:O,firstId:P,hasPending:M,matchRouteDeps:R,matchStores:o,pendingMatchStores:l,cachedMatchStores:u,__store:D,getRouteMatchStore:k,setMatches:$,setPending:q,setCached:L};$(e.matches),a==null||a(F);function $(z){jS(z,o,S,n,i)}function q(z){jS(z,l,E,n,i)}function L(z){jS(z,u,_,n,i)}return F}function OS(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function jS(e,t,n,r,i){const a=e.map(l=>l.id),o=new Set(a);i(()=>{for(const l of t.keys())o.has(l)||t.delete(l);for(const l of e){const u=t.get(l.id);if(!u){const f=r(l);f.routeId=l.routeId,t.set(l.id,f);continue}u.routeId=l.routeId,u.get()!==l&&u.set(l)}gae(n.get(),a)||n.set(a)})}var Yj=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Gae=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),A0=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),au=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let a=0;a<=i;a++){const o=e.matches[a];if(!o)continue;const l=e.router.getMatch(o.id);l&&Object.assign(r,l.__routeContext,l.__beforeLoadContext)}return r},L$=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),i=r>=0?r:0;let a=n?e.matches.findIndex(o=>o.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let o=a;o>=0;o--){const l=e.matches[o];if(e.router.looseRoutesById[l.routeId].options.notFoundComponent)return o}return n?a:i},Ts=(e,t,n)=>{var r,i,a;if(!(!br(n)&&!Xn(n)))throw br(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,o=>({...o,status:br(n)?"redirected":Xn(n)?"notFound":o.status==="pending"?"success":o.status,context:au(e,t.index),isFetching:!1,error:n})),Xn(n)&&!n.routeId&&(n.routeId=t.routeId),(a=t._nonReactive.loadPromise)==null||a.resolve()),br(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},U9=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},$$=(e,t,n)=>{const r=au(e,n);e.updateMatch(t,i=>({...i,context:r}))},Ph=(e,t,n,r)=>{var l,u;const{id:i,routeId:a}=e.matches[t],o=e.router.looseRoutesById[a];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Ts(e,e.router.getMatch(i),n);try{(u=(l=o.options).onError)==null||u.call(l,n)}catch(f){n=f,Ts(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>{var d,h;return(d=f._nonReactive.beforeLoadPromise)==null||d.resolve(),f._nonReactive.beforeLoadPromise=void 0,(h=f._nonReactive.loadPromise)==null||h.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!br(n)&&!Xn(n)&&(e.serialError??(e.serialError=n))},H9=(e,t,n,r)=>{var a;if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!A0(e,t)&&(n.options.loader||n.options.beforeLoad||W9(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((a=e.router.options)==null?void 0:a.defaultPendingComponent))){const o=setTimeout(()=>{Yj(e)},i);r._nonReactive.pendingTimeout=o}},Wae=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;H9(e,t,n,r);const i=()=>{const a=e.router.getMatch(t);a.preload&&(a.status==="redirected"||a.status==="notFound")&&Ts(e,a,a.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},Kae=(e,t,n,r)=>{const i=e.router.getMatch(t);let a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=gf(()=>{a==null||a.resolve(),a=void 0});const{paramsError:o,searchError:l}=i;o&&Ph(e,n,o,"PARSE_PARAMS"),l&&Ph(e,n,l,"VALIDATE_SEARCH"),H9(e,t,r,i);const u=new AbortController;let f=!1;const d=()=>{f||(f=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:u})))},h=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{d(),h()});return}i._nonReactive.beforeLoadPromise=gf();const m={...au(e,n,!1),...i.__routeContext},{search:g,params:b,cause:w}=i,y=A0(e,t),S={search:g,abortController:u,params:b,preload:y,context:m,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:y?"preload":w,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},E=A=>{if(A===void 0){e.router.batch(()=>{d(),h()});return}(br(A)||Xn(A))&&(d(),Ph(e,n,A,"BEFORE_LOAD")),e.router.batch(()=>{d(),e.updateMatch(t,T=>({...T,__beforeLoadContext:A})),h()})};let _;try{if(_=r.options.beforeLoad(S),xp(_))return d(),_.catch(A=>{Ph(e,n,A,"BEFORE_LOAD")}).then(E)}catch(A){d(),Ph(e,n,A,"BEFORE_LOAD")}E(_)},Yae=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>l(),o=()=>Kae(e,n,t,i),l=()=>{if(U9(e,n))return;const u=Wae(e,n,i);return xp(u)?u.then(o):o()};return a()},Xae=(e,t,n)=>{var a,o,l,u,f,d;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(o=(a=n.options).head)==null?void 0:o.call(a,i),(u=(l=n.options).scripts)==null?void 0:u.call(l,i),(d=(f=n.options).headers)==null?void 0:d.call(f,i)]).then(([h,m,g])=>({meta:h==null?void 0:h.meta,links:h==null?void 0:h.links,headScripts:h==null?void 0:h.scripts,headers:g,scripts:m,styles:h==null?void 0:h.styles}))},G9=(e,t,n,r,i)=>{const a=t[r-1],{params:o,loaderDeps:l,abortController:u,cause:f}=e.router.getMatch(n),d=au(e,r),h=A0(e,n);return{params:o,deps:l,preload:!!h,parentMatchPromise:a,abortController:u,context:d,location:e.location,navigate:m=>e.router.navigate({...m,_fromLocation:e.location}),cause:h?"preload":f,route:i,...e.router.options.additionalContext}},B$=async(e,t,n,r,i)=>{var a,o,l,u,f;try{const d=e.router.getMatch(n);try{(!($9??e.router.isServer)||d.ssr===!0)&&Sp(i);const h=i.options.loader,m=typeof h=="function"?h:h==null?void 0:h.handler,g=m==null?void 0:m(G9(e,t,n,r,i)),b=!!m&&xp(g);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||d._nonReactive.minPendingPromise)&&e.updateMatch(n,y=>({...y,isFetching:"loader"})),m){const y=b?await g:g;Ts(e,e.router.getMatch(n),y),y!==void 0&&e.updateMatch(n,S=>({...S,loaderData:y}))}i._lazyPromise&&await i._lazyPromise;const w=d._nonReactive.minPendingPromise;w&&await w,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,y=>({...y,error:void 0,context:au(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(h){let m=h;if((m==null?void 0:m.name)==="AbortError"){if(d.abortController.signal.aborted){(a=d._nonReactive.loaderPromise)==null||a.resolve(),d._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,b=>({...b,status:b.status==="pending"?"success":b.status,isFetching:!1,context:au(e,r)}));return}const g=d._nonReactive.minPendingPromise;g&&await g,Xn(h)&&await((l=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:l.call(o)),Ts(e,e.router.getMatch(n),h);try{(f=(u=i.options).onError)==null||f.call(u,h)}catch(b){m=b,Ts(e,e.router.getMatch(n),b)}!br(m)&&!Xn(m)&&await Sp(i,["errorComponent"]),e.updateMatch(n,b=>({...b,error:m,context:au(e,r),status:"error",isFetching:!1}))}}catch(d){const h=e.router.getMatch(n);h&&(h._nonReactive.loaderPromise=void 0),Ts(e,h,d)}},Zae=async(e,t,n)=>{var g,b,w,y;async function r(S,E,_,A,T){const O=Date.now()-E.updatedAt,P=S?T.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??e.router.options.defaultStaleTime??0,M=T.options.shouldReload,R=typeof M=="function"?M(G9(e,t,i,n,T)):M,{status:D,invalid:I}=A,k=O>=P&&(!!e.forceStaleReload||A.cause==="enter"||_!==void 0&&_!==A.id);o=D==="success"&&(I||(R??k)),S&&T.options.preload===!1||(o&&!e.sync&&d?(l=!0,(async()=>{var F,$;try{await B$(e,t,i,n,T);const q=e.router.getMatch(i);(F=q._nonReactive.loaderPromise)==null||F.resolve(),($=q._nonReactive.loadPromise)==null||$.resolve(),q._nonReactive.loaderPromise=void 0,q._nonReactive.loadPromise=void 0}catch(q){br(q)&&await e.router.navigate(q.options)}})()):D!=="success"||o?await B$(e,t,i,n,T):$$(e,i,n))}const{id:i,routeId:a}=e.matches[n];let o=!1,l=!1;const u=e.router.looseRoutesById[a],f=u.options.loader,d=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(U9(e,i)){if(!e.router.getMatch(i))return e.matches[n];$$(e,i,n)}else{const S=e.router.getMatch(i),E=e.router.stores.matchesId.get()[n],_=((g=E&&e.router.stores.matchStores.get(E)||null)==null?void 0:g.routeId)===a?E:(b=e.router.stores.matches.get().find(T=>T.routeId===a))==null?void 0:b.id,A=A0(e,i);if(S._nonReactive.loaderPromise){if(S.status==="success"&&!e.sync&&!S.preload&&d)return S;await S._nonReactive.loaderPromise;const T=e.router.getMatch(i),O=T._nonReactive.error||T.error;O&&Ts(e,T,O),T.status==="pending"&&await r(A,S,_,T,u)}else{const T=A&&!e.router.stores.matchStores.has(i),O=e.router.getMatch(i);O._nonReactive.loaderPromise=gf(),T!==O.preload&&e.updateMatch(i,P=>({...P,preload:T})),await r(A,S,_,O,u)}}const h=e.router.getMatch(i);l||((w=h._nonReactive.loaderPromise)==null||w.resolve(),(y=h._nonReactive.loadPromise)==null||y.resolve(),h._nonReactive.loadPromise=void 0),clearTimeout(h._nonReactive.pendingTimeout),h._nonReactive.pendingTimeout=void 0,l||(h._nonReactive.loaderPromise=void 0),h._nonReactive.dehydrated=void 0;const m=l?h.isFetching:!1;return m!==h.isFetching||h.invalid!==!1?(e.updateMatch(i,S=>({...S,isFetching:m,invalid:!1})),e.router.getMatch(i)):h};async function q$(e){var m,g;const t=e,n=[];Gae(t.router)&&Yj(t);let r;for(let b=0;b<t.matches.length;b++){try{const w=Yae(t,b);xp(w)&&await w}catch(w){if(br(w))throw w;if(Xn(w))r=w;else if(!t.preload)throw w;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,a=r&&!t.preload?L$(t,r):void 0,o=r&&t.preload?0:a!==void 0?Math.min(a+1,i):i;let l,u;for(let b=0;b<o;b++)n.push(Zae(t,n,b));try{await Promise.all(n)}catch{const b=await Promise.allSettled(n);for(const w of b){if(w.status!=="rejected")continue;const y=w.reason;if(br(y))throw y;Xn(y)?l??(l=y):u??(u=y)}if(u!==void 0)throw u}const f=l??(r&&!t.preload?r:void 0);let d=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const b=L$(t,f);b===void 0&&no();const w=t.matches[b],y=t.router.looseRoutesById[w.routeId],S=(m=t.router.options)==null?void 0:m.defaultNotFoundComponent;!y.options.notFoundComponent&&S&&(y.options.notFoundComponent=S),f.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,_=>({..._,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),d=b,await Sp(y,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(g=t.router.getMatch(b.id))!=null&&g.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Sp(b,["errorComponent"])}for(let b=0;b<=d;b++){const{id:w,routeId:y}=t.matches[b],S=t.router.looseRoutesById[y];try{const E=Xae(t,w,S);if(E){const _=await E;t.updateMatch(w,A=>({...A,..._}))}}catch(E){console.error(`Error executing head for route ${y}:`,E)}}const h=Yj(t);if(xp(h)&&await h,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function z$(e,t){const n=t.map(r=>{var i,a;return(a=(i=e.options[r])==null?void 0:i.preload)==null?void 0:a.call(i)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function Sp(e,t=hy){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:i,...a}=r.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===hy?(()=>{if(e._componentsPromise===void 0){const r=z$(e,hy);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():z$(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function W9(e){var t;for(const n of hy)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var hy=["component","errorComponent","pendingComponent","notFoundComponent"],Rs="__TSR_index",V$="popstate",F$="beforeunload";function Qae(e){let t=e.getLocation();const n=new Set,r=o=>{t=e.getLocation(),n.forEach(l=>l({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?r(o):t=e.getLocation()},a=async({task:o,navigateOpts:l,...u})=>{var h,m;if((l==null?void 0:l.ignoreBlocker)??!1){o();return}const f=((h=e.getBlockers)==null?void 0:h.call(e))??[],d=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&f.length&&d)for(const g of f){const b=$y(u.path,u.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:u.type})){(m=e.onBlocked)==null||m.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,l,u)=>{const f=t.state[Rs];l=U$(f+1,l),a({task:()=>{e.pushState(o,l),r({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:o,state:l})},replace:(o,l,u)=>{const f=t.state[Rs];l=U$(f,l),a({task:()=>{e.replaceState(o,l),r({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:o,state:l})},go:(o,l)=>{a({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:l,type:"GO"})},back:o=>{a({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{a({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[Rs]!==0,createHref:o=>e.createHref(o),block:o=>{var u;if(!e.setBlockers)return()=>{};const l=((u=e.getBlockers)==null?void 0:u.call(e))??[];return e.setBlockers([...l,o]),()=>{var d,h;const f=((d=e.getBlockers)==null?void 0:d.call(e))??[];(h=e.setBlockers)==null||h.call(e,f.filter(m=>m!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:r}}function U$(e,t){t||(t={});const n=RM();return{...t,key:n,__TSR_key:n,[Rs]:e}}function Jae(e){var M,R;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const a=()=>i,o=D=>i=D,l=(D=>D),u=(()=>$y(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((M=t.history.state)!=null&&M.__TSR_key)&&!((R=t.history.state)!=null&&R.key)){const D=RM();t.history.replaceState({[Rs]:0,key:D,__TSR_key:D},"")}let f=u(),d,h=!1,m=!1,g=!1,b=!1;const w=()=>f;let y,S;const E=()=>{y&&(P._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),P._ignoreSubscribers=!1,y=void 0,S=void 0,d=void 0)},_=(D,I,k)=>{const F=l(I);S||(d=f),f=$y(I,k),y={href:F,state:k,isPush:(y==null?void 0:y.isPush)||D==="push"},S||(S=Promise.resolve().then(()=>E()))},A=D=>{f=u(),P.notify({type:D})},T=async()=>{if(m){m=!1;return}const D=u(),I=D.state[Rs]-f.state[Rs],k=I===1,F=I===-1,$=!k&&!F||h;h=!1;const q=$?"GO":F?"BACK":"FORWARD",L=$?{type:"GO",index:I}:{type:F?"BACK":"FORWARD"};if(g)g=!1;else{const z=a();if(typeof document<"u"&&z.length){for(const U of z)if(await U.blockerFn({currentLocation:f,nextLocation:D,action:q})){m=!0,t.history.go(1),P.notify(L);return}}}f=u(),P.notify(L)},O=D=>{if(b){b=!1;return}let I=!1;const k=a();if(typeof document<"u"&&k.length)for(const F of k){const $=F.enableBeforeUnload??!0;if($===!0){I=!0;break}if(typeof $=="function"&&$()===!0){I=!0;break}}if(I)return D.preventDefault(),D.returnValue=""},P=Qae({getLocation:w,getLength:()=>t.history.length,pushState:(D,I)=>_("push",D,I),replaceState:(D,I)=>_("replace",D,I),back:D=>(D&&(g=!0),b=!0,t.history.back()),forward:D=>{D&&(g=!0),b=!0,t.history.forward()},go:D=>{h=!0,t.history.go(D)},createHref:D=>l(D),flush:E,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(F$,O,{capture:!0}),t.removeEventListener(V$,T)},onBlocked:()=>{d&&f!==d&&(f=d)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(F$,O,{capture:!0}),t.addEventListener(V$,T),t.history.pushState=function(...D){const I=n.apply(t.history,D);return P._ignoreSubscribers||A("PUSH"),I},t.history.replaceState=function(...D){const I=r.apply(t.history,D);return P._ignoreSubscribers||A("REPLACE"),I},P}function eoe(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function $y(e,t){const n=eoe(e),r=n.indexOf("#"),i=n.indexOf("?"),a=RM();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[Rs]:0,key:a,__TSR_key:a}}}function RM(){return(Math.random()+1).toString(36).substring(7)}function Kc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var toe=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var d;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",a=this.basepath===void 0,o=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=jae(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Jae()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let h;this.resolvePathCache=wp(1e3),h=this.buildRouteTree(),this.setRoutes(h)}if(!this.stores&&this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=Hae(roe(this.latestLocation),h),Dae(this)}let l=!1;const u=this.options.basepath??"/",f=this.options.rewrite;if(a||i!==u||o!==f){this.basepath=u;const h=[],m=V9(u);m&&m!=="/"&&h.push(Uae({basepath:u})),f&&h.push(f),this.rewrite=h.length===0?void 0:h.length===1?h[0]:Fae(h),this.history&&this.updateLatestLocation(),l=!0}l&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((d=window.CSS)==null?void 0:d.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=_ae(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&yae(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:u,search:f,hash:d,href:h,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(u)){const S=this.options.parseSearch(f),E=this.options.stringifySearch(S);return{href:u+E+d,publicHref:u+E+d,pathname:Oh(u).path,external:!1,searchStr:E,search:Ol(r==null?void 0:r.search,S),hash:Oh(d.slice(1)).path,state:As(r==null?void 0:r.state,m)}}const g=new URL(h,this.origin),b=Kj(this.rewrite,g),w=this.options.parseSearch(b.search),y=this.options.stringifySearch(w);return b.search=y,{href:b.href.replace(b.origin,""),publicHref:h,pathname:Oh(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:y,search:Ol(r==null?void 0:r.search,w),hash:Oh(b.hash.slice(1)).path,state:As(r==null?void 0:r.state,m)}},a=i(n),{__tempLocation:o,__tempKey:l}=a.state;if(o&&(!l||l===this.tempLocationKey)){const u=i(o);return u.state.key=a.state.key,u.state.__TSR_key=a.state.__TSR_key,delete u.state.__tempLocation,{...u,maskedLocation:a}}return a},this.resolvePathWithBase=(n,r)=>Oae({base:n,to:MM(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>ioe({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(a={})=>{var D,I;const o=a._fromLocation||this.pendingBuiltLocation||this.latestLocation,l=this.matchRoutesLightweight(o);a.from;const u=a.unsafeRelative==="path"?o.pathname:a.from??l.fullPath,f=this.resolvePathWithBase(u,"."),d=l.search,h=Object.assign(Object.create(null),l.params),m=a.to?this.resolvePathWithBase(f,`${a.to}`):this.resolvePathWithBase(f,"."),g=a.params===!1||a.params===null?Object.create(null):(a.params??!0)===!0?h:Object.assign(h,Es(a.params,h)),b=this.getMatchedRoutes(m);let w=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(w=[...w,this.options.notFoundRoute]),Object.keys(g).length>0)for(const k of w){const F=((D=k.options.params)==null?void 0:D.stringify)??k.options.stringifyParams;if(F)try{Object.assign(g,F(g))}catch{}}const y=n.leaveParams?m:Oh(R$({path:m,params:g,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let S=d;if(n._includeValidateSearch&&((I=this.options.search)!=null&&I.strict)){const k={};w.forEach(F=>{if(F.options.validateSearch)try{Object.assign(k,py(F.options.validateSearch,{...k,...S}))}catch{}}),S=k}S=aoe({search:S,dest:a,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),S=Ol(d,S);const E=this.options.stringifySearch(S),_=a.hash===!0?o.hash:a.hash?Es(a.hash,o.hash):void 0,A=_?`#${_}`:"";let T=a.state===!0?o.state:a.state?Es(a.state,o.state):{};T=As(o.state,T);const O=`${y}${E}${A}`;let P,M,R=!1;if(this.rewrite){const k=new URL(O,this.origin),F=F9(this.rewrite,k);P=k.href.replace(k.origin,""),F.origin!==this.origin?(M=F.href,R=!0):M=F.pathname+F.search+F.hash}else P=mae(O),M=P;return{publicHref:M,href:P,pathname:y,search:S,searchStr:E,state:T,hash:_??"",external:R,unmaskOnReload:a.unmaskOnReload}},i=(a={},o)=>{const l=r(a);let u=o?r(o):void 0;if(!u){const f=Object.create(null);if(this.options.routeMasks){const d=bae(l.pathname,this.processedTree);if(d){Object.assign(f,d.rawParams);const{from:h,params:m,...g}=d.route,b=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,Es(m,f));o={from:n.from,...g,params:b},u=r(o)}}}return u&&(l.maskedLocation=u),l};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const a=()=>{const u=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];u.forEach(d=>{i.state[d]=this.latestLocation.state[d]});const f=ru(i.state,this.latestLocation.state);return u.forEach(d=>{delete i.state[d]}),f},o=Ms(this.latestLocation.href)===Ms(i.href);let l=this.commitLocationPromise;if(this.commitLocationPromise=gf(()=>{l==null||l.resolve(),l=void 0}),o&&a())this.load();else{let{maskedLocation:u,hashScrollIntoView:f,...d}=i;u&&(d={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](d.publicHref,d.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:a,ignoreBlocker:o,href:l,...u}={})=>{if(l){const h=this.history.location.state.__TSR_index,m=$y(l,{__TSR_index:n?h:h+1}),g=new URL(m.pathname,this.origin);u.to=Kj(this.rewrite,g).pathname,u.search=this.options.parseSearch(m.search),u.hash=m.hash.slice(1)}const f=this.buildLocation({...u,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const d=this.commitLocation({...f,viewTransition:a,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),d},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:a,...o})=>{var u,f;let l=!1;if(i)try{new URL(`${i}`),l=!0}catch{}if(l&&!r&&(r=!0),r){if(n!==void 0||!i){const h=this.buildLocation({to:n,...o});i=i??h.publicHref,a=a??h.publicHref}const d=!l&&a?a:i;if(Iy(d,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const h=((f=(u=this.history).getBlockers)==null?void 0:f.call(u))??[];for(const m of h)if(m!=null&&m.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...o,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(a=>a.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,a;const o=this.stores.resolvedLocation.get()??this.stores.location.get();for(a=new Promise(u=>{this.startTransition(async()=>{var f;try{this.beforeLoad();const d=this.latestLocation,h=Kc(d,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...h}),this.emit({type:"onBeforeLoad",...h}),await q$({router:this,sync:n==null?void 0:n.sync,forceStaleReload:o.href===d.href,matches:this.stores.pendingMatches.get(),location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var y,S;let m=null,g=null,b=null,w=null;this.batch(()=>{const E=this.stores.pendingMatches.get(),_=E.length,A=this.stores.matches.get();m=_?A.filter(P=>!this.stores.pendingMatchStores.has(P.id)):null;const T=new Set;for(const P of this.stores.pendingMatchStores.values())P.routeId&&T.add(P.routeId);const O=new Set;for(const P of this.stores.matchStores.values())P.routeId&&O.add(P.routeId);g=_?A.filter(P=>!T.has(P.routeId)):null,b=_?E.filter(P=>!O.has(P.routeId)):null,w=_?E.filter(P=>O.has(P.routeId)):A,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),_&&(this.stores.setMatches(E),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[E,_]of[[g,"onLeave"],[b,"onEnter"],[w,"onStay"]])if(E)for(const A of E)(S=(y=this.looseRoutesById[A.routeId].options)[_])==null||S.call(y,A)})})}})}catch(d){br(d)?(r=d,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Xn(d)&&(i=d);const h=r?r.status:i?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(h),this.stores.redirect.set(r)})}this.latestLoadPromise===a&&((f=this.commitLocationPromise)==null||f.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=a,await a;this.latestLoadPromise&&a!==this.latestLoadPromise;)await this.latestLoadPromise;let l;this.hasNotFoundMatch()?l=404:this.stores.matches.get().some(u=>u.status==="error")&&(l=500),l!==void 0&&this.stores.statusCode.set(l)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const a=this.latestLocation,o=this.stores.resolvedLocation.get(),l=typeof r.types=="function"?r.types(Kc(a,o)):r.types;if(l===!1){n();return}i={update:n,types:l}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const a=this.stores.matchStores.get(n);if(a){a.set(r);return}const o=this.stores.cachedMatchStores.get(n);if(o){const l=r(o.get());l.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(u=>u.filter(f=>f!==n)):o.set(l)}})},this.getMatch=n=>{var r,i,a;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((a=this.stores.matchStores.get(n))==null?void 0:a.get())},this.invalidate=n=>{const r=i=>{var a;return((a=n==null?void 0:n.filter)==null?void 0:a.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),a=this.getParsedLocationHref(i);n.options.href=a,n.headers.set("Location",a)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const a=i.pathname+i.search+i.hash;n.options.href=a,n.headers.set("Location",a)}}catch{}if(n.options.href&&!n.options._builtLocation&&Iy(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=i=>{const a=this.looseRoutesById[i.routeId];if(!a.options.loader)return!0;const o=(i.preload?a.options.preloadGcTime??this.options.defaultPreloadGcTime:a.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=o};this.clearCache({filter:r})},this.loadRouteChunk=Sp,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const a=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),o=new Set([...a,...this.stores.cachedIds.get()]),l=i.filter(u=>!o.has(u.id));if(l.length){const u=this.stores.cachedMatches.get();this.stores.setCached([...u,...l])}try{return i=await q$({router:this,matches:i,location:r,preload:!0,updateMatch:(u,f)=>{a.has(u)?i=i.map(d=>d.id===u?f(d):d):this.updateMatch(u,f)}}),i}catch(u){if(br(u))return u.options.reloadDocument?void 0:await this.preloadRoute({...u.options,_fromLocation:r});Xn(u)||console.error(u);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},a=this.buildLocation(i);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const o=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),l=xae(a.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!l||n.params&&!ru(l.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?ru(o.search,a.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??Bae,parseSearch:e.parseSearch??$ae,protocolAllowlist:e.protocolAllowlist??pae}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var h,m;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:a}=n;let{matchedRoutes:o}=n,l=!1;(r?r.path!=="/"&&i["**"]:Ms(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:l=!0);const u=l?soe(this.options.notFoundMode,o):void 0,f=new Array(o.length),d=new Map;for(const g of this.stores.matchStores.values())g.routeId&&d.set(g.routeId,g.get());for(let g=0;g<o.length;g++){const b=o[g],w=f[g-1];let y,S,E;{const q=(w==null?void 0:w.search)??e.search,L=(w==null?void 0:w._strictSearch)??void 0;try{const z=py(b.options.validateSearch,{...q})??void 0;y={...q,...z},S={...L,...z},E=void 0}catch(z){let U=z;if(z instanceof By||(U=new By(z.message,{cause:z})),t!=null&&t.throwOnError)throw U;y=q,S={},E=U}}const _=((m=(h=b.options).loaderDeps)==null?void 0:m.call(h,{search:y}))??"",A=_?JSON.stringify(_):"",{interpolatedPath:T,usedParams:O}=R$({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),P=b.id+T+A,M=this.getMatch(P),R=d.get(b.id),D=(M==null?void 0:M._strictParams)??O;let I;if(!M)try{H$(b,O,a,D)}catch(q){if(Xn(q)||br(q)?I=q:I=new noe(q.message,{cause:q}),t!=null&&t.throwOnError)throw I}Object.assign(i,D);const k=R?"stay":"enter";let F;if(M)F={...M,cause:k,params:(R==null?void 0:R.params)??i,_strictParams:D,search:Ol(R?R.search:M.search,y),_strictSearch:S};else{const q=b.options.loader||b.options.beforeLoad||b.lazyFn||W9(b)?"pending":"success";F={id:P,ssr:b.options.ssr,index:g,routeId:b.id,params:(R==null?void 0:R.params)??i,_strictParams:D,pathname:T,updatedAt:Date.now(),search:R?Ol(R.search,y):y,_strictSearch:S,searchError:void 0,status:q,isFetching:!1,error:void 0,paramsError:I,__routeContext:void 0,_nonReactive:{loadPromise:gf()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:k,loaderDeps:R?As(R.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(F.globalNotFound=u===b.id),F.searchError=E;const $=this.getParentContext(w);F.context={...$,...F.__routeContext,...F.__beforeLoadContext},f[g]=F}for(let g=0;g<f.length;g++){const b=f[g],w=this.looseRoutesById[b.routeId],y=this.getMatch(b.id),S=d.get(b.routeId);if(b.params=S?Ol(S.params,i):i,!y){const E=f[g-1],_=this.getParentContext(E);if(w.options.context){const A={deps:b.loaderDeps,params:b.params,context:_??{},location:e,navigate:T=>this.navigate({...T,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:f,routeId:w.id};b.__routeContext=w.options.context(A)??void 0}b.context={..._,...b.__routeContext,...b.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var d;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=bp(t),a={...e.search};for(const h of t)try{Object.assign(a,py(h.options.validateSearch,a))}catch{}const o=bp(this.stores.matchesId.get()),l=o&&((d=this.stores.matchStores.get(o))==null?void 0:d.get()),u=l&&l.routeId===i.id&&l.pathname===e.pathname;let f;if(u)f=l.params;else{const h=Object.assign(Object.create(null),n);for(const m of t)try{H$(m,n,r??{},h)}catch{}f=h}return{matchedRoutes:t,fullPath:i.fullPath,search:a,params:f}}},By=class extends Error{},noe=class extends Error{};function roe(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function py(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new By("Async validation not supported");if(n.issues)throw new By(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function ioe({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=Ms(e);let a,o;const l=wae(i,n,!0);return l&&(a=l.route,Object.assign(r,l.rawParams),o=Object.assign(Object.create(null),l.parsedParams)),{matchedRoutes:(l==null?void 0:l.branch)||[t.__root__],routeParams:r,foundRoute:a,parsedParams:o}}function aoe({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return ooe(n)(e,t,r??!1)}function ooe(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const a of e){if("search"in a.options)(i=a.options.search)!=null&&i.middlewares&&t.middlewares.push(...a.options.search.middlewares);else if(a.options.preSearchFilters||a.options.postSearchFilters){const o=({search:l,next:u})=>{let f=l;"preSearchFilters"in a.options&&a.options.preSearchFilters&&(f=a.options.preSearchFilters.reduce((h,m)=>m(h),l));const d=u(f);return"postSearchFilters"in a.options&&a.options.postSearchFilters?a.options.postSearchFilters.reduce((h,m)=>m(h),d):d};t.middlewares.push(o)}if(a.options.validateSearch){const o=({search:l,next:u})=>{const f=u(l);if(!t._includeValidateSearch)return f;try{return{...f,...py(a.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(o)}}const n=({search:a})=>{const o=t.dest;return o.search?o.search===!0?a:Es(o.search,a):{}};t.middlewares.push(n);const r=(a,o,l)=>{if(a>=l.length)return o;const u=l[a];return u({search:o,next:d=>r(a+1,d,l)})};return function(o,l,u){return t.dest=l,t._includeValidateSearch=u,r(0,o,t.middlewares)}}function soe(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return iu}function H$(e,t,n,r){var a;const i=((a=e.options.params)==null?void 0:a.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const o in t)o in n&&(r[o]=n[o]);else{const o=i(r);Object.assign(r,o)}}var loe="Error preloading route! ☝️",K9=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var u,f;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(f=(u=this.options).getParentRoute)==null?void 0:f.call(u),r?this._path=iu:this.parentRoute||no();let i=r?iu:n==null?void 0:n.path;i&&i!=="/"&&(i=z9(i));const a=(n==null?void 0:n.id)||i;let o=r?iu:dy([this.parentRoute.id==="__root__"?"":this.parentRoute.id,a]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=dy(["/",o]));const l=o==="__root__"?"/":dy([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=l,this._to=Ms(l)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>Vae({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},uoe=class extends K9{constructor(e){super(e)}};function coe(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function kM(e){const t=e.errorComponent??DM;return x.jsx(foe,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?j.createElement(t,{error:n,reset:r}):e.children})}var foe=class extends j.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function DM({error:e}){const[t,n]=j.useState(!1);return x.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[x.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),x.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),x.jsx("div",{style:{height:".25rem"}}),t?x.jsx("div",{children:x.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?x.jsx("code",{children:e.message}):null})}):null]})}function doe({children:e,fallback:t=null}){return Y9()?x.jsx(ie.Fragment,{children:e}):x.jsx(ie.Fragment,{children:t})}function Y9(){return ie.useSyncExternalStore(hoe,()=>!0,()=>!1)}function hoe(){return()=>{}}var X9=j.createContext(null);function Ur(e){return j.useContext(X9)}var T0=j.createContext(void 0),poe=j.createContext(void 0),Gt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Gt||{});function moe({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:l};function r(f,d,h){const m=d.depsTail;if(m!==void 0&&m.dep===f)return;const g=m!==void 0?m.nextDep:d.deps;if(g!==void 0&&g.dep===f){g.version=h,d.depsTail=g;return}const b=f.subsTail;if(b!==void 0&&b.version===h&&b.sub===d)return;const w=d.depsTail=f.subsTail={version:h,dep:f,sub:d,prevDep:m,nextDep:g,prevSub:b,nextSub:void 0};g!==void 0&&(g.prevDep=w),m!==void 0?m.nextDep=w:d.deps=w,b!==void 0?b.nextSub=w:f.subs=w}function i(f,d=f.sub){const h=f.dep,m=f.prevDep,g=f.nextDep,b=f.nextSub,w=f.prevSub;return g!==void 0?g.prevDep=m:d.depsTail=m,m!==void 0?m.nextDep=g:d.deps=g,b!==void 0?b.prevSub=w:h.subsTail=w,w!==void 0?w.nextSub=b:(h.subs=b)===void 0&&n(h),g}function a(f){let d=f.nextSub,h;e:do{const m=f.sub;let g=m.flags;if(g&60?g&12?g&4?!(g&48)&&u(f,m)?(m.flags=g|40,g&=1):g=0:m.flags=g&-9|32:g=0:m.flags=g|32,g&2&&t(m),g&1){const b=m.subs;if(b!==void 0){const w=(f=b).nextSub;w!==void 0&&(h={value:d,prev:h},d=w);continue}}if((f=d)!==void 0){d=f.nextSub;continue}for(;h!==void 0;)if(f=h.value,h=h.prev,f!==void 0){d=f.nextSub;continue e}break}while(!0)}function o(f,d){let h,m=0,g=!1;e:do{const b=f.dep,w=b.flags;if(d.flags&16)g=!0;else if((w&17)===17){if(e(b)){const y=b.subs;y.nextSub!==void 0&&l(y),g=!0}}else if((w&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(h={value:f,prev:h}),f=b.deps,d=b,++m;continue}if(!g){const y=f.nextDep;if(y!==void 0){f=y;continue}}for(;m--;){const y=d.subs,S=y.nextSub!==void 0;if(S?(f=h.value,h=h.prev):f=y,g){if(e(d)){S&&l(y),d=f.sub;continue}g=!1}else d.flags&=-33;d=f.sub;const E=f.nextDep;if(E!==void 0){f=E;continue e}}return g}while(!0)}function l(f){do{const d=f.sub,h=d.flags;(h&48)===32&&(d.flags=h|16,(h&6)===2&&t(d))}while((f=f.nextSub)!==void 0)}function u(f,d){let h=d.depsTail;for(;h!==void 0;){if(h===f)return!0;h=h.prevDep}return!1}}function goe(e,t,n){var a,o,l;const r=typeof e=="object",i=r?e:void 0;return{next:(a=r?e.next:e)==null?void 0:a.bind(i),error:(o=r?e.error:t)==null?void 0:o.bind(i),complete:(l=r?e.complete:n)==null?void 0:l.bind(i)}}const Xj=[];let my=0;const{link:G$,unlink:voe,propagate:yoe,checkDirty:Z9,shallowPropagate:W$}=moe({update(e){return e._update()},notify(e){Xj[Zj++]=e,e.flags&=~Gt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Gt.Mutable|Gt.Dirty,qy(e))}});let Mv=0,Zj=0,Ji,Qj=0;function Q9(e){try{++Qj,e()}finally{--Qj||J9()}}function qy(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=voe(n,e)}function J9(){if(!(Qj>0)){for(;Mv<Zj;){const e=Xj[Mv];Xj[Mv++]=void 0,e.notify()}Mv=0,Zj=0}}function K$(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Gt.None:Gt.Mutable,get(){return Ji!==void 0&&G$(i,Ji,my),i._snapshot},subscribe(a){const o=goe(a),l={current:!1},u=boe(()=>{var f;i.get(),l.current?(f=o.next)==null||f.call(o,i._snapshot):l.current=!0});return{unsubscribe:()=>{u.stop()}}},_update(a){const o=Ji,l=(t==null?void 0:t.compare)??Object.is;if(n)Ji=i,++my,i.depsTail=void 0;else if(a===void 0)return!1;n&&(i.flags=Gt.Mutable|Gt.RecursedCheck);try{const u=i._snapshot,f=typeof a=="function"?a(u):a===void 0&&n?r(u):a;return u===void 0||!l(u,f)?(i._snapshot=f,!0):!1}finally{Ji=o,n&&(i.flags&=~Gt.RecursedCheck),qy(i)}}};return n?(i.flags=Gt.Mutable|Gt.Dirty,i.get=function(){const a=i.flags;if(a&Gt.Dirty||a&Gt.Pending&&Z9(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&W$(o)}}else a&Gt.Pending&&(i.flags=a&~Gt.Pending);return Ji!==void 0&&G$(i,Ji,my),i._snapshot}):i.set=function(a){if(i._update(a)){const o=i.subs;o!==void 0&&(yoe(o),W$(o),J9())}},i}function boe(e){const t=()=>{const r=Ji;Ji=n,++my,n.depsTail=void 0,n.flags=Gt.Watching|Gt.RecursedCheck;try{return e()}finally{Ji=r,n.flags&=~Gt.RecursedCheck,qy(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Gt.Watching|Gt.RecursedCheck,notify(){const r=this.flags;r&Gt.Dirty||r&Gt.Pending&&Z9(this.deps,this)?t():this.flags=Gt.Watching},stop(){this.flags=Gt.None,this.depsTail=void 0,qy(this)}};return t(),n}var NS={exports:{}},PS={},MS={exports:{}},RS={};/**
|
|
50
|
+
* @license React
|
|
51
|
+
* use-sync-external-store-shim.production.js
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE file in the root directory of this source tree.
|
|
57
|
+
*/var Y$;function xoe(){if(Y$)return RS;Y$=1;var e=Om();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,o=e.useDebugValue;function l(h,m){var g=m(),b=r({inst:{value:g,getSnapshot:m}}),w=b[0].inst,y=b[1];return a(function(){w.value=g,w.getSnapshot=m,u(w)&&y({inst:w})},[h,g,m]),i(function(){return u(w)&&y({inst:w}),h(function(){u(w)&&y({inst:w})})},[h]),o(g),g}function u(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!n(h,g)}catch{return!0}}function f(h,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:l;return RS.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,RS}var X$;function woe(){return X$||(X$=1,MS.exports=xoe()),MS.exports}/**
|
|
58
|
+
* @license React
|
|
59
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
60
|
+
*
|
|
61
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
62
|
+
*
|
|
63
|
+
* This source code is licensed under the MIT license found in the
|
|
64
|
+
* LICENSE file in the root directory of this source tree.
|
|
65
|
+
*/var Z$;function Soe(){if(Z$)return PS;Z$=1;var e=Om(),t=woe();function n(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,a=e.useRef,o=e.useEffect,l=e.useMemo,u=e.useDebugValue;return PS.useSyncExternalStoreWithSelector=function(f,d,h,m,g){var b=a(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=l(function(){function S(O){if(!E){if(E=!0,_=O,O=m(O),g!==void 0&&w.hasValue){var P=w.value;if(g(P,O))return A=P}return A=O}if(P=A,r(_,O))return P;var M=m(O);return g!==void 0&&g(P,M)?(_=O,P):(_=O,A=M)}var E=!1,_,A,T=h===void 0?null:h;return[function(){return S(d())},T===null?void 0:function(){return S(T())}]},[d,h,m,g]);var y=i(f,b[0],b[1]);return o(function(){w.hasValue=!0,w.value=y},[y]),u(y),y},PS}var Q$;function _oe(){return Q$||(Q$=1,NS.exports=Soe()),NS.exports}var eG=_oe();const Eoe=yt(eG);function Aoe(e,t){return e===t}function _r(e,t,n=Aoe){const r=j.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:l}=e.subscribe(o);return l},[e]),i=j.useCallback(()=>e==null?void 0:e.get(),[e]);return eG.useSyncExternalStoreWithSelector(r,i,i,t,n)}var Toe={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Nu(e){const t=Ur(),n=j.useContext(e.from?poe:T0),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=j.useRef(void 0);return _r(i??Toe,o=>{if((e.shouldThrow??!0)&&!o&&no(),o===void 0)return;const l=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const u=As(a.current,l);return a.current=u,u}return l})}function tG(e){return Nu({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function nG(e){const{select:t,...n}=e;return Nu({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function jm(e){return Nu({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Pu(e){return Nu({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function zi(e){const t=Ur();return j.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function rG(e){return Nu({...e,select:t=>e.select?e.select(t.context):t.context})}var Mu=w9();const Coe=yt(Mu);function Ooe(e,t){const n=Ur(),r=uae(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:l,preload:u,preloadDelay:f,preloadIntentProximity:d,hashScrollIntoView:h,replace:m,startTransition:g,resetScroll:b,viewTransition:w,children:y,target:S,disabled:E,style:_,className:A,onClick:T,onBlur:O,onFocus:P,onMouseEnter:M,onMouseLeave:R,onTouchStart:D,ignoreBlocker:I,params:k,search:F,hash:$,state:q,mask:L,reloadDocument:z,unsafeRelative:U,from:K,_fromLocation:Z,...H}=e,V=Y9(),X=j.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),Y=_r(n.stores.location,Ge=>Ge,(Ge,Lt)=>Ge.href===Lt.href),G=j.useMemo(()=>{const Ge={_fromLocation:Y,...X};return n.buildLocation(Ge)},[n,Y,X]),Q=G.maskedLocation?G.maskedLocation.publicHref:G.publicHref,J=G.maskedLocation?G.maskedLocation.external:G.external,re=j.useMemo(()=>koe(Q,J,n.history,E),[E,J,Q,n.history]),ne=j.useMemo(()=>{if(re!=null&&re.external)return Iy(re.href,n.protocolAllowlist)?void 0:re.href;if(!Doe(l)&&!(typeof l!="string"||l.indexOf(":")===-1))try{return new URL(l),Iy(l,n.protocolAllowlist)?void 0:l}catch{}},[l,re,n.protocolAllowlist]),fe=j.useMemo(()=>{if(ne)return!1;if(o!=null&&o.exact){if(!Cae(Y.pathname,G.pathname,n.basepath))return!1}else{const Ge=Ly(Y.pathname,n.basepath),Lt=Ly(G.pathname,n.basepath);if(!(Ge.startsWith(Lt)&&(Ge.length===Lt.length||Ge[Lt.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!ru(Y.search,G.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?V&&Y.hash===G.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,Y,ne,V,G.hash,G.pathname,G.search,n.basepath]),he=fe?Es(i,{})??joe:kS,oe=fe?kS:Es(a,{})??kS,ye=[A,he.className,oe.className].filter(Boolean).join(" "),be=(_||he.style||oe.style)&&{..._,...he.style,...oe.style},[xe,Ee]=j.useState(!1),_e=j.useRef(!1),tt=e.reloadDocument||ne?!1:u??n.options.defaultPreload,nt=f??n.options.defaultPreloadDelay??0,It=j.useCallback(()=>{n.preloadRoute({...X,_builtLocation:G}).catch(Ge=>{console.warn(Ge),console.warn(loe)})},[n,X,G]);lae(r,j.useCallback(Ge=>{Ge!=null&&Ge.isIntersecting&&It()},[It]),Roe,{disabled:!!E||tt!=="viewport"}),j.useEffect(()=>{_e.current||!E&&tt==="render"&&(It(),_e.current=!0)},[E,It,tt]);const Ut=Ge=>{const Lt=Ge.currentTarget.getAttribute("target"),bn=S!==void 0?S:Lt;if(!E&&!Ioe(Ge)&&!Ge.defaultPrevented&&(!bn||bn==="_self")&&Ge.button===0){Ge.preventDefault(),Mu.flushSync(()=>{Ee(!0)});const Vn=n.subscribe("onResolved",()=>{Vn(),Ee(!1)});n.navigate({...X,replace:m,resetScroll:b,hashScrollIntoView:h,startTransition:g,viewTransition:w,ignoreBlocker:I})}};if(ne)return{...H,ref:r,href:ne,...y&&{children:y},...S&&{target:S},...E&&{disabled:E},..._&&{style:_},...A&&{className:A},...T&&{onClick:T},...O&&{onBlur:O},...P&&{onFocus:P},...M&&{onMouseEnter:M},...R&&{onMouseLeave:R},...D&&{onTouchStart:D}};const Pt=Ge=>{if(E||tt!=="intent")return;if(!nt){It();return}const Lt=Ge.currentTarget;if(Mh.has(Lt))return;const bn=setTimeout(()=>{Mh.delete(Lt),It()},nt);Mh.set(Lt,bn)},Et=Ge=>{E||tt!=="intent"||It()},At=Ge=>{if(E||!tt||!nt)return;const Lt=Ge.currentTarget,bn=Mh.get(Lt);bn&&(clearTimeout(bn),Mh.delete(Lt))};return{...H,...he,...oe,href:re==null?void 0:re.href,ref:r,onClick:Tc([T,Ut]),onBlur:Tc([O,At]),onFocus:Tc([P,Pt]),onMouseEnter:Tc([M,Pt]),onMouseLeave:Tc([R,At]),onTouchStart:Tc([D,Et]),disabled:!!E,target:S,...be&&{style:be},...ye&&{className:ye},...E&&Noe,...fe&&Poe,...V&&xe&&Moe}}var kS={},joe={className:"active"},Noe={role:"link","aria-disabled":!0},Poe={"data-status":"active","aria-current":"page"},Moe={"data-transitioning":"transitioning"},Mh=new WeakMap,Roe={rootMargin:"100px"},Tc=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function koe(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function Doe(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var IM=j.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...a}=Ooe(r,t),o=typeof r.children=="function"?r.children({isActive:a["data-status"]==="active"}):r.children;if(!n){const{disabled:l,...u}=a;return j.createElement("a",u,o)}return j.createElement(n,a,o)});function Ioe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Loe=class extends K9{constructor(e){super(e),this.useMatch=t=>Nu({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>rG({...t,from:this.id}),this.useSearch=t=>Pu({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>jm({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>nG({...t,from:this.id}),this.useLoaderData=t=>tG({...t,from:this.id}),this.useNavigate=()=>zi({from:this.fullPath}),this.Link=ie.forwardRef((t,n)=>x.jsx(IM,{ref:n,from:this.fullPath,...t}))}};function Zs(e){return new Loe(e)}var $oe=class extends uoe{constructor(e){super(e),this.useMatch=t=>Nu({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>rG({...t,from:this.id}),this.useSearch=t=>Pu({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>jm({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>nG({...t,from:this.id}),this.useLoaderData=t=>tG({...t,from:this.id}),this.useNavigate=()=>zi({from:this.fullPath}),this.Link=ie.forwardRef((t,n)=>x.jsx(IM,{ref:n,from:this.fullPath,...t}))}};function Boe(e){return new $oe(e)}function qoe(e){const t=Ur(),n=`not-found-${_r(t.stores.location,r=>r.pathname)}-${_r(t.stores.status,r=>r)}`;return x.jsx(kM,{getResetKey:()=>n,onCatch:(r,i)=>{var a;if(Xn(r))(a=e.onCatch)==null||a.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(Xn(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function zoe(){return x.jsx("p",{children:"Not Found"})}function Dc(e){return x.jsx(x.Fragment,{children:e.children})}function iG(e,t,n){return t.options.notFoundComponent?x.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?x.jsx(e.options.defaultNotFoundComponent,{...n}):x.jsx(zoe,{})}function Voe(e){return null}function Foe(){return Voe(Ur()),null}var aG=j.memo(function({matchId:t}){const n=Ur(),r=n.stores.matchStores.get(t);r||no();const i=_r(n.stores.loadedAt,o=>o),a=_r(r,o=>o);return x.jsx(Uoe,{router:n,matchId:t,resetKey:i,matchState:j.useMemo(()=>{var u;const o=a.routeId,l=(u=n.routesById[o].parentRoute)==null?void 0:u.id;return{routeId:o,ssr:a.ssr,_displayPending:a._displayPending,parentRouteId:l}},[a._displayPending,a.routeId,a.ssr,n.routesById])})});function Uoe({router:e,matchId:t,resetKey:n,matchState:r}){var b,w;const i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?x.jsx(a,{}):null,l=i.options.errorComponent??e.options.defaultErrorComponent,u=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,d=r.ssr===!1||r.ssr==="data-only",h=(!i.isRoot||i.options.wrapInSuspense||d)&&(i.options.wrapInSuspense??a??(((w=i.options.errorComponent)==null?void 0:w.preload)||d))?j.Suspense:Dc,m=l?kM:Dc,g=f?qoe:Dc;return x.jsxs(i.isRoot?i.options.shellComponent??Dc:Dc,{children:[x.jsx(T0.Provider,{value:t,children:x.jsx(h,{fallback:o,children:x.jsx(m,{getResetKey:()=>n,errorComponent:l||DM,onCatch:(y,S)=>{if(Xn(y))throw y.routeId??(y.routeId=r.routeId),y;u==null||u(y,S)},children:x.jsx(g,{fallback:y=>{if(y.routeId??(y.routeId=r.routeId),!f||y.routeId&&y.routeId!==r.routeId||!y.routeId&&!i.isRoot)throw y;return j.createElement(f,y)},children:d||r._displayPending?x.jsx(doe,{fallback:o,children:x.jsx(J$,{matchId:t})}):x.jsx(J$,{matchId:t})})})})}),r.parentRouteId===iu?x.jsxs(x.Fragment,{children:[x.jsx(Hoe,{resetKey:n}),e.options.scrollRestoration&&$9?x.jsx(Foe,{}):null]}):null]})}function Hoe({resetKey:e}){const t=Ur(),n=j.useRef(void 0);return Xh(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...Kc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var J$=j.memo(function({matchId:t}){const n=Ur(),r=(d,h)=>{var m;return((m=n.getMatch(d.id))==null?void 0:m._nonReactive[h])??d._nonReactive[h]},i=n.stores.matchStores.get(t);i||no();const a=_r(i,d=>d),o=a.routeId,l=n.routesById[o],u=j.useMemo(()=>{var h;const d=(h=n.routesById[o].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:h({routeId:o,loaderDeps:a.loaderDeps,params:a._strictParams,search:a._strictSearch});return d?JSON.stringify(d):void 0},[o,a.loaderDeps,a._strictParams,a._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=j.useMemo(()=>{const d=l.options.component??n.options.defaultComponent;return d?x.jsx(d,{},u):x.jsx(oG,{})},[u,l.options.component,n.options.defaultComponent]);if(a._displayPending)throw r(a,"displayPendingPromise");if(a._forcePending)throw r(a,"minPendingPromise");if(a.status==="pending"){const d=l.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(a.id);if(h&&!h._nonReactive.minPendingPromise){const m=gf();h._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw r(a,"loadPromise")}if(a.status==="notFound")return Xn(a.error)||no(),iG(n,l,a.error);if(a.status==="redirected")throw br(a.error)||no(),r(a,"loadPromise");if(a.status==="error")throw a.error;return f}),oG=j.memo(function(){const t=Ur(),n=j.useContext(T0);let r,i=!1,a;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=_r(f,d=>[d==null?void 0:d.routeId,(d==null?void 0:d.globalNotFound)??!1]),a=_r(t.stores.matchesId,d=>d[d.findIndex(h=>h===n)+1])}const o=r?t.routesById[r]:void 0,l=t.options.defaultPendingComponent?x.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||no(),iG(t,o,void 0);if(!a)return null;const u=x.jsx(aG,{matchId:a});return r===iu?x.jsx(j.Suspense,{fallback:l,children:u}):u});function Goe(){const e=Ur(),t=j.useRef({router:e,mounted:!1}),[n,r]=j.useState(!1),i=_r(e.stores.isLoading,h=>h),a=_r(e.stores.hasPending,h=>h),o=SS(i),l=i||n||a,u=SS(l),f=i||a,d=SS(f);return e.startTransition=h=>{r(!0),j.startTransition(()=>{h(),r(!1)})},j.useEffect(()=>{const h=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ms(e.latestLocation.publicHref)!==Ms(m.publicHref)&&e.commitLocation({...m,replace:!0}),()=>{h()}},[e,e.history]),Xh(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(m){console.error(m)}})()},[e]),Xh(()=>{o&&!i&&e.emit({type:"onLoad",...Kc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Xh(()=>{d&&!f&&e.emit({type:"onBeforeRouteMount",...Kc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,d,e]),Xh(()=>{if(u&&!l){const h=Kc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...h}),Q9(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),h.hrefChanged&&coe(e)}},[l,u,e]),null}function Woe(){const e=Ur(),t=e.routesById[iu].options.pendingComponent??e.options.defaultPendingComponent,n=t?x.jsx(t,{}):null,r=x.jsxs(typeof document<"u"&&e.ssr?Dc:j.Suspense,{fallback:n,children:[x.jsx(Goe,{}),x.jsx(Koe,{})]});return e.options.InnerWrap?x.jsx(e.options.InnerWrap,{children:r}):r}function Koe(){const e=Ur(),t=_r(e.stores.firstId,i=>i),n=_r(e.stores.loadedAt,i=>i),r=t?x.jsx(aG,{matchId:t}):null;return x.jsx(T0.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:x.jsx(kM,{getResetKey:()=>n,errorComponent:DM,onCatch:void 0,children:r})})}var Yoe=e=>({createMutableStore:K$,createReadonlyStore:K$,batch:Q9}),Xoe=e=>new Zoe(e),Zoe=class extends toe{constructor(e){super(e,Yoe)}};function Qoe({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=x.jsx(X9.Provider,{value:e,children:t});return e.options.Wrap?x.jsx(e.options.Wrap,{children:r}):r}function Joe({router:e,...t}){return x.jsx(Qoe,{router:e,...t,children:x.jsx(Woe,{})})}function ese(e){const t=Ur(),n=j.useRef(void 0);return _r(t.stores.location,r=>{const i=r;if(t.options.defaultStructuralSharing){const a=As(n.current,i);return n.current=a,a}return i})}function ke(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function e3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zs(...e){return t=>{let n=!1;const r=e.map(i=>{const a=e3(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():e3(e[i],null)}}}}function ft(...e){return j.useCallback(zs(...e),e)}function tse(e,t){const n=j.createContext(t),r=a=>{const{children:o,...l}=a,u=j.useMemo(()=>l,Object.values(l));return x.jsx(n.Provider,{value:u,children:o})};r.displayName=e+"Provider";function i(a){const o=j.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function va(e,t=[]){let n=[];function r(a,o){const l=j.createContext(o),u=n.length;n=[...n,o];const f=h=>{var S;const{scope:m,children:g,...b}=h,w=((S=m==null?void 0:m[e])==null?void 0:S[u])||l,y=j.useMemo(()=>b,Object.values(b));return x.jsx(w.Provider,{value:y,children:g})};f.displayName=a+"Provider";function d(h,m){var w;const g=((w=m==null?void 0:m[e])==null?void 0:w[u])||l,b=j.useContext(g);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[f,d]}const i=()=>{const a=n.map(o=>j.createContext(o));return function(l){const u=(l==null?void 0:l[e])||a;return j.useMemo(()=>({[`__scope${e}`]:{...l,[e]:u}}),[l,u])}};return i.scopeName=e,[r,nse(i,...t)]}function nse(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((l,{useScope:u,scopeName:f})=>{const h=u(a)[`__scope${f}`];return{...l,...h}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function _p(e){const t=rse(e),n=j.forwardRef((r,i)=>{const{children:a,...o}=r,l=j.Children.toArray(a),u=l.find(ase);if(u){const f=u.props.children,d=l.map(h=>h===u?j.Children.count(f)>1?j.Children.only(null):j.isValidElement(f)?f.props.children:null:h);return x.jsx(t,{...o,ref:i,children:j.isValidElement(f)?j.cloneElement(f,void 0,d):null})}return x.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}function rse(e){const t=j.forwardRef((n,r)=>{const{children:i,...a}=n;if(j.isValidElement(i)){const o=sse(i),l=ose(a,i.props);return i.type!==j.Fragment&&(l.ref=r?zs(r,o):o),j.cloneElement(i,l)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sG=Symbol("radix.slottable");function ise(e){const t=({children:n})=>x.jsx(x.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sG,t}function ase(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sG}function ose(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...l)=>{const u=a(...l);return i(...l),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function sse(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var lse=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=lse.reduce((e,t)=>{const n=_p(`Primitive.${t}`),r=j.forwardRef((i,a)=>{const{asChild:o,...l}=i,u=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(u,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function use(e,t){e&&Mu.flushSync(()=>e.dispatchEvent(t))}function nr(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function cse(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e);j.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var fse="DismissableLayer",Jj="dismissableLayer.update",dse="dismissableLayer.pointerDownOutside",hse="dismissableLayer.focusOutside",t3,lG=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nm=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...u}=e,f=j.useContext(lG),[d,h]=j.useState(null),m=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=j.useState({}),b=ft(t,P=>h(P)),w=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=w.indexOf(y),E=d?w.indexOf(d):-1,_=f.layersWithOutsidePointerEventsDisabled.size>0,A=E>=S,T=gse(P=>{const M=P.target,R=[...f.branches].some(D=>D.contains(M));!A||R||(i==null||i(P),o==null||o(P),P.defaultPrevented||l==null||l())},m),O=vse(P=>{const M=P.target;[...f.branches].some(D=>D.contains(M))||(a==null||a(P),o==null||o(P),P.defaultPrevented||l==null||l())},m);return cse(P=>{E===f.layers.size-1&&(r==null||r(P),!P.defaultPrevented&&l&&(P.preventDefault(),l()))},m),j.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(t3=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),n3(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=t3)}},[d,m,n,f]),j.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),n3())},[d,f]),j.useEffect(()=>{const P=()=>g({});return document.addEventListener(Jj,P),()=>document.removeEventListener(Jj,P)},[]),x.jsx(He.div,{...u,ref:b,style:{pointerEvents:_?A?"auto":"none":void 0,...e.style},onFocusCapture:ke(e.onFocusCapture,O.onFocusCapture),onBlurCapture:ke(e.onBlurCapture,O.onBlurCapture),onPointerDownCapture:ke(e.onPointerDownCapture,T.onPointerDownCapture)})});Nm.displayName=fse;var pse="DismissableLayerBranch",mse=j.forwardRef((e,t)=>{const n=j.useContext(lG),r=j.useRef(null),i=ft(t,r);return j.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),x.jsx(He.div,{...e,ref:i})});mse.displayName=pse;function gse(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e),r=j.useRef(!1),i=j.useRef(()=>{});return j.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let u=function(){uG(dse,n,f,{discrete:!0})};const f={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function vse(e,t=globalThis==null?void 0:globalThis.document){const n=nr(e),r=j.useRef(!1);return j.useEffect(()=>{const i=a=>{a.target&&!r.current&&uG(hse,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function n3(){const e=new CustomEvent(Jj);document.dispatchEvent(e)}function uG(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?use(i,a):i.dispatchEvent(a)}var zn=globalThis!=null&&globalThis.document?j.useLayoutEffect:()=>{},yse=EM[" useId ".trim().toString()]||(()=>{}),bse=0;function or(e){const[t,n]=j.useState(yse());return zn(()=>{n(r=>r??String(bse++))},[e]),t?`radix-${t}`:""}const xse=["top","right","bottom","left"],Vs=Math.min,Ir=Math.max,zy=Math.round,Rv=Math.floor,la=e=>({x:e,y:e}),wse={left:"right",right:"left",bottom:"top",top:"bottom"};function eN(e,t,n){return Ir(e,Vs(t,n))}function lo(e,t){return typeof e=="function"?e(t):e}function uo(e){return e.split("-")[0]}function ld(e){return e.split("-")[1]}function LM(e){return e==="x"?"y":"x"}function $M(e){return e==="y"?"height":"width"}function aa(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function BM(e){return LM(aa(e))}function Sse(e,t,n){n===void 0&&(n=!1);const r=ld(e),i=BM(e),a=$M(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Vy(o)),[o,Vy(o)]}function _se(e){const t=Vy(e);return[tN(e),t,tN(t)]}function tN(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const r3=["left","right"],i3=["right","left"],Ese=["top","bottom"],Ase=["bottom","top"];function Tse(e,t,n){switch(e){case"top":case"bottom":return n?t?i3:r3:t?r3:i3;case"left":case"right":return t?Ese:Ase;default:return[]}}function Cse(e,t,n,r){const i=ld(e);let a=Tse(uo(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(tN)))),a}function Vy(e){const t=uo(e);return wse[t]+e.slice(t.length)}function Ose(e){return{top:0,right:0,bottom:0,left:0,...e}}function cG(e){return typeof e!="number"?Ose(e):{top:e,right:e,bottom:e,left:e}}function Fy(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function a3(e,t,n){let{reference:r,floating:i}=e;const a=aa(t),o=BM(t),l=$M(o),u=uo(t),f=a==="y",d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(u){case"top":g={x:d,y:r.y-i.height};break;case"bottom":g={x:d,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:h};break;case"left":g={x:r.x-i.width,y:h};break;default:g={x:r.x,y:r.y}}switch(ld(t)){case"start":g[o]-=m*(n&&f?-1:1);break;case"end":g[o]+=m*(n&&f?-1:1);break}return g}async function jse(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:l,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=lo(t,e),b=cG(g),y=l[m?h==="floating"?"reference":"floating":h],S=Fy(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(y)))==null||n?y:y.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:d,strategy:u})),E=h==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,_=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),A=await(a.isElement==null?void 0:a.isElement(_))?await(a.getScale==null?void 0:a.getScale(_))||{x:1,y:1}:{x:1,y:1},T=Fy(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:E,offsetParent:_,strategy:u}):E);return{top:(S.top-T.top+b.top)/A.y,bottom:(T.bottom-S.bottom+b.bottom)/A.y,left:(S.left-T.left+b.left)/A.x,right:(T.right-S.right+b.right)/A.x}}const Nse=50,Pse=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,l=o.detectOverflow?o:{...o,detectOverflow:jse},u=await(o.isRTL==null?void 0:o.isRTL(t));let f=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=a3(f,r,u),m=r,g=0;const b={};for(let w=0;w<a.length;w++){const y=a[w];if(!y)continue;const{name:S,fn:E}=y,{x:_,y:A,data:T,reset:O}=await E({x:d,y:h,initialPlacement:r,placement:m,strategy:i,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});d=_??d,h=A??h,b[S]={...b[S],...T},O&&g<Nse&&(g++,typeof O=="object"&&(O.placement&&(m=O.placement),O.rects&&(f=O.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):O.rects),{x:d,y:h}=a3(f,m,u)),w=-1)}return{x:d,y:h,placement:m,strategy:i,middlewareData:b}},Mse=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:l,middlewareData:u}=t,{element:f,padding:d=0}=lo(e,t)||{};if(f==null)return{};const h=cG(d),m={x:n,y:r},g=BM(i),b=$M(g),w=await o.getDimensions(f),y=g==="y",S=y?"top":"left",E=y?"bottom":"right",_=y?"clientHeight":"clientWidth",A=a.reference[b]+a.reference[g]-m[g]-a.floating[b],T=m[g]-a.reference[g],O=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let P=O?O[_]:0;(!P||!await(o.isElement==null?void 0:o.isElement(O)))&&(P=l.floating[_]||a.floating[b]);const M=A/2-T/2,R=P/2-w[b]/2-1,D=Vs(h[S],R),I=Vs(h[E],R),k=D,F=P-w[b]-I,$=P/2-w[b]/2+M,q=eN(k,$,F),L=!u.arrow&&ld(i)!=null&&$!==q&&a.reference[b]/2-($<k?D:I)-w[b]/2<0,z=L?$<k?$-k:$-F:0;return{[g]:m[g]+z,data:{[g]:q,centerOffset:$-q-z,...L&&{alignmentOffset:z}},reset:L}}}),Rse=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:u,elements:f}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:w=!0,...y}=lo(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=uo(i),E=aa(l),_=uo(l)===l,A=await(u.isRTL==null?void 0:u.isRTL(f.floating)),T=m||(_||!w?[Vy(l)]:_se(l)),O=b!=="none";!m&&O&&T.push(...Cse(l,w,b,A));const P=[l,...T],M=await u.detectOverflow(t,y),R=[];let D=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&R.push(M[S]),h){const $=Sse(i,o,A);R.push(M[$[0]],M[$[1]])}if(D=[...D,{placement:i,overflows:R}],!R.every($=>$<=0)){var I,k;const $=(((I=a.flip)==null?void 0:I.index)||0)+1,q=P[$];if(q&&(!(h==="alignment"?E!==aa(q):!1)||D.every(U=>aa(U.placement)===E?U.overflows[0]>0:!0)))return{data:{index:$,overflows:D},reset:{placement:q}};let L=(k=D.filter(z=>z.overflows[0]<=0).sort((z,U)=>z.overflows[1]-U.overflows[1])[0])==null?void 0:k.placement;if(!L)switch(g){case"bestFit":{var F;const z=(F=D.filter(U=>{if(O){const K=aa(U.placement);return K===E||K==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(K=>K>0).reduce((K,Z)=>K+Z,0)]).sort((U,K)=>U[1]-K[1])[0])==null?void 0:F[0];z&&(L=z);break}case"initialPlacement":L=l;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function o3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function s3(e){return xse.some(t=>e[t]>=0)}const kse=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...a}=lo(e,t);switch(i){case"referenceHidden":{const o=await r.detectOverflow(t,{...a,elementContext:"reference"}),l=o3(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:s3(l)}}}case"escaped":{const o=await r.detectOverflow(t,{...a,altBoundary:!0}),l=o3(o,n.floating);return{data:{escapedOffsets:l,escaped:s3(l)}}}default:return{}}}}},fG=new Set(["left","top"]);async function Dse(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=uo(n),l=ld(n),u=aa(n)==="y",f=fG.has(o)?-1:1,d=a&&u?-1:1,h=lo(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),u?{x:g*d,y:m*f}:{x:m*f,y:g*d}}const Ise=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:l}=t,u=await Dse(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:a+u.y,data:{...u,placement:o}}}}},Lse=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:S=>{let{x:E,y:_}=S;return{x:E,y:_}}},...f}=lo(e,t),d={x:n,y:r},h=await a.detectOverflow(t,f),m=aa(uo(i)),g=LM(m);let b=d[g],w=d[m];if(o){const S=g==="y"?"top":"left",E=g==="y"?"bottom":"right",_=b+h[S],A=b-h[E];b=eN(_,b,A)}if(l){const S=m==="y"?"top":"left",E=m==="y"?"bottom":"right",_=w+h[S],A=w-h[E];w=eN(_,w,A)}const y=u.fn({...t,[g]:b,[m]:w});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[g]:o,[m]:l}}}}}},$se=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:u=!0,crossAxis:f=!0}=lo(e,t),d={x:n,y:r},h=aa(i),m=LM(h);let g=d[m],b=d[h];const w=lo(l,t),y=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){const _=m==="y"?"height":"width",A=a.reference[m]-a.floating[_]+y.mainAxis,T=a.reference[m]+a.reference[_]-y.mainAxis;g<A?g=A:g>T&&(g=T)}if(f){var S,E;const _=m==="y"?"width":"height",A=fG.has(uo(i)),T=a.reference[h]-a.floating[_]+(A&&((S=o.offset)==null?void 0:S[h])||0)+(A?0:y.crossAxis),O=a.reference[h]+a.reference[_]+(A?0:((E=o.offset)==null?void 0:E[h])||0)-(A?y.crossAxis:0);b<T?b=T:b>O&&(b=O)}return{[m]:g,[h]:b}}}},Bse=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:u=()=>{},...f}=lo(e,t),d=await o.detectOverflow(t,f),h=uo(i),m=ld(i),g=aa(i)==="y",{width:b,height:w}=a.floating;let y,S;h==="top"||h==="bottom"?(y=h,S=m===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(S=h,y=m==="end"?"top":"bottom");const E=w-d.top-d.bottom,_=b-d.left-d.right,A=Vs(w-d[y],E),T=Vs(b-d[S],_),O=!t.middlewareData.shift;let P=A,M=T;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=_),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(P=E),O&&!m){const D=Ir(d.left,0),I=Ir(d.right,0),k=Ir(d.top,0),F=Ir(d.bottom,0);g?M=b-2*(D!==0||I!==0?D+I:Ir(d.left,d.right)):P=w-2*(k!==0||F!==0?k+F:Ir(d.top,d.bottom))}await u({...t,availableWidth:M,availableHeight:P});const R=await o.getDimensions(l.floating);return b!==R.width||w!==R.height?{reset:{rects:!0}}:{}}}};function C0(){return typeof window<"u"}function ud(e){return dG(e)?(e.nodeName||"").toLowerCase():"#document"}function Br(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ya(e){var t;return(t=(dG(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dG(e){return C0()?e instanceof Node||e instanceof Br(e).Node:!1}function $i(e){return C0()?e instanceof Element||e instanceof Br(e).Element:!1}function yo(e){return C0()?e instanceof HTMLElement||e instanceof Br(e).HTMLElement:!1}function l3(e){return!C0()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Br(e).ShadowRoot}function Pm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Bi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function qse(e){return/^(table|td|th)$/.test(ud(e))}function O0(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const zse=/transform|translate|scale|rotate|perspective|filter/,Vse=/paint|layout|strict|content/,jl=e=>!!e&&e!=="none";let DS;function qM(e){const t=$i(e)?Bi(e):e;return jl(t.transform)||jl(t.translate)||jl(t.scale)||jl(t.rotate)||jl(t.perspective)||!zM()&&(jl(t.backdropFilter)||jl(t.filter))||zse.test(t.willChange||"")||Vse.test(t.contain||"")}function Fse(e){let t=Fs(e);for(;yo(t)&&!vf(t);){if(qM(t))return t;if(O0(t))return null;t=Fs(t)}return null}function zM(){return DS==null&&(DS=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),DS}function vf(e){return/^(html|body|#document)$/.test(ud(e))}function Bi(e){return Br(e).getComputedStyle(e)}function j0(e){return $i(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fs(e){if(ud(e)==="html")return e;const t=e.assignedSlot||e.parentNode||l3(e)&&e.host||ya(e);return l3(t)?t.host:t}function hG(e){const t=Fs(e);return vf(t)?e.ownerDocument?e.ownerDocument.body:e.body:yo(t)&&Pm(t)?t:hG(t)}function Ep(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=hG(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Br(i);if(a){const l=nN(o);return t.concat(o,o.visualViewport||[],Pm(i)?i:[],l&&n?Ep(l):[])}else return t.concat(i,Ep(i,[],n))}function nN(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pG(e){const t=Bi(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=yo(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,l=zy(n)!==a||zy(r)!==o;return l&&(n=a,r=o),{width:n,height:r,$:l}}function VM(e){return $i(e)?e:e.contextElement}function Yc(e){const t=VM(e);if(!yo(t))return la(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=pG(t);let o=(a?zy(n.width):n.width)/r,l=(a?zy(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Use=la(0);function mG(e){const t=Br(e);return!zM()||!t.visualViewport?Use:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Hse(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Br(e)?!1:t}function du(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=VM(e);let o=la(1);t&&(r?$i(r)&&(o=Yc(r)):o=Yc(e));const l=Hse(a,n,r)?mG(a):la(0);let u=(i.left+l.x)/o.x,f=(i.top+l.y)/o.y,d=i.width/o.x,h=i.height/o.y;if(a){const m=Br(a),g=r&&$i(r)?Br(r):r;let b=m,w=nN(b);for(;w&&r&&g!==b;){const y=Yc(w),S=w.getBoundingClientRect(),E=Bi(w),_=S.left+(w.clientLeft+parseFloat(E.paddingLeft))*y.x,A=S.top+(w.clientTop+parseFloat(E.paddingTop))*y.y;u*=y.x,f*=y.y,d*=y.x,h*=y.y,u+=_,f+=A,b=Br(w),w=nN(b)}}return Fy({width:d,height:h,x:u,y:f})}function N0(e,t){const n=j0(e).scrollLeft;return t?t.left+n:du(ya(e)).left+n}function gG(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-N0(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function Gse(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ya(r),l=t?O0(t.floating):!1;if(r===o||l&&a)return n;let u={scrollLeft:0,scrollTop:0},f=la(1);const d=la(0),h=yo(r);if((h||!h&&!a)&&((ud(r)!=="body"||Pm(o))&&(u=j0(r)),h)){const g=du(r);f=Yc(r),d.x=g.x+r.clientLeft,d.y=g.y+r.clientTop}const m=o&&!h&&!a?gG(o,u):la(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-u.scrollLeft*f.x+d.x+m.x,y:n.y*f.y-u.scrollTop*f.y+d.y+m.y}}function Wse(e){return Array.from(e.getClientRects())}function Kse(e){const t=ya(e),n=j0(e),r=e.ownerDocument.body,i=Ir(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ir(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+N0(e);const l=-n.scrollTop;return Bi(r).direction==="rtl"&&(o+=Ir(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:l}}const u3=25;function Yse(e,t){const n=Br(e),r=ya(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,l=0,u=0;if(i){a=i.width,o=i.height;const d=zM();(!d||d&&t==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}const f=N0(r);if(f<=0){const d=r.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-h.clientWidth-g);b<=u3&&(a-=b)}else f<=u3&&(a+=f);return{width:a,height:o,x:l,y:u}}function Xse(e,t){const n=du(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=yo(e)?Yc(e):la(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,u=i*a.x,f=r*a.y;return{width:o,height:l,x:u,y:f}}function c3(e,t,n){let r;if(t==="viewport")r=Yse(e,n);else if(t==="document")r=Kse(ya(e));else if($i(t))r=Xse(t,n);else{const i=mG(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Fy(r)}function vG(e,t){const n=Fs(e);return n===t||!$i(n)||vf(n)?!1:Bi(n).position==="fixed"||vG(n,t)}function Zse(e,t){const n=t.get(e);if(n)return n;let r=Ep(e,[],!1).filter(l=>$i(l)&&ud(l)!=="body"),i=null;const a=Bi(e).position==="fixed";let o=a?Fs(e):e;for(;$i(o)&&!vf(o);){const l=Bi(o),u=qM(o);!u&&l.position==="fixed"&&(i=null),(a?!u&&!i:!u&&l.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Pm(o)&&!u&&vG(e,o))?r=r.filter(d=>d!==o):i=l,o=Fs(o)}return t.set(e,r),r}function Qse(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?O0(t)?[]:Zse(t,this._c):[].concat(n),r],l=c3(t,o[0],i);let u=l.top,f=l.right,d=l.bottom,h=l.left;for(let m=1;m<o.length;m++){const g=c3(t,o[m],i);u=Ir(g.top,u),f=Vs(g.right,f),d=Vs(g.bottom,d),h=Ir(g.left,h)}return{width:f-h,height:d-u,x:h,y:u}}function Jse(e){const{width:t,height:n}=pG(e);return{width:t,height:n}}function ele(e,t,n){const r=yo(t),i=ya(t),a=n==="fixed",o=du(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const u=la(0);function f(){u.x=N0(i)}if(r||!r&&!a)if((ud(t)!=="body"||Pm(i))&&(l=j0(t)),r){const g=du(t,!0,a,t);u.x=g.x+t.clientLeft,u.y=g.y+t.clientTop}else i&&f();a&&!r&&i&&f();const d=i&&!r&&!a?gG(i,l):la(0),h=o.left+l.scrollLeft-u.x-d.x,m=o.top+l.scrollTop-u.y-d.y;return{x:h,y:m,width:o.width,height:o.height}}function IS(e){return Bi(e).position==="static"}function f3(e,t){if(!yo(e)||Bi(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ya(e)===n&&(n=n.ownerDocument.body),n}function yG(e,t){const n=Br(e);if(O0(e))return n;if(!yo(e)){let i=Fs(e);for(;i&&!vf(i);){if($i(i)&&!IS(i))return i;i=Fs(i)}return n}let r=f3(e,t);for(;r&&qse(r)&&IS(r);)r=f3(r,t);return r&&vf(r)&&IS(r)&&!qM(r)?n:r||Fse(e)||n}const tle=async function(e){const t=this.getOffsetParent||yG,n=this.getDimensions,r=await n(e.floating);return{reference:ele(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function nle(e){return Bi(e).direction==="rtl"}const rle={convertOffsetParentRelativeRectToViewportRelativeRect:Gse,getDocumentElement:ya,getClippingRect:Qse,getOffsetParent:yG,getElementRects:tle,getClientRects:Wse,getDimensions:Jse,getScale:Yc,isElement:$i,isRTL:nle};function bG(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ile(e,t){let n=null,r;const i=ya(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),a();const f=e.getBoundingClientRect(),{left:d,top:h,width:m,height:g}=f;if(l||t(),!m||!g)return;const b=Rv(h),w=Rv(i.clientWidth-(d+m)),y=Rv(i.clientHeight-(h+g)),S=Rv(d),_={rootMargin:-b+"px "+-w+"px "+-y+"px "+-S+"px",threshold:Ir(0,Vs(1,u))||1};let A=!0;function T(O){const P=O[0].intersectionRatio;if(P!==u){if(!A)return o();P?o(!1,P):r=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!bG(f,e.getBoundingClientRect())&&o(),A=!1}try{n=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,_)}n.observe(e)}return o(!0),a}function ale(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,f=VM(e),d=i||a?[...f?Ep(f):[],...t?Ep(t):[]]:[];d.forEach(S=>{i&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const h=f&&l?ile(f,n):null;let m=-1,g=null;o&&(g=new ResizeObserver(S=>{let[E]=S;E&&E.target===f&&g&&t&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var _;(_=g)==null||_.observe(t)})),n()}),f&&!u&&g.observe(f),t&&g.observe(t));let b,w=u?du(e):null;u&&y();function y(){const S=du(e);w&&!bG(w,S)&&n(),w=S,b=requestAnimationFrame(y)}return n(),()=>{var S;d.forEach(E=>{i&&E.removeEventListener("scroll",n),a&&E.removeEventListener("resize",n)}),h==null||h(),(S=g)==null||S.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const ole=Ise,sle=Lse,lle=Rse,ule=Bse,cle=kse,d3=Mse,fle=$se,dle=(e,t,n)=>{const r=new Map,i={platform:rle,...n},a={...i.platform,_c:r};return Pse(e,t,{...i,platform:a})};var hle=typeof document<"u",ple=function(){},gy=hle?j.useLayoutEffect:ple;function Uy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Uy(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Uy(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function xG(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function h3(e,t){const n=xG(e);return Math.round(t*n)/n}function LS(e){const t=j.useRef(e);return gy(()=>{t.current=e}),t}function mle(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:u,open:f}=e,[d,h]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=j.useState(r);Uy(m,r)||g(r);const[b,w]=j.useState(null),[y,S]=j.useState(null),E=j.useCallback(U=>{U!==O.current&&(O.current=U,w(U))},[]),_=j.useCallback(U=>{U!==P.current&&(P.current=U,S(U))},[]),A=a||b,T=o||y,O=j.useRef(null),P=j.useRef(null),M=j.useRef(d),R=u!=null,D=LS(u),I=LS(i),k=LS(f),F=j.useCallback(()=>{if(!O.current||!P.current)return;const U={placement:t,strategy:n,middleware:m};I.current&&(U.platform=I.current),dle(O.current,P.current,U).then(K=>{const Z={...K,isPositioned:k.current!==!1};$.current&&!Uy(M.current,Z)&&(M.current=Z,Mu.flushSync(()=>{h(Z)}))})},[m,t,n,I,k]);gy(()=>{f===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h(U=>({...U,isPositioned:!1})))},[f]);const $=j.useRef(!1);gy(()=>($.current=!0,()=>{$.current=!1}),[]),gy(()=>{if(A&&(O.current=A),T&&(P.current=T),A&&T){if(D.current)return D.current(A,T,F);F()}},[A,T,F,D,R]);const q=j.useMemo(()=>({reference:O,floating:P,setReference:E,setFloating:_}),[E,_]),L=j.useMemo(()=>({reference:A,floating:T}),[A,T]),z=j.useMemo(()=>{const U={position:n,left:0,top:0};if(!L.floating)return U;const K=h3(L.floating,d.x),Z=h3(L.floating,d.y);return l?{...U,transform:"translate("+K+"px, "+Z+"px)",...xG(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:Z}},[n,l,L.floating,d.x,d.y]);return j.useMemo(()=>({...d,update:F,refs:q,elements:L,floatingStyles:z}),[d,F,q,L,z])}const gle=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?d3({element:r.current,padding:i}).fn(n):{}:r?d3({element:r,padding:i}).fn(n):{}}}},vle=(e,t)=>{const n=ole(e);return{name:n.name,fn:n.fn,options:[e,t]}},yle=(e,t)=>{const n=sle(e);return{name:n.name,fn:n.fn,options:[e,t]}},ble=(e,t)=>({fn:fle(e).fn,options:[e,t]}),xle=(e,t)=>{const n=lle(e);return{name:n.name,fn:n.fn,options:[e,t]}},wle=(e,t)=>{const n=ule(e);return{name:n.name,fn:n.fn,options:[e,t]}},Sle=(e,t)=>{const n=cle(e);return{name:n.name,fn:n.fn,options:[e,t]}},_le=(e,t)=>{const n=gle(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Ele="Arrow",wG=j.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return x.jsx(He.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});wG.displayName=Ele;var Ale=wG;function SG(e){const[t,n]=j.useState(void 0);return zn(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const u=a.borderBoxSize,f=Array.isArray(u)?u[0]:u;o=f.inlineSize,l=f.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var FM="Popper",[_G,cd]=va(FM),[Tle,EG]=_G(FM),AG=e=>{const{__scopePopper:t,children:n}=e,[r,i]=j.useState(null);return x.jsx(Tle,{scope:t,anchor:r,onAnchorChange:i,children:n})};AG.displayName=FM;var TG="PopperAnchor",CG=j.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=EG(TG,n),o=j.useRef(null),l=ft(t,o),u=j.useRef(null);return j.useEffect(()=>{const f=u.current;u.current=(r==null?void 0:r.current)||o.current,f!==u.current&&a.onAnchorChange(u.current)}),r?null:x.jsx(He.div,{...i,ref:l})});CG.displayName=TG;var UM="PopperContent",[Cle,Ole]=_G(UM),OG=j.forwardRef((e,t)=>{var J,re,ne,fe,he,oe;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:f=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...w}=e,y=EG(UM,n),[S,E]=j.useState(null),_=ft(t,ye=>E(ye)),[A,T]=j.useState(null),O=SG(A),P=(O==null?void 0:O.width)??0,M=(O==null?void 0:O.height)??0,R=r+(a!=="center"?"-"+a:""),D=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},I=Array.isArray(f)?f:[f],k=I.length>0,F={padding:D,boundary:I.filter(Nle),altBoundary:k},{refs:$,floatingStyles:q,placement:L,isPositioned:z,middlewareData:U}=mle({strategy:"fixed",placement:R,whileElementsMounted:(...ye)=>ale(...ye,{animationFrame:g==="always"}),elements:{reference:y.anchor},middleware:[vle({mainAxis:i+M,alignmentAxis:o}),u&&yle({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?ble():void 0,...F}),u&&xle({...F}),wle({...F,apply:({elements:ye,rects:be,availableWidth:xe,availableHeight:Ee})=>{const{width:_e,height:tt}=be.reference,nt=ye.floating.style;nt.setProperty("--radix-popper-available-width",`${xe}px`),nt.setProperty("--radix-popper-available-height",`${Ee}px`),nt.setProperty("--radix-popper-anchor-width",`${_e}px`),nt.setProperty("--radix-popper-anchor-height",`${tt}px`)}}),A&&_le({element:A,padding:l}),Ple({arrowWidth:P,arrowHeight:M}),m&&Sle({strategy:"referenceHidden",...F})]}),[K,Z]=PG(L),H=nr(b);zn(()=>{z&&(H==null||H())},[z,H]);const V=(J=U.arrow)==null?void 0:J.x,X=(re=U.arrow)==null?void 0:re.y,Y=((ne=U.arrow)==null?void 0:ne.centerOffset)!==0,[G,Q]=j.useState();return zn(()=>{S&&Q(window.getComputedStyle(S).zIndex)},[S]),x.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:z?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(fe=U.transformOrigin)==null?void 0:fe.x,(he=U.transformOrigin)==null?void 0:he.y].join(" "),...((oe=U.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(Cle,{scope:n,placedSide:K,onArrowChange:T,arrowX:V,arrowY:X,shouldHideArrow:Y,children:x.jsx(He.div,{"data-side":K,"data-align":Z,...w,ref:_,style:{...w.style,animation:z?void 0:"none"}})})})});OG.displayName=UM;var jG="PopperArrow",jle={top:"bottom",right:"left",bottom:"top",left:"right"},NG=j.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=Ole(jG,r),o=jle[a.placedSide];return x.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:x.jsx(Ale,{...i,ref:n,style:{...i.style,display:"block"}})})});NG.displayName=jG;function Nle(e){return e!==null}var Ple=e=>({name:"transformOrigin",options:e,fn(t){var y,S,E;const{placement:n,rects:r,middlewareData:i}=t,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:e.arrowWidth,u=o?0:e.arrowHeight,[f,d]=PG(n),h={start:"0%",center:"50%",end:"100%"}[d],m=(((S=i.arrow)==null?void 0:S.x)??0)+l/2,g=(((E=i.arrow)==null?void 0:E.y)??0)+u/2;let b="",w="";return f==="bottom"?(b=o?h:`${m}px`,w=`${-u}px`):f==="top"?(b=o?h:`${m}px`,w=`${r.floating.height+u}px`):f==="right"?(b=`${-u}px`,w=o?h:`${g}px`):f==="left"&&(b=`${r.floating.width+u}px`,w=o?h:`${g}px`),{data:{x:b,y:w}}}});function PG(e){const[t,n="center"]=e.split("-");return[t,n]}var HM=AG,GM=CG,WM=OG,KM=NG,Mle="Portal",Mm=j.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,a]=j.useState(!1);zn(()=>a(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Coe.createPortal(x.jsx(He.div,{...r,ref:t}),o):null});Mm.displayName=Mle;function Rle(e,t){return j.useReducer((n,r)=>t[n][r]??n,e)}var Er=e=>{const{present:t,children:n}=e,r=kle(t),i=typeof n=="function"?n({present:r.isPresent}):j.Children.only(n),a=ft(r.ref,Dle(i));return typeof n=="function"||r.isPresent?j.cloneElement(i,{ref:a}):null};Er.displayName="Presence";function kle(e){const[t,n]=j.useState(),r=j.useRef(null),i=j.useRef(e),a=j.useRef("none"),o=e?"mounted":"unmounted",[l,u]=Rle(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const f=kv(r.current);a.current=l==="mounted"?f:"none"},[l]),zn(()=>{const f=r.current,d=i.current;if(d!==e){const m=a.current,g=kv(f);e?u("MOUNT"):g==="none"||(f==null?void 0:f.display)==="none"?u("UNMOUNT"):u(d&&m!==g?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),zn(()=>{if(t){let f;const d=t.ownerDocument.defaultView??window,h=g=>{const w=kv(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&w&&(u("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",f=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},m=g=>{g.target===t&&(a.current=kv(r.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(f),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:j.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function kv(e){return(e==null?void 0:e.animationName)||"none"}function Dle(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ile=EM[" useInsertionEffect ".trim().toString()]||zn;function Us({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=Lle({defaultProp:t,onChange:n}),l=e!==void 0,u=l?e:i;{const d=j.useRef(e!==void 0);j.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const f=j.useCallback(d=>{var h;if(l){const m=$le(d)?d(e):d;m!==e&&((h=o.current)==null||h.call(o,m))}else a(d)},[l,e,a,o]);return[u,f]}function Lle({defaultProp:e,onChange:t}){const[n,r]=j.useState(e),i=j.useRef(n),a=j.useRef(t);return Ile(()=>{a.current=t},[t]),j.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function $le(e){return typeof e=="function"}var MG=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ble="VisuallyHidden",RG=j.forwardRef((e,t)=>x.jsx(He.span,{...e,ref:t,style:{...MG,...e.style}}));RG.displayName=Ble;var qle=RG,[P0]=va("Tooltip",[cd]),M0=cd(),kG="TooltipProvider",zle=700,rN="tooltip.open",[Vle,YM]=P0(kG),DG=e=>{const{__scopeTooltip:t,delayDuration:n=zle,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=j.useRef(!0),l=j.useRef(!1),u=j.useRef(0);return j.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),x.jsx(Vle,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:j.useCallback(()=>{window.clearTimeout(u.current),o.current=!1},[]),onClose:j.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:j.useCallback(f=>{l.current=f},[]),disableHoverableContent:i,children:a})};DG.displayName=kG;var Ap="Tooltip",[Fle,Rm]=P0(Ap),IG=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:l}=e,u=YM(Ap,e.__scopeTooltip),f=M0(t),[d,h]=j.useState(null),m=or(),g=j.useRef(0),b=o??u.disableHoverableContent,w=l??u.delayDuration,y=j.useRef(!1),[S,E]=Us({prop:r,defaultProp:i??!1,onChange:P=>{P?(u.onOpen(),document.dispatchEvent(new CustomEvent(rN))):u.onClose(),a==null||a(P)},caller:Ap}),_=j.useMemo(()=>S?y.current?"delayed-open":"instant-open":"closed",[S]),A=j.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,E(!0)},[E]),T=j.useCallback(()=>{window.clearTimeout(g.current),g.current=0,E(!1)},[E]),O=j.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,E(!0),g.current=0},w)},[w,E]);return j.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),x.jsx(HM,{...f,children:x.jsx(Fle,{scope:t,contentId:m,open:S,stateAttribute:_,trigger:d,onTriggerChange:h,onTriggerEnter:j.useCallback(()=>{u.isOpenDelayedRef.current?O():A()},[u.isOpenDelayedRef,O,A]),onTriggerLeave:j.useCallback(()=>{b?T():(window.clearTimeout(g.current),g.current=0)},[T,b]),onOpen:A,onClose:T,disableHoverableContent:b,children:n})})};IG.displayName=Ap;var iN="TooltipTrigger",LG=j.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Rm(iN,n),a=YM(iN,n),o=M0(n),l=j.useRef(null),u=ft(t,l,i.onTriggerChange),f=j.useRef(!1),d=j.useRef(!1),h=j.useCallback(()=>f.current=!1,[]);return j.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),x.jsx(GM,{asChild:!0,...o,children:x.jsx(He.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:ke(e.onPointerMove,m=>{m.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:ke(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:ke(e.onPointerDown,()=>{i.open&&i.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ke(e.onFocus,()=>{f.current||i.onOpen()}),onBlur:ke(e.onBlur,i.onClose),onClick:ke(e.onClick,i.onClose)})})});LG.displayName=iN;var XM="TooltipPortal",[Ule,Hle]=P0(XM,{forceMount:void 0}),$G=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Rm(XM,t);return x.jsx(Ule,{scope:t,forceMount:n,children:x.jsx(Er,{present:n||a.open,children:x.jsx(Mm,{asChild:!0,container:i,children:r})})})};$G.displayName=XM;var yf="TooltipContent",BG=j.forwardRef((e,t)=>{const n=Hle(yf,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=Rm(yf,e.__scopeTooltip);return x.jsx(Er,{present:r||o.open,children:o.disableHoverableContent?x.jsx(qG,{side:i,...a,ref:t}):x.jsx(Gle,{side:i,...a,ref:t})})}),Gle=j.forwardRef((e,t)=>{const n=Rm(yf,e.__scopeTooltip),r=YM(yf,e.__scopeTooltip),i=j.useRef(null),a=ft(t,i),[o,l]=j.useState(null),{trigger:u,onClose:f}=n,d=i.current,{onPointerInTransitChange:h}=r,m=j.useCallback(()=>{l(null),h(!1)},[h]),g=j.useCallback((b,w)=>{const y=b.currentTarget,S={x:b.clientX,y:b.clientY},E=Zle(S,y.getBoundingClientRect()),_=Qle(S,E),A=Jle(w.getBoundingClientRect()),T=tue([..._,...A]);l(T),h(!0)},[h]);return j.useEffect(()=>()=>m(),[m]),j.useEffect(()=>{if(u&&d){const b=y=>g(y,d),w=y=>g(y,u);return u.addEventListener("pointerleave",b),d.addEventListener("pointerleave",w),()=>{u.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",w)}}},[u,d,g,m]),j.useEffect(()=>{if(o){const b=w=>{const y=w.target,S={x:w.clientX,y:w.clientY},E=(u==null?void 0:u.contains(y))||(d==null?void 0:d.contains(y)),_=!eue(S,o);E?m():_&&(m(),f())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[u,d,o,f,m]),x.jsx(qG,{...e,ref:a})}),[Wle,Kle]=P0(Ap,{isInside:!1}),Yle=ise("TooltipContent"),qG=j.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,u=Rm(yf,n),f=M0(n),{onClose:d}=u;return j.useEffect(()=>(document.addEventListener(rN,d),()=>document.removeEventListener(rN,d)),[d]),j.useEffect(()=>{if(u.trigger){const h=m=>{const g=m.target;g!=null&&g.contains(u.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[u.trigger,d]),x.jsx(Nm,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:x.jsxs(WM,{"data-state":u.stateAttribute,...f,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(Yle,{children:r}),x.jsx(Wle,{scope:n,isInside:!0,children:x.jsx(qle,{id:u.contentId,role:"tooltip",children:i||r})})]})})});BG.displayName=yf;var zG="TooltipArrow",Xle=j.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=M0(n);return Kle(zG,n).isInside?null:x.jsx(KM,{...i,...r,ref:t})});Xle.displayName=zG;function Zle(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Qle(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Jle(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function eue(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],u=t[o],f=l.x,d=l.y,h=u.x,m=u.y;d>r!=m>r&&n<(h-f)*(r-d)/(m-d)+f&&(i=!i)}return i}function tue(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),nue(t)}function nue(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var rue=DG,iue=IG,aue=LG,oue=$G,VG=BG;function FG(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=FG(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ut(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=FG(e))&&(r&&(r+=" "),r+=t);return r}const ZM="-",sue=e=>{const t=uue(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(ZM);return l[0]===""&&l.length!==1&&l.shift(),UG(l,t)||lue(o)},getConflictingClassGroupIds:(o,l)=>{const u=n[o]||[];return l&&r[o]?[...u,...r[o]]:u}}},UG=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?UG(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(ZM);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},p3=/^\[(.+)\]$/,lue=e=>{if(p3.test(e)){const t=p3.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},uue=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return fue(Object.entries(e.classGroups),n).forEach(([a,o])=>{aN(o,r,a,t)}),r},aN=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:m3(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(cue(i)){aN(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{aN(o,m3(t,a),n,r)})})},m3=(e,t)=>{let n=e;return t.split(ZM).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},cue=e=>e.isThemeGetter,fue=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[n,i]}):e,due=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},HG="!",hue=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=l=>{const u=[];let f=0,d=0,h;for(let y=0;y<l.length;y++){let S=l[y];if(f===0){if(S===i&&(r||l.slice(y,y+a)===t)){u.push(l.slice(d,y)),d=y+a;continue}if(S==="/"){h=y;continue}}S==="["?f++:S==="]"&&f--}const m=u.length===0?l:l.substring(d),g=m.startsWith(HG),b=g?m.substring(1):m,w=h&&h>d?h-d:void 0;return{modifiers:u,hasImportantModifier:g,baseClassName:b,maybePostfixModifierPosition:w}};return n?l=>n({className:l,parseClassName:o}):o},pue=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},mue=e=>({cache:due(e.cacheSize),parseClassName:hue(e),...sue(e)}),gue=/\s+/,vue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(gue);let l="";for(let u=o.length-1;u>=0;u-=1){const f=o[u],{modifiers:d,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:g}=n(f);let b=!!g,w=r(b?m.substring(0,g):m);if(!w){if(!b){l=f+(l.length>0?" "+l:l);continue}if(w=r(m),!w){l=f+(l.length>0?" "+l:l);continue}b=!1}const y=pue(d).join(":"),S=h?y+HG:y,E=S+w;if(a.includes(E))continue;a.push(E);const _=i(w,b);for(let A=0;A<_.length;++A){const T=_[A];a.push(S+T)}l=f+(l.length>0?" "+l:l)}return l};function yue(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=GG(t))&&(r&&(r+=" "),r+=n);return r}const GG=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=GG(e[r]))&&(n&&(n+=" "),n+=t);return n};function bue(e,...t){let n,r,i,a=o;function o(u){const f=t.reduce((d,h)=>h(d),e());return n=mue(f),r=n.cache.get,i=n.cache.set,a=l,l(u)}function l(u){const f=r(u);if(f)return f;const d=vue(u,n);return i(u,d),d}return function(){return a(yue.apply(null,arguments))}}const zt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},WG=/^\[(?:([a-z-]+):)?(.+)\]$/i,xue=/^\d+\/\d+$/,wue=new Set(["px","full","screen"]),Sue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_ue=/\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$/,Eue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Aue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Fa=e=>Xc(e)||wue.has(e)||xue.test(e),Jo=e=>fd(e,"length",kue),Xc=e=>!!e&&!Number.isNaN(Number(e)),$S=e=>fd(e,"number",Xc),Rh=e=>!!e&&Number.isInteger(Number(e)),Cue=e=>e.endsWith("%")&&Xc(e.slice(0,-1)),Ye=e=>WG.test(e),es=e=>Sue.test(e),Oue=new Set(["length","size","percentage"]),jue=e=>fd(e,Oue,KG),Nue=e=>fd(e,"position",KG),Pue=new Set(["image","url"]),Mue=e=>fd(e,Pue,Iue),Rue=e=>fd(e,"",Due),kh=()=>!0,fd=(e,t,n)=>{const r=WG.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},kue=e=>_ue.test(e)&&!Eue.test(e),KG=()=>!1,Due=e=>Aue.test(e),Iue=e=>Tue.test(e),Lue=()=>{const e=zt("colors"),t=zt("spacing"),n=zt("blur"),r=zt("brightness"),i=zt("borderColor"),a=zt("borderRadius"),o=zt("borderSpacing"),l=zt("borderWidth"),u=zt("contrast"),f=zt("grayscale"),d=zt("hueRotate"),h=zt("invert"),m=zt("gap"),g=zt("gradientColorStops"),b=zt("gradientColorStopPositions"),w=zt("inset"),y=zt("margin"),S=zt("opacity"),E=zt("padding"),_=zt("saturate"),A=zt("scale"),T=zt("sepia"),O=zt("skew"),P=zt("space"),M=zt("translate"),R=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Ye,t],k=()=>[Ye,t],F=()=>["",Fa,Jo],$=()=>["auto",Xc,Ye],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Ye],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],H=()=>[Xc,Ye];return{cacheSize:500,separator:":",theme:{colors:[kh],spacing:[Fa,Jo],blur:["none","",es,Ye],brightness:H(),borderColor:[e],borderRadius:["none","","full",es,Ye],borderSpacing:k(),borderWidth:F(),contrast:H(),grayscale:K(),hueRotate:H(),invert:K(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[Cue,Jo],inset:I(),margin:I(),opacity:H(),padding:k(),saturate:H(),scale:H(),sepia:K(),skew:H(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",Ye]}],container:["container"],columns:[{columns:[es]}],"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:[...q(),Ye]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Rh,Ye]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ye]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",Rh,Ye]}],"grid-cols":[{"grid-cols":[kh]}],"col-start-end":[{col:["auto",{span:["full",Rh,Ye]},Ye]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[kh]}],"row-start-end":[{row:["auto",{span:[Rh,Ye]},Ye]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ye]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[P]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[P]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ye,t]}],"min-w":[{"min-w":[Ye,t,"min","max","fit"]}],"max-w":[{"max-w":[Ye,t,"none","full","min","max","fit","prose",{screen:[es]},es]}],h:[{h:[Ye,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ye,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ye,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ye,t,"auto","min","max","fit"]}],"font-size":[{text:["base",es,Jo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$S]}],"font-family":[{font:[kh]}],"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",Ye]}],"line-clamp":[{"line-clamp":["none",Xc,$S]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Fa,Ye]}],"list-image":[{"list-image":["none",Ye]}],"list-style-type":[{list:["none","disc","decimal",Ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Fa,Jo]}],"underline-offset":[{"underline-offset":["auto",Fa,Ye]}],"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:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye]}],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",Ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),Nue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:L()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...L()]}],"outline-offset":[{"outline-offset":[Fa,Ye]}],"outline-w":[{outline:[Fa,Jo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Fa,Jo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",es,Rue]}],"shadow-color":[{shadow:[kh]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",es,Ye]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[_]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ye]}],duration:[{duration:H()}],ease:[{ease:["linear","in","out","in-out",Ye]}],delay:[{delay:H()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Rh,Ye]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[O]}],"skew-y":[{"skew-y":[O]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ye]}],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",Ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Fa,Jo,$S]}],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"]}}},$ue=bue(Lue);function Ce(...e){return $ue(ut(e))}function wr(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:e<36e5?`${(e/6e4).toFixed(1)}m`:`${(e/36e5).toFixed(1)}h`}function Hy(e,t){return e.length<=t?e:`${e.slice(0,t)}...`}function YG(e){const n=Date.now()-e;return n<6e4?`${Math.floor(n/1e3)}s ago`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:`${Math.floor(n/864e5)}d ago`}function vy(e){return new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}const Bue=rue,Tp=iue,Cp=aue,bf=j.forwardRef(({className:e,sideOffset:t=4,...n},r)=>x.jsx(oue,{children:x.jsx(VG,{ref:r,sideOffset:t,className:Ce("z-50 overflow-hidden border border-border bg-popover px-3 py-1.5 text-xs text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));bf.displayName=VG.displayName;var mt;(function(e){e.assertEqual=i=>{};function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const a={};for(const o of i)a[o]=o;return a},e.getValidEnumValues=i=>{const a=e.objectKeys(i).filter(l=>typeof i[i[l]]!="number"),o={};for(const l of a)o[l]=i[l];return e.objectValues(o)},e.objectValues=i=>e.objectKeys(i).map(function(a){return i[a]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const a=[];for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.push(o);return a},e.find=(i,a)=>{for(const o of i)if(a(o))return o},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function r(i,a=" | "){return i.map(o=>typeof o=="string"?`'${o}'`:o).join(a)}e.joinValues=r,e.jsonStringifyReplacer=(i,a)=>typeof a=="bigint"?a.toString():a})(mt||(mt={}));var g3;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(g3||(g3={}));const Pe=mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cs=e=>{switch(typeof e){case"undefined":return Pe.undefined;case"string":return Pe.string;case"number":return Number.isNaN(e)?Pe.nan:Pe.number;case"boolean":return Pe.boolean;case"function":return Pe.function;case"bigint":return Pe.bigint;case"symbol":return Pe.symbol;case"object":return Array.isArray(e)?Pe.array:e===null?Pe.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Pe.promise:typeof Map<"u"&&e instanceof Map?Pe.map:typeof Set<"u"&&e instanceof Set?Pe.set:typeof Date<"u"&&e instanceof Date?Pe.date:Pe.object;default:return Pe.unknown}},we=mt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class co extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},r={_errors:[]},i=a=>{for(const o of a.issues)if(o.code==="invalid_union")o.unionErrors.map(i);else if(o.code==="invalid_return_type")i(o.returnTypeError);else if(o.code==="invalid_arguments")i(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let l=r,u=0;for(;u<o.path.length;){const f=o.path[u];u===o.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(n(o))):l[f]=l[f]||{_errors:[]},l=l[f],u++}}};return i(this),r}static assert(t){if(!(t instanceof co))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,mt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)if(i.path.length>0){const a=i.path[0];n[a]=n[a]||[],n[a].push(t(i))}else r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}co.create=e=>new co(e);const oN=(e,t)=>{let n;switch(e.code){case we.invalid_type:e.received===Pe.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case we.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,mt.jsonStringifyReplacer)}`;break;case we.unrecognized_keys:n=`Unrecognized key(s) in object: ${mt.joinValues(e.keys,", ")}`;break;case we.invalid_union:n="Invalid input";break;case we.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${mt.joinValues(e.options)}`;break;case we.invalid_enum_value:n=`Invalid enum value. Expected ${mt.joinValues(e.options)}, received '${e.received}'`;break;case we.invalid_arguments:n="Invalid function arguments";break;case we.invalid_return_type:n="Invalid function return type";break;case we.invalid_date:n="Invalid date";break;case we.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:mt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case we.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case we.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case we.custom:n="Invalid input";break;case we.invalid_intersection_types:n="Intersection results could not be merged";break;case we.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case we.not_finite:n="Number must be finite";break;default:n=t.defaultError,mt.assertNever(e)}return{message:n}};let que=oN;function zue(){return que}const Vue=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let l="";const u=r.filter(f=>!!f).slice().reverse();for(const f of u)l=f(o,{data:t,defaultError:l}).message;return{...i,path:a,message:l}};function Te(e,t){const n=zue(),r=Vue({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===oN?void 0:oN].filter(i=>!!i)});e.common.issues.push(r)}class zr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Ve;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const a=await i.key,o=await i.value;r.push({key:a,value:o})}return zr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:a,value:o}=i;if(a.status==="aborted"||o.status==="aborted")return Ve;a.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof o.value<"u"||i.alwaysSet)&&(r[a.value]=o.value)}return{status:t.value,value:r}}}const Ve=Object.freeze({status:"aborted"}),Zh=e=>({status:"dirty",value:e}),fi=e=>({status:"valid",value:e}),v3=e=>e.status==="aborted",y3=e=>e.status==="dirty",xf=e=>e.status==="valid",Gy=e=>typeof Promise<"u"&&e instanceof Promise;var Re;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Re||(Re={}));class Hs{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const b3=(e,t)=>{if(xf(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new co(e.common.issues);return this._error=n,this._error}}};function Ze(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(o,l)=>{const{message:u}=e;return o.code==="invalid_enum_value"?{message:u??l.defaultError}:typeof l.data>"u"?{message:u??r??l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:u??n??l.defaultError}},description:i}}class dt{get description(){return this._def.description}_getType(t){return cs(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:cs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new zr,ctx:{common:t.parent.common,data:t.data,parsedType:cs(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Gy(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:cs(t)},i=this._parseSync({data:t,path:r.path,parent:r});return b3(r,i)}"~validate"(t){var r,i;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:cs(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return xf(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(i=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&i.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>xf(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:cs(t)},i=this._parse({data:t,path:r.path,parent:r}),a=await(Gy(i)?i:Promise.resolve(i));return b3(r,a)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,a)=>{const o=t(i),l=()=>a.addIssue({code:we.custom,...r(i)});return typeof Promise<"u"&&o instanceof Promise?o.then(u=>u?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new _f({schema:this,typeName:Fe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ks.create(this,this._def)}nullable(){return Ef.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ua.create(this)}promise(){return Xy.create(this,this._def)}or(t){return Ky.create([this,t],this._def)}and(t){return Yy.create(this,t,this._def)}transform(t){return new _f({...Ze(this._def),schema:this,typeName:Fe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new lN({...Ze(this._def),innerType:this,defaultValue:n,typeName:Fe.ZodDefault})}brand(){return new fce({typeName:Fe.ZodBranded,type:this,...Ze(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new uN({...Ze(this._def),innerType:this,catchValue:n,typeName:Fe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return QM.create(this,t)}readonly(){return cN.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Fue=/^c[^\s-]{8,}$/i,Uue=/^[0-9a-z]+$/,Hue=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Gue=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Wue=/^[a-z0-9_-]{21}$/i,Kue=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Yue=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Xue=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Zue="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let BS;const Que=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Jue=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ece=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,tce=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,nce=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,rce=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,XG="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ice=new RegExp(`^${XG}$`);function ZG(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function ace(e){return new RegExp(`^${ZG(e)}$`)}function oce(e){let t=`${XG}T${ZG(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function sce(e,t){return!!((t==="v4"||!t)&&Que.test(e)||(t==="v6"||!t)&&ece.test(e))}function lce(e,t){if(!Kue.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||"typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||t&&i.alg!==t)}catch{return!1}}function uce(e,t){return!!((t==="v4"||!t)&&Jue.test(e)||(t==="v6"||!t)&&tce.test(e))}class Cs extends dt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Pe.string){const a=this._getOrReturnCtx(t);return Te(a,{code:we.invalid_type,expected:Pe.string,received:a.parsedType}),Ve}const r=new zr;let i;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(i=this._getOrReturnCtx(t,i),Te(i,{code:we.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")t.data.length>a.value&&(i=this._getOrReturnCtx(t,i),Te(i,{code:we.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const o=t.data.length>a.value,l=t.data.length<a.value;(o||l)&&(i=this._getOrReturnCtx(t,i),o?Te(i,{code:we.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):l&&Te(i,{code:we.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")Xue.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"email",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")BS||(BS=new RegExp(Zue,"u")),BS.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"emoji",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")Gue.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"uuid",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")Wue.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"nanoid",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")Fue.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"cuid",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")Uue.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"cuid2",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")Hue.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"ulid",code:we.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Te(i,{validation:"url",code:we.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"regex",code:we.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(i=this._getOrReturnCtx(t,i),Te(i,{code:we.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(i=this._getOrReturnCtx(t,i),Te(i,{code:we.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(i=this._getOrReturnCtx(t,i),Te(i,{code:we.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?oce(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{code:we.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?ice.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{code:we.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?ace(a).test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{code:we.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?Yue.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"duration",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?sce(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"ip",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="jwt"?lce(t.data,a.alg)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"jwt",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="cidr"?uce(t.data,a.version)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"cidr",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?nce.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"base64",code:we.invalid_string,message:a.message}),r.dirty()):a.kind==="base64url"?rce.test(t.data)||(i=this._getOrReturnCtx(t,i),Te(i,{validation:"base64url",code:we.invalid_string,message:a.message}),r.dirty()):mt.assertNever(a);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:we.invalid_string,...Re.errToObj(r)})}_addCheck(t){return new Cs({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Re.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Re.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Re.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Re.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Re.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Re.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Re.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Re.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Re.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Re.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Re.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Re.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Re.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Re.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Re.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Re.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Re.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Re.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Re.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Re.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Re.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Re.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Re.errToObj(n)})}nonempty(t){return this.min(1,Re.errToObj(t))}trim(){return new Cs({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Cs({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Cs({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Cs.create=e=>new Cs({checks:[],typeName:Fe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});function cce(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,a=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return a%o/10**i}class wf extends dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Pe.number){const a=this._getOrReturnCtx(t);return Te(a,{code:we.invalid_type,expected:Pe.number,received:a.parsedType}),Ve}let r;const i=new zr;for(const a of this._def.checks)a.kind==="int"?mt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Te(r,{code:we.invalid_type,expected:"integer",received:"float",message:a.message}),i.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:we.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:we.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),i.dirty()):a.kind==="multipleOf"?cce(t.data,a.value)!==0&&(r=this._getOrReturnCtx(t,r),Te(r,{code:we.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Te(r,{code:we.not_finite,message:a.message}),i.dirty()):mt.assertNever(a);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,r,i){return new wf({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Re.toString(i)}]})}_addCheck(t){return new wf({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Re.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Re.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&mt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}wf.create=e=>new wf({checks:[],typeName:Fe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Op extends dt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Pe.bigint)return this._getInvalidInput(t);let r;const i=new zr;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:we.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:we.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),i.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Te(r,{code:we.not_multiple_of,multipleOf:a.value,message:a.message}),i.dirty()):mt.assertNever(a);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Te(n,{code:we.invalid_type,expected:Pe.bigint,received:n.parsedType}),Ve}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,r,i){return new Op({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Re.toString(i)}]})}_addCheck(t){return new Op({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Op.create=e=>new Op({checks:[],typeName:Fe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ze(e)});class x3 extends dt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Pe.boolean){const r=this._getOrReturnCtx(t);return Te(r,{code:we.invalid_type,expected:Pe.boolean,received:r.parsedType}),Ve}return fi(t.data)}}x3.create=e=>new x3({typeName:Fe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ze(e)});class Wy extends dt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Pe.date){const a=this._getOrReturnCtx(t);return Te(a,{code:we.invalid_type,expected:Pe.date,received:a.parsedType}),Ve}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Te(a,{code:we.invalid_date}),Ve}const r=new zr;let i;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(i=this._getOrReturnCtx(t,i),Te(i,{code:we.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(i=this._getOrReturnCtx(t,i),Te(i,{code:we.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):mt.assertNever(a);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Wy({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Re.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Re.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Wy.create=e=>new Wy({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Fe.ZodDate,...Ze(e)});class w3 extends dt{_parse(t){if(this._getType(t)!==Pe.symbol){const r=this._getOrReturnCtx(t);return Te(r,{code:we.invalid_type,expected:Pe.symbol,received:r.parsedType}),Ve}return fi(t.data)}}w3.create=e=>new w3({typeName:Fe.ZodSymbol,...Ze(e)});class S3 extends dt{_parse(t){if(this._getType(t)!==Pe.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:we.invalid_type,expected:Pe.undefined,received:r.parsedType}),Ve}return fi(t.data)}}S3.create=e=>new S3({typeName:Fe.ZodUndefined,...Ze(e)});class _3 extends dt{_parse(t){if(this._getType(t)!==Pe.null){const r=this._getOrReturnCtx(t);return Te(r,{code:we.invalid_type,expected:Pe.null,received:r.parsedType}),Ve}return fi(t.data)}}_3.create=e=>new _3({typeName:Fe.ZodNull,...Ze(e)});class E3 extends dt{constructor(){super(...arguments),this._any=!0}_parse(t){return fi(t.data)}}E3.create=e=>new E3({typeName:Fe.ZodAny,...Ze(e)});class A3 extends dt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return fi(t.data)}}A3.create=e=>new A3({typeName:Fe.ZodUnknown,...Ze(e)});class Gs extends dt{_parse(t){const n=this._getOrReturnCtx(t);return Te(n,{code:we.invalid_type,expected:Pe.never,received:n.parsedType}),Ve}}Gs.create=e=>new Gs({typeName:Fe.ZodNever,...Ze(e)});class T3 extends dt{_parse(t){if(this._getType(t)!==Pe.undefined){const r=this._getOrReturnCtx(t);return Te(r,{code:we.invalid_type,expected:Pe.void,received:r.parsedType}),Ve}return fi(t.data)}}T3.create=e=>new T3({typeName:Fe.ZodVoid,...Ze(e)});class ua extends dt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Pe.array)return Te(n,{code:we.invalid_type,expected:Pe.array,received:n.parsedType}),Ve;if(i.exactLength!==null){const o=n.data.length>i.exactLength.value,l=n.data.length<i.exactLength.value;(o||l)&&(Te(n,{code:o?we.too_big:we.too_small,minimum:l?i.exactLength.value:void 0,maximum:o?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Te(n,{code:we.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Te(n,{code:we.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,l)=>i.type._parseAsync(new Hs(n,o,n.path,l)))).then(o=>zr.mergeArray(r,o));const a=[...n.data].map((o,l)=>i.type._parseSync(new Hs(n,o,n.path,l)));return zr.mergeArray(r,a)}get element(){return this._def.type}min(t,n){return new ua({...this._def,minLength:{value:t,message:Re.toString(n)}})}max(t,n){return new ua({...this._def,maxLength:{value:t,message:Re.toString(n)}})}length(t,n){return new ua({...this._def,exactLength:{value:t,message:Re.toString(n)}})}nonempty(t){return this.min(1,t)}}ua.create=(e,t)=>new ua({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Fe.ZodArray,...Ze(t)});function Ic(e){if(e instanceof mn){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=ks.create(Ic(r))}return new mn({...e._def,shape:()=>t})}else return e instanceof ua?new ua({...e._def,type:Ic(e.element)}):e instanceof ks?ks.create(Ic(e.unwrap())):e instanceof Ef?Ef.create(Ic(e.unwrap())):e instanceof hu?hu.create(e.items.map(t=>Ic(t))):e}class mn extends dt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=mt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Pe.object){const f=this._getOrReturnCtx(t);return Te(f,{code:we.invalid_type,expected:Pe.object,received:f.parsedType}),Ve}const{status:r,ctx:i}=this._processInputParams(t),{shape:a,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof Gs&&this._def.unknownKeys==="strip"))for(const f in i.data)o.includes(f)||l.push(f);const u=[];for(const f of o){const d=a[f],h=i.data[f];u.push({key:{status:"valid",value:f},value:d._parse(new Hs(i,h,i.path,f)),alwaysSet:f in i.data})}if(this._def.catchall instanceof Gs){const f=this._def.unknownKeys;if(f==="passthrough")for(const d of l)u.push({key:{status:"valid",value:d},value:{status:"valid",value:i.data[d]}});else if(f==="strict")l.length>0&&(Te(i,{code:we.unrecognized_keys,keys:l}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const d of l){const h=i.data[d];u.push({key:{status:"valid",value:d},value:f._parse(new Hs(i,h,i.path,d)),alwaysSet:d in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const f=[];for(const d of u){const h=await d.key,m=await d.value;f.push({key:h,value:m,alwaysSet:d.alwaysSet})}return f}).then(f=>zr.mergeObjectSync(r,f)):zr.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return Re.errToObj,new mn({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var a,o;const i=((o=(a=this._def).errorMap)==null?void 0:o.call(a,n,r).message)??r.defaultError;return n.code==="unrecognized_keys"?{message:Re.errToObj(t).message??i}:{message:i}}}:{}})}strip(){return new mn({...this._def,unknownKeys:"strip"})}passthrough(){return new mn({...this._def,unknownKeys:"passthrough"})}extend(t){return new mn({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new mn({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Fe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new mn({...this._def,catchall:t})}pick(t){const n={};for(const r of mt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new mn({...this._def,shape:()=>n})}omit(t){const n={};for(const r of mt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new mn({...this._def,shape:()=>n})}deepPartial(){return Ic(this)}partial(t){const n={};for(const r of mt.objectKeys(this.shape)){const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}return new mn({...this._def,shape:()=>n})}required(t){const n={};for(const r of mt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let a=this.shape[r];for(;a instanceof ks;)a=a._def.innerType;n[r]=a}return new mn({...this._def,shape:()=>n})}keyof(){return QG(mt.objectKeys(this.shape))}}mn.create=(e,t)=>new mn({shape:()=>e,unknownKeys:"strip",catchall:Gs.create(),typeName:Fe.ZodObject,...Ze(t)});mn.strictCreate=(e,t)=>new mn({shape:()=>e,unknownKeys:"strict",catchall:Gs.create(),typeName:Fe.ZodObject,...Ze(t)});mn.lazycreate=(e,t)=>new mn({shape:e,unknownKeys:"strip",catchall:Gs.create(),typeName:Fe.ZodObject,...Ze(t)});class Ky extends dt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(a){for(const l of a)if(l.result.status==="valid")return l.result;for(const l of a)if(l.result.status==="dirty")return n.common.issues.push(...l.ctx.common.issues),l.result;const o=a.map(l=>new co(l.ctx.common.issues));return Te(n,{code:we.invalid_union,unionErrors:o}),Ve}if(n.common.async)return Promise.all(r.map(async a=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(i);{let a;const o=[];for(const u of r){const f={...n,common:{...n.common,issues:[]},parent:null},d=u._parseSync({data:n.data,path:n.path,parent:f});if(d.status==="valid")return d;d.status==="dirty"&&!a&&(a={result:d,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const l=o.map(u=>new co(u));return Te(n,{code:we.invalid_union,unionErrors:l}),Ve}}get options(){return this._def.options}}Ky.create=(e,t)=>new Ky({options:e,typeName:Fe.ZodUnion,...Ze(t)});function sN(e,t){const n=cs(e),r=cs(t);if(e===t)return{valid:!0,data:e};if(n===Pe.object&&r===Pe.object){const i=mt.objectKeys(t),a=mt.objectKeys(e).filter(l=>i.indexOf(l)!==-1),o={...e,...t};for(const l of a){const u=sN(e[l],t[l]);if(!u.valid)return{valid:!1};o[l]=u.data}return{valid:!0,data:o}}else if(n===Pe.array&&r===Pe.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let a=0;a<e.length;a++){const o=e[a],l=t[a],u=sN(o,l);if(!u.valid)return{valid:!1};i.push(u.data)}return{valid:!0,data:i}}else return n===Pe.date&&r===Pe.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Yy extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(a,o)=>{if(v3(a)||v3(o))return Ve;const l=sN(a.value,o.value);return l.valid?((y3(a)||y3(o))&&n.dirty(),{status:n.value,value:l.data}):(Te(r,{code:we.invalid_intersection_types}),Ve)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([a,o])=>i(a,o)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Yy.create=(e,t,n)=>new Yy({left:e,right:t,typeName:Fe.ZodIntersection,...Ze(n)});class hu extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.array)return Te(r,{code:we.invalid_type,expected:Pe.array,received:r.parsedType}),Ve;if(r.data.length<this._def.items.length)return Te(r,{code:we.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ve;!this._def.rest&&r.data.length>this._def.items.length&&(Te(r,{code:we.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...r.data].map((o,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new Hs(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(a).then(o=>zr.mergeArray(n,o)):zr.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new hu({...this._def,rest:t})}}hu.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new hu({items:e,typeName:Fe.ZodTuple,rest:null,...Ze(t)})};class C3 extends dt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.map)return Te(r,{code:we.invalid_type,expected:Pe.map,received:r.parsedType}),Ve;const i=this._def.keyType,a=this._def.valueType,o=[...r.data.entries()].map(([l,u],f)=>({key:i._parse(new Hs(r,l,r.path,[f,"key"])),value:a._parse(new Hs(r,u,r.path,[f,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of o){const f=await u.key,d=await u.value;if(f.status==="aborted"||d.status==="aborted")return Ve;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}})}else{const l=new Map;for(const u of o){const f=u.key,d=u.value;if(f.status==="aborted"||d.status==="aborted")return Ve;(f.status==="dirty"||d.status==="dirty")&&n.dirty(),l.set(f.value,d.value)}return{status:n.value,value:l}}}}C3.create=(e,t,n)=>new C3({valueType:t,keyType:e,typeName:Fe.ZodMap,...Ze(n)});class jp extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Pe.set)return Te(r,{code:we.invalid_type,expected:Pe.set,received:r.parsedType}),Ve;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Te(r,{code:we.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Te(r,{code:we.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const a=this._def.valueType;function o(u){const f=new Set;for(const d of u){if(d.status==="aborted")return Ve;d.status==="dirty"&&n.dirty(),f.add(d.value)}return{status:n.value,value:f}}const l=[...r.data.values()].map((u,f)=>a._parse(new Hs(r,u,r.path,f)));return r.common.async?Promise.all(l).then(u=>o(u)):o(l)}min(t,n){return new jp({...this._def,minSize:{value:t,message:Re.toString(n)}})}max(t,n){return new jp({...this._def,maxSize:{value:t,message:Re.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}jp.create=(e,t)=>new jp({valueType:e,minSize:null,maxSize:null,typeName:Fe.ZodSet,...Ze(t)});class O3 extends dt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}O3.create=(e,t)=>new O3({getter:e,typeName:Fe.ZodLazy,...Ze(t)});class j3 extends dt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Te(n,{received:n.data,code:we.invalid_literal,expected:this._def.value}),Ve}return{status:"valid",value:t.data}}get value(){return this._def.value}}j3.create=(e,t)=>new j3({value:e,typeName:Fe.ZodLiteral,...Ze(t)});function QG(e,t){return new Sf({values:e,typeName:Fe.ZodEnum,...Ze(t)})}class Sf extends dt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{expected:mt.joinValues(r),received:n.parsedType,code:we.invalid_type}),Ve}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Te(n,{received:n.data,code:we.invalid_enum_value,options:r}),Ve}return fi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Sf.create(t,{...this._def,...n})}exclude(t,n=this._def){return Sf.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Sf.create=QG;class N3 extends dt{_parse(t){const n=mt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Pe.string&&r.parsedType!==Pe.number){const i=mt.objectValues(n);return Te(r,{expected:mt.joinValues(i),received:r.parsedType,code:we.invalid_type}),Ve}if(this._cache||(this._cache=new Set(mt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const i=mt.objectValues(n);return Te(r,{received:r.data,code:we.invalid_enum_value,options:i}),Ve}return fi(t.data)}get enum(){return this._def.values}}N3.create=(e,t)=>new N3({values:e,typeName:Fe.ZodNativeEnum,...Ze(t)});class Xy extends dt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Pe.promise&&n.common.async===!1)return Te(n,{code:we.invalid_type,expected:Pe.promise,received:n.parsedType}),Ve;const r=n.parsedType===Pe.promise?n.data:Promise.resolve(n.data);return fi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Xy.create=(e,t)=>new Xy({type:e,typeName:Fe.ZodPromise,...Ze(t)});class _f extends dt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Fe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,a={addIssue:o=>{Te(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),i.type==="preprocess"){const o=i.transform(r.data,a);if(r.common.async)return Promise.resolve(o).then(async l=>{if(n.value==="aborted")return Ve;const u=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return u.status==="aborted"?Ve:u.status==="dirty"||n.value==="dirty"?Zh(u.value):u});{if(n.value==="aborted")return Ve;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?Ve:l.status==="dirty"||n.value==="dirty"?Zh(l.value):l}}if(i.type==="refinement"){const o=l=>{const u=i.refinement(l,a);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?Ve:(l.status==="dirty"&&n.dirty(),o(l.value),{status:n.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?Ve:(l.status==="dirty"&&n.dirty(),o(l.value).then(()=>({status:n.value,value:l.value}))))}if(i.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!xf(o))return Ve;const l=i.transform(o.value,a);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>xf(o)?Promise.resolve(i.transform(o.value,a)).then(l=>({status:n.value,value:l})):Ve);mt.assertNever(i)}}_f.create=(e,t,n)=>new _f({schema:e,typeName:Fe.ZodEffects,effect:t,...Ze(n)});_f.createWithPreprocess=(e,t,n)=>new _f({schema:t,effect:{type:"preprocess",transform:e},typeName:Fe.ZodEffects,...Ze(n)});class ks extends dt{_parse(t){return this._getType(t)===Pe.undefined?fi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ks.create=(e,t)=>new ks({innerType:e,typeName:Fe.ZodOptional,...Ze(t)});class Ef extends dt{_parse(t){return this._getType(t)===Pe.null?fi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ef.create=(e,t)=>new Ef({innerType:e,typeName:Fe.ZodNullable,...Ze(t)});class lN extends dt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Pe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}lN.create=(e,t)=>new lN({innerType:e,typeName:Fe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ze(t)});class uN extends dt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Gy(i)?i.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new co(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new co(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}uN.create=(e,t)=>new uN({innerType:e,typeName:Fe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ze(t)});class P3 extends dt{_parse(t){if(this._getType(t)!==Pe.nan){const r=this._getOrReturnCtx(t);return Te(r,{code:we.invalid_type,expected:Pe.nan,received:r.parsedType}),Ve}return{status:"valid",value:t.data}}}P3.create=e=>new P3({typeName:Fe.ZodNaN,...Ze(e)});class fce extends dt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class QM extends dt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?Ve:a.status==="dirty"?(n.dirty(),Zh(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Ve:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new QM({in:t,out:n,typeName:Fe.ZodPipeline})}}class cN extends dt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(xf(i)&&(i.value=Object.freeze(i.value)),i);return Gy(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}cN.create=(e,t)=>new cN({innerType:e,typeName:Fe.ZodReadonly,...Ze(t)});var Fe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Fe||(Fe={}));const Ds=Cs.create,M3=wf.create;Gs.create;ua.create;const km=mn.create;Ky.create;Yy.create;hu.create;const R0=Sf.create;Xy.create;ks.create;Ef.create;/**
|
|
66
|
+
* @license lucide-react v0.468.0 - ISC
|
|
67
|
+
*
|
|
68
|
+
* This source code is licensed under the ISC license.
|
|
69
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
+
*/const dce=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),JG=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
71
|
+
* @license lucide-react v0.468.0 - ISC
|
|
72
|
+
*
|
|
73
|
+
* This source code is licensed under the ISC license.
|
|
74
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
+
*/var hce={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"};/**
|
|
76
|
+
* @license lucide-react v0.468.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const pce=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},u)=>j.createElement("svg",{ref:u,...hce,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:JG("lucide",i),...l},[...o.map(([f,d])=>j.createElement(f,d)),...Array.isArray(a)?a:[a]]));/**
|
|
81
|
+
* @license lucide-react v0.468.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const qe=(e,t)=>{const n=j.forwardRef(({className:r,...i},a)=>j.createElement(pce,{ref:a,iconNode:t,className:JG(`lucide-${dce(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
|
|
86
|
+
* @license lucide-react v0.468.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const mce=qe("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
|
|
91
|
+
* @license lucide-react v0.468.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const e7=qe("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
|
|
96
|
+
* @license lucide-react v0.468.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/const gce=qe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
101
|
+
* @license lucide-react v0.468.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const vce=qe("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"}]]);/**
|
|
106
|
+
* @license lucide-react v0.468.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const t7=qe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
111
|
+
* @license lucide-react v0.468.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const yce=qe("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"}]]);/**
|
|
116
|
+
* @license lucide-react v0.468.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const n7=qe("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
|
|
121
|
+
* @license lucide-react v0.468.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Dm=qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
126
|
+
* @license lucide-react v0.468.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const k0=qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
131
|
+
* @license lucide-react v0.468.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Af=qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
136
|
+
* @license lucide-react v0.468.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const bce=qe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
141
|
+
* @license lucide-react v0.468.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const dd=qe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
146
|
+
* @license lucide-react v0.468.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const xce=qe("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
151
|
+
* @license lucide-react v0.468.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Im=qe("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
156
|
+
* @license lucide-react v0.468.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const D0=qe("CircleX",[["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"}]]);/**
|
|
161
|
+
* @license lucide-react v0.468.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const R3=qe("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
166
|
+
* @license lucide-react v0.468.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const ki=qe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
171
|
+
* @license lucide-react v0.468.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const wce=qe("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["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"}]]);/**
|
|
176
|
+
* @license lucide-react v0.468.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const JM=qe("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"}]]);/**
|
|
181
|
+
* @license lucide-react v0.468.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const Sce=qe("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"}]]);/**
|
|
186
|
+
* @license lucide-react v0.468.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const qS=qe("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
|
|
191
|
+
* @license lucide-react v0.468.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const _ce=qe("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"}]]);/**
|
|
196
|
+
* @license lucide-react v0.468.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const Ece=qe("FastForward",[["polygon",{points:"13 19 22 12 13 5 13 19",key:"587y9g"}],["polygon",{points:"2 19 11 12 2 5 2 19",key:"3pweh0"}]]);/**
|
|
201
|
+
* @license lucide-react v0.468.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const pu=qe("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"}]]);/**
|
|
206
|
+
* @license lucide-react v0.468.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const eR=qe("FlaskConical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);/**
|
|
211
|
+
* @license lucide-react v0.468.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const Ace=qe("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"}]]);/**
|
|
216
|
+
* @license lucide-react v0.468.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const Tce=qe("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
|
|
221
|
+
* @license lucide-react v0.468.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const Cce=qe("Hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);/**
|
|
226
|
+
* @license lucide-react v0.468.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const Oce=qe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
231
|
+
* @license lucide-react v0.468.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const tR=qe("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:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
|
|
236
|
+
* @license lucide-react v0.468.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const op=qe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
|
|
241
|
+
* @license lucide-react v0.468.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const r7=qe("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]);/**
|
|
246
|
+
* @license lucide-react v0.468.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const i7=qe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
|
|
251
|
+
* @license lucide-react v0.468.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const hd=qe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
256
|
+
* @license lucide-react v0.468.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const a7=qe("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
261
|
+
* @license lucide-react v0.468.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const Zy=qe("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
266
|
+
* @license lucide-react v0.468.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const I0=qe("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"}]]);/**
|
|
271
|
+
* @license lucide-react v0.468.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const nR=qe("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
276
|
+
* @license lucide-react v0.468.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/const Np=qe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
281
|
+
* @license lucide-react v0.468.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*/const o7=qe("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"}]]);/**
|
|
286
|
+
* @license lucide-react v0.468.0 - ISC
|
|
287
|
+
*
|
|
288
|
+
* This source code is licensed under the ISC license.
|
|
289
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
+
*/const k3=qe("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/**
|
|
291
|
+
* @license lucide-react v0.468.0 - ISC
|
|
292
|
+
*
|
|
293
|
+
* This source code is licensed under the ISC license.
|
|
294
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
+
*/const s7=qe("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"}]]);/**
|
|
296
|
+
* @license lucide-react v0.468.0 - ISC
|
|
297
|
+
*
|
|
298
|
+
* This source code is licensed under the ISC license.
|
|
299
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
+
*/const jce=qe("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"}]]);/**
|
|
301
|
+
* @license lucide-react v0.468.0 - ISC
|
|
302
|
+
*
|
|
303
|
+
* This source code is licensed under the ISC license.
|
|
304
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
+
*/const D3=qe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
|
|
306
|
+
* @license lucide-react v0.468.0 - ISC
|
|
307
|
+
*
|
|
308
|
+
* This source code is licensed under the ISC license.
|
|
309
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
+
*/const Qy=qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
311
|
+
* @license lucide-react v0.468.0 - ISC
|
|
312
|
+
*
|
|
313
|
+
* This source code is licensed under the ISC license.
|
|
314
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
+
*/const l7=qe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var zS,L0="HoverCard",[u7]=va(L0,[cd]),$0=cd(),[Nce,B0]=u7(L0),c7=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:i,onOpenChange:a,openDelay:o=700,closeDelay:l=300}=e,u=$0(t),f=j.useRef(0),d=j.useRef(0),h=j.useRef(!1),m=j.useRef(!1),[g,b]=Us({prop:r,defaultProp:i??!1,onChange:a,caller:L0}),w=j.useCallback(()=>{clearTimeout(d.current),f.current=window.setTimeout(()=>b(!0),o)},[o,b]),y=j.useCallback(()=>{clearTimeout(f.current),!h.current&&!m.current&&(d.current=window.setTimeout(()=>b(!1),l))},[l,b]),S=j.useCallback(()=>b(!1),[b]);return j.useEffect(()=>()=>{clearTimeout(f.current),clearTimeout(d.current)},[]),x.jsx(Nce,{scope:t,open:g,onOpenChange:b,onOpen:w,onClose:y,onDismiss:S,hasSelectionRef:h,isPointerDownOnContentRef:m,children:x.jsx(HM,{...u,children:n})})};c7.displayName=L0;var f7="HoverCardTrigger",d7=j.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=B0(f7,n),a=$0(n);return x.jsx(GM,{asChild:!0,...a,children:x.jsx(He.a,{"data-state":i.open?"open":"closed",...r,ref:t,onPointerEnter:ke(e.onPointerEnter,eb(i.onOpen)),onPointerLeave:ke(e.onPointerLeave,eb(i.onClose)),onFocus:ke(e.onFocus,i.onOpen),onBlur:ke(e.onBlur,i.onClose),onTouchStart:ke(e.onTouchStart,o=>o.preventDefault())})})});d7.displayName=f7;var rR="HoverCardPortal",[Pce,Mce]=u7(rR,{forceMount:void 0}),h7=e=>{const{__scopeHoverCard:t,forceMount:n,children:r,container:i}=e,a=B0(rR,t);return x.jsx(Pce,{scope:t,forceMount:n,children:x.jsx(Er,{present:n||a.open,children:x.jsx(Mm,{asChild:!0,container:i,children:r})})})};h7.displayName=rR;var Jy="HoverCardContent",p7=j.forwardRef((e,t)=>{const n=Mce(Jy,e.__scopeHoverCard),{forceMount:r=n.forceMount,...i}=e,a=B0(Jy,e.__scopeHoverCard);return x.jsx(Er,{present:r||a.open,children:x.jsx(Rce,{"data-state":a.open?"open":"closed",...i,onPointerEnter:ke(e.onPointerEnter,eb(a.onOpen)),onPointerLeave:ke(e.onPointerLeave,eb(a.onClose)),ref:t})})});p7.displayName=Jy;var Rce=j.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,...l}=e,u=B0(Jy,n),f=$0(n),d=j.useRef(null),h=ft(t,d),[m,g]=j.useState(!1);return j.useEffect(()=>{if(m){const b=document.body;return zS=b.style.userSelect||b.style.webkitUserSelect,b.style.userSelect="none",b.style.webkitUserSelect="none",()=>{b.style.userSelect=zS,b.style.webkitUserSelect=zS}}},[m]),j.useEffect(()=>{if(d.current){const b=()=>{g(!1),u.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(u.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",b),()=>{document.removeEventListener("pointerup",b),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}},[u.isPointerDownOnContentRef,u.hasSelectionRef]),j.useEffect(()=>{d.current&&Ice(d.current).forEach(w=>w.setAttribute("tabindex","-1"))}),x.jsx(Nm,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:o,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:ke(a,b=>{b.preventDefault()}),onDismiss:u.onDismiss,children:x.jsx(WM,{...f,...l,onPointerDown:ke(l.onPointerDown,b=>{b.currentTarget.contains(b.target)&&g(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0}),ref:h,style:{...l.style,userSelect:m?"text":void 0,WebkitUserSelect:m?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),kce="HoverCardArrow",Dce=j.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,i=$0(n);return x.jsx(KM,{...i,...r,ref:t})});Dce.displayName=kce;function eb(e){return t=>t.pointerType==="touch"?void 0:e()}function Ice(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var Lce=c7,$ce=d7,Bce=h7,qce=p7;function zce({...e}){return x.jsx(Lce,{"data-slot":"hover-card",...e})}function Vce({...e}){return x.jsx($ce,{"data-slot":"hover-card-trigger",...e})}function Fce({className:e,align:t="center",sideOffset:n=4,...r}){return x.jsx(Bce,{"data-slot":"hover-card-portal",children:x.jsx(qce,{"data-slot":"hover-card-content",align:t,sideOffset:n,className:Ce("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-64 origin-(--radix-hover-card-content-transform-origin) border p-4 shadow-md outline-hidden",e),...r})})}var Uce=j.createContext(void 0);function q0(e){const t=j.useContext(Uce);return e||t||"ltr"}function fN(e,[t,n]){return Math.min(n,Math.max(t,e))}function Hce(e,t){return j.useReducer((n,r)=>t[n][r]??n,e)}var iR="ScrollArea",[m7]=va(iR),[Gce,di]=m7(iR),g7=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:a=600,...o}=e,[l,u]=j.useState(null),[f,d]=j.useState(null),[h,m]=j.useState(null),[g,b]=j.useState(null),[w,y]=j.useState(null),[S,E]=j.useState(0),[_,A]=j.useState(0),[T,O]=j.useState(!1),[P,M]=j.useState(!1),R=ft(t,I=>u(I)),D=q0(i);return x.jsx(Gce,{scope:n,type:r,dir:D,scrollHideDelay:a,scrollArea:l,viewport:f,onViewportChange:d,content:h,onContentChange:m,scrollbarX:g,onScrollbarXChange:b,scrollbarXEnabled:T,onScrollbarXEnabledChange:O,scrollbarY:w,onScrollbarYChange:y,scrollbarYEnabled:P,onScrollbarYEnabledChange:M,onCornerWidthChange:E,onCornerHeightChange:A,children:x.jsx(He.div,{dir:D,...o,ref:R,style:{position:"relative","--radix-scroll-area-corner-width":S+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});g7.displayName=iR;var v7="ScrollAreaViewport",y7=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=di(v7,n),l=j.useRef(null),u=ft(t,l,o.onViewportChange);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),x.jsx(He.div,{"data-radix-scroll-area-viewport":"",...a,ref:u,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style},children:x.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});y7.displayName=v7;var ba="ScrollAreaScrollbar",aR=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=di(ba,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,l=e.orientation==="horizontal";return j.useEffect(()=>(l?a(!0):o(!0),()=>{l?a(!1):o(!1)}),[l,a,o]),i.type==="hover"?x.jsx(Wce,{...r,ref:t,forceMount:n}):i.type==="scroll"?x.jsx(Kce,{...r,ref:t,forceMount:n}):i.type==="auto"?x.jsx(b7,{...r,ref:t,forceMount:n}):i.type==="always"?x.jsx(oR,{...r,ref:t}):null});aR.displayName=ba;var Wce=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=di(ba,e.__scopeScrollArea),[a,o]=j.useState(!1);return j.useEffect(()=>{const l=i.scrollArea;let u=0;if(l){const f=()=>{window.clearTimeout(u),o(!0)},d=()=>{u=window.setTimeout(()=>o(!1),i.scrollHideDelay)};return l.addEventListener("pointerenter",f),l.addEventListener("pointerleave",d),()=>{window.clearTimeout(u),l.removeEventListener("pointerenter",f),l.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),x.jsx(Er,{present:n||a,children:x.jsx(b7,{"data-state":a?"visible":"hidden",...r,ref:t})})}),Kce=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=di(ba,e.__scopeScrollArea),a=e.orientation==="horizontal",o=V0(()=>u("SCROLL_END"),100),[l,u]=Hce("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return j.useEffect(()=>{if(l==="idle"){const f=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(f)}},[l,i.scrollHideDelay,u]),j.useEffect(()=>{const f=i.viewport,d=a?"scrollLeft":"scrollTop";if(f){let h=f[d];const m=()=>{const g=f[d];h!==g&&(u("SCROLL"),o()),h=g};return f.addEventListener("scroll",m),()=>f.removeEventListener("scroll",m)}},[i.viewport,a,u,o]),x.jsx(Er,{present:n||l!=="hidden",children:x.jsx(oR,{"data-state":l==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ke(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:ke(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),b7=j.forwardRef((e,t)=>{const n=di(ba,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=j.useState(!1),l=e.orientation==="horizontal",u=V0(()=>{if(n.viewport){const f=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;o(l?f:d)}},10);return Tf(n.viewport,u),Tf(n.content,u),x.jsx(Er,{present:r||a,children:x.jsx(oR,{"data-state":a?"visible":"hidden",...i,ref:t})})}),oR=j.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=di(ba,e.__scopeScrollArea),a=j.useRef(null),o=j.useRef(0),[l,u]=j.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=E7(l.viewport,l.content),d={...r,sizes:l,onSizesChange:u,hasThumb:f>0&&f<1,onThumbChange:m=>a.current=m,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:m=>o.current=m};function h(m,g){return efe(m,o.current,l,g)}return n==="horizontal"?x.jsx(Yce,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollLeft,g=I3(m,l,i.dir);a.current.style.transform=`translate3d(${g}px, 0, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollLeft=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollLeft=h(m,i.dir))}}):n==="vertical"?x.jsx(Xce,{...d,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){const m=i.viewport.scrollTop,g=I3(m,l);a.current.style.transform=`translate3d(0, ${g}px, 0)`}},onWheelScroll:m=>{i.viewport&&(i.viewport.scrollTop=m)},onDragScroll:m=>{i.viewport&&(i.viewport.scrollTop=h(m))}}):null}),Yce=j.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=di(ba,e.__scopeScrollArea),[o,l]=j.useState(),u=j.useRef(null),f=ft(t,u,a.onScrollbarXChange);return j.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),x.jsx(w7,{"data-orientation":"horizontal",...i,ref:f,sizes:n,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":z0(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollLeft+d.deltaX;e.onWheelScroll(m),T7(m,h)&&d.preventDefault()}},onResize:()=>{u.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:nb(o.paddingLeft),paddingEnd:nb(o.paddingRight)}})}})}),Xce=j.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,a=di(ba,e.__scopeScrollArea),[o,l]=j.useState(),u=j.useRef(null),f=ft(t,u,a.onScrollbarYChange);return j.useEffect(()=>{u.current&&l(getComputedStyle(u.current))},[u]),x.jsx(w7,{"data-orientation":"vertical",...i,ref:f,sizes:n,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":z0(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,h)=>{if(a.viewport){const m=a.viewport.scrollTop+d.deltaY;e.onWheelScroll(m),T7(m,h)&&d.preventDefault()}},onResize:()=>{u.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:nb(o.paddingTop),paddingEnd:nb(o.paddingBottom)}})}})}),[Zce,x7]=m7(ba),w7=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:l,onThumbPositionChange:u,onDragScroll:f,onWheelScroll:d,onResize:h,...m}=e,g=di(ba,n),[b,w]=j.useState(null),y=ft(t,R=>w(R)),S=j.useRef(null),E=j.useRef(""),_=g.viewport,A=r.content-r.viewport,T=nr(d),O=nr(u),P=V0(h,10);function M(R){if(S.current){const D=R.clientX-S.current.left,I=R.clientY-S.current.top;f({x:D,y:I})}}return j.useEffect(()=>{const R=D=>{const I=D.target;(b==null?void 0:b.contains(I))&&T(D,A)};return document.addEventListener("wheel",R,{passive:!1}),()=>document.removeEventListener("wheel",R,{passive:!1})},[_,b,A,T]),j.useEffect(O,[r,O]),Tf(b,P),Tf(g.content,P),x.jsx(Zce,{scope:n,scrollbar:b,hasThumb:i,onThumbChange:nr(a),onThumbPointerUp:nr(o),onThumbPositionChange:O,onThumbPointerDown:nr(l),children:x.jsx(He.div,{...m,ref:y,style:{position:"absolute",...m.style},onPointerDown:ke(e.onPointerDown,R=>{R.button===0&&(R.target.setPointerCapture(R.pointerId),S.current=b.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",g.viewport&&(g.viewport.style.scrollBehavior="auto"),M(R))}),onPointerMove:ke(e.onPointerMove,M),onPointerUp:ke(e.onPointerUp,R=>{const D=R.target;D.hasPointerCapture(R.pointerId)&&D.releasePointerCapture(R.pointerId),document.body.style.webkitUserSelect=E.current,g.viewport&&(g.viewport.style.scrollBehavior=""),S.current=null})})})}),tb="ScrollAreaThumb",S7=j.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=x7(tb,e.__scopeScrollArea);return x.jsx(Er,{present:n||i.hasThumb,children:x.jsx(Qce,{ref:t,...r})})}),Qce=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,a=di(tb,n),o=x7(tb,n),{onThumbPositionChange:l}=o,u=ft(t,h=>o.onThumbChange(h)),f=j.useRef(void 0),d=V0(()=>{f.current&&(f.current(),f.current=void 0)},100);return j.useEffect(()=>{const h=a.viewport;if(h){const m=()=>{if(d(),!f.current){const g=tfe(h,l);f.current=g,l()}};return l(),h.addEventListener("scroll",m),()=>h.removeEventListener("scroll",m)}},[a.viewport,d,l]),x.jsx(He.div,{"data-state":o.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ke(e.onPointerDownCapture,h=>{const g=h.target.getBoundingClientRect(),b=h.clientX-g.left,w=h.clientY-g.top;o.onThumbPointerDown({x:b,y:w})}),onPointerUp:ke(e.onPointerUp,o.onThumbPointerUp)})});S7.displayName=tb;var sR="ScrollAreaCorner",_7=j.forwardRef((e,t)=>{const n=di(sR,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?x.jsx(Jce,{...e,ref:t}):null});_7.displayName=sR;var Jce=j.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=di(sR,n),[a,o]=j.useState(0),[l,u]=j.useState(0),f=!!(a&&l);return Tf(i.scrollbarX,()=>{var h;const d=((h=i.scrollbarX)==null?void 0:h.offsetHeight)||0;i.onCornerHeightChange(d),u(d)}),Tf(i.scrollbarY,()=>{var h;const d=((h=i.scrollbarY)==null?void 0:h.offsetWidth)||0;i.onCornerWidthChange(d),o(d)}),f?x.jsx(He.div,{...r,ref:t,style:{width:a,height:l,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function nb(e){return e?parseInt(e,10):0}function E7(e,t){const n=e/t;return isNaN(n)?0:n}function z0(e){const t=E7(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function efe(e,t,n,r="ltr"){const i=z0(n),a=i/2,o=t||a,l=i-o,u=n.scrollbar.paddingStart+o,f=n.scrollbar.size-n.scrollbar.paddingEnd-l,d=n.content-n.viewport,h=r==="ltr"?[0,d]:[d*-1,0];return A7([u,f],h)(e)}function I3(e,t,n="ltr"){const r=z0(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,l=a-r,u=n==="ltr"?[0,o]:[o*-1,0],f=fN(e,u);return A7([0,o],[0,l])(f)}function A7(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function T7(e,t){return e>0&&e<t}var tfe=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){const a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,l=n.top!==a.top;(o||l)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)};function V0(e,t){const n=nr(e),r=j.useRef(0);return j.useEffect(()=>()=>window.clearTimeout(r.current),[]),j.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Tf(e,t){const n=nr(t);zn(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var C7=g7,nfe=y7,rfe=_7;const O7=j.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(C7,{ref:r,className:Ce("relative overflow-hidden",e),...n,children:[x.jsx(nfe,{className:"h-full w-full",children:t}),x.jsx(j7,{}),x.jsx(rfe,{})]}));O7.displayName=C7.displayName;const j7=j.forwardRef(({className:e,orientation:t="vertical",...n},r)=>x.jsx(aR,{ref:r,orientation:t,className:Ce("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:x.jsx(S7,{className:"relative flex-1 rounded-full bg-border"})}));j7.displayName=aR.displayName;const Rt="./api",ife=6e4,Dh=12e4;async function jt(e,t){const{timeout:n=ife,signal:r,...i}=t||{},a=new AbortController,o=setTimeout(()=>a.abort(),n);let l;r&&"any"in AbortSignal?l=AbortSignal.any([r,a.signal]):(r&&(r.aborted?a.abort():r.addEventListener("abort",()=>a.abort())),l=a.signal);try{const u=await fetch(e,{...i,signal:l,headers:{"Content-Type":"application/json",...i==null?void 0:i.headers}});if(!u.ok){const f=await u.json().catch(()=>({}));throw new Error(f.error||`HTTP ${u.status}`)}return u.json()}catch(u){throw u instanceof Error&&u.name==="AbortError"?r!=null&&r.aborted?u:new Error(`Request timed out after ${n/1e3}s`):u}finally{clearTimeout(o)}}const Yt={async refresh(){return jt(`${Rt}/refresh`,{method:"POST"})},async getOverview(e){return jt(`${Rt}/overview`,{signal:e,timeout:Dh})},async getCounts(e){return jt(`${Rt}/counts`,{signal:e})},async getQueueNames(e){return jt(`${Rt}/queue-names`,{signal:e})},async getQueues(e){return jt(`${Rt}/queues`,{signal:e})},async getMetrics(e){return jt(`${Rt}/metrics`,{signal:e,timeout:Dh})},async getActivityStats(e){return jt(`${Rt}/activity`,{signal:e,timeout:Dh})},async getJobs(e,t){const n=new URLSearchParams;t!=null&&t.status&&n.set("status",t.status),t!=null&&t.limit&&n.set("limit",String(t.limit)),t!=null&&t.cursor&&n.set("cursor",t.cursor),t!=null&&t.sort&&n.set("sort",t.sort);const r=n.toString();return jt(`${Rt}/queues/${encodeURIComponent(e)}/jobs${r?`?${r}`:""}`)},async getJob(e,t){return jt(`${Rt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},async retryJob(e,t){await jt(`${Rt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/retry`,{method:"POST"})},async removeJob(e,t){await jt(`${Rt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/remove`,{method:"POST"})},async promoteJob(e,t){await jt(`${Rt}/jobs/${encodeURIComponent(e)}/${encodeURIComponent(t)}/promote`,{method:"POST"})},async search(e,t){const n=new URLSearchParams({q:e});return t&&n.set("limit",String(t)),jt(`${Rt}/search?${n.toString()}`)},async cleanJobs(e,t,n){return jt(`${Rt}/queues/${encodeURIComponent(e)}/clean`,{method:"POST",body:JSON.stringify({status:t,grace:n})})},async getConfig(){return jt("./config")},async getTagValues(e,t){const n=new URLSearchParams;t&&n.set("limit",String(t));const r=n.toString();return jt(`${Rt}/tags/${encodeURIComponent(e)}/values${r?`?${r}`:""}`)},async getRuns(e,t){const n=new URLSearchParams;e!=null&&e.limit&&n.set("limit",String(e.limit)),e!=null&&e.cursor&&n.set("cursor",e.cursor),e!=null&&e.sort&&n.set("sort",e.sort),e!=null&&e.status&&n.set("status",e.status),e!=null&&e.tags&&Object.keys(e.tags).length>0&&n.set("tags",JSON.stringify(e.tags)),e!=null&&e.text&&n.set("q",e.text),e!=null&&e.timeRange&&(n.set("from",String(e.timeRange.start)),n.set("to",String(e.timeRange.end)));const r=n.toString();return jt(`${Rt}/runs${r?`?${r}`:""}`,{signal:t,timeout:Dh})},async getSchedulers(e){const t=new URLSearchParams;e!=null&&e.repeatableSort&&t.set("repeatableSort",e.repeatableSort),e!=null&&e.delayedSort&&t.set("delayedSort",e.delayedSort);const n=t.toString();return jt(`${Rt}/schedulers${n?`?${n}`:""}`)},async getRepeatableSchedulers(e){const{repeatable:t}=await this.getSchedulers({repeatableSort:e});return t},async getDelayedSchedulers(e){const{delayed:t}=await this.getSchedulers({delayedSort:e});return t},async testJob(e){return jt(`${Rt}/test`,{method:"POST",body:JSON.stringify(e)})},async cleanQueue(e,t,n){return jt(`${Rt}/queues/${encodeURIComponent(e)}/clean`,{method:"POST",body:JSON.stringify({status:t,grace:n})})},async bulkRetry(e){return jt(`${Rt}/bulk/retry`,{method:"POST",body:JSON.stringify({jobs:e})})},async bulkDelete(e){return jt(`${Rt}/bulk/delete`,{method:"POST",body:JSON.stringify({jobs:e})})},async bulkPromote(e){return jt(`${Rt}/bulk/promote`,{method:"POST",body:JSON.stringify({jobs:e})})},async pauseQueue(e){return jt(`${Rt}/queues/${encodeURIComponent(e)}/pause`,{method:"POST"})},async resumeQueue(e){return jt(`${Rt}/queues/${encodeURIComponent(e)}/resume`,{method:"POST"})},async getFlows(e,t){const n=new URLSearchParams;e&&n.set("limit",String(e));const r=n.toString();return jt(`${Rt}/flows${r?`?${r}`:""}`,{signal:t,timeout:Dh})},async getFlow(e,t){return jt(`${Rt}/flows/${encodeURIComponent(e)}/${encodeURIComponent(t)}`)},async createFlow(e){return jt(`${Rt}/flows`,{method:"POST",body:JSON.stringify(e)})}},at={config:["config"],overview:["overview"],queueNames:["queue-names"],queues:["queues"],queue:e=>["queue",e],jobs:(e,t,n)=>["jobs",e,t,n],jobsAll:e=>["jobs",e],job:(e,t)=>["job",e,t],runs:(e,t)=>["runs",e,t],runsAll:["runs"],schedulers:{repeatable:e=>["schedulers","repeatable",e],delayed:e=>["schedulers","delayed",e],all:["schedulers"]},search:e=>["search",e],tagValues:e=>["tagValues",e],metrics:["metrics"],activity:["activity"],flows:["flows"],flow:(e,t)=>["flow",e,t]};function Lm(){return ci({queryKey:at.config,queryFn:()=>Yt.getConfig(),staleTime:Number.POSITIVE_INFINITY})}function afe(){return ci({queryKey:at.queueNames,queryFn:({signal:e})=>Yt.getQueueNames(e),staleTime:6e4})}function lR(){return ci({queryKey:at.queues,queryFn:({signal:e})=>Yt.getQueues(e),refetchInterval:5e3})}function ofe(e){const{data:t}=lR();return j.useMemo(()=>t==null?void 0:t.find(n=>n.name===e),[t,e])}function sfe(){return ci({queryKey:at.metrics,queryFn:({signal:e})=>Yt.getMetrics(e),refetchInterval:3e4})}function lfe(){return ci({queryKey:at.activity,queryFn:({signal:e})=>Yt.getActivityStats(e),refetchInterval:3e4})}function ufe(e,t,n){return L9({queryKey:at.jobs(e,t,n),queryFn:({pageParam:r})=>Yt.getJobs(e,{status:t,limit:50,cursor:r,sort:n}),getNextPageParam:r=>r.cursor,initialPageParam:void 0,refetchInterval:5e3})}function cfe(e,t){return ci({queryKey:at.job(e,t),queryFn:()=>Yt.getJob(e,t),refetchInterval:5e3})}function ffe(e,t){return L9({queryKey:at.runs(e,t),queryFn:({pageParam:n,signal:r})=>Yt.getRuns({limit:30,cursor:n,sort:e,...t},r),getNextPageParam:n=>n.cursor,initialPageParam:void 0,refetchInterval:5e3,staleTime:3e3})}function dfe(e){return ci({queryKey:at.schedulers.repeatable(e),queryFn:()=>Yt.getRepeatableSchedulers(e),refetchInterval:5e3})}function hfe(e){return ci({queryKey:at.schedulers.delayed(e),queryFn:()=>Yt.getDelayedSchedulers(e),refetchInterval:5e3})}function pfe(e){return ci({queryKey:at.search(e),queryFn:()=>Yt.search(e),enabled:e.trim().length>0,staleTime:1e3*30})}function N7(e,t=!0){return ci({queryKey:at.tagValues(e),queryFn:()=>Yt.getTagValues(e),enabled:t&&e.length>0,staleTime:1e3*60})}function uR(){const e=sr();return ga({mutationFn:()=>Yt.refresh(),onSuccess:()=>{e.invalidateQueries()}})}function mfe(){const e=sr();return ga({mutationFn:({queueName:t,jobId:n})=>Yt.retryJob(t,n),onSuccess:(t,{queueName:n,jobId:r})=>{e.invalidateQueries({queryKey:at.job(n,r)}),e.invalidateQueries({queryKey:at.jobsAll(n)}),e.invalidateQueries({queryKey:at.runsAll})}})}function gfe(){const e=sr();return ga({mutationFn:({queueName:t,jobId:n})=>Yt.removeJob(t,n),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:at.jobsAll(n)}),e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues})}})}function vfe(){const e=sr();return ga({mutationFn:({queueName:t,jobId:n})=>Yt.promoteJob(t,n),onSuccess:(t,{queueName:n,jobId:r})=>{e.invalidateQueries({queryKey:at.job(n,r)}),e.invalidateQueries({queryKey:at.jobsAll(n)}),e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.schedulers.all})}})}function yfe(){const e=sr();return ga({mutationFn:t=>Yt.testJob(t),onSuccess:(t,{queueName:n})=>{e.invalidateQueries({queryKey:at.jobsAll(n)}),e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues})}})}function P7(){const e=sr();return ga({mutationFn:({jobs:t})=>Yt.bulkRetry(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues})}})}function M7(){const e=sr();return ga({mutationFn:({jobs:t})=>Yt.bulkDelete(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues})}})}function R7(){const e=sr();return ga({mutationFn:({jobs:t})=>Yt.bulkPromote(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.runsAll}),e.invalidateQueries({queryKey:at.queues}),e.invalidateQueries({queryKey:at.schedulers.all})}})}function bfe(){const e=sr();return ga({mutationFn:t=>Yt.pauseQueue(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.queues})}})}function xfe(){const e=sr();return ga({mutationFn:t=>Yt.resumeQueue(t),onSuccess:()=>{e.invalidateQueries({queryKey:at.queues})}})}function wfe(){return ci({queryKey:at.flows,queryFn:({signal:e})=>Yt.getFlows(void 0,e),refetchInterval:5e3})}function Sfe(e,t){return ci({queryKey:at.flow(e,t),queryFn:()=>Yt.getFlow(e,t),enabled:!!e&&!!t,retry:!1,refetchInterval:5e3})}function _fe({queueName:e}){const t=ofe(e);if(!t)return x.jsx("div",{className:"flex gap-2 text-[9px] text-muted-foreground",children:x.jsx("span",{children:"Loading..."})});const{counts:n}=t,r=n.waiting+n.active+n.completed+n.failed+n.delayed;return x.jsxs("div",{className:"flex gap-2 text-[9px]",children:[n.active>0&&x.jsxs("span",{className:"text-chart-2",children:[n.active," active"]}),n.waiting>0&&x.jsxs("span",{className:"text-muted-foreground",children:[n.waiting," waiting"]}),n.failed>0&&x.jsxs("span",{className:"text-chart-3",children:[n.failed," failed"]}),r===0&&x.jsx("span",{className:"text-muted-foreground",children:"empty"})]})}function Efe({className:e}){return x.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[x.jsx("path",{d:"M12 2L21 7V17L12 22L3 17V7L12 2Z",stroke:"currentColor",strokeWidth:"1.5",fill:"none"}),x.jsx("rect",{x:"7",y:"9",width:"10",height:"2",rx:"0.5",fill:"currentColor"}),x.jsx("rect",{x:"7",y:"13",width:"6",height:"2",rx:"0.5",fill:"currentColor"})]})}function Afe({queues:e,pausedQueues:t=new Set,activeNav:n,activeQueue:r,onNavSelect:i,onQueueSelect:a,isDark:o,onToggleTheme:l}){const u=[{id:"runs",label:"Runs",icon:Zy},{id:"metrics",label:"Metrics",icon:n7},{id:"schedulers",label:"Schedulers",icon:ki},{id:"flows",label:"Flows",icon:hd},{id:"test",label:"Test",icon:eR}],f=({icon:d,label:h,isActive:m,onClick:g,isPaused:b})=>x.jsxs(Tp,{children:[x.jsx(Cp,{asChild:!0,children:x.jsx("button",{type:"button",onClick:g,className:Ce("flex w-full items-center justify-center p-2 text-sm font-medium transition-colors",m?"text-foreground":"text-muted-foreground hover:text-foreground"),children:x.jsxs("div",{className:"relative",children:[x.jsx(d,{className:"h-4 w-4 shrink-0"}),b&&x.jsx("span",{className:"absolute -right-0.5 -top-0.5 h-2 w-2 rounded-full bg-amber-500"})]})})}),x.jsx(bf,{side:"right",sideOffset:16,children:x.jsxs("span",{className:"flex items-center gap-2",children:[h,b&&x.jsx("span",{className:"text-amber-500",children:"(paused)"})]})})]});return x.jsxs("aside",{className:"flex h-screen w-[52px] flex-col border-r border-border bg-background",children:[x.jsx("div",{className:"flex h-14 items-center justify-center border-b border-border",children:x.jsx(Efe,{className:"h-5 w-5"})}),x.jsx(O7,{className:"flex-1",children:x.jsxs("div",{className:"space-y-6 p-2",children:[x.jsx("nav",{className:"space-y-1",children:u.map(d=>x.jsx(f,{icon:d.icon,label:d.label,isActive:n===d.id,onClick:()=>i(d.id)},d.id))}),x.jsx("div",{className:"border-t border-border pt-2",children:x.jsxs(zce,{openDelay:100,closeDelay:200,children:[x.jsx(Vce,{asChild:!0,children:x.jsx("button",{type:"button",className:Ce("flex w-full items-center justify-center p-2 text-sm font-medium transition-colors",n==="queues"||r?"text-foreground":"text-muted-foreground hover:text-foreground"),children:x.jsx(tR,{className:"h-4 w-4 shrink-0"})})}),x.jsx(Fce,{side:"right",align:"start",sideOffset:16,className:"w-auto min-w-[140px] p-1",children:x.jsxs("div",{className:"space-y-0.5",children:[x.jsx("div",{className:"px-2 py-1.5 text-[10px] font-medium uppercase tracking-wider text-muted-foreground",children:"Queues"}),e.map(d=>x.jsxs("button",{type:"button",onClick:()=>a(d),className:Ce("flex w-full flex-col items-start gap-0.5 px-2 py-1.5 transition-colors",r===d?"text-foreground":"text-muted-foreground hover:text-foreground"),children:[x.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[x.jsx("span",{className:"font-mono text-[11px]",children:d}),t.has(d)&&x.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-amber-500 shrink-0"})]}),x.jsx(_fe,{queueName:d})]},d))]})})]})})]})}),x.jsx("div",{className:"border-t border-border p-2",children:x.jsxs(Tp,{children:[x.jsx(Cp,{asChild:!0,children:x.jsx("button",{type:"button",onClick:l,className:"flex w-full items-center justify-center rounded p-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent/50 hover:text-foreground",children:o?x.jsx(o7,{className:"h-4 w-4 shrink-0"}):x.jsx(i7,{className:"h-4 w-4 shrink-0"})})}),x.jsx(bf,{side:"right",sideOffset:16,children:o?"Light mode":"Dark mode"})]})})]})}const L3=[{value:"all",label:"All statuses"},{value:"active",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"waiting",label:"Queued"},{value:"delayed",label:"Delayed"}];function cR(e){const t={},n=[],r=/(\w+):(?:"([^"]+)"|(\S+))/g;let i=0,a;for(;a=r.exec(e),!!a;){if(a.index>i){const u=e.slice(i,a.index).trim();u&&n.push(u)}const o=a[1],l=a[2]||a[3];o==="status"||(t[o]=l),i=r.lastIndex}if(i<e.length){const o=e.slice(i).trim();o&&n.push(o)}return{tags:t,text:n.join(" ")}}function Tfe(e){const t=[];for(const[n,r]of Object.entries(e.tags))if(r){const i=r.includes(" ")?`"${r}"`:r;t.push(`${n}:${i}`)}return e.text&&t.push(e.text),t.join(" ")}function Cfe({value:e,status:t,onChange:n,className:r}){const{data:i}=Lm(),[a,o]=j.useState(e),[l,u]=j.useState(!1),[f,d]=j.useState(0),h=j.useRef(null),m=j.useRef(null),g=(i==null?void 0:i.tags)??[],b="Search runs...",{currentToken:w,tokenType:y,tokenPrefix:S}=j.useMemo(()=>{var K;const $=((K=h.current)==null?void 0:K.selectionStart)??a.length,q=a.slice(0,$),L=q.lastIndexOf(" "),z=q.slice(L+1),U=z.indexOf(":");if(U>0){const Z=z.slice(0,U),H=z.slice(U+1);return{currentToken:z,tokenType:"value",tokenPrefix:{key:Z,valuePrefix:H}}}return{currentToken:z,tokenType:"key",tokenPrefix:null}},[a]),E=y==="value"?S==null?void 0:S.key:void 0,{data:_}=N7(E??"",!!E),A=(_==null?void 0:_.values)??[],T=j.useMemo(()=>{const $=[];if(y==="key"&&w){const q=w.toLowerCase();for(const L of g)L.toLowerCase().startsWith(q)&&$.push({type:"key",label:`${L}:`,value:`${L}:`});"status".startsWith(q)&&$.push({type:"key",label:"status:",value:"status:"});for(const L of L3)L.value!=="all"&&(L.value.toLowerCase().startsWith(q)||L.label.toLowerCase().startsWith(q))&&$.push({type:"status",label:`status:${L.value}`,value:`status:${L.value}`})}else if(y==="value"&&S){const{key:q,valuePrefix:L}=S,z=L.toLowerCase();if(q==="status")for(const U of L3)U.value!=="all"&&U.value.toLowerCase().startsWith(z)&&$.push({type:"status",label:U.label,value:U.value});else for(const U of A)U.value.toLowerCase().startsWith(z)&&$.push({type:"value",label:`${U.value} (${U.count})`,value:U.value})}else if(!w){for(const q of g.slice(0,4))$.push({type:"key",label:`${q}:`,value:`${q}:`});g.includes("status")||$.push({type:"key",label:"status:",value:"status:"})}return $.slice(0,8)},[w,y,S,g,A,a]),O=j.useMemo(()=>cR(a),[a]),P=$=>{o($.target.value),u(!0),d(0)},M=$=>{var V,X;const q=((V=h.current)==null?void 0:V.selectionStart)??a.length,L=a.slice(0,q),z=a.slice(q),K=L.lastIndexOf(" ")+1;let Z,H=t;if($.type==="status")H=$.value.replace("status:",""),Z=L.slice(0,K)+z.trimStart();else if($.type==="key")Z=L.slice(0,K)+$.value+z;else{const Y=(S==null?void 0:S.key)??"";Z=`${L.slice(0,K)}${Y}:${$.value}${z.startsWith(" ")?z:` ${z.trimStart()}`}`}o(Z.trim()),u(!1),n(Z.trim(),H),(X=h.current)==null||X.focus()},R=$=>{if(!l||T.length===0){$.key==="Enter"&&($.preventDefault(),n(a,t));return}switch($.key){case"ArrowDown":$.preventDefault(),d(q=>(q+1)%T.length);break;case"ArrowUp":$.preventDefault(),d(q=>(q-1+T.length)%T.length);break;case"Enter":case"Tab":$.preventDefault(),M(T[f]);break;case"Escape":u(!1);break}},D=$=>{const q={...O};delete q.tags[$];const L=Tfe(q);o(L),n(L,t)},I=()=>{n(a,"all")};j.useEffect(()=>{e!==a&&o(e)},[e]),j.useEffect(()=>{const $=q=>{m.current&&!m.current.contains(q.target)&&u(!1)};return document.addEventListener("mousedown",$),()=>document.removeEventListener("mousedown",$)},[]);const k=Object.keys(O.tags).length>0||t&&t!=="all",F=()=>{u(!1),n(a,t)};return x.jsxs("div",{className:Ce("space-y-2",r),children:[x.jsxs("div",{ref:m,className:"relative",children:[x.jsxs("div",{className:"relative",children:[x.jsx(Np,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),x.jsx("input",{ref:h,type:"text",value:a,onChange:P,onKeyDown:R,onFocus:()=>u(!0),placeholder:b,className:"h-9 w-full border bg-transparent pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:outline-none"})]}),l&&x.jsxs("div",{className:"absolute left-0 right-0 top-full z-50 mt-1 overflow-hidden border bg-popover/95 shadow-lg backdrop-blur-sm",children:[x.jsxs("button",{type:"button",onClick:F,className:Ce("flex w-full items-center justify-between border-b px-3 py-2.5 text-left text-sm transition-colors",f===-1?"bg-accent":"hover:bg-accent/50"),children:[x.jsx("span",{children:"Confirm search"}),x.jsx("span",{className:"text-muted-foreground",children:"↵"})]}),T.length>0&&x.jsx("div",{className:"flex flex-wrap gap-2 p-3",children:T.map(($,q)=>x.jsx("button",{type:"button",onClick:()=>M($),className:Ce(" bg-muted px-3 py-1.5 font-mono text-sm transition-colors",q===f?"bg-primary text-primary-foreground":"text-foreground hover:bg-muted/80"),children:$.label},`${$.type}-${$.value}`))})]})]}),k&&x.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[t&&t!=="all"&&x.jsxs("button",{type:"button",onClick:I,className:"group flex items-center gap-1 bg-primary/10 px-2 py-1 text-xs font-medium text-primary hover:bg-primary/20",children:[x.jsxs("span",{className:"font-mono",children:["status:",t]}),x.jsx(Qy,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]}),Object.entries(O.tags).map(([$,q])=>x.jsxs("button",{type:"button",onClick:()=>D($),className:"group flex items-center gap-1 bg-primary/10 px-2 py-1 text-xs font-medium text-primary hover:bg-primary/20",children:[x.jsxs("span",{className:"font-mono",children:[$,":",q.length>16?`${q.slice(0,16)}...`:q]}),x.jsx(Qy,{className:"h-3 w-3 opacity-60 group-hover:opacity-100"})]},$)),x.jsx("button",{type:"button",onClick:()=>{o(""),n("","all")},className:"text-xs text-muted-foreground hover:text-foreground",children:"Clear all"})]})]})}var $3=1,Ofe=.9,jfe=.8,Nfe=.17,VS=.1,FS=.999,Pfe=.9999,Mfe=.99,Rfe=/[\\\/_+.#"@\[\(\{&]/,kfe=/[\\\/_+.#"@\[\(\{&]/g,Dfe=/[\s-]/,k7=/[\s-]/g;function dN(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?$3:Mfe;var l=`${i},${a}`;if(o[l]!==void 0)return o[l];for(var u=r.charAt(a),f=n.indexOf(u,i),d=0,h,m,g,b;f>=0;)h=dN(e,t,n,r,f+1,a+1,o),h>d&&(f===i?h*=$3:Rfe.test(e.charAt(f-1))?(h*=jfe,g=e.slice(i,f-1).match(kfe),g&&i>0&&(h*=Math.pow(FS,g.length))):Dfe.test(e.charAt(f-1))?(h*=Ofe,b=e.slice(i,f-1).match(k7),b&&i>0&&(h*=Math.pow(FS,b.length))):(h*=Nfe,i>0&&(h*=Math.pow(FS,f-i))),e.charAt(f)!==t.charAt(a)&&(h*=Pfe)),(h<VS&&n.charAt(f-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(f-1)!==r.charAt(a))&&(m=dN(e,t,n,r,f+1,a+2,o),m*VS>h&&(h=m*VS)),h>d&&(d=h),f=n.indexOf(u,f+1);return o[l]=d,d}function B3(e){return e.toLowerCase().replace(k7," ")}function Ife(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,dN(e,t,B3(e),B3(t),0,0,{})}var US="focusScope.autoFocusOnMount",HS="focusScope.autoFocusOnUnmount",q3={bubbles:!1,cancelable:!0},Lfe="FocusScope",fR=j.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,u]=j.useState(null),f=nr(i),d=nr(a),h=j.useRef(null),m=ft(t,w=>u(w)),g=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(r){let w=function(_){if(g.paused||!l)return;const A=_.target;l.contains(A)?h.current=A:is(h.current,{select:!0})},y=function(_){if(g.paused||!l)return;const A=_.relatedTarget;A!==null&&(l.contains(A)||is(h.current,{select:!0}))},S=function(_){if(document.activeElement===document.body)for(const T of _)T.removedNodes.length>0&&is(l)};document.addEventListener("focusin",w),document.addEventListener("focusout",y);const E=new MutationObserver(S);return l&&E.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",y),E.disconnect()}}},[r,l,g.paused]),j.useEffect(()=>{if(l){V3.add(g);const w=document.activeElement;if(!l.contains(w)){const S=new CustomEvent(US,q3);l.addEventListener(US,f),l.dispatchEvent(S),S.defaultPrevented||($fe(Ffe(D7(l)),{select:!0}),document.activeElement===w&&is(l))}return()=>{l.removeEventListener(US,f),setTimeout(()=>{const S=new CustomEvent(HS,q3);l.addEventListener(HS,d),l.dispatchEvent(S),S.defaultPrevented||is(w??document.body,{select:!0}),l.removeEventListener(HS,d),V3.remove(g)},0)}}},[l,f,d,g]);const b=j.useCallback(w=>{if(!n&&!r||g.paused)return;const y=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,S=document.activeElement;if(y&&S){const E=w.currentTarget,[_,A]=Bfe(E);_&&A?!w.shiftKey&&S===A?(w.preventDefault(),n&&is(_,{select:!0})):w.shiftKey&&S===_&&(w.preventDefault(),n&&is(A,{select:!0})):S===E&&w.preventDefault()}},[n,r,g.paused]);return x.jsx(He.div,{tabIndex:-1,...o,ref:m,onKeyDown:b})});fR.displayName=Lfe;function $fe(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(is(r,{select:t}),document.activeElement!==n)return}function Bfe(e){const t=D7(e),n=z3(t,e),r=z3(t.reverse(),e);return[n,r]}function D7(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function z3(e,t){for(const n of e)if(!qfe(n,{upTo:t}))return n}function qfe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zfe(e){return e instanceof HTMLInputElement&&"select"in e}function is(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zfe(e)&&t&&e.select()}}var V3=Vfe();function Vfe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=F3(e,t),e.unshift(t)},remove(t){var n;e=F3(e,t),(n=e[0])==null||n.resume()}}}function F3(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ffe(e){return e.filter(t=>t.tagName!=="A")}var GS=0;function I7(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??U3()),document.body.insertAdjacentElement("beforeend",e[1]??U3()),GS++,()=>{GS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),GS--}},[])}function U3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ia=function(){return ia=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ia.apply(this,arguments)};function L7(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Ufe(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var yy="right-scroll-bar-position",by="width-before-scroll-bar",Hfe="with-scroll-bars-hidden",Gfe="--removed-body-scroll-bar-size";function WS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Wfe(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Kfe=typeof window<"u"?j.useLayoutEffect:j.useEffect,H3=new WeakMap;function Yfe(e,t){var n=Wfe(null,function(r){return e.forEach(function(i){return WS(i,r)})});return Kfe(function(){var r=H3.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(l){a.has(l)||WS(l,null)}),a.forEach(function(l){i.has(l)||WS(l,o)})}H3.set(n,e)},[e]),n}function Xfe(e){return e}function Zfe(e,t){t===void 0&&(t=Xfe);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(a),o=n}var u=function(){var d=o;o=[],d.forEach(a)},f=function(){return Promise.resolve().then(u)};f(),n={push:function(d){o.push(d),f()},filter:function(d){return o=o.filter(d),n}}}};return i}function Qfe(e){e===void 0&&(e={});var t=Zfe(null);return t.options=ia({async:!0,ssr:!1},e),t}var $7=function(e){var t=e.sideCar,n=L7(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return j.createElement(r,ia({},n))};$7.isSideCarExport=!0;function Jfe(e,t){return e.useMedium(t),$7}var B7=Qfe(),KS=function(){},F0=j.forwardRef(function(e,t){var n=j.useRef(null),r=j.useState({onScrollCapture:KS,onWheelCapture:KS,onTouchMoveCapture:KS}),i=r[0],a=r[1],o=e.forwardProps,l=e.children,u=e.className,f=e.removeScrollBar,d=e.enabled,h=e.shards,m=e.sideCar,g=e.noRelative,b=e.noIsolation,w=e.inert,y=e.allowPinchZoom,S=e.as,E=S===void 0?"div":S,_=e.gapMode,A=L7(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),T=m,O=Yfe([n,t]),P=ia(ia({},A),i);return j.createElement(j.Fragment,null,d&&j.createElement(T,{sideCar:B7,removeScrollBar:f,shards:h,noRelative:g,noIsolation:b,inert:w,setCallbacks:a,allowPinchZoom:!!y,lockRef:n,gapMode:_}),o?j.cloneElement(j.Children.only(l),ia(ia({},P),{ref:O})):j.createElement(E,ia({},P,{className:u,ref:O}),l))});F0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};F0.classNames={fullWidth:by,zeroRight:yy};var ede=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function tde(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ede();return t&&e.setAttribute("nonce",t),e}function nde(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rde(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ide=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tde())&&(nde(t,n),rde(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ade=function(){var e=ide();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},q7=function(){var e=ade(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},ode={left:0,top:0,right:0,gap:0},YS=function(e){return parseInt(e||"",10)||0},sde=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[YS(n),YS(r),YS(i)]},lde=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ode;var t=sde(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ude=q7(),Zc="data-scroll-locked",cde=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),`
|
|
316
|
+
.`.concat(Hfe,` {
|
|
317
|
+
overflow: hidden `).concat(r,`;
|
|
318
|
+
padding-right: `).concat(l,"px ").concat(r,`;
|
|
319
|
+
}
|
|
320
|
+
body[`).concat(Zc,`] {
|
|
321
|
+
overflow: hidden `).concat(r,`;
|
|
322
|
+
overscroll-behavior: contain;
|
|
323
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
324
|
+
padding-left: `.concat(i,`px;
|
|
325
|
+
padding-top: `).concat(a,`px;
|
|
326
|
+
padding-right: `).concat(o,`px;
|
|
327
|
+
margin-left:0;
|
|
328
|
+
margin-top:0;
|
|
329
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
330
|
+
`),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.`).concat(yy,` {
|
|
334
|
+
right: `).concat(l,"px ").concat(r,`;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.`).concat(by,` {
|
|
338
|
+
margin-right: `).concat(l,"px ").concat(r,`;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.`).concat(yy," .").concat(yy,` {
|
|
342
|
+
right: 0 `).concat(r,`;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.`).concat(by," .").concat(by,` {
|
|
346
|
+
margin-right: 0 `).concat(r,`;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
body[`).concat(Zc,`] {
|
|
350
|
+
`).concat(Gfe,": ").concat(l,`px;
|
|
351
|
+
}
|
|
352
|
+
`)},G3=function(){var e=parseInt(document.body.getAttribute(Zc)||"0",10);return isFinite(e)?e:0},fde=function(){j.useEffect(function(){return document.body.setAttribute(Zc,(G3()+1).toString()),function(){var e=G3()-1;e<=0?document.body.removeAttribute(Zc):document.body.setAttribute(Zc,e.toString())}},[])},dde=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;fde();var a=j.useMemo(function(){return lde(i)},[i]);return j.createElement(ude,{styles:cde(a,!t,i,n?"":"!important")})},hN=!1;if(typeof window<"u")try{var Dv=Object.defineProperty({},"passive",{get:function(){return hN=!0,!0}});window.addEventListener("test",Dv,Dv),window.removeEventListener("test",Dv,Dv)}catch{hN=!1}var Cc=hN?{passive:!1}:!1,hde=function(e){return e.tagName==="TEXTAREA"},z7=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!hde(e)&&n[t]==="visible")},pde=function(e){return z7(e,"overflowY")},mde=function(e){return z7(e,"overflowX")},W3=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=V7(e,r);if(i){var a=F7(e,r),o=a[1],l=a[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},gde=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},vde=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},V7=function(e,t){return e==="v"?pde(t):mde(t)},F7=function(e,t){return e==="v"?gde(t):vde(t)},yde=function(e,t){return e==="h"&&t==="rtl"?-1:1},bde=function(e,t,n,r,i){var a=yde(e,window.getComputedStyle(t).direction),o=a*r,l=n.target,u=t.contains(l),f=!1,d=o>0,h=0,m=0;do{if(!l)break;var g=F7(e,l),b=g[0],w=g[1],y=g[2],S=w-y-a*b;(b||S)&&V7(e,l)&&(h+=S,m+=b);var E=l.parentNode;l=E&&E.nodeType===Node.DOCUMENT_FRAGMENT_NODE?E.host:E}while(!u&&l!==document.body||u&&(t.contains(l)||t===l));return(d&&Math.abs(h)<1||!d&&Math.abs(m)<1)&&(f=!0),f},Iv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},K3=function(e){return[e.deltaX,e.deltaY]},Y3=function(e){return e&&"current"in e?e.current:e},xde=function(e,t){return e[0]===t[0]&&e[1]===t[1]},wde=function(e){return`
|
|
353
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
354
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
355
|
+
`)},Sde=0,Oc=[];function _de(e){var t=j.useRef([]),n=j.useRef([0,0]),r=j.useRef(),i=j.useState(Sde++)[0],a=j.useState(q7)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var w=Ufe([e.lockRef.current],(e.shards||[]).map(Y3),!0).filter(Boolean);return w.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),w.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=j.useCallback(function(w,y){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!o.current.allowPinchZoom;var S=Iv(w),E=n.current,_="deltaX"in w?w.deltaX:E[0]-S[0],A="deltaY"in w?w.deltaY:E[1]-S[1],T,O=w.target,P=Math.abs(_)>Math.abs(A)?"h":"v";if("touches"in w&&P==="h"&&O.type==="range")return!1;var M=window.getSelection(),R=M&&M.anchorNode,D=R?R===O||R.contains(O):!1;if(D)return!1;var I=W3(P,O);if(!I)return!0;if(I?T=P:(T=P==="v"?"h":"v",I=W3(P,O)),!I)return!1;if(!r.current&&"changedTouches"in w&&(_||A)&&(r.current=T),!T)return!0;var k=r.current||T;return bde(k,y,w,k==="h"?_:A)},[]),u=j.useCallback(function(w){var y=w;if(!(!Oc.length||Oc[Oc.length-1]!==a)){var S="deltaY"in y?K3(y):Iv(y),E=t.current.filter(function(T){return T.name===y.type&&(T.target===y.target||y.target===T.shadowParent)&&xde(T.delta,S)})[0];if(E&&E.should){y.cancelable&&y.preventDefault();return}if(!E){var _=(o.current.shards||[]).map(Y3).filter(Boolean).filter(function(T){return T.contains(y.target)}),A=_.length>0?l(y,_[0]):!o.current.noIsolation;A&&y.cancelable&&y.preventDefault()}}},[]),f=j.useCallback(function(w,y,S,E){var _={name:w,delta:y,target:S,should:E,shadowParent:Ede(S)};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(A){return A!==_})},1)},[]),d=j.useCallback(function(w){n.current=Iv(w),r.current=void 0},[]),h=j.useCallback(function(w){f(w.type,K3(w),w.target,l(w,e.lockRef.current))},[]),m=j.useCallback(function(w){f(w.type,Iv(w),w.target,l(w,e.lockRef.current))},[]);j.useEffect(function(){return Oc.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:m}),document.addEventListener("wheel",u,Cc),document.addEventListener("touchmove",u,Cc),document.addEventListener("touchstart",d,Cc),function(){Oc=Oc.filter(function(w){return w!==a}),document.removeEventListener("wheel",u,Cc),document.removeEventListener("touchmove",u,Cc),document.removeEventListener("touchstart",d,Cc)}},[]);var g=e.removeScrollBar,b=e.inert;return j.createElement(j.Fragment,null,b?j.createElement(a,{styles:wde(i)}):null,g?j.createElement(dde,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ede(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Ade=Jfe(B7,_de);var dR=j.forwardRef(function(e,t){return j.createElement(F0,ia({},e,{ref:t,sideCar:Ade}))});dR.classNames=F0.classNames;var Tde=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jc=new WeakMap,Lv=new WeakMap,$v={},XS=0,U7=function(e){return e&&(e.host||U7(e.parentNode))},Cde=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=U7(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ode=function(e,t,n,r){var i=Cde(t,Array.isArray(e)?e:[e]);$v[n]||($v[n]=new WeakMap);var a=$v[n],o=[],l=new Set,u=new Set(i),f=function(h){!h||l.has(h)||(l.add(h),f(h.parentNode))};i.forEach(f);var d=function(h){!h||u.has(h)||Array.prototype.forEach.call(h.children,function(m){if(l.has(m))d(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",w=(jc.get(m)||0)+1,y=(a.get(m)||0)+1;jc.set(m,w),a.set(m,y),o.push(m),w===1&&b&&Lv.set(m,!0),y===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(S){console.error("aria-hidden: cannot operate on ",m,S)}})};return d(t),l.clear(),XS++,function(){o.forEach(function(h){var m=jc.get(h)-1,g=a.get(h)-1;jc.set(h,m),a.set(h,g),m||(Lv.has(h)||h.removeAttribute(r),Lv.delete(h)),g||h.removeAttribute(n)}),XS--,XS||(jc=new WeakMap,jc=new WeakMap,Lv=new WeakMap,$v={})}},H7=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Tde(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),Ode(r,i,n,"aria-hidden")):function(){return null}},U0="Dialog",[G7]=va(U0),[jde,Vi]=G7(U0),W7=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=j.useRef(null),u=j.useRef(null),[f,d]=Us({prop:r,defaultProp:i??!1,onChange:a,caller:U0});return x.jsx(jde,{scope:t,triggerRef:l,contentRef:u,contentId:or(),titleId:or(),descriptionId:or(),open:f,onOpenChange:d,onOpenToggle:j.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};W7.displayName=U0;var K7="DialogTrigger",Nde=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(K7,n),a=ft(t,i.triggerRef);return x.jsx(He.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":mR(i.open),...r,ref:a,onClick:ke(e.onClick,i.onOpenToggle)})});Nde.displayName=K7;var hR="DialogPortal",[Pde,Y7]=G7(hR,{forceMount:void 0}),X7=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Vi(hR,t);return x.jsx(Pde,{scope:t,forceMount:n,children:j.Children.map(r,o=>x.jsx(Er,{present:n||a.open,children:x.jsx(Mm,{asChild:!0,container:i,children:o})}))})};X7.displayName=hR;var rb="DialogOverlay",Z7=j.forwardRef((e,t)=>{const n=Y7(rb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Vi(rb,e.__scopeDialog);return a.modal?x.jsx(Er,{present:r||a.open,children:x.jsx(Rde,{...i,ref:t})}):null});Z7.displayName=rb;var Mde=_p("DialogOverlay.RemoveScroll"),Rde=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(rb,n);return x.jsx(dR,{as:Mde,allowPinchZoom:!0,shards:[i.contentRef],children:x.jsx(He.div,{"data-state":mR(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),mu="DialogContent",Q7=j.forwardRef((e,t)=>{const n=Y7(mu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Vi(mu,e.__scopeDialog);return x.jsx(Er,{present:r||a.open,children:a.modal?x.jsx(kde,{...i,ref:t}):x.jsx(Dde,{...i,ref:t})})});Q7.displayName=mu;var kde=j.forwardRef((e,t)=>{const n=Vi(mu,e.__scopeDialog),r=j.useRef(null),i=ft(t,n.contentRef,r);return j.useEffect(()=>{const a=r.current;if(a)return H7(a)},[]),x.jsx(J7,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ke(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:ke(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:ke(e.onFocusOutside,a=>a.preventDefault())})}),Dde=j.forwardRef((e,t)=>{const n=Vi(mu,e.__scopeDialog),r=j.useRef(!1),i=j.useRef(!1);return x.jsx(J7,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var u,f;(u=e.onInteractOutside)==null||u.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((f=n.triggerRef.current)==null?void 0:f.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),J7=j.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=Vi(mu,n),u=j.useRef(null),f=ft(t,u);return I7(),x.jsxs(x.Fragment,{children:[x.jsx(fR,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:x.jsx(Nm,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":mR(l.open),...o,ref:f,onDismiss:()=>l.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(Ide,{titleId:l.titleId}),x.jsx($de,{contentRef:u,descriptionId:l.descriptionId})]})]})}),pR="DialogTitle",eW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(pR,n);return x.jsx(He.h2,{id:i.titleId,...r,ref:t})});eW.displayName=pR;var tW="DialogDescription",nW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(tW,n);return x.jsx(He.p,{id:i.descriptionId,...r,ref:t})});nW.displayName=tW;var rW="DialogClose",iW=j.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vi(rW,n);return x.jsx(He.button,{type:"button",...r,ref:t,onClick:ke(e.onClick,()=>i.onOpenChange(!1))})});iW.displayName=rW;function mR(e){return e?"open":"closed"}var aW="DialogTitleWarning",[Yqe,oW]=tse(aW,{contentName:mu,titleName:pR,docsSlug:"dialog"}),Ide=({titleId:e})=>{const t=oW(aW),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
356
|
+
|
|
357
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
358
|
+
|
|
359
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Lde="DialogDescriptionWarning",$de=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${oW(Lde).contentName}}.`;return j.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},sW=W7,lW=X7,gR=Z7,vR=Q7,uW=eW,cW=nW,Bde=iW,qde=Symbol.for("react.lazy"),ib=EM[" use ".trim().toString()];function zde(e){return typeof e=="object"&&e!==null&&"then"in e}function fW(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===qde&&"_payload"in e&&zde(e._payload)}function dW(e){const t=Fde(e),n=j.forwardRef((r,i)=>{let{children:a,...o}=r;fW(a)&&typeof ib=="function"&&(a=ib(a._payload));const l=j.Children.toArray(a),u=l.find(Hde);if(u){const f=u.props.children,d=l.map(h=>h===u?j.Children.count(f)>1?j.Children.only(null):j.isValidElement(f)?f.props.children:null:h);return x.jsx(t,{...o,ref:i,children:j.isValidElement(f)?j.cloneElement(f,void 0,d):null})}return x.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var Vde=dW("Slot");function Fde(e){const t=j.forwardRef((n,r)=>{let{children:i,...a}=n;if(fW(i)&&typeof ib=="function"&&(i=ib(i._payload)),j.isValidElement(i)){const o=Wde(i),l=Gde(a,i.props);return i.type!==j.Fragment&&(l.ref=r?zs(r,o):o),j.cloneElement(i,l)}return j.Children.count(i)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ude=Symbol("radix.slottable");function Hde(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ude}function Gde(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...l)=>{const u=a(...l);return i(...l),u}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function Wde(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Kde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Qs=Kde.reduce((e,t)=>{const n=dW(`Primitive.${t}`),r=j.forwardRef((i,a)=>{const{asChild:o,...l}=i,u=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(u,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Ih='[cmdk-group=""]',ZS='[cmdk-group-items=""]',Yde='[cmdk-group-heading=""]',hW='[cmdk-item=""]',X3=`${hW}:not([aria-disabled="true"])`,pN="cmdk-item-select",Lc="data-value",Xde=(e,t,n)=>Ife(e,t,n),pW=j.createContext(void 0),$m=()=>j.useContext(pW),mW=j.createContext(void 0),yR=()=>j.useContext(mW),gW=j.createContext(void 0),vW=j.forwardRef((e,t)=>{let n=$c(()=>{var V,X;return{search:"",value:(X=(V=e.value)!=null?V:e.defaultValue)!=null?X:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=$c(()=>new Set),i=$c(()=>new Map),a=$c(()=>new Map),o=$c(()=>new Set),l=yW(e),{label:u,children:f,value:d,onValueChange:h,filter:m,shouldFilter:g,loop:b,disablePointerSelection:w=!1,vimBindings:y=!0,...S}=e,E=or(),_=or(),A=or(),T=j.useRef(null),O=she();gu(()=>{if(d!==void 0){let V=d.trim();n.current.value=V,P.emit()}},[d]),gu(()=>{O(6,F)},[]);let P=j.useMemo(()=>({subscribe:V=>(o.current.add(V),()=>o.current.delete(V)),snapshot:()=>n.current,setState:(V,X,Y)=>{var G,Q,J,re;if(!Object.is(n.current[V],X)){if(n.current[V]=X,V==="search")k(),D(),O(1,I);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(A);ne?ne.focus():(G=document.getElementById(E))==null||G.focus()}if(O(7,()=>{var ne;n.current.selectedItemId=(ne=$())==null?void 0:ne.id,P.emit()}),Y||O(5,F),((Q=l.current)==null?void 0:Q.value)!==void 0){let ne=X??"";(re=(J=l.current).onValueChange)==null||re.call(J,ne);return}}P.emit()}},emit:()=>{o.current.forEach(V=>V())}}),[]),M=j.useMemo(()=>({value:(V,X,Y)=>{var G;X!==((G=a.current.get(V))==null?void 0:G.value)&&(a.current.set(V,{value:X,keywords:Y}),n.current.filtered.items.set(V,R(X,Y)),O(2,()=>{D(),P.emit()}))},item:(V,X)=>(r.current.add(V),X&&(i.current.has(X)?i.current.get(X).add(V):i.current.set(X,new Set([V]))),O(3,()=>{k(),D(),n.current.value||I(),P.emit()}),()=>{a.current.delete(V),r.current.delete(V),n.current.filtered.items.delete(V);let Y=$();O(4,()=>{k(),(Y==null?void 0:Y.getAttribute("id"))===V&&I(),P.emit()})}),group:V=>(i.current.has(V)||i.current.set(V,new Set),()=>{a.current.delete(V),i.current.delete(V)}),filter:()=>l.current.shouldFilter,label:u||e["aria-label"],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:E,inputId:A,labelId:_,listInnerRef:T}),[]);function R(V,X){var Y,G;let Q=(G=(Y=l.current)==null?void 0:Y.filter)!=null?G:Xde;return V?Q(V,n.current.search,X):0}function D(){if(!n.current.search||l.current.shouldFilter===!1)return;let V=n.current.filtered.items,X=[];n.current.filtered.groups.forEach(G=>{let Q=i.current.get(G),J=0;Q.forEach(re=>{let ne=V.get(re);J=Math.max(ne,J)}),X.push([G,J])});let Y=T.current;q().sort((G,Q)=>{var J,re;let ne=G.getAttribute("id"),fe=Q.getAttribute("id");return((J=V.get(fe))!=null?J:0)-((re=V.get(ne))!=null?re:0)}).forEach(G=>{let Q=G.closest(ZS);Q?Q.appendChild(G.parentElement===Q?G:G.closest(`${ZS} > *`)):Y.appendChild(G.parentElement===Y?G:G.closest(`${ZS} > *`))}),X.sort((G,Q)=>Q[1]-G[1]).forEach(G=>{var Q;let J=(Q=T.current)==null?void 0:Q.querySelector(`${Ih}[${Lc}="${encodeURIComponent(G[0])}"]`);J==null||J.parentElement.appendChild(J)})}function I(){let V=q().find(Y=>Y.getAttribute("aria-disabled")!=="true"),X=V==null?void 0:V.getAttribute(Lc);P.setState("value",X||void 0)}function k(){var V,X,Y,G;if(!n.current.search||l.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Q=0;for(let J of r.current){let re=(X=(V=a.current.get(J))==null?void 0:V.value)!=null?X:"",ne=(G=(Y=a.current.get(J))==null?void 0:Y.keywords)!=null?G:[],fe=R(re,ne);n.current.filtered.items.set(J,fe),fe>0&&Q++}for(let[J,re]of i.current)for(let ne of re)if(n.current.filtered.items.get(ne)>0){n.current.filtered.groups.add(J);break}n.current.filtered.count=Q}function F(){var V,X,Y;let G=$();G&&(((V=G.parentElement)==null?void 0:V.firstChild)===G&&((Y=(X=G.closest(Ih))==null?void 0:X.querySelector(Yde))==null||Y.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function $(){var V;return(V=T.current)==null?void 0:V.querySelector(`${hW}[aria-selected="true"]`)}function q(){var V;return Array.from(((V=T.current)==null?void 0:V.querySelectorAll(X3))||[])}function L(V){let X=q()[V];X&&P.setState("value",X.getAttribute(Lc))}function z(V){var X;let Y=$(),G=q(),Q=G.findIndex(re=>re===Y),J=G[Q+V];(X=l.current)!=null&&X.loop&&(J=Q+V<0?G[G.length-1]:Q+V===G.length?G[0]:G[Q+V]),J&&P.setState("value",J.getAttribute(Lc))}function U(V){let X=$(),Y=X==null?void 0:X.closest(Ih),G;for(;Y&&!G;)Y=V>0?ahe(Y,Ih):ohe(Y,Ih),G=Y==null?void 0:Y.querySelector(X3);G?P.setState("value",G.getAttribute(Lc)):z(V)}let K=()=>L(q().length-1),Z=V=>{V.preventDefault(),V.metaKey?K():V.altKey?U(1):z(1)},H=V=>{V.preventDefault(),V.metaKey?L(0):V.altKey?U(-1):z(-1)};return j.createElement(Qs.div,{ref:t,tabIndex:-1,...S,"cmdk-root":"",onKeyDown:V=>{var X;(X=S.onKeyDown)==null||X.call(S,V);let Y=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||Y))switch(V.key){case"n":case"j":{y&&V.ctrlKey&&Z(V);break}case"ArrowDown":{Z(V);break}case"p":case"k":{y&&V.ctrlKey&&H(V);break}case"ArrowUp":{H(V);break}case"Home":{V.preventDefault(),L(0);break}case"End":{V.preventDefault(),K();break}case"Enter":{V.preventDefault();let G=$();if(G){let Q=new Event(pN);G.dispatchEvent(Q)}}}}},j.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:uhe},u),H0(e,V=>j.createElement(mW.Provider,{value:P},j.createElement(pW.Provider,{value:M},V))))}),Zde=j.forwardRef((e,t)=>{var n,r;let i=or(),a=j.useRef(null),o=j.useContext(gW),l=$m(),u=yW(e),f=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;gu(()=>{if(!f)return l.item(i,o==null?void 0:o.id)},[f]);let d=bW(i,a,[e.value,e.children,a],e.keywords),h=yR(),m=Ws(O=>O.value&&O.value===d.current),g=Ws(O=>f||l.filter()===!1?!0:O.search?O.filtered.items.get(i)>0:!0);j.useEffect(()=>{let O=a.current;if(!(!O||e.disabled))return O.addEventListener(pN,b),()=>O.removeEventListener(pN,b)},[g,e.onSelect,e.disabled]);function b(){var O,P;w(),(P=(O=u.current).onSelect)==null||P.call(O,d.current)}function w(){h.setState("value",d.current,!0)}if(!g)return null;let{disabled:y,value:S,onSelect:E,forceMount:_,keywords:A,...T}=e;return j.createElement(Qs.div,{ref:zs(a,t),...T,id:i,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!m,"data-disabled":!!y,"data-selected":!!m,onPointerMove:y||l.getDisablePointerSelection()?void 0:w,onClick:y?void 0:b},e.children)}),Qde=j.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=or(),l=j.useRef(null),u=j.useRef(null),f=or(),d=$m(),h=Ws(g=>i||d.filter()===!1?!0:g.search?g.filtered.groups.has(o):!0);gu(()=>d.group(o),[]),bW(o,l,[e.value,e.heading,u]);let m=j.useMemo(()=>({id:o,forceMount:i}),[i]);return j.createElement(Qs.div,{ref:zs(l,t),...a,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&j.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),H0(e,g=>j.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},j.createElement(gW.Provider,{value:m},g))))}),Jde=j.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=j.useRef(null),a=Ws(o=>!o.search);return!n&&!a?null:j.createElement(Qs.div,{ref:zs(i,t),...r,"cmdk-separator":"",role:"separator"})}),ehe=j.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=yR(),o=Ws(f=>f.search),l=Ws(f=>f.selectedItemId),u=$m();return j.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),j.createElement(Qs.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:i?e.value:o,onChange:f=>{i||a.setState("search",f.target.value),n==null||n(f.target.value)}})}),the=j.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,a=j.useRef(null),o=j.useRef(null),l=Ws(f=>f.selectedItemId),u=$m();return j.useEffect(()=>{if(o.current&&a.current){let f=o.current,d=a.current,h,m=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let g=f.offsetHeight;d.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return m.observe(f),()=>{cancelAnimationFrame(h),m.unobserve(f)}}},[]),j.createElement(Qs.div,{ref:zs(a,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":l,"aria-label":r,id:u.listId},H0(e,f=>j.createElement("div",{ref:zs(o,u.listInnerRef),"cmdk-list-sizer":""},f)))}),nhe=j.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...l}=e;return j.createElement(sW,{open:n,onOpenChange:r},j.createElement(lW,{container:o},j.createElement(gR,{"cmdk-overlay":"",className:i}),j.createElement(vR,{"aria-label":e.label,"cmdk-dialog":"",className:a},j.createElement(vW,{ref:t,...l}))))}),rhe=j.forwardRef((e,t)=>Ws(n=>n.filtered.count===0)?j.createElement(Qs.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),ihe=j.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...a}=e;return j.createElement(Qs.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},H0(e,o=>j.createElement("div",{"aria-hidden":!0},o)))}),Ar=Object.assign(vW,{List:the,Item:Zde,Input:ehe,Group:Qde,Separator:Jde,Dialog:nhe,Empty:rhe,Loading:ihe});function ahe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ohe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function yW(e){let t=j.useRef(e);return gu(()=>{t.current=e}),t}var gu=typeof window>"u"?j.useEffect:j.useLayoutEffect;function $c(e){let t=j.useRef();return t.current===void 0&&(t.current=e()),t}function Ws(e){let t=yR(),n=()=>e(t.snapshot());return j.useSyncExternalStore(t.subscribe,n,n)}function bW(e,t,n,r=[]){let i=j.useRef(),a=$m();return gu(()=>{var o;let l=(()=>{var f;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(f=d.current.textContent)==null?void 0:f.trim():i.current}})(),u=r.map(f=>f.trim());a.value(e,l,u),(o=t.current)==null||o.setAttribute(Lc,l),i.current=l}),i}var she=()=>{let[e,t]=j.useState(),n=$c(()=>new Map);return gu(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function lhe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function H0({asChild:e,children:t},n){return e&&j.isValidElement(t)?j.cloneElement(lhe(t),{ref:t.ref},n(t.props.children)):n(t)}var uhe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const che=sW,fhe=lW,xW=j.forwardRef(({className:e,...t},n)=>x.jsx(gR,{ref:n,className:Ce("fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));xW.displayName=gR.displayName;const wW=j.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(fhe,{children:[x.jsx(xW,{}),x.jsxs(vR,{ref:r,className:Ce("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...n,children:[t,x.jsxs(Bde,{className:"absolute right-4 top-4 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[x.jsx(Qy,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));wW.displayName=vR.displayName;const dhe=j.forwardRef(({className:e,...t},n)=>x.jsx(uW,{ref:n,className:Ce("text-lg font-semibold leading-none tracking-tight",e),...t}));dhe.displayName=uW.displayName;const hhe=j.forwardRef(({className:e,...t},n)=>x.jsx(cW,{ref:n,className:Ce("text-sm text-muted-foreground",e),...t}));hhe.displayName=cW.displayName;const SW=j.forwardRef(({className:e,...t},n)=>x.jsx(Ar,{ref:n,className:Ce("flex h-full w-full flex-col overflow-hidden bg-popover dark:bg-[hsl(0,0%,3%)] text-popover-foreground",e),...t}));SW.displayName=Ar.displayName;const phe=({children:e,...t})=>x.jsx(che,{...t,children:x.jsx(wW,{className:"overflow-hidden p-0 rounded-none bg-popover dark:bg-[hsl(0,0%,3%)] border border-border/50 shadow-2xl backdrop-blur-sm",children:x.jsx(SW,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),_W=j.forwardRef(({className:e,...t},n)=>x.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[x.jsx(Np,{className:"mr-2 h-4 w-4 shrink-0 text-foreground/60"}),x.jsx(Ar.Input,{ref:n,className:Ce("flex h-10 w-full bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));_W.displayName=Ar.Input.displayName;const EW=j.forwardRef(({className:e,...t},n)=>x.jsx(Ar.List,{ref:n,className:Ce("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));EW.displayName=Ar.List.displayName;const AW=j.forwardRef((e,t)=>x.jsx(Ar.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));AW.displayName=Ar.Empty.displayName;const Rl=j.forwardRef(({className:e,...t},n)=>x.jsx(Ar.Group,{ref:n,className:Ce("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Rl.displayName=Ar.Group.displayName;const TW=j.forwardRef(({className:e,...t},n)=>x.jsx(Ar.Separator,{ref:n,className:Ce("-mx-1 h-px bg-border",e),...t}));TW.displayName=Ar.Separator.displayName;const as=j.forwardRef(({className:e,...t},n)=>x.jsx(Ar.Item,{ref:n,className:Ce("relative flex cursor-default gap-2 select-none items-center px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));as.displayName=Ar.Item.displayName;const Z3=[{id:"runs",label:"Runs",path:"/",icon:x.jsx(pu,{className:"h-4 w-4"}),keywords:["runs","jobs","all"]},{id:"metrics",label:"Metrics",path:"/metrics",icon:x.jsx(n7,{className:"h-4 w-4"}),keywords:["metrics","stats","analytics","dashboard"]},{id:"schedulers",label:"Schedulers",path:"/schedulers",icon:x.jsx(yce,{className:"h-4 w-4"}),keywords:["schedulers","scheduled","cron","repeatable","delayed"]},{id:"flows",label:"Flows",path:"/flows",icon:x.jsx(hd,{className:"h-4 w-4"}),keywords:["flows","workflows","graph"]},{id:"test",label:"Test",path:"/test",icon:x.jsx(eR,{className:"h-4 w-4"}),keywords:["test","testing","try"]}];function mhe({open:e,onOpenChange:t,queues:n,searchQuery:r,onSearchQueryChange:i,isDark:a,onToggleTheme:o,onSelectQueue:l,onSelectJob:u,onNavigate:f}){const{data:d}=Lm(),[h,m]=j.useState(r),g=(d==null?void 0:d.tags)??[];j.useEffect(()=>{e&&m(r)},[e,r]);const b=k=>{m(k),i(k)};j.useMemo(()=>cR(h),[h]);const{currentToken:w,tokenType:y,tokenPrefix:S}=j.useMemo(()=>{const k=h.length,F=h.slice(0,k),$=F.lastIndexOf(" "),q=F.slice($+1),L=q.indexOf(":");if(L>0){const z=q.slice(0,L),U=q.slice(L+1);return{currentToken:q,tokenType:"value",tokenPrefix:{key:z,valuePrefix:U}}}return{currentToken:q,tokenType:"key",tokenPrefix:null}},[h]),E=y==="value"?S==null?void 0:S.key:void 0,{data:_}=N7(E??"",!!E&&g.includes(E??"")),A=(_==null?void 0:_.values)??[],{data:T,isLoading:O}=pfe(h),P=(T==null?void 0:T.results)??[],M=j.useMemo(()=>{if(!h.trim())return Z3;const k=h.toLowerCase();return Z3.filter(F=>F.label.toLowerCase().includes(k)||F.keywords.some($=>$.toLowerCase().includes(k)))},[h]),R=j.useMemo(()=>{if(!h.trim())return n;const k=h.toLowerCase();return n.filter(F=>F.toLowerCase().includes(k))},[h,n]),D=j.useMemo(()=>y!=="key"||!w?[]:g.filter(k=>k.toLowerCase().startsWith(w.toLowerCase())),[y,w,g]),I=j.useMemo(()=>{if(y!=="value"||!S)return[];const k=S.valuePrefix.toLowerCase();return A.filter(F=>F.value.toLowerCase().startsWith(k)).slice(0,10)},[y,S,A]);return M.length>0||R.length>0||P.length>0||D.length>0||I.length>0,x.jsxs(phe,{open:e,onOpenChange:t,children:[x.jsx(_W,{placeholder:"Search jobs, queues, tags, or navigate...",value:h,onValueChange:b}),x.jsxs(EW,{children:[x.jsx(AW,{children:O?"Searching...":"No results found."}),D.length>0&&x.jsx(Rl,{heading:"Tag Fields",children:D.map(k=>x.jsxs(as,{value:`tag-key-${k}`,onSelect:()=>{const F=h.replace(w,`${k}:`);b(F)},children:[x.jsx(Np,{className:"mr-2 h-4 w-4"}),x.jsxs("span",{className:"font-mono",children:[k,":"]}),x.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:"tag field"})]},k))}),I.length>0&&x.jsx(Rl,{heading:`${S==null?void 0:S.key} values`,children:I.map(k=>{const F=`${S==null?void 0:S.key}:${k.value}`;return x.jsxs(as,{value:`tag-value-${k.value}`,onSelect:()=>{const q=`${h.slice(0,h.lastIndexOf(w))}${F} `.trim();b(q)},children:[x.jsx(Np,{className:"mr-2 h-4 w-4"}),x.jsx("span",{className:"font-mono",children:F}),k.count>0&&x.jsxs("span",{className:"ml-2 text-xs text-muted-foreground",children:[k.count," jobs"]})]},k.value)})}),M.length>0&&x.jsx(Rl,{heading:"Navigation",children:M.map(k=>x.jsxs(as,{value:`nav-${k.id}`,onSelect:()=>{f(k.path),t(!1)},children:[k.icon,x.jsx("span",{children:k.label}),x.jsx(gce,{className:"ml-auto h-4 w-4 text-muted-foreground"})]},k.id))}),R.length>0&&x.jsx(Rl,{heading:"Queues",children:R.map(k=>x.jsxs(as,{value:`queue-${k}`,onSelect:()=>{l(k),t(!1)},children:[x.jsx(tR,{className:"mr-2 h-4 w-4"}),x.jsx("span",{className:"font-mono",children:k})]},k))}),P.length>0&&x.jsx(Rl,{heading:`Jobs (${P.length})`,children:P.map(k=>x.jsxs(as,{value:`job-${k.job.id}`,onSelect:()=>{u(k.queue,k.job.id),t(!1)},children:[x.jsx(pu,{className:"mr-2 h-4 w-4"}),x.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"font-medium",children:k.job.name}),x.jsx("span",{className:"text-xs text-muted-foreground",children:YG(k.job.timestamp)})]}),x.jsxs("span",{className:"truncate font-mono text-xs text-muted-foreground",children:[Hy(k.job.id,30)," · ",k.queue]})]}),x.jsx(ghe,{status:k.job.status})]},`${k.queue}-${k.job.id}`))}),!h.trim()&&x.jsxs(x.Fragment,{children:[x.jsx(TW,{}),x.jsxs(Rl,{heading:"Actions",children:[x.jsxs(as,{value:"refresh",onSelect:()=>{window.location.reload()},children:[x.jsx(I0,{className:"mr-2 h-4 w-4"}),x.jsx("span",{children:"Refresh"}),x.jsxs("kbd",{className:"ml-auto pointer-events-none flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[x.jsx("span",{className:"text-xs",children:"⌘"}),"R"]})]}),x.jsxs(as,{value:"theme",onSelect:()=>{o()},children:[a?x.jsx(o7,{className:"mr-2 h-4 w-4"}):x.jsx(i7,{className:"mr-2 h-4 w-4"}),x.jsx("span",{children:"Toggle Theme"}),x.jsxs("kbd",{className:"ml-auto pointer-events-none flex h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100",children:[x.jsx("span",{className:"text-xs",children:"⌘"}),"⇧T"]})]})]})]})]})]})}function ghe({status:e}){const t={completed:"bg-success",active:"bg-warning",waiting:"bg-muted-foreground",delayed:"bg-muted-foreground",failed:"bg-destructive"};return x.jsx("span",{className:`h-2 w-2 rounded-full ${t[e]||"bg-muted-foreground"}`})}const CW=j.forwardRef(({className:e,type:t,...n},r)=>x.jsx("input",{type:t,className:Ce("flex h-9 w-full border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));CW.displayName="Input";function vhe({value:e,onValueChange:t,onFocus:n,placeholder:r="Search anything...",className:i}){const a=j.useRef(null),o=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n==null||n())};return x.jsxs("div",{className:Ce("relative flex items-center",i),children:[x.jsx(Np,{className:"absolute left-2 h-4 w-4 text-foreground/60 pointer-events-none"}),x.jsx(CW,{ref:a,type:"text",value:e,onChange:l=>t(l.target.value),onFocus:n,onKeyDown:o,placeholder:r,className:"h-8 w-64 pl-8 pr-20 text-[10px] bg-transparent border-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 rounded-none !text-foreground placeholder:text-foreground/30"}),x.jsxs("kbd",{className:"absolute right-2 hidden h-5 items-center gap-1 rounded-none border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground opacity-100 sm:flex pointer-events-none",children:[x.jsx("span",{className:"text-xs",children:"⌘"}),"K"]})]})}function yn(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=yn(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var yhe={value:()=>{}};function G0(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new xy(n)}function xy(e){this._=e}function bhe(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}xy.prototype=G0.prototype={constructor:xy,on:function(e,t){var n=this._,r=bhe(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=xhe(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Q3(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Q3(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new xy(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function xhe(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Q3(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=yhe,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var mN="http://www.w3.org/1999/xhtml";const J3={svg:"http://www.w3.org/2000/svg",xhtml:mN,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function W0(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),J3.hasOwnProperty(t)?{space:J3[t],local:e}:e}function whe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===mN&&t.documentElement.namespaceURI===mN?t.createElement(e):t.createElementNS(n,e)}}function She(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function OW(e){var t=W0(e);return(t.local?She:whe)(t)}function _he(){}function bR(e){return e==null?_he:function(){return this.querySelector(e)}}function Ehe(e){typeof e!="function"&&(e=bR(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=new Array(o),u,f,d=0;d<o;++d)(u=a[d])&&(f=e.call(u,u.__data__,d,a))&&("__data__"in u&&(f.__data__=u.__data__),l[d]=f);return new Vr(r,this._parents)}function Ahe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function The(){return[]}function jW(e){return e==null?The:function(){return this.querySelectorAll(e)}}function Che(e){return function(){return Ahe(e.apply(this,arguments))}}function Ohe(e){typeof e=="function"?e=Che(e):e=jW(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],l=o.length,u,f=0;f<l;++f)(u=o[f])&&(r.push(e.call(u,u.__data__,f,o)),i.push(u));return new Vr(r,i)}function NW(e){return function(){return this.matches(e)}}function PW(e){return function(t){return t.matches(e)}}var jhe=Array.prototype.find;function Nhe(e){return function(){return jhe.call(this.children,e)}}function Phe(){return this.firstElementChild}function Mhe(e){return this.select(e==null?Phe:Nhe(typeof e=="function"?e:PW(e)))}var Rhe=Array.prototype.filter;function khe(){return Array.from(this.children)}function Dhe(e){return function(){return Rhe.call(this.children,e)}}function Ihe(e){return this.selectAll(e==null?khe:Dhe(typeof e=="function"?e:PW(e)))}function Lhe(e){typeof e!="function"&&(e=NW(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],u,f=0;f<o;++f)(u=a[f])&&e.call(u,u.__data__,f,a)&&l.push(u);return new Vr(r,this._parents)}function MW(e){return new Array(e.length)}function $he(){return new Vr(this._enter||this._groups.map(MW),this._parents)}function ab(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ab.prototype={constructor:ab,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 Bhe(e){return function(){return e}}function qhe(e,t,n,r,i,a){for(var o=0,l,u=t.length,f=a.length;o<f;++o)(l=t[o])?(l.__data__=a[o],r[o]=l):n[o]=new ab(e,a[o]);for(;o<u;++o)(l=t[o])&&(i[o]=l)}function zhe(e,t,n,r,i,a,o){var l,u,f=new Map,d=t.length,h=a.length,m=new Array(d),g;for(l=0;l<d;++l)(u=t[l])&&(m[l]=g=o.call(u,u.__data__,l,t)+"",f.has(g)?i[l]=u:f.set(g,u));for(l=0;l<h;++l)g=o.call(e,a[l],l,a)+"",(u=f.get(g))?(r[l]=u,u.__data__=a[l],f.delete(g)):n[l]=new ab(e,a[l]);for(l=0;l<d;++l)(u=t[l])&&f.get(m[l])===u&&(i[l]=u)}function Vhe(e){return e.__data__}function Fhe(e,t){if(!arguments.length)return Array.from(this,Vhe);var n=t?zhe:qhe,r=this._parents,i=this._groups;typeof e!="function"&&(e=Bhe(e));for(var a=i.length,o=new Array(a),l=new Array(a),u=new Array(a),f=0;f<a;++f){var d=r[f],h=i[f],m=h.length,g=Uhe(e.call(d,d&&d.__data__,f,r)),b=g.length,w=l[f]=new Array(b),y=o[f]=new Array(b),S=u[f]=new Array(m);n(d,h,w,y,S,g,t);for(var E=0,_=0,A,T;E<b;++E)if(A=w[E]){for(E>=_&&(_=E+1);!(T=y[_])&&++_<b;);A._next=T||null}}return o=new Vr(o,r),o._enter=l,o._exit=u,o}function Uhe(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Hhe(){return new Vr(this._exit||this._groups.map(MW),this._parents)}function Ghe(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function Whe(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),l=new Array(i),u=0;u<o;++u)for(var f=n[u],d=r[u],h=f.length,m=l[u]=new Array(h),g,b=0;b<h;++b)(g=f[b]||d[b])&&(m[b]=g);for(;u<i;++u)l[u]=n[u];return new Vr(l,this._parents)}function Khe(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Yhe(e){e||(e=Xhe);function t(h,m){return h&&m?e(h.__data__,m.__data__):!h-!m}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],l=o.length,u=i[a]=new Array(l),f,d=0;d<l;++d)(f=o[d])&&(u[d]=f);u.sort(t)}return new Vr(i,this._parents).order()}function Xhe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Zhe(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Qhe(){return Array.from(this)}function Jhe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function epe(){let e=0;for(const t of this)++e;return e}function tpe(){return!this.node()}function npe(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,l;a<o;++a)(l=i[a])&&e.call(l,l.__data__,a,i);return this}function rpe(e){return function(){this.removeAttribute(e)}}function ipe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ape(e,t){return function(){this.setAttribute(e,t)}}function ope(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function spe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function lpe(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function upe(e,t){var n=W0(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?ipe:rpe:typeof t=="function"?n.local?lpe:spe:n.local?ope:ape)(n,t))}function RW(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function cpe(e){return function(){this.style.removeProperty(e)}}function fpe(e,t,n){return function(){this.style.setProperty(e,t,n)}}function dpe(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function hpe(e,t,n){return arguments.length>1?this.each((t==null?cpe:typeof t=="function"?dpe:fpe)(e,t,n??"")):Cf(this.node(),e)}function Cf(e,t){return e.style.getPropertyValue(t)||RW(e).getComputedStyle(e,null).getPropertyValue(t)}function ppe(e){return function(){delete this[e]}}function mpe(e,t){return function(){this[e]=t}}function gpe(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function vpe(e,t){return arguments.length>1?this.each((t==null?ppe:typeof t=="function"?gpe:mpe)(e,t)):this.node()[e]}function kW(e){return e.trim().split(/^|\s+/)}function xR(e){return e.classList||new DW(e)}function DW(e){this._node=e,this._names=kW(e.getAttribute("class")||"")}DW.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 IW(e,t){for(var n=xR(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function LW(e,t){for(var n=xR(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function ype(e){return function(){IW(this,e)}}function bpe(e){return function(){LW(this,e)}}function xpe(e,t){return function(){(t.apply(this,arguments)?IW:LW)(this,e)}}function wpe(e,t){var n=kW(e+"");if(arguments.length<2){for(var r=xR(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?xpe:t?ype:bpe)(n,t))}function Spe(){this.textContent=""}function _pe(e){return function(){this.textContent=e}}function Epe(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ape(e){return arguments.length?this.each(e==null?Spe:(typeof e=="function"?Epe:_pe)(e)):this.node().textContent}function Tpe(){this.innerHTML=""}function Cpe(e){return function(){this.innerHTML=e}}function Ope(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function jpe(e){return arguments.length?this.each(e==null?Tpe:(typeof e=="function"?Ope:Cpe)(e)):this.node().innerHTML}function Npe(){this.nextSibling&&this.parentNode.appendChild(this)}function Ppe(){return this.each(Npe)}function Mpe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Rpe(){return this.each(Mpe)}function kpe(e){var t=typeof e=="function"?e:OW(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Dpe(){return null}function Ipe(e,t){var n=typeof e=="function"?e:OW(e),r=t==null?Dpe:typeof t=="function"?t:bR(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Lpe(){var e=this.parentNode;e&&e.removeChild(this)}function $pe(){return this.each(Lpe)}function Bpe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function qpe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function zpe(e){return this.select(e?qpe:Bpe)}function Vpe(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Fpe(e){return function(t){e.call(this,t,this.__data__)}}function Upe(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function Hpe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Gpe(e,t,n){return function(){var r=this.__on,i,a=Fpe(t);if(r){for(var o=0,l=r.length;o<l;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function Wpe(e,t,n){var r=Upe(e+""),i,a=r.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var u=0,f=l.length,d;u<f;++u)for(i=0,d=l[u];i<a;++i)if((o=r[i]).type===d.type&&o.name===d.name)return d.value}return}for(l=t?Gpe:Hpe,i=0;i<a;++i)this.each(l(r[i],t,n));return this}function $W(e,t,n){var r=RW(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Kpe(e,t){return function(){return $W(this,e,t)}}function Ype(e,t){return function(){return $W(this,e,t.apply(this,arguments))}}function Xpe(e,t){return this.each((typeof t=="function"?Ype:Kpe)(e,t))}function*Zpe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var BW=[null];function Vr(e,t){this._groups=e,this._parents=t}function Bm(){return new Vr([[document.documentElement]],BW)}function Qpe(){return this}Vr.prototype=Bm.prototype={constructor:Vr,select:Ehe,selectAll:Ohe,selectChild:Mhe,selectChildren:Ihe,filter:Lhe,data:Fhe,enter:$he,exit:Hhe,join:Ghe,merge:Whe,selection:Qpe,order:Khe,sort:Yhe,call:Zhe,nodes:Qhe,node:Jhe,size:epe,empty:tpe,each:npe,attr:upe,style:hpe,property:vpe,classed:wpe,text:Ape,html:jpe,raise:Ppe,lower:Rpe,append:kpe,insert:Ipe,remove:$pe,clone:zpe,datum:Vpe,on:Wpe,dispatch:Xpe,[Symbol.iterator]:Zpe};function Lr(e){return typeof e=="string"?new Vr([[document.querySelector(e)]],[document.documentElement]):new Vr([[e]],BW)}function Jpe(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ti(e,t){if(e=Jpe(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const eme={passive:!1},Pp={capture:!0,passive:!1};function QS(e){e.stopImmediatePropagation()}function Qc(e){e.preventDefault(),e.stopImmediatePropagation()}function qW(e){var t=e.document.documentElement,n=Lr(e).on("dragstart.drag",Qc,Pp);"onselectstart"in t?n.on("selectstart.drag",Qc,Pp):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function zW(e,t){var n=e.document.documentElement,r=Lr(e).on("dragstart.drag",null);t&&(r.on("click.drag",Qc,Pp),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Bv=e=>()=>e;function gN(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:l,dx:u,dy:f,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:d}})}gN.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function tme(e){return!e.ctrlKey&&!e.button}function nme(){return this.parentNode}function rme(e,t){return t??{x:e.x,y:e.y}}function ime(){return navigator.maxTouchPoints||"ontouchstart"in this}function VW(){var e=tme,t=nme,n=rme,r=ime,i={},a=G0("start","drag","end"),o=0,l,u,f,d,h=0;function m(A){A.on("mousedown.drag",g).filter(r).on("touchstart.drag",y).on("touchmove.drag",S,eme).on("touchend.drag touchcancel.drag",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(A,T){if(!(d||!e.call(this,A,T))){var O=_(this,t.call(this,A,T),A,T,"mouse");O&&(Lr(A.view).on("mousemove.drag",b,Pp).on("mouseup.drag",w,Pp),qW(A.view),QS(A),f=!1,l=A.clientX,u=A.clientY,O("start",A))}}function b(A){if(Qc(A),!f){var T=A.clientX-l,O=A.clientY-u;f=T*T+O*O>h}i.mouse("drag",A)}function w(A){Lr(A.view).on("mousemove.drag mouseup.drag",null),zW(A.view,f),Qc(A),i.mouse("end",A)}function y(A,T){if(e.call(this,A,T)){var O=A.changedTouches,P=t.call(this,A,T),M=O.length,R,D;for(R=0;R<M;++R)(D=_(this,P,A,T,O[R].identifier,O[R]))&&(QS(A),D("start",A,O[R]))}}function S(A){var T=A.changedTouches,O=T.length,P,M;for(P=0;P<O;++P)(M=i[T[P].identifier])&&(Qc(A),M("drag",A,T[P]))}function E(A){var T=A.changedTouches,O=T.length,P,M;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),P=0;P<O;++P)(M=i[T[P].identifier])&&(QS(A),M("end",A,T[P]))}function _(A,T,O,P,M,R){var D=a.copy(),I=Ti(R||O,T),k,F,$;if(($=n.call(A,new gN("beforestart",{sourceEvent:O,target:m,identifier:M,active:o,x:I[0],y:I[1],dx:0,dy:0,dispatch:D}),P))!=null)return k=$.x-I[0]||0,F=$.y-I[1]||0,function q(L,z,U){var K=I,Z;switch(L){case"start":i[M]=q,Z=o++;break;case"end":delete i[M],--o;case"drag":I=Ti(U||z,T),Z=o;break}D.call(L,A,new gN(L,{sourceEvent:z,subject:$,target:m,identifier:M,active:Z,x:I[0]+k,y:I[1]+F,dx:I[0]-K[0],dy:I[1]-K[1],dispatch:D}),P)}}return m.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Bv(!!A),m):e},m.container=function(A){return arguments.length?(t=typeof A=="function"?A:Bv(A),m):t},m.subject=function(A){return arguments.length?(n=typeof A=="function"?A:Bv(A),m):n},m.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Bv(!!A),m):r},m.on=function(){var A=a.on.apply(a,arguments);return A===a?m:A},m.clickDistance=function(A){return arguments.length?(h=(A=+A)*A,m):Math.sqrt(h)},m}function wR(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function FW(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function qm(){}var Mp=.7,ob=1/Mp,Jc="\\s*([+-]?\\d+)\\s*",Rp="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ame=/^#([0-9a-f]{3,8})$/,ome=new RegExp(`^rgb\\(${Jc},${Jc},${Jc}\\)$`),sme=new RegExp(`^rgb\\(${ca},${ca},${ca}\\)$`),lme=new RegExp(`^rgba\\(${Jc},${Jc},${Jc},${Rp}\\)$`),ume=new RegExp(`^rgba\\(${ca},${ca},${ca},${Rp}\\)$`),cme=new RegExp(`^hsl\\(${Rp},${ca},${ca}\\)$`),fme=new RegExp(`^hsla\\(${Rp},${ca},${ca},${Rp}\\)$`),eB={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};wR(qm,vu,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tB,formatHex:tB,formatHex8:dme,formatHsl:hme,formatRgb:nB,toString:nB});function tB(){return this.rgb().formatHex()}function dme(){return this.rgb().formatHex8()}function hme(){return UW(this).formatHsl()}function nB(){return this.rgb().formatRgb()}function vu(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ame.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?rB(t):n===3?new xr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?qv(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?qv(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=ome.exec(e))?new xr(t[1],t[2],t[3],1):(t=sme.exec(e))?new xr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=lme.exec(e))?qv(t[1],t[2],t[3],t[4]):(t=ume.exec(e))?qv(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=cme.exec(e))?oB(t[1],t[2]/100,t[3]/100,1):(t=fme.exec(e))?oB(t[1],t[2]/100,t[3]/100,t[4]):eB.hasOwnProperty(e)?rB(eB[e]):e==="transparent"?new xr(NaN,NaN,NaN,0):null}function rB(e){return new xr(e>>16&255,e>>8&255,e&255,1)}function qv(e,t,n,r){return r<=0&&(e=t=n=NaN),new xr(e,t,n,r)}function pme(e){return e instanceof qm||(e=vu(e)),e?(e=e.rgb(),new xr(e.r,e.g,e.b,e.opacity)):new xr}function vN(e,t,n,r){return arguments.length===1?pme(e):new xr(e,t,n,r??1)}function xr(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}wR(xr,vN,FW(qm,{brighter(e){return e=e==null?ob:Math.pow(ob,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Mp:Math.pow(Mp,e),new xr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new xr(ou(this.r),ou(this.g),ou(this.b),sb(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:iB,formatHex:iB,formatHex8:mme,formatRgb:aB,toString:aB}));function iB(){return`#${zl(this.r)}${zl(this.g)}${zl(this.b)}`}function mme(){return`#${zl(this.r)}${zl(this.g)}${zl(this.b)}${zl((isNaN(this.opacity)?1:this.opacity)*255)}`}function aB(){const e=sb(this.opacity);return`${e===1?"rgb(":"rgba("}${ou(this.r)}, ${ou(this.g)}, ${ou(this.b)}${e===1?")":`, ${e})`}`}function sb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ou(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zl(e){return e=ou(e),(e<16?"0":"")+e.toString(16)}function oB(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ni(e,t,n,r)}function UW(e){if(e instanceof Ni)return new Ni(e.h,e.s,e.l,e.opacity);if(e instanceof qm||(e=vu(e)),!e)return new Ni;if(e instanceof Ni)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,l=a-i,u=(a+i)/2;return l?(t===a?o=(n-r)/l+(n<r)*6:n===a?o=(r-t)/l+2:o=(t-n)/l+4,l/=u<.5?a+i:2-a-i,o*=60):l=u>0&&u<1?0:o,new Ni(o,l,u,e.opacity)}function gme(e,t,n,r){return arguments.length===1?UW(e):new Ni(e,t,n,r??1)}function Ni(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}wR(Ni,gme,FW(qm,{brighter(e){return e=e==null?ob:Math.pow(ob,e),new Ni(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Mp:Math.pow(Mp,e),new Ni(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new xr(JS(e>=240?e-240:e+120,i,r),JS(e,i,r),JS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ni(sB(this.h),zv(this.s),zv(this.l),sb(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=sb(this.opacity);return`${e===1?"hsl(":"hsla("}${sB(this.h)}, ${zv(this.s)*100}%, ${zv(this.l)*100}%${e===1?")":`, ${e})`}`}}));function sB(e){return e=(e||0)%360,e<0?e+360:e}function zv(e){return Math.max(0,Math.min(1,e||0))}function JS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const SR=e=>()=>e;function vme(e,t){return function(n){return e+n*t}}function yme(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function bme(e){return(e=+e)==1?HW:function(t,n){return n-t?yme(t,n,e):SR(isNaN(t)?n:t)}}function HW(e,t){var n=t-e;return n?vme(e,n):SR(isNaN(e)?t:e)}const lb=(function e(t){var n=bme(t);function r(i,a){var o=n((i=vN(i)).r,(a=vN(a)).r),l=n(i.g,a.g),u=n(i.b,a.b),f=HW(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=l(d),i.b=u(d),i.opacity=f(d),i+""}}return r.gamma=e,r})(1);function xme(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function wme(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Sme(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),o;for(o=0;o<r;++o)i[o]=ro(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(l){for(o=0;o<r;++o)a[o]=i[o](l);return a}}function _me(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ji(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Eme(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ro(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var yN=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,e_=new RegExp(yN.source,"g");function Ame(e){return function(){return e}}function Tme(e){return function(t){return e(t)+""}}function GW(e,t){var n=yN.lastIndex=e_.lastIndex=0,r,i,a,o=-1,l=[],u=[];for(e=e+"",t=t+"";(r=yN.exec(e))&&(i=e_.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),l[o]?l[o]+=a:l[++o]=a),(r=r[0])===(i=i[0])?l[o]?l[o]+=i:l[++o]=i:(l[++o]=null,u.push({i:o,x:ji(r,i)})),n=e_.lastIndex;return n<t.length&&(a=t.slice(n),l[o]?l[o]+=a:l[++o]=a),l.length<2?u[0]?Tme(u[0].x):Ame(t):(t=u.length,function(f){for(var d=0,h;d<t;++d)l[(h=u[d]).i]=h.x(f);return l.join("")})}function ro(e,t){var n=typeof t,r;return t==null||n==="boolean"?SR(t):(n==="number"?ji:n==="string"?(r=vu(t))?(t=r,lb):GW:t instanceof vu?lb:t instanceof Date?_me:wme(t)?xme:Array.isArray(t)?Sme:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Eme:ji)(e,t)}function _R(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var lB=180/Math.PI,bN={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function WW(e,t,n,r,i,a){var o,l,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,u/=l),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*lB,skewX:Math.atan(u)*lB,scaleX:o,scaleY:l}}var Vv;function Cme(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?bN:WW(t.a,t.b,t.c,t.d,t.e,t.f)}function Ome(e){return e==null||(Vv||(Vv=document.createElementNS("http://www.w3.org/2000/svg","g")),Vv.setAttribute("transform",e),!(e=Vv.transform.baseVal.consolidate()))?bN:(e=e.matrix,WW(e.a,e.b,e.c,e.d,e.e,e.f))}function KW(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function a(f,d,h,m,g,b){if(f!==h||d!==m){var w=g.push("translate(",null,t,null,n);b.push({i:w-4,x:ji(f,h)},{i:w-2,x:ji(d,m)})}else(h||m)&&g.push("translate("+h+t+m+n)}function o(f,d,h,m){f!==d?(f-d>180?d+=360:d-f>180&&(f+=360),m.push({i:h.push(i(h)+"rotate(",null,r)-2,x:ji(f,d)})):d&&h.push(i(h)+"rotate("+d+r)}function l(f,d,h,m){f!==d?m.push({i:h.push(i(h)+"skewX(",null,r)-2,x:ji(f,d)}):d&&h.push(i(h)+"skewX("+d+r)}function u(f,d,h,m,g,b){if(f!==h||d!==m){var w=g.push(i(g)+"scale(",null,",",null,")");b.push({i:w-4,x:ji(f,h)},{i:w-2,x:ji(d,m)})}else(h!==1||m!==1)&&g.push(i(g)+"scale("+h+","+m+")")}return function(f,d){var h=[],m=[];return f=e(f),d=e(d),a(f.translateX,f.translateY,d.translateX,d.translateY,h,m),o(f.rotate,d.rotate,h,m),l(f.skewX,d.skewX,h,m),u(f.scaleX,f.scaleY,d.scaleX,d.scaleY,h,m),f=d=null,function(g){for(var b=-1,w=m.length,y;++b<w;)h[(y=m[b]).i]=y.x(g);return h.join("")}}}var jme=KW(Cme,"px, ","px)","deg)"),Nme=KW(Ome,", ",")",")"),Pme=1e-12;function uB(e){return((e=Math.exp(e))+1/e)/2}function Mme(e){return((e=Math.exp(e))-1/e)/2}function Rme(e){return((e=Math.exp(2*e))-1)/(e+1)}const wy=(function e(t,n,r){function i(a,o){var l=a[0],u=a[1],f=a[2],d=o[0],h=o[1],m=o[2],g=d-l,b=h-u,w=g*g+b*b,y,S;if(w<Pme)S=Math.log(m/f)/t,y=function(P){return[l+P*g,u+P*b,f*Math.exp(t*P*S)]};else{var E=Math.sqrt(w),_=(m*m-f*f+r*w)/(2*f*n*E),A=(m*m-f*f-r*w)/(2*m*n*E),T=Math.log(Math.sqrt(_*_+1)-_),O=Math.log(Math.sqrt(A*A+1)-A);S=(O-T)/t,y=function(P){var M=P*S,R=uB(T),D=f/(n*E)*(R*Rme(t*M+T)-Mme(T));return[l+D*g,u+D*b,f*R/uB(t*M+T)]}}return y.duration=S*1e3*t/Math.SQRT2,y}return i.rho=function(a){var o=Math.max(.001,+a),l=o*o,u=l*l;return e(o,l,u)},i})(Math.SQRT2,2,4);function kme(e,t){t===void 0&&(t=e,e=ro);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(o){var l=Math.max(0,Math.min(r-1,Math.floor(o*=r)));return a[l](o-l)}}var Of=0,Qh=0,Lh=0,YW=1e3,ub,Jh,cb=0,yu=0,K0=0,kp=typeof performance=="object"&&performance.now?performance:Date,XW=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ER(){return yu||(XW(Dme),yu=kp.now()+K0)}function Dme(){yu=0}function fb(){this._call=this._time=this._next=null}fb.prototype=ZW.prototype={constructor:fb,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ER():+n)+(t==null?0:+t),!this._next&&Jh!==this&&(Jh?Jh._next=this:ub=this,Jh=this),this._call=e,this._time=n,xN()},stop:function(){this._call&&(this._call=null,this._time=1/0,xN())}};function ZW(e,t,n){var r=new fb;return r.restart(e,t,n),r}function Ime(){ER(),++Of;for(var e=ub,t;e;)(t=yu-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Of}function cB(){yu=(cb=kp.now())+K0,Of=Qh=0;try{Ime()}finally{Of=0,$me(),yu=0}}function Lme(){var e=kp.now(),t=e-cb;t>YW&&(K0-=t,cb=e)}function $me(){for(var e,t=ub,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:ub=n);Jh=e,xN(r)}function xN(e){if(!Of){Qh&&(Qh=clearTimeout(Qh));var t=e-yu;t>24?(e<1/0&&(Qh=setTimeout(cB,e-kp.now()-K0)),Lh&&(Lh=clearInterval(Lh))):(Lh||(cb=kp.now(),Lh=setInterval(Lme,YW)),Of=1,XW(cB))}}function fB(e,t,n){var r=new fb;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Bme=G0("start","end","cancel","interrupt"),qme=[],QW=0,dB=1,wN=2,Sy=3,hB=4,SN=5,_y=6;function Y0(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;zme(e,n,{name:t,index:r,group:i,on:Bme,tween:qme,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:QW})}function AR(e,t){var n=Fi(e,t);if(n.state>QW)throw new Error("too late; already scheduled");return n}function xa(e,t){var n=Fi(e,t);if(n.state>Sy)throw new Error("too late; already running");return n}function Fi(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function zme(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=ZW(a,0,n.time);function a(f){n.state=dB,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var d,h,m,g;if(n.state!==dB)return u();for(d in r)if(g=r[d],g.name===n.name){if(g.state===Sy)return fB(o);g.state===hB?(g.state=_y,g.timer.stop(),g.on.call("interrupt",e,e.__data__,g.index,g.group),delete r[d]):+d<t&&(g.state=_y,g.timer.stop(),g.on.call("cancel",e,e.__data__,g.index,g.group),delete r[d])}if(fB(function(){n.state===Sy&&(n.state=hB,n.timer.restart(l,n.delay,n.time),l(f))}),n.state=wN,n.on.call("start",e,e.__data__,n.index,n.group),n.state===wN){for(n.state=Sy,i=new Array(m=n.tween.length),d=0,h=-1;d<m;++d)(g=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++h]=g);i.length=h+1}}function l(f){for(var d=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(u),n.state=SN,1),h=-1,m=i.length;++h<m;)i[h].call(e,d);n.state===SN&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=_y,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Ey(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>wN&&r.state<SN,r.state=_y,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Vme(e){return this.each(function(){Ey(this,e)})}function Fme(e,t){var n,r;return function(){var i=xa(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,l=r.length;o<l;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Ume(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=xa(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:t,value:n},u=0,f=i.length;u<f;++u)if(i[u].name===t){i[u]=l;break}u===f&&i.push(l)}a.tween=i}}function Hme(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fi(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Fme:Ume)(n,e,t))}function TR(e,t,n){var r=e._id;return e.each(function(){var i=xa(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fi(i,r).value[t]}}function JW(e,t){var n;return(typeof t=="number"?ji:t instanceof vu?lb:(n=vu(t))?(t=n,lb):GW)(e,t)}function Gme(e){return function(){this.removeAttribute(e)}}function Wme(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Kme(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Yme(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Xme(e,t,n){var r,i,a;return function(){var o,l=n(this),u;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=l+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l)))}}function Zme(e,t,n){var r,i,a;return function(){var o,l=n(this),u;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=l+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l)))}}function Qme(e,t){var n=W0(e),r=n==="transform"?Nme:JW;return this.attrTween(e,typeof t=="function"?(n.local?Zme:Xme)(n,r,TR(this,"attr."+e,t)):t==null?(n.local?Wme:Gme)(n):(n.local?Yme:Kme)(n,r,t))}function Jme(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ege(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function tge(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&ege(e,a)),n}return i._value=t,i}function nge(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Jme(e,a)),n}return i._value=t,i}function rge(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=W0(e);return this.tween(n,(r.local?tge:nge)(r,t))}function ige(e,t){return function(){AR(this,e).delay=+t.apply(this,arguments)}}function age(e,t){return t=+t,function(){AR(this,e).delay=t}}function oge(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?ige:age)(t,e)):Fi(this.node(),t).delay}function sge(e,t){return function(){xa(this,e).duration=+t.apply(this,arguments)}}function lge(e,t){return t=+t,function(){xa(this,e).duration=t}}function uge(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?sge:lge)(t,e)):Fi(this.node(),t).duration}function cge(e,t){if(typeof t!="function")throw new Error;return function(){xa(this,e).ease=t}}function fge(e){var t=this._id;return arguments.length?this.each(cge(t,e)):Fi(this.node(),t).ease}function dge(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;xa(this,e).ease=n}}function hge(e){if(typeof e!="function")throw new Error;return this.each(dge(this._id,e))}function pge(e){typeof e!="function"&&(e=NW(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,l=r[i]=[],u,f=0;f<o;++f)(u=a[f])&&e.call(u,u.__data__,f,a)&&l.push(u);return new fo(r,this._parents,this._name,this._id)}function mge(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var u=t[l],f=n[l],d=u.length,h=o[l]=new Array(d),m,g=0;g<d;++g)(m=u[g]||f[g])&&(h[g]=m);for(;l<r;++l)o[l]=t[l];return new fo(o,this._parents,this._name,this._id)}function gge(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function vge(e,t,n){var r,i,a=gge(t)?AR:xa;return function(){var o=a(this,e),l=o.on;l!==r&&(i=(r=l).copy()).on(t,n),o.on=i}}function yge(e,t){var n=this._id;return arguments.length<2?Fi(this.node(),n).on.on(e):this.each(vge(n,e,t))}function bge(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function xge(){return this.on("end.remove",bge(this._id))}function wge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=bR(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var l=r[o],u=l.length,f=a[o]=new Array(u),d,h,m=0;m<u;++m)(d=l[m])&&(h=e.call(d,d.__data__,m,l))&&("__data__"in d&&(h.__data__=d.__data__),f[m]=h,Y0(f[m],t,n,m,f,Fi(d,n)));return new fo(a,this._parents,t,n)}function Sge(e){var t=this._name,n=this._id;typeof e!="function"&&(e=jW(e));for(var r=this._groups,i=r.length,a=[],o=[],l=0;l<i;++l)for(var u=r[l],f=u.length,d,h=0;h<f;++h)if(d=u[h]){for(var m=e.call(d,d.__data__,h,u),g,b=Fi(d,n),w=0,y=m.length;w<y;++w)(g=m[w])&&Y0(g,t,n,w,m,b);a.push(m),o.push(d)}return new fo(a,o,t,n)}var _ge=Bm.prototype.constructor;function Ege(){return new _ge(this._groups,this._parents)}function Age(e,t){var n,r,i;return function(){var a=Cf(this,e),o=(this.style.removeProperty(e),Cf(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function eK(e){return function(){this.style.removeProperty(e)}}function Tge(e,t,n){var r,i=n+"",a;return function(){var o=Cf(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Cge(e,t,n){var r,i,a;return function(){var o=Cf(this,e),l=n(this),u=l+"";return l==null&&(u=l=(this.style.removeProperty(e),Cf(this,e))),o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,l))}}function Oge(e,t){var n,r,i,a="style."+t,o="end."+a,l;return function(){var u=xa(this,e),f=u.on,d=u.value[a]==null?l||(l=eK(t)):void 0;(f!==n||i!==d)&&(r=(n=f).copy()).on(o,i=d),u.on=r}}function jge(e,t,n){var r=(e+="")=="transform"?jme:JW;return t==null?this.styleTween(e,Age(e,r)).on("end.style."+e,eK(e)):typeof t=="function"?this.styleTween(e,Cge(e,r,TR(this,"style."+e,t))).each(Oge(this._id,e)):this.styleTween(e,Tge(e,r,t),n).on("end.style."+e,null)}function Nge(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Pge(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&Nge(e,o,n)),r}return a._value=t,a}function Mge(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,Pge(e,t,n??""))}function Rge(e){return function(){this.textContent=e}}function kge(e){return function(){var t=e(this);this.textContent=t??""}}function Dge(e){return this.tween("text",typeof e=="function"?kge(TR(this,"text",e)):Rge(e==null?"":e+""))}function Ige(e){return function(t){this.textContent=e.call(this,t)}}function Lge(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&Ige(i)),t}return r._value=e,r}function $ge(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,Lge(e))}function Bge(){for(var e=this._name,t=this._id,n=tK(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,u,f=0;f<l;++f)if(u=o[f]){var d=Fi(u,t);Y0(u,e,n,f,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new fo(r,this._parents,e,n)}function qge(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var l={value:o},u={value:function(){--i===0&&a()}};n.each(function(){var f=xa(this,r),d=f.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(u)),f.on=t}),i===0&&a()})}var zge=0;function fo(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function tK(){return++zge}var Ua=Bm.prototype;fo.prototype={constructor:fo,select:wge,selectAll:Sge,selectChild:Ua.selectChild,selectChildren:Ua.selectChildren,filter:pge,merge:mge,selection:Ege,transition:Bge,call:Ua.call,nodes:Ua.nodes,node:Ua.node,size:Ua.size,empty:Ua.empty,each:Ua.each,on:yge,attr:Qme,attrTween:rge,style:jge,styleTween:Mge,text:Dge,textTween:$ge,remove:xge,tween:Hme,delay:oge,duration:uge,ease:fge,easeVarying:hge,end:qge,[Symbol.iterator]:Ua[Symbol.iterator]};function Vge(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Fge={time:null,delay:0,duration:250,ease:Vge};function Uge(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function Hge(e){var t,n;e instanceof fo?(t=e._id,e=e._name):(t=tK(),(n=Fge).time=ER(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],l=o.length,u,f=0;f<l;++f)(u=o[f])&&Y0(u,e,t,f,o,n||Uge(u,t));return new fo(r,this._parents,e,t)}Bm.prototype.interrupt=Vme;Bm.prototype.transition=Hge;const Fv=e=>()=>e;function Gge(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Qa(e,t,n){this.k=e,this.x=t,this.y=n}Qa.prototype={constructor:Qa,scale:function(e){return e===1?this:new Qa(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Qa(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 X0=new Qa(1,0,0);nK.prototype=Qa.prototype;function nK(e){for(;!e.__zoom;)if(!(e=e.parentNode))return X0;return e.__zoom}function t_(e){e.stopImmediatePropagation()}function $h(e){e.preventDefault(),e.stopImmediatePropagation()}function Wge(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Kge(){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 pB(){return this.__zoom||X0}function Yge(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Xge(){return navigator.maxTouchPoints||"ontouchstart"in this}function Zge(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function rK(){var e=Wge,t=Kge,n=Zge,r=Yge,i=Xge,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,u=wy,f=G0("start","zoom","end"),d,h,m,g=500,b=150,w=0,y=10;function S($){$.property("__zoom",pB).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",R).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",I).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function($,q,L,z){var U=$.selection?$.selection():$;U.property("__zoom",pB),$!==U?T($,q,L,z):U.interrupt().each(function(){O(this,arguments).event(z).start().zoom(null,typeof q=="function"?q.apply(this,arguments):q).end()})},S.scaleBy=function($,q,L,z){S.scaleTo($,function(){var U=this.__zoom.k,K=typeof q=="function"?q.apply(this,arguments):q;return U*K},L,z)},S.scaleTo=function($,q,L,z){S.transform($,function(){var U=t.apply(this,arguments),K=this.__zoom,Z=L==null?A(U):typeof L=="function"?L.apply(this,arguments):L,H=K.invert(Z),V=typeof q=="function"?q.apply(this,arguments):q;return n(_(E(K,V),Z,H),U,o)},L,z)},S.translateBy=function($,q,L,z){S.transform($,function(){return n(this.__zoom.translate(typeof q=="function"?q.apply(this,arguments):q,typeof L=="function"?L.apply(this,arguments):L),t.apply(this,arguments),o)},null,z)},S.translateTo=function($,q,L,z,U){S.transform($,function(){var K=t.apply(this,arguments),Z=this.__zoom,H=z==null?A(K):typeof z=="function"?z.apply(this,arguments):z;return n(X0.translate(H[0],H[1]).scale(Z.k).translate(typeof q=="function"?-q.apply(this,arguments):-q,typeof L=="function"?-L.apply(this,arguments):-L),K,o)},z,U)};function E($,q){return q=Math.max(a[0],Math.min(a[1],q)),q===$.k?$:new Qa(q,$.x,$.y)}function _($,q,L){var z=q[0]-L[0]*$.k,U=q[1]-L[1]*$.k;return z===$.x&&U===$.y?$:new Qa($.k,z,U)}function A($){return[(+$[0][0]+ +$[1][0])/2,(+$[0][1]+ +$[1][1])/2]}function T($,q,L,z){$.on("start.zoom",function(){O(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){O(this,arguments).event(z).end()}).tween("zoom",function(){var U=this,K=arguments,Z=O(U,K).event(z),H=t.apply(U,K),V=L==null?A(H):typeof L=="function"?L.apply(U,K):L,X=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),Y=U.__zoom,G=typeof q=="function"?q.apply(U,K):q,Q=u(Y.invert(V).concat(X/Y.k),G.invert(V).concat(X/G.k));return function(J){if(J===1)J=G;else{var re=Q(J),ne=X/re[2];J=new Qa(ne,V[0]-re[0]*ne,V[1]-re[1]*ne)}Z.zoom(null,J)}})}function O($,q,L){return!L&&$.__zooming||new P($,q)}function P($,q){this.that=$,this.args=q,this.active=0,this.sourceEvent=null,this.extent=t.apply($,q),this.taps=0}P.prototype={event:function($){return $&&(this.sourceEvent=$),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function($,q){return this.mouse&&$!=="mouse"&&(this.mouse[1]=q.invert(this.mouse[0])),this.touch0&&$!=="touch"&&(this.touch0[1]=q.invert(this.touch0[0])),this.touch1&&$!=="touch"&&(this.touch1[1]=q.invert(this.touch1[0])),this.that.__zoom=q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function($){var q=Lr(this.that).datum();f.call($,this.that,new Gge($,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:f}),q)}};function M($,...q){if(!e.apply(this,arguments))return;var L=O(this,q).event($),z=this.__zoom,U=Math.max(a[0],Math.min(a[1],z.k*Math.pow(2,r.apply(this,arguments)))),K=Ti($);if(L.wheel)(L.mouse[0][0]!==K[0]||L.mouse[0][1]!==K[1])&&(L.mouse[1]=z.invert(L.mouse[0]=K)),clearTimeout(L.wheel);else{if(z.k===U)return;L.mouse=[K,z.invert(K)],Ey(this),L.start()}$h($),L.wheel=setTimeout(Z,b),L.zoom("mouse",n(_(E(z,U),L.mouse[0],L.mouse[1]),L.extent,o));function Z(){L.wheel=null,L.end()}}function R($,...q){if(m||!e.apply(this,arguments))return;var L=$.currentTarget,z=O(this,q,!0).event($),U=Lr($.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",X,!0),K=Ti($,L),Z=$.clientX,H=$.clientY;qW($.view),t_($),z.mouse=[K,this.__zoom.invert(K)],Ey(this),z.start();function V(Y){if($h(Y),!z.moved){var G=Y.clientX-Z,Q=Y.clientY-H;z.moved=G*G+Q*Q>w}z.event(Y).zoom("mouse",n(_(z.that.__zoom,z.mouse[0]=Ti(Y,L),z.mouse[1]),z.extent,o))}function X(Y){U.on("mousemove.zoom mouseup.zoom",null),zW(Y.view,z.moved),$h(Y),z.event(Y).end()}}function D($,...q){if(e.apply(this,arguments)){var L=this.__zoom,z=Ti($.changedTouches?$.changedTouches[0]:$,this),U=L.invert(z),K=L.k*($.shiftKey?.5:2),Z=n(_(E(L,K),z,U),t.apply(this,q),o);$h($),l>0?Lr(this).transition().duration(l).call(T,Z,z,$):Lr(this).call(S.transform,Z,z,$)}}function I($,...q){if(e.apply(this,arguments)){var L=$.touches,z=L.length,U=O(this,q,$.changedTouches.length===z).event($),K,Z,H,V;for(t_($),Z=0;Z<z;++Z)H=L[Z],V=Ti(H,this),V=[V,this.__zoom.invert(V),H.identifier],U.touch0?!U.touch1&&U.touch0[2]!==V[2]&&(U.touch1=V,U.taps=0):(U.touch0=V,K=!0,U.taps=1+!!d);d&&(d=clearTimeout(d)),K&&(U.taps<2&&(h=V[0],d=setTimeout(function(){d=null},g)),Ey(this),U.start())}}function k($,...q){if(this.__zooming){var L=O(this,q).event($),z=$.changedTouches,U=z.length,K,Z,H,V;for($h($),K=0;K<U;++K)Z=z[K],H=Ti(Z,this),L.touch0&&L.touch0[2]===Z.identifier?L.touch0[0]=H:L.touch1&&L.touch1[2]===Z.identifier&&(L.touch1[0]=H);if(Z=L.that.__zoom,L.touch1){var X=L.touch0[0],Y=L.touch0[1],G=L.touch1[0],Q=L.touch1[1],J=(J=G[0]-X[0])*J+(J=G[1]-X[1])*J,re=(re=Q[0]-Y[0])*re+(re=Q[1]-Y[1])*re;Z=E(Z,Math.sqrt(J/re)),H=[(X[0]+G[0])/2,(X[1]+G[1])/2],V=[(Y[0]+Q[0])/2,(Y[1]+Q[1])/2]}else if(L.touch0)H=L.touch0[0],V=L.touch0[1];else return;L.zoom("touch",n(_(Z,H,V),L.extent,o))}}function F($,...q){if(this.__zooming){var L=O(this,q).event($),z=$.changedTouches,U=z.length,K,Z;for(t_($),m&&clearTimeout(m),m=setTimeout(function(){m=null},g),K=0;K<U;++K)Z=z[K],L.touch0&&L.touch0[2]===Z.identifier?delete L.touch0:L.touch1&&L.touch1[2]===Z.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2&&(Z=Ti(Z,this),Math.hypot(h[0]-Z[0],h[1]-Z[1])<y)){var H=Lr(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return S.wheelDelta=function($){return arguments.length?(r=typeof $=="function"?$:Fv(+$),S):r},S.filter=function($){return arguments.length?(e=typeof $=="function"?$:Fv(!!$),S):e},S.touchable=function($){return arguments.length?(i=typeof $=="function"?$:Fv(!!$),S):i},S.extent=function($){return arguments.length?(t=typeof $=="function"?$:Fv([[+$[0][0],+$[0][1]],[+$[1][0],+$[1][1]]]),S):t},S.scaleExtent=function($){return arguments.length?(a[0]=+$[0],a[1]=+$[1],S):[a[0],a[1]]},S.translateExtent=function($){return arguments.length?(o[0][0]=+$[0][0],o[1][0]=+$[1][0],o[0][1]=+$[0][1],o[1][1]=+$[1][1],S):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},S.constrain=function($){return arguments.length?(n=$,S):n},S.duration=function($){return arguments.length?(l=+$,S):l},S.interpolate=function($){return arguments.length?(u=$,S):u},S.on=function(){var $=f.on.apply(f,arguments);return $===f?S:$},S.clickDistance=function($){return arguments.length?(w=($=+$)*$,S):Math.sqrt(w)},S.tapDistance=function($){return arguments.length?(y=+$,S):y},S}const ha={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Dp=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],iK=["Enter"," ","Escape"],aK={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var jf;(function(e){e.Strict="strict",e.Loose="loose"})(jf||(jf={}));var su;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(su||(su={}));var Ip;(function(e){e.Partial="partial",e.Full="full"})(Ip||(Ip={}));const oK={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ds;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ds||(ds={}));var db;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(db||(db={}));var Ie;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ie||(Ie={}));const mB={[Ie.Left]:Ie.Right,[Ie.Right]:Ie.Left,[Ie.Top]:Ie.Bottom,[Ie.Bottom]:Ie.Top};function sK(e){return e===null?null:e?"valid":"invalid"}const lK=e=>"id"in e&&"source"in e&&"target"in e,Qge=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),CR=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zm=(e,t=[0,0])=>{const{width:n,height:r}=bo(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},Jge=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const a=typeof i=="string";let o=!t.nodeLookup&&!a?i:void 0;t.nodeLookup&&(o=a?t.nodeLookup.get(i):CR(i)?i:t.nodeLookup.get(i.id));const l=o?hb(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Z0(r,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Q0(n)},Vm=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(i=>{(t.filter===void 0||t.filter(i))&&(n=Z0(n,hb(i)),r=!0)}),r?Q0(n):{x:0,y:0,width:0,height:0}},OR=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{const l={...Um(t,[n,r,i]),width:t.width/i,height:t.height/i},u=[];for(const f of e.values()){const{measured:d,selectable:h=!0,hidden:m=!1}=f;if(o&&!h||m)continue;const g=d.width??f.width??f.initialWidth??null,b=d.height??f.height??f.initialHeight??null,w=Lp(l,Pf(f)),y=(g??0)*(b??0),S=a&&w>0;(!f.internals.handleBounds||S||w>=y||f.dragging)&&u.push(f)}return u},eve=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function tve(e,t){const n=new Map,r=t!=null&&t.nodes?new Set(t.nodes.map(i=>i.id)):null;return e.forEach(i=>{i.measured.width&&i.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!i.hidden)&&(!r||r.has(i.id))&&n.set(i.id,i)}),n}async function nve({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return Promise.resolve(!0);const l=tve(e,o),u=Vm(l),f=jR(u,t,n,(o==null?void 0:o.minZoom)??i,(o==null?void 0:o.maxZoom)??a,(o==null?void 0:o.padding)??.1);return await r.setViewport(f,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function uK({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){const o=n.get(e),l=o.parentId?n.get(o.parentId):void 0,{x:u,y:f}=l?l.internals.positionAbsolute:{x:0,y:0},d=o.origin??r;let h=o.extent||i;if(o.extent==="parent"&&!o.expandParent)if(!l)a==null||a("005",ha.error005());else{const g=l.measured.width,b=l.measured.height;g&&b&&(h=[[u,f],[u+g,f+b]])}else l&&Mf(o.extent)&&(h=[[o.extent[0][0]+u,o.extent[0][1]+f],[o.extent[1][0]+u,o.extent[1][1]+f]]);const m=Mf(h)?bu(t,h,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(a==null||a("015",ha.error015())),{position:{x:m.x-u+(o.measured.width??0)*d[0],y:m.y-f+(o.measured.height??0)*d[1]},positionAbsolute:m}}async function rve({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){const a=new Set(e.map(m=>m.id)),o=[];for(const m of n){if(m.deletable===!1)continue;const g=a.has(m.id),b=!g&&m.parentId&&o.find(w=>w.id===m.parentId);(g||b)&&o.push(m)}const l=new Set(t.map(m=>m.id)),u=r.filter(m=>m.deletable!==!1),d=eve(o,u);for(const m of u)l.has(m.id)&&!d.find(b=>b.id===m.id)&&d.push(m);if(!i)return{edges:d,nodes:o};const h=await i({nodes:o,edges:d});return typeof h=="boolean"?h?{edges:d,nodes:o}:{edges:[],nodes:[]}:h}const Nf=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),bu=(e={x:0,y:0},t,n)=>({x:Nf(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Nf(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function cK(e,t,n){const{width:r,height:i}=bo(n),{x:a,y:o}=n.internals.positionAbsolute;return bu(e,[[a,o],[a+r,o+i]],t)}const gB=(e,t,n)=>e<t?Nf(Math.abs(e-t),1,t)/t:e>n?-Nf(Math.abs(e-n),1,t)/t:0,fK=(e,t,n=15,r=40)=>{const i=gB(e.x,r,t.width-r)*n,a=gB(e.y,r,t.height-r)*n;return[i,a]},Z0=(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)}),_N=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Q0=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Pf=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=CR(e)?e.internals.positionAbsolute:zm(e,t);return{x:n,y:r,width:((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},hb=(e,t=[0,0])=>{var i,a;const{x:n,y:r}=CR(e)?e.internals.positionAbsolute:zm(e,t);return{x:n,y:r,x2:n+(((i=e.measured)==null?void 0:i.width)??e.width??e.initialWidth??0),y2:r+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},dK=(e,t)=>Q0(Z0(_N(e),_N(t))),Lp=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},vB=e=>Pi(e.width)&&Pi(e.height)&&Pi(e.x)&&Pi(e.y),Pi=e=>!isNaN(e)&&isFinite(e),ive=(e,t)=>{},Fm=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Um=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{const l={x:(e-n)/i,y:(t-r)/i};return a?Fm(l,o):l},pb=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function Nc(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function ave(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Nc(e,n),i=Nc(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e=="object"){const r=Nc(e.top??e.y??0,n),i=Nc(e.bottom??e.y??0,n),a=Nc(e.left??e.x??0,t),o=Nc(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function ove(e,t,n,r,i,a){const{x:o,y:l}=pb(e,[t,n,r]),{x:u,y:f}=pb({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=i-u,h=a-f;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(d),bottom:Math.floor(h)}}const jR=(e,t,n,r,i,a)=>{const o=ave(a,t,n),l=(t-o.x)/e.width,u=(n-o.y)/e.height,f=Math.min(l,u),d=Nf(f,r,i),h=e.x+e.width/2,m=e.y+e.height/2,g=t/2-h*d,b=n/2-m*d,w=ove(e,g,b,d,t,n),y={left:Math.min(w.left-o.left,0),top:Math.min(w.top-o.top,0),right:Math.min(w.right-o.right,0),bottom:Math.min(w.bottom-o.bottom,0)};return{x:g-y.left+y.right,y:b-y.top+y.bottom,zoom:d}},$p=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Mf(e){return e!=null&&e!=="parent"}function bo(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function hK(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function pK(e,t={width:0,height:0},n,r,i){const a={...e},o=r.get(n);if(o){const l=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return a}function yB(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function sve(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}function lve(e){return{...aK,...e||{}}}function sp(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){const{x:a,y:o}=Mi(e),l=Um({x:a-((i==null?void 0:i.left)??0),y:o-((i==null?void 0:i.top)??0)},r),{x:u,y:f}=n?Fm(l,t):l;return{xSnapped:u,ySnapped:f,...l}}const NR=e=>({width:e.offsetWidth,height:e.offsetHeight}),mK=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},uve=["INPUT","SELECT","TEXTAREA"];function gK(e){var r,i;const t=((i=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:i[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:uve.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const vK=e=>"clientX"in e,Mi=(e,t)=>{var a,o;const n=vK(e),r=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,i=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:i-((t==null?void 0:t.top)??0)}},bB=(e,t,n,r,i)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:i,position:o.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...NR(o)}})};function yK({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:l}){const u=e*.125+i*.375+o*.375+n*.125,f=t*.125+a*.375+l*.375+r*.125,d=Math.abs(u-e),h=Math.abs(f-t);return[u,f,d,h]}function Uv(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function xB({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case Ie.Left:return[t-Uv(t-r,a),n];case Ie.Right:return[t+Uv(r-t,a),n];case Ie.Top:return[t,n-Uv(n-i,a)];case Ie.Bottom:return[t,n+Uv(i-n,a)]}}function bK({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top,curvature:o=.25}){const[l,u]=xB({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[f,d]=xB({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[h,m,g,b]=yK({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:l,sourceControlY:u,targetControlX:f,targetControlY:d});return[`M${e},${t} C${l},${u} ${f},${d} ${r},${i}`,h,m,g,b]}function xK({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2,l=r<t?r+o:r-o;return[a,l,i,o]}function cve({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a="basic"}){if(a==="manual")return r;const o=i&&n?r+1e3:r,l=Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0);return o+l}function fve({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){const a=Z0(hb(e),hb(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const o={x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]};return Lp(o,Q0(a))>0}const dve=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,hve=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),pve=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||dve;let i;return lK(e)?i={...e}:i={...e,id:r(e)},hve(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function wK({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,l]=xK({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,l]}const wB={[Ie.Left]:{x:-1,y:0},[Ie.Right]:{x:1,y:0},[Ie.Top]:{x:0,y:-1},[Ie.Bottom]:{x:0,y:1}},mve=({source:e,sourcePosition:t=Ie.Bottom,target:n})=>t===Ie.Left||t===Ie.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},SB=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function gve({source:e,sourcePosition:t=Ie.Bottom,target:n,targetPosition:r=Ie.Top,center:i,offset:a,stepPosition:o}){const l=wB[t],u=wB[r],f={x:e.x+l.x*a,y:e.y+l.y*a},d={x:n.x+u.x*a,y:n.y+u.y*a},h=mve({source:f,sourcePosition:t,target:d}),m=h.x!==0?"x":"y",g=h[m];let b=[],w,y;const S={x:0,y:0},E={x:0,y:0},[,,_,A]=xK({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[m]*u[m]===-1){m==="x"?(w=i.x??f.x+(d.x-f.x)*o,y=i.y??(f.y+d.y)/2):(w=i.x??(f.x+d.x)/2,y=i.y??f.y+(d.y-f.y)*o);const M=[{x:w,y:f.y},{x:w,y:d.y}],R=[{x:f.x,y},{x:d.x,y}];l[m]===g?b=m==="x"?M:R:b=m==="x"?R:M}else{const M=[{x:f.x,y:d.y}],R=[{x:d.x,y:f.y}];if(m==="x"?b=l.x===g?R:M:b=l.y===g?M:R,t===r){const $=Math.abs(e[m]-n[m]);if($<=a){const q=Math.min(a-1,a-$);l[m]===g?S[m]=(f[m]>e[m]?-1:1)*q:E[m]=(d[m]>n[m]?-1:1)*q}}if(t!==r){const $=m==="x"?"y":"x",q=l[m]===u[$],L=f[$]>d[$],z=f[$]<d[$];(l[m]===1&&(!q&&L||q&&z)||l[m]!==1&&(!q&&z||q&&L))&&(b=m==="x"?M:R)}const D={x:f.x+S.x,y:f.y+S.y},I={x:d.x+E.x,y:d.y+E.y},k=Math.max(Math.abs(D.x-b[0].x),Math.abs(I.x-b[0].x)),F=Math.max(Math.abs(D.y-b[0].y),Math.abs(I.y-b[0].y));k>=F?(w=(D.x+I.x)/2,y=b[0].y):(w=b[0].x,y=(D.y+I.y)/2)}const T={x:f.x+S.x,y:f.y+S.y},O={x:d.x+E.x,y:d.y+E.y};return[[e,...T.x!==b[0].x||T.y!==b[0].y?[T]:[],...b,...O.x!==b[b.length-1].x||O.y!==b[b.length-1].y?[O]:[],n],w,y,_,A]}function vve(e,t,n,r){const i=Math.min(SB(e,t)/2,SB(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){const f=e.x<n.x?-1:1,d=e.y<n.y?1:-1;return`L ${a+i*f},${o}Q ${a},${o} ${a},${o+i*d}`}const l=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${a},${o+i*u}Q ${a},${o} ${a+i*l},${o}`}function EN({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top,borderRadius:o=5,centerX:l,centerY:u,offset:f=20,stepPosition:d=.5}){const[h,m,g,b,w]=gve({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:l,y:u},offset:f,stepPosition:d});let y=`M${h[0].x} ${h[0].y}`;for(let S=1;S<h.length-1;S++)y+=vve(h[S-1],h[S],h[S+1],o);return y+=`L${h[h.length-1].x} ${h[h.length-1].y}`,[y,m,g,b,w]}function _B(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function yve(e){var h;const{sourceNode:t,targetNode:n}=e;if(!_B(t)||!_B(n))return null;const r=t.internals.handleBounds||EB(t.handles),i=n.internals.handleBounds||EB(n.handles),a=AB((r==null?void 0:r.source)??[],e.sourceHandle),o=AB(e.connectionMode===jf.Strict?(i==null?void 0:i.target)??[]:((i==null?void 0:i.target)??[]).concat((i==null?void 0:i.source)??[]),e.targetHandle);if(!a||!o)return(h=e.onError)==null||h.call(e,"008",ha.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(a==null?void 0:a.position)||Ie.Bottom,u=(o==null?void 0:o.position)||Ie.Top,f=xu(t,a,l),d=xu(n,o,u);return{sourceX:f.x,sourceY:f.y,targetX:d.x,targetY:d.y,sourcePosition:l,targetPosition:u}}function EB(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function xu(e,t,n=Ie.Left,r=!1){const i=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:l}=t??bo(e);if(r)return{x:i+o/2,y:a+l/2};switch((t==null?void 0:t.position)??n){case Ie.Top:return{x:i+o/2,y:a};case Ie.Right:return{x:i+o,y:a+l/2};case Ie.Bottom:return{x:i+o/2,y:a+l};case Ie.Left:return{x:i,y:a+l/2}}}function AB(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function AN(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function bve(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){const a=new Set;return e.reduce((o,l)=>([l.markerStart||r,l.markerEnd||i].forEach(u=>{if(u&&typeof u=="object"){const f=AN(u,t);a.has(f)||(o.push({id:f,color:u.color||n,...u}),a.add(f))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const SK=1e3,xve=10,PR={nodeOrigin:[0,0],nodeExtent:Dp,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},wve={...PR,checkEquality:!0};function MR(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function Sve(e,t,n){const r=MR(PR,n);for(const i of e.values())if(i.parentId)kR(i,e,t,r);else{const a=zm(i,r.nodeOrigin),o=Mf(i.extent)?i.extent:r.nodeExtent,l=bu(a,o,bo(i));i.internals.positionAbsolute=l}}function _ve(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const i of e.handles){const a={id:i.id,width:i.width??1,height:i.height??1,nodeId:e.id,x:i.x,y:i.y,position:i.position,type:i.type};i.type==="source"?n.push(a):i.type==="target"&&r.push(a)}return{source:n,target:r}}function RR(e){return e==="manual"}function TN(e,t,n,r={}){var d,h;const i=MR(wve,r),a={i:0},o=new Map(t),l=i!=null&&i.elevateNodesOnSelect&&!RR(i.zIndexMode)?SK:0;let u=e.length>0,f=!1;t.clear(),n.clear();for(const m of e){let g=o.get(m.id);if(i.checkEquality&&m===(g==null?void 0:g.internals.userNode))t.set(m.id,g);else{const b=zm(m,i.nodeOrigin),w=Mf(m.extent)?m.extent:i.nodeExtent,y=bu(b,w,bo(m));g={...i.defaults,...m,measured:{width:(d=m.measured)==null?void 0:d.width,height:(h=m.measured)==null?void 0:h.height},internals:{positionAbsolute:y,handleBounds:_ve(m,g),z:_K(m,l,i.zIndexMode),userNode:m}},t.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(u=!1),m.parentId&&kR(g,t,n,r,a),f||(f=m.selected??!1)}return{nodesInitialized:u,hasSelectedNodes:f}}function Eve(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function kR(e,t,n,r,i){const{elevateNodesOnSelect:a,nodeOrigin:o,nodeExtent:l,zIndexMode:u}=MR(PR,r),f=e.parentId,d=t.get(f);if(!d){console.warn(`Parent node ${f} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Eve(e,n),i&&!d.parentId&&d.internals.rootParentIndex===void 0&&u==="auto"&&(d.internals.rootParentIndex=++i.i,d.internals.z=d.internals.z+i.i*xve),i&&d.internals.rootParentIndex!==void 0&&(i.i=d.internals.rootParentIndex);const h=a&&!RR(u)?SK:0,{x:m,y:g,z:b}=Ave(e,d,o,l,h,u),{positionAbsolute:w}=e.internals,y=m!==w.x||g!==w.y;(y||b!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:y?{x:m,y:g}:w,z:b}})}function _K(e,t,n){const r=Pi(e.zIndex)?e.zIndex:0;return RR(n)?r:r+(e.selected?t:0)}function Ave(e,t,n,r,i,a){const{x:o,y:l}=t.internals.positionAbsolute,u=bo(e),f=zm(e,n),d=Mf(e.extent)?bu(f,e.extent,u):f;let h=bu({x:o+d.x,y:l+d.y},r,u);e.extent==="parent"&&(h=cK(h,u,t));const m=_K(e,i,a),g=t.internals.z??0;return{x:h.x,y:h.y,z:g>=m?g+1:m}}function DR(e,t,n,r=[0,0]){var o;const i=[],a=new Map;for(const l of e){const u=t.get(l.parentId);if(!u)continue;const f=((o=a.get(l.parentId))==null?void 0:o.expandedRect)??Pf(u),d=dK(f,l.rect);a.set(l.parentId,{expandedRect:d,parent:u})}return a.size>0&&a.forEach(({expandedRect:l,parent:u},f)=>{var _;const d=u.internals.positionAbsolute,h=bo(u),m=u.origin??r,g=l.x<d.x?Math.round(Math.abs(d.x-l.x)):0,b=l.y<d.y?Math.round(Math.abs(d.y-l.y)):0,w=Math.max(h.width,Math.round(l.width)),y=Math.max(h.height,Math.round(l.height)),S=(w-h.width)*m[0],E=(y-h.height)*m[1];(g>0||b>0||S||E)&&(i.push({id:f,type:"position",position:{x:u.position.x-g+S,y:u.position.y-b+E}}),(_=n.get(f))==null||_.forEach(A=>{e.some(T=>T.id===A.id)||i.push({id:A.id,type:"position",position:{x:A.position.x+g,y:A.position.y+b}})})),(h.width<l.width||h.height<l.height||g||b)&&i.push({id:f,type:"dimensions",setAttributes:!0,dimensions:{width:w+(g?m[0]*g-S:0),height:y+(b?m[1]*b-E:0)}})}),i}function Tve(e,t,n,r,i,a,o){const l=r==null?void 0:r.querySelector(".xyflow__viewport");let u=!1;if(!l)return{changes:[],updatedInternals:u};const f=[],d=window.getComputedStyle(l),{m22:h}=new window.DOMMatrixReadOnly(d.transform),m=[];for(const g of e.values()){const b=t.get(g.id);if(!b)continue;if(b.hidden){t.set(b.id,{...b,internals:{...b.internals,handleBounds:void 0}}),u=!0;continue}const w=NR(g.nodeElement),y=b.measured.width!==w.width||b.measured.height!==w.height;if(!!(w.width&&w.height&&(y||!b.internals.handleBounds||g.force))){const E=g.nodeElement.getBoundingClientRect(),_=Mf(b.extent)?b.extent:a;let{positionAbsolute:A}=b.internals;b.parentId&&b.extent==="parent"?A=cK(A,w,t.get(b.parentId)):_&&(A=bu(A,_,w));const T={...b,measured:w,internals:{...b.internals,positionAbsolute:A,handleBounds:{source:bB("source",g.nodeElement,E,h,b.id),target:bB("target",g.nodeElement,E,h,b.id)}}};t.set(b.id,T),b.parentId&&kR(T,t,n,{nodeOrigin:i,zIndexMode:o}),u=!0,y&&(f.push({id:b.id,type:"dimensions",dimensions:w}),b.expandParent&&b.parentId&&m.push({id:b.id,parentId:b.parentId,rect:Pf(T,i)}))}}if(m.length>0){const g=DR(m,t,n,i);f.push(...g)}return{changes:f,updatedInternals:u}}async function Cve({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r),l=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(l)}function TB(e,t,n,r,i,a){let o=i;const l=r.get(o)||new Map;r.set(o,l.set(n,t)),o=`${i}-${e}`;const u=r.get(o)||new Map;if(r.set(o,u.set(n,t)),a){o=`${i}-${e}-${a}`;const f=r.get(o)||new Map;r.set(o,f.set(n,t))}}function EK(e,t,n){e.clear(),t.clear();for(const r of n){const{source:i,target:a,sourceHandle:o=null,targetHandle:l=null}=r,u={edgeId:r.id,source:i,target:a,sourceHandle:o,targetHandle:l},f=`${i}-${o}--${a}-${l}`,d=`${a}-${l}--${i}-${o}`;TB("source",u,d,e,i,o),TB("target",u,f,e,a,l),t.set(r.id,r)}}function AK(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:AK(n,t):!1}function CB(e,t,n){var i;let r=e;do{if((i=r==null?void 0:r.matches)!=null&&i.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function Ove(e,t,n,r){const i=new Map;for(const[a,o]of e)if((o.selected||o.id===r)&&(!o.parentId||!AK(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(a);l&&i.set(a,{id:a,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return i}function n_({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var o,l,u;const i=[];for(const[f,d]of t){const h=(o=n.get(f))==null?void 0:o.internals.userNode;h&&i.push({...h,position:d.position,dragging:r})}if(!e)return[i[0],i];const a=(l=n.get(e))==null?void 0:l.internals.userNode;return[a?{...a,position:((u=t.get(e))==null?void 0:u.position)||a.position,dragging:r}:i[0],i]}function jve({dragItems:e,snapGrid:t,x:n,y:r}){const i=e.values().next().value;if(!i)return null;const a={x:n-i.distance.x,y:r-i.distance.y},o=Fm(a,t);return{x:o.x-a.x,y:o.y-a.y}}function Nve({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,l=new Map,u=!1,f={x:0,y:0},d=null,h=!1,m=null,g=!1,b=!1,w=null;function y({noDragClassName:E,handleSelector:_,domNode:A,isSelectable:T,nodeId:O,nodeClickDistance:P=0}){m=Lr(A);function M({x:k,y:F}){const{nodeLookup:$,nodeExtent:q,snapGrid:L,snapToGrid:z,nodeOrigin:U,onNodeDrag:K,onSelectionDrag:Z,onError:H,updateNodePositions:V}=t();a={x:k,y:F};let X=!1;const Y=l.size>1,G=Y&&q?_N(Vm(l)):null,Q=Y&&z?jve({dragItems:l,snapGrid:L,x:k,y:F}):null;for(const[J,re]of l){if(!$.has(J))continue;let ne={x:k-re.distance.x,y:F-re.distance.y};z&&(ne=Q?{x:Math.round(ne.x+Q.x),y:Math.round(ne.y+Q.y)}:Fm(ne,L));let fe=null;if(Y&&q&&!re.extent&&G){const{positionAbsolute:ye}=re.internals,be=ye.x-G.x+q[0][0],xe=ye.x+re.measured.width-G.x2+q[1][0],Ee=ye.y-G.y+q[0][1],_e=ye.y+re.measured.height-G.y2+q[1][1];fe=[[be,Ee],[xe,_e]]}const{position:he,positionAbsolute:oe}=uK({nodeId:J,nextPosition:ne,nodeLookup:$,nodeExtent:fe||q,nodeOrigin:U,onError:H});X=X||re.position.x!==he.x||re.position.y!==he.y,re.position=he,re.internals.positionAbsolute=oe}if(b=b||X,!!X&&(V(l,!0),w&&(r||K||!O&&Z))){const[J,re]=n_({nodeId:O,dragItems:l,nodeLookup:$});r==null||r(w,l,J,re),K==null||K(w,J,re),O||Z==null||Z(w,re)}}async function R(){if(!d)return;const{transform:k,panBy:F,autoPanSpeed:$,autoPanOnNodeDrag:q}=t();if(!q){u=!1,cancelAnimationFrame(o);return}const[L,z]=fK(f,d,$);(L!==0||z!==0)&&(a.x=(a.x??0)-L/k[2],a.y=(a.y??0)-z/k[2],await F({x:L,y:z})&&M(a)),o=requestAnimationFrame(R)}function D(k){var Y;const{nodeLookup:F,multiSelectionActive:$,nodesDraggable:q,transform:L,snapGrid:z,snapToGrid:U,selectNodesOnDrag:K,onNodeDragStart:Z,onSelectionDragStart:H,unselectNodesAndEdges:V}=t();h=!0,(!K||!T)&&!$&&O&&((Y=F.get(O))!=null&&Y.selected||V()),T&&K&&O&&(e==null||e(O));const X=sp(k.sourceEvent,{transform:L,snapGrid:z,snapToGrid:U,containerBounds:d});if(a=X,l=Ove(F,q,X,O),l.size>0&&(n||Z||!O&&H)){const[G,Q]=n_({nodeId:O,dragItems:l,nodeLookup:F});n==null||n(k.sourceEvent,l,G,Q),Z==null||Z(k.sourceEvent,G,Q),O||H==null||H(k.sourceEvent,Q)}}const I=VW().clickDistance(P).on("start",k=>{const{domNode:F,nodeDragThreshold:$,transform:q,snapGrid:L,snapToGrid:z}=t();d=(F==null?void 0:F.getBoundingClientRect())||null,g=!1,b=!1,w=k.sourceEvent,$===0&&D(k),a=sp(k.sourceEvent,{transform:q,snapGrid:L,snapToGrid:z,containerBounds:d}),f=Mi(k.sourceEvent,d)}).on("drag",k=>{const{autoPanOnNodeDrag:F,transform:$,snapGrid:q,snapToGrid:L,nodeDragThreshold:z,nodeLookup:U}=t(),K=sp(k.sourceEvent,{transform:$,snapGrid:q,snapToGrid:L,containerBounds:d});if(w=k.sourceEvent,(k.sourceEvent.type==="touchmove"&&k.sourceEvent.touches.length>1||O&&!U.has(O))&&(g=!0),!g){if(!u&&F&&h&&(u=!0,R()),!h){const Z=Mi(k.sourceEvent,d),H=Z.x-f.x,V=Z.y-f.y;Math.sqrt(H*H+V*V)>z&&D(k)}(a.x!==K.xSnapped||a.y!==K.ySnapped)&&l&&h&&(f=Mi(k.sourceEvent,d),M(K))}}).on("end",k=>{if(!(!h||g)&&(u=!1,h=!1,cancelAnimationFrame(o),l.size>0)){const{nodeLookup:F,updateNodePositions:$,onNodeDragStop:q,onSelectionDragStop:L}=t();if(b&&($(l,!1),b=!1),i||q||!O&&L){const[z,U]=n_({nodeId:O,dragItems:l,nodeLookup:F,dragging:!1});i==null||i(k.sourceEvent,l,z,U),q==null||q(k.sourceEvent,z,U),O||L==null||L(k.sourceEvent,U)}}}).filter(k=>{const F=k.target;return!k.button&&(!E||!CB(F,`.${E}`,A))&&(!_||CB(F,_,A))});m.call(I)}function S(){m==null||m.on(".drag",null)}return{update:y,destroy:S}}function Pve(e,t,n){const r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())Lp(i,Pf(a))>0&&r.push(a);return r}const Mve=250;function Rve(e,t,n,r){var l,u;let i=[],a=1/0;const o=Pve(e,n,t+Mve);for(const f of o){const d=[...((l=f.internals.handleBounds)==null?void 0:l.source)??[],...((u=f.internals.handleBounds)==null?void 0:u.target)??[]];for(const h of d){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:m,y:g}=xu(f,h,h.position,!0),b=Math.sqrt(Math.pow(m-e.x,2)+Math.pow(g-e.y,2));b>t||(b<a?(i=[{...h,x:m,y:g}],a=b):b===a&&i.push({...h,x:m,y:g}))}}if(!i.length)return null;if(i.length>1){const f=r.type==="source"?"target":"source";return i.find(d=>d.type===f)??i[0]}return i[0]}function TK(e,t,n,r,i,a=!1){var f,d,h;const o=r.get(e);if(!o)return null;const l=i==="strict"?(f=o.internals.handleBounds)==null?void 0:f[t]:[...((d=o.internals.handleBounds)==null?void 0:d.source)??[],...((h=o.internals.handleBounds)==null?void 0:h.target)??[]],u=(n?l==null?void 0:l.find(m=>m.id===n):l==null?void 0:l[0])??null;return u&&a?{...u,...xu(o,u,u.position,!0)}:u}function CK(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function kve(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const OK=()=>!0;function Dve(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:l,nodeLookup:u,lib:f,autoPanOnConnect:d,flowId:h,panBy:m,cancelConnection:g,onConnectStart:b,onConnect:w,onConnectEnd:y,isValidConnection:S=OK,onReconnectEnd:E,updateConnection:_,getTransform:A,getFromHandle:T,autoPanSpeed:O,dragThreshold:P=1,handleDomNode:M}){const R=mK(e.target);let D=0,I;const{x:k,y:F}=Mi(e),$=CK(a,M),q=l==null?void 0:l.getBoundingClientRect();let L=!1;if(!q||!$)return;const z=TK(i,$,r,u,t);if(!z)return;let U=Mi(e,q),K=!1,Z=null,H=!1,V=null;function X(){if(!d||!q)return;const[he,oe]=fK(U,q,O);m({x:he,y:oe}),D=requestAnimationFrame(X)}const Y={...z,nodeId:i,type:$,position:z.position},G=u.get(i);let J={inProgress:!0,isValid:null,from:xu(G,Y,Ie.Left,!0),fromHandle:Y,fromPosition:Y.position,fromNode:G,to:U,toHandle:null,toPosition:mB[Y.position],toNode:null,pointer:U};function re(){L=!0,_(J),b==null||b(e,{nodeId:i,handleId:r,handleType:$})}P===0&&re();function ne(he){if(!L){const{x:_e,y:tt}=Mi(he),nt=_e-k,It=tt-F;if(!(nt*nt+It*It>P*P))return;re()}if(!T()||!Y){fe(he);return}const oe=A();U=Mi(he,q),I=Rve(Um(U,oe,!1,[1,1]),n,u,Y),K||(X(),K=!0);const ye=jK(he,{handle:I,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?"target":"source",isValidConnection:S,doc:R,lib:f,flowId:h,nodeLookup:u});V=ye.handleDomNode,Z=ye.connection,H=kve(!!I,ye.isValid);const be=u.get(i),xe=be?xu(be,Y,Ie.Left,!0):J.from,Ee={...J,from:xe,isValid:H,to:ye.toHandle&&H?pb({x:ye.toHandle.x,y:ye.toHandle.y},oe):U,toHandle:ye.toHandle,toPosition:H&&ye.toHandle?ye.toHandle.position:mB[Y.position],toNode:ye.toHandle?u.get(ye.toHandle.nodeId):null,pointer:U};_(Ee),J=Ee}function fe(he){if(!("touches"in he&&he.touches.length>0)){if(L){(I||V)&&Z&&H&&(w==null||w(Z));const{inProgress:oe,...ye}=J,be={...ye,toPosition:J.toHandle?J.toPosition:null};y==null||y(he,be),a&&(E==null||E(he,be))}g(),cancelAnimationFrame(D),K=!1,H=!1,Z=null,V=null,R.removeEventListener("mousemove",ne),R.removeEventListener("mouseup",fe),R.removeEventListener("touchmove",ne),R.removeEventListener("touchend",fe)}}R.addEventListener("mousemove",ne),R.addEventListener("mouseup",fe),R.addEventListener("touchmove",ne),R.addEventListener("touchend",fe)}function jK(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:l,flowId:u,isValidConnection:f=OK,nodeLookup:d}){const h=a==="target",m=t?o.querySelector(`.${l}-flow__handle[data-id="${u}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:g,y:b}=Mi(e),w=o.elementFromPoint(g,b),y=w!=null&&w.classList.contains(`${l}-flow__handle`)?w:m,S={handleDomNode:y,isValid:!1,connection:null,toHandle:null};if(y){const E=CK(void 0,y),_=y.getAttribute("data-nodeid"),A=y.getAttribute("data-handleid"),T=y.classList.contains("connectable"),O=y.classList.contains("connectableend");if(!_||!E)return S;const P={source:h?_:r,sourceHandle:h?A:i,target:h?r:_,targetHandle:h?i:A};S.connection=P;const R=T&&O&&(n===jf.Strict?h&&E==="source"||!h&&E==="target":_!==r||A!==i);S.isValid=R&&f(P),S.toHandle=TK(_,E,A,d,n,!0)}return S}const CN={onPointerDown:Dve,isValid:jK};function Ive({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const i=Lr(e);function a({translateExtent:l,width:u,height:f,zoomStep:d=1,pannable:h=!0,zoomable:m=!0,inversePan:g=!1}){const b=_=>{if(_.sourceEvent.type!=="wheel"||!t)return;const A=n(),T=_.sourceEvent.ctrlKey&&$p()?10:1,O=-_.sourceEvent.deltaY*(_.sourceEvent.deltaMode===1?.05:_.sourceEvent.deltaMode?1:.002)*d,P=A[2]*Math.pow(2,O*T);t.scaleTo(P)};let w=[0,0];const y=_=>{(_.sourceEvent.type==="mousedown"||_.sourceEvent.type==="touchstart")&&(w=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY])},S=_=>{const A=n();if(_.sourceEvent.type!=="mousemove"&&_.sourceEvent.type!=="touchmove"||!t)return;const T=[_.sourceEvent.clientX??_.sourceEvent.touches[0].clientX,_.sourceEvent.clientY??_.sourceEvent.touches[0].clientY],O=[T[0]-w[0],T[1]-w[1]];w=T;const P=r()*Math.max(A[2],Math.log(A[2]))*(g?-1:1),M={x:A[0]-O[0]*P,y:A[1]-O[1]*P},R=[[0,0],[u,f]];t.setViewportConstrained({x:M.x,y:M.y,zoom:A[2]},R,l)},E=rK().on("start",y).on("zoom",h?S:null).on("zoom.wheel",m?b:null);i.call(E,{})}function o(){i.on("zoom",null)}return{update:a,destroy:o,pointer:Ti}}const J0=e=>({x:e.x,y:e.y,zoom:e.k}),r_=({x:e,y:t,zoom:n})=>X0.translate(e,t).scale(n),qc=(e,t)=>e.target.closest(`.${t}`),NK=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Lve=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,i_=(e,t=0,n=Lve,r=()=>{})=>{const i=typeof t=="number"&&t>0;return i||r(),i?e.transition().duration(t).ease(n).on("end",r):e},PK=e=>{const t=e.ctrlKey&&$p()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function $ve({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:a,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:u,onPanZoomEnd:f}){return d=>{if(qc(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const h=n.property("__zoom").k||1;if(d.ctrlKey&&o){const y=Ti(d),S=PK(d),E=h*Math.pow(2,S);r.scaleTo(n,E,y,d);return}const m=d.deltaMode===1?20:1;let g=i===su.Vertical?0:d.deltaX*m,b=i===su.Horizontal?0:d.deltaY*m;!$p()&&d.shiftKey&&i!==su.Vertical&&(g=d.deltaY*m,b=0),r.translateBy(n,-(g/h)*a,-(b/h)*a,{internal:!0});const w=J0(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(u==null||u(d,w),e.panScrollTimeout=setTimeout(()=>{f==null||f(d,w),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(d,w))}}function Bve({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){const a=r.type==="wheel",o=!t&&a&&!r.ctrlKey,l=qc(r,e);if(r.ctrlKey&&a&&l&&r.preventDefault(),o||l)return null;r.preventDefault(),n.call(this,r,i)}}function qve({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var a,o,l;if((a=r.sourceEvent)!=null&&a.internal)return;const i=J0(r.transform);e.mouseButton=((o=r.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=i,((l=r.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,i))}}function zve({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return a=>{var o,l;e.usedRightMouseButton=!!(n&&NK(t,e.mouseButton??0)),(o=a.sourceEvent)!=null&&o.sync||r([a.transform.x,a.transform.y,a.transform.k]),i&&!((l=a.sourceEvent)!=null&&l.internal)&&(i==null||i(a.sourceEvent,J0(a.transform)))}}function Vve({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,a&&NK(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&a(o.sourceEvent),e.usedRightMouseButton=!1,r(!1),i)){const u=J0(o.transform);e.prevViewport=u,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i==null||i(o.sourceEvent,u)},n?150:0)}}}function Fve({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:i,zoomOnDoubleClick:a,userSelectionActive:o,noWheelClassName:l,noPanClassName:u,lib:f,connectionInProgress:d}){return h=>{var y;const m=e||t,g=n&&h.ctrlKey,b=h.type==="wheel";if(h.button===1&&h.type==="mousedown"&&(qc(h,`${f}-flow__node`)||qc(h,`${f}-flow__edge`)))return!0;if(!r&&!m&&!i&&!a&&!n||o||d&&!b||qc(h,l)&&b||qc(h,u)&&(!b||i&&b&&!e)||!n&&h.ctrlKey&&b)return!1;if(!n&&h.type==="touchstart"&&((y=h.touches)==null?void 0:y.length)>1)return h.preventDefault(),!1;if(!m&&!i&&!g&&b||!r&&(h.type==="mousedown"||h.type==="touchstart")||Array.isArray(r)&&!r.includes(h.button)&&h.type==="mousedown")return!1;const w=Array.isArray(r)&&r.includes(h.button)||!h.button||h.button<=1;return(!h.ctrlKey||b)&&w}}function Uve({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:u}){const f={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},d=e.getBoundingClientRect(),h=rK().scaleExtent([t,n]).translateExtent(r),m=Lr(e).call(h);E({x:i.x,y:i.y,zoom:Nf(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);const g=m.on("wheel.zoom"),b=m.on("dblclick.zoom");h.wheelDelta(PK);function w(I,k){return m?new Promise(F=>{h==null||h.interpolate((k==null?void 0:k.interpolate)==="linear"?ro:wy).transform(i_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>F(!0)),I)}):Promise.resolve(!1)}function y({noWheelClassName:I,noPanClassName:k,onPaneContextMenu:F,userSelectionActive:$,panOnScroll:q,panOnDrag:L,panOnScrollMode:z,panOnScrollSpeed:U,preventScrolling:K,zoomOnPinch:Z,zoomOnScroll:H,zoomOnDoubleClick:V,zoomActivationKeyPressed:X,lib:Y,onTransformChange:G,connectionInProgress:Q,paneClickDistance:J,selectionOnDrag:re}){$&&!f.isZoomingOrPanning&&S();const ne=q&&!X&&!$;h.clickDistance(re?1/0:!Pi(J)||J<0?0:J);const fe=ne?$ve({zoomPanValues:f,noWheelClassName:I,d3Selection:m,d3Zoom:h,panOnScrollMode:z,panOnScrollSpeed:U,zoomOnPinch:Z,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:l}):Bve({noWheelClassName:I,preventScrolling:K,d3ZoomHandler:g});if(m.on("wheel.zoom",fe,{passive:!1}),!$){const oe=qve({zoomPanValues:f,onDraggingChange:u,onPanZoomStart:o});h.on("start",oe);const ye=zve({zoomPanValues:f,panOnDrag:L,onPaneContextMenu:!!F,onPanZoom:a,onTransformChange:G});h.on("zoom",ye);const be=Vve({zoomPanValues:f,panOnDrag:L,panOnScroll:q,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:u});h.on("end",be)}const he=Fve({zoomActivationKeyPressed:X,panOnDrag:L,zoomOnScroll:H,panOnScroll:q,zoomOnDoubleClick:V,zoomOnPinch:Z,userSelectionActive:$,noPanClassName:k,noWheelClassName:I,lib:Y,connectionInProgress:Q});h.filter(he),V?m.on("dblclick.zoom",b):m.on("dblclick.zoom",null)}function S(){h.on("zoom",null)}async function E(I,k,F){const $=r_(I),q=h==null?void 0:h.constrain()($,k,F);return q&&await w(q),new Promise(L=>L(q))}async function _(I,k){const F=r_(I);return await w(F,k),new Promise($=>$(F))}function A(I){if(m){const k=r_(I),F=m.property("__zoom");(F.k!==I.zoom||F.x!==I.x||F.y!==I.y)&&(h==null||h.transform(m,k,null,{sync:!0}))}}function T(){const I=m?nK(m.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}function O(I,k){return m?new Promise(F=>{h==null||h.interpolate((k==null?void 0:k.interpolate)==="linear"?ro:wy).scaleTo(i_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>F(!0)),I)}):Promise.resolve(!1)}function P(I,k){return m?new Promise(F=>{h==null||h.interpolate((k==null?void 0:k.interpolate)==="linear"?ro:wy).scaleBy(i_(m,k==null?void 0:k.duration,k==null?void 0:k.ease,()=>F(!0)),I)}):Promise.resolve(!1)}function M(I){h==null||h.scaleExtent(I)}function R(I){h==null||h.translateExtent(I)}function D(I){const k=!Pi(I)||I<0?0:I;h==null||h.clickDistance(k)}return{update:y,destroy:S,setViewport:_,setViewportConstrained:E,getViewport:T,scaleTo:O,scaleBy:P,setScaleExtent:M,setTranslateExtent:R,syncViewport:A,setClickDistance:D}}var Rf;(function(e){e.Line="line",e.Handle="handle"})(Rf||(Rf={}));function Hve({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){const o=e-t,l=n-r,u=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&i&&(u[0]=u[0]*-1),l&&a&&(u[1]=u[1]*-1),u}function OB(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),i=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:i}}function ts(e,t){return Math.max(0,t-e)}function ns(e,t){return Math.max(0,e-t)}function Hv(e,t,n){return Math.max(0,t-e,e-n)}function jB(e,t){return e?!t:t}function Gve(e,t,n,r,i,a,o,l){let{affectsX:u,affectsY:f}=t;const{isHorizontal:d,isVertical:h}=t,m=d&&h,{xSnapped:g,ySnapped:b}=n,{minWidth:w,maxWidth:y,minHeight:S,maxHeight:E}=r,{x:_,y:A,width:T,height:O,aspectRatio:P}=e;let M=Math.floor(d?g-e.pointerX:0),R=Math.floor(h?b-e.pointerY:0);const D=T+(u?-M:M),I=O+(f?-R:R),k=-a[0]*T,F=-a[1]*O;let $=Hv(D,w,y),q=Hv(I,S,E);if(o){let U=0,K=0;u&&M<0?U=ts(_+M+k,o[0][0]):!u&&M>0&&(U=ns(_+D+k,o[1][0])),f&&R<0?K=ts(A+R+F,o[0][1]):!f&&R>0&&(K=ns(A+I+F,o[1][1])),$=Math.max($,U),q=Math.max(q,K)}if(l){let U=0,K=0;u&&M>0?U=ns(_+M,l[0][0]):!u&&M<0&&(U=ts(_+D,l[1][0])),f&&R>0?K=ns(A+R,l[0][1]):!f&&R<0&&(K=ts(A+I,l[1][1])),$=Math.max($,U),q=Math.max(q,K)}if(i){if(d){const U=Hv(D/P,S,E)*P;if($=Math.max($,U),o){let K=0;!u&&!f||u&&!f&&m?K=ns(A+F+D/P,o[1][1])*P:K=ts(A+F+(u?M:-M)/P,o[0][1])*P,$=Math.max($,K)}if(l){let K=0;!u&&!f||u&&!f&&m?K=ts(A+D/P,l[1][1])*P:K=ns(A+(u?M:-M)/P,l[0][1])*P,$=Math.max($,K)}}if(h){const U=Hv(I*P,w,y)/P;if(q=Math.max(q,U),o){let K=0;!u&&!f||f&&!u&&m?K=ns(_+I*P+k,o[1][0])/P:K=ts(_+(f?R:-R)*P+k,o[0][0])/P,q=Math.max(q,K)}if(l){let K=0;!u&&!f||f&&!u&&m?K=ts(_+I*P,l[1][0])/P:K=ns(_+(f?R:-R)*P,l[0][0])/P,q=Math.max(q,K)}}}R=R+(R<0?q:-q),M=M+(M<0?$:-$),i&&(m?D>I*P?R=(jB(u,f)?-M:M)/P:M=(jB(u,f)?-R:R)*P:d?(R=M/P,f=u):(M=R*P,u=f));const L=u?_+M:_,z=f?A+R:A;return{width:T+(u?-M:M),height:O+(f?-R:R),x:a[0]*M*(u?-1:1)+L,y:a[1]*R*(f?-1:1)+z}}const MK={width:0,height:0,x:0,y:0},Wve={...MK,pointerX:0,pointerY:0,aspectRatio:1};function Kve(e){return[[0,0],[e.measured.width,e.measured.height]]}function Yve(e,t,n){const r=t.position.x+e.position.x,i=t.position.y+e.position.y,a=e.measured.width??0,o=e.measured.height??0,l=n[0]*a,u=n[1]*o;return[[r-l,i-u],[r+a-l,i+o-u]]}function Xve({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){const a=Lr(e);let o={controlDirection:OB("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:f,boundaries:d,keepAspectRatio:h,resizeDirection:m,onResizeStart:g,onResize:b,onResizeEnd:w,shouldResize:y}){let S={...MK},E={...Wve};o={boundaries:d,resizeDirection:m,keepAspectRatio:h,controlDirection:OB(f)};let _,A=null,T=[],O,P,M,R=!1;const D=VW().on("start",I=>{const{nodeLookup:k,transform:F,snapGrid:$,snapToGrid:q,nodeOrigin:L,paneDomNode:z}=n();if(_=k.get(t),!_)return;A=(z==null?void 0:z.getBoundingClientRect())??null;const{xSnapped:U,ySnapped:K}=sp(I.sourceEvent,{transform:F,snapGrid:$,snapToGrid:q,containerBounds:A});S={width:_.measured.width??0,height:_.measured.height??0,x:_.position.x??0,y:_.position.y??0},E={...S,pointerX:U,pointerY:K,aspectRatio:S.width/S.height},O=void 0,_.parentId&&(_.extent==="parent"||_.expandParent)&&(O=k.get(_.parentId),P=O&&_.extent==="parent"?Kve(O):void 0),T=[],M=void 0;for(const[Z,H]of k)if(H.parentId===t&&(T.push({id:Z,position:{...H.position},extent:H.extent}),H.extent==="parent"||H.expandParent)){const V=Yve(H,_,H.origin??L);M?M=[[Math.min(V[0][0],M[0][0]),Math.min(V[0][1],M[0][1])],[Math.max(V[1][0],M[1][0]),Math.max(V[1][1],M[1][1])]]:M=V}g==null||g(I,{...S})}).on("drag",I=>{const{transform:k,snapGrid:F,snapToGrid:$,nodeOrigin:q}=n(),L=sp(I.sourceEvent,{transform:k,snapGrid:F,snapToGrid:$,containerBounds:A}),z=[];if(!_)return;const{x:U,y:K,width:Z,height:H}=S,V={},X=_.origin??q,{width:Y,height:G,x:Q,y:J}=Gve(E,o.controlDirection,L,o.boundaries,o.keepAspectRatio,X,P,M),re=Y!==Z,ne=G!==H,fe=Q!==U&&re,he=J!==K&≠if(!fe&&!he&&!re&&!ne)return;if((fe||he||X[0]===1||X[1]===1)&&(V.x=fe?Q:S.x,V.y=he?J:S.y,S.x=V.x,S.y=V.y,T.length>0)){const xe=Q-U,Ee=J-K;for(const _e of T)_e.position={x:_e.position.x-xe+X[0]*(Y-Z),y:_e.position.y-Ee+X[1]*(G-H)},z.push(_e)}if((re||ne)&&(V.width=re&&(!o.resizeDirection||o.resizeDirection==="horizontal")?Y:S.width,V.height=ne&&(!o.resizeDirection||o.resizeDirection==="vertical")?G:S.height,S.width=V.width,S.height=V.height),O&&_.expandParent){const xe=X[0]*(V.width??0);V.x&&V.x<xe&&(S.x=xe,E.x=E.x-(V.x-xe));const Ee=X[1]*(V.height??0);V.y&&V.y<Ee&&(S.y=Ee,E.y=E.y-(V.y-Ee))}const oe=Hve({width:S.width,prevWidth:Z,height:S.height,prevHeight:H,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),ye={...S,direction:oe};(y==null?void 0:y(I,ye))!==!1&&(R=!0,b==null||b(I,ye),r(V,z))}).on("end",I=>{R&&(w==null||w(I,{...S}),i==null||i({...S}),R=!1)});a.call(D)}function u(){a.on(".drag",null)}return{update:l,destroy:u}}const Zve={},NB=e=>{let t;const n=new Set,r=(d,h)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const g=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(b=>b(t,g))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d)),destroy:()=>{(Zve?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,u);return u},Qve=e=>e?NB(e):NB,{useDebugValue:Jve}=ie,{useSyncExternalStoreWithSelector:eye}=Eoe,tye=e=>e;function RK(e,t=tye,n){const r=eye(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Jve(r),r}const PB=(e,t)=>{const n=Qve(e),r=(i,a=t)=>RK(n,i,a);return Object.assign(r,n),r},nye=(e,t)=>e?PB(e,t):PB;function Kt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const ex=j.createContext(null),rye=ex.Provider,kK=ha.error001();function ct(e,t){const n=j.useContext(ex);if(n===null)throw new Error(kK);return RK(n,e,t)}function Xt(){const e=j.useContext(ex);if(e===null)throw new Error(kK);return j.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const MB={display:"none"},iye={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},DK="react-flow__node-desc",IK="react-flow__edge-desc",aye="react-flow__aria-live",oye=e=>e.ariaLiveMessage,sye=e=>e.ariaLabelConfig;function lye({rfId:e}){const t=ct(oye);return x.jsx("div",{id:`${aye}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:iye,children:t})}function uye({rfId:e,disableKeyboardA11y:t}){const n=ct(sye);return x.jsxs(x.Fragment,{children:[x.jsx("div",{id:`${DK}-${e}`,style:MB,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),x.jsx("div",{id:`${IK}-${e}`,style:MB,children:n["edge.a11yDescription.default"]}),!t&&x.jsx(lye,{rfId:e})]})}const tx=j.forwardRef(({position:e="top-left",children:t,className:n,style:r,...i},a)=>{const o=`${e}`.split("-");return x.jsx("div",{className:yn(["react-flow__panel",n,...o]),style:r,ref:a,...i,children:t})});tx.displayName="Panel";function cye({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:x.jsx(tx,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:x.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const fye=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Gv=e=>e.id;function dye(e,t){return Kt(e.selectedNodes.map(Gv),t.selectedNodes.map(Gv))&&Kt(e.selectedEdges.map(Gv),t.selectedEdges.map(Gv))}function hye({onSelectionChange:e}){const t=Xt(),{selectedNodes:n,selectedEdges:r}=ct(fye,dye);return j.useEffect(()=>{const i={nodes:n,edges:r};e==null||e(i),t.getState().onSelectionChangeHandlers.forEach(a=>a(i))},[n,r,e]),null}const pye=e=>!!e.onSelectionChangeHandlers;function mye({onSelectionChange:e}){const t=ct(pye);return e||t?x.jsx(hye,{onSelectionChange:e}):null}const ON=typeof window<"u"?j.useLayoutEffect:j.useEffect,LK=[0,0],gye={x:0,y:0,zoom:1},vye=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],RB=[...vye,"rfId"],yye=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),kB={translateExtent:Dp,nodeOrigin:LK,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function bye(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:i,setTranslateExtent:a,setNodeExtent:o,reset:l,setDefaultNodesAndEdges:u}=ct(yye,Kt),f=Xt();ON(()=>(u(e.defaultNodes,e.defaultEdges),()=>{d.current=kB,l()}),[]);const d=j.useRef(kB);return ON(()=>{for(const h of RB){const m=e[h],g=d.current[h];m!==g&&(typeof e[h]>"u"||(h==="nodes"?t(m):h==="edges"?n(m):h==="minZoom"?r(m):h==="maxZoom"?i(m):h==="translateExtent"?a(m):h==="nodeExtent"?o(m):h==="ariaLabelConfig"?f.setState({ariaLabelConfig:lve(m)}):h==="fitView"?f.setState({fitViewQueued:m}):h==="fitViewOptions"?f.setState({fitViewOptions:m}):f.setState({[h]:m})))}d.current=e},RB.map(h=>e[h])),null}function DB(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function xye(e){var r;const[t,n]=j.useState(e==="system"?null:e);return j.useEffect(()=>{if(e!=="system"){n(e);return}const i=DB(),a=()=>n(i!=null&&i.matches?"dark":"light");return a(),i==null||i.addEventListener("change",a),()=>{i==null||i.removeEventListener("change",a)}},[e]),t!==null?t:(r=DB())!=null&&r.matches?"dark":"light"}const IB=typeof document<"u"?document:null;function Bp(e=null,t={target:IB,actInsideInputWithModifier:!0}){const[n,r]=j.useState(!1),i=j.useRef(!1),a=j.useRef(new Set([])),[o,l]=j.useMemo(()=>{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(h=>typeof h=="string").map(h=>h.replace("+",`
|
|
360
|
+
`).replace(`
|
|
361
|
+
|
|
362
|
+
`,`
|
|
363
|
+
+`).split(`
|
|
364
|
+
`)),d=f.reduce((h,m)=>h.concat(...m),[]);return[f,d]}return[[],[]]},[e]);return j.useEffect(()=>{const u=(t==null?void 0:t.target)??IB,f=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const d=g=>{var y,S;if(i.current=g.ctrlKey||g.metaKey||g.shiftKey||g.altKey,(!i.current||i.current&&!f)&&gK(g))return!1;const w=$B(g.code,l);if(a.current.add(g[w]),LB(o,a.current,!1)){const E=((S=(y=g.composedPath)==null?void 0:y.call(g))==null?void 0:S[0])||g.target,_=(E==null?void 0:E.nodeName)==="BUTTON"||(E==null?void 0:E.nodeName)==="A";t.preventDefault!==!1&&(i.current||!_)&&g.preventDefault(),r(!0)}},h=g=>{const b=$B(g.code,l);LB(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(g[b]),g.key==="Meta"&&a.current.clear(),i.current=!1},m=()=>{a.current.clear(),r(!1)};return u==null||u.addEventListener("keydown",d),u==null||u.addEventListener("keyup",h),window.addEventListener("blur",m),window.addEventListener("contextmenu",m),()=>{u==null||u.removeEventListener("keydown",d),u==null||u.removeEventListener("keyup",h),window.removeEventListener("blur",m),window.removeEventListener("contextmenu",m)}}},[e,r]),n}function LB(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function $B(e,t){return t.includes(e)?"code":"key"}const wye=()=>{const e=Xt();return j.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,i,a],panZoom:o}=e.getState();return o?(await o.setViewport({x:t.x??r,y:t.y??i,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:i,minZoom:a,maxZoom:o,panZoom:l}=e.getState(),u=jR(t,r,i,a,o,(n==null?void 0:n.padding)??.1);return l?(await l.setViewport(u,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:i,snapToGrid:a,domNode:o}=e.getState();if(!o)return t;const{x:l,y:u}=o.getBoundingClientRect(),f={x:t.x-l,y:t.y-u},d=n.snapGrid??i,h=n.snapToGrid??a;return Um(f,r,h,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:i,y:a}=r.getBoundingClientRect(),o=pb(t,n);return{x:o.x+i,y:o.y+a}}}),[])};function $K(e,t){const n=[],r=new Map,i=[];for(const a of e)if(a.type==="add"){i.push(a);continue}else if(a.type==="remove"||a.type==="replace")r.set(a.id,[a]);else{const o=r.get(a.id);o?o.push(a):r.set(a.id,[a])}for(const a of t){const o=r.get(a.id);if(!o){n.push(a);continue}if(o[0].type==="remove")continue;if(o[0].type==="replace"){n.push({...o[0].item});continue}const l={...a};for(const u of o)Sye(u,l);n.push(l)}return i.length&&i.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function Sye(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function _ye(e,t){return $K(e,t)}function Eye(e,t){return $K(e,t)}function kl(e,t){return{id:e,type:"select",selected:t}}function zc(e,t=new Set,n=!1){const r=[];for(const[i,a]of e){const o=t.has(i);!(a.selected===void 0&&!o)&&a.selected!==o&&(n&&(a.selected=o),r.push(kl(a.id,o)))}return r}function BB({items:e=[],lookup:t}){var i;const n=[],r=new Map(e.map(a=>[a.id,a]));for(const[a,o]of e.entries()){const l=t.get(o.id),u=((i=l==null?void 0:l.internals)==null?void 0:i.userNode)??l;u!==void 0&&u!==o&&n.push({id:o.id,item:o,type:"replace"}),u===void 0&&n.push({item:o,type:"add",index:a})}for(const[a]of t)r.get(a)===void 0&&n.push({id:a,type:"remove"});return n}function qB(e){return{id:e.id,type:"remove"}}const zB=e=>Qge(e),Aye=e=>lK(e);function BK(e){return j.forwardRef(e)}function VB(e){const[t,n]=j.useState(BigInt(0)),[r]=j.useState(()=>Tye(()=>n(i=>i+BigInt(1))));return ON(()=>{const i=r.get();i.length&&(e(i),r.reset())},[t]),r}function Tye(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const qK=j.createContext(null);function Cye({children:e}){const t=Xt(),n=j.useCallback(l=>{const{nodes:u=[],setNodes:f,hasDefaultNodes:d,onNodesChange:h,nodeLookup:m,fitViewQueued:g,onNodesChangeMiddlewareMap:b}=t.getState();let w=u;for(const S of l)w=typeof S=="function"?S(w):S;let y=BB({items:w,lookup:m});for(const S of b.values())y=S(y);d&&f(w),y.length>0?h==null||h(y):g&&window.requestAnimationFrame(()=>{const{fitViewQueued:S,nodes:E,setNodes:_}=t.getState();S&&_(E)})},[]),r=VB(n),i=j.useCallback(l=>{const{edges:u=[],setEdges:f,hasDefaultEdges:d,onEdgesChange:h,edgeLookup:m}=t.getState();let g=u;for(const b of l)g=typeof b=="function"?b(g):b;d?f(g):h&&h(BB({items:g,lookup:m}))},[]),a=VB(i),o=j.useMemo(()=>({nodeQueue:r,edgeQueue:a}),[]);return x.jsx(qK.Provider,{value:o,children:e})}function Oye(){const e=j.useContext(qK);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const jye=e=>!!e.panZoom;function IR(){const e=wye(),t=Xt(),n=Oye(),r=ct(jye),i=j.useMemo(()=>{const a=h=>t.getState().nodeLookup.get(h),o=h=>{n.nodeQueue.push(h)},l=h=>{n.edgeQueue.push(h)},u=h=>{var S,E;const{nodeLookup:m,nodeOrigin:g}=t.getState(),b=zB(h)?h:m.get(h.id),w=b.parentId?pK(b.position,b.measured,b.parentId,m,g):b.position,y={...b,position:w,width:((S=b.measured)==null?void 0:S.width)??b.width,height:((E=b.measured)==null?void 0:E.height)??b.height};return Pf(y)},f=(h,m,g={replace:!1})=>{o(b=>b.map(w=>{if(w.id===h){const y=typeof m=="function"?m(w):m;return g.replace&&zB(y)?y:{...w,...y}}return w}))},d=(h,m,g={replace:!1})=>{l(b=>b.map(w=>{if(w.id===h){const y=typeof m=="function"?m(w):m;return g.replace&&Aye(y)?y:{...w,...y}}return w}))};return{getNodes:()=>t.getState().nodes.map(h=>({...h})),getNode:h=>{var m;return(m=a(h))==null?void 0:m.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:h=[]}=t.getState();return h.map(m=>({...m}))},getEdge:h=>t.getState().edgeLookup.get(h),setNodes:o,setEdges:l,addNodes:h=>{const m=Array.isArray(h)?h:[h];n.nodeQueue.push(g=>[...g,...m])},addEdges:h=>{const m=Array.isArray(h)?h:[h];n.edgeQueue.push(g=>[...g,...m])},toObject:()=>{const{nodes:h=[],edges:m=[],transform:g}=t.getState(),[b,w,y]=g;return{nodes:h.map(S=>({...S})),edges:m.map(S=>({...S})),viewport:{x:b,y:w,zoom:y}}},deleteElements:async({nodes:h=[],edges:m=[]})=>{const{nodes:g,edges:b,onNodesDelete:w,onEdgesDelete:y,triggerNodeChanges:S,triggerEdgeChanges:E,onDelete:_,onBeforeDelete:A}=t.getState(),{nodes:T,edges:O}=await rve({nodesToRemove:h,edgesToRemove:m,nodes:g,edges:b,onBeforeDelete:A}),P=O.length>0,M=T.length>0;if(P){const R=O.map(qB);y==null||y(O),E(R)}if(M){const R=T.map(qB);w==null||w(T),S(R)}return(M||P)&&(_==null||_({nodes:T,edges:O})),{deletedNodes:T,deletedEdges:O}},getIntersectingNodes:(h,m=!0,g)=>{const b=vB(h),w=b?h:u(h),y=g!==void 0;return w?(g||t.getState().nodes).filter(S=>{const E=t.getState().nodeLookup.get(S.id);if(E&&!b&&(S.id===h.id||!E.internals.positionAbsolute))return!1;const _=Pf(y?S:E),A=Lp(_,w);return m&&A>0||A>=_.width*_.height||A>=w.width*w.height}):[]},isNodeIntersecting:(h,m,g=!0)=>{const w=vB(h)?h:u(h);if(!w)return!1;const y=Lp(w,m);return g&&y>0||y>=m.width*m.height||y>=w.width*w.height},updateNode:f,updateNodeData:(h,m,g={replace:!1})=>{f(h,b=>{const w=typeof m=="function"?m(b):m;return g.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},g)},updateEdge:d,updateEdgeData:(h,m,g={replace:!1})=>{d(h,b=>{const w=typeof m=="function"?m(b):m;return g.replace?{...b,data:w}:{...b,data:{...b.data,...w}}},g)},getNodesBounds:h=>{const{nodeLookup:m,nodeOrigin:g}=t.getState();return Jge(h,{nodeLookup:m,nodeOrigin:g})},getHandleConnections:({type:h,id:m,nodeId:g})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${g}-${h}${m?`-${m}`:""}`))==null?void 0:b.values())??[])},getNodeConnections:({type:h,handleId:m,nodeId:g})=>{var b;return Array.from(((b=t.getState().connectionLookup.get(`${g}${h?m?`-${h}-${m}`:`-${h}`:""}`))==null?void 0:b.values())??[])},fitView:async h=>{const m=t.getState().fitViewResolver??sve();return t.setState({fitViewQueued:!0,fitViewOptions:h,fitViewResolver:m}),n.nodeQueue.push(g=>[...g]),m.promise}}},[]);return j.useMemo(()=>({...i,...e,viewportInitialized:r}),[r])}const FB=e=>e.selected,Nye=typeof window<"u"?window:void 0;function Pye({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Xt(),{deleteElements:r}=IR(),i=Bp(e,{actInsideInputWithModifier:!1}),a=Bp(t,{target:Nye});j.useEffect(()=>{if(i){const{edges:o,nodes:l}=n.getState();r({nodes:l.filter(FB),edges:o.filter(FB)}),n.setState({nodesSelectionActive:!1})}},[i]),j.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function Mye(e){const t=Xt();j.useEffect(()=>{const n=()=>{var i,a,o,l;if(!e.current||!(((a=(i=e.current).checkVisibility)==null?void 0:a.call(i))??!0))return!1;const r=NR(e.current);(r.height===0||r.width===0)&&((l=(o=t.getState()).onError)==null||l.call(o,"004",ha.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const nx={position:"absolute",width:"100%",height:"100%",top:0,left:0},Rye=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function kye({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:i=.5,panOnScrollMode:a=su.Free,zoomOnDoubleClick:o=!0,panOnDrag:l=!0,defaultViewport:u,translateExtent:f,minZoom:d,maxZoom:h,zoomActivationKeyCode:m,preventScrolling:g=!0,children:b,noWheelClassName:w,noPanClassName:y,onViewportChange:S,isControlledViewport:E,paneClickDistance:_,selectionOnDrag:A}){const T=Xt(),O=j.useRef(null),{userSelectionActive:P,lib:M,connectionInProgress:R}=ct(Rye,Kt),D=Bp(m),I=j.useRef();Mye(O);const k=j.useCallback(F=>{S==null||S({x:F[0],y:F[1],zoom:F[2]}),E||T.setState({transform:F})},[S,E]);return j.useEffect(()=>{if(O.current){I.current=Uve({domNode:O.current,minZoom:d,maxZoom:h,translateExtent:f,viewport:u,onDraggingChange:L=>T.setState(z=>z.paneDragging===L?z:{paneDragging:L}),onPanZoomStart:(L,z)=>{const{onViewportChangeStart:U,onMoveStart:K}=T.getState();K==null||K(L,z),U==null||U(z)},onPanZoom:(L,z)=>{const{onViewportChange:U,onMove:K}=T.getState();K==null||K(L,z),U==null||U(z)},onPanZoomEnd:(L,z)=>{const{onViewportChangeEnd:U,onMoveEnd:K}=T.getState();K==null||K(L,z),U==null||U(z)}});const{x:F,y:$,zoom:q}=I.current.getViewport();return T.setState({panZoom:I.current,transform:[F,$,q],domNode:O.current.closest(".react-flow")}),()=>{var L;(L=I.current)==null||L.destroy()}}},[]),j.useEffect(()=>{var F;(F=I.current)==null||F.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:i,panOnScrollMode:a,zoomOnDoubleClick:o,panOnDrag:l,zoomActivationKeyPressed:D,preventScrolling:g,noPanClassName:y,userSelectionActive:P,noWheelClassName:w,lib:M,onTransformChange:k,connectionInProgress:R,selectionOnDrag:A,paneClickDistance:_})},[e,t,n,r,i,a,o,l,D,g,y,P,w,M,k,R,A,_]),x.jsx("div",{className:"react-flow__renderer",ref:O,style:nx,children:b})}const Dye=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Iye(){const{userSelectionActive:e,userSelectionRect:t}=ct(Dye,Kt);return e&&t?x.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const a_=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Lye=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function $ye({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Ip.Full,panOnDrag:r,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:l,onPaneClick:u,onPaneContextMenu:f,onPaneScroll:d,onPaneMouseEnter:h,onPaneMouseMove:m,onPaneMouseLeave:g,children:b}){const w=Xt(),{userSelectionActive:y,elementsSelectable:S,dragging:E,connectionInProgress:_}=ct(Lye,Kt),A=S&&(e||y),T=j.useRef(null),O=j.useRef(),P=j.useRef(new Set),M=j.useRef(new Set),R=j.useRef(!1),D=U=>{if(R.current||_){R.current=!1;return}u==null||u(U),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},I=U=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){U.preventDefault();return}f==null||f(U)},k=d?U=>d(U):void 0,F=U=>{R.current&&(U.stopPropagation(),R.current=!1)},$=U=>{var G,Q;const{domNode:K}=w.getState();if(O.current=K==null?void 0:K.getBoundingClientRect(),!O.current)return;const Z=U.target===T.current;if(!Z&&!!U.target.closest(".nokey")||!e||!(a&&Z||t)||U.button!==0||!U.isPrimary)return;(Q=(G=U.target)==null?void 0:G.setPointerCapture)==null||Q.call(G,U.pointerId),R.current=!1;const{x:X,y:Y}=Mi(U.nativeEvent,O.current);w.setState({userSelectionRect:{width:0,height:0,startX:X,startY:Y,x:X,y:Y}}),Z||(U.stopPropagation(),U.preventDefault())},q=U=>{const{userSelectionRect:K,transform:Z,nodeLookup:H,edgeLookup:V,connectionLookup:X,triggerNodeChanges:Y,triggerEdgeChanges:G,defaultEdgeOptions:Q,resetSelectedElements:J}=w.getState();if(!O.current||!K)return;const{x:re,y:ne}=Mi(U.nativeEvent,O.current),{startX:fe,startY:he}=K;if(!R.current){const Ee=t?0:i;if(Math.hypot(re-fe,ne-he)<=Ee)return;J(),o==null||o(U)}R.current=!0;const oe={startX:fe,startY:he,x:re<fe?re:fe,y:ne<he?ne:he,width:Math.abs(re-fe),height:Math.abs(ne-he)},ye=P.current,be=M.current;P.current=new Set(OR(H,oe,Z,n===Ip.Partial,!0).map(Ee=>Ee.id)),M.current=new Set;const xe=(Q==null?void 0:Q.selectable)??!0;for(const Ee of P.current){const _e=X.get(Ee);if(_e)for(const{edgeId:tt}of _e.values()){const nt=V.get(tt);nt&&(nt.selectable??xe)&&M.current.add(tt)}}if(!yB(ye,P.current)){const Ee=zc(H,P.current,!0);Y(Ee)}if(!yB(be,M.current)){const Ee=zc(V,M.current);G(Ee)}w.setState({userSelectionRect:oe,userSelectionActive:!0,nodesSelectionActive:!1})},L=U=>{var K,Z;U.button===0&&((Z=(K=U.target)==null?void 0:K.releasePointerCapture)==null||Z.call(K,U.pointerId),!y&&U.target===T.current&&w.getState().userSelectionRect&&(D==null||D(U)),w.setState({userSelectionActive:!1,userSelectionRect:null}),R.current&&(l==null||l(U),w.setState({nodesSelectionActive:P.current.size>0})))},z=r===!0||Array.isArray(r)&&r.includes(0);return x.jsxs("div",{className:yn(["react-flow__pane",{draggable:z,dragging:E,selection:e}]),onClick:A?void 0:a_(D,T),onContextMenu:a_(I,T),onWheel:a_(k,T),onPointerEnter:A?void 0:h,onPointerMove:A?q:m,onPointerUp:A?L:void 0,onPointerDownCapture:A?$:void 0,onClickCapture:A?F:void 0,onPointerLeave:g,ref:T,style:nx,children:[b,x.jsx(Iye,{})]})}function jN({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeLookup:l,onError:u}=t.getState(),f=l.get(e);if(!f){u==null||u("012",ha.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&o)&&(a({nodes:[f],edges:[]}),requestAnimationFrame(()=>{var d;return(d=r==null?void 0:r.current)==null?void 0:d.blur()})):i([e])}function zK({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,nodeClickDistance:o}){const l=Xt(),[u,f]=j.useState(!1),d=j.useRef();return j.useEffect(()=>{d.current=Nve({getStoreItems:()=>l.getState(),onNodeMouseDown:h=>{jN({id:h,store:l,nodeRef:e})},onDragStart:()=>{f(!0)},onDragStop:()=>{f(!1)}})},[]),j.useEffect(()=>{if(!(t||!e.current||!d.current))return d.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:i,nodeClickDistance:o}),()=>{var h;(h=d.current)==null||h.destroy()}},[n,r,t,a,e,i,o]),u}const Bye=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function VK(){const e=Xt();return j.useCallback(n=>{const{nodeExtent:r,snapToGrid:i,snapGrid:a,nodesDraggable:o,onError:l,updateNodePositions:u,nodeLookup:f,nodeOrigin:d}=e.getState(),h=new Map,m=Bye(o),g=i?a[0]:5,b=i?a[1]:5,w=n.direction.x*g*n.factor,y=n.direction.y*b*n.factor;for(const[,S]of f){if(!m(S))continue;let E={x:S.internals.positionAbsolute.x+w,y:S.internals.positionAbsolute.y+y};i&&(E=Fm(E,a));const{position:_,positionAbsolute:A}=uK({nodeId:S.id,nextPosition:E,nodeLookup:f,nodeExtent:r,nodeOrigin:d,onError:l});S.position=_,S.internals.positionAbsolute=A,h.set(S.id,S)}u(h)},[])}const LR=j.createContext(null),qye=LR.Provider;LR.Consumer;const FK=()=>j.useContext(LR),zye=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),Vye=(e,t,n)=>r=>{const{connectionClickStartHandle:i,connectionMode:a,connection:o}=r,{fromHandle:l,toHandle:u,isValid:f}=o,d=(u==null?void 0:u.nodeId)===e&&(u==null?void 0:u.id)===t&&(u==null?void 0:u.type)===n;return{connectingFrom:(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n,connectingTo:d,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.id)===t&&(i==null?void 0:i.type)===n,isPossibleEndHandle:a===jf.Strict?(l==null?void 0:l.type)!==n:e!==(l==null?void 0:l.nodeId)||t!==(l==null?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:d&&f}};function Fye({type:e="source",position:t=Ie.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:l,children:u,className:f,onMouseDown:d,onTouchStart:h,...m},g){var q,L;const b=o||null,w=e==="target",y=Xt(),S=FK(),{connectOnClick:E,noPanClassName:_,rfId:A}=ct(zye,Kt),{connectingFrom:T,connectingTo:O,clickConnecting:P,isPossibleEndHandle:M,connectionInProcess:R,clickConnectionInProcess:D,valid:I}=ct(Vye(S,b,e),Kt);S||(L=(q=y.getState()).onError)==null||L.call(q,"010",ha.error010());const k=z=>{const{defaultEdgeOptions:U,onConnect:K,hasDefaultEdges:Z}=y.getState(),H={...U,...z};if(Z){const{edges:V,setEdges:X}=y.getState();X(pve(H,V))}K==null||K(H),l==null||l(H)},F=z=>{if(!S)return;const U=vK(z.nativeEvent);if(i&&(U&&z.button===0||!U)){const K=y.getState();CN.onPointerDown(z.nativeEvent,{handleDomNode:z.currentTarget,autoPanOnConnect:K.autoPanOnConnect,connectionMode:K.connectionMode,connectionRadius:K.connectionRadius,domNode:K.domNode,nodeLookup:K.nodeLookup,lib:K.lib,isTarget:w,handleId:b,nodeId:S,flowId:K.rfId,panBy:K.panBy,cancelConnection:K.cancelConnection,onConnectStart:K.onConnectStart,onConnectEnd:(...Z)=>{var H,V;return(V=(H=y.getState()).onConnectEnd)==null?void 0:V.call(H,...Z)},updateConnection:K.updateConnection,onConnect:k,isValidConnection:n||((...Z)=>{var H,V;return((V=(H=y.getState()).isValidConnection)==null?void 0:V.call(H,...Z))??!0}),getTransform:()=>y.getState().transform,getFromHandle:()=>y.getState().connection.fromHandle,autoPanSpeed:K.autoPanSpeed,dragThreshold:K.connectionDragThreshold})}U?d==null||d(z):h==null||h(z)},$=z=>{const{onClickConnectStart:U,onClickConnectEnd:K,connectionClickStartHandle:Z,connectionMode:H,isValidConnection:V,lib:X,rfId:Y,nodeLookup:G,connection:Q}=y.getState();if(!S||!Z&&!i)return;if(!Z){U==null||U(z.nativeEvent,{nodeId:S,handleId:b,handleType:e}),y.setState({connectionClickStartHandle:{nodeId:S,type:e,id:b}});return}const J=mK(z.target),re=n||V,{connection:ne,isValid:fe}=CN.isValid(z.nativeEvent,{handle:{nodeId:S,id:b,type:e},connectionMode:H,fromNodeId:Z.nodeId,fromHandleId:Z.id||null,fromType:Z.type,isValidConnection:re,flowId:Y,doc:J,lib:X,nodeLookup:G});fe&&ne&&k(ne);const he=structuredClone(Q);delete he.inProgress,he.toPosition=he.toHandle?he.toHandle.position:null,K==null||K(z,he),y.setState({connectionClickStartHandle:null})};return x.jsx("div",{"data-handleid":b,"data-nodeid":S,"data-handlepos":t,"data-id":`${A}-${S}-${b}-${e}`,className:yn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",_,f,{source:!w,target:w,connectable:r,connectablestart:i,connectableend:a,clickconnecting:P,connectingfrom:T,connectingto:O,valid:I,connectionindicator:r&&(!R||M)&&(R||D?a:i)}]),onMouseDown:F,onTouchStart:F,onClick:E?$:void 0,ref:g,...m,children:u})}const kf=j.memo(BK(Fye));function Uye({data:e,isConnectable:t,sourcePosition:n=Ie.Bottom}){return x.jsxs(x.Fragment,{children:[e==null?void 0:e.label,x.jsx(kf,{type:"source",position:n,isConnectable:t})]})}function Hye({data:e,isConnectable:t,targetPosition:n=Ie.Top,sourcePosition:r=Ie.Bottom}){return x.jsxs(x.Fragment,{children:[x.jsx(kf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,x.jsx(kf,{type:"source",position:r,isConnectable:t})]})}function Gye(){return null}function Wye({data:e,isConnectable:t,targetPosition:n=Ie.Top}){return x.jsxs(x.Fragment,{children:[x.jsx(kf,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const mb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},UB={input:Uye,default:Hye,output:Wye,group:Gye};function Kye(e){var t,n,r,i;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((r=e.style)==null?void 0:r.width),height:e.height??((i=e.style)==null?void 0:i.height)}}const Yye=e=>{const{width:t,height:n,x:r,y:i}=Vm(e.nodeLookup,{filter:a=>!!a.selected});return{width:Pi(t)?t:null,height:Pi(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${i}px)`}};function Xye({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Xt(),{width:i,height:a,transformString:o,userSelectionActive:l}=ct(Yye,Kt),u=VK(),f=j.useRef(null);j.useEffect(()=>{var g;n||(g=f.current)==null||g.focus({preventScroll:!0})},[n]);const d=!l&&i!==null&&a!==null;if(zK({nodeRef:f,disabled:!d}),!d)return null;const h=e?g=>{const b=r.getState().nodes.filter(w=>w.selected);e(g,b)}:void 0,m=g=>{Object.prototype.hasOwnProperty.call(mb,g.key)&&(g.preventDefault(),u({direction:mb[g.key],factor:g.shiftKey?4:1}))};return x.jsx("div",{className:yn(["react-flow__nodesselection","react-flow__container",t]),style:{transform:o},children:x.jsx("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:h,tabIndex:n?void 0:-1,onKeyDown:n?void 0:m,style:{width:i,height:a}})})}const HB=typeof window<"u"?window:void 0,Zye=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function UK({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,paneClickDistance:l,deleteKeyCode:u,selectionKeyCode:f,selectionOnDrag:d,selectionMode:h,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:b,panActivationKeyCode:w,zoomActivationKeyCode:y,elementsSelectable:S,zoomOnScroll:E,zoomOnPinch:_,panOnScroll:A,panOnScrollSpeed:T,panOnScrollMode:O,zoomOnDoubleClick:P,panOnDrag:M,defaultViewport:R,translateExtent:D,minZoom:I,maxZoom:k,preventScrolling:F,onSelectionContextMenu:$,noWheelClassName:q,noPanClassName:L,disableKeyboardA11y:z,onViewportChange:U,isControlledViewport:K}){const{nodesSelectionActive:Z,userSelectionActive:H}=ct(Zye,Kt),V=Bp(f,{target:HB}),X=Bp(w,{target:HB}),Y=X||M,G=X||A,Q=d&&Y!==!0,J=V||H||Q;return Pye({deleteKeyCode:u,multiSelectionKeyCode:b}),x.jsx(kye,{onPaneContextMenu:a,elementsSelectable:S,zoomOnScroll:E,zoomOnPinch:_,panOnScroll:G,panOnScrollSpeed:T,panOnScrollMode:O,zoomOnDoubleClick:P,panOnDrag:!V&&Y,defaultViewport:R,translateExtent:D,minZoom:I,maxZoom:k,zoomActivationKeyCode:y,preventScrolling:F,noWheelClassName:q,noPanClassName:L,onViewportChange:U,isControlledViewport:K,paneClickDistance:l,selectionOnDrag:Q,children:x.jsxs($ye,{onSelectionStart:m,onSelectionEnd:g,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:Y,isSelecting:!!J,selectionMode:h,selectionKeyPressed:V,paneClickDistance:l,selectionOnDrag:Q,children:[e,Z&&x.jsx(Xye,{onSelectionContextMenu:$,noPanClassName:L,disableKeyboardA11y:z})]})})}UK.displayName="FlowRenderer";const Qye=j.memo(UK),Jye=e=>t=>e?OR(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function ebe(e){return ct(j.useCallback(Jye(e),[e]),Kt)}const tbe=e=>e.updateNodeInternals;function nbe(){const e=ct(tbe),[t]=j.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(i=>{const a=i.target.getAttribute("data-id");r.set(a,{id:a,nodeElement:i.target,force:!0})}),e(r)}));return j.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function rbe({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const i=Xt(),a=j.useRef(null),o=j.useRef(null),l=j.useRef(e.sourcePosition),u=j.useRef(e.targetPosition),f=j.useRef(t),d=n&&!!e.internals.handleBounds;return j.useEffect(()=>{a.current&&!e.hidden&&(!d||o.current!==a.current)&&(o.current&&(r==null||r.unobserve(o.current)),r==null||r.observe(a.current),o.current=a.current)},[d,e.hidden]),j.useEffect(()=>()=>{o.current&&(r==null||r.unobserve(o.current),o.current=null)},[]),j.useEffect(()=>{if(a.current){const h=f.current!==t,m=l.current!==e.sourcePosition,g=u.current!==e.targetPosition;(h||m||g)&&(f.current=t,l.current=e.sourcePosition,u.current=e.targetPosition,i.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function ibe({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onContextMenu:a,onDoubleClick:o,nodesDraggable:l,elementsSelectable:u,nodesConnectable:f,nodesFocusable:d,resizeObserver:h,noDragClassName:m,noPanClassName:g,disableKeyboardA11y:b,rfId:w,nodeTypes:y,nodeClickDistance:S,onError:E}){const{node:_,internals:A,isParent:T}=ct(re=>{const ne=re.nodeLookup.get(e),fe=re.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:fe}},Kt);let O=_.type||"default",P=(y==null?void 0:y[O])||UB[O];P===void 0&&(E==null||E("003",ha.error003(O)),O="default",P=(y==null?void 0:y.default)||UB.default);const M=!!(_.draggable||l&&typeof _.draggable>"u"),R=!!(_.selectable||u&&typeof _.selectable>"u"),D=!!(_.connectable||f&&typeof _.connectable>"u"),I=!!(_.focusable||d&&typeof _.focusable>"u"),k=Xt(),F=hK(_),$=rbe({node:_,nodeType:O,hasDimensions:F,resizeObserver:h}),q=zK({nodeRef:$,disabled:_.hidden||!M,noDragClassName:m,handleSelector:_.dragHandle,nodeId:e,isSelectable:R,nodeClickDistance:S}),L=VK();if(_.hidden)return null;const z=bo(_),U=Kye(_),K=R||M||t||n||r||i,Z=n?re=>n(re,{...A.userNode}):void 0,H=r?re=>r(re,{...A.userNode}):void 0,V=i?re=>i(re,{...A.userNode}):void 0,X=a?re=>a(re,{...A.userNode}):void 0,Y=o?re=>o(re,{...A.userNode}):void 0,G=re=>{const{selectNodesOnDrag:ne,nodeDragThreshold:fe}=k.getState();R&&(!ne||!M||fe>0)&&jN({id:e,store:k,nodeRef:$}),t&&t(re,{...A.userNode})},Q=re=>{if(!(gK(re.nativeEvent)||b)){if(iK.includes(re.key)&&R){const ne=re.key==="Escape";jN({id:e,store:k,unselect:ne,nodeRef:$})}else if(M&&_.selected&&Object.prototype.hasOwnProperty.call(mb,re.key)){re.preventDefault();const{ariaLabelConfig:ne}=k.getState();k.setState({ariaLiveMessage:ne["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~A.positionAbsolute.x,y:~~A.positionAbsolute.y})}),L({direction:mb[re.key],factor:re.shiftKey?4:1})}}},J=()=>{var be;if(b||!((be=$.current)!=null&&be.matches(":focus-visible")))return;const{transform:re,width:ne,height:fe,autoPanOnNodeFocus:he,setCenter:oe}=k.getState();if(!he)return;OR(new Map([[e,_]]),{x:0,y:0,width:ne,height:fe},re,!0).length>0||oe(_.position.x+z.width/2,_.position.y+z.height/2,{zoom:re[2]})};return x.jsx("div",{className:yn(["react-flow__node",`react-flow__node-${O}`,{[g]:M},_.className,{selected:_.selected,selectable:R,parent:T,draggable:M,dragging:q}]),ref:$,style:{zIndex:A.z,transform:`translate(${A.positionAbsolute.x}px,${A.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:F?"visible":"hidden",..._.style,...U},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:Z,onMouseMove:H,onMouseLeave:V,onContextMenu:X,onClick:G,onDoubleClick:Y,onKeyDown:I?Q:void 0,tabIndex:I?0:void 0,onFocus:I?J:void 0,role:_.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":b?void 0:`${DK}-${w}`,"aria-label":_.ariaLabel,..._.domAttributes,children:x.jsx(qye,{value:e,children:x.jsx(P,{id:e,data:_.data,type:O,positionAbsoluteX:A.positionAbsolute.x,positionAbsoluteY:A.positionAbsolute.y,selected:_.selected??!1,selectable:R,draggable:M,deletable:_.deletable??!0,isConnectable:D,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:q,dragHandle:_.dragHandle,zIndex:A.z,parentId:_.parentId,...z})})})}var abe=j.memo(ibe);const obe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function HK(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a}=ct(obe,Kt),o=ebe(e.onlyRenderVisibleElements),l=nbe();return x.jsx("div",{className:"react-flow__nodes",style:nx,children:o.map(u=>x.jsx(abe,{id:u,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:a},u))})}HK.displayName="NodeRenderer";const sbe=j.memo(HK);function lbe(e){return ct(j.useCallback(n=>{if(!e)return n.edges.map(i=>i.id);const r=[];if(n.width&&n.height)for(const i of n.edges){const a=n.nodeLookup.get(i.source),o=n.nodeLookup.get(i.target);a&&o&&fve({sourceNode:a,targetNode:o,width:n.width,height:n.height,transform:n.transform})&&r.push(i.id)}return r},[e]),Kt)}const ube=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return x.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},cbe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return x.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},GB={[db.Arrow]:ube,[db.ArrowClosed]:cbe};function fbe(e){const t=Xt();return j.useMemo(()=>{var i,a;return Object.prototype.hasOwnProperty.call(GB,e)?GB[e]:((a=(i=t.getState()).onError)==null||a.call(i,"009",ha.error009(e)),null)},[e])}const dbe=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:l="auto-start-reverse"})=>{const u=fbe(t);return u?x.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:x.jsx(u,{color:n,strokeWidth:o})}):null},GK=({defaultColor:e,rfId:t})=>{const n=ct(a=>a.edges),r=ct(a=>a.defaultEdgeOptions),i=j.useMemo(()=>bve(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return i.length?x.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:x.jsx("defs",{children:i.map(a=>x.jsx(dbe,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};GK.displayName="MarkerDefinitions";var hbe=j.memo(GK);function WK({x:e,y:t,label:n,labelStyle:r,labelShowBg:i=!0,labelBgStyle:a,labelBgPadding:o=[2,4],labelBgBorderRadius:l=2,children:u,className:f,...d}){const[h,m]=j.useState({x:1,y:0,width:0,height:0}),g=yn(["react-flow__edge-textwrapper",f]),b=j.useRef(null);return j.useEffect(()=>{if(b.current){const w=b.current.getBBox();m({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?x.jsxs("g",{transform:`translate(${e-h.width/2} ${t-h.height/2})`,className:g,visibility:h.width?"visible":"hidden",...d,children:[i&&x.jsx("rect",{width:h.width+2*o[0],x:-o[0],y:-o[1],height:h.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),x.jsx("text",{className:"react-flow__edge-text",y:h.height/2,dy:"0.3em",ref:b,style:r,children:n}),u]}):null}WK.displayName="EdgeText";const pbe=j.memo(WK);function rx({path:e,labelX:t,labelY:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u,interactionWidth:f=20,...d}){return x.jsxs(x.Fragment,{children:[x.jsx("path",{...d,d:e,fill:"none",className:yn(["react-flow__edge-path",d.className])}),f?x.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:f,className:"react-flow__edge-interaction"}):null,r&&Pi(t)&&Pi(n)?x.jsx(pbe,{x:t,y:n,label:r,labelStyle:i,labelShowBg:a,labelBgStyle:o,labelBgPadding:l,labelBgBorderRadius:u}):null]})}function WB({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===Ie.Left||e===Ie.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function KK({sourceX:e,sourceY:t,sourcePosition:n=Ie.Bottom,targetX:r,targetY:i,targetPosition:a=Ie.Top}){const[o,l]=WB({pos:n,x1:e,y1:t,x2:r,y2:i}),[u,f]=WB({pos:a,x1:r,y1:i,x2:e,y2:t}),[d,h,m,g]=yK({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:l,targetControlX:u,targetControlY:f});return[`M${e},${t} C${o},${l} ${u},${f} ${r},${i}`,d,h,m,g]}function YK(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o,targetPosition:l,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:b,markerEnd:w,markerStart:y,interactionWidth:S})=>{const[E,_,A]=KK({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l}),T=e.isInternal?void 0:t;return x.jsx(rx,{id:T,path:E,labelX:_,labelY:A,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:b,markerEnd:w,markerStart:y,interactionWidth:S})})}const mbe=YK({isInternal:!1}),XK=YK({isInternal:!0});mbe.displayName="SimpleBezierEdge";XK.displayName="SimpleBezierEdgeInternal";function ZK(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,sourcePosition:g=Ie.Bottom,targetPosition:b=Ie.Top,markerEnd:w,markerStart:y,pathOptions:S,interactionWidth:E})=>{const[_,A,T]=EN({sourceX:n,sourceY:r,sourcePosition:g,targetX:i,targetY:a,targetPosition:b,borderRadius:S==null?void 0:S.borderRadius,offset:S==null?void 0:S.offset,stepPosition:S==null?void 0:S.stepPosition}),O=e.isInternal?void 0:t;return x.jsx(rx,{id:O,path:_,labelX:A,labelY:T,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:y,interactionWidth:E})})}const QK=ZK({isInternal:!1}),JK=ZK({isInternal:!0});QK.displayName="SmoothStepEdge";JK.displayName="SmoothStepEdgeInternal";function eY(e){return j.memo(({id:t,...n})=>{var i;const r=e.isInternal?void 0:t;return x.jsx(QK,{...n,id:r,pathOptions:j.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(i=n.pathOptions)==null?void 0:i.offset])})})}const gbe=eY({isInternal:!1}),tY=eY({isInternal:!0});gbe.displayName="StepEdge";tY.displayName="StepEdgeInternal";function nY(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:b,interactionWidth:w})=>{const[y,S,E]=wK({sourceX:n,sourceY:r,targetX:i,targetY:a}),_=e.isInternal?void 0:t;return x.jsx(rx,{id:_,path:y,labelX:S,labelY:E,label:o,labelStyle:l,labelShowBg:u,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:g,markerStart:b,interactionWidth:w})})}const vbe=nY({isInternal:!1}),rY=nY({isInternal:!0});vbe.displayName="StraightEdge";rY.displayName="StraightEdgeInternal";function iY(e){return j.memo(({id:t,sourceX:n,sourceY:r,targetX:i,targetY:a,sourcePosition:o=Ie.Bottom,targetPosition:l=Ie.Top,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:b,markerEnd:w,markerStart:y,pathOptions:S,interactionWidth:E})=>{const[_,A,T]=bK({sourceX:n,sourceY:r,sourcePosition:o,targetX:i,targetY:a,targetPosition:l,curvature:S==null?void 0:S.curvature}),O=e.isInternal?void 0:t;return x.jsx(rx,{id:O,path:_,labelX:A,labelY:T,label:u,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:m,labelBgBorderRadius:g,style:b,markerEnd:w,markerStart:y,interactionWidth:E})})}const ybe=iY({isInternal:!1}),aY=iY({isInternal:!0});ybe.displayName="BezierEdge";aY.displayName="BezierEdgeInternal";const KB={default:aY,straight:rY,step:tY,smoothstep:JK,simplebezier:XK},YB={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},bbe=(e,t,n)=>n===Ie.Left?e-t:n===Ie.Right?e+t:e,xbe=(e,t,n)=>n===Ie.Top?e-t:n===Ie.Bottom?e+t:e,XB="react-flow__edgeupdater";function ZB({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:l}){return x.jsx("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:yn([XB,`${XB}-${l}`]),cx:bbe(t,r,e),cy:xbe(n,r,e),r,stroke:"transparent",fill:"transparent"})}function wbe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:i,targetX:a,targetY:o,sourcePosition:l,targetPosition:u,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,setReconnecting:m,setUpdateHover:g}){const b=Xt(),w=(A,T)=>{if(A.button!==0)return;const{autoPanOnConnect:O,domNode:P,connectionMode:M,connectionRadius:R,lib:D,onConnectStart:I,cancelConnection:k,nodeLookup:F,rfId:$,panBy:q,updateConnection:L}=b.getState(),z=T.type==="target",U=(H,V)=>{m(!1),h==null||h(H,n,T.type,V)},K=H=>f==null?void 0:f(n,H),Z=(H,V)=>{m(!0),d==null||d(A,n,T.type),I==null||I(H,V)};CN.onPointerDown(A.nativeEvent,{autoPanOnConnect:O,connectionMode:M,connectionRadius:R,domNode:P,handleId:T.id,nodeId:T.nodeId,nodeLookup:F,isTarget:z,edgeUpdaterType:T.type,lib:D,flowId:$,cancelConnection:k,panBy:q,isValidConnection:(...H)=>{var V,X;return((X=(V=b.getState()).isValidConnection)==null?void 0:X.call(V,...H))??!0},onConnect:K,onConnectStart:Z,onConnectEnd:(...H)=>{var V,X;return(X=(V=b.getState()).onConnectEnd)==null?void 0:X.call(V,...H)},onReconnectEnd:U,updateConnection:L,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,dragThreshold:b.getState().connectionDragThreshold,handleDomNode:A.currentTarget})},y=A=>w(A,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),S=A=>w(A,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),E=()=>g(!0),_=()=>g(!1);return x.jsxs(x.Fragment,{children:[(e===!0||e==="source")&&x.jsx(ZB,{position:l,centerX:r,centerY:i,radius:t,onMouseDown:y,onMouseEnter:E,onMouseOut:_,type:"source"}),(e===!0||e==="target")&&x.jsx(ZB,{position:u,centerX:a,centerY:o,radius:t,onMouseDown:S,onMouseEnter:E,onMouseOut:_,type:"target"})]})}function Sbe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:i,onDoubleClick:a,onContextMenu:o,onMouseEnter:l,onMouseMove:u,onMouseLeave:f,reconnectRadius:d,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,rfId:b,edgeTypes:w,noPanClassName:y,onError:S,disableKeyboardA11y:E}){let _=ct(oe=>oe.edgeLookup.get(e));const A=ct(oe=>oe.defaultEdgeOptions);_=A?{...A,..._}:_;let T=_.type||"default",O=(w==null?void 0:w[T])||KB[T];O===void 0&&(S==null||S("011",ha.error011(T)),T="default",O=(w==null?void 0:w.default)||KB.default);const P=!!(_.focusable||t&&typeof _.focusable>"u"),M=typeof h<"u"&&(_.reconnectable||n&&typeof _.reconnectable>"u"),R=!!(_.selectable||r&&typeof _.selectable>"u"),D=j.useRef(null),[I,k]=j.useState(!1),[F,$]=j.useState(!1),q=Xt(),{zIndex:L,sourceX:z,sourceY:U,targetX:K,targetY:Z,sourcePosition:H,targetPosition:V}=ct(j.useCallback(oe=>{const ye=oe.nodeLookup.get(_.source),be=oe.nodeLookup.get(_.target);if(!ye||!be)return{zIndex:_.zIndex,...YB};const xe=yve({id:e,sourceNode:ye,targetNode:be,sourceHandle:_.sourceHandle||null,targetHandle:_.targetHandle||null,connectionMode:oe.connectionMode,onError:S});return{zIndex:cve({selected:_.selected,zIndex:_.zIndex,sourceNode:ye,targetNode:be,elevateOnSelect:oe.elevateEdgesOnSelect,zIndexMode:oe.zIndexMode}),...xe||YB}},[_.source,_.target,_.sourceHandle,_.targetHandle,_.selected,_.zIndex]),Kt),X=j.useMemo(()=>_.markerStart?`url('#${AN(_.markerStart,b)}')`:void 0,[_.markerStart,b]),Y=j.useMemo(()=>_.markerEnd?`url('#${AN(_.markerEnd,b)}')`:void 0,[_.markerEnd,b]);if(_.hidden||z===null||U===null||K===null||Z===null)return null;const G=oe=>{var Ee;const{addSelectedEdges:ye,unselectNodesAndEdges:be,multiSelectionActive:xe}=q.getState();R&&(q.setState({nodesSelectionActive:!1}),_.selected&&xe?(be({nodes:[],edges:[_]}),(Ee=D.current)==null||Ee.blur()):ye([e])),i&&i(oe,_)},Q=a?oe=>{a(oe,{..._})}:void 0,J=o?oe=>{o(oe,{..._})}:void 0,re=l?oe=>{l(oe,{..._})}:void 0,ne=u?oe=>{u(oe,{..._})}:void 0,fe=f?oe=>{f(oe,{..._})}:void 0,he=oe=>{var ye;if(!E&&iK.includes(oe.key)&&R){const{unselectNodesAndEdges:be,addSelectedEdges:xe}=q.getState();oe.key==="Escape"?((ye=D.current)==null||ye.blur(),be({edges:[_]})):xe([e])}};return x.jsx("svg",{style:{zIndex:L},children:x.jsxs("g",{className:yn(["react-flow__edge",`react-flow__edge-${T}`,_.className,y,{selected:_.selected,animated:_.animated,inactive:!R&&!i,updating:I,selectable:R}]),onClick:G,onDoubleClick:Q,onContextMenu:J,onMouseEnter:re,onMouseMove:ne,onMouseLeave:fe,onKeyDown:P?he:void 0,tabIndex:P?0:void 0,role:_.ariaRole??(P?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":_.ariaLabel===null?void 0:_.ariaLabel||`Edge from ${_.source} to ${_.target}`,"aria-describedby":P?`${IK}-${b}`:void 0,ref:D,..._.domAttributes,children:[!F&&x.jsx(O,{id:e,source:_.source,target:_.target,type:_.type,selected:_.selected,animated:_.animated,selectable:R,deletable:_.deletable??!0,label:_.label,labelStyle:_.labelStyle,labelShowBg:_.labelShowBg,labelBgStyle:_.labelBgStyle,labelBgPadding:_.labelBgPadding,labelBgBorderRadius:_.labelBgBorderRadius,sourceX:z,sourceY:U,targetX:K,targetY:Z,sourcePosition:H,targetPosition:V,data:_.data,style:_.style,sourceHandleId:_.sourceHandle,targetHandleId:_.targetHandle,markerStart:X,markerEnd:Y,pathOptions:"pathOptions"in _?_.pathOptions:void 0,interactionWidth:_.interactionWidth}),M&&x.jsx(wbe,{edge:_,isReconnectable:M,reconnectRadius:d,onReconnect:h,onReconnectStart:m,onReconnectEnd:g,sourceX:z,sourceY:U,targetX:K,targetY:Z,sourcePosition:H,targetPosition:V,setUpdateHover:k,setReconnecting:$})]})})}var _be=j.memo(Sbe);const Ebe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function oY({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:i,onReconnect:a,onEdgeContextMenu:o,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:f,onEdgeClick:d,reconnectRadius:h,onEdgeDoubleClick:m,onReconnectStart:g,onReconnectEnd:b,disableKeyboardA11y:w}){const{edgesFocusable:y,edgesReconnectable:S,elementsSelectable:E,onError:_}=ct(Ebe,Kt),A=lbe(t);return x.jsxs("div",{className:"react-flow__edges",children:[x.jsx(hbe,{defaultColor:e,rfId:n}),A.map(T=>x.jsx(_be,{id:T,edgesFocusable:y,edgesReconnectable:S,elementsSelectable:E,noPanClassName:i,onReconnect:a,onContextMenu:o,onMouseEnter:l,onMouseMove:u,onMouseLeave:f,onClick:d,reconnectRadius:h,onDoubleClick:m,onReconnectStart:g,onReconnectEnd:b,rfId:n,onError:_,edgeTypes:r,disableKeyboardA11y:w},T))]})}oY.displayName="EdgeRenderer";const Abe=j.memo(oY),Tbe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Cbe({children:e}){const t=ct(Tbe);return x.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function Obe(e){const t=IR(),n=j.useRef(!1);j.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const jbe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function Nbe(e){const t=ct(jbe),n=Xt();return j.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Pbe(e){return e.connection.inProgress?{...e.connection,to:Um(e.connection.to,e.transform)}:{...e.connection}}function Mbe(e){return Pbe}function Rbe(e){const t=Mbe();return ct(t,Kt)}const kbe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Dbe({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:i,width:a,height:o,isValid:l,inProgress:u}=ct(kbe,Kt);return!(a&&i&&u)?null:x.jsx("svg",{style:e,width:a,height:o,className:"react-flow__connectionline react-flow__container",children:x.jsx("g",{className:yn(["react-flow__connection",sK(l)]),children:x.jsx(sY,{style:t,type:n,CustomComponent:r,isValid:l})})})}const sY=({style:e,type:t=ds.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:i,from:a,fromNode:o,fromHandle:l,fromPosition:u,to:f,toNode:d,toHandle:h,toPosition:m,pointer:g}=Rbe();if(!i)return;if(n)return x.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:o,fromHandle:l,fromX:a.x,fromY:a.y,toX:f.x,toY:f.y,fromPosition:u,toPosition:m,connectionStatus:sK(r),toNode:d,toHandle:h,pointer:g});let b="";const w={sourceX:a.x,sourceY:a.y,sourcePosition:u,targetX:f.x,targetY:f.y,targetPosition:m};switch(t){case ds.Bezier:[b]=bK(w);break;case ds.SimpleBezier:[b]=KK(w);break;case ds.Step:[b]=EN({...w,borderRadius:0});break;case ds.SmoothStep:[b]=EN(w);break;default:[b]=wK(w)}return x.jsx("path",{d:b,fill:"none",className:"react-flow__connection-path",style:e})};sY.displayName="ConnectionLine";const Ibe={};function QB(e=Ibe){j.useRef(e),Xt(),j.useEffect(()=>{},[e])}function Lbe(){Xt(),j.useRef(!1),j.useEffect(()=>{},[])}function lY({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:i,onNodeDoubleClick:a,onEdgeDoubleClick:o,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:d,onSelectionContextMenu:h,onSelectionStart:m,onSelectionEnd:g,connectionLineType:b,connectionLineStyle:w,connectionLineComponent:y,connectionLineContainerStyle:S,selectionKeyCode:E,selectionOnDrag:_,selectionMode:A,multiSelectionKeyCode:T,panActivationKeyCode:O,zoomActivationKeyCode:P,deleteKeyCode:M,onlyRenderVisibleElements:R,elementsSelectable:D,defaultViewport:I,translateExtent:k,minZoom:F,maxZoom:$,preventScrolling:q,defaultMarkerColor:L,zoomOnScroll:z,zoomOnPinch:U,panOnScroll:K,panOnScrollSpeed:Z,panOnScrollMode:H,zoomOnDoubleClick:V,panOnDrag:X,onPaneClick:Y,onPaneMouseEnter:G,onPaneMouseMove:Q,onPaneMouseLeave:J,onPaneScroll:re,onPaneContextMenu:ne,paneClickDistance:fe,nodeClickDistance:he,onEdgeContextMenu:oe,onEdgeMouseEnter:ye,onEdgeMouseMove:be,onEdgeMouseLeave:xe,reconnectRadius:Ee,onReconnect:_e,onReconnectStart:tt,onReconnectEnd:nt,noDragClassName:It,noWheelClassName:Ut,noPanClassName:Pt,disableKeyboardA11y:Et,nodeExtent:At,rfId:Ge,viewport:Lt,onViewportChange:bn}){return QB(e),QB(t),Lbe(),Obe(n),Nbe(Lt),x.jsx(Qye,{onPaneClick:Y,onPaneMouseEnter:G,onPaneMouseMove:Q,onPaneMouseLeave:J,onPaneContextMenu:ne,onPaneScroll:re,paneClickDistance:fe,deleteKeyCode:M,selectionKeyCode:E,selectionOnDrag:_,selectionMode:A,onSelectionStart:m,onSelectionEnd:g,multiSelectionKeyCode:T,panActivationKeyCode:O,zoomActivationKeyCode:P,elementsSelectable:D,zoomOnScroll:z,zoomOnPinch:U,zoomOnDoubleClick:V,panOnScroll:K,panOnScrollSpeed:Z,panOnScrollMode:H,panOnDrag:X,defaultViewport:I,translateExtent:k,minZoom:F,maxZoom:$,onSelectionContextMenu:h,preventScrolling:q,noDragClassName:It,noWheelClassName:Ut,noPanClassName:Pt,disableKeyboardA11y:Et,onViewportChange:bn,isControlledViewport:!!Lt,children:x.jsxs(Cbe,{children:[x.jsx(Abe,{edgeTypes:t,onEdgeClick:i,onEdgeDoubleClick:o,onReconnect:_e,onReconnectStart:tt,onReconnectEnd:nt,onlyRenderVisibleElements:R,onEdgeContextMenu:oe,onEdgeMouseEnter:ye,onEdgeMouseMove:be,onEdgeMouseLeave:xe,reconnectRadius:Ee,defaultMarkerColor:L,noPanClassName:Pt,disableKeyboardA11y:Et,rfId:Ge}),x.jsx(Dbe,{style:w,type:b,component:y,containerStyle:S}),x.jsx("div",{className:"react-flow__edgelabel-renderer"}),x.jsx(sbe,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:f,onNodeContextMenu:d,nodeClickDistance:he,onlyRenderVisibleElements:R,noPanClassName:Pt,noDragClassName:It,disableKeyboardA11y:Et,nodeExtent:At,rfId:Ge}),x.jsx("div",{className:"react-flow__viewport-portal"})]})})}lY.displayName="GraphView";const $be=j.memo(lY),JB=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u=.5,maxZoom:f=2,nodeOrigin:d,nodeExtent:h,zIndexMode:m="basic"}={})=>{const g=new Map,b=new Map,w=new Map,y=new Map,S=r??t??[],E=n??e??[],_=d??[0,0],A=h??Dp;EK(w,y,S);const{nodesInitialized:T}=TN(E,g,b,{nodeOrigin:_,nodeExtent:A,zIndexMode:m});let O=[0,0,1];if(o&&i&&a){const P=Vm(g,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:M,y:R,zoom:D}=jR(P,i,a,u,f,(l==null?void 0:l.padding)??.1);O=[M,R,D]}return{rfId:"1",width:i??0,height:a??0,transform:O,nodes:E,nodesInitialized:T,nodeLookup:g,parentLookup:b,edges:S,edgeLookup:y,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:u,maxZoom:f,translateExtent:Dp,nodeExtent:A,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:jf.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:_,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:o??!1,fitViewOptions:l,fitViewResolver:null,connection:{...oK},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:ive,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:aK,zIndexMode:m,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},Bbe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u,maxZoom:f,nodeOrigin:d,nodeExtent:h,zIndexMode:m})=>nye((g,b)=>{async function w(){const{nodeLookup:y,panZoom:S,fitViewOptions:E,fitViewResolver:_,width:A,height:T,minZoom:O,maxZoom:P}=b();S&&(await nve({nodes:y,width:A,height:T,panZoom:S,minZoom:O,maxZoom:P},E),_==null||_.resolve(!0),g({fitViewResolver:null}))}return{...JB({nodes:e,edges:t,width:i,height:a,fitView:o,fitViewOptions:l,minZoom:u,maxZoom:f,nodeOrigin:d,nodeExtent:h,defaultNodes:n,defaultEdges:r,zIndexMode:m}),setNodes:y=>{const{nodeLookup:S,parentLookup:E,nodeOrigin:_,elevateNodesOnSelect:A,fitViewQueued:T,zIndexMode:O,nodesSelectionActive:P}=b(),{nodesInitialized:M,hasSelectedNodes:R}=TN(y,S,E,{nodeOrigin:_,nodeExtent:h,elevateNodesOnSelect:A,checkEquality:!0,zIndexMode:O}),D=P&&R;T&&M?(w(),g({nodes:y,nodesInitialized:M,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):g({nodes:y,nodesInitialized:M,nodesSelectionActive:D})},setEdges:y=>{const{connectionLookup:S,edgeLookup:E}=b();EK(S,E,y),g({edges:y})},setDefaultNodesAndEdges:(y,S)=>{if(y){const{setNodes:E}=b();E(y),g({hasDefaultNodes:!0})}if(S){const{setEdges:E}=b();E(S),g({hasDefaultEdges:!0})}},updateNodeInternals:y=>{const{triggerNodeChanges:S,nodeLookup:E,parentLookup:_,domNode:A,nodeOrigin:T,nodeExtent:O,debug:P,fitViewQueued:M,zIndexMode:R}=b(),{changes:D,updatedInternals:I}=Tve(y,E,_,A,T,O,R);I&&(Sve(E,_,{nodeOrigin:T,nodeExtent:O,zIndexMode:R}),M?(w(),g({fitViewQueued:!1,fitViewOptions:void 0})):g({}),(D==null?void 0:D.length)>0&&(P&&console.log("React Flow: trigger node changes",D),S==null||S(D)))},updateNodePositions:(y,S=!1)=>{const E=[];let _=[];const{nodeLookup:A,triggerNodeChanges:T,connection:O,updateConnection:P,onNodesChangeMiddlewareMap:M}=b();for(const[R,D]of y){const I=A.get(R),k=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),F={id:R,type:"position",position:k?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:S};if(I&&O.inProgress&&O.fromNode.id===I.id){const $=xu(I,O.fromHandle,Ie.Left,!0);P({...O,from:$})}k&&I.parentId&&E.push({id:R,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),_.push(F)}if(E.length>0){const{parentLookup:R,nodeOrigin:D}=b(),I=DR(E,A,R,D);_.push(...I)}for(const R of M.values())_=R(_);T(_)},triggerNodeChanges:y=>{const{onNodesChange:S,setNodes:E,nodes:_,hasDefaultNodes:A,debug:T}=b();if(y!=null&&y.length){if(A){const O=_ye(y,_);E(O)}T&&console.log("React Flow: trigger node changes",y),S==null||S(y)}},triggerEdgeChanges:y=>{const{onEdgesChange:S,setEdges:E,edges:_,hasDefaultEdges:A,debug:T}=b();if(y!=null&&y.length){if(A){const O=Eye(y,_);E(O)}T&&console.log("React Flow: trigger edge changes",y),S==null||S(y)}},addSelectedNodes:y=>{const{multiSelectionActive:S,edgeLookup:E,nodeLookup:_,triggerNodeChanges:A,triggerEdgeChanges:T}=b();if(S){const O=y.map(P=>kl(P,!0));A(O);return}A(zc(_,new Set([...y]),!0)),T(zc(E))},addSelectedEdges:y=>{const{multiSelectionActive:S,edgeLookup:E,nodeLookup:_,triggerNodeChanges:A,triggerEdgeChanges:T}=b();if(S){const O=y.map(P=>kl(P,!0));T(O);return}T(zc(E,new Set([...y]))),A(zc(_,new Set,!0))},unselectNodesAndEdges:({nodes:y,edges:S}={})=>{const{edges:E,nodes:_,nodeLookup:A,triggerNodeChanges:T,triggerEdgeChanges:O}=b(),P=y||_,M=S||E,R=[];for(const I of P){if(!I.selected)continue;const k=A.get(I.id);k&&(k.selected=!1),R.push(kl(I.id,!1))}const D=[];for(const I of M)I.selected&&D.push(kl(I.id,!1));T(R),O(D)},setMinZoom:y=>{const{panZoom:S,maxZoom:E}=b();S==null||S.setScaleExtent([y,E]),g({minZoom:y})},setMaxZoom:y=>{const{panZoom:S,minZoom:E}=b();S==null||S.setScaleExtent([E,y]),g({maxZoom:y})},setTranslateExtent:y=>{var S;(S=b().panZoom)==null||S.setTranslateExtent(y),g({translateExtent:y})},resetSelectedElements:()=>{const{edges:y,nodes:S,triggerNodeChanges:E,triggerEdgeChanges:_,elementsSelectable:A}=b();if(!A)return;const T=S.reduce((P,M)=>M.selected?[...P,kl(M.id,!1)]:P,[]),O=y.reduce((P,M)=>M.selected?[...P,kl(M.id,!1)]:P,[]);E(T),_(O)},setNodeExtent:y=>{const{nodes:S,nodeLookup:E,parentLookup:_,nodeOrigin:A,elevateNodesOnSelect:T,nodeExtent:O,zIndexMode:P}=b();y[0][0]===O[0][0]&&y[0][1]===O[0][1]&&y[1][0]===O[1][0]&&y[1][1]===O[1][1]||(TN(S,E,_,{nodeOrigin:A,nodeExtent:y,elevateNodesOnSelect:T,checkEquality:!1,zIndexMode:P}),g({nodeExtent:y}))},panBy:y=>{const{transform:S,width:E,height:_,panZoom:A,translateExtent:T}=b();return Cve({delta:y,panZoom:A,transform:S,translateExtent:T,width:E,height:_})},setCenter:async(y,S,E)=>{const{width:_,height:A,maxZoom:T,panZoom:O}=b();if(!O)return Promise.resolve(!1);const P=typeof(E==null?void 0:E.zoom)<"u"?E.zoom:T;return await O.setViewport({x:_/2-y*P,y:A/2-S*P,zoom:P},{duration:E==null?void 0:E.duration,ease:E==null?void 0:E.ease,interpolate:E==null?void 0:E.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{g({connection:{...oK}})},updateConnection:y=>{g({connection:y})},reset:()=>g({...JB()})}},Object.is);function qbe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:i,initialHeight:a,initialMinZoom:o,initialMaxZoom:l,initialFitViewOptions:u,fitView:f,nodeOrigin:d,nodeExtent:h,zIndexMode:m,children:g}){const[b]=j.useState(()=>Bbe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:f,minZoom:o,maxZoom:l,fitViewOptions:u,nodeOrigin:d,nodeExtent:h,zIndexMode:m}));return x.jsx(rye,{value:b,children:x.jsx(Cye,{children:g})})}function zbe({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:i,width:a,height:o,fitView:l,fitViewOptions:u,minZoom:f,maxZoom:d,nodeOrigin:h,nodeExtent:m,zIndexMode:g}){return j.useContext(ex)?x.jsx(x.Fragment,{children:e}):x.jsx(qbe,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:i,initialWidth:a,initialHeight:o,fitView:l,initialFitViewOptions:u,initialMinZoom:f,initialMaxZoom:d,nodeOrigin:h,nodeExtent:m,zIndexMode:g,children:e})}const Vbe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function Fbe({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a,edgeTypes:o,onNodeClick:l,onEdgeClick:u,onInit:f,onMove:d,onMoveStart:h,onMoveEnd:m,onConnect:g,onConnectStart:b,onConnectEnd:w,onClickConnectStart:y,onClickConnectEnd:S,onNodeMouseEnter:E,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:T,onNodeDoubleClick:O,onNodeDragStart:P,onNodeDrag:M,onNodeDragStop:R,onNodesDelete:D,onEdgesDelete:I,onDelete:k,onSelectionChange:F,onSelectionDragStart:$,onSelectionDrag:q,onSelectionDragStop:L,onSelectionContextMenu:z,onSelectionStart:U,onSelectionEnd:K,onBeforeDelete:Z,connectionMode:H,connectionLineType:V=ds.Bezier,connectionLineStyle:X,connectionLineComponent:Y,connectionLineContainerStyle:G,deleteKeyCode:Q="Backspace",selectionKeyCode:J="Shift",selectionOnDrag:re=!1,selectionMode:ne=Ip.Full,panActivationKeyCode:fe="Space",multiSelectionKeyCode:he=$p()?"Meta":"Control",zoomActivationKeyCode:oe=$p()?"Meta":"Control",snapToGrid:ye,snapGrid:be,onlyRenderVisibleElements:xe=!1,selectNodesOnDrag:Ee,nodesDraggable:_e,autoPanOnNodeFocus:tt,nodesConnectable:nt,nodesFocusable:It,nodeOrigin:Ut=LK,edgesFocusable:Pt,edgesReconnectable:Et,elementsSelectable:At=!0,defaultViewport:Ge=gye,minZoom:Lt=.5,maxZoom:bn=2,translateExtent:Vn=Dp,preventScrolling:Bu=!0,nodeExtent:wa,defaultMarkerColor:Md="#b1b1b7",zoomOnScroll:qu=!0,zoomOnPinch:Fn=!0,panOnScroll:Qt=!1,panOnScrollSpeed:Gi=.5,panOnScrollMode:Zn=su.Free,zoomOnDoubleClick:tw=!0,panOnDrag:nw=!0,onPaneClick:rw,onPaneMouseEnter:zu,onPaneMouseMove:Vu,onPaneMouseLeave:Fu,onPaneScroll:Sa,onPaneContextMenu:Uu,paneClickDistance:sl=1,nodeClickDistance:iw=0,children:ag,onReconnect:Rd,onReconnectStart:ll,onReconnectEnd:aw,onEdgeContextMenu:og,onEdgeDoubleClick:sg,onEdgeMouseEnter:lg,onEdgeMouseMove:kd,onEdgeMouseLeave:Dd,reconnectRadius:ug=10,onNodesChange:cg,onEdgesChange:Wi,noDragClassName:xn="nodrag",noWheelClassName:Un="nowheel",noPanClassName:_a="nopan",fitView:Hu,fitViewOptions:fg,connectOnClick:ow,attributionPosition:dg,proOptions:ul,defaultEdgeOptions:Id,elevateNodesOnSelect:Eo=!0,elevateEdgesOnSelect:Ao=!1,disableKeyboardA11y:To=!1,autoPanOnConnect:Co,autoPanOnNodeDrag:un,autoPanSpeed:hg,connectionRadius:pg,isValidConnection:Ea,onError:Oo,style:sw,id:Ld,nodeDragThreshold:mg,connectionDragThreshold:lw,viewport:Gu,onViewportChange:Wu,width:vi,height:ur,colorMode:gg="light",debug:uw,onScroll:jo,ariaLabelConfig:vg,zIndexMode:cl="basic",...cw},cr){const fl=Ld||"1",yg=xye(gg),$d=j.useCallback(Aa=>{Aa.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),jo==null||jo(Aa)},[jo]);return x.jsx("div",{"data-testid":"rf__wrapper",...cw,onScroll:$d,style:{...sw,...Vbe},ref:cr,className:yn(["react-flow",i,yg]),id:Ld,role:"application",children:x.jsxs(zbe,{nodes:e,edges:t,width:vi,height:ur,fitView:Hu,fitViewOptions:fg,minZoom:Lt,maxZoom:bn,nodeOrigin:Ut,nodeExtent:wa,zIndexMode:cl,children:[x.jsx(bye,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:g,onConnectStart:b,onConnectEnd:w,onClickConnectStart:y,onClickConnectEnd:S,nodesDraggable:_e,autoPanOnNodeFocus:tt,nodesConnectable:nt,nodesFocusable:It,edgesFocusable:Pt,edgesReconnectable:Et,elementsSelectable:At,elevateNodesOnSelect:Eo,elevateEdgesOnSelect:Ao,minZoom:Lt,maxZoom:bn,nodeExtent:wa,onNodesChange:cg,onEdgesChange:Wi,snapToGrid:ye,snapGrid:be,connectionMode:H,translateExtent:Vn,connectOnClick:ow,defaultEdgeOptions:Id,fitView:Hu,fitViewOptions:fg,onNodesDelete:D,onEdgesDelete:I,onDelete:k,onNodeDragStart:P,onNodeDrag:M,onNodeDragStop:R,onSelectionDrag:q,onSelectionDragStart:$,onSelectionDragStop:L,onMove:d,onMoveStart:h,onMoveEnd:m,noPanClassName:_a,nodeOrigin:Ut,rfId:fl,autoPanOnConnect:Co,autoPanOnNodeDrag:un,autoPanSpeed:hg,onError:Oo,connectionRadius:pg,isValidConnection:Ea,selectNodesOnDrag:Ee,nodeDragThreshold:mg,connectionDragThreshold:lw,onBeforeDelete:Z,debug:uw,ariaLabelConfig:vg,zIndexMode:cl}),x.jsx($be,{onInit:f,onNodeClick:l,onEdgeClick:u,onNodeMouseEnter:E,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:T,onNodeDoubleClick:O,nodeTypes:a,edgeTypes:o,connectionLineType:V,connectionLineStyle:X,connectionLineComponent:Y,connectionLineContainerStyle:G,selectionKeyCode:J,selectionOnDrag:re,selectionMode:ne,deleteKeyCode:Q,multiSelectionKeyCode:he,panActivationKeyCode:fe,zoomActivationKeyCode:oe,onlyRenderVisibleElements:xe,defaultViewport:Ge,translateExtent:Vn,minZoom:Lt,maxZoom:bn,preventScrolling:Bu,zoomOnScroll:qu,zoomOnPinch:Fn,zoomOnDoubleClick:tw,panOnScroll:Qt,panOnScrollSpeed:Gi,panOnScrollMode:Zn,panOnDrag:nw,onPaneClick:rw,onPaneMouseEnter:zu,onPaneMouseMove:Vu,onPaneMouseLeave:Fu,onPaneScroll:Sa,onPaneContextMenu:Uu,paneClickDistance:sl,nodeClickDistance:iw,onSelectionContextMenu:z,onSelectionStart:U,onSelectionEnd:K,onReconnect:Rd,onReconnectStart:ll,onReconnectEnd:aw,onEdgeContextMenu:og,onEdgeDoubleClick:sg,onEdgeMouseEnter:lg,onEdgeMouseMove:kd,onEdgeMouseLeave:Dd,reconnectRadius:ug,defaultMarkerColor:Md,noDragClassName:xn,noWheelClassName:Un,noPanClassName:_a,rfId:fl,disableKeyboardA11y:To,nodeExtent:wa,viewport:Gu,onViewportChange:Wu}),x.jsx(mye,{onSelectionChange:F}),ag,x.jsx(cye,{proOptions:ul,position:dg}),x.jsx(uye,{rfId:fl,disableKeyboardA11y:To})]})})}var Ube=BK(Fbe);function Hbe({dimensions:e,lineWidth:t,variant:n,className:r}){return x.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:yn(["react-flow__background-pattern",n,r])})}function Gbe({radius:e,className:t}){return x.jsx("circle",{cx:e,cy:e,r:e,className:yn(["react-flow__background-pattern","dots",t])})}var Is;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Is||(Is={}));const Wbe={[Is.Dots]:1,[Is.Lines]:1,[Is.Cross]:6},Kbe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function uY({id:e,variant:t=Is.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=0,color:o,bgColor:l,style:u,className:f,patternClassName:d}){const h=j.useRef(null),{transform:m,patternId:g}=ct(Kbe,Kt),b=r||Wbe[t],w=t===Is.Dots,y=t===Is.Cross,S=Array.isArray(n)?n:[n,n],E=[S[0]*m[2]||1,S[1]*m[2]||1],_=b*m[2],A=Array.isArray(a)?a:[a,a],T=y?[_,_]:E,O=[A[0]*m[2]||1+T[0]/2,A[1]*m[2]||1+T[1]/2],P=`${g}${e||""}`;return x.jsxs("svg",{className:yn(["react-flow__background",f]),style:{...u,...nx,"--xy-background-color-props":l,"--xy-background-pattern-color-props":o},ref:h,"data-testid":"rf__background",children:[x.jsx("pattern",{id:P,x:m[0]%E[0],y:m[1]%E[1],width:E[0],height:E[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${O[0]},-${O[1]})`,children:w?x.jsx(Gbe,{radius:_/2,className:d}):x.jsx(Hbe,{dimensions:T,lineWidth:i,variant:t,className:d})}),x.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${P})`})]})}uY.displayName="Background";j.memo(uY);function Ybe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:x.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function Xbe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:x.jsx("path",{d:"M0 0h32v4.2H0z"})})}function Zbe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:x.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function Qbe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:x.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function Jbe(){return x.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:x.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Wv({children:e,className:t,...n}){return x.jsx("button",{type:"button",className:yn(["react-flow__controls-button",t]),...n,children:e})}const e0e=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function cY({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:l,onInteractiveChange:u,className:f,children:d,position:h="bottom-left",orientation:m="vertical","aria-label":g}){const b=Xt(),{isInteractive:w,minZoomReached:y,maxZoomReached:S,ariaLabelConfig:E}=ct(e0e,Kt),{zoomIn:_,zoomOut:A,fitView:T}=IR(),O=()=>{_(),a==null||a()},P=()=>{A(),o==null||o()},M=()=>{T(i),l==null||l()},R=()=>{b.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),u==null||u(!w)},D=m==="horizontal"?"horizontal":"vertical";return x.jsxs(tx,{className:yn(["react-flow__controls",D,f]),position:h,style:e,"data-testid":"rf__controls","aria-label":g??E["controls.ariaLabel"],children:[t&&x.jsxs(x.Fragment,{children:[x.jsx(Wv,{onClick:O,className:"react-flow__controls-zoomin",title:E["controls.zoomIn.ariaLabel"],"aria-label":E["controls.zoomIn.ariaLabel"],disabled:S,children:x.jsx(Ybe,{})}),x.jsx(Wv,{onClick:P,className:"react-flow__controls-zoomout",title:E["controls.zoomOut.ariaLabel"],"aria-label":E["controls.zoomOut.ariaLabel"],disabled:y,children:x.jsx(Xbe,{})})]}),n&&x.jsx(Wv,{className:"react-flow__controls-fitview",onClick:M,title:E["controls.fitView.ariaLabel"],"aria-label":E["controls.fitView.ariaLabel"],children:x.jsx(Zbe,{})}),r&&x.jsx(Wv,{className:"react-flow__controls-interactive",onClick:R,title:E["controls.interactive.ariaLabel"],"aria-label":E["controls.interactive.ariaLabel"],children:w?x.jsx(Jbe,{}):x.jsx(Qbe,{})}),d]})}cY.displayName="Controls";j.memo(cY);function t0e({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:l,strokeWidth:u,className:f,borderRadius:d,shapeRendering:h,selected:m,onClick:g}){const{background:b,backgroundColor:w}=a||{},y=o||b||w;return x.jsx("rect",{className:yn(["react-flow__minimap-node",{selected:m},f]),x:t,y:n,rx:d,ry:d,width:r,height:i,style:{fill:y,stroke:l,strokeWidth:u},shapeRendering:h,onClick:g?S=>g(S,e):void 0})}const n0e=j.memo(t0e),r0e=e=>e.nodes.map(t=>t.id),o_=e=>e instanceof Function?e:()=>e;function i0e({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i,nodeComponent:a=n0e,onClick:o}){const l=ct(r0e,Kt),u=o_(t),f=o_(e),d=o_(n),h=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return x.jsx(x.Fragment,{children:l.map(m=>x.jsx(o0e,{id:m,nodeColorFunc:u,nodeStrokeColorFunc:f,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:i,NodeComponent:a,onClick:o,shapeRendering:h},m))})}function a0e({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:i,nodeStrokeWidth:a,shapeRendering:o,NodeComponent:l,onClick:u}){const{node:f,x:d,y:h,width:m,height:g}=ct(b=>{const w=b.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};const y=w.internals.userNode,{x:S,y:E}=w.internals.positionAbsolute,{width:_,height:A}=bo(y);return{node:y,x:S,y:E,width:_,height:A}},Kt);return!f||f.hidden||!hK(f)?null:x.jsx(l,{x:d,y:h,width:m,height:g,style:f.style,selected:!!f.selected,className:r(f),color:t(f),borderRadius:i,strokeColor:n(f),strokeWidth:a,shapeRendering:o,onClick:u,id:f.id})}const o0e=j.memo(a0e);var s0e=j.memo(i0e);const l0e=200,u0e=150,c0e=e=>!e.hidden,f0e=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?dK(Vm(e.nodeLookup,{filter:c0e}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},d0e="react-flow__minimap-desc";function fY({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o,nodeComponent:l,bgColor:u,maskColor:f,maskStrokeColor:d,maskStrokeWidth:h,position:m="bottom-right",onClick:g,onNodeClick:b,pannable:w=!1,zoomable:y=!1,ariaLabel:S,inversePan:E,zoomStep:_=1,offsetScale:A=5}){const T=Xt(),O=j.useRef(null),{boundingRect:P,viewBB:M,rfId:R,panZoom:D,translateExtent:I,flowWidth:k,flowHeight:F,ariaLabelConfig:$}=ct(f0e,Kt),q=(e==null?void 0:e.width)??l0e,L=(e==null?void 0:e.height)??u0e,z=P.width/q,U=P.height/L,K=Math.max(z,U),Z=K*q,H=K*L,V=A*K,X=P.x-(Z-P.width)/2-V,Y=P.y-(H-P.height)/2-V,G=Z+V*2,Q=H+V*2,J=`${d0e}-${R}`,re=j.useRef(0),ne=j.useRef();re.current=K,j.useEffect(()=>{if(O.current&&D)return ne.current=Ive({domNode:O.current,panZoom:D,getTransform:()=>T.getState().transform,getViewScale:()=>re.current}),()=>{var ye;(ye=ne.current)==null||ye.destroy()}},[D]),j.useEffect(()=>{var ye;(ye=ne.current)==null||ye.update({translateExtent:I,width:k,height:F,inversePan:E,pannable:w,zoomStep:_,zoomable:y})},[w,y,E,_,I,k,F]);const fe=g?ye=>{var Ee;const[be,xe]=((Ee=ne.current)==null?void 0:Ee.pointer(ye))||[0,0];g(ye,{x:be,y:xe})}:void 0,he=b?j.useCallback((ye,be)=>{const xe=T.getState().nodeLookup.get(be).internals.userNode;b(ye,xe)},[]):void 0,oe=S??$["minimap.ariaLabel"];return x.jsx(tx,{position:m,style:{...e,"--xy-minimap-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-stroke-color-props":typeof d=="string"?d:void 0,"--xy-minimap-mask-stroke-width-props":typeof h=="number"?h*K:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof o=="number"?o:void 0},className:yn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:x.jsxs("svg",{width:q,height:L,viewBox:`${X} ${Y} ${G} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":J,ref:O,onClick:fe,children:[oe&&x.jsx("title",{id:J,children:oe}),x.jsx(s0e,{onClick:he,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:l}),x.jsx("path",{className:"react-flow__minimap-mask",d:`M${X-V},${Y-V}h${G+V*2}v${Q+V*2}h${-G-V*2}z
|
|
365
|
+
M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}fY.displayName="MiniMap";j.memo(fY);const h0e=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,p0e={[Rf.Line]:"right",[Rf.Handle]:"bottom-right"};function m0e({nodeId:e,position:t,variant:n=Rf.Handle,className:r,style:i=void 0,children:a,color:o,minWidth:l=10,minHeight:u=10,maxWidth:f=Number.MAX_VALUE,maxHeight:d=Number.MAX_VALUE,keepAspectRatio:h=!1,resizeDirection:m,autoScale:g=!0,shouldResize:b,onResizeStart:w,onResize:y,onResizeEnd:S}){const E=FK(),_=typeof e=="string"?e:E,A=Xt(),T=j.useRef(null),O=n===Rf.Handle,P=ct(j.useCallback(h0e(O&&g),[O,g]),Kt),M=j.useRef(null),R=t??p0e[n];j.useEffect(()=>{if(!(!T.current||!_))return M.current||(M.current=Xve({domNode:T.current,nodeId:_,getStoreItems:()=>{const{nodeLookup:I,transform:k,snapGrid:F,snapToGrid:$,nodeOrigin:q,domNode:L}=A.getState();return{nodeLookup:I,transform:k,snapGrid:F,snapToGrid:$,nodeOrigin:q,paneDomNode:L}},onChange:(I,k)=>{const{triggerNodeChanges:F,nodeLookup:$,parentLookup:q,nodeOrigin:L}=A.getState(),z=[],U={x:I.x,y:I.y},K=$.get(_);if(K&&K.expandParent&&K.parentId){const Z=K.origin??L,H=I.width??K.measured.width??0,V=I.height??K.measured.height??0,X={id:K.id,parentId:K.parentId,rect:{width:H,height:V,...pK({x:I.x??K.position.x,y:I.y??K.position.y},{width:H,height:V},K.parentId,$,Z)}},Y=DR([X],$,q,L);z.push(...Y),U.x=I.x?Math.max(Z[0]*H,I.x):void 0,U.y=I.y?Math.max(Z[1]*V,I.y):void 0}if(U.x!==void 0&&U.y!==void 0){const Z={id:_,type:"position",position:{...U}};z.push(Z)}if(I.width!==void 0&&I.height!==void 0){const H={id:_,type:"dimensions",resizing:!0,setAttributes:m?m==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};z.push(H)}for(const Z of k){const H={...Z,type:"position"};z.push(H)}F(z)},onEnd:({width:I,height:k})=>{const F={id:_,type:"dimensions",resizing:!1,dimensions:{width:I,height:k}};A.getState().triggerNodeChanges([F])}})),M.current.update({controlPosition:R,boundaries:{minWidth:l,minHeight:u,maxWidth:f,maxHeight:d},keepAspectRatio:h,resizeDirection:m,onResizeStart:w,onResize:y,onResizeEnd:S,shouldResize:b}),()=>{var I;(I=M.current)==null||I.destroy()}},[R,l,u,f,d,h,w,y,S,b]);const D=R.split("-");return x.jsx("div",{className:yn(["react-flow__resize-control","nodrag",...D,n,r]),ref:T,style:{...i,scale:P,...o&&{[O?"backgroundColor":"borderColor"]:o}},children:a})}j.memo(m0e);function $R(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.')}var s_,eq;function g0e(){if(eq)return s_;eq=1;function e(){this.__data__=[],this.size=0}return s_=e,s_}var l_,tq;function pd(){if(tq)return l_;tq=1;function e(t,n){return t===n||t!==t&&n!==n}return l_=e,l_}var u_,nq;function ix(){if(nq)return u_;nq=1;var e=pd();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return u_=t,u_}var c_,rq;function v0e(){if(rq)return c_;rq=1;var e=ix(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var l=a.length-1;return o==l?a.pop():n.call(a,o,1),--this.size,!0}return c_=r,c_}var f_,iq;function y0e(){if(iq)return f_;iq=1;var e=ix();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return f_=t,f_}var d_,aq;function b0e(){if(aq)return d_;aq=1;var e=ix();function t(n){return e(this.__data__,n)>-1}return d_=t,d_}var h_,oq;function x0e(){if(oq)return h_;oq=1;var e=ix();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return h_=t,h_}var p_,sq;function ax(){if(sq)return p_;sq=1;var e=g0e(),t=v0e(),n=y0e(),r=b0e(),i=x0e();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,p_=a,p_}var m_,lq;function w0e(){if(lq)return m_;lq=1;var e=ax();function t(){this.__data__=new e,this.size=0}return m_=t,m_}var g_,uq;function S0e(){if(uq)return g_;uq=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return g_=e,g_}var v_,cq;function _0e(){if(cq)return v_;cq=1;function e(t){return this.__data__.get(t)}return v_=e,v_}var y_,fq;function E0e(){if(fq)return y_;fq=1;function e(t){return this.__data__.has(t)}return y_=e,y_}var b_,dq;function dY(){if(dq)return b_;dq=1;var e=typeof jv=="object"&&jv&&jv.Object===Object&&jv;return b_=e,b_}var x_,hq;function Ui(){if(hq)return x_;hq=1;var e=dY(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return x_=n,x_}var w_,pq;function md(){if(pq)return w_;pq=1;var e=Ui(),t=e.Symbol;return w_=t,w_}var S_,mq;function A0e(){if(mq)return S_;mq=1;var e=md(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var l=n.call(o,i),u=o[i];try{o[i]=void 0;var f=!0}catch{}var d=r.call(o);return f&&(l?o[i]=u:delete o[i]),d}return S_=a,S_}var __,gq;function T0e(){if(gq)return __;gq=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return __=n,__}var E_,vq;function xo(){if(vq)return E_;vq=1;var e=md(),t=A0e(),n=T0e(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?i:r:a&&a in Object(l)?t(l):n(l)}return E_=o,E_}var A_,yq;function lr(){if(yq)return A_;yq=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return A_=e,A_}var T_,bq;function gd(){if(bq)return T_;bq=1;var e=xo(),t=lr(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(l){if(!t(l))return!1;var u=e(l);return u==r||u==i||u==n||u==a}return T_=o,T_}var C_,xq;function C0e(){if(xq)return C_;xq=1;var e=Ui(),t=e["__core-js_shared__"];return C_=t,C_}var O_,wq;function O0e(){if(wq)return O_;wq=1;var e=C0e(),t=(function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""})();function n(r){return!!t&&t in r}return O_=n,O_}var j_,Sq;function hY(){if(Sq)return j_;Sq=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return j_=n,j_}var N_,_q;function j0e(){if(_q)return N_;_q=1;var e=gd(),t=O0e(),n=lr(),r=hY(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,u=o.toString,f=l.hasOwnProperty,d=RegExp("^"+u.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function h(m){if(!n(m)||t(m))return!1;var g=e(m)?d:a;return g.test(r(m))}return N_=h,N_}var P_,Eq;function N0e(){if(Eq)return P_;Eq=1;function e(t,n){return t==null?void 0:t[n]}return P_=e,P_}var M_,Aq;function Ru(){if(Aq)return M_;Aq=1;var e=j0e(),t=N0e();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return M_=n,M_}var R_,Tq;function BR(){if(Tq)return R_;Tq=1;var e=Ru(),t=Ui(),n=e(t,"Map");return R_=n,R_}var k_,Cq;function ox(){if(Cq)return k_;Cq=1;var e=Ru(),t=e(Object,"create");return k_=t,k_}var D_,Oq;function P0e(){if(Oq)return D_;Oq=1;var e=ox();function t(){this.__data__=e?e(null):{},this.size=0}return D_=t,D_}var I_,jq;function M0e(){if(jq)return I_;jq=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return I_=e,I_}var L_,Nq;function R0e(){if(Nq)return L_;Nq=1;var e=ox(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var l=o[a];return l===t?void 0:l}return r.call(o,a)?o[a]:void 0}return L_=i,L_}var $_,Pq;function k0e(){if(Pq)return $_;Pq=1;var e=ox(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return $_=r,$_}var B_,Mq;function D0e(){if(Mq)return B_;Mq=1;var e=ox(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return B_=n,B_}var q_,Rq;function I0e(){if(Rq)return q_;Rq=1;var e=P0e(),t=M0e(),n=R0e(),r=k0e(),i=D0e();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,q_=a,q_}var z_,kq;function L0e(){if(kq)return z_;kq=1;var e=I0e(),t=ax(),n=BR();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return z_=r,z_}var V_,Dq;function $0e(){if(Dq)return V_;Dq=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return V_=e,V_}var F_,Iq;function sx(){if(Iq)return F_;Iq=1;var e=$0e();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return F_=t,F_}var U_,Lq;function B0e(){if(Lq)return U_;Lq=1;var e=sx();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return U_=t,U_}var H_,$q;function q0e(){if($q)return H_;$q=1;var e=sx();function t(n){return e(this,n).get(n)}return H_=t,H_}var G_,Bq;function z0e(){if(Bq)return G_;Bq=1;var e=sx();function t(n){return e(this,n).has(n)}return G_=t,G_}var W_,qq;function V0e(){if(qq)return W_;qq=1;var e=sx();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return W_=t,W_}var K_,zq;function qR(){if(zq)return K_;zq=1;var e=L0e(),t=B0e(),n=q0e(),r=z0e(),i=V0e();function a(o){var l=-1,u=o==null?0:o.length;for(this.clear();++l<u;){var f=o[l];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,K_=a,K_}var Y_,Vq;function F0e(){if(Vq)return Y_;Vq=1;var e=ax(),t=BR(),n=qR(),r=200;function i(a,o){var l=this.__data__;if(l instanceof e){var u=l.__data__;if(!t||u.length<r-1)return u.push([a,o]),this.size=++l.size,this;l=this.__data__=new n(u)}return l.set(a,o),this.size=l.size,this}return Y_=i,Y_}var X_,Fq;function lx(){if(Fq)return X_;Fq=1;var e=ax(),t=w0e(),n=S0e(),r=_0e(),i=E0e(),a=F0e();function o(l){var u=this.__data__=new e(l);this.size=u.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,X_=o,X_}var Z_,Uq;function zR(){if(Uq)return Z_;Uq=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return Z_=e,Z_}var Q_,Hq;function pY(){if(Hq)return Q_;Hq=1;var e=Ru(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Q_=t,Q_}var J_,Gq;function ux(){if(Gq)return J_;Gq=1;var e=pY();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return J_=t,J_}var eE,Wq;function cx(){if(Wq)return eE;Wq=1;var e=ux(),t=pd(),n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l){var u=a[o];(!(r.call(a,o)&&t(u,l))||l===void 0&&!(o in a))&&e(a,o,l)}return eE=i,eE}var tE,Kq;function Hm(){if(Kq)return tE;Kq=1;var e=cx(),t=ux();function n(r,i,a,o){var l=!a;a||(a={});for(var u=-1,f=i.length;++u<f;){var d=i[u],h=o?o(a[d],r[d],d,a,r):void 0;h===void 0&&(h=r[d]),l?t(a,d,h):e(a,d,h)}return a}return tE=n,tE}var nE,Yq;function U0e(){if(Yq)return nE;Yq=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return nE=e,nE}var rE,Xq;function hi(){if(Xq)return rE;Xq=1;function e(t){return t!=null&&typeof t=="object"}return rE=e,rE}var iE,Zq;function H0e(){if(Zq)return iE;Zq=1;var e=xo(),t=hi(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return iE=r,iE}var aE,Qq;function Gm(){if(Qq)return aE;Qq=1;var e=H0e(),t=hi(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e((function(){return arguments})())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return aE=a,aE}var oE,Jq;function on(){if(Jq)return oE;Jq=1;var e=Array.isArray;return oE=e,oE}var ep={exports:{}},sE,e4;function G0e(){if(e4)return sE;e4=1;function e(){return!1}return sE=e,sE}ep.exports;var t4;function vd(){return t4||(t4=1,(function(e,t){var n=Ui(),r=G0e(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,l=o?n.Buffer:void 0,u=l?l.isBuffer:void 0,f=u||r;e.exports=f})(ep,ep.exports)),ep.exports}var lE,n4;function fx(){if(n4)return lE;n4=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return lE=n,lE}var uE,r4;function VR(){if(r4)return uE;r4=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return uE=t,uE}var cE,i4;function W0e(){if(i4)return cE;i4=1;var e=xo(),t=VR(),n=hi(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",l="[object Error]",u="[object Function]",f="[object Map]",d="[object Number]",h="[object Object]",m="[object RegExp]",g="[object Set]",b="[object String]",w="[object WeakMap]",y="[object ArrayBuffer]",S="[object DataView]",E="[object Float32Array]",_="[object Float64Array]",A="[object Int8Array]",T="[object Int16Array]",O="[object Int32Array]",P="[object Uint8Array]",M="[object Uint8ClampedArray]",R="[object Uint16Array]",D="[object Uint32Array]",I={};I[E]=I[_]=I[A]=I[T]=I[O]=I[P]=I[M]=I[R]=I[D]=!0,I[r]=I[i]=I[y]=I[a]=I[S]=I[o]=I[l]=I[u]=I[f]=I[d]=I[h]=I[m]=I[g]=I[b]=I[w]=!1;function k(F){return n(F)&&t(F.length)&&!!I[e(F)]}return cE=k,cE}var fE,a4;function dx(){if(a4)return fE;a4=1;function e(t){return function(n){return t(n)}}return fE=e,fE}var tp={exports:{}};tp.exports;var o4;function FR(){return o4||(o4=1,(function(e,t){var n=dY(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,l=(function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(tp,tp.exports)),tp.exports}var dE,s4;function Wm(){if(s4)return dE;s4=1;var e=W0e(),t=dx(),n=FR(),r=n&&n.isTypedArray,i=r?t(r):e;return dE=i,dE}var hE,l4;function mY(){if(l4)return hE;l4=1;var e=U0e(),t=Gm(),n=on(),r=vd(),i=fx(),a=Wm(),o=Object.prototype,l=o.hasOwnProperty;function u(f,d){var h=n(f),m=!h&&t(f),g=!h&&!m&&r(f),b=!h&&!m&&!g&&a(f),w=h||m||g||b,y=w?e(f.length,String):[],S=y.length;for(var E in f)(d||l.call(f,E))&&!(w&&(E=="length"||g&&(E=="offset"||E=="parent")||b&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||i(E,S)))&&y.push(E);return y}return hE=u,hE}var pE,u4;function hx(){if(u4)return pE;u4=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return pE=t,pE}var mE,c4;function gY(){if(c4)return mE;c4=1;function e(t,n){return function(r){return t(n(r))}}return mE=e,mE}var gE,f4;function K0e(){if(f4)return gE;f4=1;var e=gY(),t=e(Object.keys,Object);return gE=t,gE}var vE,d4;function UR(){if(d4)return vE;d4=1;var e=hx(),t=K0e(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var l in Object(a))r.call(a,l)&&l!="constructor"&&o.push(l);return o}return vE=i,vE}var yE,h4;function wo(){if(h4)return yE;h4=1;var e=gd(),t=VR();function n(r){return r!=null&&t(r.length)&&!e(r)}return yE=n,yE}var bE,p4;function Js(){if(p4)return bE;p4=1;var e=mY(),t=UR(),n=wo();function r(i){return n(i)?e(i):t(i)}return bE=r,bE}var xE,m4;function Y0e(){if(m4)return xE;m4=1;var e=Hm(),t=Js();function n(r,i){return r&&e(i,t(i),r)}return xE=n,xE}var wE,g4;function X0e(){if(g4)return wE;g4=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return wE=e,wE}var SE,v4;function Z0e(){if(v4)return SE;v4=1;var e=lr(),t=hx(),n=X0e(),r=Object.prototype,i=r.hasOwnProperty;function a(o){if(!e(o))return n(o);var l=t(o),u=[];for(var f in o)f=="constructor"&&(l||!i.call(o,f))||u.push(f);return u}return SE=a,SE}var _E,y4;function ku(){if(y4)return _E;y4=1;var e=mY(),t=Z0e(),n=wo();function r(i){return n(i)?e(i,!0):t(i)}return _E=r,_E}var EE,b4;function Q0e(){if(b4)return EE;b4=1;var e=Hm(),t=ku();function n(r,i){return r&&e(i,t(i),r)}return EE=n,EE}var np={exports:{}};np.exports;var x4;function vY(){return x4||(x4=1,(function(e,t){var n=Ui(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,l=o?o.allocUnsafe:void 0;function u(f,d){if(d)return f.slice();var h=f.length,m=l?l(h):new f.constructor(h);return f.copy(m),m}e.exports=u})(np,np.exports)),np.exports}var AE,w4;function yY(){if(w4)return AE;w4=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return AE=e,AE}var TE,S4;function bY(){if(S4)return TE;S4=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var l=t[r];n(l,r,t)&&(o[a++]=l)}return o}return TE=e,TE}var CE,_4;function xY(){if(_4)return CE;_4=1;function e(){return[]}return CE=e,CE}var OE,E4;function HR(){if(E4)return OE;E4=1;var e=bY(),t=xY(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(l){return r.call(o,l)}))}:t;return OE=a,OE}var jE,A4;function J0e(){if(A4)return jE;A4=1;var e=Hm(),t=HR();function n(r,i){return e(r,t(r),i)}return jE=n,jE}var NE,T4;function GR(){if(T4)return NE;T4=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return NE=e,NE}var PE,C4;function px(){if(C4)return PE;C4=1;var e=gY(),t=e(Object.getPrototypeOf,Object);return PE=t,PE}var ME,O4;function wY(){if(O4)return ME;O4=1;var e=GR(),t=px(),n=HR(),r=xY(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var l=[];o;)e(l,n(o)),o=t(o);return l}:r;return ME=a,ME}var RE,j4;function exe(){if(j4)return RE;j4=1;var e=Hm(),t=wY();function n(r,i){return e(r,t(r),i)}return RE=n,RE}var kE,N4;function SY(){if(N4)return kE;N4=1;var e=GR(),t=on();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return kE=n,kE}var DE,P4;function _Y(){if(P4)return DE;P4=1;var e=SY(),t=HR(),n=Js();function r(i){return e(i,n,t)}return DE=r,DE}var IE,M4;function txe(){if(M4)return IE;M4=1;var e=SY(),t=wY(),n=ku();function r(i){return e(i,n,t)}return IE=r,IE}var LE,R4;function nxe(){if(R4)return LE;R4=1;var e=Ru(),t=Ui(),n=e(t,"DataView");return LE=n,LE}var $E,k4;function rxe(){if(k4)return $E;k4=1;var e=Ru(),t=Ui(),n=e(t,"Promise");return $E=n,$E}var BE,D4;function EY(){if(D4)return BE;D4=1;var e=Ru(),t=Ui(),n=e(t,"Set");return BE=n,BE}var qE,I4;function ixe(){if(I4)return qE;I4=1;var e=Ru(),t=Ui(),n=e(t,"WeakMap");return qE=n,qE}var zE,L4;function yd(){if(L4)return zE;L4=1;var e=nxe(),t=BR(),n=rxe(),r=EY(),i=ixe(),a=xo(),o=hY(),l="[object Map]",u="[object Object]",f="[object Promise]",d="[object Set]",h="[object WeakMap]",m="[object DataView]",g=o(e),b=o(t),w=o(n),y=o(r),S=o(i),E=a;return(e&&E(new e(new ArrayBuffer(1)))!=m||t&&E(new t)!=l||n&&E(n.resolve())!=f||r&&E(new r)!=d||i&&E(new i)!=h)&&(E=function(_){var A=a(_),T=A==u?_.constructor:void 0,O=T?o(T):"";if(O)switch(O){case g:return m;case b:return l;case w:return f;case y:return d;case S:return h}return A}),zE=E,zE}var VE,$4;function axe(){if($4)return VE;$4=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,a=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(a.index=r.index,a.input=r.input),a}return VE=n,VE}var FE,B4;function AY(){if(B4)return FE;B4=1;var e=Ui(),t=e.Uint8Array;return FE=t,FE}var UE,q4;function WR(){if(q4)return UE;q4=1;var e=AY();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return UE=t,UE}var HE,z4;function oxe(){if(z4)return HE;z4=1;var e=WR();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return HE=t,HE}var GE,V4;function sxe(){if(V4)return GE;V4=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return GE=t,GE}var WE,F4;function lxe(){if(F4)return WE;F4=1;var e=md(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return WE=r,WE}var KE,U4;function TY(){if(U4)return KE;U4=1;var e=WR();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return KE=t,KE}var YE,H4;function uxe(){if(H4)return YE;H4=1;var e=WR(),t=oxe(),n=sxe(),r=lxe(),i=TY(),a="[object Boolean]",o="[object Date]",l="[object Map]",u="[object Number]",f="[object RegExp]",d="[object Set]",h="[object String]",m="[object Symbol]",g="[object ArrayBuffer]",b="[object DataView]",w="[object Float32Array]",y="[object Float64Array]",S="[object Int8Array]",E="[object Int16Array]",_="[object Int32Array]",A="[object Uint8Array]",T="[object Uint8ClampedArray]",O="[object Uint16Array]",P="[object Uint32Array]";function M(R,D,I){var k=R.constructor;switch(D){case g:return e(R);case a:case o:return new k(+R);case b:return t(R,I);case w:case y:case S:case E:case _:case A:case T:case O:case P:return i(R,I);case l:return new k;case u:case h:return new k(R);case f:return n(R);case d:return new k;case m:return r(R)}}return YE=M,YE}var XE,G4;function CY(){if(G4)return XE;G4=1;var e=lr(),t=Object.create,n=(function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var a=new r;return r.prototype=void 0,a}})();return XE=n,XE}var ZE,W4;function OY(){if(W4)return ZE;W4=1;var e=CY(),t=px(),n=hx();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return ZE=r,ZE}var QE,K4;function cxe(){if(K4)return QE;K4=1;var e=yd(),t=hi(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return QE=r,QE}var JE,Y4;function fxe(){if(Y4)return JE;Y4=1;var e=cxe(),t=dx(),n=FR(),r=n&&n.isMap,i=r?t(r):e;return JE=i,JE}var eA,X4;function dxe(){if(X4)return eA;X4=1;var e=yd(),t=hi(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return eA=r,eA}var tA,Z4;function hxe(){if(Z4)return tA;Z4=1;var e=dxe(),t=dx(),n=FR(),r=n&&n.isSet,i=r?t(r):e;return tA=i,tA}var nA,Q4;function jY(){if(Q4)return nA;Q4=1;var e=lx(),t=zR(),n=cx(),r=Y0e(),i=Q0e(),a=vY(),o=yY(),l=J0e(),u=exe(),f=_Y(),d=txe(),h=yd(),m=axe(),g=uxe(),b=OY(),w=on(),y=vd(),S=fxe(),E=lr(),_=hxe(),A=Js(),T=ku(),O=1,P=2,M=4,R="[object Arguments]",D="[object Array]",I="[object Boolean]",k="[object Date]",F="[object Error]",$="[object Function]",q="[object GeneratorFunction]",L="[object Map]",z="[object Number]",U="[object Object]",K="[object RegExp]",Z="[object Set]",H="[object String]",V="[object Symbol]",X="[object WeakMap]",Y="[object ArrayBuffer]",G="[object DataView]",Q="[object Float32Array]",J="[object Float64Array]",re="[object Int8Array]",ne="[object Int16Array]",fe="[object Int32Array]",he="[object Uint8Array]",oe="[object Uint8ClampedArray]",ye="[object Uint16Array]",be="[object Uint32Array]",xe={};xe[R]=xe[D]=xe[Y]=xe[G]=xe[I]=xe[k]=xe[Q]=xe[J]=xe[re]=xe[ne]=xe[fe]=xe[L]=xe[z]=xe[U]=xe[K]=xe[Z]=xe[H]=xe[V]=xe[he]=xe[oe]=xe[ye]=xe[be]=!0,xe[F]=xe[$]=xe[X]=!1;function Ee(_e,tt,nt,It,Ut,Pt){var Et,At=tt&O,Ge=tt&P,Lt=tt&M;if(nt&&(Et=Ut?nt(_e,It,Ut,Pt):nt(_e)),Et!==void 0)return Et;if(!E(_e))return _e;var bn=w(_e);if(bn){if(Et=m(_e),!At)return o(_e,Et)}else{var Vn=h(_e),Bu=Vn==$||Vn==q;if(y(_e))return a(_e,At);if(Vn==U||Vn==R||Bu&&!Ut){if(Et=Ge||Bu?{}:b(_e),!At)return Ge?u(_e,i(Et,_e)):l(_e,r(Et,_e))}else{if(!xe[Vn])return Ut?_e:{};Et=g(_e,Vn,At)}}Pt||(Pt=new e);var wa=Pt.get(_e);if(wa)return wa;Pt.set(_e,Et),_(_e)?_e.forEach(function(Fn){Et.add(Ee(Fn,tt,nt,Fn,_e,Pt))}):S(_e)&&_e.forEach(function(Fn,Qt){Et.set(Qt,Ee(Fn,tt,nt,Qt,_e,Pt))});var Md=Lt?Ge?d:f:Ge?T:A,qu=bn?void 0:Md(_e);return t(qu||_e,function(Fn,Qt){qu&&(Qt=Fn,Fn=_e[Qt]),n(Et,Qt,Ee(Fn,tt,nt,Qt,_e,Pt))}),Et}return nA=Ee,nA}var rA,J4;function pxe(){if(J4)return rA;J4=1;var e=jY(),t=4;function n(r){return e(r,t)}return rA=n,rA}var iA,ez;function KR(){if(ez)return iA;ez=1;function e(t){return function(){return t}}return iA=e,iA}var aA,tz;function mxe(){if(tz)return aA;tz=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),l=i(n),u=l.length;u--;){var f=l[t?u:++a];if(r(o[f],f,o)===!1)break}return n}}return aA=e,aA}var oA,nz;function YR(){if(nz)return oA;nz=1;var e=mxe(),t=e();return oA=t,oA}var sA,rz;function XR(){if(rz)return sA;rz=1;var e=YR(),t=Js();function n(r,i){return r&&e(r,i,t)}return sA=n,sA}var lA,iz;function gxe(){if(iz)return lA;iz=1;var e=wo();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,l=r?o:-1,u=Object(i);(r?l--:++l<o)&&a(u[l],l,u)!==!1;);return i}}return lA=t,lA}var uA,az;function bd(){if(az)return uA;az=1;var e=XR(),t=gxe(),n=t(e);return uA=n,uA}var cA,oz;function Du(){if(oz)return cA;oz=1;function e(t){return t}return cA=e,cA}var fA,sz;function NY(){if(sz)return fA;sz=1;var e=Du();function t(n){return typeof n=="function"?n:e}return fA=t,fA}var dA,lz;function PY(){if(lz)return dA;lz=1;var e=zR(),t=bd(),n=NY(),r=on();function i(a,o){var l=r(a)?e:t;return l(a,n(o))}return dA=i,dA}var hA,uz;function MY(){return uz||(uz=1,hA=PY()),hA}var pA,cz;function vxe(){if(cz)return pA;cz=1;var e=bd();function t(n,r){var i=[];return e(n,function(a,o,l){r(a,o,l)&&i.push(a)}),i}return pA=t,pA}var mA,fz;function yxe(){if(fz)return mA;fz=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return mA=t,mA}var gA,dz;function bxe(){if(dz)return gA;dz=1;function e(t){return this.__data__.has(t)}return gA=e,gA}var vA,hz;function RY(){if(hz)return vA;hz=1;var e=qR(),t=yxe(),n=bxe();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,vA=r,vA}var yA,pz;function kY(){if(pz)return yA;pz=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return yA=e,yA}var bA,mz;function DY(){if(mz)return bA;mz=1;function e(t,n){return t.has(n)}return bA=e,bA}var xA,gz;function IY(){if(gz)return xA;gz=1;var e=RY(),t=kY(),n=DY(),r=1,i=2;function a(o,l,u,f,d,h){var m=u&r,g=o.length,b=l.length;if(g!=b&&!(m&&b>g))return!1;var w=h.get(o),y=h.get(l);if(w&&y)return w==l&&y==o;var S=-1,E=!0,_=u&i?new e:void 0;for(h.set(o,l),h.set(l,o);++S<g;){var A=o[S],T=l[S];if(f)var O=m?f(T,A,S,l,o,h):f(A,T,S,o,l,h);if(O!==void 0){if(O)continue;E=!1;break}if(_){if(!t(l,function(P,M){if(!n(_,M)&&(A===P||d(A,P,u,f,h)))return _.push(M)})){E=!1;break}}else if(!(A===T||d(A,T,u,f,h))){E=!1;break}}return h.delete(o),h.delete(l),E}return xA=a,xA}var wA,vz;function xxe(){if(vz)return wA;vz=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return wA=e,wA}var SA,yz;function ZR(){if(yz)return SA;yz=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return SA=e,SA}var _A,bz;function wxe(){if(bz)return _A;bz=1;var e=md(),t=AY(),n=pd(),r=IY(),i=xxe(),a=ZR(),o=1,l=2,u="[object Boolean]",f="[object Date]",d="[object Error]",h="[object Map]",m="[object Number]",g="[object RegExp]",b="[object Set]",w="[object String]",y="[object Symbol]",S="[object ArrayBuffer]",E="[object DataView]",_=e?e.prototype:void 0,A=_?_.valueOf:void 0;function T(O,P,M,R,D,I,k){switch(M){case E:if(O.byteLength!=P.byteLength||O.byteOffset!=P.byteOffset)return!1;O=O.buffer,P=P.buffer;case S:return!(O.byteLength!=P.byteLength||!I(new t(O),new t(P)));case u:case f:case m:return n(+O,+P);case d:return O.name==P.name&&O.message==P.message;case g:case w:return O==P+"";case h:var F=i;case b:var $=R&o;if(F||(F=a),O.size!=P.size&&!$)return!1;var q=k.get(O);if(q)return q==P;R|=l,k.set(O,P);var L=r(F(O),F(P),R,D,I,k);return k.delete(O),L;case y:if(A)return A.call(O)==A.call(P)}return!1}return _A=T,_A}var EA,xz;function Sxe(){if(xz)return EA;xz=1;var e=_Y(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,l,u,f,d){var h=l&t,m=e(a),g=m.length,b=e(o),w=b.length;if(g!=w&&!h)return!1;for(var y=g;y--;){var S=m[y];if(!(h?S in o:r.call(o,S)))return!1}var E=d.get(a),_=d.get(o);if(E&&_)return E==o&&_==a;var A=!0;d.set(a,o),d.set(o,a);for(var T=h;++y<g;){S=m[y];var O=a[S],P=o[S];if(u)var M=h?u(P,O,S,o,a,d):u(O,P,S,a,o,d);if(!(M===void 0?O===P||f(O,P,l,u,d):M)){A=!1;break}T||(T=S=="constructor")}if(A&&!T){var R=a.constructor,D=o.constructor;R!=D&&"constructor"in a&&"constructor"in o&&!(typeof R=="function"&&R instanceof R&&typeof D=="function"&&D instanceof D)&&(A=!1)}return d.delete(a),d.delete(o),A}return EA=i,EA}var AA,wz;function _xe(){if(wz)return AA;wz=1;var e=lx(),t=IY(),n=wxe(),r=Sxe(),i=yd(),a=on(),o=vd(),l=Wm(),u=1,f="[object Arguments]",d="[object Array]",h="[object Object]",m=Object.prototype,g=m.hasOwnProperty;function b(w,y,S,E,_,A){var T=a(w),O=a(y),P=T?d:i(w),M=O?d:i(y);P=P==f?h:P,M=M==f?h:M;var R=P==h,D=M==h,I=P==M;if(I&&o(w)){if(!o(y))return!1;T=!0,R=!1}if(I&&!R)return A||(A=new e),T||l(w)?t(w,y,S,E,_,A):n(w,y,P,S,E,_,A);if(!(S&u)){var k=R&&g.call(w,"__wrapped__"),F=D&&g.call(y,"__wrapped__");if(k||F){var $=k?w.value():w,q=F?y.value():y;return A||(A=new e),_($,q,S,E,A)}}return I?(A||(A=new e),r(w,y,S,E,_,A)):!1}return AA=b,AA}var TA,Sz;function QR(){if(Sz)return TA;Sz=1;var e=_xe(),t=hi();function n(r,i,a,o,l){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,l)}return TA=n,TA}var CA,_z;function Exe(){if(_z)return CA;_z=1;var e=lx(),t=QR(),n=1,r=2;function i(a,o,l,u){var f=l.length,d=f,h=!u;if(a==null)return!d;for(a=Object(a);f--;){var m=l[f];if(h&&m[2]?m[1]!==a[m[0]]:!(m[0]in a))return!1}for(;++f<d;){m=l[f];var g=m[0],b=a[g],w=m[1];if(h&&m[2]){if(b===void 0&&!(g in a))return!1}else{var y=new e;if(u)var S=u(b,w,g,a,o,y);if(!(S===void 0?t(w,b,n|r,u,y):S))return!1}}return!0}return CA=i,CA}var OA,Ez;function LY(){if(Ez)return OA;Ez=1;var e=lr();function t(n){return n===n&&!e(n)}return OA=t,OA}var jA,Az;function Axe(){if(Az)return jA;Az=1;var e=LY(),t=Js();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],l=r[o];i[a]=[o,l,e(l)]}return i}return jA=n,jA}var NA,Tz;function $Y(){if(Tz)return NA;Tz=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return NA=e,NA}var PA,Cz;function Txe(){if(Cz)return PA;Cz=1;var e=Exe(),t=Axe(),n=$Y();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return PA=r,PA}var MA,Oz;function xd(){if(Oz)return MA;Oz=1;var e=xo(),t=hi(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return MA=r,MA}var RA,jz;function JR(){if(jz)return RA;jz=1;var e=on(),t=xd(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var l=typeof a;return l=="number"||l=="symbol"||l=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return RA=i,RA}var kA,Nz;function BY(){if(Nz)return kA;Nz=1;var e=qR(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,l=i?i.apply(this,o):o[0],u=a.cache;if(u.has(l))return u.get(l);var f=r.apply(this,o);return a.cache=u.set(l,f)||u,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,kA=n,kA}var DA,Pz;function Cxe(){if(Pz)return DA;Pz=1;var e=BY(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return DA=n,DA}var IA,Mz;function Oxe(){if(Mz)return IA;Mz=1;var e=Cxe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,l,u,f){a.push(u?f.replace(n,"$1"):l||o)}),a});return IA=r,IA}var LA,Rz;function mx(){if(Rz)return LA;Rz=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return LA=e,LA}var $A,kz;function jxe(){if(kz)return $A;kz=1;var e=md(),t=mx(),n=on(),r=xd(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(r(l))return a?a.call(l):"";var u=l+"";return u=="0"&&1/l==-1/0?"-0":u}return $A=o,$A}var BA,Dz;function e2(){if(Dz)return BA;Dz=1;var e=jxe();function t(n){return n==null?"":e(n)}return BA=t,BA}var qA,Iz;function gx(){if(Iz)return qA;Iz=1;var e=on(),t=JR(),n=Oxe(),r=e2();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return qA=i,qA}var zA,Lz;function Km(){if(Lz)return zA;Lz=1;var e=xd();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return zA=t,zA}var VA,$z;function vx(){if($z)return VA;$z=1;var e=gx(),t=Km();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return VA=n,VA}var FA,Bz;function qY(){if(Bz)return FA;Bz=1;var e=vx();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return FA=t,FA}var UA,qz;function Nxe(){if(qz)return UA;qz=1;function e(t,n){return t!=null&&n in Object(t)}return UA=e,UA}var HA,zz;function zY(){if(zz)return HA;zz=1;var e=gx(),t=Gm(),n=on(),r=fx(),i=VR(),a=Km();function o(l,u,f){u=e(u,l);for(var d=-1,h=u.length,m=!1;++d<h;){var g=a(u[d]);if(!(m=l!=null&&f(l,g)))break;l=l[g]}return m||++d!=h?m:(h=l==null?0:l.length,!!h&&i(h)&&r(g,h)&&(n(l)||t(l)))}return HA=o,HA}var GA,Vz;function VY(){if(Vz)return GA;Vz=1;var e=Nxe(),t=zY();function n(r,i){return r!=null&&t(r,i,e)}return GA=n,GA}var WA,Fz;function Pxe(){if(Fz)return WA;Fz=1;var e=QR(),t=qY(),n=VY(),r=JR(),i=LY(),a=$Y(),o=Km(),l=1,u=2;function f(d,h){return r(d)&&i(h)?a(o(d),h):function(m){var g=t(m,d);return g===void 0&&g===h?n(m,d):e(h,g,l|u)}}return WA=f,WA}var KA,Uz;function FY(){if(Uz)return KA;Uz=1;function e(t){return function(n){return n==null?void 0:n[t]}}return KA=e,KA}var YA,Hz;function Mxe(){if(Hz)return YA;Hz=1;var e=vx();function t(n){return function(r){return e(r,n)}}return YA=t,YA}var XA,Gz;function Rxe(){if(Gz)return XA;Gz=1;var e=FY(),t=Mxe(),n=JR(),r=Km();function i(a){return n(a)?e(r(a)):t(a)}return XA=i,XA}var ZA,Wz;function pi(){if(Wz)return ZA;Wz=1;var e=Txe(),t=Pxe(),n=Du(),r=on(),i=Rxe();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return ZA=a,ZA}var QA,Kz;function UY(){if(Kz)return QA;Kz=1;var e=bY(),t=vxe(),n=pi(),r=on();function i(a,o){var l=r(a)?e:t;return l(a,n(o,3))}return QA=i,QA}var JA,Yz;function kxe(){if(Yz)return JA;Yz=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return JA=n,JA}var eT,Xz;function HY(){if(Xz)return eT;Xz=1;var e=kxe(),t=zY();function n(r,i){return r!=null&&t(r,i,e)}return eT=n,eT}var tT,Zz;function Dxe(){if(Zz)return tT;Zz=1;var e=UR(),t=yd(),n=Gm(),r=on(),i=wo(),a=vd(),o=hx(),l=Wm(),u="[object Map]",f="[object Set]",d=Object.prototype,h=d.hasOwnProperty;function m(g){if(g==null)return!0;if(i(g)&&(r(g)||typeof g=="string"||typeof g.splice=="function"||a(g)||l(g)||n(g)))return!g.length;var b=t(g);if(b==u||b==f)return!g.size;if(o(g))return!e(g).length;for(var w in g)if(h.call(g,w))return!1;return!0}return tT=m,tT}var nT,Qz;function GY(){if(Qz)return nT;Qz=1;function e(t){return t===void 0}return nT=e,nT}var rT,Jz;function WY(){if(Jz)return rT;Jz=1;var e=bd(),t=wo();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(l,u,f){o[++a]=i(l,u,f)}),o}return rT=n,rT}var iT,e5;function t2(){if(e5)return iT;e5=1;var e=mx(),t=pi(),n=WY(),r=on();function i(a,o){var l=r(a)?e:n;return l(a,t(o,3))}return iT=i,iT}var aT,t5;function Ixe(){if(t5)return aT;t5=1;function e(t,n,r,i){var a=-1,o=t==null?0:t.length;for(i&&o&&(r=t[++a]);++a<o;)r=n(r,t[a],a,t);return r}return aT=e,aT}var oT,n5;function Lxe(){if(n5)return oT;n5=1;function e(t,n,r,i,a){return a(t,function(o,l,u){r=i?(i=!1,o):n(r,o,l,u)}),r}return oT=e,oT}var sT,r5;function KY(){if(r5)return sT;r5=1;var e=Ixe(),t=bd(),n=pi(),r=Lxe(),i=on();function a(o,l,u){var f=i(o)?e:r,d=arguments.length<3;return f(o,n(l,4),u,d,t)}return sT=a,sT}var lT,i5;function YY(){if(i5)return lT;i5=1;var e=xo(),t=on(),n=hi(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return lT=i,lT}var uT,a5;function $xe(){if(a5)return uT;a5=1;var e=FY(),t=e("length");return uT=t,uT}var cT,o5;function n2(){if(o5)return cT;o5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+i+a+"]");function u(f){return l.test(f)}return cT=u,cT}var fT,s5;function Bxe(){if(s5)return fT;s5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+u+")",d="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=f+"?",w="["+a+"]?",y="(?:"+g+"(?:"+[d,h,m].join("|")+")"+w+b+")*",S=w+b+y,E="(?:"+[d+l+"?",l,h,m,o].join("|")+")",_=RegExp(u+"(?="+u+")|"+E+S,"g");function A(T){for(var O=_.lastIndex=0;_.test(T);)++O;return O}return fT=A,fT}var dT,l5;function qxe(){if(l5)return dT;l5=1;var e=$xe(),t=n2(),n=Bxe();function r(i){return t(i)?n(i):e(i)}return dT=r,dT}var hT,u5;function zxe(){if(u5)return hT;u5=1;var e=UR(),t=yd(),n=wo(),r=YY(),i=qxe(),a="[object Map]",o="[object Set]";function l(u){if(u==null)return 0;if(n(u))return r(u)?i(u):u.length;var f=t(u);return f==a||f==o?u.size:e(u).length}return hT=l,hT}var pT,c5;function Vxe(){if(c5)return pT;c5=1;var e=zR(),t=CY(),n=XR(),r=pi(),i=px(),a=on(),o=vd(),l=gd(),u=lr(),f=Wm();function d(h,m,g){var b=a(h),w=b||o(h)||f(h);if(m=r(m,4),g==null){var y=h&&h.constructor;w?g=b?new y:[]:u(h)?g=l(y)?t(i(h)):{}:g={}}return(w?e:n)(h,function(S,E,_){return m(g,S,E,_)}),g}return pT=d,pT}var mT,f5;function Fxe(){if(f5)return mT;f5=1;var e=md(),t=Gm(),n=on(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return mT=i,mT}var gT,d5;function yx(){if(d5)return gT;d5=1;var e=GR(),t=Fxe();function n(r,i,a,o,l){var u=-1,f=r.length;for(a||(a=t),l||(l=[]);++u<f;){var d=r[u];i>0&&a(d)?i>1?n(d,i-1,a,o,l):e(l,d):o||(l[l.length]=d)}return l}return gT=n,gT}var vT,h5;function Uxe(){if(h5)return vT;h5=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return vT=e,vT}var yT,p5;function XY(){if(p5)return yT;p5=1;var e=Uxe(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,l=-1,u=t(o.length-i,0),f=Array(u);++l<u;)f[l]=o[i+l];l=-1;for(var d=Array(i+1);++l<i;)d[l]=o[l];return d[i]=a(f),e(r,this,d)}}return yT=n,yT}var bT,m5;function Hxe(){if(m5)return bT;m5=1;var e=KR(),t=pY(),n=Du(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return bT=r,bT}var xT,g5;function Gxe(){if(g5)return xT;g5=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var l=n(),u=t-(l-o);if(o=l,u>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return xT=r,xT}var wT,v5;function ZY(){if(v5)return wT;v5=1;var e=Hxe(),t=Gxe(),n=t(e);return wT=n,wT}var ST,y5;function bx(){if(y5)return ST;y5=1;var e=Du(),t=XY(),n=ZY();function r(i,a){return n(t(i,a,e),i+"")}return ST=r,ST}var _T,b5;function QY(){if(b5)return _T;b5=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return _T=e,_T}var ET,x5;function Wxe(){if(x5)return ET;x5=1;function e(t){return t!==t}return ET=e,ET}var AT,w5;function Kxe(){if(w5)return AT;w5=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return AT=e,AT}var TT,S5;function Yxe(){if(S5)return TT;S5=1;var e=QY(),t=Wxe(),n=Kxe();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return TT=r,TT}var CT,_5;function Xxe(){if(_5)return CT;_5=1;var e=Yxe();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return CT=t,CT}var OT,E5;function Zxe(){if(E5)return OT;E5=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return OT=e,OT}var jT,A5;function Qxe(){if(A5)return jT;A5=1;function e(){}return jT=e,jT}var NT,T5;function Jxe(){if(T5)return NT;T5=1;var e=EY(),t=Qxe(),n=ZR(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return NT=i,NT}var PT,C5;function JY(){if(C5)return PT;C5=1;var e=RY(),t=Xxe(),n=Zxe(),r=DY(),i=Jxe(),a=ZR(),o=200;function l(u,f,d){var h=-1,m=t,g=u.length,b=!0,w=[],y=w;if(d)b=!1,m=n;else if(g>=o){var S=f?null:i(u);if(S)return a(S);b=!1,m=r,y=new e}else y=f?[]:w;e:for(;++h<g;){var E=u[h],_=f?f(E):E;if(E=d||E!==0?E:0,b&&_===_){for(var A=y.length;A--;)if(y[A]===_)continue e;f&&y.push(_),w.push(E)}else m(y,_,d)||(y!==w&&y.push(_),w.push(E))}return w}return PT=l,PT}var MT,O5;function eX(){if(O5)return MT;O5=1;var e=wo(),t=hi();function n(r){return t(r)&&e(r)}return MT=n,MT}var RT,j5;function ewe(){if(j5)return RT;j5=1;var e=yx(),t=bx(),n=JY(),r=eX(),i=t(function(a){return n(e(a,1,r,!0))});return RT=i,RT}var kT,N5;function twe(){if(N5)return kT;N5=1;var e=mx();function t(n,r){return e(r,function(i){return n[i]})}return kT=t,kT}var DT,P5;function tX(){if(P5)return DT;P5=1;var e=twe(),t=Js();function n(r){return r==null?[]:e(r,t(r))}return DT=n,DT}var IT,M5;function mi(){if(M5)return IT;M5=1;var e;if(typeof $R=="function")try{e={clone:pxe(),constant:KR(),each:MY(),filter:UY(),has:HY(),isArray:on(),isEmpty:Dxe(),isFunction:gd(),isUndefined:GY(),keys:Js(),map:t2(),reduce:KY(),size:zxe(),transform:Vxe(),union:ewe(),values:tX()}}catch{}return e||(e=window._),IT=e,IT}var LT,R5;function r2(){if(R5)return LT;R5=1;var e=mi();LT=i;var t="\0",n="\0",r="";function i(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[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(d){return this._label=d,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(h){return e.isEmpty(d._in[h])})},i.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(h){return e.isEmpty(d._out[h])})},i.prototype.setNodes=function(d,h){var m=arguments,g=this;return e.each(d,function(b){m.length>1?g.setNode(b,h):g.setNode(b)}),this},i.prototype.setNode=function(d,h){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=h),this):(this._nodes[d]=arguments.length>1?h:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=n,this._children[d]={},this._children[n][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},i.prototype.node=function(d){return this._nodes[d]},i.prototype.hasNode=function(d){return e.has(this._nodes,d)},i.prototype.removeNode=function(d){var h=this;if(e.has(this._nodes,d)){var m=function(g){h.removeEdge(h._edgeObjs[g])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(g){h.setParent(g)}),delete this._children[d]),e.each(e.keys(this._in[d]),m),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),m),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},i.prototype.setParent=function(d,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(h))h=n;else{h+="";for(var m=h;!e.isUndefined(m);m=this.parent(m))if(m===d)throw new Error("Setting "+h+" as parent of "+d+" would create a cycle");this.setNode(h)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=h,this._children[h][d]=!0,this},i.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},i.prototype.parent=function(d){if(this._isCompound){var h=this._parent[d];if(h!==n)return h}},i.prototype.children=function(d){if(e.isUndefined(d)&&(d=n),this._isCompound){var h=this._children[d];if(h)return e.keys(h)}else{if(d===n)return this.nodes();if(this.hasNode(d))return[]}},i.prototype.predecessors=function(d){var h=this._preds[d];if(h)return e.keys(h)},i.prototype.successors=function(d){var h=this._sucs[d];if(h)return e.keys(h)},i.prototype.neighbors=function(d){var h=this.predecessors(d);if(h)return e.union(h,this.successors(d))},i.prototype.isLeaf=function(d){var h;return this.isDirected()?h=this.successors(d):h=this.neighbors(d),h.length===0},i.prototype.filterNodes=function(d){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var m=this;e.each(this._nodes,function(w,y){d(y)&&h.setNode(y,w)}),e.each(this._edgeObjs,function(w){h.hasNode(w.v)&&h.hasNode(w.w)&&h.setEdge(w,m.edge(w))});var g={};function b(w){var y=m.parent(w);return y===void 0||h.hasNode(y)?(g[w]=y,y):y in g?g[y]:b(y)}return this._isCompound&&e.each(h.nodes(),function(w){h.setParent(w,b(w))}),h},i.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(d,h){var m=this,g=arguments;return e.reduce(d,function(b,w){return g.length>1?m.setEdge(b,w,h):m.setEdge(b,w),w}),this},i.prototype.setEdge=function(){var d,h,m,g,b=!1,w=arguments[0];typeof w=="object"&&w!==null&&"v"in w?(d=w.v,h=w.w,m=w.name,arguments.length===2&&(g=arguments[1],b=!0)):(d=w,h=arguments[1],m=arguments[3],arguments.length>2&&(g=arguments[2],b=!0)),d=""+d,h=""+h,e.isUndefined(m)||(m=""+m);var y=l(this._isDirected,d,h,m);if(e.has(this._edgeLabels,y))return b&&(this._edgeLabels[y]=g),this;if(!e.isUndefined(m)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(h),this._edgeLabels[y]=b?g:this._defaultEdgeLabelFn(d,h,m);var S=u(this._isDirected,d,h,m);return d=S.v,h=S.w,Object.freeze(S),this._edgeObjs[y]=S,a(this._preds[h],d),a(this._sucs[d],h),this._in[h][y]=S,this._out[d][y]=S,this._edgeCount++,this},i.prototype.edge=function(d,h,m){var g=arguments.length===1?f(this._isDirected,arguments[0]):l(this._isDirected,d,h,m);return this._edgeLabels[g]},i.prototype.hasEdge=function(d,h,m){var g=arguments.length===1?f(this._isDirected,arguments[0]):l(this._isDirected,d,h,m);return e.has(this._edgeLabels,g)},i.prototype.removeEdge=function(d,h,m){var g=arguments.length===1?f(this._isDirected,arguments[0]):l(this._isDirected,d,h,m),b=this._edgeObjs[g];return b&&(d=b.v,h=b.w,delete this._edgeLabels[g],delete this._edgeObjs[g],o(this._preds[h],d),o(this._sucs[d],h),delete this._in[h][g],delete this._out[d][g],this._edgeCount--),this},i.prototype.inEdges=function(d,h){var m=this._in[d];if(m){var g=e.values(m);return h?e.filter(g,function(b){return b.v===h}):g}},i.prototype.outEdges=function(d,h){var m=this._out[d];if(m){var g=e.values(m);return h?e.filter(g,function(b){return b.w===h}):g}},i.prototype.nodeEdges=function(d,h){var m=this.inEdges(d,h);if(m)return m.concat(this.outEdges(d,h))};function a(d,h){d[h]?d[h]++:d[h]=1}function o(d,h){--d[h]||delete d[h]}function l(d,h,m,g){var b=""+h,w=""+m;if(!d&&b>w){var y=b;b=w,w=y}return b+r+w+r+(e.isUndefined(g)?t:g)}function u(d,h,m,g){var b=""+h,w=""+m;if(!d&&b>w){var y=b;b=w,w=y}var S={v:b,w};return g&&(S.name=g),S}function f(d,h){return l(d,h.v,h.w,h.name)}return LT}var $T,k5;function nwe(){return k5||(k5=1,$T="2.1.8"),$T}var BT,D5;function rwe(){return D5||(D5=1,BT={Graph:r2(),version:nwe()}),BT}var qT,I5;function iwe(){if(I5)return qT;I5=1;var e=mi(),t=r2();qT={write:n,read:a};function n(o){var l={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:r(o),edges:i(o)};return e.isUndefined(o.graph())||(l.value=e.clone(o.graph())),l}function r(o){return e.map(o.nodes(),function(l){var u=o.node(l),f=o.parent(l),d={v:l};return e.isUndefined(u)||(d.value=u),e.isUndefined(f)||(d.parent=f),d})}function i(o){return e.map(o.edges(),function(l){var u=o.edge(l),f={v:l.v,w:l.w};return e.isUndefined(l.name)||(f.name=l.name),e.isUndefined(u)||(f.value=u),f})}function a(o){var l=new t(o.options).setGraph(o.value);return e.each(o.nodes,function(u){l.setNode(u.v,u.value),u.parent&&l.setParent(u.v,u.parent)}),e.each(o.edges,function(u){l.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),l}return qT}var zT,L5;function awe(){if(L5)return zT;L5=1;var e=mi();zT=t;function t(n){var r={},i=[],a;function o(l){e.has(r,l)||(r[l]=!0,a.push(l),e.each(n.successors(l),o),e.each(n.predecessors(l),o))}return e.each(n.nodes(),function(l){a=[],o(l),a.length&&i.push(a)}),i}return zT}var VT,$5;function nX(){if($5)return VT;$5=1;var e=mi();VT=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(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var a=this._arr,o=a.length;return i[n]=o,a.push({key:n,priority:r}),this._decrease(o),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,a=i+1,o=n;i<r.length&&(o=r[i].priority<r[o].priority?i:o,a<r.length&&(o=r[a].priority<r[o].priority?a:o),o!==n&&(this._swap(n,o),this._heapify(o)))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<i));)this._swap(n,a),n=a},t.prototype._swap=function(n,r){var i=this._arr,a=this._keyIndices,o=i[n],l=i[r];i[n]=l,i[r]=o,a[l.key]=n,a[o.key]=r},VT}var FT,B5;function rX(){if(B5)return FT;B5=1;var e=mi(),t=nX();FT=r;var n=e.constant(1);function r(a,o,l,u){return i(a,String(o),l||n,u||function(f){return a.outEdges(f)})}function i(a,o,l,u){var f={},d=new t,h,m,g=function(b){var w=b.v!==h?b.v:b.w,y=f[w],S=l(b),E=m.distance+S;if(S<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+b+" Weight: "+S);E<y.distance&&(y.distance=E,y.predecessor=h,d.decrease(w,E))};for(a.nodes().forEach(function(b){var w=b===o?0:Number.POSITIVE_INFINITY;f[b]={distance:w},d.add(b,w)});d.size()>0&&(h=d.removeMin(),m=f[h],m.distance!==Number.POSITIVE_INFINITY);)u(h).forEach(g);return f}return FT}var UT,q5;function owe(){if(q5)return UT;q5=1;var e=rX(),t=mi();UT=n;function n(r,i,a){return t.transform(r.nodes(),function(o,l){o[l]=e(r,l,i,a)},{})}return UT}var HT,z5;function iX(){if(z5)return HT;z5=1;var e=mi();HT=t;function t(n){var r=0,i=[],a={},o=[];function l(u){var f=a[u]={onStack:!0,lowlink:r,index:r++};if(i.push(u),n.successors(u).forEach(function(m){e.has(a,m)?a[m].onStack&&(f.lowlink=Math.min(f.lowlink,a[m].index)):(l(m),f.lowlink=Math.min(f.lowlink,a[m].lowlink))}),f.lowlink===f.index){var d=[],h;do h=i.pop(),a[h].onStack=!1,d.push(h);while(u!==h);o.push(d)}}return n.nodes().forEach(function(u){e.has(a,u)||l(u)}),o}return HT}var GT,V5;function swe(){if(V5)return GT;V5=1;var e=mi(),t=iX();GT=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return GT}var WT,F5;function lwe(){if(F5)return WT;F5=1;var e=mi();WT=n;var t=e.constant(1);function n(i,a,o){return r(i,a||t,o||function(l){return i.outEdges(l)})}function r(i,a,o){var l={},u=i.nodes();return u.forEach(function(f){l[f]={},l[f][f]={distance:0},u.forEach(function(d){f!==d&&(l[f][d]={distance:Number.POSITIVE_INFINITY})}),o(f).forEach(function(d){var h=d.v===f?d.w:d.v,m=a(d);l[f][h]={distance:m,predecessor:f}})}),u.forEach(function(f){var d=l[f];u.forEach(function(h){var m=l[h];u.forEach(function(g){var b=m[f],w=d[g],y=m[g],S=b.distance+w.distance;S<y.distance&&(y.distance=S,y.predecessor=w.predecessor)})})}),l}return WT}var KT,U5;function aX(){if(U5)return KT;U5=1;var e=mi();KT=t,t.CycleException=n;function t(r){var i={},a={},o=[];function l(u){if(e.has(a,u))throw new n;e.has(i,u)||(a[u]=!0,i[u]=!0,e.each(r.predecessors(u),l),delete a[u],o.push(u))}if(e.each(r.sinks(),l),e.size(i)!==r.nodeCount())throw new n;return o}function n(){}return n.prototype=new Error,KT}var YT,H5;function uwe(){if(H5)return YT;H5=1;var e=aX();YT=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return YT}var XT,G5;function oX(){if(G5)return XT;G5=1;var e=mi();XT=t;function t(r,i,a){e.isArray(i)||(i=[i]);var o=(r.isDirected()?r.successors:r.neighbors).bind(r),l=[],u={};return e.each(i,function(f){if(!r.hasNode(f))throw new Error("Graph does not have node: "+f);n(r,f,a==="post",u,o,l)}),l}function n(r,i,a,o,l,u){e.has(o,i)||(o[i]=!0,a||u.push(i),e.each(l(i),function(f){n(r,f,a,o,l,u)}),a&&u.push(i))}return XT}var ZT,W5;function cwe(){if(W5)return ZT;W5=1;var e=oX();ZT=t;function t(n,r){return e(n,r,"post")}return ZT}var QT,K5;function fwe(){if(K5)return QT;K5=1;var e=oX();QT=t;function t(n,r){return e(n,r,"pre")}return QT}var JT,Y5;function dwe(){if(Y5)return JT;Y5=1;var e=mi(),t=r2(),n=nX();JT=r;function r(i,a){var o=new t,l={},u=new n,f;function d(m){var g=m.v===f?m.w:m.v,b=u.priority(g);if(b!==void 0){var w=a(m);w<b&&(l[g]=f,u.decrease(g,w))}}if(i.nodeCount()===0)return o;e.each(i.nodes(),function(m){u.add(m,Number.POSITIVE_INFINITY),o.setNode(m)}),u.decrease(i.nodes()[0],0);for(var h=!1;u.size()>0;){if(f=u.removeMin(),e.has(l,f))o.setEdge(f,l[f]);else{if(h)throw new Error("Input graph is not connected: "+i);h=!0}i.nodeEdges(f).forEach(d)}return o}return JT}var eC,X5;function hwe(){return X5||(X5=1,eC={components:awe(),dijkstra:rX(),dijkstraAll:owe(),findCycles:swe(),floydWarshall:lwe(),isAcyclic:uwe(),postorder:cwe(),preorder:fwe(),prim:dwe(),tarjan:iX(),topsort:aX()}),eC}var tC,Z5;function pwe(){if(Z5)return tC;Z5=1;var e=rwe();return tC={Graph:e.Graph,json:iwe(),alg:hwe(),version:e.version},tC}var nC,Q5;function qi(){if(Q5)return nC;Q5=1;var e;if(typeof $R=="function")try{e=pwe()}catch{}return e||(e=window.graphlib),nC=e,nC}var rC,J5;function mwe(){if(J5)return rC;J5=1;var e=jY(),t=1,n=4;function r(i){return e(i,t|n)}return rC=r,rC}var iC,eV;function wd(){if(eV)return iC;eV=1;var e=pd(),t=wo(),n=fx(),r=lr();function i(a,o,l){if(!r(l))return!1;var u=typeof o;return(u=="number"?t(l)&&n(o,l.length):u=="string"&&o in l)?e(l[o],a):!1}return iC=i,iC}var aC,tV;function gwe(){if(tV)return aC;tV=1;var e=bx(),t=pd(),n=wd(),r=ku(),i=Object.prototype,a=i.hasOwnProperty,o=e(function(l,u){l=Object(l);var f=-1,d=u.length,h=d>2?u[2]:void 0;for(h&&n(u[0],u[1],h)&&(d=1);++f<d;)for(var m=u[f],g=r(m),b=-1,w=g.length;++b<w;){var y=g[b],S=l[y];(S===void 0||t(S,i[y])&&!a.call(l,y))&&(l[y]=m[y])}return l});return aC=o,aC}var oC,nV;function vwe(){if(nV)return oC;nV=1;var e=pi(),t=wo(),n=Js();function r(i){return function(a,o,l){var u=Object(a);if(!t(a)){var f=e(o,3);a=n(a),o=function(h){return f(u[h],h,u)}}var d=i(a,o,l);return d>-1?u[f?a[d]:d]:void 0}}return oC=r,oC}var sC,rV;function ywe(){if(rV)return sC;rV=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return sC=t,sC}var lC,iV;function bwe(){if(iV)return lC;iV=1;var e=ywe(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return lC=n,lC}var uC,aV;function sX(){if(aV)return uC;aV=1;var e=bwe(),t=lr(),n=xd(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function u(f){if(typeof f=="number")return f;if(n(f))return r;if(t(f)){var d=typeof f.valueOf=="function"?f.valueOf():f;f=t(d)?d+"":d}if(typeof f!="string")return f===0?f:+f;f=e(f);var h=a.test(f);return h||o.test(f)?l(f.slice(2),h?2:8):i.test(f)?r:+f}return uC=u,uC}var cC,oV;function lX(){if(oV)return cC;oV=1;var e=sX(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return cC=r,cC}var fC,sV;function xwe(){if(sV)return fC;sV=1;var e=lX();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return fC=t,fC}var dC,lV;function wwe(){if(lV)return dC;lV=1;var e=QY(),t=pi(),n=xwe(),r=Math.max;function i(a,o,l){var u=a==null?0:a.length;if(!u)return-1;var f=l==null?0:n(l);return f<0&&(f=r(u+f,0)),e(a,t(o,3),f)}return dC=i,dC}var hC,uV;function uX(){if(uV)return hC;uV=1;var e=vwe(),t=wwe(),n=e(t);return hC=n,hC}var pC,cV;function cX(){if(cV)return pC;cV=1;var e=yx();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return pC=t,pC}var mC,fV;function Swe(){if(fV)return mC;fV=1;var e=YR(),t=NY(),n=ku();function r(i,a){return i==null?i:e(i,t(a),n)}return mC=r,mC}var gC,dV;function fX(){if(dV)return gC;dV=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return gC=e,gC}var vC,hV;function dX(){if(hV)return vC;hV=1;var e=ux(),t=XR(),n=pi();function r(i,a){var o={};return a=n(a,3),t(i,function(l,u,f){e(o,u,a(l,u,f))}),o}return vC=r,vC}var yC,pV;function i2(){if(pV)return yC;pV=1;var e=xd();function t(n,r,i){for(var a=-1,o=n.length;++a<o;){var l=n[a],u=r(l);if(u!=null&&(f===void 0?u===u&&!e(u):i(u,f)))var f=u,d=l}return d}return yC=t,yC}var bC,mV;function _we(){if(mV)return bC;mV=1;function e(t,n){return t>n}return bC=e,bC}var xC,gV;function hX(){if(gV)return xC;gV=1;var e=i2(),t=_we(),n=Du();function r(i){return i&&i.length?e(i,n,t):void 0}return xC=r,xC}var wC,vV;function pX(){if(vV)return wC;vV=1;var e=ux(),t=pd();function n(r,i,a){(a!==void 0&&!t(r[i],a)||a===void 0&&!(i in r))&&e(r,i,a)}return wC=n,wC}var SC,yV;function mX(){if(yV)return SC;yV=1;var e=xo(),t=px(),n=hi(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,l=a.hasOwnProperty,u=o.call(Object);function f(d){if(!n(d)||e(d)!=r)return!1;var h=t(d);if(h===null)return!0;var m=l.call(h,"constructor")&&h.constructor;return typeof m=="function"&&m instanceof m&&o.call(m)==u}return SC=f,SC}var _C,bV;function gX(){if(bV)return _C;bV=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return _C=e,_C}var EC,xV;function Ewe(){if(xV)return EC;xV=1;var e=Hm(),t=ku();function n(r){return e(r,t(r))}return EC=n,EC}var AC,wV;function Awe(){if(wV)return AC;wV=1;var e=pX(),t=vY(),n=TY(),r=yY(),i=OY(),a=Gm(),o=on(),l=eX(),u=vd(),f=gd(),d=lr(),h=mX(),m=Wm(),g=gX(),b=Ewe();function w(y,S,E,_,A,T,O){var P=g(y,E),M=g(S,E),R=O.get(M);if(R){e(y,E,R);return}var D=T?T(P,M,E+"",y,S,O):void 0,I=D===void 0;if(I){var k=o(M),F=!k&&u(M),$=!k&&!F&&m(M);D=M,k||F||$?o(P)?D=P:l(P)?D=r(P):F?(I=!1,D=t(M,!0)):$?(I=!1,D=n(M,!0)):D=[]:h(M)||a(M)?(D=P,a(P)?D=b(P):(!d(P)||f(P))&&(D=i(M))):I=!1}I&&(O.set(M,D),A(D,M,_,T,O),O.delete(M)),e(y,E,D)}return AC=w,AC}var TC,SV;function Twe(){if(SV)return TC;SV=1;var e=lx(),t=pX(),n=YR(),r=Awe(),i=lr(),a=ku(),o=gX();function l(u,f,d,h,m){u!==f&&n(f,function(g,b){if(m||(m=new e),i(g))r(u,f,b,d,l,h,m);else{var w=h?h(o(u,b),g,b+"",u,f,m):void 0;w===void 0&&(w=g),t(u,b,w)}},a)}return TC=l,TC}var CC,_V;function Cwe(){if(_V)return CC;_V=1;var e=bx(),t=wd();function n(r){return e(function(i,a){var o=-1,l=a.length,u=l>1?a[l-1]:void 0,f=l>2?a[2]:void 0;for(u=r.length>3&&typeof u=="function"?(l--,u):void 0,f&&t(a[0],a[1],f)&&(u=l<3?void 0:u,l=1),i=Object(i);++o<l;){var d=a[o];d&&r(i,d,o,u)}return i})}return CC=n,CC}var OC,EV;function Owe(){if(EV)return OC;EV=1;var e=Twe(),t=Cwe(),n=t(function(r,i,a){e(r,i,a)});return OC=n,OC}var jC,AV;function vX(){if(AV)return jC;AV=1;function e(t,n){return t<n}return jC=e,jC}var NC,TV;function yX(){if(TV)return NC;TV=1;var e=i2(),t=vX(),n=Du();function r(i){return i&&i.length?e(i,n,t):void 0}return NC=r,NC}var PC,CV;function jwe(){if(CV)return PC;CV=1;var e=i2(),t=pi(),n=vX();function r(i,a){return i&&i.length?e(i,t(a,2),n):void 0}return PC=r,PC}var MC,OV;function bX(){if(OV)return MC;OV=1;var e=Ui(),t=function(){return e.Date.now()};return MC=t,MC}var RC,jV;function Nwe(){if(jV)return RC;jV=1;var e=cx(),t=gx(),n=fx(),r=lr(),i=Km();function a(o,l,u,f){if(!r(o))return o;l=t(l,o);for(var d=-1,h=l.length,m=h-1,g=o;g!=null&&++d<h;){var b=i(l[d]),w=u;if(b==="__proto__"||b==="constructor"||b==="prototype")return o;if(d!=m){var y=g[b];w=f?f(y,b,g):void 0,w===void 0&&(w=r(y)?y:n(l[d+1])?[]:{})}e(g,b,w),g=g[b]}return o}return RC=a,RC}var kC,NV;function Pwe(){if(NV)return kC;NV=1;var e=vx(),t=Nwe(),n=gx();function r(i,a,o){for(var l=-1,u=a.length,f={};++l<u;){var d=a[l],h=e(i,d);o(h,d)&&t(f,n(d,i),h)}return f}return kC=r,kC}var DC,PV;function Mwe(){if(PV)return DC;PV=1;var e=Pwe(),t=VY();function n(r,i){return e(r,i,function(a,o){return t(r,o)})}return DC=n,DC}var IC,MV;function Rwe(){if(MV)return IC;MV=1;var e=cX(),t=XY(),n=ZY();function r(i){return n(t(i,void 0,e),i+"")}return IC=r,IC}var LC,RV;function kwe(){if(RV)return LC;RV=1;var e=Mwe(),t=Rwe(),n=t(function(r,i){return r==null?{}:e(r,i)});return LC=n,LC}var $C,kV;function Dwe(){if(kV)return $C;kV=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var l=-1,u=t(e((i-r)/(a||1)),0),f=Array(u);u--;)f[o?u:++l]=r,r+=a;return f}return $C=n,$C}var BC,DV;function Iwe(){if(DV)return BC;DV=1;var e=Dwe(),t=wd(),n=lX();function r(i){return function(a,o,l){return l&&typeof l!="number"&&t(a,o,l)&&(o=l=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),l=l===void 0?a<o?1:-1:n(l),e(a,o,l,i)}}return BC=r,BC}var qC,IV;function xX(){if(IV)return qC;IV=1;var e=Iwe(),t=e();return qC=t,qC}var zC,LV;function Lwe(){if(LV)return zC;LV=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return zC=e,zC}var VC,$V;function $we(){if($V)return VC;$V=1;var e=xd();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,l=e(n),u=r!==void 0,f=r===null,d=r===r,h=e(r);if(!f&&!h&&!l&&n>r||l&&u&&d&&!f&&!h||a&&u&&d||!i&&d||!o)return 1;if(!a&&!l&&!h&&n<r||h&&i&&o&&!a&&!l||f&&i&&o||!u&&o||!d)return-1}return 0}return VC=t,VC}var FC,BV;function Bwe(){if(BV)return FC;BV=1;var e=$we();function t(n,r,i){for(var a=-1,o=n.criteria,l=r.criteria,u=o.length,f=i.length;++a<u;){var d=e(o[a],l[a]);if(d){if(a>=f)return d;var h=i[a];return d*(h=="desc"?-1:1)}}return n.index-r.index}return FC=t,FC}var UC,qV;function qwe(){if(qV)return UC;qV=1;var e=mx(),t=vx(),n=pi(),r=WY(),i=Lwe(),a=dx(),o=Bwe(),l=Du(),u=on();function f(d,h,m){h.length?h=e(h,function(w){return u(w)?function(y){return t(y,w.length===1?w[0]:w)}:w}):h=[l];var g=-1;h=e(h,a(n));var b=r(d,function(w,y,S){var E=e(h,function(_){return _(w)});return{criteria:E,index:++g,value:w}});return i(b,function(w,y){return o(w,y,m)})}return UC=f,UC}var HC,zV;function wX(){if(zV)return HC;zV=1;var e=yx(),t=qwe(),n=bx(),r=wd(),i=n(function(a,o){if(a==null)return[];var l=o.length;return l>1&&r(a,o[0],o[1])?o=[]:l>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return HC=i,HC}var GC,VV;function zwe(){if(VV)return GC;VV=1;var e=e2(),t=0;function n(r){var i=++t;return e(r)+i}return GC=n,GC}var WC,FV;function Vwe(){if(FV)return WC;FV=1;function e(t,n,r){for(var i=-1,a=t.length,o=n.length,l={};++i<a;){var u=i<o?n[i]:void 0;r(l,t[i],u)}return l}return WC=e,WC}var KC,UV;function Fwe(){if(UV)return KC;UV=1;var e=cx(),t=Vwe();function n(r,i){return t(r||[],i||[],e)}return KC=n,KC}var YC,HV;function Zt(){if(HV)return YC;HV=1;var e;if(typeof $R=="function")try{e={cloneDeep:mwe(),constant:KR(),defaults:gwe(),each:MY(),filter:UY(),find:uX(),flatten:cX(),forEach:PY(),forIn:Swe(),has:HY(),isUndefined:GY(),last:fX(),map:t2(),mapValues:dX(),max:hX(),merge:Owe(),min:yX(),minBy:jwe(),now:bX(),pick:kwe(),range:xX(),reduce:KY(),sortBy:wX(),uniqueId:zwe(),values:tX(),zipObject:Fwe()}}catch{}return e||(e=window._),YC=e,YC}var XC,GV;function Uwe(){if(GV)return XC;GV=1,XC=e;function e(){var r={};r._next=r._prev=r,this._sentinel=r}e.prototype.dequeue=function(){var r=this._sentinel,i=r._prev;if(i!==r)return t(i),i},e.prototype.enqueue=function(r){var i=this._sentinel;r._prev&&r._next&&t(r),r._next=i._next,i._next._prev=r,i._next=r,r._prev=i},e.prototype.toString=function(){for(var r=[],i=this._sentinel,a=i._prev;a!==i;)r.push(JSON.stringify(a,n)),a=a._prev;return"["+r.join(", ")+"]"};function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,i){if(r!=="_next"&&r!=="_prev")return i}return XC}var ZC,WV;function Hwe(){if(WV)return ZC;WV=1;var e=Zt(),t=qi().Graph,n=Uwe();ZC=i;var r=e.constant(1);function i(f,d){if(f.nodeCount()<=1)return[];var h=l(f,d||r),m=a(h.graph,h.buckets,h.zeroIdx);return e.flatten(e.map(m,function(g){return f.outEdges(g.v,g.w)}),!0)}function a(f,d,h){for(var m=[],g=d[d.length-1],b=d[0],w;f.nodeCount();){for(;w=b.dequeue();)o(f,d,h,w);for(;w=g.dequeue();)o(f,d,h,w);if(f.nodeCount()){for(var y=d.length-2;y>0;--y)if(w=d[y].dequeue(),w){m=m.concat(o(f,d,h,w,!0));break}}}return m}function o(f,d,h,m,g){var b=g?[]:void 0;return e.forEach(f.inEdges(m.v),function(w){var y=f.edge(w),S=f.node(w.v);g&&b.push({v:w.v,w:w.w}),S.out-=y,u(d,h,S)}),e.forEach(f.outEdges(m.v),function(w){var y=f.edge(w),S=w.w,E=f.node(S);E.in-=y,u(d,h,E)}),f.removeNode(m.v),b}function l(f,d){var h=new t,m=0,g=0;e.forEach(f.nodes(),function(y){h.setNode(y,{v:y,in:0,out:0})}),e.forEach(f.edges(),function(y){var S=h.edge(y.v,y.w)||0,E=d(y),_=S+E;h.setEdge(y.v,y.w,_),g=Math.max(g,h.node(y.v).out+=E),m=Math.max(m,h.node(y.w).in+=E)});var b=e.range(g+m+3).map(function(){return new n}),w=m+1;return e.forEach(h.nodes(),function(y){u(b,w,h.node(y))}),{graph:h,buckets:b,zeroIdx:w}}function u(f,d,h){h.out?h.in?f[h.out-h.in+d].enqueue(h):f[f.length-1].enqueue(h):f[0].enqueue(h)}return ZC}var QC,KV;function Gwe(){if(KV)return QC;KV=1;var e=Zt(),t=Hwe();QC={run:n,undo:i};function n(a){var o=a.graph().acyclicer==="greedy"?t(a,l(a)):r(a);e.forEach(o,function(u){var f=a.edge(u);a.removeEdge(u),f.forwardName=u.name,f.reversed=!0,a.setEdge(u.w,u.v,f,e.uniqueId("rev"))});function l(u){return function(f){return u.edge(f).weight}}}function r(a){var o=[],l={},u={};function f(d){e.has(u,d)||(u[d]=!0,l[d]=!0,e.forEach(a.outEdges(d),function(h){e.has(l,h.w)?o.push(h):f(h.w)}),delete l[d])}return e.forEach(a.nodes(),f),o}function i(a){e.forEach(a.edges(),function(o){var l=a.edge(o);if(l.reversed){a.removeEdge(o);var u=l.forwardName;delete l.reversed,delete l.forwardName,a.setEdge(o.w,o.v,l,u)}})}return QC}var JC,YV;function Sr(){if(YV)return JC;YV=1;var e=Zt(),t=qi().Graph;JC={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:l,buildLayerMatrix:u,normalizeRanks:f,removeEmptyRanks:d,addBorderNode:h,maxRank:m,partition:g,time:b,notime:w};function n(y,S,E,_){var A;do A=e.uniqueId(_);while(y.hasNode(A));return E.dummy=S,y.setNode(A,E),A}function r(y){var S=new t().setGraph(y.graph());return e.forEach(y.nodes(),function(E){S.setNode(E,y.node(E))}),e.forEach(y.edges(),function(E){var _=S.edge(E.v,E.w)||{weight:0,minlen:1},A=y.edge(E);S.setEdge(E.v,E.w,{weight:_.weight+A.weight,minlen:Math.max(_.minlen,A.minlen)})}),S}function i(y){var S=new t({multigraph:y.isMultigraph()}).setGraph(y.graph());return e.forEach(y.nodes(),function(E){y.children(E).length||S.setNode(E,y.node(E))}),e.forEach(y.edges(),function(E){S.setEdge(E,y.edge(E))}),S}function a(y){var S=e.map(y.nodes(),function(E){var _={};return e.forEach(y.outEdges(E),function(A){_[A.w]=(_[A.w]||0)+y.edge(A).weight}),_});return e.zipObject(y.nodes(),S)}function o(y){var S=e.map(y.nodes(),function(E){var _={};return e.forEach(y.inEdges(E),function(A){_[A.v]=(_[A.v]||0)+y.edge(A).weight}),_});return e.zipObject(y.nodes(),S)}function l(y,S){var E=y.x,_=y.y,A=S.x-E,T=S.y-_,O=y.width/2,P=y.height/2;if(!A&&!T)throw new Error("Not possible to find intersection inside of the rectangle");var M,R;return Math.abs(T)*O>Math.abs(A)*P?(T<0&&(P=-P),M=P*A/T,R=P):(A<0&&(O=-O),M=O,R=O*T/A),{x:E+M,y:_+R}}function u(y){var S=e.map(e.range(m(y)+1),function(){return[]});return e.forEach(y.nodes(),function(E){var _=y.node(E),A=_.rank;e.isUndefined(A)||(S[A][_.order]=E)}),S}function f(y){var S=e.min(e.map(y.nodes(),function(E){return y.node(E).rank}));e.forEach(y.nodes(),function(E){var _=y.node(E);e.has(_,"rank")&&(_.rank-=S)})}function d(y){var S=e.min(e.map(y.nodes(),function(T){return y.node(T).rank})),E=[];e.forEach(y.nodes(),function(T){var O=y.node(T).rank-S;E[O]||(E[O]=[]),E[O].push(T)});var _=0,A=y.graph().nodeRankFactor;e.forEach(E,function(T,O){e.isUndefined(T)&&O%A!==0?--_:_&&e.forEach(T,function(P){y.node(P).rank+=_})})}function h(y,S,E,_){var A={width:0,height:0};return arguments.length>=4&&(A.rank=E,A.order=_),n(y,"border",A,S)}function m(y){return e.max(e.map(y.nodes(),function(S){var E=y.node(S).rank;if(!e.isUndefined(E))return E}))}function g(y,S){var E={lhs:[],rhs:[]};return e.forEach(y,function(_){S(_)?E.lhs.push(_):E.rhs.push(_)}),E}function b(y,S){var E=e.now();try{return S()}finally{console.log(y+" time: "+(e.now()-E)+"ms")}}function w(y,S){return S()}return JC}var eO,XV;function Wwe(){if(XV)return eO;XV=1;var e=Zt(),t=Sr();eO={run:n,undo:i};function n(a){a.graph().dummyChains=[],e.forEach(a.edges(),function(o){r(a,o)})}function r(a,o){var l=o.v,u=a.node(l).rank,f=o.w,d=a.node(f).rank,h=o.name,m=a.edge(o),g=m.labelRank;if(d!==u+1){a.removeEdge(o);var b,w,y;for(y=0,++u;u<d;++y,++u)m.points=[],w={width:0,height:0,edgeLabel:m,edgeObj:o,rank:u},b=t.addDummyNode(a,"edge",w,"_d"),u===g&&(w.width=m.width,w.height=m.height,w.dummy="edge-label",w.labelpos=m.labelpos),a.setEdge(l,b,{weight:m.weight},h),y===0&&a.graph().dummyChains.push(b),l=b;a.setEdge(l,f,{weight:m.weight},h)}}function i(a){e.forEach(a.graph().dummyChains,function(o){var l=a.node(o),u=l.edgeLabel,f;for(a.setEdge(l.edgeObj,u);l.dummy;)f=a.successors(o)[0],a.removeNode(o),u.points.push({x:l.x,y:l.y}),l.dummy==="edge-label"&&(u.x=l.x,u.y=l.y,u.width=l.width,u.height=l.height),o=f,l=a.node(o)})}return eO}var tO,ZV;function gb(){if(ZV)return tO;ZV=1;var e=Zt();tO={longestPath:t,slack:n};function t(r){var i={};function a(o){var l=r.node(o);if(e.has(i,o))return l.rank;i[o]=!0;var u=e.min(e.map(r.outEdges(o),function(f){return a(f.w)-r.edge(f).minlen}));return(u===Number.POSITIVE_INFINITY||u===void 0||u===null)&&(u=0),l.rank=u}e.forEach(r.sources(),a)}function n(r,i){return r.node(i.w).rank-r.node(i.v).rank-r.edge(i).minlen}return tO}var nO,QV;function SX(){if(QV)return nO;QV=1;var e=Zt(),t=qi().Graph,n=gb().slack;nO=r;function r(l){var u=new t({directed:!1}),f=l.nodes()[0],d=l.nodeCount();u.setNode(f,{});for(var h,m;i(u,l)<d;)h=a(u,l),m=u.hasNode(h.v)?n(l,h):-n(l,h),o(u,l,m);return u}function i(l,u){function f(d){e.forEach(u.nodeEdges(d),function(h){var m=h.v,g=d===m?h.w:m;!l.hasNode(g)&&!n(u,h)&&(l.setNode(g,{}),l.setEdge(d,g,{}),f(g))})}return e.forEach(l.nodes(),f),l.nodeCount()}function a(l,u){return e.minBy(u.edges(),function(f){if(l.hasNode(f.v)!==l.hasNode(f.w))return n(u,f)})}function o(l,u,f){e.forEach(l.nodes(),function(d){u.node(d).rank+=f})}return nO}var rO,JV;function Kwe(){if(JV)return rO;JV=1;var e=Zt(),t=SX(),n=gb().slack,r=gb().longestPath,i=qi().alg.preorder,a=qi().alg.postorder,o=Sr().simplify;rO=l,l.initLowLimValues=h,l.initCutValues=u,l.calcCutValue=d,l.leaveEdge=g,l.enterEdge=b,l.exchangeEdges=w;function l(_){_=o(_),r(_);var A=t(_);h(A),u(A,_);for(var T,O;T=g(A);)O=b(A,_,T),w(A,_,T,O)}function u(_,A){var T=a(_,_.nodes());T=T.slice(0,T.length-1),e.forEach(T,function(O){f(_,A,O)})}function f(_,A,T){var O=_.node(T),P=O.parent;_.edge(T,P).cutvalue=d(_,A,T)}function d(_,A,T){var O=_.node(T),P=O.parent,M=!0,R=A.edge(T,P),D=0;return R||(M=!1,R=A.edge(P,T)),D=R.weight,e.forEach(A.nodeEdges(T),function(I){var k=I.v===T,F=k?I.w:I.v;if(F!==P){var $=k===M,q=A.edge(I).weight;if(D+=$?q:-q,S(_,T,F)){var L=_.edge(T,F).cutvalue;D+=$?-L:L}}}),D}function h(_,A){arguments.length<2&&(A=_.nodes()[0]),m(_,{},1,A)}function m(_,A,T,O,P){var M=T,R=_.node(O);return A[O]=!0,e.forEach(_.neighbors(O),function(D){e.has(A,D)||(T=m(_,A,T,D,O))}),R.low=M,R.lim=T++,P?R.parent=P:delete R.parent,T}function g(_){return e.find(_.edges(),function(A){return _.edge(A).cutvalue<0})}function b(_,A,T){var O=T.v,P=T.w;A.hasEdge(O,P)||(O=T.w,P=T.v);var M=_.node(O),R=_.node(P),D=M,I=!1;M.lim>R.lim&&(D=R,I=!0);var k=e.filter(A.edges(),function(F){return I===E(_,_.node(F.v),D)&&I!==E(_,_.node(F.w),D)});return e.minBy(k,function(F){return n(A,F)})}function w(_,A,T,O){var P=T.v,M=T.w;_.removeEdge(P,M),_.setEdge(O.v,O.w,{}),h(_),u(_,A),y(_,A)}function y(_,A){var T=e.find(_.nodes(),function(P){return!A.node(P).parent}),O=i(_,T);O=O.slice(1),e.forEach(O,function(P){var M=_.node(P).parent,R=A.edge(P,M),D=!1;R||(R=A.edge(M,P),D=!0),A.node(P).rank=A.node(M).rank+(D?R.minlen:-R.minlen)})}function S(_,A,T){return _.hasEdge(A,T)}function E(_,A,T){return T.low<=A.lim&&A.lim<=T.lim}return rO}var iO,eF;function Ywe(){if(eF)return iO;eF=1;var e=gb(),t=e.longestPath,n=SX(),r=Kwe();iO=i;function i(u){switch(u.graph().ranker){case"network-simplex":l(u);break;case"tight-tree":o(u);break;case"longest-path":a(u);break;default:l(u)}}var a=t;function o(u){t(u),n(u)}function l(u){r(u)}return iO}var aO,tF;function Xwe(){if(tF)return aO;tF=1;var e=Zt();aO=t;function t(i){var a=r(i);e.forEach(i.graph().dummyChains,function(o){for(var l=i.node(o),u=l.edgeObj,f=n(i,a,u.v,u.w),d=f.path,h=f.lca,m=0,g=d[m],b=!0;o!==u.w;){if(l=i.node(o),b){for(;(g=d[m])!==h&&i.node(g).maxRank<l.rank;)m++;g===h&&(b=!1)}if(!b){for(;m<d.length-1&&i.node(g=d[m+1]).minRank<=l.rank;)m++;g=d[m]}i.setParent(o,g),o=i.successors(o)[0]}})}function n(i,a,o,l){var u=[],f=[],d=Math.min(a[o].low,a[l].low),h=Math.max(a[o].lim,a[l].lim),m,g;m=o;do m=i.parent(m),u.push(m);while(m&&(a[m].low>d||h>a[m].lim));for(g=m,m=l;(m=i.parent(m))!==g;)f.push(m);return{path:u.concat(f.reverse()),lca:g}}function r(i){var a={},o=0;function l(u){var f=o;e.forEach(i.children(u),l),a[u]={low:f,lim:o++}}return e.forEach(i.children(),l),a}return aO}var oO,nF;function Zwe(){if(nF)return oO;nF=1;var e=Zt(),t=Sr();oO={run:n,cleanup:o};function n(l){var u=t.addDummyNode(l,"root",{},"_root"),f=i(l),d=e.max(e.values(f))-1,h=2*d+1;l.graph().nestingRoot=u,e.forEach(l.edges(),function(g){l.edge(g).minlen*=h});var m=a(l)+1;e.forEach(l.children(),function(g){r(l,u,h,m,d,f,g)}),l.graph().nodeRankFactor=h}function r(l,u,f,d,h,m,g){var b=l.children(g);if(!b.length){g!==u&&l.setEdge(u,g,{weight:0,minlen:f});return}var w=t.addBorderNode(l,"_bt"),y=t.addBorderNode(l,"_bb"),S=l.node(g);l.setParent(w,g),S.borderTop=w,l.setParent(y,g),S.borderBottom=y,e.forEach(b,function(E){r(l,u,f,d,h,m,E);var _=l.node(E),A=_.borderTop?_.borderTop:E,T=_.borderBottom?_.borderBottom:E,O=_.borderTop?d:2*d,P=A!==T?1:h-m[g]+1;l.setEdge(w,A,{weight:O,minlen:P,nestingEdge:!0}),l.setEdge(T,y,{weight:O,minlen:P,nestingEdge:!0})}),l.parent(g)||l.setEdge(u,w,{weight:0,minlen:h+m[g]})}function i(l){var u={};function f(d,h){var m=l.children(d);m&&m.length&&e.forEach(m,function(g){f(g,h+1)}),u[d]=h}return e.forEach(l.children(),function(d){f(d,1)}),u}function a(l){return e.reduce(l.edges(),function(u,f){return u+l.edge(f).weight},0)}function o(l){var u=l.graph();l.removeNode(u.nestingRoot),delete u.nestingRoot,e.forEach(l.edges(),function(f){var d=l.edge(f);d.nestingEdge&&l.removeEdge(f)})}return oO}var sO,rF;function Qwe(){if(rF)return sO;rF=1;var e=Zt(),t=Sr();sO=n;function n(i){function a(o){var l=i.children(o),u=i.node(o);if(l.length&&e.forEach(l,a),e.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var f=u.minRank,d=u.maxRank+1;f<d;++f)r(i,"borderLeft","_bl",o,u,f),r(i,"borderRight","_br",o,u,f)}}e.forEach(i.children(),a)}function r(i,a,o,l,u,f){var d={width:0,height:0,rank:f,borderType:a},h=u[a][f-1],m=t.addDummyNode(i,"border",d,o);u[a][f]=m,i.setParent(m,l),h&&i.setEdge(h,m,{weight:1})}return sO}var lO,iF;function Jwe(){if(iF)return lO;iF=1;var e=Zt();lO={adjust:t,undo:n};function t(f){var d=f.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&r(f)}function n(f){var d=f.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&a(f),(d==="lr"||d==="rl")&&(l(f),r(f))}function r(f){e.forEach(f.nodes(),function(d){i(f.node(d))}),e.forEach(f.edges(),function(d){i(f.edge(d))})}function i(f){var d=f.width;f.width=f.height,f.height=d}function a(f){e.forEach(f.nodes(),function(d){o(f.node(d))}),e.forEach(f.edges(),function(d){var h=f.edge(d);e.forEach(h.points,o),e.has(h,"y")&&o(h)})}function o(f){f.y=-f.y}function l(f){e.forEach(f.nodes(),function(d){u(f.node(d))}),e.forEach(f.edges(),function(d){var h=f.edge(d);e.forEach(h.points,u),e.has(h,"x")&&u(h)})}function u(f){var d=f.x;f.x=f.y,f.y=d}return lO}var uO,aF;function e1e(){if(aF)return uO;aF=1;var e=Zt();uO=t;function t(n){var r={},i=e.filter(n.nodes(),function(f){return!n.children(f).length}),a=e.max(e.map(i,function(f){return n.node(f).rank})),o=e.map(e.range(a+1),function(){return[]});function l(f){if(!e.has(r,f)){r[f]=!0;var d=n.node(f);o[d.rank].push(f),e.forEach(n.successors(f),l)}}var u=e.sortBy(i,function(f){return n.node(f).rank});return e.forEach(u,l),o}return uO}var cO,oF;function t1e(){if(oF)return cO;oF=1;var e=Zt();cO=t;function t(r,i){for(var a=0,o=1;o<i.length;++o)a+=n(r,i[o-1],i[o]);return a}function n(r,i,a){for(var o=e.zipObject(a,e.map(a,function(m,g){return g})),l=e.flatten(e.map(i,function(m){return e.sortBy(e.map(r.outEdges(m),function(g){return{pos:o[g.w],weight:r.edge(g).weight}}),"pos")}),!0),u=1;u<a.length;)u<<=1;var f=2*u-1;u-=1;var d=e.map(new Array(f),function(){return 0}),h=0;return e.forEach(l.forEach(function(m){var g=m.pos+u;d[g]+=m.weight;for(var b=0;g>0;)g%2&&(b+=d[g+1]),g=g-1>>1,d[g]+=m.weight;h+=m.weight*b})),h}return cO}var fO,sF;function n1e(){if(sF)return fO;sF=1;var e=Zt();fO=t;function t(n,r){return e.map(r,function(i){var a=n.inEdges(i);if(a.length){var o=e.reduce(a,function(l,u){var f=n.edge(u),d=n.node(u.v);return{sum:l.sum+f.weight*d.order,weight:l.weight+f.weight}},{sum:0,weight:0});return{v:i,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:i}})}return fO}var dO,lF;function r1e(){if(lF)return dO;lF=1;var e=Zt();dO=t;function t(i,a){var o={};e.forEach(i,function(u,f){var d=o[u.v]={indegree:0,in:[],out:[],vs:[u.v],i:f};e.isUndefined(u.barycenter)||(d.barycenter=u.barycenter,d.weight=u.weight)}),e.forEach(a.edges(),function(u){var f=o[u.v],d=o[u.w];!e.isUndefined(f)&&!e.isUndefined(d)&&(d.indegree++,f.out.push(o[u.w]))});var l=e.filter(o,function(u){return!u.indegree});return n(l)}function n(i){var a=[];function o(f){return function(d){d.merged||(e.isUndefined(d.barycenter)||e.isUndefined(f.barycenter)||d.barycenter>=f.barycenter)&&r(f,d)}}function l(f){return function(d){d.in.push(f),--d.indegree===0&&i.push(d)}}for(;i.length;){var u=i.pop();a.push(u),e.forEach(u.in.reverse(),o(u)),e.forEach(u.out,l(u))}return e.map(e.filter(a,function(f){return!f.merged}),function(f){return e.pick(f,["vs","i","barycenter","weight"])})}function r(i,a){var o=0,l=0;i.weight&&(o+=i.barycenter*i.weight,l+=i.weight),a.weight&&(o+=a.barycenter*a.weight,l+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=o/l,i.weight=l,i.i=Math.min(a.i,i.i),a.merged=!0}return dO}var hO,uF;function i1e(){if(uF)return hO;uF=1;var e=Zt(),t=Sr();hO=n;function n(a,o){var l=t.partition(a,function(w){return e.has(w,"barycenter")}),u=l.lhs,f=e.sortBy(l.rhs,function(w){return-w.i}),d=[],h=0,m=0,g=0;u.sort(i(!!o)),g=r(d,f,g),e.forEach(u,function(w){g+=w.vs.length,d.push(w.vs),h+=w.barycenter*w.weight,m+=w.weight,g=r(d,f,g)});var b={vs:e.flatten(d,!0)};return m&&(b.barycenter=h/m,b.weight=m),b}function r(a,o,l){for(var u;o.length&&(u=e.last(o)).i<=l;)o.pop(),a.push(u.vs),l++;return l}function i(a){return function(o,l){return o.barycenter<l.barycenter?-1:o.barycenter>l.barycenter?1:a?l.i-o.i:o.i-l.i}}return hO}var pO,cF;function a1e(){if(cF)return pO;cF=1;var e=Zt(),t=n1e(),n=r1e(),r=i1e();pO=i;function i(l,u,f,d){var h=l.children(u),m=l.node(u),g=m?m.borderLeft:void 0,b=m?m.borderRight:void 0,w={};g&&(h=e.filter(h,function(T){return T!==g&&T!==b}));var y=t(l,h);e.forEach(y,function(T){if(l.children(T.v).length){var O=i(l,T.v,f,d);w[T.v]=O,e.has(O,"barycenter")&&o(T,O)}});var S=n(y,f);a(S,w);var E=r(S,d);if(g&&(E.vs=e.flatten([g,E.vs,b],!0),l.predecessors(g).length)){var _=l.node(l.predecessors(g)[0]),A=l.node(l.predecessors(b)[0]);e.has(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+_.order+A.order)/(E.weight+2),E.weight+=2}return E}function a(l,u){e.forEach(l,function(f){f.vs=e.flatten(f.vs.map(function(d){return u[d]?u[d].vs:d}),!0)})}function o(l,u){e.isUndefined(l.barycenter)?(l.barycenter=u.barycenter,l.weight=u.weight):(l.barycenter=(l.barycenter*l.weight+u.barycenter*u.weight)/(l.weight+u.weight),l.weight+=u.weight)}return pO}var mO,fF;function o1e(){if(fF)return mO;fF=1;var e=Zt(),t=qi().Graph;mO=n;function n(i,a,o){var l=r(i),u=new t({compound:!0}).setGraph({root:l}).setDefaultNodeLabel(function(f){return i.node(f)});return e.forEach(i.nodes(),function(f){var d=i.node(f),h=i.parent(f);(d.rank===a||d.minRank<=a&&a<=d.maxRank)&&(u.setNode(f),u.setParent(f,h||l),e.forEach(i[o](f),function(m){var g=m.v===f?m.w:m.v,b=u.edge(g,f),w=e.isUndefined(b)?0:b.weight;u.setEdge(g,f,{weight:i.edge(m).weight+w})}),e.has(d,"minRank")&&u.setNode(f,{borderLeft:d.borderLeft[a],borderRight:d.borderRight[a]}))}),u}function r(i){for(var a;i.hasNode(a=e.uniqueId("_root")););return a}return mO}var gO,dF;function s1e(){if(dF)return gO;dF=1;var e=Zt();gO=t;function t(n,r,i){var a={},o;e.forEach(i,function(l){for(var u=n.parent(l),f,d;u;){if(f=n.parent(u),f?(d=a[f],a[f]=u):(d=o,o=u),d&&d!==u){r.setEdge(d,u);return}u=f}})}return gO}var vO,hF;function l1e(){if(hF)return vO;hF=1;var e=Zt(),t=e1e(),n=t1e(),r=a1e(),i=o1e(),a=s1e(),o=qi().Graph,l=Sr();vO=u;function u(m){var g=l.maxRank(m),b=f(m,e.range(1,g+1),"inEdges"),w=f(m,e.range(g-1,-1,-1),"outEdges"),y=t(m);h(m,y);for(var S=Number.POSITIVE_INFINITY,E,_=0,A=0;A<4;++_,++A){d(_%2?b:w,_%4>=2),y=l.buildLayerMatrix(m);var T=n(m,y);T<S&&(A=0,E=e.cloneDeep(y),S=T)}h(m,E)}function f(m,g,b){return e.map(g,function(w){return i(m,w,b)})}function d(m,g){var b=new o;e.forEach(m,function(w){var y=w.graph().root,S=r(w,y,b,g);e.forEach(S.vs,function(E,_){w.node(E).order=_}),a(w,b,S.vs)})}function h(m,g){e.forEach(g,function(b){e.forEach(b,function(w,y){m.node(w).order=y})})}return vO}var yO,pF;function u1e(){if(pF)return yO;pF=1;var e=Zt(),t=qi().Graph,n=Sr();yO={positionX:b,findType1Conflicts:r,findType2Conflicts:i,addConflict:o,hasConflict:l,verticalAlignment:u,horizontalCompaction:f,alignCoordinates:m,findSmallestWidthAlignment:h,balance:g};function r(S,E){var _={};function A(T,O){var P=0,M=0,R=T.length,D=e.last(O);return e.forEach(O,function(I,k){var F=a(S,I),$=F?S.node(F).order:R;(F||I===D)&&(e.forEach(O.slice(M,k+1),function(q){e.forEach(S.predecessors(q),function(L){var z=S.node(L),U=z.order;(U<P||$<U)&&!(z.dummy&&S.node(q).dummy)&&o(_,L,q)})}),M=k+1,P=$)}),O}return e.reduce(E,A),_}function i(S,E){var _={};function A(O,P,M,R,D){var I;e.forEach(e.range(P,M),function(k){I=O[k],S.node(I).dummy&&e.forEach(S.predecessors(I),function(F){var $=S.node(F);$.dummy&&($.order<R||$.order>D)&&o(_,F,I)})})}function T(O,P){var M=-1,R,D=0;return e.forEach(P,function(I,k){if(S.node(I).dummy==="border"){var F=S.predecessors(I);F.length&&(R=S.node(F[0]).order,A(P,D,k,M,R),D=k,M=R)}A(P,D,P.length,R,O.length)}),P}return e.reduce(E,T),_}function a(S,E){if(S.node(E).dummy)return e.find(S.predecessors(E),function(_){return S.node(_).dummy})}function o(S,E,_){if(E>_){var A=E;E=_,_=A}var T=S[E];T||(S[E]=T={}),T[_]=!0}function l(S,E,_){if(E>_){var A=E;E=_,_=A}return e.has(S[E],_)}function u(S,E,_,A){var T={},O={},P={};return e.forEach(E,function(M){e.forEach(M,function(R,D){T[R]=R,O[R]=R,P[R]=D})}),e.forEach(E,function(M){var R=-1;e.forEach(M,function(D){var I=A(D);if(I.length){I=e.sortBy(I,function(L){return P[L]});for(var k=(I.length-1)/2,F=Math.floor(k),$=Math.ceil(k);F<=$;++F){var q=I[F];O[D]===D&&R<P[q]&&!l(_,D,q)&&(O[q]=D,O[D]=T[D]=T[q],R=P[q])}}})}),{root:T,align:O}}function f(S,E,_,A,T){var O={},P=d(S,E,_,T),M=T?"borderLeft":"borderRight";function R(k,F){for(var $=P.nodes(),q=$.pop(),L={};q;)L[q]?k(q):(L[q]=!0,$.push(q),$=$.concat(F(q))),q=$.pop()}function D(k){O[k]=P.inEdges(k).reduce(function(F,$){return Math.max(F,O[$.v]+P.edge($))},0)}function I(k){var F=P.outEdges(k).reduce(function(q,L){return Math.min(q,O[L.w]-P.edge(L))},Number.POSITIVE_INFINITY),$=S.node(k);F!==Number.POSITIVE_INFINITY&&$.borderType!==M&&(O[k]=Math.max(O[k],F))}return R(D,P.predecessors.bind(P)),R(I,P.successors.bind(P)),e.forEach(A,function(k){O[k]=O[_[k]]}),O}function d(S,E,_,A){var T=new t,O=S.graph(),P=w(O.nodesep,O.edgesep,A);return e.forEach(E,function(M){var R;e.forEach(M,function(D){var I=_[D];if(T.setNode(I),R){var k=_[R],F=T.edge(k,I);T.setEdge(k,I,Math.max(P(S,D,R),F||0))}R=D})}),T}function h(S,E){return e.minBy(e.values(E),function(_){var A=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY;return e.forIn(_,function(O,P){var M=y(S,P)/2;A=Math.max(O+M,A),T=Math.min(O-M,T)}),A-T})}function m(S,E){var _=e.values(E),A=e.min(_),T=e.max(_);e.forEach(["u","d"],function(O){e.forEach(["l","r"],function(P){var M=O+P,R=S[M],D;if(R!==E){var I=e.values(R);D=P==="l"?A-e.min(I):T-e.max(I),D&&(S[M]=e.mapValues(R,function(k){return k+D}))}})})}function g(S,E){return e.mapValues(S.ul,function(_,A){if(E)return S[E.toLowerCase()][A];var T=e.sortBy(e.map(S,A));return(T[1]+T[2])/2})}function b(S){var E=n.buildLayerMatrix(S),_=e.merge(r(S,E),i(S,E)),A={},T;e.forEach(["u","d"],function(P){T=P==="u"?E:e.values(E).reverse(),e.forEach(["l","r"],function(M){M==="r"&&(T=e.map(T,function(k){return e.values(k).reverse()}));var R=(P==="u"?S.predecessors:S.successors).bind(S),D=u(S,T,_,R),I=f(S,T,D.root,D.align,M==="r");M==="r"&&(I=e.mapValues(I,function(k){return-k})),A[P+M]=I})});var O=h(S,A);return m(A,O),g(A,S.graph().align)}function w(S,E,_){return function(A,T,O){var P=A.node(T),M=A.node(O),R=0,D;if(R+=P.width/2,e.has(P,"labelpos"))switch(P.labelpos.toLowerCase()){case"l":D=-P.width/2;break;case"r":D=P.width/2;break}if(D&&(R+=_?D:-D),D=0,R+=(P.dummy?E:S)/2,R+=(M.dummy?E:S)/2,R+=M.width/2,e.has(M,"labelpos"))switch(M.labelpos.toLowerCase()){case"l":D=M.width/2;break;case"r":D=-M.width/2;break}return D&&(R+=_?D:-D),D=0,R}}function y(S,E){return S.node(E).width}return yO}var bO,mF;function c1e(){if(mF)return bO;mF=1;var e=Zt(),t=Sr(),n=u1e().positionX;bO=r;function r(a){a=t.asNonCompoundGraph(a),i(a),e.forEach(n(a),function(o,l){a.node(l).x=o})}function i(a){var o=t.buildLayerMatrix(a),l=a.graph().ranksep,u=0;e.forEach(o,function(f){var d=e.max(e.map(f,function(h){return a.node(h).height}));e.forEach(f,function(h){a.node(h).y=u+d/2}),u+=d+l})}return bO}var xO,gF;function f1e(){if(gF)return xO;gF=1;var e=Zt(),t=Gwe(),n=Wwe(),r=Ywe(),i=Sr().normalizeRanks,a=Xwe(),o=Sr().removeEmptyRanks,l=Zwe(),u=Qwe(),f=Jwe(),d=l1e(),h=c1e(),m=Sr(),g=qi().Graph;xO=b;function b(Y,G){var Q=G&&G.debugTiming?m.time:m.notime;Q("layout",function(){var J=Q(" buildLayoutGraph",function(){return R(Y)});Q(" runLayout",function(){w(J,Q)}),Q(" updateInputGraph",function(){y(Y,J)})})}function w(Y,G){G(" makeSpaceForEdgeLabels",function(){D(Y)}),G(" removeSelfEdges",function(){K(Y)}),G(" acyclic",function(){t.run(Y)}),G(" nestingGraph.run",function(){l.run(Y)}),G(" rank",function(){r(m.asNonCompoundGraph(Y))}),G(" injectEdgeLabelProxies",function(){I(Y)}),G(" removeEmptyRanks",function(){o(Y)}),G(" nestingGraph.cleanup",function(){l.cleanup(Y)}),G(" normalizeRanks",function(){i(Y)}),G(" assignRankMinMax",function(){k(Y)}),G(" removeEdgeLabelProxies",function(){F(Y)}),G(" normalize.run",function(){n.run(Y)}),G(" parentDummyChains",function(){a(Y)}),G(" addBorderSegments",function(){u(Y)}),G(" order",function(){d(Y)}),G(" insertSelfEdges",function(){Z(Y)}),G(" adjustCoordinateSystem",function(){f.adjust(Y)}),G(" position",function(){h(Y)}),G(" positionSelfEdges",function(){H(Y)}),G(" removeBorderNodes",function(){U(Y)}),G(" normalize.undo",function(){n.undo(Y)}),G(" fixupEdgeLabelCoords",function(){L(Y)}),G(" undoCoordinateSystem",function(){f.undo(Y)}),G(" translateGraph",function(){$(Y)}),G(" assignNodeIntersects",function(){q(Y)}),G(" reversePoints",function(){z(Y)}),G(" acyclic.undo",function(){t.undo(Y)})}function y(Y,G){e.forEach(Y.nodes(),function(Q){var J=Y.node(Q),re=G.node(Q);J&&(J.x=re.x,J.y=re.y,G.children(Q).length&&(J.width=re.width,J.height=re.height))}),e.forEach(Y.edges(),function(Q){var J=Y.edge(Q),re=G.edge(Q);J.points=re.points,e.has(re,"x")&&(J.x=re.x,J.y=re.y)}),Y.graph().width=G.graph().width,Y.graph().height=G.graph().height}var S=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},_=["acyclicer","ranker","rankdir","align"],A=["width","height"],T={width:0,height:0},O=["minlen","weight","width","height","labeloffset"],P={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M=["labelpos"];function R(Y){var G=new g({multigraph:!0,compound:!0}),Q=X(Y.graph());return G.setGraph(e.merge({},E,V(Q,S),e.pick(Q,_))),e.forEach(Y.nodes(),function(J){var re=X(Y.node(J));G.setNode(J,e.defaults(V(re,A),T)),G.setParent(J,Y.parent(J))}),e.forEach(Y.edges(),function(J){var re=X(Y.edge(J));G.setEdge(J,e.merge({},P,V(re,O),e.pick(re,M)))}),G}function D(Y){var G=Y.graph();G.ranksep/=2,e.forEach(Y.edges(),function(Q){var J=Y.edge(Q);J.minlen*=2,J.labelpos.toLowerCase()!=="c"&&(G.rankdir==="TB"||G.rankdir==="BT"?J.width+=J.labeloffset:J.height+=J.labeloffset)})}function I(Y){e.forEach(Y.edges(),function(G){var Q=Y.edge(G);if(Q.width&&Q.height){var J=Y.node(G.v),re=Y.node(G.w),ne={rank:(re.rank-J.rank)/2+J.rank,e:G};m.addDummyNode(Y,"edge-proxy",ne,"_ep")}})}function k(Y){var G=0;e.forEach(Y.nodes(),function(Q){var J=Y.node(Q);J.borderTop&&(J.minRank=Y.node(J.borderTop).rank,J.maxRank=Y.node(J.borderBottom).rank,G=e.max(G,J.maxRank))}),Y.graph().maxRank=G}function F(Y){e.forEach(Y.nodes(),function(G){var Q=Y.node(G);Q.dummy==="edge-proxy"&&(Y.edge(Q.e).labelRank=Q.rank,Y.removeNode(G))})}function $(Y){var G=Number.POSITIVE_INFINITY,Q=0,J=Number.POSITIVE_INFINITY,re=0,ne=Y.graph(),fe=ne.marginx||0,he=ne.marginy||0;function oe(ye){var be=ye.x,xe=ye.y,Ee=ye.width,_e=ye.height;G=Math.min(G,be-Ee/2),Q=Math.max(Q,be+Ee/2),J=Math.min(J,xe-_e/2),re=Math.max(re,xe+_e/2)}e.forEach(Y.nodes(),function(ye){oe(Y.node(ye))}),e.forEach(Y.edges(),function(ye){var be=Y.edge(ye);e.has(be,"x")&&oe(be)}),G-=fe,J-=he,e.forEach(Y.nodes(),function(ye){var be=Y.node(ye);be.x-=G,be.y-=J}),e.forEach(Y.edges(),function(ye){var be=Y.edge(ye);e.forEach(be.points,function(xe){xe.x-=G,xe.y-=J}),e.has(be,"x")&&(be.x-=G),e.has(be,"y")&&(be.y-=J)}),ne.width=Q-G+fe,ne.height=re-J+he}function q(Y){e.forEach(Y.edges(),function(G){var Q=Y.edge(G),J=Y.node(G.v),re=Y.node(G.w),ne,fe;Q.points?(ne=Q.points[0],fe=Q.points[Q.points.length-1]):(Q.points=[],ne=re,fe=J),Q.points.unshift(m.intersectRect(J,ne)),Q.points.push(m.intersectRect(re,fe))})}function L(Y){e.forEach(Y.edges(),function(G){var Q=Y.edge(G);if(e.has(Q,"x"))switch((Q.labelpos==="l"||Q.labelpos==="r")&&(Q.width-=Q.labeloffset),Q.labelpos){case"l":Q.x-=Q.width/2+Q.labeloffset;break;case"r":Q.x+=Q.width/2+Q.labeloffset;break}})}function z(Y){e.forEach(Y.edges(),function(G){var Q=Y.edge(G);Q.reversed&&Q.points.reverse()})}function U(Y){e.forEach(Y.nodes(),function(G){if(Y.children(G).length){var Q=Y.node(G),J=Y.node(Q.borderTop),re=Y.node(Q.borderBottom),ne=Y.node(e.last(Q.borderLeft)),fe=Y.node(e.last(Q.borderRight));Q.width=Math.abs(fe.x-ne.x),Q.height=Math.abs(re.y-J.y),Q.x=ne.x+Q.width/2,Q.y=J.y+Q.height/2}}),e.forEach(Y.nodes(),function(G){Y.node(G).dummy==="border"&&Y.removeNode(G)})}function K(Y){e.forEach(Y.edges(),function(G){if(G.v===G.w){var Q=Y.node(G.v);Q.selfEdges||(Q.selfEdges=[]),Q.selfEdges.push({e:G,label:Y.edge(G)}),Y.removeEdge(G)}})}function Z(Y){var G=m.buildLayerMatrix(Y);e.forEach(G,function(Q){var J=0;e.forEach(Q,function(re,ne){var fe=Y.node(re);fe.order=ne+J,e.forEach(fe.selfEdges,function(he){m.addDummyNode(Y,"selfedge",{width:he.label.width,height:he.label.height,rank:fe.rank,order:ne+ ++J,e:he.e,label:he.label},"_se")}),delete fe.selfEdges})})}function H(Y){e.forEach(Y.nodes(),function(G){var Q=Y.node(G);if(Q.dummy==="selfedge"){var J=Y.node(Q.e.v),re=J.x+J.width/2,ne=J.y,fe=Q.x-re,he=J.height/2;Y.setEdge(Q.e,Q.label),Y.removeNode(G),Q.label.points=[{x:re+2*fe/3,y:ne-he},{x:re+5*fe/6,y:ne-he},{x:re+fe,y:ne},{x:re+5*fe/6,y:ne+he},{x:re+2*fe/3,y:ne+he}],Q.label.x=Q.x,Q.label.y=Q.y}})}function V(Y,G){return e.mapValues(e.pick(Y,G),Number)}function X(Y){var G={};return e.forEach(Y,function(Q,J){G[J.toLowerCase()]=Q}),G}return xO}var wO,vF;function d1e(){if(vF)return wO;vF=1;var e=Zt(),t=Sr(),n=qi().Graph;wO={debugOrdering:r};function r(i){var a=t.buildLayerMatrix(i),o=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(i.nodes(),function(l){o.setNode(l,{label:l}),o.setParent(l,"layer"+i.node(l).rank)}),e.forEach(i.edges(),function(l){o.setEdge(l.v,l.w,{},l.name)}),e.forEach(a,function(l,u){var f="layer"+u;o.setNode(f,{rank:"same"}),e.reduce(l,function(d,h){return o.setEdge(d,h,{style:"invis"}),h})}),o}return wO}var SO,yF;function h1e(){return yF||(yF=1,SO="0.8.5"),SO}var _O,bF;function p1e(){return bF||(bF=1,_O={graphlib:qi(),layout:f1e(),debug:d1e(),util:{time:Sr().time,notime:Sr().notime},version:h1e()}),_O}var m1e=p1e();const xF=yt(m1e),wF={completed:{icon:Im,color:"text-emerald-600 dark:text-emerald-400",bg:"bg-emerald-50 dark:bg-emerald-500/10",border:"border-emerald-200 dark:border-emerald-500/20"},active:{icon:op,color:"text-blue-600 dark:text-blue-400",bg:"bg-blue-50 dark:bg-blue-500/10",border:"border-blue-200 dark:border-blue-500/20",animate:!0},waiting:{icon:R3,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},delayed:{icon:ki,color:"text-amber-600 dark:text-amber-400",bg:"bg-amber-50 dark:bg-amber-500/10",border:"border-amber-200 dark:border-amber-500/20"},failed:{icon:D0,color:"text-destructive",bg:"bg-red-50 dark:bg-red-500/10",border:"border-red-200 dark:border-red-500/20"},paused:{icon:a7,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"},unknown:{icon:R3,color:"text-muted-foreground",bg:"bg-muted/30",border:"border-border"}};function g1e(e){return e<1e3?`${e}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${(e/6e4).toFixed(1)}m`}function v1e({data:e}){const{flowNode:t,onClick:n}=e,{job:r,queueName:i}=t,a=wF[r.status]||wF.unknown,o=a.icon;return x.jsxs("div",{className:Ce("relative min-w-[180px] px-3 py-2.5 transition-all","hover:bg-accent/50 cursor-pointer","bg-background border",a.border),onClick:()=>n==null?void 0:n(t),children:[x.jsx(kf,{type:"target",position:Ie.Top,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-0"}),x.jsxs("div",{className:"flex items-start gap-2.5",children:[x.jsx("div",{className:Ce("p-1.5 shrink-0",a.bg),children:x.jsx(o,{className:Ce("h-3.5 w-3.5",a.color,a.animate&&"animate-spin")})}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("div",{className:"font-medium text-sm truncate text-foreground",children:r.name}),x.jsx("div",{className:"text-[11px] text-muted-foreground truncate mt-0.5",children:i}),r.duration!==void 0&&x.jsx("div",{className:"text-[11px] text-muted-foreground mt-1 font-mono tabular-nums",children:g1e(r.duration)})]})]}),x.jsx("div",{className:Ce("absolute -top-1.5 -right-1.5 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wide","bg-background border",a.color,a.border),children:r.status}),x.jsx(kf,{type:"source",position:Ie.Bottom,className:"!w-2 !h-2 !bg-muted-foreground/40 !border-0"})]})}const y1e=j.memo(v1e),b1e={flowNode:y1e},SF=200,_F=80;function x1e(e,t){const n=[],r=[],i=new xF.graphlib.Graph;i.setGraph({rankdir:"TB",nodesep:50,ranksep:80}),i.setDefaultEdgeLabel(()=>({}));function a(o,l){const u=`${o.queueName}:${o.job.id}`;if(i.setNode(u,{width:SF,height:_F}),l&&(i.setEdge(l,u),r.push({id:`${l}->${u}`,source:l,target:u,type:"smoothstep",animated:o.job.status==="active",style:{stroke:"hsl(var(--border))",strokeWidth:2}})),n.push({id:u,type:"flowNode",position:{x:0,y:0},data:{flowNode:o,onClick:t}}),o.children)for(const f of o.children)a(f,u)}a(e),xF.layout(i);for(const o of n){const l=i.node(o.id);l&&(o.position={x:l.x-SF/2,y:l.y-_F/2})}return{nodes:n,edges:r}}function w1e({flow:e,onNodeClick:t}){const{nodes:n,edges:r}=j.useMemo(()=>x1e(e,t),[e,t]),i=j.useCallback((a,o)=>{o.data.onClick&&o.data.flowNode&&o.data.onClick(o.data.flowNode)},[]);return x.jsx("div",{className:"w-full h-full",children:x.jsx(Ube,{nodes:n,edges:r,nodeTypes:b1e,onNodeClick:i,fitView:!0,fitViewOptions:{padding:.3,maxZoom:1},nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!0,panOnScroll:!0,zoomOnScroll:!0,minZoom:.2,maxZoom:1.5,defaultViewport:{x:0,y:0,zoom:.8},proOptions:{hideAttribution:!0},style:{background:"transparent"}})})}function Di({icon:e,title:t,description:n,action:r,className:i}){return x.jsxs("div",{className:Ce("flex flex-col items-center justify-center py-12 text-center",i),children:[x.jsx("div",{className:"bg-muted p-4 mb-4",children:x.jsx(e,{className:"h-8 w-8 text-muted-foreground"})}),x.jsx("h3",{className:"font-medium text-lg mb-1",children:t}),n&&x.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mb-4",children:n}),r]})}const vb={completed:{label:"Completed",dotClass:"bg-status-success",textClass:"text-status-success",bgClass:"bg-status-success/10"},active:{label:"Running",dotClass:"bg-status-active",textClass:"text-status-active",bgClass:"bg-status-active/10"},waiting:{label:"Queued",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},delayed:{label:"Delayed",dotClass:"bg-status-warning",textClass:"text-status-warning",bgClass:"bg-status-warning/10"},failed:{label:"Failed",dotClass:"bg-status-error",textClass:"text-status-error",bgClass:"bg-status-error/10"},paused:{label:"Paused",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"},unknown:{label:"Unknown",dotClass:"bg-status-pending",textClass:"text-status-pending",bgClass:"bg-status-pending/10"}};function Ym({status:e,duration:t,className:n}){const r=vb[e]||vb.unknown;return x.jsxs("span",{className:Ce("inline-flex items-center gap-1.5 px-2 py-0.5 text-[11px] font-medium",r.bgClass,n),children:[x.jsx("span",{className:Ce("h-1.5 w-1.5 rounded-full",r.dotClass)}),x.jsx("span",{className:r.textClass,children:r.label})]})}function S1e({status:e,className:t}){const n=vb[e]||vb.unknown;return x.jsx("span",{className:Ce("h-2 w-2 rounded-full",n.dotClass,t)})}function _1e({queueName:e,jobId:t}){const n=zi(),{data:r,isLoading:i,error:a}=Sfe(e,t),o=u=>{n({to:"/queues/$queueName/jobs/$jobId",params:{queueName:u.queueName,jobId:u.job.id}})};if(i)return x.jsxs("div",{className:"flex flex-col h-full -mb-6",children:[x.jsxs("div",{className:"pb-4 border-b border-border shrink-0",children:[x.jsx("div",{className:"flex items-center justify-between mb-4",children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"h-6 w-32 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-5 w-20 animate-pulse rounded bg-muted"})]})}),x.jsxs("div",{className:"flex items-center gap-6",children:[x.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})]})]}),x.jsx("div",{className:"flex-1 -mx-6 -mb-6 mt-6 flex items-center justify-center dotted-bg",children:x.jsx(op,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]});if(a||!r)return x.jsx(Di,{icon:dd,title:"Failed to load flow",description:(a==null?void 0:a.message)||"Flow not found or jobs have been cleaned up"});const l=_X(r);return x.jsxs("div",{className:"flex flex-col h-full -mb-6",children:[x.jsxs("div",{className:"pb-4 border-b border-border shrink-0",children:[x.jsx("div",{className:"flex items-center justify-between mb-4",children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(hd,{className:"h-5 w-5 text-muted-foreground"}),x.jsx(Ym,{status:r.job.status})]})}),x.jsxs("div",{className:"flex flex-wrap items-center gap-x-6 gap-y-2 text-sm",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-muted-foreground",children:"Queue:"}),x.jsx("button",{type:"button",onClick:()=>n({to:"/queues/$queueName",params:{queueName:e}}),className:"text-xs bg-muted px-1.5 py-0.5 font-mono text-primary hover:underline",children:e})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Ace,{className:"h-4 w-4 text-muted-foreground"}),x.jsxs("span",{className:"text-muted-foreground",children:[l.total," job",l.total!==1?"s":""]})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Im,{className:"h-4 w-4 text-emerald-500"}),x.jsxs("span",{className:"text-muted-foreground",children:[l.completed," completed"]})]}),l.failed>0&&x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(D0,{className:"h-4 w-4 text-red-500"}),x.jsxs("span",{className:"text-red-500",children:[l.failed," failed"]})]}),r.job.duration!==void 0&&x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(ki,{className:"h-4 w-4 text-muted-foreground"}),x.jsx("span",{className:"text-muted-foreground",children:wr(r.job.duration)})]})]})]}),x.jsx("div",{className:"flex-1 -mx-6 -mb-6 mt-6 dotted-bg",children:x.jsx(w1e,{flow:r,onNodeClick:o})})]})}function _X(e){let t=1,n=e.job.status==="completed"?1:0,r=e.job.status==="failed"?1:0;if(e.children)for(const i of e.children){const a=_X(i);t+=a.total,n+=a.completed,r+=a.failed}return{total:t,completed:n,failed:r}}function wu({timestamp:e,className:t}){return x.jsxs(Tp,{children:[x.jsx(Cp,{asChild:!0,children:x.jsx("span",{className:t,children:YG(e)})}),x.jsx(bf,{children:x.jsx("span",{className:"font-mono text-xs",children:vy(e)})})]})}function E1e({onFlowSelect:e}){const t=zi(),{data:n,isLoading:r,error:i}=wfe(),a=l=>{t({to:"/queues/$queueName",params:{queueName:l}})},o=(n==null?void 0:n.flows)||[];return r&&o.length===0?x.jsx("div",{className:"divide-y divide-border/50",children:[...Array(12)].map((l,u)=>x.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[x.jsxs("div",{className:"col-span-4 flex items-center gap-3",children:[x.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"})]}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-4 w-16 animate-pulse rounded bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})})]},u.toString()))}):i?x.jsx("div",{className:"flex h-64 items-center justify-center",children:x.jsx(Di,{icon:dd,title:"Failed to load flows",description:i.message})}):o.length===0?x.jsx("div",{className:"flex h-64 items-center justify-center",children:x.jsx(Di,{icon:hd,title:"No flows found",description:"Flows are created when you use BullMQ's FlowProducer"})}):x.jsxs("div",{children:[x.jsx("div",{className:"sticky top-0 z-10 bg-background",children:x.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[x.jsx("div",{className:"col-span-4",children:"Flow"}),x.jsx("div",{className:"col-span-2",children:"Queue"}),x.jsx("div",{className:"col-span-2",children:"Status"}),x.jsx("div",{className:"col-span-2",children:"Progress"}),x.jsx("div",{className:"col-span-2",children:"Created"})]})}),x.jsx("div",{className:"divide-y divide-border/50",children:o.map(l=>x.jsx(A1e,{flow:l,onClick:()=>e(l.queueName,l.id),onQueueClick:a},`${l.queueName}:${l.id}`))}),x.jsxs("div",{className:"py-2.5 text-[11px] text-muted-foreground border-t border-dashed",children:[o.length," flow",o.length!==1?"s":""]})]})}function A1e({flow:e,onClick:t,onQueueClick:n}){const r=i=>{i.stopPropagation(),n(e.queueName)};return x.jsxs("div",{onClick:t,className:"group grid w-full grid-cols-12 items-center gap-4 py-3 text-left text-sm cursor-default",children:[x.jsxs("div",{className:"col-span-4 flex items-center gap-3 min-w-0",children:[x.jsx(hd,{className:"h-4 w-4 text-muted-foreground shrink-0"}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"truncate font-medium text-sm",children:e.name}),x.jsx("div",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.id})]})]}),x.jsx("div",{className:"col-span-2",children:x.jsx("button",{type:"button",onClick:r,className:"truncate font-mono text-[11px] text-primary hover:underline",children:e.queueName})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Ym,{status:e.status})}),x.jsx("div",{className:"col-span-2",children:x.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(Im,{className:"h-3.5 w-3.5 text-emerald-600 dark:text-emerald-400"}),x.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.completedJobs})]}),x.jsx("span",{className:"text-muted-foreground",children:"/"}),x.jsx("span",{className:"text-muted-foreground tabular-nums",children:e.totalJobs}),e.failedJobs>0&&x.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[x.jsx(D0,{className:"h-3.5 w-3.5 text-destructive"}),x.jsx("span",{className:"text-destructive tabular-nums",children:e.failedJobs})]})]})}),x.jsxs("div",{className:"col-span-2 flex items-center justify-between",children:[x.jsx(wu,{timestamp:e.timestamp}),x.jsx(Af,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})]})}function EF({data:e,className:t,defaultExpanded:n=!0}){const[r,i]=j.useState(!1),a=()=>{navigator.clipboard.writeText(JSON.stringify(e,null,2)),i(!0),setTimeout(()=>i(!1),2e3)};return x.jsxs("div",{className:Ce("relative group",t),children:[x.jsx("button",{type:"button",onClick:a,className:"absolute right-3 top-3 rounded p-1.5 opacity-0 transition-opacity hover:bg-muted group-hover:opacity-100",children:r?x.jsx(Dm,{size:16,className:"h-4 w-4 text-status-success"}):x.jsx(JM,{className:"h-4 w-4 text-muted-foreground"})}),x.jsx("div",{className:"max-h-96 overflow-auto p-4 font-mono text-sm",children:x.jsx(NN,{data:e,level:0,defaultExpanded:n})})]})}function NN({data:e,level:t,defaultExpanded:n,keyName:r}){const[i,a]=j.useState(n),o=({name:l})=>x.jsxs("span",{className:"text-primary",children:['"',l,'"']});if(e===null)return x.jsxs("span",{children:[r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsx("span",{className:"text-muted-foreground italic",children:"null"})]});if(e===void 0)return x.jsxs("span",{children:[r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsx("span",{className:"text-muted-foreground italic",children:"undefined"})]});if(typeof e=="boolean")return x.jsxs("span",{children:[r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsx("span",{className:"text-status-warning",children:String(e)})]});if(typeof e=="number")return x.jsxs("span",{children:[r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsx("span",{className:"text-status-success",children:e})]});if(typeof e=="string")return x.jsxs("span",{children:[r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsxs("span",{className:"text-chart-5",children:['"',e,'"']})]});if(Array.isArray(e))return e.length===0?x.jsxs("span",{children:[r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsx("span",{className:"text-muted-foreground",children:"[]"})]}):x.jsxs("div",{children:[x.jsxs("button",{type:"button",onClick:()=>a(!i),className:"inline-flex items-center gap-1 hover:opacity-70",children:[x.jsx(Af,{className:Ce("h-3 w-3 text-muted-foreground transition-transform",i&&"rotate-90")}),r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsxs("span",{className:"text-muted-foreground",children:["Array(",e.length,")"]})]}),i&&x.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l border-border pl-3",children:e.map((l,u)=>x.jsx("div",{children:x.jsx(NN,{data:l,level:t+1,defaultExpanded:t<1,keyName:String(u)})},u.toString()))})]});if(typeof e=="object"){const l=Object.entries(e);return l.length===0?x.jsxs("span",{children:[r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsx("span",{className:"text-muted-foreground",children:"{}"})]}):x.jsxs("div",{children:[x.jsxs("button",{type:"button",onClick:()=>a(!i),className:"inline-flex items-center gap-1 hover:opacity-70",children:[x.jsx(Af,{className:Ce("h-3 w-3 text-muted-foreground transition-transform",i&&"rotate-90")}),r&&x.jsxs(x.Fragment,{children:[x.jsx(o,{name:r}),x.jsx("span",{className:"text-foreground",children:": "})]}),x.jsxs("span",{className:"text-muted-foreground",children:["Object(",l.length,")"]})]}),i&&x.jsx("div",{className:"ml-4 mt-1 space-y-1 border-l border-border pl-3",children:l.map(([u,f])=>x.jsx("div",{children:x.jsx(NN,{data:f,level:t+1,defaultExpanded:t<1,keyName:u})},u))})]})}return x.jsx("span",{children:String(e)})}const AF=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,TF=ut,EX=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return TF(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(f=>{const d=n==null?void 0:n[f],h=a==null?void 0:a[f];if(d===null)return null;const m=AF(d)||AF(h);return i[f][m]}),l=n&&Object.entries(n).reduce((f,d)=>{let[h,m]=d;return m===void 0||(f[h]=m),f},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((f,d)=>{let{class:h,className:m,...g}=d;return Object.entries(g).every(b=>{let[w,y]=b;return Array.isArray(y)?y.includes({...a,...l}[w]):{...a,...l}[w]===y})?[...f,h,m]:f},[]);return TF(e,o,u,n==null?void 0:n.class,n==null?void 0:n.className)},T1e=EX("inline-flex items-center justify-center border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-white",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Su({className:e,variant:t,...n}){return x.jsx("span",{"data-slot":"badge",className:Ce(T1e({variant:t}),e),...n})}const C1e=EX("inline-flex items-center justify-center gap-2 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),tr=j.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?Vde:"button";return x.jsx(o,{className:Ce(C1e({variant:t,size:n,className:e})),ref:a,...i})});tr.displayName="Button";function AX(e){const t=e+"CollectionProvider",[n,r]=va(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=w=>{const{scope:y,children:S}=w,E=ie.useRef(null),_=ie.useRef(new Map).current;return x.jsx(i,{scope:y,itemMap:_,collectionRef:E,children:S})};o.displayName=t;const l=e+"CollectionSlot",u=_p(l),f=ie.forwardRef((w,y)=>{const{scope:S,children:E}=w,_=a(l,S),A=ft(y,_.collectionRef);return x.jsx(u,{ref:A,children:E})});f.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",m=_p(d),g=ie.forwardRef((w,y)=>{const{scope:S,children:E,..._}=w,A=ie.useRef(null),T=ft(y,A),O=a(d,S);return ie.useEffect(()=>(O.itemMap.set(A,{ref:A,..._}),()=>void O.itemMap.delete(A))),x.jsx(m,{[h]:"",ref:T,children:E})});g.displayName=d;function b(w){const y=a(e+"CollectionConsumer",w);return ie.useCallback(()=>{const E=y.collectionRef.current;if(!E)return[];const _=Array.from(E.querySelectorAll(`[${h}]`));return Array.from(y.itemMap.values()).sort((O,P)=>_.indexOf(O.ref.current)-_.indexOf(P.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:f,ItemSlot:g},b,r]}var EO="rovingFocusGroup.onEntryFocus",O1e={bubbles:!1,cancelable:!0},Xm="RovingFocusGroup",[PN,TX,j1e]=AX(Xm),[N1e,CX]=va(Xm,[j1e]),[P1e,M1e]=N1e(Xm),OX=j.forwardRef((e,t)=>x.jsx(PN.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(PN.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(R1e,{...e,ref:t})})}));OX.displayName=Xm;var R1e=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:f,preventScrollOnEntryFocus:d=!1,...h}=e,m=j.useRef(null),g=ft(t,m),b=q0(a),[w,y]=Us({prop:o,defaultProp:l??null,onChange:u,caller:Xm}),[S,E]=j.useState(!1),_=nr(f),A=TX(n),T=j.useRef(!1),[O,P]=j.useState(0);return j.useEffect(()=>{const M=m.current;if(M)return M.addEventListener(EO,_),()=>M.removeEventListener(EO,_)},[_]),x.jsx(P1e,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:w,onItemFocus:j.useCallback(M=>y(M),[y]),onItemShiftTab:j.useCallback(()=>E(!0),[]),onFocusableItemAdd:j.useCallback(()=>P(M=>M+1),[]),onFocusableItemRemove:j.useCallback(()=>P(M=>M-1),[]),children:x.jsx(He.div,{tabIndex:S||O===0?-1:0,"data-orientation":r,...h,ref:g,style:{outline:"none",...e.style},onMouseDown:ke(e.onMouseDown,()=>{T.current=!0}),onFocus:ke(e.onFocus,M=>{const R=!T.current;if(M.target===M.currentTarget&&R&&!S){const D=new CustomEvent(EO,O1e);if(M.currentTarget.dispatchEvent(D),!D.defaultPrevented){const I=A().filter(L=>L.focusable),k=I.find(L=>L.active),F=I.find(L=>L.id===w),q=[k,F,...I].filter(Boolean).map(L=>L.ref.current);PX(q,d)}}T.current=!1}),onBlur:ke(e.onBlur,()=>E(!1))})})}),jX="RovingFocusGroupItem",NX=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...l}=e,u=or(),f=a||u,d=M1e(jX,n),h=d.currentTabStopId===f,m=TX(n),{onFocusableItemAdd:g,onFocusableItemRemove:b,currentTabStopId:w}=d;return j.useEffect(()=>{if(r)return g(),()=>b()},[r,g,b]),x.jsx(PN.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:x.jsx(He.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:ke(e.onMouseDown,y=>{r?d.onItemFocus(f):y.preventDefault()}),onFocus:ke(e.onFocus,()=>d.onItemFocus(f)),onKeyDown:ke(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){d.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const S=I1e(y,d.orientation,d.dir);if(S!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let _=m().filter(A=>A.focusable).map(A=>A.ref.current);if(S==="last")_.reverse();else if(S==="prev"||S==="next"){S==="prev"&&_.reverse();const A=_.indexOf(y.currentTarget);_=d.loop?L1e(_,A+1):_.slice(A+1)}setTimeout(()=>PX(_))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:w!=null}):o})})});NX.displayName=jX;var k1e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function D1e(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function I1e(e,t,n){const r=D1e(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return k1e[r]}function PX(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function L1e(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $1e=OX,B1e=NX,xx="Tabs",[q1e]=va(xx,[CX]),MX=CX(),[z1e,a2]=q1e(xx),RX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:u="automatic",...f}=e,d=q0(l),[h,m]=Us({prop:r,onChange:i,defaultProp:a??"",caller:xx});return x.jsx(z1e,{scope:n,baseId:or(),value:h,onValueChange:m,orientation:o,dir:d,activationMode:u,children:x.jsx(He.div,{dir:d,"data-orientation":o,...f,ref:t})})});RX.displayName=xx;var kX="TabsList",DX=j.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=a2(kX,n),o=MX(n);return x.jsx($1e,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:x.jsx(He.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});DX.displayName=kX;var IX="TabsTrigger",LX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=a2(IX,n),l=MX(n),u=qX(o.baseId,r),f=zX(o.baseId,r),d=r===o.value;return x.jsx(B1e,{asChild:!0,...l,focusable:!i,active:d,children:x.jsx(He.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":f,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...a,ref:t,onMouseDown:ke(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:ke(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:ke(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!i&&h&&o.onValueChange(r)})})})});LX.displayName=IX;var $X="TabsContent",BX=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,l=a2($X,n),u=qX(l.baseId,r),f=zX(l.baseId,r),d=r===l.value,h=j.useRef(d);return j.useEffect(()=>{const m=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(m)},[]),x.jsx(Er,{present:i||d,children:({present:m})=>x.jsx(He.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":u,hidden:!m,id:f,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:m&&a})})});BX.displayName=$X;function qX(e,t){return`${e}-trigger-${t}`}function zX(e,t){return`${e}-content-${t}`}var V1e=RX,VX=DX,FX=LX,UX=BX;const o2=V1e,wx=j.forwardRef(({className:e,...t},n)=>x.jsx(VX,{ref:n,className:Ce("inline-flex h-9 items-center gap-1 bg-muted p-1 text-muted-foreground",e),...t}));wx.displayName=VX.displayName;const Za=j.forwardRef(({className:e,...t},n)=>x.jsx(FX,{ref:n,className:Ce("inline-flex items-center justify-center whitespace-nowrap px-3 py-1 text-sm font-medium transition-all","focus-visible:outline-none","disabled:pointer-events-none disabled:opacity-50","data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));Za.displayName=FX.displayName;const hs=j.forwardRef(({className:e,...t},n)=>x.jsx(UX,{ref:n,className:Ce("mt-2 focus-visible:outline-none",e),...t}));hs.displayName=UX.displayName;function F1e({queueName:e,jobId:t,readonly:n,search:r,onSearchChange:i,onBack:a,onClone:o}){const l=zi(),{data:u,isLoading:f,error:d}=cfe(e,t),h=mfe(),m=gfe(),g=vfe(),[b,w]=j.useState(!1),y=h.isPending||m.isPending||g.isPending,S=async()=>{await navigator.clipboard.writeText(t),w(!0),setTimeout(()=>w(!1),2e3)},E=()=>{h.mutate({queueName:e,jobId:t})},_=()=>{m.mutate({queueName:e,jobId:t},{onSuccess:()=>a()})},A=()=>{g.mutate({queueName:e,jobId:t})},T=()=>{if(!u)return;const P={id:u.id,name:u.name,queueName:e,status:u.status,data:u.data,returnvalue:u.returnvalue,failedReason:u.failedReason,stacktrace:u.stacktrace,attemptsMade:u.attemptsMade,opts:u.opts,timestamp:u.timestamp,processedOn:u.processedOn,finishedOn:u.finishedOn,duration:u.duration,progress:u.progress,tags:u.tags},M=new Blob([JSON.stringify(P,null,2)],{type:"application/json"}),R=URL.createObjectURL(M),D=document.createElement("a");D.href=R,D.download=`job-${u.name}-${t}.json`,D.click(),URL.revokeObjectURL(R)},O=()=>{if(!u)return;const P=JSON.stringify(u.data,null,2);o(e,u.name,P)};return f&&!u?x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{className:" border bg-card",children:[x.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"h-6 w-32 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-8 w-8 animate-pulse rounded bg-muted"})]})]}),x.jsxs("div",{className:"flex items-center gap-6 px-4 py-3",children:[x.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-32 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})]})]}),x.jsxs("div",{className:" border bg-card p-4",children:[x.jsx("div",{className:"h-5 w-16 animate-pulse rounded bg-muted mb-3"}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("div",{className:"h-4 w-full animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-3/4 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-1/2 animate-pulse rounded bg-muted"})]})]})]}):d||!u?x.jsx(Di,{icon:dd,title:"Job not found",description:(d==null?void 0:d.message)||"This job may have been removed",action:x.jsx(tr,{variant:"outline",onClick:a,children:"Go back"})}):x.jsxs("div",{className:"flex h-full flex-col gap-4",children:[x.jsxs("div",{className:" border bg-card",children:[x.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"flex items-center gap-2 bg-muted px-2.5 py-1 text-sm font-medium",children:u.name}),x.jsx(Ym,{status:u.status})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsxs(tr,{variant:"outline",size:"sm",onClick:T,children:[x.jsx(Sce,{className:"mr-1.5 h-3.5 w-3.5"}),"Export"]}),!n&&x.jsxs(x.Fragment,{children:[x.jsxs(tr,{variant:"outline",size:"sm",onClick:O,children:[x.jsx(wce,{className:"mr-1.5 h-3.5 w-3.5"}),"Clone"]}),u.status==="failed"&&x.jsxs(tr,{variant:"outline",size:"sm",onClick:E,disabled:y,children:[x.jsx(I0,{className:"mr-1.5 h-3.5 w-3.5"}),"Retry"]}),u.status==="delayed"&&x.jsxs(tr,{variant:"outline",size:"sm",onClick:A,disabled:y,children:[x.jsx(Ece,{className:"mr-1.5 h-3.5 w-3.5"}),"Run Now"]}),x.jsxs(tr,{variant:"outline",size:"sm",onClick:_,disabled:y,className:"text-destructive hover:bg-destructive/10 hover:text-destructive",children:[x.jsx(s7,{className:"mr-1.5 h-3.5 w-3.5"}),"Remove"]})]})]})]}),x.jsxs("div",{className:"divide-y text-sm",children:[x.jsx(Pc,{icon:Tce,label:"Job ID",mono:!0,children:x.jsxs("span",{className:"flex items-center gap-2",children:[t,x.jsx("button",{type:"button",onClick:S,className:"rounded p-1 hover:bg-muted",children:b?x.jsx(Dm,{className:"h-3.5 w-3.5 text-status-success"}):x.jsx(JM,{className:"h-3.5 w-3.5 text-muted-foreground"})})]})}),x.jsx(Pc,{icon:tR,label:"Queue",children:x.jsx("button",{type:"button",onClick:()=>l({to:"/queues/$queueName",params:{queueName:e}}),className:"font-mono text-xs text-primary hover:underline",children:e})}),u.parent&&x.jsx(Pc,{icon:hd,label:"Part of Flow",children:x.jsxs("button",{type:"button",onClick:()=>l({to:"/flows/$queueName/$jobId",params:{queueName:u.parent.queueName,jobId:u.parent.id}}),className:"flex items-center gap-1.5 text-primary hover:underline",children:[x.jsx("span",{className:"font-mono text-xs",children:u.parent.id}),x.jsx(_ce,{className:"h-3 w-3"})]})}),x.jsx(Pc,{icon:ki,label:"Created",children:vy(u.timestamp)}),u.processedOn&&x.jsx(Pc,{icon:ki,label:"Started",children:vy(u.processedOn)}),u.finishedOn&&x.jsx(Pc,{icon:ki,label:"Finished",children:vy(u.finishedOn)})]}),x.jsxs("div",{className:"flex items-center gap-6 border-t px-4 py-3 text-sm",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-muted-foreground",children:"Duration"}),x.jsx("span",{className:"font-mono font-medium",children:u.duration?wr(u.duration):"-"})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(nR,{className:"h-3.5 w-3.5 text-muted-foreground"}),x.jsx("span",{className:"text-muted-foreground",children:"Attempts"}),x.jsxs("span",{className:"font-mono font-medium",children:[u.attemptsMade," / ",u.opts.attempts||3]}),u.attemptsMade>1&&x.jsx(Su,{variant:"secondary",className:"bg-amber-500/10 text-amber-600 text-[10px] px-1.5",children:"Retried"})]}),u.opts.delay&&x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-muted-foreground",children:"Delay"}),x.jsx("span",{className:"font-mono font-medium",children:wr(u.opts.delay)})]})]})]}),x.jsxs(o2,{value:r.tab||(u.status==="failed"?"error":"payload"),onValueChange:P=>i({...r,tab:P}),className:"flex-1",children:[x.jsxs(wx,{children:[x.jsx(Za,{value:"payload",children:"Payload"}),x.jsx(Za,{value:"output",children:"Output"}),u.failedReason&&x.jsx(Za,{value:"error",className:"text-status-error",children:"Error"}),u.attemptsMade>1&&u.stacktrace&&u.stacktrace.length>0&&x.jsxs(Za,{value:"retries",children:["Retries (",u.attemptsMade-1,")"]}),x.jsx(Za,{value:"timeline",children:"Timeline"})]}),x.jsx(hs,{value:"payload",className:"mt-4",children:x.jsx("div",{className:" border",children:x.jsx(EF,{data:u.data})})}),x.jsx(hs,{value:"output",className:"mt-4",children:x.jsx("div",{className:" border",children:u.returnvalue?x.jsx(EF,{data:u.returnvalue}):x.jsx("div",{className:"flex h-32 items-center justify-center text-muted-foreground",children:"No output data"})})}),u.failedReason&&x.jsx(hs,{value:"error",className:"mt-4 flex flex-col",style:{maxHeight:"calc(100vh - 480px)",minHeight:"200px"},children:x.jsx(U1e,{error:u.failedReason,stacktrace:u.stacktrace,jobName:u.name,queueName:e})}),u.attemptsMade>1&&u.stacktrace&&u.stacktrace.length>0&&x.jsx(hs,{value:"retries",className:"mt-4",children:x.jsx(G1e,{attemptsMade:u.attemptsMade,maxAttempts:u.opts.attempts||3,stacktraces:u.stacktrace,status:u.status})}),x.jsx(hs,{value:"timeline",className:"mt-4",children:x.jsx(H1e,{job:u})})]})]})}function Pc({icon:e,label:t,children:n,mono:r}){return x.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",children:[x.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[x.jsx(e,{className:"h-4 w-4"}),t]}),x.jsx("div",{className:Ce(r&&"font-mono"),children:n})]})}function U1e({error:e,stacktrace:t,jobName:n,queueName:r}){const[i,a]=j.useState(!0),[o,l]=j.useState(!1),u=async()=>{const d=t?`${e}
|
|
366
|
+
|
|
367
|
+
${t.join(`
|
|
368
|
+
`)}`:e;await navigator.clipboard.writeText(d),l(!0),setTimeout(()=>l(!1),2e3)},f=()=>{const d=t?`${e}
|
|
369
|
+
|
|
370
|
+
${t.join(`
|
|
371
|
+
`)}`:e,h=`Debug this error from job "${n||"unknown"}" in queue "${r||"unknown"}":
|
|
372
|
+
|
|
373
|
+
${d}
|
|
374
|
+
|
|
375
|
+
Help me understand what caused this error and how to fix it.`,m=`https://cursor.com/link/prompt?text=${encodeURIComponent(h)}`;window.open(m,"_blank")};return x.jsxs("div",{className:"flex flex-col h-full overflow-hidden border border-status-error/30 bg-status-error/5",children:[x.jsxs("div",{className:"flex items-center justify-between border-b border-status-error/30 px-4 py-2 shrink-0",children:[x.jsx("span",{className:"font-medium text-status-error",children:e}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsxs("button",{type:"button",onClick:f,className:"inline-flex items-center gap-1.5 rounded px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-status-error/10 hover:text-foreground",title:"Fix in Cursor",children:[x.jsx("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",fillRule:"evenodd",xmlns:"http://www.w3.org/2000/svg",className:"shrink-0",children:x.jsx("path",{d:"M22.106 5.68L12.5.135a.998.998 0 00-.998 0L1.893 5.68a.84.84 0 00-.419.726v11.186c0 .3.16.577.42.727l9.607 5.547a.999.999 0 00.998 0l9.608-5.547a.84.84 0 00.42-.727V6.407a.84.84 0 00-.42-.726zm-.603 1.176L12.228 22.92c-.063.108-.228.064-.228-.061V12.34a.59.59 0 00-.295-.51l-9.11-5.26c-.107-.062-.063-.228.062-.228h18.55c.264 0 .428.286.296.514z"})}),x.jsx("span",{children:"Fix in Cursor"})]}),x.jsx("div",{className:"h-4 w-px bg-border"}),x.jsx("button",{type:"button",onClick:u,className:"rounded p-1.5 hover:bg-status-error/10",title:"Copy error",children:o?x.jsx(Dm,{className:"h-4 w-4 text-status-success"}):x.jsx(JM,{className:"h-4 w-4 text-muted-foreground"})}),t&&t.length>0&&x.jsx("button",{type:"button",onClick:()=>a(!i),className:"rounded p-1.5 hover:bg-status-error/10",title:i?"Collapse":"Expand",children:x.jsx(k0,{className:Ce("h-4 w-4 text-muted-foreground transition-transform",i&&"rotate-180")})})]})]}),i&&t&&t.length>0&&x.jsx("div",{className:"flex-1 overflow-auto p-4 min-h-0",children:x.jsx("pre",{className:"font-mono text-xs text-muted-foreground",children:t.join(`
|
|
376
|
+
`)})})]})}function H1e({job:e}){const[t,n]=j.useState({root:!0,attempt:!0}),{spans:r,timeRange:i}=j.useMemo(()=>{var m,g,b,w;const u=e.timestamp,f=e.finishedOn||e.processedOn||Date.now(),d=f-u,h={id:"root",label:e.name,icon:e.status==="completed"?Im:e.status==="failed"?D0:Zy,iconColor:e.status==="completed"?"text-status-success":e.status==="failed"?"text-status-error":"text-status-warning",startTime:e.timestamp,endTime:e.finishedOn,status:e.status==="completed"?"success":e.status==="failed"?"error":"running",badge:e.attemptsMade>0?`Attempt ${e.attemptsMade}`:void 0,children:[]};if(e.processedOn&&e.processedOn>e.timestamp&&e.processedOn-e.timestamp>100&&((m=h.children)==null||m.push({id:"wait",label:"Queued",icon:ki,iconColor:"text-muted-foreground",startTime:e.timestamp,endTime:e.processedOn,status:"waiting"})),e.processedOn){const y={id:"exec",label:"run()",icon:Zy,iconColor:"text-blue-500",startTime:e.processedOn,endTime:e.finishedOn,status:e.status==="completed"?"success":e.status==="failed"?"error":"running",badge:e.duration?wr(e.duration):void 0,children:[]};if(e.progress&&typeof e.progress=="object"){const S=e.progress;if(Array.isArray(S.logs))for(const E of S.logs)(g=y.children)==null||g.push({id:`log-${y.children.length}`,label:E.message,icon:Oce,iconColor:"text-blue-400",startTime:E.time||e.processedOn,status:"success",isLog:!0})}e.status==="failed"&&e.failedReason&&((b=y.children)==null||b.push({id:"error",label:e.failedReason,icon:dd,iconColor:"text-status-error",startTime:e.finishedOn||e.processedOn,status:"error",isLog:!0})),(w=h.children)==null||w.push(y)}return{spans:[h],timeRange:{start:u,end:f,duration:d}}},[e]),a=u=>{n(f=>({...f,[u]:!f[u]}))},o=j.useMemo(()=>{const{start:u,duration:f}=i,d=[],h=5;for(let m=0;m<=h;m++){const g=u+f/h*m,b=(g-u)/f*100;d.push({position:b,label:wr(g-u)})}return d},[i]),l=(u,f=0)=>{var y;const d=u.children&&u.children.length>0,h=t[u.id]!==!1,m=u.icon,g=(u.startTime-i.start)/i.duration*100,b=u.endTime?(u.endTime-i.start)/i.duration*100:100,w=Math.max(b-g,.5);return x.jsxs(j.Fragment,{children:[x.jsxs("div",{className:"group flex min-h-[36px] items-center border-b border-border/50 hover:bg-muted/30",children:[x.jsxs("div",{className:"flex w-[45%] min-w-0 items-center gap-1 py-2 pr-4",style:{paddingLeft:`${f*20+12}px`},children:[d?x.jsx("button",{type:"button",onClick:()=>a(u.id),className:"flex h-5 w-5 shrink-0 items-center justify-center rounded hover:bg-muted",children:x.jsx(Af,{className:Ce("h-3.5 w-3.5 text-muted-foreground transition-transform",h&&"rotate-90")})}):x.jsx("div",{className:"w-5 shrink-0"}),x.jsx(m,{className:Ce("h-4 w-4 shrink-0",u.iconColor)}),x.jsx("span",{className:Ce("truncate text-sm",u.isLog?"text-muted-foreground":"font-medium"),children:u.label}),u.badge&&x.jsx("span",{className:"ml-2 shrink-0 rounded bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground",children:u.badge})]}),x.jsx("div",{className:"relative h-full flex-1 py-2 pr-4",children:u.isLog?x.jsx("div",{className:"absolute top-1/2 h-2 w-2 -translate-y-1/2 rounded-full bg-muted-foreground/40",style:{left:`${g}%`}}):x.jsx("div",{className:Ce("absolute top-1/2 h-5 -translate-y-1/2 ",u.status==="success"&&"bg-status-success",u.status==="error"&&"bg-status-error",u.status==="running"&&"bg-status-warning",u.status==="waiting"&&"bg-muted-foreground/30"),style:{left:`${g}%`,width:`${w}%`,minWidth:"2px"},children:w>8&&u.endTime&&x.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-[10px] font-medium text-white",children:wr(u.endTime-u.startTime)})})})]}),d&&h&&((y=u.children)==null?void 0:y.map(S=>l(S,f+1)))]},u.id)};return x.jsxs("div",{className:"flex flex-col border bg-card overflow-hidden h-full",children:[x.jsxs("div",{className:"flex border-b bg-muted/30 shrink-0",children:[x.jsx("div",{className:"w-[45%] shrink-0 flex items-center py-2 pr-4",style:{paddingLeft:"12px"},children:x.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:"Span"})}),x.jsx("div",{className:"relative flex-1 py-2 pr-4 flex items-center",children:o.map((u,f)=>x.jsx("span",{className:"absolute font-mono text-[10px] text-muted-foreground",style:{left:`${u.position}%`,transform:"translateX(-50%)"},children:u.label},f.toString()))})]}),x.jsx("div",{className:"flex-1 overflow-auto min-h-0",children:r.map(u=>l(u))})]})}function G1e({attemptsMade:e,maxAttempts:t,stacktraces:n,status:r}){return x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{className:"flex items-center gap-4 border bg-muted/30 px-4 py-3",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(nR,{className:"h-4 w-4 text-amber-500"}),x.jsx("span",{className:"font-medium",children:"Retry History"})]}),x.jsxs("div",{className:"text-sm text-muted-foreground",children:[e," of ",t," attempts"]}),x.jsx(Su,{variant:r==="completed"?"default":"destructive",className:"ml-auto",children:r==="completed"?"Eventually succeeded":"All attempts failed"})]}),x.jsx("div",{className:"space-y-3",children:n.map((i,a)=>x.jsx(W1e,{attemptNumber:a+1,isLast:a===n.length-1,stacktrace:i,succeeded:r==="completed"&&a===n.length-1},a.toString()))})]})}function W1e({attemptNumber:e,isLast:t,stacktrace:n,succeeded:r}){const[i,a]=j.useState(t),o=n.split(`
|
|
377
|
+
`)[0]||"Unknown error";return x.jsxs("div",{className:Ce("overflow-hidden border",r?"border-status-success/30 bg-status-success/5":"border-status-error/30 bg-status-error/5"),children:[x.jsxs("button",{type:"button",onClick:()=>a(!i),className:"flex w-full items-center gap-3 px-4 py-2.5 text-left",children:[x.jsx("div",{className:Ce("flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium",r?"bg-status-success/20 text-status-success":"bg-status-error/20 text-status-error"),children:e}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsxs("span",{className:"text-sm font-medium",children:["Attempt ",e]}),r?x.jsx(Su,{variant:"secondary",className:"bg-status-success/10 text-status-success text-[10px]",children:"Success"}):x.jsx(Su,{variant:"secondary",className:"bg-status-error/10 text-status-error text-[10px]",children:"Failed"})]}),!r&&x.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o})]}),x.jsx(k0,{className:Ce("h-4 w-4 text-muted-foreground transition-transform",i&&"rotate-180")})]}),i&&!r&&x.jsx("div",{className:"border-t border-inherit px-4 py-3",children:x.jsx("pre",{className:"max-h-48 overflow-auto font-mono text-xs text-muted-foreground whitespace-pre-wrap",children:n})}),i&&r&&x.jsx("div",{className:"border-t border-inherit px-4 py-3 text-sm text-status-success",children:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Im,{className:"h-4 w-4"}),"Job completed successfully on this attempt"]})})]})}function K1e({data:e,className:t,color:n="default"}){if(e.length===0)return null;const r=Math.max(...e,1),i=Math.min(...e,0),a=r-i||1,o=80,l=24,u=e.map((w,y)=>{const S=y/(e.length-1)*o,E=l-(w-i)/a*l;return`${S},${E}`}),f=`M ${u.join(" L ")}`,d=[`0,${l}`,...u,`${o},${l}`].join(" "),h={default:"text-chart-1",success:"text-chart-success",danger:"text-chart-error",warning:"text-chart-4"}[n],m=`sparkline-${n}-pattern`,g={default:"fill-chart-1",success:"fill-chart-success",danger:"fill-chart-error",warning:"fill-chart-4"}[n],b={default:"stroke-chart-1",success:"stroke-chart-success",danger:"stroke-chart-error",warning:"stroke-chart-4"}[n];return x.jsxs("svg",{viewBox:`0 0 ${o} ${l}`,className:Ce("w-20 h-6",t),preserveAspectRatio:"none",children:[x.jsx("defs",{children:x.jsxs("pattern",{id:m,x:"0",y:"0",width:"4",height:"4",patternUnits:"userSpaceOnUse",children:[x.jsx("rect",{width:"4",height:"4",className:Ce(g,"opacity-15")}),x.jsx("path",{d:"M0,0 L4,4 M-1,3 L3,7 M-1,-1 L5,5",className:b,strokeWidth:"0.75",opacity:"0.4"})]})}),x.jsx("polygon",{points:d,fill:`url(#${m})`}),x.jsx("path",{d:f,fill:"none",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:Ce("stroke-current",h)})]})}function Y1e({current:e,previous:t,higherIsBetter:n=!0}){if(t===0)return null;const r=(e-t)/t*100,i=r>0,a=Math.abs(r)<1,o=n?i:!i;return a?x.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[x.jsx(r7,{className:"h-3 w-3 mr-0.5"}),"0%"]}):x.jsxs("span",{className:Ce("inline-flex items-center text-xs font-medium",o?"text-chart-success":"text-chart-error"),children:[i?x.jsx(t7,{className:"h-3 w-3 mr-0.5"}):x.jsx(e7,{className:"h-3 w-3 mr-0.5"}),Math.abs(r).toFixed(0),"%"]})}function Kv({title:e,value:t,subtitle:n,sparklineData:r,sparklineColor:i="default",trend:a,className:o,icon:l}){return x.jsxs("div",{className:Ce("border border-dashed bg-card p-4 flex flex-col gap-2",o),children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:e}),l&&x.jsx("span",{className:"text-muted-foreground",children:l})]}),x.jsxs("div",{className:"flex items-end justify-between gap-4",children:[x.jsxs("div",{className:"flex flex-col gap-1",children:[x.jsx("span",{className:"text-2xl font-semibold tabular-nums",children:t}),n&&x.jsx("span",{className:"text-xs text-muted-foreground",children:n}),a&&x.jsx(Y1e,{current:a.current,previous:a.previous,higherIsBetter:a.higherIsBetter})]}),r&&r.length>0&&x.jsx(K1e,{data:r,color:i})]})]})}var X1e=qY();const si=yt(X1e);var AO,CF;function Z1e(){if(CF)return AO;CF=1;function e(t){return t==null}return AO=e,AO}var Q1e=Z1e();const ot=yt(Q1e);var J1e=YY();const _u=yt(J1e);var eSe=gd();const Xe=yt(eSe);var tSe=lr();const Sd=yt(tSe);var TO={exports:{}},bt={};/**
|
|
378
|
+
* @license React
|
|
379
|
+
* react-is.production.min.js
|
|
380
|
+
*
|
|
381
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
382
|
+
*
|
|
383
|
+
* This source code is licensed under the MIT license found in the
|
|
384
|
+
* LICENSE file in the root directory of this source tree.
|
|
385
|
+
*/var OF;function nSe(){if(OF)return bt;OF=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function w(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case e:switch(y=y.type,y){case n:case i:case r:case f:case d:return y;default:switch(y=y&&y.$$typeof,y){case l:case o:case u:case m:case h:case a:return y;default:return S}}case t:return S}}}return bt.ContextConsumer=o,bt.ContextProvider=a,bt.Element=e,bt.ForwardRef=u,bt.Fragment=n,bt.Lazy=m,bt.Memo=h,bt.Portal=t,bt.Profiler=i,bt.StrictMode=r,bt.Suspense=f,bt.SuspenseList=d,bt.isAsyncMode=function(){return!1},bt.isConcurrentMode=function(){return!1},bt.isContextConsumer=function(y){return w(y)===o},bt.isContextProvider=function(y){return w(y)===a},bt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},bt.isForwardRef=function(y){return w(y)===u},bt.isFragment=function(y){return w(y)===n},bt.isLazy=function(y){return w(y)===m},bt.isMemo=function(y){return w(y)===h},bt.isPortal=function(y){return w(y)===t},bt.isProfiler=function(y){return w(y)===i},bt.isStrictMode=function(y){return w(y)===r},bt.isSuspense=function(y){return w(y)===f},bt.isSuspenseList=function(y){return w(y)===d},bt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===i||y===r||y===f||y===d||y===g||typeof y=="object"&&y!==null&&(y.$$typeof===m||y.$$typeof===h||y.$$typeof===a||y.$$typeof===o||y.$$typeof===u||y.$$typeof===b||y.getModuleId!==void 0)},bt.typeOf=w,bt}var jF;function rSe(){return jF||(jF=1,TO.exports=nSe()),TO.exports}var iSe=rSe(),CO,NF;function HX(){if(NF)return CO;NF=1;var e=xo(),t=hi(),n="[object Number]";function r(i){return typeof i=="number"||t(i)&&e(i)==n}return CO=r,CO}var OO,PF;function aSe(){if(PF)return OO;PF=1;var e=HX();function t(n){return e(n)&&n!=+n}return OO=t,OO}var oSe=aSe();const _d=yt(oSe);var sSe=HX();const lSe=yt(sSe);var Ri=function(t){return t===0?0:t>0?1:-1},Vl=function(t){return _u(t)&&t.indexOf("%")===t.length-1},Se=function(t){return lSe(t)&&!_d(t)},uSe=function(t){return ot(t)},Tn=function(t){return Se(t)||_u(t)},cSe=0,Zm=function(t){var n=++cSe;return"".concat(t||"").concat(n)},Eu=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Se(t)&&!_u(t))return r;var a;if(Vl(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return _d(a)&&(a=r),i&&a>n&&(a=n),a},ps=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},fSe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i<n;i++)if(!r[t[i]])r[t[i]]=!0;else return!0;return!1},ii=function(t,n){return Se(t)&&Se(n)?function(r){return t+r*(n-t)}:function(){return n}};function yb(e,t,n){return!e||!e.length?null:e.find(function(r){return r&&(typeof t=="function"?t(r):si(r,t))===n})}var dSe=function(t,n){return Se(t)&&Se(n)?t-n:_u(t)&&_u(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function ef(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function MN(e){"@babel/helpers - typeof";return MN=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},MN(e)}var hSe=["viewBox","children"],pSe=["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"],MF=["points","pathLength"],jO={svg:hSe,polygon:MF,polyline:MF},s2=["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"],bb=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var r=t;if(j.isValidElement(t)&&(r=t.props),!Sd(r))return null;var i={};return Object.keys(r).forEach(function(a){s2.includes(a)&&(i[a]=n||function(o){return r[a](r,o)})}),i},mSe=function(t,n,r){return function(i){return t(n,r,i),null}},xb=function(t,n,r){if(!Sd(t)||MN(t)!=="object")return null;var i=null;return Object.keys(t).forEach(function(a){var o=t[a];s2.includes(a)&&typeof o=="function"&&(i||(i={}),i[a]=mSe(o,n,r))}),i},gSe=["children"],vSe=["children"];function RF(e,t){if(e==null)return{};var n=ySe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ySe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function RN(e){"@babel/helpers - typeof";return RN=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},RN(e)}var kF={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"},io=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},DF=null,NO=null,l2=function e(t){if(t===DF&&Array.isArray(NO))return NO;var n=[];return j.Children.forEach(t,function(r){ot(r)||(iSe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),NO=n,DF=t,n};function Ii(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return io(i)}):r=[io(t)],l2(e).forEach(function(i){var a=si(i,"type.displayName")||si(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function kr(e,t){var n=Ii(e,t);return n&&n[0]}var IF=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!Se(r)||r<=0||!Se(i)||i<=0)},bSe=["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"],xSe=function(t){return t&&t.type&&_u(t.type)&&bSe.indexOf(t.type)>=0},wSe=function(t){return t&&RN(t)==="object"&&"clipDot"in t},SSe=function(t,n,r,i){var a,o=(a=jO==null?void 0:jO[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!Xe(t)&&(i&&o.includes(n)||pSe.includes(n))||r&&s2.includes(n)},et=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(j.isValidElement(t)&&(i=t.props),!Sd(i))return null;var a={};return Object.keys(i).forEach(function(o){var l;SSe((l=i)===null||l===void 0?void 0:l[o],o,n,r)&&(a[o]=i[o])}),a},kN=function e(t,n){if(t===n)return!0;var r=j.Children.count(t);if(r!==j.Children.count(n))return!1;if(r===0)return!0;if(r===1)return LF(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i<r;i++){var a=t[i],o=n[i];if(Array.isArray(a)||Array.isArray(o)){if(!e(a,o))return!1}else if(!LF(a,o))return!1}return!0},LF=function(t,n){if(ot(t)&&ot(n))return!0;if(!ot(t)&&!ot(n)){var r=t.props||{},i=r.children,a=RF(r,gSe),o=n.props||{},l=o.children,u=RF(o,vSe);return i&&l?ef(a,u)&&kN(i,l):!i&&!l?ef(a,u):!1}return!1},$F=function(t,n){var r=[],i={};return l2(t).forEach(function(a,o){if(xSe(a))r.push(a);else if(a){var l=io(a.type),u=n[l]||{},f=u.handler,d=u.once;if(f&&(!d||!i[l])){var h=f(a,l,o);r.push(h),i[l]=!0}}}),r},_Se=function(t){var n=t&&t.type;return n&&kF[n]?kF[n]:null},ESe=function(t,n){return l2(n).indexOf(t)},ASe=["children","width","height","viewBox","className","style","title","desc"];function DN(){return DN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},DN.apply(this,arguments)}function TSe(e,t){if(e==null)return{};var n=CSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function IN(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,l=e.title,u=e.desc,f=TSe(e,ASe),d=i||{width:n,height:r,x:0,y:0},h=ut("recharts-surface",a);return ie.createElement("svg",DN({},et(f,!0,"svg"),{className:h,width:n,height:r,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),ie.createElement("title",null,l),ie.createElement("desc",null,u),t)}var OSe=["children","className"];function LN(){return LN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LN.apply(this,arguments)}function jSe(e,t){if(e==null)return{};var n=NSe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Jt=ie.forwardRef(function(e,t){var n=e.children,r=e.className,i=jSe(e,OSe),a=ut("recharts-layer",r);return ie.createElement("g",LN({className:a},et(i,!0),{ref:t}),n)}),ao=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;a<r;a++)i[a-2]=arguments[a]},PO,BF;function PSe(){if(BF)return PO;BF=1;function e(t,n,r){var i=-1,a=t.length;n<0&&(n=-n>a?0:a+n),r=r>a?a:r,r<0&&(r+=a),a=n>r?0:r-n>>>0,n>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+n];return o}return PO=e,PO}var MO,qF;function MSe(){if(qF)return MO;qF=1;var e=PSe();function t(n,r,i){var a=n.length;return i=i===void 0?a:i,!r&&i>=a?n:e(n,r,i)}return MO=t,MO}var RO,zF;function RSe(){if(zF)return RO;zF=1;function e(t){return t.split("")}return RO=e,RO}var kO,VF;function kSe(){if(VF)return kO;VF=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",l="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+l+"|"+u+")",d="[^"+e+"]",h="(?:\\ud83c[\\udde6-\\uddff]){2}",m="[\\ud800-\\udbff][\\udc00-\\udfff]",g="\\u200d",b=f+"?",w="["+a+"]?",y="(?:"+g+"(?:"+[d,h,m].join("|")+")"+w+b+")*",S=w+b+y,E="(?:"+[d+l+"?",l,h,m,o].join("|")+")",_=RegExp(u+"(?="+u+")|"+E+S,"g");function A(T){return T.match(_)||[]}return kO=A,kO}var DO,FF;function DSe(){if(FF)return DO;FF=1;var e=RSe(),t=n2(),n=kSe();function r(i){return t(i)?n(i):e(i)}return DO=r,DO}var IO,UF;function ISe(){if(UF)return IO;UF=1;var e=MSe(),t=n2(),n=DSe(),r=e2();function i(a){return function(o){o=r(o);var l=t(o)?n(o):void 0,u=l?l[0]:o.charAt(0),f=l?e(l,1).join(""):o.slice(1);return u[a]()+f}}return IO=i,IO}var LO,HF;function LSe(){if(HF)return LO;HF=1;var e=ISe(),t=e("toUpperCase");return LO=t,LO}var $Se=LSe();const Sx=yt($Se);function $t(e){return function(){return e}}const GX=Math.cos,wb=Math.sin,Hi=Math.sqrt,Sb=Math.PI,_x=2*Sb,$N=Math.PI,BN=2*$N,Dl=1e-6,BSe=BN-Dl;function WX(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function qSe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return WX;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;i<a;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class zSe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?WX:qSe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,a,o){this._append`C${+t},${+n},${+r},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,n,r,i,a){if(t=+t,n=+n,r=+r,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,l=this._y1,u=r-t,f=i-n,d=o-t,h=l-n,m=d*d+h*h;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(m>Dl)if(!(Math.abs(h*u-f*d)>Dl)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let g=r-o,b=i-l,w=u*u+f*f,y=g*g+b*b,S=Math.sqrt(w),E=Math.sqrt(m),_=a*Math.tan(($N-Math.acos((w+m-y)/(2*S*E)))/2),A=_/E,T=_/S;Math.abs(A-1)>Dl&&this._append`L${t+A*d},${n+A*h}`,this._append`A${a},${a},0,0,${+(h*g>d*b)},${this._x1=t+T*u},${this._y1=n+T*f}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),u=r*Math.sin(i),f=t+l,d=n+u,h=1^o,m=o?i-a:a-i;this._x1===null?this._append`M${f},${d}`:(Math.abs(this._x1-f)>Dl||Math.abs(this._y1-d)>Dl)&&this._append`L${f},${d}`,r&&(m<0&&(m=m%BN+BN),m>BSe?this._append`A${r},${r},0,1,${h},${t-l},${n-u}A${r},${r},0,1,${h},${this._x1=f},${this._y1=d}`:m>Dl&&this._append`A${r},${r},0,${+(m>=$N)},${h},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function u2(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new zSe(t)}function c2(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function KX(e){this._context=e}KX.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 Ex(e){return new KX(e)}function YX(e){return e[0]}function XX(e){return e[1]}function ZX(e,t){var n=$t(!0),r=null,i=Ex,a=null,o=u2(l);e=typeof e=="function"?e:e===void 0?YX:$t(e),t=typeof t=="function"?t:t===void 0?XX:$t(t);function l(u){var f,d=(u=c2(u)).length,h,m=!1,g;for(r==null&&(a=i(g=o())),f=0;f<=d;++f)!(f<d&&n(h=u[f],f,u))===m&&((m=!m)?a.lineStart():a.lineEnd()),m&&a.point(+e(h,f,u),+t(h,f,u));if(g)return a=null,g+""||null}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:$t(+u),l):e},l.y=function(u){return arguments.length?(t=typeof u=="function"?u:$t(+u),l):t},l.defined=function(u){return arguments.length?(n=typeof u=="function"?u:$t(!!u),l):n},l.curve=function(u){return arguments.length?(i=u,r!=null&&(a=i(r)),l):i},l.context=function(u){return arguments.length?(u==null?r=a=null:a=i(r=u),l):r},l}function Yv(e,t,n){var r=null,i=$t(!0),a=null,o=Ex,l=null,u=u2(f);e=typeof e=="function"?e:e===void 0?YX:$t(+e),t=typeof t=="function"?t:$t(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?XX:$t(+n);function f(h){var m,g,b,w=(h=c2(h)).length,y,S=!1,E,_=new Array(w),A=new Array(w);for(a==null&&(l=o(E=u())),m=0;m<=w;++m){if(!(m<w&&i(y=h[m],m,h))===S)if(S=!S)g=m,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),b=m-1;b>=g;--b)l.point(_[b],A[b]);l.lineEnd(),l.areaEnd()}S&&(_[m]=+e(y,m,h),A[m]=+t(y,m,h),l.point(r?+r(y,m,h):_[m],n?+n(y,m,h):A[m]))}if(E)return l=null,E+""||null}function d(){return ZX().defined(i).curve(o).context(a)}return f.x=function(h){return arguments.length?(e=typeof h=="function"?h:$t(+h),r=null,f):e},f.x0=function(h){return arguments.length?(e=typeof h=="function"?h:$t(+h),f):e},f.x1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:$t(+h),f):r},f.y=function(h){return arguments.length?(t=typeof h=="function"?h:$t(+h),n=null,f):t},f.y0=function(h){return arguments.length?(t=typeof h=="function"?h:$t(+h),f):t},f.y1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:$t(+h),f):n},f.lineX0=f.lineY0=function(){return d().x(e).y(t)},f.lineY1=function(){return d().x(e).y(n)},f.lineX1=function(){return d().x(r).y(t)},f.defined=function(h){return arguments.length?(i=typeof h=="function"?h:$t(!!h),f):i},f.curve=function(h){return arguments.length?(o=h,a!=null&&(l=o(a)),f):o},f.context=function(h){return arguments.length?(h==null?a=l=null:l=o(a=h),f):a},f}class QX{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function VSe(e){return new QX(e,!0)}function FSe(e){return new QX(e,!1)}const f2={draw(e,t){const n=Hi(t/Sb);e.moveTo(n,0),e.arc(0,0,n,0,_x)}},USe={draw(e,t){const n=Hi(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},JX=Hi(1/3),HSe=JX*2,GSe={draw(e,t){const n=Hi(t/HSe),r=n*JX;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},WSe={draw(e,t){const n=Hi(t),r=-n/2;e.rect(r,r,n,n)}},KSe=.8908130915292852,eZ=wb(Sb/10)/wb(7*Sb/10),YSe=wb(_x/10)*eZ,XSe=-GX(_x/10)*eZ,ZSe={draw(e,t){const n=Hi(t*KSe),r=YSe*n,i=XSe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=_x*a/5,l=GX(o),u=wb(o);e.lineTo(u*n,-l*n),e.lineTo(l*r-u*i,u*r+l*i)}e.closePath()}},$O=Hi(3),QSe={draw(e,t){const n=-Hi(t/($O*3));e.moveTo(0,n*2),e.lineTo(-$O*n,-n),e.lineTo($O*n,-n),e.closePath()}},Jr=-.5,ei=Hi(3)/2,qN=1/Hi(12),JSe=(qN/2+1)*3,e_e={draw(e,t){const n=Hi(t/JSe),r=n/2,i=n*qN,a=r,o=n*qN+n,l=-a,u=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(l,u),e.lineTo(Jr*r-ei*i,ei*r+Jr*i),e.lineTo(Jr*a-ei*o,ei*a+Jr*o),e.lineTo(Jr*l-ei*u,ei*l+Jr*u),e.lineTo(Jr*r+ei*i,Jr*i-ei*r),e.lineTo(Jr*a+ei*o,Jr*o-ei*a),e.lineTo(Jr*l+ei*u,Jr*u-ei*l),e.closePath()}};function t_e(e,t){let n=null,r=u2(i);e=typeof e=="function"?e:$t(e||f2),t=typeof t=="function"?t:$t(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:$t(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:$t(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function _b(){}function Eb(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function tZ(e){this._context=e}tZ.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:Eb(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:Eb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function n_e(e){return new tZ(e)}function nZ(e){this._context=e}nZ.prototype={areaStart:_b,areaEnd:_b,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:Eb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function r_e(e){return new nZ(e)}function rZ(e){this._context=e}rZ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Eb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function i_e(e){return new rZ(e)}function iZ(e){this._context=e}iZ.prototype={areaStart:_b,areaEnd:_b,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 a_e(e){return new iZ(e)}function GF(e){return e<0?-1:1}function WF(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),l=(a*i+o*r)/(r+i);return(GF(a)+GF(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(l))||0}function KF(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function BO(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,l=(a-r)/3;e._context.bezierCurveTo(r+l,i+l*t,a-l,o-l*n,a,o)}function Ab(e){this._context=e}Ab.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:BO(this,this._t0,KF(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,BO(this,KF(this,n=WF(this,e,t)),n);break;default:BO(this,this._t0,n=WF(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function aZ(e){this._context=new oZ(e)}(aZ.prototype=Object.create(Ab.prototype)).point=function(e,t){Ab.prototype.point.call(this,t,e)};function oZ(e){this._context=e}oZ.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function o_e(e){return new Ab(e)}function s_e(e){return new aZ(e)}function sZ(e){this._context=e}sZ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=YF(e),i=YF(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function YF(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function l_e(e){return new sZ(e)}function Ax(e,t){this._context=e,this._t=t}Ax.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function u_e(e){return new Ax(e,.5)}function c_e(e){return new Ax(e,0)}function f_e(e){return new Ax(e,1)}function Df(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,l=a.length;n<o;++n)for(i=a,a=e[t[n]],r=0;r<l;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function zN(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function d_e(e,t){return e[t]}function h_e(e){const t=[];return t.key=e,t}function p_e(){var e=$t([]),t=zN,n=Df,r=d_e;function i(a){var o=Array.from(e.apply(this,arguments),h_e),l,u=o.length,f=-1,d;for(const h of a)for(l=0,++f;l<u;++l)(o[l][f]=[0,+r(h,o[l].key,f,a)]).data=h;for(l=0,d=c2(t(o));l<u;++l)o[d[l]].index=l;return n(o,d),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:$t(Array.from(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:$t(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?zN:typeof a=="function"?a:$t(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(n=a??Df,i):n},i}function m_e(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,o;i<a;++i){for(o=n=0;n<r;++n)o+=e[n][i][1]||0;if(o)for(n=0;n<r;++n)e[n][i][1]/=o}Df(e,t)}}function g_e(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var o=0,l=0;o<i;++o)l+=e[o][n][1]||0;r[n][1]+=r[n][0]=-l/2}Df(e,t)}}function v_e(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r<a;++r){for(var l=0,u=0,f=0;l<o;++l){for(var d=e[t[l]],h=d[r][1]||0,m=d[r-1][1]||0,g=(h-m)/2,b=0;b<l;++b){var w=e[t[b]],y=w[r][1]||0,S=w[r-1][1]||0;g+=y-S}u+=h,f+=g*h}i[r-1][1]+=i[r-1][0]=n,u&&(n-=f/u)}i[r-1][1]+=i[r-1][0]=n,Df(e,t)}}function qp(e){"@babel/helpers - typeof";return qp=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},qp(e)}var y_e=["type","size","sizeType"];function VN(){return VN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},VN.apply(this,arguments)}function XF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ZF(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XF(Object(n),!0).forEach(function(r){b_e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b_e(e,t,n){return t=x_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x_e(e){var t=w_e(e,"string");return qp(t)=="symbol"?t:t+""}function w_e(e,t){if(qp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S_e(e,t){if(e==null)return{};var n=__e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function __e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var lZ={symbolCircle:f2,symbolCross:USe,symbolDiamond:GSe,symbolSquare:WSe,symbolStar:ZSe,symbolTriangle:QSe,symbolWye:e_e},E_e=Math.PI/180,A_e=function(t){var n="symbol".concat(Sx(t));return lZ[n]||f2},T_e=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*E_e;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},C_e=function(t,n){lZ["symbol".concat(Sx(t))]=n},d2=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,l=o===void 0?"area":o,u=S_e(t,y_e),f=ZF(ZF({},u),{},{type:r,size:a,sizeType:l}),d=function(){var y=A_e(r),S=t_e().type(y).size(T_e(a,l,r));return S()},h=f.className,m=f.cx,g=f.cy,b=et(f,!0);return m===+m&&g===+g&&a===+a?ie.createElement("path",VN({},b,{className:ut("recharts-symbols",h),transform:"translate(".concat(m,", ").concat(g,")"),d:d()})):null};d2.registerSymbol=C_e;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 FN(){return FN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},FN.apply(this,arguments)}function QF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O_e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QF(Object(n),!0).forEach(function(r){zp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QF(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N_e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,cZ(r.key),r)}}function P_e(e,t,n){return t&&N_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function M_e(e,t,n){return t=Tb(t),R_e(e,uZ()?Reflect.construct(t,n||[],Tb(e).constructor):t.apply(e,n))}function R_e(e,t){if(t&&(If(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return k_e(e)}function k_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uZ=function(){return!!e})()}function Tb(e){return Tb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Tb(e)}function D_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&&UN(e,t)}function UN(e,t){return UN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UN(e,t)}function zp(e,t,n){return t=cZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cZ(e){var t=I_e(e,"string");return If(t)=="symbol"?t:t+""}function I_e(e,t){if(If(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(If(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ti=32,h2=(function(e){function t(){return j_e(this,t),M_e(this,t,arguments)}return D_e(t,e),P_e(t,[{key:"renderIcon",value:function(r){var i=this.props.inactiveColor,a=ti/2,o=ti/6,l=ti/3,u=r.inactive?i:r.color;if(r.type==="plainline")return ie.createElement("line",{strokeWidth:4,fill:"none",stroke:u,strokeDasharray:r.payload.strokeDasharray,x1:0,y1:a,x2:ti,y2:a,className:"recharts-legend-icon"});if(r.type==="line")return ie.createElement("path",{strokeWidth:4,fill:"none",stroke:u,d:"M0,".concat(a,"h").concat(l,`
|
|
386
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(a,`
|
|
387
|
+
H`).concat(ti,"M").concat(2*l,",").concat(a,`
|
|
388
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(a),className:"recharts-legend-icon"});if(r.type==="rect")return ie.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(ti/8,"h").concat(ti,"v").concat(ti*3/4,"h").concat(-ti,"z"),className:"recharts-legend-icon"});if(ie.isValidElement(r.legendIcon)){var f=O_e({},r);return delete f.legendIcon,ie.cloneElement(r.legendIcon,f)}return ie.createElement(d2,{fill:u,cx:a,cy:a,size:ti,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,a=i.payload,o=i.iconSize,l=i.layout,u=i.formatter,f=i.inactiveColor,d={x:0,y:0,width:ti,height:ti},h={display:l==="horizontal"?"inline-block":"block",marginRight:10},m={display:"inline-block",verticalAlign:"middle",marginRight:4};return a.map(function(g,b){var w=g.formatter||u,y=ut(zp(zp({"recharts-legend-item":!0},"legend-item-".concat(b),!0),"inactive",g.inactive));if(g.type==="none")return null;var S=Xe(g.value)?null:g.value;ao(!Xe(g.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 E=g.inactive?f:g.color;return ie.createElement("li",FN({className:y,style:h,key:"legend-item-".concat(b)},xb(r.props,g,b)),ie.createElement(IN,{width:o,height:o,viewBox:d,style:m},r.renderIcon(g)),ie.createElement("span",{className:"recharts-legend-item-text",style:{color:E}},w?w(S,g,b):S))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var l={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return ie.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(j.PureComponent);zp(h2,"displayName","Legend");zp(h2,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var qO,JF;function L_e(){if(JF)return qO;JF=1;var e=pi(),t=JY();function n(r,i){return r&&r.length?t(r,e(i,2)):[]}return qO=n,qO}var $_e=L_e();const eU=yt($_e);function fZ(e,t,n){return t===!0?eU(e,n):Xe(t)?eU(e,t):e}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)}var B_e=["ref"];function tU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ha(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tU(Object(n),!0).forEach(function(r){Tx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hZ(r.key),r)}}function z_e(e,t,n){return t&&nU(e.prototype,t),n&&nU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function V_e(e,t,n){return t=Cb(t),F_e(e,dZ()?Reflect.construct(t,n||[],Cb(e).constructor):t.apply(e,n))}function F_e(e,t){if(t&&(Lf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return U_e(e)}function U_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dZ=function(){return!!e})()}function Cb(e){return Cb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Cb(e)}function H_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&&HN(e,t)}function HN(e,t){return HN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},HN(e,t)}function Tx(e,t,n){return t=hZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hZ(e){var t=G_e(e,"string");return Lf(t)=="symbol"?t:t+""}function G_e(e,t){if(Lf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function W_e(e,t){if(e==null)return{};var n=K_e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K_e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Y_e(e){return e.value}function X_e(e,t){if(ie.isValidElement(e))return ie.cloneElement(e,t);if(typeof e=="function")return ie.createElement(e,t);t.ref;var n=W_e(t,B_e);return ie.createElement(h2,n)}var rU=1,Ls=(function(e){function t(){var n;q_e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=V_e(this,t,[].concat(i)),Tx(n,"lastBoundingBox",{width:-1,height:-1}),n}return H_e(t,e),z_e(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();return r.height=this.wrapperNode.offsetHeight,r.width=this.wrapperNode.offsetWidth,r}return null}},{key:"updateBBox",value:function(){var r=this.props.onBBoxUpdate,i=this.getBBox();i?(Math.abs(i.width-this.lastBoundingBox.width)>rU||Math.abs(i.height-this.lastBoundingBox.height)>rU)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Ha({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,l=i.verticalAlign,u=i.margin,f=i.chartWidth,d=i.chartHeight,h,m;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var g=this.getBBoxSnapshot();h={left:((f||0)-g.width)/2}}else h=o==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(l==="middle"){var b=this.getBBoxSnapshot();m={top:((d||0)-b.height)/2}}else m=l==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Ha(Ha({},h),m)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,l=i.height,u=i.wrapperStyle,f=i.payloadUniqBy,d=i.payload,h=Ha(Ha({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(u)),u);return ie.createElement("div",{className:"recharts-legend-wrapper",style:h,ref:function(g){r.wrapperNode=g}},X_e(a,Ha(Ha({},this.props),{},{payload:fZ(d,f,Y_e)})))}}],[{key:"getWithHeight",value:function(r,i){var a=Ha(Ha({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&Se(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])})(j.PureComponent);Tx(Ls,"displayName","Legend");Tx(Ls,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Z_e=wX();const p2=yt(Z_e);function Vp(e){"@babel/helpers - typeof";return Vp=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},Vp(e)}function GN(){return GN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},GN.apply(this,arguments)}function Q_e(e,t){return nEe(e)||tEe(e,t)||eEe(e,t)||J_e()}function J_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
389
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eEe(e,t){if(e){if(typeof e=="string")return iU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iU(e,t)}}function iU(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tEe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function nEe(e){if(Array.isArray(e))return e}function aU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aU(Object(n),!0).forEach(function(r){rEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rEe(e,t,n){return t=iEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iEe(e){var t=aEe(e,"string");return Vp(t)=="symbol"?t:t+""}function aEe(e,t){if(Vp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Vp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oEe(e){return Array.isArray(e)&&Tn(e[0])&&Tn(e[1])?e.join(" ~ "):e}var sEe=function(t){var n=t.separator,r=n===void 0?" : ":n,i=t.contentStyle,a=i===void 0?{}:i,o=t.itemStyle,l=o===void 0?{}:o,u=t.labelStyle,f=u===void 0?{}:u,d=t.payload,h=t.formatter,m=t.itemSorter,g=t.wrapperClassName,b=t.labelClassName,w=t.label,y=t.labelFormatter,S=t.accessibilityLayer,E=S===void 0?!1:S,_=function(){if(d&&d.length){var k={padding:0,margin:0},F=(m?p2(d,m):d).map(function($,q){if($.type==="none")return null;var L=zO({display:"block",paddingTop:4,paddingBottom:4,color:$.color||"#000"},l),z=$.formatter||h||oEe,U=$.value,K=$.name,Z=U,H=K;if(z&&Z!=null&&H!=null){var V=z(U,K,$,q,d);if(Array.isArray(V)){var X=Q_e(V,2);Z=X[0],H=X[1]}else Z=V}return ie.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(q),style:L},Tn(H)?ie.createElement("span",{className:"recharts-tooltip-item-name"},H):null,Tn(H)?ie.createElement("span",{className:"recharts-tooltip-item-separator"},r):null,ie.createElement("span",{className:"recharts-tooltip-item-value"},Z),ie.createElement("span",{className:"recharts-tooltip-item-unit"},$.unit||""))});return ie.createElement("ul",{className:"recharts-tooltip-item-list",style:k},F)}return null},A=zO({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},a),T=zO({margin:0},f),O=!ot(w),P=O?w:"",M=ut("recharts-default-tooltip",g),R=ut("recharts-tooltip-label",b);O&&y&&d!==void 0&&d!==null&&(P=y(w,d));var D=E?{role:"status","aria-live":"assertive"}:{};return ie.createElement("div",GN({className:M,style:A},D),ie.createElement("p",{className:R,style:T},ie.isValidElement(P)?P:"".concat(P)),_())};function Fp(e){"@babel/helpers - typeof";return Fp=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},Fp(e)}function Xv(e,t,n){return t=lEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lEe(e){var t=uEe(e,"string");return Fp(t)=="symbol"?t:t+""}function uEe(e,t){if(Fp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bh="recharts-tooltip-wrapper",cEe={visibility:"hidden"};function fEe(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return ut(Bh,Xv(Xv(Xv(Xv({},"".concat(Bh,"-right"),Se(n)&&t&&Se(t.x)&&n>=t.x),"".concat(Bh,"-left"),Se(n)&&t&&Se(t.x)&&n<t.x),"".concat(Bh,"-bottom"),Se(r)&&t&&Se(t.y)&&r>=t.y),"".concat(Bh,"-top"),Se(r)&&t&&Se(t.y)&&r<t.y))}function oU(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,i=e.offsetTopLeft,a=e.position,o=e.reverseDirection,l=e.tooltipDimension,u=e.viewBox,f=e.viewBoxDimension;if(a&&Se(a[r]))return a[r];var d=n[r]-l-i,h=n[r]+i;if(t[r])return o[r]?d:h;if(o[r]){var m=d,g=u[r];return m<g?Math.max(h,u[r]):Math.max(d,u[r])}var b=h+l,w=u[r]+f;return b>w?Math.max(d,u[r]):Math.max(h,u[r])}function dEe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function hEe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,u=e.viewBox,f,d,h;return o.height>0&&o.width>0&&n?(d=oU({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:u,viewBoxDimension:u.width}),h=oU({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:u,viewBoxDimension:u.height}),f=dEe({translateX:d,translateY:h,useTranslate3d:l})):f=cEe,{cssProperties:f,cssClasses:fEe({translateX:d,translateY:h,coordinate:n})}}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 sU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function lU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sU(Object(n),!0).forEach(function(r){KN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mEe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mZ(r.key),r)}}function gEe(e,t,n){return t&&mEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vEe(e,t,n){return t=Ob(t),yEe(e,pZ()?Reflect.construct(t,n||[],Ob(e).constructor):t.apply(e,n))}function yEe(e,t){if(t&&($f(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bEe(e)}function bEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(pZ=function(){return!!e})()}function Ob(e){return Ob=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ob(e)}function xEe(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&&WN(e,t)}function WN(e,t){return WN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},WN(e,t)}function KN(e,t,n){return t=mZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mZ(e){var t=wEe(e,"string");return $f(t)=="symbol"?t:t+""}function wEe(e,t){if($f(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($f(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var uU=1,SEe=(function(e){function t(){var n;pEe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=vEe(this,t,[].concat(i)),KN(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),KN(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,u,f,d;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(u=n.props.coordinate)===null||u===void 0?void 0:u.x)!==null&&l!==void 0?l:0,y:(f=(d=n.props.coordinate)===null||d===void 0?void 0:d.y)!==null&&f!==void 0?f:0}})}}),n}return xEe(t,e),gEe(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var r=this.wrapperNode.getBoundingClientRect();(Math.abs(r.width-this.state.lastBoundingBox.width)>uU||Math.abs(r.height-this.state.lastBoundingBox.height)>uU)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,f=i.children,d=i.coordinate,h=i.hasPayload,m=i.isAnimationActive,g=i.offset,b=i.position,w=i.reverseDirection,y=i.useTranslate3d,S=i.viewBox,E=i.wrapperStyle,_=hEe({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:g,position:b,reverseDirection:w,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:S}),A=_.cssClasses,T=_.cssProperties,O=lU(lU({transition:m&&a?"transform ".concat(l,"ms ").concat(u):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&h?"visible":"hidden",position:"absolute",top:0,left:0},E);return ie.createElement("div",{tabIndex:-1,className:A,style:O,ref:function(M){r.wrapperNode=M}},f)}}])})(j.PureComponent),_Ee=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ed={isSsr:_Ee()};function Bf(e){"@babel/helpers - typeof";return Bf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(e)}function cU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fU(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cU(Object(n),!0).forEach(function(r){m2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EEe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AEe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vZ(r.key),r)}}function TEe(e,t,n){return t&&AEe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function CEe(e,t,n){return t=jb(t),OEe(e,gZ()?Reflect.construct(t,n||[],jb(e).constructor):t.apply(e,n))}function OEe(e,t){if(t&&(Bf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jEe(e)}function jEe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gZ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(gZ=function(){return!!e})()}function jb(e){return jb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},jb(e)}function NEe(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&&YN(e,t)}function YN(e,t){return YN=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},YN(e,t)}function m2(e,t,n){return t=vZ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vZ(e){var t=PEe(e,"string");return Bf(t)=="symbol"?t:t+""}function PEe(e,t){if(Bf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MEe(e){return e.dataKey}function REe(e,t){return ie.isValidElement(e)?ie.cloneElement(e,t):typeof e=="function"?ie.createElement(e,t):ie.createElement(sEe,t)}var Ci=(function(e){function t(){return EEe(this,t),CEe(this,t,arguments)}return NEe(t,e),TEe(t,[{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,l=i.animationDuration,u=i.animationEasing,f=i.content,d=i.coordinate,h=i.filterNull,m=i.isAnimationActive,g=i.offset,b=i.payload,w=i.payloadUniqBy,y=i.position,S=i.reverseDirection,E=i.useTranslate3d,_=i.viewBox,A=i.wrapperStyle,T=b??[];h&&T.length&&(T=fZ(b.filter(function(P){return P.value!=null&&(P.hide!==!0||r.props.includeHidden)}),w,MEe));var O=T.length>0;return ie.createElement(SEe,{allowEscapeViewBox:o,animationDuration:l,animationEasing:u,isAnimationActive:m,active:a,coordinate:d,hasPayload:O,offset:g,position:y,reverseDirection:S,useTranslate3d:E,viewBox:_,wrapperStyle:A},REe(f,fU(fU({},this.props),{},{payload:T})))}}])})(j.PureComponent);m2(Ci,"displayName","Tooltip");m2(Ci,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ed.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 VO,dU;function kEe(){if(dU)return VO;dU=1;var e=lr(),t=bX(),n=sX(),r="Expected a function",i=Math.max,a=Math.min;function o(l,u,f){var d,h,m,g,b,w,y=0,S=!1,E=!1,_=!0;if(typeof l!="function")throw new TypeError(r);u=n(u)||0,e(f)&&(S=!!f.leading,E="maxWait"in f,m=E?i(n(f.maxWait)||0,u):m,_="trailing"in f?!!f.trailing:_);function A(F){var $=d,q=h;return d=h=void 0,y=F,g=l.apply(q,$),g}function T(F){return y=F,b=setTimeout(M,u),S?A(F):g}function O(F){var $=F-w,q=F-y,L=u-$;return E?a(L,m-q):L}function P(F){var $=F-w,q=F-y;return w===void 0||$>=u||$<0||E&&q>=m}function M(){var F=t();if(P(F))return R(F);b=setTimeout(M,O(F))}function R(F){return b=void 0,_&&d?A(F):(d=h=void 0,g)}function D(){b!==void 0&&clearTimeout(b),y=0,d=w=h=b=void 0}function I(){return b===void 0?g:R(t())}function k(){var F=t(),$=P(F);if(d=arguments,h=this,w=F,$){if(b===void 0)return T(w);if(E)return clearTimeout(b),b=setTimeout(M,u),A(w)}return b===void 0&&(b=setTimeout(M,u)),g}return k.cancel=D,k.flush=I,k}return VO=o,VO}var FO,hU;function DEe(){if(hU)return FO;hU=1;var e=kEe(),t=lr(),n="Expected a function";function r(i,a,o){var l=!0,u=!0;if(typeof i!="function")throw new TypeError(n);return t(o)&&(l="leading"in o?!!o.leading:l,u="trailing"in o?!!o.trailing:u),e(i,a,{leading:l,maxWait:a,trailing:u})}return FO=r,FO}var IEe=DEe();const yZ=yt(IEe);function Up(e){"@babel/helpers - typeof";return Up=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},Up(e)}function pU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Zv(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pU(Object(n),!0).forEach(function(r){LEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LEe(e,t,n){return t=$Ee(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Ee(e){var t=BEe(e,"string");return Up(t)=="symbol"?t:t+""}function BEe(e,t){if(Up(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Up(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qEe(e,t){return UEe(e)||FEe(e,t)||VEe(e,t)||zEe()}function zEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
390
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VEe(e,t){if(e){if(typeof e=="string")return mU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mU(e,t)}}function mU(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function FEe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function UEe(e){if(Array.isArray(e))return e}var HEe=j.forwardRef(function(e,t){var n=e.aspect,r=e.initialDimension,i=r===void 0?{width:-1,height:-1}:r,a=e.width,o=a===void 0?"100%":a,l=e.height,u=l===void 0?"100%":l,f=e.minWidth,d=f===void 0?0:f,h=e.minHeight,m=e.maxHeight,g=e.children,b=e.debounce,w=b===void 0?0:b,y=e.id,S=e.className,E=e.onResize,_=e.style,A=_===void 0?{}:_,T=j.useRef(null),O=j.useRef();O.current=E,j.useImperativeHandle(t,function(){return Object.defineProperty(T.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),T.current},configurable:!0})});var P=j.useState({containerWidth:i.width,containerHeight:i.height}),M=qEe(P,2),R=M[0],D=M[1],I=j.useCallback(function(F,$){D(function(q){var L=Math.round(F),z=Math.round($);return q.containerWidth===L&&q.containerHeight===z?q:{containerWidth:L,containerHeight:z}})},[]);j.useEffect(function(){var F=function(K){var Z,H=K[0].contentRect,V=H.width,X=H.height;I(V,X),(Z=O.current)===null||Z===void 0||Z.call(O,V,X)};w>0&&(F=yZ(F,w,{trailing:!0,leading:!1}));var $=new ResizeObserver(F),q=T.current.getBoundingClientRect(),L=q.width,z=q.height;return I(L,z),$.observe(T.current),function(){$.disconnect()}},[I,w]);var k=j.useMemo(function(){var F=R.containerWidth,$=R.containerHeight;if(F<0||$<0)return null;ao(Vl(o)||Vl(u),`The width(%s) and height(%s) are both fixed numbers,
|
|
391
|
+
maybe you don't need to use a ResponsiveContainer.`,o,u),ao(!n||n>0,"The aspect(%s) must be greater than zero.",n);var q=Vl(o)?F:o,L=Vl(u)?$:u;n&&n>0&&(q?L=q/n:L&&(q=L*n),m&&L>m&&(L=m)),ao(q>0||L>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
392
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
393
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
394
|
+
height and width.`,q,L,o,u,d,h,n);var z=!Array.isArray(g)&&io(g.type).endsWith("Chart");return ie.Children.map(g,function(U){return ie.isValidElement(U)?j.cloneElement(U,Zv({width:q,height:L},z?{style:Zv({height:"100%",width:"100%",maxHeight:L,maxWidth:q},U.props.style)}:{})):U})},[n,g,u,m,h,d,R,o]);return ie.createElement("div",{id:y?"".concat(y):void 0,className:ut("recharts-responsive-container",S),style:Zv(Zv({},A),{},{width:o,height:u,minWidth:d,minHeight:h,maxHeight:m}),ref:T},k)}),bZ=function(t){return null};bZ.displayName="Cell";function Hp(e){"@babel/helpers - typeof";return Hp=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},Hp(e)}function gU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function XN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gU(Object(n),!0).forEach(function(r){GEe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gU(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function GEe(e,t,n){return t=WEe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WEe(e){var t=KEe(e,"string");return Hp(t)=="symbol"?t:t+""}function KEe(e,t){if(Hp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Mc={widthCache:{},cacheCount:0},YEe=2e3,XEe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},vU="recharts_measurement_span";function ZEe(e){var t=XN({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var lp=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ed.isSsr)return{width:0,height:0};var r=ZEe(n),i=JSON.stringify({text:t,copyStyle:r});if(Mc.widthCache[i])return Mc.widthCache[i];try{var a=document.getElementById(vU);a||(a=document.createElement("span"),a.setAttribute("id",vU),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=XN(XN({},XEe),r);Object.assign(a.style,o),a.textContent="".concat(t);var l=a.getBoundingClientRect(),u={width:l.width,height:l.height};return Mc.widthCache[i]=u,++Mc.cacheCount>YEe&&(Mc.cacheCount=0,Mc.widthCache={}),u}catch{return{width:0,height:0}}},QEe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Gp(e){"@babel/helpers - typeof";return Gp=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},Gp(e)}function Nb(e,t){return nAe(e)||tAe(e,t)||eAe(e,t)||JEe()}function JEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
395
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eAe(e,t){if(e){if(typeof e=="string")return yU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yU(e,t)}}function yU(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function nAe(e){if(Array.isArray(e))return e}function rAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bU(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aAe(r.key),r)}}function iAe(e,t,n){return t&&bU(e.prototype,t),n&&bU(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function aAe(e){var t=oAe(e,"string");return Gp(t)=="symbol"?t:t+""}function oAe(e,t){if(Gp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Gp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,wU=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sAe=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,lAe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,xZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},uAe=Object.keys(xZ),Vc="NaN";function cAe(e,t){return e*xZ[t]}var Qv=(function(){function e(t,n){rAe(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!sAe.test(n)&&(this.num=NaN,this.unit=""),uAe.includes(n)&&(this.num=cAe(t,n),this.unit="px")}return iAe(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var r,i=(r=lAe.exec(n))!==null&&r!==void 0?r:[],a=Nb(i,3),o=a[1],l=a[2];return new e(parseFloat(o),l??"")}}])})();function wZ(e){if(e.includes(Vc))return Vc;for(var t=e;t.includes("*")||t.includes("/");){var n,r=(n=xU.exec(t))!==null&&n!==void 0?n:[],i=Nb(r,4),a=i[1],o=i[2],l=i[3],u=Qv.parse(a??""),f=Qv.parse(l??""),d=o==="*"?u.multiply(f):u.divide(f);if(d.isNaN())return Vc;t=t.replace(xU,d.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,m=(h=wU.exec(t))!==null&&h!==void 0?h:[],g=Nb(m,4),b=g[1],w=g[2],y=g[3],S=Qv.parse(b??""),E=Qv.parse(y??""),_=w==="+"?S.add(E):S.subtract(E);if(_.isNaN())return Vc;t=t.replace(wU,_.toString())}return t}var SU=/\(([^()]*)\)/;function fAe(e){for(var t=e;t.includes("(");){var n=SU.exec(t),r=Nb(n,2),i=r[1];t=t.replace(SU,wZ(i))}return t}function dAe(e){var t=e.replace(/\s+/g,"");return t=fAe(t),t=wZ(t),t}function hAe(e){try{return dAe(e)}catch{return Vc}}function UO(e){var t=hAe(e.slice(5,-1));return t===Vc?"":t}var pAe=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],mAe=["dx","dy","angle","className","breakAll"];function ZN(){return ZN=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ZN.apply(this,arguments)}function _U(e,t){if(e==null)return{};var n=gAe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gAe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EU(e,t){return xAe(e)||bAe(e,t)||yAe(e,t)||vAe()}function vAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
396
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yAe(e,t){if(e){if(typeof e=="string")return AU(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AU(e,t)}}function AU(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function xAe(e){if(Array.isArray(e))return e}var SZ=/[ \f\n\r\t\v\u2028\u2029]+/,_Z=function(t){var n=t.children,r=t.breakAll,i=t.style;try{var a=[];ot(n)||(r?a=n.toString().split(""):a=n.toString().split(SZ));var o=a.map(function(u){return{word:u,width:lp(u,i).width}}),l=r?0:lp(" ",i).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},wAe=function(t,n,r,i,a){var o=t.maxLines,l=t.children,u=t.style,f=t.breakAll,d=Se(o),h=l,m=function(){var q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return q.reduce(function(L,z){var U=z.word,K=z.width,Z=L[L.length-1];if(Z&&(i==null||a||Z.width+K+r<Number(i)))Z.words.push(U),Z.width+=K+r;else{var H={words:[U],width:K};L.push(H)}return L},[])},g=m(n),b=function(q){return q.reduce(function(L,z){return L.width>z.width?L:z})};if(!d)return g;for(var w="…",y=function(q){var L=h.slice(0,q),z=_Z({breakAll:f,style:u,children:L+w}).wordsWithComputedWidth,U=m(z),K=U.length>o||b(U).width>Number(i);return[K,U]},S=0,E=h.length-1,_=0,A;S<=E&&_<=h.length-1;){var T=Math.floor((S+E)/2),O=T-1,P=y(O),M=EU(P,2),R=M[0],D=M[1],I=y(T),k=EU(I,1),F=k[0];if(!R&&!F&&(S=T+1),R&&F&&(E=T-1),!R&&F){A=D;break}_++}return A||g},TU=function(t){var n=ot(t)?[]:t.toString().split(SZ);return[{words:n}]},SAe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,l=t.maxLines;if((n||r)&&!Ed.isSsr){var u,f,d=_Z({breakAll:o,children:i,style:a});if(d){var h=d.wordsWithComputedWidth,m=d.spaceWidth;u=h,f=m}else return TU(i);return wAe({breakAll:o,children:i,maxLines:l,style:a},u,f,n,r)}return TU(i)},CU="#808080",Pb=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,l=o===void 0?"1em":o,u=t.capHeight,f=u===void 0?"0.71em":u,d=t.scaleToFit,h=d===void 0?!1:d,m=t.textAnchor,g=m===void 0?"start":m,b=t.verticalAnchor,w=b===void 0?"end":b,y=t.fill,S=y===void 0?CU:y,E=_U(t,pAe),_=j.useMemo(function(){return SAe({breakAll:E.breakAll,children:E.children,maxLines:E.maxLines,scaleToFit:h,style:E.style,width:E.width})},[E.breakAll,E.children,E.maxLines,h,E.style,E.width]),A=E.dx,T=E.dy,O=E.angle,P=E.className,M=E.breakAll,R=_U(E,mAe);if(!Tn(r)||!Tn(a))return null;var D=r+(Se(A)?A:0),I=a+(Se(T)?T:0),k;switch(w){case"start":k=UO("calc(".concat(f,")"));break;case"middle":k=UO("calc(".concat((_.length-1)/2," * -").concat(l," + (").concat(f," / 2))"));break;default:k=UO("calc(".concat(_.length-1," * -").concat(l,")"));break}var F=[];if(h){var $=_[0].width,q=E.width;F.push("scale(".concat((Se(q)?q/$:1)/$,")"))}return O&&F.push("rotate(".concat(O,", ").concat(D,", ").concat(I,")")),F.length&&(R.transform=F.join(" ")),ie.createElement("text",ZN({},et(R,!0),{x:D,y:I,className:ut("recharts-text",P),textAnchor:g,fill:S.includes("url")?CU:S}),_.map(function(L,z){var U=L.words.join(M?"":" ");return ie.createElement("tspan",{x:D,dy:z===0?k:l,key:"".concat(U,"-").concat(z)},U)}))};function $s(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _Ae(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function g2(e){let t,n,r;e.length!==2?(t=$s,n=(l,u)=>$s(e(l),u),r=(l,u)=>e(l)-u):(t=e===$s||e===_Ae?e:EAe,n=e,r=e);function i(l,u,f=0,d=l.length){if(f<d){if(t(u,u)!==0)return d;do{const h=f+d>>>1;n(l[h],u)<0?f=h+1:d=h}while(f<d)}return f}function a(l,u,f=0,d=l.length){if(f<d){if(t(u,u)!==0)return d;do{const h=f+d>>>1;n(l[h],u)<=0?f=h+1:d=h}while(f<d)}return f}function o(l,u,f=0,d=l.length){const h=i(l,u,f,d-1);return h>f&&r(l[h-1],u)>-r(l[h],u)?h-1:h}return{left:i,center:o,right:a}}function EAe(){return 0}function EZ(e){return e===null?NaN:+e}function*AAe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const TAe=g2($s),Qm=TAe.right;g2(EZ).center;class OU extends Map{constructor(t,n=jAe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(jU(this,t))}has(t){return super.has(jU(this,t))}set(t,n){return super.set(CAe(this,t),n)}delete(t){return super.delete(OAe(this,t))}}function jU({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function CAe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function OAe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function jAe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function NAe(e=$s){if(e===$s)return AZ;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function AZ(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const PAe=Math.sqrt(50),MAe=Math.sqrt(10),RAe=Math.sqrt(2);function Mb(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=PAe?10:a>=MAe?5:a>=RAe?2:1;let l,u,f;return i<0?(f=Math.pow(10,-i)/o,l=Math.round(e*f),u=Math.round(t*f),l/f<e&&++l,u/f>t&&--u,f=-f):(f=Math.pow(10,i)*o,l=Math.round(e/f),u=Math.round(t/f),l*f<e&&++l,u*f>t&&--u),u<l&&.5<=n&&n<2?Mb(e,t,n*2):[l,u,f]}function QN(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,a,o]=r?Mb(t,e,n):Mb(e,t,n);if(!(a>=i))return[];const l=a-i+1,u=new Array(l);if(r)if(o<0)for(let f=0;f<l;++f)u[f]=(a-f)/-o;else for(let f=0;f<l;++f)u[f]=(a-f)*o;else if(o<0)for(let f=0;f<l;++f)u[f]=(i+f)/-o;else for(let f=0;f<l;++f)u[f]=(i+f)*o;return u}function JN(e,t,n){return t=+t,e=+e,n=+n,Mb(e,t,n)[2]}function eP(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?JN(t,e,n):JN(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function NU(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function PU(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function TZ(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?AZ:NAe(i);r>n;){if(r-n>600){const u=r-n+1,f=t-n+1,d=Math.log(u),h=.5*Math.exp(2*d/3),m=.5*Math.sqrt(d*h*(u-h)/u)*(f-u/2<0?-1:1),g=Math.max(n,Math.floor(t-f*h/u+m)),b=Math.min(r,Math.floor(t+(u-f)*h/u+m));TZ(e,t,g,b,i)}const a=e[t];let o=n,l=r;for(qh(e,n,t),i(e[r],a)>0&&qh(e,n,r);o<l;){for(qh(e,o,l),++o,--l;i(e[o],a)<0;)++o;for(;i(e[l],a)>0;)--l}i(e[n],a)===0?qh(e,n,l):(++l,qh(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}return e}function qh(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function kAe(e,t,n){if(e=Float64Array.from(AAe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return PU(e);if(t>=1)return NU(e);var r,i=(r-1)*t,a=Math.floor(i),o=NU(TZ(e,a).subarray(0,a+1)),l=PU(e.subarray(a+1));return o+(l-o)*(i-a)}}function DAe(e,t,n=EZ){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),l=+n(e[a+1],a+1,e);return o+(l-o)*(i-a)}}function IAe(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function gi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function So(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 tP=Symbol("implicit");function v2(){var e=new OU,t=[],n=[],r=tP;function i(a){let o=e.get(a);if(o===void 0){if(r!==tP)return r;e.set(a,o=t.push(a)-1)}return n[o%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new OU;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return v2(t,n).unknown(r)},gi.apply(i,arguments),i}function Wp(){var e=v2().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,l=!1,u=0,f=0,d=.5;delete e.unknown;function h(){var m=t().length,g=i<r,b=g?i:r,w=g?r:i;a=(w-b)/Math.max(1,m-u+f*2),l&&(a=Math.floor(a)),b+=(w-b-a*(m-u))*d,o=a*(1-u),l&&(b=Math.round(b),o=Math.round(o));var y=IAe(m).map(function(S){return b+a*S});return n(g?y.reverse():y)}return e.domain=function(m){return arguments.length?(t(m),h()):t()},e.range=function(m){return arguments.length?([r,i]=m,r=+r,i=+i,h()):[r,i]},e.rangeRound=function(m){return[r,i]=m,r=+r,i=+i,l=!0,h()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(m){return arguments.length?(l=!!m,h()):l},e.padding=function(m){return arguments.length?(u=Math.min(1,f=+m),h()):u},e.paddingInner=function(m){return arguments.length?(u=Math.min(1,m),h()):u},e.paddingOuter=function(m){return arguments.length?(f=+m,h()):f},e.align=function(m){return arguments.length?(d=Math.max(0,Math.min(1,m)),h()):d},e.copy=function(){return Wp(t(),[r,i]).round(l).paddingInner(u).paddingOuter(f).align(d)},gi.apply(h(),arguments)}function CZ(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return CZ(t())},e}function up(){return CZ(Wp.apply(null,arguments).paddingInner(1))}function LAe(e){return function(){return e}}function Rb(e){return+e}var MU=[0,1];function rr(e){return e}function nP(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:LAe(isNaN(t)?NaN:.5)}function $Ae(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function BAe(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=nP(i,r),a=n(o,a)):(r=nP(r,i),a=n(a,o)),function(l){return a(r(l))}}function qAe(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=nP(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(l){var u=Qm(e,l,1,r)-1;return a[u](i[u](l))}}function Jm(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Cx(){var e=MU,t=MU,n=ro,r,i,a,o=rr,l,u,f;function d(){var m=Math.min(e.length,t.length);return o!==rr&&(o=$Ae(e[0],e[m-1])),l=m>2?qAe:BAe,u=f=null,h}function h(m){return m==null||isNaN(m=+m)?a:(u||(u=l(e.map(r),t,n)))(r(o(m)))}return h.invert=function(m){return o(i((f||(f=l(t,e.map(r),ji)))(m)))},h.domain=function(m){return arguments.length?(e=Array.from(m,Rb),d()):e.slice()},h.range=function(m){return arguments.length?(t=Array.from(m),d()):t.slice()},h.rangeRound=function(m){return t=Array.from(m),n=_R,d()},h.clamp=function(m){return arguments.length?(o=m?!0:rr,d()):o!==rr},h.interpolate=function(m){return arguments.length?(n=m,d()):n},h.unknown=function(m){return arguments.length?(a=m,h):a},function(m,g){return r=m,i=g,d()}}function y2(){return Cx()(rr,rr)}function zAe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function kb(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function qf(e){return e=kb(Math.abs(e)),e?e[1]:NaN}function VAe(e,t){return function(n,r){for(var i=n.length,a=[],o=0,l=e[0],u=0;i>0&&l>0&&(u+l+1>r&&(l=Math.max(1,r-u)),a.push(n.substring(i-=l,i+l)),!((u+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(t)}}function FAe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var UAe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kp(e){if(!(t=UAe.exec(e)))throw new Error("invalid format: "+e);var t;return new b2({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]})}Kp.prototype=b2.prototype;function b2(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+""}b2.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 HAe(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var Db;function GAe(e,t){var n=kb(e,t);if(!n)return Db=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(Db=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+kb(e,Math.max(0,t+a-1))[0]}function RU(e,t){var n=kb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const kU={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:zAe,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)=>RU(e*100,t),r:RU,s:GAe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function DU(e){return e}var IU=Array.prototype.map,LU=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function WAe(e){var t=e.grouping===void 0||e.thousands===void 0?DU:VAe(IU.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?DU:FAe(IU.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function f(h,m){h=Kp(h);var g=h.fill,b=h.align,w=h.sign,y=h.symbol,S=h.zero,E=h.width,_=h.comma,A=h.precision,T=h.trim,O=h.type;O==="n"?(_=!0,O="g"):kU[O]||(A===void 0&&(A=12),T=!0,O="g"),(S||g==="0"&&b==="=")&&(S=!0,g="0",b="=");var P=(m&&m.prefix!==void 0?m.prefix:"")+(y==="$"?n:y==="#"&&/[boxX]/.test(O)?"0"+O.toLowerCase():""),M=(y==="$"?r:/[%p]/.test(O)?o:"")+(m&&m.suffix!==void 0?m.suffix:""),R=kU[O],D=/[defgprs%]/.test(O);A=A===void 0?6:/[gprs]/.test(O)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function I(k){var F=P,$=M,q,L,z;if(O==="c")$=R(k)+$,k="";else{k=+k;var U=k<0||1/k<0;if(k=isNaN(k)?u:R(Math.abs(k),A),T&&(k=HAe(k)),U&&+k==0&&w!=="+"&&(U=!1),F=(U?w==="("?w:l:w==="-"||w==="("?"":w)+F,$=(O==="s"&&!isNaN(k)&&Db!==void 0?LU[8+Db/3]:"")+$+(U&&w==="("?")":""),D){for(q=-1,L=k.length;++q<L;)if(z=k.charCodeAt(q),48>z||z>57){$=(z===46?i+k.slice(q+1):k.slice(q))+$,k=k.slice(0,q);break}}}_&&!S&&(k=t(k,1/0));var K=F.length+k.length+$.length,Z=K<E?new Array(E-K+1).join(g):"";switch(_&&S&&(k=t(Z+k,Z.length?E-$.length:1/0),Z=""),b){case"<":k=F+k+$+Z;break;case"=":k=F+Z+k+$;break;case"^":k=Z.slice(0,K=Z.length>>1)+F+k+$+Z.slice(K);break;default:k=Z+F+k+$;break}return a(k)}return I.toString=function(){return h+""},I}function d(h,m){var g=Math.max(-8,Math.min(8,Math.floor(qf(m)/3)))*3,b=Math.pow(10,-g),w=f((h=Kp(h),h.type="f",h),{suffix:LU[8+g/3]});return function(y){return w(b*y)}}return{format:f,formatPrefix:d}}var Jv,x2,OZ;KAe({thousands:",",grouping:[3],currency:["$",""]});function KAe(e){return Jv=WAe(e),x2=Jv.format,OZ=Jv.formatPrefix,Jv}function YAe(e){return Math.max(0,-qf(Math.abs(e)))}function XAe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(qf(t)/3)))*3-qf(Math.abs(e)))}function ZAe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,qf(t)-qf(e))+1}function jZ(e,t,n,r){var i=eP(e,t,n),a;switch(r=Kp(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=XAe(i,o))&&(r.precision=a),OZ(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=ZAe(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=YAe(i))&&(r.precision=a-(r.type==="%")*2);break}}return x2(r)}function el(e){var t=e.domain;return e.ticks=function(n){var r=t();return QN(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return jZ(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],l=r[a],u,f,d=10;for(l<o&&(f=o,o=l,l=f,f=i,i=a,a=f);d-- >0;){if(f=JN(o,l,n),f===u)return r[i]=o,r[a]=l,t(r);if(f>0)o=Math.floor(o/f)*f,l=Math.ceil(l/f)*f;else if(f<0)o=Math.ceil(o*f)/f,l=Math.floor(l*f)/f;else break;u=f}return e},e}function Ib(){var e=y2();return e.copy=function(){return Jm(e,Ib())},gi.apply(e,arguments),el(e)}function NZ(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Rb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return NZ(e).unknown(t)},e=arguments.length?Array.from(e,Rb):[0,1],el(n)}function PZ(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}function $U(e){return Math.log(e)}function BU(e){return Math.exp(e)}function QAe(e){return-Math.log(-e)}function JAe(e){return-Math.exp(-e)}function eTe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function tTe(e){return e===10?eTe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function nTe(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 qU(e){return(t,n)=>-e(-t,n)}function w2(e){const t=e($U,BU),n=t.domain;let r=10,i,a;function o(){return i=nTe(r),a=tTe(r),n()[0]<0?(i=qU(i),a=qU(a),e(QAe,JAe)):e($U,BU),t}return t.base=function(l){return arguments.length?(r=+l,o()):r},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const u=n();let f=u[0],d=u[u.length-1];const h=d<f;h&&([f,d]=[d,f]);let m=i(f),g=i(d),b,w;const y=l==null?10:+l;let S=[];if(!(r%1)&&g-m<y){if(m=Math.floor(m),g=Math.ceil(g),f>0){for(;m<=g;++m)for(b=1;b<r;++b)if(w=m<0?b/a(-m):b*a(m),!(w<f)){if(w>d)break;S.push(w)}}else for(;m<=g;++m)for(b=r-1;b>=1;--b)if(w=m>0?b/a(-m):b*a(m),!(w<f)){if(w>d)break;S.push(w)}S.length*2<y&&(S=QN(f,d,y))}else S=QN(m,g,Math.min(g-m,y)).map(a);return h?S.reverse():S},t.tickFormat=(l,u)=>{if(l==null&&(l=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Kp(u)).precision==null&&(u.trim=!0),u=x2(u)),l===1/0)return u;const f=Math.max(1,r*l/t.ticks().length);return d=>{let h=d/a(Math.round(i(d)));return h*r<r-.5&&(h*=r),h<=f?u(d):""}},t.nice=()=>n(PZ(n(),{floor:l=>a(Math.floor(i(l))),ceil:l=>a(Math.ceil(i(l)))})),t}function MZ(){const e=w2(Cx()).domain([1,10]);return e.copy=()=>Jm(e,MZ()).base(e.base()),gi.apply(e,arguments),e}function zU(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function VU(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function S2(e){var t=1,n=e(zU(t),VU(t));return n.constant=function(r){return arguments.length?e(zU(t=+r),VU(t)):t},el(n)}function RZ(){var e=S2(Cx());return e.copy=function(){return Jm(e,RZ()).constant(e.constant())},gi.apply(e,arguments)}function FU(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function rTe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function iTe(e){return e<0?-e*e:e*e}function _2(e){var t=e(rr,rr),n=1;function r(){return n===1?e(rr,rr):n===.5?e(rTe,iTe):e(FU(n),FU(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},el(t)}function E2(){var e=_2(Cx());return e.copy=function(){return Jm(e,E2()).exponent(e.exponent())},gi.apply(e,arguments),e}function aTe(){return E2.apply(null,arguments).exponent(.5)}function UU(e){return Math.sign(e)*e*e}function oTe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function kZ(){var e=y2(),t=[0,1],n=!1,r;function i(a){var o=oTe(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(UU(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,Rb)).map(UU)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return kZ(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},gi.apply(i,arguments),el(i)}function DZ(){var e=[],t=[],n=[],r;function i(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=DAe(e,o/l);return a}function a(o){return o==null||isNaN(o=+o)?r:t[Qm(n,o)]}return a.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort($s),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(r=o,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return DZ().domain(e).range(t).unknown(r)},gi.apply(a,arguments)}function IZ(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function o(u){return u!=null&&u<=u?i[Qm(r,u,0,n)]:a}function l(){var u=-1;for(r=new Array(n);++u<n;)r[u]=((u+1)*t-(u-n)*e)/(n+1);return o}return o.domain=function(u){return arguments.length?([e,t]=u,e=+e,t=+t,l()):[e,t]},o.range=function(u){return arguments.length?(n=(i=Array.from(u)).length-1,l()):i.slice()},o.invertExtent=function(u){var f=i.indexOf(u);return f<0?[NaN,NaN]:f<1?[e,r[0]]:f>=n?[r[n-1],t]:[r[f-1],r[f]]},o.unknown=function(u){return arguments.length&&(a=u),o},o.thresholds=function(){return r.slice()},o.copy=function(){return IZ().domain([e,t]).range(i).unknown(a)},gi.apply(el(o),arguments)}function LZ(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Qm(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return LZ().domain(e).range(t).unknown(n)},gi.apply(i,arguments)}const HO=new Date,GO=new Date;function Cn(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),l=i.ceil(a);return a-o<l-a?o:l},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,l)=>{const u=[];if(a=i.ceil(a),l=l==null?1:Math.floor(l),!(a<o)||!(l>0))return u;let f;do u.push(f=new Date(+a)),t(a,l),e(a);while(f<a&&a<o);return u},i.filter=a=>Cn(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!a(o););else for(;--l>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(HO.setTime(+a),GO.setTime(+o),e(HO),e(GO),Math.floor(n(HO,GO))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const Lb=Cn(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Lb.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Cn(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Lb);Lb.range;const Ja=1e3,ai=Ja*60,eo=ai*60,ho=eo*24,A2=ho*7,HU=ho*30,WO=ho*365,Fl=Cn(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ja)},(e,t)=>(t-e)/Ja,e=>e.getUTCSeconds());Fl.range;const T2=Cn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ja)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getMinutes());T2.range;const C2=Cn(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ai)},(e,t)=>(t-e)/ai,e=>e.getUTCMinutes());C2.range;const O2=Cn(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ja-e.getMinutes()*ai)},(e,t)=>{e.setTime(+e+t*eo)},(e,t)=>(t-e)/eo,e=>e.getHours());O2.range;const j2=Cn(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*eo)},(e,t)=>(t-e)/eo,e=>e.getUTCHours());j2.range;const eg=Cn(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ai)/ho,e=>e.getDate()-1);eg.range;const Ox=Cn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ho,e=>e.getUTCDate()-1);Ox.range;const $Z=Cn(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ho,e=>Math.floor(e/ho));$Z.range;function Iu(e){return Cn(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ai)/A2)}const jx=Iu(0),$b=Iu(1),sTe=Iu(2),lTe=Iu(3),zf=Iu(4),uTe=Iu(5),cTe=Iu(6);jx.range;$b.range;sTe.range;lTe.range;zf.range;uTe.range;cTe.range;function Lu(e){return Cn(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/A2)}const Nx=Lu(0),Bb=Lu(1),fTe=Lu(2),dTe=Lu(3),Vf=Lu(4),hTe=Lu(5),pTe=Lu(6);Nx.range;Bb.range;fTe.range;dTe.range;Vf.range;hTe.range;pTe.range;const N2=Cn(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());N2.range;const P2=Cn(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());P2.range;const po=Cn(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());po.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Cn(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});po.range;const mo=Cn(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());mo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Cn(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});mo.range;function BZ(e,t,n,r,i,a){const o=[[Fl,1,Ja],[Fl,5,5*Ja],[Fl,15,15*Ja],[Fl,30,30*Ja],[a,1,ai],[a,5,5*ai],[a,15,15*ai],[a,30,30*ai],[i,1,eo],[i,3,3*eo],[i,6,6*eo],[i,12,12*eo],[r,1,ho],[r,2,2*ho],[n,1,A2],[t,1,HU],[t,3,3*HU],[e,1,WO]];function l(f,d,h){const m=d<f;m&&([f,d]=[d,f]);const g=h&&typeof h.range=="function"?h:u(f,d,h),b=g?g.range(f,+d+1):[];return m?b.reverse():b}function u(f,d,h){const m=Math.abs(d-f)/h,g=g2(([,,y])=>y).right(o,m);if(g===o.length)return e.every(eP(f/WO,d/WO,h));if(g===0)return Lb.every(Math.max(eP(f,d,h),1));const[b,w]=o[m/o[g-1][2]<o[g][2]/m?g-1:g];return b.every(w)}return[l,u]}const[mTe,gTe]=BZ(mo,P2,Nx,$Z,j2,C2),[vTe,yTe]=BZ(po,N2,jx,eg,O2,T2);function KO(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 YO(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 zh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function bTe(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,l=e.months,u=e.shortMonths,f=Vh(i),d=Fh(i),h=Vh(a),m=Fh(a),g=Vh(o),b=Fh(o),w=Vh(l),y=Fh(l),S=Vh(u),E=Fh(u),_={a:z,A:U,b:K,B:Z,c:null,d:ZU,e:ZU,f:VTe,g:QTe,G:eCe,H:BTe,I:qTe,j:zTe,L:qZ,m:FTe,M:UTe,p:H,q:V,Q:e6,s:t6,S:HTe,u:GTe,U:WTe,V:KTe,w:YTe,W:XTe,x:null,X:null,y:ZTe,Y:JTe,Z:tCe,"%":JU},A={a:X,A:Y,b:G,B:Q,c:null,d:QU,e:QU,f:aCe,g:mCe,G:vCe,H:nCe,I:rCe,j:iCe,L:VZ,m:oCe,M:sCe,p:J,q:re,Q:e6,s:t6,S:lCe,u:uCe,U:cCe,V:fCe,w:dCe,W:hCe,x:null,X:null,y:pCe,Y:gCe,Z:yCe,"%":JU},T={a:D,A:I,b:k,B:F,c:$,d:YU,e:YU,f:DTe,g:KU,G:WU,H:XU,I:XU,j:PTe,L:kTe,m:NTe,M:MTe,p:R,q:jTe,Q:LTe,s:$Te,S:RTe,u:ETe,U:ATe,V:TTe,w:_Te,W:CTe,x:q,X:L,y:KU,Y:WU,Z:OTe,"%":ITe};_.x=O(n,_),_.X=O(r,_),_.c=O(t,_),A.x=O(n,A),A.X=O(r,A),A.c=O(t,A);function O(ne,fe){return function(he){var oe=[],ye=-1,be=0,xe=ne.length,Ee,_e,tt;for(he instanceof Date||(he=new Date(+he));++ye<xe;)ne.charCodeAt(ye)===37&&(oe.push(ne.slice(be,ye)),(_e=GU[Ee=ne.charAt(++ye)])!=null?Ee=ne.charAt(++ye):_e=Ee==="e"?" ":"0",(tt=fe[Ee])&&(Ee=tt(he,_e)),oe.push(Ee),be=ye+1);return oe.push(ne.slice(be,ye)),oe.join("")}}function P(ne,fe){return function(he){var oe=zh(1900,void 0,1),ye=M(oe,ne,he+="",0),be,xe;if(ye!=he.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(oe.s*1e3+("L"in oe?oe.L:0));if(fe&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+oe.p*12),oe.m===void 0&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;"w"in oe||(oe.w=1),"Z"in oe?(be=YO(zh(oe.y,0,1)),xe=be.getUTCDay(),be=xe>4||xe===0?Bb.ceil(be):Bb(be),be=Ox.offset(be,(oe.V-1)*7),oe.y=be.getUTCFullYear(),oe.m=be.getUTCMonth(),oe.d=be.getUTCDate()+(oe.w+6)%7):(be=KO(zh(oe.y,0,1)),xe=be.getDay(),be=xe>4||xe===0?$b.ceil(be):$b(be),be=eg.offset(be,(oe.V-1)*7),oe.y=be.getFullYear(),oe.m=be.getMonth(),oe.d=be.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),xe="Z"in oe?YO(zh(oe.y,0,1)).getUTCDay():KO(zh(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+oe.W*7-(xe+5)%7:oe.w+oe.U*7-(xe+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,YO(oe)):KO(oe)}}function M(ne,fe,he,oe){for(var ye=0,be=fe.length,xe=he.length,Ee,_e;ye<be;){if(oe>=xe)return-1;if(Ee=fe.charCodeAt(ye++),Ee===37){if(Ee=fe.charAt(ye++),_e=T[Ee in GU?fe.charAt(ye++):Ee],!_e||(oe=_e(ne,he,oe))<0)return-1}else if(Ee!=he.charCodeAt(oe++))return-1}return oe}function R(ne,fe,he){var oe=f.exec(fe.slice(he));return oe?(ne.p=d.get(oe[0].toLowerCase()),he+oe[0].length):-1}function D(ne,fe,he){var oe=g.exec(fe.slice(he));return oe?(ne.w=b.get(oe[0].toLowerCase()),he+oe[0].length):-1}function I(ne,fe,he){var oe=h.exec(fe.slice(he));return oe?(ne.w=m.get(oe[0].toLowerCase()),he+oe[0].length):-1}function k(ne,fe,he){var oe=S.exec(fe.slice(he));return oe?(ne.m=E.get(oe[0].toLowerCase()),he+oe[0].length):-1}function F(ne,fe,he){var oe=w.exec(fe.slice(he));return oe?(ne.m=y.get(oe[0].toLowerCase()),he+oe[0].length):-1}function $(ne,fe,he){return M(ne,t,fe,he)}function q(ne,fe,he){return M(ne,n,fe,he)}function L(ne,fe,he){return M(ne,r,fe,he)}function z(ne){return o[ne.getDay()]}function U(ne){return a[ne.getDay()]}function K(ne){return u[ne.getMonth()]}function Z(ne){return l[ne.getMonth()]}function H(ne){return i[+(ne.getHours()>=12)]}function V(ne){return 1+~~(ne.getMonth()/3)}function X(ne){return o[ne.getUTCDay()]}function Y(ne){return a[ne.getUTCDay()]}function G(ne){return u[ne.getUTCMonth()]}function Q(ne){return l[ne.getUTCMonth()]}function J(ne){return i[+(ne.getUTCHours()>=12)]}function re(ne){return 1+~~(ne.getUTCMonth()/3)}return{format:function(ne){var fe=O(ne+="",_);return fe.toString=function(){return ne},fe},parse:function(ne){var fe=P(ne+="",!1);return fe.toString=function(){return ne},fe},utcFormat:function(ne){var fe=O(ne+="",A);return fe.toString=function(){return ne},fe},utcParse:function(ne){var fe=P(ne+="",!0);return fe.toString=function(){return ne},fe}}}var GU={"-":"",_:" ",0:"0"},Mn=/^\s*\d+/,xTe=/^%/,wTe=/[\\^$*+?|[\]().{}]/g;function gt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function STe(e){return e.replace(wTe,"\\$&")}function Vh(e){return new RegExp("^(?:"+e.map(STe).join("|")+")","i")}function Fh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function _Te(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function ETe(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function ATe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function TTe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function CTe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function WU(e,t,n){var r=Mn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function KU(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function OTe(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jTe(e,t,n){var r=Mn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function NTe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function YU(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function PTe(e,t,n){var r=Mn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function XU(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function MTe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function RTe(e,t,n){var r=Mn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function kTe(e,t,n){var r=Mn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function DTe(e,t,n){var r=Mn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function ITe(e,t,n){var r=xTe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function LTe(e,t,n){var r=Mn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function $Te(e,t,n){var r=Mn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ZU(e,t){return gt(e.getDate(),t,2)}function BTe(e,t){return gt(e.getHours(),t,2)}function qTe(e,t){return gt(e.getHours()%12||12,t,2)}function zTe(e,t){return gt(1+eg.count(po(e),e),t,3)}function qZ(e,t){return gt(e.getMilliseconds(),t,3)}function VTe(e,t){return qZ(e,t)+"000"}function FTe(e,t){return gt(e.getMonth()+1,t,2)}function UTe(e,t){return gt(e.getMinutes(),t,2)}function HTe(e,t){return gt(e.getSeconds(),t,2)}function GTe(e){var t=e.getDay();return t===0?7:t}function WTe(e,t){return gt(jx.count(po(e)-1,e),t,2)}function zZ(e){var t=e.getDay();return t>=4||t===0?zf(e):zf.ceil(e)}function KTe(e,t){return e=zZ(e),gt(zf.count(po(e),e)+(po(e).getDay()===4),t,2)}function YTe(e){return e.getDay()}function XTe(e,t){return gt($b.count(po(e)-1,e),t,2)}function ZTe(e,t){return gt(e.getFullYear()%100,t,2)}function QTe(e,t){return e=zZ(e),gt(e.getFullYear()%100,t,2)}function JTe(e,t){return gt(e.getFullYear()%1e4,t,4)}function eCe(e,t){var n=e.getDay();return e=n>=4||n===0?zf(e):zf.ceil(e),gt(e.getFullYear()%1e4,t,4)}function tCe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+gt(t/60|0,"0",2)+gt(t%60,"0",2)}function QU(e,t){return gt(e.getUTCDate(),t,2)}function nCe(e,t){return gt(e.getUTCHours(),t,2)}function rCe(e,t){return gt(e.getUTCHours()%12||12,t,2)}function iCe(e,t){return gt(1+Ox.count(mo(e),e),t,3)}function VZ(e,t){return gt(e.getUTCMilliseconds(),t,3)}function aCe(e,t){return VZ(e,t)+"000"}function oCe(e,t){return gt(e.getUTCMonth()+1,t,2)}function sCe(e,t){return gt(e.getUTCMinutes(),t,2)}function lCe(e,t){return gt(e.getUTCSeconds(),t,2)}function uCe(e){var t=e.getUTCDay();return t===0?7:t}function cCe(e,t){return gt(Nx.count(mo(e)-1,e),t,2)}function FZ(e){var t=e.getUTCDay();return t>=4||t===0?Vf(e):Vf.ceil(e)}function fCe(e,t){return e=FZ(e),gt(Vf.count(mo(e),e)+(mo(e).getUTCDay()===4),t,2)}function dCe(e){return e.getUTCDay()}function hCe(e,t){return gt(Bb.count(mo(e)-1,e),t,2)}function pCe(e,t){return gt(e.getUTCFullYear()%100,t,2)}function mCe(e,t){return e=FZ(e),gt(e.getUTCFullYear()%100,t,2)}function gCe(e,t){return gt(e.getUTCFullYear()%1e4,t,4)}function vCe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Vf(e):Vf.ceil(e),gt(e.getUTCFullYear()%1e4,t,4)}function yCe(){return"+0000"}function JU(){return"%"}function e6(e){return+e}function t6(e){return Math.floor(+e/1e3)}var Rc,UZ,HZ;bCe({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 bCe(e){return Rc=bTe(e),UZ=Rc.format,Rc.parse,HZ=Rc.utcFormat,Rc.utcParse,Rc}function xCe(e){return new Date(e)}function wCe(e){return e instanceof Date?+e:+new Date(+e)}function M2(e,t,n,r,i,a,o,l,u,f){var d=y2(),h=d.invert,m=d.domain,g=f(".%L"),b=f(":%S"),w=f("%I:%M"),y=f("%I %p"),S=f("%a %d"),E=f("%b %d"),_=f("%B"),A=f("%Y");function T(O){return(u(O)<O?g:l(O)<O?b:o(O)<O?w:a(O)<O?y:r(O)<O?i(O)<O?S:E:n(O)<O?_:A)(O)}return d.invert=function(O){return new Date(h(O))},d.domain=function(O){return arguments.length?m(Array.from(O,wCe)):m().map(xCe)},d.ticks=function(O){var P=m();return e(P[0],P[P.length-1],O??10)},d.tickFormat=function(O,P){return P==null?T:f(P)},d.nice=function(O){var P=m();return(!O||typeof O.range!="function")&&(O=t(P[0],P[P.length-1],O??10)),O?m(PZ(P,O)):d},d.copy=function(){return Jm(d,M2(e,t,n,r,i,a,o,l,u,f))},d}function SCe(){return gi.apply(M2(vTe,yTe,po,N2,jx,eg,O2,T2,Fl,UZ).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function _Ce(){return gi.apply(M2(mTe,gTe,mo,P2,Nx,Ox,j2,C2,Fl,HZ).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Px(){var e=0,t=1,n,r,i,a,o=rr,l=!1,u;function f(h){return h==null||isNaN(h=+h)?u:o(i===0?.5:(h=(a(h)-n)*i,l?Math.max(0,Math.min(1,h)):h))}f.domain=function(h){return arguments.length?([e,t]=h,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),f):[e,t]},f.clamp=function(h){return arguments.length?(l=!!h,f):l},f.interpolator=function(h){return arguments.length?(o=h,f):o};function d(h){return function(m){var g,b;return arguments.length?([g,b]=m,o=h(g,b),f):[o(0),o(1)]}}return f.range=d(ro),f.rangeRound=d(_R),f.unknown=function(h){return arguments.length?(u=h,f):u},function(h){return a=h,n=h(e),r=h(t),i=n===r?0:1/(r-n),f}}function tl(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function GZ(){var e=el(Px()(rr));return e.copy=function(){return tl(e,GZ())},So.apply(e,arguments)}function WZ(){var e=w2(Px()).domain([1,10]);return e.copy=function(){return tl(e,WZ()).base(e.base())},So.apply(e,arguments)}function KZ(){var e=S2(Px());return e.copy=function(){return tl(e,KZ()).constant(e.constant())},So.apply(e,arguments)}function R2(){var e=_2(Px());return e.copy=function(){return tl(e,R2()).exponent(e.exponent())},So.apply(e,arguments)}function ECe(){return R2.apply(null,arguments).exponent(.5)}function YZ(){var e=[],t=rr;function n(r){if(r!=null&&!isNaN(r=+r))return t((Qm(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort($s),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>kAe(e,a/r))},n.copy=function(){return YZ(t).domain(e)},So.apply(n,arguments)}function Mx(){var e=0,t=.5,n=1,r=1,i,a,o,l,u,f=rr,d,h=!1,m;function g(w){return isNaN(w=+w)?m:(w=.5+((w=+d(w))-a)*(r*w<r*a?l:u),f(h?Math.max(0,Math.min(1,w)):w))}g.domain=function(w){return arguments.length?([e,t,n]=w,i=d(e=+e),a=d(t=+t),o=d(n=+n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,g):[e,t,n]},g.clamp=function(w){return arguments.length?(h=!!w,g):h},g.interpolator=function(w){return arguments.length?(f=w,g):f};function b(w){return function(y){var S,E,_;return arguments.length?([S,E,_]=y,f=kme(w,[S,E,_]),g):[f(0),f(.5),f(1)]}}return g.range=b(ro),g.rangeRound=b(_R),g.unknown=function(w){return arguments.length?(m=w,g):m},function(w){return d=w,i=w(e),a=w(t),o=w(n),l=i===a?0:.5/(a-i),u=a===o?0:.5/(o-a),r=a<i?-1:1,g}}function XZ(){var e=el(Mx()(rr));return e.copy=function(){return tl(e,XZ())},So.apply(e,arguments)}function ZZ(){var e=w2(Mx()).domain([.1,1,10]);return e.copy=function(){return tl(e,ZZ()).base(e.base())},So.apply(e,arguments)}function QZ(){var e=S2(Mx());return e.copy=function(){return tl(e,QZ()).constant(e.constant())},So.apply(e,arguments)}function k2(){var e=_2(Mx());return e.copy=function(){return tl(e,k2()).exponent(e.exponent())},So.apply(e,arguments)}function ACe(){return k2.apply(null,arguments).exponent(.5)}const n6=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Wp,scaleDiverging:XZ,scaleDivergingLog:ZZ,scaleDivergingPow:k2,scaleDivergingSqrt:ACe,scaleDivergingSymlog:QZ,scaleIdentity:NZ,scaleImplicit:tP,scaleLinear:Ib,scaleLog:MZ,scaleOrdinal:v2,scalePoint:up,scalePow:E2,scaleQuantile:DZ,scaleQuantize:IZ,scaleRadial:kZ,scaleSequential:GZ,scaleSequentialLog:WZ,scaleSequentialPow:R2,scaleSequentialQuantile:YZ,scaleSequentialSqrt:ECe,scaleSequentialSymlog:KZ,scaleSqrt:aTe,scaleSymlog:RZ,scaleThreshold:LZ,scaleTime:SCe,scaleUtc:_Ce,tickFormat:jZ},Symbol.toStringTag,{value:"Module"}));var TCe=hX();const Os=yt(TCe);var CCe=yX();const Rx=yt(CCe);var XO,r6;function OCe(){if(r6)return XO;r6=1;var e=yx(),t=t2();function n(r,i){return e(t(r,i),1)}return XO=n,XO}var jCe=OCe();const NCe=yt(jCe);var ZO,i6;function PCe(){if(i6)return ZO;i6=1;var e=QR();function t(n,r){return e(n,r)}return ZO=t,ZO}var MCe=PCe();const Yp=yt(MCe);var Ad=1e9,RCe={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},I2,Wt=!0,ui="[DecimalError] ",lu=ui+"Invalid argument: ",D2=ui+"Exponent out of range: ",Td=Math.floor,Il=Math.pow,kCe=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$r,Nn=1e7,Vt=7,JZ=9007199254740991,qb=Td(JZ/Vt),Oe={};Oe.absoluteValue=Oe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Oe.comparedTo=Oe.cmp=function(e){var t,n,r,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};Oe.decimalPlaces=Oe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Vt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Oe.dividedBy=Oe.div=function(e){return oo(this,new this.constructor(e))};Oe.dividedToIntegerBy=Oe.idiv=function(e){var t=this,n=t.constructor;return kt(oo(t,new n(e),0,1),n.precision)};Oe.equals=Oe.eq=function(e){return!this.cmp(e)};Oe.exponent=function(){return vn(this)};Oe.greaterThan=Oe.gt=function(e){return this.cmp(e)>0};Oe.greaterThanOrEqualTo=Oe.gte=function(e){return this.cmp(e)>=0};Oe.isInteger=Oe.isint=function(){return this.e>this.d.length-2};Oe.isNegative=Oe.isneg=function(){return this.s<0};Oe.isPositive=Oe.ispos=function(){return this.s>0};Oe.isZero=function(){return this.s===0};Oe.lessThan=Oe.lt=function(e){return this.cmp(e)<0};Oe.lessThanOrEqualTo=Oe.lte=function(e){return this.cmp(e)<1};Oe.logarithm=Oe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq($r))throw Error(ui+"NaN");if(n.s<1)throw Error(ui+(n.s?"NaN":"-Infinity"));return n.eq($r)?new r(0):(Wt=!1,t=oo(Xp(n,a),Xp(e,a),a),Wt=!0,kt(t,i))};Oe.minus=Oe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?nQ(t,e):eQ(t,(e.s=-e.s,e))};Oe.modulo=Oe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ui+"NaN");return n.s?(Wt=!1,t=oo(n,e,0,1).times(e),Wt=!0,n.minus(t)):kt(new r(n),i)};Oe.naturalExponential=Oe.exp=function(){return tQ(this)};Oe.naturalLogarithm=Oe.ln=function(){return Xp(this)};Oe.negated=Oe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Oe.plus=Oe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?eQ(t,e):nQ(t,(e.s=-e.s,e))};Oe.precision=Oe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(lu+e);if(t=vn(i)+1,r=i.d.length-1,n=r*Vt+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Oe.squareRoot=Oe.sqrt=function(){var e,t,n,r,i,a,o,l=this,u=l.constructor;if(l.s<1){if(!l.s)return new u(0);throw Error(ui+"NaN")}for(e=vn(l),Wt=!1,i=Math.sqrt(+l),i==0||i==1/0?(t=oa(l.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Td((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=o=n+3;;)if(a=r,r=a.plus(oo(l,a,o+2)).times(.5),oa(a.d).slice(0,o)===(t=oa(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(kt(a,n+1,0),a.times(a).eq(l)){r=a;break}}else if(t!="9999")break;o+=4}return Wt=!0,kt(r,n)};Oe.times=Oe.mul=function(e){var t,n,r,i,a,o,l,u,f,d=this,h=d.constructor,m=d.d,g=(e=new h(e)).d;if(!d.s||!e.s)return new h(0);for(e.s*=d.s,n=d.e+e.e,u=m.length,f=g.length,u<f&&(a=m,m=g,g=a,o=u,u=f,f=o),a=[],o=u+f,r=o;r--;)a.push(0);for(r=f;--r>=0;){for(t=0,i=u+r;i>r;)l=a[i]+g[r]*m[i-r-1]+t,a[i--]=l%Nn|0,t=l/Nn|0;a[i]=(a[i]+t)%Nn|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,Wt?kt(e,h.precision):e};Oe.toDecimalPlaces=Oe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(pa(e,0,Ad),t===void 0?t=r.rounding:pa(t,0,8),kt(n,e+vn(n)+1,t))};Oe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Au(r,!0):(pa(e,0,Ad),t===void 0?t=i.rounding:pa(t,0,8),r=kt(new i(r),e+1,t),n=Au(r,!0,e+1)),n};Oe.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Au(i):(pa(e,0,Ad),t===void 0?t=a.rounding:pa(t,0,8),r=kt(new a(i),e+vn(i)+1,t),n=Au(r.abs(),!1,e+vn(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};Oe.toInteger=Oe.toint=function(){var e=this,t=e.constructor;return kt(new t(e),vn(e)+1,t.rounding)};Oe.toNumber=function(){return+this};Oe.toPower=Oe.pow=function(e){var t,n,r,i,a,o,l=this,u=l.constructor,f=12,d=+(e=new u(e));if(!e.s)return new u($r);if(l=new u(l),!l.s){if(e.s<1)throw Error(ui+"Infinity");return l}if(l.eq($r))return l;if(r=u.precision,e.eq($r))return kt(l,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=l.s,o){if((n=d<0?-d:d)<=JZ){for(i=new u($r),t=Math.ceil(r/Vt+4),Wt=!1;n%2&&(i=i.times(l),o6(i.d,t)),n=Td(n/2),n!==0;)l=l.times(l),o6(l.d,t);return Wt=!0,e.s<0?new u($r).div(i):kt(i,r)}}else if(a<0)throw Error(ui+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,Wt=!1,i=e.times(Xp(l,r+f)),Wt=!0,i=tQ(i),i.s=a,i};Oe.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=vn(i),r=Au(i,n<=a.toExpNeg||n>=a.toExpPos)):(pa(e,1,Ad),t===void 0?t=a.rounding:pa(t,0,8),i=kt(new a(i),e,t),n=vn(i),r=Au(i,e<=n||n<=a.toExpNeg,e)),r};Oe.toSignificantDigits=Oe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(pa(e,1,Ad),t===void 0?t=r.rounding:pa(t,0,8)),kt(new r(n),e,t)};Oe.toString=Oe.valueOf=Oe.val=Oe.toJSON=Oe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=vn(e),n=e.constructor;return Au(e,t<=n.toExpNeg||t>=n.toExpPos)};function eQ(e,t){var n,r,i,a,o,l,u,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Wt?kt(t,h):t;if(u=e.d,f=t.d,o=e.e,i=t.e,u=u.slice(),a=o-i,a){for(a<0?(r=u,a=-a,l=f.length):(r=f,i=o,l=u.length),o=Math.ceil(h/Vt),l=o>l?o+1:l+1,a>l&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(l=u.length,a=f.length,l-a<0&&(a=l,r=f,f=u,u=r),n=0;a;)n=(u[--a]=u[a]+f[a]+n)/Nn|0,u[a]%=Nn;for(n&&(u.unshift(n),++i),l=u.length;u[--l]==0;)u.pop();return t.d=u,t.e=i,Wt?kt(t,h):t}function pa(e,t,n){if(e!==~~e||e<t||e>n)throw Error(lu+e)}function oa(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)r=e[t]+"",n=Vt-r.length,n&&(a+=fs(n)),a+=r;o=e[t],r=o+"",n=Vt-r.length,n&&(a+=fs(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var oo=(function(){function e(r,i){var a,o=0,l=r.length;for(r=r.slice();l--;)a=r[l]*i+o,r[l]=a%Nn|0,o=a/Nn|0;return o&&r.unshift(o),r}function t(r,i,a,o){var l,u;if(a!=o)u=a>o?1:-1;else for(l=u=0;l<a;l++)if(r[l]!=i[l]){u=r[l]>i[l]?1:-1;break}return u}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]<i[a]?1:0,r[a]=o*Nn+r[a]-i[a];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,a,o){var l,u,f,d,h,m,g,b,w,y,S,E,_,A,T,O,P,M,R=r.constructor,D=r.s==i.s?1:-1,I=r.d,k=i.d;if(!r.s)return new R(r);if(!i.s)throw Error(ui+"Division by zero");for(u=r.e-i.e,P=k.length,T=I.length,g=new R(D),b=g.d=[],f=0;k[f]==(I[f]||0);)++f;if(k[f]>(I[f]||0)&&--u,a==null?E=a=R.precision:o?E=a+(vn(r)-vn(i))+1:E=a,E<0)return new R(0);if(E=E/Vt+2|0,f=0,P==1)for(d=0,k=k[0],E++;(f<T||d)&&E--;f++)_=d*Nn+(I[f]||0),b[f]=_/k|0,d=_%k|0;else{for(d=Nn/(k[0]+1)|0,d>1&&(k=e(k,d),I=e(I,d),P=k.length,T=I.length),A=P,w=I.slice(0,P),y=w.length;y<P;)w[y++]=0;M=k.slice(),M.unshift(0),O=k[0],k[1]>=Nn/2&&++O;do d=0,l=t(k,w,P,y),l<0?(S=w[0],P!=y&&(S=S*Nn+(w[1]||0)),d=S/O|0,d>1?(d>=Nn&&(d=Nn-1),h=e(k,d),m=h.length,y=w.length,l=t(h,w,m,y),l==1&&(d--,n(h,P<m?M:k,m))):(d==0&&(l=d=1),h=k.slice()),m=h.length,m<y&&h.unshift(0),n(w,h,y),l==-1&&(y=w.length,l=t(k,w,P,y),l<1&&(d++,n(w,P<y?M:k,y))),y=w.length):l===0&&(d++,w=[0]),b[f++]=d,l&&w[0]?w[y++]=I[A]||0:(w=[I[A]],y=1);while((A++<T||w[0]!==void 0)&&E--)}return b[0]||b.shift(),g.e=u,kt(g,o?a+vn(g)+1:a)}})();function tQ(e,t){var n,r,i,a,o,l,u=0,f=0,d=e.constructor,h=d.precision;if(vn(e)>16)throw Error(D2+vn(e));if(!e.s)return new d($r);for(Wt=!1,l=h,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),f+=5;for(r=Math.log(Il(2,f))/Math.LN10*2+5|0,l+=r,n=i=a=new d($r),d.precision=l;;){if(i=kt(i.times(e),l),n=n.times(++u),o=a.plus(oo(i,n,l)),oa(o.d).slice(0,l)===oa(a.d).slice(0,l)){for(;f--;)a=kt(a.times(a),l);return d.precision=h,t==null?(Wt=!0,kt(a,h)):a}a=o}}function vn(e){for(var t=e.e*Vt,n=e.d[0];n>=10;n/=10)t++;return t}function QO(e,t,n){if(t>e.LN10.sd())throw Wt=!0,n&&(e.precision=n),Error(ui+"LN10 precision limit exceeded");return kt(new e(e.LN10),t)}function fs(e){for(var t="";e--;)t+="0";return t}function Xp(e,t){var n,r,i,a,o,l,u,f,d,h=1,m=10,g=e,b=g.d,w=g.constructor,y=w.precision;if(g.s<1)throw Error(ui+(g.s?"NaN":"-Infinity"));if(g.eq($r))return new w(0);if(t==null?(Wt=!1,f=y):f=t,g.eq(10))return t==null&&(Wt=!0),QO(w,f);if(f+=m,w.precision=f,n=oa(b),r=n.charAt(0),a=vn(g),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=oa(g.d),r=n.charAt(0),h++;a=vn(g),r>1?(g=new w("0."+n),a++):g=new w(r+"."+n.slice(1))}else return u=QO(w,f+2,y).times(a+""),g=Xp(new w(r+"."+n.slice(1)),f-m).plus(u),w.precision=y,t==null?(Wt=!0,kt(g,y)):g;for(l=o=g=oo(g.minus($r),g.plus($r),f),d=kt(g.times(g),f),i=3;;){if(o=kt(o.times(d),f),u=l.plus(oo(o,new w(i),f)),oa(u.d).slice(0,f)===oa(l.d).slice(0,f))return l=l.times(2),a!==0&&(l=l.plus(QO(w,f+2,y).times(a+""))),l=oo(l,new w(h),f),w.precision=y,t==null?(Wt=!0,kt(l,y)):l;l=u,i+=2}}function a6(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Td(n/Vt),e.d=[],r=(n+1)%Vt,n<0&&(r+=Vt),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=Vt;r<i;)e.d.push(+t.slice(r,r+=Vt));t=t.slice(r),r=Vt-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),Wt&&(e.e>qb||e.e<-qb))throw Error(D2+n)}else e.s=0,e.e=0,e.d=[0];return e}function kt(e,t,n){var r,i,a,o,l,u,f,d,h=e.d;for(o=1,a=h[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Vt,i=t,f=h[d=0];else{if(d=Math.ceil((r+1)/Vt),a=h.length,d>=a)return e;for(f=a=h[d],o=1;a>=10;a/=10)o++;r%=Vt,i=r-Vt+o}if(n!==void 0&&(a=Il(10,o-i-1),l=f/a%10|0,u=t<0||h[d+1]!==void 0||f%a,u=n<4?(l||u)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||u||n==6&&(r>0?i>0?f/Il(10,o-i):0:h[d-1])%10&1||n==(e.s<0?8:7))),t<1||!h[0])return u?(a=vn(e),h.length=1,t=t-a-1,h[0]=Il(10,(Vt-t%Vt)%Vt),e.e=Td(-t/Vt)||0):(h.length=1,h[0]=e.e=e.s=0),e;if(r==0?(h.length=d,a=1,d--):(h.length=d+1,a=Il(10,Vt-r),h[d]=i>0?(f/Il(10,o-i)%Il(10,i)|0)*a:0),u)for(;;)if(d==0){(h[0]+=a)==Nn&&(h[0]=1,++e.e);break}else{if(h[d]+=a,h[d]!=Nn)break;h[d--]=0,a=1}for(r=h.length;h[--r]===0;)h.pop();if(Wt&&(e.e>qb||e.e<-qb))throw Error(D2+vn(e));return e}function nQ(e,t){var n,r,i,a,o,l,u,f,d,h,m=e.constructor,g=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),Wt?kt(t,g):t;if(u=e.d,h=t.d,r=t.e,f=e.e,u=u.slice(),o=f-r,o){for(d=o<0,d?(n=u,o=-o,l=h.length):(n=h,r=f,l=u.length),i=Math.max(Math.ceil(g/Vt),l)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=u.length,l=h.length,d=i<l,d&&(l=i),i=0;i<l;i++)if(u[i]!=h[i]){d=u[i]<h[i];break}o=0}for(d&&(n=u,u=h,h=n,t.s=-t.s),l=u.length,i=h.length-l;i>0;--i)u[l++]=0;for(i=h.length;i>o;){if(u[--i]<h[i]){for(a=i;a&&u[--a]===0;)u[a]=Nn-1;--u[a],u[i]+=Nn}u[i]-=h[i]}for(;u[--l]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=r,Wt?kt(t,g):t):new m(0)}function Au(e,t,n){var r,i=vn(e),a=oa(e.d),o=a.length;return t?(n&&(r=n-o)>0?a=a.charAt(0)+"."+a.slice(1)+fs(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+fs(-i-1)+a,n&&(r=n-o)>0&&(a+=fs(r))):i>=o?(a+=fs(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+fs(r))):((r=i+1)<o&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-o)>0&&(i+1===o&&(a+="."),a+=fs(r))),e.s<0?"-"+a:a}function o6(e,t){if(e.length>t)return e.length=t,!0}function rQ(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(lu+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return a6(o,a.toString())}else if(typeof a!="string")throw Error(lu+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,kCe.test(a))a6(o,a);else throw Error(lu+a)}if(i.prototype=Oe,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=rQ,i.config=i.set=DCe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function DCe(e){if(!e||typeof e!="object")throw Error(ui+"Object expected");var t,n,r,i=["precision",1,Ad,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Td(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(lu+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(lu+n+": "+r);return this}var I2=rQ(RCe);$r=new I2(1);const Nt=I2;function ICe(e){return qCe(e)||BCe(e)||$Ce(e)||LCe()}function LCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
397
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Ce(e,t){if(e){if(typeof e=="string")return rP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rP(e,t)}}function BCe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function qCe(e){if(Array.isArray(e))return rP(e)}function rP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zCe=function(t){return t},iQ={},aQ=function(t){return t===iQ},s6=function(t){return function n(){return arguments.length===0||arguments.length===1&&aQ(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},VCe=function e(t,n){return t===1?n:s6(function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=i.filter(function(l){return l!==iQ}).length;return o>=t?n.apply(void 0,i):e(t-o,s6(function(){for(var l=arguments.length,u=new Array(l),f=0;f<l;f++)u[f]=arguments[f];var d=i.map(function(h){return aQ(h)?u.shift():h});return n.apply(void 0,ICe(d).concat(u))}))})},kx=function(t){return VCe(t.length,t)},iP=function(t,n){for(var r=[],i=t;i<n;++i)r[i-t]=i;return r},FCe=kx(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),UCe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return zCe;var i=n.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce(function(l,u){return u(l)},a.apply(void 0,arguments))}},aP=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},oQ=function(t){var n=null,r=null;return function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];return n&&a.every(function(l,u){return l===n[u]})||(n=a,r=t.apply(void 0,a)),r}};function HCe(e){var t;return e===0?t=1:t=Math.floor(new Nt(e).abs().log(10).toNumber())+1,t}function GCe(e,t,n){for(var r=new Nt(e),i=0,a=[];r.lt(t)&&i<1e5;)a.push(r.toNumber()),r=r.add(n),i++;return a}var WCe=kx(function(e,t,n){var r=+e,i=+t;return r+n*(i-r)}),KCe=kx(function(e,t,n){var r=t-+e;return r=r||1/0,(n-e)/r}),YCe=kx(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const Dx={rangeStep:GCe,getDigitCount:HCe,interpolateNumber:WCe,uninterpolateNumber:KCe,uninterpolateTruncation:YCe};function oP(e){return QCe(e)||ZCe(e)||sQ(e)||XCe()}function XCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
398
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZCe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function QCe(e){if(Array.isArray(e))return sP(e)}function Zp(e,t){return tOe(e)||eOe(e,t)||sQ(e,t)||JCe()}function JCe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
399
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sQ(e,t){if(e){if(typeof e=="string")return sP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sP(e,t)}}function sP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eOe(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),l;!(r=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,a=u}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function tOe(e){if(Array.isArray(e))return e}function lQ(e){var t=Zp(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function uQ(e,t,n){if(e.lte(0))return new Nt(0);var r=Dx.getDigitCount(e.toNumber()),i=new Nt(10).pow(r),a=e.div(i),o=r!==1?.05:.1,l=new Nt(Math.ceil(a.div(o).toNumber())).add(n).mul(o),u=l.mul(i);return t?u:new Nt(Math.ceil(u))}function nOe(e,t,n){var r=1,i=new Nt(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Nt(10).pow(Dx.getDigitCount(e)-1),i=new Nt(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Nt(Math.floor(e)))}else e===0?i=new Nt(Math.floor((t-1)/2)):n||(i=new Nt(Math.floor(e)));var o=Math.floor((t-1)/2),l=UCe(FCe(function(u){return i.add(new Nt(u-o).mul(r)).toNumber()}),iP);return l(0,t)}function cQ(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Nt(0),tickMin:new Nt(0),tickMax:new Nt(0)};var a=uQ(new Nt(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Nt(0):(o=new Nt(e).add(t).div(2),o=o.sub(new Nt(o).mod(a)));var l=Math.ceil(o.sub(e).div(a).toNumber()),u=Math.ceil(new Nt(t).sub(o).div(a).toNumber()),f=l+u+1;return f>n?cQ(e,t,n,r,i+1):(f<n&&(u=t>0?u+(n-f):u,l=t>0?l:l+(n-f)),{step:a,tickMin:o.sub(new Nt(l).mul(a)),tickMax:o.add(new Nt(u).mul(a))})}function rOe(e){var t=Zp(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),l=lQ([n,r]),u=Zp(l,2),f=u[0],d=u[1];if(f===-1/0||d===1/0){var h=d===1/0?[f].concat(oP(iP(0,i-1).map(function(){return 1/0}))):[].concat(oP(iP(0,i-1).map(function(){return-1/0})),[d]);return n>r?aP(h):h}if(f===d)return nOe(f,i,a);var m=cQ(f,d,o,a),g=m.step,b=m.tickMin,w=m.tickMax,y=Dx.rangeStep(b,w.add(new Nt(.1).mul(g)),g);return n>r?aP(y):y}function iOe(e,t){var n=Zp(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=lQ([r,i]),l=Zp(o,2),u=l[0],f=l[1];if(u===-1/0||f===1/0)return[r,i];if(u===f)return[u];var d=Math.max(t,2),h=uQ(new Nt(f).sub(u).div(d-1),a,0),m=[].concat(oP(Dx.rangeStep(new Nt(u),new Nt(f).sub(new Nt(.99).mul(h)),h)),[f]);return r>i?aP(m):m}var aOe=oQ(rOe),oOe=oQ(iOe),sOe="Invariant failed";function Tu(e,t){throw new Error(sOe)}var lOe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];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 zb(){return zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zb.apply(this,arguments)}function uOe(e,t){return hOe(e)||dOe(e,t)||fOe(e,t)||cOe()}function cOe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
400
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fOe(e,t){if(e){if(typeof e=="string")return l6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l6(e,t)}}function l6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dOe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function hOe(e){if(Array.isArray(e))return e}function pOe(e,t){if(e==null)return{};var n=mOe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gOe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vOe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,hQ(r.key),r)}}function yOe(e,t,n){return t&&vOe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function bOe(e,t,n){return t=Vb(t),xOe(e,fQ()?Reflect.construct(t,n||[],Vb(e).constructor):t.apply(e,n))}function xOe(e,t){if(t&&(Ff(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wOe(e)}function wOe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(fQ=function(){return!!e})()}function Vb(e){return Vb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vb(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&&lP(e,t)}function lP(e,t){return lP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},lP(e,t)}function dQ(e,t,n){return t=hQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hQ(e){var t=_Oe(e,"string");return Ff(t)=="symbol"?t:t+""}function _Oe(e,t){if(Ff(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ff(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ix=(function(e){function t(){return gOe(this,t),bOe(this,t,arguments)}return SOe(t,e),yOe(t,[{key:"render",value:function(){var r=this.props,i=r.offset,a=r.layout,o=r.width,l=r.dataKey,u=r.data,f=r.dataPointFormatter,d=r.xAxis,h=r.yAxis,m=pOe(r,lOe),g=et(m,!1);this.props.direction==="x"&&d.type!=="number"&&Tu();var b=u.map(function(w){var y=f(w,l),S=y.x,E=y.y,_=y.value,A=y.errorVal;if(!A)return null;var T=[],O,P;if(Array.isArray(A)){var M=uOe(A,2);O=M[0],P=M[1]}else O=P=A;if(a==="vertical"){var R=d.scale,D=E+i,I=D+o,k=D-o,F=R(_-O),$=R(_+P);T.push({x1:$,y1:I,x2:$,y2:k}),T.push({x1:F,y1:D,x2:$,y2:D}),T.push({x1:F,y1:I,x2:F,y2:k})}else if(a==="horizontal"){var q=h.scale,L=S+i,z=L-o,U=L+o,K=q(_-O),Z=q(_+P);T.push({x1:z,y1:Z,x2:U,y2:Z}),T.push({x1:L,y1:K,x2:L,y2:Z}),T.push({x1:z,y1:K,x2:U,y2:K})}return ie.createElement(Jt,zb({className:"recharts-errorBar",key:"bar-".concat(T.map(function(H){return"".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))},g),T.map(function(H){return ie.createElement("line",zb({},H,{key:"line-".concat(H.x1,"-").concat(H.x2,"-").concat(H.y1,"-").concat(H.y2)}))}))});return ie.createElement(Jt,{className:"recharts-errorBars"},b)}}])})(ie.Component);dQ(Ix,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});dQ(Ix,"displayName","ErrorBar");function Qp(e){"@babel/helpers - typeof";return Qp=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},Qp(e)}function u6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u6(Object(n),!0).forEach(function(r){EOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function EOe(e,t,n){return t=AOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function AOe(e){var t=TOe(e,"string");return Qp(t)=="symbol"?t:t+""}function TOe(e,t){if(Qp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var pQ=function(t){var n=t.children,r=t.formattedGraphicalItems,i=t.legendWidth,a=t.legendContent,o=kr(n,Ls);if(!o)return null;var l=Ls.defaultProps,u=l!==void 0?Nl(Nl({},l),o.props):{},f;return o.props&&o.props.payload?f=o.props&&o.props.payload:a==="children"?f=(r||[]).reduce(function(d,h){var m=h.item,g=h.props,b=g.sectors||g.data||[];return d.concat(b.map(function(w){return{type:o.props.iconType||m.props.legendType,value:w.name,color:w.fill,payload:w}}))},[]):f=(r||[]).map(function(d){var h=d.item,m=h.type.defaultProps,g=m!==void 0?Nl(Nl({},m),h.props):{},b=g.dataKey,w=g.name,y=g.legendType,S=g.hide;return{inactive:S,dataKey:b,type:u.iconType||y||"square",color:L2(h),value:w||b,payload:g}}),Nl(Nl(Nl({},u),Ls.getWithHeight(o,i)),{},{payload:f,item:o})};function Jp(e){"@babel/helpers - typeof";return Jp=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},Jp(e)}function c6(e){return NOe(e)||jOe(e)||OOe(e)||COe()}function COe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
401
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OOe(e,t){if(e){if(typeof e=="string")return uP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uP(e,t)}}function jOe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function NOe(e){if(Array.isArray(e))return uP(e)}function uP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f6(Object(n),!0).forEach(function(r){tf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tf(e,t,n){return t=POe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function POe(e){var t=MOe(e,"string");return Jp(t)=="symbol"?t:t+""}function MOe(e,t){if(Jp(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jp(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Fr(e,t,n){return ot(e)||ot(t)?n:Tn(t)?si(e,t,n):Xe(t)?t(e):n}function cp(e,t,n,r){var i=NCe(e,function(l){return Fr(l,t)});if(n==="number"){var a=i.filter(function(l){return Se(l)||parseFloat(l)});return a.length?[Rx(a),Os(a)]:[1/0,-1/0]}var o=r?i.filter(function(l){return!ot(l)}):i;return o.map(function(l){return Tn(l)||l instanceof Date?l:""})}var ROe=function(t){var n,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var u=a.range,f=0;f<l;f++){var d=f>0?i[f-1].coordinate:i[l-1].coordinate,h=i[f].coordinate,m=f>=l-1?i[0].coordinate:i[f+1].coordinate,g=void 0;if(Ri(h-d)!==Ri(m-h)){var b=[];if(Ri(m-h)===Ri(u[1]-u[0])){g=m;var w=h+u[1]-u[0];b[0]=Math.min(w,(w+d)/2),b[1]=Math.max(w,(w+d)/2)}else{g=d;var y=m+u[1]-u[0];b[0]=Math.min(h,(y+h)/2),b[1]=Math.max(h,(y+h)/2)}var S=[Math.min(h,(g+h)/2),Math.max(h,(g+h)/2)];if(t>S[0]&&t<=S[1]||t>=b[0]&&t<=b[1]){o=i[f].index;break}}else{var E=Math.min(d,m),_=Math.max(d,m);if(t>(E+h)/2&&t<=(_+h)/2){o=i[f].index;break}}}else for(var A=0;A<l;A++)if(A===0&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A>0&&A<l-1&&t>(r[A].coordinate+r[A-1].coordinate)/2&&t<=(r[A].coordinate+r[A+1].coordinate)/2||A===l-1&&t>(r[A].coordinate+r[A-1].coordinate)/2){o=r[A].index;break}return o},L2=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,o=a.stroke,l=a.fill,u;switch(i){case"Line":u=o;break;case"Area":case"Radar":u=o&&o!=="none"?o:l;break;default:u=l;break}return u},kOe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},l=Object.keys(a),u=0,f=l.length;u<f;u++)for(var d=a[l[u]].stackGroups,h=Object.keys(d),m=0,g=h.length;m<g;m++){var b=d[h[m]],w=b.items,y=b.cateAxisId,S=w.filter(function(P){return io(P.type).indexOf("Bar")>=0});if(S&&S.length){var E=S[0].type.defaultProps,_=E!==void 0?an(an({},E),S[0].props):S[0].props,A=_.barSize,T=_[y];o[T]||(o[T]=[]);var O=ot(A)?n:A;o[T].push({item:S[0],stackList:S.slice(1),barSize:ot(O)?void 0:Eu(O,r,0)})}}return o},DOe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,l=t.maxBarSize,u=o.length;if(u<1)return null;var f=Eu(n,i,0,!0),d,h=[];if(o[0].barSize===+o[0].barSize){var m=!1,g=i/u,b=o.reduce(function(A,T){return A+T.barSize||0},0);b+=(u-1)*f,b>=i&&(b-=(u-1)*f,f=0),b>=i&&g>0&&(m=!0,g*=.9,b=u*g);var w=(i-b)/2>>0,y={offset:w-f,size:0};d=o.reduce(function(A,T){var O={item:T.item,position:{offset:y.offset+y.size+f,size:m?g:T.barSize}},P=[].concat(c6(A),[O]);return y=P[P.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(M){P.push({item:M,position:y})}),P},h)}else{var S=Eu(r,i,0,!0);i-2*S-(u-1)*f<=0&&(f=0);var E=(i-2*S-(u-1)*f)/u;E>1&&(E>>=0);var _=l===+l?Math.min(E,l):E;d=o.reduce(function(A,T,O){var P=[].concat(c6(A),[{item:T.item,position:{offset:S+(E+f)*O+(E-_)/2,size:_}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(M){P.push({item:M,position:P[P.length-1].position})}),P},h)}return d},IOe=function(t,n,r,i){var a=r.children,o=r.width,l=r.margin,u=o-(l.left||0)-(l.right||0),f=pQ({children:a,legendWidth:u});if(f){var d=i||{},h=d.width,m=d.height,g=f.align,b=f.verticalAlign,w=f.layout;if((w==="vertical"||w==="horizontal"&&b==="middle")&&g!=="center"&&Se(t[g]))return an(an({},t),{},tf({},g,t[g]+(h||0)));if((w==="horizontal"||w==="vertical"&&g==="center")&&b!=="middle"&&Se(t[b]))return an(an({},t),{},tf({},b,t[b]+(m||0)))}return t},LOe=function(t,n,r){return ot(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},mQ=function(t,n,r,i,a){var o=n.props.children,l=Ii(o,Ix).filter(function(f){return LOe(i,a,f.props.direction)});if(l&&l.length){var u=l.map(function(f){return f.props.dataKey});return t.reduce(function(f,d){var h=Fr(d,r);if(ot(h))return f;var m=Array.isArray(h)?[Rx(h),Os(h)]:[h,h],g=u.reduce(function(b,w){var y=Fr(d,w,0),S=m[0]-Math.abs(Array.isArray(y)?y[0]:y),E=m[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(S,b[0]),Math.max(E,b[1])]},[1/0,-1/0]);return[Math.min(g[0],f[0]),Math.max(g[1],f[1])]},[1/0,-1/0])}return null},$Oe=function(t,n,r,i,a){var o=n.map(function(l){return mQ(t,l,r,a,i)}).filter(function(l){return!ot(l)});return o&&o.length?o.reduce(function(l,u){return[Math.min(l[0],u[0]),Math.max(l[1],u[1])]},[1/0,-1/0]):null},gQ=function(t,n,r,i,a){var o=n.map(function(u){var f=u.props.dataKey;return r==="number"&&f&&mQ(t,u,f,i)||cp(t,f,r,a)});if(r==="number")return o.reduce(function(u,f){return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);var l={};return o.reduce(function(u,f){for(var d=0,h=f.length;d<h;d++)l[f[d]]||(l[f[d]]=!0,u.push(f[d]));return u},[])},vQ=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},yQ=function(t,n,r,i){if(i)return t.map(function(u){return u.coordinate});var a,o,l=t.map(function(u){return u.coordinate===n&&(a=!0),u.coordinate===r&&(o=!0),u.coordinate});return a||l.push(n),o||l.push(r),l},to=function(t,n,r){if(!t)return null;var i=t.scale,a=t.duplicateDomain,o=t.type,l=t.range,u=t.realScaleType==="scaleBand"?i.bandwidth()/2:2,f=(n||r)&&o==="category"&&i.bandwidth?i.bandwidth()/u:0;if(f=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?Ri(l[0]-l[1])*2*f:f,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(h){var m=a?a.indexOf(h):h;return{coordinate:i(m)+f,value:h,offset:f}});return d.filter(function(h){return!_d(h.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(h,m){return{coordinate:i(h)+f,value:h,index:m,offset:f}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(h){return{coordinate:i(h)+f,value:h,offset:f}}):i.domain().map(function(h,m){return{coordinate:i(h)+f,value:a?a[h]:h,index:m,offset:f}})},JO=new WeakMap,ey=function(t,n){if(typeof n!="function")return t;JO.has(t)||JO.set(t,new WeakMap);var r=JO.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},BOe=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,l=t.axisType;if(i==="auto")return o==="radial"&&l==="radiusAxis"?{scale:Wp(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:Ib(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:up(),realScaleType:"point"}:a==="category"?{scale:Wp(),realScaleType:"band"}:{scale:Ib(),realScaleType:"linear"};if(_u(i)){var u="scale".concat(Sx(i));return{scale:(n6[u]||up)(),realScaleType:n6[u]?u:"point"}}return Xe(i)?{scale:i}:{scale:up(),realScaleType:"point"}},d6=1e-4,qOe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-d6,o=Math.max(i[0],i[1])+d6,l=t(n[0]),u=t(n[r-1]);(l<a||l>o||u<a||u>o)&&t.domain([n[0],n[r-1]])}},zOe=function(t,n){if(!t)return null;for(var r=0,i=t.length;r<i;r++)if(t[r].item===n)return t[r].position;return null},VOe=function(t,n){if(!n||n.length!==2||!Se(n[0])||!Se(n[1]))return t;var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]),a=[t[0],t[1]];return(!Se(t[0])||t[0]<r)&&(a[0]=r),(!Se(t[1])||t[1]>i)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]<r&&(a[1]=r),a},FOe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0,l=0;l<n;++l){var u=_d(t[l][r][1])?t[l][r][0]:t[l][r][1];u>=0?(t[l][r][0]=a,t[l][r][1]=a+u,a=t[l][r][1]):(t[l][r][0]=o,t[l][r][1]=o+u,o=t[l][r][1])}},UOe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r<i;++r)for(var a=0,o=0;o<n;++o){var l=_d(t[o][r][1])?t[o][r][0]:t[o][r][1];l>=0?(t[o][r][0]=a,t[o][r][1]=a+l,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},HOe={sign:FOe,expand:m_e,none:Df,silhouette:g_e,wiggle:v_e,positive:UOe},GOe=function(t,n,r){var i=n.map(function(l){return l.props.dataKey}),a=HOe[r],o=p_e().keys(i).value(function(l,u){return+Fr(l,u,0)}).order(zN).offset(a);return o(t)},WOe=function(t,n,r,i,a,o){if(!t)return null;var l=o?n.reverse():n,u={},f=l.reduce(function(h,m){var g,b=(g=m.type)!==null&&g!==void 0&&g.defaultProps?an(an({},m.type.defaultProps),m.props):m.props,w=b.stackId,y=b.hide;if(y)return h;var S=b[r],E=h[S]||{hasStack:!1,stackGroups:{}};if(Tn(w)){var _=E.stackGroups[w]||{numericAxisId:r,cateAxisId:i,items:[]};_.items.push(m),E.hasStack=!0,E.stackGroups[w]=_}else E.stackGroups[Zm("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[m]};return an(an({},h),{},tf({},S,E))},u),d={};return Object.keys(f).reduce(function(h,m){var g=f[m];if(g.hasStack){var b={};g.stackGroups=Object.keys(g.stackGroups).reduce(function(w,y){var S=g.stackGroups[y];return an(an({},w),{},tf({},y,{numericAxisId:r,cateAxisId:i,items:S.items,stackedData:GOe(t,S.items,a)}))},b)}return an(an({},h),{},tf({},m,g))},d)},KOe=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,l=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var f=t.domain();if(!f.length)return null;var d=aOe(f,a,l);return t.domain([Rx(d),Os(d)]),{niceTicks:d}}if(a&&i==="number"){var h=t.domain(),m=oOe(h,a,l);return{niceTicks:m}}return null};function h6(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ot(i[t.dataKey])){var l=yb(n,"value",i[t.dataKey]);if(l)return l.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var u=Fr(i,ot(o)?t.dataKey:o);return ot(u)?null:t.scale(u)}var p6=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return r[l]?r[l].coordinate+i:null;var u=Fr(o,n.dataKey,n.domain[l]);return ot(u)?null:n.scale(u)-a/2+i},YOe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},XOe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Tn(a)){var o=n[a];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},ZOe=function(t){return t.reduce(function(n,r){return[Rx(r.concat([n[0]]).filter(Se)),Os(r.concat([n[1]]).filter(Se))]},[1/0,-1/0])},bQ=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],l=o.stackedData,u=l.reduce(function(f,d){var h=ZOe(d.slice(n,r+1));return[Math.min(f[0],h[0]),Math.max(f[1],h[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},m6=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,g6=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,cP=function(t,n,r){if(Xe(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(Se(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(m6.test(t[0])){var a=+m6.exec(t[0])[1];i[0]=n[0]-a}else Xe(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(Se(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(g6.test(t[1])){var o=+g6.exec(t[1])[1];i[1]=n[1]+o}else Xe(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Fb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=p2(n,function(h){return h.coordinate}),o=1/0,l=1,u=a.length;l<u;l++){var f=a[l],d=a[l-1];o=Math.min((f.coordinate||0)-(d.coordinate||0),o)}return o===1/0?0:o}return r?void 0:0},v6=function(t,n,r){return!t||!t.length||Yp(t,si(r,"type.defaultProps.domain"))?n:t},xQ=function(t,n){var r=t.type.defaultProps?an(an({},t.type.defaultProps),t.props):t.props,i=r.dataKey,a=r.name,o=r.unit,l=r.formatter,u=r.tooltipType,f=r.chartType,d=r.hide;return an(an({},et(t,!1)),{},{dataKey:i,unit:o,formatter:l,name:a||i,color:L2(t),value:Fr(n,i),type:u,payload:n,chartType:f,hide:d})};function em(e){"@babel/helpers - typeof";return em=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},em(e)}function y6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function b6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?y6(Object(n),!0).forEach(function(r){QOe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QOe(e,t,n){return t=JOe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JOe(e){var t=eje(e,"string");return em(t)=="symbol"?t:t+""}function eje(e,t){if(em(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(em(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ub=Math.PI/180,tje=function(t){return t*180/Math.PI},Bn=function(t,n,r,i){return{x:t+Math.cos(-Ub*i)*r,y:n+Math.sin(-Ub*i)*r}},nje=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return Math.sqrt(Math.pow(r-a,2)+Math.pow(i-o,2))},rje=function(t,n){var r=t.x,i=t.y,a=n.cx,o=n.cy,l=nje({x:r,y:i},{x:a,y:o});if(l<=0)return{radius:l};var u=(r-a)/l,f=Math.acos(u);return i>o&&(f=2*Math.PI-f),{radius:l,angle:tje(f),angleInRadian:f}},ije=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},aje=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),l=Math.min(a,o);return t+l*360},x6=function(t,n){var r=t.x,i=t.y,a=rje({x:r,y:i},n),o=a.radius,l=a.angle,u=n.innerRadius,f=n.outerRadius;if(o<u||o>f)return!1;if(o===0)return!0;var d=ije(n),h=d.startAngle,m=d.endAngle,g=l,b;if(h<=m){for(;g>m;)g-=360;for(;g<h;)g+=360;b=g>=h&&g<=m}else{for(;g>h;)g-=360;for(;g<m;)g+=360;b=g>=m&&g<=h}return b?b6(b6({},n),{},{radius:o,angle:aje(g,n)}):null};function tm(e){"@babel/helpers - typeof";return tm=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},tm(e)}var oje=["offset"];function sje(e){return fje(e)||cje(e)||uje(e)||lje()}function lje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
402
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uje(e,t){if(e){if(typeof e=="string")return fP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fP(e,t)}}function cje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fje(e){if(Array.isArray(e))return fP(e)}function fP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dje(e,t){if(e==null)return{};var n=hje(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function w6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w6(Object(n),!0).forEach(function(r){pje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pje(e,t,n){return t=mje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mje(e){var t=gje(e,"string");return tm(t)=="symbol"?t:t+""}function gje(e,t){if(tm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(tm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nm(){return nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},nm.apply(this,arguments)}var vje=function(t){var n=t.value,r=t.formatter,i=ot(t.children)?n:t.children;return Xe(r)?r(i):i},yje=function(t,n){var r=Ri(n-t),i=Math.min(Math.abs(n-t),360);return r*i},bje=function(t,n,r){var i=t.position,a=t.viewBox,o=t.offset,l=t.className,u=a,f=u.cx,d=u.cy,h=u.innerRadius,m=u.outerRadius,g=u.startAngle,b=u.endAngle,w=u.clockWise,y=(h+m)/2,S=yje(g,b),E=S>=0?1:-1,_,A;i==="insideStart"?(_=g+E*o,A=w):i==="insideEnd"?(_=b-E*o,A=!w):i==="end"&&(_=b+E*o,A=w),A=S<=0?A:!A;var T=Bn(f,d,y,_),O=Bn(f,d,y,_+(A?1:-1)*359),P="M".concat(T.x,",").concat(T.y,`
|
|
403
|
+
A`).concat(y,",").concat(y,",0,1,").concat(A?0:1,`,
|
|
404
|
+
`).concat(O.x,",").concat(O.y),M=ot(t.id)?Zm("recharts-radial-line-"):t.id;return ie.createElement("text",nm({},r,{dominantBaseline:"central",className:ut("recharts-radial-bar-label",l)}),ie.createElement("defs",null,ie.createElement("path",{id:M,d:P})),ie.createElement("textPath",{xlinkHref:"#".concat(M)},n))},xje=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,l=a.cy,u=a.innerRadius,f=a.outerRadius,d=a.startAngle,h=a.endAngle,m=(d+h)/2;if(i==="outside"){var g=Bn(o,l,f+r,m),b=g.x,w=g.y;return{x:b,y:w,textAnchor:b>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var y=(u+f)/2,S=Bn(o,l,y,m),E=S.x,_=S.y;return{x:E,y:_,textAnchor:"middle",verticalAnchor:"middle"}},wje=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,l=o.x,u=o.y,f=o.width,d=o.height,h=d>=0?1:-1,m=h*i,g=h>0?"end":"start",b=h>0?"start":"end",w=f>=0?1:-1,y=w*i,S=w>0?"end":"start",E=w>0?"start":"end";if(a==="top"){var _={x:l+f/2,y:u-h*i,textAnchor:"middle",verticalAnchor:g};return _n(_n({},_),r?{height:Math.max(u-r.y,0),width:f}:{})}if(a==="bottom"){var A={x:l+f/2,y:u+d+m,textAnchor:"middle",verticalAnchor:b};return _n(_n({},A),r?{height:Math.max(r.y+r.height-(u+d),0),width:f}:{})}if(a==="left"){var T={x:l-y,y:u+d/2,textAnchor:S,verticalAnchor:"middle"};return _n(_n({},T),r?{width:Math.max(T.x-r.x,0),height:d}:{})}if(a==="right"){var O={x:l+f+y,y:u+d/2,textAnchor:E,verticalAnchor:"middle"};return _n(_n({},O),r?{width:Math.max(r.x+r.width-O.x,0),height:d}:{})}var P=r?{width:f,height:d}:{};return a==="insideLeft"?_n({x:l+y,y:u+d/2,textAnchor:E,verticalAnchor:"middle"},P):a==="insideRight"?_n({x:l+f-y,y:u+d/2,textAnchor:S,verticalAnchor:"middle"},P):a==="insideTop"?_n({x:l+f/2,y:u+m,textAnchor:"middle",verticalAnchor:b},P):a==="insideBottom"?_n({x:l+f/2,y:u+d-m,textAnchor:"middle",verticalAnchor:g},P):a==="insideTopLeft"?_n({x:l+y,y:u+m,textAnchor:E,verticalAnchor:b},P):a==="insideTopRight"?_n({x:l+f-y,y:u+m,textAnchor:S,verticalAnchor:b},P):a==="insideBottomLeft"?_n({x:l+y,y:u+d-m,textAnchor:E,verticalAnchor:g},P):a==="insideBottomRight"?_n({x:l+f-y,y:u+d-m,textAnchor:S,verticalAnchor:g},P):Sd(a)&&(Se(a.x)||Vl(a.x))&&(Se(a.y)||Vl(a.y))?_n({x:l+Eu(a.x,f),y:u+Eu(a.y,d),textAnchor:"end",verticalAnchor:"end"},P):_n({x:l+f/2,y:u+d/2,textAnchor:"middle",verticalAnchor:"middle"},P)},Sje=function(t){return"cx"in t&&Se(t.cx)};function Kn(e){var t=e.offset,n=t===void 0?5:t,r=dje(e,oje),i=_n({offset:n},r),a=i.viewBox,o=i.position,l=i.value,u=i.children,f=i.content,d=i.className,h=d===void 0?"":d,m=i.textBreakAll;if(!a||ot(l)&&ot(u)&&!j.isValidElement(f)&&!Xe(f))return null;if(j.isValidElement(f))return j.cloneElement(f,i);var g;if(Xe(f)){if(g=j.createElement(f,i),j.isValidElement(g))return g}else g=vje(i);var b=Sje(a),w=et(i,!0);if(b&&(o==="insideStart"||o==="insideEnd"||o==="end"))return bje(i,g,w);var y=b?xje(i):wje(i);return ie.createElement(Pb,nm({className:ut("recharts-label",h)},w,y,{breakAll:m}),g)}Kn.displayName="Label";var wQ=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,l=t.r,u=t.radius,f=t.innerRadius,d=t.outerRadius,h=t.x,m=t.y,g=t.top,b=t.left,w=t.width,y=t.height,S=t.clockWise,E=t.labelViewBox;if(E)return E;if(Se(w)&&Se(y)){if(Se(h)&&Se(m))return{x:h,y:m,width:w,height:y};if(Se(g)&&Se(b))return{x:g,y:b,width:w,height:y}}return Se(h)&&Se(m)?{x:h,y:m,width:0,height:0}:Se(n)&&Se(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:f||0,outerRadius:d||u||l||0,clockWise:S}:t.viewBox?t.viewBox:{}},_je=function(t,n){return t?t===!0?ie.createElement(Kn,{key:"label-implicit",viewBox:n}):Tn(t)?ie.createElement(Kn,{key:"label-implicit",viewBox:n,value:t}):j.isValidElement(t)?t.type===Kn?j.cloneElement(t,{key:"label-implicit",viewBox:n}):ie.createElement(Kn,{key:"label-implicit",content:t,viewBox:n}):Xe(t)?ie.createElement(Kn,{key:"label-implicit",content:t,viewBox:n}):Sd(t)?ie.createElement(Kn,nm({viewBox:n},t,{key:"label-implicit"})):null:null},Eje=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=wQ(t),o=Ii(i,Kn).map(function(u,f){return j.cloneElement(u,{viewBox:n||a,key:"label-".concat(f)})});if(!r)return o;var l=_je(t.label,n||a);return[l].concat(sje(o))};Kn.parseViewBox=wQ;Kn.renderCallByParent=Eje;var Aje=fX();const Tje=yt(Aje);function rm(e){"@babel/helpers - typeof";return rm=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},rm(e)}var Cje=["valueAccessor"],Oje=["data","dataKey","clockWise","id","textBreakAll"];function jje(e){return Rje(e)||Mje(e)||Pje(e)||Nje()}function Nje(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
405
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pje(e,t){if(e){if(typeof e=="string")return dP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dP(e,t)}}function Mje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rje(e){if(Array.isArray(e))return dP(e)}function dP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hb(){return Hb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hb.apply(this,arguments)}function S6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?S6(Object(n),!0).forEach(function(r){kje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kje(e,t,n){return t=Dje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dje(e){var t=Ije(e,"string");return rm(t)=="symbol"?t:t+""}function Ije(e,t){if(rm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function E6(e,t){if(e==null)return{};var n=Lje(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var $je=function(t){return Array.isArray(t.value)?Tje(t.value):t.value};function Bs(e){var t=e.valueAccessor,n=t===void 0?$je:t,r=E6(e,Cje),i=r.data,a=r.dataKey,o=r.clockWise,l=r.id,u=r.textBreakAll,f=E6(r,Oje);return!i||!i.length?null:ie.createElement(Jt,{className:"recharts-label-list"},i.map(function(d,h){var m=ot(a)?n(d,h):Fr(d&&d.payload,a),g=ot(l)?{}:{id:"".concat(l,"-").concat(h)};return ie.createElement(Kn,Hb({},et(d,!0),f,g,{parentViewBox:d.parentViewBox,value:m,textBreakAll:u,viewBox:Kn.parseViewBox(ot(o)?d:_6(_6({},d),{},{clockWise:o})),key:"label-".concat(h),index:h}))}))}Bs.displayName="LabelList";function Bje(e,t){return e?e===!0?ie.createElement(Bs,{key:"labelList-implicit",data:t}):ie.isValidElement(e)||Xe(e)?ie.createElement(Bs,{key:"labelList-implicit",data:t,content:e}):Sd(e)?ie.createElement(Bs,Hb({data:t},e,{key:"labelList-implicit"})):null:null}function qje(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Ii(r,Bs).map(function(o,l){return j.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return i;var a=Bje(e.label,t);return[a].concat(jje(i))}Bs.renderCallByParent=qje;function im(e){"@babel/helpers - typeof";return im=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},im(e)}function hP(){return hP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hP.apply(this,arguments)}function A6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function T6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?A6(Object(n),!0).forEach(function(r){zje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zje(e,t,n){return t=Vje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vje(e){var t=Fje(e,"string");return im(t)=="symbol"?t:t+""}function Fje(e,t){if(im(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(im(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Uje=function(t,n){var r=Ri(n-t),i=Math.min(Math.abs(n-t),359.999);return r*i},ty=function(t){var n=t.cx,r=t.cy,i=t.radius,a=t.angle,o=t.sign,l=t.isExternal,u=t.cornerRadius,f=t.cornerIsExternal,d=u*(l?1:-1)+i,h=Math.asin(u/d)/Ub,m=f?a:a+o*h,g=Bn(n,r,d,m),b=Bn(n,r,i,m),w=f?a-o*h:a,y=Bn(n,r,d*Math.cos(h*Ub),w);return{center:g,circleTangency:b,lineTangency:y,theta:h}},SQ=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.startAngle,l=t.endAngle,u=Uje(o,l),f=o+u,d=Bn(n,r,a,o),h=Bn(n,r,a,f),m="M ".concat(d.x,",").concat(d.y,`
|
|
406
|
+
A `).concat(a,",").concat(a,`,0,
|
|
407
|
+
`).concat(+(Math.abs(u)>180),",").concat(+(o>f),`,
|
|
408
|
+
`).concat(h.x,",").concat(h.y,`
|
|
409
|
+
`);if(i>0){var g=Bn(n,r,i,o),b=Bn(n,r,i,f);m+="L ".concat(b.x,",").concat(b.y,`
|
|
410
|
+
A `).concat(i,",").concat(i,`,0,
|
|
411
|
+
`).concat(+(Math.abs(u)>180),",").concat(+(o<=f),`,
|
|
412
|
+
`).concat(g.x,",").concat(g.y," Z")}else m+="L ".concat(n,",").concat(r," Z");return m},Hje=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,u=t.cornerIsExternal,f=t.startAngle,d=t.endAngle,h=Ri(d-f),m=ty({cx:n,cy:r,radius:a,angle:f,sign:h,cornerRadius:o,cornerIsExternal:u}),g=m.circleTangency,b=m.lineTangency,w=m.theta,y=ty({cx:n,cy:r,radius:a,angle:d,sign:-h,cornerRadius:o,cornerIsExternal:u}),S=y.circleTangency,E=y.lineTangency,_=y.theta,A=u?Math.abs(f-d):Math.abs(f-d)-w-_;if(A<0)return l?"M ".concat(b.x,",").concat(b.y,`
|
|
413
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
|
414
|
+
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
|
415
|
+
`):SQ({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:f,endAngle:d});var T="M ".concat(b.x,",").concat(b.y,`
|
|
416
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(g.x,",").concat(g.y,`
|
|
417
|
+
A`).concat(a,",").concat(a,",0,").concat(+(A>180),",").concat(+(h<0),",").concat(S.x,",").concat(S.y,`
|
|
418
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(E.x,",").concat(E.y,`
|
|
419
|
+
`);if(i>0){var O=ty({cx:n,cy:r,radius:i,angle:f,sign:h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),P=O.circleTangency,M=O.lineTangency,R=O.theta,D=ty({cx:n,cy:r,radius:i,angle:d,sign:-h,isExternal:!0,cornerRadius:o,cornerIsExternal:u}),I=D.circleTangency,k=D.lineTangency,F=D.theta,$=u?Math.abs(f-d):Math.abs(f-d)-R-F;if($<0&&o===0)return"".concat(T,"L").concat(n,",").concat(r,"Z");T+="L".concat(k.x,",").concat(k.y,`
|
|
420
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(I.x,",").concat(I.y,`
|
|
421
|
+
A`).concat(i,",").concat(i,",0,").concat(+($>180),",").concat(+(h>0),",").concat(P.x,",").concat(P.y,`
|
|
422
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(h<0),",").concat(M.x,",").concat(M.y,"Z")}else T+="L".concat(n,",").concat(r,"Z");return T},Gje={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_Q=function(t){var n=T6(T6({},Gje),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,u=n.forceCornerRadius,f=n.cornerIsExternal,d=n.startAngle,h=n.endAngle,m=n.className;if(o<a||d===h)return null;var g=ut("recharts-sector",m),b=o-a,w=Eu(l,b,0,!0),y;return w>0&&Math.abs(d-h)<360?y=Hje({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(w,b/2),forceCornerRadius:u,cornerIsExternal:f,startAngle:d,endAngle:h}):y=SQ({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:h}),ie.createElement("path",hP({},et(n,!0),{className:g,d:y,role:"img"}))};function am(e){"@babel/helpers - typeof";return am=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},am(e)}function pP(){return pP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pP.apply(this,arguments)}function C6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function O6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C6(Object(n),!0).forEach(function(r){Wje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wje(e,t,n){return t=Kje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kje(e){var t=Yje(e,"string");return am(t)=="symbol"?t:t+""}function Yje(e,t){if(am(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(am(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var j6={curveBasisClosed:r_e,curveBasisOpen:i_e,curveBasis:n_e,curveBumpX:VSe,curveBumpY:FSe,curveLinearClosed:a_e,curveLinear:Ex,curveMonotoneX:o_e,curveMonotoneY:s_e,curveNatural:l_e,curveStep:u_e,curveStepAfter:f_e,curveStepBefore:c_e},ny=function(t){return t.x===+t.x&&t.y===+t.y},Uh=function(t){return t.x},Hh=function(t){return t.y},Xje=function(t,n){if(Xe(t))return t;var r="curve".concat(Sx(t));return(r==="curveMonotone"||r==="curveBump")&&n?j6["".concat(r).concat(n==="vertical"?"Y":"X")]:j6[r]||Ex},Zje=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,l=t.layout,u=t.connectNulls,f=u===void 0?!1:u,d=Xje(r,l),h=f?a.filter(function(w){return ny(w)}):a,m;if(Array.isArray(o)){var g=f?o.filter(function(w){return ny(w)}):o,b=h.map(function(w,y){return O6(O6({},w),{},{base:g[y]})});return l==="vertical"?m=Yv().y(Hh).x1(Uh).x0(function(w){return w.base.x}):m=Yv().x(Uh).y1(Hh).y0(function(w){return w.base.y}),m.defined(ny).curve(d),m(b)}return l==="vertical"&&Se(o)?m=Yv().y(Hh).x1(Uh).x0(o):Se(o)?m=Yv().x(Uh).y1(Hh).y0(o):m=ZX().x(Uh).y(Hh),m.defined(ny).curve(d),m(h)},fp=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?Zje(t):i;return j.createElement("path",pP({},et(t,!1),bb(t),{className:ut("recharts-curve",n),d:o,ref:a}))},ej={exports:{}},tj,N6;function Qje(){if(N6)return tj;N6=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return tj=e,tj}var nj,P6;function Jje(){if(P6)return nj;P6=1;var e=Qje();function t(){}function n(){}return n.resetWarningCache=t,nj=function(){function r(o,l,u,f,d,h){if(h!==e){var m=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 m.name="Invariant Violation",m}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},nj}var M6;function eNe(){return M6||(M6=1,ej.exports=Jje()()),ej.exports}var tNe=eNe();const xt=yt(tNe),{getOwnPropertyNames:nNe,getOwnPropertySymbols:rNe}=Object,{hasOwnProperty:iNe}=Object.prototype;function rj(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function ry(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);const{cache:a}=i,o=a.get(n),l=a.get(r);if(o&&l)return o===r&&l===n;a.set(n,r),a.set(r,n);const u=e(n,r,i);return a.delete(n),a.delete(r),u}}function aNe(e){return e!=null?e[Symbol.toStringTag]:void 0}function R6(e){return nNe(e).concat(rNe(e))}const oNe=Object.hasOwn||((e,t)=>iNe.call(e,t));function $u(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const sNe="__v",lNe="__o",uNe="_owner",{getOwnPropertyDescriptor:k6,keys:D6}=Object;function cNe(e,t){return e.byteLength===t.byteLength&&Gb(new Uint8Array(e),new Uint8Array(t))}function fNe(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function dNe(e,t){return e.byteLength===t.byteLength&&Gb(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function hNe(e,t){return $u(e.getTime(),t.getTime())}function pNe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function mNe(e,t){return e===t}function I6(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.entries();let o,l,u=0;for(;(o=a.next())&&!o.done;){const f=t.entries();let d=!1,h=0;for(;(l=f.next())&&!l.done;){if(i[h]){h++;continue}const m=o.value,g=l.value;if(n.equals(m[0],g[0],u,h,e,t,n)&&n.equals(m[1],g[1],m[0],g[0],e,t,n)){d=i[h]=!0;break}h++}if(!d)return!1;u++}return!0}const gNe=$u;function vNe(e,t,n){const r=D6(e);let i=r.length;if(D6(t).length!==i)return!1;for(;i-- >0;)if(!EQ(e,t,n,r[i]))return!1;return!0}function Gh(e,t,n){const r=R6(e);let i=r.length;if(R6(t).length!==i)return!1;let a,o,l;for(;i-- >0;)if(a=r[i],!EQ(e,t,n,a)||(o=k6(e,a),l=k6(t,a),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function yNe(e,t){return $u(e.valueOf(),t.valueOf())}function bNe(e,t){return e.source===t.source&&e.flags===t.flags}function L6(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const i=new Array(r),a=e.values();let o,l;for(;(o=a.next())&&!o.done;){const u=t.values();let f=!1,d=0;for(;(l=u.next())&&!l.done;){if(!i[d]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){f=i[d]=!0;break}d++}if(!f)return!1}return!0}function Gb(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function xNe(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 EQ(e,t,n,r){return(r===uNe||r===lNe||r===sNe)&&(e.$$typeof||t.$$typeof)?!0:oNe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const wNe="[object ArrayBuffer]",SNe="[object Arguments]",_Ne="[object Boolean]",ENe="[object DataView]",ANe="[object Date]",TNe="[object Error]",CNe="[object Map]",ONe="[object Number]",jNe="[object Object]",NNe="[object RegExp]",PNe="[object Set]",MNe="[object String]",RNe={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},kNe="[object URL]",DNe=Object.prototype.toString;function INe({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:u,arePrimitiveWrappersEqual:f,areRegExpsEqual:d,areSetsEqual:h,areTypedArraysEqual:m,areUrlsEqual:g,unknownTagComparators:b}){return function(y,S,E){if(y===S)return!0;if(y==null||S==null)return!1;const _=typeof y;if(_!==typeof S)return!1;if(_!=="object")return _==="number"?l(y,S,E):_==="function"?a(y,S,E):!1;const A=y.constructor;if(A!==S.constructor)return!1;if(A===Object)return u(y,S,E);if(Array.isArray(y))return t(y,S,E);if(A===Date)return r(y,S,E);if(A===RegExp)return d(y,S,E);if(A===Map)return o(y,S,E);if(A===Set)return h(y,S,E);const T=DNe.call(y);if(T===ANe)return r(y,S,E);if(T===NNe)return d(y,S,E);if(T===CNe)return o(y,S,E);if(T===PNe)return h(y,S,E);if(T===jNe)return typeof y.then!="function"&&typeof S.then!="function"&&u(y,S,E);if(T===kNe)return g(y,S,E);if(T===TNe)return i(y,S,E);if(T===SNe)return u(y,S,E);if(RNe[T])return m(y,S,E);if(T===wNe)return e(y,S,E);if(T===ENe)return n(y,S,E);if(T===_Ne||T===ONe||T===MNe)return f(y,S,E);if(b){let O=b[T];if(!O){const P=aNe(y);P&&(O=b[P])}if(O)return O(y,S,E)}return!1}}function LNe({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:cNe,areArraysEqual:n?Gh:fNe,areDataViewsEqual:dNe,areDatesEqual:hNe,areErrorsEqual:pNe,areFunctionsEqual:mNe,areMapsEqual:n?rj(I6,Gh):I6,areNumbersEqual:gNe,areObjectsEqual:n?Gh:vNe,arePrimitiveWrappersEqual:yNe,areRegExpsEqual:bNe,areSetsEqual:n?rj(L6,Gh):L6,areTypedArraysEqual:n?rj(Gb,Gh):Gb,areUrlsEqual:xNe,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const i=ry(r.areArraysEqual),a=ry(r.areMapsEqual),o=ry(r.areObjectsEqual),l=ry(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:o,areSetsEqual:l})}return r}function $Ne(e){return function(t,n,r,i,a,o,l){return e(t,n,l)}}function BNe({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(l,u){const{cache:f=e?new WeakMap:void 0,meta:d}=n();return t(l,u,{cache:f,equals:r,meta:d,strict:i})};if(e)return function(l,u){return t(l,u,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};const a={cache:void 0,equals:r,meta:void 0,strict:i};return function(l,u){return t(l,u,a)}}const qNe=nl();nl({strict:!0});nl({circular:!0});nl({circular:!0,strict:!0});nl({createInternalComparator:()=>$u});nl({strict:!0,createInternalComparator:()=>$u});nl({circular:!0,createInternalComparator:()=>$u});nl({circular:!0,createInternalComparator:()=>$u,strict:!0});function nl(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=LNe(e),o=INe(a),l=n?n(o):$Ne(o);return BNe({circular:t,comparator:o,createState:r,equals:l,strict:i})}function zNe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function $6(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):zNe(i)};requestAnimationFrame(r)}function mP(e){"@babel/helpers - typeof";return mP=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},mP(e)}function VNe(e){return GNe(e)||HNe(e)||UNe(e)||FNe()}function FNe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
423
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UNe(e,t){if(e){if(typeof e=="string")return B6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return B6(e,t)}}function B6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function HNe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GNe(e){if(Array.isArray(e))return e}function WNe(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,l=VNe(o),u=l[0],f=l.slice(1);if(typeof u=="number"){$6(i.bind(null,f),u);return}i(u),$6(i.bind(null,f));return}mP(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function om(e){"@babel/helpers - typeof";return om=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},om(e)}function q6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function z6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q6(Object(n),!0).forEach(function(r){AQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AQ(e,t,n){return t=KNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KNe(e){var t=YNe(e,"string");return om(t)==="symbol"?t:String(t)}function YNe(e,t){if(om(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(om(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XNe=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},ZNe=function(t){return t},QNe=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},dp=function(t,n){return Object.keys(n).reduce(function(r,i){return z6(z6({},r),{},AQ({},i,t(i,n[i])))},{})},V6=function(t,n,r){return t.map(function(i){return"".concat(QNe(i)," ").concat(n,"ms ").concat(r)}).join(",")};function JNe(e,t){return nPe(e)||tPe(e,t)||TQ(e,t)||ePe()}function ePe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
424
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function nPe(e){if(Array.isArray(e))return e}function rPe(e){return oPe(e)||aPe(e)||TQ(e)||iPe()}function iPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
425
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TQ(e,t){if(e){if(typeof e=="string")return gP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gP(e,t)}}function aPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oPe(e){if(Array.isArray(e))return gP(e)}function gP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wb=1e-4,CQ=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},OQ=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},F6=function(t,n){return function(r){var i=CQ(t,n);return OQ(i,r)}},sPe=function(t,n){return function(r){var i=CQ(t,n),a=[].concat(rPe(i.map(function(o,l){return o*l}).slice(1)),[0]);return OQ(a,r)}},U6=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,l=1;break;case"ease":i=.25,a=.1,o=.25,l=1;break;case"ease-in":i=.42,a=0,o=1,l=1;break;case"ease-out":i=.42,a=0,o=.58,l=1;break;case"ease-in-out":i=0,a=0,o=.58,l=1;break;default:{var u=n[0].split("(");if(u[0]==="cubic-bezier"&&u[1].split(")")[0].split(",").length===4){var f=u[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),d=JNe(f,4);i=d[0],a=d[1],o=d[2],l=d[3]}}}var h=F6(i,o),m=F6(a,l),g=sPe(i,o),b=function(S){return S>1?1:S<0?0:S},w=function(S){for(var E=S>1?1:S,_=E,A=0;A<8;++A){var T=h(_)-E,O=g(_);if(Math.abs(T-E)<Wb||O<Wb)return m(_);_=b(_-T/O)}return m(_)};return w.isStepper=!1,w},lPe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,l=o===void 0?17:o,u=function(d,h,m){var g=-(d-h)*r,b=m*a,w=m+(g-b)*l/1e3,y=m*l/1e3+d;return Math.abs(y-h)<Wb&&Math.abs(w)<Wb?[h,0]:[y,w]};return u.isStepper=!0,u.dt=l,u},uPe=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return U6(i);case"spring":return lPe();default:if(i.split("(")[0]==="cubic-bezier")return U6(i)}return typeof i=="function"?i:null};function sm(e){"@babel/helpers - typeof";return sm=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},sm(e)}function H6(e){return dPe(e)||fPe(e)||jQ(e)||cPe()}function cPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
426
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dPe(e){if(Array.isArray(e))return yP(e)}function G6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?G6(Object(n),!0).forEach(function(r){vP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vP(e,t,n){return t=hPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hPe(e){var t=pPe(e,"string");return sm(t)==="symbol"?t:String(t)}function pPe(e,t){if(sm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(sm(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mPe(e,t){return yPe(e)||vPe(e,t)||jQ(e,t)||gPe()}function gPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
427
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jQ(e,t){if(e){if(typeof e=="string")return yP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yP(e,t)}}function yP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vPe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function yPe(e){if(Array.isArray(e))return e}var Kb=function(t,n,r){return t+(n-t)*r},bP=function(t){var n=t.from,r=t.to;return n!==r},bPe=function e(t,n,r){var i=dp(function(a,o){if(bP(o)){var l=t(o.from,o.to,o.velocity),u=mPe(l,2),f=u[0],d=u[1];return Ln(Ln({},o),{},{from:f,velocity:d})}return o},n);return r<1?dp(function(a,o){return bP(o)?Ln(Ln({},o),{},{velocity:Kb(o.velocity,i[a].velocity,r),from:Kb(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const xPe=(function(e,t,n,r,i){var a=XNe(e,t),o=a.reduce(function(y,S){return Ln(Ln({},y),{},vP({},S,[e[S],t[S]]))},{}),l=a.reduce(function(y,S){return Ln(Ln({},y),{},vP({},S,{from:e[S],velocity:0,to:t[S]}))},{}),u=-1,f,d,h=function(){return null},m=function(){return dp(function(S,E){return E.from},l)},g=function(){return!Object.values(l).filter(bP).length},b=function(S){f||(f=S);var E=S-f,_=E/n.dt;l=bPe(n,l,_),i(Ln(Ln(Ln({},e),t),m())),f=S,g()||(u=requestAnimationFrame(h))},w=function(S){d||(d=S);var E=(S-d)/r,_=dp(function(T,O){return Kb.apply(void 0,H6(O).concat([n(E)]))},o);if(i(Ln(Ln(Ln({},e),t),_)),E<1)u=requestAnimationFrame(h);else{var A=dp(function(T,O){return Kb.apply(void 0,H6(O).concat([n(1)]))},o);i(Ln(Ln(Ln({},e),t),A))}};return h=n.isStepper?b:w,function(){return requestAnimationFrame(h),function(){cancelAnimationFrame(u)}}});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)}var wPe=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function SPe(e,t){if(e==null)return{};var n=_Pe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _Pe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ij(e){return CPe(e)||TPe(e)||APe(e)||EPe()}function EPe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
428
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function APe(e,t){if(e){if(typeof e=="string")return xP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xP(e,t)}}function TPe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CPe(e){if(Array.isArray(e))return xP(e)}function xP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?W6(Object(n),!0).forEach(function(r){rp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rp(e,t,n){return t=NQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OPe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jPe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,NQ(r.key),r)}}function NPe(e,t,n){return t&&jPe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function NQ(e){var t=PPe(e,"string");return Uf(t)==="symbol"?t:String(t)}function PPe(e,t){if(Uf(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Uf(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MPe(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&&wP(e,t)}function wP(e,t){return wP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},wP(e,t)}function RPe(e){var t=kPe();return function(){var r=Yb(e),i;if(t){var a=Yb(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return SP(this,i)}}function SP(e,t){if(t&&(Uf(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)}function _P(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kPe(){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 Yb(e){return Yb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Yb(e)}var go=(function(e){MPe(n,e);var t=RPe(n);function n(r,i){var a;OPe(this,n),a=t.call(this,r,i);var o=a.props,l=o.isActive,u=o.attributeName,f=o.from,d=o.to,h=o.steps,m=o.children,g=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(_P(a)),a.changeStyle=a.changeStyle.bind(_P(a)),!l||g<=0)return a.state={style:{}},typeof m=="function"&&(a.state={style:d}),SP(a);if(h&&h.length)a.state={style:h[0].style};else if(f){if(typeof m=="function")return a.state={style:f},SP(a);a.state={style:u?rp({},u,f):f}}else a.state={style:{}};return a}return NPe(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,l=a.canBegin,u=a.attributeName,f=a.shouldReAnimate,d=a.to,h=a.from,m=this.state.style;if(l){if(!o){var g={style:u?rp({},u,d):d};this.state&&m&&(u&&m[u]!==d||!u&&m!==d)&&this.setState(g);return}if(!(qNe(i.to,d)&&i.canBegin&&i.isActive)){var b=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var w=b||f?h:i.to;if(this.state&&m){var y={style:u?rp({},u,w):w};(u&&m[u]!==w||!u&&m!==w)&&this.setState(y)}this.runAnimation(wi(wi({},this.props),{},{from:w,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,l=i.to,u=i.duration,f=i.easing,d=i.begin,h=i.onAnimationEnd,m=i.onAnimationStart,g=xPe(o,l,uPe(f),u,this.changeStyle),b=function(){a.stopJSAnimation=g()};this.manager.start([m,d,b,u,h])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,l=i.begin,u=i.onAnimationStart,f=o[0],d=f.style,h=f.duration,m=h===void 0?0:h,g=function(w,y,S){if(S===0)return w;var E=y.duration,_=y.easing,A=_===void 0?"ease":_,T=y.style,O=y.properties,P=y.onAnimationEnd,M=S>0?o[S-1]:y,R=O||Object.keys(T);if(typeof A=="function"||A==="spring")return[].concat(ij(w),[a.runJSAnimation.bind(a,{from:M.style,to:T,duration:E,easing:A}),E]);var D=V6(R,E,A),I=wi(wi(wi({},M.style),T),{},{transition:D});return[].concat(ij(w),[I,E,P]).filter(ZNe)};return this.manager.start([u].concat(ij(o.reduce(g,[d,Math.max(m,l)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=WNe());var a=i.begin,o=i.duration,l=i.attributeName,u=i.to,f=i.easing,d=i.onAnimationStart,h=i.onAnimationEnd,m=i.steps,g=i.children,b=this.manager;if(this.unSubscribe=b.subscribe(this.handleStyleChange),typeof f=="function"||typeof g=="function"||f==="spring"){this.runJSAnimation(i);return}if(m.length>1){this.runStepAnimation(i);return}var w=l?rp({},l,u):u,y=V6(Object.keys(w),o,f);b.start([d,a,wi(wi({},w),{},{transition:y}),o,h])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var l=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=SPe(i,wPe),f=j.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!l||f===0||o<=0)return a;var h=function(g){var b=g.props,w=b.style,y=w===void 0?{}:w,S=b.className,E=j.cloneElement(g,wi(wi({},u),{},{style:wi(wi({},y),d),className:S}));return E};return f===1?h(j.Children.only(a)):ie.createElement("div",null,j.Children.map(a,function(m){return h(m)}))}}]),n})(j.PureComponent);go.displayName="Animate";go.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};go.propTypes={from:xt.oneOfType([xt.object,xt.string]),to:xt.oneOfType([xt.object,xt.string]),attributeName:xt.string,duration:xt.number,begin:xt.number,easing:xt.oneOfType([xt.string,xt.func]),steps:xt.arrayOf(xt.shape({duration:xt.number.isRequired,style:xt.object.isRequired,easing:xt.oneOfType([xt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),xt.func]),properties:xt.arrayOf("string"),onAnimationEnd:xt.func})),children:xt.oneOfType([xt.node,xt.func]),isActive:xt.bool,canBegin:xt.bool,onAnimationEnd:xt.func,shouldReAnimate:xt.bool,onAnimationStart:xt.func,onAnimationReStart:xt.func};function lm(e){"@babel/helpers - typeof";return lm=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},lm(e)}function Xb(){return Xb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xb.apply(this,arguments)}function DPe(e,t){return BPe(e)||$Pe(e,t)||LPe(e,t)||IPe()}function IPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
429
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LPe(e,t){if(e){if(typeof e=="string")return K6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K6(e,t)}}function K6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $Pe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function BPe(e){if(Array.isArray(e))return e}function Y6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function X6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Y6(Object(n),!0).forEach(function(r){qPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qPe(e,t,n){return t=zPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zPe(e){var t=VPe(e,"string");return lm(t)=="symbol"?t:t+""}function VPe(e,t){if(lm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(lm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Z6=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),l=i>=0?1:-1,u=r>=0?1:-1,f=i>=0&&r>=0||i<0&&r<0?1:0,d;if(o>0&&a instanceof Array){for(var h=[0,0,0,0],m=0,g=4;m<g;m++)h[m]=a[m]>o?o:a[m];d="M".concat(t,",").concat(n+l*h[0]),h[0]>0&&(d+="A ".concat(h[0],",").concat(h[0],",0,0,").concat(f,",").concat(t+u*h[0],",").concat(n)),d+="L ".concat(t+r-u*h[1],",").concat(n),h[1]>0&&(d+="A ".concat(h[1],",").concat(h[1],",0,0,").concat(f,`,
|
|
430
|
+
`).concat(t+r,",").concat(n+l*h[1])),d+="L ".concat(t+r,",").concat(n+i-l*h[2]),h[2]>0&&(d+="A ".concat(h[2],",").concat(h[2],",0,0,").concat(f,`,
|
|
431
|
+
`).concat(t+r-u*h[2],",").concat(n+i)),d+="L ".concat(t+u*h[3],",").concat(n+i),h[3]>0&&(d+="A ".concat(h[3],",").concat(h[3],",0,0,").concat(f,`,
|
|
432
|
+
`).concat(t,",").concat(n+i-l*h[3])),d+="Z"}else if(o>0&&a===+a&&a>0){var b=Math.min(o,a);d="M ".concat(t,",").concat(n+l*b,`
|
|
433
|
+
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(t+u*b,",").concat(n,`
|
|
434
|
+
L `).concat(t+r-u*b,",").concat(n,`
|
|
435
|
+
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(t+r,",").concat(n+l*b,`
|
|
436
|
+
L `).concat(t+r,",").concat(n+i-l*b,`
|
|
437
|
+
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(t+r-u*b,",").concat(n+i,`
|
|
438
|
+
L `).concat(t+u*b,",").concat(n+i,`
|
|
439
|
+
A `).concat(b,",").concat(b,",0,0,").concat(f,",").concat(t,",").concat(n+i-l*b," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},FPe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,l=n.width,u=n.height;if(Math.abs(l)>0&&Math.abs(u)>0){var f=Math.min(a,a+l),d=Math.max(a,a+l),h=Math.min(o,o+u),m=Math.max(o,o+u);return r>=f&&r<=d&&i>=h&&i<=m}return!1},UPe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},$2=function(t){var n=X6(X6({},UPe),t),r=j.useRef(),i=j.useState(-1),a=DPe(i,2),o=a[0],l=a[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var A=r.current.getTotalLength();A&&l(A)}catch{}},[]);var u=n.x,f=n.y,d=n.width,h=n.height,m=n.radius,g=n.className,b=n.animationEasing,w=n.animationDuration,y=n.animationBegin,S=n.isAnimationActive,E=n.isUpdateAnimationActive;if(u!==+u||f!==+f||d!==+d||h!==+h||d===0||h===0)return null;var _=ut("recharts-rectangle",g);return E?ie.createElement(go,{canBegin:o>0,from:{width:d,height:h,x:u,y:f},to:{width:d,height:h,x:u,y:f},duration:w,animationEasing:b,isActive:E},function(A){var T=A.width,O=A.height,P=A.x,M=A.y;return ie.createElement(go,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:w,isActive:S,easing:b},ie.createElement("path",Xb({},et(n,!0),{className:_,d:Z6(P,M,T,O,m),ref:r})))}):ie.createElement("path",Xb({},et(n,!0),{className:_,d:Z6(u,f,d,h,m)}))};function EP(){return EP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},EP.apply(this,arguments)}var B2=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=ut("recharts-dot",a);return n===+n&&r===+r&&i===+i?j.createElement("circle",EP({},et(t,!1),bb(t),{className:o,cx:n,cy:r,r:i})):null};function um(e){"@babel/helpers - typeof";return um=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},um(e)}var HPe=["x","y","top","left","width","height","className"];function AP(){return AP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},AP.apply(this,arguments)}function Q6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function GPe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Q6(Object(n),!0).forEach(function(r){WPe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q6(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function WPe(e,t,n){return t=KPe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KPe(e){var t=YPe(e,"string");return um(t)=="symbol"?t:t+""}function YPe(e,t){if(um(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(um(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XPe(e,t){if(e==null)return{};var n=ZPe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var QPe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},JPe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,l=o===void 0?0:o,u=t.left,f=u===void 0?0:u,d=t.width,h=d===void 0?0:d,m=t.height,g=m===void 0?0:m,b=t.className,w=XPe(t,HPe),y=GPe({x:r,y:a,top:l,left:f,width:h,height:g},w);return!Se(r)||!Se(a)||!Se(h)||!Se(g)||!Se(l)||!Se(f)?null:ie.createElement("path",AP({},et(y,!0),{className:ut("recharts-cross",b),d:QPe(r,a,h,g,l,f)}))},eMe=mX();const tMe=yt(eMe);var aj,J6;function nMe(){if(J6)return aj;J6=1;var e=xo(),t=hi(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return aj=r,aj}var rMe=nMe();const iMe=yt(rMe);function cm(e){"@babel/helpers - typeof";return cm=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},cm(e)}function Zb(){return Zb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zb.apply(this,arguments)}function aMe(e,t){return uMe(e)||lMe(e,t)||sMe(e,t)||oMe()}function oMe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
440
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sMe(e,t){if(e){if(typeof e=="string")return eH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eH(e,t)}}function eH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lMe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function uMe(e){if(Array.isArray(e))return e}function tH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tH(Object(n),!0).forEach(function(r){cMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cMe(e,t,n){return t=fMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fMe(e){var t=dMe(e,"string");return cm(t)=="symbol"?t:t+""}function dMe(e,t){if(cm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(cm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rH=function(t,n,r,i,a){var o=r-i,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+r,",").concat(n),l+="L ".concat(t+r-o/2,",").concat(n+a),l+="L ".concat(t+r-o/2-i,",").concat(n+a),l+="L ".concat(t,",").concat(n," Z"),l},hMe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},pMe=function(t){var n=nH(nH({},hMe),t),r=j.useRef(),i=j.useState(-1),a=aMe(i,2),o=a[0],l=a[1];j.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var _=r.current.getTotalLength();_&&l(_)}catch{}},[]);var u=n.x,f=n.y,d=n.upperWidth,h=n.lowerWidth,m=n.height,g=n.className,b=n.animationEasing,w=n.animationDuration,y=n.animationBegin,S=n.isUpdateAnimationActive;if(u!==+u||f!==+f||d!==+d||h!==+h||m!==+m||d===0&&h===0||m===0)return null;var E=ut("recharts-trapezoid",g);return S?ie.createElement(go,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:m,x:u,y:f},to:{upperWidth:d,lowerWidth:h,height:m,x:u,y:f},duration:w,animationEasing:b,isActive:S},function(_){var A=_.upperWidth,T=_.lowerWidth,O=_.height,P=_.x,M=_.y;return ie.createElement(go,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:w,easing:b},ie.createElement("path",Zb({},et(n,!0),{className:E,d:rH(P,M,A,T,O),ref:r})))}):ie.createElement("g",null,ie.createElement("path",Zb({},et(n,!0),{className:E,d:rH(u,f,d,h,m)})))},mMe=["option","shapeType","propTransformer","activeClassName","isActive"];function fm(e){"@babel/helpers - typeof";return fm=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},fm(e)}function gMe(e,t){if(e==null)return{};var n=vMe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vMe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function iH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Qb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iH(Object(n),!0).forEach(function(r){yMe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yMe(e,t,n){return t=bMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bMe(e){var t=xMe(e,"string");return fm(t)=="symbol"?t:t+""}function xMe(e,t){if(fm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(fm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wMe(e,t){return Qb(Qb({},t),e)}function SMe(e,t){return e==="symbols"}function aH(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return ie.createElement($2,n);case"trapezoid":return ie.createElement(pMe,n);case"sector":return ie.createElement(_Q,n);case"symbols":if(SMe(t))return ie.createElement(d2,n);break;default:return null}}function _Me(e){return j.isValidElement(e)?e.props:e}function EMe(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?wMe:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,l=e.isActive,u=gMe(e,mMe),f;if(j.isValidElement(t))f=j.cloneElement(t,Qb(Qb({},u),_Me(t)));else if(Xe(t))f=t(u);else if(tMe(t)&&!iMe(t)){var d=i(t,u);f=ie.createElement(aH,{shapeType:n,elementProps:d})}else{var h=u;f=ie.createElement(aH,{shapeType:n,elementProps:h})}return l?ie.createElement(Jt,{className:o},f):f}function Lx(e,t){return t!=null&&"trapezoids"in e.props}function $x(e,t){return t!=null&&"sectors"in e.props}function dm(e,t){return t!=null&&"points"in e.props}function AMe(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function TMe(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function CMe(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function OMe(e,t){var n;return Lx(e,t)?n=AMe:$x(e,t)?n=TMe:dm(e,t)&&(n=CMe),n}function jMe(e,t){var n;return Lx(e,t)?n="trapezoids":$x(e,t)?n="sectors":dm(e,t)&&(n="points"),n}function NMe(e,t){if(Lx(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if($x(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return dm(e,t)?t.payload:{}}function PMe(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=jMe(n,t),a=NMe(n,t),o=r.filter(function(u,f){var d=Yp(a,u),h=n.props[i].filter(function(b){var w=OMe(n,t);return w(b,t)}),m=n.props[i].indexOf(h[h.length-1]),g=f===m;return d&&g}),l=r.indexOf(o[o.length-1]);return l}var MMe=xX();const Jb=yt(MMe);function hm(e){"@babel/helpers - typeof";return hm=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},hm(e)}function oH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function sH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oH(Object(n),!0).forEach(function(r){PQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PQ(e,t,n){return t=RMe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RMe(e){var t=kMe(e,"string");return hm(t)=="symbol"?t:t+""}function kMe(e,t){if(hm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(hm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DMe=["Webkit","Moz","O","ms"],IMe=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=DMe.reduce(function(a,o){return sH(sH({},a),{},PQ({},o+r,n))},{});return i[t]=n,i};function Hf(e){"@babel/helpers - typeof";return Hf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hf(e)}function e0(){return e0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e0.apply(this,arguments)}function lH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function oj(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lH(Object(n),!0).forEach(function(r){Rr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RQ(r.key),r)}}function $Me(e,t,n){return t&&uH(e.prototype,t),n&&uH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function BMe(e,t,n){return t=t0(t),qMe(e,MQ()?Reflect.construct(t,n||[],t0(e).constructor):t.apply(e,n))}function qMe(e,t){if(t&&(Hf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zMe(e)}function zMe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function MQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(MQ=function(){return!!e})()}function t0(e){return t0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},t0(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&&TP(e,t)}function TP(e,t){return TP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},TP(e,t)}function Rr(e,t,n){return t=RQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RQ(e){var t=FMe(e,"string");return Hf(t)=="symbol"?t:t+""}function FMe(e,t){if(Hf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var UMe=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var u=n.length,f=up().domain(Jb(0,u)).range([a,a+o-l]),d=f.domain().map(function(h){return f(h)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:f(r),endX:f(i),scale:f,scaleValues:d}},cH=function(t){return t.changedTouches&&!!t.changedTouches.length},Gf=(function(e){function t(n){var r;return LMe(this,t),r=BMe(this,t,[n]),Rr(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),Rr(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),Rr(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,l=i.startIndex;o==null||o({endIndex:a,startIndex:l})}),r.detachDragEndListener()}),Rr(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Rr(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Rr(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Rr(r,"handleSlideDragStart",function(i){var a=cH(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return VMe(t,e),$Me(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,l=this.props,u=l.gap,f=l.data,d=f.length-1,h=Math.min(i,a),m=Math.max(i,a),g=t.getIndexInRange(o,h),b=t.getIndexInRange(o,m);return{startIndex:g-g%u,endIndex:b===d?d:b-b%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,l=i.dataKey,u=Fr(a[r],l,r);return Xe(o)?o(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,l=i.endX,u=this.props,f=u.x,d=u.width,h=u.travellerWidth,m=u.startIndex,g=u.endIndex,b=u.onChange,w=r.pageX-a;w>0?w=Math.min(w,f+d-h-l,f+d-h-o):w<0&&(w=Math.max(w,f-o,f-l));var y=this.getIndex({startX:o+w,endX:l+w});(y.startIndex!==m||y.endIndex!==g)&&b&&b(y),this.setState({startX:o+w,endX:l+w,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=cH(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,l=i.endX,u=i.startX,f=this.state[o],d=this.props,h=d.x,m=d.width,g=d.travellerWidth,b=d.onChange,w=d.gap,y=d.data,S={startX:this.state.startX,endX:this.state.endX},E=r.pageX-a;E>0?E=Math.min(E,h+m-g-f):E<0&&(E=Math.max(E,h-f)),S[o]=f+E;var _=this.getIndex(S),A=_.startIndex,T=_.endIndex,O=function(){var M=y.length-1;return o==="startX"&&(l>u?A%w===0:T%w===0)||l<u&&T===M||o==="endX"&&(l>u?T%w===0:A%w===0)||l>u&&T===M};this.setState(Rr(Rr({},o,f+E),"brushMoveStartX",r.pageX),function(){b&&O()&&b(_)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,l=o.scaleValues,u=o.startX,f=o.endX,d=this.state[i],h=l.indexOf(d);if(h!==-1){var m=h+r;if(!(m===-1||m>=l.length)){var g=l[m];i==="startX"&&g>=f||i==="endX"&&g<=u||this.setState(Rr({},i,g),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.fill,f=r.stroke;return ie.createElement("rect",{stroke:f,fill:u,x:i,y:a,width:o,height:l})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.data,f=r.children,d=r.padding,h=j.Children.only(f);return h?ie.cloneElement(h,{x:i,y:a,width:o,height:l,margin:d,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,l=this,u=this.props,f=u.y,d=u.travellerWidth,h=u.height,m=u.traveller,g=u.ariaLabel,b=u.data,w=u.startIndex,y=u.endIndex,S=Math.max(r,this.props.x),E=oj(oj({},et(this.props,!1)),{},{x:S,y:f,width:d,height:h}),_=g||"Min value: ".concat((a=b[w])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=b[y])===null||o===void 0?void 0:o.name);return ie.createElement(Jt,{tabIndex:0,role:"slider","aria-label":_,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),l.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,i))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(m,E))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,l=a.height,u=a.stroke,f=a.travellerWidth,d=Math.min(r,i)+f,h=Math.max(Math.abs(i-r)-f,0);return ie.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:d,y:o,width:h,height:l})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,l=r.height,u=r.travellerWidth,f=r.stroke,d=this.state,h=d.startX,m=d.endX,g=5,b={pointerEvents:"none",fill:f};return ie.createElement(Jt,{className:"recharts-brush-texts"},ie.createElement(Pb,e0({textAnchor:"end",verticalAnchor:"middle",x:Math.min(h,m)-g,y:o+l/2},b),this.getTextOfTick(i)),ie.createElement(Pb,e0({textAnchor:"start",verticalAnchor:"middle",x:Math.max(h,m)+u+g,y:o+l/2},b),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,l=r.x,u=r.y,f=r.width,d=r.height,h=r.alwaysShowText,m=this.state,g=m.startX,b=m.endX,w=m.isTextActive,y=m.isSlideMoving,S=m.isTravellerMoving,E=m.isTravellerFocused;if(!i||!i.length||!Se(l)||!Se(u)||!Se(f)||!Se(d)||f<=0||d<=0)return null;var _=ut("recharts-brush",a),A=ie.Children.count(o)===1,T=IMe("userSelect","none");return ie.createElement(Jt,{className:_,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(g,b),this.renderTravellerLayer(g,"startX"),this.renderTravellerLayer(b,"endX"),(w||y||S||E||h)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,l=r.height,u=r.stroke,f=Math.floor(a+l/2)-1;return ie.createElement(ie.Fragment,null,ie.createElement("rect",{x:i,y:a,width:o,height:l,fill:u,stroke:"none"}),ie.createElement("line",{x1:i+1,y1:f,x2:i+o-1,y2:f,fill:"none",stroke:"#fff"}),ie.createElement("line",{x1:i+1,y1:f+2,x2:i+o-1,y2:f+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return ie.isValidElement(r)?a=ie.cloneElement(r,i):Xe(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,l=r.x,u=r.travellerWidth,f=r.updateId,d=r.startIndex,h=r.endIndex;if(a!==i.prevData||f!==i.prevUpdateId)return oj({prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o},a&&a.length?UMe({data:a,width:o,x:l,travellerWidth:u,startIndex:d,endIndex:h}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||l!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([l,l+o-u]);var m=i.scale.domain().map(function(g){return i.scale(g)});return{prevData:a,prevTravellerWidth:u,prevUpdateId:f,prevX:l,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:m}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,l=a-1;l-o>1;){var u=Math.floor((o+l)/2);r[u]>i?l=u:o=u}return i>=r[l]?l:o}}])})(j.PureComponent);Rr(Gf,"displayName","Brush");Rr(Gf,"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 sj,fH;function HMe(){if(fH)return sj;fH=1;var e=bd();function t(n,r){var i;return e(n,function(a,o,l){return i=r(a,o,l),!i}),!!i}return sj=t,sj}var lj,dH;function GMe(){if(dH)return lj;dH=1;var e=kY(),t=pi(),n=HMe(),r=on(),i=wd();function a(o,l,u){var f=r(o)?e:n;return u&&i(o,l,u)&&(l=void 0),f(o,t(l,3))}return lj=a,lj}var WMe=GMe();const KMe=yt(WMe);var fa=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},YMe=dX();const XMe=yt(YMe);var uj,hH;function ZMe(){if(hH)return uj;hH=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return uj=e,uj}var cj,pH;function QMe(){if(pH)return cj;pH=1;var e=bd();function t(n,r){var i=!0;return e(n,function(a,o,l){return i=!!r(a,o,l),i}),i}return cj=t,cj}var fj,mH;function JMe(){if(mH)return fj;mH=1;var e=ZMe(),t=QMe(),n=pi(),r=on(),i=wd();function a(o,l,u){var f=r(o)?e:t;return u&&i(o,l,u)&&(l=void 0),f(o,n(l,3))}return fj=a,fj}var eRe=JMe();const kQ=yt(eRe);var tRe=["x","y"];function pm(e){"@babel/helpers - typeof";return pm=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},pm(e)}function CP(){return CP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},CP.apply(this,arguments)}function gH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gH(Object(n),!0).forEach(function(r){nRe(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nRe(e,t,n){return t=rRe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rRe(e){var t=iRe(e,"string");return pm(t)=="symbol"?t:t+""}function iRe(e,t){if(pm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(pm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aRe(e,t){if(e==null)return{};var n=oRe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sRe(e,t){var n=e.x,r=e.y,i=aRe(e,tRe),a="".concat(n),o=parseInt(a,10),l="".concat(r),u=parseInt(l,10),f="".concat(t.height||i.height),d=parseInt(f,10),h="".concat(t.width||i.width),m=parseInt(h,10);return Wh(Wh(Wh(Wh(Wh({},t),i),o?{x:o}:{}),u?{y:u}:{}),{},{height:d,width:m,name:t.name,radius:t.radius})}function vH(e){return ie.createElement(EMe,CP({shapeType:"rectangle",propTransformer:sRe,activeClassName:"recharts-active-bar"},e))}var lRe=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=Se(r)||uSe(r);return a?t(r,i):(a||Tu(),n)}},uRe=["value","background"],DQ;function Wf(e){"@babel/helpers - typeof";return Wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wf(e)}function cRe(e,t){if(e==null)return{};var n=fRe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function n0(){return n0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n0.apply(this,arguments)}function yH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yH(Object(n),!0).forEach(function(r){js(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LQ(r.key),r)}}function hRe(e,t,n){return t&&bH(e.prototype,t),n&&bH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pRe(e,t,n){return t=r0(t),mRe(e,IQ()?Reflect.construct(t,n||[],r0(e).constructor):t.apply(e,n))}function mRe(e,t){if(t&&(Wf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return gRe(e)}function gRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function IQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(IQ=function(){return!!e})()}function r0(e){return r0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},r0(e)}function vRe(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&&OP(e,t)}function OP(e,t){return OP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},OP(e,t)}function js(e,t,n){return t=LQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LQ(e){var t=yRe(e,"string");return Wf(t)=="symbol"?t:t+""}function yRe(e,t){if(Wf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Ks=(function(e){function t(){var n;dRe(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=pRe(this,t,[].concat(i)),js(n,"state",{isAnimationFinished:!1}),js(n,"id",Zm("recharts-bar-")),js(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),js(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return vRe(t,e),hRe(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,l=a.dataKey,u=a.activeIndex,f=a.activeBar,d=et(this.props,!1);return r&&r.map(function(h,m){var g=m===u,b=g?f:o,w=pn(pn(pn({},d),h),{},{isActive:g,option:b,index:m,dataKey:l,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return ie.createElement(Jt,n0({className:"recharts-bar-rectangle"},xb(i.props,h,m),{key:"rectangle-".concat(h==null?void 0:h.x,"-").concat(h==null?void 0:h.y,"-").concat(h==null?void 0:h.value,"-").concat(m)}),ie.createElement(vH,w))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,l=i.isAnimationActive,u=i.animationBegin,f=i.animationDuration,d=i.animationEasing,h=i.animationId,m=this.state.prevData;return ie.createElement(go,{begin:u,duration:f,isActive:l,easing:d,from:{t:0},to:{t:1},key:"bar-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(g){var b=g.t,w=a.map(function(y,S){var E=m&&m[S];if(E){var _=ii(E.x,y.x),A=ii(E.y,y.y),T=ii(E.width,y.width),O=ii(E.height,y.height);return pn(pn({},y),{},{x:_(b),y:A(b),width:T(b),height:O(b)})}if(o==="horizontal"){var P=ii(0,y.height),M=P(b);return pn(pn({},y),{},{y:y.y+y.height-M,height:M})}var R=ii(0,y.width),D=R(b);return pn(pn({},y),{},{width:D})});return ie.createElement(Jt,null,r.renderRectanglesStatically(w))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Yp(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,l=i.activeIndex,u=et(this.props.background,!1);return a.map(function(f,d){f.value;var h=f.background,m=cRe(f,uRe);if(!h)return null;var g=pn(pn(pn(pn(pn({},m),{},{fill:"#eee"},h),u),xb(r.props,f,d)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:d,className:"recharts-bar-background-rectangle"});return ie.createElement(vH,n0({key:"background-bar-".concat(d),option:r.props.background,isActive:d===l},g))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,l=a.xAxis,u=a.yAxis,f=a.layout,d=a.children,h=Ii(d,Ix);if(!h)return null;var m=f==="vertical"?o[0].height/2:o[0].width/2,g=function(y,S){var E=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:E,errorVal:Fr(y,S)}},b={clipPath:r?"url(#clipPath-".concat(i,")"):null};return ie.createElement(Jt,b,h.map(function(w){return ie.cloneElement(w,{key:"error-bar-".concat(i,"-").concat(w.props.dataKey),data:o,xAxis:l,yAxis:u,layout:f,offset:m,dataPointFormatter:g})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,l=r.xAxis,u=r.yAxis,f=r.left,d=r.top,h=r.width,m=r.height,g=r.isAnimationActive,b=r.background,w=r.id;if(i||!a||!a.length)return null;var y=this.state.isAnimationFinished,S=ut("recharts-bar",o),E=l&&l.allowDataOverflow,_=u&&u.allowDataOverflow,A=E||_,T=ot(w)?this.id:w;return ie.createElement(Jt,{className:S},E||_?ie.createElement("defs",null,ie.createElement("clipPath",{id:"clipPath-".concat(T)},ie.createElement("rect",{x:E?f:f-h/2,y:_?d:d-m/2,width:E?h:h*2,height:_?m:m*2}))):null,ie.createElement(Jt,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(T,")"):null},b?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,T),(!g||y)&&Bs.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(j.PureComponent);DQ=Ks;js(Ks,"displayName","Bar");js(Ks,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!Ed.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});js(Ks,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,l=e.xAxisTicks,u=e.yAxisTicks,f=e.stackedData,d=e.dataStartIndex,h=e.displayedData,m=e.offset,g=zOe(r,n);if(!g)return null;var b=t.layout,w=n.type.defaultProps,y=w!==void 0?pn(pn({},w),n.props):n.props,S=y.dataKey,E=y.children,_=y.minPointSize,A=b==="horizontal"?o:a,T=f?A.scale.domain():null,O=YOe({numericAxis:A}),P=Ii(E,bZ),M=h.map(function(R,D){var I,k,F,$,q,L;f?I=VOe(f[d+D],T):(I=Fr(R,S),Array.isArray(I)||(I=[O,I]));var z=lRe(_,DQ.defaultProps.minPointSize)(I[1],D);if(b==="horizontal"){var U,K=[o.scale(I[0]),o.scale(I[1])],Z=K[0],H=K[1];k=p6({axis:a,ticks:l,bandSize:i,offset:g.offset,entry:R,index:D}),F=(U=H??Z)!==null&&U!==void 0?U:void 0,$=g.size;var V=Z-H;if(q=Number.isNaN(V)?0:V,L={x:k,y:o.y,width:$,height:o.height},Math.abs(z)>0&&Math.abs(q)<Math.abs(z)){var X=Ri(q||z)*(Math.abs(z)-Math.abs(q));F-=X,q+=X}}else{var Y=[a.scale(I[0]),a.scale(I[1])],G=Y[0],Q=Y[1];if(k=G,F=p6({axis:o,ticks:u,bandSize:i,offset:g.offset,entry:R,index:D}),$=Q-G,q=g.size,L={x:a.x,y:F,width:a.width,height:q},Math.abs(z)>0&&Math.abs($)<Math.abs(z)){var J=Ri($||z)*(Math.abs(z)-Math.abs($));$+=J}}return pn(pn(pn({},R),{},{x:k,y:F,width:$,height:q,value:f?I:I[1],payload:R,background:L},P&&P[D]&&P[D].props),{},{tooltipPayload:[xQ(n,R)],tooltipPosition:{x:k+$/2,y:F+q/2}})});return pn({data:M,layout:b},m)});function mm(e){"@babel/helpers - typeof";return mm=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},mm(e)}function bRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$Q(r.key),r)}}function xRe(e,t,n){return t&&xH(e.prototype,t),n&&xH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wH(Object(n),!0).forEach(function(r){Bx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bx(e,t,n){return t=$Q(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Q(e){var t=wRe(e,"string");return mm(t)=="symbol"?t:t+""}function wRe(e,t){if(mm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(mm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var BQ=function(t,n,r,i,a){var o=t.width,l=t.height,u=t.layout,f=t.children,d=Object.keys(n),h={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:l-r.bottom,bottomMirror:l-r.bottom},m=!!kr(f,Ks);return d.reduce(function(g,b){var w=n[b],y=w.orientation,S=w.domain,E=w.padding,_=E===void 0?{}:E,A=w.mirror,T=w.reversed,O="".concat(y).concat(A?"Mirror":""),P,M,R,D,I;if(w.type==="number"&&(w.padding==="gap"||w.padding==="no-gap")){var k=S[1]-S[0],F=1/0,$=w.categoricalDomain.sort(dSe);if($.forEach(function(Y,G){G>0&&(F=Math.min((Y||0)-($[G-1]||0),F))}),Number.isFinite(F)){var q=F/k,L=w.layout==="vertical"?r.height:r.width;if(w.padding==="gap"&&(P=q*L/2),w.padding==="no-gap"){var z=Eu(t.barCategoryGap,q*L),U=q*L/2;P=U-z-(U-z)/L*z}}}i==="xAxis"?M=[r.left+(_.left||0)+(P||0),r.left+r.width-(_.right||0)-(P||0)]:i==="yAxis"?M=u==="horizontal"?[r.top+r.height-(_.bottom||0),r.top+(_.top||0)]:[r.top+(_.top||0)+(P||0),r.top+r.height-(_.bottom||0)-(P||0)]:M=w.range,T&&(M=[M[1],M[0]]);var K=BOe(w,a,m),Z=K.scale,H=K.realScaleType;Z.domain(S).range(M),qOe(Z);var V=KOe(Z,Oi(Oi({},w),{},{realScaleType:H}));i==="xAxis"?(I=y==="top"&&!A||y==="bottom"&&A,R=r.left,D=h[O]-I*w.height):i==="yAxis"&&(I=y==="left"&&!A||y==="right"&&A,R=h[O]-I*w.width,D=r.top);var X=Oi(Oi(Oi({},w),V),{},{realScaleType:H,x:R,y:D,scale:Z,width:i==="xAxis"?r.width:w.width,height:i==="yAxis"?r.height:w.height});return X.bandSize=Fb(X,V),!w.hide&&i==="xAxis"?h[O]+=(I?-1:1)*X.height:w.hide||(h[O]+=(I?-1:1)*X.width),Oi(Oi({},g),{},Bx({},b,X))},{})},qQ=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},SRe=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return qQ({x:n,y:r},{x:i,y:a})},zQ=(function(){function e(t){bRe(this,e),this.scale=t}return xRe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();Bx(zQ,"EPS",1e-4);var q2=function(t){var n=Object.keys(t).reduce(function(r,i){return Oi(Oi({},r),{},Bx({},i,zQ.create(t[i])))},{});return Oi(Oi({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,l=a.position;return XMe(i,function(u,f){return n[f].apply(u,{bandAware:o,position:l})})},isInRange:function(i){return kQ(i,function(a,o){return n[o].isInRange(a)})}})};function _Re(e){return(e%180+180)%180}var ERe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=_Re(i),o=a*Math.PI/180,l=Math.atan(r/n),u=o>l&&o<Math.PI-l?r/Math.sin(o):n/Math.cos(o);return Math.abs(u)},ARe=uX();const TRe=yt(ARe);var CRe=BY();const ORe=yt(CRe);var jRe=ORe(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("")}),z2=j.createContext(void 0),V2=j.createContext(void 0),VQ=j.createContext(void 0),FQ=j.createContext({}),UQ=j.createContext(void 0),HQ=j.createContext(0),GQ=j.createContext(0),SH=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,l=t.children,u=t.width,f=t.height,d=jRe(a);return ie.createElement(z2.Provider,{value:r},ie.createElement(V2.Provider,{value:i},ie.createElement(FQ.Provider,{value:a},ie.createElement(VQ.Provider,{value:d},ie.createElement(UQ.Provider,{value:o},ie.createElement(HQ.Provider,{value:f},ie.createElement(GQ.Provider,{value:u},l)))))))},NRe=function(){return j.useContext(UQ)},WQ=function(t){var n=j.useContext(z2);n==null&&Tu();var r=n[t];return r==null&&Tu(),r},PRe=function(){var t=j.useContext(z2);return ps(t)},MRe=function(){var t=j.useContext(V2),n=TRe(t,function(r){return kQ(r.domain,Number.isFinite)});return n||ps(t)},KQ=function(t){var n=j.useContext(V2);n==null&&Tu();var r=n[t];return r==null&&Tu(),r},RRe=function(){var t=j.useContext(VQ);return t},kRe=function(){return j.useContext(FQ)},F2=function(){return j.useContext(GQ)},U2=function(){return j.useContext(HQ)};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 DRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IRe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,XQ(r.key),r)}}function LRe(e,t,n){return t&&IRe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Re(e,t,n){return t=i0(t),BRe(e,YQ()?Reflect.construct(t,n||[],i0(e).constructor):t.apply(e,n))}function BRe(e,t){if(t&&(Kf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return qRe(e)}function qRe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function YQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(YQ=function(){return!!e})()}function i0(e){return i0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},i0(e)}function zRe(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&&jP(e,t)}function jP(e,t){return jP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},jP(e,t)}function _H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function EH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_H(Object(n),!0).forEach(function(r){H2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_H(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function H2(e,t,n){return t=XQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XQ(e){var t=VRe(e,"string");return Kf(t)=="symbol"?t:t+""}function VRe(e,t){if(Kf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function FRe(e,t){return WRe(e)||GRe(e,t)||HRe(e,t)||URe()}function URe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
441
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HRe(e,t){if(e){if(typeof e=="string")return AH(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return AH(e,t)}}function AH(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GRe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function WRe(e){if(Array.isArray(e))return e}function NP(){return NP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},NP.apply(this,arguments)}var KRe=function(t,n){var r;return ie.isValidElement(t)?r=ie.cloneElement(t,n):Xe(t)?r=t(n):r=ie.createElement("line",NP({},n,{className:"recharts-reference-line-line"})),r},YRe=function(t,n,r,i,a,o,l,u,f){var d=a.x,h=a.y,m=a.width,g=a.height;if(r){var b=f.y,w=t.y.apply(b,{position:o});if(fa(f,"discard")&&!t.y.isInRange(w))return null;var y=[{x:d+m,y:w},{x:d,y:w}];return u==="left"?y.reverse():y}if(n){var S=f.x,E=t.x.apply(S,{position:o});if(fa(f,"discard")&&!t.x.isInRange(E))return null;var _=[{x:E,y:h+g},{x:E,y:h}];return l==="top"?_.reverse():_}if(i){var A=f.segment,T=A.map(function(O){return t.apply(O,{position:o})});return fa(f,"discard")&&KMe(T,function(O){return!t.isInRange(O)})?null:T}return null};function XRe(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,l=e.className,u=e.alwaysShow,f=NRe(),d=WQ(i),h=KQ(a),m=RRe();if(!f||!m)return null;ao(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var g=q2({x:d.scale,y:h.scale}),b=Tn(t),w=Tn(n),y=r&&r.length===2,S=YRe(g,b,w,y,m,e.position,d.orientation,h.orientation,e);if(!S)return null;var E=FRe(S,2),_=E[0],A=_.x,T=_.y,O=E[1],P=O.x,M=O.y,R=fa(e,"hidden")?"url(#".concat(f,")"):void 0,D=EH(EH({clipPath:R},et(e,!0)),{},{x1:A,y1:T,x2:P,y2:M});return ie.createElement(Jt,{className:ut("recharts-reference-line",l)},KRe(o,D),Kn.renderCallByParent(e,SRe({x1:A,y1:T,x2:P,y2:M})))}var G2=(function(e){function t(){return DRe(this,t),$Re(this,t,arguments)}return zRe(t,e),LRe(t,[{key:"render",value:function(){return ie.createElement(XRe,this.props)}}])})(ie.Component);H2(G2,"displayName","ReferenceLine");H2(G2,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function PP(){return PP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},PP.apply(this,arguments)}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 TH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function CH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TH(Object(n),!0).forEach(function(r){qx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZRe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function QRe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,QQ(r.key),r)}}function JRe(e,t,n){return t&&QRe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function e2e(e,t,n){return t=a0(t),t2e(e,ZQ()?Reflect.construct(t,n||[],a0(e).constructor):t.apply(e,n))}function t2e(e,t){if(t&&(Yf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n2e(e)}function n2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ZQ=function(){return!!e})()}function a0(e){return a0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},a0(e)}function r2e(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&&MP(e,t)}function MP(e,t){return MP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},MP(e,t)}function qx(e,t,n){return t=QQ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QQ(e){var t=i2e(e,"string");return Yf(t)=="symbol"?t:t+""}function i2e(e,t){if(Yf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var a2e=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=q2({x:i.scale,y:a.scale}),l=o.apply({x:n,y:r},{bandAware:!0});return fa(t,"discard")&&!o.isInRange(l)?null:l},zx=(function(e){function t(){return ZRe(this,t),e2e(this,t,arguments)}return r2e(t,e),JRe(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,l=r.alwaysShow,u=r.clipPathId,f=Tn(i),d=Tn(a);if(ao(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!f||!d)return null;var h=a2e(this.props);if(!h)return null;var m=h.x,g=h.y,b=this.props,w=b.shape,y=b.className,S=fa(this.props,"hidden")?"url(#".concat(u,")"):void 0,E=CH(CH({clipPath:S},et(this.props,!0)),{},{cx:m,cy:g});return ie.createElement(Jt,{className:ut("recharts-reference-dot",y)},t.renderDot(w,E),Kn.renderCallByParent(this.props,{x:m-o,y:g-o,width:2*o,height:2*o}))}}])})(ie.Component);qx(zx,"displayName","ReferenceDot");qx(zx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});qx(zx,"renderDot",function(e,t){var n;return ie.isValidElement(e)?n=ie.cloneElement(e,t):Xe(e)?n=e(t):n=ie.createElement(B2,PP({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function RP(){return RP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},RP.apply(this,arguments)}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 OH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OH(Object(n),!0).forEach(function(r){Vx(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function o2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s2e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eJ(r.key),r)}}function l2e(e,t,n){return t&&s2e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function u2e(e,t,n){return t=o0(t),c2e(e,JQ()?Reflect.construct(t,n||[],o0(e).constructor):t.apply(e,n))}function c2e(e,t){if(t&&(Xf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f2e(e)}function f2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JQ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JQ=function(){return!!e})()}function o0(e){return o0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},o0(e)}function d2e(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&&kP(e,t)}function kP(e,t){return kP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},kP(e,t)}function Vx(e,t,n){return t=eJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eJ(e){var t=h2e(e,"string");return Xf(t)=="symbol"?t:t+""}function h2e(e,t){if(Xf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Xf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var p2e=function(t,n,r,i,a){var o=a.x1,l=a.x2,u=a.y1,f=a.y2,d=a.xAxis,h=a.yAxis;if(!d||!h)return null;var m=q2({x:d.scale,y:h.scale}),g={x:t?m.x.apply(o,{position:"start"}):m.x.rangeMin,y:r?m.y.apply(u,{position:"start"}):m.y.rangeMin},b={x:n?m.x.apply(l,{position:"end"}):m.x.rangeMax,y:i?m.y.apply(f,{position:"end"}):m.y.rangeMax};return fa(a,"discard")&&(!m.isInRange(g)||!m.isInRange(b))?null:qQ(g,b)},Fx=(function(e){function t(){return o2e(this,t),u2e(this,t,arguments)}return d2e(t,e),l2e(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,l=r.y2,u=r.className,f=r.alwaysShow,d=r.clipPathId;ao(f===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var h=Tn(i),m=Tn(a),g=Tn(o),b=Tn(l),w=this.props.shape;if(!h&&!m&&!g&&!b&&!w)return null;var y=p2e(h,m,g,b,this.props);if(!y&&!w)return null;var S=fa(this.props,"hidden")?"url(#".concat(d,")"):void 0;return ie.createElement(Jt,{className:ut("recharts-reference-area",u)},t.renderRect(w,jH(jH({clipPath:S},et(this.props,!0)),y)),Kn.renderCallByParent(this.props,y))}}])})(ie.Component);Vx(Fx,"displayName","ReferenceArea");Vx(Fx,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});Vx(Fx,"renderRect",function(e,t){var n;return ie.isValidElement(e)?n=ie.cloneElement(e,t):Xe(e)?n=e(t):n=ie.createElement($2,RP({},t,{className:"recharts-reference-area-rect"})),n});function tJ(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function m2e(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return ERe(r,n)}function g2e(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,l=e.height;return t===1?{start:r?i:a,end:r?i+o:a+l}:{start:r?i+o:a+l,end:r?i:a}}function s0(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function v2e(e,t){return tJ(e,t+1)}function y2e(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,l=t.end,u=0,f=1,d=o,h=function(){var b=r==null?void 0:r[u];if(b===void 0)return{v:tJ(r,f)};var w=u,y,S=function(){return y===void 0&&(y=n(b,w)),y},E=b.coordinate,_=u===0||s0(e,E,S,d,l);_||(u=0,d=o,f+=1),_&&(d=E+e*(S()/2+i),u+=f)},m;f<=a.length;)if(m=h(),m)return m.v;return[]}function gm(e){"@babel/helpers - typeof";return gm=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},gm(e)}function NH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Wn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NH(Object(n),!0).forEach(function(r){b2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function b2e(e,t,n){return t=x2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function x2e(e){var t=w2e(e,"string");return gm(t)=="symbol"?t:t+""}function w2e(e,t){if(gm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(gm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S2e(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,l=t.start,u=t.end,f=function(m){var g=a[m],b,w=function(){return b===void 0&&(b=n(g,m)),b};if(m===o-1){var y=e*(g.coordinate+e*w()/2-u);a[m]=g=Wn(Wn({},g),{},{tickCoord:y>0?g.coordinate-y*e:g.coordinate})}else a[m]=g=Wn(Wn({},g),{},{tickCoord:g.coordinate});var S=s0(e,g.tickCoord,w,l,u);S&&(u=g.tickCoord-e*(w()/2+i),a[m]=Wn(Wn({},g),{},{isShow:!0}))},d=o-1;d>=0;d--)f(d);return a}function _2e(e,t,n,r,i,a){var o=(r||[]).slice(),l=o.length,u=t.start,f=t.end;if(a){var d=r[l-1],h=n(d,l-1),m=e*(d.coordinate+e*h/2-f);o[l-1]=d=Wn(Wn({},d),{},{tickCoord:m>0?d.coordinate-m*e:d.coordinate});var g=s0(e,d.tickCoord,function(){return h},u,f);g&&(f=d.tickCoord-e*(h/2+i),o[l-1]=Wn(Wn({},d),{},{isShow:!0}))}for(var b=a?l-1:l,w=function(E){var _=o[E],A,T=function(){return A===void 0&&(A=n(_,E)),A};if(E===0){var O=e*(_.coordinate-e*T()/2-u);o[E]=_=Wn(Wn({},_),{},{tickCoord:O<0?_.coordinate-O*e:_.coordinate})}else o[E]=_=Wn(Wn({},_),{},{tickCoord:_.coordinate});var P=s0(e,_.tickCoord,T,u,f);P&&(u=_.tickCoord+e*(T()/2+i),o[E]=Wn(Wn({},_),{},{isShow:!0}))},y=0;y<b;y++)w(y);return o}function W2(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,l=e.orientation,u=e.interval,f=e.tickFormatter,d=e.unit,h=e.angle;if(!i||!i.length||!r)return[];if(Se(u)||Ed.isSsr)return v2e(i,typeof u=="number"&&Se(u)?u:0);var m=[],g=l==="top"||l==="bottom"?"width":"height",b=d&&g==="width"?lp(d,{fontSize:t,letterSpacing:n}):{width:0,height:0},w=function(_,A){var T=Xe(f)?f(_.value,A):_.value;return g==="width"?m2e(lp(T,{fontSize:t,letterSpacing:n}),b,h):lp(T,{fontSize:t,letterSpacing:n})[g]},y=i.length>=2?Ri(i[1].coordinate-i[0].coordinate):1,S=g2e(a,y,g);return u==="equidistantPreserveStart"?y2e(y,S,w,i,o):(u==="preserveStart"||u==="preserveStartEnd"?m=_2e(y,S,w,i,o,u==="preserveStartEnd"):m=S2e(y,S,w,i,o),m.filter(function(E){return E.isShow}))}var E2e=["viewBox"],A2e=["viewBox"],T2e=["ticks"];function Zf(e){"@babel/helpers - typeof";return Zf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zf(e)}function Fc(){return Fc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fc.apply(this,arguments)}function PH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PH(Object(n),!0).forEach(function(r){K2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dj(e,t){if(e==null)return{};var n=C2e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function C2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function O2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,rJ(r.key),r)}}function j2e(e,t,n){return t&&MH(e.prototype,t),n&&MH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N2e(e,t,n){return t=l0(t),P2e(e,nJ()?Reflect.construct(t,n||[],l0(e).constructor):t.apply(e,n))}function P2e(e,t){if(t&&(Zf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return M2e(e)}function M2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(nJ=function(){return!!e})()}function l0(e){return l0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},l0(e)}function R2e(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&&DP(e,t)}function DP(e,t){return DP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},DP(e,t)}function K2(e,t,n){return t=rJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rJ(e){var t=k2e(e,"string");return Zf(t)=="symbol"?t:t+""}function k2e(e,t){if(Zf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Zf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Cd=(function(e){function t(n){var r;return O2e(this,t),r=N2e(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return R2e(t,e),j2e(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=dj(r,E2e),l=this.props,u=l.viewBox,f=dj(l,A2e);return!ef(a,u)||!ef(o,f)||!ef(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,l=i.width,u=i.height,f=i.orientation,d=i.tickSize,h=i.mirror,m=i.tickMargin,g,b,w,y,S,E,_=h?-1:1,A=r.tickSize||d,T=Se(r.tickCoord)?r.tickCoord:r.coordinate;switch(f){case"top":g=b=r.coordinate,y=o+ +!h*u,w=y-_*A,E=w-_*m,S=T;break;case"left":w=y=r.coordinate,b=a+ +!h*l,g=b-_*A,S=g-_*m,E=T;break;case"right":w=y=r.coordinate,b=a+ +h*l,g=b+_*A,S=g+_*m,E=T;break;default:g=b=r.coordinate,y=o+ +h*u,w=y+_*A,E=w+_*m,S=T;break}return{line:{x1:g,y1:w,x2:b,y2:y},tick:{x:S,y:E}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,l=r.height,u=r.orientation,f=r.mirror,d=r.axisLine,h=Sn(Sn(Sn({},et(this.props,!1)),et(d,!1)),{},{fill:"none"});if(u==="top"||u==="bottom"){var m=+(u==="top"&&!f||u==="bottom"&&f);h=Sn(Sn({},h),{},{x1:i,y1:a+m*l,x2:i+o,y2:a+m*l})}else{var g=+(u==="left"&&!f||u==="right"&&f);h=Sn(Sn({},h),{},{x1:i+g*o,y1:a,x2:i+g*o,y2:a+l})}return ie.createElement("line",Fc({},h,{className:ut("recharts-cartesian-axis-line",si(d,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,l=this.props,u=l.tickLine,f=l.stroke,d=l.tick,h=l.tickFormatter,m=l.unit,g=W2(Sn(Sn({},this.props),{},{ticks:r}),i,a),b=this.getTickTextAnchor(),w=this.getTickVerticalAnchor(),y=et(this.props,!1),S=et(d,!1),E=Sn(Sn({},y),{},{fill:"none"},et(u,!1)),_=g.map(function(A,T){var O=o.getTickLineCoord(A),P=O.line,M=O.tick,R=Sn(Sn(Sn(Sn({textAnchor:b,verticalAnchor:w},y),{},{stroke:"none",fill:f},S),M),{},{index:T,payload:A,visibleTicksCount:g.length,tickFormatter:h});return ie.createElement(Jt,Fc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},xb(o.props,A,T)),u&&ie.createElement("line",Fc({},E,P,{className:ut("recharts-cartesian-axis-tick-line",si(u,"className"))})),d&&t.renderTickItem(d,R,"".concat(Xe(h)?h(A.value,T):A.value).concat(m||"")))});return ie.createElement("g",{className:"recharts-cartesian-axis-ticks"},_)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,l=i.height,u=i.ticksGenerator,f=i.className,d=i.hide;if(d)return null;var h=this.props,m=h.ticks,g=dj(h,T2e),b=m;return Xe(u)&&(b=m&&m.length>0?u(this.props):u(g)),o<=0||l<=0||!b||!b.length?null:ie.createElement(Jt,{className:ut("recharts-cartesian-axis",f),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(b,this.state.fontSize,this.state.letterSpacing),Kn.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,l=ut(i.className,"recharts-cartesian-axis-tick-value");return ie.isValidElement(r)?o=ie.cloneElement(r,Sn(Sn({},i),{},{className:l})):Xe(r)?o=r(Sn(Sn({},i),{},{className:l})):o=ie.createElement(Pb,Fc({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(j.Component);K2(Cd,"displayName","CartesianAxis");K2(Cd,"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 D2e=["x1","y1","x2","y2","key"],I2e=["offset"];function Cu(e){"@babel/helpers - typeof";return Cu=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},Cu(e)}function RH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RH(Object(n),!0).forEach(function(r){L2e(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L2e(e,t,n){return t=$2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $2e(e){var t=B2e(e,"string");return Cu(t)=="symbol"?t:t+""}function B2e(e,t){if(Cu(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Cu(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ul(){return Ul=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ul.apply(this,arguments)}function kH(e,t){if(e==null)return{};var n=q2e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function q2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var z2e=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,l=t.height,u=t.ry;return ie.createElement("rect",{x:i,y:a,ry:u,width:o,height:l,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function iJ(e,t){var n;if(ie.isValidElement(e))n=ie.cloneElement(e,t);else if(Xe(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,l=t.key,u=kH(t,D2e),f=et(u,!1);f.offset;var d=kH(f,I2e);n=ie.createElement("line",Ul({},d,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:l}))}return n}function V2e(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,u){var f=Yn(Yn({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(u),index:u});return iJ(i,f)});return ie.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function F2e(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(l,u){var f=Yn(Yn({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(u),index:u});return iJ(i,f)});return ie.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function U2e(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,l=e.horizontalPoints,u=e.horizontal,f=u===void 0?!0:u;if(!f||!t||!t.length)return null;var d=l.map(function(m){return Math.round(m+i-i)}).sort(function(m,g){return m-g});i!==d[0]&&d.unshift(0);var h=d.map(function(m,g){var b=!d[g+1],w=b?i+o-m:d[g+1]-m;if(w<=0)return null;var y=g%t.length;return ie.createElement("rect",{key:"react-".concat(g),y:m,x:r,height:w,width:a,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return ie.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},h)}function H2e(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,l=e.width,u=e.height,f=e.verticalPoints;if(!n||!r||!r.length)return null;var d=f.map(function(m){return Math.round(m+a-a)}).sort(function(m,g){return m-g});a!==d[0]&&d.unshift(0);var h=d.map(function(m,g){var b=!d[g+1],w=b?a+l-m:d[g+1]-m;if(w<=0)return null;var y=g%r.length;return ie.createElement("rect",{key:"react-".concat(g),x:m,y:o,width:w,height:u,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return ie.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},h)}var G2e=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return yQ(W2(Yn(Yn(Yn({},Cd.defaultProps),r),{},{ticks:to(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},W2e=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return yQ(W2(Yn(Yn(Yn({},Cd.defaultProps),r),{},{ticks:to(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},kc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function IP(e){var t,n,r,i,a,o,l=F2(),u=U2(),f=kRe(),d=Yn(Yn({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:kc.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:kc.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:kc.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:kc.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:kc.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:kc.verticalFill,x:Se(e.x)?e.x:f.left,y:Se(e.y)?e.y:f.top,width:Se(e.width)?e.width:f.width,height:Se(e.height)?e.height:f.height}),h=d.x,m=d.y,g=d.width,b=d.height,w=d.syncWithTicks,y=d.horizontalValues,S=d.verticalValues,E=PRe(),_=MRe();if(!Se(g)||g<=0||!Se(b)||b<=0||!Se(h)||h!==+h||!Se(m)||m!==+m)return null;var A=d.verticalCoordinatesGenerator||G2e,T=d.horizontalCoordinatesGenerator||W2e,O=d.horizontalPoints,P=d.verticalPoints;if((!O||!O.length)&&Xe(T)){var M=y&&y.length,R=T({yAxis:_?Yn(Yn({},_),{},{ticks:M?y:_.ticks}):void 0,width:l,height:u,offset:f},M?!0:w);ao(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Cu(R),"]")),Array.isArray(R)&&(O=R)}if((!P||!P.length)&&Xe(A)){var D=S&&S.length,I=A({xAxis:E?Yn(Yn({},E),{},{ticks:D?S:E.ticks}):void 0,width:l,height:u,offset:f},D?!0:w);ao(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Cu(I),"]")),Array.isArray(I)&&(P=I)}return ie.createElement("g",{className:"recharts-cartesian-grid"},ie.createElement(z2e,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),ie.createElement(V2e,Ul({},d,{offset:f,horizontalPoints:O,xAxis:E,yAxis:_})),ie.createElement(F2e,Ul({},d,{offset:f,verticalPoints:P,xAxis:E,yAxis:_})),ie.createElement(U2e,Ul({},d,{horizontalPoints:O})),ie.createElement(H2e,Ul({},d,{verticalPoints:P})))}IP.displayName="CartesianGrid";var K2e=["layout","type","stroke","connectNulls","isRange","ref"],Y2e=["key"],aJ;function Qf(e){"@babel/helpers - typeof";return Qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qf(e)}function oJ(e,t){if(e==null)return{};var n=X2e(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function X2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Hl(){return Hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hl.apply(this,arguments)}function DH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function os(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DH(Object(n),!0).forEach(function(r){sa(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Z2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,lJ(r.key),r)}}function Q2e(e,t,n){return t&&IH(e.prototype,t),n&&IH(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function J2e(e,t,n){return t=u0(t),eke(e,sJ()?Reflect.construct(t,n||[],u0(e).constructor):t.apply(e,n))}function eke(e,t){if(t&&(Qf(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 sJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(sJ=function(){return!!e})()}function u0(e){return u0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},u0(e)}function nke(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&&LP(e,t)}function LP(e,t){return LP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},LP(e,t)}function sa(e,t,n){return t=lJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lJ(e){var t=rke(e,"string");return Qf(t)=="symbol"?t:t+""}function rke(e,t){if(Qf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var vo=(function(e){function t(){var n;Z2e(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=J2e(this,t,[].concat(i)),sa(n,"state",{isAnimationFinished:!0}),sa(n,"id",Zm("recharts-area-")),sa(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),Xe(o)&&o()}),sa(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),Xe(o)&&o()}),n}return nke(t,e),Q2e(t,[{key:"renderDots",value:function(r,i,a){var o=this.props.isAnimationActive,l=this.state.isAnimationFinished;if(o&&!l)return null;var u=this.props,f=u.dot,d=u.points,h=u.dataKey,m=et(this.props,!1),g=et(f,!0),b=d.map(function(y,S){var E=os(os(os({key:"dot-".concat(S),r:3},m),g),{},{index:S,cx:y.x,cy:y.y,dataKey:h,value:y.value,payload:y.payload,points:d});return t.renderDotItem(f,E)}),w={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(a,")"):null};return ie.createElement(Jt,Hl({className:"recharts-area-dots"},w),b)}},{key:"renderHorizontalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,l=i.strokeWidth,u=o[0].x,f=o[o.length-1].x,d=r*Math.abs(u-f),h=Os(o.map(function(m){return m.y||0}));return Se(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(Os(a.map(function(m){return m.y||0})),h)),Se(h)?ie.createElement("rect",{x:u<f?u:u-d,y:0,width:d,height:Math.floor(h+(l?parseInt("".concat(l),10):1))}):null}},{key:"renderVerticalRect",value:function(r){var i=this.props,a=i.baseLine,o=i.points,l=i.strokeWidth,u=o[0].y,f=o[o.length-1].y,d=r*Math.abs(u-f),h=Os(o.map(function(m){return m.x||0}));return Se(a)&&typeof a=="number"?h=Math.max(a,h):a&&Array.isArray(a)&&a.length&&(h=Math.max(Os(a.map(function(m){return m.x||0})),h)),Se(h)?ie.createElement("rect",{x:0,y:u<f?u:u-d,width:h+(l?parseInt("".concat(l),10):1),height:Math.floor(d)}):null}},{key:"renderClipRect",value:function(r){var i=this.props.layout;return i==="vertical"?this.renderVerticalRect(r):this.renderHorizontalRect(r)}},{key:"renderAreaStatically",value:function(r,i,a,o){var l=this.props,u=l.layout,f=l.type,d=l.stroke,h=l.connectNulls,m=l.isRange;l.ref;var g=oJ(l,K2e);return ie.createElement(Jt,{clipPath:a?"url(#clipPath-".concat(o,")"):null},ie.createElement(fp,Hl({},et(g,!0),{points:r,connectNulls:h,type:f,baseLine:i,layout:u,stroke:"none",className:"recharts-area-area"})),d!=="none"&&ie.createElement(fp,Hl({},et(this.props,!1),{className:"recharts-area-curve",layout:u,type:f,connectNulls:h,fill:"none",points:r})),d!=="none"&&m&&ie.createElement(fp,Hl({},et(this.props,!1),{className:"recharts-area-curve",layout:u,type:f,connectNulls:h,fill:"none",points:i})))}},{key:"renderAreaWithAnimation",value:function(r,i){var a=this,o=this.props,l=o.points,u=o.baseLine,f=o.isAnimationActive,d=o.animationBegin,h=o.animationDuration,m=o.animationEasing,g=o.animationId,b=this.state,w=b.prevPoints,y=b.prevBaseLine;return ie.createElement(go,{begin:d,duration:h,isActive:f,easing:m,from:{t:0},to:{t:1},key:"area-".concat(g),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(S){var E=S.t;if(w){var _=w.length/l.length,A=l.map(function(M,R){var D=Math.floor(R*_);if(w[D]){var I=w[D],k=ii(I.x,M.x),F=ii(I.y,M.y);return os(os({},M),{},{x:k(E),y:F(E)})}return M}),T;if(Se(u)&&typeof u=="number"){var O=ii(y,u);T=O(E)}else if(ot(u)||_d(u)){var P=ii(y,0);T=P(E)}else T=u.map(function(M,R){var D=Math.floor(R*_);if(y[D]){var I=y[D],k=ii(I.x,M.x),F=ii(I.y,M.y);return os(os({},M),{},{x:k(E),y:F(E)})}return M});return a.renderAreaStatically(A,T,r,i)}return ie.createElement(Jt,null,ie.createElement("defs",null,ie.createElement("clipPath",{id:"animationClipPath-".concat(i)},a.renderClipRect(E))),ie.createElement(Jt,{clipPath:"url(#animationClipPath-".concat(i,")")},a.renderAreaStatically(l,u,r,i)))})}},{key:"renderArea",value:function(r,i){var a=this.props,o=a.points,l=a.baseLine,u=a.isAnimationActive,f=this.state,d=f.prevPoints,h=f.prevBaseLine,m=f.totalLength;return u&&o&&o.length&&(!d&&m>0||!Yp(d,o)||!Yp(h,l))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,l,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,l=i.points,u=i.className,f=i.top,d=i.left,h=i.xAxis,m=i.yAxis,g=i.width,b=i.height,w=i.isAnimationActive,y=i.id;if(a||!l||!l.length)return null;var S=this.state.isAnimationFinished,E=l.length===1,_=ut("recharts-area",u),A=h&&h.allowDataOverflow,T=m&&m.allowDataOverflow,O=A||T,P=ot(y)?this.id:y,M=(r=et(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},R=M.r,D=R===void 0?3:R,I=M.strokeWidth,k=I===void 0?2:I,F=wSe(o)?o:{},$=F.clipDot,q=$===void 0?!0:$,L=D*2+k;return ie.createElement(Jt,{className:_},A||T?ie.createElement("defs",null,ie.createElement("clipPath",{id:"clipPath-".concat(P)},ie.createElement("rect",{x:A?d:d-g/2,y:T?f:f-b/2,width:A?g:g*2,height:T?b:b*2})),!q&&ie.createElement("clipPath",{id:"clipPath-dots-".concat(P)},ie.createElement("rect",{x:d-L/2,y:f-L/2,width:g+L,height:b+L}))):null,E?null:this.renderArea(O,P),(o||E)&&this.renderDots(O,q,P),(!w||S)&&Bs.renderCallByParent(this.props,l))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])})(j.PureComponent);aJ=vo;sa(vo,"displayName","Area");sa(vo,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ed.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});sa(vo,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,l=o??a;if(Se(l)&&typeof l=="number")return l;var u=i==="horizontal"?r:n,f=u.scale.domain();if(u.type==="number"){var d=Math.max(f[0],f[1]),h=Math.min(f[0],f[1]);return l==="dataMin"?h:l==="dataMax"||d<0?d:Math.max(Math.min(f[0],f[1]),0)}return l==="dataMin"?f[0]:l==="dataMax"?f[1]:f[0]});sa(vo,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,l=e.bandSize,u=e.dataKey,f=e.stackedData,d=e.dataStartIndex,h=e.displayedData,m=e.offset,g=t.layout,b=f&&f.length,w=aJ.getBaseValue(t,n,r,i),y=g==="horizontal",S=!1,E=h.map(function(A,T){var O;b?O=f[d+T]:(O=Fr(A,u),Array.isArray(O)?S=!0:O=[w,O]);var P=O[1]==null||b&&Fr(A,u)==null;return y?{x:h6({axis:r,ticks:a,bandSize:l,entry:A,index:T}),y:P?null:i.scale(O[1]),value:O,payload:A}:{x:P?null:r.scale(O[1]),y:h6({axis:i,ticks:o,bandSize:l,entry:A,index:T}),value:O,payload:A}}),_;return b||S?_=E.map(function(A){var T=Array.isArray(A.value)?A.value[0]:null;return y?{x:A.x,y:T!=null&&A.y!=null?i.scale(T):null}:{x:T!=null?r.scale(T):null,y:A.y}}):_=y?i.scale(w):r.scale(w),os({points:E,baseLine:_,layout:g,isRange:S},m)});sa(vo,"renderDotItem",function(e,t){var n;if(ie.isValidElement(e))n=ie.cloneElement(e,t);else if(Xe(e))n=e(t);else{var r=ut("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=oJ(t,Y2e);n=ie.createElement(B2,Hl({},a,{key:i,className:r}))}return n});function Jf(e){"@babel/helpers - typeof";return Jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jf(e)}function ike(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ake(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fJ(r.key),r)}}function oke(e,t,n){return t&&ake(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ske(e,t,n){return t=c0(t),lke(e,uJ()?Reflect.construct(t,n||[],c0(e).constructor):t.apply(e,n))}function lke(e,t){if(t&&(Jf(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uke(e)}function uke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(uJ=function(){return!!e})()}function c0(e){return c0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},c0(e)}function cke(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&&$P(e,t)}function $P(e,t){return $P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},$P(e,t)}function cJ(e,t,n){return t=fJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fJ(e){var t=fke(e,"string");return Jf(t)=="symbol"?t:t+""}function fke(e,t){if(Jf(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Jf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function BP(){return BP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},BP.apply(this,arguments)}function dke(e){var t=e.xAxisId,n=F2(),r=U2(),i=WQ(t);return i==null?null:j.createElement(Cd,BP({},i,{className:ut("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return to(o,!0)}}))}var ed=(function(e){function t(){return ike(this,t),ske(this,t,arguments)}return cke(t,e),oke(t,[{key:"render",value:function(){return j.createElement(dke,this.props)}}])})(j.Component);cJ(ed,"displayName","XAxis");cJ(ed,"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 td(e){"@babel/helpers - typeof";return td=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},td(e)}function hke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,pJ(r.key),r)}}function mke(e,t,n){return t&&pke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gke(e,t,n){return t=f0(t),vke(e,dJ()?Reflect.construct(t,n||[],f0(e).constructor):t.apply(e,n))}function vke(e,t){if(t&&(td(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return yke(e)}function yke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(dJ=function(){return!!e})()}function f0(e){return f0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},f0(e)}function bke(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&&qP(e,t)}function qP(e,t){return qP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},qP(e,t)}function hJ(e,t,n){return t=pJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pJ(e){var t=xke(e,"string");return td(t)=="symbol"?t:t+""}function xke(e,t){if(td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(td(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function zP(){return zP=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zP.apply(this,arguments)}var wke=function(t){var n=t.yAxisId,r=F2(),i=U2(),a=KQ(n);return a==null?null:j.createElement(Cd,zP({},a,{className:ut("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(l){return to(l,!0)}}))},nd=(function(e){function t(){return hke(this,t),gke(this,t,arguments)}return bke(t,e),mke(t,[{key:"render",value:function(){return j.createElement(wke,this.props)}}])})(j.Component);hJ(nd,"displayName","YAxis");hJ(nd,"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 LH(e){return Ake(e)||Eke(e)||_ke(e)||Ske()}function Ske(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
442
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _ke(e,t){if(e){if(typeof e=="string")return VP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return VP(e,t)}}function Eke(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ake(e){if(Array.isArray(e))return VP(e)}function VP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var FP=function(t,n,r,i,a){var o=Ii(t,G2),l=Ii(t,zx),u=[].concat(LH(o),LH(l)),f=Ii(t,Fx),d="".concat(i,"Id"),h=i[0],m=n;if(u.length&&(m=u.reduce(function(w,y){if(y.props[d]===r&&fa(y.props,"extendDomain")&&Se(y.props[h])){var S=y.props[h];return[Math.min(w[0],S),Math.max(w[1],S)]}return w},m)),f.length){var g="".concat(h,"1"),b="".concat(h,"2");m=f.reduce(function(w,y){if(y.props[d]===r&&fa(y.props,"extendDomain")&&Se(y.props[g])&&Se(y.props[b])){var S=y.props[g],E=y.props[b];return[Math.min(w[0],S,E),Math.max(w[1],S,E)]}return w},m)}return a&&a.length&&(m=a.reduce(function(w,y){return Se(y)?[Math.min(w[0],y),Math.max(w[1],y)]:w},m)),m},hj={exports:{}},$H;function Tke(){return $H||($H=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(u,f,d){this.fn=u,this.context=f,this.once=d||!1}function a(u,f,d,h,m){if(typeof d!="function")throw new TypeError("The listener must be a function");var g=new i(d,h||u,m),b=n?n+f:f;return u._events[b]?u._events[b].fn?u._events[b]=[u._events[b],g]:u._events[b].push(g):(u._events[b]=g,u._eventsCount++),u}function o(u,f){--u._eventsCount===0?u._events=new r:delete u._events[f]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var f=[],d,h;if(this._eventsCount===0)return f;for(h in d=this._events)t.call(d,h)&&f.push(n?h.slice(1):h);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(d)):f},l.prototype.listeners=function(f){var d=n?n+f:f,h=this._events[d];if(!h)return[];if(h.fn)return[h.fn];for(var m=0,g=h.length,b=new Array(g);m<g;m++)b[m]=h[m].fn;return b},l.prototype.listenerCount=function(f){var d=n?n+f:f,h=this._events[d];return h?h.fn?1:h.length:0},l.prototype.emit=function(f,d,h,m,g,b){var w=n?n+f:f;if(!this._events[w])return!1;var y=this._events[w],S=arguments.length,E,_;if(y.fn){switch(y.once&&this.removeListener(f,y.fn,void 0,!0),S){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,d),!0;case 3:return y.fn.call(y.context,d,h),!0;case 4:return y.fn.call(y.context,d,h,m),!0;case 5:return y.fn.call(y.context,d,h,m,g),!0;case 6:return y.fn.call(y.context,d,h,m,g,b),!0}for(_=1,E=new Array(S-1);_<S;_++)E[_-1]=arguments[_];y.fn.apply(y.context,E)}else{var A=y.length,T;for(_=0;_<A;_++)switch(y[_].once&&this.removeListener(f,y[_].fn,void 0,!0),S){case 1:y[_].fn.call(y[_].context);break;case 2:y[_].fn.call(y[_].context,d);break;case 3:y[_].fn.call(y[_].context,d,h);break;case 4:y[_].fn.call(y[_].context,d,h,m);break;default:if(!E)for(T=1,E=new Array(S-1);T<S;T++)E[T-1]=arguments[T];y[_].fn.apply(y[_].context,E)}}return!0},l.prototype.on=function(f,d,h){return a(this,f,d,h,!1)},l.prototype.once=function(f,d,h){return a(this,f,d,h,!0)},l.prototype.removeListener=function(f,d,h,m){var g=n?n+f:f;if(!this._events[g])return this;if(!d)return o(this,g),this;var b=this._events[g];if(b.fn)b.fn===d&&(!m||b.once)&&(!h||b.context===h)&&o(this,g);else{for(var w=0,y=[],S=b.length;w<S;w++)(b[w].fn!==d||m&&!b[w].once||h&&b[w].context!==h)&&y.push(b[w]);y.length?this._events[g]=y.length===1?y[0]:y:o(this,g)}return this},l.prototype.removeAllListeners=function(f){var d;return f?(d=n?n+f:f,this._events[d]&&o(this,d)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(hj)),hj.exports}var Cke=Tke();const Oke=yt(Cke);var pj=new Oke,mj="recharts.syncMouseEvents";function vm(e){"@babel/helpers - typeof";return vm=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},vm(e)}function jke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,mJ(r.key),r)}}function Pke(e,t,n){return t&&Nke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gj(e,t,n){return t=mJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mJ(e){var t=Mke(e,"string");return vm(t)=="symbol"?t:t+""}function Mke(e,t){if(vm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(vm(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Rke=(function(){function e(){jke(this,e),gj(this,"activeIndex",0),gj(this,"coordinateList",[]),gj(this,"layout","horizontal")}return Pke(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,l=o===void 0?null:o,u=n.layout,f=u===void 0?null:u,d=n.offset,h=d===void 0?null:d,m=n.mouseHandlerCallback,g=m===void 0?null:m;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=l??this.container,this.layout=f??this.layout,this.offset=h??this.offset,this.mouseHandlerCallback=g??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,l=i.height,u=this.coordinateList[this.activeIndex].coordinate,f=((n=window)===null||n===void 0?void 0:n.scrollX)||0,d=((r=window)===null||r===void 0?void 0:r.scrollY)||0,h=a+u+f,m=o+this.offset.top+l/2+d;this.mouseHandlerCallback({pageX:h,pageY:m})}}}])})();function kke(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e==null?void 0:e[0],i=e==null?void 0:e[1];if(r&&i&&Se(r)&&Se(i))return!0}return!1}function Dke(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function gJ(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=Bn(t,n,r,i),l=Bn(t,n,r,a);return{points:[o,l],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function Ike(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,u=t.cy,f=t.innerRadius,d=t.outerRadius,h=t.angle,m=Bn(l,u,f,h),g=Bn(l,u,d,h);r=m.x,i=m.y,a=g.x,o=g.y}else return gJ(t);return[{x:r,y:i},{x:a,y:o}]}function ym(e){"@babel/helpers - typeof";return ym=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},ym(e)}function BH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function iy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?BH(Object(n),!0).forEach(function(r){Lke(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lke(e,t,n){return t=$ke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $ke(e){var t=Bke(e,"string");return ym(t)=="symbol"?t:t+""}function Bke(e,t){if(ym(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ym(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qke(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,l=e.activePayload,u=e.offset,f=e.activeTooltipIndex,d=e.tooltipAxisBandSize,h=e.layout,m=e.chartName,g=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!g||!a||!o||m!=="ScatterChart"&&i!=="axis")return null;var b,w=fp;if(m==="ScatterChart")b=o,w=JPe;else if(m==="BarChart")b=Dke(h,o,u,d),w=$2;else if(h==="radial"){var y=gJ(o),S=y.cx,E=y.cy,_=y.radius,A=y.startAngle,T=y.endAngle;b={cx:S,cy:E,startAngle:A,endAngle:T,innerRadius:_,outerRadius:_},w=_Q}else b={points:Ike(h,o,u)},w=fp;var O=iy(iy(iy(iy({stroke:"#ccc",pointerEvents:"none"},u),b),et(g,!1)),{},{payload:l,payloadIndex:f,className:ut("recharts-tooltip-cursor",g.className)});return j.isValidElement(g)?j.cloneElement(g,O):j.createElement(w,O)}var zke=["item"],Vke=["children","className","width","height","style","compact","title","desc"];function rd(e){"@babel/helpers - typeof";return rd=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},rd(e)}function Uc(){return Uc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uc.apply(this,arguments)}function qH(e,t){return Hke(e)||Uke(e,t)||yJ(e,t)||Fke()}function Fke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
443
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Uke(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,l=[],u=!0,f=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(u=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);u=!0);}catch(d){f=!0,i=d}finally{try{if(!u&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(f)throw i}}return l}}function Hke(e){if(Array.isArray(e))return e}function zH(e,t){if(e==null)return{};var n=Gke(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gke(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Wke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,bJ(r.key),r)}}function Yke(e,t,n){return t&&Kke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Xke(e,t,n){return t=d0(t),Zke(e,vJ()?Reflect.construct(t,n||[],d0(e).constructor):t.apply(e,n))}function Zke(e,t){if(t&&(rd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qke(e)}function Qke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vJ(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(vJ=function(){return!!e})()}function d0(e){return d0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},d0(e)}function Jke(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&&UP(e,t)}function UP(e,t){return UP=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},UP(e,t)}function id(e){return nDe(e)||tDe(e)||yJ(e)||eDe()}function eDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
444
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yJ(e,t){if(e){if(typeof e=="string")return HP(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return HP(e,t)}}function tDe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nDe(e){if(Array.isArray(e))return HP(e)}function HP(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VH(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VH(Object(n),!0).forEach(function(r){Be(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VH(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Be(e,t,n){return t=bJ(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bJ(e){var t=rDe(e,"string");return rd(t)=="symbol"?t:t+""}function rDe(e,t){if(rd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(rd(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iDe={xAxis:["bottom","top"],yAxis:["left","right"]},aDe={width:"100%",height:"100%"},xJ={x:0,y:0};function ay(e){return e}var oDe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},sDe=function(t,n,r,i){var a=n.find(function(d){return d&&d.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,l=i.radius;return me(me(me({},i),Bn(i.cx,i.cy,l,o)),{},{angle:o,radius:l})}var u=a.coordinate,f=i.angle;return me(me(me({},i),Bn(i.cx,i.cy,u,f)),{},{angle:f,radius:u})}return xJ},Ux=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(l,u){var f=u.props.data;return f&&f.length?[].concat(id(l),id(f)):l},[]);return o.length>0?o:t&&t.length&&Se(i)&&Se(a)?t.slice(i,a+1):[]};function wJ(e){return e==="number"?[0,"auto"]:void 0}var GP=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,l=Ux(n,t);return r<0||!a||!a.length||r>=l.length?null:a.reduce(function(u,f){var d,h=(d=f.props.data)!==null&&d!==void 0?d:n;h&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(h=h.slice(t.dataStartIndex,t.dataEndIndex+1));var m;if(o.dataKey&&!o.allowDuplicatedCategory){var g=h===void 0?l:h;m=yb(g,o.dataKey,i)}else m=h&&h[r]||l[r];return m?[].concat(id(u),[xQ(f,m)]):u},[])},FH=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=oDe(a,r),l=t.orderedTooltipTicks,u=t.tooltipAxis,f=t.tooltipTicks,d=ROe(o,l,f,u);if(d>=0&&f){var h=f[d]&&f[d].value,m=GP(t,n,d,h),g=sDe(r,l,d,a);return{activeTooltipIndex:d,activeLabel:h,activePayload:m,activeCoordinate:g}}return null},lDe=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,u=n.dataStartIndex,f=n.dataEndIndex,d=t.layout,h=t.children,m=t.stackOffset,g=vQ(d,a);return r.reduce(function(b,w){var y,S=w.type.defaultProps!==void 0?me(me({},w.type.defaultProps),w.props):w.props,E=S.type,_=S.dataKey,A=S.allowDataOverflow,T=S.allowDuplicatedCategory,O=S.scale,P=S.ticks,M=S.includeHidden,R=S[o];if(b[R])return b;var D=Ux(t.data,{graphicalItems:i.filter(function(V){var X,Y=o in V.props?V.props[o]:(X=V.type.defaultProps)===null||X===void 0?void 0:X[o];return Y===R}),dataStartIndex:u,dataEndIndex:f}),I=D.length,k,F,$;kke(S.domain,A,E)&&(k=cP(S.domain,null,A),g&&(E==="number"||O!=="auto")&&($=cp(D,_,"category")));var q=wJ(E);if(!k||k.length===0){var L,z=(L=S.domain)!==null&&L!==void 0?L:q;if(_){if(k=cp(D,_,E),E==="category"&&g){var U=fSe(k);T&&U?(F=k,k=Jb(0,I)):T||(k=v6(z,k,w).reduce(function(V,X){return V.indexOf(X)>=0?V:[].concat(id(V),[X])},[]))}else if(E==="category")T?k=k.filter(function(V){return V!==""&&!ot(V)}):k=v6(z,k,w).reduce(function(V,X){return V.indexOf(X)>=0||X===""||ot(X)?V:[].concat(id(V),[X])},[]);else if(E==="number"){var K=$Oe(D,i.filter(function(V){var X,Y,G=o in V.props?V.props[o]:(X=V.type.defaultProps)===null||X===void 0?void 0:X[o],Q="hide"in V.props?V.props.hide:(Y=V.type.defaultProps)===null||Y===void 0?void 0:Y.hide;return G===R&&(M||!Q)}),_,a,d);K&&(k=K)}g&&(E==="number"||O!=="auto")&&($=cp(D,_,"category"))}else g?k=Jb(0,I):l&&l[R]&&l[R].hasStack&&E==="number"?k=m==="expand"?[0,1]:bQ(l[R].stackGroups,u,f):k=gQ(D,i.filter(function(V){var X=o in V.props?V.props[o]:V.type.defaultProps[o],Y="hide"in V.props?V.props.hide:V.type.defaultProps.hide;return X===R&&(M||!Y)}),E,d,!0);if(E==="number")k=FP(h,k,R,a,P),z&&(k=cP(z,k,A));else if(E==="category"&&z){var Z=z,H=k.every(function(V){return Z.indexOf(V)>=0});H&&(k=Z)}}return me(me({},b),{},Be({},R,me(me({},S),{},{axisType:a,domain:k,categoricalDomain:$,duplicateDomain:F,originalDomain:(y=S.domain)!==null&&y!==void 0?y:q,isCategorical:g,layout:d})))},{})},uDe=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,l=n.stackGroups,u=n.dataStartIndex,f=n.dataEndIndex,d=t.layout,h=t.children,m=Ux(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:f}),g=m.length,b=vQ(d,a),w=-1;return r.reduce(function(y,S){var E=S.type.defaultProps!==void 0?me(me({},S.type.defaultProps),S.props):S.props,_=E[o],A=wJ("number");if(!y[_]){w++;var T;return b?T=Jb(0,g):l&&l[_]&&l[_].hasStack?(T=bQ(l[_].stackGroups,u,f),T=FP(h,T,_,a)):(T=cP(A,gQ(m,r.filter(function(O){var P,M,R=o in O.props?O.props[o]:(P=O.type.defaultProps)===null||P===void 0?void 0:P[o],D="hide"in O.props?O.props.hide:(M=O.type.defaultProps)===null||M===void 0?void 0:M.hide;return R===_&&!D}),"number",d),i.defaultProps.allowDataOverflow),T=FP(h,T,_,a)),me(me({},y),{},Be({},_,me(me({axisType:a},i.defaultProps),{},{hide:!0,orientation:si(iDe,"".concat(a,".").concat(w%2),null),domain:T,originalDomain:A,isCategorical:b,layout:d})))}return y},{})},cDe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,u=n.dataStartIndex,f=n.dataEndIndex,d=t.children,h="".concat(i,"Id"),m=Ii(d,a),g={};return m&&m.length?g=lDe(t,{axes:m,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:u,dataEndIndex:f}):o&&o.length&&(g=uDe(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:h,stackGroups:l,dataStartIndex:u,dataEndIndex:f})),g},fDe=function(t){var n=ps(t),r=to(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:p2(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Fb(n,r)}},UH=function(t){var n=t.children,r=t.defaultShowTooltip,i=kr(n,Gf),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},dDe=function(t){return!t||!t.length?!1:t.some(function(n){var r=io(n&&n.type);return r&&r.indexOf("Bar")>=0})},HH=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"}},hDe=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,l=t.yAxisMap,u=l===void 0?{}:l,f=r.width,d=r.height,h=r.children,m=r.margin||{},g=kr(h,Gf),b=kr(h,Ls),w=Object.keys(u).reduce(function(T,O){var P=u[O],M=P.orientation;return!P.mirror&&!P.hide?me(me({},T),{},Be({},M,T[M]+P.width)):T},{left:m.left||0,right:m.right||0}),y=Object.keys(o).reduce(function(T,O){var P=o[O],M=P.orientation;return!P.mirror&&!P.hide?me(me({},T),{},Be({},M,si(T,"".concat(M))+P.height)):T},{top:m.top||0,bottom:m.bottom||0}),S=me(me({},y),w),E=S.bottom;g&&(S.bottom+=g.props.height||Gf.defaultProps.height),b&&n&&(S=IOe(S,i,r,n));var _=f-S.left-S.right,A=d-S.top-S.bottom;return me(me({brushBottom:E},S),{},{width:Math.max(_,0),height:Math.max(A,0)})},pDe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},SJ=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,u=t.axisComponents,f=t.legendContent,d=t.formatAxisMap,h=t.defaultProps,m=function(S,E){var _=E.graphicalItems,A=E.stackGroups,T=E.offset,O=E.updateId,P=E.dataStartIndex,M=E.dataEndIndex,R=S.barSize,D=S.layout,I=S.barGap,k=S.barCategoryGap,F=S.maxBarSize,$=HH(D),q=$.numericAxisName,L=$.cateAxisName,z=dDe(_),U=[];return _.forEach(function(K,Z){var H=Ux(S.data,{graphicalItems:[K],dataStartIndex:P,dataEndIndex:M}),V=K.type.defaultProps!==void 0?me(me({},K.type.defaultProps),K.props):K.props,X=V.dataKey,Y=V.maxBarSize,G=V["".concat(q,"Id")],Q=V["".concat(L,"Id")],J={},re=u.reduce(function(Ut,Pt){var Et=E["".concat(Pt.axisType,"Map")],At=V["".concat(Pt.axisType,"Id")];Et&&Et[At]||Pt.axisType==="zAxis"||Tu();var Ge=Et[At];return me(me({},Ut),{},Be(Be({},Pt.axisType,Ge),"".concat(Pt.axisType,"Ticks"),to(Ge)))},J),ne=re[L],fe=re["".concat(L,"Ticks")],he=A&&A[G]&&A[G].hasStack&&XOe(K,A[G].stackGroups),oe=io(K.type).indexOf("Bar")>=0,ye=Fb(ne,fe),be=[],xe=z&&kOe({barSize:R,stackGroups:A,totalSize:pDe(re,L)});if(oe){var Ee,_e,tt=ot(Y)?F:Y,nt=(Ee=(_e=Fb(ne,fe,!0))!==null&&_e!==void 0?_e:tt)!==null&&Ee!==void 0?Ee:0;be=DOe({barGap:I,barCategoryGap:k,bandSize:nt!==ye?nt:ye,sizeList:xe[Q],maxBarSize:tt}),nt!==ye&&(be=be.map(function(Ut){return me(me({},Ut),{},{position:me(me({},Ut.position),{},{offset:Ut.position.offset-nt/2})})}))}var It=K&&K.type&&K.type.getComposedData;It&&U.push({props:me(me({},It(me(me({},re),{},{displayedData:H,props:S,dataKey:X,item:K,bandSize:ye,barPosition:be,offset:T,stackedData:he,layout:D,dataStartIndex:P,dataEndIndex:M}))),{},Be(Be(Be({key:K.key||"item-".concat(Z)},q,re[q]),L,re[L]),"animationId",O)),childIndex:ESe(K,S.children),item:K})}),U},g=function(S,E){var _=S.props,A=S.dataStartIndex,T=S.dataEndIndex,O=S.updateId;if(!IF({props:_}))return null;var P=_.children,M=_.layout,R=_.stackOffset,D=_.data,I=_.reverseStackOrder,k=HH(M),F=k.numericAxisName,$=k.cateAxisName,q=Ii(P,r),L=WOe(D,q,"".concat(F,"Id"),"".concat($,"Id"),R,I),z=u.reduce(function(V,X){var Y="".concat(X.axisType,"Map");return me(me({},V),{},Be({},Y,cDe(_,me(me({},X),{},{graphicalItems:q,stackGroups:X.axisType===F&&L,dataStartIndex:A,dataEndIndex:T}))))},{}),U=hDe(me(me({},z),{},{props:_,graphicalItems:q}),E==null?void 0:E.legendBBox);Object.keys(z).forEach(function(V){z[V]=d(_,z[V],U,V.replace("Map",""),n)});var K=z["".concat($,"Map")],Z=fDe(K),H=m(_,me(me({},z),{},{dataStartIndex:A,dataEndIndex:T,updateId:O,graphicalItems:q,stackGroups:L,offset:U}));return me(me({formattedGraphicalItems:H,graphicalItems:q,offset:U,stackGroups:L},Z),z)},b=(function(y){function S(E){var _,A,T;return Wke(this,S),T=Xke(this,S,[E]),Be(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Be(T,"accessibilityManager",new Rke),Be(T,"handleLegendBBoxUpdate",function(O){if(O){var P=T.state,M=P.dataStartIndex,R=P.dataEndIndex,D=P.updateId;T.setState(me({legendBBox:O},g({props:T.props,dataStartIndex:M,dataEndIndex:R,updateId:D},me(me({},T.state),{},{legendBBox:O}))))}}),Be(T,"handleReceiveSyncEvent",function(O,P,M){if(T.props.syncId===O){if(M===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(P)}}),Be(T,"handleBrushChange",function(O){var P=O.startIndex,M=O.endIndex;if(P!==T.state.dataStartIndex||M!==T.state.dataEndIndex){var R=T.state.updateId;T.setState(function(){return me({dataStartIndex:P,dataEndIndex:M},g({props:T.props,dataStartIndex:P,dataEndIndex:M,updateId:R},T.state))}),T.triggerSyncEvent({dataStartIndex:P,dataEndIndex:M})}}),Be(T,"handleMouseEnter",function(O){var P=T.getMouseInfo(O);if(P){var M=me(me({},P),{},{isTooltipActive:!0});T.setState(M),T.triggerSyncEvent(M);var R=T.props.onMouseEnter;Xe(R)&&R(M,O)}}),Be(T,"triggeredAfterMouseMove",function(O){var P=T.getMouseInfo(O),M=P?me(me({},P),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(M),T.triggerSyncEvent(M);var R=T.props.onMouseMove;Xe(R)&&R(M,O)}),Be(T,"handleItemMouseEnter",function(O){T.setState(function(){return{isTooltipActive:!0,activeItem:O,activePayload:O.tooltipPayload,activeCoordinate:O.tooltipPosition||{x:O.cx,y:O.cy}}})}),Be(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),Be(T,"handleMouseMove",function(O){O.persist(),T.throttleTriggeredAfterMouseMove(O)}),Be(T,"handleMouseLeave",function(O){T.throttleTriggeredAfterMouseMove.cancel();var P={isTooltipActive:!1};T.setState(P),T.triggerSyncEvent(P);var M=T.props.onMouseLeave;Xe(M)&&M(P,O)}),Be(T,"handleOuterEvent",function(O){var P=_Se(O),M=si(T.props,"".concat(P));if(P&&Xe(M)){var R,D;/.*touch.*/i.test(P)?D=T.getMouseInfo(O.changedTouches[0]):D=T.getMouseInfo(O),M((R=D)!==null&&R!==void 0?R:{},O)}}),Be(T,"handleClick",function(O){var P=T.getMouseInfo(O);if(P){var M=me(me({},P),{},{isTooltipActive:!0});T.setState(M),T.triggerSyncEvent(M);var R=T.props.onClick;Xe(R)&&R(M,O)}}),Be(T,"handleMouseDown",function(O){var P=T.props.onMouseDown;if(Xe(P)){var M=T.getMouseInfo(O);P(M,O)}}),Be(T,"handleMouseUp",function(O){var P=T.props.onMouseUp;if(Xe(P)){var M=T.getMouseInfo(O);P(M,O)}}),Be(T,"handleTouchMove",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(O.changedTouches[0])}),Be(T,"handleTouchStart",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&T.handleMouseDown(O.changedTouches[0])}),Be(T,"handleTouchEnd",function(O){O.changedTouches!=null&&O.changedTouches.length>0&&T.handleMouseUp(O.changedTouches[0])}),Be(T,"handleDoubleClick",function(O){var P=T.props.onDoubleClick;if(Xe(P)){var M=T.getMouseInfo(O);P(M,O)}}),Be(T,"handleContextMenu",function(O){var P=T.props.onContextMenu;if(Xe(P)){var M=T.getMouseInfo(O);P(M,O)}}),Be(T,"triggerSyncEvent",function(O){T.props.syncId!==void 0&&pj.emit(mj,T.props.syncId,O,T.eventEmitterSymbol)}),Be(T,"applySyncEvent",function(O){var P=T.props,M=P.layout,R=P.syncMethod,D=T.state.updateId,I=O.dataStartIndex,k=O.dataEndIndex;if(O.dataStartIndex!==void 0||O.dataEndIndex!==void 0)T.setState(me({dataStartIndex:I,dataEndIndex:k},g({props:T.props,dataStartIndex:I,dataEndIndex:k,updateId:D},T.state)));else if(O.activeTooltipIndex!==void 0){var F=O.chartX,$=O.chartY,q=O.activeTooltipIndex,L=T.state,z=L.offset,U=L.tooltipTicks;if(!z)return;if(typeof R=="function")q=R(U,O);else if(R==="value"){q=-1;for(var K=0;K<U.length;K++)if(U[K].value===O.activeLabel){q=K;break}}var Z=me(me({},z),{},{x:z.left,y:z.top}),H=Math.min(F,Z.x+Z.width),V=Math.min($,Z.y+Z.height),X=U[q]&&U[q].value,Y=GP(T.state,T.props.data,q),G=U[q]?{x:M==="horizontal"?U[q].coordinate:H,y:M==="horizontal"?V:U[q].coordinate}:xJ;T.setState(me(me({},O),{},{activeLabel:X,activeCoordinate:G,activePayload:Y,activeTooltipIndex:q}))}else T.setState(O)}),Be(T,"renderCursor",function(O){var P,M=T.state,R=M.isTooltipActive,D=M.activeCoordinate,I=M.activePayload,k=M.offset,F=M.activeTooltipIndex,$=M.tooltipAxisBandSize,q=T.getTooltipEventType(),L=(P=O.props.active)!==null&&P!==void 0?P:R,z=T.props.layout,U=O.key||"_recharts-cursor";return ie.createElement(qke,{key:U,activeCoordinate:D,activePayload:I,activeTooltipIndex:F,chartName:n,element:O,isActive:L,layout:z,offset:k,tooltipAxisBandSize:$,tooltipEventType:q})}),Be(T,"renderPolarAxis",function(O,P,M){var R=si(O,"type.axisType"),D=si(T.state,"".concat(R,"Map")),I=O.type.defaultProps,k=I!==void 0?me(me({},I),O.props):O.props,F=D&&D[k["".concat(R,"Id")]];return j.cloneElement(O,me(me({},F),{},{className:ut(R,F.className),key:O.key||"".concat(P,"-").concat(M),ticks:to(F,!0)}))}),Be(T,"renderPolarGrid",function(O){var P=O.props,M=P.radialLines,R=P.polarAngles,D=P.polarRadius,I=T.state,k=I.radiusAxisMap,F=I.angleAxisMap,$=ps(k),q=ps(F),L=q.cx,z=q.cy,U=q.innerRadius,K=q.outerRadius;return j.cloneElement(O,{polarAngles:Array.isArray(R)?R:to(q,!0).map(function(Z){return Z.coordinate}),polarRadius:Array.isArray(D)?D:to($,!0).map(function(Z){return Z.coordinate}),cx:L,cy:z,innerRadius:U,outerRadius:K,key:O.key||"polar-grid",radialLines:M})}),Be(T,"renderLegend",function(){var O=T.state.formattedGraphicalItems,P=T.props,M=P.children,R=P.width,D=P.height,I=T.props.margin||{},k=R-(I.left||0)-(I.right||0),F=pQ({children:M,formattedGraphicalItems:O,legendWidth:k,legendContent:f});if(!F)return null;var $=F.item,q=zH(F,zke);return j.cloneElement($,me(me({},q),{},{chartWidth:R,chartHeight:D,margin:I,onBBoxUpdate:T.handleLegendBBoxUpdate}))}),Be(T,"renderTooltip",function(){var O,P=T.props,M=P.children,R=P.accessibilityLayer,D=kr(M,Ci);if(!D)return null;var I=T.state,k=I.isTooltipActive,F=I.activeCoordinate,$=I.activePayload,q=I.activeLabel,L=I.offset,z=(O=D.props.active)!==null&&O!==void 0?O:k;return j.cloneElement(D,{viewBox:me(me({},L),{},{x:L.left,y:L.top}),active:z,label:q,payload:z?$:[],coordinate:F,accessibilityLayer:R})}),Be(T,"renderBrush",function(O){var P=T.props,M=P.margin,R=P.data,D=T.state,I=D.offset,k=D.dataStartIndex,F=D.dataEndIndex,$=D.updateId;return j.cloneElement(O,{key:O.key||"_recharts-brush",onChange:ey(T.handleBrushChange,O.props.onChange),data:R,x:Se(O.props.x)?O.props.x:I.left,y:Se(O.props.y)?O.props.y:I.top+I.height+I.brushBottom-(M.bottom||0),width:Se(O.props.width)?O.props.width:I.width,startIndex:k,endIndex:F,updateId:"brush-".concat($)})}),Be(T,"renderReferenceElement",function(O,P,M){if(!O)return null;var R=T,D=R.clipPathId,I=T.state,k=I.xAxisMap,F=I.yAxisMap,$=I.offset,q=O.type.defaultProps||{},L=O.props,z=L.xAxisId,U=z===void 0?q.xAxisId:z,K=L.yAxisId,Z=K===void 0?q.yAxisId:K;return j.cloneElement(O,{key:O.key||"".concat(P,"-").concat(M),xAxis:k[U],yAxis:F[Z],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:D})}),Be(T,"renderActivePoints",function(O){var P=O.item,M=O.activePoint,R=O.basePoint,D=O.childIndex,I=O.isRange,k=[],F=P.props.key,$=P.item.type.defaultProps!==void 0?me(me({},P.item.type.defaultProps),P.item.props):P.item.props,q=$.activeDot,L=$.dataKey,z=me(me({index:D,dataKey:L,cx:M.x,cy:M.y,r:4,fill:L2(P.item),strokeWidth:2,stroke:"#fff",payload:M.payload,value:M.value},et(q,!1)),bb(q));return k.push(S.renderActiveDot(q,z,"".concat(F,"-activePoint-").concat(D))),R?k.push(S.renderActiveDot(q,me(me({},z),{},{cx:R.x,cy:R.y}),"".concat(F,"-basePoint-").concat(D))):I&&k.push(null),k}),Be(T,"renderGraphicChild",function(O,P,M){var R=T.filterFormatItem(O,P,M);if(!R)return null;var D=T.getTooltipEventType(),I=T.state,k=I.isTooltipActive,F=I.tooltipAxis,$=I.activeTooltipIndex,q=I.activeLabel,L=T.props.children,z=kr(L,Ci),U=R.props,K=U.points,Z=U.isRange,H=U.baseLine,V=R.item.type.defaultProps!==void 0?me(me({},R.item.type.defaultProps),R.item.props):R.item.props,X=V.activeDot,Y=V.hide,G=V.activeBar,Q=V.activeShape,J=!!(!Y&&k&&z&&(X||G||Q)),re={};D!=="axis"&&z&&z.props.trigger==="click"?re={onClick:ey(T.handleItemMouseEnter,O.props.onClick)}:D!=="axis"&&(re={onMouseLeave:ey(T.handleItemMouseLeave,O.props.onMouseLeave),onMouseEnter:ey(T.handleItemMouseEnter,O.props.onMouseEnter)});var ne=j.cloneElement(O,me(me({},R.props),re));function fe(Pt){return typeof F.dataKey=="function"?F.dataKey(Pt.payload):null}if(J)if($>=0){var he,oe;if(F.dataKey&&!F.allowDuplicatedCategory){var ye=typeof F.dataKey=="function"?fe:"payload.".concat(F.dataKey.toString());he=yb(K,ye,q),oe=Z&&H&&yb(H,ye,q)}else he=K==null?void 0:K[$],oe=Z&&H&&H[$];if(Q||G){var be=O.props.activeIndex!==void 0?O.props.activeIndex:$;return[j.cloneElement(O,me(me(me({},R.props),re),{},{activeIndex:be})),null,null]}if(!ot(he))return[ne].concat(id(T.renderActivePoints({item:R,activePoint:he,basePoint:oe,childIndex:$,isRange:Z})))}else{var xe,Ee=(xe=T.getItemByXY(T.state.activeCoordinate))!==null&&xe!==void 0?xe:{graphicalItem:ne},_e=Ee.graphicalItem,tt=_e.item,nt=tt===void 0?O:tt,It=_e.childIndex,Ut=me(me(me({},R.props),re),{},{activeIndex:It});return[j.cloneElement(nt,Ut),null,null]}return Z?[ne,null,null]:[ne,null]}),Be(T,"renderCustomized",function(O,P,M){return j.cloneElement(O,me(me({key:"recharts-customized-".concat(M)},T.props),T.state))}),Be(T,"renderMap",{CartesianGrid:{handler:ay,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:ay},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:ay},YAxis:{handler:ay},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((_=E.id)!==null&&_!==void 0?_:Zm("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=yZ(T.triggeredAfterMouseMove,(A=E.throttleDelay)!==null&&A!==void 0?A:1e3/60),T.state={},T}return Jke(S,y),Yke(S,[{key:"componentDidMount",value:function(){var _,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(_=this.props.margin.left)!==null&&_!==void 0?_:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var _=this.props,A=_.children,T=_.data,O=_.height,P=_.layout,M=kr(A,Ci);if(M){var R=M.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var D=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,I=GP(this.state,T,R,D),k=this.state.tooltipTicks[R].coordinate,F=(this.state.offset.top+O)/2,$=P==="horizontal",q=$?{x:k,y:F}:{y:k,x:F},L=this.state.formattedGraphicalItems.find(function(U){var K=U.item;return K.type.name==="Scatter"});L&&(q=me(me({},q),L.props.points[R].tooltipPosition),I=L.props.points[R].tooltipPayload);var z={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:D,activePayload:I,activeCoordinate:q};this.setState(z),this.renderCursor(M),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(_,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==_.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==_.margin){var T,O;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0}})}return null}},{key:"componentDidUpdate",value:function(_){kN([kr(_.children,Ci)],[kr(this.props.children,Ci)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var _=kr(this.props.children,Ci);if(_&&typeof _.props.shared=="boolean"){var A=_.props.shared?"axis":"item";return l.indexOf(A)>=0?A:a}return a}},{key:"getMouseInfo",value:function(_){if(!this.container)return null;var A=this.container,T=A.getBoundingClientRect(),O=QEe(T),P={chartX:Math.round(_.pageX-O.left),chartY:Math.round(_.pageY-O.top)},M=T.width/A.offsetWidth||1,R=this.inRange(P.chartX,P.chartY,M);if(!R)return null;var D=this.state,I=D.xAxisMap,k=D.yAxisMap,F=this.getTooltipEventType(),$=FH(this.state,this.props.data,this.props.layout,R);if(F!=="axis"&&I&&k){var q=ps(I).scale,L=ps(k).scale,z=q&&q.invert?q.invert(P.chartX):null,U=L&&L.invert?L.invert(P.chartY):null;return me(me({},P),{},{xValue:z,yValue:U},$)}return $?me(me({},P),$):null}},{key:"inRange",value:function(_,A){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,O=this.props.layout,P=_/T,M=A/T;if(O==="horizontal"||O==="vertical"){var R=this.state.offset,D=P>=R.left&&P<=R.left+R.width&&M>=R.top&&M<=R.top+R.height;return D?{x:P,y:M}:null}var I=this.state,k=I.angleAxisMap,F=I.radiusAxisMap;if(k&&F){var $=ps(k);return x6({x:P,y:M},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var _=this.props.children,A=this.getTooltipEventType(),T=kr(_,Ci),O={};T&&A==="axis"&&(T.props.trigger==="click"?O={onClick:this.handleClick}:O={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 P=bb(this.props,this.handleOuterEvent);return me(me({},P),O)}},{key:"addListener",value:function(){pj.on(mj,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){pj.removeListener(mj,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(_,A,T){for(var O=this.state.formattedGraphicalItems,P=0,M=O.length;P<M;P++){var R=O[P];if(R.item===_||R.props.key===_.key||A===io(R.item.type)&&T===R.childIndex)return R}return null}},{key:"renderClipPath",value:function(){var _=this.clipPathId,A=this.state.offset,T=A.left,O=A.top,P=A.height,M=A.width;return ie.createElement("defs",null,ie.createElement("clipPath",{id:_},ie.createElement("rect",{x:T,y:O,height:P,width:M})))}},{key:"getXScales",value:function(){var _=this.state.xAxisMap;return _?Object.entries(_).reduce(function(A,T){var O=qH(T,2),P=O[0],M=O[1];return me(me({},A),{},Be({},P,M.scale))},{}):null}},{key:"getYScales",value:function(){var _=this.state.yAxisMap;return _?Object.entries(_).reduce(function(A,T){var O=qH(T,2),P=O[0],M=O[1];return me(me({},A),{},Be({},P,M.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(_){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[_])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(_){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[_])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(_){var A=this.state,T=A.formattedGraphicalItems,O=A.activeItem;if(T&&T.length)for(var P=0,M=T.length;P<M;P++){var R=T[P],D=R.props,I=R.item,k=I.type.defaultProps!==void 0?me(me({},I.type.defaultProps),I.props):I.props,F=io(I.type);if(F==="Bar"){var $=(D.data||[]).find(function(U){return FPe(_,U)});if($)return{graphicalItem:R,payload:$}}else if(F==="RadialBar"){var q=(D.data||[]).find(function(U){return x6(_,U)});if(q)return{graphicalItem:R,payload:q}}else if(Lx(R,O)||$x(R,O)||dm(R,O)){var L=PMe({graphicalItem:R,activeTooltipItem:O,itemData:k.data}),z=k.activeIndex===void 0?L:k.activeIndex;return{graphicalItem:me(me({},R),{},{childIndex:z}),payload:dm(R,O)?k.data[L]:R.props.data[L]}}}return null}},{key:"render",value:function(){var _=this;if(!IF(this))return null;var A=this.props,T=A.children,O=A.className,P=A.width,M=A.height,R=A.style,D=A.compact,I=A.title,k=A.desc,F=zH(A,Vke),$=et(F,!1);if(D)return ie.createElement(SH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ie.createElement(IN,Uc({},$,{width:P,height:M,title:I,desc:k}),this.renderClipPath(),$F(T,this.renderMap)));if(this.props.accessibilityLayer){var q,L;$.tabIndex=(q=this.props.tabIndex)!==null&&q!==void 0?q:0,$.role=(L=this.props.role)!==null&&L!==void 0?L:"application",$.onKeyDown=function(U){_.accessibilityManager.keyboardEvent(U)},$.onFocus=function(){_.accessibilityManager.focus()}}var z=this.parseEventsOfWrapper();return ie.createElement(SH,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},ie.createElement("div",Uc({className:ut("recharts-wrapper",O),style:me({position:"relative",cursor:"default",width:P,height:M},R)},z,{ref:function(K){_.container=K}}),ie.createElement(IN,Uc({},$,{width:P,height:M,title:I,desc:k,style:aDe}),this.renderClipPath(),$F(T,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(j.Component);Be(b,"displayName",n),Be(b,"defaultProps",me({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},h)),Be(b,"getDerivedStateFromProps",function(y,S){var E=y.dataKey,_=y.data,A=y.children,T=y.width,O=y.height,P=y.layout,M=y.stackOffset,R=y.margin,D=S.dataStartIndex,I=S.dataEndIndex;if(S.updateId===void 0){var k=UH(y);return me(me(me({},k),{},{updateId:0},g(me(me({props:y},k),{},{updateId:0}),S)),{},{prevDataKey:E,prevData:_,prevWidth:T,prevHeight:O,prevLayout:P,prevStackOffset:M,prevMargin:R,prevChildren:A})}if(E!==S.prevDataKey||_!==S.prevData||T!==S.prevWidth||O!==S.prevHeight||P!==S.prevLayout||M!==S.prevStackOffset||!ef(R,S.prevMargin)){var F=UH(y),$={chartX:S.chartX,chartY:S.chartY,isTooltipActive:S.isTooltipActive},q=me(me({},FH(S,_,P)),{},{updateId:S.updateId+1}),L=me(me(me({},F),$),q);return me(me(me({},L),g(me({props:y},L),S)),{},{prevDataKey:E,prevData:_,prevWidth:T,prevHeight:O,prevLayout:P,prevStackOffset:M,prevMargin:R,prevChildren:A})}if(!kN(A,S.prevChildren)){var z,U,K,Z,H=kr(A,Gf),V=H&&(z=(U=H.props)===null||U===void 0?void 0:U.startIndex)!==null&&z!==void 0?z:D,X=H&&(K=(Z=H.props)===null||Z===void 0?void 0:Z.endIndex)!==null&&K!==void 0?K:I,Y=V!==D||X!==I,G=!ot(_),Q=G&&!Y?S.updateId:S.updateId+1;return me(me({updateId:Q},g(me(me({props:y},S),{},{updateId:Q,dataStartIndex:V,dataEndIndex:X}),S)),{},{prevChildren:A,dataStartIndex:V,dataEndIndex:X})}return null}),Be(b,"renderActiveDot",function(y,S,E){var _;return j.isValidElement(y)?_=j.cloneElement(y,S):Xe(y)?_=y(S):_=ie.createElement(B2,S),ie.createElement(Jt,{className:"recharts-active-dot",key:E},_)});var w=j.forwardRef(function(S,E){return ie.createElement(b,Uc({},S,{ref:E}))});return w.displayName=b.displayName,w},mDe=SJ({chartName:"BarChart",GraphicalChild:Ks,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:ed},{axisType:"yAxis",AxisComp:nd}],formatAxisMap:BQ}),gDe=SJ({chartName:"AreaChart",GraphicalChild:vo,axisComponents:[{axisType:"xAxis",AxisComp:ed},{axisType:"yAxis",AxisComp:nd}],formatAxisMap:BQ});const _J=j.createContext(null);function vDe(){const e=j.useContext(_J);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const WP=j.forwardRef(({config:e,children:t,className:n,style:r,...i},a)=>{const o=j.useMemo(()=>{const l={};for(const[u,f]of Object.entries(e))f.color&&(l[`--color-${u}`]=f.color);return l},[e]);return x.jsx(_J.Provider,{value:{config:e},children:x.jsx("div",{ref:a,className:Ce("flex aspect-video justify-center [&_.recharts-wrapper]:outline-none [&_.recharts-surface]:outline-none [&_*:focus]:outline-none [&_*:focus-visible]:outline-none",n),style:{...o,...r},...i,children:x.jsx(HEe,{width:"100%",height:"100%",children:t})})})});WP.displayName="ChartContainer";const yDe=j.forwardRef(({active:e,payload:t,label:n,hideLabel:r=!1,indicator:i="dot",className:a},o)=>{const{config:l}=vDe();return!e||!(t!=null&&t.length)?null:x.jsxs("div",{ref:o,className:Ce("border bg-background px-3 py-2 text-xs shadow-md",a),children:[!r&&n&&x.jsx("div",{className:"mb-1.5 font-medium",children:n}),x.jsx("div",{className:"flex flex-col gap-1",children:t.map((u,f)=>{const d=u.dataKey||u.name,h=l[d],m=u.color||(h==null?void 0:h.color);return x.jsxs("div",{className:"flex items-center gap-2",children:[i==="dot"&&x.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:m}}),i==="line"&&x.jsx("div",{className:"h-0.5 w-3",style:{backgroundColor:m}}),x.jsxs("span",{className:"text-muted-foreground",children:[(h==null?void 0:h.label)||d,":"]}),x.jsx("span",{className:"font-medium",children:u.value})]},f.toString())})})]})});yDe.displayName="ChartTooltipContent";function Pl({className:e,...t}){return x.jsx("div",{className:Ce("animate-pulse bg-primary/10",e),...t})}const bDe={completed:{label:"Completed",color:"hsl(var(--chart-completed))"},failed:{label:"Failed",color:"hsl(var(--chart-failed))"}},xDe={duration:{label:"Duration",color:"hsl(var(--chart-duration))"},waitTime:{label:"Wait Time",color:"hsl(var(--chart-wait))"}};function EJ(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}function GH(e){return new Date(e).toLocaleTimeString([],{hour:"numeric"})}function AJ(e){return`${(e*100).toFixed(1)}%`}function wDe({active:e,payload:t,label:n}){return!e||!t||!n?null:x.jsxs("div",{className:" border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[x.jsx("p",{className:"text-xs font-medium mb-1.5",children:EJ(n)}),x.jsx("div",{className:"space-y-1",children:t.map(r=>x.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[x.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:r.color}}),x.jsxs("span",{className:"text-muted-foreground",children:[r.name,":"]}),x.jsx("span",{className:"font-medium tabular-nums",children:r.value})]},r.name))})]})}function SDe({active:e,payload:t,label:n}){if(!e||!t||!n)return null;const r=(i,a)=>i==="duration"?"hsl(var(--chart-duration))":i==="waitTime"?"hsl(var(--chart-wait))":a||"hsl(var(--muted-foreground))";return x.jsxs("div",{className:" border bg-popover px-3 py-2 text-popover-foreground shadow-md",children:[x.jsx("p",{className:"text-xs font-medium mb-1.5",children:EJ(n)}),x.jsx("div",{className:"space-y-1",children:t.map(i=>{const a=i.dataKey?r(i.dataKey,i.color):i.color;return x.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[x.jsx("span",{className:"h-2 w-2 shrink-0",style:{backgroundColor:a}}),x.jsxs("span",{className:"text-muted-foreground",children:[i.name,":"]}),x.jsx("span",{className:"font-medium tabular-nums",children:wr(i.value)})]},i.name)})})]})}function _De({jobs:e}){return e.length===0?x.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No completed jobs in the last 24 hours"}):x.jsx("div",{className:"divide-y divide-border",children:e.map((t,n)=>x.jsxs(IM,{to:"/queues/$queueName/jobs/$jobId",params:{queueName:t.queueName,jobId:t.jobId},className:"flex items-center justify-between px-4 py-2.5",children:[x.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[x.jsx("span",{className:"text-xs text-muted-foreground w-5 tabular-nums shrink-0",children:n+1}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"text-sm font-medium truncate",children:t.name}),x.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.queueName})]})]}),x.jsx(Su,{variant:"outline",className:"font-mono text-xs shrink-0",children:wr(t.duration)})]},`${t.queueName}-${t.jobId}`))})}function EDe({jobs:e}){return e.length===0?x.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No failed jobs in the last 24 hours"}):x.jsx("div",{className:"divide-y divide-border",children:e.map((t,n)=>x.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5",children:[x.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[x.jsx("span",{className:"text-xs text-muted-foreground w-5 tabular-nums shrink-0",children:n+1}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"text-sm font-medium truncate",children:t.name}),x.jsx("div",{className:"text-xs text-muted-foreground font-mono truncate",children:t.queueName})]})]}),x.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[x.jsxs("span",{className:"text-xs text-muted-foreground tabular-nums",children:[t.failCount,"/",t.totalCount]}),x.jsx(Su,{variant:"outline",className:Ce("font-mono text-xs",t.errorRate>.5?"border-status-error/50 text-status-error":t.errorRate>.2?"border-status-warning/50 text-status-warning":""),children:AJ(t.errorRate)})]})]},`${t.queueName}-${t.name}`))})}function ADe(){return x.jsxs("div",{className:"space-y-6",children:[x.jsx("div",{className:"grid grid-cols-4 gap-4",children:["throughput","error-rate","duration","wait-time"].map(e=>x.jsxs("div",{className:" border p-4 space-y-3",children:[x.jsx(Pl,{className:"h-4 w-20"}),x.jsx(Pl,{className:"h-8 w-24"}),x.jsx(Pl,{className:"h-6 w-20"})]},e))}),x.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[x.jsxs("div",{className:" border p-4 space-y-3",children:[x.jsx(Pl,{className:"h-4 w-32"}),x.jsx(Pl,{className:"h-48 w-full"})]}),x.jsxs("div",{className:" border p-4 space-y-3",children:[x.jsx(Pl,{className:"h-4 w-32"}),x.jsx(Pl,{className:"h-48 w-full"})]})]})]})}function TDe(){const{data:e,isLoading:t,error:n}=sfe();if(t)return x.jsx(ADe,{});if(n||!e)return x.jsx("div",{className:" border border-destructive/50 bg-destructive/10 p-4",children:x.jsx("p",{className:"text-destructive",children:n instanceof Error?n.message:"Failed to load metrics"})});const{aggregate:r,slowestJobs:i,mostFailingTypes:a}=e,{summary:o,buckets:l}=r,u=Math.floor(l.length/2),f=l.slice(0,u),d=l.slice(u),h=f.reduce((T,O)=>T+O.completed,0),m=d.reduce((T,O)=>T+O.completed,0),g=f.reduce((T,O)=>T+O.failed,0),b=d.reduce((T,O)=>T+O.failed,0),w=l.map(T=>({hour:T.hour,completed:T.completed,failed:T.failed})),y=l.map(T=>({hour:T.hour,duration:T.avgDuration,waitTime:T.avgWaitTime})),S=l.map(T=>T.completed+T.failed),E=l.map(T=>T.completed+T.failed>0?T.failed/(T.completed+T.failed):0),_=l.map(T=>T.avgDuration),A=l.map(T=>T.avgWaitTime);return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"grid grid-cols-4 gap-4",children:[x.jsx(Kv,{title:"Throughput",value:o.throughputPerHour.toLocaleString(),subtitle:"jobs/hour avg",sparklineData:S,sparklineColor:"default",trend:{current:m+b,previous:h+g,higherIsBetter:!0},icon:x.jsx(jce,{className:"h-4 w-4"})}),x.jsx(Kv,{title:"Error Rate",value:AJ(o.errorRate),subtitle:`${o.totalFailed} failed`,sparklineData:E,sparklineColor:o.errorRate>.1?"danger":"success",trend:{current:b,previous:g,higherIsBetter:!1},icon:x.jsx(D3,{className:"h-4 w-4"})}),x.jsx(Kv,{title:"Avg Duration",value:wr(o.avgDuration),subtitle:"processing time",sparklineData:_,sparklineColor:"default",icon:x.jsx(l7,{className:"h-4 w-4"})}),x.jsx(Kv,{title:"Avg Wait Time",value:wr(o.avgWaitTime),subtitle:"queue delay",sparklineData:A,sparklineColor:o.avgWaitTime>6e4?"warning":"default",icon:x.jsx(Cce,{className:"h-4 w-4"})})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[x.jsxs("div",{className:"border border-dashed bg-card p-4",children:[x.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[x.jsx(mce,{className:"h-4 w-4 text-muted-foreground"}),"Job Throughput"]}),x.jsx(WP,{config:bDe,className:"h-52 w-full",children:x.jsxs(gDe,{data:w,children:[x.jsx(IP,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),x.jsx(ed,{dataKey:"hour",tickFormatter:GH,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),x.jsx(nd,{tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:32}),x.jsx(Ci,{content:x.jsx(wDe,{})}),x.jsx(Ls,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:T=>x.jsx("span",{style:{color:"hsl(var(--foreground))"},children:T})}),x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"completedGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[x.jsx("stop",{offset:"0%",stopColor:"var(--color-completed)",stopOpacity:.5}),x.jsx("stop",{offset:"100%",stopColor:"var(--color-completed)",stopOpacity:.05})]}),x.jsxs("pattern",{id:"failedPattern",x:"0",y:"0",width:"6",height:"6",patternUnits:"userSpaceOnUse",children:[x.jsx("rect",{width:"6",height:"6",fill:"var(--color-failed)",fillOpacity:.15}),x.jsx("path",{d:"M0,0 L6,6 M-1,5 L5,11 M-1,-1 L7,7",stroke:"var(--color-failed)",strokeWidth:"1",opacity:"0.4"})]})]}),x.jsx(vo,{type:"monotone",dataKey:"completed",name:"Completed",stackId:"1",stroke:"var(--color-completed)",fill:"url(#completedGradient)",strokeWidth:2,dot:!1,activeDot:{r:4,fill:"var(--color-completed)",stroke:"none"}}),x.jsx(vo,{type:"monotone",dataKey:"failed",name:"Failed",stackId:"1",stroke:"var(--color-failed)",fill:"url(#failedPattern)",strokeWidth:2,dot:!1,activeDot:{r:4,fill:"var(--color-failed)",stroke:"none"}})]})})]}),x.jsxs("div",{className:"border border-dashed bg-card p-4",children:[x.jsxs("h3",{className:"text-sm font-medium mb-4 flex items-center gap-2",children:[x.jsx(ki,{className:"h-4 w-4 text-muted-foreground"}),"Processing Time"]}),x.jsx(WP,{config:xDe,className:"h-52 w-full",children:x.jsxs(mDe,{data:y,children:[x.jsx(IP,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",strokeOpacity:.5}),x.jsx(ed,{dataKey:"hour",tickFormatter:GH,tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1}),x.jsx(nd,{tickFormatter:T=>wr(T),tick:{fontSize:11,fill:"hsl(var(--muted-foreground))"},tickLine:!1,axisLine:!1,width:48}),x.jsx(Ci,{content:x.jsx(SDe,{}),cursor:!1}),x.jsx(Ls,{verticalAlign:"top",height:32,iconType:"square",iconSize:8,wrapperStyle:{fontSize:12},formatter:T=>x.jsx("span",{style:{color:"hsl(var(--foreground))"},children:T})}),x.jsx(Ks,{dataKey:"duration",name:"Duration",fill:"hsl(210, 90%, 50%)",radius:[0,0,0,0],style:{outline:"none"},isAnimationActive:!1}),x.jsx(Ks,{dataKey:"waitTime",name:"Wait Time",fill:"hsl(45, 95%, 50%)",radius:[0,0,0,0],style:{outline:"none"},isAnimationActive:!1})]})})]})]}),x.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[x.jsxs("div",{className:"border border-dashed bg-card",children:[x.jsx("div",{className:"border-b border-dashed px-4 py-3",children:x.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[x.jsx(ki,{className:"h-4 w-4 text-muted-foreground"}),"Slowest Jobs"]})}),x.jsx(_De,{jobs:i})]}),x.jsxs("div",{className:"border border-dashed bg-card",children:[x.jsx("div",{className:"border-b border-dashed px-4 py-3",children:x.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2",children:[x.jsx(D3,{className:"h-4 w-4 text-muted-foreground"}),"Most Failing Job Types"]})}),x.jsx(EDe,{jobs:a})]})]})]})}const Y2=j.createContext({});function X2(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const CDe=typeof window<"u",TJ=CDe?j.useLayoutEffect:j.useEffect,Hx=j.createContext(null);function Z2(e,t){e.indexOf(t)===-1&&e.push(t)}function h0(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ma=(e,t,n)=>n>t?t:n<e?e:n;let Q2=()=>{};const Ys={},CJ=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function OJ(e){return typeof e=="object"&&e!==null}const jJ=e=>/^0[^.\s]+$/u.test(e);function NJ(e){let t;return()=>(t===void 0&&(t=e()),t)}const li=e=>e,ODe=(e,t)=>n=>t(e(n)),tg=(...e)=>e.reduce(ODe),bm=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class J2{constructor(){this.subscriptions=[]}add(t){return Z2(this.subscriptions,t),()=>h0(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const qr=e=>e*1e3,oi=e=>e/1e3;function PJ(e,t){return t?e*(1e3/t):0}const MJ=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,jDe=1e-7,NDe=12;function PDe(e,t,n,r,i){let a,o,l=0;do o=t+(n-t)/2,a=MJ(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>jDe&&++l<NDe);return o}function ng(e,t,n,r){if(e===t&&n===r)return li;const i=a=>PDe(a,0,1,e,n);return a=>a===0||a===1?a:MJ(i(a),t,r)}const RJ=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,kJ=e=>t=>1-e(1-t),DJ=ng(.33,1.53,.69,.99),ek=kJ(DJ),IJ=RJ(ek),LJ=e=>e>=1?1:(e*=2)<1?.5*ek(e):.5*(2-Math.pow(2,-10*(e-1))),tk=e=>1-Math.sin(Math.acos(e)),$J=kJ(tk),BJ=RJ(tk),MDe=ng(.42,0,1,1),RDe=ng(0,0,.58,1),qJ=ng(.42,0,.58,1),kDe=e=>Array.isArray(e)&&typeof e[0]!="number",zJ=e=>Array.isArray(e)&&typeof e[0]=="number",DDe={linear:li,easeIn:MDe,easeInOut:qJ,easeOut:RDe,circIn:tk,circInOut:BJ,circOut:$J,backIn:ek,backInOut:IJ,backOut:DJ,anticipate:LJ},IDe=e=>typeof e=="string",WH=e=>{if(zJ(e)){Q2(e.length===4);const[t,n,r,i]=e;return ng(t,n,r,i)}else if(IDe(e))return DDe[e];return e},oy=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function LDe(e,t){let n=new Set,r=new Set,i=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1};function u(d){o.has(d)&&(f.schedule(d),e()),d(l)}const f={schedule:(d,h=!1,m=!1)=>{const b=m&&i?n:r;return h&&o.add(d),b.add(d),d},cancel:d=>{r.delete(d),o.delete(d)},process:d=>{if(l=d,i){a=!0;return}i=!0;const h=n;n=r,r=h,n.forEach(u),n.clear(),i=!1,a&&(a=!1,f.process(d))}};return f}const $De=40;function VJ(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=oy.reduce((_,A)=>(_[A]=LDe(a),_),{}),{setup:l,read:u,resolveKeyframes:f,preUpdate:d,update:h,preRender:m,render:g,postRender:b}=o,w=()=>{const _=Ys.useManualTiming,A=_?i.timestamp:performance.now();n=!1,_||(i.delta=r?1e3/60:Math.max(Math.min(A-i.timestamp,$De),1)),i.timestamp=A,i.isProcessing=!0,l.process(i),u.process(i),f.process(i),d.process(i),h.process(i),m.process(i),g.process(i),b.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(w))},y=()=>{n=!0,r=!0,i.isProcessing||e(w)};return{schedule:oy.reduce((_,A)=>{const T=o[A];return _[A]=(O,P=!1,M=!1)=>(n||y(),T.schedule(O,P,M)),_},{}),cancel:_=>{for(let A=0;A<oy.length;A++)o[oy[A]].cancel(_)},state:i,steps:o}}const{schedule:Dt,cancel:Xs,state:$n,steps:vj}=VJ(typeof requestAnimationFrame<"u"?requestAnimationFrame:li,!0);let Ay;function BDe(){Ay=void 0}const ir={now:()=>(Ay===void 0&&ir.set($n.isProcessing||Ys.useManualTiming?$n.timestamp:performance.now()),Ay),set:e=>{Ay=e,queueMicrotask(BDe)}},FJ=e=>t=>typeof t=="string"&&t.startsWith(e),UJ=FJ("--"),qDe=FJ("var(--"),nk=e=>qDe(e)?zDe.test(e.split("/*")[0].trim()):!1,zDe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function KH(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const Od={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xm={...Od,transform:e=>ma(0,1,e)},sy={...Od,default:1},hp=e=>Math.round(e*1e5)/1e5,rk=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function VDe(e){return e==null}const FDe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ik=(e,t)=>n=>!!(typeof n=="string"&&FDe.test(n)&&n.startsWith(e)||t&&!VDe(n)&&Object.prototype.hasOwnProperty.call(n,t)),HJ=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,l]=r.match(rk);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},UDe=e=>ma(0,255,e),yj={...Od,transform:e=>Math.round(UDe(e))},Gl={test:ik("rgb","red"),parse:HJ("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+yj.transform(e)+", "+yj.transform(t)+", "+yj.transform(n)+", "+hp(xm.transform(r))+")"};function HDe(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const KP={test:ik("#"),parse:HDe,transform:Gl.transform},rg=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ss=rg("deg"),da=rg("%"),Ne=rg("px"),GDe=rg("vh"),WDe=rg("vw"),YH={...da,parse:e=>da.parse(e)/100,transform:e=>da.transform(e*100)},Hc={test:ik("hsl","hue"),parse:HJ("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+da.transform(hp(t))+", "+da.transform(hp(n))+", "+hp(xm.transform(r))+")"},gn={test:e=>Gl.test(e)||KP.test(e)||Hc.test(e),parse:e=>Gl.test(e)?Gl.parse(e):Hc.test(e)?Hc.parse(e):KP.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Gl.transform(e):Hc.transform(e),getAnimatableNone:e=>{const t=gn.parse(e);return t.alpha=0,gn.transform(t)}},KDe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function YDe(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(rk))==null?void 0:t.length)||0)+(((n=e.match(KDe))==null?void 0:n.length)||0)>0}const GJ="number",WJ="color",XDe="var",ZDe="var(",XH="${}",QDe=/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 ad(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(QDe,u=>(gn.test(u)?(r.color.push(a),i.push(WJ),n.push(gn.parse(u))):u.startsWith(ZDe)?(r.var.push(a),i.push(XDe),n.push(u)):(r.number.push(a),i.push(GJ),n.push(parseFloat(u))),++a,XH)).split(XH);return{values:n,split:l,indexes:r,types:i}}function JDe(e){return ad(e).values}function KJ({split:e,types:t}){const n=e.length;return r=>{let i="";for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){const o=t[a];o===GJ?i+=hp(r[a]):o===WJ?i+=gn.transform(r[a]):i+=r[a]}return i}}function eIe(e){return KJ(ad(e))}const tIe=e=>typeof e=="number"?0:gn.test(e)?gn.getAnimatableNone(e):e,nIe=(e,t)=>typeof e=="number"?t!=null&&t.trim().endsWith("/")?e:0:tIe(e);function rIe(e){const t=ad(e);return KJ(t)(t.values.map((r,i)=>nIe(r,t.split[i])))}const Li={test:YDe,parse:JDe,createTransformer:eIe,getAnimatableNone:rIe};function bj(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function iIe({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,u=2*n-l;i=bj(u,l,e+1/3),a=bj(u,l,e),o=bj(u,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function p0(e,t){return n=>n>0?t:e}const Ft=(e,t,n)=>e+(t-e)*n,xj=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},aIe=[KP,Gl,Hc],oIe=e=>aIe.find(t=>t.test(e));function ZH(e){const t=oIe(e);if(!t)return!1;let n=t.parse(e);return t===Hc&&(n=iIe(n)),n}const QH=(e,t)=>{const n=ZH(e),r=ZH(t);if(!n||!r)return p0(e,t);const i={...n};return a=>(i.red=xj(n.red,r.red,a),i.green=xj(n.green,r.green,a),i.blue=xj(n.blue,r.blue,a),i.alpha=Ft(n.alpha,r.alpha,a),Gl.transform(i))},YP=new Set(["none","hidden"]);function sIe(e,t){return YP.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function lIe(e,t){return n=>Ft(e,t,n)}function ak(e){return typeof e=="number"?lIe:typeof e=="string"?nk(e)?p0:gn.test(e)?QH:fIe:Array.isArray(e)?YJ:typeof e=="object"?gn.test(e)?QH:uIe:p0}function YJ(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>ak(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function uIe(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ak(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function cIe(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][r[a]],l=e.values[o]??0;n[i]=l,r[a]++}return n}const fIe=(e,t)=>{const n=Li.createTransformer(t),r=ad(e),i=ad(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?YP.has(e)&&!i.values.length||YP.has(t)&&!r.values.length?sIe(e,t):tg(YJ(cIe(r,i),i.values),n):p0(e,t)};function XJ(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ft(e,t,n):ak(e)(e,t)}const dIe=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>Dt.update(t,n),stop:()=>Xs(t),now:()=>$n.isProcessing?$n.timestamp:ir.now()}},ZJ=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},m0=2e4;function ok(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<m0;)t+=n,r=e.next(t);return t>=m0?1/0:t}function hIe(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(ok(r),m0);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:oi(i)}}const rn={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};function XP(e,t){return e*Math.sqrt(1-t*t)}const pIe=12;function mIe(e,t,n){let r=n;for(let i=1;i<pIe;i++)r=r-e(r)/t(r);return r}const wj=.001;function gIe({duration:e=rn.duration,bounce:t=rn.bounce,velocity:n=rn.velocity,mass:r=rn.mass}){let i,a,o=1-t;o=ma(rn.minDamping,rn.maxDamping,o),e=ma(rn.minDuration,rn.maxDuration,oi(e)),o<1?(i=f=>{const d=f*o,h=d*e,m=d-n,g=XP(f,o),b=Math.exp(-h);return wj-m/g*b},a=f=>{const h=f*o*e,m=h*n+n,g=Math.pow(o,2)*Math.pow(f,2)*e,b=Math.exp(-h),w=XP(Math.pow(f,2),o);return(-i(f)+wj>0?-1:1)*((m-g)*b)/w}):(i=f=>{const d=Math.exp(-f*e),h=(f-n)*e+1;return-wj+d*h},a=f=>{const d=Math.exp(-f*e),h=(n-f)*(e*e);return d*h});const l=5/e,u=mIe(i,a,l);if(e=qr(e),isNaN(u))return{stiffness:rn.stiffness,damping:rn.damping,duration:e};{const f=Math.pow(u,2)*r;return{stiffness:f,damping:o*2*Math.sqrt(r*f),duration:e}}}const vIe=["duration","bounce"],yIe=["stiffness","damping","mass"];function JH(e,t){return t.some(n=>e[n]!==void 0)}function bIe(e){let t={velocity:rn.velocity,stiffness:rn.stiffness,damping:rn.damping,mass:rn.mass,isResolvedFromDuration:!1,...e};if(!JH(e,yIe)&&JH(e,vIe))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ma(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:rn.mass,stiffness:i,damping:a}}else{const n=gIe({...e,velocity:0});t={...t,...n,mass:rn.mass},t.isResolvedFromDuration=!0}return t}function g0(e=rn.visualDuration,t=rn.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:u,damping:f,mass:d,duration:h,velocity:m,isResolvedFromDuration:g}=bIe({...n,velocity:-oi(n.velocity||0)}),b=m||0,w=f/(2*Math.sqrt(u*d)),y=o-a,S=oi(Math.sqrt(u/d)),E=Math.abs(y)<5;r||(r=E?rn.restSpeed.granular:rn.restSpeed.default),i||(i=E?rn.restDelta.granular:rn.restDelta.default);let _,A,T,O,P,M;if(w<1)T=XP(S,w),O=(b+w*S*y)/T,_=D=>{const I=Math.exp(-w*S*D);return o-I*(O*Math.sin(T*D)+y*Math.cos(T*D))},P=w*S*O+y*T,M=w*S*y-O*T,A=D=>Math.exp(-w*S*D)*(P*Math.sin(T*D)+M*Math.cos(T*D));else if(w===1){_=I=>o-Math.exp(-S*I)*(y+(b+S*y)*I);const D=b+S*y;A=I=>Math.exp(-S*I)*(S*D*I-b)}else{const D=S*Math.sqrt(w*w-1);_=$=>{const q=Math.exp(-w*S*$),L=Math.min(D*$,300);return o-q*((b+w*S*y)*Math.sinh(L)+D*y*Math.cosh(L))/D};const I=(b+w*S*y)/D,k=w*S*I-y*D,F=w*S*y-I*D;A=$=>{const q=Math.exp(-w*S*$),L=Math.min(D*$,300);return q*(k*Math.sinh(L)+F*Math.cosh(L))}}const R={calculatedDuration:g&&h||null,velocity:D=>qr(A(D)),next:D=>{if(!g&&w<1){const k=Math.exp(-w*S*D),F=Math.sin(T*D),$=Math.cos(T*D),q=o-k*(O*F+y*$),L=qr(k*(P*F+M*$));return l.done=Math.abs(L)<=r&&Math.abs(o-q)<=i,l.value=l.done?o:q,l}const I=_(D);if(g)l.done=D>=h;else{const k=qr(A(D));l.done=Math.abs(k)<=r&&Math.abs(o-I)<=i}return l.value=l.done?o:I,l},toString:()=>{const D=Math.min(ok(R),m0),I=ZJ(k=>R.next(D*k).value,D,30);return D+"ms "+I},toTransition:()=>{}};return R}g0.applyToOptions=e=>{const t=hIe(e,100,g0);return e.ease=t.ease,e.duration=qr(t.duration),e.type="keyframes",e};const xIe=5;function QJ(e,t,n){const r=Math.max(t-xIe,0);return PJ(n-e(r),t-r)}function ZP({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:u,restDelta:f=.5,restSpeed:d}){const h=e[0],m={done:!1,value:h},g=M=>l!==void 0&&M<l||u!==void 0&&M>u,b=M=>l===void 0?u:u===void 0||Math.abs(l-M)<Math.abs(u-M)?l:u;let w=n*t;const y=h+w,S=o===void 0?y:o(y);S!==y&&(w=S-h);const E=M=>-w*Math.exp(-M/r),_=M=>S+E(M),A=M=>{const R=E(M),D=_(M);m.done=Math.abs(R)<=f,m.value=m.done?S:D};let T,O;const P=M=>{g(m.value)&&(T=M,O=g0({keyframes:[m.value,b(m.value)],velocity:QJ(_,M,m.value),damping:i,stiffness:a,restDelta:f,restSpeed:d}))};return P(0),{calculatedDuration:null,next:M=>{let R=!1;return!O&&T===void 0&&(R=!0,A(M),P(M)),T!==void 0&&M>=T?O.next(M-T):(!R&&A(M),m)}}}function wIe(e,t,n){const r=[],i=n||Ys.mix||XJ,a=e.length-1;for(let o=0;o<a;o++){let l=i(e[o],e[o+1]);if(t){const u=Array.isArray(t)?t[o]||li:t;l=tg(u,l)}r.push(l)}return r}function SIe(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Q2(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=wIe(t,r,i),u=l.length,f=d=>{if(o&&d<e[0])return t[0];let h=0;if(u>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const m=bm(e[h],e[h+1],d);return l[h](m)};return n?d=>f(ma(e[0],e[a-1],d)):f}function _Ie(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=bm(0,t,r);e.push(Ft(n,1,i))}}function EIe(e){const t=[0];return _Ie(t,e.length-1),t}function AIe(e,t){return e.map(n=>n*t)}function TIe(e,t){return e.map(()=>t||qJ).splice(0,e.length-1)}function pp({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=kDe(r)?r.map(WH):WH(r),a={done:!1,value:t[0]},o=AIe(n&&n.length===t.length?n:EIe(t),e),l=SIe(o,t,{ease:Array.isArray(i)?i:TIe(t,i)});return{calculatedDuration:e,next:u=>(a.value=l(u),a.done=u>=e,a)}}const CIe=e=>e!==null;function Gx(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(CIe),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||r===void 0?a[l]:r}const OIe={decay:ZP,inertia:ZP,tween:pp,keyframes:pp,spring:g0};function JJ(e){typeof e.type=="string"&&(e.type=OIe[e.type])}class sk{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const jIe=e=>e/100;class v0 extends sk{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==ir.now()&&this.tick(ir.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;JJ(t);const{type:n=pp,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const u=n||pp;u!==pp&&typeof l[0]!="number"&&(this.mixKeyframes=tg(jIe,XJ(l[0],l[1])),l=[0,100]);const f=u({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=u({...t,keyframes:[...l].reverse(),velocity:-o})),f.calculatedDuration===null&&(f.calculatedDuration=ok(f));const{calculatedDuration:d}=f;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=f}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:u}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:d,repeat:h,repeatType:m,repeatDelay:g,type:b,onUpdate:w,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const S=this.currentTime-f*(this.playbackSpeed>=0?1:-1),E=this.playbackSpeed>=0?S<0:S>i;this.currentTime=Math.max(S,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let _=this.currentTime,A=r;if(h){const M=Math.min(this.currentTime,i)/l;let R=Math.floor(M),D=M%1;!D&&M>=1&&(D=1),D===1&&R--,R=Math.min(R,h+1),!!(R%2)&&(m==="reverse"?(D=1-D,g&&(D-=g/l)):m==="mirror"&&(A=o)),_=ma(0,1,D)*l}let T;E?(this.delayState.value=d[0],T=this.delayState):T=A.next(_),a&&!E&&(T.value=a(T.value));let{done:O}=T;!E&&u!==null&&(O=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const P=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&O);return P&&b!==ZP&&(T.value=Gx(d,this.options,y,this.speed)),w&&w(T.value),P&&this.finish(),T}then(t,n){return this.finished.then(t,n)}get duration(){return oi(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+oi(t)}get time(){return oi(this.currentTime)}set time(t){t=qr(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),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){const t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);const n=this.generator.next(t).value;return QJ(r=>this.generator.next(r).value,t,n)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;n&&this.driver&&this.updateTime(ir.now()),this.playbackSpeed=t,n&&this.driver&&(this.time=oi(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=dIe,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),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(ir.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.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 n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function NIe(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Wl=e=>e*180/Math.PI,QP=e=>{const t=Wl(Math.atan2(e[1],e[0]));return JP(t)},PIe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:QP,rotateZ:QP,skewX:e=>Wl(Math.atan(e[1])),skewY:e=>Wl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},JP=e=>(e=e%360,e<0&&(e+=360),e),e8=QP,t8=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),n8=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),MIe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:t8,scaleY:n8,scale:e=>(t8(e)+n8(e))/2,rotateX:e=>JP(Wl(Math.atan2(e[6],e[5]))),rotateY:e=>JP(Wl(Math.atan2(-e[2],e[0]))),rotateZ:e8,rotate:e8,skewX:e=>Wl(Math.atan(e[4])),skewY:e=>Wl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eM(e){return e.includes("scale")?1:0}function tM(e,t){if(!e||e==="none")return eM(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=MIe,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=PIe,i=l}if(!i)return eM(t);const a=r[t],o=i[1].split(",").map(kIe);return typeof a=="function"?a(o):o[a]}const RIe=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return tM(n,t)};function kIe(e){return parseFloat(e.trim())}const jd=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Nd=new Set(jd),r8=e=>e===Od||e===Ne,DIe=new Set(["x","y","z"]),IIe=jd.filter(e=>!DIe.has(e));function LIe(e){const t=[];return IIe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Ns={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const i=e.max-e.min;return r==="border-box"?i:i-parseFloat(t)-parseFloat(n)},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})=>tM(t,"x"),y:(e,{transform:t})=>tM(t,"y")};Ns.translateX=Ns.x;Ns.translateY=Ns.y;const uu=new Set;let nM=!1,rM=!1,iM=!1;function eee(){if(rM){const e=Array.from(uu).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=LIe(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var l;(l=r.getValue(a))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}rM=!1,nM=!1,uu.forEach(e=>e.complete(iM)),uu.clear()}function tee(){uu.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(rM=!0)})}function $Ie(){iM=!0,tee(),eee(),iM=!1}class lk{constructor(t,n,r,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(uu.add(this),nM||(nM=!0,Dt.read(tee),Dt.resolveKeyframes(eee))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}NIe(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),uu.delete(this)}cancel(){this.state==="scheduled"&&(uu.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const BIe=e=>e.startsWith("--");function nee(e,t,n){BIe(t)?e.style.setProperty(t,n):e.style[t]=n}const qIe={};function ree(e,t){const n=NJ(e);return()=>qIe[t]??n()}const zIe=ree(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),iee=ree(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ip=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,i8={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ip([0,.65,.55,1]),circOut:ip([.55,0,1,.45]),backIn:ip([.31,.01,.66,-.59]),backOut:ip([.33,1.53,.69,.99])};function aee(e,t){if(e)return typeof e=="function"?iee()?ZJ(e,t):"ease-out":zJ(e)?ip(e):Array.isArray(e)?e.map(n=>aee(n,t)||i8.easeOut):i8[e]}function VIe(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:u}={},f=void 0){const d={[t]:n};u&&(d.offset=u);const h=aee(l,i);Array.isArray(h)&&(d.easing=h);const m={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return f&&(m.pseudoElement=f),e.animate(d,m)}function oee(e){return typeof e=="function"&&"applyToOptions"in e}function FIe({type:e,...t}){return oee(e)&&iee()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class see extends sk{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:u}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,Q2(typeof t.type!="string");const f=FIe(t);this.animation=VIe(n,r,i,f,a),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=Gx(i,this.options,l,this.speed);this.updateMotionValue&&this.updateMotionValue(d),nee(n,r,d),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.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 n,r,i;const t=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(t!=null&&t.isConnected)&&((i=(r=this.animation).commitStyles)==null||i.call(r))}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return oi(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+oi(t)}get time(){return oi(Number(this.animation.currentTime)||0)}set time(t){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=qr(t),n&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:n,rangeEnd:r,observe:i}){var a;return this.allowFlatten&&((a=this.animation.effect)==null||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&zIe()?(this.animation.timeline=t,n&&(this.animation.rangeStart=n),r&&(this.animation.rangeEnd=r),li):i(this)}}const lee={anticipate:LJ,backInOut:IJ,circInOut:BJ};function UIe(e){return e in lee}function HIe(e){typeof e.ease=="string"&&UIe(e.ease)&&(e.ease=lee[e.ease])}const Sj=10;class GIe extends see{constructor(t){HIe(t),JJ(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:a,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new v0({...o,autoplay:!1}),u=Math.max(Sj,ir.now()-this.startTime),f=ma(0,Sj,u-Sj),d=l.sample(u).value,{name:h}=this.options;a&&h&&nee(a,h,d),n.setWithVelocity(l.sample(Math.max(0,u-f)).value,d,f),l.stop()}}const a8=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Li.test(e)||e==="0")&&!e.startsWith("url("));function WIe(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function KIe(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=a8(i,t),l=a8(a,t);return!o||!l?!1:WIe(e)||(n==="spring"||oee(n))&&r}function aM(e){e.duration=0,e.type="keyframes"}const uee=new Set(["opacity","clipPath","filter","transform"]),YIe=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function XIe(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&YIe.test(e[t]))return!0;return!1}const ZIe=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),QIe=NJ(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function JIe(e){var h;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:l}=e;if(!(((h=t==null?void 0:t.owner)==null?void 0:h.current)instanceof HTMLElement))return!1;const{onUpdate:f,transformTemplate:d}=t.owner.getProps();return QIe()&&n&&(uee.has(n)||ZIe.has(n)&&XIe(l))&&(n!=="transform"||!d)&&!f&&!r&&i!=="mirror"&&a!==0&&o!=="inertia"}const eLe=40;class tLe extends sk{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:l,name:u,motionValue:f,element:d,...h}){var b;super(),this.stop=()=>{var w,y;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(y=this.keyframeResolver)==null||y.cancel()},this.createdAt=ir.now();const m={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,name:u,motionValue:f,element:d,...h},g=(d==null?void 0:d.KeyframeResolver)||lk;this.keyframeResolver=new g(l,(w,y,S)=>this.onKeyframesResolved(w,y,m,!S),u,f,d),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,n,r,i){var S,E;this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:u,isHandoff:f,onUpdate:d}=r;this.resolvedAt=ir.now();let h=!0;KIe(t,a,o,l)||(h=!1,(Ys.instantAnimations||!u)&&(d==null||d(Gx(t,r,n))),t[0]=t[t.length-1],aM(r),r.repeat=0);const g={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>eLe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},b=h&&!f&&JIe(g),w=(E=(S=g.motionValue)==null?void 0:S.owner)==null?void 0:E.current;let y;if(b)try{y=new GIe({...g,element:w})}catch{y=new v0(g)}else y=new v0(g);y.finished.then(()=>{this.notifyFinished()}).catch(li),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),$Ie()),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()}}function cee(e,t,n,r=0,i=1){const a=Array.from(e).sort((f,d)=>f.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(a,o):i===1?a*r:l-a*r}const nLe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rLe(e){const t=nLe.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function fee(e,t,n=1){const[r,i]=rLe(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return CJ(o)?parseFloat(o):o}return nk(i)?fee(i,t,n+1):i}const iLe={type:"spring",stiffness:500,damping:25,restSpeed:10},aLe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),oLe={type:"keyframes",duration:.8},sLe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lLe=(e,{keyframes:t})=>t.length>2?oLe:Nd.has(e)?e.startsWith("scale")?aLe(t[1]):iLe:sLe;function dee(e,t){if(e!=null&&e.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function uk(e,t){const n=(e==null?void 0:e[t])??(e==null?void 0:e.default)??e;return n!==e?dee(n,e):n}const uLe=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function cLe(e){for(const t in e)if(!uLe.has(t))return!0;return!1}const ck=(e,t,n,r={},i,a)=>o=>{const l=uk(r,e)||{},u=l.delay||r.delay||0;let{elapsed:f=0}=r;f=f-qr(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-f,onUpdate:m=>{t.set(m),l.onUpdate&&l.onUpdate(m)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};cLe(l)||Object.assign(d,lLe(e,d)),d.duration&&(d.duration=qr(d.duration)),d.repeatDelay&&(d.repeatDelay=qr(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(aM(d),d.delay===0&&(h=!0)),(Ys.instantAnimations||Ys.skipAnimations||i!=null&&i.shouldSkipAnimations)&&(h=!0,aM(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const m=Gx(d.keyframes,l);if(m!==void 0){Dt.update(()=>{d.onUpdate(m),d.onComplete()});return}}return l.isSync?new v0(d):new tLe(d)};function o8(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function fk(e,t,n,r){if(typeof t=="function"){const[i,a]=o8(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=o8(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function cu(e,t,n){const r=e.getProps();return fk(r,t,n!==void 0?n:r.custom,e)}const hee=new Set(["width","height","top","left","right","bottom",...jd]),s8=30,fLe=e=>!isNaN(parseFloat(e));class dLe{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const i=ir.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ir.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=fLe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new J2);const r=this.events[t].add(n);return t==="change"?()=>{r(),Dt.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&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=ir.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>s8)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,s8);return PJ(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),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,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function od(e,t){return new dLe(e,t)}const oM=e=>Array.isArray(e);function hLe(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,od(n))}function pLe(e){return oM(e)?e[e.length-1]||0:e}function mLe(e,t){const n=cu(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const l=pLe(a[o]);hLe(e,o,l)}}const qn=e=>!!(e&&e.getVelocity);function gLe(e){return!!(qn(e)&&e.add)}function sM(e,t){const n=e.getValue("willChange");if(gLe(n))return n.add(t);if(!n&&Ys.WillChange){const r=new Ys.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function dk(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}const vLe="framerAppearId",pee="data-"+dk(vLe);function mee(e){return e.props[pee]}function yLe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function gee(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...l}=t;const u=e.getDefaultTransition();a=a?dee(a,u):u;const f=a==null?void 0:a.reduceMotion;r&&(a=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const m in l){const g=e.getValue(m,e.latestValues[m]??null),b=l[m];if(b===void 0||h&&yLe(h,m))continue;const w={delay:n,...uk(a||{},m)},y=g.get();if(y!==void 0&&!g.isAnimating()&&!Array.isArray(b)&&b===y&&!w.velocity){Dt.update(()=>g.set(b));continue}let S=!1;if(window.MotionHandoffAnimation){const A=mee(e);if(A){const T=window.MotionHandoffAnimation(A,m,Dt);T!==null&&(w.startTime=T,S=!0)}}sM(e,m);const E=f??e.shouldReduceMotion;g.start(ck(m,g,b,E&&hee.has(m)?{type:!1}:w,e,S));const _=g.animation;_&&d.push(_)}if(o){const m=()=>Dt.update(()=>{o&&mLe(e,o)});d.length?Promise.all(d).then(m):m()}return d}function lM(e,t,n={}){var u;const r=cu(e,t,n.type==="exit"?(u=e.presenceContext)==null?void 0:u.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(gee(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(f=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:m}=i;return bLe(e,t,f,d,h,m,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[f,d]=l==="beforeChildren"?[a,o]:[o,a];return f().then(()=>d())}else return Promise.all([a(),o(n.delay)])}function bLe(e,t,n=0,r=0,i=0,a=1,o){const l=[];for(const u of e.variantChildren)u.notify("AnimationStart",t),l.push(lM(u,t,{...o,delay:n+(typeof r=="function"?0:r)+cee(e.variantChildren,u,r,i,a)}).then(()=>u.notify("AnimationComplete",t)));return Promise.all(l)}function xLe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>lM(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=lM(e,t,n);else{const i=typeof t=="function"?cu(e,t,n.custom):t;r=Promise.all(gee(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const wLe={test:e=>e==="auto",parse:e=>e},vee=e=>t=>t.test(e),yee=[Od,Ne,da,ss,WDe,GDe,wLe],l8=e=>yee.find(vee(e));function SLe(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||jJ(e):!0}const _Le=new Set(["brightness","contrast","saturate","opacity"]);function ELe(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(rk)||[];if(!r)return e;const i=n.replace(r,"");let a=_Le.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const ALe=/\b([a-z-]*)\(.*?\)/gu,uM={...Li,getAnimatableNone:e=>{const t=e.match(ALe);return t?t.map(ELe).join(" "):e}},cM={...Li,getAnimatableNone:e=>{const t=Li.parse(e);return Li.createTransformer(e)(t.map(r=>typeof r=="number"?0:typeof r=="object"?{...r,alpha:1}:r))}},u8={...Od,transform:Math.round},TLe={rotate:ss,rotateX:ss,rotateY:ss,rotateZ:ss,scale:sy,scaleX:sy,scaleY:sy,scaleZ:sy,skew:ss,skewX:ss,skewY:ss,distance:Ne,translateX:Ne,translateY:Ne,translateZ:Ne,x:Ne,y:Ne,z:Ne,perspective:Ne,transformPerspective:Ne,opacity:xm,originX:YH,originY:YH,originZ:Ne},hk={borderWidth:Ne,borderTopWidth:Ne,borderRightWidth:Ne,borderBottomWidth:Ne,borderLeftWidth:Ne,borderRadius:Ne,borderTopLeftRadius:Ne,borderTopRightRadius:Ne,borderBottomRightRadius:Ne,borderBottomLeftRadius:Ne,width:Ne,maxWidth:Ne,height:Ne,maxHeight:Ne,top:Ne,right:Ne,bottom:Ne,left:Ne,inset:Ne,insetBlock:Ne,insetBlockStart:Ne,insetBlockEnd:Ne,insetInline:Ne,insetInlineStart:Ne,insetInlineEnd:Ne,padding:Ne,paddingTop:Ne,paddingRight:Ne,paddingBottom:Ne,paddingLeft:Ne,paddingBlock:Ne,paddingBlockStart:Ne,paddingBlockEnd:Ne,paddingInline:Ne,paddingInlineStart:Ne,paddingInlineEnd:Ne,margin:Ne,marginTop:Ne,marginRight:Ne,marginBottom:Ne,marginLeft:Ne,marginBlock:Ne,marginBlockStart:Ne,marginBlockEnd:Ne,marginInline:Ne,marginInlineStart:Ne,marginInlineEnd:Ne,fontSize:Ne,backgroundPositionX:Ne,backgroundPositionY:Ne,...TLe,zIndex:u8,fillOpacity:xm,strokeOpacity:xm,numOctaves:u8},CLe={...hk,color:gn,backgroundColor:gn,outlineColor:gn,fill:gn,stroke:gn,borderColor:gn,borderTopColor:gn,borderRightColor:gn,borderBottomColor:gn,borderLeftColor:gn,filter:uM,WebkitFilter:uM,mask:cM,WebkitMask:cM},bee=e=>CLe[e],OLe=new Set([uM,cM]);function xee(e,t){let n=bee(e);return OLe.has(n)||(n=Li),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const jLe=new Set(["auto","none","0"]);function NLe(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!jLe.has(a)&&ad(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=xee(n,i)}class PLe extends lk{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let h=t[d];if(typeof h=="string"&&(h=h.trim(),nk(h))){const m=fee(h,n.current);m!==void 0&&(t[d]=m),d===t.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!hee.has(r)||t.length!==2)return;const[i,a]=t,o=l8(i),l=l8(a),u=KH(i),f=KH(a);if(u!==f&&Ns[r]){this.needsMeasurement=!0;return}if(o!==l)if(r8(o)&&r8(l))for(let d=0;d<t.length;d++){const h=t[d];typeof h=="string"&&(t[d]=parseFloat(h))}else Ns[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||SLe(t[i]))&&r.push(i);r.length&&NLe(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ns[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=r.length-1,o=r[a];r[a]=Ns[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([u,f])=>{t.getValue(u).set(f)}),this.resolveNoneKeyframes()}}function wee(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const i=(n==null?void 0:n[e])??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(r=>r!=null)}const See=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ty(e){return OJ(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const{schedule:pk}=VJ(queueMicrotask,!1),_i={x:!1,y:!1};function _ee(){return _i.x||_i.y}function MLe(e){return e==="x"||e==="y"?_i[e]?null:(_i[e]=!0,()=>{_i[e]=!1}):_i.x||_i.y?null:(_i.x=_i.y=!0,()=>{_i.x=_i.y=!1})}function Eee(e,t){const n=wee(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function RLe(e){return!(e.pointerType==="touch"||_ee())}function kLe(e,t,n={}){const[r,i,a]=Eee(e,n);return r.forEach(o=>{let l=!1,u=!1,f;const d=()=>{o.removeEventListener("pointerleave",b)},h=y=>{f&&(f(y),f=void 0),d()},m=y=>{l=!1,window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",m),u&&(u=!1,h(y))},g=()=>{l=!0,window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",m,i)},b=y=>{if(y.pointerType!=="touch"){if(l){u=!0;return}h(y)}},w=y=>{if(!RLe(y))return;u=!1;const S=t(o,y);typeof S=="function"&&(f=S,o.addEventListener("pointerleave",b,i))};o.addEventListener("pointerenter",w,i),o.addEventListener("pointerdown",g,i)}),a}const Aee=(e,t)=>t?e===t?!0:Aee(e,t.parentElement):!1,mk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,DLe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ILe(e){return DLe.has(e.tagName)||e.isContentEditable===!0}const LLe=new Set(["INPUT","SELECT","TEXTAREA"]);function $Le(e){return LLe.has(e.tagName)||e.isContentEditable===!0}const Cy=new WeakSet;function c8(e){return t=>{t.key==="Enter"&&e(t)}}function _j(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const BLe=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=c8(()=>{if(Cy.has(n))return;_j(n,"down");const i=c8(()=>{_j(n,"up")}),a=()=>_j(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function f8(e){return mk(e)&&!_ee()}const d8=new WeakSet;function qLe(e,t,n={}){const[r,i,a]=Eee(e,n),o=l=>{const u=l.currentTarget;if(!f8(l)||d8.has(l))return;Cy.add(u),n.stopPropagation&&d8.add(l);const f=t(u,l),d=(g,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),Cy.has(u)&&Cy.delete(u),f8(g)&&typeof f=="function"&&f(g,{success:b})},h=g=>{d(g,u===window||u===document||n.useGlobalTarget||Aee(u,g.target))},m=g=>{d(g,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",m,i)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),Ty(l)&&(l.addEventListener("focus",f=>BLe(f,i)),!ILe(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function gk(e){return OJ(e)&&"ownerSVGElement"in e}const Oy=new WeakMap;let ls;const Tee=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:gk(r)&&"getBBox"in r?r.getBBox()[t]:r[n],zLe=Tee("inline","width","offsetWidth"),VLe=Tee("block","height","offsetHeight");function FLe({target:e,borderBoxSize:t}){var n;(n=Oy.get(e))==null||n.forEach(r=>{r(e,{get width(){return zLe(e,t)},get height(){return VLe(e,t)}})})}function ULe(e){e.forEach(FLe)}function HLe(){typeof ResizeObserver>"u"||(ls=new ResizeObserver(ULe))}function GLe(e,t){ls||HLe();const n=wee(e);return n.forEach(r=>{let i=Oy.get(r);i||(i=new Set,Oy.set(r,i)),i.add(t),ls==null||ls.observe(r)}),()=>{n.forEach(r=>{const i=Oy.get(r);i==null||i.delete(t),i!=null&&i.size||ls==null||ls.unobserve(r)})}}const jy=new Set;let Gc;function WLe(){Gc=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};jy.forEach(t=>t(e))},window.addEventListener("resize",Gc)}function KLe(e){return jy.add(e),Gc||WLe(),()=>{jy.delete(e),!jy.size&&typeof Gc=="function"&&(window.removeEventListener("resize",Gc),Gc=void 0)}}function h8(e,t){return typeof e=="function"?KLe(e):GLe(e,t)}function YLe(e){return gk(e)&&e.tagName==="svg"}const XLe=[...yee,gn,Li],ZLe=e=>XLe.find(vee(e)),p8=()=>({translate:0,scale:1,origin:0,originPoint:0}),Wc=()=>({x:p8(),y:p8()}),m8=()=>({min:0,max:0}),En=()=>({x:m8(),y:m8()}),QLe=new WeakMap;function Wx(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function wm(e){return typeof e=="string"||Array.isArray(e)}const vk=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],yk=["initial",...vk];function Kx(e){return Wx(e.animate)||yk.some(t=>wm(e[t]))}function Cee(e){return!!(Kx(e)||e.variants)}function JLe(e,t,n){for(const r in t){const i=t[r],a=n[r];if(qn(i))e.addValue(r,i);else if(qn(a))e.addValue(r,od(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,od(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const fM={current:null},Oee={current:!1},e$e=typeof window<"u";function t$e(){if(Oee.current=!0,!!e$e)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>fM.current=e.matches;e.addEventListener("change",t),t()}else fM.current=!1}const g8=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let y0={};function jee(e){y0=e}function n$e(){return y0}class r$e{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,skipAnimations:a,blockInitialAnimation:o,visualState:l},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=lk,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 g=ir.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Dt.render(this.render,!1,!0))};const{latestValues:f,renderState:d}=l;this.latestValues=f,this.baseTarget={...f},this.initialValues=n.initial?{...f}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.skipAnimationsConfig=a,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=Kx(n),this.isVariantNode=Cee(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:h,...m}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in m){const b=m[g];f[g]!==void 0&&qn(b)&&b.set(f[g])}}mount(t){var n,r;if(this.hasBeenMounted)for(const i in this.initialValues)(n=this.values.get(i))==null||n.jump(this.initialValues[i]),this.latestValues[i]=this.initialValues[i];this.current=t,QLe.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((i,a)=>this.bindToMotionValue(a,i)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Oee.current||t$e(),this.shouldReduceMotion=fM.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(r=this.parent)==null||r.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var t;this.projection&&this.projection.unmount(),Xs(this.notifyUpdate),Xs(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.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,n){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),n.accelerate&&uee.has(t)&&this.current instanceof HTMLElement){const{factory:o,keyframes:l,times:u,ease:f,duration:d}=n.accelerate,h=new see({element:this.current,name:t,keyframes:l,times:u,ease:f,duration:qr(d)}),m=o(h);this.valueSubscriptions.set(t,()=>{m(),h.cancel()});return}const r=Nd.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Dt.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.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 y0){const n=y0[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):En()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<g8.length;r++){const i=g8[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=JLe(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 n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=od(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(CJ(r)||jJ(r))?r=parseFloat(r):!ZLe(r)&&Li.test(n)&&(r=xee(t,n)),this.setBaseTarget(t,qn(r)?r.get():r)),qn(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=fk(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!qn(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new J2),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){pk.render(this.render)}}class Nee extends r$e{constructor(){super(...arguments),this.KeyframeResolver=PLe}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){const r=t.style;return r?r[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;qn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class rl{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Pee({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function i$e({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function a$e(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ej(e){return e===void 0||e===1}function dM({scale:e,scaleX:t,scaleY:n}){return!Ej(e)||!Ej(t)||!Ej(n)}function Ll(e){return dM(e)||Mee(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Mee(e){return v8(e.x)||v8(e.y)}function v8(e){return e&&e!=="0%"}function b0(e,t,n){const r=e-n,i=t*r;return n+i}function y8(e,t,n,r,i){return i!==void 0&&(e=b0(e,i,r)),b0(e,n,r)+t}function hM(e,t=0,n=1,r,i){e.min=y8(e.min,t,n,r,i),e.max=y8(e.max,t,n,r,i)}function Ree(e,{x:t,y:n}){hM(e.x,t.translate,t.scale,t.originPoint),hM(e.y,n.translate,n.scale,n.originPoint)}const b8=.999999999999,x8=1.0000000000001;function o$e(e,t,n,r=!1){var l;const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let u=0;u<i;u++){a=n[u],o=a.projectionDelta;const{visualElement:f}=a.options;f&&f.props.style&&f.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ra(e.x,-a.scroll.offset.x),ra(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Ree(e,o)),r&&Ll(a.latestValues)&&Ny(e,a.latestValues,(l=a.layout)==null?void 0:l.layoutBox))}t.x<x8&&t.x>b8&&(t.x=1),t.y<x8&&t.y>b8&&(t.y=1)}function ra(e,t){e.min+=t,e.max+=t}function w8(e,t,n,r,i=.5){const a=Ft(e.min,e.max,i);hM(e,t,n,a,r)}function S8(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function Ny(e,t,n){const r=n??e;w8(e.x,S8(t.x,r.x),t.scaleX,t.scale,t.originX),w8(e.y,S8(t.y,r.y),t.scaleY,t.scale,t.originY)}function kee(e,t){return Pee(a$e(e.getBoundingClientRect(),t))}function s$e(e,t,n){const r=kee(e,n),{scroll:i}=t;return i&&(ra(r.x,i.offset.x),ra(r.y,i.offset.y)),r}const l$e={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},u$e=jd.length;function c$e(e,t,n){let r="",i=!0;for(let a=0;a<u$e;a++){const o=jd[a],l=e[o];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(o.startsWith("scale")?1:0);else{const f=parseFloat(l);u=o.startsWith("scale")?f===1:f===0}if(!u||n){const f=See(l,hk[o]);if(!u){i=!1;const d=l$e[o]||o;r+=`${d}(${f}) `}n&&(t[o]=f)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function bk(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,l=!1;for(const u in t){const f=t[u];if(Nd.has(u)){o=!0;continue}else if(UJ(u)){i[u]=f;continue}else{const d=See(f,hk[u]);u.startsWith("origin")?(l=!0,a[u]=d):r[u]=d}}if(t.transform||(o||n?r.transform=c$e(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:u="50%",originY:f="50%",originZ:d=0}=a;r.transformOrigin=`${u} ${f} ${d}`}}function Dee(e,{style:t,vars:n},r,i){const a=e.style;let o;for(o in t)a[o]=t[o];i==null||i.applyProjectionStyles(a,r);for(o in n)a.setProperty(o,n[o])}function _8(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Kh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ne.test(e))e=parseFloat(e);else return e;const n=_8(e,t.target.x),r=_8(e,t.target.y);return`${n}% ${r}%`}},f$e={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Li.parse(e);if(i.length>5)return r;const a=Li.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,u=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=u;const f=Ft(l,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=f),typeof i[3+o]=="number"&&(i[3+o]/=f),a(i)}},pM={borderRadius:{...Kh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Kh,borderTopRightRadius:Kh,borderBottomLeftRadius:Kh,borderBottomRightRadius:Kh,boxShadow:f$e};function Iee(e,{layout:t,layoutId:n}){return Nd.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!pM[e]||e==="opacity")}function xk(e,t,n){var o;const r=e.style,i=t==null?void 0:t.style,a={};if(!r)return a;for(const l in r)(qn(r[l])||i&&qn(i[l])||Iee(l,e)||((o=n==null?void 0:n.getValue(l))==null?void 0:o.liveStyle)!==void 0)&&(a[l]=r[l]);return a}function d$e(e){return window.getComputedStyle(e)}class h$e extends Nee{constructor(){super(...arguments),this.type="html",this.renderInstance=Dee}readValueFromInstance(t,n){var r;if(Nd.has(n))return(r=this.projection)!=null&&r.isProjecting?eM(n):RIe(t,n);{const i=d$e(t),a=(UJ(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return kee(t,n)}build(t,n,r){bk(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return xk(t,n,r)}}const p$e={offset:"stroke-dashoffset",array:"stroke-dasharray"},m$e={offset:"strokeDashoffset",array:"strokeDasharray"};function g$e(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?p$e:m$e;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}const v$e=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Lee(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...l},u,f,d){if(bk(e,l,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m}=e;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox);for(const g of v$e)h[g]!==void 0&&(m[g]=h[g],delete h[g]);t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&g$e(h,i,a,o,!1)}const $ee=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"]),Bee=e=>typeof e=="string"&&e.toLowerCase()==="svg";function y$e(e,t,n,r){Dee(e,t,void 0,r);for(const i in t.attrs)e.setAttribute($ee.has(i)?i:dk(i),t.attrs[i])}function qee(e,t,n){const r=xk(e,t,n);for(const i in e)if(qn(e[i])||qn(t[i])){const a=jd.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}class b$e extends Nee{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=En}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Nd.has(n)){const r=bee(n);return r&&r.default||0}return n=$ee.has(n)?n:dk(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return qee(t,n,r)}build(t,n,r){Lee(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){y$e(t,n,r,i)}mount(t){this.isSVGTag=Bee(t.tagName),super.mount(t)}}const x$e=yk.length;function zee(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?zee(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<x$e;n++){const r=yk[n],i=e.props[r];(wm(i)||i===!1)&&(t[r]=i)}return t}function Vee(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const w$e=[...vk].reverse(),S$e=vk.length;function _$e(e){return t=>Promise.all(t.map(({animation:n,options:r})=>xLe(e,n,r)))}function E$e(e){let t=_$e(e),n=E8(),r=!0,i=!1;const a=f=>(d,h)=>{var g;const m=cu(e,h,f==="exit"?(g=e.presenceContext)==null?void 0:g.custom:void 0);if(m){const{transition:b,transitionEnd:w,...y}=m;d={...d,...y,...w}}return d};function o(f){t=f(e)}function l(f){const{props:d}=e,h=zee(e.parent)||{},m=[],g=new Set;let b={},w=1/0;for(let S=0;S<S$e;S++){const E=w$e[S],_=n[E],A=d[E]!==void 0?d[E]:h[E],T=wm(A),O=E===f?_.isActive:null;O===!1&&(w=S);let P=A===h[E]&&A!==d[E]&&T;if(P&&(r||i)&&e.manuallyAnimateOnMount&&(P=!1),_.protectedKeys={...b},!_.isActive&&O===null||!A&&!_.prevProp||Wx(A)||typeof A=="boolean")continue;if(E==="exit"&&_.isActive&&O!==!0){_.prevResolvedValues&&(b={...b,..._.prevResolvedValues});continue}const M=A$e(_.prevProp,A);let R=M||E===f&&_.isActive&&!P&&T||S>w&&T,D=!1;const I=Array.isArray(A)?A:[A];let k=I.reduce(a(E),{});O===!1&&(k={});const{prevResolvedValues:F={}}=_,$={...F,...k},q=U=>{R=!0,g.has(U)&&(D=!0,g.delete(U)),_.needsAnimating[U]=!0;const K=e.getValue(U);K&&(K.liveStyle=!1)};for(const U in $){const K=k[U],Z=F[U];if(b.hasOwnProperty(U))continue;let H=!1;oM(K)&&oM(Z)?H=!Vee(K,Z):H=K!==Z,H?K!=null?q(U):g.add(U):K!==void 0&&g.has(U)?q(U):_.protectedKeys[U]=!0}_.prevProp=A,_.prevResolvedValues=k,_.isActive&&(b={...b,...k}),(r||i)&&e.blockInitialAnimation&&(R=!1);const L=P&&M;R&&(!L||D)&&m.push(...I.map(U=>{const K={type:E};if(typeof U=="string"&&(r||i)&&!L&&e.manuallyAnimateOnMount&&e.parent){const{parent:Z}=e,H=cu(Z,U);if(Z.enteringChildren&&H){const{delayChildren:V}=H.transition||{};K.delay=cee(Z.enteringChildren,e,V)}}return{animation:U,options:K}}))}if(g.size){const S={};if(typeof d.initial!="boolean"){const E=cu(e,Array.isArray(d.initial)?d.initial[0]:d.initial);E&&E.transition&&(S.transition=E.transition)}g.forEach(E=>{const _=e.getBaseTarget(E),A=e.getValue(E);A&&(A.liveStyle=!0),S[E]=_??null}),m.push({animation:S})}let y=!!m.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,i=!1,y?t(m):Promise.resolve()}function u(f,d){var m;if(n[f].isActive===d)return Promise.resolve();(m=e.variantChildren)==null||m.forEach(g=>{var b;return(b=g.animationState)==null?void 0:b.setActive(f,d)}),n[f].isActive=d;const h=l(f);for(const g in n)n[g].protectedKeys={};return h}return{animateChanges:l,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=E8(),i=!0}}}function A$e(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Vee(t,e):!1}function Ml(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function E8(){return{animate:Ml(!0),whileInView:Ml(),whileHover:Ml(),whileTap:Ml(),whileDrag:Ml(),whileFocus:Ml(),exit:Ml()}}function mM(e,t){e.min=t.min,e.max=t.max}function Si(e,t){mM(e.x,t.x),mM(e.y,t.y)}function A8(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const Fee=1e-4,T$e=1-Fee,C$e=1+Fee,Uee=.01,O$e=0-Uee,j$e=0+Uee;function ar(e){return e.max-e.min}function N$e(e,t,n){return Math.abs(e-t)<=n}function T8(e,t,n,r=.5){e.origin=r,e.originPoint=Ft(t.min,t.max,e.origin),e.scale=ar(n)/ar(t),e.translate=Ft(n.min,n.max,e.origin)-e.originPoint,(e.scale>=T$e&&e.scale<=C$e||isNaN(e.scale))&&(e.scale=1),(e.translate>=O$e&&e.translate<=j$e||isNaN(e.translate))&&(e.translate=0)}function mp(e,t,n,r){T8(e.x,t.x,n.x,r?r.originX:void 0),T8(e.y,t.y,n.y,r?r.originY:void 0)}function C8(e,t,n,r=0){const i=r?Ft(n.min,n.max,r):n.min;e.min=i+t.min,e.max=e.min+ar(t)}function P$e(e,t,n,r){C8(e.x,t.x,n.x,r==null?void 0:r.x),C8(e.y,t.y,n.y,r==null?void 0:r.y)}function O8(e,t,n,r=0){const i=r?Ft(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+ar(t)}function x0(e,t,n,r){O8(e.x,t.x,n.x,r==null?void 0:r.x),O8(e.y,t.y,n.y,r==null?void 0:r.y)}function j8(e,t,n,r,i){return e-=t,e=b0(e,1/n,r),i!==void 0&&(e=b0(e,1/i,r)),e}function M$e(e,t=0,n=1,r=.5,i,a=e,o=e){if(da.test(t)&&(t=parseFloat(t),t=Ft(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Ft(a.min,a.max,r);e===a&&(l-=t),e.min=j8(e.min,t,n,l,i),e.max=j8(e.max,t,n,l,i)}function N8(e,t,[n,r,i],a,o){M$e(e,t[n],t[r],t[i],t.scale,a,o)}const R$e=["x","scaleX","originX"],k$e=["y","scaleY","originY"];function P8(e,t,n,r){N8(e.x,t,R$e,n?n.x:void 0,r?r.x:void 0),N8(e.y,t,k$e,n?n.y:void 0,r?r.y:void 0)}function M8(e){return e.translate===0&&e.scale===1}function Hee(e){return M8(e.x)&&M8(e.y)}function R8(e,t){return e.min===t.min&&e.max===t.max}function D$e(e,t){return R8(e.x,t.x)&&R8(e.y,t.y)}function k8(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Gee(e,t){return k8(e.x,t.x)&&k8(e.y,t.y)}function D8(e){return ar(e.x)/ar(e.y)}function I8(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Qi(e){return[e("x"),e("y")]}function I$e(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:f,rotate:d,rotateX:h,rotateY:m,skewX:g,skewY:b}=n;f&&(r=`perspective(${f}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),b&&(r+=`skewY(${b}deg) `)}const l=e.x.scale*t.x,u=e.y.scale*t.y;return(l!==1||u!==1)&&(r+=`scale(${l}, ${u})`),r||"none"}const Wee=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],L$e=Wee.length,L8=e=>typeof e=="string"?parseFloat(e):e,$8=e=>typeof e=="number"||Ne.test(e);function $$e(e,t,n,r,i,a){i?(e.opacity=Ft(0,n.opacity??1,B$e(r)),e.opacityExit=Ft(t.opacity??1,0,q$e(r))):a&&(e.opacity=Ft(t.opacity??1,n.opacity??1,r));for(let o=0;o<L$e;o++){const l=Wee[o];let u=B8(t,l),f=B8(n,l);if(u===void 0&&f===void 0)continue;u||(u=0),f||(f=0),u===0||f===0||$8(u)===$8(f)?(e[l]=Math.max(Ft(L8(u),L8(f),r),0),(da.test(f)||da.test(u))&&(e[l]+="%")):e[l]=f}(t.rotate||n.rotate)&&(e.rotate=Ft(t.rotate||0,n.rotate||0,r))}function B8(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const B$e=Kee(0,.5,$J),q$e=Kee(.5,.95,li);function Kee(e,t,n){return r=>r<e?0:r>t?1:n(bm(e,t,r))}function z$e(e,t,n){const r=qn(e)?e:od(e);return r.start(ck("",r,t,n)),r.animation}function Sm(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const V$e=(e,t)=>e.depth-t.depth;class F$e{constructor(){this.children=[],this.isDirty=!1}add(t){Z2(this.children,t),this.isDirty=!0}remove(t){h0(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(V$e),this.isDirty=!1,this.children.forEach(t)}}function U$e(e,t){const n=ir.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Xs(r),e(a-t))};return Dt.setup(r,!0),()=>Xs(r)}function Py(e){return qn(e)?e.get():e}class H$e{constructor(){this.members=[]}add(t){Z2(this.members,t);for(let n=this.members.length-1;n>=0;n--){const r=this.members[n];if(r===t||r===this.lead||r===this.prevLead)continue;const i=r.instance;(!i||i.isConnected===!1)&&!r.snapshot&&(h0(this.members,r),r.unmount())}t.scheduleRender()}remove(t){if(h0(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){var n;for(let r=this.members.indexOf(t)-1;r>=0;r--){const i=this.members[r];if(i.isPresent!==!1&&((n=i.instance)==null?void 0:n.isConnected)!==!1)return this.promote(i),!0}return!1}promote(t,n){var i;const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.updateSnapshot(),t.scheduleRender();const{layoutDependency:a}=r.options,{layoutDependency:o}=t.options;(a===void 0||a!==o)&&(t.resumeFrom=r,n&&(r.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),(i=t.root)!=null&&i.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,a,o;(r=(n=t.options).onExitComplete)==null||r.call(n),(o=(i=t.resumingFrom)==null?void 0:(a=i.options).onExitComplete)==null||o.call(a)})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){var t;(t=this.lead)!=null&&t.snapshot&&(this.lead.snapshot=void 0)}}const My={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Aj=["","X","Y","Z"],G$e=1e3;let W$e=0;function Tj(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Yee(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=mee(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Dt,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Yee(r)}function Xee({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=W$e++,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.layoutVersion=0,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(X$e),this.nodes.forEach(n3e),this.nodes.forEach(r3e),this.nodes.forEach(Z$e)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new F$e)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new J2),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const u=this.eventHandlers.get(o);u&&u.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=gk(o)&&!YLe(o),this.instance=o;const{layoutId:l,layout:u,visualElement:f}=this.options;if(f&&!f.current&&f.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const m=()=>this.root.updateBlockedByResize=!1;Dt.read(()=>{h=window.innerWidth}),e(o,()=>{const g=window.innerWidth;g!==h&&(h=g,this.root.updateBlockedByResize=!0,d&&d(),d=U$e(m,250),My.hasAnimatedSinceResize&&(My.hasAnimatedSinceResize=!1,this.nodes.forEach(V8)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&f&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||f.getDefaultTransition()||l3e,{onLayoutAnimationStart:w,onLayoutAnimationComplete:y}=f.getProps(),S=!this.targetLayout||!Gee(this.targetLayout,g),E=!h&&m;if(this.options.layoutRoot||this.resumeFrom||E||h&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const _={...uk(b,"layout"),onPlay:w,onComplete:y};(f.shouldReduceMotion||this.options.layoutRoot)&&(_.delay=0,_.type=!1),this.startAnimation(_),this.setAnimationOrigin(d,E)}else h||V8(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Xs(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(i3e),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Yee(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:u}=this.options;if(l===void 0&&!u)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(J$e),this.nodes.forEach(q8);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(z8);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(e3e),this.nodes.forEach(t3e),this.nodes.forEach(K$e),this.nodes.forEach(Y$e)):this.nodes.forEach(z8),this.clearAllSnapshots();const l=ir.now();$n.delta=ma(0,1e3/60,l-$n.timestamp),$n.timestamp=l,$n.isProcessing=!0,vj.update.process($n),vj.preRender.process($n),vj.render.process($n),$n.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,pk.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Q$e),this.sharedNodes.forEach(a3e)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Dt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Dt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ar(this.snapshot.measuredBox.x)&&!ar(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=En()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Hee(this.projectionDelta),u=this.getTransformTemplate(),f=u?u(this.latestValues,""):void 0,d=f!==this.prevTransformTemplateValue;o&&this.instance&&(l||Ll(this.latestValues)||d)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let u=this.removeElementScroll(l);return o&&(u=this.removeTransform(u)),u3e(u),{animationId:this.root.animationId,measuredBox:l,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:o}=this.options;if(!o)return En();const l=o.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(c3e))){const{scroll:d}=this.root;d&&(ra(l.x,d.offset.x),ra(l.y,d.offset.y))}return l}removeElementScroll(o){var u;const l=En();if(Si(l,o),(u=this.scroll)!=null&&u.wasRoot)return l;for(let f=0;f<this.path.length;f++){const d=this.path[f],{scroll:h,options:m}=d;d!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&Si(l,o),ra(l.x,h.offset.x),ra(l.y,h.offset.y))}return l}applyTransform(o,l=!1,u){var d,h;const f=u||En();Si(f,o);for(let m=0;m<this.path.length;m++){const g=this.path[m];!l&&g.options.layoutScroll&&g.scroll&&g!==g.root&&(ra(f.x,-g.scroll.offset.x),ra(f.y,-g.scroll.offset.y)),Ll(g.latestValues)&&Ny(f,g.latestValues,(d=g.layout)==null?void 0:d.layoutBox)}return Ll(this.latestValues)&&Ny(f,this.latestValues,(h=this.layout)==null?void 0:h.layoutBox),f}removeTransform(o){var u;const l=En();Si(l,o);for(let f=0;f<this.path.length;f++){const d=this.path[f];if(!Ll(d.latestValues))continue;let h;d.instance&&(dM(d.latestValues)&&d.updateSnapshot(),h=En(),Si(h,d.measurePageBox())),P8(l,d.latestValues,(u=d.snapshot)==null?void 0:u.layoutBox,h)}return Ll(this.latestValues)&&P8(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==$n.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var g;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!this.layout||!(d||h))return;this.resolvedRelativeTargetAt=$n.timestamp;const m=this.getClosestProjectingParent();m&&this.linkedParentVersion!==m.layoutVersion&&!m.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&m&&m.layout?this.createRelativeTarget(m,this.layout.layoutBox,m.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=En(),this.targetWithTransforms=En()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),P$e(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Si(this.target,this.layout.layoutBox),Ree(this.target,this.targetDelta)):Si(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?this.createRelativeTarget(m,this.target,m.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||dM(this.parent.latestValues)||Mee(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,l,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=En(),this.relativeTargetOrigin=En(),x0(this.relativeTargetOrigin,l,u,this.options.layoutAnchor||void 0),Si(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var b;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===$n.timestamp&&(u=!1),u)return;const{layout:f,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||!(f||d))return;Si(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;o$e(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=En());const{target:g}=o;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(A8(this.prevProjectionDelta.x,this.projectionDelta.x),A8(this.prevProjectionDelta.y,this.projectionDelta.y)),mp(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!I8(this.projectionDelta.x,this.prevProjectionDelta.x)||!I8(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Wc(),this.projectionDelta=Wc(),this.projectionDeltaWithTransform=Wc()}setAnimationOrigin(o,l=!1){const u=this.snapshot,f=u?u.latestValues:{},d={...this.latestValues},h=Wc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const m=En(),g=u?u.source:void 0,b=this.layout?this.layout.source:void 0,w=g!==b,y=this.getStack(),S=!y||y.members.length<=1,E=!!(w&&!S&&this.options.crossfade===!0&&!this.path.some(s3e));this.animationProgress=0;let _;this.mixTargetDelta=A=>{const T=A/1e3;F8(h.x,o.x,T),F8(h.y,o.y,T),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(x0(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),o3e(this.relativeTarget,this.relativeTargetOrigin,m,T),_&&D$e(this.relativeTarget,_)&&(this.isProjectionDirty=!1),_||(_=En()),Si(_,this.relativeTarget)),w&&(this.animationValues=d,$$e(d,f,this.latestValues,T,E,S)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,u,f;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(f=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||f.stop(),this.pendingAnimation&&(Xs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Dt.update(()=>{My.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=od(0)),this.motionValue.jump(0,!1),this.currentAnimation=z$e(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(G$e),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:u,layout:f,latestValues:d}=o;if(!(!l||!u||!f)){if(this!==o&&this.layout&&f&&Zee(this.options.animationType,this.layout.layoutBox,f.layoutBox)){u=this.target||En();const h=ar(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+h;const m=ar(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+m}Si(l,u),Ny(l,d),mp(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new H$e),this.sharedNodes.get(o).add(l);const f=l.options.initialPromotionConfig;l.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:u}={}){const f=this.getStack();f&&f.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(l=!0),!l)return;const f={};u.z&&Tj("z",o,f,this.animationValues);for(let d=0;d<Aj.length;d++)Tj(`rotate${Aj[d]}`,o,f,this.animationValues),Tj(`skew${Aj[d]}`,o,f,this.animationValues);o.render();for(const d in f)o.setStaticValue(d,f[d]),this.animationValues&&(this.animationValues[d]=f[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Py(l==null?void 0:l.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Py(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Ll(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=f.animationValues||f.latestValues;this.applyTransformsToTarget();let h=I$e(this.projectionDeltaWithTransform,this.treeScale,d);u&&(h=u(d,h)),o.transform=h;const{x:m,y:g}=this.projectionDelta;o.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,f.animationValues?o.opacity=f===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=f===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const b in pM){if(d[b]===void 0)continue;const{correct:w,applyTo:y,isCSSVariable:S}=pM[b],E=h==="none"?d[b]:w(d[b],f);if(y){const _=y.length;for(let A=0;A<_;A++)o[y[A]]=E}else S?this.options.visualElement.renderState.vars[b]=E:o[b]=E}this.options.layoutId&&(o.pointerEvents=f===this?Py(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(q8),this.root.sharedNodes.clear()}}}function K$e(e){e.updateLayout()}function Y$e(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;if(a==="size")Qi(h=>{const m=o?t.measuredBox[h]:t.layoutBox[h],g=ar(m);m.min=r[h].min,m.max=m.min+g});else if(a==="x"||a==="y"){const h=a==="x"?"y":"x";mM(o?t.measuredBox[h]:t.layoutBox[h],r[h])}else Zee(a,t.layoutBox,r)&&Qi(h=>{const m=o?t.measuredBox[h]:t.layoutBox[h],g=ar(r[h]);m.max=m.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+g)});const l=Wc();mp(l,r,t.layoutBox);const u=Wc();o?mp(u,e.applyTransform(i,!0),t.measuredBox):mp(u,r,t.layoutBox);const f=!Hee(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:g}=h;if(m&&g){const b=e.options.layoutAnchor||void 0,w=En();x0(w,t.layoutBox,m.layoutBox,b);const y=En();x0(y,r,g.layoutBox,b),Gee(w,y)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=y,e.relativeTargetOrigin=w,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:u,layoutDelta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function X$e(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 Z$e(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Q$e(e){e.clearSnapshot()}function q8(e){e.clearMeasurements()}function J$e(e){e.isLayoutDirty=!0,e.updateLayout()}function z8(e){e.isLayoutDirty=!1}function e3e(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function t3e(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function V8(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n3e(e){e.resolveTargetDelta()}function r3e(e){e.calcProjection()}function i3e(e){e.resetSkewAndRotation()}function a3e(e){e.removeLeadSnapshot()}function F8(e,t,n){e.translate=Ft(t.translate,0,n),e.scale=Ft(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function U8(e,t,n,r){e.min=Ft(t.min,n.min,r),e.max=Ft(t.max,n.max,r)}function o3e(e,t,n,r){U8(e.x,t.x,n.x,r),U8(e.y,t.y,n.y,r)}function s3e(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const l3e={duration:.45,ease:[.4,0,.1,1]},H8=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),G8=H8("applewebkit/")&&!H8("chrome/")?Math.round:li;function W8(e){e.min=G8(e.min),e.max=G8(e.max)}function u3e(e){W8(e.x),W8(e.y)}function Zee(e,t,n){return e==="position"||e==="preserve-aspect"&&!N$e(D8(t),D8(n),.2)}function c3e(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const f3e=Xee({attachResizeListener:(e,t)=>Sm(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||((e=document.body)==null?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||((t=document.body)==null?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),Cj={current:void 0},Qee=Xee({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cj.current){const e=new f3e({});e.mount(window),e.setOptions({layoutScroll:!0}),Cj.current=e}return Cj.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),wk=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function K8(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function d3e(...e){return t=>{let n=!1;const r=e.map(i=>{const a=K8(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():K8(e[i],null)}}}}function h3e(...e){return j.useCallback(d3e(...e),e)}class p3e extends j.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(Ty(n)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const r=n.offsetParent,i=Ty(r)&&r.offsetWidth||0,a=Ty(r)&&r.offsetHeight||0,o=getComputedStyle(n),l=this.props.sizeRef.current;l.height=parseFloat(o.height),l.width=parseFloat(o.width),l.top=n.offsetTop,l.left=n.offsetLeft,l.right=i-l.width-l.left,l.bottom=a-l.height-l.top}return null}componentDidUpdate(){}render(){return this.props.children}}function m3e({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){var m;const o=j.useId(),l=j.useRef(null),u=j.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0}),{nonce:f}=j.useContext(wk),d=((m=e.props)==null?void 0:m.ref)??(e==null?void 0:e.ref),h=h3e(l,d);return j.useInsertionEffect(()=>{const{width:g,height:b,top:w,left:y,right:S,bottom:E}=u.current;if(t||a===!1||!l.current||!g||!b)return;const _=n==="left"?`left: ${y}`:`right: ${S}`,A=r==="bottom"?`bottom: ${E}`:`top: ${w}`;l.current.dataset.motionPopId=o;const T=document.createElement("style");f&&(T.nonce=f);const O=i??document.head;return O.appendChild(T),T.sheet&&T.sheet.insertRule(`
|
|
445
|
+
[data-motion-pop-id="${o}"] {
|
|
446
|
+
position: absolute !important;
|
|
447
|
+
width: ${g}px !important;
|
|
448
|
+
height: ${b}px !important;
|
|
449
|
+
${_}px !important;
|
|
450
|
+
${A}px !important;
|
|
451
|
+
}
|
|
452
|
+
`),()=>{var P;(P=l.current)==null||P.removeAttribute("data-motion-pop-id"),O.contains(T)&&O.removeChild(T)}},[t]),x.jsx(p3e,{isPresent:t,childRef:l,sizeRef:u,pop:a,children:a===!1?e:j.cloneElement(e,{ref:h})})}const g3e=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,anchorY:u,root:f})=>{const d=X2(v3e),h=j.useId();let m=!0,g=j.useMemo(()=>(m=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:b=>{d.set(b,!0);for(const w of d.values())if(!w)return;r&&r()},register:b=>(d.set(b,!1),()=>d.delete(b))}),[n,d,r]);return a&&m&&(g={...g}),j.useMemo(()=>{d.forEach((b,w)=>d.set(w,!1))},[n]),j.useEffect(()=>{!n&&!d.size&&r&&r()},[n]),e=x.jsx(m3e,{pop:o==="popLayout",isPresent:n,anchorX:l,anchorY:u,root:f,children:e}),x.jsx(Hx.Provider,{value:g,children:e})};function v3e(){return new Map}function Jee(e=!0){const t=j.useContext(Hx);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=j.useId();j.useEffect(()=>{if(e)return i(a)},[e]);const o=j.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const ly=e=>e.key||"";function Y8(e){const t=[];return j.Children.forEach(e,n=>{j.isValidElement(n)&&t.push(n)}),t}const y3e=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:l="left",anchorY:u="top",root:f})=>{const[d,h]=Jee(o),m=j.useMemo(()=>Y8(e),[e]),g=o&&!d?[]:m.map(ly),b=j.useRef(!0),w=j.useRef(m),y=X2(()=>new Map),S=j.useRef(new Set),[E,_]=j.useState(m),[A,T]=j.useState(m);TJ(()=>{b.current=!1,w.current=m;for(let M=0;M<A.length;M++){const R=ly(A[M]);g.includes(R)?(y.delete(R),S.current.delete(R)):y.get(R)!==!0&&y.set(R,!1)}},[A,g.length,g.join("-")]);const O=[];if(m!==E){let M=[...m];for(let R=0;R<A.length;R++){const D=A[R],I=ly(D);g.includes(I)||(M.splice(R,0,D),O.push(D))}return a==="wait"&&O.length&&(M=O),T(Y8(M)),_(m),null}const{forceRender:P}=j.useContext(Y2);return x.jsx(x.Fragment,{children:A.map(M=>{const R=ly(M),D=o&&!d?!1:m===A||g.includes(R),I=()=>{if(S.current.has(R))return;if(y.has(R))S.current.add(R),y.set(R,!0);else return;let k=!0;y.forEach(F=>{F||(k=!1)}),k&&(P==null||P(),T(w.current),o&&(h==null||h()),r&&r())};return x.jsx(g3e,{isPresent:D,initial:!b.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:f,onExitComplete:D?void 0:I,anchorX:l,anchorY:u,children:M},R)})})},ete=j.createContext({strict:!1}),X8={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"]};let Z8=!1;function b3e(){if(Z8)return;const e={};for(const t in X8)e[t]={isEnabled:n=>X8[t].some(r=>!!n[r])};jee(e),Z8=!0}function tte(){return b3e(),n$e()}function x3e(e){const t=tte();for(const n in e)t[n]={...t[n],...e[n]};jee(t)}const w3e=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","propagate","ignoreStrict","viewport"]);function w0(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||w3e.has(e)}let nte=e=>!w0(e);function S3e(e){typeof e=="function"&&(nte=t=>t.startsWith("on")?!w0(t):e(t))}try{S3e(require("@emotion/is-prop-valid").default)}catch{}function _3e(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||qn(e[i])||(nte(i)||n===!0&&w0(i)||!t&&!w0(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Yx=j.createContext({});function E3e(e,t){if(Kx(e)){const{initial:n,animate:r}=e;return{initial:n===!1||wm(n)?n:void 0,animate:wm(r)?r:void 0}}return e.inherit!==!1?t:{}}function A3e(e){const{initial:t,animate:n}=E3e(e,j.useContext(Yx));return j.useMemo(()=>({initial:t,animate:n}),[Q8(t),Q8(n)])}function Q8(e){return Array.isArray(e)?e.join(" "):e}const Sk=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function rte(e,t,n){for(const r in t)!qn(t[r])&&!Iee(r,n)&&(e[r]=t[r])}function T3e({transformTemplate:e},t){return j.useMemo(()=>{const n=Sk();return bk(n,t,e),Object.assign({},n.vars,n.style)},[t])}function C3e(e,t){const n=e.style||{},r={};return rte(r,n,e),Object.assign(r,T3e(e,t)),r}function O3e(e,t){const n={},r=C3e(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const ite=()=>({...Sk(),attrs:{}});function j3e(e,t,n,r){const i=j.useMemo(()=>{const a=ite();return Lee(a,t,Bee(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};rte(a,e.style,e),i.style={...a,...i.style}}return i}const N3e=["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 _k(e){return typeof e!="string"||e.includes("-")?!1:!!(N3e.indexOf(e)>-1||/[A-Z]/u.test(e))}function P3e(e,t,n,{latestValues:r},i,a=!1,o){const u=(o??_k(e)?j3e:O3e)(t,r,i,e),f=_3e(t,typeof e=="string",a),d=e!==j.Fragment?{...f,...u,ref:n}:{},{children:h}=t,m=j.useMemo(()=>qn(h)?h.get():h,[h]);return j.createElement(e,{...d,children:m})}function M3e({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:R3e(n,r,i,e),renderState:t()}}function R3e(e,t,n,r){const i={},a=r(e,{});for(const m in a)i[m]=Py(a[m]);let{initial:o,animate:l}=e;const u=Kx(e),f=Cee(e);t&&f&&!u&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?l:o;if(h&&typeof h!="boolean"&&!Wx(h)){const m=Array.isArray(h)?h:[h];for(let g=0;g<m.length;g++){const b=fk(e,m[g]);if(b){const{transitionEnd:w,transition:y,...S}=b;for(const E in S){let _=S[E];if(Array.isArray(_)){const A=d?_.length-1:0;_=_[A]}_!==null&&(i[E]=_)}for(const E in w)i[E]=w[E]}}}return i}const ate=e=>(t,n)=>{const r=j.useContext(Yx),i=j.useContext(Hx),a=()=>M3e(e,t,r,i);return n?a():X2(a)},k3e=ate({scrapeMotionValuesFromProps:xk,createRenderState:Sk}),D3e=ate({scrapeMotionValuesFromProps:qee,createRenderState:ite}),I3e=Symbol.for("motionComponentSymbol");function L3e(e,t,n){const r=j.useRef(n);j.useInsertionEffect(()=>{r.current=n});const i=j.useRef(null);return j.useCallback(a=>{var l;a&&((l=e.onMount)==null||l.call(e,a));const o=r.current;if(typeof o=="function")if(a){const u=o(a);typeof u=="function"&&(i.current=u)}else i.current?(i.current(),i.current=null):o(a);else o&&(o.current=a);t&&(a?t.mount(a):t.unmount())},[t])}const ote=j.createContext({});function Bc(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function $3e(e,t,n,r,i,a){var _,A;const{visualElement:o}=j.useContext(Yx),l=j.useContext(ete),u=j.useContext(Hx),f=j.useContext(wk),d=f.reducedMotion,h=f.skipAnimations,m=j.useRef(null),g=j.useRef(!1);r=r||l.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:h,isSVG:a}),g.current&&m.current&&(m.current.manuallyAnimateOnMount=!0));const b=m.current,w=j.useContext(ote);b&&!b.projection&&i&&(b.type==="html"||b.type==="svg")&&B3e(m.current,n,i,w);const y=j.useRef(!1);j.useInsertionEffect(()=>{b&&y.current&&b.update(n,u)});const S=n[pee],E=j.useRef(!!S&&typeof window<"u"&&!((_=window.MotionHandoffIsComplete)!=null&&_.call(window,S))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,S)));return TJ(()=>{g.current=!0,b&&(y.current=!0,window.MotionIsMounted=!0,b.updateFeatures(),b.scheduleRenderMicrotask(),E.current&&b.animationState&&b.animationState.animateChanges())}),j.useEffect(()=>{b&&(!E.current&&b.animationState&&b.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var T;(T=window.MotionHandoffMarkAsComplete)==null||T.call(window,S)}),E.current=!1),b.enteringChildren=void 0)}),b}function B3e(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:l,layoutScroll:u,layoutRoot:f,layoutAnchor:d,layoutCrossfade:h}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:ste(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&Bc(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:h,layoutScroll:u,layoutRoot:f,layoutAnchor:d})}function ste(e){if(e)return e.options.allowProjection!==!1?e.projection:ste(e.parent)}function Oj(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&x3e(r);const a=n?n==="svg":_k(e),o=a?D3e:k3e;function l(f,d){let h;const m={...j.useContext(wk),...f,layoutId:q3e(f)},{isStatic:g}=m,b=A3e(f),w=o(f,g);if(!g&&typeof window<"u"){z3e();const y=V3e(m);h=y.MeasureLayout,b.visualElement=$3e(e,w,m,i,y.ProjectionNode,a)}return x.jsxs(Yx.Provider,{value:b,children:[h&&b.visualElement?x.jsx(h,{visualElement:b.visualElement,...m}):null,P3e(e,f,L3e(w,b.visualElement,d),w,g,t,a)]})}l.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const u=j.forwardRef(l);return u[I3e]=e,u}function q3e({layoutId:e}){const t=j.useContext(Y2).id;return t&&e!==void 0?t+"-"+e:e}function z3e(e,t){j.useContext(ete).strict}function V3e(e){const t=tte(),{drag:n,layout:r}=t;if(!n&&!r)return{};const i={...n,...r};return{MeasureLayout:n!=null&&n.isEnabled(e)||r!=null&&r.isEnabled(e)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function F3e(e,t){if(typeof Proxy>"u")return Oj;const n=new Map,r=(a,o)=>Oj(a,o,e,t),i=(a,o)=>r(a,o);return new Proxy(i,{get:(a,o)=>o==="create"?r:(n.has(o)||n.set(o,Oj(o,void 0,e,t)),n.get(o))})}const U3e=(e,t)=>t.isSVG??_k(e)?new b$e(t):new h$e(t,{allowProjection:e!==j.Fragment});class H3e extends rl{constructor(t){super(t),t.animationState||(t.animationState=E$e(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Wx(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let G3e=0;class W3e extends rl{constructor(){super(...arguments),this.id=G3e++,this.isExitComplete=!1}update(){var a;if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;if(t&&r===!1){if(this.isExitComplete){const{initial:o,custom:l}=this.node.getProps();if(typeof o=="string"){const u=cu(this.node,o,l);if(u){const{transition:f,transitionEnd:d,...h}=u;for(const m in h)(a=this.node.getValue(m))==null||a.jump(h[m])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const K3e={animation:{Feature:H3e},exit:{Feature:W3e}};function ig(e){return{point:{x:e.pageX,y:e.pageY}}}const Y3e=e=>t=>mk(t)&&e(t,ig(t));function gp(e,t,n,r){return Sm(e,t,Y3e(n),r)}const lte=({current:e})=>e?e.ownerDocument.defaultView:null,J8=(e,t)=>Math.abs(e-t);function X3e(e,t){const n=J8(e.x,t.x),r=J8(e.y,t.y);return Math.sqrt(n**2+r**2)}const e9=new Set(["auto","scroll"]);class ute{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3,element:l}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=g=>{this.handleScroll(g.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=uy(this.lastRawMoveEventInfo,this.transformPagePoint));const g=jj(this.lastMoveEventInfo,this.history),b=this.startEvent!==null,w=X3e(g.offset,{x:0,y:0})>=this.distanceThreshold;if(!b&&!w)return;const{point:y}=g,{timestamp:S}=$n;this.history.push({...y,timestamp:S});const{onStart:E,onMove:_}=this.handlers;b||(E&&E(this.lastMoveEvent,g),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,g)},this.handlePointerMove=(g,b)=>{this.lastMoveEvent=g,this.lastRawMoveEventInfo=b,this.lastMoveEventInfo=uy(b,this.transformPagePoint),Dt.update(this.updatePoint,!0)},this.handlePointerUp=(g,b)=>{this.end();const{onEnd:w,onSessionEnd:y,resumeAnimation:S}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&S&&S(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=jj(g.type==="pointercancel"?this.lastMoveEventInfo:uy(b,this.transformPagePoint),this.history);this.startEvent&&w&&w(g,E),y&&y(g,E)},!mk(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const u=ig(t),f=uy(u,this.transformPagePoint),{point:d}=f,{timestamp:h}=$n;this.history=[{...d,timestamp:h}];const{onSessionStart:m}=n;m&&m(t,jj(f,this.history)),this.removeListeners=tg(gp(this.contextWindow,"pointermove",this.handlePointerMove),gp(this.contextWindow,"pointerup",this.handlePointerUp),gp(this.contextWindow,"pointercancel",this.handlePointerUp)),l&&this.startScrollTracking(l)}startScrollTracking(t){let n=t.parentElement;for(;n;){const r=getComputedStyle(n);(e9.has(r.overflowX)||e9.has(r.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){const n=this.scrollPositions.get(t);if(!n)return;const r=t===window,i=r?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:i.x-n.x,y:i.y-n.y};a.x===0&&a.y===0||(r?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,i),Dt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Xs(this.updatePoint)}}function uy(e,t){return t?{point:t(e.point)}:e}function t9(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jj({point:e},t){return{point:e,delta:t9(e,cte(t)),offset:t9(e,Z3e(t)),velocity:Q3e(t,.1)}}function Z3e(e){return e[0]}function cte(e){return e[e.length-1]}function Q3e(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=cte(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>qr(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>qr(t)*2&&(r=e[1]);const a=oi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function J3e(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ft(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ft(n,e,r.max):Math.min(e,n)),e}function n9(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eBe(e,{top:t,left:n,bottom:r,right:i}){return{x:n9(e.x,n,i),y:n9(e.y,t,r)}}function r9(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function tBe(e,t){return{x:r9(e.x,t.x),y:r9(e.y,t.y)}}function nBe(e,t){let n=.5;const r=ar(e),i=ar(t);return i>r?n=bm(t.min,t.max-r,e.min):r>i&&(n=bm(e.min,e.max-i,t.min)),ma(0,1,n)}function rBe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const gM=.35;function iBe(e=gM){return e===!1?e=0:e===!0&&(e=gM),{x:i9(e,"left","right"),y:i9(e,"top","bottom")}}function i9(e,t,n){return{min:a9(e,t),max:a9(e,n)}}function a9(e,t){return typeof e=="number"?e:e[t]||0}const aBe=new WeakMap;class oBe{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=En(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=h=>{n&&this.snapToCursor(ig(h).point),this.stopAnimation()},o=(h,m)=>{const{drag:g,dragPropagation:b,onDragStart:w}=this.getProps();if(g&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=MLe(g),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Qi(S=>{let E=this.getAxisMotionValue(S).get()||0;if(da.test(E)){const{projection:_}=this.visualElement;if(_&&_.layout){const A=_.layout.layoutBox[S];A&&(E=ar(A)*(parseFloat(E)/100))}}this.originPoint[S]=E}),w&&Dt.update(()=>w(h,m),!1,!0),sM(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:b,onDirectionLock:w,onDrag:y}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:S}=m;if(b&&this.currentDirection===null){this.currentDirection=lBe(S),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,S),this.updateAxis("y",m.point,S),this.visualElement.render(),y&&Dt.update(()=>y(h,m),!1,!0)},u=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new ute(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:u,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:lte(this.visualElement),element:this.visualElement.current})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&Dt.postRender(()=>l(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!cy(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=J3e(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Bc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=eBe(r.layoutBox,t):this.constraints=!1,this.elastic=iBe(n),i!==this.constraints&&!Bc(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&Qi(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=rBe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Bc(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=s$e(r,i.root,this.visualElement.getTransformPagePoint());let o=tBe(i.layout.layoutBox,a);if(n){const l=n(i$e(o));this.hasMutatedConstraints=!!l,l&&(o=Pee(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),u=this.constraints||{},f=Qi(d=>{if(!cy(d,n,this.currentDirection))return;let h=u&&u[d]||{};(o===!0||o===d)&&(h={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,b={type:"inertia",velocity:r?t[d]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,b)});return Promise.all(f).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return sM(this.visualElement,t),r.start(ck(t,r,0,n,this.visualElement,!1))}stopAnimation(){Qi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Qi(n=>{const{drag:r}=this.getProps();if(!cy(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n],u=a.get()||0;a.set(t[n]-Ft(o,l,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Bc(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Qi(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const u=l.get();i[o]=nBe({min:u,max:u},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.constraints=!1,this.resolveConstraints(),Qi(o=>{if(!cy(o,t,null))return;const l=this.getAxisMotionValue(o),{min:u,max:f}=this.constraints[o];l.set(Ft(u,f,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;aBe.set(this.visualElement,this);const t=this.visualElement.current,n=gp(t,"pointerdown",f=>{const{drag:d,dragListener:h=!0}=this.getProps(),m=f.target,g=m!==t&&$Le(m);d&&h&&!g&&this.start(f)});let r;const i=()=>{const{dragConstraints:f}=this.getProps();Bc(f)&&f.current&&(this.constraints=this.resolveRefConstraints(),r||(r=sBe(t,f.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,o=a.addEventListener("measure",i);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Dt.read(i);const l=Sm(window,"resize",()=>this.scalePositionWithinConstraints()),u=a.addEventListener("didUpdate",(({delta:f,hasLayoutChanged:d})=>{this.isDragging&&d&&(Qi(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=f[h].translate,m.set(m.get()+f[h].translate))}),this.visualElement.render())}));return()=>{l(),n(),o(),u&&u(),r&&r()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=gM,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function o9(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function sBe(e,t,n){const r=h8(e,o9(n)),i=h8(t,o9(n));return()=>{r(),i()}}function cy(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lBe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class uBe extends rl{constructor(t){super(t),this.removeGroupControls=li,this.removeListeners=li,this.controls=new oBe(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||li}update(){const{dragControls:t}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};t!==n&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const Nj=e=>(t,n)=>{e&&Dt.update(()=>e(t,n),!1,!0)};class cBe extends rl{constructor(){super(...arguments),this.removePointerDownListener=li}onPointerDown(t){this.session=new ute(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:lte(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Nj(t),onStart:Nj(n),onMove:Nj(r),onEnd:(a,o)=>{delete this.session,i&&Dt.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=gp(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Pj=!1;class fBe extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),Pj&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),My.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,t.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Pj=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||Dt.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:t,layoutAnchor:n}=this.props,{projection:r}=t;r&&(r.options.layoutAnchor=n,r.root.didUpdate(),pk.postRender(()=>{!r.currentAnimation&&r.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;Pj=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function fte(e){const[t,n]=Jee(),r=j.useContext(Y2);return x.jsx(fBe,{...e,layoutGroup:r,switchLayoutGroup:j.useContext(ote),isPresent:t,safeToRemove:n})}const dBe={pan:{Feature:cBe},drag:{Feature:uBe,ProjectionNode:Qee,MeasureLayout:fte}};function s9(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&Dt.postRender(()=>a(t,ig(t)))}class hBe extends rl{mount(){const{current:t}=this.node;t&&(this.unmount=kLe(t,(n,r)=>(s9(this.node,r,"Start"),i=>s9(this.node,i,"End"))))}unmount(){}}class pBe extends rl{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=tg(Sm(this.node.current,"focus",()=>this.onFocus()),Sm(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function l9(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&Dt.postRender(()=>a(t,ig(t)))}class mBe extends rl{mount(){const{current:t}=this.node;if(!t)return;const{globalTapTarget:n,propagate:r}=this.node.props;this.unmount=qLe(t,(i,a)=>(l9(this.node,a,"Start"),(o,{success:l})=>l9(this.node,o,l?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(r==null?void 0:r.tap)===!1})}unmount(){}}const vM=new WeakMap,Mj=new WeakMap,gBe=e=>{const t=vM.get(e.target);t&&t(e)},vBe=e=>{e.forEach(gBe)};function yBe({root:e,...t}){const n=e||document;Mj.has(n)||Mj.set(n,{});const r=Mj.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(vBe,{root:e,...t})),r[i]}function bBe(e,t,n){const r=yBe(t);return vM.set(e,n),r.observe(e),()=>{vM.delete(e),r.unobserve(e)}}const xBe={some:0,all:1};class wBe extends rl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var u;(u=this.stopObserver)==null||u.call(this);const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:xBe[i]},l=f=>{const{isIntersecting:d}=f;if(this.isInView===d||(this.isInView=d,a&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:m}=this.node.getProps(),g=d?h:m;g&&g(f)};this.stopObserver=bBe(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(SBe(t,n))&&this.startObserver()}unmount(){var t;(t=this.stopObserver)==null||t.call(this),this.hasEnteredView=!1,this.isInView=!1}}function SBe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const _Be={inView:{Feature:wBe},tap:{Feature:mBe},focus:{Feature:pBe},hover:{Feature:hBe}},EBe={layout:{ProjectionNode:Qee,MeasureLayout:fte}},ABe={...K3e,..._Be,...dBe,...EBe},u9=F3e(ABe,U3e);function TBe({children:e,container:t}){const[n,r]=j.useState(!1);return j.useEffect(()=>(r(!0),()=>r(!1)),[]),n?Mu.createPortal(e,t||document.body):null}function dte({selection:e,onClear:t,onRetry:n,onDelete:r,onPromote:i,isRetrying:a,isDeleting:o,isPromoting:l,className:u}){const f=a||o||l,d=e.some(b=>b.status==="failed"),h=e.some(b=>b.status==="delayed"),m=e.filter(b=>b.status==="failed").length,g=e.filter(b=>b.status==="delayed").length;return x.jsx(y3e,{children:e.length>0&&x.jsx(TBe,{children:x.jsx(u9.div,{className:Ce("fixed bottom-6 left-0 right-0 z-50 flex justify-center pointer-events-none",u),initial:{y:100,opacity:0},animate:{y:0,opacity:1},exit:{y:100,opacity:0},transition:{duration:.2,ease:"easeOut"},children:x.jsxs("div",{className:"relative pointer-events-auto min-w-[400px] h-12",children:[x.jsx(u9.div,{className:"absolute inset-0 backdrop-blur-xl bg-background/70 shadow-lg border border-border/50",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15}}),x.jsxs("div",{className:"relative h-12 flex items-center justify-between px-4",children:[x.jsxs("span",{className:"text-xs text-foreground",children:[e.length," selected"]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(tr,{variant:"ghost",size:"sm",onClick:t,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:"Deselect all"}),i&&h||n&&d||r?x.jsx(qS,{className:"h-3 w-3 text-muted-foreground/50"}):null,i&&h&&x.jsxs(x.Fragment,{children:[x.jsxs(tr,{variant:"ghost",size:"sm",onClick:i,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[l?x.jsx(op,{className:"mr-1 h-3 w-3 animate-spin"}):x.jsx(l7,{className:"mr-1 h-3 w-3"}),"Promote",g<e.length&&` (${g})`]}),n&&d||r?x.jsx(qS,{className:"h-3 w-3 text-muted-foreground/50"}):null]}),n&&d&&x.jsxs(x.Fragment,{children:[x.jsxs(tr,{variant:"ghost",size:"sm",onClick:n,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[a?x.jsx(op,{className:"mr-1 h-3 w-3 animate-spin"}):x.jsx(nR,{className:"mr-1 h-3 w-3"}),"Retry",m<e.length&&` (${m})`]}),r?x.jsx(qS,{className:"h-3 w-3 text-muted-foreground/50"}):null]}),r&&x.jsxs(tr,{variant:"ghost",size:"sm",onClick:r,disabled:f,className:"text-xs text-muted-foreground hover:text-foreground hover:bg-transparent",children:[o?x.jsx(op,{className:"mr-1 h-3 w-3 animate-spin"}):x.jsx(s7,{className:"mr-1 h-3 w-3"}),"Delete"]})]})]})]})})})})}function S0(e,t){const n=j.useMemo(()=>CBe(e),[e]),r=j.useCallback((i,a)=>{t(i&&a?`${i}:${a}`:void 0)},[t]);return{currentSort:n,handleSort:r,sortString:e}}function Pn({field:e,label:t,currentSort:n,onSort:r,className:i}){const a=(n==null?void 0:n.field)===e,o=a?n.direction:void 0,l=()=>{a?o==="desc"?r(e,"asc"):r(void 0,void 0):r(e,"desc")};return x.jsxs("button",{type:"button",onClick:l,className:Ce("flex items-center gap-1 text-left font-medium transition-colors hover:text-foreground",a?"text-foreground":"text-muted-foreground",i),children:[t,x.jsx("span",{className:"inline-flex h-4 w-4 items-center justify-center",children:a?o==="asc"?x.jsx(t7,{className:"h-3 w-3"}):x.jsx(e7,{className:"h-3 w-3"}):x.jsx(vce,{className:"h-3 w-3 opacity-50"})})]})}function CBe(e){if(!e)return;const[t,n]=e.split(":");if(t)return{field:t,direction:n==="asc"?"asc":"desc"}}function hte(e){const t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Xx="Checkbox",[OBe]=va(Xx),[jBe,Ek]=OBe(Xx);function NBe(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:l,onCheckedChange:u,required:f,value:d="on",internal_do_not_use_render:h}=e,[m,g]=Us({prop:n,defaultProp:i??!1,onChange:u,caller:Xx}),[b,w]=j.useState(null),[y,S]=j.useState(null),E=j.useRef(!1),_=b?!!o||!!b.closest("form"):!0,A={checked:m,disabled:a,setChecked:g,control:b,setControl:w,name:l,form:o,value:d,hasConsumerStoppedPropagationRef:E,required:f,defaultChecked:qs(i)?!1:i,isFormControl:_,bubbleInput:y,setBubbleInput:S};return x.jsx(jBe,{scope:t,...A,children:PBe(h)?h(A):r})}var pte="CheckboxTrigger",mte=j.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:a,value:o,disabled:l,checked:u,required:f,setControl:d,setChecked:h,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:b}=Ek(pte,e),w=ft(i,d),y=j.useRef(u);return j.useEffect(()=>{const S=a==null?void 0:a.form;if(S){const E=()=>h(y.current);return S.addEventListener("reset",E),()=>S.removeEventListener("reset",E)}},[a,h]),x.jsx(He.button,{type:"button",role:"checkbox","aria-checked":qs(u)?"mixed":u,"aria-required":f,"data-state":wte(u),"data-disabled":l?"":void 0,disabled:l,value:o,...r,ref:w,onKeyDown:ke(t,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:ke(n,S=>{h(E=>qs(E)?!0:!E),b&&g&&(m.current=S.isPropagationStopped(),m.current||S.stopPropagation())})})});mte.displayName=pte;var gte=j.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:l,value:u,onCheckedChange:f,form:d,...h}=e;return x.jsx(NBe,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:l,required:o,onCheckedChange:f,name:r,form:d,value:u,internal_do_not_use_render:({isFormControl:m})=>x.jsxs(x.Fragment,{children:[x.jsx(mte,{...h,ref:t,__scopeCheckbox:n}),m&&x.jsx(xte,{__scopeCheckbox:n})]})})});gte.displayName=Xx;var vte="CheckboxIndicator",yte=j.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=Ek(vte,n);return x.jsx(Er,{present:r||qs(a.checked)||a.checked===!0,children:x.jsx(He.span,{"data-state":wte(a.checked),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});yte.displayName=vte;var bte="CheckboxBubbleInput",xte=j.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:l,disabled:u,name:f,value:d,form:h,bubbleInput:m,setBubbleInput:g}=Ek(bte,e),b=ft(n,g),w=hte(a),y=SG(r);j.useEffect(()=>{const E=m;if(!E)return;const _=window.HTMLInputElement.prototype,T=Object.getOwnPropertyDescriptor(_,"checked").set,O=!i.current;if(w!==a&&T){const P=new Event("click",{bubbles:O});E.indeterminate=qs(a),T.call(E,qs(a)?!1:a),E.dispatchEvent(P)}},[m,w,a,i]);const S=j.useRef(qs(a)?!1:a);return x.jsx(He.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??S.current,required:l,disabled:u,name:f,value:d,form:h,...t,tabIndex:-1,ref:b,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});xte.displayName=bte;function PBe(e){return typeof e=="function"}function qs(e){return e==="indeterminate"}function wte(e){return qs(e)?"indeterminate":e?"checked":"unchecked"}function Zx({className:e,indeterminate:t,checked:n,...r}){return x.jsx(gte,{"data-slot":"checkbox",checked:t?"indeterminate":n,className:Ce("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...r,children:x.jsx(yte,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:t?x.jsx(r7,{className:"size-3.5"}):x.jsx(Dm,{className:"size-3.5"})})})}const MBe=[{value:"all",label:"All"},{value:"waiting",label:"Waiting"},{value:"active",label:"Active"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"},{value:"delayed",label:"Delayed"}];function RBe({queueName:e,search:t,onSearchChange:n,onJobSelect:r}){var V;sr();const[i,a]=j.useState(new Map),{data:o=[]}=lR(),l=o.find(X=>X.name===e),u=(l==null?void 0:l.isPaused)??!1,f=bfe(),d=xfe(),h=f.isPending||d.isPending,m=()=>{u?d.mutate(e):f.mutate(e)},g=P7(),b=M7(),w=R7(),y=t.status==="all"?void 0:t.status,{currentSort:S,handleSort:E}=S0(t.sort,X=>n({...t,sort:X})),{data:_,isLoading:A,error:T,fetchNextPage:O,hasNextPage:P,isFetchingNextPage:M,isRefetching:R}=ufe(e,y,t.sort),D=j.useMemo(()=>(_==null?void 0:_.pages.flatMap(X=>X.data))??[],[_]);(V=_==null?void 0:_.pages[0])==null||V.total;const I=uR(),k=X=>{n({...t,status:X})};A||R||I.isPending;const F=X=>i.has(X),$=X=>{a(Y=>{const G=new Map(Y);return G.has(X.id)?G.delete(X.id):G.set(X.id,{queueName:e,jobId:X.id,status:X.status}),G})},q=()=>{const X=new Map;for(const Y of D)X.set(Y.id,{queueName:e,jobId:Y.id,status:Y.status});a(X)},L=()=>a(new Map),z=D.length>0&&i.size===D.length,U=i.size>0&&i.size<D.length,K=async()=>{const X=Array.from(i.values()).filter(Y=>Y.status==="failed");X.length>0&&await g.mutateAsync({jobs:X}),L()},Z=async()=>{const X=Array.from(i.values());await b.mutateAsync({jobs:X}),L()},H=async()=>{const X=Array.from(i.values()).filter(Y=>Y.status==="delayed");X.length>0&&await w.mutateAsync({jobs:X}),L()};return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(o2,{value:t.status||"all",onValueChange:k,children:x.jsx(wx,{children:MBe.map(X=>x.jsx(Za,{value:X.value,children:X.label},X.value))})}),u&&x.jsx(Su,{variant:"secondary",className:"bg-amber-500/10 text-amber-600",children:"Paused"})]}),x.jsx("div",{className:"flex items-center gap-2",children:x.jsx(tr,{variant:u?"default":"outline",size:"sm",onClick:m,disabled:h,children:u?x.jsxs(x.Fragment,{children:[x.jsx(Zy,{className:"mr-2 h-4 w-4"}),"Resume"]}):x.jsxs(x.Fragment,{children:[x.jsx(a7,{className:"mr-2 h-4 w-4"}),"Pause"]})})})]}),A&&D.length===0?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[x.jsx("div",{className:"col-span-5",children:"Job"}),x.jsx("div",{className:"col-span-2",children:"Status"}),x.jsx("div",{className:"col-span-2",children:"Queued"}),x.jsx("div",{className:"col-span-2",children:"Started"}),x.jsx("div",{className:"col-span-1"})]}),x.jsx("div",{className:"divide-y divide-border/50",children:[...Array(15)].map((X,Y)=>x.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[x.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[x.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),x.jsxs("div",{className:"space-y-1.5",children:[x.jsx("div",{className:"h-4 w-28 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-3 w-20 animate-pulse rounded bg-muted"})]})]}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),x.jsx("div",{className:"col-span-1 flex justify-end",children:x.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"})})]},Y.toString()))})]}):T?x.jsx(Di,{icon:pu,title:"Failed to load jobs",description:T.message}):D.length===0?x.jsx(Di,{icon:pu,title:"No jobs found",description:y?`No ${y} jobs in this queue`:"This queue is empty"}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[x.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[x.jsx(Zx,{checked:z,indeterminate:U,onCheckedChange:X=>{X?q():L()}}),x.jsx(Pn,{field:"name",label:"Job",currentSort:S,onSort:E})]}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"status",label:"Status",currentSort:S,onSort:E})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"timestamp",label:"Queued",currentSort:S,onSort:E})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"processedOn",label:"Started",currentSort:S,onSort:E})}),x.jsx("div",{className:"col-span-1"})]}),x.jsx("div",{className:"divide-y divide-border/50",children:D.map(X=>x.jsx(kBe,{job:X,selected:F(X.id),onSelect:()=>$(X),onClick:()=>r(X.id)},X.id))}),P&&x.jsx("div",{className:"flex justify-center pt-4",children:x.jsx(tr,{variant:"outline",onClick:()=>O(),disabled:M,children:M?x.jsxs(x.Fragment,{children:[x.jsx(I0,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):"Load more"})}),x.jsx("div",{className:"flex items-center justify-between pt-2 text-sm text-muted-foreground",children:x.jsxs("span",{children:["Showing ",D.length," jobs"]})})]}),x.jsx(dte,{selection:Array.from(i.values()),onClear:L,onRetry:K,onDelete:Z,onPromote:H,isRetrying:g.isPending,isDeleting:b.isPending,isPromoting:w.isPending})]})}function kBe({job:e,selected:t,onSelect:n,onClick:r}){const i=a=>{a.stopPropagation(),n()};return x.jsxs("button",{type:"button",onClick:r,className:"group grid w-full grid-cols-12 items-center gap-4 py-3 text-left text-sm cursor-default",children:[x.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-3",children:[x.jsx("div",{onClick:i,onKeyDown:a=>a.stopPropagation(),children:x.jsx(Zx,{checked:t})}),x.jsx(pu,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),x.jsxs("div",{className:"min-w-0",children:[x.jsx("div",{className:"truncate font-medium",children:e.name}),x.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:Hy(e.id,24)})]})]}),x.jsx("div",{className:"col-span-2",children:x.jsx(Ym,{status:e.status,duration:e.duration})}),x.jsx("div",{className:"col-span-2 text-muted-foreground",children:x.jsx(wu,{timestamp:e.timestamp})}),x.jsx("div",{className:"col-span-2 text-muted-foreground",children:e.processedOn?x.jsx(wu,{timestamp:e.processedOn}):x.jsx("span",{children:"-"})}),x.jsx("div",{className:"col-span-1 flex justify-end",children:x.jsx(Af,{className:"h-4 w-4 text-muted-foreground"})})]})}function DBe({search:e,onSearchChange:t,onJobSelect:n,onQueueSelect:r}){sr();const[i,a]=j.useState(new Map),o=P7(),l=M7(),u=R7(),{currentSort:f,handleSort:d}=S0(e.sort,G=>t({...e,sort:G})),h=j.useMemo(()=>cR(e.q??""),[e.q]),m=j.useMemo(()=>{if(e.from&&e.to)return{start:e.from,end:e.to}},[e.from,e.to]),g=j.useMemo(()=>{const G=e.status??"all";if(G!=="all"||Object.keys(h.tags).length>0||h.text||m)return{status:G!=="all"?G:void 0,tags:Object.keys(h.tags).length>0?h.tags:void 0,text:h.text||void 0,timeRange:m}},[e.status,h,m]),{data:b,isLoading:w,error:y,fetchNextPage:S,hasNextPage:E,isFetchingNextPage:_,isRefetching:A}=ffe(e.sort,g),T=j.useMemo(()=>(b==null?void 0:b.pages.flatMap(G=>G.data))??[],[b]),O=T,P=(G,Q)=>{t({...e,q:G||void 0,status:Q??e.status})},M=G=>{t({...e,from:G==null?void 0:G.start,to:G==null?void 0:G.end})},R=uR();w||A||R.isPending;const D=(G,Q)=>`${G}:${Q}`,I=(G,Q)=>i.has(D(G,Q)),k=G=>{const Q=D(G.queueName,G.id);a(J=>{const re=new Map(J);return re.has(Q)?re.delete(Q):re.set(Q,{queueName:G.queueName,jobId:G.id,status:G.status}),re})},F=()=>{const G=new Map;for(const Q of O){const J=D(Q.queueName,Q.id);G.set(J,{queueName:Q.queueName,jobId:Q.id,status:Q.status})}a(G)},$=()=>a(new Map),q=O.length>0&&i.size===O.length,L=i.size>0&&i.size<O.length,z=async()=>{const G=Array.from(i.values()).filter(Q=>Q.status==="failed");G.length>0&&await o.mutateAsync({jobs:G}),$()},U=async()=>{const G=Array.from(i.values());await l.mutateAsync({jobs:G}),$()},K=async()=>{const G=Array.from(i.values()).filter(Q=>Q.status==="delayed");G.length>0&&await u.mutateAsync({jobs:G}),$()},{data:Z}=lfe(),H=j.useMemo(()=>{if(!Z){const Q=Date.now(),J=14400*1e3,re=new Date(Q);return re.setHours(0,0,0,0),re.setDate(re.getDate()-6),{buckets:[],startTime:re.getTime(),endTime:Q,bucketSize:J}}return{buckets:Z.buckets.map(Q=>{const J=new Date(Q.time);return{time:Q.time,label:J.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric",hour:"numeric"}),dayLabel:J.toLocaleDateString([],{weekday:"short"}),success:Q.completed,error:Q.failed}}),startTime:Z.startTime,endTime:Z.endTime,bucketSize:Z.bucketSize}},[Z]),V=(Z==null?void 0:Z.totalCompleted)??0,X=(Z==null?void 0:Z.totalFailed)??0,Y=j.useRef(null);return j.useEffect(()=>{const G=Y.current;if(!G||!E)return;const Q=new IntersectionObserver(J=>{J[0].isIntersecting&&E&&!_&&S()},{rootMargin:"100px"});return Q.observe(G),()=>Q.disconnect()},[E,_,S]),x.jsxs("div",{className:"h-full overflow-auto",children:[x.jsx("div",{className:"py-4",children:x.jsx(LBe,{data:H,selection:m??null,onSelectionChange:M,totalSuccess:V,totalError:X})}),x.jsxs("div",{className:"sticky top-0 z-20 bg-background",children:[x.jsx("div",{className:"border-b border-dashed pb-3",children:x.jsx(Cfe,{value:e.q??"",status:e.status,onChange:P})}),x.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[x.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[x.jsx(Zx,{checked:q,indeterminate:L,onCheckedChange:G=>{G?F():$()}}),x.jsx(Pn,{field:"name",label:"Job",currentSort:f,onSort:d})]}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"queueName",label:"Queue",currentSort:f,onSort:d})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"status",label:"Status",currentSort:f,onSort:d})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"timestamp",label:"Time",currentSort:f,onSort:d})}),x.jsx("div",{className:"col-span-1",children:x.jsx(Pn,{field:"duration",label:"Duration",currentSort:f,onSort:d})})]})]}),w&&T.length===0?x.jsx("div",{className:"divide-y divide-border/50",children:[...Array(15)].map((G,Q)=>x.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[x.jsxs("div",{className:"col-span-5 flex items-center gap-3",children:[x.jsx("div",{className:"h-4 w-4 animate-pulse bg-muted"}),x.jsx("div",{className:"h-2 w-2 animate-pulse bg-muted"}),x.jsx("div",{className:"h-4 w-32 animate-pulse bg-muted"})]}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-4 w-16 animate-pulse bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-5 w-20 animate-pulse bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-4 w-24 animate-pulse bg-muted"})}),x.jsx("div",{className:"col-span-1",children:x.jsx("div",{className:"h-4 w-12 animate-pulse bg-muted"})})]},Q.toString()))}):y?x.jsx("div",{className:"flex h-64 items-center justify-center",children:x.jsx(Di,{icon:pu,title:"Failed to load runs",description:y.message})}):O.length===0?x.jsx("div",{className:"flex h-64 items-center justify-center",children:x.jsx(Di,{icon:pu,title:"No runs found",description:h.text?`No results for "${h.text}"`:e.status&&e.status!=="all"?`No ${e.status} runs`:"No job runs yet"})}):x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"divide-y divide-border/50",children:O.map(G=>x.jsx(IBe,{run:G,selected:I(G.queueName,G.id),onSelect:()=>k(G),onClick:()=>n(G.queueName,G.id),onQueueClick:r},`${G.queueName}-${G.id}`))}),E&&x.jsx("div",{ref:Y,className:"flex items-center justify-center py-4",children:_&&x.jsx(I0,{className:"h-4 w-4 animate-spin text-muted-foreground"})}),x.jsxs("div",{className:"px-6 py-3 text-xs text-muted-foreground",children:["Showing ",O.length," runs"]})]}),x.jsx(dte,{selection:Array.from(i.values()),onClear:$,onRetry:z,onDelete:U,onPromote:K,isRetrying:o.isPending,isDeleting:l.isPending,isPromoting:u.isPending})]})}function IBe({run:e,selected:t,onSelect:n,onClick:r,onQueueClick:i}){const a=e.tags&&Object.keys(e.tags).length>0,o=u=>{u.stopPropagation(),n()},l=u=>{u.stopPropagation(),i(e.queueName)};return x.jsxs("div",{className:"group grid w-full grid-cols-12 items-center gap-4 py-3 text-left text-sm cursor-pointer",onClick:r,children:[x.jsxs("div",{className:"col-span-5 flex min-w-0 items-center gap-3",children:[x.jsx("div",{onClick:o,onKeyDown:u=>u.stopPropagation(),children:x.jsx(Zx,{checked:t})}),x.jsx(S1e,{status:e.status}),x.jsxs("div",{className:"min-w-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"truncate font-medium",children:e.name}),a&&x.jsxs("div",{className:"flex items-center gap-1",children:[Object.entries(e.tags).slice(0,2).map(([u,f])=>x.jsxs(Tp,{children:[x.jsx(Cp,{asChild:!0,children:x.jsxs("span",{className:"inline-flex items-center rounded bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:[u,":",Hy(String(f),8)]})}),x.jsx(bf,{children:x.jsxs("span",{className:"font-mono",children:[u,": ",String(f)]})})]},u)),Object.keys(e.tags).length>2&&x.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",Object.keys(e.tags).length-2]})]})]}),x.jsx("div",{className:"truncate font-mono text-xs text-muted-foreground",children:Hy(e.id,24)})]})]}),x.jsx("div",{className:"col-span-2",children:x.jsx("button",{type:"button",onClick:l,className:"truncate font-mono text-xs text-primary hover:underline",children:e.queueName})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Ym,{status:e.status})}),x.jsx("div",{className:"col-span-2 text-muted-foreground",children:e.processedOn?x.jsx(wu,{timestamp:e.processedOn}):x.jsx(wu,{timestamp:e.timestamp})}),x.jsxs("div",{className:"col-span-1 flex items-center justify-between",children:[x.jsx("span",{className:"font-mono text-muted-foreground",children:e.duration?wr(e.duration):"-"}),x.jsx(Af,{className:"h-4 w-4 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})]})}function LBe({data:e,selection:t,onSelectionChange:n,totalSuccess:r,totalError:i}){const a=j.useRef(null),[o,l]=j.useState(!1),[u,f]=j.useState(null),[d,h]=j.useState(null),m=Math.max(...e.buckets.map(A=>A.success+A.error),1),g=A=>{if(!a.current)return e.startTime;const T=a.current.getBoundingClientRect(),P=Math.max(0,Math.min(A-T.left,T.width))/T.width;return e.startTime+P*(e.endTime-e.startTime)},b=A=>{if(A.button!==0)return;const T=g(A.clientX);l(!0),f(T),h(T)},w=A=>{if(!o||u===null)return;const T=g(A.clientX);h(T)},y=()=>{if(o&&u!==null&&d!==null){const A=Math.min(u,d),T=Math.max(u,d);T-A>1e3&&n({start:A,end:T})}l(!1),f(null),h(null)},S=()=>{o&&y()},E=A=>{const T=new Date(A),O=new Date;return T.toDateString()===O.toDateString()?"Today":T.toLocaleDateString([],{weekday:"short"})},_=A=>{const T=e.endTime-e.startTime,O=(A.start-e.startTime)/T*100,P=(A.end-A.start)/T*100;return{left:`${O}%`,width:`${P}%`}};return x.jsxs("div",{className:"border border-dashed p-4",children:[x.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:"Activity"}),x.jsx("span",{className:"text-xs text-muted-foreground",children:"Last 7 days"})]}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("div",{className:"h-2 w-2 bg-chart-1"}),x.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[r," completed"]})]}),x.jsxs("div",{className:"flex items-center gap-1.5",children:[x.jsx("div",{className:"h-2 w-2 bg-chart-failed"}),x.jsxs("span",{className:"text-xs tabular-nums text-muted-foreground",children:[i," failed"]})]}),x.jsx("div",{className:"h-6",children:t&&x.jsxs(tr,{variant:"ghost",size:"sm",onClick:()=>n(null),className:"h-6 gap-1 px-2 text-xs",children:[x.jsx(Qy,{className:"h-3 w-3"}),"Clear"]})})]})]}),x.jsxs("div",{ref:a,className:"relative h-12 cursor-crosshair select-none",onMouseDown:b,onMouseMove:w,onMouseUp:y,onMouseLeave:S,children:[e.buckets.map((A,T)=>{const O=A.success+A.error,P=A.success>0?Math.max(A.success/m*100,8):0,M=A.error>0?Math.max(A.error/m*100,8):0,R=O>0,D=e.endTime-e.startTime,I=(A.time-e.startTime)/D*100;return x.jsxs(Tp,{children:[x.jsx(Cp,{asChild:!0,children:x.jsx("div",{className:"absolute bottom-0 flex h-full w-[3px] flex-col justify-end",style:{left:`${I}%`},children:R?x.jsxs(x.Fragment,{children:[A.error>0&&x.jsx("div",{className:"w-full bg-chart-failed",style:{height:`${M}%`}}),A.success>0&&x.jsx("div",{className:"w-full bg-chart-1",style:{height:`${P}%`}})]}):x.jsx("div",{className:"h-px w-full bg-muted/30"})})}),x.jsxs(bf,{side:"top",className:"text-xs",children:[x.jsx("div",{className:"font-medium text-foreground",children:A.label}),O>0?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"text-muted-foreground",children:[O," ",O===1?"run":"runs"]}),A.success>0&&x.jsxs("div",{className:"text-chart-1",children:[A.success," completed"]}),A.error>0&&x.jsxs("div",{className:"text-chart-failed",children:[A.error," failed"]})]}):x.jsx("div",{className:"text-muted-foreground",children:"No activity"})]})]},T.toString())}),x.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-px bg-border"}),o&&u!==null&&d!==null&&x.jsx("div",{className:"pointer-events-none absolute bottom-0 top-0 border-x border-ring bg-ring/10",style:_({start:Math.min(u,d),end:Math.max(u,d)})}),t&&!o&&x.jsx("div",{className:"pointer-events-none absolute bottom-0 top-0 border-x-2 border-ring bg-ring/20",style:_(t)})]}),x.jsx("div",{className:"mt-2 flex justify-between text-[10px] text-muted-foreground",children:Array.from({length:7}).map((A,T)=>{const O=e.startTime+T*24*60*60*1e3;return x.jsx("span",{children:E(O)},T.toString())})})]})}function $Be({search:e,onSearchChange:t}){sr();const{currentSort:n,handleSort:r}=S0(e.repeatableSort,y=>t({...e,repeatableSort:y})),{currentSort:i,handleSort:a}=S0(e.delayedSort,y=>t({...e,delayedSort:y})),{data:o=[],isLoading:l,error:u,isRefetching:f}=dfe(e.repeatableSort),{data:d=[],isLoading:h,error:m,isRefetching:g}=hfe(e.delayedSort),b=uR();l||h||f||g||b.isPending;const w=u||m;return l||h?x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("div",{className:"h-7 w-32 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-9 w-9 animate-pulse rounded bg-muted"})]}),x.jsxs("div",{className:"space-y-4",children:[x.jsxs("div",{className:"flex gap-2",children:[x.jsx("div",{className:"h-9 w-32 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-9 w-28 animate-pulse rounded bg-muted"})]}),x.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[x.jsx("div",{className:"col-span-3",children:"Name"}),x.jsx("div",{className:"col-span-2",children:"Queue"}),x.jsx("div",{className:"col-span-3",children:"Pattern"}),x.jsx("div",{className:"col-span-2",children:"Next Run"}),x.jsx("div",{className:"col-span-2",children:"Timezone"})]}),x.jsx("div",{className:"divide-y divide-border/50",children:[...Array(10)].map((y,S)=>x.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3",children:[x.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[x.jsx("div",{className:"h-4 w-4 animate-pulse rounded bg-muted"}),x.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})]}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-3 w-16 animate-pulse rounded bg-muted"})}),x.jsx("div",{className:"col-span-3",children:x.jsx("div",{className:"h-4 w-20 animate-pulse rounded bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-4 w-24 animate-pulse rounded bg-muted"})}),x.jsx("div",{className:"col-span-2",children:x.jsx("div",{className:"h-3 w-16 animate-pulse rounded bg-muted"})})]},`pulse-${S.toString()}`))})]})]}):w?x.jsx(Di,{icon:dd,title:"Failed to load schedulers",description:w.message}):x.jsx("div",{className:"space-y-6",children:x.jsxs(o2,{value:e.tab||"repeatable",onValueChange:y=>t({...e,tab:y}),children:[x.jsxs(wx,{children:[x.jsxs(Za,{value:"repeatable",children:["Repeatable (",o.length,")"]}),x.jsxs(Za,{value:"delayed",children:["Delayed (",d.length,")"]})]}),x.jsx(hs,{value:"repeatable",className:"mt-4",children:o.length===0?x.jsx(Di,{icon:ki,title:"No repeatable jobs",description:"No cron or repeating jobs are configured"}):x.jsxs("div",{className:"divide-y divide-border/50",children:[x.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[x.jsx("div",{className:"col-span-3",children:x.jsx(Pn,{field:"name",label:"Name",currentSort:n,onSort:r})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"queueName",label:"Queue",currentSort:n,onSort:r})}),x.jsx("div",{className:"col-span-3",children:x.jsx(Pn,{field:"pattern",label:"Pattern",currentSort:n,onSort:r})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"next",label:"Next Run",currentSort:n,onSort:r})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"tz",label:"Timezone",currentSort:n,onSort:r})})]}),o.map(y=>x.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3 text-sm",children:[x.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[x.jsx(ki,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),x.jsx("span",{className:"truncate font-medium",children:y.name})]}),x.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:y.queueName}),x.jsx("div",{className:"col-span-3 font-mono text-xs",children:y.pattern||(y.every?`every ${wr(y.every)}`:"-")}),x.jsx("div",{className:"col-span-2 text-muted-foreground",children:y.next?x.jsx(wu,{timestamp:y.next}):"-"}),x.jsx("div",{className:"col-span-2 text-xs text-muted-foreground",children:y.tz||"UTC"})]},y.key))]})}),x.jsx(hs,{value:"delayed",className:"mt-4",children:d.length===0?x.jsx(Di,{icon:k3,title:"No delayed jobs",description:"No jobs are scheduled for future execution"}):x.jsxs("div",{className:"divide-y divide-border/50",children:[x.jsxs("div",{className:"grid grid-cols-12 gap-4 border-b border-dashed py-2.5 text-[11px] uppercase tracking-wider text-muted-foreground",children:[x.jsx("div",{className:"col-span-3",children:x.jsx(Pn,{field:"name",label:"Name",currentSort:i,onSort:a})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"queueName",label:"Queue",currentSort:i,onSort:a})}),x.jsx("div",{className:"col-span-2",children:"Job ID"}),x.jsx("div",{className:"col-span-3",children:x.jsx(Pn,{field:"processAt",label:"Executes At",currentSort:i,onSort:a})}),x.jsx("div",{className:"col-span-2",children:x.jsx(Pn,{field:"delay",label:"Delay",currentSort:i,onSort:a})})]}),d.map(y=>x.jsxs("div",{className:"grid grid-cols-12 items-center gap-4 py-3 text-sm",children:[x.jsxs("div",{className:"col-span-3 flex items-center gap-2",children:[x.jsx(k3,{className:"h-4 w-4 shrink-0 text-muted-foreground"}),x.jsx("span",{className:"truncate font-medium",children:y.name})]}),x.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:y.queueName}),x.jsx("div",{className:"col-span-2 truncate font-mono text-xs text-muted-foreground",children:y.id}),x.jsx("div",{className:"col-span-3 text-muted-foreground",children:x.jsx(wu,{timestamp:y.processAt})}),x.jsx("div",{className:"col-span-2 text-muted-foreground",children:wr(y.delay)})]},`${y.queueName}-${y.id}`))]})})]})})}var BBe=[" ","Enter","ArrowUp","ArrowDown"],qBe=[" ","Enter"],Ou="Select",[Qx,Jx,zBe]=AX(Ou),[Pd]=va(Ou,[zBe,cd]),ew=cd(),[VBe,il]=Pd(Ou),[FBe,UBe]=Pd(Ou),Ste=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:l,onValueChange:u,dir:f,name:d,autoComplete:h,disabled:m,required:g,form:b}=e,w=ew(t),[y,S]=j.useState(null),[E,_]=j.useState(null),[A,T]=j.useState(!1),O=q0(f),[P,M]=Us({prop:r,defaultProp:i??!1,onChange:a,caller:Ou}),[R,D]=Us({prop:o,defaultProp:l,onChange:u,caller:Ou}),I=j.useRef(null),k=y?b||!!y.closest("form"):!0,[F,$]=j.useState(new Set),q=Array.from(F).map(L=>L.props.value).join(";");return x.jsx(HM,{...w,children:x.jsxs(VBe,{required:g,scope:t,trigger:y,onTriggerChange:S,valueNode:E,onValueNodeChange:_,valueNodeHasChildren:A,onValueNodeHasChildrenChange:T,contentId:or(),value:R,onValueChange:D,open:P,onOpenChange:M,dir:O,triggerPointerDownPosRef:I,disabled:m,children:[x.jsx(Qx.Provider,{scope:t,children:x.jsx(FBe,{scope:e.__scopeSelect,onNativeOptionAdd:j.useCallback(L=>{$(z=>new Set(z).add(L))},[]),onNativeOptionRemove:j.useCallback(L=>{$(z=>{const U=new Set(z);return U.delete(L),U})},[]),children:n})}),k?x.jsxs(Gte,{"aria-hidden":!0,required:g,tabIndex:-1,name:d,autoComplete:h,value:R,onChange:L=>D(L.target.value),disabled:m,form:b,children:[R===void 0?x.jsx("option",{value:""}):null,Array.from(F)]},q):null]})})};Ste.displayName=Ou;var _te="SelectTrigger",Ete=j.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,a=ew(n),o=il(_te,n),l=o.disabled||r,u=ft(t,o.onTriggerChange),f=Jx(n),d=j.useRef("touch"),[h,m,g]=Kte(w=>{const y=f().filter(_=>!_.disabled),S=y.find(_=>_.value===o.value),E=Yte(y,w,S);E!==void 0&&o.onValueChange(E.value)}),b=w=>{l||(o.onOpenChange(!0),g()),w&&(o.triggerPointerDownPosRef.current={x:Math.round(w.pageX),y:Math.round(w.pageY)})};return x.jsx(GM,{asChild:!0,...a,children:x.jsx(He.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Wte(o.value)?"":void 0,...i,ref:u,onClick:ke(i.onClick,w=>{w.currentTarget.focus(),d.current!=="mouse"&&b(w)}),onPointerDown:ke(i.onPointerDown,w=>{d.current=w.pointerType;const y=w.target;y.hasPointerCapture(w.pointerId)&&y.releasePointerCapture(w.pointerId),w.button===0&&w.ctrlKey===!1&&w.pointerType==="mouse"&&(b(w),w.preventDefault())}),onKeyDown:ke(i.onKeyDown,w=>{const y=h.current!=="";!(w.ctrlKey||w.altKey||w.metaKey)&&w.key.length===1&&m(w.key),!(y&&w.key===" ")&&BBe.includes(w.key)&&(b(),w.preventDefault())})})})});Ete.displayName=_te;var Ate="SelectValue",Tte=j.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:a,placeholder:o="",...l}=e,u=il(Ate,n),{onValueNodeHasChildrenChange:f}=u,d=a!==void 0,h=ft(t,u.onValueNodeChange);return zn(()=>{f(d)},[f,d]),x.jsx(He.span,{...l,ref:h,style:{pointerEvents:"none"},children:Wte(u.value)?x.jsx(x.Fragment,{children:o}):a})});Tte.displayName=Ate;var HBe="SelectIcon",Cte=j.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return x.jsx(He.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});Cte.displayName=HBe;var GBe="SelectPortal",Ote=e=>x.jsx(Mm,{asChild:!0,...e});Ote.displayName=GBe;var ju="SelectContent",jte=j.forwardRef((e,t)=>{const n=il(ju,e.__scopeSelect),[r,i]=j.useState();if(zn(()=>{i(new DocumentFragment)},[]),!n.open){const a=r;return a?Mu.createPortal(x.jsx(Nte,{scope:e.__scopeSelect,children:x.jsx(Qx.Slot,{scope:e.__scopeSelect,children:x.jsx("div",{children:e.children})})}),a):null}return x.jsx(Pte,{...e,ref:t})});jte.displayName=ju;var Ei=10,[Nte,al]=Pd(ju),WBe="SelectContentImpl",KBe=_p("SelectContent.RemoveScroll"),Pte=j.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:l,sideOffset:u,align:f,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:w,avoidCollisions:y,...S}=e,E=il(ju,n),[_,A]=j.useState(null),[T,O]=j.useState(null),P=ft(t,J=>A(J)),[M,R]=j.useState(null),[D,I]=j.useState(null),k=Jx(n),[F,$]=j.useState(!1),q=j.useRef(!1);j.useEffect(()=>{if(_)return H7(_)},[_]),I7();const L=j.useCallback(J=>{const[re,...ne]=k().map(oe=>oe.ref.current),[fe]=ne.slice(-1),he=document.activeElement;for(const oe of J)if(oe===he||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===re&&T&&(T.scrollTop=0),oe===fe&&T&&(T.scrollTop=T.scrollHeight),oe==null||oe.focus(),document.activeElement!==he))return},[k,T]),z=j.useCallback(()=>L([M,_]),[L,M,_]);j.useEffect(()=>{F&&z()},[F,z]);const{onOpenChange:U,triggerPointerDownPosRef:K}=E;j.useEffect(()=>{if(_){let J={x:0,y:0};const re=fe=>{var he,oe;J={x:Math.abs(Math.round(fe.pageX)-(((he=K.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(fe.pageY)-(((oe=K.current)==null?void 0:oe.y)??0))}},ne=fe=>{J.x<=10&&J.y<=10?fe.preventDefault():_.contains(fe.target)||U(!1),document.removeEventListener("pointermove",re),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",re),document.addEventListener("pointerup",ne,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",re),document.removeEventListener("pointerup",ne,{capture:!0})}}},[_,U,K]),j.useEffect(()=>{const J=()=>U(!1);return window.addEventListener("blur",J),window.addEventListener("resize",J),()=>{window.removeEventListener("blur",J),window.removeEventListener("resize",J)}},[U]);const[Z,H]=Kte(J=>{const re=k().filter(he=>!he.disabled),ne=re.find(he=>he.ref.current===document.activeElement),fe=Yte(re,J,ne);fe&&setTimeout(()=>fe.ref.current.focus())}),V=j.useCallback((J,re,ne)=>{const fe=!q.current&&!ne;(E.value!==void 0&&E.value===re||fe)&&(R(J),fe&&(q.current=!0))},[E.value]),X=j.useCallback(()=>_==null?void 0:_.focus(),[_]),Y=j.useCallback((J,re,ne)=>{const fe=!q.current&&!ne;(E.value!==void 0&&E.value===re||fe)&&I(J)},[E.value]),G=r==="popper"?yM:Mte,Q=G===yM?{side:l,sideOffset:u,align:f,alignOffset:d,arrowPadding:h,collisionBoundary:m,collisionPadding:g,sticky:b,hideWhenDetached:w,avoidCollisions:y}:{};return x.jsx(Nte,{scope:n,content:_,viewport:T,onViewportChange:O,itemRefCallback:V,selectedItem:M,onItemLeave:X,itemTextRefCallback:Y,focusSelectedItem:z,selectedItemText:D,position:r,isPositioned:F,searchRef:Z,children:x.jsx(dR,{as:KBe,allowPinchZoom:!0,children:x.jsx(fR,{asChild:!0,trapped:E.open,onMountAutoFocus:J=>{J.preventDefault()},onUnmountAutoFocus:ke(i,J=>{var re;(re=E.trigger)==null||re.focus({preventScroll:!0}),J.preventDefault()}),children:x.jsx(Nm,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:J=>J.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:x.jsx(G,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:J=>J.preventDefault(),...S,...Q,onPlaced:()=>$(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...S.style},onKeyDown:ke(S.onKeyDown,J=>{const re=J.ctrlKey||J.altKey||J.metaKey;if(J.key==="Tab"&&J.preventDefault(),!re&&J.key.length===1&&H(J.key),["ArrowUp","ArrowDown","Home","End"].includes(J.key)){let fe=k().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(J.key)&&(fe=fe.slice().reverse()),["ArrowUp","ArrowDown"].includes(J.key)){const he=J.target,oe=fe.indexOf(he);fe=fe.slice(oe+1)}setTimeout(()=>L(fe)),J.preventDefault()}})})})})})})});Pte.displayName=WBe;var YBe="SelectItemAlignedPosition",Mte=j.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,a=il(ju,n),o=al(ju,n),[l,u]=j.useState(null),[f,d]=j.useState(null),h=ft(t,P=>d(P)),m=Jx(n),g=j.useRef(!1),b=j.useRef(!0),{viewport:w,selectedItem:y,selectedItemText:S,focusSelectedItem:E}=o,_=j.useCallback(()=>{if(a.trigger&&a.valueNode&&l&&f&&w&&y&&S){const P=a.trigger.getBoundingClientRect(),M=f.getBoundingClientRect(),R=a.valueNode.getBoundingClientRect(),D=S.getBoundingClientRect();if(a.dir!=="rtl"){const he=D.left-M.left,oe=R.left-he,ye=P.left-oe,be=P.width+ye,xe=Math.max(be,M.width),Ee=window.innerWidth-Ei,_e=fN(oe,[Ei,Math.max(Ei,Ee-xe)]);l.style.minWidth=be+"px",l.style.left=_e+"px"}else{const he=M.right-D.right,oe=window.innerWidth-R.right-he,ye=window.innerWidth-P.right-oe,be=P.width+ye,xe=Math.max(be,M.width),Ee=window.innerWidth-Ei,_e=fN(oe,[Ei,Math.max(Ei,Ee-xe)]);l.style.minWidth=be+"px",l.style.right=_e+"px"}const I=m(),k=window.innerHeight-Ei*2,F=w.scrollHeight,$=window.getComputedStyle(f),q=parseInt($.borderTopWidth,10),L=parseInt($.paddingTop,10),z=parseInt($.borderBottomWidth,10),U=parseInt($.paddingBottom,10),K=q+L+F+U+z,Z=Math.min(y.offsetHeight*5,K),H=window.getComputedStyle(w),V=parseInt(H.paddingTop,10),X=parseInt(H.paddingBottom,10),Y=P.top+P.height/2-Ei,G=k-Y,Q=y.offsetHeight/2,J=y.offsetTop+Q,re=q+L+J,ne=K-re;if(re<=Y){const he=I.length>0&&y===I[I.length-1].ref.current;l.style.bottom="0px";const oe=f.clientHeight-w.offsetTop-w.offsetHeight,ye=Math.max(G,Q+(he?X:0)+oe+z),be=re+ye;l.style.height=be+"px"}else{const he=I.length>0&&y===I[0].ref.current;l.style.top="0px";const ye=Math.max(Y,q+w.offsetTop+(he?V:0)+Q)+ne;l.style.height=ye+"px",w.scrollTop=re-Y+w.offsetTop}l.style.margin=`${Ei}px 0`,l.style.minHeight=Z+"px",l.style.maxHeight=k+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[m,a.trigger,a.valueNode,l,f,w,y,S,a.dir,r]);zn(()=>_(),[_]);const[A,T]=j.useState();zn(()=>{f&&T(window.getComputedStyle(f).zIndex)},[f]);const O=j.useCallback(P=>{P&&b.current===!0&&(_(),E==null||E(),b.current=!1)},[_,E]);return x.jsx(ZBe,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:g,onScrollButtonChange:O,children:x.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:x.jsx(He.div,{...i,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Mte.displayName=YBe;var XBe="SelectPopperPosition",yM=j.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ei,...a}=e,o=ew(n);return x.jsx(WM,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});yM.displayName=XBe;var[ZBe,Ak]=Pd(ju,{}),bM="SelectViewport",Rte=j.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,a=al(bM,n),o=Ak(bM,n),l=ft(t,a.onViewportChange),u=j.useRef(0);return x.jsxs(x.Fragment,{children:[x.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),x.jsx(Qx.Slot,{scope:n,children:x.jsx(He.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ke(i.onScroll,f=>{const d=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:m}=o;if(m!=null&&m.current&&h){const g=Math.abs(u.current-d.scrollTop);if(g>0){const b=window.innerHeight-Ei*2,w=parseFloat(h.style.minHeight),y=parseFloat(h.style.height),S=Math.max(w,y);if(S<b){const E=S+g,_=Math.min(b,E),A=E-_;h.style.height=_+"px",h.style.bottom==="0px"&&(d.scrollTop=A>0?A:0,h.style.justifyContent="flex-end")}}}u.current=d.scrollTop})})})]})});Rte.displayName=bM;var kte="SelectGroup",[QBe,JBe]=Pd(kte),eqe=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=or();return x.jsx(QBe,{scope:n,id:i,children:x.jsx(He.div,{role:"group","aria-labelledby":i,...r,ref:t})})});eqe.displayName=kte;var Dte="SelectLabel",Ite=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=JBe(Dte,n);return x.jsx(He.div,{id:i.id,...r,ref:t})});Ite.displayName=Dte;var _0="SelectItem",[tqe,Lte]=Pd(_0),$te=j.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,l=il(_0,n),u=al(_0,n),f=l.value===r,[d,h]=j.useState(a??""),[m,g]=j.useState(!1),b=ft(t,E=>{var _;return(_=u.itemRefCallback)==null?void 0:_.call(u,E,r,i)}),w=or(),y=j.useRef("touch"),S=()=>{i||(l.onValueChange(r),l.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return x.jsx(tqe,{scope:n,value:r,disabled:i,textId:w,isSelected:f,onItemTextChange:j.useCallback(E=>{h(_=>_||((E==null?void 0:E.textContent)??"").trim())},[]),children:x.jsx(Qx.ItemSlot,{scope:n,value:r,disabled:i,textValue:d,children:x.jsx(He.div,{role:"option","aria-labelledby":w,"data-highlighted":m?"":void 0,"aria-selected":f&&m,"data-state":f?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...o,ref:b,onFocus:ke(o.onFocus,()=>g(!0)),onBlur:ke(o.onBlur,()=>g(!1)),onClick:ke(o.onClick,()=>{y.current!=="mouse"&&S()}),onPointerUp:ke(o.onPointerUp,()=>{y.current==="mouse"&&S()}),onPointerDown:ke(o.onPointerDown,E=>{y.current=E.pointerType}),onPointerMove:ke(o.onPointerMove,E=>{var _;y.current=E.pointerType,i?(_=u.onItemLeave)==null||_.call(u):y.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ke(o.onPointerLeave,E=>{var _;E.currentTarget===document.activeElement&&((_=u.onItemLeave)==null||_.call(u))}),onKeyDown:ke(o.onKeyDown,E=>{var A;((A=u.searchRef)==null?void 0:A.current)!==""&&E.key===" "||(qBe.includes(E.key)&&S(),E.key===" "&&E.preventDefault())})})})})});$te.displayName=_0;var ap="SelectItemText",Bte=j.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...a}=e,o=il(ap,n),l=al(ap,n),u=Lte(ap,n),f=UBe(ap,n),[d,h]=j.useState(null),m=ft(t,S=>h(S),u.onItemTextChange,S=>{var E;return(E=l.itemTextRefCallback)==null?void 0:E.call(l,S,u.value,u.disabled)}),g=d==null?void 0:d.textContent,b=j.useMemo(()=>x.jsx("option",{value:u.value,disabled:u.disabled,children:g},u.value),[u.disabled,u.value,g]),{onNativeOptionAdd:w,onNativeOptionRemove:y}=f;return zn(()=>(w(b),()=>y(b)),[w,y,b]),x.jsxs(x.Fragment,{children:[x.jsx(He.span,{id:u.textId,...a,ref:m}),u.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Mu.createPortal(a.children,o.valueNode):null]})});Bte.displayName=ap;var qte="SelectItemIndicator",zte=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Lte(qte,n).isSelected?x.jsx(He.span,{"aria-hidden":!0,...r,ref:t}):null});zte.displayName=qte;var xM="SelectScrollUpButton",Vte=j.forwardRef((e,t)=>{const n=al(xM,e.__scopeSelect),r=Ak(xM,e.__scopeSelect),[i,a]=j.useState(!1),o=ft(t,r.onScrollButtonChange);return zn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const f=u.scrollTop>0;a(f)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?x.jsx(Ute,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop-u.offsetHeight)}}):null});Vte.displayName=xM;var wM="SelectScrollDownButton",Fte=j.forwardRef((e,t)=>{const n=al(wM,e.__scopeSelect),r=Ak(wM,e.__scopeSelect),[i,a]=j.useState(!1),o=ft(t,r.onScrollButtonChange);return zn(()=>{if(n.viewport&&n.isPositioned){let l=function(){const f=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<f;a(d)};const u=n.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),i?x.jsx(Ute,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:u}=n;l&&u&&(l.scrollTop=l.scrollTop+u.offsetHeight)}}):null});Fte.displayName=wM;var Ute=j.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,a=al("SelectScrollButton",n),o=j.useRef(null),l=Jx(n),u=j.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return j.useEffect(()=>()=>u(),[u]),zn(()=>{var d;const f=l().find(h=>h.ref.current===document.activeElement);(d=f==null?void 0:f.ref.current)==null||d.scrollIntoView({block:"nearest"})},[l]),x.jsx(He.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:ke(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:ke(i.onPointerMove,()=>{var f;(f=a.onItemLeave)==null||f.call(a),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:ke(i.onPointerLeave,()=>{u()})})}),nqe="SelectSeparator",Hte=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return x.jsx(He.div,{"aria-hidden":!0,...r,ref:t})});Hte.displayName=nqe;var SM="SelectArrow",rqe=j.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=ew(n),a=il(SM,n),o=al(SM,n);return a.open&&o.position==="popper"?x.jsx(KM,{...i,...r,ref:t}):null});rqe.displayName=SM;var iqe="SelectBubbleInput",Gte=j.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=j.useRef(null),a=ft(r,i),o=hte(t);return j.useEffect(()=>{const l=i.current;if(!l)return;const u=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(u,"value").set;if(o!==t&&d){const h=new Event("change",{bubbles:!0});d.call(l,t),l.dispatchEvent(h)}},[o,t]),x.jsx(He.select,{...n,style:{...MG,...n.style},ref:a,defaultValue:t})});Gte.displayName=iqe;function Wte(e){return e===""||e===void 0}function Kte(e){const t=nr(e),n=j.useRef(""),r=j.useRef(0),i=j.useCallback(o=>{const l=n.current+o;t(l),(function u(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>u(""),1e3))})(l)},[t]),a=j.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return j.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function Yte(e,t,n){const i=t.length>1&&Array.from(t).every(f=>f===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=aqe(e,Math.max(a,0));i.length===1&&(o=o.filter(f=>f!==n));const u=o.find(f=>f.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function aqe(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var oqe=Ste,Xte=Ete,sqe=Tte,lqe=Cte,uqe=Ote,Zte=jte,cqe=Rte,Qte=Ite,Jte=$te,fqe=Bte,dqe=zte,ene=Vte,tne=Fte,nne=Hte;const hqe=oqe,pqe=sqe,rne=j.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(Xte,{ref:r,className:Ce("flex h-9 w-full items-center justify-between gap-2 whitespace-nowrap border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,x.jsx(lqe,{asChild:!0,children:x.jsx(k0,{className:"h-4 w-4 opacity-50"})})]}));rne.displayName=Xte.displayName;const ine=j.forwardRef(({className:e,...t},n)=>x.jsx(ene,{ref:n,className:Ce("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(bce,{className:"h-4 w-4"})}));ine.displayName=ene.displayName;const ane=j.forwardRef(({className:e,...t},n)=>x.jsx(tne,{ref:n,className:Ce("flex cursor-default items-center justify-center py-1",e),...t,children:x.jsx(k0,{className:"h-4 w-4"})}));ane.displayName=tne.displayName;const one=j.forwardRef(({className:e,children:t,position:n="popper",...r},i)=>x.jsx(uqe,{children:x.jsxs(Zte,{ref:i,className:Ce("relative z-50 max-h-96 min-w-[8rem] overflow-hidden border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[x.jsx(ine,{}),x.jsx(cqe,{className:Ce("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),x.jsx(ane,{})]})}));one.displayName=Zte.displayName;const mqe=j.forwardRef(({className:e,...t},n)=>x.jsx(Qte,{ref:n,className:Ce("px-2 py-1.5 text-sm font-semibold",e),...t}));mqe.displayName=Qte.displayName;const sne=j.forwardRef(({className:e,children:t,...n},r)=>x.jsxs(Jte,{ref:r,className:Ce("relative flex w-full cursor-default select-none items-center py-1.5 pl-2 pr-8 text-sm outline-none focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[x.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:x.jsx(dqe,{children:x.jsx(Dm,{className:"h-4 w-4"})})}),x.jsx(fqe,{children:t})]}));sne.displayName=Jte.displayName;const gqe=j.forwardRef(({className:e,...t},n)=>x.jsx(nne,{ref:n,className:Ce("-mx-1 my-1 h-px bg-muted",e),...t}));gqe.displayName=nne.displayName;function vqe({queues:e,readonly:t,prefill:n}){const r=yfe(),[i,a]=j.useState((n==null?void 0:n.queue)||e[0]||""),[o,l]=j.useState((n==null?void 0:n.jobName)||"test-job"),[u,f]=j.useState((n==null?void 0:n.payload)||`{
|
|
453
|
+
"message": "Hello from Workbench"
|
|
454
|
+
}`),[d,h]=j.useState(""),[m,g]=j.useState(null);j.useEffect(()=>{n!=null&&n.queue&&a(n.queue),n!=null&&n.jobName&&l(n.jobName),n!=null&&n.payload&&f(n.payload)},[n==null?void 0:n.queue,n==null?void 0:n.jobName,n==null?void 0:n.payload]);const b=async w=>{if(w.preventDefault(),!i||!o){g({success:!1,message:"Queue and job name are required"});return}let y;try{y=JSON.parse(u)}catch{g({success:!1,message:"Invalid JSON payload"});return}g(null),r.mutate({queueName:i,name:o,data:y,delay:d?Number(d)*1e3:void 0},{onSuccess:S=>{g({success:!0,message:`Job enqueued with ID: ${S.id}`})},onError:S=>{g({success:!1,message:S.message})}})};return t?x.jsxs("div",{className:"flex h-[400px] flex-col items-center justify-center text-center",children:[x.jsx(eR,{className:"mb-4 h-12 w-12 text-muted-foreground"}),x.jsx("h2",{className:"mb-2 text-lg font-medium",children:"Test Mode Disabled"}),x.jsx("p",{className:"max-w-md text-muted-foreground",children:"The dashboard is in readonly mode. Job testing is disabled."})]}):x.jsxs("div",{className:"max-w-2xl",children:[x.jsx("div",{className:"mb-6",children:x.jsx("p",{className:"text-sm text-muted-foreground",children:"Manually enqueue a job for testing purposes"})}),x.jsxs("form",{onSubmit:b,className:"space-y-6",children:[x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"queue",className:"text-sm font-medium",children:"Queue"}),x.jsxs(hqe,{value:i,onValueChange:a,children:[x.jsx(rne,{children:x.jsx(pqe,{placeholder:"Select a queue"})}),x.jsx(one,{children:e.map(w=>x.jsx(sne,{value:w,children:w},w))})]})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"jobName",className:"text-sm font-medium",children:"Job Name"}),x.jsx("input",{type:"text",value:o,onChange:w=>l(w.target.value),className:"h-9 w-full border bg-background px-3 text-sm focus:outline-none",placeholder:"my-job-name"})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"delay",className:"text-sm font-medium",children:"Delay (seconds)"}),x.jsx("input",{type:"number",value:d,onChange:w=>h(w.target.value),className:"h-9 w-full border bg-background px-3 text-sm focus:outline-none",placeholder:"0",min:"0"}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"Optional delay before the job is processed"})]}),x.jsxs("div",{className:"space-y-2",children:[x.jsx("label",{htmlFor:"payload",className:"text-sm font-medium",children:"Payload (JSON)"}),x.jsx("textarea",{value:u,onChange:w=>f(w.target.value),className:"h-48 w-full resize-none border bg-background px-3 py-2 font-mono text-sm focus:outline-none",placeholder:'{ "key": "value" }'})]}),x.jsxs("div",{className:"flex items-center gap-4",children:[x.jsx(tr,{type:"submit",disabled:r.isPending,children:r.isPending?x.jsx(x.Fragment,{children:"Processing..."}):x.jsx(x.Fragment,{children:"Enqueue Job"})}),m&&x.jsxs("div",{className:Ce("flex items-center gap-2 text-sm",m.success?"text-success":"text-destructive"),children:[m.success?x.jsx(xce,{className:"h-4 w-4"}):x.jsx(dd,{className:"h-4 w-4"}),m.message]})]})]})]})}const lne=j.createContext(null);function yqe(){const e=j.useContext(lne);if(!e)throw new Error("useSearchContext must be used within SearchContextProvider");return e}const bqe=km({status:R0(["all","active","completed","failed","waiting","delayed"]).optional().catch("all"),q:Ds().optional().catch(""),from:M3().optional(),to:M3().optional(),sort:Ds().optional()}),xqe=km({status:R0(["all","active","completed","failed","waiting","delayed"]).optional().catch("all"),sort:Ds().optional()}),wqe=km({tab:R0(["repeatable","delayed"]).optional().catch("repeatable"),repeatableSort:Ds().optional(),delayedSort:Ds().optional()}),Sqe=km({tab:R0(["payload","output","error","retries","timeline"]).optional()}),_qe=km({queue:Ds().optional(),jobName:Ds().optional(),payload:Ds().optional()});function Eqe(){const{data:e,isLoading:t}=Lm();afe();const{data:n=[]}=lR(),r=zi(),i=j.useMemo(()=>new Set(n.filter(y=>y.isPaused).map(y=>y.name)),[n]),a=ese(),[o,l]=j.useState(!1),[u,f]=j.useState(""),[d,h]=j.useState(()=>{if(typeof window<"u"){const y=localStorage.getItem("workbench:theme");return y?y==="dark":window.matchMedia("(prefers-color-scheme: dark)").matches}return!1}),{activeNav:m,activeQueue:g}=j.useMemo(()=>{const y=a.pathname;return y==="/"||y===""?{activeNav:"runs",activeQueue:void 0}:y==="/metrics"?{activeNav:"metrics",activeQueue:void 0}:y==="/schedulers"?{activeNav:"schedulers",activeQueue:void 0}:y==="/flows"||y.startsWith("/flows/")?{activeNav:"flows",activeQueue:void 0}:y==="/test"?{activeNav:"test",activeQueue:void 0}:y.startsWith("/queues/")?{activeNav:"queues",activeQueue:y.split("/")[2]}:{activeNav:"runs",activeQueue:void 0}},[a.pathname]);if(j.useEffect(()=>{document.documentElement.classList.add("no-transitions"),document.documentElement.classList.toggle("dark",d),localStorage.setItem("workbench:theme",d?"dark":"light"),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.documentElement.classList.remove("no-transitions")})})},[d]),j.useEffect(()=>{const y=S=>{if((S.metaKey||S.ctrlKey)&&S.key==="k"){S.preventDefault(),l(!0);return}o||(S.key==="r"&&(S.metaKey||S.ctrlKey)&&(S.preventDefault(),window.location.reload()),S.key==="t"&&(S.metaKey||S.ctrlKey)&&S.shiftKey&&(S.preventDefault(),h(!d)))};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[o,d]),t||!e)return x.jsx("div",{className:"flex h-screen items-center justify-center bg-background",children:x.jsx("div",{className:"animate-pulse text-muted-foreground",children:"Loading..."})});const b=y=>{switch(y){case"runs":r({to:"/"});break;case"metrics":r({to:"/metrics"});break;case"schedulers":r({to:"/schedulers"});break;case"flows":r({to:"/flows"});break;case"test":r({to:"/test"});break}},w=y=>{r({to:"/queues/$queueName",params:{queueName:y}})};return x.jsxs("div",{className:"flex h-screen bg-background",children:[x.jsx(Afe,{queues:e.queues,pausedQueues:i,activeNav:m,activeQueue:g,onNavSelect:b,onQueueSelect:w,isDark:d,onToggleTheme:()=>h(!d)}),x.jsx("div",{className:"flex flex-1 flex-col overflow-hidden",children:x.jsx(lne.Provider,{value:{searchQuery:u,setSearchQuery:f,setCommandOpen:l},children:x.jsx(oG,{})})}),x.jsx(mhe,{open:o,onOpenChange:l,queues:e.queues,searchQuery:u,onSearchQueryChange:f,isDark:d,onToggleTheme:()=>h(!d),onSelectQueue:y=>{r({to:"/queues/$queueName",params:{queueName:y}}),l(!1)},onSelectJob:(y,S)=>{r({to:"/queues/$queueName/jobs/$jobId",params:{queueName:y,jobId:S}}),l(!1)},onNavigate:y=>{r({to:y}),l(!1)}})]})}function ol({title:e,subtitle:t,children:n}){const r=yqe();return x.jsxs(x.Fragment,{children:[x.jsxs("header",{className:"flex h-14 shrink-0 items-center justify-between gap-2 border-b border-border px-6",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("h1",{className:"text-lg font-semibold",children:e}),t&&x.jsx("span",{className:"font-mono text-sm text-muted-foreground",children:t})]}),x.jsx(vhe,{value:r.searchQuery,onValueChange:r.setSearchQuery,onFocus:()=>r.setCommandOpen(!0)})]}),x.jsx("main",{className:"flex-1 overflow-auto p-6",children:n})]})}function Aqe(){const e=zi(),t=Pu({from:"/"});return x.jsx(ol,{title:"Runs",children:x.jsx(DBe,{search:t,onSearchChange:n=>{e({to:"/",search:n,replace:!0})},onJobSelect:(n,r)=>e({to:"/queues/$queueName/jobs/$jobId",params:{queueName:n,jobId:r}}),onQueueSelect:n=>e({to:"/queues/$queueName",params:{queueName:n}})})})}function Tqe(){const e=zi(),t=Pu({from:"/schedulers"});return x.jsx(ol,{title:"Schedulers",children:x.jsx($Be,{search:t,onSearchChange:n=>{e({to:"/schedulers",search:n,replace:!0})}})})}function Cqe(){return x.jsx(ol,{title:"Metrics",children:x.jsx(TDe,{})})}function Oqe(){const e=zi();return x.jsx(ol,{title:"Flows",children:x.jsx(E1e,{onFlowSelect:(t,n)=>e({to:"/flows/$queueName/$jobId",params:{queueName:t,jobId:n}})})})}function jqe(){const{queueName:e,jobId:t}=jm({from:"/flows/$queueName/$jobId"});return x.jsx(ol,{title:"Flow Details",subtitle:t,children:x.jsx(_1e,{queueName:e,jobId:t})})}function Nqe(){const{data:e}=Lm(),t=Pu({from:"/test"});return x.jsx(ol,{title:"Test",children:x.jsx(vqe,{queues:(e==null?void 0:e.queues)||[],readonly:e==null?void 0:e.readonly,prefill:t})})}function Pqe(){const{queueName:e}=jm({from:"/queues/$queueName"}),t=zi(),n=Pu({from:"/queues/$queueName"});return x.jsx(ol,{title:e,children:x.jsx(RBe,{queueName:e,search:n,onSearchChange:r=>{t({to:"/queues/$queueName",params:{queueName:e},search:r,replace:!0})},onJobSelect:r=>t({to:"/queues/$queueName/jobs/$jobId",params:{queueName:e,jobId:r}})})})}function Mqe(){const{queueName:e,jobId:t}=jm({from:"/queues/$queueName/jobs/$jobId"}),{data:n}=Lm(),r=zi(),i=Pu({from:"/queues/$queueName/jobs/$jobId"});return x.jsx(ol,{title:"Job Details",subtitle:t,children:x.jsx(F1e,{queueName:e,jobId:t,readonly:n==null?void 0:n.readonly,search:i,onSearchChange:a=>{r({to:"/queues/$queueName/jobs/$jobId",params:{queueName:e,jobId:t},search:a,replace:!0})},onBack:()=>r({to:"/queues/$queueName",params:{queueName:e}}),onClone:(a,o,l)=>r({to:"/test",search:{queue:a,jobName:o,payload:l}})})})}const _o=Boe({component:Eqe}),Rqe=Zs({getParentRoute:()=>_o,path:"/",component:Aqe,validateSearch:bqe}),kqe=Zs({getParentRoute:()=>_o,path:"/metrics",component:Cqe}),Dqe=Zs({getParentRoute:()=>_o,path:"/schedulers",component:Tqe,validateSearch:wqe}),Iqe=Zs({getParentRoute:()=>_o,path:"/flows",component:Oqe}),Lqe=Zs({getParentRoute:()=>_o,path:"/flows/$queueName/$jobId",component:jqe}),$qe=Zs({getParentRoute:()=>_o,path:"/test",component:Nqe,validateSearch:_qe}),Bqe=Zs({getParentRoute:()=>_o,path:"/queues/$queueName",component:Pqe,validateSearch:xqe}),qqe=Zs({getParentRoute:()=>_o,path:"/queues/$queueName/jobs/$jobId",component:Mqe,validateSearch:Sqe}),zqe=_o.addChildren([Rqe,kqe,Dqe,Iqe,Lqe,$qe,Bqe,qqe]);function Vqe(e){return Xoe({routeTree:zqe,basepath:e})}const Fqe=new Xie({defaultOptions:{queries:{staleTime:1e3*5,refetchOnWindowFocus:!0,retry:1}}});function Uqe(){if(typeof document<"u"){const e=document.querySelector("base");if(e!=null&&e.href)return new URL(e.href).pathname.replace(/\/$/,"")||"/"}return"/"}const Hqe=Vqe(Uqe());function Gqe(){return x.jsx(Zie,{client:Fqe,children:x.jsx(Bue,{delayDuration:0,children:x.jsx(Joe,{router:Hqe})})})}Eie.createRoot(document.getElementById("root")).render(x.jsx(ie.StrictMode,{children:x.jsx(Gqe,{})}));
|