agentv 4.41.6 → 4.42.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-TVSTWDYD.js → chunk-OB22TCWU.js} +96 -3
- package/dist/{chunk-TVSTWDYD.js.map → chunk-OB22TCWU.js.map} +1 -1
- package/dist/{chunk-V7YYOR2B.js → chunk-S3QAKOIY.js} +2 -2
- package/dist/chunk-S3QAKOIY.js.map +1 -0
- package/dist/cli.js +2 -2
- package/dist/dashboard/assets/index-B8f0vL8Y.js +118 -0
- package/dist/dashboard/assets/index-CE7sZEXf.css +1 -0
- package/dist/dashboard/assets/{index-_jpKSzIf.js → index-ZSsKg-gp.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/index.js +2 -2
- package/dist/{interactive-JRMDZ63V.js → interactive-HOXOATB2.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-V7YYOR2B.js.map +0 -1
- package/dist/dashboard/assets/index-BnYCCJ7O.css +0 -1
- package/dist/dashboard/assets/index-DaueD7GO.js +0 -118
- /package/dist/{interactive-JRMDZ63V.js.map → interactive-HOXOATB2.js.map} +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
var HL=Object.defineProperty;var $O=e=>{throw TypeError(e)};var FL=(e,t,r)=>t in e?HL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Jv=(e,t,r)=>FL(e,typeof t!="symbol"?t+"":t,r),eg=(e,t,r)=>t.has(e)||$O("Cannot "+r);var z=(e,t,r)=>(eg(e,t,"read from private field"),r?r.call(e):t.get(e)),xe=(e,t,r)=>t.has(e)?$O("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(eg(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Pe=(e,t,r)=>(eg(e,t,"access private method"),r);var Vf=(e,t,r,n)=>({set _(i){fe(e,t,i,r)},get _(){return z(e,t,n)}});function KL(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(n,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>n[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"]'))n(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&n(l)}).observe(document,{childList:!0,subtree:!0});function r(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(i){if(i.ep)return;i.ep=!0;const o=r(i);fetch(i.href,o)}})();function ns(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tg={exports:{}},ac={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var zO;function GL(){if(zO)return ac;zO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:n,key:l,ref:i!==void 0?i:null,props:o}}return ac.Fragment=t,ac.jsx=r,ac.jsxs=r,ac}var BO;function YL(){return BO||(BO=1,tg.exports=GL()),tg.exports}var d=YL(),rg={exports:{}},_e={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var UO;function VL(){if(UO)return _e;UO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=v&&L[v]||L["@@iterator"],typeof L=="function"?L:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function O(L,W,le){this.props=L,this.context=W,this.refs=N,this.updater=le||j}O.prototype.isReactComponent={},O.prototype.setState=function(L,W){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,W,"setState")},O.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function P(){}P.prototype=O.prototype;function E(L,W,le){this.props=L,this.context=W,this.refs=N,this.updater=le||j}var A=E.prototype=new P;A.constructor=E,w(A,O.prototype),A.isPureReactComponent=!0;var T=Array.isArray;function M(){}var R={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function I(L,W,le){var oe=le.ref;return{$$typeof:e,type:L,key:W,ref:oe!==void 0?oe:null,props:le}}function k(L,W){return I(L.type,W,L.props)}function H(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function q(L){var W={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(le){return W[le]})}var ae=/\/+/g;function Q(L,W){return typeof L=="object"&&L!==null&&L.key!=null?q(""+L.key):W.toString(36)}function Z(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(M,M):(L.status="pending",L.then(function(W){L.status==="pending"&&(L.status="fulfilled",L.value=W)},function(W){L.status==="pending"&&(L.status="rejected",L.reason=W)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function B(L,W,le,oe,ye){var Se=typeof L;(Se==="undefined"||Se==="boolean")&&(L=null);var Ne=!1;if(L===null)Ne=!0;else switch(Se){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(L.$$typeof){case e:case t:Ne=!0;break;case p:return Ne=L._init,B(Ne(L._payload),W,le,oe,ye)}}if(Ne)return ye=ye(L),Ne=oe===""?"."+Q(L,0):oe,T(ye)?(le="",Ne!=null&&(le=Ne.replace(ae,"$&/")+"/"),B(ye,W,le,"",function(te){return te})):ye!=null&&(H(ye)&&(ye=k(ye,le+(ye.key==null||L&&L.key===ye.key?"":(""+ye.key).replace(ae,"$&/")+"/")+Ne)),W.push(ye)),1;Ne=0;var Ce=oe===""?".":oe+":";if(T(L))for(var de=0;de<L.length;de++)oe=L[de],Se=Ce+Q(oe,de),Ne+=B(oe,W,le,Se,ye);else if(de=x(L),typeof de=="function")for(L=de.call(L),de=0;!(oe=L.next()).done;)oe=oe.value,Se=Ce+Q(oe,de++),Ne+=B(oe,W,le,Se,ye);else if(Se==="object"){if(typeof L.then=="function")return B(Z(L),W,le,oe,ye);throw W=String(L),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function K(L,W,le){if(L==null)return L;var oe=[],ye=0;return B(L,oe,"","",function(Se){return W.call(le,Se,ye++)}),oe}function ee(L){if(L._status===-1){var W=L._result;W=W(),W.then(function(le){(L._status===0||L._status===-1)&&(L._status=1,L._result=le)},function(le){(L._status===0||L._status===-1)&&(L._status=2,L._result=le)}),L._status===-1&&(L._status=0,L._result=W)}if(L._status===1)return L._result.default;throw L._result}var se=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},ue={map:K,forEach:function(L,W,le){K(L,function(){W.apply(this,arguments)},le)},count:function(L){var W=0;return K(L,function(){W++}),W},toArray:function(L){return K(L,function(W){return W})||[]},only:function(L){if(!H(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return _e.Activity=y,_e.Children=ue,_e.Component=O,_e.Fragment=r,_e.Profiler=i,_e.PureComponent=E,_e.StrictMode=n,_e.Suspense=f,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,_e.__COMPILER_RUNTIME={__proto__:null,c:function(L){return R.H.useMemoCache(L)}},_e.cache=function(L){return function(){return L.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(L,W,le){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var oe=w({},L.props),ye=L.key;if(W!=null)for(Se in W.key!==void 0&&(ye=""+W.key),W)!D.call(W,Se)||Se==="key"||Se==="__self"||Se==="__source"||Se==="ref"&&W.ref===void 0||(oe[Se]=W[Se]);var Se=arguments.length-2;if(Se===1)oe.children=le;else if(1<Se){for(var Ne=Array(Se),Ce=0;Ce<Se;Ce++)Ne[Ce]=arguments[Ce+2];oe.children=Ne}return I(L.type,ye,oe)},_e.createContext=function(L){return L={$$typeof:l,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},_e.createElement=function(L,W,le){var oe,ye={},Se=null;if(W!=null)for(oe in W.key!==void 0&&(Se=""+W.key),W)D.call(W,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(ye[oe]=W[oe]);var Ne=arguments.length-2;if(Ne===1)ye.children=le;else if(1<Ne){for(var Ce=Array(Ne),de=0;de<Ne;de++)Ce[de]=arguments[de+2];ye.children=Ce}if(L&&L.defaultProps)for(oe in Ne=L.defaultProps,Ne)ye[oe]===void 0&&(ye[oe]=Ne[oe]);return I(L,Se,ye)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(L){return{$$typeof:c,render:L}},_e.isValidElement=H,_e.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:ee}},_e.memo=function(L,W){return{$$typeof:m,type:L,compare:W===void 0?null:W}},_e.startTransition=function(L){var W=R.T,le={};R.T=le;try{var oe=L(),ye=R.S;ye!==null&&ye(le,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(M,se)}catch(Se){se(Se)}finally{W!==null&&le.types!==null&&(W.types=le.types),R.T=W}},_e.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},_e.use=function(L){return R.H.use(L)},_e.useActionState=function(L,W,le){return R.H.useActionState(L,W,le)},_e.useCallback=function(L,W){return R.H.useCallback(L,W)},_e.useContext=function(L){return R.H.useContext(L)},_e.useDebugValue=function(){},_e.useDeferredValue=function(L,W){return R.H.useDeferredValue(L,W)},_e.useEffect=function(L,W){return R.H.useEffect(L,W)},_e.useEffectEvent=function(L){return R.H.useEffectEvent(L)},_e.useId=function(){return R.H.useId()},_e.useImperativeHandle=function(L,W,le){return R.H.useImperativeHandle(L,W,le)},_e.useInsertionEffect=function(L,W){return R.H.useInsertionEffect(L,W)},_e.useLayoutEffect=function(L,W){return R.H.useLayoutEffect(L,W)},_e.useMemo=function(L,W){return R.H.useMemo(L,W)},_e.useOptimistic=function(L,W){return R.H.useOptimistic(L,W)},_e.useReducer=function(L,W,le){return R.H.useReducer(L,W,le)},_e.useRef=function(L){return R.H.useRef(L)},_e.useState=function(L){return R.H.useState(L)},_e.useSyncExternalStore=function(L,W,le){return R.H.useSyncExternalStore(L,W,le)},_e.useTransition=function(){return R.H.useTransition()},_e.version="19.2.4",_e}var qO;function eu(){return qO||(qO=1,rg.exports=VL()),rg.exports}var S=eu();const $l=ns(S),QL=KL({__proto__:null,default:$l},[S]);var ng={exports:{}},ic={},ag={exports:{}},ig={};/**
|
|
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 HO;function XL(){return HO||(HO=1,(function(e){function t(B,K){var ee=B.length;B.push(K);e:for(;0<ee;){var se=ee-1>>>1,ue=B[se];if(0<i(ue,K))B[se]=K,B[ee]=ue,ee=se;else break e}}function r(B){return B.length===0?null:B[0]}function n(B){if(B.length===0)return null;var K=B[0],ee=B.pop();if(ee!==K){B[0]=ee;e:for(var se=0,ue=B.length,L=ue>>>1;se<L;){var W=2*(se+1)-1,le=B[W],oe=W+1,ye=B[oe];if(0>i(le,ee))oe<ue&&0>i(ye,le)?(B[se]=ye,B[oe]=ee,se=oe):(B[se]=le,B[W]=ee,se=W);else if(oe<ue&&0>i(ye,ee))B[se]=ye,B[oe]=ee,se=oe;else break e}}return K}function i(B,K){var ee=B.sortIndex-K.sortIndex;return ee!==0?ee:B.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],m=[],p=1,y=null,v=3,x=!1,j=!1,w=!1,N=!1,O=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function A(B){for(var K=r(m);K!==null;){if(K.callback===null)n(m);else if(K.startTime<=B)n(m),K.sortIndex=K.expirationTime,t(f,K);else break;K=r(m)}}function T(B){if(w=!1,A(B),!j)if(r(f)!==null)j=!0,M||(M=!0,q());else{var K=r(m);K!==null&&Z(T,K.startTime-B)}}var M=!1,R=-1,D=5,I=-1;function k(){return N?!0:!(e.unstable_now()-I<D)}function H(){if(N=!1,M){var B=e.unstable_now();I=B;var K=!0;try{e:{j=!1,w&&(w=!1,P(R),R=-1),x=!0;var ee=v;try{t:{for(A(B),y=r(f);y!==null&&!(y.expirationTime>B&&k());){var se=y.callback;if(typeof se=="function"){y.callback=null,v=y.priorityLevel;var ue=se(y.expirationTime<=B);if(B=e.unstable_now(),typeof ue=="function"){y.callback=ue,A(B),K=!0;break t}y===r(f)&&n(f),A(B)}else n(f);y=r(f)}if(y!==null)K=!0;else{var L=r(m);L!==null&&Z(T,L.startTime-B),K=!1}}break e}finally{y=null,v=ee,x=!1}K=void 0}}finally{K?q():M=!1}}}var q;if(typeof E=="function")q=function(){E(H)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,Q=ae.port2;ae.port1.onmessage=H,q=function(){Q.postMessage(null)}}else q=function(){O(H,0)};function Z(B,K){R=O(function(){B(e.unstable_now())},K)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(B){switch(v){case 1:case 2:case 3:var K=3;break;default:K=v}var ee=v;v=K;try{return B()}finally{v=ee}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(B,K){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ee=v;v=B;try{return K()}finally{v=ee}},e.unstable_scheduleCallback=function(B,K,ee){var se=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?se+ee:se):ee=se,B){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=ee+ue,B={id:p++,callback:K,priorityLevel:B,startTime:ee,expirationTime:ue,sortIndex:-1},ee>se?(B.sortIndex=ee,t(m,B),r(f)===null&&B===r(m)&&(w?(P(R),R=-1):w=!0,Z(T,ee-se))):(B.sortIndex=ue,t(f,B),j||x||(j=!0,M||(M=!0,q()))),B},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(B){var K=v;return function(){var ee=v;v=K;try{return B.apply(this,arguments)}finally{v=ee}}}})(ig)),ig}var FO;function ZL(){return FO||(FO=1,ag.exports=XL()),ag.exports}var sg={exports:{}},cr={};/**
|
|
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 KO;function WL(){if(KO)return cr;KO=1;var e=eu();function t(f){var m="https://react.dev/errors/"+f;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(f,m,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:f,containerInfo:m,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return cr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,cr.createPortal=function(f,m){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return o(f,m,null,p)},cr.flushSync=function(f){var m=l.T,p=n.p;try{if(l.T=null,n.p=2,f)return f()}finally{l.T=m,n.p=p,n.d.f()}},cr.preconnect=function(f,m){typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,n.d.C(f,m))},cr.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},cr.preinit=function(f,m){if(typeof f=="string"&&m&&typeof m.as=="string"){var p=m.as,y=c(p,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?n.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:x}):p==="script"&&n.d.X(f,{crossOrigin:y,integrity:v,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},cr.preinitModule=function(f,m){if(typeof f=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=c(m.as,m.crossOrigin);n.d.M(f,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&n.d.M(f)},cr.preload=function(f,m){if(typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,y=c(p,m.crossOrigin);n.d.L(f,p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},cr.preloadModule=function(f,m){if(typeof f=="string")if(m){var p=c(m.as,m.crossOrigin);n.d.m(f,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else n.d.m(f)},cr.requestFormReset=function(f){n.d.r(f)},cr.unstable_batchedUpdates=function(f,m){return f(m)},cr.useFormState=function(f,m,p){return l.H.useFormState(f,m,p)},cr.useFormStatus=function(){return l.H.useHostTransitionStatus()},cr.version="19.2.4",cr}var GO;function o2(){if(GO)return sg.exports;GO=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(),sg.exports=WL(),sg.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 YO;function JL(){if(YO)return ic;YO=1;var e=ZL(),t=eu(),r=o2();function n(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,u=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(u=s.return),a=s.return;while(a)}return s.tag===3?u:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(n(188))}function m(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(n(188));return s!==a?null:a}for(var u=a,h=s;;){var g=u.return;if(g===null)break;var b=g.alternate;if(b===null){if(h=g.return,h!==null){u=h;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===u)return f(g),a;if(b===h)return f(g),s;b=b.sibling}throw Error(n(188))}if(u.return!==h.return)u=g,h=b;else{for(var _=!1,C=g.child;C;){if(C===u){_=!0,u=g,h=b;break}if(C===h){_=!0,h=g,u=b;break}C=C.sibling}if(!_){for(C=b.child;C;){if(C===u){_=!0,u=b,h=g;break}if(C===h){_=!0,h=b,u=g;break}C=C.sibling}if(!_)throw Error(n(189))}}if(u.alternate!==h)throw Error(n(190))}if(u.tag!==3)throw Error(n(188));return u.stateNode.current===u?a:s}function p(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=p(a),s!==null)return s;a=a.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),E=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function q(a){return a===null||typeof a!="object"?null:(a=H&&a[H]||a["@@iterator"],typeof a=="function"?a:null)}var ae=Symbol.for("react.client.reference");function Q(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ae?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case O:return"Profiler";case N:return"StrictMode";case T:return"Suspense";case M:return"SuspenseList";case I:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case j:return"Portal";case E:return a.displayName||"Context";case P:return(a._context.displayName||"Context")+".Consumer";case A:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case R:return s=a.displayName||null,s!==null?s:Q(a.type)||"Memo";case D:s=a._payload,a=a._init;try{return Q(a(s))}catch{}}return null}var Z=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},se=[],ue=-1;function L(a){return{current:a}}function W(a){0>ue||(a.current=se[ue],se[ue]=null,ue--)}function le(a,s){ue++,se[ue]=a.current,a.current=s}var oe=L(null),ye=L(null),Se=L(null),Ne=L(null);function Ce(a,s){switch(le(Se,s),le(ye,a),le(oe,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?oO(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=oO(s),a=lO(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}W(oe),le(oe,a)}function de(){W(oe),W(ye),W(Se)}function te(a){a.memoizedState!==null&&le(Ne,a);var s=oe.current,u=lO(s,a.type);s!==u&&(le(ye,a),le(oe,u))}function we(a){ye.current===a&&(W(oe),W(ye)),Ne.current===a&&(W(Ne),ec._currentValue=ee)}var ce,_t;function De(a){if(ce===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ce=s&&s[1]||"",_t=-1<u.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ce+a+_t}var Et=!1;function At(a,s){if(!a||Et)return"";Et=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(J){var X=J}Reflect.construct(a,[],ie)}else{try{ie.call()}catch(J){X=J}a.call(ie.prototype)}}else{try{throw Error()}catch(J){X=J}(ie=a())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(J){if(J&&X&&typeof J.stack=="string")return[J.stack,X.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=h.DetermineComponentFrameRoot(),_=b[0],C=b[1];if(_&&C){var $=_.split(`
|
|
44
|
+
`),Y=C.split(`
|
|
45
|
+
`);for(g=h=0;h<$.length&&!$[h].includes("DetermineComponentFrameRoot");)h++;for(;g<Y.length&&!Y[g].includes("DetermineComponentFrameRoot");)g++;if(h===$.length||g===Y.length)for(h=$.length-1,g=Y.length-1;1<=h&&0<=g&&$[h]!==Y[g];)g--;for(;1<=h&&0<=g;h--,g--)if($[h]!==Y[g]){if(h!==1||g!==1)do if(h--,g--,0>g||$[h]!==Y[g]){var re=`
|
|
46
|
+
`+$[h].replace(" at new "," at ");return a.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",a.displayName)),re}while(1<=h&&0<=g);break}}}finally{Et=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?De(u):""}function lr(a,s){switch(a.tag){case 26:case 27:case 5:return De(a.type);case 16:return De("Lazy");case 13:return a.child!==s&&s!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return At(a.type,!1);case 11:return At(a.type.render,!1);case 1:return At(a.type,!0);case 31:return De("Activity");default:return""}}function fa(a){try{var s="",u=null;do s+=lr(a,u),u=a,a=a.return;while(a);return s}catch(h){return`
|
|
47
|
+
Error generating stack: `+h.message+`
|
|
48
|
+
`+h.stack}}var An=Object.prototype.hasOwnProperty,du=e.unstable_scheduleCallback,wo=e.unstable_cancelCallback,Bp=e.unstable_shouldYield,Ad=e.unstable_requestPaint,Te=e.unstable_now,ur=e.unstable_getCurrentPriorityLevel,qn=e.unstable_ImmediatePriority,Pd=e.unstable_UserBlockingPriority,Td=e.unstable_NormalPriority,N5=e.unstable_LowPriority,Uw=e.unstable_IdlePriority,O5=e.log,_5=e.unstable_setDisableYieldValue,fu=null,qr=null;function ni(a){if(typeof O5=="function"&&_5(a),qr&&typeof qr.setStrictMode=="function")try{qr.setStrictMode(fu,a)}catch{}}var Hr=Math.clz32?Math.clz32:P5,E5=Math.log,A5=Math.LN2;function P5(a){return a>>>=0,a===0?32:31-(E5(a)/A5|0)|0}var Cd=256,Md=262144,Rd=4194304;function ss(a){var s=a&42;if(s!==0)return s;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Dd(a,s,u){var h=a.pendingLanes;if(h===0)return 0;var g=0,b=a.suspendedLanes,_=a.pingedLanes;a=a.warmLanes;var C=h&134217727;return C!==0?(h=C&~b,h!==0?g=ss(h):(_&=C,_!==0?g=ss(_):u||(u=C&~a,u!==0&&(g=ss(u))))):(C=h&~b,C!==0?g=ss(C):_!==0?g=ss(_):u||(u=h&~a,u!==0&&(g=ss(u)))),g===0?0:s!==0&&s!==g&&(s&b)===0&&(b=g&-g,u=s&-s,b>=u||b===32&&(u&4194048)!==0)?s:g}function hu(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function T5(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qw(){var a=Rd;return Rd<<=1,(Rd&62914560)===0&&(Rd=4194304),a}function Up(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function mu(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function C5(a,s,u,h,g,b){var _=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var C=a.entanglements,$=a.expirationTimes,Y=a.hiddenUpdates;for(u=_&~u;0<u;){var re=31-Hr(u),ie=1<<re;C[re]=0,$[re]=-1;var X=Y[re];if(X!==null)for(Y[re]=null,re=0;re<X.length;re++){var J=X[re];J!==null&&(J.lane&=-536870913)}u&=~ie}h!==0&&Hw(a,h,0),b!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=b&~(_&~s))}function Hw(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var h=31-Hr(s);a.entangledLanes|=s,a.entanglements[h]=a.entanglements[h]|1073741824|u&261930}function Fw(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var h=31-Hr(u),g=1<<h;g&s|a[h]&s&&(a[h]|=s),u&=~g}}function Kw(a,s){var u=s&-s;return u=(u&42)!==0?1:qp(u),(u&(a.suspendedLanes|s))!==0?0:u}function qp(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function Hp(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Gw(){var a=K.p;return a!==0?a:(a=window.event,a===void 0?32:CO(a.type))}function Yw(a,s){var u=K.p;try{return K.p=a,s()}finally{K.p=u}}var ai=Math.random().toString(36).slice(2),Zt="__reactFiber$"+ai,Ar="__reactProps$"+ai,So="__reactContainer$"+ai,Fp="__reactEvents$"+ai,M5="__reactListeners$"+ai,R5="__reactHandles$"+ai,Vw="__reactResources$"+ai,pu="__reactMarker$"+ai;function Kp(a){delete a[Zt],delete a[Ar],delete a[Fp],delete a[M5],delete a[R5]}function No(a){var s=a[Zt];if(s)return s;for(var u=a.parentNode;u;){if(s=u[So]||u[Zt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=pO(a);a!==null;){if(u=a[Zt])return u;a=pO(a)}return s}a=u,u=a.parentNode}return null}function Oo(a){if(a=a[Zt]||a[So]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function yu(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(n(33))}function _o(a){var s=a[Vw];return s||(s=a[Vw]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Ut(a){a[pu]=!0}var Qw=new Set,Xw={};function os(a,s){Eo(a,s),Eo(a+"Capture",s)}function Eo(a,s){for(Xw[a]=s,a=0;a<s.length;a++)Qw.add(s[a])}var D5=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]*$"),Zw={},Ww={};function k5(a){return An.call(Ww,a)?!0:An.call(Zw,a)?!1:D5.test(a)?Ww[a]=!0:(Zw[a]=!0,!1)}function kd(a,s,u){if(k5(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function Id(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function ha(a,s,u,h){if(h===null)a.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+h)}}function sn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Jw(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function I5(a,s,u){var h=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var g=h.get,b=h.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return g.call(this)},set:function(_){u=""+_,b.call(this,_)}}),Object.defineProperty(a,s,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(_){u=""+_},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Gp(a){if(!a._valueTracker){var s=Jw(a)?"checked":"value";a._valueTracker=I5(a,s,""+a[s])}}function eS(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),h="";return a&&(h=Jw(a)?a.checked?"true":"false":a.value),a=h,a!==u?(s.setValue(a),!0):!1}function Ld(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var L5=/[\n"\\]/g;function on(a){return a.replace(L5,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Yp(a,s,u,h,g,b,_,C){a.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?a.type=_:a.removeAttribute("type"),s!=null?_==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+sn(s)):a.value!==""+sn(s)&&(a.value=""+sn(s)):_!=="submit"&&_!=="reset"||a.removeAttribute("value"),s!=null?Vp(a,_,sn(s)):u!=null?Vp(a,_,sn(u)):h!=null&&a.removeAttribute("value"),g==null&&b!=null&&(a.defaultChecked=!!b),g!=null&&(a.checked=g&&typeof g!="function"&&typeof g!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?a.name=""+sn(C):a.removeAttribute("name")}function tS(a,s,u,h,g,b,_,C){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),s!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||s!=null)){Gp(a);return}u=u!=null?""+sn(u):"",s=s!=null?""+sn(s):u,C||s===a.value||(a.value=s),a.defaultValue=s}h=h??g,h=typeof h!="function"&&typeof h!="symbol"&&!!h,a.checked=C?a.checked:!!h,a.defaultChecked=!!h,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(a.name=_),Gp(a)}function Vp(a,s,u){s==="number"&&Ld(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Ao(a,s,u,h){if(a=a.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=s.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&h&&(a[u].defaultSelected=!0)}else{for(u=""+sn(u),s=null,g=0;g<a.length;g++){if(a[g].value===u){a[g].selected=!0,h&&(a[g].defaultSelected=!0);return}s!==null||a[g].disabled||(s=a[g])}s!==null&&(s.selected=!0)}}function rS(a,s,u){if(s!=null&&(s=""+sn(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+sn(u):""}function nS(a,s,u,h){if(s==null){if(h!=null){if(u!=null)throw Error(n(92));if(Z(h)){if(1<h.length)throw Error(n(93));h=h[0]}u=h}u==null&&(u=""),s=u}u=sn(s),a.defaultValue=u,h=a.textContent,h===u&&h!==""&&h!==null&&(a.value=h),Gp(a)}function Po(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var $5=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 aS(a,s,u){var h=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":h?a.setProperty(s,u):typeof u!="number"||u===0||$5.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function iS(a,s,u){if(s!=null&&typeof s!="object")throw Error(n(62));if(a=a.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?a.setProperty(h,""):h==="float"?a.cssFloat="":a[h]="");for(var g in s)h=s[g],s.hasOwnProperty(g)&&u[g]!==h&&aS(a,g,h)}else for(var b in s)s.hasOwnProperty(b)&&aS(a,b,s[b])}function Qp(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var z5=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"]]),B5=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $d(a){return B5.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ma(){}var Xp=null;function Zp(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var To=null,Co=null;function sS(a){var s=Oo(a);if(s&&(a=s.stateNode)){var u=a[Ar]||null;e:switch(a=s.stateNode,s.type){case"input":if(Yp(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+on(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var h=u[s];if(h!==a&&h.form===a.form){var g=h[Ar]||null;if(!g)throw Error(n(90));Yp(h,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(s=0;s<u.length;s++)h=u[s],h.form===a.form&&eS(h)}break e;case"textarea":rS(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Ao(a,!!u.multiple,s,!1)}}}var Wp=!1;function oS(a,s,u){if(Wp)return a(s,u);Wp=!0;try{var h=a(s);return h}finally{if(Wp=!1,(To!==null||Co!==null)&&(_f(),To&&(s=To,a=Co,Co=To=null,sS(s),a)))for(s=0;s<a.length;s++)sS(a[s])}}function vu(a,s){var u=a.stateNode;if(u===null)return null;var h=u[Ar]||null;if(h===null)return null;u=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(a=a.type,h=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!h;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jp=!1;if(pa)try{var gu={};Object.defineProperty(gu,"passive",{get:function(){Jp=!0}}),window.addEventListener("test",gu,gu),window.removeEventListener("test",gu,gu)}catch{Jp=!1}var ii=null,ey=null,zd=null;function lS(){if(zd)return zd;var a,s=ey,u=s.length,h,g="value"in ii?ii.value:ii.textContent,b=g.length;for(a=0;a<u&&s[a]===g[a];a++);var _=u-a;for(h=1;h<=_&&s[u-h]===g[b-h];h++);return zd=g.slice(a,1<h?1-h:void 0)}function Bd(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Ud(){return!0}function uS(){return!1}function Pr(a){function s(u,h,g,b,_){this._reactName=u,this._targetInst=g,this.type=h,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var C in a)a.hasOwnProperty(C)&&(u=a[C],this[C]=u?u(b):b[C]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Ud:uS,this.isPropagationStopped=uS,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Ud)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Ud)},persist:function(){},isPersistent:Ud}),s}var ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qd=Pr(ls),xu=y({},ls,{view:0,detail:0}),U5=Pr(xu),ty,ry,bu,Hd=y({},xu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ay,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==bu&&(bu&&a.type==="mousemove"?(ty=a.screenX-bu.screenX,ry=a.screenY-bu.screenY):ry=ty=0,bu=a),ty)},movementY:function(a){return"movementY"in a?a.movementY:ry}}),cS=Pr(Hd),q5=y({},Hd,{dataTransfer:0}),H5=Pr(q5),F5=y({},xu,{relatedTarget:0}),ny=Pr(F5),K5=y({},ls,{animationName:0,elapsedTime:0,pseudoElement:0}),G5=Pr(K5),Y5=y({},ls,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),V5=Pr(Y5),Q5=y({},ls,{data:0}),dS=Pr(Q5),X5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z5={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"},W5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J5(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=W5[a])?!!s[a]:!1}function ay(){return J5}var eI=y({},xu,{key:function(a){if(a.key){var s=X5[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Bd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Z5[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ay,charCode:function(a){return a.type==="keypress"?Bd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Bd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),tI=Pr(eI),rI=y({},Hd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),fS=Pr(rI),nI=y({},xu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ay}),aI=Pr(nI),iI=y({},ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),sI=Pr(iI),oI=y({},Hd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),lI=Pr(oI),uI=y({},ls,{newState:0,oldState:0}),cI=Pr(uI),dI=[9,13,27,32],iy=pa&&"CompositionEvent"in window,ju=null;pa&&"documentMode"in document&&(ju=document.documentMode);var fI=pa&&"TextEvent"in window&&!ju,hS=pa&&(!iy||ju&&8<ju&&11>=ju),mS=" ",pS=!1;function yS(a,s){switch(a){case"keyup":return dI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vS(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Mo=!1;function hI(a,s){switch(a){case"compositionend":return vS(s);case"keypress":return s.which!==32?null:(pS=!0,mS);case"textInput":return a=s.data,a===mS&&pS?null:a;default:return null}}function mI(a,s){if(Mo)return a==="compositionend"||!iy&&yS(a,s)?(a=lS(),zd=ey=ii=null,Mo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return hS&&s.locale!=="ko"?null:s.data;default:return null}}var pI={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 gS(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!pI[a.type]:s==="textarea"}function xS(a,s,u,h){To?Co?Co.push(h):Co=[h]:To=h,s=Rf(s,"onChange"),0<s.length&&(u=new qd("onChange","change",null,u,h),a.push({event:u,listeners:s}))}var wu=null,Su=null;function yI(a){tO(a,0)}function Fd(a){var s=yu(a);if(eS(s))return a}function bS(a,s){if(a==="change")return s}var jS=!1;if(pa){var sy;if(pa){var oy="oninput"in document;if(!oy){var wS=document.createElement("div");wS.setAttribute("oninput","return;"),oy=typeof wS.oninput=="function"}sy=oy}else sy=!1;jS=sy&&(!document.documentMode||9<document.documentMode)}function SS(){wu&&(wu.detachEvent("onpropertychange",NS),Su=wu=null)}function NS(a){if(a.propertyName==="value"&&Fd(Su)){var s=[];xS(s,Su,a,Zp(a)),oS(yI,s)}}function vI(a,s,u){a==="focusin"?(SS(),wu=s,Su=u,wu.attachEvent("onpropertychange",NS)):a==="focusout"&&SS()}function gI(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Fd(Su)}function xI(a,s){if(a==="click")return Fd(s)}function bI(a,s){if(a==="input"||a==="change")return Fd(s)}function jI(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Fr=typeof Object.is=="function"?Object.is:jI;function Nu(a,s){if(Fr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),h=Object.keys(s);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var g=u[h];if(!An.call(s,g)||!Fr(a[g],s[g]))return!1}return!0}function OS(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function _S(a,s){var u=OS(a);a=0;for(var h;u;){if(u.nodeType===3){if(h=a+u.textContent.length,a<=s&&h>=s)return{node:u,offset:s-a};a=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=OS(u)}}function ES(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?ES(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function AS(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Ld(a.document);s instanceof a.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)a=s.contentWindow;else break;s=Ld(a.document)}return s}function ly(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var wI=pa&&"documentMode"in document&&11>=document.documentMode,Ro=null,uy=null,Ou=null,cy=!1;function PS(a,s,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;cy||Ro==null||Ro!==Ld(h)||(h=Ro,"selectionStart"in h&&ly(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),Ou&&Nu(Ou,h)||(Ou=h,h=Rf(uy,"onSelect"),0<h.length&&(s=new qd("onSelect","select",null,s,u),a.push({event:s,listeners:h}),s.target=Ro)))}function us(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var Do={animationend:us("Animation","AnimationEnd"),animationiteration:us("Animation","AnimationIteration"),animationstart:us("Animation","AnimationStart"),transitionrun:us("Transition","TransitionRun"),transitionstart:us("Transition","TransitionStart"),transitioncancel:us("Transition","TransitionCancel"),transitionend:us("Transition","TransitionEnd")},dy={},TS={};pa&&(TS=document.createElement("div").style,"AnimationEvent"in window||(delete Do.animationend.animation,delete Do.animationiteration.animation,delete Do.animationstart.animation),"TransitionEvent"in window||delete Do.transitionend.transition);function cs(a){if(dy[a])return dy[a];if(!Do[a])return a;var s=Do[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in TS)return dy[a]=s[u];return a}var CS=cs("animationend"),MS=cs("animationiteration"),RS=cs("animationstart"),SI=cs("transitionrun"),NI=cs("transitionstart"),OI=cs("transitioncancel"),DS=cs("transitionend"),kS=new Map,fy="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(" ");fy.push("scrollEnd");function Pn(a,s){kS.set(a,s),os(s,[a])}var Kd=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},ln=[],ko=0,hy=0;function Gd(){for(var a=ko,s=hy=ko=0;s<a;){var u=ln[s];ln[s++]=null;var h=ln[s];ln[s++]=null;var g=ln[s];ln[s++]=null;var b=ln[s];if(ln[s++]=null,h!==null&&g!==null){var _=h.pending;_===null?g.next=g:(g.next=_.next,_.next=g),h.pending=g}b!==0&&IS(u,g,b)}}function Yd(a,s,u,h){ln[ko++]=a,ln[ko++]=s,ln[ko++]=u,ln[ko++]=h,hy|=h,a.lanes|=h,a=a.alternate,a!==null&&(a.lanes|=h)}function my(a,s,u,h){return Yd(a,s,u,h),Vd(a)}function ds(a,s){return Yd(a,null,null,s),Vd(a)}function IS(a,s,u){a.lanes|=u;var h=a.alternate;h!==null&&(h.lanes|=u);for(var g=!1,b=a.return;b!==null;)b.childLanes|=u,h=b.alternate,h!==null&&(h.childLanes|=u),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(g=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,g&&s!==null&&(g=31-Hr(u),a=b.hiddenUpdates,h=a[g],h===null?a[g]=[s]:h.push(s),s.lane=u|536870912),b):null}function Vd(a){if(50<Yu)throw Yu=0,Sv=null,Error(n(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Io={};function _I(a,s,u,h){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kr(a,s,u,h){return new _I(a,s,u,h)}function py(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ya(a,s){var u=a.alternate;return u===null?(u=Kr(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function LS(a,s){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,s=u.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function Qd(a,s,u,h,g,b){var _=0;if(h=a,typeof a=="function")py(a)&&(_=1);else if(typeof a=="string")_=CL(a,u,oe.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case I:return a=Kr(31,u,s,g),a.elementType=I,a.lanes=b,a;case w:return fs(u.children,g,b,s);case N:_=8,g|=24;break;case O:return a=Kr(12,u,s,g|2),a.elementType=O,a.lanes=b,a;case T:return a=Kr(13,u,s,g),a.elementType=T,a.lanes=b,a;case M:return a=Kr(19,u,s,g),a.elementType=M,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case E:_=10;break e;case P:_=9;break e;case A:_=11;break e;case R:_=14;break e;case D:_=16,h=null;break e}_=29,u=Error(n(130,a===null?"null":typeof a,"")),h=null}return s=Kr(_,u,s,g),s.elementType=a,s.type=h,s.lanes=b,s}function fs(a,s,u,h){return a=Kr(7,a,h,s),a.lanes=u,a}function yy(a,s,u){return a=Kr(6,a,null,s),a.lanes=u,a}function $S(a){var s=Kr(18,null,null,0);return s.stateNode=a,s}function vy(a,s,u){return s=Kr(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var zS=new WeakMap;function un(a,s){if(typeof a=="object"&&a!==null){var u=zS.get(a);return u!==void 0?u:(s={value:a,source:s,stack:fa(s)},zS.set(a,s),s)}return{value:a,source:s,stack:fa(s)}}var Lo=[],$o=0,Xd=null,_u=0,cn=[],dn=0,si=null,Hn=1,Fn="";function va(a,s){Lo[$o++]=_u,Lo[$o++]=Xd,Xd=a,_u=s}function BS(a,s,u){cn[dn++]=Hn,cn[dn++]=Fn,cn[dn++]=si,si=a;var h=Hn;a=Fn;var g=32-Hr(h)-1;h&=~(1<<g),u+=1;var b=32-Hr(s)+g;if(30<b){var _=g-g%5;b=(h&(1<<_)-1).toString(32),h>>=_,g-=_,Hn=1<<32-Hr(s)+g|u<<g|h,Fn=b+a}else Hn=1<<b|u<<g|h,Fn=a}function gy(a){a.return!==null&&(va(a,1),BS(a,1,0))}function xy(a){for(;a===Xd;)Xd=Lo[--$o],Lo[$o]=null,_u=Lo[--$o],Lo[$o]=null;for(;a===si;)si=cn[--dn],cn[dn]=null,Fn=cn[--dn],cn[dn]=null,Hn=cn[--dn],cn[dn]=null}function US(a,s){cn[dn++]=Hn,cn[dn++]=Fn,cn[dn++]=si,Hn=s.id,Fn=s.overflow,si=a}var Wt=null,it=null,Le=!1,oi=null,fn=!1,by=Error(n(519));function li(a){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Eu(un(s,a)),by}function qS(a){var s=a.stateNode,u=a.type,h=a.memoizedProps;switch(s[Zt]=a,s[Ar]=h,u){case"dialog":Re("cancel",s),Re("close",s);break;case"iframe":case"object":case"embed":Re("load",s);break;case"video":case"audio":for(u=0;u<Qu.length;u++)Re(Qu[u],s);break;case"source":Re("error",s);break;case"img":case"image":case"link":Re("error",s),Re("load",s);break;case"details":Re("toggle",s);break;case"input":Re("invalid",s),tS(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":Re("invalid",s);break;case"textarea":Re("invalid",s),nS(s,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||h.suppressHydrationWarning===!0||iO(s.textContent,u)?(h.popover!=null&&(Re("beforetoggle",s),Re("toggle",s)),h.onScroll!=null&&Re("scroll",s),h.onScrollEnd!=null&&Re("scrollend",s),h.onClick!=null&&(s.onclick=ma),s=!0):s=!1,s||li(a,!0)}function HS(a){for(Wt=a.return;Wt;)switch(Wt.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:Wt=Wt.return}}function zo(a){if(a!==Wt)return!1;if(!Le)return HS(a),Le=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||$v(a.type,a.memoizedProps)),u=!u),u&&it&&li(a),HS(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=mO(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=mO(a)}else s===27?(s=it,wi(a.type)?(a=Hv,Hv=null,it=a):it=s):it=Wt?mn(a.stateNode.nextSibling):null;return!0}function hs(){it=Wt=null,Le=!1}function jy(){var a=oi;return a!==null&&(Rr===null?Rr=a:Rr.push.apply(Rr,a),oi=null),a}function Eu(a){oi===null?oi=[a]:oi.push(a)}var wy=L(null),ms=null,ga=null;function ui(a,s,u){le(wy,s._currentValue),s._currentValue=u}function xa(a){a._currentValue=wy.current,W(wy)}function Sy(a,s,u){for(;a!==null;){var h=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),a===u)break;a=a.return}}function Ny(a,s,u,h){var g=a.child;for(g!==null&&(g.return=a);g!==null;){var b=g.dependencies;if(b!==null){var _=g.child;b=b.firstContext;e:for(;b!==null;){var C=b;b=g;for(var $=0;$<s.length;$++)if(C.context===s[$]){b.lanes|=u,C=b.alternate,C!==null&&(C.lanes|=u),Sy(b.return,u,a),h||(_=null);break e}b=C.next}}else if(g.tag===18){if(_=g.return,_===null)throw Error(n(341));_.lanes|=u,b=_.alternate,b!==null&&(b.lanes|=u),Sy(_,u,a),_=null}else _=g.child;if(_!==null)_.return=g;else for(_=g;_!==null;){if(_===a){_=null;break}if(g=_.sibling,g!==null){g.return=_.return,_=g;break}_=_.return}g=_}}function Bo(a,s,u,h){a=null;for(var g=s,b=!1;g!==null;){if(!b){if((g.flags&524288)!==0)b=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var _=g.alternate;if(_===null)throw Error(n(387));if(_=_.memoizedProps,_!==null){var C=g.type;Fr(g.pendingProps.value,_.value)||(a!==null?a.push(C):a=[C])}}else if(g===Ne.current){if(_=g.alternate,_===null)throw Error(n(387));_.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(ec):a=[ec])}g=g.return}a!==null&&Ny(s,a,u,h),s.flags|=262144}function Zd(a){for(a=a.firstContext;a!==null;){if(!Fr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ps(a){ms=a,ga=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Jt(a){return FS(ms,a)}function Wd(a,s){return ms===null&&ps(a),FS(a,s)}function FS(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},ga===null){if(a===null)throw Error(n(308));ga=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ga=ga.next=s;return u}var EI=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,h){a.push(h)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},AI=e.unstable_scheduleCallback,PI=e.unstable_NormalPriority,Pt={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oy(){return{controller:new EI,data:new Map,refCount:0}}function Au(a){a.refCount--,a.refCount===0&&AI(PI,function(){a.controller.abort()})}var Pu=null,_y=0,Uo=0,qo=null;function TI(a,s){if(Pu===null){var u=Pu=[];_y=0,Uo=Pv(),qo={status:"pending",value:void 0,then:function(h){u.push(h)}}}return _y++,s.then(KS,KS),s}function KS(){if(--_y===0&&Pu!==null){qo!==null&&(qo.status="fulfilled");var a=Pu;Pu=null,Uo=0,qo=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function CI(a,s){var u=[],h={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return a.then(function(){h.status="fulfilled",h.value=s;for(var g=0;g<u.length;g++)(0,u[g])(s)},function(g){for(h.status="rejected",h.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),h}var GS=B.S;B.S=function(a,s){PN=Te(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&TI(a,s),GS!==null&&GS(a,s)};var ys=L(null);function Ey(){var a=ys.current;return a!==null?a:rt.pooledCache}function Jd(a,s){s===null?le(ys,ys.current):le(ys,s.pool)}function YS(){var a=Ey();return a===null?null:{parent:Pt._currentValue,pool:a}}var Ho=Error(n(460)),Ay=Error(n(474)),ef=Error(n(542)),tf={then:function(){}};function VS(a){return a=a.status,a==="fulfilled"||a==="rejected"}function QS(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(ma,ma),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,ZS(a),a;default:if(typeof s.status=="string")s.then(ma,ma);else{if(a=rt,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=s,a.status="pending",a.then(function(h){if(s.status==="pending"){var g=s;g.status="fulfilled",g.value=h}},function(h){if(s.status==="pending"){var g=s;g.status="rejected",g.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,ZS(a),a}throw gs=s,Ho}}function vs(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(gs=u,Ho):u}}var gs=null;function XS(){if(gs===null)throw Error(n(459));var a=gs;return gs=null,a}function ZS(a){if(a===Ho||a===ef)throw Error(n(483))}var Fo=null,Tu=0;function rf(a){var s=Tu;return Tu+=1,Fo===null&&(Fo=[]),QS(Fo,a,s)}function Cu(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function nf(a,s){throw s.$$typeof===v?Error(n(525)):(a=Object.prototype.toString.call(s),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function WS(a){function s(F,U){if(a){var G=F.deletions;G===null?(F.deletions=[U],F.flags|=16):G.push(U)}}function u(F,U){if(!a)return null;for(;U!==null;)s(F,U),U=U.sibling;return null}function h(F){for(var U=new Map;F!==null;)F.key!==null?U.set(F.key,F):U.set(F.index,F),F=F.sibling;return U}function g(F,U){return F=ya(F,U),F.index=0,F.sibling=null,F}function b(F,U,G){return F.index=G,a?(G=F.alternate,G!==null?(G=G.index,G<U?(F.flags|=67108866,U):G):(F.flags|=67108866,U)):(F.flags|=1048576,U)}function _(F){return a&&F.alternate===null&&(F.flags|=67108866),F}function C(F,U,G,ne){return U===null||U.tag!==6?(U=yy(G,F.mode,ne),U.return=F,U):(U=g(U,G),U.return=F,U)}function $(F,U,G,ne){var be=G.type;return be===w?re(F,U,G.props.children,ne,G.key):U!==null&&(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===D&&vs(be)===U.type)?(U=g(U,G.props),Cu(U,G),U.return=F,U):(U=Qd(G.type,G.key,G.props,null,F.mode,ne),Cu(U,G),U.return=F,U)}function Y(F,U,G,ne){return U===null||U.tag!==4||U.stateNode.containerInfo!==G.containerInfo||U.stateNode.implementation!==G.implementation?(U=vy(G,F.mode,ne),U.return=F,U):(U=g(U,G.children||[]),U.return=F,U)}function re(F,U,G,ne,be){return U===null||U.tag!==7?(U=fs(G,F.mode,ne,be),U.return=F,U):(U=g(U,G),U.return=F,U)}function ie(F,U,G){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=yy(""+U,F.mode,G),U.return=F,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return G=Qd(U.type,U.key,U.props,null,F.mode,G),Cu(G,U),G.return=F,G;case j:return U=vy(U,F.mode,G),U.return=F,U;case D:return U=vs(U),ie(F,U,G)}if(Z(U)||q(U))return U=fs(U,F.mode,G,null),U.return=F,U;if(typeof U.then=="function")return ie(F,rf(U),G);if(U.$$typeof===E)return ie(F,Wd(F,U),G);nf(F,U)}return null}function X(F,U,G,ne){var be=U!==null?U.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return be!==null?null:C(F,U,""+G,ne);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return G.key===be?$(F,U,G,ne):null;case j:return G.key===be?Y(F,U,G,ne):null;case D:return G=vs(G),X(F,U,G,ne)}if(Z(G)||q(G))return be!==null?null:re(F,U,G,ne,null);if(typeof G.then=="function")return X(F,U,rf(G),ne);if(G.$$typeof===E)return X(F,U,Wd(F,G),ne);nf(F,G)}return null}function J(F,U,G,ne,be){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return F=F.get(G)||null,C(U,F,""+ne,be);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return F=F.get(ne.key===null?G:ne.key)||null,$(U,F,ne,be);case j:return F=F.get(ne.key===null?G:ne.key)||null,Y(U,F,ne,be);case D:return ne=vs(ne),J(F,U,G,ne,be)}if(Z(ne)||q(ne))return F=F.get(G)||null,re(U,F,ne,be,null);if(typeof ne.then=="function")return J(F,U,G,rf(ne),be);if(ne.$$typeof===E)return J(F,U,G,Wd(U,ne),be);nf(U,ne)}return null}function me(F,U,G,ne){for(var be=null,qe=null,ve=U,Ae=U=0,Ie=null;ve!==null&&Ae<G.length;Ae++){ve.index>Ae?(Ie=ve,ve=null):Ie=ve.sibling;var He=X(F,ve,G[Ae],ne);if(He===null){ve===null&&(ve=Ie);break}a&&ve&&He.alternate===null&&s(F,ve),U=b(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He,ve=Ie}if(Ae===G.length)return u(F,ve),Le&&va(F,Ae),be;if(ve===null){for(;Ae<G.length;Ae++)ve=ie(F,G[Ae],ne),ve!==null&&(U=b(ve,U,Ae),qe===null?be=ve:qe.sibling=ve,qe=ve);return Le&&va(F,Ae),be}for(ve=h(ve);Ae<G.length;Ae++)Ie=J(ve,F,Ae,G[Ae],ne),Ie!==null&&(a&&Ie.alternate!==null&&ve.delete(Ie.key===null?Ae:Ie.key),U=b(Ie,U,Ae),qe===null?be=Ie:qe.sibling=Ie,qe=Ie);return a&&ve.forEach(function(Ei){return s(F,Ei)}),Le&&va(F,Ae),be}function je(F,U,G,ne){if(G==null)throw Error(n(151));for(var be=null,qe=null,ve=U,Ae=U=0,Ie=null,He=G.next();ve!==null&&!He.done;Ae++,He=G.next()){ve.index>Ae?(Ie=ve,ve=null):Ie=ve.sibling;var Ei=X(F,ve,He.value,ne);if(Ei===null){ve===null&&(ve=Ie);break}a&&ve&&Ei.alternate===null&&s(F,ve),U=b(Ei,U,Ae),qe===null?be=Ei:qe.sibling=Ei,qe=Ei,ve=Ie}if(He.done)return u(F,ve),Le&&va(F,Ae),be;if(ve===null){for(;!He.done;Ae++,He=G.next())He=ie(F,He.value,ne),He!==null&&(U=b(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He);return Le&&va(F,Ae),be}for(ve=h(ve);!He.done;Ae++,He=G.next())He=J(ve,F,Ae,He.value,ne),He!==null&&(a&&He.alternate!==null&&ve.delete(He.key===null?Ae:He.key),U=b(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He);return a&&ve.forEach(function(qL){return s(F,qL)}),Le&&va(F,Ae),be}function et(F,U,G,ne){if(typeof G=="object"&&G!==null&&G.type===w&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case x:e:{for(var be=G.key;U!==null;){if(U.key===be){if(be=G.type,be===w){if(U.tag===7){u(F,U.sibling),ne=g(U,G.props.children),ne.return=F,F=ne;break e}}else if(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===D&&vs(be)===U.type){u(F,U.sibling),ne=g(U,G.props),Cu(ne,G),ne.return=F,F=ne;break e}u(F,U);break}else s(F,U);U=U.sibling}G.type===w?(ne=fs(G.props.children,F.mode,ne,G.key),ne.return=F,F=ne):(ne=Qd(G.type,G.key,G.props,null,F.mode,ne),Cu(ne,G),ne.return=F,F=ne)}return _(F);case j:e:{for(be=G.key;U!==null;){if(U.key===be)if(U.tag===4&&U.stateNode.containerInfo===G.containerInfo&&U.stateNode.implementation===G.implementation){u(F,U.sibling),ne=g(U,G.children||[]),ne.return=F,F=ne;break e}else{u(F,U);break}else s(F,U);U=U.sibling}ne=vy(G,F.mode,ne),ne.return=F,F=ne}return _(F);case D:return G=vs(G),et(F,U,G,ne)}if(Z(G))return me(F,U,G,ne);if(q(G)){if(be=q(G),typeof be!="function")throw Error(n(150));return G=be.call(G),je(F,U,G,ne)}if(typeof G.then=="function")return et(F,U,rf(G),ne);if(G.$$typeof===E)return et(F,U,Wd(F,G),ne);nf(F,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,U!==null&&U.tag===6?(u(F,U.sibling),ne=g(U,G),ne.return=F,F=ne):(u(F,U),ne=yy(G,F.mode,ne),ne.return=F,F=ne),_(F)):u(F,U)}return function(F,U,G,ne){try{Tu=0;var be=et(F,U,G,ne);return Fo=null,be}catch(ve){if(ve===Ho||ve===ef)throw ve;var qe=Kr(29,ve,null,F.mode);return qe.lanes=ne,qe.return=F,qe}finally{}}}var xs=WS(!0),JS=WS(!1),ci=!1;function Py(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ty(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function di(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function fi(a,s,u){var h=a.updateQueue;if(h===null)return null;if(h=h.shared,(Ke&2)!==0){var g=h.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),h.pending=s,s=Vd(a),IS(a,null,u),s}return Yd(a,h,s,u),Vd(a)}function Mu(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var h=s.lanes;h&=a.pendingLanes,u|=h,s.lanes=u,Fw(a,u)}}function Cy(a,s){var u=a.updateQueue,h=a.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var g=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var _={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?g=b=_:b=b.next=_,u=u.next}while(u!==null);b===null?g=b=s:b=b.next=s}else g=b=s;u={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:b,shared:h.shared,callbacks:h.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var My=!1;function Ru(){if(My){var a=qo;if(a!==null)throw a}}function Du(a,s,u,h){My=!1;var g=a.updateQueue;ci=!1;var b=g.firstBaseUpdate,_=g.lastBaseUpdate,C=g.shared.pending;if(C!==null){g.shared.pending=null;var $=C,Y=$.next;$.next=null,_===null?b=Y:_.next=Y,_=$;var re=a.alternate;re!==null&&(re=re.updateQueue,C=re.lastBaseUpdate,C!==_&&(C===null?re.firstBaseUpdate=Y:C.next=Y,re.lastBaseUpdate=$))}if(b!==null){var ie=g.baseState;_=0,re=Y=$=null,C=b;do{var X=C.lane&-536870913,J=X!==C.lane;if(J?(ke&X)===X:(h&X)===X){X!==0&&X===Uo&&(My=!0),re!==null&&(re=re.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var me=a,je=C;X=s;var et=u;switch(je.tag){case 1:if(me=je.payload,typeof me=="function"){ie=me.call(et,ie,X);break e}ie=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=je.payload,X=typeof me=="function"?me.call(et,ie,X):me,X==null)break e;ie=y({},ie,X);break e;case 2:ci=!0}}X=C.callback,X!==null&&(a.flags|=64,J&&(a.flags|=8192),J=g.callbacks,J===null?g.callbacks=[X]:J.push(X))}else J={lane:X,tag:C.tag,payload:C.payload,callback:C.callback,next:null},re===null?(Y=re=J,$=ie):re=re.next=J,_|=X;if(C=C.next,C===null){if(C=g.shared.pending,C===null)break;J=C,C=J.next,J.next=null,g.lastBaseUpdate=J,g.shared.pending=null}}while(!0);re===null&&($=ie),g.baseState=$,g.firstBaseUpdate=Y,g.lastBaseUpdate=re,b===null&&(g.shared.lanes=0),vi|=_,a.lanes=_,a.memoizedState=ie}}function e1(a,s){if(typeof a!="function")throw Error(n(191,a));a.call(s)}function t1(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)e1(u[a],s)}var Ko=L(null),af=L(0);function r1(a,s){a=Aa,le(af,a),le(Ko,s),Aa=a|s.baseLanes}function Ry(){le(af,Aa),le(Ko,Ko.current)}function Dy(){Aa=af.current,W(Ko),W(af)}var Gr=L(null),hn=null;function hi(a){var s=a.alternate;le(wt,wt.current&1),le(Gr,a),hn===null&&(s===null||Ko.current!==null||s.memoizedState!==null)&&(hn=a)}function ky(a){le(wt,wt.current),le(Gr,a),hn===null&&(hn=a)}function n1(a){a.tag===22?(le(wt,wt.current),le(Gr,a),hn===null&&(hn=a)):mi()}function mi(){le(wt,wt.current),le(Gr,Gr.current)}function Yr(a){W(Gr),hn===a&&(hn=null),W(wt)}var wt=L(0);function sf(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Uv(u)||qv(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ba=0,Ee=null,We=null,Tt=null,of=!1,Go=!1,bs=!1,lf=0,ku=0,Yo=null,MI=0;function yt(){throw Error(n(321))}function Iy(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Fr(a[u],s[u]))return!1;return!0}function Ly(a,s,u,h,g,b){return ba=b,Ee=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=a===null||a.memoizedState===null?B1:Wy,bs=!1,b=u(h,g),bs=!1,Go&&(b=i1(s,u,h,g)),a1(a),b}function a1(a){B.H=$u;var s=We!==null&&We.next!==null;if(ba=0,Tt=We=Ee=null,of=!1,ku=0,Yo=null,s)throw Error(n(300));a===null||Ct||(a=a.dependencies,a!==null&&Zd(a)&&(Ct=!0))}function i1(a,s,u,h){Ee=a;var g=0;do{if(Go&&(Yo=null),ku=0,Go=!1,25<=g)throw Error(n(301));if(g+=1,Tt=We=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}B.H=U1,b=s(u,h)}while(Go);return b}function RI(){var a=B.H,s=a.useState()[0];return s=typeof s.then=="function"?Iu(s):s,a=a.useState()[0],(We!==null?We.memoizedState:null)!==a&&(Ee.flags|=1024),s}function $y(){var a=lf!==0;return lf=0,a}function zy(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function By(a){if(of){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}of=!1}ba=0,Tt=We=Ee=null,Go=!1,ku=lf=0,Yo=null}function gr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Ee.memoizedState=Tt=a:Tt=Tt.next=a,Tt}function St(){if(We===null){var a=Ee.alternate;a=a!==null?a.memoizedState:null}else a=We.next;var s=Tt===null?Ee.memoizedState:Tt.next;if(s!==null)Tt=s,We=a;else{if(a===null)throw Ee.alternate===null?Error(n(467)):Error(n(310));We=a,a={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Tt===null?Ee.memoizedState=Tt=a:Tt=Tt.next=a}return Tt}function uf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Iu(a){var s=ku;return ku+=1,Yo===null&&(Yo=[]),a=QS(Yo,a,s),s=Ee,(Tt===null?s.memoizedState:Tt.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?B1:Wy),a}function cf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Iu(a);if(a.$$typeof===E)return Jt(a)}throw Error(n(438,String(a)))}function Uy(a){var s=null,u=Ee.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var h=Ee.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(g){return g.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=uf(),Ee.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),h=0;h<a;h++)u[h]=k;return s.index++,u}function ja(a,s){return typeof s=="function"?s(a):s}function df(a){var s=St();return qy(s,We,a)}function qy(a,s,u){var h=a.queue;if(h===null)throw Error(n(311));h.lastRenderedReducer=u;var g=a.baseQueue,b=h.pending;if(b!==null){if(g!==null){var _=g.next;g.next=b.next,b.next=_}s.baseQueue=g=b,h.pending=null}if(b=a.baseState,g===null)a.memoizedState=b;else{s=g.next;var C=_=null,$=null,Y=s,re=!1;do{var ie=Y.lane&-536870913;if(ie!==Y.lane?(ke&ie)===ie:(ba&ie)===ie){var X=Y.revertLane;if(X===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),ie===Uo&&(re=!0);else if((ba&X)===X){Y=Y.next,X===Uo&&(re=!0);continue}else ie={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},$===null?(C=$=ie,_=b):$=$.next=ie,Ee.lanes|=X,vi|=X;ie=Y.action,bs&&u(b,ie),b=Y.hasEagerState?Y.eagerState:u(b,ie)}else X={lane:ie,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},$===null?(C=$=X,_=b):$=$.next=X,Ee.lanes|=ie,vi|=ie;Y=Y.next}while(Y!==null&&Y!==s);if($===null?_=b:$.next=C,!Fr(b,a.memoizedState)&&(Ct=!0,re&&(u=qo,u!==null)))throw u;a.memoizedState=b,a.baseState=_,a.baseQueue=$,h.lastRenderedState=b}return g===null&&(h.lanes=0),[a.memoizedState,h.dispatch]}function Hy(a){var s=St(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=a;var h=u.dispatch,g=u.pending,b=s.memoizedState;if(g!==null){u.pending=null;var _=g=g.next;do b=a(b,_.action),_=_.next;while(_!==g);Fr(b,s.memoizedState)||(Ct=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),u.lastRenderedState=b}return[b,h]}function s1(a,s,u){var h=Ee,g=St(),b=Le;if(b){if(u===void 0)throw Error(n(407));u=u()}else u=s();var _=!Fr((We||g).memoizedState,u);if(_&&(g.memoizedState=u,Ct=!0),g=g.queue,Gy(u1.bind(null,h,g,a),[a]),g.getSnapshot!==s||_||Tt!==null&&Tt.memoizedState.tag&1){if(h.flags|=2048,Vo(9,{destroy:void 0},l1.bind(null,h,g,u,s),null),rt===null)throw Error(n(349));b||(ba&127)!==0||o1(h,s,u)}return u}function o1(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ee.updateQueue,s===null?(s=uf(),Ee.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function l1(a,s,u,h){s.value=u,s.getSnapshot=h,c1(s)&&d1(a)}function u1(a,s,u){return u(function(){c1(s)&&d1(a)})}function c1(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Fr(a,u)}catch{return!0}}function d1(a){var s=ds(a,2);s!==null&&Dr(s,a,2)}function Fy(a){var s=gr();if(typeof a=="function"){var u=a;if(a=u(),bs){ni(!0);try{u()}finally{ni(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:a},s}function f1(a,s,u,h){return a.baseState=u,qy(a,We,typeof h=="function"?h:ja)}function DI(a,s,u,h,g){if(mf(a))throw Error(n(485));if(a=s.action,a!==null){var b={payload:g,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){b.listeners.push(_)}};B.T!==null?u(!0):b.isTransition=!1,h(b),u=s.pending,u===null?(b.next=s.pending=b,h1(s,b)):(b.next=u.next,s.pending=u.next=b)}}function h1(a,s){var u=s.action,h=s.payload,g=a.state;if(s.isTransition){var b=B.T,_={};B.T=_;try{var C=u(g,h),$=B.S;$!==null&&$(_,C),m1(a,s,C)}catch(Y){Ky(a,s,Y)}finally{b!==null&&_.types!==null&&(b.types=_.types),B.T=b}}else try{b=u(g,h),m1(a,s,b)}catch(Y){Ky(a,s,Y)}}function m1(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){p1(a,s,h)},function(h){return Ky(a,s,h)}):p1(a,s,u)}function p1(a,s,u){s.status="fulfilled",s.value=u,y1(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,h1(a,u)))}function Ky(a,s,u){var h=a.pending;if(a.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=u,y1(s),s=s.next;while(s!==h)}a.action=null}function y1(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function v1(a,s){return s}function g1(a,s){if(Le){var u=rt.formState;if(u!==null){e:{var h=Ee;if(Le){if(it){t:{for(var g=it,b=fn;g.nodeType!==8;){if(!b){g=null;break t}if(g=mn(g.nextSibling),g===null){g=null;break t}}b=g.data,g=b==="F!"||b==="F"?g:null}if(g){it=mn(g.nextSibling),h=g.data==="F!";break e}}li(h)}h=!1}h&&(s=u[0])}}return u=gr(),u.memoizedState=u.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:v1,lastRenderedState:s},u.queue=h,u=L1.bind(null,Ee,h),h.dispatch=u,h=Fy(!1),b=Zy.bind(null,Ee,!1,h.queue),h=gr(),g={state:s,dispatch:null,action:a,pending:null},h.queue=g,u=DI.bind(null,Ee,g,b,u),g.dispatch=u,h.memoizedState=a,[s,u,!1]}function x1(a){var s=St();return b1(s,We,a)}function b1(a,s,u){if(s=qy(a,s,v1)[0],a=df(ja)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=Iu(s)}catch(_){throw _===Ho?ef:_}else h=s;s=St();var g=s.queue,b=g.dispatch;return u!==s.memoizedState&&(Ee.flags|=2048,Vo(9,{destroy:void 0},kI.bind(null,g,u),null)),[h,b,a]}function kI(a,s){a.action=s}function j1(a){var s=St(),u=We;if(u!==null)return b1(s,u,a);St(),s=s.memoizedState,u=St();var h=u.queue.dispatch;return u.memoizedState=a,[s,h,!1]}function Vo(a,s,u,h){return a={tag:a,create:u,deps:h,inst:s,next:null},s=Ee.updateQueue,s===null&&(s=uf(),Ee.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(h=u.next,u.next=a,a.next=h,s.lastEffect=a),a}function w1(){return St().memoizedState}function ff(a,s,u,h){var g=gr();Ee.flags|=a,g.memoizedState=Vo(1|s,{destroy:void 0},u,h===void 0?null:h)}function hf(a,s,u,h){var g=St();h=h===void 0?null:h;var b=g.memoizedState.inst;We!==null&&h!==null&&Iy(h,We.memoizedState.deps)?g.memoizedState=Vo(s,b,u,h):(Ee.flags|=a,g.memoizedState=Vo(1|s,b,u,h))}function S1(a,s){ff(8390656,8,a,s)}function Gy(a,s){hf(2048,8,a,s)}function II(a){Ee.flags|=4;var s=Ee.updateQueue;if(s===null)s=uf(),Ee.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function N1(a){var s=St().memoizedState;return II({ref:s,nextImpl:a}),function(){if((Ke&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function O1(a,s){return hf(4,2,a,s)}function _1(a,s){return hf(4,4,a,s)}function E1(a,s){if(typeof s=="function"){a=a();var u=s(a);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function A1(a,s,u){u=u!=null?u.concat([a]):null,hf(4,4,E1.bind(null,s,a),u)}function Yy(){}function P1(a,s){var u=St();s=s===void 0?null:s;var h=u.memoizedState;return s!==null&&Iy(s,h[1])?h[0]:(u.memoizedState=[a,s],a)}function T1(a,s){var u=St();s=s===void 0?null:s;var h=u.memoizedState;if(s!==null&&Iy(s,h[1]))return h[0];if(h=a(),bs){ni(!0);try{a()}finally{ni(!1)}}return u.memoizedState=[h,s],h}function Vy(a,s,u){return u===void 0||(ba&1073741824)!==0&&(ke&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=CN(),Ee.lanes|=a,vi|=a,u)}function C1(a,s,u,h){return Fr(u,s)?u:Ko.current!==null?(a=Vy(a,u,h),Fr(a,s)||(Ct=!0),a):(ba&42)===0||(ba&1073741824)!==0&&(ke&261930)===0?(Ct=!0,a.memoizedState=u):(a=CN(),Ee.lanes|=a,vi|=a,s)}function M1(a,s,u,h,g){var b=K.p;K.p=b!==0&&8>b?b:8;var _=B.T,C={};B.T=C,Zy(a,!1,s,u);try{var $=g(),Y=B.S;if(Y!==null&&Y(C,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var re=CI($,h);Lu(a,s,re,Xr(a))}else Lu(a,s,h,Xr(a))}catch(ie){Lu(a,s,{then:function(){},status:"rejected",reason:ie},Xr())}finally{K.p=b,_!==null&&C.types!==null&&(_.types=C.types),B.T=_}}function LI(){}function Qy(a,s,u,h){if(a.tag!==5)throw Error(n(476));var g=R1(a).queue;M1(a,g,s,ee,u===null?LI:function(){return D1(a),u(h)})}function R1(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:ee},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function D1(a){var s=R1(a);s.next===null&&(s=a.alternate.memoizedState),Lu(a,s.next.queue,{},Xr())}function Xy(){return Jt(ec)}function k1(){return St().memoizedState}function I1(){return St().memoizedState}function $I(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Xr();a=di(u);var h=fi(s,a,u);h!==null&&(Dr(h,s,u),Mu(h,s,u)),s={cache:Oy()},a.payload=s;return}s=s.return}}function zI(a,s,u){var h=Xr();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},mf(a)?$1(s,u):(u=my(a,s,u,h),u!==null&&(Dr(u,a,h),z1(u,s,h)))}function L1(a,s,u){var h=Xr();Lu(a,s,u,h)}function Lu(a,s,u,h){var g={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(mf(a))$1(s,g);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var _=s.lastRenderedState,C=b(_,u);if(g.hasEagerState=!0,g.eagerState=C,Fr(C,_))return Yd(a,s,g,0),rt===null&&Gd(),!1}catch{}finally{}if(u=my(a,s,g,h),u!==null)return Dr(u,a,h),z1(u,s,h),!0}return!1}function Zy(a,s,u,h){if(h={lane:2,revertLane:Pv(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},mf(a)){if(s)throw Error(n(479))}else s=my(a,u,h,2),s!==null&&Dr(s,a,2)}function mf(a){var s=a.alternate;return a===Ee||s!==null&&s===Ee}function $1(a,s){Go=of=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function z1(a,s,u){if((u&4194048)!==0){var h=s.lanes;h&=a.pendingLanes,u|=h,s.lanes=u,Fw(a,u)}}var $u={readContext:Jt,use:cf,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};$u.useEffectEvent=yt;var B1={readContext:Jt,use:cf,useCallback:function(a,s){return gr().memoizedState=[a,s===void 0?null:s],a},useContext:Jt,useEffect:S1,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,ff(4194308,4,E1.bind(null,s,a),u)},useLayoutEffect:function(a,s){return ff(4194308,4,a,s)},useInsertionEffect:function(a,s){ff(4,2,a,s)},useMemo:function(a,s){var u=gr();s=s===void 0?null:s;var h=a();if(bs){ni(!0);try{a()}finally{ni(!1)}}return u.memoizedState=[h,s],h},useReducer:function(a,s,u){var h=gr();if(u!==void 0){var g=u(s);if(bs){ni(!0);try{u(s)}finally{ni(!1)}}}else g=s;return h.memoizedState=h.baseState=g,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:g},h.queue=a,a=a.dispatch=zI.bind(null,Ee,a),[h.memoizedState,a]},useRef:function(a){var s=gr();return a={current:a},s.memoizedState=a},useState:function(a){a=Fy(a);var s=a.queue,u=L1.bind(null,Ee,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:Yy,useDeferredValue:function(a,s){var u=gr();return Vy(u,a,s)},useTransition:function(){var a=Fy(!1);return a=M1.bind(null,Ee,a.queue,!0,!1),gr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var h=Ee,g=gr();if(Le){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),rt===null)throw Error(n(349));(ke&127)!==0||o1(h,s,u)}g.memoizedState=u;var b={value:u,getSnapshot:s};return g.queue=b,S1(u1.bind(null,h,b,a),[a]),h.flags|=2048,Vo(9,{destroy:void 0},l1.bind(null,h,b,u,s),null),u},useId:function(){var a=gr(),s=rt.identifierPrefix;if(Le){var u=Fn,h=Hn;u=(h&~(1<<32-Hr(h)-1)).toString(32)+u,s="_"+s+"R_"+u,u=lf++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=MI++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Xy,useFormState:g1,useActionState:g1,useOptimistic:function(a){var s=gr();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=Zy.bind(null,Ee,!0,u),u.dispatch=s,[a,s]},useMemoCache:Uy,useCacheRefresh:function(){return gr().memoizedState=$I.bind(null,Ee)},useEffectEvent:function(a){var s=gr(),u={impl:a};return s.memoizedState=u,function(){if((Ke&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},Wy={readContext:Jt,use:cf,useCallback:P1,useContext:Jt,useEffect:Gy,useImperativeHandle:A1,useInsertionEffect:O1,useLayoutEffect:_1,useMemo:T1,useReducer:df,useRef:w1,useState:function(){return df(ja)},useDebugValue:Yy,useDeferredValue:function(a,s){var u=St();return C1(u,We.memoizedState,a,s)},useTransition:function(){var a=df(ja)[0],s=St().memoizedState;return[typeof a=="boolean"?a:Iu(a),s]},useSyncExternalStore:s1,useId:k1,useHostTransitionStatus:Xy,useFormState:x1,useActionState:x1,useOptimistic:function(a,s){var u=St();return f1(u,We,a,s)},useMemoCache:Uy,useCacheRefresh:I1};Wy.useEffectEvent=N1;var U1={readContext:Jt,use:cf,useCallback:P1,useContext:Jt,useEffect:Gy,useImperativeHandle:A1,useInsertionEffect:O1,useLayoutEffect:_1,useMemo:T1,useReducer:Hy,useRef:w1,useState:function(){return Hy(ja)},useDebugValue:Yy,useDeferredValue:function(a,s){var u=St();return We===null?Vy(u,a,s):C1(u,We.memoizedState,a,s)},useTransition:function(){var a=Hy(ja)[0],s=St().memoizedState;return[typeof a=="boolean"?a:Iu(a),s]},useSyncExternalStore:s1,useId:k1,useHostTransitionStatus:Xy,useFormState:j1,useActionState:j1,useOptimistic:function(a,s){var u=St();return We!==null?f1(u,We,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Uy,useCacheRefresh:I1};U1.useEffectEvent=N1;function Jy(a,s,u,h){s=a.memoizedState,u=u(h,s),u=u==null?s:y({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var ev={enqueueSetState:function(a,s,u){a=a._reactInternals;var h=Xr(),g=di(h);g.payload=s,u!=null&&(g.callback=u),s=fi(a,g,h),s!==null&&(Dr(s,a,h),Mu(s,a,h))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var h=Xr(),g=di(h);g.tag=1,g.payload=s,u!=null&&(g.callback=u),s=fi(a,g,h),s!==null&&(Dr(s,a,h),Mu(s,a,h))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Xr(),h=di(u);h.tag=2,s!=null&&(h.callback=s),s=fi(a,h,u),s!==null&&(Dr(s,a,u),Mu(s,a,u))}};function q1(a,s,u,h,g,b,_){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(h,b,_):s.prototype&&s.prototype.isPureReactComponent?!Nu(u,h)||!Nu(g,b):!0}function H1(a,s,u,h){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,h),s.state!==a&&ev.enqueueReplaceState(s,s.state,null)}function js(a,s){var u=s;if("ref"in s){u={};for(var h in s)h!=="ref"&&(u[h]=s[h])}if(a=a.defaultProps){u===s&&(u=y({},u));for(var g in a)u[g]===void 0&&(u[g]=a[g])}return u}function F1(a){Kd(a)}function K1(a){console.error(a)}function G1(a){Kd(a)}function pf(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function Y1(a,s,u){try{var h=a.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function tv(a,s,u){return u=di(u),u.tag=3,u.payload={element:null},u.callback=function(){pf(a,s)},u}function V1(a){return a=di(a),a.tag=3,a}function Q1(a,s,u,h){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var b=h.value;a.payload=function(){return g(b)},a.callback=function(){Y1(s,u,h)}}var _=u.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(a.callback=function(){Y1(s,u,h),typeof g!="function"&&(gi===null?gi=new Set([this]):gi.add(this));var C=h.stack;this.componentDidCatch(h.value,{componentStack:C!==null?C:""})})}function BI(a,s,u,h,g){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=u.alternate,s!==null&&Bo(s,u,g,!0),u=Gr.current,u!==null){switch(u.tag){case 31:case 13:return hn===null?Ef():u.alternate===null&&vt===0&&(vt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,h===tf?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([h]):s.add(h),_v(a,h,g)),!1;case 22:return u.flags|=65536,h===tf?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([h]):u.add(h)),_v(a,h,g)),!1}throw Error(n(435,u.tag))}return _v(a,h,g),Ef(),!1}if(Le)return s=Gr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=g,h!==by&&(a=Error(n(422),{cause:h}),Eu(un(a,u)))):(h!==by&&(s=Error(n(423),{cause:h}),Eu(un(s,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,h=un(h,u),g=tv(a.stateNode,h,g),Cy(a,g),vt!==4&&(vt=2)),!1;var b=Error(n(520),{cause:h});if(b=un(b,u),Gu===null?Gu=[b]:Gu.push(b),vt!==4&&(vt=2),s===null)return!0;h=un(h,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=tv(u.stateNode,h,a),Cy(u,a),!1;case 1:if(s=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(gi===null||!gi.has(b))))return u.flags|=65536,g&=-g,u.lanes|=g,g=V1(g),Q1(g,a,u,h),Cy(u,g),!1}u=u.return}while(u!==null);return!1}var rv=Error(n(461)),Ct=!1;function er(a,s,u,h){s.child=a===null?JS(s,null,u,h):xs(s,a.child,u,h)}function X1(a,s,u,h,g){u=u.render;var b=s.ref;if("ref"in h){var _={};for(var C in h)C!=="ref"&&(_[C]=h[C])}else _=h;return ps(s),h=Ly(a,s,u,_,b,g),C=$y(),a!==null&&!Ct?(zy(a,s,g),wa(a,s,g)):(Le&&C&&gy(s),s.flags|=1,er(a,s,h,g),s.child)}function Z1(a,s,u,h,g){if(a===null){var b=u.type;return typeof b=="function"&&!py(b)&&b.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=b,W1(a,s,b,h,g)):(a=Qd(u.type,null,h,s,s.mode,g),a.ref=s.ref,a.return=s,s.child=a)}if(b=a.child,!cv(a,g)){var _=b.memoizedProps;if(u=u.compare,u=u!==null?u:Nu,u(_,h)&&a.ref===s.ref)return wa(a,s,g)}return s.flags|=1,a=ya(b,h),a.ref=s.ref,a.return=s,s.child=a}function W1(a,s,u,h,g){if(a!==null){var b=a.memoizedProps;if(Nu(b,h)&&a.ref===s.ref)if(Ct=!1,s.pendingProps=h=b,cv(a,g))(a.flags&131072)!==0&&(Ct=!0);else return s.lanes=a.lanes,wa(a,s,g)}return nv(a,s,u,h,g)}function J1(a,s,u,h){var g=h.children,b=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,a!==null){for(h=s.child=a.child,g=0;h!==null;)g=g|h.lanes|h.childLanes,h=h.sibling;h=g&~b}else h=0,s.child=null;return eN(a,s,b,u,h)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Jd(s,b!==null?b.cachePool:null),b!==null?r1(s,b):Ry(),n1(s);else return h=s.lanes=536870912,eN(a,s,b!==null?b.baseLanes|u:u,u,h)}else b!==null?(Jd(s,b.cachePool),r1(s,b),mi(),s.memoizedState=null):(a!==null&&Jd(s,null),Ry(),mi());return er(a,s,g,u),s.child}function zu(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function eN(a,s,u,h,g){var b=Ey();return b=b===null?null:{parent:Pt._currentValue,pool:b},s.memoizedState={baseLanes:u,cachePool:b},a!==null&&Jd(s,null),Ry(),n1(s),a!==null&&Bo(a,s,h,!0),s.childLanes=g,null}function yf(a,s){return s=gf({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function tN(a,s,u){return xs(s,a.child,null,u),a=yf(s,s.pendingProps),a.flags|=2,Yr(s),s.memoizedState=null,a}function UI(a,s,u){var h=s.pendingProps,g=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Le){if(h.mode==="hidden")return a=yf(s,h),s.lanes=536870912,zu(null,a);if(ky(s),(a=it)?(a=hO(a,fn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:si!==null?{id:Hn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},u=$S(a),u.return=s,s.child=u,Wt=s,it=null)):a=null,a===null)throw li(s);return s.lanes=536870912,null}return yf(s,h)}var b=a.memoizedState;if(b!==null){var _=b.dehydrated;if(ky(s),g)if(s.flags&256)s.flags&=-257,s=tN(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(n(558));else if(Ct||Bo(a,s,u,!1),g=(u&a.childLanes)!==0,Ct||g){if(h=rt,h!==null&&(_=Kw(h,u),_!==0&&_!==b.retryLane))throw b.retryLane=_,ds(a,_),Dr(h,a,_),rv;Ef(),s=tN(a,s,u)}else a=b.treeContext,it=mn(_.nextSibling),Wt=s,Le=!0,oi=null,fn=!1,a!==null&&US(s,a),s=yf(s,h),s.flags|=4096;return s}return a=ya(a.child,{mode:h.mode,children:h.children}),a.ref=s.ref,s.child=a,a.return=s,a}function vf(a,s){var u=s.ref;if(u===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(n(284));(a===null||a.ref!==u)&&(s.flags|=4194816)}}function nv(a,s,u,h,g){return ps(s),u=Ly(a,s,u,h,void 0,g),h=$y(),a!==null&&!Ct?(zy(a,s,g),wa(a,s,g)):(Le&&h&&gy(s),s.flags|=1,er(a,s,u,g),s.child)}function rN(a,s,u,h,g,b){return ps(s),s.updateQueue=null,u=i1(s,h,u,g),a1(a),h=$y(),a!==null&&!Ct?(zy(a,s,b),wa(a,s,b)):(Le&&h&&gy(s),s.flags|=1,er(a,s,u,b),s.child)}function nN(a,s,u,h,g){if(ps(s),s.stateNode===null){var b=Io,_=u.contextType;typeof _=="object"&&_!==null&&(b=Jt(_)),b=new u(h,b),s.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=ev,s.stateNode=b,b._reactInternals=s,b=s.stateNode,b.props=h,b.state=s.memoizedState,b.refs={},Py(s),_=u.contextType,b.context=typeof _=="object"&&_!==null?Jt(_):Io,b.state=s.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(Jy(s,u,_,h),b.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(_=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),_!==b.state&&ev.enqueueReplaceState(b,b.state,null),Du(s,h,b,g),Ru(),b.state=s.memoizedState),typeof b.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(a===null){b=s.stateNode;var C=s.memoizedProps,$=js(u,C);b.props=$;var Y=b.context,re=u.contextType;_=Io,typeof re=="object"&&re!==null&&(_=Jt(re));var ie=u.getDerivedStateFromProps;re=typeof ie=="function"||typeof b.getSnapshotBeforeUpdate=="function",C=s.pendingProps!==C,re||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C||Y!==_)&&H1(s,b,h,_),ci=!1;var X=s.memoizedState;b.state=X,Du(s,h,b,g),Ru(),Y=s.memoizedState,C||X!==Y||ci?(typeof ie=="function"&&(Jy(s,u,ie,h),Y=s.memoizedState),($=ci||q1(s,u,$,h,X,Y,_))?(re||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(s.flags|=4194308)):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=Y),b.props=h,b.state=Y,b.context=_,h=$):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{b=s.stateNode,Ty(a,s),_=s.memoizedProps,re=js(u,_),b.props=re,ie=s.pendingProps,X=b.context,Y=u.contextType,$=Io,typeof Y=="object"&&Y!==null&&($=Jt(Y)),C=u.getDerivedStateFromProps,(Y=typeof C=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_!==ie||X!==$)&&H1(s,b,h,$),ci=!1,X=s.memoizedState,b.state=X,Du(s,h,b,g),Ru();var J=s.memoizedState;_!==ie||X!==J||ci||a!==null&&a.dependencies!==null&&Zd(a.dependencies)?(typeof C=="function"&&(Jy(s,u,C,h),J=s.memoizedState),(re=ci||q1(s,u,re,h,X,J,$)||a!==null&&a.dependencies!==null&&Zd(a.dependencies))?(Y||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(h,J,$),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(h,J,$)),typeof b.componentDidUpdate=="function"&&(s.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof b.componentDidUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=J),b.props=h,b.state=J,b.context=$,h=re):(typeof b.componentDidUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=1024),h=!1)}return b=h,vf(a,s),h=(s.flags&128)!==0,b||h?(b=s.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:b.render(),s.flags|=1,a!==null&&h?(s.child=xs(s,a.child,null,g),s.child=xs(s,null,u,g)):er(a,s,u,g),s.memoizedState=b.state,a=s.child):a=wa(a,s,g),a}function aN(a,s,u,h){return hs(),s.flags|=256,er(a,s,u,h),s.child}var av={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function iv(a){return{baseLanes:a,cachePool:YS()}}function sv(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Qr),a}function iN(a,s,u){var h=s.pendingProps,g=!1,b=(s.flags&128)!==0,_;if((_=b)||(_=a!==null&&a.memoizedState===null?!1:(wt.current&2)!==0),_&&(g=!0,s.flags&=-129),_=(s.flags&32)!==0,s.flags&=-33,a===null){if(Le){if(g?hi(s):mi(),(a=it)?(a=hO(a,fn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:si!==null?{id:Hn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},u=$S(a),u.return=s,s.child=u,Wt=s,it=null)):a=null,a===null)throw li(s);return qv(a)?s.lanes=32:s.lanes=536870912,null}var C=h.children;return h=h.fallback,g?(mi(),g=s.mode,C=gf({mode:"hidden",children:C},g),h=fs(h,g,u,null),C.return=s,h.return=s,C.sibling=h,s.child=C,h=s.child,h.memoizedState=iv(u),h.childLanes=sv(a,_,u),s.memoizedState=av,zu(null,h)):(hi(s),ov(s,C))}var $=a.memoizedState;if($!==null&&(C=$.dehydrated,C!==null)){if(b)s.flags&256?(hi(s),s.flags&=-257,s=lv(a,s,u)):s.memoizedState!==null?(mi(),s.child=a.child,s.flags|=128,s=null):(mi(),C=h.fallback,g=s.mode,h=gf({mode:"visible",children:h.children},g),C=fs(C,g,u,null),C.flags|=2,h.return=s,C.return=s,h.sibling=C,s.child=h,xs(s,a.child,null,u),h=s.child,h.memoizedState=iv(u),h.childLanes=sv(a,_,u),s.memoizedState=av,s=zu(null,h));else if(hi(s),qv(C)){if(_=C.nextSibling&&C.nextSibling.dataset,_)var Y=_.dgst;_=Y,h=Error(n(419)),h.stack="",h.digest=_,Eu({value:h,source:null,stack:null}),s=lv(a,s,u)}else if(Ct||Bo(a,s,u,!1),_=(u&a.childLanes)!==0,Ct||_){if(_=rt,_!==null&&(h=Kw(_,u),h!==0&&h!==$.retryLane))throw $.retryLane=h,ds(a,h),Dr(_,a,h),rv;Uv(C)||Ef(),s=lv(a,s,u)}else Uv(C)?(s.flags|=192,s.child=a.child,s=null):(a=$.treeContext,it=mn(C.nextSibling),Wt=s,Le=!0,oi=null,fn=!1,a!==null&&US(s,a),s=ov(s,h.children),s.flags|=4096);return s}return g?(mi(),C=h.fallback,g=s.mode,$=a.child,Y=$.sibling,h=ya($,{mode:"hidden",children:h.children}),h.subtreeFlags=$.subtreeFlags&65011712,Y!==null?C=ya(Y,C):(C=fs(C,g,u,null),C.flags|=2),C.return=s,h.return=s,h.sibling=C,s.child=h,zu(null,h),h=s.child,C=a.child.memoizedState,C===null?C=iv(u):(g=C.cachePool,g!==null?($=Pt._currentValue,g=g.parent!==$?{parent:$,pool:$}:g):g=YS(),C={baseLanes:C.baseLanes|u,cachePool:g}),h.memoizedState=C,h.childLanes=sv(a,_,u),s.memoizedState=av,zu(a.child,h)):(hi(s),u=a.child,a=u.sibling,u=ya(u,{mode:"visible",children:h.children}),u.return=s,u.sibling=null,a!==null&&(_=s.deletions,_===null?(s.deletions=[a],s.flags|=16):_.push(a)),s.child=u,s.memoizedState=null,u)}function ov(a,s){return s=gf({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function gf(a,s){return a=Kr(22,a,null,s),a.lanes=0,a}function lv(a,s,u){return xs(s,a.child,null,u),a=ov(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function sN(a,s,u){a.lanes|=s;var h=a.alternate;h!==null&&(h.lanes|=s),Sy(a.return,s,u)}function uv(a,s,u,h,g,b){var _=a.memoizedState;_===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:g,treeForkCount:b}:(_.isBackwards=s,_.rendering=null,_.renderingStartTime=0,_.last=h,_.tail=u,_.tailMode=g,_.treeForkCount=b)}function oN(a,s,u){var h=s.pendingProps,g=h.revealOrder,b=h.tail;h=h.children;var _=wt.current,C=(_&2)!==0;if(C?(_=_&1|2,s.flags|=128):_&=1,le(wt,_),er(a,s,h,u),h=Le?_u:0,!C&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&sN(a,u,s);else if(a.tag===19)sN(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(g){case"forwards":for(u=s.child,g=null;u!==null;)a=u.alternate,a!==null&&sf(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),uv(s,!1,g,u,b,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(a=g.alternate,a!==null&&sf(a)===null){s.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}uv(s,!0,u,null,b,h);break;case"together":uv(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function wa(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),vi|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(Bo(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(n(153));if(s.child!==null){for(a=s.child,u=ya(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=ya(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function cv(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&Zd(a)))}function qI(a,s,u){switch(s.tag){case 3:Ce(s,s.stateNode.containerInfo),ui(s,Pt,a.memoizedState.cache),hs();break;case 27:case 5:te(s);break;case 4:Ce(s,s.stateNode.containerInfo);break;case 10:ui(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,ky(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(hi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?iN(a,s,u):(hi(s),a=wa(a,s,u),a!==null?a.sibling:null);hi(s);break;case 19:var g=(a.flags&128)!==0;if(h=(u&s.childLanes)!==0,h||(Bo(a,s,u,!1),h=(u&s.childLanes)!==0),g){if(h)return oN(a,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),le(wt,wt.current),h)break;return null;case 22:return s.lanes=0,J1(a,s,u,s.pendingProps);case 24:ui(s,Pt,a.memoizedState.cache)}return wa(a,s,u)}function lN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Ct=!0;else{if(!cv(a,u)&&(s.flags&128)===0)return Ct=!1,qI(a,s,u);Ct=(a.flags&131072)!==0}else Ct=!1,Le&&(s.flags&1048576)!==0&&BS(s,_u,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(a=vs(s.elementType),s.type=a,typeof a=="function")py(a)?(h=js(a,h),s.tag=1,s=nN(null,s,a,h,u)):(s.tag=0,s=nv(null,s,a,h,u));else{if(a!=null){var g=a.$$typeof;if(g===A){s.tag=11,s=X1(null,s,a,h,u);break e}else if(g===R){s.tag=14,s=Z1(null,s,a,h,u);break e}}throw s=Q(a)||a,Error(n(306,s,""))}}return s;case 0:return nv(a,s,s.type,s.pendingProps,u);case 1:return h=s.type,g=js(h,s.pendingProps),nN(a,s,h,g,u);case 3:e:{if(Ce(s,s.stateNode.containerInfo),a===null)throw Error(n(387));h=s.pendingProps;var b=s.memoizedState;g=b.element,Ty(a,s),Du(s,h,null,u);var _=s.memoizedState;if(h=_.cache,ui(s,Pt,h),h!==b.cache&&Ny(s,[Pt],u,!0),Ru(),h=_.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:_.cache},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){s=aN(a,s,h,u);break e}else if(h!==g){g=un(Error(n(424)),s),Eu(g),s=aN(a,s,h,u);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(it=mn(a.firstChild),Wt=s,Le=!0,oi=null,fn=!0,u=JS(s,null,h,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(hs(),h===g){s=wa(a,s,u);break e}er(a,s,h,u)}s=s.child}return s;case 26:return vf(a,s),a===null?(u=xO(s.type,null,s.pendingProps,null))?s.memoizedState=u:Le||(u=s.type,a=s.pendingProps,h=Df(Se.current).createElement(u),h[Zt]=s,h[Ar]=a,tr(h,u,a),Ut(h),s.stateNode=h):s.memoizedState=xO(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return te(s),a===null&&Le&&(h=s.stateNode=yO(s.type,s.pendingProps,Se.current),Wt=s,fn=!0,g=it,wi(s.type)?(Hv=g,it=mn(h.firstChild)):it=g),er(a,s,s.pendingProps.children,u),vf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Le&&((g=h=it)&&(h=gL(h,s.type,s.pendingProps,fn),h!==null?(s.stateNode=h,Wt=s,it=mn(h.firstChild),fn=!1,g=!0):g=!1),g||li(s)),te(s),g=s.type,b=s.pendingProps,_=a!==null?a.memoizedProps:null,h=b.children,$v(g,b)?h=null:_!==null&&$v(g,_)&&(s.flags|=32),s.memoizedState!==null&&(g=Ly(a,s,RI,null,null,u),ec._currentValue=g),vf(a,s),er(a,s,h,u),s.child;case 6:return a===null&&Le&&((a=u=it)&&(u=xL(u,s.pendingProps,fn),u!==null?(s.stateNode=u,Wt=s,it=null,a=!0):a=!1),a||li(s)),null;case 13:return iN(a,s,u);case 4:return Ce(s,s.stateNode.containerInfo),h=s.pendingProps,a===null?s.child=xs(s,null,h,u):er(a,s,h,u),s.child;case 11:return X1(a,s,s.type,s.pendingProps,u);case 7:return er(a,s,s.pendingProps,u),s.child;case 8:return er(a,s,s.pendingProps.children,u),s.child;case 12:return er(a,s,s.pendingProps.children,u),s.child;case 10:return h=s.pendingProps,ui(s,s.type,h.value),er(a,s,h.children,u),s.child;case 9:return g=s.type._context,h=s.pendingProps.children,ps(s),g=Jt(g),h=h(g),s.flags|=1,er(a,s,h,u),s.child;case 14:return Z1(a,s,s.type,s.pendingProps,u);case 15:return W1(a,s,s.type,s.pendingProps,u);case 19:return oN(a,s,u);case 31:return UI(a,s,u);case 22:return J1(a,s,u,s.pendingProps);case 24:return ps(s),h=Jt(Pt),a===null?(g=Ey(),g===null&&(g=rt,b=Oy(),g.pooledCache=b,b.refCount++,b!==null&&(g.pooledCacheLanes|=u),g=b),s.memoizedState={parent:h,cache:g},Py(s),ui(s,Pt,g)):((a.lanes&u)!==0&&(Ty(a,s),Du(s,null,null,u),Ru()),g=a.memoizedState,b=s.memoizedState,g.parent!==h?(g={parent:h,cache:h},s.memoizedState=g,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=g),ui(s,Pt,h)):(h=b.cache,ui(s,Pt,h),h!==g.cache&&Ny(s,[Pt],u,!0))),er(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(n(156,s.tag))}function Sa(a){a.flags|=4}function dv(a,s,u,h,g){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(g&335544128)===g)if(a.stateNode.complete)a.flags|=8192;else if(kN())a.flags|=8192;else throw gs=tf,Ay}else a.flags&=-16777217}function uN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!NO(s))if(kN())a.flags|=8192;else throw gs=tf,Ay}function xf(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?qw():536870912,a.lanes|=s,Wo|=s)}function Bu(a,s){if(!Le)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:h.sibling=null}}function st(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,h=0;if(s)for(var g=a.child;g!==null;)u|=g.lanes|g.childLanes,h|=g.subtreeFlags&65011712,h|=g.flags&65011712,g.return=a,g=g.sibling;else for(g=a.child;g!==null;)u|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=a,g=g.sibling;return a.subtreeFlags|=h,a.childLanes=u,s}function HI(a,s,u){var h=s.pendingProps;switch(xy(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(s),null;case 1:return st(s),null;case 3:return u=s.stateNode,h=null,a!==null&&(h=a.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),xa(Pt),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(zo(s)?Sa(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,jy())),st(s),null;case 26:var g=s.type,b=s.memoizedState;return a===null?(Sa(s),b!==null?(st(s),uN(s,b)):(st(s),dv(s,g,null,h,u))):b?b!==a.memoizedState?(Sa(s),st(s),uN(s,b)):(st(s),s.flags&=-16777217):(a=a.memoizedProps,a!==h&&Sa(s),st(s),dv(s,g,a,h,u)),null;case 27:if(we(s),u=Se.current,g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==h&&Sa(s);else{if(!h){if(s.stateNode===null)throw Error(n(166));return st(s),null}a=oe.current,zo(s)?qS(s):(a=yO(g,h,u),s.stateNode=a,Sa(s))}return st(s),null;case 5:if(we(s),g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==h&&Sa(s);else{if(!h){if(s.stateNode===null)throw Error(n(166));return st(s),null}if(b=oe.current,zo(s))qS(s);else{var _=Df(Se.current);switch(b){case 1:b=_.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:b=_.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":b=_.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":b=_.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":b=_.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof h.is=="string"?_.createElement("select",{is:h.is}):_.createElement("select"),h.multiple?b.multiple=!0:h.size&&(b.size=h.size);break;default:b=typeof h.is=="string"?_.createElement(g,{is:h.is}):_.createElement(g)}}b[Zt]=s,b[Ar]=h;e:for(_=s.child;_!==null;){if(_.tag===5||_.tag===6)b.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===s)break e;for(;_.sibling===null;){if(_.return===null||_.return===s)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}s.stateNode=b;e:switch(tr(b,g,h),g){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&Sa(s)}}return st(s),dv(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==h&&Sa(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(a=Se.current,zo(s)){if(a=s.stateNode,u=s.memoizedProps,h=null,g=Wt,g!==null)switch(g.tag){case 27:case 5:h=g.memoizedProps}a[Zt]=s,a=!!(a.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||iO(a.nodeValue,u)),a||li(s,!0)}else a=Df(a).createTextNode(h),a[Zt]=s,s.stateNode=a}return st(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(h=zo(s),u!==null){if(a===null){if(!h)throw Error(n(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(557));a[Zt]=s}else hs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),a=!1}else u=jy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Yr(s),s):(Yr(s),null);if((s.flags&128)!==0)throw Error(n(558))}return st(s),null;case 13:if(h=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=zo(s),h!==null&&h.dehydrated!==null){if(a===null){if(!g)throw Error(n(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[Zt]=s}else hs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),g=!1}else g=jy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return s.flags&256?(Yr(s),s):(Yr(s),null)}return Yr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=h!==null,a=a!==null&&a.memoizedState!==null,u&&(h=s.child,g=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(g=h.alternate.memoizedState.cachePool.pool),b=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(b=h.memoizedState.cachePool.pool),b!==g&&(h.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),xf(s,s.updateQueue),st(s),null);case 4:return de(),a===null&&Rv(s.stateNode.containerInfo),st(s),null;case 10:return xa(s.type),st(s),null;case 19:if(W(wt),h=s.memoizedState,h===null)return st(s),null;if(g=(s.flags&128)!==0,b=h.rendering,b===null)if(g)Bu(h,!1);else{if(vt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(b=sf(a),b!==null){for(s.flags|=128,Bu(h,!1),a=b.updateQueue,s.updateQueue=a,xf(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)LS(u,a),u=u.sibling;return le(wt,wt.current&1|2),Le&&va(s,h.treeForkCount),s.child}a=a.sibling}h.tail!==null&&Te()>Nf&&(s.flags|=128,g=!0,Bu(h,!1),s.lanes=4194304)}else{if(!g)if(a=sf(b),a!==null){if(s.flags|=128,g=!0,a=a.updateQueue,s.updateQueue=a,xf(s,a),Bu(h,!0),h.tail===null&&h.tailMode==="hidden"&&!b.alternate&&!Le)return st(s),null}else 2*Te()-h.renderingStartTime>Nf&&u!==536870912&&(s.flags|=128,g=!0,Bu(h,!1),s.lanes=4194304);h.isBackwards?(b.sibling=s.child,s.child=b):(a=h.last,a!==null?a.sibling=b:s.child=b,h.last=b)}return h.tail!==null?(a=h.tail,h.rendering=a,h.tail=a.sibling,h.renderingStartTime=Te(),a.sibling=null,u=wt.current,le(wt,g?u&1|2:u&1),Le&&va(s,h.treeForkCount),a):(st(s),null);case 22:case 23:return Yr(s),Dy(),h=s.memoizedState!==null,a!==null?a.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(u&536870912)!==0&&(s.flags&128)===0&&(st(s),s.subtreeFlags&6&&(s.flags|=8192)):st(s),u=s.updateQueue,u!==null&&xf(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==u&&(s.flags|=2048),a!==null&&W(ys),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),xa(Pt),st(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function FI(a,s){switch(xy(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return xa(Pt),de(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return we(s),null;case 31:if(s.memoizedState!==null){if(Yr(s),s.alternate===null)throw Error(n(340));hs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Yr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(n(340));hs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return W(wt),null;case 4:return de(),null;case 10:return xa(s.type),null;case 22:case 23:return Yr(s),Dy(),a!==null&&W(ys),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return xa(Pt),null;case 25:return null;default:return null}}function cN(a,s){switch(xy(s),s.tag){case 3:xa(Pt),de();break;case 26:case 27:case 5:we(s);break;case 4:de();break;case 31:s.memoizedState!==null&&Yr(s);break;case 13:Yr(s);break;case 19:W(wt);break;case 10:xa(s.type);break;case 22:case 23:Yr(s),Dy(),a!==null&&W(ys);break;case 24:xa(Pt)}}function Uu(a,s){try{var u=s.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var g=h.next;u=g;do{if((u.tag&a)===a){h=void 0;var b=u.create,_=u.inst;h=b(),_.destroy=h}u=u.next}while(u!==g)}}catch(C){Ve(s,s.return,C)}}function pi(a,s,u){try{var h=s.updateQueue,g=h!==null?h.lastEffect:null;if(g!==null){var b=g.next;h=b;do{if((h.tag&a)===a){var _=h.inst,C=_.destroy;if(C!==void 0){_.destroy=void 0,g=s;var $=u,Y=C;try{Y()}catch(re){Ve(g,$,re)}}}h=h.next}while(h!==b)}}catch(re){Ve(s,s.return,re)}}function dN(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{t1(s,u)}catch(h){Ve(a,a.return,h)}}}function fN(a,s,u){u.props=js(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(h){Ve(a,s,h)}}function qu(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var h=a.stateNode;break;case 30:h=a.stateNode;break;default:h=a.stateNode}typeof u=="function"?a.refCleanup=u(h):u.current=h}}catch(g){Ve(a,s,g)}}function Kn(a,s){var u=a.ref,h=a.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(g){Ve(a,s,g)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){Ve(a,s,g)}else u.current=null}function hN(a){var s=a.type,u=a.memoizedProps,h=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(g){Ve(a,a.return,g)}}function fv(a,s,u){try{var h=a.stateNode;fL(h,a.type,u,s),h[Ar]=s}catch(g){Ve(a,a.return,g)}}function mN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&wi(a.type)||a.tag===4}function hv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||mN(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&wi(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function mv(a,s,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ma));else if(h!==4&&(h===27&&wi(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(mv(a,s,u),a=a.sibling;a!==null;)mv(a,s,u),a=a.sibling}function bf(a,s,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(h!==4&&(h===27&&wi(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(bf(a,s,u),a=a.sibling;a!==null;)bf(a,s,u),a=a.sibling}function pN(a){var s=a.stateNode,u=a.memoizedProps;try{for(var h=a.type,g=s.attributes;g.length;)s.removeAttributeNode(g[0]);tr(s,h,u),s[Zt]=a,s[Ar]=u}catch(b){Ve(a,a.return,b)}}var Na=!1,Mt=!1,pv=!1,yN=typeof WeakSet=="function"?WeakSet:Set,qt=null;function KI(a,s){if(a=a.containerInfo,Iv=Uf,a=AS(a),ly(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var g=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var _=0,C=-1,$=-1,Y=0,re=0,ie=a,X=null;t:for(;;){for(var J;ie!==u||g!==0&&ie.nodeType!==3||(C=_+g),ie!==b||h!==0&&ie.nodeType!==3||($=_+h),ie.nodeType===3&&(_+=ie.nodeValue.length),(J=ie.firstChild)!==null;)X=ie,ie=J;for(;;){if(ie===a)break t;if(X===u&&++Y===g&&(C=_),X===b&&++re===h&&($=_),(J=ie.nextSibling)!==null)break;ie=X,X=ie.parentNode}ie=J}u=C===-1||$===-1?null:{start:C,end:$}}else u=null}u=u||{start:0,end:0}}else u=null;for(Lv={focusedElem:a,selectionRange:u},Uf=!1,qt=s;qt!==null;)if(s=qt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,qt=a;else for(;qt!==null;){switch(s=qt,b=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,u=s,g=b.memoizedProps,b=b.memoizedState,h=u.stateNode;try{var me=js(u.type,g);a=h.getSnapshotBeforeUpdate(me,b),h.__reactInternalSnapshotBeforeUpdate=a}catch(je){Ve(u,u.return,je)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)Bv(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Bv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(n(163))}if(a=s.sibling,a!==null){a.return=s.return,qt=a;break}qt=s.return}}function vN(a,s,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:_a(a,u),h&4&&Uu(5,u);break;case 1:if(_a(a,u),h&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(_){Ve(u,u.return,_)}else{var g=js(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(g,s,a.__reactInternalSnapshotBeforeUpdate)}catch(_){Ve(u,u.return,_)}}h&64&&dN(u),h&512&&qu(u,u.return);break;case 3:if(_a(a,u),h&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{t1(a,s)}catch(_){Ve(u,u.return,_)}}break;case 27:s===null&&h&4&&pN(u);case 26:case 5:_a(a,u),s===null&&h&4&&hN(u),h&512&&qu(u,u.return);break;case 12:_a(a,u);break;case 31:_a(a,u),h&4&&bN(a,u);break;case 13:_a(a,u),h&4&&jN(a,u),h&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=eL.bind(null,u),bL(a,u))));break;case 22:if(h=u.memoizedState!==null||Na,!h){s=s!==null&&s.memoizedState!==null||Mt,g=Na;var b=Mt;Na=h,(Mt=s)&&!b?Ea(a,u,(u.subtreeFlags&8772)!==0):_a(a,u),Na=g,Mt=b}break;case 30:break;default:_a(a,u)}}function gN(a){var s=a.alternate;s!==null&&(a.alternate=null,gN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Kp(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var ct=null,Tr=!1;function Oa(a,s,u){for(u=u.child;u!==null;)xN(a,s,u),u=u.sibling}function xN(a,s,u){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(fu,u)}catch{}switch(u.tag){case 26:Mt||Kn(u,s),Oa(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Mt||Kn(u,s);var h=ct,g=Tr;wi(u.type)&&(ct=u.stateNode,Tr=!1),Oa(a,s,u),Zu(u.stateNode),ct=h,Tr=g;break;case 5:Mt||Kn(u,s);case 6:if(h=ct,g=Tr,ct=null,Oa(a,s,u),ct=h,Tr=g,ct!==null)if(Tr)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(u.stateNode)}catch(b){Ve(u,s,b)}else try{ct.removeChild(u.stateNode)}catch(b){Ve(u,s,b)}break;case 18:ct!==null&&(Tr?(a=ct,dO(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),sl(a)):dO(ct,u.stateNode));break;case 4:h=ct,g=Tr,ct=u.stateNode.containerInfo,Tr=!0,Oa(a,s,u),ct=h,Tr=g;break;case 0:case 11:case 14:case 15:pi(2,u,s),Mt||pi(4,u,s),Oa(a,s,u);break;case 1:Mt||(Kn(u,s),h=u.stateNode,typeof h.componentWillUnmount=="function"&&fN(u,s,h)),Oa(a,s,u);break;case 21:Oa(a,s,u);break;case 22:Mt=(h=Mt)||u.memoizedState!==null,Oa(a,s,u),Mt=h;break;default:Oa(a,s,u)}}function bN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{sl(a)}catch(u){Ve(s,s.return,u)}}}function jN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{sl(a)}catch(u){Ve(s,s.return,u)}}function GI(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new yN),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new yN),s;default:throw Error(n(435,a.tag))}}function jf(a,s){var u=GI(a);s.forEach(function(h){if(!u.has(h)){u.add(h);var g=tL.bind(null,a,h);h.then(g,g)}})}function Cr(a,s){var u=s.deletions;if(u!==null)for(var h=0;h<u.length;h++){var g=u[h],b=a,_=s,C=_;e:for(;C!==null;){switch(C.tag){case 27:if(wi(C.type)){ct=C.stateNode,Tr=!1;break e}break;case 5:ct=C.stateNode,Tr=!1;break e;case 3:case 4:ct=C.stateNode.containerInfo,Tr=!0;break e}C=C.return}if(ct===null)throw Error(n(160));xN(b,_,g),ct=null,Tr=!1,b=g.alternate,b!==null&&(b.return=null),g.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)wN(s,a),s=s.sibling}var Tn=null;function wN(a,s){var u=a.alternate,h=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Cr(s,a),Mr(a),h&4&&(pi(3,a,a.return),Uu(3,a),pi(5,a,a.return));break;case 1:Cr(s,a),Mr(a),h&512&&(Mt||u===null||Kn(u,u.return)),h&64&&Na&&(a=a.updateQueue,a!==null&&(h=a.callbacks,h!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var g=Tn;if(Cr(s,a),Mr(a),h&512&&(Mt||u===null||Kn(u,u.return)),h&4){var b=u!==null?u.memoizedState:null;if(h=a.memoizedState,u===null)if(h===null)if(a.stateNode===null){e:{h=a.type,u=a.memoizedProps,g=g.ownerDocument||g;t:switch(h){case"title":b=g.getElementsByTagName("title")[0],(!b||b[pu]||b[Zt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=g.createElement(h),g.head.insertBefore(b,g.querySelector("head > title"))),tr(b,h,u),b[Zt]=a,Ut(b),h=b;break e;case"link":var _=wO("link","href",g).get(h+(u.href||""));if(_){for(var C=0;C<_.length;C++)if(b=_[C],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){_.splice(C,1);break t}}b=g.createElement(h),tr(b,h,u),g.head.appendChild(b);break;case"meta":if(_=wO("meta","content",g).get(h+(u.content||""))){for(C=0;C<_.length;C++)if(b=_[C],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){_.splice(C,1);break t}}b=g.createElement(h),tr(b,h,u),g.head.appendChild(b);break;default:throw Error(n(468,h))}b[Zt]=a,Ut(b),h=b}a.stateNode=h}else SO(g,a.type,a.stateNode);else a.stateNode=jO(g,h,a.memoizedProps);else b!==h?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,h===null?SO(g,a.type,a.stateNode):jO(g,h,a.memoizedProps)):h===null&&a.stateNode!==null&&fv(a,a.memoizedProps,u.memoizedProps)}break;case 27:Cr(s,a),Mr(a),h&512&&(Mt||u===null||Kn(u,u.return)),u!==null&&h&4&&fv(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Cr(s,a),Mr(a),h&512&&(Mt||u===null||Kn(u,u.return)),a.flags&32){g=a.stateNode;try{Po(g,"")}catch(me){Ve(a,a.return,me)}}h&4&&a.stateNode!=null&&(g=a.memoizedProps,fv(a,g,u!==null?u.memoizedProps:g)),h&1024&&(pv=!0);break;case 6:if(Cr(s,a),Mr(a),h&4){if(a.stateNode===null)throw Error(n(162));h=a.memoizedProps,u=a.stateNode;try{u.nodeValue=h}catch(me){Ve(a,a.return,me)}}break;case 3:if(Lf=null,g=Tn,Tn=kf(s.containerInfo),Cr(s,a),Tn=g,Mr(a),h&4&&u!==null&&u.memoizedState.isDehydrated)try{sl(s.containerInfo)}catch(me){Ve(a,a.return,me)}pv&&(pv=!1,SN(a));break;case 4:h=Tn,Tn=kf(a.stateNode.containerInfo),Cr(s,a),Mr(a),Tn=h;break;case 12:Cr(s,a),Mr(a);break;case 31:Cr(s,a),Mr(a),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,jf(a,h)));break;case 13:Cr(s,a),Mr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Sf=Te()),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,jf(a,h)));break;case 22:g=a.memoizedState!==null;var $=u!==null&&u.memoizedState!==null,Y=Na,re=Mt;if(Na=Y||g,Mt=re||$,Cr(s,a),Mt=re,Na=Y,Mr(a),h&8192)e:for(s=a.stateNode,s._visibility=g?s._visibility&-2:s._visibility|1,g&&(u===null||$||Na||Mt||ws(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){$=u=s;try{if(b=$.stateNode,g)_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{C=$.stateNode;var ie=$.memoizedProps.style,X=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;C.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(me){Ve($,$.return,me)}}}else if(s.tag===6){if(u===null){$=s;try{$.stateNode.nodeValue=g?"":$.memoizedProps}catch(me){Ve($,$.return,me)}}}else if(s.tag===18){if(u===null){$=s;try{var J=$.stateNode;g?fO(J,!0):fO($.stateNode,!1)}catch(me){Ve($,$.return,me)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=a.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,jf(a,u))));break;case 19:Cr(s,a),Mr(a),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,jf(a,h)));break;case 30:break;case 21:break;default:Cr(s,a),Mr(a)}}function Mr(a){var s=a.flags;if(s&2){try{for(var u,h=a.return;h!==null;){if(mN(h)){u=h;break}h=h.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var g=u.stateNode,b=hv(a);bf(a,b,g);break;case 5:var _=u.stateNode;u.flags&32&&(Po(_,""),u.flags&=-33);var C=hv(a);bf(a,C,_);break;case 3:case 4:var $=u.stateNode.containerInfo,Y=hv(a);mv(a,Y,$);break;default:throw Error(n(161))}}catch(re){Ve(a,a.return,re)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function SN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;SN(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function _a(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)vN(a,s.alternate,s),s=s.sibling}function ws(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:pi(4,s,s.return),ws(s);break;case 1:Kn(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&fN(s,s.return,u),ws(s);break;case 27:Zu(s.stateNode);case 26:case 5:Kn(s,s.return),ws(s);break;case 22:s.memoizedState===null&&ws(s);break;case 30:ws(s);break;default:ws(s)}a=a.sibling}}function Ea(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,g=a,b=s,_=b.flags;switch(b.tag){case 0:case 11:case 15:Ea(g,b,u),Uu(4,b);break;case 1:if(Ea(g,b,u),h=b,g=h.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(Y){Ve(h,h.return,Y)}if(h=b,g=h.updateQueue,g!==null){var C=h.stateNode;try{var $=g.shared.hiddenCallbacks;if($!==null)for(g.shared.hiddenCallbacks=null,g=0;g<$.length;g++)e1($[g],C)}catch(Y){Ve(h,h.return,Y)}}u&&_&64&&dN(b),qu(b,b.return);break;case 27:pN(b);case 26:case 5:Ea(g,b,u),u&&h===null&&_&4&&hN(b),qu(b,b.return);break;case 12:Ea(g,b,u);break;case 31:Ea(g,b,u),u&&_&4&&bN(g,b);break;case 13:Ea(g,b,u),u&&_&4&&jN(g,b);break;case 22:b.memoizedState===null&&Ea(g,b,u),qu(b,b.return);break;case 30:break;default:Ea(g,b,u)}s=s.sibling}}function yv(a,s){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&Au(u))}function vv(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Au(a))}function Cn(a,s,u,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)NN(a,s,u,h),s=s.sibling}function NN(a,s,u,h){var g=s.flags;switch(s.tag){case 0:case 11:case 15:Cn(a,s,u,h),g&2048&&Uu(9,s);break;case 1:Cn(a,s,u,h);break;case 3:Cn(a,s,u,h),g&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Au(a)));break;case 12:if(g&2048){Cn(a,s,u,h),a=s.stateNode;try{var b=s.memoizedProps,_=b.id,C=b.onPostCommit;typeof C=="function"&&C(_,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch($){Ve(s,s.return,$)}}else Cn(a,s,u,h);break;case 31:Cn(a,s,u,h);break;case 13:Cn(a,s,u,h);break;case 23:break;case 22:b=s.stateNode,_=s.alternate,s.memoizedState!==null?b._visibility&2?Cn(a,s,u,h):Hu(a,s):b._visibility&2?Cn(a,s,u,h):(b._visibility|=2,Qo(a,s,u,h,(s.subtreeFlags&10256)!==0||!1)),g&2048&&yv(_,s);break;case 24:Cn(a,s,u,h),g&2048&&vv(s.alternate,s);break;default:Cn(a,s,u,h)}}function Qo(a,s,u,h,g){for(g=g&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var b=a,_=s,C=u,$=h,Y=_.flags;switch(_.tag){case 0:case 11:case 15:Qo(b,_,C,$,g),Uu(8,_);break;case 23:break;case 22:var re=_.stateNode;_.memoizedState!==null?re._visibility&2?Qo(b,_,C,$,g):Hu(b,_):(re._visibility|=2,Qo(b,_,C,$,g)),g&&Y&2048&&yv(_.alternate,_);break;case 24:Qo(b,_,C,$,g),g&&Y&2048&&vv(_.alternate,_);break;default:Qo(b,_,C,$,g)}s=s.sibling}}function Hu(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,h=s,g=h.flags;switch(h.tag){case 22:Hu(u,h),g&2048&&yv(h.alternate,h);break;case 24:Hu(u,h),g&2048&&vv(h.alternate,h);break;default:Hu(u,h)}s=s.sibling}}var Fu=8192;function Xo(a,s,u){if(a.subtreeFlags&Fu)for(a=a.child;a!==null;)ON(a,s,u),a=a.sibling}function ON(a,s,u){switch(a.tag){case 26:Xo(a,s,u),a.flags&Fu&&a.memoizedState!==null&&ML(u,Tn,a.memoizedState,a.memoizedProps);break;case 5:Xo(a,s,u);break;case 3:case 4:var h=Tn;Tn=kf(a.stateNode.containerInfo),Xo(a,s,u),Tn=h;break;case 22:a.memoizedState===null&&(h=a.alternate,h!==null&&h.memoizedState!==null?(h=Fu,Fu=16777216,Xo(a,s,u),Fu=h):Xo(a,s,u));break;default:Xo(a,s,u)}}function _N(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function Ku(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var h=s[u];qt=h,AN(h,a)}_N(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)EN(a),a=a.sibling}function EN(a){switch(a.tag){case 0:case 11:case 15:Ku(a),a.flags&2048&&pi(9,a,a.return);break;case 3:Ku(a);break;case 12:Ku(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,wf(a)):Ku(a);break;default:Ku(a)}}function wf(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var h=s[u];qt=h,AN(h,a)}_N(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:pi(8,s,s.return),wf(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,wf(s));break;default:wf(s)}a=a.sibling}}function AN(a,s){for(;qt!==null;){var u=qt;switch(u.tag){case 0:case 11:case 15:pi(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:Au(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,qt=h;else e:for(u=a;qt!==null;){h=qt;var g=h.sibling,b=h.return;if(gN(h),h===u){qt=null;break e}if(g!==null){g.return=b,qt=g;break e}qt=b}}}var YI={getCacheForType:function(a){var s=Jt(Pt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return Jt(Pt).controller.signal}},VI=typeof WeakMap=="function"?WeakMap:Map,Ke=0,rt=null,Me=null,ke=0,Ye=0,Vr=null,yi=!1,Zo=!1,gv=!1,Aa=0,vt=0,vi=0,Ss=0,xv=0,Qr=0,Wo=0,Gu=null,Rr=null,bv=!1,Sf=0,PN=0,Nf=1/0,Of=null,gi=null,Dt=0,xi=null,Jo=null,Pa=0,jv=0,wv=null,TN=null,Yu=0,Sv=null;function Xr(){return(Ke&2)!==0&&ke!==0?ke&-ke:B.T!==null?Pv():Gw()}function CN(){if(Qr===0)if((ke&536870912)===0||Le){var a=Md;Md<<=1,(Md&3932160)===0&&(Md=262144),Qr=a}else Qr=536870912;return a=Gr.current,a!==null&&(a.flags|=32),Qr}function Dr(a,s,u){(a===rt&&(Ye===2||Ye===9)||a.cancelPendingCommit!==null)&&(el(a,0),bi(a,ke,Qr,!1)),mu(a,u),((Ke&2)===0||a!==rt)&&(a===rt&&((Ke&2)===0&&(Ss|=u),vt===4&&bi(a,ke,Qr,!1)),Gn(a))}function MN(a,s,u){if((Ke&6)!==0)throw Error(n(327));var h=!u&&(s&127)===0&&(s&a.expiredLanes)===0||hu(a,s),g=h?ZI(a,s):Ov(a,s,!0),b=h;do{if(g===0){Zo&&!h&&bi(a,s,0,!1);break}else{if(u=a.current.alternate,b&&!QI(u)){g=Ov(a,s,!1),b=!1;continue}if(g===2){if(b=s,a.errorRecoveryDisabledLanes&b)var _=0;else _=a.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){s=_;e:{var C=a;g=Gu;var $=C.current.memoizedState.isDehydrated;if($&&(el(C,_).flags|=256),_=Ov(C,_,!1),_!==2){if(gv&&!$){C.errorRecoveryDisabledLanes|=b,Ss|=b,g=4;break e}b=Rr,Rr=g,b!==null&&(Rr===null?Rr=b:Rr.push.apply(Rr,b))}g=_}if(b=!1,g!==2)continue}}if(g===1){el(a,0),bi(a,s,0,!0);break}e:{switch(h=a,b=g,b){case 0:case 1:throw Error(n(345));case 4:if((s&4194048)!==s)break;case 6:bi(h,s,Qr,!yi);break e;case 2:Rr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(g=Sf+300-Te(),10<g)){if(bi(h,s,Qr,!yi),Dd(h,0,!0)!==0)break e;Pa=s,h.timeoutHandle=uO(RN.bind(null,h,u,Rr,Of,bv,s,Qr,Ss,Wo,yi,b,"Throttled",-0,0),g);break e}RN(h,u,Rr,Of,bv,s,Qr,Ss,Wo,yi,b,null,-0,0)}}break}while(!0);Gn(a)}function RN(a,s,u,h,g,b,_,C,$,Y,re,ie,X,J){if(a.timeoutHandle=-1,ie=s.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ma},ON(s,b,ie);var me=(b&62914560)===b?Sf-Te():(b&4194048)===b?PN-Te():0;if(me=RL(ie,me),me!==null){Pa=b,a.cancelPendingCommit=me(UN.bind(null,a,s,b,u,h,g,_,C,$,re,ie,null,X,J)),bi(a,b,_,!Y);return}}UN(a,s,b,u,h,g,_,C,$)}function QI(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var g=u[h],b=g.getSnapshot;g=g.value;try{if(!Fr(b(),g))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function bi(a,s,u,h){s&=~xv,s&=~Ss,a.suspendedLanes|=s,a.pingedLanes&=~s,h&&(a.warmLanes|=s),h=a.expirationTimes;for(var g=s;0<g;){var b=31-Hr(g),_=1<<b;h[b]=-1,g&=~_}u!==0&&Hw(a,u,s)}function _f(){return(Ke&6)===0?(Vu(0),!1):!0}function Nv(){if(Me!==null){if(Ye===0)var a=Me.return;else a=Me,ga=ms=null,By(a),Fo=null,Tu=0,a=Me;for(;a!==null;)cN(a.alternate,a),a=a.return;Me=null}}function el(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,pL(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Pa=0,Nv(),rt=a,Me=u=ya(a.current,null),ke=s,Ye=0,Vr=null,yi=!1,Zo=hu(a,s),gv=!1,Wo=Qr=xv=Ss=vi=vt=0,Rr=Gu=null,bv=!1,(s&8)!==0&&(s|=s&32);var h=a.entangledLanes;if(h!==0)for(a=a.entanglements,h&=s;0<h;){var g=31-Hr(h),b=1<<g;s|=a[g],h&=~b}return Aa=s,Gd(),u}function DN(a,s){Ee=null,B.H=$u,s===Ho||s===ef?(s=XS(),Ye=3):s===Ay?(s=XS(),Ye=4):Ye=s===rv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Vr=s,Me===null&&(vt=1,pf(a,un(s,a.current)))}function kN(){var a=Gr.current;return a===null?!0:(ke&4194048)===ke?hn===null:(ke&62914560)===ke||(ke&536870912)!==0?a===hn:!1}function IN(){var a=B.H;return B.H=$u,a===null?$u:a}function LN(){var a=B.A;return B.A=YI,a}function Ef(){vt=4,yi||(ke&4194048)!==ke&&Gr.current!==null||(Zo=!0),(vi&134217727)===0&&(Ss&134217727)===0||rt===null||bi(rt,ke,Qr,!1)}function Ov(a,s,u){var h=Ke;Ke|=2;var g=IN(),b=LN();(rt!==a||ke!==s)&&(Of=null,el(a,s)),s=!1;var _=vt;e:do try{if(Ye!==0&&Me!==null){var C=Me,$=Vr;switch(Ye){case 8:Nv(),_=6;break e;case 3:case 2:case 9:case 6:Gr.current===null&&(s=!0);var Y=Ye;if(Ye=0,Vr=null,tl(a,C,$,Y),u&&Zo){_=0;break e}break;default:Y=Ye,Ye=0,Vr=null,tl(a,C,$,Y)}}XI(),_=vt;break}catch(re){DN(a,re)}while(!0);return s&&a.shellSuspendCounter++,ga=ms=null,Ke=h,B.H=g,B.A=b,Me===null&&(rt=null,ke=0,Gd()),_}function XI(){for(;Me!==null;)$N(Me)}function ZI(a,s){var u=Ke;Ke|=2;var h=IN(),g=LN();rt!==a||ke!==s?(Of=null,Nf=Te()+500,el(a,s)):Zo=hu(a,s);e:do try{if(Ye!==0&&Me!==null){s=Me;var b=Vr;t:switch(Ye){case 1:Ye=0,Vr=null,tl(a,s,b,1);break;case 2:case 9:if(VS(b)){Ye=0,Vr=null,zN(s);break}s=function(){Ye!==2&&Ye!==9||rt!==a||(Ye=7),Gn(a)},b.then(s,s);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:VS(b)?(Ye=0,Vr=null,zN(s)):(Ye=0,Vr=null,tl(a,s,b,7));break;case 5:var _=null;switch(Me.tag){case 26:_=Me.memoizedState;case 5:case 27:var C=Me;if(_?NO(_):C.stateNode.complete){Ye=0,Vr=null;var $=C.sibling;if($!==null)Me=$;else{var Y=C.return;Y!==null?(Me=Y,Af(Y)):Me=null}break t}}Ye=0,Vr=null,tl(a,s,b,5);break;case 6:Ye=0,Vr=null,tl(a,s,b,6);break;case 8:Nv(),vt=6;break e;default:throw Error(n(462))}}WI();break}catch(re){DN(a,re)}while(!0);return ga=ms=null,B.H=h,B.A=g,Ke=u,Me!==null?0:(rt=null,ke=0,Gd(),vt)}function WI(){for(;Me!==null&&!Bp();)$N(Me)}function $N(a){var s=lN(a.alternate,a,Aa);a.memoizedProps=a.pendingProps,s===null?Af(a):Me=s}function zN(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=rN(u,s,s.pendingProps,s.type,void 0,ke);break;case 11:s=rN(u,s,s.pendingProps,s.type.render,s.ref,ke);break;case 5:By(s);default:cN(u,s),s=Me=LS(s,Aa),s=lN(u,s,Aa)}a.memoizedProps=a.pendingProps,s===null?Af(a):Me=s}function tl(a,s,u,h){ga=ms=null,By(s),Fo=null,Tu=0;var g=s.return;try{if(BI(a,g,s,u,ke)){vt=1,pf(a,un(u,a.current)),Me=null;return}}catch(b){if(g!==null)throw Me=g,b;vt=1,pf(a,un(u,a.current)),Me=null;return}s.flags&32768?(Le||h===1?a=!0:Zo||(ke&536870912)!==0?a=!1:(yi=a=!0,(h===2||h===9||h===3||h===6)&&(h=Gr.current,h!==null&&h.tag===13&&(h.flags|=16384))),BN(s,a)):Af(s)}function Af(a){var s=a;do{if((s.flags&32768)!==0){BN(s,yi);return}a=s.return;var u=HI(s.alternate,s,Aa);if(u!==null){Me=u;return}if(s=s.sibling,s!==null){Me=s;return}Me=s=a}while(s!==null);vt===0&&(vt=5)}function BN(a,s){do{var u=FI(a.alternate,a);if(u!==null){u.flags&=32767,Me=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Me=a;return}Me=a=u}while(a!==null);vt=6,Me=null}function UN(a,s,u,h,g,b,_,C,$){a.cancelPendingCommit=null;do Pf();while(Dt!==0);if((Ke&6)!==0)throw Error(n(327));if(s!==null){if(s===a.current)throw Error(n(177));if(b=s.lanes|s.childLanes,b|=hy,C5(a,u,b,_,C,$),a===rt&&(Me=rt=null,ke=0),Jo=s,xi=a,Pa=u,jv=b,wv=g,TN=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,rL(Td,function(){return GN(),null})):(a.callbackNode=null,a.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=B.T,B.T=null,g=K.p,K.p=2,_=Ke,Ke|=4;try{KI(a,s,u)}finally{Ke=_,K.p=g,B.T=h}}Dt=1,qN(),HN(),FN()}}function qN(){if(Dt===1){Dt=0;var a=xi,s=Jo,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=B.T,B.T=null;var h=K.p;K.p=2;var g=Ke;Ke|=4;try{wN(s,a);var b=Lv,_=AS(a.containerInfo),C=b.focusedElem,$=b.selectionRange;if(_!==C&&C&&C.ownerDocument&&ES(C.ownerDocument.documentElement,C)){if($!==null&&ly(C)){var Y=$.start,re=$.end;if(re===void 0&&(re=Y),"selectionStart"in C)C.selectionStart=Y,C.selectionEnd=Math.min(re,C.value.length);else{var ie=C.ownerDocument||document,X=ie&&ie.defaultView||window;if(X.getSelection){var J=X.getSelection(),me=C.textContent.length,je=Math.min($.start,me),et=$.end===void 0?je:Math.min($.end,me);!J.extend&&je>et&&(_=et,et=je,je=_);var F=_S(C,je),U=_S(C,et);if(F&&U&&(J.rangeCount!==1||J.anchorNode!==F.node||J.anchorOffset!==F.offset||J.focusNode!==U.node||J.focusOffset!==U.offset)){var G=ie.createRange();G.setStart(F.node,F.offset),J.removeAllRanges(),je>et?(J.addRange(G),J.extend(U.node,U.offset)):(G.setEnd(U.node,U.offset),J.addRange(G))}}}}for(ie=[],J=C;J=J.parentNode;)J.nodeType===1&&ie.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<ie.length;C++){var ne=ie[C];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}Uf=!!Iv,Lv=Iv=null}finally{Ke=g,K.p=h,B.T=u}}a.current=s,Dt=2}}function HN(){if(Dt===2){Dt=0;var a=xi,s=Jo,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=B.T,B.T=null;var h=K.p;K.p=2;var g=Ke;Ke|=4;try{vN(a,s.alternate,s)}finally{Ke=g,K.p=h,B.T=u}}Dt=3}}function FN(){if(Dt===4||Dt===3){Dt=0,Ad();var a=xi,s=Jo,u=Pa,h=TN;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Dt=5:(Dt=0,Jo=xi=null,KN(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(gi=null),Hp(u),s=s.stateNode,qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(fu,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=B.T,g=K.p,K.p=2,B.T=null;try{for(var b=a.onRecoverableError,_=0;_<h.length;_++){var C=h[_];b(C.value,{componentStack:C.stack})}}finally{B.T=s,K.p=g}}(Pa&3)!==0&&Pf(),Gn(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===Sv?Yu++:(Yu=0,Sv=a):Yu=0,Vu(0)}}function KN(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Au(s)))}function Pf(){return qN(),HN(),FN(),GN()}function GN(){if(Dt!==5)return!1;var a=xi,s=jv;jv=0;var u=Hp(Pa),h=B.T,g=K.p;try{K.p=32>u?32:u,B.T=null,u=wv,wv=null;var b=xi,_=Pa;if(Dt=0,Jo=xi=null,Pa=0,(Ke&6)!==0)throw Error(n(331));var C=Ke;if(Ke|=4,EN(b.current),NN(b,b.current,_,u),Ke=C,Vu(0,!1),qr&&typeof qr.onPostCommitFiberRoot=="function")try{qr.onPostCommitFiberRoot(fu,b)}catch{}return!0}finally{K.p=g,B.T=h,KN(a,s)}}function YN(a,s,u){s=un(u,s),s=tv(a.stateNode,s,2),a=fi(a,s,2),a!==null&&(mu(a,2),Gn(a))}function Ve(a,s,u){if(a.tag===3)YN(a,a,u);else for(;s!==null;){if(s.tag===3){YN(s,a,u);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(gi===null||!gi.has(h))){a=un(u,a),u=V1(2),h=fi(s,u,2),h!==null&&(Q1(u,h,s,a),mu(h,2),Gn(h));break}}s=s.return}}function _v(a,s,u){var h=a.pingCache;if(h===null){h=a.pingCache=new VI;var g=new Set;h.set(s,g)}else g=h.get(s),g===void 0&&(g=new Set,h.set(s,g));g.has(u)||(gv=!0,g.add(u),a=JI.bind(null,a,s,u),s.then(a,a))}function JI(a,s,u){var h=a.pingCache;h!==null&&h.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,rt===a&&(ke&u)===u&&(vt===4||vt===3&&(ke&62914560)===ke&&300>Te()-Sf?(Ke&2)===0&&el(a,0):xv|=u,Wo===ke&&(Wo=0)),Gn(a)}function VN(a,s){s===0&&(s=qw()),a=ds(a,s),a!==null&&(mu(a,s),Gn(a))}function eL(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),VN(a,u)}function tL(a,s){var u=0;switch(a.tag){case 31:case 13:var h=a.stateNode,g=a.memoizedState;g!==null&&(u=g.retryLane);break;case 19:h=a.stateNode;break;case 22:h=a.stateNode._retryCache;break;default:throw Error(n(314))}h!==null&&h.delete(s),VN(a,u)}function rL(a,s){return du(a,s)}var Tf=null,rl=null,Ev=!1,Cf=!1,Av=!1,ji=0;function Gn(a){a!==rl&&a.next===null&&(rl===null?Tf=rl=a:rl=rl.next=a),Cf=!0,Ev||(Ev=!0,aL())}function Vu(a,s){if(!Av&&Cf){Av=!0;do for(var u=!1,h=Tf;h!==null;){if(a!==0){var g=h.pendingLanes;if(g===0)var b=0;else{var _=h.suspendedLanes,C=h.pingedLanes;b=(1<<31-Hr(42|a)+1)-1,b&=g&~(_&~C),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,WN(h,b))}else b=ke,b=Dd(h,h===rt?b:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(b&3)===0||hu(h,b)||(u=!0,WN(h,b));h=h.next}while(u);Av=!1}}function nL(){QN()}function QN(){Cf=Ev=!1;var a=0;ji!==0&&mL()&&(a=ji);for(var s=Te(),u=null,h=Tf;h!==null;){var g=h.next,b=XN(h,s);b===0?(h.next=null,u===null?Tf=g:u.next=g,g===null&&(rl=u)):(u=h,(a!==0||(b&3)!==0)&&(Cf=!0)),h=g}Dt!==0&&Dt!==5||Vu(a),ji!==0&&(ji=0)}function XN(a,s){for(var u=a.suspendedLanes,h=a.pingedLanes,g=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var _=31-Hr(b),C=1<<_,$=g[_];$===-1?((C&u)===0||(C&h)!==0)&&(g[_]=T5(C,s)):$<=s&&(a.expiredLanes|=C),b&=~C}if(s=rt,u=ke,u=Dd(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),h=a.callbackNode,u===0||a===s&&(Ye===2||Ye===9)||a.cancelPendingCommit!==null)return h!==null&&h!==null&&wo(h),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||hu(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(h!==null&&wo(h),Hp(u)){case 2:case 8:u=Pd;break;case 32:u=Td;break;case 268435456:u=Uw;break;default:u=Td}return h=ZN.bind(null,a),u=du(u,h),a.callbackPriority=s,a.callbackNode=u,s}return h!==null&&h!==null&&wo(h),a.callbackPriority=2,a.callbackNode=null,2}function ZN(a,s){if(Dt!==0&&Dt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(Pf()&&a.callbackNode!==u)return null;var h=ke;return h=Dd(a,a===rt?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),h===0?null:(MN(a,h,s),XN(a,Te()),a.callbackNode!=null&&a.callbackNode===u?ZN.bind(null,a):null)}function WN(a,s){if(Pf())return null;MN(a,s,!0)}function aL(){yL(function(){(Ke&6)!==0?du(qn,nL):QN()})}function Pv(){if(ji===0){var a=Uo;a===0&&(a=Cd,Cd<<=1,(Cd&261888)===0&&(Cd=256)),ji=a}return ji}function JN(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:$d(""+a)}function eO(a,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,a.id&&u.setAttribute("form",a.id),s.parentNode.insertBefore(u,s),a=new FormData(a),u.parentNode.removeChild(u),a}function iL(a,s,u,h,g){if(s==="submit"&&u&&u.stateNode===g){var b=JN((g[Ar]||null).action),_=h.submitter;_&&(s=(s=_[Ar]||null)?JN(s.formAction):_.getAttribute("formAction"),s!==null&&(b=s,_=null));var C=new qd("action","action",null,h,g);a.push({event:C,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(ji!==0){var $=_?eO(g,_):new FormData(g);Qy(u,{pending:!0,data:$,method:g.method,action:b},null,$)}}else typeof b=="function"&&(C.preventDefault(),$=_?eO(g,_):new FormData(g),Qy(u,{pending:!0,data:$,method:g.method,action:b},b,$))},currentTarget:g}]})}}for(var Tv=0;Tv<fy.length;Tv++){var Cv=fy[Tv],sL=Cv.toLowerCase(),oL=Cv[0].toUpperCase()+Cv.slice(1);Pn(sL,"on"+oL)}Pn(CS,"onAnimationEnd"),Pn(MS,"onAnimationIteration"),Pn(RS,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(SI,"onTransitionRun"),Pn(NI,"onTransitionStart"),Pn(OI,"onTransitionCancel"),Pn(DS,"onTransitionEnd"),Eo("onMouseEnter",["mouseout","mouseover"]),Eo("onMouseLeave",["mouseout","mouseover"]),Eo("onPointerEnter",["pointerout","pointerover"]),Eo("onPointerLeave",["pointerout","pointerover"]),os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),os("onBeforeInput",["compositionend","keypress","textInput","paste"]),os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),lL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qu));function tO(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var h=a[u],g=h.event;h=h.listeners;e:{var b=void 0;if(s)for(var _=h.length-1;0<=_;_--){var C=h[_],$=C.instance,Y=C.currentTarget;if(C=C.listener,$!==b&&g.isPropagationStopped())break e;b=C,g.currentTarget=Y;try{b(g)}catch(re){Kd(re)}g.currentTarget=null,b=$}else for(_=0;_<h.length;_++){if(C=h[_],$=C.instance,Y=C.currentTarget,C=C.listener,$!==b&&g.isPropagationStopped())break e;b=C,g.currentTarget=Y;try{b(g)}catch(re){Kd(re)}g.currentTarget=null,b=$}}}}function Re(a,s){var u=s[Fp];u===void 0&&(u=s[Fp]=new Set);var h=a+"__bubble";u.has(h)||(rO(s,a,2,!1),u.add(h))}function Mv(a,s,u){var h=0;s&&(h|=4),rO(u,a,h,s)}var Mf="_reactListening"+Math.random().toString(36).slice(2);function Rv(a){if(!a[Mf]){a[Mf]=!0,Qw.forEach(function(u){u!=="selectionchange"&&(lL.has(u)||Mv(u,!1,a),Mv(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Mf]||(s[Mf]=!0,Mv("selectionchange",!1,s))}}function rO(a,s,u,h){switch(CO(s)){case 2:var g=IL;break;case 8:g=LL;break;default:g=Vv}u=g.bind(null,s,u,a),g=void 0,!Jp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),h?g!==void 0?a.addEventListener(s,u,{capture:!0,passive:g}):a.addEventListener(s,u,!0):g!==void 0?a.addEventListener(s,u,{passive:g}):a.addEventListener(s,u,!1)}function Dv(a,s,u,h,g){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var _=h.tag;if(_===3||_===4){var C=h.stateNode.containerInfo;if(C===g)break;if(_===4)for(_=h.return;_!==null;){var $=_.tag;if(($===3||$===4)&&_.stateNode.containerInfo===g)return;_=_.return}for(;C!==null;){if(_=No(C),_===null)return;if($=_.tag,$===5||$===6||$===26||$===27){h=b=_;continue e}C=C.parentNode}}h=h.return}oS(function(){var Y=b,re=Zp(u),ie=[];e:{var X=kS.get(a);if(X!==void 0){var J=qd,me=a;switch(a){case"keypress":if(Bd(u)===0)break e;case"keydown":case"keyup":J=tI;break;case"focusin":me="focus",J=ny;break;case"focusout":me="blur",J=ny;break;case"beforeblur":case"afterblur":J=ny;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=cS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=H5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=aI;break;case CS:case MS:case RS:J=G5;break;case DS:J=sI;break;case"scroll":case"scrollend":J=U5;break;case"wheel":J=lI;break;case"copy":case"cut":case"paste":J=V5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=fS;break;case"toggle":case"beforetoggle":J=cI}var je=(s&4)!==0,et=!je&&(a==="scroll"||a==="scrollend"),F=je?X!==null?X+"Capture":null:X;je=[];for(var U=Y,G;U!==null;){var ne=U;if(G=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||G===null||F===null||(ne=vu(U,F),ne!=null&&je.push(Xu(U,ne,G))),et)break;U=U.return}0<je.length&&(X=new J(X,me,null,u,re),ie.push({event:X,listeners:je}))}}if((s&7)===0){e:{if(X=a==="mouseover"||a==="pointerover",J=a==="mouseout"||a==="pointerout",X&&u!==Xp&&(me=u.relatedTarget||u.fromElement)&&(No(me)||me[So]))break e;if((J||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,J?(me=u.relatedTarget||u.toElement,J=Y,me=me?No(me):null,me!==null&&(et=o(me),je=me.tag,me!==et||je!==5&&je!==27&&je!==6)&&(me=null)):(J=null,me=Y),J!==me)){if(je=cS,ne="onMouseLeave",F="onMouseEnter",U="mouse",(a==="pointerout"||a==="pointerover")&&(je=fS,ne="onPointerLeave",F="onPointerEnter",U="pointer"),et=J==null?X:yu(J),G=me==null?X:yu(me),X=new je(ne,U+"leave",J,u,re),X.target=et,X.relatedTarget=G,ne=null,No(re)===Y&&(je=new je(F,U+"enter",me,u,re),je.target=G,je.relatedTarget=et,ne=je),et=ne,J&&me)t:{for(je=uL,F=J,U=me,G=0,ne=F;ne;ne=je(ne))G++;ne=0;for(var be=U;be;be=je(be))ne++;for(;0<G-ne;)F=je(F),G--;for(;0<ne-G;)U=je(U),ne--;for(;G--;){if(F===U||U!==null&&F===U.alternate){je=F;break t}F=je(F),U=je(U)}je=null}else je=null;J!==null&&nO(ie,X,J,je,!1),me!==null&&et!==null&&nO(ie,et,me,je,!0)}}e:{if(X=Y?yu(Y):window,J=X.nodeName&&X.nodeName.toLowerCase(),J==="select"||J==="input"&&X.type==="file")var qe=bS;else if(gS(X))if(jS)qe=bI;else{qe=gI;var ve=vI}else J=X.nodeName,!J||J.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Y&&Qp(Y.elementType)&&(qe=bS):qe=xI;if(qe&&(qe=qe(a,Y))){xS(ie,qe,u,re);break e}ve&&ve(a,X,Y),a==="focusout"&&Y&&X.type==="number"&&Y.memoizedProps.value!=null&&Vp(X,"number",X.value)}switch(ve=Y?yu(Y):window,a){case"focusin":(gS(ve)||ve.contentEditable==="true")&&(Ro=ve,uy=Y,Ou=null);break;case"focusout":Ou=uy=Ro=null;break;case"mousedown":cy=!0;break;case"contextmenu":case"mouseup":case"dragend":cy=!1,PS(ie,u,re);break;case"selectionchange":if(wI)break;case"keydown":case"keyup":PS(ie,u,re)}var Ae;if(iy)e:{switch(a){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Mo?yS(a,u)&&(Ie="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(hS&&u.locale!=="ko"&&(Mo||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Mo&&(Ae=lS()):(ii=re,ey="value"in ii?ii.value:ii.textContent,Mo=!0)),ve=Rf(Y,Ie),0<ve.length&&(Ie=new dS(Ie,a,null,u,re),ie.push({event:Ie,listeners:ve}),Ae?Ie.data=Ae:(Ae=vS(u),Ae!==null&&(Ie.data=Ae)))),(Ae=fI?hI(a,u):mI(a,u))&&(Ie=Rf(Y,"onBeforeInput"),0<Ie.length&&(ve=new dS("onBeforeInput","beforeinput",null,u,re),ie.push({event:ve,listeners:Ie}),ve.data=Ae)),iL(ie,a,Y,u,re)}tO(ie,s)})}function Xu(a,s,u){return{instance:a,listener:s,currentTarget:u}}function Rf(a,s){for(var u=s+"Capture",h=[];a!==null;){var g=a,b=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||b===null||(g=vu(a,u),g!=null&&h.unshift(Xu(a,g,b)),g=vu(a,s),g!=null&&h.push(Xu(a,g,b))),a.tag===3)return h;a=a.return}return[]}function uL(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function nO(a,s,u,h,g){for(var b=s._reactName,_=[];u!==null&&u!==h;){var C=u,$=C.alternate,Y=C.stateNode;if(C=C.tag,$!==null&&$===h)break;C!==5&&C!==26&&C!==27||Y===null||($=Y,g?(Y=vu(u,b),Y!=null&&_.unshift(Xu(u,Y,$))):g||(Y=vu(u,b),Y!=null&&_.push(Xu(u,Y,$)))),u=u.return}_.length!==0&&a.push({event:s,listeners:_})}var cL=/\r\n?/g,dL=/\u0000|\uFFFD/g;function aO(a){return(typeof a=="string"?a:""+a).replace(cL,`
|
|
49
|
+
`).replace(dL,"")}function iO(a,s){return s=aO(s),aO(a)===s}function Je(a,s,u,h,g,b){switch(u){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||Po(a,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&Po(a,""+h);break;case"className":Id(a,"class",h);break;case"tabIndex":Id(a,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Id(a,u,h);break;case"style":iS(a,h,b);break;case"data":if(s!=="object"){Id(a,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){a.removeAttribute(u);break}h=$d(""+h),a.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(u==="formAction"?(s!=="input"&&Je(a,s,"name",g.name,g,null),Je(a,s,"formEncType",g.formEncType,g,null),Je(a,s,"formMethod",g.formMethod,g,null),Je(a,s,"formTarget",g.formTarget,g,null)):(Je(a,s,"encType",g.encType,g,null),Je(a,s,"method",g.method,g,null),Je(a,s,"target",g.target,g,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){a.removeAttribute(u);break}h=$d(""+h),a.setAttribute(u,h);break;case"onClick":h!=null&&(a.onclick=ma);break;case"onScroll":h!=null&&Re("scroll",a);break;case"onScrollEnd":h!=null&&Re("scrollend",a);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(n(61));if(u=h.__html,u!=null){if(g.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"multiple":a.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":a.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){a.removeAttribute("xlink:href");break}u=$d(""+h),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,""+h):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":h===!0?a.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,h):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?a.setAttribute(u,h):a.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?a.removeAttribute(u):a.setAttribute(u,h);break;case"popover":Re("beforetoggle",a),Re("toggle",a),kd(a,"popover",h);break;case"xlinkActuate":ha(a,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":ha(a,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":ha(a,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":ha(a,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":ha(a,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":ha(a,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":ha(a,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":ha(a,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":ha(a,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":kd(a,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=z5.get(u)||u,kd(a,u,h))}}function kv(a,s,u,h,g,b){switch(u){case"style":iS(a,h,b);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(n(61));if(u=h.__html,u!=null){if(g.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"children":typeof h=="string"?Po(a,h):(typeof h=="number"||typeof h=="bigint")&&Po(a,""+h);break;case"onScroll":h!=null&&Re("scroll",a);break;case"onScrollEnd":h!=null&&Re("scrollend",a);break;case"onClick":h!=null&&(a.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xw.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),s=u.slice(2,g?u.length-7:void 0),b=a[Ar]||null,b=b!=null?b[u]:null,typeof b=="function"&&a.removeEventListener(s,b,g),typeof h=="function")){typeof b!="function"&&b!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,h,g);break e}u in a?a[u]=h:h===!0?a.setAttribute(u,""):kd(a,u,h)}}}function tr(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",a),Re("load",a);var h=!1,g=!1,b;for(b in u)if(u.hasOwnProperty(b)){var _=u[b];if(_!=null)switch(b){case"src":h=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,b,_,u,null)}}g&&Je(a,s,"srcSet",u.srcSet,u,null),h&&Je(a,s,"src",u.src,u,null);return;case"input":Re("invalid",a);var C=b=_=g=null,$=null,Y=null;for(h in u)if(u.hasOwnProperty(h)){var re=u[h];if(re!=null)switch(h){case"name":g=re;break;case"type":_=re;break;case"checked":$=re;break;case"defaultChecked":Y=re;break;case"value":b=re;break;case"defaultValue":C=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(n(137,s));break;default:Je(a,s,h,re,u,null)}}tS(a,b,C,$,Y,_,g,!1);return;case"select":Re("invalid",a),h=_=b=null;for(g in u)if(u.hasOwnProperty(g)&&(C=u[g],C!=null))switch(g){case"value":b=C;break;case"defaultValue":_=C;break;case"multiple":h=C;default:Je(a,s,g,C,u,null)}s=b,u=_,a.multiple=!!h,s!=null?Ao(a,!!h,s,!1):u!=null&&Ao(a,!!h,u,!0);return;case"textarea":Re("invalid",a),b=g=h=null;for(_ in u)if(u.hasOwnProperty(_)&&(C=u[_],C!=null))switch(_){case"value":h=C;break;case"defaultValue":g=C;break;case"children":b=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(n(91));break;default:Je(a,s,_,C,u,null)}nS(a,h,g,b);return;case"option":for($ in u)if(u.hasOwnProperty($)&&(h=u[$],h!=null))switch($){case"selected":a.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Je(a,s,$,h,u,null)}return;case"dialog":Re("beforetoggle",a),Re("toggle",a),Re("cancel",a),Re("close",a);break;case"iframe":case"object":Re("load",a);break;case"video":case"audio":for(h=0;h<Qu.length;h++)Re(Qu[h],a);break;case"image":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"embed":case"source":case"link":Re("error",a),Re("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in u)if(u.hasOwnProperty(Y)&&(h=u[Y],h!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,Y,h,u,null)}return;default:if(Qp(s)){for(re in u)u.hasOwnProperty(re)&&(h=u[re],h!==void 0&&kv(a,s,re,h,u,void 0));return}}for(C in u)u.hasOwnProperty(C)&&(h=u[C],h!=null&&Je(a,s,C,h,u,null))}function fL(a,s,u,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,b=null,_=null,C=null,$=null,Y=null,re=null;for(J in u){var ie=u[J];if(u.hasOwnProperty(J)&&ie!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":$=ie;default:h.hasOwnProperty(J)||Je(a,s,J,null,h,ie)}}for(var X in h){var J=h[X];if(ie=u[X],h.hasOwnProperty(X)&&(J!=null||ie!=null))switch(X){case"type":b=J;break;case"name":g=J;break;case"checked":Y=J;break;case"defaultChecked":re=J;break;case"value":_=J;break;case"defaultValue":C=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(n(137,s));break;default:J!==ie&&Je(a,s,X,J,h,ie)}}Yp(a,_,C,$,Y,re,b,g);return;case"select":J=_=C=X=null;for(b in u)if($=u[b],u.hasOwnProperty(b)&&$!=null)switch(b){case"value":break;case"multiple":J=$;default:h.hasOwnProperty(b)||Je(a,s,b,null,h,$)}for(g in h)if(b=h[g],$=u[g],h.hasOwnProperty(g)&&(b!=null||$!=null))switch(g){case"value":X=b;break;case"defaultValue":C=b;break;case"multiple":_=b;default:b!==$&&Je(a,s,g,b,h,$)}s=C,u=_,h=J,X!=null?Ao(a,!!u,X,!1):!!h!=!!u&&(s!=null?Ao(a,!!u,s,!0):Ao(a,!!u,u?[]:"",!1));return;case"textarea":J=X=null;for(C in u)if(g=u[C],u.hasOwnProperty(C)&&g!=null&&!h.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Je(a,s,C,null,h,g)}for(_ in h)if(g=h[_],b=u[_],h.hasOwnProperty(_)&&(g!=null||b!=null))switch(_){case"value":X=g;break;case"defaultValue":J=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(n(91));break;default:g!==b&&Je(a,s,_,g,h,b)}rS(a,X,J);return;case"option":for(var me in u)if(X=u[me],u.hasOwnProperty(me)&&X!=null&&!h.hasOwnProperty(me))switch(me){case"selected":a.selected=!1;break;default:Je(a,s,me,null,h,X)}for($ in h)if(X=h[$],J=u[$],h.hasOwnProperty($)&&X!==J&&(X!=null||J!=null))switch($){case"selected":a.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:Je(a,s,$,X,h,J)}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 je in u)X=u[je],u.hasOwnProperty(je)&&X!=null&&!h.hasOwnProperty(je)&&Je(a,s,je,null,h,X);for(Y in h)if(X=h[Y],J=u[Y],h.hasOwnProperty(Y)&&X!==J&&(X!=null||J!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(n(137,s));break;default:Je(a,s,Y,X,h,J)}return;default:if(Qp(s)){for(var et in u)X=u[et],u.hasOwnProperty(et)&&X!==void 0&&!h.hasOwnProperty(et)&&kv(a,s,et,void 0,h,X);for(re in h)X=h[re],J=u[re],!h.hasOwnProperty(re)||X===J||X===void 0&&J===void 0||kv(a,s,re,X,h,J);return}}for(var F in u)X=u[F],u.hasOwnProperty(F)&&X!=null&&!h.hasOwnProperty(F)&&Je(a,s,F,null,h,X);for(ie in h)X=h[ie],J=u[ie],!h.hasOwnProperty(ie)||X===J||X==null&&J==null||Je(a,s,ie,X,h,J)}function sO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hL(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var g=u[h],b=g.transferSize,_=g.initiatorType,C=g.duration;if(b&&C&&sO(_)){for(_=0,C=g.responseEnd,h+=1;h<u.length;h++){var $=u[h],Y=$.startTime;if(Y>C)break;var re=$.transferSize,ie=$.initiatorType;re&&sO(ie)&&($=$.responseEnd,_+=re*($<C?1:(C-Y)/($-Y)))}if(--h,s+=8*(b+_)/(g.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Iv=null,Lv=null;function Df(a){return a.nodeType===9?a:a.ownerDocument}function oO(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function lO(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function $v(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var zv=null;function mL(){var a=window.event;return a&&a.type==="popstate"?a===zv?!1:(zv=a,!0):(zv=null,!1)}var uO=typeof setTimeout=="function"?setTimeout:void 0,pL=typeof clearTimeout=="function"?clearTimeout:void 0,cO=typeof Promise=="function"?Promise:void 0,yL=typeof queueMicrotask=="function"?queueMicrotask:typeof cO<"u"?function(a){return cO.resolve(null).then(a).catch(vL)}:uO;function vL(a){setTimeout(function(){throw a})}function wi(a){return a==="head"}function dO(a,s){var u=s,h=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(h===0){a.removeChild(g),sl(s);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")Zu(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Zu(u);for(var b=u.firstChild;b;){var _=b.nextSibling,C=b.nodeName;b[pu]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=_}}else u==="body"&&Zu(a.ownerDocument.body);u=g}while(u);sl(s)}function fO(a,s){var u=a;a=0;do{var h=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=h}while(u)}function Bv(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Bv(u),Kp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function gL(a,s,u,h){for(;a.nodeType===1;){var g=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(h){if(!a[pu])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==g.rel||a.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||a.getAttribute("title")!==(g.title==null?null:g.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(g.src==null?null:g.src)||a.getAttribute("type")!==(g.type==null?null:g.type)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var b=g.name==null?null:""+g.name;if(g.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=mn(a.nextSibling),a===null)break}return null}function xL(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=mn(a.nextSibling),a===null))return null;return a}function hO(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=mn(a.nextSibling),a===null))return null;return a}function Uv(a){return a.data==="$?"||a.data==="$~"}function qv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function bL(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var h=function(){s(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),a._reactRetry=h}}function mn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var Hv=null;function mO(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return mn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function pO(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return a;s--}else u!=="/$"&&u!=="/&"||s++}a=a.previousSibling}return null}function yO(a,s,u){switch(s=Df(u),a){case"html":if(a=s.documentElement,!a)throw Error(n(452));return a;case"head":if(a=s.head,!a)throw Error(n(453));return a;case"body":if(a=s.body,!a)throw Error(n(454));return a;default:throw Error(n(451))}}function Zu(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Kp(a)}var pn=new Map,vO=new Set;function kf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ta=K.d;K.d={f:jL,r:wL,D:SL,C:NL,L:OL,m:_L,X:AL,S:EL,M:PL};function jL(){var a=Ta.f(),s=_f();return a||s}function wL(a){var s=Oo(a);s!==null&&s.tag===5&&s.type==="form"?D1(s):Ta.r(a)}var nl=typeof document>"u"?null:document;function gO(a,s,u){var h=nl;if(h&&typeof s=="string"&&s){var g=on(s);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),vO.has(g)||(vO.add(g),a={rel:a,crossOrigin:u,href:s},h.querySelector(g)===null&&(s=h.createElement("link"),tr(s,"link",a),Ut(s),h.head.appendChild(s)))}}function SL(a){Ta.D(a),gO("dns-prefetch",a,null)}function NL(a,s){Ta.C(a,s),gO("preconnect",a,s)}function OL(a,s,u){Ta.L(a,s,u);var h=nl;if(h&&a&&s){var g='link[rel="preload"][as="'+on(s)+'"]';s==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+on(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+on(u.imageSizes)+'"]')):g+='[href="'+on(a)+'"]';var b=g;switch(s){case"style":b=al(a);break;case"script":b=il(a)}pn.has(b)||(a=y({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),pn.set(b,a),h.querySelector(g)!==null||s==="style"&&h.querySelector(Wu(b))||s==="script"&&h.querySelector(Ju(b))||(s=h.createElement("link"),tr(s,"link",a),Ut(s),h.head.appendChild(s)))}}function _L(a,s){Ta.m(a,s);var u=nl;if(u&&a){var h=s&&typeof s.as=="string"?s.as:"script",g='link[rel="modulepreload"][as="'+on(h)+'"][href="'+on(a)+'"]',b=g;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=il(a)}if(!pn.has(b)&&(a=y({rel:"modulepreload",href:a},s),pn.set(b,a),u.querySelector(g)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Ju(b)))return}h=u.createElement("link"),tr(h,"link",a),Ut(h),u.head.appendChild(h)}}}function EL(a,s,u){Ta.S(a,s,u);var h=nl;if(h&&a){var g=_o(h).hoistableStyles,b=al(a);s=s||"default";var _=g.get(b);if(!_){var C={loading:0,preload:null};if(_=h.querySelector(Wu(b)))C.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},u),(u=pn.get(b))&&Fv(a,u);var $=_=h.createElement("link");Ut($),tr($,"link",a),$._p=new Promise(function(Y,re){$.onload=Y,$.onerror=re}),$.addEventListener("load",function(){C.loading|=1}),$.addEventListener("error",function(){C.loading|=2}),C.loading|=4,If(_,s,h)}_={type:"stylesheet",instance:_,count:1,state:C},g.set(b,_)}}}function AL(a,s){Ta.X(a,s);var u=nl;if(u&&a){var h=_o(u).hoistableScripts,g=il(a),b=h.get(g);b||(b=u.querySelector(Ju(g)),b||(a=y({src:a,async:!0},s),(s=pn.get(g))&&Kv(a,s),b=u.createElement("script"),Ut(b),tr(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(g,b))}}function PL(a,s){Ta.M(a,s);var u=nl;if(u&&a){var h=_o(u).hoistableScripts,g=il(a),b=h.get(g);b||(b=u.querySelector(Ju(g)),b||(a=y({src:a,async:!0,type:"module"},s),(s=pn.get(g))&&Kv(a,s),b=u.createElement("script"),Ut(b),tr(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},h.set(g,b))}}function xO(a,s,u,h){var g=(g=Se.current)?kf(g):null;if(!g)throw Error(n(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=al(u.href),u=_o(g).hoistableStyles,h=u.get(s),h||(h={type:"style",instance:null,count:0,state:null},u.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=al(u.href);var b=_o(g).hoistableStyles,_=b.get(a);if(_||(g=g.ownerDocument||g,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,_),(b=g.querySelector(Wu(a)))&&!b._p&&(_.instance=b,_.state.loading=5),pn.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},pn.set(a,u),b||TL(g,a,u,_.state))),s&&h===null)throw Error(n(528,""));return _}if(s&&h!==null)throw Error(n(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=il(u),u=_o(g).hoistableScripts,h=u.get(s),h||(h={type:"script",instance:null,count:0,state:null},u.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,a))}}function al(a){return'href="'+on(a)+'"'}function Wu(a){return'link[rel="stylesheet"]['+a+"]"}function bO(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function TL(a,s,u,h){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=a.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),tr(s,"link",u),Ut(s),a.head.appendChild(s))}function il(a){return'[src="'+on(a)+'"]'}function Ju(a){return"script[async]"+a}function jO(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var h=a.querySelector('style[data-href~="'+on(u.href)+'"]');if(h)return s.instance=h,Ut(h),h;var g=y({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(a.ownerDocument||a).createElement("style"),Ut(h),tr(h,"style",g),If(h,u.precedence,a),s.instance=h;case"stylesheet":g=al(u.href);var b=a.querySelector(Wu(g));if(b)return s.state.loading|=4,s.instance=b,Ut(b),b;h=bO(u),(g=pn.get(g))&&Fv(h,g),b=(a.ownerDocument||a).createElement("link"),Ut(b);var _=b;return _._p=new Promise(function(C,$){_.onload=C,_.onerror=$}),tr(b,"link",h),s.state.loading|=4,If(b,u.precedence,a),s.instance=b;case"script":return b=il(u.src),(g=a.querySelector(Ju(b)))?(s.instance=g,Ut(g),g):(h=u,(g=pn.get(b))&&(h=y({},u),Kv(h,g)),a=a.ownerDocument||a,g=a.createElement("script"),Ut(g),tr(g,"link",h),a.head.appendChild(g),s.instance=g);case"void":return null;default:throw Error(n(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,If(h,u.precedence,a));return s.instance}function If(a,s,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=h.length?h[h.length-1]:null,b=g,_=0;_<h.length;_++){var C=h[_];if(C.dataset.precedence===s)b=C;else if(b!==g)break}b?b.parentNode.insertBefore(a,b.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function Fv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Kv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var Lf=null;function wO(a,s,u){if(Lf===null){var h=new Map,g=Lf=new Map;g.set(u,h)}else g=Lf,h=g.get(u),h||(h=new Map,g.set(u,h));if(h.has(a))return h;for(h.set(a,null),u=u.getElementsByTagName(a),g=0;g<u.length;g++){var b=u[g];if(!(b[pu]||b[Zt]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var _=b.getAttribute(s)||"";_=a+_;var C=h.get(_);C?C.push(b):h.set(_,[b])}}return h}function SO(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function CL(a,s,u){if(u===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function NO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function ML(a,s,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=al(h.href),b=s.querySelector(Wu(g));if(b){s=b._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=$f.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=b,Ut(b);return}b=s.ownerDocument||s,h=bO(h),(g=pn.get(g))&&Fv(h,g),b=b.createElement("link"),Ut(b);var _=b;_._p=new Promise(function(C,$){_.onload=C,_.onerror=$}),tr(b,"link",h),u.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=$f.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var Gv=0;function RL(a,s){return a.stylesheets&&a.count===0&&Bf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var h=setTimeout(function(){if(a.stylesheets&&Bf(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+s);0<a.imgBytes&&Gv===0&&(Gv=62500*hL());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Bf(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>Gv?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(h),clearTimeout(g)}}:null}function $f(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var zf=null;function Bf(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,zf=new Map,s.forEach(DL,a),zf=null,$f.call(a))}function DL(a,s){if(!(s.state.loading&4)){var u=zf.get(a);if(u)var h=u.get(null);else{u=new Map,zf.set(a,u);for(var g=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<g.length;b++){var _=g[b];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(u.set(_.dataset.precedence,_),h=_)}h&&u.set(null,h)}g=s.instance,_=g.getAttribute("data-precedence"),b=u.get(_)||h,b===h&&u.set(null,g),u.set(_,g),this.count++,h=$f.bind(this),g.addEventListener("load",h),g.addEventListener("error",h),b?b.parentNode.insertBefore(g,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(g,a.firstChild)),s.state.loading|=4}}var ec={$$typeof:E,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function kL(a,s,u,h,g,b,_,C,$){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Up(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Up(0),this.hiddenUpdates=Up(null),this.identifierPrefix=h,this.onUncaughtError=g,this.onCaughtError=b,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function OO(a,s,u,h,g,b,_,C,$,Y,re,ie){return a=new kL(a,s,u,_,$,Y,re,ie,C),s=1,b===!0&&(s|=24),b=Kr(3,null,null,s),a.current=b,b.stateNode=a,s=Oy(),s.refCount++,a.pooledCache=s,s.refCount++,b.memoizedState={element:h,isDehydrated:u,cache:s},Py(b),a}function _O(a){return a?(a=Io,a):Io}function EO(a,s,u,h,g,b){g=_O(g),h.context===null?h.context=g:h.pendingContext=g,h=di(s),h.payload={element:u},b=b===void 0?null:b,b!==null&&(h.callback=b),u=fi(a,h,s),u!==null&&(Dr(u,a,s),Mu(u,a,s))}function AO(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function Yv(a,s){AO(a,s),(a=a.alternate)&&AO(a,s)}function PO(a){if(a.tag===13||a.tag===31){var s=ds(a,67108864);s!==null&&Dr(s,a,67108864),Yv(a,67108864)}}function TO(a){if(a.tag===13||a.tag===31){var s=Xr();s=qp(s);var u=ds(a,s);u!==null&&Dr(u,a,s),Yv(a,s)}}var Uf=!0;function IL(a,s,u,h){var g=B.T;B.T=null;var b=K.p;try{K.p=2,Vv(a,s,u,h)}finally{K.p=b,B.T=g}}function LL(a,s,u,h){var g=B.T;B.T=null;var b=K.p;try{K.p=8,Vv(a,s,u,h)}finally{K.p=b,B.T=g}}function Vv(a,s,u,h){if(Uf){var g=Qv(h);if(g===null)Dv(a,s,h,qf,u),MO(a,h);else if(zL(g,a,s,u,h))h.stopPropagation();else if(MO(a,h),s&4&&-1<$L.indexOf(a)){for(;g!==null;){var b=Oo(g);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var _=ss(b.pendingLanes);if(_!==0){var C=b;for(C.pendingLanes|=2,C.entangledLanes|=2;_;){var $=1<<31-Hr(_);C.entanglements[1]|=$,_&=~$}Gn(b),(Ke&6)===0&&(Nf=Te()+500,Vu(0))}}break;case 31:case 13:C=ds(b,2),C!==null&&Dr(C,b,2),_f(),Yv(b,2)}if(b=Qv(h),b===null&&Dv(a,s,h,qf,u),b===g)break;g=b}g!==null&&h.stopPropagation()}else Dv(a,s,h,null,u)}}function Qv(a){return a=Zp(a),Xv(a)}var qf=null;function Xv(a){if(qf=null,a=No(a),a!==null){var s=o(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=l(s),a!==null)return a;a=null}else if(u===31){if(a=c(s),a!==null)return a;a=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return qf=a,null}function CO(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ur()){case qn:return 2;case Pd:return 8;case Td:case N5:return 32;case Uw:return 268435456;default:return 32}default:return 32}}var Zv=!1,Si=null,Ni=null,Oi=null,tc=new Map,rc=new Map,_i=[],$L="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 MO(a,s){switch(a){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":Oi=null;break;case"pointerover":case"pointerout":tc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":rc.delete(s.pointerId)}}function nc(a,s,u,h,g,b){return a===null||a.nativeEvent!==b?(a={blockedOn:s,domEventName:u,eventSystemFlags:h,nativeEvent:b,targetContainers:[g]},s!==null&&(s=Oo(s),s!==null&&PO(s)),a):(a.eventSystemFlags|=h,s=a.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),a)}function zL(a,s,u,h,g){switch(s){case"focusin":return Si=nc(Si,a,s,u,h,g),!0;case"dragenter":return Ni=nc(Ni,a,s,u,h,g),!0;case"mouseover":return Oi=nc(Oi,a,s,u,h,g),!0;case"pointerover":var b=g.pointerId;return tc.set(b,nc(tc.get(b)||null,a,s,u,h,g)),!0;case"gotpointercapture":return b=g.pointerId,rc.set(b,nc(rc.get(b)||null,a,s,u,h,g)),!0}return!1}function RO(a){var s=No(a.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){a.blockedOn=s,Yw(a.priority,function(){TO(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,Yw(a.priority,function(){TO(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Hf(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=Qv(a.nativeEvent);if(u===null){u=a.nativeEvent;var h=new u.constructor(u.type,u);Xp=h,u.target.dispatchEvent(h),Xp=null}else return s=Oo(u),s!==null&&PO(s),a.blockedOn=u,!1;s.shift()}return!0}function DO(a,s,u){Hf(a)&&u.delete(s)}function BL(){Zv=!1,Si!==null&&Hf(Si)&&(Si=null),Ni!==null&&Hf(Ni)&&(Ni=null),Oi!==null&&Hf(Oi)&&(Oi=null),tc.forEach(DO),rc.forEach(DO)}function Ff(a,s){a.blockedOn===s&&(a.blockedOn=null,Zv||(Zv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,BL)))}var Kf=null;function kO(a){Kf!==a&&(Kf=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Kf===a&&(Kf=null);for(var s=0;s<a.length;s+=3){var u=a[s],h=a[s+1],g=a[s+2];if(typeof h!="function"){if(Xv(h||u)===null)continue;break}var b=Oo(u);b!==null&&(a.splice(s,3),s-=3,Qy(b,{pending:!0,data:g,method:u.method,action:h},h,g))}}))}function sl(a){function s($){return Ff($,a)}Si!==null&&Ff(Si,a),Ni!==null&&Ff(Ni,a),Oi!==null&&Ff(Oi,a),tc.forEach(s),rc.forEach(s);for(var u=0;u<_i.length;u++){var h=_i[u];h.blockedOn===a&&(h.blockedOn=null)}for(;0<_i.length&&(u=_i[0],u.blockedOn===null);)RO(u),u.blockedOn===null&&_i.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var g=u[h],b=u[h+1],_=g[Ar]||null;if(typeof b=="function")_||kO(u);else if(_){var C=null;if(b&&b.hasAttribute("formAction")){if(g=b,_=b[Ar]||null)C=_.formAction;else if(Xv(g)!==null)continue}else C=_.action;typeof C=="function"?u[h+1]=C:(u.splice(h,3),h-=3),kO(u)}}}function IO(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(_){return g=_})},focusReset:"manual",scroll:"manual"})}function s(){g!==null&&(g(),g=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,g=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),g!==null&&(g(),g=null)}}}function Wv(a){this._internalRoot=a}Gf.prototype.render=Wv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(n(409));var u=s.current,h=Xr();EO(u,h,a,s,null,null)},Gf.prototype.unmount=Wv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;EO(a.current,2,null,a,null,null),_f(),s[So]=null}};function Gf(a){this._internalRoot=a}Gf.prototype.unstable_scheduleHydration=function(a){if(a){var s=Gw();a={blockedOn:null,target:a,priority:s};for(var u=0;u<_i.length&&s!==0&&s<_i[u].priority;u++);_i.splice(u,0,a),u===0&&RO(a)}};var LO=t.version;if(LO!=="19.2.4")throw Error(n(527,LO,"19.2.4"));K.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=m(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var UL={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yf.isDisabled&&Yf.supportsFiber)try{fu=Yf.inject(UL),qr=Yf}catch{}}return ic.createRoot=function(a,s){if(!i(a))throw Error(n(299));var u=!1,h="",g=F1,b=K1,_=G1;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError)),s=OO(a,1,!1,null,null,u,h,null,g,b,_,IO),a[So]=s.current,Rv(a),new Wv(s)},ic.hydrateRoot=function(a,s,u){if(!i(a))throw Error(n(299));var h=!1,g="",b=F1,_=K1,C=G1,$=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(C=u.onRecoverableError),u.formState!==void 0&&($=u.formState)),s=OO(a,1,!0,s,u??null,h,g,$,b,_,C,IO),s.context=_O(null),u=s.current,h=Xr(),h=qp(h),g=di(h),g.callback=null,fi(u,g,h),u=h,s.current.lanes=u,mu(s,u),Gn(s),a[So]=s.current,Rv(a),new Gf(s)},ic.version="19.2.4",ic}var VO;function e$(){if(VO)return ng.exports;VO=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(),ng.exports=JL(),ng.exports}var t$=e$(),tu=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(){}},Bs,Ii,_l,XC,r$=(XC=class extends tu{constructor(){super();xe(this,Bs);xe(this,Ii);xe(this,_l);fe(this,_l,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,Ii)||this.setEventListener(z(this,_l))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Ii))==null||t.call(this),fe(this,Ii,void 0))}setEventListener(t){var r;fe(this,_l,t),(r=z(this,Ii))==null||r.call(this),fe(this,Ii,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){z(this,Bs)!==t&&(fe(this,Bs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof z(this,Bs)=="boolean"?z(this,Bs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Bs=new WeakMap,Ii=new WeakMap,_l=new WeakMap,XC),Ab=new r$,n$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Li,Eb,ZC,a$=(ZC=class{constructor(){xe(this,Li,n$);xe(this,Eb,!1)}setTimeoutProvider(e){fe(this,Li,e)}setTimeout(e,t){return z(this,Li).setTimeout(e,t)}clearTimeout(e){z(this,Li).clearTimeout(e)}setInterval(e,t){return z(this,Li).setInterval(e,t)}clearInterval(e){z(this,Li).clearInterval(e)}},Li=new WeakMap,Eb=new WeakMap,ZC),Ms=new a$;function i$(e){setTimeout(e,0)}var s$=typeof window>"u"||"Deno"in globalThis;function br(){}function o$(e,t){return typeof e=="function"?e(t):e}function ax(e){return typeof e=="number"&&e>=0&&e!==1/0}function l2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Vi(e,t){return typeof e=="function"?e(t):e}function wn(e,t){return typeof e=="function"?e(t):e}function QO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:l,stale:c}=e;if(l){if(n){if(t.queryHash!==Pb(l,t.options))return!1}else if(!Tc(t.queryKey,l))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function XO(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(to(t.options.mutationKey)!==to(o))return!1}else if(!Tc(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Pb(e,t){return((t==null?void 0:t.queryKeyHashFn)||to)(e)}function to(e){return JSON.stringify(e,(t,r)=>ix(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Tc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Tc(e[r],t[r])):!1}var l$=Object.prototype.hasOwnProperty;function u2(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=ZO(e)&&ZO(t);if(!n&&!(ix(e)&&ix(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),c=l.length,f=n?new Array(c):{};let m=0;for(let p=0;p<c;p++){const y=n?p:l[p],v=e[y],x=t[y];if(v===x){f[y]=v,(n?p<o:l$.call(e,y))&&m++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){f[y]=x;continue}const j=u2(v,x,r+1);f[y]=j,j===v&&m++}return o===c&&m===o?e:f}function Eh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function ZO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ix(e){if(!WO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!WO(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function WO(e){return Object.prototype.toString.call(e)==="[object Object]"}function u$(e){return new Promise(t=>{Ms.setTimeout(t,e)})}function sx(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?u2(e,t):t}function c$(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function d$(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Tb=Symbol();function c2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Tb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Cb(e,t){return typeof e=="function"?e(...t):!!e}function f$(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Cc=(()=>{let e=()=>s$;return{isServer(){return e()},setIsServer(t){e=t}}})();function ox(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var h$=i$;function m$(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=h$;const o=c=>{t?e.push(c):i(()=>{r(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||l()}return f},batchCalls:c=>(...f)=>{o(()=>{c(...f)})},schedule:o,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var $t=m$(),El,$i,Al,WC,p$=(WC=class extends tu{constructor(){super();xe(this,El,!0);xe(this,$i);xe(this,Al);fe(this,Al,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){z(this,$i)||this.setEventListener(z(this,Al))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,$i))==null||t.call(this),fe(this,$i,void 0))}setEventListener(t){var r;fe(this,Al,t),(r=z(this,$i))==null||r.call(this),fe(this,$i,t(this.setOnline.bind(this)))}setOnline(t){z(this,El)!==t&&(fe(this,El,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return z(this,El)}},El=new WeakMap,$i=new WeakMap,Al=new WeakMap,WC),Ah=new p$;function y$(e){return Math.min(1e3*2**e,3e4)}function d2(e){return(e??"online")==="online"?Ah.isOnline():!0}var lx=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function f2(e){let t=!1,r=0,n;const i=ox(),o=()=>i.status!=="pending",l=w=>{var N;if(!o()){const O=new lx(w);v(O),(N=e.onCancel)==null||N.call(e,O)}},c=()=>{t=!0},f=()=>{t=!1},m=()=>Ab.isFocused()&&(e.networkMode==="always"||Ah.isOnline())&&e.canRun(),p=()=>d2(e.networkMode)&&e.canRun(),y=w=>{o()||(n==null||n(),i.resolve(w))},v=w=>{o()||(n==null||n(),i.reject(w))},x=()=>new Promise(w=>{var N;n=O=>{(o()||m())&&w(O)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;n=void 0,o()||(w=e.onContinue)==null||w.call(e)}),j=()=>{if(o())return;let w;const N=r===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(O){w=Promise.reject(O)}Promise.resolve(w).then(y).catch(O=>{var M;if(o())return;const P=e.retry??(Cc.isServer()?0:3),E=e.retryDelay??y$,A=typeof E=="function"?E(r,O):E,T=P===!0||typeof P=="number"&&r<P||typeof P=="function"&&P(r,O);if(t||!T){v(O);return}r++,(M=e.onFail)==null||M.call(e,r,O),u$(A).then(()=>m()?void 0:x()).then(()=>{t?v(O):j()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:f,canStart:p,start:()=>(p()?j():x().then(j),i)}}var Us,JC,h2=(JC=class{constructor(){xe(this,Us)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ax(this.gcTime)&&fe(this,Us,Ms.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Cc.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,Us)&&(Ms.clearTimeout(z(this,Us)),fe(this,Us,void 0))}},Us=new WeakMap,JC),qs,Pl,bn,Hs,Ht,ed,Fs,Zr,m2,Ca,e2,v$=(e2=class extends h2{constructor(t){super();xe(this,Zr);xe(this,qs);xe(this,Pl);xe(this,bn);xe(this,Hs);xe(this,Ht);xe(this,ed);xe(this,Fs);fe(this,Fs,!1),fe(this,ed,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,Hs,t.client),fe(this,bn,z(this,Hs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,qs,e_(this.options)),this.state=t.state??z(this,qs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,Ht))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,ed),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=e_(this.options);r.data!==void 0&&(this.setState(JO(r.data,r.dataUpdatedAt)),fe(this,qs,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,bn).remove(this)}setData(t,r){const n=sx(this.state.data,t,this.options);return Pe(this,Zr,Ca).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Pe(this,Zr,Ca).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=z(this,Ht))==null?void 0:n.promise;return(i=z(this,Ht))==null||i.cancel(t),r?r.then(br).catch(br):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,qs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>wn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Tb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Vi(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:!l2(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Ht))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Ht))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,bn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(z(this,Ht)&&(z(this,Fs)||Pe(this,Zr,m2).call(this)?z(this,Ht).cancel({revert:!0}):z(this,Ht).cancelRetry()),this.scheduleGc()),z(this,bn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,Zr,Ca).call(this,{type:"invalidate"})}async fetch(t,r){var f,m,p,y,v,x,j,w,N,O,P,E;if(this.state.fetchStatus!=="idle"&&((f=z(this,Ht))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,Ht))return z(this,Ht).continueRetry(),z(this,Ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(T=>T.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(fe(this,Fs,!0),n.signal)})},o=()=>{const A=c2(this.options,r),M=(()=>{const R={client:z(this,Hs),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return fe(this,Fs,!1),this.options.persister?this.options.persister(A,M,this):A(M)},c=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,Hs),state:this.state,fetchFn:o};return i(A),A})();(m=this.options.behavior)==null||m.onFetch(c,this),fe(this,Pl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Pe(this,Zr,Ca).call(this,{type:"fetch",meta:(y=c.fetchOptions)==null?void 0:y.meta}),fe(this,Ht,f2({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof lx&&A.revert&&this.setState({...z(this,Pl),fetchStatus:"idle"}),n.abort()},onFail:(A,T)=>{Pe(this,Zr,Ca).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{Pe(this,Zr,Ca).call(this,{type:"pause"})},onContinue:()=>{Pe(this,Zr,Ca).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await z(this,Ht).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(x=(v=z(this,bn).config).onSuccess)==null||x.call(v,A,this),(w=(j=z(this,bn).config).onSettled)==null||w.call(j,A,this.state.error,this),A}catch(A){if(A instanceof lx){if(A.silent)return z(this,Ht).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Pe(this,Zr,Ca).call(this,{type:"error",error:A}),(O=(N=z(this,bn).config).onError)==null||O.call(N,A,this),(E=(P=z(this,bn).config).onSettled)==null||E.call(P,this.state.data,A,this),A}finally{this.scheduleGc()}}},qs=new WeakMap,Pl=new WeakMap,bn=new WeakMap,Hs=new WeakMap,Ht=new WeakMap,ed=new WeakMap,Fs=new WeakMap,Zr=new WeakSet,m2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ca=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...p2(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...JO(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Pl,t.manual?i:void 0),i;case"error":const o=t.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),$t.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),z(this,bn).notify({query:this,type:"updated",action:t})})},e2);function p2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:d2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function JO(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,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var kr,$e,td,xr,Ks,Tl,Ra,zi,rd,Cl,Ml,Gs,Ys,Bi,Rl,Ge,wc,ux,cx,dx,fx,hx,mx,px,v2,t2,y2=(t2=class extends tu{constructor(t,r){super();xe(this,Ge);xe(this,kr);xe(this,$e);xe(this,td);xe(this,xr);xe(this,Ks);xe(this,Tl);xe(this,Ra);xe(this,zi);xe(this,rd);xe(this,Cl);xe(this,Ml);xe(this,Gs);xe(this,Ys);xe(this,Bi);xe(this,Rl,new Set);this.options=r,fe(this,kr,t),fe(this,zi,null),fe(this,Ra,ox()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,$e).addObserver(this),t_(z(this,$e),this.options)?Pe(this,Ge,wc).call(this):this.updateResult(),Pe(this,Ge,fx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yx(z(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yx(z(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,Ge,hx).call(this),Pe(this,Ge,mx).call(this),z(this,$e).removeObserver(this)}setOptions(t){const r=this.options,n=z(this,$e);if(this.options=z(this,kr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wn(this.options.enabled,z(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,Ge,px).call(this),z(this,$e).setOptions(this.options),r._defaulted&&!Eh(this.options,r)&&z(this,kr).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,$e),observer:this});const i=this.hasListeners();i&&r_(z(this,$e),n,this.options,r)&&Pe(this,Ge,wc).call(this),this.updateResult(),i&&(z(this,$e)!==n||wn(this.options.enabled,z(this,$e))!==wn(r.enabled,z(this,$e))||Vi(this.options.staleTime,z(this,$e))!==Vi(r.staleTime,z(this,$e)))&&Pe(this,Ge,ux).call(this);const o=Pe(this,Ge,cx).call(this);i&&(z(this,$e)!==n||wn(this.options.enabled,z(this,$e))!==wn(r.enabled,z(this,$e))||o!==z(this,Bi))&&Pe(this,Ge,dx).call(this,o)}getOptimisticResult(t){const r=z(this,kr).getQueryCache().build(z(this,kr),t),n=this.createResult(r,t);return x$(this,n)&&(fe(this,xr,n),fe(this,Tl,this.options),fe(this,Ks,z(this,$e).state)),n}getCurrentResult(){return z(this,xr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Ra).status==="pending"&&z(this,Ra).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){z(this,Rl).add(t)}getCurrentQuery(){return z(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=z(this,kr).defaultQueryOptions(t),n=z(this,kr).getQueryCache().build(z(this,kr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Pe(this,Ge,wc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,xr)))}createResult(t,r){var I;const n=z(this,$e),i=this.options,o=z(this,xr),l=z(this,Ks),c=z(this,Tl),m=t!==n?t.state:z(this,td),{state:p}=t;let y={...p},v=!1,x;if(r._optimisticResults){const k=this.hasListeners(),H=!k&&t_(t,r),q=k&&r_(t,n,r,i);(H||q)&&(y={...y,...p2(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:j,errorUpdatedAt:w,status:N}=y;x=y.data;let O=!1;if(r.placeholderData!==void 0&&x===void 0&&N==="pending"){let k;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(k=o.data,O=!0):k=typeof r.placeholderData=="function"?r.placeholderData((I=z(this,Ml))==null?void 0:I.state.data,z(this,Ml)):r.placeholderData,k!==void 0&&(N="success",x=sx(o==null?void 0:o.data,k,r),v=!0)}if(r.select&&x!==void 0&&!O)if(o&&x===(l==null?void 0:l.data)&&r.select===z(this,rd))x=z(this,Cl);else try{fe(this,rd,r.select),x=r.select(x),x=sx(o==null?void 0:o.data,x,r),fe(this,Cl,x),fe(this,zi,null)}catch(k){fe(this,zi,k)}z(this,zi)&&(j=z(this,zi),x=z(this,Cl),w=Date.now(),N="error");const P=y.fetchStatus==="fetching",E=N==="pending",A=N==="error",T=E&&P,M=x!==void 0,D={status:N,fetchStatus:y.fetchStatus,isPending:E,isSuccess:N==="success",isError:A,isInitialLoading:T,isLoading:T,data:x,dataUpdatedAt:y.dataUpdatedAt,error:j,errorUpdatedAt:w,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:P,isRefetching:P&&!E,isLoadingError:A&&!M,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&M,isStale:Mb(t,r),refetch:this.refetch,promise:z(this,Ra),isEnabled:wn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=D.data!==void 0,H=D.status==="error"&&!k,q=Z=>{H?Z.reject(D.error):k&&Z.resolve(D.data)},ae=()=>{const Z=fe(this,Ra,D.promise=ox());q(Z)},Q=z(this,Ra);switch(Q.status){case"pending":t.queryHash===n.queryHash&&q(Q);break;case"fulfilled":(H||D.data!==Q.value)&&ae();break;case"rejected":(!H||D.error!==Q.reason)&&ae();break}}return D}updateResult(){const t=z(this,xr),r=this.createResult(z(this,$e),this.options);if(fe(this,Ks,z(this,$e).state),fe(this,Tl,this.options),z(this,Ks).data!==void 0&&fe(this,Ml,z(this,$e)),Eh(r,t))return;fe(this,xr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!z(this,Rl).size)return!0;const l=new Set(o??z(this,Rl));return this.options.throwOnError&&l.add("error"),Object.keys(z(this,xr)).some(c=>{const f=c;return z(this,xr)[f]!==t[f]&&l.has(f)})};Pe(this,Ge,v2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,Ge,fx).call(this)}},kr=new WeakMap,$e=new WeakMap,td=new WeakMap,xr=new WeakMap,Ks=new WeakMap,Tl=new WeakMap,Ra=new WeakMap,zi=new WeakMap,rd=new WeakMap,Cl=new WeakMap,Ml=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Bi=new WeakMap,Rl=new WeakMap,Ge=new WeakSet,wc=function(t){Pe(this,Ge,px).call(this);let r=z(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(br)),r},ux=function(){Pe(this,Ge,hx).call(this);const t=Vi(this.options.staleTime,z(this,$e));if(Cc.isServer()||z(this,xr).isStale||!ax(t))return;const n=l2(z(this,xr).dataUpdatedAt,t)+1;fe(this,Gs,Ms.setTimeout(()=>{z(this,xr).isStale||this.updateResult()},n))},cx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,$e)):this.options.refetchInterval)??!1},dx=function(t){Pe(this,Ge,mx).call(this),fe(this,Bi,t),!(Cc.isServer()||wn(this.options.enabled,z(this,$e))===!1||!ax(z(this,Bi))||z(this,Bi)===0)&&fe(this,Ys,Ms.setInterval(()=>{(this.options.refetchIntervalInBackground||Ab.isFocused())&&Pe(this,Ge,wc).call(this)},z(this,Bi)))},fx=function(){Pe(this,Ge,ux).call(this),Pe(this,Ge,dx).call(this,Pe(this,Ge,cx).call(this))},hx=function(){z(this,Gs)&&(Ms.clearTimeout(z(this,Gs)),fe(this,Gs,void 0))},mx=function(){z(this,Ys)&&(Ms.clearInterval(z(this,Ys)),fe(this,Ys,void 0))},px=function(){const t=z(this,kr).getQueryCache().build(z(this,kr),this.options);if(t===z(this,$e))return;const r=z(this,$e);fe(this,$e,t),fe(this,td,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},v2=function(t){$t.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(z(this,xr))}),z(this,kr).getQueryCache().notify({query:z(this,$e),type:"observerResultsUpdated"})})},t2);function g$(e,t){return wn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function t_(e,t){return g$(e,t)||e.state.data!==void 0&&yx(e,t,t.refetchOnMount)}function yx(e,t,r){if(wn(t.enabled,e)!==!1&&Vi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Mb(e,t)}return!1}function r_(e,t,r,n){return(e!==t||wn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Mb(e,r)}function Mb(e,t){return wn(t.enabled,e)!==!1&&e.isStaleByTime(Vi(t.staleTime,e))}function x$(e,t){return!Eh(e.getCurrentResult(),t)}function Ph(e){return{onFetch:(t,r)=>{var p,y,v,x,j;const n=t.options,i=(v=(y=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:y.fetchMore)==null?void 0:v.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],l=((j=t.state.data)==null?void 0:j.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const m=async()=>{let w=!1;const N=E=>{f$(E,()=>t.signal,()=>w=!0)},O=c2(t.options,t.fetchOptions),P=async(E,A,T)=>{if(w)return Promise.reject();if(A==null&&E.pages.length)return Promise.resolve(E);const R=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:A,direction:T?"backward":"forward",meta:t.options.meta};return N(H),H})(),D=await O(R),{maxPages:I}=t.options,k=T?d$:c$;return{pages:k(E.pages,D,I),pageParams:k(E.pageParams,A,I)}};if(i&&o.length){const E=i==="backward",A=E?g2:vx,T={pages:o,pageParams:l},M=A(n,T);c=await P(T,M,E)}else{const E=e??o.length;do{const A=f===0?l[0]??n.initialPageParam:vx(n,c);if(f>0&&A==null)break;c=await P(c,A),f++}while(f<E)}return c};t.options.persister?t.fetchFn=()=>{var w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=m}}}function vx(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function g2(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function b$(e,t){return t?vx(e,t)!=null:!1}function j$(e,t){return!t||!e.getPreviousPageParam?!1:g2(e,t)!=null}var w$=class extends y2{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:Ph()})}getOptimisticResult(e){return e.behavior=Ph(),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 j,w;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:l,isRefetchError:c}=n,f=(w=(j=r.fetchMeta)==null?void 0:j.fetchMore)==null?void 0:w.direction,m=l&&f==="forward",p=i&&f==="forward",y=l&&f==="backward",v=i&&f==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:b$(t,r.data),hasPreviousPage:j$(t,r.data),isFetchNextPageError:m,isFetchingNextPage:p,isFetchPreviousPageError:y,isFetchingPreviousPage:v,isRefetchError:c&&!m&&!y,isRefetching:o&&!p&&!v}}},nd,Zn,dr,Vs,Wn,Ti,r2,S$=(r2=class extends h2{constructor(t){super();xe(this,Wn);xe(this,nd);xe(this,Zn);xe(this,dr);xe(this,Vs);fe(this,nd,t.client),this.mutationId=t.mutationId,fe(this,dr,t.mutationCache),fe(this,Zn,[]),this.state=t.state||x2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Zn).includes(t)||(z(this,Zn).push(t),this.clearGcTimeout(),z(this,dr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,Zn,z(this,Zn).filter(r=>r!==t)),this.scheduleGc(),z(this,dr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Zn).length||(this.state.status==="pending"?this.scheduleGc():z(this,dr).remove(this))}continue(){var t;return((t=z(this,Vs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,f,m,p,y,v,x,j,w,N,O,P,E,A,T,M,R;const r=()=>{Pe(this,Wn,Ti).call(this,{type:"continue"})},n={client:z(this,nd),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Vs,f2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(D,I)=>{Pe(this,Wn,Ti).call(this,{type:"failed",failureCount:D,error:I})},onPause:()=>{Pe(this,Wn,Ti).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,dr).canRun(this)}));const i=this.state.status==="pending",o=!z(this,Vs).canStart();try{if(i)r();else{Pe(this,Wn,Ti).call(this,{type:"pending",variables:t,isPaused:o}),z(this,dr).config.onMutate&&await z(this,dr).config.onMutate(t,this,n);const I=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,n));I!==this.state.context&&Pe(this,Wn,Ti).call(this,{type:"pending",context:I,variables:t,isPaused:o})}const D=await z(this,Vs).start();return await((m=(f=z(this,dr).config).onSuccess)==null?void 0:m.call(f,D,t,this.state.context,this,n)),await((y=(p=this.options).onSuccess)==null?void 0:y.call(p,D,t,this.state.context,n)),await((x=(v=z(this,dr).config).onSettled)==null?void 0:x.call(v,D,null,this.state.variables,this.state.context,this,n)),await((w=(j=this.options).onSettled)==null?void 0:w.call(j,D,null,t,this.state.context,n)),Pe(this,Wn,Ti).call(this,{type:"success",data:D}),D}catch(D){try{await((O=(N=z(this,dr).config).onError)==null?void 0:O.call(N,D,t,this.state.context,this,n))}catch(I){Promise.reject(I)}try{await((E=(P=this.options).onError)==null?void 0:E.call(P,D,t,this.state.context,n))}catch(I){Promise.reject(I)}try{await((T=(A=z(this,dr).config).onSettled)==null?void 0:T.call(A,void 0,D,this.state.variables,this.state.context,this,n))}catch(I){Promise.reject(I)}try{await((R=(M=this.options).onSettled)==null?void 0:R.call(M,void 0,D,t,this.state.context,n))}catch(I){Promise.reject(I)}throw Pe(this,Wn,Ti).call(this,{type:"error",error:D}),D}finally{z(this,dr).runNext(this)}}},nd=new WeakMap,Zn=new WeakMap,dr=new WeakMap,Vs=new WeakMap,Wn=new WeakSet,Ti=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,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{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),$t.batch(()=>{z(this,Zn).forEach(n=>{n.onMutationUpdate(t)}),z(this,dr).notify({mutation:this,type:"updated",action:t})})},r2);function x2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Da,Mn,ad,n2,N$=(n2=class extends tu{constructor(t={}){super();xe(this,Da);xe(this,Mn);xe(this,ad);this.config=t,fe(this,Da,new Set),fe(this,Mn,new Map),fe(this,ad,0)}build(t,r,n){const i=new S$({client:t,mutationCache:this,mutationId:++Vf(this,ad)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){z(this,Da).add(t);const r=Qf(t);if(typeof r=="string"){const n=z(this,Mn).get(r);n?n.push(t):z(this,Mn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Da).delete(t)){const r=Qf(t);if(typeof r=="string"){const n=z(this,Mn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&z(this,Mn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Qf(t);if(typeof r=="string"){const n=z(this,Mn).get(r),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Qf(t);if(typeof r=="string"){const i=(n=z(this,Mn).get(r))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){$t.batch(()=>{z(this,Da).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Da).clear(),z(this,Mn).clear()})}getAll(){return Array.from(z(this,Da))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>XO(r,n))}findAll(t={}){return this.getAll().filter(r=>XO(t,r))}notify(t){$t.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return $t.batch(()=>Promise.all(t.map(r=>r.continue().catch(br))))}},Da=new WeakMap,Mn=new WeakMap,ad=new WeakMap,n2);function Qf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ka,Ui,Ir,Ia,Ka,vh,gx,a2,O$=(a2=class extends tu{constructor(r,n){super();xe(this,Ka);xe(this,ka);xe(this,Ui);xe(this,Ir);xe(this,Ia);fe(this,ka,r),this.setOptions(n),this.bindMethods(),Pe(this,Ka,vh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=z(this,ka).defaultMutationOptions(r),Eh(this.options,n)||z(this,ka).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,Ir),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&to(n.mutationKey)!==to(this.options.mutationKey)?this.reset():((i=z(this,Ir))==null?void 0:i.state.status)==="pending"&&z(this,Ir).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=z(this,Ir))==null||r.removeObserver(this)}onMutationUpdate(r){Pe(this,Ka,vh).call(this),Pe(this,Ka,gx).call(this,r)}getCurrentResult(){return z(this,Ui)}reset(){var r;(r=z(this,Ir))==null||r.removeObserver(this),fe(this,Ir,void 0),Pe(this,Ka,vh).call(this),Pe(this,Ka,gx).call(this)}mutate(r,n){var i;return fe(this,Ia,n),(i=z(this,Ir))==null||i.removeObserver(this),fe(this,Ir,z(this,ka).getMutationCache().build(z(this,ka),this.options)),z(this,Ir).addObserver(this),z(this,Ir).execute(r)}},ka=new WeakMap,Ui=new WeakMap,Ir=new WeakMap,Ia=new WeakMap,Ka=new WeakSet,vh=function(){var n;const r=((n=z(this,Ir))==null?void 0:n.state)??x2();fe(this,Ui,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},gx=function(r){$t.batch(()=>{var n,i,o,l,c,f,m,p;if(z(this,Ia)&&this.hasListeners()){const y=z(this,Ui).variables,v=z(this,Ui).context,x={client:z(this,ka),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(i=(n=z(this,Ia)).onSuccess)==null||i.call(n,r.data,y,v,x)}catch(j){Promise.reject(j)}try{(l=(o=z(this,Ia)).onSettled)==null||l.call(o,r.data,null,y,v,x)}catch(j){Promise.reject(j)}}else if((r==null?void 0:r.type)==="error"){try{(f=(c=z(this,Ia)).onError)==null||f.call(c,r.error,y,v,x)}catch(j){Promise.reject(j)}try{(p=(m=z(this,Ia)).onSettled)==null||p.call(m,void 0,r.error,y,v,x)}catch(j){Promise.reject(j)}}}this.listeners.forEach(y=>{y(z(this,Ui))})})},a2),Jn,i2,_$=(i2=class extends tu{constructor(t={}){super();xe(this,Jn);this.config=t,fe(this,Jn,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Pb(i,r);let l=this.get(o);return l||(l=new v$({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){z(this,Jn).has(t.queryHash)||(z(this,Jn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=z(this,Jn).get(t.queryHash);r&&(t.destroy(),r===t&&z(this,Jn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){$t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Jn).get(t)}getAll(){return[...z(this,Jn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>QO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>QO(t,n)):r}notify(t){$t.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){$t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){$t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jn=new WeakMap,i2),gt,qi,Hi,Dl,kl,Fi,Il,Ll,s2,E$=(s2=class{constructor(e={}){xe(this,gt);xe(this,qi);xe(this,Hi);xe(this,Dl);xe(this,kl);xe(this,Fi);xe(this,Il);xe(this,Ll);fe(this,gt,e.queryCache||new _$),fe(this,qi,e.mutationCache||new N$),fe(this,Hi,e.defaultOptions||{}),fe(this,Dl,new Map),fe(this,kl,new Map),fe(this,Fi,0)}mount(){Vf(this,Fi)._++,z(this,Fi)===1&&(fe(this,Il,Ab.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,gt).onFocus())})),fe(this,Ll,Ah.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,gt).onOnline())})))}unmount(){var e,t;Vf(this,Fi)._--,z(this,Fi)===0&&((e=z(this,Il))==null||e.call(this),fe(this,Il,void 0),(t=z(this,Ll))==null||t.call(this),fe(this,Ll,void 0))}isFetching(e){return z(this,gt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,qi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,gt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=z(this,gt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Vi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return z(this,gt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=z(this,gt).get(n.queryHash),o=i==null?void 0:i.state.data,l=o$(t,o);if(l!==void 0)return z(this,gt).build(this,n).setData(l,{...r,manual:!0})}setQueriesData(e,t,r){return $t.batch(()=>z(this,gt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,gt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=z(this,gt);$t.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=z(this,gt);return $t.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=$t.batch(()=>z(this,gt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(br).catch(br)}invalidateQueries(e,t={}){return $t.batch(()=>(z(this,gt).findAll(e).forEach(r=>{r.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 r={...t,cancelRefetch:t.cancelRefetch??!0},n=$t.batch(()=>z(this,gt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(br)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(br)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=z(this,gt).build(this,t);return r.isStaleByTime(Vi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(br).catch(br)}fetchInfiniteQuery(e){return e.behavior=Ph(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(br).catch(br)}ensureInfiniteQueryData(e){return e.behavior=Ph(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ah.isOnline()?z(this,qi).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,gt)}getMutationCache(){return z(this,qi)}getDefaultOptions(){return z(this,Hi)}setDefaultOptions(e){fe(this,Hi,e)}setQueryDefaults(e,t){z(this,Dl).set(to(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,Dl).values()],r={};return t.forEach(n=>{Tc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){z(this,kl).set(to(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,kl).values()],r={};return t.forEach(n=>{Tc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,Hi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Pb(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===Tb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,Hi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,gt).clear(),z(this,qi).clear()}},gt=new WeakMap,qi=new WeakMap,Hi=new WeakMap,Dl=new WeakMap,kl=new WeakMap,Fi=new WeakMap,Il=new WeakMap,Ll=new WeakMap,s2),b2=S.createContext(void 0),ca=e=>{const t=S.useContext(b2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},A$=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(b2.Provider,{value:e,children:t})),j2=S.createContext(!1),P$=()=>S.useContext(j2);j2.Provider;function T$(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var C$=S.createContext(T$()),M$=()=>S.useContext(C$),R$=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Cb(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},D$=e=>{S.useEffect(()=>{e.clearReset()},[e])},k$=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Cb(r,[e.error,n])),I$=e=>{if(e.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...i)=>r(n(...i)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},L$=(e,t)=>e.isLoading&&e.isFetching&&!t,$$=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,n_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function w2(e,t,r){var v,x,j,w;const n=P$(),i=M$(),o=ca(),l=o.defaultQueryOptions(e);(x=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=n?"isRestoring":"optimistic",I$(l),R$(l,i,c),D$(i);const f=!o.getQueryCache().get(l.queryHash),[m]=S.useState(()=>new t(o,l)),p=m.getOptimisticResult(l),y=!n&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const O=y?m.subscribe($t.batchCalls(N)):br;return m.updateResult(),O},[m,y]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),S.useEffect(()=>{m.setOptions(l)},[l,m]),$$(l,p))throw n_(l,m,i);if(k$({result:p,errorResetBoundary:i,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;if((w=(j=o.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||w.call(j,l,p),l.experimental_prefetchInRender&&!Cc.isServer()&&L$(p,n)){const N=f?n_(l,m,i):c==null?void 0:c.promise;N==null||N.catch(br).finally(()=>{m.updateResult()})}return l.notifyOnChangeProps?p:m.trackResult(p)}function Ue(e,t){return w2(e,y2)}function xx(e,t){const r=ca(),[n]=S.useState(()=>new O$(r,e));S.useEffect(()=>{n.setOptions(e)},[n,e]);const i=S.useSyncExternalStore(S.useCallback(l=>n.subscribe($t.batchCalls(l)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=S.useCallback((l,c)=>{n.mutate(l,c).catch(br)},[n]);if(i.error&&Cb(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function S2(e,t){return w2(e,w$)}var Sc=typeof window<"u"?S.useLayoutEffect:S.useEffect;function og(e){const t=S.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function z$(e,t,r={},n={}){S.useEffect(()=>{if(!e.current||n.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{t(o)},r);return i.observe(e.current),()=>{i.disconnect()}},[t,r,n.disabled,e])}function B$(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}var N2=!1;function Mc(e){return e[e.length-1]}function U$(e){return typeof e=="function"}function Ki(e,t){return U$(e)?e(t):e}var q$=Object.prototype.hasOwnProperty,a_=Object.prototype.propertyIsEnumerable,H$=()=>Object.create(null),Ns=(e,t)=>$a(e,t,H$);function $a(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const i=t,o=o_(e)&&o_(i);if(!o&&!(zl(e)&&zl(i)))return i;const l=o?e:i_(e);if(!l)return i;const c=o?i:i_(i);if(!c)return i;const f=l.length,m=c.length,p=o?new Array(m):r();let y=0;for(let v=0;v<m;v++){const x=o?v:c[v],j=e[x],w=i[x];if(j===w){p[x]=j,(o?v<f:q$.call(e,x))&&y++;continue}if(j===null||w===null||typeof j!="object"||typeof w!="object"){p[x]=w;continue}const N=$a(j,w,r,n+1);p[x]=N,N===j&&y++}return f===m&&y===f?e:p}function i_(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!a_.call(e,i))return!1;const r=Object.getOwnPropertySymbols(e);if(r.length===0)return t;const n=t;for(const i of r){if(!a_.call(e,i))return!1;n.push(i)}return n}function zl(e){if(!s_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!s_(r)||!r.hasOwnProperty("isPrototypeOf"))}function s_(e){return Object.prototype.toString.call(e)==="[object Object]"}function o_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qs(e,t,r){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 n=0,i=e.length;n<i;n++)if(!Qs(e[n],t[n],r))return!1;return!0}if(zl(e)&&zl(t)){const n=(r==null?void 0:r.ignoreUndefined)??!0;if(r!=null&&r.partial){for(const l in t)if((!n||t[l]!==void 0)&&!Qs(e[l],t[l],r))return!1;return!0}let i=0;if(!n)i=Object.keys(e).length;else for(const l in e)e[l]!==void 0&&i++;let o=0;for(const l in t)if((!n||t[l]!==void 0)&&(o++,o>i||!Qs(e[l],t[l],r)))return!1;return i===o}return!1}function Bl(e){let t,r;const n=new Promise((i,o)=>{t=i,r=o});return n.status="pending",n.resolve=i=>{n.status="resolved",n.value=i,t(i),e==null||e(i)},n.reject=i=>{n.status="rejected",r(i)},n}function Rc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function F$(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function l_(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,r=>{try{return decodeURI(r)}catch{return r}})}return F$(t)}var K$=["http:","https:","mailto:","tel:"];function Th(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}function sc(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 r=0,n="",i;for(;(i=t.exec(e))!==null;)n+=l_(e.slice(r,i.index))+i[0],r=t.lastIndex;n=n+l_(r?e.slice(r):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function G$(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Y$(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Ua(){throw new Error("Invariant failed")}function Dc(e){const t=new Map;let r,n;const i=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,n&&(n.next=o,o.prev=n)):(o.next.prev=void 0,r=o.next,o.next=void 0,n&&(o.prev=n,n.next=o)),n=o)};return{get(o){const l=t.get(o);if(l)return i(l),l.value},set(o,l){if(t.size>=e&&r){const f=r;t.delete(f.key),f.next&&(r=f.next,f.next.prev=void 0),f===n&&(n=void 0)}const c=t.get(o);if(c)c.value=l,i(c);else{const f={key:o,value:l,prev:n};n&&(n.next=f),n=f,r||(r=f),t.set(o,f)}},clear(){t.clear(),r=void 0,n=void 0}}}var Rs=4,O2=5;function V$(e){const t=e.indexOf("{");if(t===-1)return null;const r=e.indexOf("}",t);return r===-1||t+1>=e.length?null:[t,r]}function Rb(e,t,r=new Uint16Array(6)){const n=e.indexOf("/",t),i=n===-1?e.length:n,o=e.substring(t,i);if(!o||!o.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r;if(o==="$"){const c=e.length;return r[0]=2,r[1]=t,r[2]=t,r[3]=c,r[4]=c,r[5]=c,r}if(o.charCodeAt(0)===36)return r[0]=1,r[1]=t,r[2]=t+1,r[3]=i,r[4]=i,r[5]=i,r;const l=V$(o);if(l){const[c,f]=l,m=o.charCodeAt(c+1);if(m===45){if(c+2<o.length&&o.charCodeAt(c+2)===36){const p=c+3,y=f;if(p<y)return r[0]=3,r[1]=t+c,r[2]=t+p,r[3]=t+y,r[4]=t+f+1,r[5]=i,r}}else if(m===36){const p=c+1,y=c+2;return y===f?(r[0]=2,r[1]=t+c,r[2]=t+p,r[3]=t+y,r[4]=t+f+1,r[5]=e.length,r):(r[0]=1,r[1]=t+c,r[2]=t+y,r[3]=t+f,r[4]=t+f+1,r[5]=i,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r}function Rm(e,t,r,n,i,o,l){var f,m,p,y,v,x,j,w,N,O,P,E,A;l==null||l(r);let c=n;{const T=r.fullPath??r.from,M=T.length,R=((f=r.options)==null?void 0:f.caseSensitive)??e,D=!!((p=(m=r.options)==null?void 0:m.params)!=null&&p.parse&&((v=(y=r.options)==null?void 0:y.skipRouteOnParseError)!=null&&v.params));for(;c<M;){const k=Rb(T,c,t);let H;const q=c,ae=k[5];switch(c=ae+1,o++,k[0]){case 0:{const Q=T.substring(k[2],k[3]);if(R){const Z=(x=i.static)==null?void 0:x.get(Q);if(Z)H=Z;else{i.static??(i.static=new Map);const B=Ds(r.fullPath??r.from);B.parent=i,B.depth=o,H=B,i.static.set(Q,B)}}else{const Z=Q.toLowerCase(),B=(j=i.staticInsensitive)==null?void 0:j.get(Z);if(B)H=B;else{i.staticInsensitive??(i.staticInsensitive=new Map);const K=Ds(r.fullPath??r.from);K.parent=i,K.depth=o,H=K,i.staticInsensitive.set(Z,K)}}break}case 1:{const Q=T.substring(q,k[1]),Z=T.substring(k[4],ae),B=R&&!!(Q||Z),K=Q?B?Q:Q.toLowerCase():void 0,ee=Z?B?Z:Z.toLowerCase():void 0,se=!D&&((w=i.dynamic)==null?void 0:w.find(ue=>!ue.skipOnParamError&&ue.caseSensitive===B&&ue.prefix===K&&ue.suffix===ee));if(se)H=se;else{const ue=ug(1,r.fullPath??r.from,B,K,ee);H=ue,ue.depth=o,ue.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(ue)}break}case 3:{const Q=T.substring(q,k[1]),Z=T.substring(k[4],ae),B=R&&!!(Q||Z),K=Q?B?Q:Q.toLowerCase():void 0,ee=Z?B?Z:Z.toLowerCase():void 0,se=!D&&((N=i.optional)==null?void 0:N.find(ue=>!ue.skipOnParamError&&ue.caseSensitive===B&&ue.prefix===K&&ue.suffix===ee));if(se)H=se;else{const ue=ug(3,r.fullPath??r.from,B,K,ee);H=ue,ue.parent=i,ue.depth=o,i.optional??(i.optional=[]),i.optional.push(ue)}break}case 2:{const Q=T.substring(q,k[1]),Z=T.substring(k[4],ae),B=R&&!!(Q||Z),K=Q?B?Q:Q.toLowerCase():void 0,ee=Z?B?Z:Z.toLowerCase():void 0,se=ug(2,r.fullPath??r.from,B,K,ee);H=se,se.parent=i,se.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(se)}}i=H}if(D&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const k=Ds(r.fullPath??r.from);k.kind=O2,k.parent=i,o++,k.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(k),i=k}const I=(r.path||!r.children)&&!r.isRoot;if(I&&T.endsWith("/")){const k=Ds(r.fullPath??r.from);k.kind=Rs,k.parent=i,o++,k.depth=o,i.index=k,i=k}i.parse=((P=(O=r.options)==null?void 0:O.params)==null?void 0:P.parse)??null,i.skipOnParamError=D,i.parsingPriority=((A=(E=r.options)==null?void 0:E.skipRouteOnParseError)==null?void 0:A.priority)??0,I&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const T of r.children)Rm(e,t,T,c,i,o,l)}function lg(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 Ci(e){var t,r,n;if(e.pathless)for(const i of e.pathless)Ci(i);if(e.static)for(const i of e.static.values())Ci(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Ci(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(lg);for(const i of e.dynamic)Ci(i)}if((r=e.optional)!=null&&r.length){e.optional.sort(lg);for(const i of e.optional)Ci(i)}if((n=e.wildcard)!=null&&n.length){e.wildcard.sort(lg);for(const i of e.wildcard)Ci(i)}}function Ds(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 ug(e,t,r,n,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:r,prefix:n,suffix:i}}function Q$(e,t){const r=Ds("/"),n=new Uint16Array(6);for(const i of e)Rm(!1,n,i,1,r,0);Ci(r),t.masksTree=r,t.flatCache=Dc(1e3)}function X$(e,t){e||(e="/");const r=t.flatCache.get(e);if(r)return r;const n=Db(e,t.masksTree);return t.flatCache.set(e,n),n}function Z$(e,t,r,n,i){e||(e="/"),n||(n="/");const o=t?`case\0${e}`:e;let l=i.singleCache.get(o);return l||(l=Ds("/"),Rm(t,new Uint16Array(6),{from:e},1,l,0),i.singleCache.set(o,l)),Db(n,l,r)}function W$(e,t,r=!1){const n=r?e:`nofuzz\0${e}`,i=t.matchCache.get(n);if(i!==void 0)return i;e||(e="/");let o;try{o=Db(e,t.segmentTree,r)}catch(l){if(l instanceof URIError)o=null;else throw l}return o&&(o.branch=tz(o.route)),t.matchCache.set(n,o),o}function J$(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function ez(e,t=!1,r){const n=Ds(e.fullPath),i=new Uint16Array(6),o={},l={};let c=0;return Rm(t,i,e,1,n,0,f=>{if(r==null||r(f,c),f.id in o&&Ua(),o[f.id]=f,c!==0&&f.path){const m=J$(f.fullPath);(!l[m]||f.fullPath.endsWith("/"))&&(l[m]=f)}c++}),Ci(n),{processedTree:{segmentTree:n,singleCache:Dc(1e3),matchCache:Dc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:l}}function Db(e,t,r=!1){const n=e.split("/"),i=nz(e,n,t,r);if(!i)return null;const[o]=_2(e,n,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function _2(e,t,r){var p,y,v,x,j,w,N,O,P,E;const n=rz(r.node);let i=null;const o=Object.create(null);let l=((p=r.extract)==null?void 0:p.part)??0,c=((y=r.extract)==null?void 0:y.node)??0,f=((v=r.extract)==null?void 0:v.path)??0,m=((x=r.extract)==null?void 0:x.segment)??0;for(;c<n.length;l++,c++,f++,m++){const A=n[c];if(A.kind===Rs)break;if(A.kind===O2){m--,l--,f--;continue}const T=t[l],M=f;if(T&&(f+=T.length),A.kind===1){i??(i=r.node.fullPath.split("/"));const R=i[m],D=((j=A.prefix)==null?void 0:j.length)??0;if(R.charCodeAt(D)===123){const I=((w=A.suffix)==null?void 0:w.length)??0,k=R.substring(D+2,R.length-I-1),H=T.substring(D,T.length-I);o[k]=decodeURIComponent(H)}else{const I=R.substring(1);o[I]=decodeURIComponent(T)}}else if(A.kind===3){if(r.skipped&1<<c){l--,f=M-1;continue}i??(i=r.node.fullPath.split("/"));const R=i[m],D=((N=A.prefix)==null?void 0:N.length)??0,I=((O=A.suffix)==null?void 0:O.length)??0,k=R.substring(D+3,R.length-I-1),H=A.suffix||A.prefix?T.substring(D,T.length-I):T;H&&(o[k]=decodeURIComponent(H))}else if(A.kind===2){const R=A,D=e.substring(M+(((P=R.prefix)==null?void 0:P.length)??0),e.length-(((E=R.suffix)==null?void 0:E.length)??0)),I=decodeURIComponent(D);o["*"]=I,o._splat=I;break}}return r.rawParams&&Object.assign(o,r.rawParams),[o,{part:l,node:c,path:f,segment:m}]}function tz(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function rz(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function nz(e,t,r,n){if(e==="/"&&r.index)return{node:r.index,skipped:0};const i=!Mc(t),o=i&&e!=="/",l=t.length-(i?1:0),c=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,m=null,p=null;for(;c.length;){const y=c.pop(),{node:v,index:x,skipped:j,depth:w,statics:N,dynamics:O,optionals:P}=y;let{extract:E,rawParams:A,parsedParams:T}=y;if(v.skipOnParamError){if(!cg(e,t,y))continue;A=y.rawParams,E=y.extract,T=y.parsedParams}n&&v.route&&v.kind!==Rs&&oc(m,y)&&(m=y);const M=x===l;if(M&&(v.route&&!o&&oc(p,y)&&(p=y),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const R=M?void 0:t[x];let D;if(M&&v.index){const I={node:v.index,index:x,skipped:j,depth:w+1,statics:N,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T};let k=!0;if(v.index.skipOnParamError&&(cg(e,t,I)||(k=!1)),k){if(N===l&&!O&&!P&&!j)return I;oc(p,I)&&(p=I)}}if(v.wildcard&&oc(f,y))for(const I of v.wildcard){const{prefix:k,suffix:H}=I;if(k&&(M||!(I.caseSensitive?R:D??(D=R.toLowerCase())).startsWith(k)))continue;if(H){if(M)continue;const ae=t.slice(x).join("/").slice(-H.length);if((I.caseSensitive?ae:ae.toLowerCase())!==H)continue}const q={node:I,index:l,skipped:j,depth:w,statics:N,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T};if(!(I.skipOnParamError&&!cg(e,t,q))){f=q;break}}if(v.optional){const I=j|1<<w,k=w+1;for(let H=v.optional.length-1;H>=0;H--){const q=v.optional[H];c.push({node:q,index:x,skipped:I,depth:k,statics:N,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T})}if(!M)for(let H=v.optional.length-1;H>=0;H--){const q=v.optional[H],{prefix:ae,suffix:Q}=q;if(ae||Q){const Z=q.caseSensitive?R:D??(D=R.toLowerCase());if(ae&&!Z.startsWith(ae)||Q&&!Z.endsWith(Q))continue}c.push({node:q,index:x+1,skipped:j,depth:k,statics:N,dynamics:O,optionals:P+1,extract:E,rawParams:A,parsedParams:T})}}if(!M&&v.dynamic&&R)for(let I=v.dynamic.length-1;I>=0;I--){const k=v.dynamic[I],{prefix:H,suffix:q}=k;if(H||q){const ae=k.caseSensitive?R:D??(D=R.toLowerCase());if(H&&!ae.startsWith(H)||q&&!ae.endsWith(q))continue}c.push({node:k,index:x+1,skipped:j,depth:w+1,statics:N,dynamics:O+1,optionals:P,extract:E,rawParams:A,parsedParams:T})}if(!M&&v.staticInsensitive){const I=v.staticInsensitive.get(D??(D=R.toLowerCase()));I&&c.push({node:I,index:x+1,skipped:j,depth:w+1,statics:N+1,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T})}if(!M&&v.static){const I=v.static.get(R);I&&c.push({node:I,index:x+1,skipped:j,depth:w+1,statics:N+1,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T})}if(v.pathless){const I=w+1;for(let k=v.pathless.length-1;k>=0;k--){const H=v.pathless[k];c.push({node:H,index:x,skipped:j,depth:I,statics:N,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T})}}}if(p&&f)return oc(f,p)?p:f;if(p)return p;if(f)return f;if(n&&m){let y=m.index;for(let x=0;x<m.index;x++)y+=t[x].length;const v=y===e.length?"/":e.slice(y);return m.rawParams??(m.rawParams=Object.create(null)),m.rawParams["**"]=decodeURIComponent(v),m}return null}function cg(e,t,r){try{const[n,i]=_2(e,t,r);r.rawParams=n,r.extract=i;const o=r.node.parse(n);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,o),!0}catch{return null}}function oc(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===Rs)>(e.node.kind===Rs)||t.node.kind===Rs==(e.node.kind===Rs)&&t.depth>e.depth))):!0}function gh(e){return kb(e.filter(t=>t!==void 0).join("/"))}function kb(e){return e.replace(/\/{2,}/g,"/")}function E2(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Qi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function A2(e){return Qi(E2(e))}function Ch(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function az(e,t,r){return Ch(e,r)===Ch(t,r)}function iz({base:e,to:t,trailingSlash:r="never",cache:n}){const i=t.startsWith("/"),o=!i&&t===".";let l;if(n){l=i?t:o?e:e+"\0"+t;const y=n.get(l);if(y)return y}let c;if(o)c=e.split("/");else if(i)c=t.split("/");else{for(c=e.split("/");c.length>1&&Mc(c)==="";)c.pop();const y=t.split("/");for(let v=0,x=y.length;v<x;v++){const j=y[v];j===""?v?v===x-1&&c.push(j):c=[j]:j===".."?c.pop():j==="."||c.push(j)}}c.length>1&&(Mc(c)===""?r==="never"&&c.pop():r==="always"&&c.push(""));let f,m="";for(let y=0;y<c.length;y++){y>0&&(m+="/");const v=c[y];if(!v)continue;f=Rb(v,0,f);const x=f[0];if(x===0){m+=v;continue}const j=f[5],w=v.substring(0,f[1]),N=v.substring(f[4],j),O=v.substring(f[2],f[3]);x===1?m+=w||N?`${w}{$${O}}${N}`:`$${O}`:x===2?m+=w||N?`${w}{$}${N}`:"$":m+=`${w}{-$${O}}${N}`}m=kb(m);const p=m||"/";return l&&n&&n.set(l,p),p}function sz(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),r=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),n=new RegExp(r,"g");return i=>i.replace(n,o=>t.get(o)??o)}function dg(e,t,r){const n=t[e];return typeof n!="string"?n:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(n)?n:n.split("/").map(i=>c_(i,r)).join("/"):c_(n,r)}function u_({path:e,params:t,decoder:r,...n}){let i=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:i};const l=e.length;let c=0,f,m="";for(;c<l;){const p=c;f=Rb(e,p,f);const y=f[5];if(c=y+1,p===y)continue;const v=f[0];if(v===0){m+="/"+e.substring(p,y);continue}if(v===2){const x=t._splat;o._splat=x,o["*"]=x;const j=e.substring(p,f[1]),w=e.substring(f[4],y);if(!x){i=!0,(j||w)&&(m+="/"+j+w);continue}const N=dg("_splat",t,r);m+="/"+j+N+w;continue}if(v===1){const x=e.substring(f[2],f[3]);!i&&!(x in t)&&(i=!0),o[x]=t[x];const j=e.substring(p,f[1]),w=e.substring(f[4],y),N=dg(x,t,r)??"undefined";m+="/"+j+N+w;continue}if(v===3){const x=e.substring(f[2],f[3]),j=t[x];if(j==null)continue;o[x]=j;const w=e.substring(p,f[1]),N=e.substring(f[4],y),O=dg(x,t,r)??"";m+="/"+w+O+N;continue}}return e.endsWith("/")&&(m+="/"),{usedParams:o,interpolatedPath:m||"/",isMissingParams:i}}function c_(e,t){const r=encodeURIComponent(e);return(t==null?void 0:t(r))??r}function Sr(e){return!!(e!=null&&e.isNotFound)}function oz(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var lz="tsr-scroll-restoration-v1_3";function uz(){const e=oz();if(!e)return null;let t={};try{const n=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");zl(n)&&(t=n)}catch{}return{get state(){return t},set:n=>{t=Ki(n,t)||t},persist:()=>{try{e.setItem(lz,JSON.stringify(t))}catch{}}}}var d_=uz(),cz=e=>e.state.__TSR_key||e.href;function dz(e){const t=[];let r;for(;r=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(r.children,e)+1})`),e=r;return`${t.reverse().join(" > ")}`.toLowerCase()}var Xf=!1,lc="window",f_="data-scroll-restoration-id";function fz(e,t){if(!d_)return;const r=d_;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,Xf=!1;const n=e.options.getScrollRestorationKey||cz,i=new Map;window.history.scrollRestoration="manual";const o=c=>{if(!(Xf||!e.isScrollRestoring))if(c.target===document||c.target===window)i.set(lc,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const f=c.target;i.set(f,{scrollX:f.scrollLeft||0,scrollY:f.scrollTop||0})}},l=c=>{var m;if(!e.isScrollRestoring||!c||i.size===0||!r)return;const f=(m=r.state)[c]||(m[c]={});for(const[p,y]of i){let v;if(p===lc)v=lc;else if(p.isConnected){const x=p.getAttribute(f_);v=x?`[${f_}="${x}"]`:dz(p)}v&&(f[v]=y)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?n(c.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{l(n(e.stores.resolvedLocation.state??e.stores.location.state)),r.persist()}),e.subscribe("onRendered",c=>{var y;const f=n(c.toLocation),m=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Xf=!0;try{const v=e.isScrollRestoring?r.state[f]:void 0;let x=!1;if(v)for(const j in v){const w=v[j];if(!zl(w))continue;const{scrollX:N,scrollY:O}=w;if(!(!Number.isFinite(N)||!Number.isFinite(O))){if(j===lc)window.scrollTo({top:O,left:N,behavior:m}),x=!0;else if(j){let P;try{P=document.querySelector(j)}catch{continue}P&&(P.scrollLeft=N,P.scrollTop=O,x=!0)}}}if(!x){const j=e.history.location.hash.slice(1);if(j){const w=((y=window.history.state)==null?void 0:y.__hashScrollIntoViewOptions)??!0;if(w){const N=document.getElementById(j);N&&N.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:m};if(window.scrollTo(w),p)for(const N of p){if(N===lc)continue;const O=typeof N=="function"?N():document.querySelector(N);O&&O.scrollTo(w)}}}}finally{Xf=!1}e.isScrollRestoring&&r.set(v=>(v[f]||(v[f]={}),v))}})}function hz(e,t=String){const r=new URLSearchParams;for(const n in e){const i=e[n];i!==void 0&&r.set(n,t(i))}return r.toString()}function fg(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function mz(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[n,i]of t.entries()){const o=r[n];o==null?r[n]=fg(i):Array.isArray(o)?o.push(fg(i)):r[n]=[o,fg(i)]}return r}var pz=vz(JSON.parse),yz=gz(JSON.stringify,JSON.parse);function vz(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=mz(t);for(const n in r){const i=r[n];if(typeof i=="string")try{r[n]=e(i)}catch{}}return r}}function gz(e,t){const r=typeof t=="function";function n(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(r&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const o=hz(i,n);return o?`?${o}`:""}}var Xs="__root__";function xz(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 r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function $r(e){return e instanceof Response&&!!e.options}function bz(e){return{input:({url:t})=>{for(const r of e)t=bx(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=P2(e[r],t);return t}}}function jz(e){const t=A2(e.basepath),r=`/${t}`,n=`${r}/`,i=e.caseSensitive?r:r.toLowerCase(),o=e.caseSensitive?n:n.toLowerCase();return{input:({url:l})=>{const c=e.caseSensitive?l.pathname:l.pathname.toLowerCase();return c===i?l.pathname="/":c.startsWith(o)&&(l.pathname=l.pathname.slice(r.length)),l},output:({url:l})=>(l.pathname=gh(["/",t,l.pathname]),l)}}function bx(e,t){var n;const r=(n=e==null?void 0:e.input)==null?void 0:n.call(e,{url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function P2(e,t){var n;const r=(n=e==null?void 0:e.output)==null?void 0:n.call(e,{url:t});if(r){if(typeof r=="string")return new URL(r);if(r instanceof URL)return r}return t}function wz(e,t){const{createMutableStore:r,createReadonlyStore:n,batch:i,init:o}=t,l=new Map,c=new Map,f=new Map,m=r(e.status),p=r(e.loadedAt),y=r(e.isLoading),v=r(e.isTransitioning),x=r(e.location),j=r(e.resolvedLocation),w=r(e.statusCode),N=r(e.redirect),O=r([]),P=r([]),E=r([]),A=n(()=>hg(l,O.state)),T=n(()=>hg(c,P.state)),M=n(()=>hg(f,E.state)),R=n(()=>O.state[0]),D=n(()=>O.state.some(K=>{var ee;return((ee=l.get(K))==null?void 0:ee.state.status)==="pending"})),I=n(()=>{var K;return{locationHref:x.state.href,resolvedLocationHref:(K=j.state)==null?void 0:K.href,status:m.state}}),k=n(()=>({status:m.state,loadedAt:p.state,isLoading:y.state,isTransitioning:v.state,matches:A.state,location:x.state,resolvedLocation:j.state,statusCode:w.state,redirect:N.state})),H=Dc(64);function q(K){let ee=H.get(K);return ee||(ee=n(()=>{const se=O.state;for(const ue of se){const L=l.get(ue);if(L&&L.routeId===K)return L.state}}),H.set(K,ee)),ee}const ae={status:m,loadedAt:p,isLoading:y,isTransitioning:v,location:x,resolvedLocation:j,statusCode:w,redirect:N,matchesId:O,pendingMatchesId:P,cachedMatchesId:E,activeMatchesSnapshot:A,pendingMatchesSnapshot:T,cachedMatchesSnapshot:M,firstMatchId:R,hasPendingMatches:D,matchRouteReactivity:I,activeMatchStoresById:l,pendingMatchStoresById:c,cachedMatchStoresById:f,__store:k,getMatchStoreByRouteId:q,setActiveMatches:Q,setPendingMatches:Z,setCachedMatches:B};Q(e.matches),o==null||o(ae);function Q(K){mg(K,l,O,r,i)}function Z(K){mg(K,c,P,r,i)}function B(K){mg(K,f,E,r,i)}return ae}function hg(e,t){const r=[];for(const n of t){const i=e.get(n);i&&r.push(i.state)}return r}function mg(e,t,r,n,i){const o=e.map(c=>c.id),l=new Set(o);i(()=>{for(const c of t.keys())l.has(c)||t.delete(c);for(const c of e){const f=t.get(c.id);if(!f){const m=n(c);m.routeId=c.routeId,t.set(c.id,m);continue}f.routeId=c.routeId,f.state!==c&&f.setState(()=>c)}Y$(r.state,o)||r.setState(()=>o)})}var jx=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Sz=e=>e.stores.matchesId.state.some(t=>{var r;return(r=e.stores.activeMatchStoresById.get(t))==null?void 0:r.state._forcePending}),Dm=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),Zs=(e,t,r=!0)=>{const n={...e.router.options.context??{}},i=r?t:t-1;for(let o=0;o<=i;o++){const l=e.matches[o];if(!l)continue;const c=e.router.getMatch(l.id);c&&Object.assign(n,c.__routeContext,c.__beforeLoadContext)}return n},h_=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,n=e.matches.findIndex(l=>l.routeId===e.router.routeTree.id),i=n>=0?n:0;let o=r?e.matches.findIndex(l=>l.routeId===r):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=i);for(let l=o;l>=0;l--){const c=e.matches[l];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return l}return r?o:i},Gi=(e,t,r)=>{var n,i,o;if(!(!$r(r)&&!Sr(r)))throw $r(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&((n=t._nonReactive.beforeLoadPromise)==null||n.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,l=>({...l,status:$r(r)?"redirected":l.status==="pending"?"success":l.status,context:Zs(e,t.index),isFetching:!1,error:r})),Sr(r)&&!r.routeId&&(r.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),$r(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},T2=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},m_=(e,t,r)=>{const n=Zs(e,r);e.updateMatch(t,i=>({...i,context:n}))},uc=(e,t,r,n)=>{var c,f;const{id:i,routeId:o}=e.matches[t],l=e.router.looseRoutesById[o];if(r instanceof Promise)throw r;r.routerCode=n,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Gi(e,e.router.getMatch(i),r);try{(f=(c=l.options).onError)==null||f.call(c,r)}catch(m){r=m,Gi(e,e.router.getMatch(i),r)}e.updateMatch(i,m=>{var p,y;return(p=m._nonReactive.beforeLoadPromise)==null||p.resolve(),m._nonReactive.beforeLoadPromise=void 0,(y=m._nonReactive.loadPromise)==null||y.resolve(),{...m,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!$r(r)&&!Sr(r)&&(e.serialError??(e.serialError=r))},C2=(e,t,r,n)=>{var o;if(n._nonReactive.pendingTimeout!==void 0)return;const i=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Dm(e,t)&&(r.options.loader||r.options.beforeLoad||R2(r))&&typeof i=="number"&&i!==1/0&&(r.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const l=setTimeout(()=>{jx(e)},i);n._nonReactive.pendingTimeout=l}},Nz=(e,t,r)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;C2(e,t,r,n);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Gi(e,o,o.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(i):i()},Oz=(e,t,r,n)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Bl(()=>{o==null||o.resolve(),o=void 0});const{paramsError:l,searchError:c}=i;l&&uc(e,r,l,"PARSE_PARAMS"),c&&uc(e,r,c,"VALIDATE_SEARCH"),C2(e,t,n,i);const f=new AbortController;let m=!1;const p=()=>{m||(m=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:f})))},y=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!n.options.beforeLoad){e.router.batch(()=>{p(),y()});return}i._nonReactive.beforeLoadPromise=Bl();const v={...Zs(e,r,!1),...i.__routeContext},{search:x,params:j,cause:w}=i,N=Dm(e,t),O={search:x,abortController:f,params:j,preload:N,context:v,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:N?"preload":w,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},P=A=>{if(A===void 0){e.router.batch(()=>{p(),y()});return}($r(A)||Sr(A))&&(p(),uc(e,r,A,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,T=>({...T,__beforeLoadContext:A})),y()})};let E;try{if(E=n.options.beforeLoad(O),Rc(E))return p(),E.catch(A=>{uc(e,r,A,"BEFORE_LOAD")}).then(P)}catch(A){p(),uc(e,r,A,"BEFORE_LOAD")}P(E)},_z=(e,t)=>{const{id:r,routeId:n}=e.matches[t],i=e.router.looseRoutesById[n],o=()=>c(),l=()=>Oz(e,r,t,i),c=()=>{if(T2(e,r))return;const f=Nz(e,r,i);return Rc(f)?f.then(l):l()};return o()},Ez=(e,t,r)=>{var o,l,c,f,m,p;const n=e.router.getMatch(t);if(!n||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([(l=(o=r.options).head)==null?void 0:l.call(o,i),(f=(c=r.options).scripts)==null?void 0:f.call(c,i),(p=(m=r.options).headers)==null?void 0:p.call(m,i)]).then(([y,v,x])=>({meta:y==null?void 0:y.meta,links:y==null?void 0:y.links,headScripts:y==null?void 0:y.scripts,headers:x,scripts:v,styles:y==null?void 0:y.styles}))},M2=(e,t,r,n,i)=>{const o=t[n-1],{params:l,loaderDeps:c,abortController:f,cause:m}=e.router.getMatch(r),p=Zs(e,n),y=Dm(e,r);return{params:l,deps:c,preload:!!y,parentMatchPromise:o,abortController:f,context:p,location:e.location,navigate:v=>e.router.navigate({...v,_fromLocation:e.location}),cause:y?"preload":m,route:i,...e.router.options.additionalContext}},p_=async(e,t,r,n,i)=>{var o,l,c,f,m;try{const p=e.router.getMatch(r);try{(!(N2??e.router.isServer)||p.ssr===!0)&&kc(i);const y=i.options.loader,v=typeof y=="function"?y:y==null?void 0:y.handler,x=v==null?void 0:v(M2(e,t,r,n,i)),j=!!v&&Rc(x);if((j||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||p._nonReactive.minPendingPromise)&&e.updateMatch(r,N=>({...N,isFetching:"loader"})),v){const N=j?await x:x;Gi(e,e.router.getMatch(r),N),N!==void 0&&e.updateMatch(r,O=>({...O,loaderData:N}))}i._lazyPromise&&await i._lazyPromise;const w=p._nonReactive.minPendingPromise;w&&await w,i._componentsPromise&&await i._componentsPromise,e.updateMatch(r,N=>({...N,error:void 0,context:Zs(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(y){let v=y;if((v==null?void 0:v.name)==="AbortError"){if(p.abortController.signal.aborted){(o=p._nonReactive.loaderPromise)==null||o.resolve(),p._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,j=>({...j,status:j.status==="pending"?"success":j.status,isFetching:!1,context:Zs(e,n)}));return}const x=p._nonReactive.minPendingPromise;x&&await x,Sr(y)&&await((c=(l=i.options.notFoundComponent)==null?void 0:l.preload)==null?void 0:c.call(l)),Gi(e,e.router.getMatch(r),y);try{(m=(f=i.options).onError)==null||m.call(f,y)}catch(j){v=j,Gi(e,e.router.getMatch(r),j)}!$r(v)&&!Sr(v)&&await kc(i,["errorComponent"]),e.updateMatch(r,j=>({...j,error:v,context:Zs(e,n),status:"error",isFetching:!1}))}}catch(p){const y=e.router.getMatch(r);y&&(y._nonReactive.loaderPromise=void 0),Gi(e,y,p)}},Az=async(e,t,r)=>{var x,j,w,N;async function n(O,P,E,A,T){const M=Date.now()-P.updatedAt,R=O?T.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??e.router.options.defaultStaleTime??0,D=T.options.shouldReload,I=typeof D=="function"?D(M2(e,t,i,r,T)):D,{status:k,invalid:H}=A,q=M>=R&&(!!e.forceStaleReload||A.cause==="enter"||E!==void 0&&E!==A.id);l=k==="success"&&(H||(I??q)),O&&T.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{var ae,Q;try{await p_(e,t,i,r,T);const Z=e.router.getMatch(i);(ae=Z._nonReactive.loaderPromise)==null||ae.resolve(),(Q=Z._nonReactive.loadPromise)==null||Q.resolve(),Z._nonReactive.loaderPromise=void 0,Z._nonReactive.loadPromise=void 0}catch(Z){$r(Z)&&await e.router.navigate(Z.options)}})()):k!=="success"||l?await p_(e,t,i,r,T):m_(e,i,r))}const{id:i,routeId:o}=e.matches[r];let l=!1,c=!1;const f=e.router.looseRoutesById[o],m=f.options.loader,p=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(T2(e,i)){if(!e.router.getMatch(i))return e.matches[r];m_(e,i,r)}else{const O=e.router.getMatch(i),P=e.router.stores.matchesId.state[r],E=((x=P&&e.router.stores.activeMatchStoresById.get(P)||null)==null?void 0:x.routeId)===o?P:(j=e.router.stores.activeMatchesSnapshot.state.find(T=>T.routeId===o))==null?void 0:j.id,A=Dm(e,i);if(O._nonReactive.loaderPromise){if(O.status==="success"&&!e.sync&&!O.preload&&p)return O;await O._nonReactive.loaderPromise;const T=e.router.getMatch(i),M=T._nonReactive.error||T.error;M&&Gi(e,T,M),T.status==="pending"&&await n(A,O,E,T,f)}else{const T=A&&!e.router.stores.activeMatchStoresById.has(i),M=e.router.getMatch(i);M._nonReactive.loaderPromise=Bl(),T!==M.preload&&e.updateMatch(i,R=>({...R,preload:T})),await n(A,O,E,M,f)}}const y=e.router.getMatch(i);c||((w=y._nonReactive.loaderPromise)==null||w.resolve(),(N=y._nonReactive.loadPromise)==null||N.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,c||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const v=c?y.isFetching:!1;return v!==y.isFetching||y.invalid!==!1?(e.updateMatch(i,O=>({...O,isFetching:v,invalid:!1})),e.router.getMatch(i)):y};async function y_(e){var v,x;const t=e,r=[];Sz(t.router)&&jx(t);let n;for(let j=0;j<t.matches.length;j++){try{const w=_z(t,j);Rc(w)&&await w}catch(w){if($r(w))throw w;if(Sr(w))n=w;else if(!t.preload)throw w;break}if(t.serialError)break}const i=t.firstBadMatchIndex??t.matches.length,o=n&&!t.preload?h_(t,n):void 0,l=n&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let c,f;for(let j=0;j<l;j++)r.push(Az(t,r,j));try{await Promise.all(r)}catch{const j=await Promise.allSettled(r);for(const w of j){if(w.status!=="rejected")continue;const N=w.reason;if($r(N))throw N;Sr(N)?c??(c=N):f??(f=N)}if(f!==void 0)throw f}const m=c??(n&&!t.preload?n:void 0);let p=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!m&&n&&t.preload)return t.matches;if(m){const j=h_(t,m);j===void 0&&Ua();const w=t.matches[j],N=t.router.looseRoutesById[w.routeId],O=(v=t.router.options)==null?void 0:v.defaultNotFoundComponent;!N.options.notFoundComponent&&O&&(N.options.notFoundComponent=O),m.routeId=w.routeId;const P=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,E=>({...E,...P?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),p=j,await kc(N,["notFoundComponent"])}else if(!t.preload){const j=t.matches[0];j.globalNotFound||(x=t.router.getMatch(j.id))!=null&&x.globalNotFound&&t.updateMatch(j.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const j=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await kc(j,["errorComponent"])}for(let j=0;j<=p;j++){const{id:w,routeId:N}=t.matches[j],O=t.router.looseRoutesById[N];try{const P=Ez(t,w,O);if(P){const E=await P;t.updateMatch(w,A=>({...A,...E}))}}catch(P){console.error(`Error executing head for route ${N}:`,P)}}const y=jx(t);if(Rc(y)&&await y,m)throw m;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function v_(e,t){const r=t.map(n=>{var i,o;return(o=(i=e.options[n])==null?void 0:i.preload)==null?void 0:o.call(i)}).filter(Boolean);if(r.length!==0)return Promise.all(r)}function kc(e,t=xh){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(n=>{const{id:i,...o}=n.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===xh?(()=>{if(e._componentsPromise===void 0){const n=v_(e,xh);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():v_(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function R2(e){var t;for(const r of xh)if((t=e.options[r])!=null&&t.preload)return!0;return!1}var xh=["component","errorComponent","pendingComponent","notFoundComponent"],Xi="__TSR_index",g_="popstate",x_="beforeunload";function Pz(e){let t=e.getLocation();const r=new Set,n=l=>{t=e.getLocation(),r.forEach(c=>c({location:t,action:l}))},i=l=>{e.notifyOnIndexChange??!0?n(l):t=e.getLocation()},o=async({task:l,navigateOpts:c,...f})=>{var y,v;if((c==null?void 0:c.ignoreBlocker)??!1){l();return}const m=((y=e.getBlockers)==null?void 0:y.call(e))??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&m.length&&p)for(const x of m){const j=Mh(f.path,f.state);if(await x.blockerFn({currentLocation:t,nextLocation:j,action:f.type})){(v=e.onBlocked)==null||v.call(e);return}}l()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:l=>(r.add(l),()=>{r.delete(l)}),push:(l,c,f)=>{const m=t.state[Xi];c=b_(m+1,c),o({task:()=>{e.pushState(l,c),n({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:l,state:c})},replace:(l,c,f)=>{const m=t.state[Xi];c=b_(m,c),o({task:()=>{e.replaceState(l,c),n({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:l,state:c})},go:(l,c)=>{o({task:()=>{e.go(l),i({type:"GO",index:l})},navigateOpts:c,type:"GO"})},back:l=>{o({task:()=>{e.back((l==null?void 0:l.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:l,type:"BACK"})},forward:l=>{o({task:()=>{e.forward((l==null?void 0:l.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:l,type:"FORWARD"})},canGoBack:()=>t.state[Xi]!==0,createHref:l=>e.createHref(l),block:l=>{var f;if(!e.setBlockers)return()=>{};const c=((f=e.getBlockers)==null?void 0:f.call(e))??[];return e.setBlockers([...c,l]),()=>{var p,y;const m=((p=e.getBlockers)==null?void 0:p.call(e))??[];(y=e.setBlockers)==null||y.call(e,m.filter(v=>v!==l))}},flush:()=>{var l;return(l=e.flush)==null?void 0:l.call(e)},destroy:()=>{var l;return(l=e.destroy)==null?void 0:l.call(e)},notify:n}}function b_(e,t){t||(t={});const r=Ib();return{...t,key:r,__TSR_key:r,[Xi]:e}}function Tz(e){var D,I;const t=typeof document<"u"?window:void 0,r=t.history.pushState,n=t.history.replaceState;let i=[];const o=()=>i,l=k=>i=k,c=(k=>k),f=(()=>Mh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((D=t.history.state)!=null&&D.__TSR_key)&&!((I=t.history.state)!=null&&I.key)){const k=Ib();t.history.replaceState({[Xi]:0,key:k,__TSR_key:k},"")}let m=f(),p,y=!1,v=!1,x=!1,j=!1;const w=()=>m;let N,O;const P=()=>{N&&(R._ignoreSubscribers=!0,(N.isPush?t.history.pushState:t.history.replaceState)(N.state,"",N.href),R._ignoreSubscribers=!1,N=void 0,O=void 0,p=void 0)},E=(k,H,q)=>{const ae=c(H);O||(p=m),m=Mh(H,q),N={href:ae,state:q,isPush:(N==null?void 0:N.isPush)||k==="push"},O||(O=Promise.resolve().then(()=>P()))},A=k=>{m=f(),R.notify({type:k})},T=async()=>{if(v){v=!1;return}const k=f(),H=k.state[Xi]-m.state[Xi],q=H===1,ae=H===-1,Q=!q&&!ae||y;y=!1;const Z=Q?"GO":ae?"BACK":"FORWARD",B=Q?{type:"GO",index:H}:{type:ae?"BACK":"FORWARD"};if(x)x=!1;else{const K=o();if(typeof document<"u"&&K.length){for(const ee of K)if(await ee.blockerFn({currentLocation:m,nextLocation:k,action:Z})){v=!0,t.history.go(1),R.notify(B);return}}}m=f(),R.notify(B)},M=k=>{if(j){j=!1;return}let H=!1;const q=o();if(typeof document<"u"&&q.length)for(const ae of q){const Q=ae.enableBeforeUnload??!0;if(Q===!0){H=!0;break}if(typeof Q=="function"&&Q()===!0){H=!0;break}}if(H)return k.preventDefault(),k.returnValue=""},R=Pz({getLocation:w,getLength:()=>t.history.length,pushState:(k,H)=>E("push",k,H),replaceState:(k,H)=>E("replace",k,H),back:k=>(k&&(x=!0),j=!0,t.history.back()),forward:k=>{k&&(x=!0),j=!0,t.history.forward()},go:k=>{y=!0,t.history.go(k)},createHref:k=>c(k),flush:P,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(x_,M,{capture:!0}),t.removeEventListener(g_,T)},onBlocked:()=>{p&&m!==p&&(m=p)},getBlockers:o,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(x_,M,{capture:!0}),t.addEventListener(g_,T),t.history.pushState=function(...k){const H=r.apply(t.history,k);return R._ignoreSubscribers||A("PUSH"),H},t.history.replaceState=function(...k){const H=n.apply(t.history,k);return R._ignoreSubscribers||A("REPLACE"),H},R}function Cz(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Mh(e,t){const r=Cz(e),n=r.indexOf("#"),i=r.indexOf("?"),o=Ib();return{href:r,pathname:r.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:r.length),hash:n>-1?r.substring(n):"",search:i>-1?r.slice(i,n===-1?void 0:n):"",state:t||{[Xi]:0,key:o,__TSR_key:o}}}function Ib(){return(Math.random()+1).toString(36).substring(7)}function wl(e,t){const r=t,n=e;return{fromLocation:r,toLocation:n,pathChanged:(r==null?void 0:r.pathname)!==n.pathname,hrefChanged:(r==null?void 0:r.href)!==n.href,hashChanged:(r==null?void 0:r.hash)!==n.hash}}var Mz=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=r=>r(),this.update=r=>{var p;const n=this.options,i=this.basepath??(n==null?void 0:n.basepath)??"/",o=this.basepath===void 0,l=n==null?void 0:n.rewrite;if(this.options={...n,...r},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=sz(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Tz()),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 y;this.resolvePathCache=Dc(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=wz(Dz(this.latestLocation),y),fz(this)}let c=!1;const f=this.options.basepath??"/",m=this.options.rewrite;if(o||i!==f||l!==m){this.basepath=f;const y=[],v=A2(f);v&&v!=="/"&&y.push(jz({basepath:f})),m&&y.push(m),this.rewrite=y.length===0?void 0:y.length===1?y[0]:bz(y),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((p=window.CSS)==null?void 0:p.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 r=ez(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&Q$(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,n)=>{const i={eventType:r,fn:n};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=r=>{this.subscribers.forEach(n=>{n.eventType===r.type&&n.fn(r)})},this.parseLocation=(r,n)=>{const i=({pathname:f,search:m,hash:p,href:y,state:v})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const O=this.options.parseSearch(m),P=this.options.stringifySearch(O);return{href:f+P+p,publicHref:y,pathname:sc(f).path,external:!1,searchStr:P,search:Ns(n==null?void 0:n.search,O),hash:sc(p.slice(1)).path,state:$a(n==null?void 0:n.state,v)}}const x=new URL(y,this.origin),j=bx(this.rewrite,x),w=this.options.parseSearch(j.search),N=this.options.stringifySearch(w);return j.search=N,{href:j.href.replace(j.origin,""),publicHref:y,pathname:sc(j.pathname).path,external:!!this.rewrite&&j.origin!==this.origin,searchStr:N,search:Ns(n==null?void 0:n.search,w),hash:sc(j.hash.slice(1)).path,state:$a(n==null?void 0:n.state,v)}},o=i(r),{__tempLocation:l,__tempKey:c}=o.state;if(l&&(!c||c===this.tempLocationKey)){const f=i(l);return f.state.key=o.state.key,f.state.__TSR_key=o.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:o}}return o},this.resolvePathWithBase=(r,n)=>iz({base:r,to:kb(n),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(r,n,i)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:n},i):this.matchRoutesInternal(r,n),this.getMatchedRoutes=r=>kz({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const n=this.getMatch(r);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.state.forEach(r=>{var i;if(this.stores.pendingMatchStoresById.has(r))return;const n=(i=this.stores.activeMatchStoresById.get(r))==null?void 0:i.state;n&&(n.status==="pending"||n.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const n=(o={})=>{var k,H;const l=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);o.from;const f=o.unsafeRelative==="path"?l.pathname:o.from??c.fullPath,m=this.resolvePathWithBase(f,"."),p=c.search,y=Object.assign(Object.create(null),c.params),v=o.to?this.resolvePathWithBase(m,`${o.to}`):this.resolvePathWithBase(m,"."),x=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?y:Object.assign(y,Ki(o.params,y)),j=this.getMatchedRoutes(v);let w=j.matchedRoutes;if((!j.foundRoute||j.foundRoute.path!=="/"&&j.routeParams["**"])&&this.options.notFoundRoute&&(w=[...w,this.options.notFoundRoute]),Object.keys(x).length>0)for(const q of w){const ae=((k=q.options.params)==null?void 0:k.stringify)??q.options.stringifyParams;if(ae)try{Object.assign(x,ae(x))}catch{}}const N=r.leaveParams?v:sc(u_({path:v,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=p;if(r._includeValidateSearch&&((H=this.options.search)!=null&&H.strict)){const q={};w.forEach(ae=>{if(ae.options.validateSearch)try{Object.assign(q,bh(ae.options.validateSearch,{...q,...O}))}catch{}}),O=q}O=Iz({search:O,dest:o,destRoutes:w,_includeValidateSearch:r._includeValidateSearch}),O=Ns(p,O);const P=this.options.stringifySearch(O),E=o.hash===!0?l.hash:o.hash?Ki(o.hash,l.hash):void 0,A=E?`#${E}`:"";let T=o.state===!0?l.state:o.state?Ki(o.state,l.state):{};T=$a(l.state,T);const M=`${N}${P}${A}`;let R,D,I=!1;if(this.rewrite){const q=new URL(M,this.origin),ae=P2(this.rewrite,q);R=q.href.replace(q.origin,""),ae.origin!==this.origin?(D=ae.href,I=!0):D=ae.pathname+ae.search+ae.hash}else R=G$(M),D=R;return{publicHref:D,href:R,pathname:N,search:O,searchStr:P,state:T,hash:E??"",external:I,unmaskOnReload:o.unmaskOnReload}},i=(o={},l)=>{const c=n(o);let f=l?n(l):void 0;if(!f){const m=Object.create(null);if(this.options.routeMasks){const p=X$(c.pathname,this.processedTree);if(p){Object.assign(m,p.rawParams);const{from:y,params:v,...x}=p.route,j=v===!1||v===null?Object.create(null):(v??!0)===!0?m:Object.assign(m,Ki(v,m));l={from:r.from,...x,params:j},f=n(l)}}}return f&&(c.maskedLocation=f),c};return r.mask?i(r,{from:r.from,...r.mask}):i(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:n,...i})=>{const o=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(p=>{i.state[p]=this.latestLocation.state[p]});const m=Qs(i.state,this.latestLocation.state);return f.forEach(p=>{delete i.state[p]}),m},l=Qi(this.latestLocation.href)===Qi(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Bl(()=>{c==null||c.resolve(),c=void 0}),l&&o())this.load();else{let{maskedLocation:f,hashScrollIntoView:m,...p}=i;f&&(p={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=m??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[i.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:n,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:l,href:c,...f}={})=>{if(c){const y=this.history.location.state.__TSR_index,v=Mh(c,{__TSR_index:r?y:y+1}),x=new URL(v.pathname,this.origin);f.to=bx(this.rewrite,x).pathname,f.search=this.options.parseSearch(v.search),f.hash=v.hash.slice(1)}const m=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const p=this.commitLocation({...m,viewTransition:o,replace:r,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:r,reloadDocument:n,href:i,publicHref:o,...l})=>{var f,m;let c=!1;if(i)try{new URL(`${i}`),c=!0}catch{}if(c&&!n&&(n=!0),n){if(r!==void 0||!i){const y=this.buildLocation({to:r,...l});i=i??y.publicHref,o=o??y.publicHref}const p=!c&&o?o:i;if(Th(p,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const y=((m=(f=this.history).getBlockers)==null?void 0:m.call(f))??[];for(const v of y)if(v!=null&&v.blockerFn&&await v.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return l.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...l,href:i,to:r,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const r=this.matchRoutes(this.latestLocation),n=this.stores.cachedMatchesSnapshot.state.filter(i=>!r.some(o=>o.id===i.id));this.batch(()=>{this.stores.status.setState(()=>"pending"),this.stores.statusCode.setState(()=>200),this.stores.isLoading.setState(()=>!0),this.stores.location.setState(()=>this.latestLocation),this.stores.setPendingMatches(r),this.stores.setCachedMatches(n)})},this.load=async r=>{let n,i,o;const l=this.stores.resolvedLocation.state??this.stores.location.state;for(o=new Promise(f=>{this.startTransition(async()=>{var m;try{this.beforeLoad();const p=this.latestLocation,y=this.stores.resolvedLocation.state,v=wl(p,y);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...v}),this.emit({type:"onBeforeLoad",...v}),await y_({router:this,sync:r==null?void 0:r.sync,forceStaleReload:l.href===p.href,matches:this.stores.pendingMatchesSnapshot.state,location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var O,P;let x=null,j=null,w=null,N=null;this.batch(()=>{const E=this.stores.pendingMatchesSnapshot.state,A=E.length,T=this.stores.activeMatchesSnapshot.state;x=A?T.filter(D=>!this.stores.pendingMatchStoresById.has(D.id)):null;const M=new Set;for(const D of this.stores.pendingMatchStoresById.values())D.routeId&&M.add(D.routeId);const R=new Set;for(const D of this.stores.activeMatchStoresById.values())D.routeId&&R.add(D.routeId);j=A?T.filter(D=>!M.has(D.routeId)):null,w=A?E.filter(D=>!R.has(D.routeId)):null,N=A?E.filter(D=>R.has(D.routeId)):T,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),A&&(this.stores.setActiveMatches(E),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(D=>D.status!=="error"&&D.status!=="notFound"&&D.status!=="redirected")]),this.clearExpiredCache())});for(const[E,A]of[[j,"onLeave"],[w,"onEnter"],[N,"onStay"]])if(E)for(const T of E)(P=(O=this.looseRoutesById[T.routeId].options)[A])==null||P.call(O,T)})})}})}catch(p){$r(p)?(n=p,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):Sr(p)&&(i=p);const y=n?n.status:i?404:this.stores.activeMatchesSnapshot.state.some(v=>v.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>y),this.stores.redirect.setState(()=>n)})}this.latestLoadPromise===o&&((m=this.commitLocationPromise)==null||m.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.activeMatchesSnapshot.state.some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.setState(()=>c)},this.startViewTransition=r=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,l=this.stores.resolvedLocation.state,c=typeof n.types=="function"?n.types(wl(o,l)):n.types;if(c===!1){r();return}i={update:r,types:c}}else i=r;document.startViewTransition(i)}else r()},this.updateMatch=(r,n)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStoresById.get(r);if(i){i.setState(n);return}const o=this.stores.activeMatchStoresById.get(r);if(o){o.setState(n);return}const l=this.stores.cachedMatchStoresById.get(r);if(l){const c=n(l.state);c.status==="redirected"?this.stores.cachedMatchStoresById.delete(r)&&this.stores.cachedMatchesId.setState(f=>f.filter(m=>m!==r)):l.setState(()=>c)}})},this.getMatch=r=>{var n,i,o;return((n=this.stores.cachedMatchStoresById.get(r))==null?void 0:n.state)??((i=this.stores.pendingMatchStoresById.get(r))==null?void 0:i.state)??((o=this.stores.activeMatchStoresById.get(r))==null?void 0:o.state)},this.invalidate=r=>{const n=i=>{var o;return((o=r==null?void 0:r.filter)==null?void 0:o.call(r,i))??!0?{...i,invalid:!0,...r!=null&&r.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setActiveMatches(this.stores.activeMatchesSnapshot.state.map(n)),this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.map(n)),this.stores.setPendingMatches(this.stores.pendingMatchesSnapshot.state.map(n))}),this.shouldViewTransition=!1,this.load({sync:r==null?void 0:r.sync})},this.getParsedLocationHref=r=>r.publicHref||"/",this.resolveRedirect=r=>{const n=r.headers.get("Location");if(!r.options.href||r.options._builtLocation){const i=r.options._builtLocation??this.buildLocation(r.options),o=this.getParsedLocationHref(i);r.options.href=o,r.headers.set("Location",o)}else if(n)try{const i=new URL(n);if(this.origin&&i.origin===this.origin){const o=i.pathname+i.search+i.hash;r.options.href=o,r.headers.set("Location",o)}}catch{}if(r.options.href&&!r.options._builtLocation&&Th(r.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return r.headers.get("Location")||r.headers.set("Location",r.options.href),r},this.clearCache=r=>{const n=r==null?void 0:r.filter;n!==void 0?this.stores.setCachedMatches(this.stores.cachedMatchesSnapshot.state.filter(i=>!n(i))):this.stores.setCachedMatches([])},this.clearExpiredCache=()=>{const r=Date.now(),n=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const l=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:r-i.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=kc,this.preloadRoute=async r=>{const n=r._builtLocation??this.buildLocation(r);let i=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:r});const o=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),l=new Set([...o,...this.stores.cachedMatchesId.state]),c=i.filter(f=>!l.has(f.id));if(c.length){const f=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...f,...c])}try{return i=await y_({router:this,matches:i,location:n,preload:!0,updateMatch:(f,m)=>{o.has(f)?i=i.map(p=>p.id===f?m(p):p):this.updateMatch(f,m)}}),i}catch(f){if($r(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:n});Sr(f)||console.error(f);return}},this.matchRoute=(r,n)=>{const i={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},o=this.buildLocation(i);if(n!=null&&n.pending&&this.stores.status.state!=="pending")return!1;const l=((n==null?void 0:n.pending)===void 0?!this.stores.isLoading.state:n.pending)?this.latestLocation:this.stores.resolvedLocation.state||this.stores.location.state,c=Z$(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,l.pathname,this.processedTree);return!c||r.params&&!Qs(c.rawParams,r.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?Qs(l.search,o.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.stores.activeMatchesSnapshot.state.some(r=>r.status==="notFound"||r.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??yz,parseSearch:e.parseSearch??pz,protocolAllowlist:e.protocolAllowlist??K$}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}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 y,v;const r=this.getMatchedRoutes(e.pathname),{foundRoute:n,routeParams:i,parsedParams:o}=r;let{matchedRoutes:l}=r,c=!1;(n?n.path!=="/"&&i["**"]:Qi(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:c=!0);const f=c?$z(this.options.notFoundMode,l):void 0,m=new Array(l.length),p=new Map;for(const x of this.stores.activeMatchStoresById.values())x.routeId&&p.set(x.routeId,x.state);for(let x=0;x<l.length;x++){const j=l[x],w=m[x-1];let N,O,P;{const Z=(w==null?void 0:w.search)??e.search,B=(w==null?void 0:w._strictSearch)??void 0;try{const K=bh(j.options.validateSearch,{...Z})??void 0;N={...Z,...K},O={...B,...K},P=void 0}catch(K){let ee=K;if(K instanceof Rh||(ee=new Rh(K.message,{cause:K})),t!=null&&t.throwOnError)throw ee;N=Z,O={},P=ee}}const E=((v=(y=j.options).loaderDeps)==null?void 0:v.call(y,{search:N}))??"",A=E?JSON.stringify(E):"",{interpolatedPath:T,usedParams:M}=u_({path:j.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),R=j.id+T+A,D=this.getMatch(R),I=p.get(j.id),k=(D==null?void 0:D._strictParams)??M;let H;if(!D)try{j_(j,M,o,k)}catch(Z){if(Sr(Z)||$r(Z)?H=Z:H=new Rz(Z.message,{cause:Z}),t!=null&&t.throwOnError)throw H}Object.assign(i,k);const q=I?"stay":"enter";let ae;if(D)ae={...D,cause:q,params:(I==null?void 0:I.params)??i,_strictParams:k,search:Ns(I?I.search:D.search,N),_strictSearch:O};else{const Z=j.options.loader||j.options.beforeLoad||j.lazyFn||R2(j)?"pending":"success";ae={id:R,ssr:j.options.ssr,index:x,routeId:j.id,params:(I==null?void 0:I.params)??i,_strictParams:k,pathname:T,updatedAt:Date.now(),search:I?Ns(I.search,N):N,_strictSearch:O,searchError:void 0,status:Z,isFetching:!1,error:void 0,paramsError:H,__routeContext:void 0,_nonReactive:{loadPromise:Bl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:q,loaderDeps:I?$a(I.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:j.options.staticData||{},fullPath:j.fullPath}}t!=null&&t.preload||(ae.globalNotFound=f===j.id),ae.searchError=P;const Q=this.getParentContext(w);ae.context={...Q,...ae.__routeContext,...ae.__beforeLoadContext},m[x]=ae}for(let x=0;x<m.length;x++){const j=m[x],w=this.looseRoutesById[j.routeId],N=this.getMatch(j.id),O=p.get(j.routeId);if(j.params=O?Ns(O.params,i):i,!N){const P=m[x-1],E=this.getParentContext(P);if(w.options.context){const A={deps:j.loaderDeps,params:j.params,context:E??{},location:e,navigate:T=>this.navigate({...T,_fromLocation:e}),buildLocation:this.buildLocation,cause:j.cause,abortController:j.abortController,preload:!!j.preload,matches:m,routeId:w.id};j.__routeContext=w.options.context(A)??void 0}j.context={...E,...j.__routeContext,...j.__beforeLoadContext}}}return m}matchRoutesLightweight(e){var p;const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),i=Mc(t),o={...e.search};for(const y of t)try{Object.assign(o,bh(y.options.validateSearch,o))}catch{}const l=Mc(this.stores.matchesId.state),c=l&&((p=this.stores.activeMatchStoresById.get(l))==null?void 0:p.state),f=c&&c.routeId===i.id&&c.pathname===e.pathname;let m;if(f)m=c.params;else{const y=Object.assign(Object.create(null),r);for(const v of t)try{j_(v,r,n??{},y)}catch{}m=y}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:m}}},Rh=class extends Error{},Rz=class extends Error{};function Dz(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function bh(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Rh("Async validation not supported");if(r.issues)throw new Rh(JSON.stringify(r.issues,void 0,2),{cause:r});return r.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function kz({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),i=Qi(e);let o,l;const c=W$(i,r,!0);return c&&(o=c.route,Object.assign(n,c.rawParams),l=Object.assign(Object.create(null),c.parsedParams)),{matchedRoutes:(c==null?void 0:c.branch)||[t.__root__],routeParams:n,foundRoute:o,parsedParams:l}}function Iz({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return Lz(r)(e,t,n??!1)}function Lz(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)(i=o.options.search)!=null&&i.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const l=({search:c,next:f})=>{let m=c;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(m=o.options.preSearchFilters.reduce((y,v)=>v(y),c));const p=f(m);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((y,v)=>v(y),p):p};t.middlewares.push(l)}if(o.options.validateSearch){const l=({search:c,next:f})=>{const m=f(c);if(!t._includeValidateSearch)return m;try{return{...m,...bh(o.options.validateSearch,m)??void 0}}catch{return m}};t.middlewares.push(l)}}const r=({search:o})=>{const l=t.dest;return l.search?l.search===!0?o:Ki(l.search,o):{}};t.middlewares.push(r);const n=(o,l,c)=>{if(o>=c.length)return l;const f=c[o];return f({search:l,next:p=>n(o+1,p,c)})};return function(l,c,f){return t.dest=c,t._includeValidateSearch=f,n(0,l,t.middlewares)}}function $z(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.children)return n.id}return Xs}function j_(e,t,r,n){var o;const i=((o=e.options.params)==null?void 0:o.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const l in t)l in r&&(n[l]=r[l]);else{const l=i(n);Object.assign(n,l)}}var zz="Error preloading route! ☝️",D2=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 f,m;this.originalIndex=t.originalIndex;const r=this.options,n=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(m=(f=this.options).getParentRoute)==null?void 0:m.call(f),n?this._path=Xs:this.parentRoute||Ua();let i=n?Xs:r==null?void 0:r.path;i&&i!=="/"&&(i=E2(i));const o=(r==null?void 0:r.id)||i;let l=n?Xs:gh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),l!=="__root__"&&(l=gh(["/",l]));const c=l==="__root__"?"/":gh([this.parentRoute.fullPath,i]);this._path=i,this._id=l,this._fullPath=c,this._to=Qi(c)},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=>xz({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.")}},Bz=class extends D2{constructor(e){super(e)}};function Uz(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.state,r=t.state.__hashScrollIntoViewOptions??!0;if(r&&t.hash!==""){const n=document.getElementById(t.hash);n&&n.scrollIntoView(r)}}}function Lb(e){const t=e.errorComponent??$b;return d.jsx(qz,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?S.createElement(t,{error:r,reset:n}):e.children})}var qz=class extends S.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,t){t.error&&t.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}};function $b({error:e}){const[t,r]=S.useState(!1);return d.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[d.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[d.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),d.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r(n=>!n),children:t?"Hide Error":"Show Error"})]}),d.jsx("div",{style:{height:".25rem"}}),t?d.jsx("div",{children:d.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?d.jsx("code",{children:e.message}):null})}):null]})}function Hz({children:e,fallback:t=null}){return k2()?d.jsx($l.Fragment,{children:e}):d.jsx($l.Fragment,{children:t})}function k2(){return $l.useSyncExternalStore(Fz,()=>!0,()=>!1)}function Fz(){return()=>{}}var I2=S.createContext(null);function mr(e){return S.useContext(I2)}var km=S.createContext(void 0),Kz=S.createContext(void 0),dt=(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))(dt||{});function Gz({update:e,notify:t,unwatched:r}){return{link:n,unlink:i,propagate:o,checkDirty:l,shallowPropagate:c};function n(m,p,y){const v=p.depsTail;if(v!==void 0&&v.dep===m)return;const x=v!==void 0?v.nextDep:p.deps;if(x!==void 0&&x.dep===m){x.version=y,p.depsTail=x;return}const j=m.subsTail;if(j!==void 0&&j.version===y&&j.sub===p)return;const w=p.depsTail=m.subsTail={version:y,dep:m,sub:p,prevDep:v,nextDep:x,prevSub:j,nextSub:void 0};x!==void 0&&(x.prevDep=w),v!==void 0?v.nextDep=w:p.deps=w,j!==void 0?j.nextSub=w:m.subs=w}function i(m,p=m.sub){const y=m.dep,v=m.prevDep,x=m.nextDep,j=m.nextSub,w=m.prevSub;return x!==void 0?x.prevDep=v:p.depsTail=v,v!==void 0?v.nextDep=x:p.deps=x,j!==void 0?j.prevSub=w:y.subsTail=w,w!==void 0?w.nextSub=j:(y.subs=j)===void 0&&r(y),x}function o(m){let p=m.nextSub,y;e:do{const v=m.sub;let x=v.flags;if(x&60?x&12?x&4?!(x&48)&&f(m,v)?(v.flags=x|40,x&=1):x=0:v.flags=x&-9|32:x=0:v.flags=x|32,x&2&&t(v),x&1){const j=v.subs;if(j!==void 0){const w=(m=j).nextSub;w!==void 0&&(y={value:p,prev:y},p=w);continue}}if((m=p)!==void 0){p=m.nextSub;continue}for(;y!==void 0;)if(m=y.value,y=y.prev,m!==void 0){p=m.nextSub;continue e}break}while(!0)}function l(m,p){let y,v=0,x=!1;e:do{const j=m.dep,w=j.flags;if(p.flags&16)x=!0;else if((w&17)===17){if(e(j)){const N=j.subs;N.nextSub!==void 0&&c(N),x=!0}}else if((w&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(y={value:m,prev:y}),m=j.deps,p=j,++v;continue}if(!x){const N=m.nextDep;if(N!==void 0){m=N;continue}}for(;v--;){const N=p.subs,O=N.nextSub!==void 0;if(O?(m=y.value,y=y.prev):m=N,x){if(e(p)){O&&c(N),p=m.sub;continue}x=!1}else p.flags&=-33;p=m.sub;const P=m.nextDep;if(P!==void 0){m=P;continue e}}return x}while(!0)}function c(m){do{const p=m.sub,y=p.flags;(y&48)===32&&(p.flags=y|16,(y&6)===2&&t(p))}while((m=m.nextSub)!==void 0)}function f(m,p){let y=p.depsTail;for(;y!==void 0;){if(y===m)return!0;y=y.prevDep}return!1}}function zb(e,t,r){var o,l,c;const n=typeof e=="object",i=n?e:void 0;return{next:(o=n?e.next:e)==null?void 0:o.bind(i),error:(l=n?e.error:t)==null?void 0:l.bind(i),complete:(c=n?e.complete:r)==null?void 0:c.bind(i)}}const wx=[];let jh=0;const{link:w_,unlink:Yz,propagate:Vz,checkDirty:L2,shallowPropagate:S_}=Gz({update(e){return e._update()},notify(e){wx[Sx++]=e,e.flags&=~dt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=dt.Mutable|dt.Dirty,Dh(e))}});let Zf=0,Sx=0,Xn,Nx=0;function $2(e){try{++Nx,e()}finally{--Nx||z2()}}function Dh(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=Yz(r,e)}function z2(){if(!(Nx>0)){for(;Zf<Sx;){const e=wx[Zf];wx[Zf++]=void 0,e.notify()}Zf=0,Sx=0}}function B2(e,t){const r=typeof e=="function",n=e,i={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?dt.None:dt.Mutable,get(){return Xn!==void 0&&w_(i,Xn,jh),i._snapshot},subscribe(o){const l=zb(o),c={current:!1},f=Qz(()=>{var m;i.get(),c.current?(m=l.next)==null||m.call(l,i._snapshot):c.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(o){const l=Xn,c=Object.is;if(r)Xn=i,++jh,i.depsTail=void 0;else if(o===void 0)return!1;r&&(i.flags=dt.Mutable|dt.RecursedCheck);try{const f=i._snapshot,m=typeof o=="function"?o(f):o===void 0&&r?n(f):o;return f===void 0||!c(f,m)?(i._snapshot=m,!0):!1}finally{Xn=l,r&&(i.flags&=~dt.RecursedCheck),Dh(i)}}};return r?(i.flags=dt.Mutable|dt.Dirty,i.get=function(){const o=i.flags;if(o&dt.Dirty||o&dt.Pending&&L2(i.deps,i)){if(i._update()){const l=i.subs;l!==void 0&&S_(l)}}else o&dt.Pending&&(i.flags=o&~dt.Pending);return Xn!==void 0&&w_(i,Xn,jh),i._snapshot}):i.set=function(o){if(i._update(o)){const l=i.subs;l!==void 0&&(Vz(l),S_(l),z2())}},i}function Qz(e){const t=()=>{const n=Xn;Xn=r,++jh,r.depsTail=void 0,r.flags=dt.Watching|dt.RecursedCheck;try{return e()}finally{Xn=n,r.flags&=~dt.RecursedCheck,Dh(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:dt.Watching|dt.RecursedCheck,notify(){const n=this.flags;n&dt.Dirty||n&dt.Pending&&L2(this.deps,this)?t():this.flags=dt.Watching},stop(){this.flags=dt.None,this.depsTail=void 0,Dh(this)}};return t(),r}class Xz{constructor(t){this.atom=B2(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(zb(t))}}class Zz{constructor(t){this.atom=B2(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(zb(t))}}function N_(e){return typeof e=="function"?new Zz(e):new Xz(e)}var pg={exports:{}},yg={},vg={exports:{}},gg={};/**
|
|
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 O_;function Wz(){if(O_)return gg;O_=1;var e=eu();function t(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(y,v){var x=v(),j=n({inst:{value:x,getSnapshot:v}}),w=j[0].inst,N=j[1];return o(function(){w.value=x,w.getSnapshot=v,f(w)&&N({inst:w})},[y,x,v]),i(function(){return f(w)&&N({inst:w}),y(function(){f(w)&&N({inst:w})})},[y]),l(x),x}function f(y){var v=y.getSnapshot;y=y.value;try{var x=v();return!r(y,x)}catch{return!0}}function m(y,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:c;return gg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,gg}var __;function Jz(){return __||(__=1,vg.exports=Wz()),vg.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 E_;function e8(){if(E_)return yg;E_=1;var e=eu(),t=Jz();function r(m,p){return m===p&&(m!==0||1/m===1/p)||m!==m&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return yg.useSyncExternalStoreWithSelector=function(m,p,y,v,x){var j=o(null);if(j.current===null){var w={hasValue:!1,value:null};j.current=w}else w=j.current;j=c(function(){function O(M){if(!P){if(P=!0,E=M,M=v(M),x!==void 0&&w.hasValue){var R=w.value;if(x(R,M))return A=R}return A=M}if(R=A,n(E,M))return R;var D=v(M);return x!==void 0&&x(R,D)?(E=M,R):(E=M,A=D)}var P=!1,E,A,T=y===void 0?null:y;return[function(){return O(p())},T===null?void 0:function(){return O(T())}]},[p,y,v,x]);var N=i(m,j[0],j[1]);return l(function(){w.hasValue=!0,w.value=N},[N]),f(N),N},yg}var A_;function t8(){return A_||(A_=1,pg.exports=e8()),pg.exports}var U2=t8();function r8(e,t){return e===t}function sr(e,t,r=r8){const n=S.useCallback(l=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(l);return c},[e]),i=S.useCallback(()=>e==null?void 0:e.get(),[e]);return U2.useSyncExternalStoreWithSelector(n,i,i,t,r)}var n8={state:void 0,get:()=>{},subscribe:()=>()=>{}};function fo(e){const t=mr(),r=S.useContext(e.from?Kz:km),n=e.from??r,i=n?e.from?t.stores.getMatchStoreByRouteId(n):t.stores.activeMatchStoresById.get(n):void 0,o=S.useRef(void 0);return sr(i??n8,l=>{if((e.shouldThrow??!0)&&!l&&Ua(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const f=$a(o.current,c);return o.current=f,f}return c})}function q2(e){return fo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function H2(e){const{select:t,...r}=e;return fo({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function F2(e){return fo({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const r=e.strict===!1?t.params:t._strictParams;return e.select?e.select(r):r}})}function K2(e){return fo({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ho(e){const t=mr();return S.useCallback(r=>t.navigate({...r,from:r.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function G2(e){return fo({...e,select:t=>e.select?e.select(t.context):t.context})}var Im=o2();function a8(e,t){const r=mr(),n=B$(t),{activeProps:i,inactiveProps:o,activeOptions:l,to:c,preload:f,preloadDelay:m,hashScrollIntoView:p,replace:y,startTransition:v,resetScroll:x,viewTransition:j,children:w,target:N,disabled:O,style:P,className:E,onClick:A,onBlur:T,onFocus:M,onMouseEnter:R,onMouseLeave:D,onTouchStart:I,ignoreBlocker:k,params:H,search:q,hash:ae,state:Q,mask:Z,reloadDocument:B,unsafeRelative:K,from:ee,_fromLocation:se,...ue}=e,L=k2(),W=S.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),le=sr(r.stores.location,Te=>Te,(Te,ur)=>Te.href===ur.href),oe=S.useMemo(()=>{const Te={_fromLocation:le,...W};return r.buildLocation(Te)},[r,le,W]),ye=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,Se=oe.maskedLocation?oe.maskedLocation.external:oe.external,Ne=S.useMemo(()=>c8(ye,Se,r.history,O),[O,Se,ye,r.history]),Ce=S.useMemo(()=>{if(Ne!=null&&Ne.external)return Th(Ne.href,r.protocolAllowlist)?void 0:Ne.href;if(!d8(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),Th(c,r.protocolAllowlist)?void 0:c}catch{}},[c,Ne,r.protocolAllowlist]),de=S.useMemo(()=>{if(Ce)return!1;if(l!=null&&l.exact){if(!az(le.pathname,oe.pathname,r.basepath))return!1}else{const Te=Ch(le.pathname,r.basepath),ur=Ch(oe.pathname,r.basepath);if(!(Te.startsWith(ur)&&(Te.length===ur.length||Te[ur.length]==="/")))return!1}return((l==null?void 0:l.includeSearch)??!0)&&!Qs(le.search,oe.search,{partial:!(l!=null&&l.exact),ignoreUndefined:!(l!=null&&l.explicitUndefined)})?!1:l!=null&&l.includeHash?L&&le.hash===oe.hash:!0},[l==null?void 0:l.exact,l==null?void 0:l.explicitUndefined,l==null?void 0:l.includeHash,l==null?void 0:l.includeSearch,le,Ce,L,oe.hash,oe.pathname,oe.search,r.basepath]),te=de?Ki(i,{})??i8:xg,we=de?xg:Ki(o,{})??xg,ce=[E,te.className,we.className].filter(Boolean).join(" "),_t=(P||te.style||we.style)&&{...P,...te.style,...we.style},[De,Et]=S.useState(!1),At=S.useRef(!1),lr=e.reloadDocument||Ce?!1:f??r.options.defaultPreload,fa=m??r.options.defaultPreloadDelay??0,An=S.useCallback(()=>{r.preloadRoute({...W,_builtLocation:oe}).catch(Te=>{console.warn(Te),console.warn(zz)})},[r,W,oe]);z$(n,S.useCallback(Te=>{Te!=null&&Te.isIntersecting&&An()},[An]),u8,{disabled:!!O||lr!=="viewport"}),S.useEffect(()=>{At.current||!O&&lr==="render"&&(An(),At.current=!0)},[O,An,lr]);const du=Te=>{const ur=Te.currentTarget.getAttribute("target"),qn=N!==void 0?N:ur;if(!O&&!f8(Te)&&!Te.defaultPrevented&&(!qn||qn==="_self")&&Te.button===0){Te.preventDefault(),Im.flushSync(()=>{Et(!0)});const Pd=r.subscribe("onResolved",()=>{Pd(),Et(!1)});r.navigate({...W,replace:y,resetScroll:x,hashScrollIntoView:p,startTransition:v,viewTransition:j,ignoreBlocker:k})}};if(Ce)return{...ue,ref:n,href:Ce,...w&&{children:w},...N&&{target:N},...O&&{disabled:O},...P&&{style:P},...E&&{className:E},...A&&{onClick:A},...T&&{onBlur:T},...M&&{onFocus:M},...R&&{onMouseEnter:R},...D&&{onMouseLeave:D},...I&&{onTouchStart:I}};const wo=Te=>{if(O||lr!=="intent")return;if(!fa){An();return}const ur=Te.currentTarget;if(cc.has(ur))return;const qn=setTimeout(()=>{cc.delete(ur),An()},fa);cc.set(ur,qn)},Bp=Te=>{O||lr!=="intent"||An()},Ad=Te=>{if(O||!lr||!fa)return;const ur=Te.currentTarget,qn=cc.get(ur);qn&&(clearTimeout(qn),cc.delete(ur))};return{...ue,...te,...we,href:Ne==null?void 0:Ne.href,ref:n,onClick:ol([A,du]),onBlur:ol([T,Ad]),onFocus:ol([M,wo]),onMouseEnter:ol([R,wo]),onMouseLeave:ol([D,Ad]),onTouchStart:ol([I,Bp]),disabled:!!O,target:N,..._t&&{style:_t},...ce&&{className:ce},...O&&s8,...de&&o8,...L&&De&&l8}}var xg={},i8={className:"active"},s8={role:"link","aria-disabled":!0},o8={"data-status":"active","aria-current":"page"},l8={"data-transitioning":"transitioning"},cc=new WeakMap,u8={rootMargin:"100px"},ol=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function c8(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function d8(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Oe=S.forwardRef((e,t)=>{const{_asChild:r,...n}=e,{type:i,...o}=a8(n,t),l=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!r){const{disabled:c,...f}=o;return S.createElement("a",f,l)}return S.createElement(r,o,l)});function f8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var h8=class extends D2{constructor(t){super(t),this.useMatch=r=>fo({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>G2({...r,from:this.id}),this.useSearch=r=>K2({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>F2({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>H2({...r,from:this.id}),this.useLoaderData=r=>q2({...r,from:this.id}),this.useNavigate=()=>ho({from:this.fullPath}),this.Link=$l.forwardRef((r,n)=>d.jsx(Oe,{ref:n,from:this.fullPath,...r}))}};function m8(e){return new h8(e)}var p8=class extends Bz{constructor(e){super(e),this.useMatch=t=>fo({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>G2({...t,from:this.id}),this.useSearch=t=>K2({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>F2({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>H2({...t,from:this.id}),this.useLoaderData=t=>q2({...t,from:this.id}),this.useNavigate=()=>ho({from:this.fullPath}),this.Link=$l.forwardRef((t,r)=>d.jsx(Oe,{ref:r,from:this.fullPath,...t}))}};function y8(e){return new p8(e)}function _r(e){return typeof e=="object"?new P_(e,{silent:!0}).createRoute(e):new P_(e,{silent:!0}).createRoute}var P_=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=m8(r);return n.isRoot=!1,n},this.silent=t==null?void 0:t.silent}};function v8(e){const t=mr(),r=`not-found-${sr(t.stores.location,n=>n.pathname)}-${sr(t.stores.status,n=>n)}`;return d.jsx(Lb,{getResetKey:()=>r,onCatch:(n,i)=>{var o;if(Sr(n))(o=e.onCatch)==null||o.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(Sr(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function g8(){return d.jsx("p",{children:"Not Found"})}function vl(e){return d.jsx(d.Fragment,{children:e.children})}function Y2(e,t,r){return t.options.notFoundComponent?d.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?d.jsx(e.options.defaultNotFoundComponent,{...r}):d.jsx(g8,{})}function x8(e){return null}function b8(){return x8(mr()),null}var V2=S.memo(function({matchId:t}){const r=mr(),n=r.stores.activeMatchStoresById.get(t);n||Ua();const i=sr(r.stores.loadedAt,l=>l),o=sr(n,l=>l);return d.jsx(j8,{router:r,matchId:t,resetKey:i,matchState:S.useMemo(()=>{var f;const l=o.routeId,c=(f=r.routesById[l].parentRoute)==null?void 0:f.id;return{routeId:l,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:c}},[o._displayPending,o.routeId,o.ssr,r.routesById])})});function j8({router:e,matchId:t,resetKey:r,matchState:n}){var j,w;const i=e.routesById[n.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,l=o?d.jsx(o,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,f=i.options.onCatch??e.options.defaultOnCatch,m=i.isRoot?i.options.notFoundComponent??((j=e.options.notFoundRoute)==null?void 0:j.options.component):i.options.notFoundComponent,p=n.ssr===!1||n.ssr==="data-only",y=(!i.isRoot||i.options.wrapInSuspense||p)&&(i.options.wrapInSuspense??o??(((w=i.options.errorComponent)==null?void 0:w.preload)||p))?S.Suspense:vl,v=c?Lb:vl,x=m?v8:vl;return d.jsxs(i.isRoot?i.options.shellComponent??vl:vl,{children:[d.jsx(km.Provider,{value:t,children:d.jsx(y,{fallback:l,children:d.jsx(v,{getResetKey:()=>r,errorComponent:c||$b,onCatch:(N,O)=>{if(Sr(N))throw N;f==null||f(N,O)},children:d.jsx(x,{fallback:N=>{if(!m||N.routeId&&N.routeId!==n.routeId||!N.routeId&&!i.isRoot)throw N;return S.createElement(m,N)},children:p||n._displayPending?d.jsx(Hz,{fallback:l,children:d.jsx(T_,{matchId:t})}):d.jsx(T_,{matchId:t})})})})}),n.parentRouteId===Xs?d.jsxs(d.Fragment,{children:[d.jsx(w8,{resetKey:r}),e.options.scrollRestoration&&N2?d.jsx(b8,{}):null]}):null]})}function w8({resetKey:e}){const t=mr(),r=S.useRef(void 0);return Sc(()=>{const n=t.latestLocation.href;(r.current===void 0||r.current!==n)&&(t.emit({type:"onRendered",...wl(t.stores.location.state,t.stores.resolvedLocation.state)}),r.current=n)},[t.latestLocation.state.__TSR_key,e,t]),null}var T_=S.memo(function({matchId:t}){var m,p,y,v;const r=mr(),n=r.stores.activeMatchStoresById.get(t);n||Ua();const i=sr(n,x=>x),o=i.routeId,l=r.routesById[o],c=S.useMemo(()=>{var j;const x=(j=r.routesById[o].options.remountDeps??r.options.defaultRemountDeps)==null?void 0:j({routeId:o,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return x?JSON.stringify(x):void 0},[o,i.loaderDeps,i._strictParams,i._strictSearch,r.options.defaultRemountDeps,r.routesById]),f=S.useMemo(()=>{const x=l.options.component??r.options.defaultComponent;return x?d.jsx(x,{},c):d.jsx(Q2,{})},[c,l.options.component,r.options.defaultComponent]);if(i._displayPending)throw(m=r.getMatch(i.id))==null?void 0:m._nonReactive.displayPendingPromise;if(i._forcePending)throw(p=r.getMatch(i.id))==null?void 0:p._nonReactive.minPendingPromise;if(i.status==="pending"){const x=l.options.pendingMinMs??r.options.defaultPendingMinMs;if(x){const j=r.getMatch(i.id);if(j&&!j._nonReactive.minPendingPromise){const w=Bl();j._nonReactive.minPendingPromise=w,setTimeout(()=>{w.resolve(),j._nonReactive.minPendingPromise=void 0},x)}}throw(y=r.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise}if(i.status==="notFound")return Sr(i.error)||Ua(),Y2(r,l,i.error);if(i.status==="redirected")throw $r(i.error)||Ua(),(v=r.getMatch(i.id))==null?void 0:v._nonReactive.loadPromise;if(i.status==="error")throw i.error;return f}),Q2=S.memo(function(){const t=mr(),r=S.useContext(km);let n,i=!1,o;{const m=r?t.stores.activeMatchStoresById.get(r):void 0;[n,i]=sr(m,p=>[p==null?void 0:p.routeId,(p==null?void 0:p.globalNotFound)??!1]),o=sr(t.stores.matchesId,p=>p[p.findIndex(y=>y===r)+1])}const l=n?t.routesById[n]:void 0,c=t.options.defaultPendingComponent?d.jsx(t.options.defaultPendingComponent,{}):null;if(i)return l||Ua(),Y2(t,l,void 0);if(!o)return null;const f=d.jsx(V2,{matchId:o});return n===Xs?d.jsx(S.Suspense,{fallback:c,children:f}):f});function S8(){const e=mr(),t=S.useRef({router:e,mounted:!1}),[r,n]=S.useState(!1),i=sr(e.stores.isLoading,y=>y),o=sr(e.stores.hasPendingMatches,y=>y),l=og(i),c=i||r||o,f=og(c),m=i||o,p=og(m);return e.startTransition=y=>{n(!0),S.startTransition(()=>{y(),n(!1)})},S.useEffect(()=>{const y=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Qi(e.latestLocation.publicHref)!==Qi(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{y()}},[e,e.history]),Sc(()=>{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(v){console.error(v)}})()},[e]),Sc(()=>{l&&!i&&e.emit({type:"onLoad",...wl(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,e,i]),Sc(()=>{p&&!m&&e.emit({type:"onBeforeRouteMount",...wl(e.stores.location.state,e.stores.resolvedLocation.state)})},[m,p,e]),Sc(()=>{if(f&&!c){const y=wl(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...y}),$2(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),y.hrefChanged&&Uz(e)}},[c,f,e]),null}function N8(){const e=mr(),t=e.routesById[Xs].options.pendingComponent??e.options.defaultPendingComponent,r=t?d.jsx(t,{}):null,n=d.jsxs(typeof document<"u"&&e.ssr?vl:S.Suspense,{fallback:r,children:[d.jsx(S8,{}),d.jsx(O8,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:n}):n}function O8(){const e=mr(),t=sr(e.stores.firstMatchId,i=>i),r=sr(e.stores.loadedAt,i=>i),n=t?d.jsx(V2,{matchId:t}):null;return d.jsx(km.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:d.jsx(Lb,{getResetKey:()=>r,errorComponent:$b,onCatch:void 0,children:n})})}function _8(){const e=mr();return sr(e.stores.matchRouteReactivity,t=>t),S.useCallback(t=>{const{pending:r,caseSensitive:n,fuzzy:i,includeSearch:o,...l}=t;return e.matchRoute(l,{pending:r,caseSensitive:n,fuzzy:i,includeSearch:o})},[e])}function E8(e){const t=mr(),r=S.useRef(void 0);return sr(t.stores.activeMatchesSnapshot,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=$a(r.current,i);return r.current=o,o}return i})}var A8=e=>({createMutableStore:N_,createReadonlyStore:N_,batch:$2}),P8=e=>new T8(e),T8=class extends Mz{constructor(e){super(e,A8)}};function C8({router:e,children:t,...r}){Object.keys(r).length>0&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});const n=d.jsx(I2.Provider,{value:e,children:t});return e.options.Wrap?d.jsx(e.options.Wrap,{children:n}):n}function M8({router:e,...t}){return d.jsx(C8,{router:e,...t,children:d.jsx(N8,{})})}function Bb(e){const r=mr();return S.useRef(void 0),sr(r.stores.__store,n=>n)}function X2(e){const t=mr(),r=S.useRef(void 0);return sr(t.stores.location,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=$a(r.current,i);return r.current=o,o}return i})}const Z2=S.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function R8({children:e}){const[t,r]=S.useState(!1),n=S.useCallback(()=>r(l=>!l),[]),i=S.useCallback(()=>r(!1),[]),o=S.useMemo(()=>({isOpen:t,toggle:n,close:i}),[i,t,n]);return d.jsx(Z2.Provider,{value:o,children:e})}function W2(){return S.useContext(Z2)}function J2(e){if(!e)return;const t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toLocaleString()}function D8(e){const t=J2(e);return t?`Last synced ${t}`:"Never synced"}function Ub(e){return typeof e!="number"||!Number.isFinite(e)?"Remote runs unknown":`${e} remote run${e===1?"":"s"}`}function k8(e,t){return(e==null?void 0:e.configured)!==!0?[]:[t?`Project: ${t}`:void 0,Ub(e.run_count),D8(e.last_synced_at),e.repo?`Repo: ${e.repo}`:void 0].filter(r=>r!==void 0)}function I8(e){return(e==null?void 0:e.sync_status)==="syncing"}function L8(e,t=!1){if(t||(e==null?void 0:e.sync_status)==="syncing")return{state:"syncing",label:"Syncing",actionLabel:"Syncing...",tone:"info",summary:"Sync is in progress.",canSync:!1};if((e==null?void 0:e.configured)!==!0)return{state:"unconfigured",label:"Not configured",actionLabel:"Sync Project",tone:"neutral",summary:"Remote results are not configured for this project.",canSync:!1};if(e.available!==!0||e.sync_status==="unavailable")return{state:"unavailable",label:"Unavailable",actionLabel:"Sync Project",tone:"warn",summary:"The remote results cache is not available locally.",nextAction:"Sync Project can clone or refresh the configured results repo.",canSync:!0};const r=e.sync_status??"clean";return r==="conflicted"||r==="diverged"?{state:"conflicted",label:"Conflicted",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??(r==="diverged"?"Local and remote results histories have diverged.":"The results repo has unresolved conflicts."),nextAction:"Resolve the results repo conflicts manually, then sync the project again.",canSync:!1}:r==="dirty"?{state:"dirty",label:"Dirty",actionLabel:"Sync Metadata",tone:"warn",summary:e.block_reason??"Local result metadata has pending edits.",nextAction:e.auto_push===!0?"Sync Project will commit safe result metadata changes before syncing.":"Review or commit the pending result metadata; no reset will be performed.",canSync:!0}:r==="behind"?{state:"behind",label:"Behind",actionLabel:"Sync Project",tone:"info",summary:`Remote has ${e.behind??0} commit${e.behind===1?"":"s"} to pull.`,nextAction:"Sync Project will fast-forward when possible.",canSync:!0}:r==="ahead"?{state:"ahead",label:"Ahead",actionLabel:"Push Results",tone:"info",summary:`Local results are ${e.ahead??0} commit${e.ahead===1?"":"s"} ahead.`,nextAction:e.auto_push===!0?"Sync Project will push safe result changes.":"Enable auto_push or push the results repo manually.",canSync:!0}:{state:"clean",label:"Clean",actionLabel:"Sync Project",tone:"good",summary:"Local and remote result metadata are in sync.",canSync:!0}}function $8(e){return typeof e!="number"||!Number.isFinite(e)?"remote results":Ub(e)}function C_(e){const t=[`Synced ${$8(e.run_count)}`];e.repo&&t.push(`from ${e.repo}`);const r=J2(e.last_synced_at);return r&&t.push(`at ${r}`),`${t.join(" ")}.`}function z8(e){if((e==null?void 0:e.available)!==!0)return;const t=e.run_count;return typeof t=="number"&&Number.isFinite(t)&&t>0?`Cached ${Ub(t)} ${t===1?"remains":"remain"} available.`:"The remote results cache remains available."}function qb(e){return[z8(e),"Resolve the results repo issue, then sync remote results again."].filter(t=>t!==void 0).join(" ")}function eM(e){if(e.blocked||e.sync_status==="conflicted"||e.sync_status==="diverged"){const r=e.repo?` for ${e.repo}`:"",n=e.block_reason??"Sync stopped before changing the results repo.";return{kind:"warning",message:`Sync stopped${r}: ${n}. ${qb(e)}`}}const t=[e.commit_created?"committed pending metadata":void 0,e.pull_performed?"pulled remote results":void 0,e.push_performed?"pushed local results":void 0].filter(r=>r!==void 0);return{kind:"success",message:t.length>0?`${C_(e)} Sync completed: ${t.join(", ")}.`:`${C_(e)} Project results were already up to date.`}}function tM(e,t){return{kind:"error",message:`Sync failed: ${e instanceof Error?e.message:String(e)}. ${qb(t)}`}}async function Qe(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function B8(e){const t=await fetch(e);if(t.status===404)return null;if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.text()}const U8=50;function rM(e,t){const r=new URLSearchParams({limit:String(U8)});return t&&r.set("cursor",t),`${e}?${r.toString()}`}function nM(e){var t;return!e||e.length===0?{runs:[]}:{runs:e.flatMap(r=>r.runs),next_cursor:(t=e.at(-1))==null?void 0:t.next_cursor}}function M_(e){return e.split("/").filter(t=>t.length>0).map(t=>encodeURIComponent(t)).join("/")}function xl(e){const t=e.projectId?`${pt(e.projectId)}/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${M_(e.filePath)}`:`/api/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${M_(e.filePath)}`,r=new URLSearchParams;e.raw&&r.set("raw","1"),e.download&&r.set("download","1");const n=r.toString();return n?`${t}?${n}`:t}const Hb={queryKey:["runs"],queryFn:()=>Qe("/api/runs"),refetchInterval:5e3},q8={queryKey:["runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:e})=>Qe(rM("/api/runs",e)),getNextPageParam:e=>e.next_cursor,refetchInterval:5e3};function H8(e){return{queryKey:["runs",e],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}`),enabled:!!e}}function F8(e,t){const r=t?`${pt(t)}/runs/${encodeURIComponent(e)}/log`:`/api/runs/${encodeURIComponent(e)}/log`;return{queryKey:["runs",e,"log",t??""],queryFn:()=>B8(r),enabled:!!e,refetchInterval:3e3}}function K8(e,t){return Ue(F8(e,t))}const G8={queryKey:["feedback"],queryFn:()=>Qe("/api/feedback")},aM={queryKey:["experiments"],queryFn:()=>Qe("/api/experiments")};function Y8(e){return{queryKey:["compare","baseline",e??""],queryFn:()=>Qe(`/api/compare?baseline=${encodeURIComponent(e??"")}`),enabled:!!e}}const V8={queryKey:["compare"],queryFn:()=>Qe("/api/compare")},Q8={queryKey:["targets"],queryFn:()=>Qe("/api/targets")};function X8(e,t){return{queryKey:["runs",e,"evals",t,"files"],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/files`),enabled:!!e&&!!t}}function Z8(e,t,r){return{queryKey:["runs",e,"evals",t,"files",r],queryFn:()=>Qe(xl({runId:e,evalId:t,filePath:r})),enabled:!!e&&!!t&&!!r}}function W8(e,t){return{queryKey:["runs",e,"categories",t,"suites"],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}/categories/${encodeURIComponent(t)}/suites`),enabled:!!e&&!!t}}const J8={queryKey:["config"],queryFn:()=>Qe("/api/config"),staleTime:5e3};function Fb(e){const t=e?`${pt(e)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",e??""],queryFn:()=>Qe(t),staleTime:5e3,refetchInterval:r=>I8(r.state.data)?1e3:!1}}function eB(){return Ue(Hb)}function tB(){var t;const e=S2(q8);return{...e,data:nM((t=e.data)==null?void 0:t.pages)}}function id(e){return Ue(H8(e))}function rB(){return Ue(G8)}function iM(){return Ue(aM)}function nB(){return Ue(V8)}function sM(e,t){return Ue(X8(e,t))}function Ox(e,t,r){return Ue(Z8(e,t,r))}function oM(e,t){return Ue(W8(e,t))}function mt(e){return Ue(e?hB(e):J8)}function Lm(e){return Ue(Fb(e))}const Ic=.8,$m="agentv";function Ji(e,t=Ic){return e>=t}const aB={queryKey:["projects"],queryFn:()=>Qe("/api/projects"),refetchInterval:1e4};function sd(){return Ue(aB)}async function iB(e){const t=new URLSearchParams;e!=null&&e.trim()&&t.set("path",e.trim());const r=t.toString(),n=await fetch(`/api/filesystem/browse${r?`?${r}`:""}`);if(!n.ok){const o=await n.json().catch(()=>({error:n.statusText}));throw new Error(o.error??`Failed to browse folders: ${n.status}`)}const i=await n.json();return{path:i.path,parentPath:i.parent_path,current:{name:i.current.name,path:i.current.path,hasAgentv:i.current.has_agentv},entries:i.entries.map(o=>({name:o.name,path:o.path,hasAgentv:o.has_agentv}))}}async function sB(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})});if(!t.ok){const n=await t.json();throw new Error(n.error||`Failed to add project: ${t.status}`)}const r=await t.json();return{id:r.id,name:r.name,path:r.path,addedAt:r.added_at,lastOpenedAt:r.last_opened_at}}async function oB(e){const t=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE"});if(!t.ok){const r=await t.json().catch(()=>({error:t.statusText}));throw new Error(r.error??`Failed to remove project: ${t.status}`)}}function pt(e){return`/api/projects/${encodeURIComponent(e)}`}function Kb(e){return{queryKey:["projects",e,"runs"],queryFn:()=>Qe(`${pt(e)}/runs`),enabled:!!e,refetchInterval:5e3}}function lB(e){return{queryKey:["projects",e,"runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:t})=>Qe(rM(`${pt(e)}/runs`,t)),getNextPageParam:t=>t.next_cursor,enabled:!!e,refetchInterval:5e3}}function uB(e){return Ue(Kb(e))}function cB(e){var r;const t=S2(lB(e));return{...t,data:nM((r=t.data)==null?void 0:r.pages)}}function dB(e,t){return{queryKey:["projects",e,"runs",t],queryFn:()=>Qe(`${pt(e)}/runs/${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function od(e,t){return Ue(dB(e,t))}function lM(e,t,r){return{queryKey:["projects",e,"runs",t,"categories",r,"suites"],queryFn:()=>Qe(`${pt(e)}/runs/${encodeURIComponent(t)}/categories/${encodeURIComponent(r)}/suites`),enabled:!!e&&!!t&&!!r}}function uM(e,t,r){return{queryKey:["projects",e,"runs",t,"evals",r,"files"],queryFn:()=>Qe(`${pt(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/files`),enabled:!!e&&!!t&&!!r}}function _x(e,t,r,n){return{queryKey:["projects",e,"runs",t,"evals",r,"files",n],queryFn:()=>Qe(xl({projectId:e,runId:t,evalId:r,filePath:n})),enabled:!!e&&!!t&&!!r&&!!n}}function Gb(e){return{queryKey:["projects",e,"experiments"],queryFn:()=>Qe(`${pt(e)}/experiments`),enabled:!!e}}function cM(e,t){const r=`${pt(e)}/compare`;return t?{queryKey:["projects",e,"compare","baseline",t],queryFn:()=>Qe(`${r}?baseline=${encodeURIComponent(t)}`),enabled:!!e}:{queryKey:["projects",e,"compare"],queryFn:()=>Qe(r),enabled:!!e}}function fB(e){return{queryKey:["projects",e,"targets"],queryFn:()=>Qe(`${pt(e)}/targets`),enabled:!!e}}function hB(e){return{queryKey:["projects",e,"config"],queryFn:()=>Qe(`${pt(e)}/config`),enabled:!!e,staleTime:5e3}}async function dM(e){const t=e?`${pt(e)}/remote/sync`:"/api/remote/sync",r=await fetch(t,{method:"POST"});if(!r.ok){const n=await r.json().catch(()=>({error:r.statusText}));throw new Error(n.error??`Failed to sync remote results: ${r.status}`)}return r.json()}class fM extends Error{constructor(t,r,n=[]){super(t),this.status=r,this.duplicates=n,this.name="CombineRunsApiError"}}async function R_(e,t,r,n){const i=r?`${pt(r)}/runs/combine`:"/api/runs/combine",o=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({run_ids:e,duplicate_policy:t})});if(!o.ok){const l=await o.json().catch(()=>({error:o.statusText}));throw new fM(l.error??`Failed to combine runs: ${o.status}`,o.status,l.duplicates??[])}return o.json()}async function mB(e,t){const r=t?`${pt(t)}/runs/${encodeURIComponent(e)}`:`/api/runs/${encodeURIComponent(e)}`,n=await fetch(r,{method:"DELETE"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed to delete run: ${n.status}`)}}async function pB(e,t,r){const n=r?`${pt(r)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,i=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:t})});if(!i.ok){const o=await i.json().catch(()=>({error:i.statusText}));throw new Error(o.error??`Failed to save tags: ${i.status}`)}return i.json()}async function yB(e,t){const r=t?`${pt(t)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,n=await fetch(r,{method:"DELETE"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed to delete tags: ${n.status}`)}}async function vB(e){const t=await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`Failed to save config: ${t.status}`);return t.json()}function gB(e){const t=e?`${pt(e)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",e??""],queryFn:()=>Qe(t),staleTime:3e4}}function xB(e){return Ue(gB(e))}function bB(e){const t=e?`${pt(e)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",e??""],queryFn:()=>Qe(t),staleTime:3e4}}function jB(e){return Ue(bB(e))}async function hM(e,t){const r=t?`${pt(t)}/eval/run`:"/api/eval/run",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed: ${n.status}`)}return n.json()}async function wB(e,t){const r=t?`${pt(t)}/eval/run/${e}/stop`:`/api/eval/run/${e}/stop`,n=await fetch(r,{method:"POST"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed: ${n.status}`)}return n.json()}function SB(e,t){const r=t?`${pt(t)}/eval/status/${e}`:`/api/eval/status/${e}`;return{queryKey:["eval-status",t??"",e],queryFn:()=>Qe(r),enabled:!!e,refetchInterval:n=>{var o;const i=(o=n.state.data)==null?void 0:o.status;return i==="finished"||i==="failed"?!1:2e3}}}function Yb(e,t){return Ue(SB(e,t))}function NB(e){const t=e?`${pt(e)}/eval/runs`:"/api/eval/runs";return{queryKey:["eval-runs",e??""],queryFn:()=>Qe(t),refetchInterval:3e3}}function Vb(e){return Ue(NB(e))}async function OB(e,t){const r=t?`${pt(t)}/eval/preview`:"/api/eval/preview",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error(`Preview failed: ${n.status}`);return n.json()}function _B(e){return`agentv.studio.initial-project-redirect:${e}`}function Qb(e,t){const r=`/projects/${encodeURIComponent(e)}`;return t?`${r}?tab=${encodeURIComponent(t)}`:r}function Ai(e,t){return t?`/projects/${encodeURIComponent(t)}/runs/${encodeURIComponent(e)}`:`/runs/${encodeURIComponent(e)}`}function D_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`:`/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function k_(e,t){return t?`/projects/${encodeURIComponent(t)}/experiments/${encodeURIComponent(e)}`:`/experiments/${encodeURIComponent(e)}`}function I_(e,t){return t?`/projects/${encodeURIComponent(t)}/jobs/${encodeURIComponent(e)}`:`/jobs/${encodeURIComponent(e)}`}function L_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`}function $_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`}function EB(e){return e?Qb(e,"runs"):"/?tab=runs"}function AB(e,t,r=!1){if(!r)return t&&e.includes(t)?t:void 0}function PB(e,t,r,n){return t===!1?{kind:"single-project-home"}:r&&e.includes(r)?{kind:"redirect",redirectPath:Qb(r,n)}:{kind:"dashboard"}}function mM(e,t){var n,i;return((i=(n=t==null?void 0:t.find(o=>o.id===e))==null?void 0:n.name)==null?void 0:i.trim())||e}function rr(e){if(!e)return"Run";const t=e.split("::").at(-1)||e,r=t.match(/^\d{4}-\d{2}-\d{2}T\d{2}[-:]\d{2}[-:]\d{2}(?:[-.]\d+)?Z/);return(r==null?void 0:r[0])??t}function TB(e,t=[]){const r=[];for(let n=1;n<e.length;n++){const i=e[n],o=i.routeId??i.id,l=i.params;if(!(o==="/"||o==="/_layout")){if(o.includes("/projects/$projectId")&&l.projectId){const c=mM(l.projectId,t),f=Qb(l.projectId);if(r.some(m=>m.to===f)||r.push({label:c,to:f}),o==="/projects/$projectId")continue}o.includes("/projects/$projectId_/jobs/$runId")?r.some(c=>c.label===rr(l.runId))||r.push({label:rr(l.runId),to:I_(l.runId,l.projectId)}):o.includes("/projects/$projectId_/runs/$runId/category/$category")?(r.some(c=>c.label===rr(l.runId))||r.push({label:rr(l.runId),to:Ai(l.runId,l.projectId)}),r.push({label:l.category??"Category",to:L_(l.runId,l.category??"Category",l.projectId)})):o.includes("/projects/$projectId_/runs/$runId/suite/$suite")?(r.some(c=>c.label===rr(l.runId))||r.push({label:rr(l.runId),to:Ai(l.runId,l.projectId)}),r.push({label:l.suite??"Suite",to:$_(l.runId,l.suite??"Suite",l.projectId)})):o.includes("/projects/$projectId_/runs/$runId")?r.push({label:rr(l.runId),to:Ai(l.runId,l.projectId)}):o.includes("/projects/$projectId_/evals/$runId/$evalId")?(r.some(c=>c.label===rr(l.runId))||r.push({label:rr(l.runId),to:Ai(l.runId,l.projectId)}),r.push({label:l.evalId??"Eval",to:D_(l.runId,l.evalId??"Eval",l.projectId)})):o.includes("/projects/$projectId_/experiments/$experimentName")?r.push({label:l.experimentName??"Experiment",to:k_(l.experimentName??"Experiment",l.projectId)}):o.includes("/runs/$runId/category/$category")?(r.some(c=>c.label===rr(l.runId))||r.push({label:rr(l.runId),to:Ai(l.runId)}),r.push({label:l.category??"Category",to:L_(l.runId,l.category??"Category")})):o.includes("/runs/$runId/suite/$suite")?(r.some(c=>c.label===rr(l.runId))||r.push({label:rr(l.runId),to:Ai(l.runId)}),r.push({label:l.suite??"Suite",to:$_(l.runId,l.suite??"Suite")})):o.includes("/jobs/$runId")?r.push({label:rr(l.runId),to:I_(l.runId)}):o.includes("/runs/$runId")?r.push({label:rr(l.runId),to:Ai(l.runId)}):o.includes("/evals/$runId/$evalId")?(r.some(c=>c.label===rr(l.runId))||r.push({label:rr(l.runId),to:Ai(l.runId)}),r.push({label:l.evalId??"Eval",to:D_(l.runId,l.evalId??"Eval")})):o.includes("/experiments/$experimentName")?r.push({label:l.experimentName??"Experiment",to:k_(l.experimentName??"Experiment")}):o==="/settings"&&r.push({label:"Settings",to:"/settings"})}}return r}function CB(){const e=E8(),{toggle:t}=W2(),{data:r}=sd(),n=TB(e,r==null?void 0:r.projects),i=n.length>0;return d.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-h-12 min-w-0 items-center gap-2 border-b border-gray-800 bg-gray-950 px-4 py-2 text-sm md:px-6",children:[d.jsx("button",{type:"button",onClick:t,className:"shrink-0 text-gray-400 hover:text-gray-200 md:hidden","aria-label":"Toggle navigation",children:d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Toggle navigation",children:[d.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),d.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),d.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[i?d.jsx(Oe,{to:"/",className:"shrink-0 text-cyan-400 hover:text-cyan-300 hover:underline",children:"Projects"}):d.jsx("span",{className:"shrink-0 text-gray-400",children:"Projects"}),n.map((o,l)=>{const c=l===n.length-1;return d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"shrink-0 text-gray-600",children:">"}),c?d.jsx("span",{className:"min-w-0 truncate text-gray-400",children:o.label}):d.jsx(Oe,{to:o.to??"/",className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",children:o.label})]},`${o.label}-${l}`)})]})]})}function pM(e){return e&&e!=="default"?e:void 0}function MB(e,t){const r=[pM(t==null?void 0:t.experiment),t==null?void 0:t.target].filter(n=>!!n);return r.length>0?r.join(" · "):e}function Lc(e){const t=e==null?void 0:e.trim();return t||void 0}function yM(e){const t=e.results[0],r=Lc(e.sourceLabel),n=e.source==="remote",i=n&&r?r:MB(e.runId,t),o=t!=null&&t.timestamp&&e.formatTimestamp?e.formatTimestamp(t.timestamp):t==null?void 0:t.timestamp,l=[t==null?void 0:t.target,pM(t==null?void 0:t.experiment),o,n?void 0:e.source].filter(m=>!!m),c=Lc(e.remoteRepo),f=[];return n&&(r&&r!==i&&f.push({label:"Source",value:r}),c&&f.push({label:"Repo",value:c})),{heading:i,meta:l.join(" · "),...n&&{sourceBadge:"Remote"},...r&&{sourceLabel:r},sourceContext:f}}function RB(e){const t=e.replace(/\\/g,"/");return t==="."||t===".."||t.startsWith("./")||t.startsWith("../")||t.startsWith("/")||/^[A-Za-z]:\//.test(t)||t.includes("/../")||t.includes("/./")}function DB(e){var r;return((r=e.split(/[\\/]+/).filter(n=>n&&n!=="."&&n!=="..").at(-1))==null?void 0:r.trim())||void 0}function kB(e){const t=Lc(e)??"Uncategorized";return RB(t)?{label:DB(t)??"Uncategorized",mutedLabel:t}:{label:t}}function IB(e){return e.replace(/\.eval\.(ya?ml|json|jsonl)$/i,"").replace(/\.(ya?ml|json|jsonl)$/i,"")}function LB(e){const t=Lc(e);if(!t||t==="Uncategorized")return;const r=t.replace(/\\/g,"/"),n=r.split("/").filter(o=>o.length>0).at(-1)??t;return{label:(r.includes("/")?IB(n):t)||t,title:t}}function Xb(e){const t=e.map(n=>Lc(n.suite)??"");return t.filter(n=>n&&n!=="Uncategorized").length>0&&new Set(t).size>1}const kh="remote::";function vM(e){try{const t=new Date(e);if(Number.isNaN(t.getTime()))return e.slice(0,10);const r=String(t.getDate()).padStart(2,"0"),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return`${r}/${n} ${i}:${o}`}catch{return e.slice(0,10)}}function qa(e){const t=e==null?void 0:e.trim();return t||void 0}function $B(e){const t=qa(e);return t&&t!=="default"&&t!=="-"?t:void 0}function gM(e){let t=e.trim();return t.startsWith(kh)&&(t=t.slice(kh.length)),t.replace(/\.(jsonl|json)$/i,"")}function zB(e){const r=gM(e).match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2})[:-](\d{2})[:-](\d{2})(?:[.-](\d{3}))?Z?$/);if(!r)return;const[,n,i,o,l,c,f,m="000"]=r,p=new Date(`${n}-${i}-${o}T${l}:${c}:${f}.${m}Z`);return Number.isNaN(p.getTime())?void 0:p}function Zb(e,t){const r=qa(e);return r?zB(r)?!0:gM(r)===vM(t):!1}function BB(e,t){const r=qa(e);if(!r)return;const n=r.startsWith(kh)?r.slice(kh.length):r,i=n.lastIndexOf("::");if(i!==-1){const o=n.slice(i+2);if(Zb(o,t))return qa(n.slice(0,i))}return n}function UB(e){return[qa(e.display_name),qa(e.title),BB(e.filename,e.timestamp)].find(r=>!!r&&!Zb(r,e.timestamp))}function qB(e){return`${Math.round(e*100)}%`}function HB(e,t){const r=[t],n=qa(e.filename),i=qa(e.display_name),o=qa(e.title);return n&&n!==t&&r.push(`Run ID: ${n}`),i&&i!==n&&i!==t&&r.push(`Display name: ${i}`),o&&o!==i&&o!==n&&o!==t&&r.push(`Title: ${o}`),r.push(`Timestamp: ${e.timestamp}`),r.join(`
|
|
66
|
+
`)}function Wb(e,t={}){const r=vM(e.timestamp),n=$B(e.experiment),i=UB(e),o=n&&!Zb(n,e.timestamp)?n:void 0,l=i??o??r,c=t.includePassRate??!0,f=[];l!==r&&f.push(r),e.target&&e.target!==l&&f.push(e.target),n&&n!==l&&f.push(n),c&&f.push(qB(e.pass_rate));const m=f.join(" · "),p=m?`${l} · ${m}`:l;return{primary:l,secondary:m,label:p,title:HB(e,p)}}function Jb({appName:e}){return e!==$m?d.jsx("span",{className:"av-brand-name",children:e}):d.jsxs("span",{className:"av-brand-name","aria-label":"AgentV",children:[d.jsx("span",{className:"text-cyan-400","aria-hidden":"true",children:"A"}),d.jsx("span",{"aria-hidden":"true",children:"GENT"}),d.jsx("span",{className:"text-cyan-400","aria-hidden":"true",children:"V"})]})}function xM({suite:e,className:t=""}){const r=LB(e);return r?d.jsx("span",{className:`inline-flex max-w-full shrink-0 items-center rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300 ${t}`,title:r.title,children:d.jsx("span",{className:"truncate",children:r.label})}):null}function zn({children:e}){const{isOpen:t,close:r}=W2(),i=X2().href;return S.useEffect(()=>{i&&r()},[r,i]),d.jsxs(d.Fragment,{children:[t&&d.jsx("div",{className:"fixed inset-0 z-30 bg-black/50 md:hidden",onClick:r,onKeyDown:o=>o.key==="Escape"&&r(),role:"button",tabIndex:-1,"aria-label":"Close navigation"}),d.jsx("aside",{className:`fixed inset-y-0 left-0 z-40 flex w-64 flex-col border-r border-gray-800 bg-gray-950 transition-transform duration-200 ease-in-out md:static md:z-auto md:translate-x-0 md:bg-gray-900/50 ${t?"translate-x-0":"-translate-x-full"}`,children:e})]})}function da({projectId:e}){const{data:t}=mt(e),r=(t==null?void 0:t.app_name)??$m;return d.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:d.jsx(Oe,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(Jb,{appName:r})})})}function bM({display:e}){return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"block truncate",children:e.primary}),e.secondary?d.jsx("span",{className:"block truncate text-xs text-gray-600",children:e.secondary}):null]})}function jM({result:e,passThreshold:t,showSuiteLabel:r}){const n=Ji(e.score,t);return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:`mt-0.5 shrink-0 text-xs ${n?"text-emerald-400":"text-red-400"}`,children:n?"✓":"✗"}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate",children:e.testId}),r?d.jsx(xM,{suite:e.suite,className:"mt-1 max-w-full text-[11px] leading-4"}):null]})]})}const z_=[{id:"runs",label:"Recent Runs",description:"Run review"},{id:"experiments",label:"Experiments",description:"Grouped runs"},{id:"analytics",label:"Analytics",description:"Compare scores"},{id:"targets",label:"Targets",description:"Target results"}];function bg(e){return`mb-0.5 flex min-h-9 items-center justify-between gap-3 rounded-md px-2 py-1.5 text-sm transition-colors ${e?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`}function B_({projectId:e}){const t=X2(),{data:r}=sd(),n=(r==null?void 0:r.projects)??[],i=t.search,o=z_.some(c=>c.id===i.tab)?i.tab:"runs",l=!e&&n.length===0;return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsxs("div",{className:"mb-4",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Navigate"}),d.jsxs(Oe,{to:"/",className:bg(t.pathname==="/"),children:[d.jsx("span",{className:"truncate",children:"Projects"}),n.length>0?d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:n.length}):null]}),d.jsx(Oe,{to:"/settings",className:bg(t.pathname==="/settings"),children:d.jsx("span",{className:"truncate",children:"Settings"})})]}),l?d.jsxs("div",{className:"mb-4",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Workspace"}),z_.map(c=>d.jsxs(Oe,{to:"/",search:{tab:c.id},className:bg(o===c.id),title:c.description,children:[d.jsx("span",{className:"truncate",children:c.label}),d.jsx("span",{className:"shrink-0 text-xs text-gray-500",children:c.description})]},c.id))]}):null]})]})}function FB(){const e=_8(),t=e({to:"/projects/$projectId/evals/$runId/$evalId",fuzzy:!0}),r=e({to:"/projects/$projectId/runs/$runId",fuzzy:!0}),n=e({to:"/projects/$projectId/experiments/$experimentName",fuzzy:!0}),i=e({to:"/projects/$projectId/runs/$runId/category/$category",fuzzy:!0}),o=e({to:"/projects/$projectId/runs/$runId/suite/$suite",fuzzy:!0}),l=e({to:"/projects/$projectId/jobs/$runId",fuzzy:!0}),c=e({to:"/projects/$projectId",fuzzy:!0});if(t&&typeof t=="object"&&"projectId"in t){const{projectId:x,runId:j,evalId:w}=t;return d.jsx(QB,{projectId:x,runId:j,currentEvalId:w})}if(i&&typeof i=="object"&&"projectId"in i){const{projectId:x,runId:j,category:w}=i;return d.jsx(ZB,{projectId:x,runId:j,category:w})}if(o&&typeof o=="object"&&"projectId"in o){const{projectId:x,runId:j,suite:w}=o;return d.jsx(XB,{projectId:x,runId:j,suite:w})}if(r&&typeof r=="object"&&"projectId"in r){const{projectId:x,runId:j}=r;return d.jsx(U_,{projectId:x,currentRunId:j})}if(l&&typeof l=="object"&&"projectId"in l){const{projectId:x}=l;return d.jsx(U_,{projectId:x})}if(n&&typeof n=="object"&&"projectId"in n){const{projectId:x,experimentName:j}=n;return d.jsx(WB,{projectId:x,currentExperiment:j})}if(c&&typeof c=="object"&&"projectId"in c){const{projectId:x}=c;return d.jsx(B_,{projectId:x})}const f=e({to:"/runs/$runId",fuzzy:!0}),m=e({to:"/evals/$runId/$evalId",fuzzy:!0}),p=e({to:"/runs/$runId/category/$category",fuzzy:!0}),y=e({to:"/runs/$runId/suite/$suite",fuzzy:!0}),v=e({to:"/experiments/$experimentName",fuzzy:!0});if(p&&typeof p=="object"&&"runId"in p){const{runId:x,category:j}=p;return d.jsx(VB,{runId:x,category:j})}if(y&&typeof y=="object"&&"runId"in y){const{runId:x,suite:j}=y;return d.jsx(YB,{runId:x,suite:j})}if(m&&typeof m=="object"&&"runId"in m){const{runId:x,evalId:j}=m;return d.jsx(GB,{runId:x,currentEvalId:j})}if(v&&typeof v=="object"&&"experimentName"in v){const{experimentName:x}=v;return d.jsx(JB,{currentExperiment:x})}if(f&&typeof f=="object"&&"runId"in f){const{runId:x}=f;return d.jsx(KB,{currentRunId:x})}return d.jsx(B_,{})}function KB({currentRunId:e}){const{data:t}=eB(),{data:r}=mt(),{data:n}=Vb(),i=((n==null?void 0:n.runs)??[]).filter(o=>o.status==="starting"||o.status==="running").length;return d.jsxs(zn,{children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[d.jsx(Oe,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(Jb,{appName:(r==null?void 0:r.app_name)??$m})}),i>0&&d.jsxs("span",{className:"flex items-center gap-1 rounded-full bg-cyan-900/40 px-2 py-0.5 text-xs text-cyan-400",children:[d.jsx("span",{className:"inline-block h-1.5 w-1.5 animate-pulse rounded-full bg-cyan-400"}),i]})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Run history"}),t==null?void 0:t.runs.map(o=>{const l=Wb(o),c=e===o.filename;return d.jsx(Oe,{to:"/runs/$runId",params:{runId:o.filename},className:`mb-0.5 block rounded-md px-2 py-1.5 text-sm transition-colors ${c?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,title:l.title,children:d.jsx(bM,{display:l})},o.filename)})]}),d.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:d.jsx(Oe,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function GB({runId:e,currentEvalId:t}){const{data:r}=id(e),{data:n}=mt(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,o=Xb((r==null?void 0:r.results)??[]);return d.jsxs(zn,{children:[d.jsx(da,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),r==null?void 0:r.results.map(l=>{const c=l.testId===t;return d.jsx(Oe,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:l.testId},className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${c?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(jM,{result:l,passThreshold:i,showSuiteLabel:o})},l.testId)})]})]})}function YB({runId:e,suite:t}){const{data:r}=id(e),{data:n}=mt(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,o=((r==null?void 0:r.results)??[]).filter(l=>(l.suite??"Uncategorized")===t);return d.jsxs(zn,{children:[d.jsx(da,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),o.map(l=>{const c=Ji(l.score,i);return d.jsxs(Oe,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:l.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[d.jsx("span",{className:`text-xs ${c?"text-emerald-400":"text-red-400"}`,children:c?"✓":"✗"}),d.jsx("span",{className:"truncate",children:l.testId})]},l.testId)})]})]})}function VB({runId:e,category:t}){const{data:r}=oM(e,t),n=(r==null?void 0:r.suites)??[];return d.jsxs(zn,{children:[d.jsx(da,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/runs/$runId",params:{runId:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:e}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),n.map(i=>d.jsxs(Oe,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:i.name},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[d.jsx("span",{className:`text-xs ${i.passed===i.total?"text-emerald-400":"text-red-400"}`,children:i.passed===i.total?"✓":"✗"}),d.jsx("span",{className:"truncate",children:i.name})]},i.name))]})]})}function U_({projectId:e,currentRunId:t}){const{data:r}=uB(e);return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Runs"}),r==null?void 0:r.runs.map(n=>{const i=Wb(n),o=t===n.filename;return d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:n.filename},className:`mb-0.5 block rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,title:i.title,children:d.jsx(bM,{display:i})},n.filename)})]})]})}function QB({projectId:e,runId:t,currentEvalId:r}){const{data:n}=od(e,t),{data:i}=mt(e),o=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,l=Xb((n==null?void 0:n.results)??[]);return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),n==null?void 0:n.results.map(c=>{const f=c.testId===r;return d.jsx(Oe,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${f?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(jM,{result:c,passThreshold:o,showSuiteLabel:l})},c.testId)})]})]})}function XB({projectId:e,runId:t,suite:r}){const{data:n}=od(e,t),{data:i}=mt(e),o=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,l=((n==null?void 0:n.results)??[]).filter(c=>(c.suite??"Uncategorized")===r);return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),l.map(c=>{const f=Ji(c.score,o);return d.jsxs(Oe,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[d.jsx("span",{className:`text-xs ${f?"text-emerald-400":"text-red-400"}`,children:f?"✓":"✗"}),d.jsx("span",{className:"truncate",children:c.testId})]},c.testId)})]})]})}function ZB({projectId:e,runId:t,category:r}){const{data:n}=Ue(lM(e,t,r)),i=(n==null?void 0:n.suites)??[];return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to run"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t}),d.jsx("p",{className:"truncate text-xs text-gray-500",children:r})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Suites"}),i.map(o=>d.jsxs(Oe,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,suite:o.name},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[d.jsx("span",{className:`text-xs ${o.passed===o.total?"text-emerald-400":"text-red-400"}`,children:o.passed===o.total?"✓":"✗"}),d.jsx("span",{className:"truncate",children:o.name})]},o.name))]})]})}function WB({projectId:e,currentExperiment:t}){const{data:r}=Ue(Gb(e)),n=(r==null?void 0:r.experiments)??[];return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(Oe,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),n.map(i=>{const o=i.name===t;return d.jsx(Oe,{to:"/projects/$projectId/experiments/$experimentName",params:{projectId:e,experimentName:i.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:i.name},i.name)})]})]})}function JB({currentExperiment:e}){const{data:t}=iM(),r=(t==null?void 0:t.experiments)??[];return d.jsxs(zn,{children:[d.jsx(da,{}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(Oe,{to:"/",search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),r.map(n=>{const i=n.name===e;return d.jsx(Oe,{to:"/experiments/$experimentName",params:{experimentName:n.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${i?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:n.name},n.name)})]})]})}function e6(){return d.jsx(R8,{children:d.jsx(t6,{})})}function t6(){return d.jsxs("div",{className:"flex h-screen overflow-hidden",children:[d.jsx(FB,{}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[d.jsx(CB,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(Q2,{})})]})]})}const pr=y8({component:e6}),r6=_r("/settings")({component:n6});function n6(){const{data:e,isLoading:t}=mt(),r=ca(),[n,i]=S.useState(""),[o,l]=S.useState(!1),[c,f]=S.useState(null),m=(e==null?void 0:e.threshold)??Ic,p=n||String(m),y=(e==null?void 0:e.read_only)===!0,v=(e==null?void 0:e.app_name)??$m,x=async()=>{const j=Number.parseFloat(n||String(m));if(Number.isNaN(j)||j<0||j>1){f({type:"error",text:"Threshold must be a number between 0 and 1"});return}l(!0),f(null);try{await vB({threshold:j}),await r.invalidateQueries({queryKey:["config"]}),i(""),f({type:"success",text:"Settings saved"}),setTimeout(()=>f(null),3e3)}catch{f({type:"error",text:"Failed to save settings"})}finally{l(!1)}};return t?d.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-40 animate-pulse rounded-lg bg-gray-900"})]}):d.jsxs("div",{className:"mx-auto max-w-2xl space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Settings"}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Configure ",d.jsx(Jb,{appName:v})]})]}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[d.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),d.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),d.jsx("div",{className:"mt-6 space-y-4",children:d.jsxs("div",{children:[d.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",Ic]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:p,onChange:j=>i(j.target.value),disabled:y,className:"w-32 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"}),d.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(p)||0)*100),"%)"]})]})]})}),d.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!y&&d.jsx("button",{type:"button",onClick:x,disabled:o,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-cyan-500 disabled:opacity-50",children:o?"Saving...":"Save Settings"}),y&&d.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),c&&d.jsx("span",{className:`text-sm ${c.type==="success"?"text-emerald-400":"text-red-400"}`,children:c.text})]})]}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",d.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function q_({entry:e,selected:t,current:r=!1,onSelect:n,onOpen:i}){return d.jsxs("div",{className:`grid grid-cols-[minmax(0,1fr)_auto] border-b border-gray-800/50 last:border-b-0 ${t?"bg-cyan-950/20":"transition-colors hover:bg-gray-900/30"}`,children:[d.jsxs("button",{type:"button",onClick:n,onDoubleClick:i,"aria-selected":t,className:"min-w-0 px-4 py-3 text-left focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:[d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:e.name}),r?d.jsx("span",{className:"shrink-0 rounded-md border border-gray-700 px-2 py-0.5 text-xs font-medium text-gray-400",children:"this folder"}):null,e.hasAgentv?d.jsx("span",{className:"shrink-0 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:".agentv"}):null]}),d.jsx("span",{className:"mt-1 block truncate text-xs text-gray-500",children:e.path})]}),d.jsx("button",{type:"button",onClick:i,className:"border-l border-gray-800 px-3 text-sm text-gray-400 transition-colors hover:bg-gray-900/40 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:"Open"})]})}function a6({open:e,onClose:t,onAdded:r}){const n=S.useRef(null),[i,o]=S.useState(null),[l,c]=S.useState(""),[f,m]=S.useState(""),[p,y]=S.useState(null),[v,x]=S.useState(null),[j,w]=S.useState(!1),[N,O]=S.useState(!1),P=S.useCallback(async(D,I={})=>{w(!0),y(null),x(null);try{const k=await iB(D);o(k),c(k.path),m(I.selectCurrent&&k.current.hasAgentv?k.current.path:"")}catch(k){y(k.message)}finally{w(!1)}},[]);S.useEffect(()=>{var D;e&&(o(null),c(""),m(""),y(null),x(null),O(!1),(D=n.current)==null||D.focus(),P(void 0,{selectCurrent:!0}))},[P,e]),S.useEffect(()=>{if(!e)return;function D(I){I.key==="Escape"&&(I.preventDefault(),t())}return document.addEventListener("keydown",D),()=>document.removeEventListener("keydown",D)},[t,e]);const E=S.useMemo(()=>!i||!f?null:f===i.current.path?i.current:i.entries.find(D=>D.path===f)??null,[i,f]),A=!!(E!=null&&E.hasAgentv)&&!N;function T(D){D.preventDefault(),P(l,{selectCurrent:!0})}async function M(){if(!(!f||!A)){O(!0),x(null);try{const D=await sB(f);r(D),t()}catch(D){x(D.message)}finally{O(!1)}}}if(!e)return null;const R=f?E!=null&&E.hasAgentv?`Ready to add ${E.name}.`:"Selected folder does not contain an .agentv/ directory.":"Select a folder containing an .agentv/ directory.";return d.jsx("dialog",{ref:n,open:!0,"aria-modal":"true","aria-label":"Add project",tabIndex:-1,className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"flex max-h-[90vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-4 py-3",children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:"Add project"}),d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-2 py-1 text-sm text-gray-400 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Close"})]}),d.jsxs("div",{className:"space-y-4 overflow-y-auto p-4",children:[d.jsxs("form",{onSubmit:T,className:"flex flex-col gap-2 sm:flex-row",children:[d.jsx("label",{className:"sr-only",htmlFor:"add-project-path",children:"Folder path"}),d.jsx("input",{id:"add-project-path",value:l,onChange:D=>c(D.target.value),placeholder:"Folder path",className:"min-w-0 flex-1 rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 placeholder:text-gray-600 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500 disabled:opacity-50",disabled:j||N}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>(i==null?void 0:i.parentPath)&&void P(i.parentPath),disabled:!(i!=null&&i.parentPath)||j||N,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:bg-gray-800 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50",children:"Up"}),d.jsx("button",{type:"button",onClick:()=>void P(l),disabled:j||N,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:bg-gray-800 hover:text-gray-100 disabled:cursor-not-allowed disabled:opacity-50",children:"Refresh"}),d.jsx("button",{type:"submit",disabled:j||N,className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:"Go"})]})]}),p?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:p}):null,d.jsxs("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[d.jsxs("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Current folder"}),d.jsx("p",{className:"mt-1 truncate text-sm text-gray-300",children:(i==null?void 0:i.path)??(j?"Loading folders...":"No folder loaded")})]}),d.jsx("div",{className:"max-h-80 overflow-y-auto",children:i?d.jsxs(d.Fragment,{children:[d.jsx(q_,{entry:i.current,current:!0,selected:f===i.current.path,onSelect:()=>m(i.current.path),onOpen:()=>void P(i.current.path,{selectCurrent:!0})}),i.entries.map(D=>d.jsx(q_,{entry:D,selected:f===D.path,onSelect:()=>m(D.path),onOpen:()=>void P(D.path,{selectCurrent:!0})},D.path)),i.entries.length===0?d.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:"No subfolders in this location."}):null]}):d.jsx("p",{className:"px-4 py-6 text-center text-sm text-gray-500",children:j?"Loading folders...":"Enter a folder path to browse."})})]}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-3",children:d.jsxs("div",{className:"flex flex-col gap-1 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Selected"}),d.jsx("p",{className:"mt-1 truncate text-sm text-gray-200",children:f||"None"})]}),d.jsx("p",{className:`text-sm ${E!=null&&E.hasAgentv?"text-cyan-300":"text-gray-500"}`,children:R})]})}),v?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:v}):null]}),d.jsxs("div",{className:"flex items-center justify-between border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("p",{className:"text-xs tabular-nums text-gray-500",children:i?`${i.entries.length} folders`:"0 folders"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Cancel"}),d.jsx("button",{type:"button",onClick:()=>void M(),disabled:!A,className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:N?"Adding...":"Add project"})]})]})]})})}function zm(e){return e.executionStatus==="execution_error"}function Bm(e,t){let r=0,n=0,i=0,o=0;for(const c of e){if(zm(c)){i++;continue}r++,o+=c.score,c.score>=t&&n++}const l=r-n;return{total:e.length,qualityTotal:r,passed:n,failed:l,executionErrors:i,passRate:r>0?n/r:0,avgScore:r>0?o/r:0}}function Gt(e){return e.execution_error_count??0}function wM(e){return Math.max(0,e.total-Gt(e))}function Ul(e){return e.quality_count??Math.max(0,e.eval_count-Gt(e))}function SM(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(r=SM(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Xe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=SM(e))&&(n&&(n+=" "),n+=t);return n}var i6=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function ej(e){if(typeof e!="string")return!1;var t=i6;return t.includes(e)}var s6=["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"],o6=new Set(s6);function NM(e){return typeof e!="string"?!1:o6.has(e)}function OM(e){return typeof e=="string"&&e.startsWith("data-")}function In(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(NM(r)||OM(r))&&(t[r]=e[r]);return t}function ld(e){if(e==null)return null;if(S.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return In(t)}return typeof e=="object"&&!Array.isArray(e)?In(e):null}function Nr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(NM(r)||OM(r)||ej(r))&&(t[r]=e[r]);return t}function l6(e){return e==null?null:S.isValidElement(e)?Nr(e.props):typeof e=="object"&&!Array.isArray(e)?Nr(e):null}var u6=["children","width","height","viewBox","className","style","title","desc"];function Ex(){return Ex=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ex.apply(null,arguments)}function c6(e,t){if(e==null)return{};var r,n,i=d6(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function d6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var tj=S.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:o,className:l,style:c,title:f,desc:m}=e,p=c6(e,u6),y=o||{width:n,height:i,x:0,y:0},v=Xe("recharts-surface",l);return S.createElement("svg",Ex({},Nr(p),{className:v,width:n,height:i,style:c,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height),ref:t}),S.createElement("title",null,f),S.createElement("desc",null,m),r)}),f6=["children","className"];function Ax(){return Ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ax.apply(null,arguments)}function h6(e,t){if(e==null)return{};var r,n,i=m6(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function m6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var rn=S.forwardRef((e,t)=>{var{children:r,className:n}=e,i=h6(e,f6),o=Xe("recharts-layer",n);return S.createElement("g",Ax({className:o},Nr(i),{ref:t}),r)}),_M=S.createContext(null),p6=()=>S.useContext(_M);function at(e){return function(){return e}}const EM=Math.cos,Ih=Math.sin,Bn=Math.sqrt,Lh=Math.PI,Um=2*Lh,Px=Math.PI,Tx=2*Px,Ps=1e-6,y6=Tx-Ps;function AM(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function v6(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return AM;const r=10**t;return function(n){this._+=n[0];for(let i=1,o=n.length;i<o;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class g6{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?AM:v6(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,o,l){this._append`C${+t},${+r},${+n},${+i},${this._x1=+o},${this._y1=+l}`}arcTo(t,r,n,i,o){if(t=+t,r=+r,n=+n,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let l=this._x1,c=this._y1,f=n-t,m=i-r,p=l-t,y=c-r,v=p*p+y*y;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>Ps)if(!(Math.abs(y*f-m*p)>Ps)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-l,j=i-c,w=f*f+m*m,N=x*x+j*j,O=Math.sqrt(w),P=Math.sqrt(v),E=o*Math.tan((Px-Math.acos((w+v-N)/(2*O*P)))/2),A=E/P,T=E/O;Math.abs(A-1)>Ps&&this._append`L${t+A*p},${r+A*y}`,this._append`A${o},${o},0,0,${+(y*x>p*j)},${this._x1=t+T*f},${this._y1=r+T*m}`}}arc(t,r,n,i,o,l){if(t=+t,r=+r,n=+n,l=!!l,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(i),f=n*Math.sin(i),m=t+c,p=r+f,y=1^l,v=l?i-o:o-i;this._x1===null?this._append`M${m},${p}`:(Math.abs(this._x1-m)>Ps||Math.abs(this._y1-p)>Ps)&&this._append`L${m},${p}`,n&&(v<0&&(v=v%Tx+Tx),v>y6?this._append`A${n},${n},0,1,${y},${t-c},${r-f}A${n},${n},0,1,${y},${this._x1=m},${this._y1=p}`:v>Ps&&this._append`A${n},${n},0,${+(v>=Px)},${y},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function rj(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new g6(t)}function nj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function PM(e){this._context=e}PM.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 qm(e){return new PM(e)}function TM(e){return e[0]}function CM(e){return e[1]}function MM(e,t){var r=at(!0),n=null,i=qm,o=null,l=rj(c);e=typeof e=="function"?e:e===void 0?TM:at(e),t=typeof t=="function"?t:t===void 0?CM:at(t);function c(f){var m,p=(f=nj(f)).length,y,v=!1,x;for(n==null&&(o=i(x=l())),m=0;m<=p;++m)!(m<p&&r(y=f[m],m,f))===v&&((v=!v)?o.lineStart():o.lineEnd()),v&&o.point(+e(y,m,f),+t(y,m,f));if(x)return o=null,x+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:at(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:at(+f),c):t},c.defined=function(f){return arguments.length?(r=typeof f=="function"?f:at(!!f),c):r},c.curve=function(f){return arguments.length?(i=f,n!=null&&(o=i(n)),c):i},c.context=function(f){return arguments.length?(f==null?n=o=null:o=i(n=f),c):n},c}function Wf(e,t,r){var n=null,i=at(!0),o=null,l=qm,c=null,f=rj(m);e=typeof e=="function"?e:e===void 0?TM:at(+e),t=typeof t=="function"?t:at(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?CM:at(+r);function m(y){var v,x,j,w=(y=nj(y)).length,N,O=!1,P,E=new Array(w),A=new Array(w);for(o==null&&(c=l(P=f())),v=0;v<=w;++v){if(!(v<w&&i(N=y[v],v,y))===O)if(O=!O)x=v,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),j=v-1;j>=x;--j)c.point(E[j],A[j]);c.lineEnd(),c.areaEnd()}O&&(E[v]=+e(N,v,y),A[v]=+t(N,v,y),c.point(n?+n(N,v,y):E[v],r?+r(N,v,y):A[v]))}if(P)return c=null,P+""||null}function p(){return MM().defined(i).curve(l).context(o)}return m.x=function(y){return arguments.length?(e=typeof y=="function"?y:at(+y),n=null,m):e},m.x0=function(y){return arguments.length?(e=typeof y=="function"?y:at(+y),m):e},m.x1=function(y){return arguments.length?(n=y==null?null:typeof y=="function"?y:at(+y),m):n},m.y=function(y){return arguments.length?(t=typeof y=="function"?y:at(+y),r=null,m):t},m.y0=function(y){return arguments.length?(t=typeof y=="function"?y:at(+y),m):t},m.y1=function(y){return arguments.length?(r=y==null?null:typeof y=="function"?y:at(+y),m):r},m.lineX0=m.lineY0=function(){return p().x(e).y(t)},m.lineY1=function(){return p().x(e).y(r)},m.lineX1=function(){return p().x(n).y(t)},m.defined=function(y){return arguments.length?(i=typeof y=="function"?y:at(!!y),m):i},m.curve=function(y){return arguments.length?(l=y,o!=null&&(c=l(o)),m):l},m.context=function(y){return arguments.length?(y==null?o=c=null:c=l(o=y),m):o},m}class RM{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function x6(e){return new RM(e,!0)}function b6(e){return new RM(e,!1)}const aj={draw(e,t){const r=Bn(t/Lh);e.moveTo(r,0),e.arc(0,0,r,0,Um)}},j6={draw(e,t){const r=Bn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},DM=Bn(1/3),w6=DM*2,S6={draw(e,t){const r=Bn(t/w6),n=r*DM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},N6={draw(e,t){const r=Bn(t),n=-r/2;e.rect(n,n,r,r)}},O6=.8908130915292852,kM=Ih(Lh/10)/Ih(7*Lh/10),_6=Ih(Um/10)*kM,E6=-EM(Um/10)*kM,A6={draw(e,t){const r=Bn(t*O6),n=_6*r,i=E6*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const l=Um*o/5,c=EM(l),f=Ih(l);e.lineTo(f*r,-c*r),e.lineTo(c*n-f*i,f*n+c*i)}e.closePath()}},jg=Bn(3),P6={draw(e,t){const r=-Bn(t/(jg*3));e.moveTo(0,r*2),e.lineTo(-jg*r,-r),e.lineTo(jg*r,-r),e.closePath()}},yn=-.5,vn=Bn(3)/2,Cx=1/Bn(12),T6=(Cx/2+1)*3,C6={draw(e,t){const r=Bn(t/T6),n=r/2,i=r*Cx,o=n,l=r*Cx+r,c=-o,f=l;e.moveTo(n,i),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(yn*n-vn*i,vn*n+yn*i),e.lineTo(yn*o-vn*l,vn*o+yn*l),e.lineTo(yn*c-vn*f,vn*c+yn*f),e.lineTo(yn*n+vn*i,yn*i-vn*n),e.lineTo(yn*o+vn*l,yn*l-vn*o),e.lineTo(yn*c+vn*f,yn*f-vn*c),e.closePath()}};function M6(e,t){let r=null,n=rj(i);e=typeof e=="function"?e:at(e||aj),t=typeof t=="function"?t:at(t===void 0?64:+t);function i(){let o;if(r||(r=o=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),o)return r=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:at(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:at(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function $h(){}function zh(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function IM(e){this._context=e}IM.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:zh(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:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function R6(e){return new IM(e)}function LM(e){this._context=e}LM.prototype={areaStart:$h,areaEnd:$h,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:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function D6(e){return new LM(e)}function $M(e){this._context=e}$M.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:zh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function k6(e){return new $M(e)}function zM(e){this._context=e}zM.prototype={areaStart:$h,areaEnd:$h,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 I6(e){return new zM(e)}function H_(e){return e<0?-1:1}function F_(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),l=(r-e._y1)/(i||n<0&&-0),c=(o*i+l*n)/(n+i);return(H_(o)+H_(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function K_(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function wg(e,t,r){var n=e._x0,i=e._y0,o=e._x1,l=e._y1,c=(o-n)/3;e._context.bezierCurveTo(n+c,i+c*t,o-c,l-c*r,o,l)}function Bh(e){this._context=e}Bh.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:wg(this,this._t0,K_(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,wg(this,K_(this,r=F_(this,e,t)),r);break;default:wg(this,this._t0,r=F_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function BM(e){this._context=new UM(e)}(BM.prototype=Object.create(Bh.prototype)).point=function(e,t){Bh.prototype.point.call(this,t,e)};function UM(e){this._context=e}UM.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function L6(e){return new Bh(e)}function $6(e){return new BM(e)}function qM(e){this._context=e}qM.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=G_(e),i=G_(t),o=0,l=1;l<r;++o,++l)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[l],t[l]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function G_(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),l=new Array(r);for(i[0]=0,o[0]=2,l[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,l[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,l[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,l[t]-=n*l[t-1];for(i[r-1]=l[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(l[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function z6(e){return new qM(e)}function Hm(e,t){this._context=e,this._t=t}Hm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function B6(e){return new Hm(e,.5)}function U6(e){return new Hm(e,0)}function q6(e){return new Hm(e,1)}function ro(e,t){if((l=e.length)>1)for(var r=1,n,i,o=e[t[0]],l,c=o.length;r<l;++r)for(i=o,o=e[t[r]],n=0;n<c;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Mx(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function H6(e,t){return e[t]}function F6(e){const t=[];return t.key=e,t}function K6(){var e=at([]),t=Mx,r=ro,n=H6;function i(o){var l=Array.from(e.apply(this,arguments),F6),c,f=l.length,m=-1,p;for(const y of o)for(c=0,++m;c<f;++c)(l[c][m]=[0,+n(y,l[c].key,m,o)]).data=y;for(c=0,p=nj(t(l));c<f;++c)l[p[c]].index=c;return r(l,p),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:at(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:at(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?Mx:typeof o=="function"?o:at(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??ro,i):r},i}function G6(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,l;i<o;++i){for(l=r=0;r<n;++r)l+=e[r][i][1]||0;if(l)for(r=0;r<n;++r)e[r][i][1]/=l}ro(e,t)}}function Y6(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var l=0,c=0;l<i;++l)c+=e[l][r][1]||0;n[r][1]+=n[r][0]=-c/2}ro(e,t)}}function V6(e,t){if(!(!((l=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,l;n<o;++n){for(var c=0,f=0,m=0;c<l;++c){for(var p=e[t[c]],y=p[n][1]||0,v=p[n-1][1]||0,x=(y-v)/2,j=0;j<c;++j){var w=e[t[j]],N=w[n][1]||0,O=w[n-1][1]||0;x+=N-O}f+=y,m+=x*y}i[n-1][1]+=i[n-1][0]=r,f&&(r-=m/f)}i[n-1][1]+=i[n-1][0]=r,ro(e,t)}}var Sg={},Ng={},Y_;function Q6(){return Y_||(Y_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Ng)),Ng}var Og={},V_;function HM(){return V_||(V_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Og)),Og}var _g={},Q_;function ij(){return Q_||(Q_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(_g)),_g}var Eg={},Ag={},X_;function X6(){return X_||(X_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Ag)),Ag}var Z_;function sj(){return Z_||(Z_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=X6(),r=ij();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const o=[],l=i.length;if(l===0)return o;let c=0,f="",m="",p=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<l;){const y=i[c];m?y==="\\"&&c+1<l?(c++,f+=i[c]):y===m?m="":f+=y:p?y==='"'||y==="'"?m=y:y==="]"?(p=!1,o.push(f),f=""):f+=y:y==="["?(p=!0,f&&(o.push(f),f="")):y==="."?f&&(o.push(f),f=""):f+=y,c++}return f&&o.push(f),o}e.toPath=n})(Eg)),Eg}var W_;function oj(){return W_||(W_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Q6(),r=HM(),n=ij(),i=sj();function o(c,f,m){if(c==null)return m;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return m;const p=c[f];return p===void 0?r.isDeepKey(f)?o(c,i.toPath(f),m):m:p}case"number":case"symbol":{typeof f=="number"&&(f=n.toKey(f));const p=c[f];return p===void 0?m:p}default:{if(Array.isArray(f))return l(c,f,m);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return m;const p=c[f];return p===void 0?m:p}}}function l(c,f,m){if(f.length===0)return m;let p=c;for(let y=0;y<f.length;y++){if(p==null||t.isUnsafeProperty(f[y]))return m;p=p[f[y]]}return p===void 0?m:p}e.get=o})(Sg)),Sg}var Pg,J_;function Z6(){return J_||(J_=1,Pg=oj().get),Pg}var W6=Z6();const ql=ns(W6);var J6=4;function Yi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J6,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function bt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,o,l)=>{var c=r[l-1];return typeof c=="string"?i+c+o:c!==void 0?i+Yi(c)+o:i+o},"")}var zr=e=>e===0?0:e>0?1:-1,ia=e=>typeof e=="number"&&e!=+e,no=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,pe=e=>(typeof e=="number"||e instanceof Number)&&!ia(e),sa=e=>pe(e)||typeof e=="string",eU=0,$c=e=>{var t=++eU;return"".concat(e||"").concat(t)},Ln=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!pe(t)&&typeof t!="string")return n;var o;if(no(t)){if(r==null)return n;var l=t.indexOf("%");o=r*parseFloat(t.slice(0,l))/100}else o=+t;return ia(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},FM=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function jt(e,t,r){return pe(e)&&pe(t)?Yi(e+r*(t-e)):t}function KM(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ql(n,t))===r)}var ht=e=>e===null||typeof e>"u",ud=e=>ht(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Br(e){return e!=null}function mo(){}var tU=["type","size","sizeType"];function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rx.apply(null,arguments)}function eE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eE(Object(r),!0).forEach(function(n){rU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rU(e,t,r){return(t=nU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nU(e){var t=aU(e,"string");return typeof t=="symbol"?t:t+""}function aU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function iU(e,t){if(e==null)return{};var r,n,i=sU(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function sU(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var GM={symbolCircle:aj,symbolCross:j6,symbolDiamond:S6,symbolSquare:N6,symbolStar:A6,symbolTriangle:P6,symbolWye:C6},oU=Math.PI/180,lU=e=>{var t="symbol".concat(ud(e));return GM[t]||aj},uU=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*oU;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},cU=(e,t)=>{GM["symbol".concat(ud(e))]=t},lj=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=iU(e,tU),o=tE(tE({},i),{},{type:t,size:r,sizeType:n}),l="circle";typeof t=="string"&&(l=t);var c=()=>{var v=lU(l),x=M6().type(v).size(uU(r,n,l)),j=x();if(j!==null)return j},{className:f,cx:m,cy:p}=o,y=Nr(o);return pe(m)&&pe(p)&&pe(r)?S.createElement("path",Rx({},y,{className:Xe("recharts-symbols",f),transform:"translate(".concat(m,", ").concat(p,")"),d:c()})):null};lj.registerSymbol=cU;var YM=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,uj=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(S.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{ej(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},dU=(e,t,r)=>n=>(e(t,r,n),null),Fm=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var o=e[i];ej(i)&&typeof o=="function"&&(n||(n={}),n[i]=dU(o,t,r))}),n};function rE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rE(Object(r),!0).forEach(function(n){hU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hU(e,t,r){return(t=mU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mU(e){var t=pU(e,"string");return typeof t=="symbol"?t:t+""}function pU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function or(e,t){var r=fU({},e),n=t,i=Object.keys(t),o=i.reduce((l,c)=>(l[c]===void 0&&n[c]!==void 0&&(l[c]=n[c]),l),r);return o}function Uh(){return Uh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Uh.apply(null,arguments)}function nE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function VM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nE(Object(r),!0).forEach(function(n){yU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yU(e,t,r){return(t=vU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vU(e){var t=gU(e,"string");return typeof t=="symbol"?t:t+""}function gU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn=32,xU={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function bU(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function jU(e){var{data:t,iconType:r,inactiveColor:n}=e,i=xn/2,o=xn/6,l=xn/3,c=t.inactive?n:t.color,f=r??t.type;if(f==="none")return null;if(f==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:bU(t.payload),x1:0,y1:i,x2:xn,y2:i,className:"recharts-legend-icon"});if(f==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
|
|
67
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
|
|
68
|
+
H`).concat(xn,"M").concat(2*l,",").concat(i,`
|
|
69
|
+
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(f==="rect")return S.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(xn/8,"h").concat(xn,"v").concat(xn*3/4,"h").concat(-xn,"z"),className:"recharts-legend-icon"});if(S.isValidElement(t.legendIcon)){var m=VM({},t);return delete m.legendIcon,S.cloneElement(t.legendIcon,m)}return S.createElement(lj,{fill:c,cx:i,cy:i,size:xn,sizeType:"diameter",type:f})}function wU(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:o,iconType:l,labelStyle:c}=e,f={x:0,y:0,width:xn,height:xn},m={display:n==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((y,v)=>{var x=y.formatter||i,j=Xe({"recharts-legend-item":!0,["legend-item-".concat(v)]:!0,inactive:y.inactive});if(y.type==="none")return null;var w=typeof c=="object"?VM({},c):{};w.color=y.inactive?o:w.color||y.color;var N=x?x(y.value,y,v):y.value;return S.createElement("li",Uh({className:j,style:m,key:"legend-item-".concat(v)},Fm(e,y,v)),S.createElement(tj,{width:r,height:r,viewBox:f,style:p,"aria-label":"".concat(y.value," legend icon")},S.createElement(jU,{data:y,iconType:l,inactiveColor:o})),S.createElement("span",{className:"recharts-legend-item-text",style:w},N))})}var SU=e=>{var t=or(e,xU),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var o={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return S.createElement("ul",{className:"recharts-default-legend",style:o},S.createElement(wU,Uh({},t,{payload:r})))},Tg={},Cg={},aE;function NU(){return aE||(aE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let o=0;o<r.length;o++){const l=r[o],c=n(l,o,r);i.has(c)||i.set(c,l)}return Array.from(i.values())}e.uniqBy=t})(Cg)),Cg}var Mg={},iE;function OU(){return iE||(iE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(Mg)),Mg}var Rg={},sE;function QM(){return sE||(sE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Rg)),Rg}var Dg={},kg={},Ig={},oE;function _U(){return oE||(oE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Ig)),Ig}var lE;function XM(){return lE||(lE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_U();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(kg)),kg}var Lg={},uE;function EU(){return uE||(uE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Lg)),Lg}var cE;function AU(){return cE||(cE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XM(),r=EU();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(Dg)),Dg}var $g={},zg={},dE;function PU(){return dE||(dE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oj();function r(n){return function(i){return t.get(i,n)}}e.property=r})(zg)),zg}var Bg={},Ug={},qg={},Hg={},fE;function ZM(){return fE||(fE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Hg)),Hg}var Fg={},hE;function WM(){return hE||(hE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(Fg)),Fg}var Kg={},mE;function JM(){return mE||(mE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(Kg)),Kg}var pE;function TU(){return pE||(pE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=ZM(),r=WM(),n=JM();function i(p,y,v){return typeof v!="function"?i(p,y,()=>{}):o(p,y,function x(j,w,N,O,P,E){const A=v(j,w,N,O,P,E);return A!==void 0?!!A:o(j,w,x,E)},new Map)}function o(p,y,v,x){if(y===p)return!0;switch(typeof y){case"object":return l(p,y,v,x);case"function":return Object.keys(y).length>0?o(p,{...y},v,x):n.isEqualsSameValueZero(p,y);default:return t.isObject(p)?typeof y=="string"?y==="":!0:n.isEqualsSameValueZero(p,y)}}function l(p,y,v,x){if(y==null)return!0;if(Array.isArray(y))return f(p,y,v,x);if(y instanceof Map)return c(p,y,v,x);if(y instanceof Set)return m(p,y,v,x);const j=Object.keys(y);if(p==null||r.isPrimitive(p))return j.length===0;if(j.length===0)return!0;if(x!=null&&x.has(y))return x.get(y)===p;x==null||x.set(y,p);try{for(let w=0;w<j.length;w++){const N=j[w];if(!r.isPrimitive(p)&&!(N in p)||y[N]===void 0&&p[N]!==void 0||y[N]===null&&p[N]!==null||!v(p[N],y[N],N,p,y,x))return!1}return!0}finally{x==null||x.delete(y)}}function c(p,y,v,x){if(y.size===0)return!0;if(!(p instanceof Map))return!1;for(const[j,w]of y.entries()){const N=p.get(j);if(v(N,w,j,p,y,x)===!1)return!1}return!0}function f(p,y,v,x){if(y.length===0)return!0;if(!Array.isArray(p))return!1;const j=new Set;for(let w=0;w<y.length;w++){const N=y[w];let O=!1;for(let P=0;P<p.length;P++){if(j.has(P))continue;const E=p[P];let A=!1;if(v(E,N,w,p,y,x)&&(A=!0),A){j.add(P),O=!0;break}}if(!O)return!1}return!0}function m(p,y,v,x){return y.size===0?!0:p instanceof Set?f([...p],[...y],v,x):!1}e.isMatchWith=i,e.isSetMatch=m})(qg)),qg}var yE;function eR(){return yE||(yE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TU();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(Ug)),Ug}var Gg={},Yg={},Vg={},vE;function CU(){return vE||(vE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(Vg)),Vg}var Qg={},gE;function cj(){return gE||(gE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Qg)),Qg}var Xg={},xE;function tR(){return xE||(xE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",o="[object Arguments]",l="[object Symbol]",c="[object Date]",f="[object Map]",m="[object Set]",p="[object Array]",y="[object Function]",v="[object ArrayBuffer]",x="[object Object]",j="[object Error]",w="[object DataView]",N="[object Uint8Array]",O="[object Uint8ClampedArray]",P="[object Uint16Array]",E="[object Uint32Array]",A="[object BigUint64Array]",T="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",D="[object BigInt64Array]",I="[object Float32Array]",k="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=v,e.arrayTag=p,e.bigInt64ArrayTag=D,e.bigUint64ArrayTag=A,e.booleanTag=i,e.dataViewTag=w,e.dateTag=c,e.errorTag=j,e.float32ArrayTag=I,e.float64ArrayTag=k,e.functionTag=y,e.int16ArrayTag=M,e.int32ArrayTag=R,e.int8ArrayTag=T,e.mapTag=f,e.numberTag=n,e.objectTag=x,e.regexpTag=t,e.setTag=m,e.stringTag=r,e.symbolTag=l,e.uint16ArrayTag=P,e.uint32ArrayTag=E,e.uint8ArrayTag=N,e.uint8ClampedArrayTag=O})(Xg)),Xg}var Zg={},bE;function MU(){return bE||(bE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Zg)),Zg}var jE;function rR(){return jE||(jE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CU(),r=cj(),n=tR(),i=WM(),o=MU();function l(p,y){return c(p,void 0,p,new Map,y)}function c(p,y,v,x=new Map,j=void 0){const w=j==null?void 0:j(p,y,v,x);if(w!==void 0)return w;if(i.isPrimitive(p))return p;if(x.has(p))return x.get(p);if(Array.isArray(p)){const N=new Array(p.length);x.set(p,N);for(let O=0;O<p.length;O++)N[O]=c(p[O],O,v,x,j);return Object.hasOwn(p,"index")&&(N.index=p.index),Object.hasOwn(p,"input")&&(N.input=p.input),N}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const N=new RegExp(p.source,p.flags);return N.lastIndex=p.lastIndex,N}if(p instanceof Map){const N=new Map;x.set(p,N);for(const[O,P]of p)N.set(O,c(P,O,v,x,j));return N}if(p instanceof Set){const N=new Set;x.set(p,N);for(const O of p)N.add(c(O,void 0,v,x,j));return N}if(typeof Buffer<"u"&&Buffer.isBuffer(p))return p.subarray();if(o.isTypedArray(p)){const N=new(Object.getPrototypeOf(p)).constructor(p.length);x.set(p,N);for(let O=0;O<p.length;O++)N[O]=c(p[O],O,v,x,j);return N}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const N=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return x.set(p,N),f(N,p,v,x,j),N}if(typeof File<"u"&&p instanceof File){const N=new File([p],p.name,{type:p.type});return x.set(p,N),f(N,p,v,x,j),N}if(typeof Blob<"u"&&p instanceof Blob){const N=new Blob([p],{type:p.type});return x.set(p,N),f(N,p,v,x,j),N}if(p instanceof Error){const N=structuredClone(p);return x.set(p,N),N.message=p.message,N.name=p.name,N.stack=p.stack,N.cause=p.cause,N.constructor=p.constructor,f(N,p,v,x,j),N}if(p instanceof Boolean){const N=new Boolean(p.valueOf());return x.set(p,N),f(N,p,v,x,j),N}if(p instanceof Number){const N=new Number(p.valueOf());return x.set(p,N),f(N,p,v,x,j),N}if(p instanceof String){const N=new String(p.valueOf());return x.set(p,N),f(N,p,v,x,j),N}if(typeof p=="object"&&m(p)){const N=Object.create(Object.getPrototypeOf(p));return x.set(p,N),f(N,p,v,x,j),N}return p}function f(p,y,v=p,x,j){const w=[...Object.keys(y),...t.getSymbols(y)];for(let N=0;N<w.length;N++){const O=w[N],P=Object.getOwnPropertyDescriptor(p,O);(P==null||P.writable)&&(p[O]=c(y[O],O,v,x,j))}}function m(p){switch(r.getTag(p)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=l,e.cloneDeepWithImpl=c,e.copyProperties=f})(Yg)),Yg}var wE;function RU(){return wE||(wE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rR();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Gg)),Gg}var SE;function DU(){return SE||(SE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eR(),r=RU();function n(i){return i=r.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=n})(Bg)),Bg}var Wg={},Jg={},e0={},NE;function kU(){return NE||(NE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rR(),r=cj(),n=tR();function i(o,l){return t.cloneDeepWith(o,(c,f,m,p)=>{const y=l==null?void 0:l(c,f,m,p);if(y!==void 0)return y;if(typeof o=="object"){if(r.getTag(o)===n.objectTag&&typeof o.constructor!="function"){const v={};return p.set(o,v),t.copyProperties(v,o,m,p),v}switch(Object.prototype.toString.call(o)){case n.numberTag:case n.stringTag:case n.booleanTag:{const v=new o.constructor(o==null?void 0:o.valueOf());return t.copyProperties(v,o),v}case n.argumentsTag:{const v={};return t.copyProperties(v,o),v.length=o.length,v[Symbol.iterator]=o[Symbol.iterator],v}default:return}}})}e.cloneDeepWith=i})(e0)),e0}var OE;function IU(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kU();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Jg)),Jg}var t0={},r0={},_E;function nR(){return _E||(_E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(r0)),r0}var n0={},EE;function LU(){return EE||(EE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cj();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(n0)),n0}var AE;function $U(){return AE||(AE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=HM(),r=nR(),n=LU(),i=sj();function o(l,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&t.isDeepKey(c)&&(l==null?void 0:l[c])==null?f=i.toPath(c):f=[c],f.length===0)return!1;let m=l;for(let p=0;p<f.length;p++){const y=f[p];if((m==null||!Object.hasOwn(m,y))&&!((Array.isArray(m)||n.isArguments(m))&&r.isIndex(y)&&y<m.length))return!1;m=m[y]}return!0}e.has=o})(t0)),t0}var PE;function zU(){return PE||(PE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eR(),r=ij(),n=IU(),i=oj(),o=$U();function l(c,f){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=r.toKey(c);break}}return f=n.cloneDeep(f),function(m){const p=i.get(m,c);return p===void 0?o.has(m,c):f===void 0?p===void 0:t.isMatch(p,f)}}e.matchesProperty=l})(Wg)),Wg}var TE;function BU(){return TE||(TE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QM(),r=PU(),n=DU(),i=zU();function o(l){if(l==null)return t.identity;switch(typeof l){case"function":return l;case"object":return Array.isArray(l)&&l.length===2?i.matchesProperty(l[0],l[1]):n.matches(l);case"string":case"symbol":case"number":return r.property(l)}}e.iteratee=o})($g)),$g}var CE;function UU(){return CE||(CE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NU(),r=OU(),n=QM(),i=AU(),o=BU();function l(c,f=n.identity){return i.isArrayLikeObject(c)?t.uniqBy(Array.from(c),r.ary(o.iteratee(f),1)):[]}e.uniqBy=l})(Tg)),Tg}var a0,ME;function qU(){return ME||(ME=1,a0=UU().uniqBy),a0}var HU=qU();const RE=ns(HU);function aR(e,t,r){return t===!0?RE(e,r):typeof t=="function"?RE(e,t):e}var dj=S.createContext(null),FU=e=>e,ut=()=>{var e=S.useContext(dj);return e?e.store.dispatch:FU},wh=()=>{},KU=()=>wh,GU=(e,t)=>e===t;function ge(e){var t=S.useContext(dj),r=S.useMemo(()=>t?n=>{if(n!=null)return e(n)}:wh,[t,e]);return U2.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:KU,t?t.store.getState:wh,t?t.store.getState:wh,r,GU)}function YU(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function VU(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function QU(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var DE=e=>Array.isArray(e)?e:[e];function XU(e){const t=Array.isArray(e[0])?e[0]:e;return QU(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ZU(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var WU=class{constructor(e){this.value=e}deref(){return this.value}},JU=typeof WeakRef<"u"?WeakRef:WU,e9=0,kE=1;function Jf(){return{s:e9,v:void 0,o:null,p:null}}function iR(e,t={}){let r=Jf();const{resultEqualityCheck:n}=t;let i,o=0;function l(){var y;let c=r;const{length:f}=arguments;for(let v=0,x=f;v<x;v++){const j=arguments[v];if(typeof j=="function"||typeof j=="object"&&j!==null){let w=c.o;w===null&&(c.o=w=new WeakMap);const N=w.get(j);N===void 0?(c=Jf(),w.set(j,c)):c=N}else{let w=c.p;w===null&&(c.p=w=new Map);const N=w.get(j);N===void 0?(c=Jf(),w.set(j,c)):c=N}}const m=c;let p;if(c.s===kE)p=c.v;else if(p=e.apply(null,arguments),o++,n){const v=((y=i==null?void 0:i.deref)==null?void 0:y.call(i))??i;v!=null&&n(v,p)&&(p=v,o!==0&&o--),i=typeof p=="object"&&p!==null||typeof p=="function"?new JU(p):p}return m.s=kE,m.v=p,p}return l.clearCache=()=>{r=Jf(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function t9(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,l=0,c,f={},m=i.pop();typeof m=="object"&&(f=m,m=i.pop()),YU(m,`createSelector expects an output function after the inputs, but received: [${typeof m}]`);const p={...r,...f},{memoize:y,memoizeOptions:v=[],argsMemoize:x=iR,argsMemoizeOptions:j=[]}=p,w=DE(v),N=DE(j),O=XU(i),P=y(function(){return o++,m.apply(null,arguments)},...w),E=x(function(){l++;const T=ZU(O,arguments);return c=P.apply(null,T),c},...N);return Object.assign(E,{resultFunc:m,memoizedResultFunc:P,dependencies:O,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:x})};return Object.assign(n,{withTypes:()=>n}),n}var V=t9(iR),r9=Object.assign((e,t=V)=>{VU(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(o=>e[o]);return t(n,(...o)=>o.reduce((l,c,f)=>(l[r[f]]=c,l),{}))},{withTypes:()=>r9}),i0={},s0={},o0={},IE;function n9(){return IE||(IE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,o)=>{if(n!==i){const l=t(n),c=t(i);if(l===c&&l===0){if(n<i)return o==="desc"?1:-1;if(n>i)return o==="desc"?-1:1}return o==="desc"?c-l:l-c}return 0};e.compareValues=r})(o0)),o0}var l0={},u0={},LE;function sR(){return LE||(LE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(u0)),u0}var $E;function a9(){return $E||($E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sR(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(o,l){return Array.isArray(o)?!1:typeof o=="number"||typeof o=="boolean"||o==null||t.isSymbol(o)?!0:typeof o=="string"&&(n.test(o)||!r.test(o))||l!=null&&Object.hasOwn(l,o)}e.isKey=i})(l0)),l0}var zE;function i9(){return zE||(zE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=n9(),r=a9(),n=sj();function i(o,l,c,f){if(o==null)return[];c=f?void 0:c,Array.isArray(o)||(o=Object.values(o)),Array.isArray(l)||(l=l==null?[null]:[l]),l.length===0&&(l=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(x=>String(x));const m=(x,j)=>{let w=x;for(let N=0;N<j.length&&w!=null;++N)w=w[j[N]];return w},p=(x,j)=>j==null||x==null?j:typeof x=="object"&&"key"in x?Object.hasOwn(j,x.key)?j[x.key]:m(j,x.path):typeof x=="function"?x(j):Array.isArray(x)?m(j,x):typeof j=="object"?j[x]:j,y=l.map(x=>(Array.isArray(x)&&x.length===1&&(x=x[0]),x==null||typeof x=="function"||Array.isArray(x)||r.isKey(x)?x:{key:x,path:n.toPath(x)}));return o.map(x=>({original:x,criteria:y.map(j=>p(j,x))})).slice().sort((x,j)=>{for(let w=0;w<y.length;w++){const N=t.compareValues(x.criteria[w],j.criteria[w],c[w]);if(N!==0)return N}return 0}).map(x=>x.original)}e.orderBy=i})(s0)),s0}var c0={},BE;function s9(){return BE||(BE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],o=Math.floor(n),l=(c,f)=>{for(let m=0;m<c.length;m++){const p=c[m];Array.isArray(p)&&f<o?l(p,f+1):i.push(p)}};return l(r,0),i}e.flatten=t})(c0)),c0}var d0={},UE;function oR(){return UE||(UE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nR(),r=XM(),n=ZM(),i=JM();function o(l,c,f){return n.isObject(f)&&(typeof c=="number"&&r.isArrayLike(f)&&t.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?i.isEqualsSameValueZero(f[c],l):!1}e.isIterateeCall=o})(d0)),d0}var qE;function o9(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=i9(),r=s9(),n=oR();function i(o,...l){const c=l.length;return c>1&&n.isIterateeCall(o,l[0],l[1])?l=[]:c>2&&n.isIterateeCall(l[0],l[1],l[2])&&(l=[l[0]]),t.orderBy(o,r.flatten(l),["asc"])}e.sortBy=i})(i0)),i0}var f0,HE;function l9(){return HE||(HE=1,f0=o9().sortBy),f0}var u9=l9();const Km=ns(u9);var lR=e=>e.legend.settings,c9=e=>e.legend.size,d9=e=>e.legend.payload,f9=V([d9,lR],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Km(n,r):n});function h9(){return ge(f9)}var eh=1;function uR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=S.useState({height:0,left:0,top:0,width:0}),n=S.useCallback(i=>{if(i!=null){var o=i.getBoundingClientRect(),l={height:o.height,left:o.left,top:o.top,width:o.width};(Math.abs(l.height-t.height)>eh||Math.abs(l.left-t.left)>eh||Math.abs(l.top-t.top)>eh||Math.abs(l.width-t.width)>eh)&&r({height:l.height,left:l.left,top:l.top,width:l.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function nr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var m9=typeof Symbol=="function"&&Symbol.observable||"@@observable",FE=m9,h0=()=>Math.random().toString(36).substring(7).split("").join("."),p9={INIT:`@@redux/INIT${h0()}`,REPLACE:`@@redux/REPLACE${h0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${h0()}`},qh=p9;function fj(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function cR(e,t,r){if(typeof e!="function")throw new Error(nr(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(nr(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(nr(1));return r(cR)(e,t)}let n=e,i=t,o=new Map,l=o,c=0,f=!1;function m(){l===o&&(l=new Map,o.forEach((N,O)=>{l.set(O,N)}))}function p(){if(f)throw new Error(nr(3));return i}function y(N){if(typeof N!="function")throw new Error(nr(4));if(f)throw new Error(nr(5));let O=!0;m();const P=c++;return l.set(P,N),function(){if(O){if(f)throw new Error(nr(6));O=!1,m(),l.delete(P),o=null}}}function v(N){if(!fj(N))throw new Error(nr(7));if(typeof N.type>"u")throw new Error(nr(8));if(typeof N.type!="string")throw new Error(nr(17));if(f)throw new Error(nr(9));try{f=!0,i=n(i,N)}finally{f=!1}return(o=l).forEach(P=>{P()}),N}function x(N){if(typeof N!="function")throw new Error(nr(10));n=N,v({type:qh.REPLACE})}function j(){const N=y;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(nr(11));function P(){const A=O;A.next&&A.next(p())}return P(),{unsubscribe:N(P)}},[FE](){return this}}}return v({type:qh.INIT}),{dispatch:v,subscribe:y,getState:p,replaceReducer:x,[FE]:j}}function y9(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:qh.INIT})>"u")throw new Error(nr(12));if(typeof r(void 0,{type:qh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(nr(13))})}function dR(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const l=t[o];typeof e[l]=="function"&&(r[l]=e[l])}const n=Object.keys(r);let i;try{y9(r)}catch(o){i=o}return function(l={},c){if(i)throw i;let f=!1;const m={};for(let p=0;p<n.length;p++){const y=n[p],v=r[y],x=l[y],j=v(x,c);if(typeof j>"u")throw c&&c.type,new Error(nr(14));m[y]=j,f=f||j!==x}return f=f||n.length!==Object.keys(l).length,f?m:l}}function Hh(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function v9(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(nr(15))};const l={getState:i.getState,dispatch:(f,...m)=>o(f,...m)},c=e.map(f=>f(l));return o=Hh(...c)(i.dispatch),{...i,dispatch:o}}}function fR(e){return fj(e)&&"type"in e&&typeof e.type=="string"}var hR=Symbol.for("immer-nothing"),KE=Symbol.for("immer-draftable"),Or=Symbol.for("immer-state");function Rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jr=Object,Hl=Jr.getPrototypeOf,Fh="constructor",Gm="prototype",Dx="configurable",Kh="enumerable",Sh="writable",zc="value",Ga=e=>!!e&&!!e[Or];function $n(e){var t;return e?mR(e)||Vm(e)||!!e[KE]||!!((t=e[Fh])!=null&&t[KE])||Qm(e)||Xm(e):!1}var g9=Jr[Gm][Fh].toString(),GE=new WeakMap;function mR(e){if(!e||!hj(e))return!1;const t=Hl(e);if(t===null||t===Jr[Gm])return!0;const r=Jr.hasOwnProperty.call(t,Fh)&&t[Fh];if(r===Object)return!0;if(!gl(r))return!1;let n=GE.get(r);return n===void 0&&(n=Function.toString.call(r),GE.set(r,n)),n===g9}function Ym(e,t,r=!0){cd(e)===0?(r?Reflect.ownKeys(e):Jr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function cd(e){const t=e[Or];return t?t.type_:Vm(e)?1:Qm(e)?2:Xm(e)?3:0}var YE=(e,t,r=cd(e))=>r===2?e.has(t):Jr[Gm].hasOwnProperty.call(e,t),kx=(e,t,r=cd(e))=>r===2?e.get(t):e[t],Gh=(e,t,r,n=cd(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function x9(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Vm=Array.isArray,Qm=e=>e instanceof Map,Xm=e=>e instanceof Set,hj=e=>typeof e=="object",gl=e=>typeof e=="function",m0=e=>typeof e=="boolean";function b9(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Ma=e=>e.copy_||e.base_,mj=e=>e.modified_?e.copy_:e.base_;function Ix(e,t){if(Qm(e))return new Map(e);if(Xm(e))return new Set(e);if(Vm(e))return Array[Gm].slice.call(e);const r=mR(e);if(t===!0||t==="class_only"&&!r){const n=Jr.getOwnPropertyDescriptors(e);delete n[Or];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const l=i[o],c=n[l];c[Sh]===!1&&(c[Sh]=!0,c[Dx]=!0),(c.get||c.set)&&(n[l]={[Dx]:!0,[Sh]:!0,[Kh]:c[Kh],[zc]:e[l]})}return Jr.create(Hl(e),n)}else{const n=Hl(e);if(n!==null&&r)return{...e};const i=Jr.create(n);return Jr.assign(i,e)}}function pj(e,t=!1){return Zm(e)||Ga(e)||!$n(e)||(cd(e)>1&&Jr.defineProperties(e,{set:th,add:th,clear:th,delete:th}),Jr.freeze(e),t&&Ym(e,(r,n)=>{pj(n,!0)},!1)),e}function j9(){Rn(2)}var th={[zc]:j9};function Zm(e){return e===null||!hj(e)?!0:Jr.isFrozen(e)}var Yh="MapSet",Lx="Patches",VE="ArrayMethods",pR={};function ao(e){const t=pR[e];return t||Rn(0,e),t}var QE=e=>!!pR[e],Bc,yR=()=>Bc,w9=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:QE(Yh)?ao(Yh):void 0,arrayMethodsPlugin_:QE(VE)?ao(VE):void 0});function XE(e,t){t&&(e.patchPlugin_=ao(Lx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function $x(e){zx(e),e.drafts_.forEach(S9),e.drafts_=null}function zx(e){e===Bc&&(Bc=e.parent_)}var ZE=e=>Bc=w9(Bc,e);function S9(e){const t=e[Or];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function WE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Or].modified_&&($x(t),Rn(4)),$n(e)&&(e=JE(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Or].base_,e,t)}else e=JE(t,r);return N9(t,e,!0),$x(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==hR?e:void 0}function JE(e,t){if(Zm(t))return t;const r=t[Or];if(!r)return Vh(t,e.handledSet_,e);if(!Wm(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){const{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);xR(r,e)}return r.copy_}function N9(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pj(t,r)}function vR(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Wm=(e,t)=>e.scope_===t,O9=[];function gR(e,t,r,n){const i=Ma(e),o=e.type_;if(n!==void 0&&kx(i,n,o)===t){Gh(i,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Ym(i,(f,m)=>{if(Ga(m)){const p=c.get(m)||[];p.push(f),c.set(m,p)}})}const l=e.draftLocations_.get(t)??O9;for(const c of l)Gh(i,c,r,o)}function _9(e,t,r){e.callbacks_.push(function(i){var c;const o=t;if(!o||!Wm(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const l=mj(o);gR(e,o.draft_??o,l,r),xR(o,i)})}function xR(e,t){var n;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((n=e.assigned_)==null?void 0:n.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}vR(e)}}function E9(e,t,r){const{scope_:n}=e;if(Ga(r)){const i=r[Or];Wm(i,n)&&i.callbacks_.push(function(){Nh(e);const l=mj(i);gR(e,r,l,t)})}else $n(r)&&e.callbacks_.push(function(){const o=Ma(e);e.type_===3?o.has(r)&&Vh(r,n.handledSet_,n):kx(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Vh(kx(e.copy_,t,e.type_),n.handledSet_,n)})}function Vh(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ga(e)||t.has(e)||!$n(e)||Zm(e)||(t.add(e),Ym(e,(n,i)=>{if(Ga(i)){const o=i[Or];if(Wm(o,r)){const l=mj(o);Gh(e,n,l,e.type_),vR(o)}}else $n(i)&&Vh(i,t,r)})),e}function A9(e,t){const r=Vm(e),n={type_:r?1:0,scope_:t?t.scope_:yR(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=n,o=Qh;r&&(i=[n],o=Uc);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=l,[c,n]}var Qh={get(e,t){if(t===Or)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=Ma(e);if(!YE(i,t,e.type_))return P9(e,i,t);const o=i[t];if(e.finalized_||!$n(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&b9(t))return o;if(o===p0(e.base_,t)){Nh(e);const l=e.type_===1?+t:t,c=Ux(e.scope_,o,e,l);return e.copy_[l]=c}return o},has(e,t){return t in Ma(e)},ownKeys(e){return Reflect.ownKeys(Ma(e))},set(e,t,r){const n=bR(Ma(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=p0(Ma(e),t),o=i==null?void 0:i[Or];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(x9(r,i)&&(r!==void 0||YE(e.base_,t,e.type_)))return!0;Nh(e),Bx(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),E9(e,t,r)),!0},deleteProperty(e,t){return Nh(e),p0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Bx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ma(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Sh]:!0,[Dx]:e.type_!==1||t!=="length",[Kh]:n[Kh],[zc]:r[t]}},defineProperty(){Rn(11)},getPrototypeOf(e){return Hl(e.base_)},setPrototypeOf(){Rn(12)}},Uc={};for(let e in Qh){let t=Qh[e];Uc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Uc.deleteProperty=function(e,t){return Uc.set.call(this,e,t,void 0)};Uc.set=function(e,t,r){return Qh.set.call(this,e[0],t,r,e[0])};function p0(e,t){const r=e[Or];return(r?Ma(r):e)[t]}function P9(e,t,r){var i;const n=bR(t,r);return n?zc in n?n[zc]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function bR(e,t){if(!(t in e))return;let r=Hl(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Hl(r)}}function Bx(e){e.modified_||(e.modified_=!0,e.parent_&&Bx(e.parent_))}function Nh(e){e.copy_||(e.assigned_=new Map,e.copy_=Ix(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var T9=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(gl(r)&&!gl(n)){const l=n;n=r;const c=this;return function(m=l,...p){return c.produce(m,y=>n.call(this,y,...p))}}gl(n)||Rn(6),i!==void 0&&!gl(i)&&Rn(7);let o;if($n(r)){const l=ZE(this),c=Ux(l,r,void 0);let f=!0;try{o=n(c),f=!1}finally{f?$x(l):zx(l)}return XE(l,i),WE(o,l)}else if(!r||!hj(r)){if(o=n(r),o===void 0&&(o=r),o===hR&&(o=void 0),this.autoFreeze_&&pj(o,!0),i){const l=[],c=[];ao(Lx).generateReplacementPatches_(r,o,{patches_:l,inversePatches_:c}),i(l,c)}return o}else Rn(1,r)},this.produceWithPatches=(r,n)=>{if(gl(r))return(c,...f)=>this.produceWithPatches(c,m=>r(m,...f));let i,o;return[this.produce(r,n,(c,f)=>{i=c,o=f}),i,o]},m0(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),m0(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),m0(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){$n(t)||Rn(8),Ga(t)&&(t=Sn(t));const r=ZE(this),n=Ux(r,t,void 0);return n[Or].isManual_=!0,zx(r),n}finishDraft(t,r){const n=t&&t[Or];(!n||!n.isManual_)&&Rn(9);const{scope_:i}=n;return XE(i,r),WE(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const o=r[n];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}n>-1&&(r=r.slice(n+1));const i=ao(Lx).applyPatches_;return Ga(t)?i(t,r):this.produce(t,o=>i(o,r))}};function Ux(e,t,r,n){const[i,o]=Qm(t)?ao(Yh).proxyMap_(t,r):Xm(t)?ao(Yh).proxySet_(t,r):A9(t,r);return((r==null?void 0:r.scope_)??yR()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?_9(r,o,n):o.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:m}=f;o.modified_&&m&&m.generatePatches_(o,[],f)}),i}function Sn(e){return Ga(e)||Rn(10,e),jR(e)}function jR(e){if(!$n(e)||Zm(e))return e;const t=e[Or];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Ix(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Ix(e,!0);return Ym(r,(i,o)=>{Gh(r,i,jR(o))},n),t&&(t.finalized_=!1),r}var C9=new T9,wR=C9.produce;function SR(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var M9=SR(),R9=SR,D9=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Hh:Hh.apply(null,arguments)};function nn(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(en(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>fR(n)&&n.type===e,r}var NR=class Nc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Nc.prototype)}static get[Symbol.species](){return Nc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Nc(...t[0].concat(this)):new Nc(...t.concat(this))}};function eA(e){return $n(e)?wR(e,()=>{}):e}function rh(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function k9(e){return typeof e=="boolean"}var I9=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new NR;return r&&(k9(r)?l.push(M9):l.push(R9(r.extraArgument))),l},OR="RTK_autoBatch",ot=()=>e=>({payload:e,meta:{[OR]:!0}}),tA=e=>t=>{setTimeout(t,e)},_R=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,l=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tA(10):e.type==="callback"?e.queueNotification:tA(e.timeout),m=()=>{l=!1,o&&(o=!1,c.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const y=()=>i&&p(),v=n.subscribe(y);return c.add(p),()=>{v(),c.delete(p)}},dispatch(p){var y;try{return i=!((y=p==null?void 0:p.meta)!=null&&y[OR]),o=!i,o&&(l||(l=!0,f(m))),n.dispatch(p)}finally{i=!0}}})},L9=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new NR(e);return n&&i.push(_R(typeof n=="object"?n:void 0)),i};function $9(e){const t=I9(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:l=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(fj(r))c=dR(r);else throw new Error(en(1));let f;typeof n=="function"?f=n(t):f=t();let m=Hh;i&&(m=D9({trace:!1,...typeof i=="object"&&i}));const p=v9(...f),y=L9(p);let v=typeof l=="function"?l(y):y();const x=m(...v);return cR(c,o,x)}function ER(e){const t={},r=[];let n;const i={addCase(o,l){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(en(28));if(c in t)throw new Error(en(29));return t[c]=l,i},addAsyncThunk(o,l){return l.pending&&(t[o.pending.type]=l.pending),l.rejected&&(t[o.rejected.type]=l.rejected),l.fulfilled&&(t[o.fulfilled.type]=l.fulfilled),l.settled&&r.push({matcher:o.settled,reducer:l.settled}),i},addMatcher(o,l){return r.push({matcher:o,reducer:l}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function z9(e){return typeof e=="function"}function B9(e,t){let[r,n,i]=ER(t),o;if(z9(e))o=()=>eA(e());else{const c=eA(e);o=()=>c}function l(c=o(),f){let m=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return m.filter(p=>!!p).length===0&&(m=[i]),m.reduce((p,y)=>{if(y)if(Ga(p)){const x=y(p,f);return x===void 0?p:x}else{if($n(p))return wR(p,v=>y(v,f));{const v=y(p,f);if(v===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return p},c)}return l.getInitialState=o,l}var U9="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",q9=(e=21)=>{let t="",r=e;for(;r--;)t+=U9[Math.random()*64|0];return t},H9=Symbol.for("rtk-slice-createasyncthunk");function F9(e,t){return`${e}/${t}`}function K9({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[H9];return function(i){const{name:o,reducerPath:l=o}=i;if(!o)throw new Error(en(11));const c=(typeof i.reducers=="function"?i.reducers(Y9()):i.reducers)||{},f=Object.keys(c),m={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(A,T){const M=typeof A=="string"?A:A.type;if(!M)throw new Error(en(12));if(M in m.sliceCaseReducersByType)throw new Error(en(13));return m.sliceCaseReducersByType[M]=T,p},addMatcher(A,T){return m.sliceMatchers.push({matcher:A,reducer:T}),p},exposeAction(A,T){return m.actionCreators[A]=T,p},exposeCaseReducer(A,T){return m.sliceCaseReducersByName[A]=T,p}};f.forEach(A=>{const T=c[A],M={reducerName:A,type:F9(o,A),createNotation:typeof i.reducers=="function"};Q9(T)?Z9(M,T,p,t):V9(M,T,p)});function y(){const[A={},T=[],M=void 0]=typeof i.extraReducers=="function"?ER(i.extraReducers):[i.extraReducers],R={...A,...m.sliceCaseReducersByType};return B9(i.initialState,D=>{for(let I in R)D.addCase(I,R[I]);for(let I of m.sliceMatchers)D.addMatcher(I.matcher,I.reducer);for(let I of T)D.addMatcher(I.matcher,I.reducer);M&&D.addDefaultCase(M)})}const v=A=>A,x=new Map,j=new WeakMap;let w;function N(A,T){return w||(w=y()),w(A,T)}function O(){return w||(w=y()),w.getInitialState()}function P(A,T=!1){function M(D){let I=D[A];return typeof I>"u"&&T&&(I=rh(j,M,O)),I}function R(D=v){const I=rh(x,T,()=>new WeakMap);return rh(I,D,()=>{const k={};for(const[H,q]of Object.entries(i.selectors??{}))k[H]=G9(q,D,()=>rh(j,D,O),T);return k})}return{reducerPath:A,getSelectors:R,get selectors(){return R(M)},selectSlice:M}}const E={name:o,reducer:N,actions:m.actionCreators,caseReducers:m.sliceCaseReducersByName,getInitialState:O,...P(l),injectInto(A,{reducerPath:T,...M}={}){const R=T??l;return A.inject({reducerPath:R,reducer:N},M),{...E,...P(R,!0)}}};return E}}function G9(e,t,r,n){function i(o,...l){let c=t(o);return typeof c>"u"&&n&&(c=r()),e(c,...l)}return i.unwrapped=e,i}var yr=K9();function Y9(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function V9({type:e,reducerName:t,createNotation:r},n,i){let o,l;if("reducer"in n){if(r&&!X9(n))throw new Error(en(17));o=n.reducer,l=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?nn(e,l):nn(e))}function Q9(e){return e._reducerDefinitionType==="asyncThunk"}function X9(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Z9({type:e,reducerName:t},r,n,i){if(!i)throw new Error(en(18));const{payloadCreator:o,fulfilled:l,pending:c,rejected:f,settled:m,options:p}=r,y=i(e,o,p);n.exposeAction(t,y),l&&n.addCase(y.fulfilled,l),c&&n.addCase(y.pending,c),f&&n.addCase(y.rejected,f),m&&n.addMatcher(y.settled,m),n.exposeCaseReducer(t,{fulfilled:l||nh,pending:c||nh,rejected:f||nh,settled:m||nh})}function nh(){}var W9="task",AR="listener",PR="completed",yj="cancelled",J9=`task-${yj}`,eq=`task-${PR}`,qx=`${AR}-${yj}`,tq=`${AR}-${PR}`,Jm=class{constructor(e){Jv(this,"name","TaskAbortError");Jv(this,"message");this.code=e,this.message=`${W9} ${yj} (reason: ${e})`}},vj=(e,t)=>{if(typeof e!="function")throw new TypeError(en(32))},Xh=()=>{},TR=(e,t=Xh)=>(e.catch(t),e),CR=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ws=e=>{if(e.aborted)throw new Jm(e.reason)};function MR(e,t){let r=Xh;return new Promise((n,i)=>{const o=()=>i(new Jm(e.reason));if(e.aborted){o();return}r=CR(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Xh})}var rq=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof Jm?"cancelled":"rejected",error:r}}finally{t==null||t()}},Zh=e=>t=>TR(MR(e,t).then(r=>(Ws(e),r))),RR=e=>{const t=Zh(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Sl}=Object,rA={},ep="listenerMiddleware",nq=(e,t)=>{const r=n=>CR(e,()=>n.abort(e.reason));return(n,i)=>{vj(n);const o=new AbortController;r(o);const l=rq(async()=>{Ws(e),Ws(o.signal);const c=await n({pause:Zh(o.signal),delay:RR(o.signal),signal:o.signal});return Ws(o.signal),c},()=>o.abort(eq));return i!=null&&i.autoJoin&&t.push(l.catch(Xh)),{result:Zh(e)(l),cancel(){o.abort(J9)}}}},aq=(e,t)=>{const r=async(n,i)=>{Ws(t);let o=()=>{};const c=[new Promise((f,m)=>{let p=e({predicate:n,effect:(y,v)=>{v.unsubscribe(),f([y,v.getState(),v.getOriginalState()])}});o=()=>{p(),m()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await MR(t,Promise.race(c));return Ws(t),f}finally{o()}};return(n,i)=>TR(r(n,i))},DR=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=nn(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(en(21));return vj(o),{predicate:i,type:t,effect:o}},kR=Sl(e=>{const{type:t,predicate:r,effect:n}=DR(e);return{id:q9(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(en(22))}}},{withTypes:()=>kR}),nA=(e,t)=>{const{type:r,effect:n,predicate:i}=DR(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},Hx=e=>{e.pending.forEach(t=>{t.abort(qx)})},iq=(e,t)=>()=>{for(const r of t.keys())Hx(r);e.clear()},aA=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},IR=Sl(nn(`${ep}/add`),{withTypes:()=>IR}),sq=nn(`${ep}/removeAll`),LR=Sl(nn(`${ep}/remove`),{withTypes:()=>LR}),oq=(...e)=>{console.error(`${ep}/error`,...e)},dd=(e={})=>{const t=new Map,r=new Map,n=x=>{const j=r.get(x)??0;r.set(x,j+1)},i=x=>{const j=r.get(x)??1;j===1?r.delete(x):r.set(x,j-1)},{extra:o,onError:l=oq}=e;vj(l);const c=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),j=>{x.unsubscribe(),j!=null&&j.cancelActive&&Hx(x)}),f=x=>{const j=nA(t,x)??kR(x);return c(j)};Sl(f,{withTypes:()=>f});const m=x=>{const j=nA(t,x);return j&&(j.unsubscribe(),x.cancelActive&&Hx(j)),!!j};Sl(m,{withTypes:()=>m});const p=async(x,j,w,N)=>{const O=new AbortController,P=aq(f,O.signal),E=[];try{x.pending.add(O),n(x),await Promise.resolve(x.effect(j,Sl({},w,{getOriginalState:N,condition:(A,T)=>P(A,T).then(Boolean),take:P,delay:RR(O.signal),pause:Zh(O.signal),extra:o,signal:O.signal,fork:nq(O.signal,E),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((A,T,M)=>{A!==O&&(A.abort(qx),M.delete(A))})},cancel:()=>{O.abort(qx),x.pending.delete(O)},throwIfCancelled:()=>{Ws(O.signal)}})))}catch(A){A instanceof Jm||aA(l,A,{raisedBy:"effect"})}finally{await Promise.all(E),O.abort(tq),i(x),x.pending.delete(O)}},y=iq(t,r);return{middleware:x=>j=>w=>{if(!fR(w))return j(w);if(IR.match(w))return f(w.payload);if(sq.match(w)){y();return}if(LR.match(w))return m(w.payload);let N=x.getState();const O=()=>{if(N===rA)throw new Error(en(23));return N};let P;try{if(P=j(w),t.size>0){const E=x.getState(),A=Array.from(t.values());for(const T of A){let M=!1;try{M=T.predicate(w,E,N)}catch(R){M=!1,aA(l,R,{raisedBy:"predicate"})}M&&p(T,w,x,O)}}}finally{N=rA}return P},startListening:f,stopListening:m,clearListeners:y}};function en(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var lq={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},$R=yr({name:"chartLayout",initialState:lq,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,o;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:uq,setLayout:cq,setChartSize:dq,setScale:fq}=$R.actions,hq=$R.reducer;function zR(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Be(e){return Number.isFinite(e)}function oa(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function iA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(r),!0).forEach(function(n){mq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mq(e,t,r){return(t=pq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pq(e){var t=yq(e,"string");return typeof t=="symbol"?t:t+""}function yq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ot(e,t,r){return ht(e)||ht(t)?r:sa(t)?ql(e,t,r):typeof t=="function"?t(e):r}var vq=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:o,verticalAlign:l,layout:c}=t;if((c==="vertical"||c==="horizontal"&&l==="middle")&&o!=="center"&&pe(e[o]))return bl(bl({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&l!=="middle"&&pe(e[l]))return bl(bl({},e),{},{[l]:e[l]+(i||0)})}return e},Xa=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",BR=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var i,o,l=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===r&&(o=!0),c.coordinate));return i||l.push(t),o||l.push(r),l},UR=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:o,scale:l,realScaleType:c,isCategorical:f,categoricalDomain:m,tickCount:p,ticks:y,niceTicks:v,axisType:x}=e;if(!l)return null;var j=c==="scaleBand"&&l.bandwidth?l.bandwidth()/2:2,w=i==="category"&&l.bandwidth?l.bandwidth()/j:0;if(w=x==="angleAxis"&&o&&o.length>=2?zr(o[0]-o[1])*2*w:w,y||v){var N=(y||v||[]).map((O,P)=>{var E=n?n.indexOf(O):O,A=l.map(E);return Be(A)?{coordinate:A+w,value:O,offset:w,index:P}:null}).filter(Br);return N}return f&&m?m.map((O,P)=>{var E=l.map(O);return Be(E)?{coordinate:E+w,value:O,index:P,offset:w}:null}).filter(Br):l.ticks&&p!=null?l.ticks(p).map((O,P)=>{var E=l.map(O);return Be(E)?{coordinate:E+w,value:O,index:P,offset:w}:null}).filter(Br):l.domain().map((O,P)=>{var E=l.map(O);return Be(E)?{coordinate:E+w,value:n?n[O]:O,index:P,offset:w}:null}).filter(Br)},gq=(e,t)=>{if(!t||t.length!==2||!pe(t[0])||!pe(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!pe(e[0])||e[0]<r)&&(i[0]=r),(!pe(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},xq=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var o=0,l=0,c=0;c<r;++c){var f=e[c],m=f==null?void 0:f[i];if(m!=null){var p=m[1],y=m[0],v=ia(p)?y:p;v>=0?(m[0]=o,o+=v,m[1]=o):(m[0]=l,l+=v,m[1]=l)}}}},bq=e=>{var t,r=e.length;if(!(r<=0)){var n=(t=e[0])===null||t===void 0?void 0:t.length;if(!(n==null||n<=0))for(var i=0;i<n;++i)for(var o=0,l=0;l<r;++l){var c=e[l],f=c==null?void 0:c[i];if(f!=null){var m=ia(f[1])?f[0]:f[1];m>=0?(f[0]=o,o+=m,f[1]=o):(f[0]=0,f[1]=0)}}}},jq={sign:xq,expand:G6,none:ro,silhouette:Y6,wiggle:V6,positive:bq},wq=(e,t,r)=>{var n,i=(n=jq[r])!==null&&n!==void 0?n:ro,o=K6().keys(t).value((c,f)=>Number(Ot(c,f,0))).order(Mx).offset(i),l=o(e);return l.forEach((c,f)=>{c.forEach((m,p)=>{var y=Ot(e[p],t[f],0);Array.isArray(y)&&y.length===2&&pe(y[0])&&pe(y[1])&&(m[0]=y[0],m[1]=y[1])})}),l};function Sq(e){return e==null?void 0:String(e)}function sA(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:o,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ht(i[t.dataKey])){var c=KM(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var f=Ot(i,ht(l)?t.dataKey:l),m=t.scale.map(f);return pe(m)?m:null}var oA=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:o,index:l}=e;if(t.type==="category")return r[l]?r[l].coordinate+n:null;var c=Ot(o,t.dataKey,t.scale.domain()[l]);if(ht(c))return null;var f=t.scale.map(c);return pe(f)?f-i/2+n:null},Nq=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},Oq=e=>{var t=e.flat(2).filter(pe);return[Math.min(...t),Math.max(...t)]},_q=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],Eq=(e,t,r)=>{if(e!=null)return _q(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var{stackedData:l}=o,c=l.reduce((f,m)=>{var p=zR(m,t,r),y=Oq(p);return!Be(y[0])||!Be(y[1])?f:[Math.min(f[0],y[0]),Math.max(f[1],y[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},lA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,uA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Fl=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=Km(t,p=>p.coordinate),o=1/0,l=1,c=i.length;l<c;l++){var f=i[l],m=i[l-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((m==null?void 0:m.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function cA(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:o}=e;return bl(bl({},t),{},{dataKey:r,payload:n,value:i,name:o})}function tp(e,t){if(e)return String(e);if(typeof t=="string")return t}var Aq=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},Pq=(e,t)=>t==="centric"?e.angle:e.radius,Za=e=>e.layout.width,Wa=e=>e.layout.height,Tq=e=>e.layout.scale,qR=e=>e.layout.margin,rp=V(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),np=V(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),Cq="data-recharts-item-index",Mq="data-recharts-item-id",fd=60;function dA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ah(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(r),!0).forEach(function(n){Rq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Rq(e,t,r){return(t=Dq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Dq(e){var t=kq(e,"string");return typeof t=="symbol"?t:t+""}function kq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Iq=e=>e.brush.height;function Lq(e){var t=np(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:fd;return r+i}return r},0)}function $q(e){var t=np(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:fd;return r+i}return r},0)}function zq(e){var t=rp(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Bq(e){var t=rp(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Yt=V([Za,Wa,qR,Iq,Lq,$q,zq,Bq,lR,c9],(e,t,r,n,i,o,l,c,f,m)=>{var p={left:(r.left||0)+i,right:(r.right||0)+o},y={top:(r.top||0)+l,bottom:(r.bottom||0)+c},v=ah(ah({},y),p),x=v.bottom;v.bottom+=n,v=vq(v,f,m);var j=e-v.left-v.right,w=t-v.top-v.bottom;return ah(ah({brushBottom:x},v),{},{width:Math.max(j,0),height:Math.max(w,0)})}),Uq=V(Yt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),gj=V(Za,Wa,(e,t)=>({x:0,y:0,width:e,height:t})),qq=S.createContext(null),vr=()=>S.useContext(qq)!=null,ap=e=>e.brush,ip=V([ap,Yt,qR],(e,t,r)=>({height:e.height,x:pe(e.x)?e.x:t.left,y:pe(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:pe(e.width)?e.width:t.width})),y0={},v0={},g0={},fA;function Hq(){return fA||(fA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:o}={}){let l,c=null;const f=o!=null&&o.includes("leading"),m=o==null||o.includes("trailing"),p=()=>{c!==null&&(r.apply(l,c),l=void 0,c=null)},y=()=>{m&&p(),w()};let v=null;const x=()=>{v!=null&&clearTimeout(v),v=setTimeout(()=>{v=null,y()},n)},j=()=>{v!==null&&(clearTimeout(v),v=null)},w=()=>{j(),l=void 0,c=null},N=()=>{p()},O=function(...P){if(i!=null&&i.aborted)return;l=this,c=P;const E=v==null;x(),f&&E&&p()};return O.schedule=x,O.cancel=w,O.flush=N,i==null||i.addEventListener("abort",w,{once:!0}),O}e.debounce=t})(g0)),g0}var hA;function Fq(){return hA||(hA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Hq();function r(n,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:c=!0,maxWait:f}=o,m=Array(2);l&&(m[0]="leading"),c&&(m[1]="trailing");let p,y=null;const v=t.debounce(function(...w){p=n.apply(this,w),y=null},i,{edges:m}),x=function(...w){return f!=null&&(y===null&&(y=Date.now()),Date.now()-y>=f)?(p=n.apply(this,w),y=Date.now(),v.cancel(),v.schedule(),p):(v.apply(this,w),p)},j=()=>(v.flush(),p);return x.cancel=v.cancel,x.flush=j,x}e.debounce=r})(v0)),v0}var mA;function Kq(){return mA||(mA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fq();function r(n,i=0,o={}){const{leading:l=!0,trailing:c=!0}=o;return t.debounce(n,i,{leading:l,maxWait:i,trailing:c})}e.throttle=r})(y0)),y0}var x0,pA;function Gq(){return pA||(pA=1,x0=Kq().throttle),x0}var Yq=Gq();const Vq=ns(Yq);var Wh=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];if(typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=0;console.warn(r.replace(/%s/g,()=>i[l++]))}},ta={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},HR=(e,t,r)=>{var{width:n=ta.width,height:i=ta.height,aspect:o,maxHeight:l}=r,c=no(n)?e:Number(n),f=no(i)?t:Number(i);return o&&o>0&&(c?f=c/o:f&&(c=f*o),l&&f!=null&&f>l&&(f=l)),{calculatedWidth:c,calculatedHeight:f}},Qq={width:0,height:0,overflow:"visible"},Xq={width:0,overflowX:"visible"},Zq={height:0,overflowY:"visible"},Wq={},Jq=e=>{var{width:t,height:r}=e,n=no(t),i=no(r);return n&&i?Qq:n?Xq:i?Zq:Wq};function eH(e){var{width:t,height:r,aspect:n}=e,i=t,o=r;return i===void 0&&o===void 0?(i=ta.width,o=ta.height):i===void 0?i=n&&n>0?void 0:ta.width:o===void 0&&(o=n&&n>0?void 0:ta.height),{width:i,height:o}}function Fx(){return Fx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fx.apply(null,arguments)}function yA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yA(Object(r),!0).forEach(function(n){tH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tH(e,t,r){return(t=rH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rH(e){var t=nH(e,"string");return typeof t=="symbol"?t:t+""}function nH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FR=S.createContext(ta.initialDimension);function aH(e){return oa(e.width)&&oa(e.height)}function KR(e){var{children:t,width:r,height:n}=e,i=S.useMemo(()=>({width:r,height:n}),[r,n]);return aH(i)?S.createElement(FR.Provider,{value:i},t):null}var xj=()=>S.useContext(FR),iH=S.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=ta.initialDimension,width:i,height:o,minWidth:l=ta.minWidth,minHeight:c,maxHeight:f,children:m,debounce:p=ta.debounce,id:y,className:v,onResize:x,style:j={}}=e,w=S.useRef(null),N=S.useRef();N.current=x,S.useImperativeHandle(t,()=>w.current);var[O,P]=S.useState({containerWidth:n.width,containerHeight:n.height}),E=S.useCallback((D,I)=>{P(k=>{var H=Math.round(D),q=Math.round(I);return k.containerWidth===H&&k.containerHeight===q?k:{containerWidth:H,containerHeight:q}})},[]);S.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return mo;var D=q=>{var ae,Q=q[0];if(Q!=null){var{width:Z,height:B}=Q.contentRect;E(Z,B),(ae=N.current)===null||ae===void 0||ae.call(N,Z,B)}};p>0&&(D=Vq(D,p,{trailing:!0,leading:!1}));var I=new ResizeObserver(D),{width:k,height:H}=w.current.getBoundingClientRect();return E(k,H),I.observe(w.current),()=>{I.disconnect()}},[E,p]);var{containerWidth:A,containerHeight:T}=O;Wh(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:M,calculatedHeight:R}=HR(A,T,{width:i,height:o,aspect:r,maxHeight:f});return Wh(M!=null&&M>0||R!=null&&R>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
70
|
+
please check the style of container, or the props width(%s) and height(%s),
|
|
71
|
+
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
72
|
+
height and width.`,M,R,i,o,l,c,r),S.createElement("div",{id:y?"".concat(y):void 0,className:Xe("recharts-responsive-container",v),style:vA(vA({},j),{},{width:i,height:o,minWidth:l,minHeight:c,maxHeight:f}),ref:w},S.createElement("div",{style:Jq({width:i,height:o})},S.createElement(KR,{width:M,height:R},m)))}),bj=S.forwardRef((e,t)=>{var r=xj();if(oa(r.width)&&oa(r.height))return e.children;var{width:n,height:i}=eH({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=HR(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return pe(o)&&pe(l)?S.createElement(KR,{width:o,height:l},e.children):S.createElement(iH,Fx({},e,{width:n,height:i,ref:t}))});function jj(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var sp=()=>{var e,t=vr(),r=ge(Uq),n=ge(ip),i=(e=ge(ap))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},sH={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},GR=()=>{var e;return(e=ge(Yt))!==null&&e!==void 0?e:sH},wj=()=>ge(Za),Sj=()=>ge(Wa),oH=()=>ge(e=>e.layout.margin),Ze=e=>e.layout.layoutType,po=()=>ge(Ze),YR=()=>{var e=po();if(e==="horizontal"||e==="vertical")return e},VR=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},lH=()=>{var e=po();return e!==void 0},hd=e=>{var t=ut(),r=vr(),{width:n,height:i}=e,o=xj(),l=n,c=i;return o&&(l=o.width>0?o.width:n,c=o.height>0?o.height:i),S.useEffect(()=>{!r&&oa(l)&&oa(c)&&t(dq({width:l,height:c}))},[t,r,l,c]),null},QR=Symbol.for("immer-nothing"),gA=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function Dn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var qc=Object.getPrototypeOf;function Kl(e){return!!e&&!!e[an]}function io(e){var t;return e?XR(e)||Array.isArray(e)||!!e[gA]||!!((t=e.constructor)!=null&&t[gA])||md(e)||lp(e):!1}var uH=Object.prototype.constructor.toString(),xA=new WeakMap;function XR(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=xA.get(r);return n===void 0&&(n=Function.toString.call(r),xA.set(r,n)),n===uH}function Jh(e,t,r=!0){op(e)===0?(r?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function op(e){const t=e[an];return t?t.type_:Array.isArray(e)?1:md(e)?2:lp(e)?3:0}function Kx(e,t){return op(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function ZR(e,t,r){const n=op(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function cH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function md(e){return e instanceof Map}function lp(e){return e instanceof Set}function Ts(e){return e.copy_||e.base_}function Gx(e,t){if(md(e))return new Map(e);if(lp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=XR(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[an];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const l=i[o],c=n[l];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[l]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[l]})}return Object.create(qc(e),n)}else{const n=qc(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Nj(e,t=!1){return up(e)||Kl(e)||!io(e)||(op(e)>1&&Object.defineProperties(e,{set:ih,add:ih,clear:ih,delete:ih}),Object.freeze(e),t&&Object.values(e).forEach(r=>Nj(r,!0))),e}function dH(){Dn(2)}var ih={value:dH};function up(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var fH={};function so(e){const t=fH[e];return t||Dn(0,e),t}var Hc;function WR(){return Hc}function hH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function bA(e,t){t&&(so("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yx(e){Vx(e),e.drafts_.forEach(mH),e.drafts_=null}function Vx(e){e===Hc&&(Hc=e.parent_)}function jA(e){return Hc=hH(Hc,e)}function mH(e){const t=e[an];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function wA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[an].modified_&&(Yx(t),Dn(4)),io(e)&&(e=em(t,e),t.parent_||tm(t,e)),t.patches_&&so("Patches").generateReplacementPatches_(r[an].base_,e,t.patches_,t.inversePatches_)):e=em(t,r,[]),Yx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==QR?e:void 0}function em(e,t,r){if(up(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[an];if(!i)return Jh(t,(o,l)=>SA(e,i,t,o,l,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return tm(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let l=o,c=!1;i.type_===3&&(l=new Set(o),o.clear(),c=!0),Jh(l,(f,m)=>SA(e,i,o,f,m,r,c),n),tm(e,o,!1),r&&e.patches_&&so("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function SA(e,t,r,n,i,o,l){if(i==null||typeof i!="object"&&!l)return;const c=up(i);if(!(c&&!l)){if(Kl(i)){const f=o&&t&&t.type_!==3&&!Kx(t.assigned_,n)?o.concat(n):void 0,m=em(e,i,f);if(ZR(r,n,m),Kl(m))e.canAutoFreeze_=!1;else return}else l&&r.add(i);if(io(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;em(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(md(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&tm(e,i)}}}function tm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Nj(t,r)}function pH(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:WR(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=Oj;r&&(i=[n],o=Fc);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=l,c}var Oj={get(e,t){if(t===an)return e;const r=Ts(e);if(!Kx(r,t))return yH(e,r,t);const n=r[t];return e.finalized_||!io(n)?n:n===b0(e.base_,t)?(j0(e),e.copy_[t]=Xx(n,e)):n},has(e,t){return t in Ts(e)},ownKeys(e){return Reflect.ownKeys(Ts(e))},set(e,t,r){const n=JR(Ts(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=b0(Ts(e),t),o=i==null?void 0:i[an];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(cH(r,i)&&(r!==void 0||Kx(e.base_,t)))return!0;j0(e),Qx(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return b0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,j0(e),Qx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ts(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Dn(11)},getPrototypeOf(e){return qc(e.base_)},setPrototypeOf(){Dn(12)}},Fc={};Jh(Oj,(e,t)=>{Fc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Fc.deleteProperty=function(e,t){return Fc.set.call(this,e,t,void 0)};Fc.set=function(e,t,r){return Oj.set.call(this,e[0],t,r,e[0])};function b0(e,t){const r=e[an];return(r?Ts(r):e)[t]}function yH(e,t,r){var i;const n=JR(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function JR(e,t){if(!(t in e))return;let r=qc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=qc(r)}}function Qx(e){e.modified_||(e.modified_=!0,e.parent_&&Qx(e.parent_))}function j0(e){e.copy_||(e.copy_=Gx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var vH=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const l=this;return function(f=o,...m){return l.produce(f,p=>r.call(this,p,...m))}}typeof r!="function"&&Dn(6),n!==void 0&&typeof n!="function"&&Dn(7);let i;if(io(t)){const o=jA(this),l=Xx(t,void 0);let c=!0;try{i=r(l),c=!1}finally{c?Yx(o):Vx(o)}return bA(o,n),wA(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===QR&&(i=void 0),this.autoFreeze_&&Nj(i,!0),n){const o=[],l=[];so("Patches").generateReplacementPatches_(t,i,o,l),n(o,l)}return i}else Dn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,f=>t(f,...c));let n,i;return[this.produce(t,r,(l,c)=>{n=l,i=c}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){io(e)||Dn(8),Kl(e)&&(e=gH(e));const t=jA(this),r=Xx(e,void 0);return r[an].isManual_=!0,Vx(t),r}finishDraft(e,t){const r=e&&e[an];(!r||!r.isManual_)&&Dn(9);const{scope_:n}=r;return bA(n,t),wA(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=so("Patches").applyPatches_;return Kl(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Xx(e,t){const r=md(e)?so("MapSet").proxyMap_(e,t):lp(e)?so("MapSet").proxySet_(e,t):pH(e,t);return(t?t.scope_:WR()).drafts_.push(r),r}function gH(e){return Kl(e)||Dn(10,e),e4(e)}function e4(e){if(!io(e)||up(e))return e;const t=e[an];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Gx(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Gx(e,!0);return Jh(r,(i,o)=>{ZR(r,i,e4(o))},n),t&&(t.finalized_=!1),r}var xH=new vH;xH.produce;var bH={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},t4=yr({name:"legend",initialState:bH,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:ot()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sn(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:ot()},removeLegendPayload:{reducer(e,t){var r=Sn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ot()}}}),{setLegendSize:NA,setLegendSettings:jH,addLegendPayload:wH,replaceLegendPayload:SH,removeLegendPayload:NH}=t4.actions,OH=t4.reducer,w0={exports:{}},S0={};/**
|
|
73
|
+
* @license React
|
|
74
|
+
* use-sync-external-store-with-selector.production.js
|
|
75
|
+
*
|
|
76
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the MIT license found in the
|
|
79
|
+
* LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/var OA;function _H(){if(OA)return S0;OA=1;var e=eu();function t(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,l=e.useMemo,c=e.useDebugValue;return S0.useSyncExternalStoreWithSelector=function(f,m,p,y,v){var x=i(null);if(x.current===null){var j={hasValue:!1,value:null};x.current=j}else j=x.current;x=l(function(){function N(T){if(!O){if(O=!0,P=T,T=y(T),v!==void 0&&j.hasValue){var M=j.value;if(v(M,T))return E=M}return E=T}if(M=E,r(P,T))return M;var R=y(T);return v!==void 0&&v(M,R)?(P=T,M):(P=T,E=R)}var O=!1,P,E,A=p===void 0?null:p;return[function(){return N(m())},A===null?void 0:function(){return N(A())}]},[m,p,y,v]);var w=n(f,x[0],x[1]);return o(function(){j.hasValue=!0,j.value=w},[w]),c(w),w},S0}var _A;function EH(){return _A||(_A=1,w0.exports=_H()),w0.exports}EH();function AH(e){e()}function PH(){let e=null,t=null;return{clear(){e=null,t=null},notify(){AH(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var EA={notify(){},get:()=>[]};function TH(e,t){let r,n=EA,i=0,o=!1;function l(w){p();const N=n.subscribe(w);let O=!1;return()=>{O||(O=!0,N(),y())}}function c(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function m(){return o}function p(){i++,r||(r=e.subscribe(f),n=PH())}function y(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=EA)}function v(){o||(o=!0,p())}function x(){o&&(o=!1,y())}const j={addNestedSub:l,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:m,trySubscribe:v,tryUnsubscribe:x,getListeners:()=>n};return j}var CH=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",MH=CH(),RH=()=>typeof navigator<"u"&&navigator.product==="ReactNative",DH=RH(),kH=()=>MH||DH?S.useLayoutEffect:S.useEffect,IH=kH();function AA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function LH(e,t){if(AA(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!AA(e[r[i]],t[r[i]]))return!1;return!0}var N0=Symbol.for("react-redux-context"),O0=typeof globalThis<"u"?globalThis:{};function $H(){if(!S.createContext)return{};const e=O0[N0]??(O0[N0]=new Map);let t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var zH=$H();function BH(e){const{children:t,context:r,serverState:n,store:i}=e,o=S.useMemo(()=>{const f=TH(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),l=S.useMemo(()=>i.getState(),[i]);IH(()=>{const{subscription:f}=o;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),l!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[o,l]);const c=r||zH;return S.createElement(c.Provider,{value:o},t)}var UH=BH,qH=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function HH(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function ru(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(qH.has(n)){if(e[n]==null&&t[n]==null)continue;if(!LH(e[n],t[n]))return!1}else if(!HH(e[n],t[n]))return!1;return!0}var FH=["contextPayload"];function Zx(){return Zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zx.apply(null,arguments)}function PA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PA(Object(r),!0).forEach(function(n){KH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function KH(e,t,r){return(t=GH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GH(e){var t=YH(e,"string");return typeof t=="symbol"?t:t+""}function YH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function VH(e,t){if(e==null)return{};var r,n,i=QH(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function QH(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function XH(e){return e.value}function ZH(e){var{contextPayload:t}=e,r=VH(e,FH),n=aR(t,e.payloadUniqBy,XH),i=Gl(Gl({},r),{},{payload:n});return S.isValidElement(e.content)?S.cloneElement(e.content,i):typeof e.content=="function"?S.createElement(e.content,i):S.createElement(SU,i)}function WH(e,t,r,n,i,o){var{layout:l,align:c,verticalAlign:f}=t,m,p;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(c==="center"&&l==="vertical"?m={left:((n||0)-o.width)/2}:m=c==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(f==="middle"?p={top:((i||0)-o.height)/2}:p=f==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),Gl(Gl({},m),p)}function JH(e){var t=ut();return S.useEffect(()=>{t(jH(e))},[t,e]),null}function eF(e){var t=ut();return S.useEffect(()=>(t(NA(e)),()=>{t(NA({width:0,height:0}))}),[t,e]),null}function tF(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var rF={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function nF(e){var t=or(e,rF),r=h9(),n=p6(),i=oH(),{width:o,height:l,wrapperStyle:c,portal:f}=t,[m,p]=uR([r]),y=wj(),v=Sj();if(y==null||v==null)return null;var x=y-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),j=tF(t.layout,l,o,x),w=f?c:Gl(Gl({position:"absolute",width:(j==null?void 0:j.width)||o||"auto",height:(j==null?void 0:j.height)||l||"auto"},WH(c,t,i,y,v,m)),c),N=f??n;if(N==null||r==null)return null;var O=S.createElement("div",{className:"recharts-legend-wrapper",style:w,ref:p},S.createElement(JH,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!f&&S.createElement(eF,{width:m.width,height:m.height}),S.createElement(ZH,Zx({},t,j,{margin:i,chartWidth:y,chartHeight:v,contextPayload:r})));return Im.createPortal(O,N)}var r4=S.memo(nF,ru);r4.displayName="Legend";function Wx(){return Wx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wx.apply(null,arguments)}function TA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TA(Object(r),!0).forEach(function(n){aF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function aF(e,t,r){return(t=iF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iF(e){var t=sF(e,"string");return typeof t=="symbol"?t:t+""}function sF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oF(e){return Array.isArray(e)&&sa(e[0])&&sa(e[1])?e.join(" ~ "):e}var ll={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function lF(e,t){return t==null?e:Km(e,t)}var uF=e=>{var{separator:t=ll.separator,contentStyle:r,itemStyle:n,labelStyle:i=ll.labelStyle,payload:o,formatter:l,itemSorter:c,wrapperClassName:f,labelClassName:m,label:p,labelFormatter:y,accessibilityLayer:v=ll.accessibilityLayer}=e,x=()=>{if(o&&o.length){var T={padding:0,margin:0},M=lF(o,c),R=M.map((D,I)=>{if(!D||D.type==="none")return null;var k=D.formatter||l||oF,{value:H,name:q}=D,ae=H,Q=q;if(k){var Z=k(H,q,D,I,o);if(Array.isArray(Z))[ae,Q]=Z;else if(Z!=null)ae=Z;else return null}var B=dc(dc({},ll.itemStyle),{},{color:D.color||ll.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(I),style:B},sa(Q)?S.createElement("span",{className:"recharts-tooltip-item-name"},Q):null,sa(Q)?S.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,S.createElement("span",{className:"recharts-tooltip-item-value"},ae),S.createElement("span",{className:"recharts-tooltip-item-unit"},D.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:T},R)}return null},j=dc(dc({},ll.contentStyle),r),w=dc({margin:0},i),N=!ht(p),O=N?p:"",P=Xe("recharts-default-tooltip",f),E=Xe("recharts-tooltip-label",m);N&&y&&o!==void 0&&o!==null&&(O=y(p,o));var A=v?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",Wx({className:P,style:j},A),S.createElement("p",{className:E,style:w},S.isValidElement(O)?O:"".concat(O)),x())},fc="recharts-tooltip-wrapper",cF={visibility:"hidden"};function dF(e){var{coordinate:t,translateX:r,translateY:n}=e;return Xe(fc,{["".concat(fc,"-right")]:pe(r)&&t&&pe(t.x)&&r>=t.x,["".concat(fc,"-left")]:pe(r)&&t&&pe(t.x)&&r<t.x,["".concat(fc,"-bottom")]:pe(n)&&t&&pe(t.y)&&n>=t.y,["".concat(fc,"-top")]:pe(n)&&t&&pe(t.y)&&n<t.y})}function CA(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:o,reverseDirection:l,tooltipDimension:c,viewBox:f,viewBoxDimension:m}=e;if(o&&pe(o[n]))return o[n];var p=r[n]-c-(i>0?i:0),y=r[n]+i;if(t[n])return l[n]?p:y;var v=f[n];if(v==null)return 0;if(l[n]){var x=p,j=v;return x<j?Math.max(y,v):Math.max(p,v)}if(m==null)return 0;var w=y+c,N=v+m;return w>N?Math.max(p,v):Math.max(y,v)}function fF(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function hF(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:o,reverseDirection:l,tooltipBox:c,useTranslate3d:f,viewBox:m}=e,p,y,v;return c.height>0&&c.width>0&&r?(y=CA({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:l,tooltipDimension:c.width,viewBox:m,viewBoxDimension:m.width}),v=CA({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:l,tooltipDimension:c.height,viewBox:m,viewBoxDimension:m.height}),p=fF({translateX:y,translateY:v,useTranslate3d:f})):p=cF,{cssProperties:p,cssClasses:dF({translateX:y,translateY:v,coordinate:r})}}var mF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),pd={isSsr:mF()};function n4(){var[e,t]=S.useState(()=>pd.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return S.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}}},[]),e}function MA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ul(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MA(Object(r),!0).forEach(function(n){pF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pF(e,t,r){return(t=yF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yF(e){var t=vF(e,"string");return typeof t=="symbol"?t:t+""}function vF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function gF(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function xF(e){var t,r,n,i,o,l,c=n4(),[f,m]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var j=w=>{if(w.key==="Escape"){var N,O,P,E;m({dismissed:!0,dismissedAtCoordinate:{x:(N=(O=e.coordinate)===null||O===void 0?void 0:O.x)!==null&&N!==void 0?N:0,y:(P=(E=e.coordinate)===null||E===void 0?void 0:E.y)!==null&&P!==void 0?P:0}})}};return document.addEventListener("keydown",j),()=>{document.removeEventListener("keydown",j)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),f.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==f.dismissedAtCoordinate.x||((o=(l=e.coordinate)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)!==f.dismissedAtCoordinate.y)&&m(ul(ul({},f),{},{dismissed:!1}));var{cssClasses:p,cssProperties:y}=hF({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),v=e.hasPortalFromProps?{}:ul(ul({transition:gF({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},y),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),x=ul(ul({},v),{},{visibility:!f.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return S.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:p,style:x,ref:e.innerRef},e.children)}var bF=S.memo(xF),a4=()=>{var e;return(e=ge(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function Jx(){return Jx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jx.apply(null,arguments)}function RA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RA(Object(r),!0).forEach(function(n){jF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jF(e,t,r){return(t=wF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wF(e){var t=SF(e,"string");return typeof t=="symbol"?t:t+""}function SF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kA={curveBasisClosed:D6,curveBasisOpen:k6,curveBasis:R6,curveBumpX:x6,curveBumpY:b6,curveLinearClosed:I6,curveLinear:qm,curveMonotoneX:L6,curveMonotoneY:$6,curveNatural:z6,curveStep:B6,curveStepAfter:q6,curveStepBefore:U6},rm=e=>Be(e.x)&&Be(e.y),IA=e=>e.base!=null&&rm(e.base)&&rm(e),hc=e=>e.x,mc=e=>e.y,NF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(ud(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=kA["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return kA[r]||qm},LA={connectNulls:!1,type:"linear"},OF=e=>{var{type:t=LA.type,points:r=[],baseLine:n,layout:i,connectNulls:o=LA.connectNulls}=e,l=NF(t,i),c=o?r.filter(rm):r;if(Array.isArray(n)){var f,m=r.map((j,w)=>DA(DA({},j),{},{base:n[w]}));i==="vertical"?f=Wf().y(mc).x1(hc).x0(j=>j.base.x):f=Wf().x(hc).y1(mc).y0(j=>j.base.y);var p=f.defined(IA).curve(l),y=o?m.filter(IA):m;return p(y)}var v;i==="vertical"&&pe(n)?v=Wf().y(mc).x1(hc).x0(n):pe(n)?v=Wf().x(hc).y1(mc).y0(n):v=MM().x(hc).y(mc);var x=v.defined(rm).curve(l);return x(c)},i4=e=>{var{className:t,points:r,path:n,pathRef:i}=e,o=po();if((!r||!r.length)&&!n)return null;var l={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||o,connectNulls:e.connectNulls},c=r&&r.length?OF(l):n;return S.createElement("path",Jx({},In(e),uj(e),{className:Xe("recharts-curve",t),d:c===null?void 0:c,ref:i}))},_F=["x","y","top","left","width","height","className"];function eb(){return eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eb.apply(null,arguments)}function $A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function EF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$A(Object(r),!0).forEach(function(n){AF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$A(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AF(e,t,r){return(t=PF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PF(e){var t=TF(e,"string");return typeof t=="symbol"?t:t+""}function TF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function CF(e,t){if(e==null)return{};var r,n,i=MF(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function MF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var RF=(e,t,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),DF=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:o=0,height:l=0,className:c}=e,f=CF(e,_F),m=EF({x:t,y:r,top:n,left:i,width:o,height:l},f);return!pe(t)||!pe(r)||!pe(o)||!pe(l)||!pe(n)||!pe(i)?null:S.createElement("path",eb({},Nr(m),{className:Xe("recharts-cross",c),d:RF(t,r,o,l,n,i)}))};function kF(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function zA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function BA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zA(Object(r),!0).forEach(function(n){IF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IF(e,t,r){return(t=LF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LF(e){var t=$F(e,"string");return typeof t=="symbol"?t:t+""}function $F(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var zF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),s4=(e,t,r)=>e.map(n=>"".concat(zF(n)," ").concat(t,"ms ").concat(r)).join(","),BF=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Kc=(e,t)=>Object.keys(t).reduce((r,n)=>BA(BA({},r),{},{[n]:e(n,t[n])}),{});function UA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UA(Object(r),!0).forEach(function(n){UF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UF(e,t,r){return(t=qF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qF(e){var t=HF(e,"string");return typeof t=="symbol"?t:t+""}function HF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nm=(e,t,r)=>e+(t-e)*r,tb=e=>{var{from:t,to:r}=e;return t!==r},o4=(e,t,r)=>{var n=Kc((i,o)=>{if(tb(o)){var[l,c]=e(o.from,o.to,o.velocity);return Lt(Lt({},o),{},{from:l,velocity:c})}return o},t);return r<1?Kc((i,o)=>tb(o)&&n[i]!=null?Lt(Lt({},o),{},{velocity:nm(o.velocity,n[i].velocity,r),from:nm(o.from,n[i].from,r)}):o,t):o4(e,n,r-1)};function FF(e,t,r,n,i,o){var l,c=n.reduce((v,x)=>Lt(Lt({},v),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),f=()=>Kc((v,x)=>x.from,c),m=()=>!Object.values(c).filter(tb).length,p=null,y=v=>{l||(l=v);var x=v-l,j=x/r.dt;c=o4(r,c,j),i(Lt(Lt(Lt({},e),t),f())),l=v,m()||(p=o.setTimeout(y))};return()=>(p=o.setTimeout(y),()=>{var v;(v=p)===null||v===void 0||v()})}function KF(e,t,r,n,i,o,l){var c=null,f=i.reduce((y,v)=>{var x=e[v],j=t[v];return x==null||j==null?y:Lt(Lt({},y),{},{[v]:[x,j]})},{}),m,p=y=>{m||(m=y);var v=(y-m)/n,x=Kc((w,N)=>nm(...N,r(v)),f);if(o(Lt(Lt(Lt({},e),t),x)),v<1)c=l.setTimeout(p);else{var j=Kc((w,N)=>nm(...N,r(1)),f);o(Lt(Lt(Lt({},e),t),j))}};return()=>(c=l.setTimeout(p),()=>{var y;(y=c)===null||y===void 0||y()})}const GF=(e,t,r,n,i,o)=>{var l=BF(e,t);return r==null?()=>(i(Lt(Lt({},e),t)),()=>{}):r.isStepper===!0?FF(e,t,r,l,i,o):KF(e,t,r,n,l,i,o)};var am=1e-4,l4=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],u4=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),qA=(e,t)=>r=>{var n=l4(e,t);return u4(n,r)},YF=(e,t)=>r=>{var n=l4(e,t),i=[...n.map((o,l)=>o*l).slice(1),0];return u4(i,r)},VF=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var n=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(n==null||n.length!==4)return null;var i=n.map(o=>parseFloat(o));return[i[0],i[1],i[2],i[3]]},QF=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var i=VF(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},XF=(e,t,r,n)=>{var i=qA(e,r),o=qA(t,n),l=YF(e,r),c=m=>m>1?1:m<0?0:m,f=m=>{for(var p=m>1?1:m,y=p,v=0;v<8;++v){var x=i(y)-p,j=l(y);if(Math.abs(x-p)<am||j<am)return o(y);y=c(y-x/j)}return o(y)};return f.isStepper=!1,f},HA=function(){return XF(...QF(...arguments))},ZF=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,o=(l,c,f)=>{var m=-(l-c)*r,p=f*n,y=f+(m-p)*i/1e3,v=f*i/1e3+l;return Math.abs(v-c)<am&&Math.abs(y)<am?[c,0]:[v,y]};return o.isStepper=!0,o.dt=i,o},WF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return HA(e);case"spring":return ZF();default:if(e.split("(")[0]==="cubic-bezier")return HA(e)}return typeof e=="function"?e:null};function JF(e){var t,r=()=>null,n=!1,i=null,o=l=>{if(!n){if(Array.isArray(l)){if(!l.length)return;var c=l,[f,...m]=c;if(typeof f=="number"){i=e.setTimeout(o.bind(null,m),f);return}o(f),i=e.setTimeout(o.bind(null,m));return}typeof l=="string"&&(t=l,r(t)),typeof l=="object"&&(t=l,r(t)),typeof l=="function"&&l()}};return{stop:()=>{n=!0},start:l=>{n=!1,i&&(i(),i=null),o(l)},subscribe:l=>(r=l,()=>{r=()=>null}),getTimeoutController:()=>e}}class e7{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,o=l=>{l-n>=r?t(l):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{i!=null&&cancelAnimationFrame(i)}}}function t7(){return JF(new e7)}var r7=S.createContext(t7);function n7(e,t){var r=S.useContext(r7);return S.useMemo(()=>t??r(e),[e,t,r])}var a7={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},FA={t:0},_0={t:1};function cp(e){var t=or(e,a7),{isActive:r,canBegin:n,duration:i,easing:o,begin:l,onAnimationEnd:c,onAnimationStart:f,children:m}=t,p=n4(),y=r==="auto"?!pd.isSsr&&!p:r,v=n7(t.animationId,t.animationManager),[x,j]=S.useState(y?FA:_0),w=S.useRef(null);return S.useEffect(()=>{y||j(_0)},[y]),S.useEffect(()=>{if(!y||!n)return mo;var N=GF(FA,_0,WF(o),i,j,v.getTimeoutController()),O=()=>{w.current=N()};return v.start([f,l,O,i,c]),()=>{v.stop(),w.current&&w.current(),c()}},[y,n,i,o,l,f,c,v]),m(x.t)}function dp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=S.useRef($c(t)),n=S.useRef(e);return n.current!==e&&(r.current=$c(t),n.current=e),r.current}var i7=["radius"],s7=["radius"],KA,GA,YA,VA,QA,XA,ZA,WA,JA,eP;function tP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tP(Object(r),!0).forEach(function(n){o7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o7(e,t,r){return(t=l7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l7(e){var t=u7(e,"string");return typeof t=="symbol"?t:t+""}function u7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function im(){return im=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},im.apply(null,arguments)}function nP(e,t){if(e==null)return{};var r,n,i=c7(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function c7(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Yn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var aP=(e,t,r,n,i)=>{var o=Yi(r),l=Yi(n),c=Math.min(Math.abs(o)/2,Math.abs(l)/2),f=l>=0?1:-1,m=o>=0?1:-1,p=l>=0&&o>=0||l<0&&o<0?1:0,y;if(c>0&&Array.isArray(i)){for(var v=[0,0,0,0],x=0,j=4;x<j;x++){var w,N=(w=i[x])!==null&&w!==void 0?w:0;v[x]=N>c?c:N}y=bt(KA||(KA=Yn(["M",",",""])),e,t+f*v[0]),v[0]>0&&(y+=bt(GA||(GA=Yn(["A ",",",",0,0,",",",",",""])),v[0],v[0],p,e+m*v[0],t)),y+=bt(YA||(YA=Yn(["L ",",",""])),e+r-m*v[1],t),v[1]>0&&(y+=bt(VA||(VA=Yn(["A ",",",",0,0,",`,
|
|
81
|
+
`,",",""])),v[1],v[1],p,e+r,t+f*v[1])),y+=bt(QA||(QA=Yn(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(y+=bt(XA||(XA=Yn(["A ",",",",0,0,",`,
|
|
82
|
+
`,",",""])),v[2],v[2],p,e+r-m*v[2],t+n)),y+=bt(ZA||(ZA=Yn(["L ",",",""])),e+m*v[3],t+n),v[3]>0&&(y+=bt(WA||(WA=Yn(["A ",",",",0,0,",`,
|
|
83
|
+
`,",",""])),v[3],v[3],p,e,t+n-f*v[3])),y+="Z"}else if(c>0&&i===+i&&i>0){var O=Math.min(c,i);y=bt(JA||(JA=Yn(["M ",",",`
|
|
84
|
+
A `,",",",0,0,",",",",",`
|
|
85
|
+
L `,",",`
|
|
86
|
+
A `,",",",0,0,",",",",",`
|
|
87
|
+
L `,",",`
|
|
88
|
+
A `,",",",0,0,",",",",",`
|
|
89
|
+
L `,",",`
|
|
90
|
+
A `,",",",0,0,",",",","," Z"])),e,t+f*O,O,O,p,e+m*O,t,e+r-m*O,t,O,O,p,e+r,t+f*O,e+r,t+n-f*O,O,O,p,e+r-m*O,t+n,e+m*O,t+n,O,O,p,e,t+n-f*O)}else y=bt(eP||(eP=Yn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return y},iP={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},c4=e=>{var t=or(e,iP),r=S.useRef(null),[n,i]=S.useState(-1);S.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&i(K)}catch{}},[]);var{x:o,y:l,width:c,height:f,radius:m,className:p}=t,{animationEasing:y,animationDuration:v,animationBegin:x,isAnimationActive:j,isUpdateAnimationActive:w}=t,N=S.useRef(c),O=S.useRef(f),P=S.useRef(o),E=S.useRef(l),A=S.useMemo(()=>({x:o,y:l,width:c,height:f,radius:m}),[o,l,c,f,m]),T=dp(A,"rectangle-");if(o!==+o||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var M=Xe("recharts-rectangle",p);if(!w){var R=Nr(t),{radius:D}=R,I=nP(R,i7);return S.createElement("path",im({},I,{x:Yi(o),y:Yi(l),width:Yi(c),height:Yi(f),radius:typeof m=="number"?m:void 0,className:M,d:aP(o,l,c,f,m)}))}var k=N.current,H=O.current,q=P.current,ae=E.current,Q="0px ".concat(n===-1?1:n,"px"),Z="".concat(n,"px ").concat(n,"px"),B=s4(["strokeDasharray"],v,typeof y=="string"?y:iP.animationEasing);return S.createElement(cp,{animationId:T,key:T,canBegin:n>0,duration:v,easing:y,isActive:w,begin:x},K=>{var ee=jt(k,c,K),se=jt(H,f,K),ue=jt(q,o,K),L=jt(ae,l,K);r.current&&(N.current=ee,O.current=se,P.current=ue,E.current=L);var W;j?K>0?W={transition:B,strokeDasharray:Z}:W={strokeDasharray:Q}:W={strokeDasharray:Z};var le=Nr(t),{radius:oe}=le,ye=nP(le,s7);return S.createElement("path",im({},ye,{radius:typeof m=="number"?m:void 0,className:M,d:aP(ue,L,ee,se,m),ref:r,style:rP(rP({},W),t.style)}))})};function sP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sP(Object(r),!0).forEach(function(n){d7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function d7(e,t,r){return(t=f7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f7(e){var t=h7(e,"string");return typeof t=="symbol"?t:t+""}function h7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sm=Math.PI/180,m7=e=>e*180/Math.PI,ir=(e,t,r,n)=>({x:e+Math.cos(-sm*n)*r,y:t+Math.sin(-sm*n)*r}),p7=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},y7=(e,t)=>{var{x:r,y:n}=e,{x:i,y:o}=t;return Math.sqrt((r-i)**2+(n-o)**2)},v7=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:o}=t,l=y7({x:r,y:n},{x:i,y:o});if(l<=0)return{radius:l,angle:0};var c=(r-i)/l,f=Math.acos(c);return n>o&&(f=2*Math.PI-f),{radius:l,angle:m7(f),angleInRadian:f}},g7=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),o=Math.min(n,i);return{startAngle:t-o*360,endAngle:r-o*360}},x7=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),o=Math.floor(n/360),l=Math.min(i,o);return e+l*360},b7=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:o}=v7({x:r,y:n},t),{innerRadius:l,outerRadius:c}=t;if(i<l||i>c||i===0)return null;var{startAngle:f,endAngle:m}=g7(t),p=o,y;if(f<=m){for(;p>m;)p-=360;for(;p<f;)p+=360;y=p>=f&&p<=m}else{for(;p>f;)p-=360;for(;p<m;)p+=360;y=p>=m&&p<=f}return y?oP(oP({},t),{},{radius:i,angle:x7(p,t)}):null};function d4(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:o}=e,l=ir(t,r,n,i),c=ir(t,r,n,o);return{points:[l,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var lP,uP,cP,dP,fP,hP,mP;function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rb.apply(null,arguments)}function ks(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var j7=(e,t)=>{var r=zr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},sh=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:o,isExternal:l,cornerRadius:c,cornerIsExternal:f}=e,m=c*(l?1:-1)+n,p=Math.asin(c/m)/sm,y=f?i:i+o*p,v=ir(t,r,m,y),x=ir(t,r,n,y),j=f?i-o*p:i,w=ir(t,r,m*Math.cos(p*sm),j);return{center:v,circleTangency:x,lineTangency:w,theta:p}},f4=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:o,endAngle:l}=e,c=j7(o,l),f=o+c,m=ir(t,r,i,o),p=ir(t,r,i,f),y=bt(lP||(lP=ks(["M ",",",`
|
|
91
|
+
A `,",",`,0,
|
|
92
|
+
`,",",`,
|
|
93
|
+
`,",",`
|
|
94
|
+
`])),m.x,m.y,i,i,+(Math.abs(c)>180),+(o>f),p.x,p.y);if(n>0){var v=ir(t,r,n,o),x=ir(t,r,n,f);y+=bt(uP||(uP=ks(["L ",",",`
|
|
95
|
+
A `,",",`,0,
|
|
96
|
+
`,",",`,
|
|
97
|
+
`,","," Z"])),x.x,x.y,n,n,+(Math.abs(c)>180),+(o<=f),v.x,v.y)}else y+=bt(cP||(cP=ks(["L ",","," Z"])),t,r);return y},w7=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:m}=e,p=zr(m-f),{circleTangency:y,lineTangency:v,theta:x}=sh({cx:t,cy:r,radius:i,angle:f,sign:p,cornerRadius:o,cornerIsExternal:c}),{circleTangency:j,lineTangency:w,theta:N}=sh({cx:t,cy:r,radius:i,angle:m,sign:-p,cornerRadius:o,cornerIsExternal:c}),O=c?Math.abs(f-m):Math.abs(f-m)-x-N;if(O<0)return l?bt(dP||(dP=ks(["M ",",",`
|
|
98
|
+
a`,",",",0,0,1,",`,0
|
|
99
|
+
a`,",",",0,0,1,",`,0
|
|
100
|
+
`])),v.x,v.y,o,o,o*2,o,o,-o*2):f4({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:m});var P=bt(fP||(fP=ks(["M ",",",`
|
|
101
|
+
A`,",",",0,0,",",",",",`
|
|
102
|
+
A`,",",",0,",",",",",",",`
|
|
103
|
+
A`,",",",0,0,",",",",",`
|
|
104
|
+
`])),v.x,v.y,o,o,+(p<0),y.x,y.y,i,i,+(O>180),+(p<0),j.x,j.y,o,o,+(p<0),w.x,w.y);if(n>0){var{circleTangency:E,lineTangency:A,theta:T}=sh({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:M,lineTangency:R,theta:D}=sh({cx:t,cy:r,radius:n,angle:m,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),I=c?Math.abs(f-m):Math.abs(f-m)-T-D;if(I<0&&o===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=bt(hP||(hP=ks(["L",",",`
|
|
105
|
+
A`,",",",0,0,",",",",",`
|
|
106
|
+
A`,",",",0,",",",",",",",`
|
|
107
|
+
A`,",",",0,0,",",",",","Z"])),R.x,R.y,o,o,+(p<0),M.x,M.y,n,n,+(I>180),+(p>0),E.x,E.y,o,o,+(p<0),A.x,A.y)}else P+=bt(mP||(mP=ks(["L",",","Z"])),t,r);return P},S7={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},h4=e=>{var t=or(e,S7),{cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:c,cornerIsExternal:f,startAngle:m,endAngle:p,className:y}=t;if(o<i||m===p)return null;var v=Xe("recharts-sector",y),x=o-i,j=Ln(l,x,0,!0),w;return j>0&&Math.abs(m-p)<360?w=w7({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(j,x/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:m,endAngle:p}):w=f4({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:m,endAngle:p}),S.createElement("path",rb({},Nr(t),{className:v,d:w}))};function N7(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(YM(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:o,outerRadius:l,angle:c}=t,f=ir(n,i,o,c),m=ir(n,i,l,c);return[{x:f.x,y:f.y},{x:m.x,y:m.y}]}return d4(t)}}var E0={},A0={},P0={},pP;function O7(){return pP||(pP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=sR();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(P0)),P0}var yP;function _7(){return yP||(yP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=O7();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(A0)),A0}var vP;function E7(){return vP||(vP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oR(),r=_7();function n(i,o,l){l&&typeof l!="number"&&t.isIterateeCall(i,o,l)&&(o=l=void 0),i=r.toFinite(i),o===void 0?(o=i,i=0):o=r.toFinite(o),l=l===void 0?i<o?1:-1:r.toFinite(l);const c=Math.max(Math.ceil((o-i)/(l||1)),0),f=new Array(c);for(let m=0;m<c;m++)f[m]=i,i+=l;return f}e.range=n})(E0)),E0}var T0,gP;function A7(){return gP||(gP=1,T0=E7().range),T0}var P7=A7();const m4=ns(P7);var Un=e=>e.chartData,_j=V([Un],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),yd=(e,t,r,n)=>n?_j(e):Un(e),T7=(e,t,r)=>r?_j(e):Un(e),C7=V([yd],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});V([_j],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var M7=V([Un],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function na(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Be(t)&&Be(r))return!0}return!1}function xP(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function p4(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,o;if(Be(r))i=r;else if(typeof r=="function")return;if(Be(n))o=n;else if(typeof n=="function")return;var l=[i,o];if(na(l))return l}}function R7(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(na(n))return xP(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,l,c;if(i==="auto")t!=null&&(l=Math.min(...t));else if(pe(i))l=i;else if(typeof i=="function")try{t!=null&&(l=i(t==null?void 0:t[0]))}catch{}else if(typeof i=="string"&&lA.test(i)){var f=lA.exec(i);if(f==null||f[1]==null||t==null)l=void 0;else{var m=+f[1];l=t[0]-m}}else l=t==null?void 0:t[0];if(o==="auto")t!=null&&(c=Math.max(...t));else if(pe(o))c=o;else if(typeof o=="function")try{t!=null&&(c=o(t==null?void 0:t[1]))}catch{}else if(typeof o=="string"&&uA.test(o)){var p=uA.exec(o);if(p==null||p[1]==null||t==null)c=void 0;else{var y=+p[1];c=t[1]+y}}else c=t==null?void 0:t[1];var v=[l,c];if(na(v))return t==null?v:xP(v,t,r)}}}var nu=1e9,D7={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Aj,ft=!0,On="[DecimalError] ",Js=On+"Invalid argument: ",Ej=On+"Exponent out of range: ",au=Math.floor,Cs=Math.pow,k7=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Wr,Ft=1e7,lt=7,y4=9007199254740991,om=au(y4/lt),he={};he.absoluteValue=he.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};he.comparedTo=he.cmp=function(e){var t,r,n,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(n=o.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return n===i?0:n>i^o.s<0?1:-1};he.decimalPlaces=he.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*lt;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};he.dividedBy=he.div=function(e){return Ha(this,new this.constructor(e))};he.dividedToIntegerBy=he.idiv=function(e){var t=this,r=t.constructor;return nt(Ha(t,new r(e),0,1),r.precision)};he.equals=he.eq=function(e){return!this.cmp(e)};he.exponent=function(){return Rt(this)};he.greaterThan=he.gt=function(e){return this.cmp(e)>0};he.greaterThanOrEqualTo=he.gte=function(e){return this.cmp(e)>=0};he.isInteger=he.isint=function(){return this.e>this.d.length-2};he.isNegative=he.isneg=function(){return this.s<0};he.isPositive=he.ispos=function(){return this.s>0};he.isZero=function(){return this.s===0};he.lessThan=he.lt=function(e){return this.cmp(e)<0};he.lessThanOrEqualTo=he.lte=function(e){return this.cmp(e)<1};he.logarithm=he.log=function(e){var t,r=this,n=r.constructor,i=n.precision,o=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Wr))throw Error(On+"NaN");if(r.s<1)throw Error(On+(r.s?"NaN":"-Infinity"));return r.eq(Wr)?new n(0):(ft=!1,t=Ha(Gc(r,o),Gc(e,o),o),ft=!0,nt(t,i))};he.minus=he.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?x4(t,e):v4(t,(e.s=-e.s,e))};he.modulo=he.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(On+"NaN");return r.s?(ft=!1,t=Ha(r,e,0,1).times(e),ft=!0,r.minus(t)):nt(new n(r),i)};he.naturalExponential=he.exp=function(){return g4(this)};he.naturalLogarithm=he.ln=function(){return Gc(this)};he.negated=he.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};he.plus=he.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?v4(t,e):x4(t,(e.s=-e.s,e))};he.precision=he.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Js+e);if(t=Rt(i)+1,n=i.d.length-1,r=n*lt+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};he.squareRoot=he.sqrt=function(){var e,t,r,n,i,o,l,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(On+"NaN")}for(e=Rt(c),ft=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=ra(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=au((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),n=new f(t)):n=new f(i.toString()),r=f.precision,i=l=r+3;;)if(o=n,n=o.plus(Ha(c,o,l+2)).times(.5),ra(o.d).slice(0,l)===(t=ra(n.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(nt(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if(t!="9999")break;l+=4}return ft=!0,nt(n,r)};he.times=he.mul=function(e){var t,r,n,i,o,l,c,f,m,p=this,y=p.constructor,v=p.d,x=(e=new y(e)).d;if(!p.s||!e.s)return new y(0);for(e.s*=p.s,r=p.e+e.e,f=v.length,m=x.length,f<m&&(o=v,v=x,x=o,l=f,f=m,m=l),o=[],l=f+m,n=l;n--;)o.push(0);for(n=m;--n>=0;){for(t=0,i=f+n;i>n;)c=o[i]+x[n]*v[i-n-1]+t,o[i--]=c%Ft|0,t=c/Ft|0;o[i]=(o[i]+t)%Ft|0}for(;!o[--l];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ft?nt(e,y.precision):e};he.toDecimalPlaces=he.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(la(e,0,nu),t===void 0?t=n.rounding:la(t,0,8),nt(r,e+Rt(r)+1,t))};he.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=oo(n,!0):(la(e,0,nu),t===void 0?t=i.rounding:la(t,0,8),n=nt(new i(n),e+1,t),r=oo(n,!0,e+1)),r};he.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?oo(i):(la(e,0,nu),t===void 0?t=o.rounding:la(t,0,8),n=nt(new o(i),e+Rt(i)+1,t),r=oo(n.abs(),!1,e+Rt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};he.toInteger=he.toint=function(){var e=this,t=e.constructor;return nt(new t(e),Rt(e)+1,t.rounding)};he.toNumber=function(){return+this};he.toPower=he.pow=function(e){var t,r,n,i,o,l,c=this,f=c.constructor,m=12,p=+(e=new f(e));if(!e.s)return new f(Wr);if(c=new f(c),!c.s){if(e.s<1)throw Error(On+"Infinity");return c}if(c.eq(Wr))return c;if(n=f.precision,e.eq(Wr))return nt(c,n);if(t=e.e,r=e.d.length-1,l=t>=r,o=c.s,l){if((r=p<0?-p:p)<=y4){for(i=new f(Wr),t=Math.ceil(n/lt+4),ft=!1;r%2&&(i=i.times(c),jP(i.d,t)),r=au(r/2),r!==0;)c=c.times(c),jP(c.d,t);return ft=!0,e.s<0?new f(Wr).div(i):nt(i,n)}}else if(o<0)throw Error(On+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ft=!1,i=e.times(Gc(c,n+m)),ft=!0,i=g4(i),i.s=o,i};he.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Rt(i),n=oo(i,r<=o.toExpNeg||r>=o.toExpPos)):(la(e,1,nu),t===void 0?t=o.rounding:la(t,0,8),i=nt(new o(i),e,t),r=Rt(i),n=oo(i,e<=r||r<=o.toExpNeg,e)),n};he.toSignificantDigits=he.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(la(e,1,nu),t===void 0?t=n.rounding:la(t,0,8)),nt(new n(r),e,t)};he.toString=he.valueOf=he.val=he.toJSON=he[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Rt(e),r=e.constructor;return oo(e,t<=r.toExpNeg||t>=r.toExpPos)};function v4(e,t){var r,n,i,o,l,c,f,m,p=e.constructor,y=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),ft?nt(t,y):t;if(f=e.d,m=t.d,l=e.e,i=t.e,f=f.slice(),o=l-i,o){for(o<0?(n=f,o=-o,c=m.length):(n=m,i=l,c=f.length),l=Math.ceil(y/lt),c=l>c?l+1:c+1,o>c&&(o=c,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(c=f.length,o=m.length,c-o<0&&(o=c,n=m,m=f,f=n),r=0;o;)r=(f[--o]=f[o]+m[o]+r)/Ft|0,f[o]%=Ft;for(r&&(f.unshift(r),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,ft?nt(t,y):t}function la(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Js+e)}function ra(e){var t,r,n,i=e.length-1,o="",l=e[0];if(i>0){for(o+=l,t=1;t<i;t++)n=e[t]+"",r=lt-n.length,r&&(o+=Mi(r)),o+=n;l=e[t],n=l+"",r=lt-n.length,r&&(o+=Mi(r))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ha=(function(){function e(n,i){var o,l=0,c=n.length;for(n=n.slice();c--;)o=n[c]*i+l,n[c]=o%Ft|0,l=o/Ft|0;return l&&n.unshift(l),n}function t(n,i,o,l){var c,f;if(o!=l)f=o>l?1:-1;else for(c=f=0;c<o;c++)if(n[c]!=i[c]){f=n[c]>i[c]?1:-1;break}return f}function r(n,i,o){for(var l=0;o--;)n[o]-=l,l=n[o]<i[o]?1:0,n[o]=l*Ft+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,l){var c,f,m,p,y,v,x,j,w,N,O,P,E,A,T,M,R,D,I=n.constructor,k=n.s==i.s?1:-1,H=n.d,q=i.d;if(!n.s)return new I(n);if(!i.s)throw Error(On+"Division by zero");for(f=n.e-i.e,R=q.length,T=H.length,x=new I(k),j=x.d=[],m=0;q[m]==(H[m]||0);)++m;if(q[m]>(H[m]||0)&&--f,o==null?P=o=I.precision:l?P=o+(Rt(n)-Rt(i))+1:P=o,P<0)return new I(0);if(P=P/lt+2|0,m=0,R==1)for(p=0,q=q[0],P++;(m<T||p)&&P--;m++)E=p*Ft+(H[m]||0),j[m]=E/q|0,p=E%q|0;else{for(p=Ft/(q[0]+1)|0,p>1&&(q=e(q,p),H=e(H,p),R=q.length,T=H.length),A=R,w=H.slice(0,R),N=w.length;N<R;)w[N++]=0;D=q.slice(),D.unshift(0),M=q[0],q[1]>=Ft/2&&++M;do p=0,c=t(q,w,R,N),c<0?(O=w[0],R!=N&&(O=O*Ft+(w[1]||0)),p=O/M|0,p>1?(p>=Ft&&(p=Ft-1),y=e(q,p),v=y.length,N=w.length,c=t(y,w,v,N),c==1&&(p--,r(y,R<v?D:q,v))):(p==0&&(c=p=1),y=q.slice()),v=y.length,v<N&&y.unshift(0),r(w,y,N),c==-1&&(N=w.length,c=t(q,w,R,N),c<1&&(p++,r(w,R<N?D:q,N))),N=w.length):c===0&&(p++,w=[0]),j[m++]=p,c&&w[0]?w[N++]=H[A]||0:(w=[H[A]],N=1);while((A++<T||w[0]!==void 0)&&P--)}return j[0]||j.shift(),x.e=f,nt(x,l?o+Rt(x)+1:o)}})();function g4(e,t){var r,n,i,o,l,c,f=0,m=0,p=e.constructor,y=p.precision;if(Rt(e)>16)throw Error(Ej+Rt(e));if(!e.s)return new p(Wr);for(ft=!1,c=y,l=new p(.03125);e.abs().gte(.1);)e=e.times(l),m+=5;for(n=Math.log(Cs(2,m))/Math.LN10*2+5|0,c+=n,r=i=o=new p(Wr),p.precision=c;;){if(i=nt(i.times(e),c),r=r.times(++f),l=o.plus(Ha(i,r,c)),ra(l.d).slice(0,c)===ra(o.d).slice(0,c)){for(;m--;)o=nt(o.times(o),c);return p.precision=y,t==null?(ft=!0,nt(o,y)):o}o=l}}function Rt(e){for(var t=e.e*lt,r=e.d[0];r>=10;r/=10)t++;return t}function C0(e,t,r){if(t>e.LN10.sd())throw ft=!0,r&&(e.precision=r),Error(On+"LN10 precision limit exceeded");return nt(new e(e.LN10),t)}function Mi(e){for(var t="";e--;)t+="0";return t}function Gc(e,t){var r,n,i,o,l,c,f,m,p,y=1,v=10,x=e,j=x.d,w=x.constructor,N=w.precision;if(x.s<1)throw Error(On+(x.s?"NaN":"-Infinity"));if(x.eq(Wr))return new w(0);if(t==null?(ft=!1,m=N):m=t,x.eq(10))return t==null&&(ft=!0),C0(w,m);if(m+=v,w.precision=m,r=ra(j),n=r.charAt(0),o=Rt(x),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(e),r=ra(x.d),n=r.charAt(0),y++;o=Rt(x),n>1?(x=new w("0."+r),o++):x=new w(n+"."+r.slice(1))}else return f=C0(w,m+2,N).times(o+""),x=Gc(new w(n+"."+r.slice(1)),m-v).plus(f),w.precision=N,t==null?(ft=!0,nt(x,N)):x;for(c=l=x=Ha(x.minus(Wr),x.plus(Wr),m),p=nt(x.times(x),m),i=3;;){if(l=nt(l.times(p),m),f=c.plus(Ha(l,new w(i),m)),ra(f.d).slice(0,m)===ra(c.d).slice(0,m))return c=c.times(2),o!==0&&(c=c.plus(C0(w,m+2,N).times(o+""))),c=Ha(c,new w(y),m),w.precision=N,t==null?(ft=!0,nt(c,N)):c;c=f,i+=2}}function bP(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=au(r/lt),e.d=[],n=(r+1)%lt,r<0&&(n+=lt),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=lt;n<i;)e.d.push(+t.slice(n,n+=lt));t=t.slice(n),n=lt-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ft&&(e.e>om||e.e<-om))throw Error(Ej+r)}else e.s=0,e.e=0,e.d=[0];return e}function nt(e,t,r){var n,i,o,l,c,f,m,p,y=e.d;for(l=1,o=y[0];o>=10;o/=10)l++;if(n=t-l,n<0)n+=lt,i=t,m=y[p=0];else{if(p=Math.ceil((n+1)/lt),o=y.length,p>=o)return e;for(m=o=y[p],l=1;o>=10;o/=10)l++;n%=lt,i=n-lt+l}if(r!==void 0&&(o=Cs(10,l-i-1),c=m/o%10|0,f=t<0||y[p+1]!==void 0||m%o,f=r<4?(c||f)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||f||r==6&&(n>0?i>0?m/Cs(10,l-i):0:y[p-1])%10&1||r==(e.s<0?8:7))),t<1||!y[0])return f?(o=Rt(e),y.length=1,t=t-o-1,y[0]=Cs(10,(lt-t%lt)%lt),e.e=au(-t/lt)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(n==0?(y.length=p,o=1,p--):(y.length=p+1,o=Cs(10,lt-n),y[p]=i>0?(m/Cs(10,l-i)%Cs(10,i)|0)*o:0),f)for(;;)if(p==0){(y[0]+=o)==Ft&&(y[0]=1,++e.e);break}else{if(y[p]+=o,y[p]!=Ft)break;y[p--]=0,o=1}for(n=y.length;y[--n]===0;)y.pop();if(ft&&(e.e>om||e.e<-om))throw Error(Ej+Rt(e));return e}function x4(e,t){var r,n,i,o,l,c,f,m,p,y,v=e.constructor,x=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ft?nt(t,x):t;if(f=e.d,y=t.d,n=t.e,m=e.e,f=f.slice(),l=m-n,l){for(p=l<0,p?(r=f,l=-l,c=y.length):(r=y,n=m,c=f.length),i=Math.max(Math.ceil(x/lt),c)+2,l>i&&(l=i,r.length=1),r.reverse(),i=l;i--;)r.push(0);r.reverse()}else{for(i=f.length,c=y.length,p=i<c,p&&(c=i),i=0;i<c;i++)if(f[i]!=y[i]){p=f[i]<y[i];break}l=0}for(p&&(r=f,f=y,y=r,t.s=-t.s),c=f.length,i=y.length-c;i>0;--i)f[c++]=0;for(i=y.length;i>l;){if(f[--i]<y[i]){for(o=i;o&&f[--o]===0;)f[o]=Ft-1;--f[o],f[i]+=Ft}f[i]-=y[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ft?nt(t,x):t):new v(0)}function oo(e,t,r){var n,i=Rt(e),o=ra(e.d),l=o.length;return t?(r&&(n=r-l)>0?o=o.charAt(0)+"."+o.slice(1)+Mi(n):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Mi(-i-1)+o,r&&(n=r-l)>0&&(o+=Mi(n))):i>=l?(o+=Mi(i+1-l),r&&(n=r-i-1)>0&&(o=o+"."+Mi(n))):((n=i+1)<l&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-l)>0&&(i+1===l&&(o+="."),o+=Mi(n))),e.s<0?"-"+o:o}function jP(e,t){if(e.length>t)return e.length=t,!0}function b4(e){var t,r,n;function i(o){var l=this;if(!(l instanceof i))return new i(o);if(l.constructor=i,o instanceof i){l.s=o.s,l.e=o.e,l.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Js+o);if(o>0)l.s=1;else if(o<0)o=-o,l.s=-1;else{l.s=0,l.e=0,l.d=[0];return}if(o===~~o&&o<1e7){l.e=0,l.d=[o];return}return bP(l,o.toString())}else if(typeof o!="string")throw Error(Js+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,k7.test(o))bP(l,o);else throw Error(Js+o)}if(i.prototype=he,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=b4,i.config=i.set=I7,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function I7(e){if(!e||typeof e!="object")throw Error(On+"Object expected");var t,r,n,i=["precision",1,nu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(au(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Js+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Js+r+": "+n);return this}var Aj=b4(D7);Wr=new Aj(1);const ze=Aj;function j4(e){var t;return e===0?t=1:t=Math.floor(new ze(e).abs().log(10).toNumber())+1,t}function w4(e,t,r){for(var n=new ze(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}var S4=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Pj=(e,t,r)=>{if(e.lte(0))return new ze(0);var n=j4(e.toNumber()),i=new ze(10).pow(n),o=e.div(i),l=n!==1?.05:.1,c=new ze(Math.ceil(o.div(l).toNumber())).add(r).mul(l),f=c.mul(i);return t?new ze(f.toNumber()):new ze(Math.ceil(f.toNumber()))},N4=(e,t,r)=>{var n;if(e.lte(0))return new ze(0);var i=[1,2,2.5,5],o=e.toNumber(),l=Math.floor(new ze(o).abs().log(10).toNumber()),c=new ze(10).pow(l),f=e.div(c).toNumber(),m=i.findIndex(x=>x>=f-1e-10);if(m===-1&&(c=c.mul(10),m=0),m+=r,m>=i.length){var p=Math.floor(m/i.length);m%=i.length,c=c.mul(new ze(10).pow(p))}var y=(n=i[m])!==null&&n!==void 0?n:1,v=new ze(y).mul(c);return t?v:new ze(Math.ceil(v.toNumber()))},L7=(e,t,r)=>{var n=new ze(1),i=new ze(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new ze(10).pow(j4(e)-1),i=new ze(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new ze(Math.floor(e)))}else e===0?i=new ze(Math.floor((t-1)/2)):r||(i=new ze(Math.floor(e)));for(var l=Math.floor((t-1)/2),c=[],f=0;f<t;f++)c.push(i.add(new ze(f-l).mul(n)).toNumber());return c},O4=function(t,r,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Pj;if(!Number.isFinite((r-t)/(n-1)))return{step:new ze(0),tickMin:new ze(0),tickMax:new ze(0)};var c=l(new ze(r).sub(t).div(n-1),i,o),f;t<=0&&r>=0?f=new ze(0):(f=new ze(t).add(r).div(2),f=f.sub(new ze(f).mod(c)));var m=Math.ceil(f.sub(t).div(c).toNumber()),p=Math.ceil(new ze(r).sub(f).div(c).toNumber()),y=m+p+1;return y>n?O4(t,r,n,i,o+1,l):(y<n&&(p=r>0?p+(n-y):p,m=r>0?m:m+(n-y)),{step:c,tickMin:f.sub(new ze(m).mul(c)),tickMax:f.add(new ze(p).mul(c))})},wP=function(t){var[r,n]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(i,2),[f,m]=S4([r,n]);if(f===-1/0||m===1/0){var p=m===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),m];return r>n?p.reverse():p}if(f===m)return L7(f,i,o);var y=l==="snap125"?N4:Pj,{step:v,tickMin:x,tickMax:j}=O4(f,m,c,o,0,y),w=w4(x,j.add(new ze(.1).mul(v)),v);return r>n?w.reverse():w},SP=function(t,r){var[n,i]=t,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,f]=S4([n,i]);if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var m=l==="snap125"?N4:Pj,p=Math.max(r,2),y=m(new ze(f).sub(c).div(p-1),o,0),v=[...w4(new ze(c),new ze(f),y),f];return o===!1&&(v=v.map(x=>Math.round(x))),n>i?v.reverse():v},_4=e=>e.rootProps.maxBarSize,$7=e=>e.rootProps.barGap,E4=e=>e.rootProps.barCategoryGap,z7=e=>e.rootProps.barSize,fp=e=>e.rootProps.stackOffset,A4=e=>e.rootProps.reverseStackOrder,Tj=e=>e.options.chartName,Cj=e=>e.rootProps.syncId,P4=e=>e.rootProps.syncMethod,Mj=e=>e.options.eventEmitter,Kt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Os={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Vn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},hp=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function mp(e,t,r){if(r!=="auto")return r;if(e!=null)return Xa(e,t)?"category":"number"}function NP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NP(Object(r),!0).forEach(function(n){B7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B7(e,t,r){return(t=U7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U7(e){var t=q7(e,"string");return typeof t=="symbol"?t:t+""}function q7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OP={allowDataOverflow:Os.allowDataOverflow,allowDecimals:Os.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Os.angleAxisId,includeHidden:!1,name:void 0,reversed:Os.reversed,scale:Os.scale,tick:Os.tick,tickCount:void 0,ticks:void 0,type:Os.type,unit:void 0,niceTicks:"auto"},_P={allowDataOverflow:Vn.allowDataOverflow,allowDecimals:Vn.allowDecimals,allowDuplicatedCategory:Vn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Vn.radiusAxisId,includeHidden:Vn.includeHidden,name:void 0,reversed:Vn.reversed,scale:Vn.scale,tick:Vn.tick,tickCount:Vn.tickCount,ticks:void 0,type:Vn.type,unit:void 0,niceTicks:"auto"},H7=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Rj=V([H7,VR],(e,t)=>{var r;if(e!=null)return e;var n=(r=mp(t,"angleAxis",OP.type))!==null&&r!==void 0?r:"category";return lm(lm({},OP),{},{type:n})}),F7=(e,t)=>e.polarAxis.radiusAxis[t],Dj=V([F7,VR],(e,t)=>{var r;if(e!=null)return e;var n=(r=mp(t,"radiusAxis",_P.type))!==null&&r!==void 0?r:"category";return lm(lm({},_P),{},{type:n})}),pp=e=>e.polarOptions,kj=V([Za,Wa,Yt],p7),T4=V([pp,kj],(e,t)=>{if(e!=null)return Ln(e.innerRadius,t,0)}),C4=V([pp,kj],(e,t)=>{if(e!=null)return Ln(e.outerRadius,t,t*.8)}),K7=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},M4=V([pp],K7);V([Rj,M4],hp);var R4=V([kj,T4,C4],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});V([Dj,R4],hp);var D4=V([Ze,pp,T4,C4,Za,Wa],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:l,cy:c,startAngle:f,endAngle:m}=t;return{cx:Ln(l,i,i/2),cy:Ln(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:m,clockWise:!1}}}),Vt=(e,t)=>t,yp=(e,t,r)=>r;function Ij(e){return e==null?void 0:e.id}function k4(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=r,l=new Map;return e.forEach(c=>{var f,m=(f=c.data)!==null&&f!==void 0?f:n;if(!(m==null||m.length===0)){var p=Ij(c);m.forEach((y,v)=>{var x=o==null||i?v:String(Ot(y,o,null)),j=Ot(y,c.dataKey,0),w;l.has(x)?w=l.get(x):w={},Object.assign(w,{[p]:j}),l.set(x,w)})}}),Array.from(l.values())}function vp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var gp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function xp(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function G7(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Qt=e=>{var t=Ze(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},iu=e=>e.tooltip.settings.axisId;function Lj(e){if(e!=null){var t=e.ticks,r=e.bandwidth,n=e.range(),i=[Math.min(...n),Math.max(...n)];return{domain:()=>e.domain(),range:(function(o){function l(){return o.apply(this,arguments)}return l.toString=function(){return o.toString()},l})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(o){var l=i[0],c=i[1];return l<=c?o>=l&&o<=c:o>=c&&o<=l},bandwidth:r?()=>r.call(e):void 0,ticks:t?o=>t.call(e,o):void 0,map:(o,l)=>{var c=e(o);if(c!=null){if(e.bandwidth&&l!==null&&l!==void 0&&l.position){var f=e.bandwidth();switch(l.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var Y7=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!na(t)){for(var r,n,i=0;i<t.length;i++){var o=t[i];Be(o)&&((r===void 0||o<r)&&(r=o),(n===void 0||o>n)&&(n=o))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Zi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function V7(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $j(e){let t,r,n;e.length!==2?(t=Zi,r=(c,f)=>Zi(e(c),f),n=(c,f)=>e(c)-f):(t=e===Zi||e===V7?e:Q7,r=e,n=e);function i(c,f,m=0,p=c.length){if(m<p){if(t(f,f)!==0)return p;do{const y=m+p>>>1;r(c[y],f)<0?m=y+1:p=y}while(m<p)}return m}function o(c,f,m=0,p=c.length){if(m<p){if(t(f,f)!==0)return p;do{const y=m+p>>>1;r(c[y],f)<=0?m=y+1:p=y}while(m<p)}return m}function l(c,f,m=0,p=c.length){const y=i(c,f,m,p-1);return y>m&&n(c[y-1],f)>-n(c[y],f)?y-1:y}return{left:i,center:l,right:o}}function Q7(){return 0}function I4(e){return e===null?NaN:+e}function*X7(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const Z7=$j(Zi),vd=Z7.right;$j(I4).center;class EP extends Map{constructor(t,r=eK){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(AP(this,t))}has(t){return super.has(AP(this,t))}set(t,r){return super.set(W7(this,t),r)}delete(t){return super.delete(J7(this,t))}}function AP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function W7({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function J7({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function eK(e){return e!==null&&typeof e=="object"?e.valueOf():e}function tK(e=Zi){if(e===Zi)return L4;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function L4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const rK=Math.sqrt(50),nK=Math.sqrt(10),aK=Math.sqrt(2);function um(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),o=n/Math.pow(10,i),l=o>=rK?10:o>=nK?5:o>=aK?2:1;let c,f,m;return i<0?(m=Math.pow(10,-i)/l,c=Math.round(e*m),f=Math.round(t*m),c/m<e&&++c,f/m>t&&--f,m=-m):(m=Math.pow(10,i)*l,c=Math.round(e/m),f=Math.round(t/m),c*m<e&&++c,f*m>t&&--f),f<c&&.5<=r&&r<2?um(e,t,r*2):[c,f,m]}function nb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,o,l]=n?um(t,e,r):um(e,t,r);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(n)if(l<0)for(let m=0;m<c;++m)f[m]=(o-m)/-l;else for(let m=0;m<c;++m)f[m]=(o-m)*l;else if(l<0)for(let m=0;m<c;++m)f[m]=(i+m)/-l;else for(let m=0;m<c;++m)f[m]=(i+m)*l;return f}function ab(e,t,r){return t=+t,e=+e,r=+r,um(e,t,r)[2]}function ib(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?ab(t,e,r):ab(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function PP(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function TP(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function $4(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?L4:tK(i);n>r;){if(n-r>600){const f=n-r+1,m=t-r+1,p=Math.log(f),y=.5*Math.exp(2*p/3),v=.5*Math.sqrt(p*y*(f-y)/f)*(m-f/2<0?-1:1),x=Math.max(r,Math.floor(t-m*y/f+v)),j=Math.min(n,Math.floor(t+(f-m)*y/f+v));$4(e,t,x,j,i)}const o=e[t];let l=r,c=n;for(pc(e,r,t),i(e[n],o)>0&&pc(e,r,n);l<c;){for(pc(e,l,c),++l,--c;i(e[l],o)<0;)++l;for(;i(e[c],o)>0;)--c}i(e[r],o)===0?pc(e,r,c):(++c,pc(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function pc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function iK(e,t,r){if(e=Float64Array.from(X7(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return TP(e);if(t>=1)return PP(e);var n,i=(n-1)*t,o=Math.floor(i),l=PP($4(e,o).subarray(0,o+1)),c=TP(e.subarray(o+1));return l+(c-l)*(i-o)}}function sK(e,t,r=I4){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),l=+r(e[o],o,e),c=+r(e[o+1],o+1,e);return l+(c-l)*(i-o)}}function oK(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}function _n(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ja(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 sb=Symbol("implicit");function zj(){var e=new EP,t=[],r=[],n=sb;function i(o){let l=e.get(o);if(l===void 0){if(n!==sb)return n;e.set(o,l=t.push(o)-1)}return r[l%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new EP;for(const l of o)e.has(l)||e.set(l,t.push(l)-1);return i},i.range=function(o){return arguments.length?(r=Array.from(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return zj(t,r).unknown(n)},_n.apply(i,arguments),i}function Bj(){var e=zj().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,l,c=!1,f=0,m=0,p=.5;delete e.unknown;function y(){var v=t().length,x=i<n,j=x?i:n,w=x?n:i;o=(w-j)/Math.max(1,v-f+m*2),c&&(o=Math.floor(o)),j+=(w-j-o*(v-f))*p,l=o*(1-f),c&&(j=Math.round(j),l=Math.round(l));var N=oK(v).map(function(O){return j+o*O});return r(x?N.reverse():N)}return e.domain=function(v){return arguments.length?(t(v),y()):t()},e.range=function(v){return arguments.length?([n,i]=v,n=+n,i=+i,y()):[n,i]},e.rangeRound=function(v){return[n,i]=v,n=+n,i=+i,c=!0,y()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(v){return arguments.length?(c=!!v,y()):c},e.padding=function(v){return arguments.length?(f=Math.min(1,m=+v),y()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),y()):f},e.paddingOuter=function(v){return arguments.length?(m=+v,y()):m},e.align=function(v){return arguments.length?(p=Math.max(0,Math.min(1,v)),y()):p},e.copy=function(){return Bj(t(),[n,i]).round(c).paddingInner(f).paddingOuter(m).align(p)},_n.apply(y(),arguments)}function z4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return z4(t())},e}function lK(){return z4(Bj.apply(null,arguments).paddingInner(1))}function Uj(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function B4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function gd(){}var Yc=.7,cm=1/Yc,Nl="\\s*([+-]?\\d+)\\s*",Vc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uK=/^#([0-9a-f]{3,8})$/,cK=new RegExp(`^rgb\\(${Nl},${Nl},${Nl}\\)$`),dK=new RegExp(`^rgb\\(${aa},${aa},${aa}\\)$`),fK=new RegExp(`^rgba\\(${Nl},${Nl},${Nl},${Vc}\\)$`),hK=new RegExp(`^rgba\\(${aa},${aa},${aa},${Vc}\\)$`),mK=new RegExp(`^hsl\\(${Vc},${aa},${aa}\\)$`),pK=new RegExp(`^hsla\\(${Vc},${aa},${aa},${Vc}\\)$`),CP={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};Uj(gd,Qc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:MP,formatHex:MP,formatHex8:yK,formatHsl:vK,formatRgb:RP,toString:RP});function MP(){return this.rgb().formatHex()}function yK(){return this.rgb().formatHex8()}function vK(){return U4(this).formatHsl()}function RP(){return this.rgb().formatRgb()}function Qc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=uK.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?DP(t):r===3?new Ur(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?oh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?oh(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=cK.exec(e))?new Ur(t[1],t[2],t[3],1):(t=dK.exec(e))?new Ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fK.exec(e))?oh(t[1],t[2],t[3],t[4]):(t=hK.exec(e))?oh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mK.exec(e))?LP(t[1],t[2]/100,t[3]/100,1):(t=pK.exec(e))?LP(t[1],t[2]/100,t[3]/100,t[4]):CP.hasOwnProperty(e)?DP(CP[e]):e==="transparent"?new Ur(NaN,NaN,NaN,0):null}function DP(e){return new Ur(e>>16&255,e>>8&255,e&255,1)}function oh(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ur(e,t,r,n)}function gK(e){return e instanceof gd||(e=Qc(e)),e?(e=e.rgb(),new Ur(e.r,e.g,e.b,e.opacity)):new Ur}function ob(e,t,r,n){return arguments.length===1?gK(e):new Ur(e,t,r,n??1)}function Ur(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Uj(Ur,ob,B4(gd,{brighter(e){return e=e==null?cm:Math.pow(cm,e),new Ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yc:Math.pow(Yc,e),new Ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ur(eo(this.r),eo(this.g),eo(this.b),dm(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:kP,formatHex:kP,formatHex8:xK,formatRgb:IP,toString:IP}));function kP(){return`#${Is(this.r)}${Is(this.g)}${Is(this.b)}`}function xK(){return`#${Is(this.r)}${Is(this.g)}${Is(this.b)}${Is((isNaN(this.opacity)?1:this.opacity)*255)}`}function IP(){const e=dm(this.opacity);return`${e===1?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${e===1?")":`, ${e})`}`}function dm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Is(e){return e=eo(e),(e<16?"0":"")+e.toString(16)}function LP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kn(e,t,r,n)}function U4(e){if(e instanceof kn)return new kn(e.h,e.s,e.l,e.opacity);if(e instanceof gd||(e=Qc(e)),!e)return new kn;if(e instanceof kn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),l=NaN,c=o-i,f=(o+i)/2;return c?(t===o?l=(r-n)/c+(r<n)*6:r===o?l=(n-t)/c+2:l=(t-r)/c+4,c/=f<.5?o+i:2-o-i,l*=60):c=f>0&&f<1?0:l,new kn(l,c,f,e.opacity)}function bK(e,t,r,n){return arguments.length===1?U4(e):new kn(e,t,r,n??1)}function kn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Uj(kn,bK,B4(gd,{brighter(e){return e=e==null?cm:Math.pow(cm,e),new kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yc:Math.pow(Yc,e),new kn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ur(M0(e>=240?e-240:e+120,i,n),M0(e,i,n),M0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kn($P(this.h),lh(this.s),lh(this.l),dm(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=dm(this.opacity);return`${e===1?"hsl(":"hsla("}${$P(this.h)}, ${lh(this.s)*100}%, ${lh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $P(e){return e=(e||0)%360,e<0?e+360:e}function lh(e){return Math.max(0,Math.min(1,e||0))}function M0(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const qj=e=>()=>e;function jK(e,t){return function(r){return e+r*t}}function wK(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function SK(e){return(e=+e)==1?q4:function(t,r){return r-t?wK(t,r,e):qj(isNaN(t)?r:t)}}function q4(e,t){var r=t-e;return r?jK(e,r):qj(isNaN(e)?t:e)}const zP=(function e(t){var r=SK(t);function n(i,o){var l=r((i=ob(i)).r,(o=ob(o)).r),c=r(i.g,o.g),f=r(i.b,o.b),m=q4(i.opacity,o.opacity);return function(p){return i.r=l(p),i.g=c(p),i.b=f(p),i.opacity=m(p),i+""}}return n.gamma=e,n})(1);function NK(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function OK(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _K(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),l;for(l=0;l<n;++l)i[l]=su(e[l],t[l]);for(;l<r;++l)o[l]=t[l];return function(c){for(l=0;l<n;++l)o[l]=i[l](c);return o}}function EK(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function fm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function AK(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=su(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var lb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,R0=new RegExp(lb.source,"g");function PK(e){return function(){return e}}function TK(e){return function(t){return e(t)+""}}function CK(e,t){var r=lb.lastIndex=R0.lastIndex=0,n,i,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(n=lb.exec(e))&&(i=R0.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),c[l]?c[l]+=o:c[++l]=o),(n=n[0])===(i=i[0])?c[l]?c[l]+=i:c[++l]=i:(c[++l]=null,f.push({i:l,x:fm(n,i)})),r=R0.lastIndex;return r<t.length&&(o=t.slice(r),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?TK(f[0].x):PK(t):(t=f.length,function(m){for(var p=0,y;p<t;++p)c[(y=f[p]).i]=y.x(m);return c.join("")})}function su(e,t){var r=typeof t,n;return t==null||r==="boolean"?qj(t):(r==="number"?fm:r==="string"?(n=Qc(t))?(t=n,zP):CK:t instanceof Qc?zP:t instanceof Date?EK:OK(t)?NK:Array.isArray(t)?_K:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?AK:fm)(e,t)}function Hj(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function MK(e,t){t===void 0&&(t=e,e=su);for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(l){var c=Math.max(0,Math.min(n-1,Math.floor(l*=n)));return o[c](l-c)}}function RK(e){return function(){return e}}function hm(e){return+e}var BP=[0,1];function wr(e){return e}function ub(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:RK(isNaN(t)?NaN:.5)}function DK(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function kK(e,t,r){var n=e[0],i=e[1],o=t[0],l=t[1];return i<n?(n=ub(i,n),o=r(l,o)):(n=ub(n,i),o=r(o,l)),function(c){return o(n(c))}}function IK(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),l=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++l<n;)i[l]=ub(e[l],e[l+1]),o[l]=r(t[l],t[l+1]);return function(c){var f=vd(e,c,1,n)-1;return o[f](i[f](c))}}function xd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function bp(){var e=BP,t=BP,r=su,n,i,o,l=wr,c,f,m;function p(){var v=Math.min(e.length,t.length);return l!==wr&&(l=DK(e[0],e[v-1])),c=v>2?IK:kK,f=m=null,y}function y(v){return v==null||isNaN(v=+v)?o:(f||(f=c(e.map(n),t,r)))(n(l(v)))}return y.invert=function(v){return l(i((m||(m=c(t,e.map(n),fm)))(v)))},y.domain=function(v){return arguments.length?(e=Array.from(v,hm),p()):e.slice()},y.range=function(v){return arguments.length?(t=Array.from(v),p()):t.slice()},y.rangeRound=function(v){return t=Array.from(v),r=Hj,p()},y.clamp=function(v){return arguments.length?(l=v?!0:wr,p()):l!==wr},y.interpolate=function(v){return arguments.length?(r=v,p()):r},y.unknown=function(v){return arguments.length?(o=v,y):o},function(v,x){return n=v,i=x,p()}}function Fj(){return bp()(wr,wr)}function LK(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function mm(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Yl(e){return e=mm(Math.abs(e)),e?e[1]:NaN}function $K(e,t){return function(r,n){for(var i=r.length,o=[],l=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>n&&(c=Math.max(1,n-f)),o.push(r.substring(i-=c,i+c)),!((f+=c+1)>n));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function zK(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var BK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Xc(e){if(!(t=BK.exec(e)))throw new Error("invalid format: "+e);var t;return new Kj({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]})}Xc.prototype=Kj.prototype;function Kj(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+""}Kj.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 UK(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var pm;function qK(e,t){var r=mm(e,t);if(!r)return pm=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(pm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=n.length;return o===l?n:o>l?n+new Array(o-l+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+mm(e,Math.max(0,t+o-1))[0]}function UP(e,t){var r=mm(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const qP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:LK,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)=>UP(e*100,t),r:UP,s:qK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function HP(e){return e}var FP=Array.prototype.map,KP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function HK(e){var t=e.grouping===void 0||e.thousands===void 0?HP:$K(FP.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?HP:zK(FP.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function m(y,v){y=Xc(y);var x=y.fill,j=y.align,w=y.sign,N=y.symbol,O=y.zero,P=y.width,E=y.comma,A=y.precision,T=y.trim,M=y.type;M==="n"?(E=!0,M="g"):qP[M]||(A===void 0&&(A=12),T=!0,M="g"),(O||x==="0"&&j==="=")&&(O=!0,x="0",j="=");var R=(v&&v.prefix!==void 0?v.prefix:"")+(N==="$"?r:N==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():""),D=(N==="$"?n:/[%p]/.test(M)?l:"")+(v&&v.suffix!==void 0?v.suffix:""),I=qP[M],k=/[defgprs%]/.test(M);A=A===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function H(q){var ae=R,Q=D,Z,B,K;if(M==="c")Q=I(q)+Q,q="";else{q=+q;var ee=q<0||1/q<0;if(q=isNaN(q)?f:I(Math.abs(q),A),T&&(q=UK(q)),ee&&+q==0&&w!=="+"&&(ee=!1),ae=(ee?w==="("?w:c:w==="-"||w==="("?"":w)+ae,Q=(M==="s"&&!isNaN(q)&&pm!==void 0?KP[8+pm/3]:"")+Q+(ee&&w==="("?")":""),k){for(Z=-1,B=q.length;++Z<B;)if(K=q.charCodeAt(Z),48>K||K>57){Q=(K===46?i+q.slice(Z+1):q.slice(Z))+Q,q=q.slice(0,Z);break}}}E&&!O&&(q=t(q,1/0));var se=ae.length+q.length+Q.length,ue=se<P?new Array(P-se+1).join(x):"";switch(E&&O&&(q=t(ue+q,ue.length?P-Q.length:1/0),ue=""),j){case"<":q=ae+q+Q+ue;break;case"=":q=ae+ue+q+Q;break;case"^":q=ue.slice(0,se=ue.length>>1)+ae+q+Q+ue.slice(se);break;default:q=ue+ae+q+Q;break}return o(q)}return H.toString=function(){return y+""},H}function p(y,v){var x=Math.max(-8,Math.min(8,Math.floor(Yl(v)/3)))*3,j=Math.pow(10,-x),w=m((y=Xc(y),y.type="f",y),{suffix:KP[8+x/3]});return function(N){return w(j*N)}}return{format:m,formatPrefix:p}}var uh,Gj,H4;FK({thousands:",",grouping:[3],currency:["$",""]});function FK(e){return uh=HK(e),Gj=uh.format,H4=uh.formatPrefix,uh}function KK(e){return Math.max(0,-Yl(Math.abs(e)))}function GK(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yl(t)/3)))*3-Yl(Math.abs(e)))}function YK(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yl(t)-Yl(e))+1}function F4(e,t,r,n){var i=ib(e,t,r),o;switch(n=Xc(n??",f"),n.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=GK(i,l))&&(n.precision=o),H4(n,l)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=YK(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=KK(i))&&(n.precision=o-(n.type==="%")*2);break}}return Gj(n)}function as(e){var t=e.domain;return e.ticks=function(r){var n=t();return nb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return F4(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,l=n[i],c=n[o],f,m,p=10;for(c<l&&(m=l,l=c,c=m,m=i,i=o,o=m);p-- >0;){if(m=ab(l,c,r),m===f)return n[i]=l,n[o]=c,t(n);if(m>0)l=Math.floor(l/m)*m,c=Math.ceil(c/m)*m;else if(m<0)l=Math.ceil(l*m)/m,c=Math.floor(c*m)/m;else break;f=m}return e},e}function K4(){var e=Fj();return e.copy=function(){return xd(e,K4())},_n.apply(e,arguments),as(e)}function G4(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,hm),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return G4(e).unknown(t)},e=arguments.length?Array.from(e,hm):[0,1],as(r)}function Y4(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],l;return o<i&&(l=r,r=n,n=l,l=i,i=o,o=l),e[r]=t.floor(i),e[n]=t.ceil(o),e}function GP(e){return Math.log(e)}function YP(e){return Math.exp(e)}function VK(e){return-Math.log(-e)}function QK(e){return-Math.exp(-e)}function XK(e){return isFinite(e)?+("1e"+e):e<0?0:e}function ZK(e){return e===10?XK:e===Math.E?Math.exp:t=>Math.pow(e,t)}function WK(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 VP(e){return(t,r)=>-e(-t,r)}function Yj(e){const t=e(GP,YP),r=t.domain;let n=10,i,o;function l(){return i=WK(n),o=ZK(n),r()[0]<0?(i=VP(i),o=VP(o),e(VK,QK)):e(GP,YP),t}return t.base=function(c){return arguments.length?(n=+c,l()):n},t.domain=function(c){return arguments.length?(r(c),l()):r()},t.ticks=c=>{const f=r();let m=f[0],p=f[f.length-1];const y=p<m;y&&([m,p]=[p,m]);let v=i(m),x=i(p),j,w;const N=c==null?10:+c;let O=[];if(!(n%1)&&x-v<N){if(v=Math.floor(v),x=Math.ceil(x),m>0){for(;v<=x;++v)for(j=1;j<n;++j)if(w=v<0?j/o(-v):j*o(v),!(w<m)){if(w>p)break;O.push(w)}}else for(;v<=x;++v)for(j=n-1;j>=1;--j)if(w=v>0?j/o(-v):j*o(v),!(w<m)){if(w>p)break;O.push(w)}O.length*2<N&&(O=nb(m,p,N))}else O=nb(v,x,Math.min(x-v,N)).map(o);return y?O.reverse():O},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Xc(f)).precision==null&&(f.trim=!0),f=Gj(f)),c===1/0)return f;const m=Math.max(1,n*c/t.ticks().length);return p=>{let y=p/o(Math.round(i(p)));return y*n<n-.5&&(y*=n),y<=m?f(p):""}},t.nice=()=>r(Y4(r(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function V4(){const e=Yj(bp()).domain([1,10]);return e.copy=()=>xd(e,V4()).base(e.base()),_n.apply(e,arguments),e}function QP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function XP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Vj(e){var t=1,r=e(QP(t),XP(t));return r.constant=function(n){return arguments.length?e(QP(t=+n),XP(t)):t},as(r)}function Q4(){var e=Vj(bp());return e.copy=function(){return xd(e,Q4()).constant(e.constant())},_n.apply(e,arguments)}function ZP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function JK(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function eG(e){return e<0?-e*e:e*e}function Qj(e){var t=e(wr,wr),r=1;function n(){return r===1?e(wr,wr):r===.5?e(JK,eG):e(ZP(r),ZP(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},as(t)}function Xj(){var e=Qj(bp());return e.copy=function(){return xd(e,Xj()).exponent(e.exponent())},_n.apply(e,arguments),e}function tG(){return Xj.apply(null,arguments).exponent(.5)}function WP(e){return Math.sign(e)*e*e}function rG(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function X4(){var e=Fj(),t=[0,1],r=!1,n;function i(o){var l=rG(e(o));return isNaN(l)?n:r?Math.round(l):l}return i.invert=function(o){return e.invert(WP(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,hm)).map(WP)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(r=!!o,i):r},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return X4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},_n.apply(i,arguments),as(i)}function Z4(){var e=[],t=[],r=[],n;function i(){var l=0,c=Math.max(1,t.length);for(r=new Array(c-1);++l<c;)r[l-1]=sK(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?n:t[vd(r,l)]}return o.invertExtent=function(l){var c=t.indexOf(l);return c<0?[NaN,NaN]:[c>0?r[c-1]:e[0],c<r.length?r[c]:e[e.length-1]]},o.domain=function(l){if(!arguments.length)return e.slice();e=[];for(let c of l)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Zi),i()},o.range=function(l){return arguments.length?(t=Array.from(l),i()):t.slice()},o.unknown=function(l){return arguments.length?(n=l,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return Z4().domain(e).range(t).unknown(n)},_n.apply(o,arguments)}function W4(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[vd(n,f,0,r)]:o}function c(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return l}return l.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},l.range=function(f){return arguments.length?(r=(i=Array.from(f)).length-1,c()):i.slice()},l.invertExtent=function(f){var m=i.indexOf(f);return m<0?[NaN,NaN]:m<1?[e,n[0]]:m>=r?[n[r-1],t]:[n[m-1],n[m]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return n.slice()},l.copy=function(){return W4().domain([e,t]).range(i).unknown(o)},_n.apply(as(l),arguments)}function J4(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[vd(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=Array.from(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var l=t.indexOf(o);return[e[l-1],e[l]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return J4().domain(e).range(t).unknown(r)},_n.apply(i,arguments)}const D0=new Date,k0=new Date;function zt(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const l=i(o),c=i.ceil(o);return o-l<c-o?l:c},i.offset=(o,l)=>(t(o=new Date(+o),l==null?1:Math.floor(l)),o),i.range=(o,l,c)=>{const f=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return f;let m;do f.push(m=new Date(+o)),t(o,c),e(o);while(m<o&&o<l);return f},i.filter=o=>zt(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),r&&(i.count=(o,l)=>(D0.setTime(+o),k0.setTime(+l),e(D0),e(k0),Math.floor(r(D0,k0))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?l=>n(l)%o===0:l=>i.count(0,l)%o===0):i)),i}const ym=zt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ym.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?zt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ym);ym.range;const za=1e3,Nn=za*60,Ba=Nn*60,Ya=Ba*24,Zj=Ya*7,JP=Ya*30,I0=Ya*365,Ls=zt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*za)},(e,t)=>(t-e)/za,e=>e.getUTCSeconds());Ls.range;const Wj=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*za)},(e,t)=>{e.setTime(+e+t*Nn)},(e,t)=>(t-e)/Nn,e=>e.getMinutes());Wj.range;const Jj=zt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Nn)},(e,t)=>(t-e)/Nn,e=>e.getUTCMinutes());Jj.range;const ew=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*za-e.getMinutes()*Nn)},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getHours());ew.range;const tw=zt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getUTCHours());tw.range;const bd=zt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Nn)/Ya,e=>e.getDate()-1);bd.range;const jp=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ya,e=>e.getUTCDate()-1);jp.range;const e3=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ya,e=>Math.floor(e/Ya));e3.range;function yo(e){return zt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Nn)/Zj)}const wp=yo(0),vm=yo(1),nG=yo(2),aG=yo(3),Vl=yo(4),iG=yo(5),sG=yo(6);wp.range;vm.range;nG.range;aG.range;Vl.range;iG.range;sG.range;function vo(e){return zt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Zj)}const Sp=vo(0),gm=vo(1),oG=vo(2),lG=vo(3),Ql=vo(4),uG=vo(5),cG=vo(6);Sp.range;gm.range;oG.range;lG.range;Ql.range;uG.range;cG.range;const rw=zt(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());rw.range;const nw=zt(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());nw.range;const Va=zt(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());Va.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Va.range;const Qa=zt(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());Qa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Qa.range;function t3(e,t,r,n,i,o){const l=[[Ls,1,za],[Ls,5,5*za],[Ls,15,15*za],[Ls,30,30*za],[o,1,Nn],[o,5,5*Nn],[o,15,15*Nn],[o,30,30*Nn],[i,1,Ba],[i,3,3*Ba],[i,6,6*Ba],[i,12,12*Ba],[n,1,Ya],[n,2,2*Ya],[r,1,Zj],[t,1,JP],[t,3,3*JP],[e,1,I0]];function c(m,p,y){const v=p<m;v&&([m,p]=[p,m]);const x=y&&typeof y.range=="function"?y:f(m,p,y),j=x?x.range(m,+p+1):[];return v?j.reverse():j}function f(m,p,y){const v=Math.abs(p-m)/y,x=$j(([,,N])=>N).right(l,v);if(x===l.length)return e.every(ib(m/I0,p/I0,y));if(x===0)return ym.every(Math.max(ib(m,p,y),1));const[j,w]=l[v/l[x-1][2]<l[x][2]/v?x-1:x];return j.every(w)}return[c,f]}const[dG,fG]=t3(Qa,nw,Sp,e3,tw,Jj),[hG,mG]=t3(Va,rw,wp,bd,ew,Wj);function L0(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 $0(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 yc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function pG(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,l=e.shortDays,c=e.months,f=e.shortMonths,m=vc(i),p=gc(i),y=vc(o),v=gc(o),x=vc(l),j=gc(l),w=vc(c),N=gc(c),O=vc(f),P=gc(f),E={a:K,A:ee,b:se,B:ue,c:null,d:iT,e:iT,f:$G,g:VG,G:XG,H:kG,I:IG,j:LG,L:r3,m:zG,M:BG,p:L,q:W,Q:lT,s:uT,S:UG,u:qG,U:HG,V:FG,w:KG,W:GG,x:null,X:null,y:YG,Y:QG,Z:ZG,"%":oT},A={a:le,A:oe,b:ye,B:Se,c:null,d:sT,e:sT,f:tY,g:dY,G:hY,H:WG,I:JG,j:eY,L:a3,m:rY,M:nY,p:Ne,q:Ce,Q:lT,s:uT,S:aY,u:iY,U:sY,V:oY,w:lY,W:uY,x:null,X:null,y:cY,Y:fY,Z:mY,"%":oT},T={a:k,A:H,b:q,B:ae,c:Q,d:nT,e:nT,f:CG,g:rT,G:tT,H:aT,I:aT,j:EG,L:TG,m:_G,M:AG,p:I,q:OG,Q:RG,s:DG,S:PG,u:bG,U:jG,V:wG,w:xG,W:SG,x:Z,X:B,y:rT,Y:tT,Z:NG,"%":MG};E.x=M(r,E),E.X=M(n,E),E.c=M(t,E),A.x=M(r,A),A.X=M(n,A),A.c=M(t,A);function M(de,te){return function(we){var ce=[],_t=-1,De=0,Et=de.length,At,lr,fa;for(we instanceof Date||(we=new Date(+we));++_t<Et;)de.charCodeAt(_t)===37&&(ce.push(de.slice(De,_t)),(lr=eT[At=de.charAt(++_t)])!=null?At=de.charAt(++_t):lr=At==="e"?" ":"0",(fa=te[At])&&(At=fa(we,lr)),ce.push(At),De=_t+1);return ce.push(de.slice(De,_t)),ce.join("")}}function R(de,te){return function(we){var ce=yc(1900,void 0,1),_t=D(ce,de,we+="",0),De,Et;if(_t!=we.length)return null;if("Q"in ce)return new Date(ce.Q);if("s"in ce)return new Date(ce.s*1e3+("L"in ce?ce.L:0));if(te&&!("Z"in ce)&&(ce.Z=0),"p"in ce&&(ce.H=ce.H%12+ce.p*12),ce.m===void 0&&(ce.m="q"in ce?ce.q:0),"V"in ce){if(ce.V<1||ce.V>53)return null;"w"in ce||(ce.w=1),"Z"in ce?(De=$0(yc(ce.y,0,1)),Et=De.getUTCDay(),De=Et>4||Et===0?gm.ceil(De):gm(De),De=jp.offset(De,(ce.V-1)*7),ce.y=De.getUTCFullYear(),ce.m=De.getUTCMonth(),ce.d=De.getUTCDate()+(ce.w+6)%7):(De=L0(yc(ce.y,0,1)),Et=De.getDay(),De=Et>4||Et===0?vm.ceil(De):vm(De),De=bd.offset(De,(ce.V-1)*7),ce.y=De.getFullYear(),ce.m=De.getMonth(),ce.d=De.getDate()+(ce.w+6)%7)}else("W"in ce||"U"in ce)&&("w"in ce||(ce.w="u"in ce?ce.u%7:"W"in ce?1:0),Et="Z"in ce?$0(yc(ce.y,0,1)).getUTCDay():L0(yc(ce.y,0,1)).getDay(),ce.m=0,ce.d="W"in ce?(ce.w+6)%7+ce.W*7-(Et+5)%7:ce.w+ce.U*7-(Et+6)%7);return"Z"in ce?(ce.H+=ce.Z/100|0,ce.M+=ce.Z%100,$0(ce)):L0(ce)}}function D(de,te,we,ce){for(var _t=0,De=te.length,Et=we.length,At,lr;_t<De;){if(ce>=Et)return-1;if(At=te.charCodeAt(_t++),At===37){if(At=te.charAt(_t++),lr=T[At in eT?te.charAt(_t++):At],!lr||(ce=lr(de,we,ce))<0)return-1}else if(At!=we.charCodeAt(ce++))return-1}return ce}function I(de,te,we){var ce=m.exec(te.slice(we));return ce?(de.p=p.get(ce[0].toLowerCase()),we+ce[0].length):-1}function k(de,te,we){var ce=x.exec(te.slice(we));return ce?(de.w=j.get(ce[0].toLowerCase()),we+ce[0].length):-1}function H(de,te,we){var ce=y.exec(te.slice(we));return ce?(de.w=v.get(ce[0].toLowerCase()),we+ce[0].length):-1}function q(de,te,we){var ce=O.exec(te.slice(we));return ce?(de.m=P.get(ce[0].toLowerCase()),we+ce[0].length):-1}function ae(de,te,we){var ce=w.exec(te.slice(we));return ce?(de.m=N.get(ce[0].toLowerCase()),we+ce[0].length):-1}function Q(de,te,we){return D(de,t,te,we)}function Z(de,te,we){return D(de,r,te,we)}function B(de,te,we){return D(de,n,te,we)}function K(de){return l[de.getDay()]}function ee(de){return o[de.getDay()]}function se(de){return f[de.getMonth()]}function ue(de){return c[de.getMonth()]}function L(de){return i[+(de.getHours()>=12)]}function W(de){return 1+~~(de.getMonth()/3)}function le(de){return l[de.getUTCDay()]}function oe(de){return o[de.getUTCDay()]}function ye(de){return f[de.getUTCMonth()]}function Se(de){return c[de.getUTCMonth()]}function Ne(de){return i[+(de.getUTCHours()>=12)]}function Ce(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var te=M(de+="",E);return te.toString=function(){return de},te},parse:function(de){var te=R(de+="",!1);return te.toString=function(){return de},te},utcFormat:function(de){var te=M(de+="",A);return te.toString=function(){return de},te},utcParse:function(de){var te=R(de+="",!0);return te.toString=function(){return de},te}}}var eT={"-":"",_:" ",0:"0"},Xt=/^\s*\d+/,yG=/^%/,vG=/[\\^$*+?|[\]().{}]/g;function Fe(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function gG(e){return e.replace(vG,"\\$&")}function vc(e){return new RegExp("^(?:"+e.map(gG).join("|")+")","i")}function gc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function xG(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function bG(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function jG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function wG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function SG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function tT(e,t,r){var n=Xt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function rT(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function NG(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function OG(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function _G(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function nT(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function EG(e,t,r){var n=Xt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function aT(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function AG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function PG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function TG(e,t,r){var n=Xt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function CG(e,t,r){var n=Xt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function MG(e,t,r){var n=yG.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function RG(e,t,r){var n=Xt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function DG(e,t,r){var n=Xt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function iT(e,t){return Fe(e.getDate(),t,2)}function kG(e,t){return Fe(e.getHours(),t,2)}function IG(e,t){return Fe(e.getHours()%12||12,t,2)}function LG(e,t){return Fe(1+bd.count(Va(e),e),t,3)}function r3(e,t){return Fe(e.getMilliseconds(),t,3)}function $G(e,t){return r3(e,t)+"000"}function zG(e,t){return Fe(e.getMonth()+1,t,2)}function BG(e,t){return Fe(e.getMinutes(),t,2)}function UG(e,t){return Fe(e.getSeconds(),t,2)}function qG(e){var t=e.getDay();return t===0?7:t}function HG(e,t){return Fe(wp.count(Va(e)-1,e),t,2)}function n3(e){var t=e.getDay();return t>=4||t===0?Vl(e):Vl.ceil(e)}function FG(e,t){return e=n3(e),Fe(Vl.count(Va(e),e)+(Va(e).getDay()===4),t,2)}function KG(e){return e.getDay()}function GG(e,t){return Fe(vm.count(Va(e)-1,e),t,2)}function YG(e,t){return Fe(e.getFullYear()%100,t,2)}function VG(e,t){return e=n3(e),Fe(e.getFullYear()%100,t,2)}function QG(e,t){return Fe(e.getFullYear()%1e4,t,4)}function XG(e,t){var r=e.getDay();return e=r>=4||r===0?Vl(e):Vl.ceil(e),Fe(e.getFullYear()%1e4,t,4)}function ZG(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fe(t/60|0,"0",2)+Fe(t%60,"0",2)}function sT(e,t){return Fe(e.getUTCDate(),t,2)}function WG(e,t){return Fe(e.getUTCHours(),t,2)}function JG(e,t){return Fe(e.getUTCHours()%12||12,t,2)}function eY(e,t){return Fe(1+jp.count(Qa(e),e),t,3)}function a3(e,t){return Fe(e.getUTCMilliseconds(),t,3)}function tY(e,t){return a3(e,t)+"000"}function rY(e,t){return Fe(e.getUTCMonth()+1,t,2)}function nY(e,t){return Fe(e.getUTCMinutes(),t,2)}function aY(e,t){return Fe(e.getUTCSeconds(),t,2)}function iY(e){var t=e.getUTCDay();return t===0?7:t}function sY(e,t){return Fe(Sp.count(Qa(e)-1,e),t,2)}function i3(e){var t=e.getUTCDay();return t>=4||t===0?Ql(e):Ql.ceil(e)}function oY(e,t){return e=i3(e),Fe(Ql.count(Qa(e),e)+(Qa(e).getUTCDay()===4),t,2)}function lY(e){return e.getUTCDay()}function uY(e,t){return Fe(gm.count(Qa(e)-1,e),t,2)}function cY(e,t){return Fe(e.getUTCFullYear()%100,t,2)}function dY(e,t){return e=i3(e),Fe(e.getUTCFullYear()%100,t,2)}function fY(e,t){return Fe(e.getUTCFullYear()%1e4,t,4)}function hY(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ql(e):Ql.ceil(e),Fe(e.getUTCFullYear()%1e4,t,4)}function mY(){return"+0000"}function oT(){return"%"}function lT(e){return+e}function uT(e){return Math.floor(+e/1e3)}var cl,s3,o3;pY({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 pY(e){return cl=pG(e),s3=cl.format,cl.parse,o3=cl.utcFormat,cl.utcParse,cl}function yY(e){return new Date(e)}function vY(e){return e instanceof Date?+e:+new Date(+e)}function aw(e,t,r,n,i,o,l,c,f,m){var p=Fj(),y=p.invert,v=p.domain,x=m(".%L"),j=m(":%S"),w=m("%I:%M"),N=m("%I %p"),O=m("%a %d"),P=m("%b %d"),E=m("%B"),A=m("%Y");function T(M){return(f(M)<M?x:c(M)<M?j:l(M)<M?w:o(M)<M?N:n(M)<M?i(M)<M?O:P:r(M)<M?E:A)(M)}return p.invert=function(M){return new Date(y(M))},p.domain=function(M){return arguments.length?v(Array.from(M,vY)):v().map(yY)},p.ticks=function(M){var R=v();return e(R[0],R[R.length-1],M??10)},p.tickFormat=function(M,R){return R==null?T:m(R)},p.nice=function(M){var R=v();return(!M||typeof M.range!="function")&&(M=t(R[0],R[R.length-1],M??10)),M?v(Y4(R,M)):p},p.copy=function(){return xd(p,aw(e,t,r,n,i,o,l,c,f,m))},p}function gY(){return _n.apply(aw(hG,mG,Va,rw,wp,bd,ew,Wj,Ls,s3).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function xY(){return _n.apply(aw(dG,fG,Qa,nw,Sp,jp,tw,Jj,Ls,o3).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Np(){var e=0,t=1,r,n,i,o,l=wr,c=!1,f;function m(y){return y==null||isNaN(y=+y)?f:l(i===0?.5:(y=(o(y)-r)*i,c?Math.max(0,Math.min(1,y)):y))}m.domain=function(y){return arguments.length?([e,t]=y,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),m):[e,t]},m.clamp=function(y){return arguments.length?(c=!!y,m):c},m.interpolator=function(y){return arguments.length?(l=y,m):l};function p(y){return function(v){var x,j;return arguments.length?([x,j]=v,l=y(x,j),m):[l(0),l(1)]}}return m.range=p(su),m.rangeRound=p(Hj),m.unknown=function(y){return arguments.length?(f=y,m):f},function(y){return o=y,r=y(e),n=y(t),i=r===n?0:1/(n-r),m}}function is(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function l3(){var e=as(Np()(wr));return e.copy=function(){return is(e,l3())},Ja.apply(e,arguments)}function u3(){var e=Yj(Np()).domain([1,10]);return e.copy=function(){return is(e,u3()).base(e.base())},Ja.apply(e,arguments)}function c3(){var e=Vj(Np());return e.copy=function(){return is(e,c3()).constant(e.constant())},Ja.apply(e,arguments)}function iw(){var e=Qj(Np());return e.copy=function(){return is(e,iw()).exponent(e.exponent())},Ja.apply(e,arguments)}function bY(){return iw.apply(null,arguments).exponent(.5)}function d3(){var e=[],t=wr;function r(n){if(n!=null&&!isNaN(n=+n))return t((vd(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Zi),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,o)=>iK(e,o/n))},r.copy=function(){return d3(t).domain(e)},Ja.apply(r,arguments)}function Op(){var e=0,t=.5,r=1,n=1,i,o,l,c,f,m=wr,p,y=!1,v;function x(w){return isNaN(w=+w)?v:(w=.5+((w=+p(w))-o)*(n*w<n*o?c:f),m(y?Math.max(0,Math.min(1,w)):w))}x.domain=function(w){return arguments.length?([e,t,r]=w,i=p(e=+e),o=p(t=+t),l=p(r=+r),c=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),n=o<i?-1:1,x):[e,t,r]},x.clamp=function(w){return arguments.length?(y=!!w,x):y},x.interpolator=function(w){return arguments.length?(m=w,x):m};function j(w){return function(N){var O,P,E;return arguments.length?([O,P,E]=N,m=MK(w,[O,P,E]),x):[m(0),m(.5),m(1)]}}return x.range=j(su),x.rangeRound=j(Hj),x.unknown=function(w){return arguments.length?(v=w,x):v},function(w){return p=w,i=w(e),o=w(t),l=w(r),c=i===o?0:.5/(o-i),f=o===l?0:.5/(l-o),n=o<i?-1:1,x}}function f3(){var e=as(Op()(wr));return e.copy=function(){return is(e,f3())},Ja.apply(e,arguments)}function h3(){var e=Yj(Op()).domain([.1,1,10]);return e.copy=function(){return is(e,h3()).base(e.base())},Ja.apply(e,arguments)}function m3(){var e=Vj(Op());return e.copy=function(){return is(e,m3()).constant(e.constant())},Ja.apply(e,arguments)}function sw(){var e=Qj(Op());return e.copy=function(){return is(e,sw()).exponent(e.exponent())},Ja.apply(e,arguments)}function jY(){return sw.apply(null,arguments).exponent(.5)}const p3=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Bj,scaleDiverging:f3,scaleDivergingLog:h3,scaleDivergingPow:sw,scaleDivergingSqrt:jY,scaleDivergingSymlog:m3,scaleIdentity:G4,scaleImplicit:sb,scaleLinear:K4,scaleLog:V4,scaleOrdinal:zj,scalePoint:lK,scalePow:Xj,scaleQuantile:Z4,scaleQuantize:W4,scaleRadial:X4,scaleSequential:l3,scaleSequentialLog:u3,scaleSequentialPow:iw,scaleSequentialQuantile:d3,scaleSequentialSqrt:bY,scaleSequentialSymlog:c3,scaleSqrt:tG,scaleSymlog:Q4,scaleThreshold:J4,scaleTime:gY,scaleUtc:xY,tickFormat:F4},Symbol.toStringTag,{value:"Module"}));function wY(e){var t=p3;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(ud(e));if(r in t&&typeof t[r]=="function")return t[r]()}function cT(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=wY(e);if(n!=null)return n.domain(t).range(r),n}}function ow(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?cT(e.scale,r,n):cT(t,r,n)}function SY(e){return"scale".concat(ud(e))}function NY(e){return SY(e)in p3}var y3=(e,t,r)=>{if(e!=null){var{scale:n,type:i}=e;if(n==="auto")return i==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":i==="category"?"band":"linear";if(typeof n=="string")return NY(n)?n:"point"}};function OY(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var o=Math.floor((r+n)/2);(i?e[o]<t:e[o]>t)?r=o+1:n=o}return r}function v3(e,t){if(e){var r=t??e.domain(),n=r.map(o=>{var l;return(l=e(o))!==null&&l!==void 0?l:0}),i=e.range();if(!(r.length===0||i.length<2))return o=>{var l,c,f=OY(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var m=(l=n[f-1])!==null&&l!==void 0?l:0,p=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(o-m)<=Math.abs(o-p)?r[f-1]:r[f]}}}function _Y(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):v3(e,void 0)}function dT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dT(Object(r),!0).forEach(function(n){EY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EY(e,t,r){return(t=AY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AY(e){var t=PY(e,"string");return typeof t=="symbol"?t:t+""}function PY(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var cb=[0,"auto"],kt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},g3=(e,t)=>e.cartesianAxis.xAxis[t],ei=(e,t)=>{var r=g3(e,t);return r??kt},It={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:cb,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:fd},x3=(e,t)=>e.cartesianAxis.yAxis[t],ti=(e,t)=>{var r=x3(e,t);return r??It},TY={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},lw=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??TY},Er=(e,t,r)=>{switch(t){case"xAxis":return ei(e,r);case"yAxis":return ti(e,r);case"zAxis":return lw(e,r);case"angleAxis":return Rj(e,r);case"radiusAxis":return Dj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},CY=(e,t,r)=>{switch(t){case"xAxis":return ei(e,r);case"yAxis":return ti(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},jd=(e,t,r)=>{switch(t){case"xAxis":return ei(e,r);case"yAxis":return ti(e,r);case"angleAxis":return Rj(e,r);case"radiusAxis":return Dj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},b3=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function j3(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var _p=e=>e.graphicalItems.cartesianItems,MY=V([Vt,yp],j3),w3=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),ou=V([_p,Er,MY],w3,{memoizeOptions:{resultEqualityCheck:xp}}),S3=V([ou],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(vp)),N3=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),RY=V([ou],N3),O3=e=>e.map(t=>t.data).filter(Boolean).flat(1),DY=V([ou],e=>e.some(t=>!t.data)),_3=V([ou],O3,{memoizeOptions:{resultEqualityCheck:xp}}),E3=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},uw=V([_3,yd],E3),kY=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Ot(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Ot(i,n)}))):e.map(n=>({value:n})),A3=(e,t,r,n,i,o)=>{var{chartData:l=[],dataStartIndex:c,dataEndIndex:f}=n,m=kY(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var p=l.slice(c,f+1),y=p.map(v=>({value:Ot(v,t.dataKey)})).filter(v=>v.value!=null);return[...y,...m]}return m},wd=V([uw,Er,ou,yd,DY,_3],A3);function Ol(e){if(sa(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function fT(e){if(Array.isArray(e)){var t=[Ol(e[0]),Ol(e[1])];return na(t)?t:void 0}var r=Ol(e);if(r!=null)return[r,r]}function ua(e){return e.map(Ol).filter(Br)}function IY(e,t){var r=Ol(e),n=Ol(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var LY=V([wd],e=>e==null?void 0:e.map(t=>t.value).sort(IY));function P3(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function $Y(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!ia(t))n=t;else if(Array.isArray(t)){var i=ua(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:ua(r.flatMap(o=>{var l=Ot(e,o.dataKey),c,f;if(Array.isArray(l)?[c,f]=l:c=f=l,!(!Be(c)||!Be(f)))return[n-c,n+f]}))}var Bt=e=>{var t=Qt(e),r=iu(e);return jd(e,t,r)},Xl=V([Bt],e=>e==null?void 0:e.dataKey),zY=V([S3,yd,Bt],k4),T3=(e,t,r,n)=>{var i={},o=t.reduce((l,c)=>{if(c.stackId==null)return l;var f=l[c.stackId];return f==null&&(f=[]),f.push(c),l[c.stackId]=f,l},i);return Object.fromEntries(Object.entries(o).map(l=>{var[c,f]=l,m=n?[...f].reverse():f,p=m.map(Ij);return[c,{stackedData:wq(e,p,r),graphicalItems:m}]}))},db=V([zY,S3,fp,A4],T3),C3=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(n==null&&r!=="zAxis"){var l=Eq(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},BY=V([Er],e=>e.allowDataOverflow),cw=e=>{var t;if(e==null||!("domain"in e))return cb;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=ua(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:cb},M3=V([Er],cw),R3=V([M3,BY],p4),UY=V([db,Un,Vt,R3],C3,{memoizeOptions:{resultEqualityCheck:gp}}),dw=e=>e.errorBars,qY=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>P3(r,n)),bm=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var o=i.flat(),l=Math.min(...o),c=Math.max(...o);return[l,c]}},D3=function(t,r,n,i,o){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],c,f;if(n.length>0&&n.forEach(m=>{var p,y=m.data!=null?[...m.data]:l,v=(p=i[m.id])===null||p===void 0?void 0:p.filter(x=>P3(o,x));y.forEach(x=>{var j,w=Ot(x,(j=r.dataKey)!==null&&j!==void 0?j:m.dataKey),N=$Y(x,w,v);if(N.length>=2){var O=Math.min(...N),P=Math.max(...N);(c==null||O<c)&&(c=O),(f==null||P>f)&&(f=P)}var E=fT(w);E!=null&&(c=c==null?E[0]:Math.min(c,E[0]),f=f==null?E[1]:Math.max(f,E[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(m=>{var p=fT(Ot(m,r.dataKey));p!=null&&(c=c==null?p[0]:Math.min(c,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),Be(c)&&Be(f))return[c,f]},HY=V([uw,Er,RY,dw,Vt,C7],D3,{memoizeOptions:{resultEqualityCheck:gp}});function FY(e){var{value:t}=e;if(sa(t)||t instanceof Date)return t}var KY=(e,t,r)=>{var n=e.map(FY).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&FM(n))?m4(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},k3=e=>e.referenceElements.dots,lu=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),GY=V([k3,Vt,yp],lu),I3=e=>e.referenceElements.areas,YY=V([I3,Vt,yp],lu),L3=e=>e.referenceElements.lines,VY=V([L3,Vt,yp],lu),$3=(e,t)=>{if(e!=null){var r=ua(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},QY=V(GY,Vt,$3),z3=(e,t)=>{if(e!=null){var r=ua(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},XY=V([YY,Vt],z3);function ZY(e){var t;if(e.x!=null)return ua([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:ua(r)}function WY(e){var t;if(e.y!=null)return ua([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:ua(r)}var B3=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?ZY(n):WY(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},JY=V([VY,Vt],B3),eV=V(QY,JY,XY,(e,t,r)=>bm(e,r,t)),U3=(e,t,r,n,i,o,l,c)=>{if(r!=null)return r;var f=l==="vertical"&&c==="xAxis"||l==="horizontal"&&c==="yAxis",m=f?bm(n,o,i):bm(o,i);return R7(t,m,e.allowDataOverflow)},tV=V([Er,M3,R3,UY,HY,eV,Ze,Vt],U3,{memoizeOptions:{resultEqualityCheck:gp}}),rV=[0,1],q3=(e,t,r,n,i,o,l)=>{if(!((e==null||r==null||r.length===0)&&l===void 0)){var{dataKey:c,type:f}=e,m=Xa(t,o);if(m&&c==null){var p;return m4(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?KY(n,e,m):i==="expand"&&!m?rV:l}},fw=V([Er,Ze,uw,wd,fp,Vt,tV],q3),uu=V([Er,b3,Tj],y3),H3=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=cw(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&na(e)){if(o)return wP(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return SP(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&na(e))return wP(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&na(e))return SP(e,t.tickCount,t.allowDecimals,"adaptive")}}},hw=V([fw,jd,uu],H3),F3=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&na(t)&&Array.isArray(r)&&r.length>0){var i,o,l=t[0],c=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],m=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(l,c),Math.max(f,m)]}return t},nV=V([Er,fw,hw,Vt],F3),aV=V(wd,Er,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ua(e.map(y=>y.value))).sort((y,v)=>y-v),i=n[0],o=n[n.length-1];if(i==null||o==null)return 1/0;var l=o-i;if(l===0)return 1/0;for(var c=0;c<n.length-1;c++){var f=n[c],m=n[c+1];if(!(f==null||m==null)){var p=m-f;r=Math.min(r,p)}}return r/l}}),K3=V(aV,Ze,E4,Yt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Be(e))return 0;var o=t==="vertical"?n.height:n.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var l=Ln(r,e*o),c=e*o/2;return c-l-(c-l)/o*l}return 0}),iV=(e,t,r)=>{var n=ei(e,t);return n==null||typeof n.padding!="string"?0:K3(e,"xAxis",t,r,n.padding)},sV=(e,t,r)=>{var n=ti(e,t);return n==null||typeof n.padding!="string"?0:K3(e,"yAxis",t,r,n.padding)},oV=V(ei,iV,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),lV=V(ti,sV,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),uV=V([Yt,oV,ip,ap,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:o}=n;return i?[o.left,r.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),cV=V([Yt,Ze,lV,ip,ap,(e,t,r)=>r],(e,t,r,n,i,o)=>{var{padding:l}=i;return o?[n.height-l.bottom,l.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),Sd=(e,t,r,n)=>{var i;switch(t){case"xAxis":return uV(e,r,n);case"yAxis":return cV(e,r,n);case"zAxis":return(i=lw(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return M4(e);case"radiusAxis":return R4(e,r);default:return}},G3=V([Er,Sd],hp),dV=V([uu,nV],Y7),mw=V([Er,uu,dV,G3],ow),Y3=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:o}=r,l=Xa(e,n);if(l&&(i==="number"||o!=="auto"))return t.map(c=>c.value)}},pw=V([Ze,wd,jd,Vt],Y3),Ep=V([mw],Lj);V([mw],_Y);V([mw,LY],v3);V([ou,dw,Vt],qY);function V3(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Ap=(e,t)=>t,Pp=(e,t,r)=>r,fV=V(rp,Ap,Pp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(V3)),hV=V(np,Ap,Pp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(V3)),Q3=(e,t)=>({width:e.width,height:t.height}),mV=(e,t)=>{var r=typeof t.width=="number"?t.width:fd;return{width:r,height:e.height}},X3=V(Yt,ei,Q3),pV=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},yV=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},vV=V(Wa,Yt,fV,Ap,Pp,(e,t,r,n,i)=>{var o={},l;return r.forEach(c=>{var f=Q3(t,c);l==null&&(l=pV(t,n,e));var m=n==="top"&&!i||n==="bottom"&&i;o[c.id]=l-Number(m)*f.height,l+=(m?-1:1)*f.height}),o}),gV=V(Za,Yt,hV,Ap,Pp,(e,t,r,n,i)=>{var o={},l;return r.forEach(c=>{var f=mV(t,c);l==null&&(l=yV(t,n,e));var m=n==="left"&&!i||n==="right"&&i;o[c.id]=l-Number(m)*f.width,l+=(m?-1:1)*f.width}),o}),xV=(e,t)=>{var r=ei(e,t);if(r!=null)return vV(e,r.orientation,r.mirror)},bV=V([Yt,ei,xV,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),jV=(e,t)=>{var r=ti(e,t);if(r!=null)return gV(e,r.orientation,r.mirror)},wV=V([Yt,ti,jV,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r==null?void 0:r[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),Z3=V(Yt,ti,(e,t)=>{var r=typeof t.width=="number"?t.width:fd;return{width:r,height:e.height}}),hT=(e,t,r)=>{switch(t){case"xAxis":return X3(e,r).width;case"yAxis":return Z3(e,r).height;default:return}},W3=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:o,dataKey:l}=r,c=Xa(e,n),f=t.map(p=>p.value),m=f.filter(p=>p!=null);if(l&&c&&o==="category"&&i&&FM(m))return f}},yw=V([Ze,wd,Er,Vt],W3),mT=V([Ze,CY,uu,Ep,yw,pw,Sd,hw,Vt],(e,t,r,n,i,o,l,c,f)=>{if(t!=null){var m=Xa(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:o,duplicateDomain:i,isCategorical:m,niceTicks:c,range:l,realScaleType:r,scale:n}}}),SV=(e,t,r,n,i,o,l,c,f)=>{if(!(t==null||n==null)){var m=Xa(e,f),{type:p,ticks:y,tickCount:v}=t,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=p==="category"&&n.bandwidth?n.bandwidth()/x:0;j=f==="angleAxis"&&o!=null&&o.length>=2?zr(o[0]-o[1])*2*j:j;var w=y||i;return w?w.map((N,O)=>{var P=l?l.indexOf(N):N,E=n.map(P);return Be(E)?{index:O,coordinate:E+j,value:N,offset:j}:null}).filter(Br):m&&c?c.map((N,O)=>{var P=n.map(N);return Be(P)?{coordinate:P+j,value:N,index:O,offset:j}:null}).filter(Br):n.ticks?n.ticks(v).map((N,O)=>{var P=n.map(N);return Be(P)?{coordinate:P+j,value:N,index:O,offset:j}:null}).filter(Br):n.domain().map((N,O)=>{var P=n.map(N);return Be(P)?{coordinate:P+j,value:l?l[N]:N,index:O,offset:j}:null}).filter(Br)}},J3=V([Ze,jd,uu,Ep,hw,Sd,yw,pw,Vt],SV),NV=(e,t,r,n,i,o,l)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Xa(e,l),{tickCount:f}=t,m=0;return m=l==="angleAxis"&&(n==null?void 0:n.length)>=2?zr(n[0]-n[1])*2*m:m,c&&o?o.map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+m,value:p,index:y,offset:m}:null}).filter(Br):r.ticks?r.ticks(f).map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+m,value:p,index:y,offset:m}:null}).filter(Br):r.domain().map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+m,value:i?i[p]:p,index:y,offset:m}:null}).filter(Br)}},es=V([Ze,jd,Ep,Sd,yw,pw,Vt],NV),ts=V(Er,Ep,(e,t)=>{if(!(e==null||t==null))return xm(xm({},e),{},{scale:t})}),OV=V([Er,uu,fw,G3],ow),_V=V([OV],Lj);V((e,t,r)=>lw(e,r),_V,(e,t)=>{if(!(e==null||t==null))return xm(xm({},e),{},{scale:t})});var EV=V([Ze,rp,np],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),AV=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};V([AV],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var l=Math.abs(o.coordinate-t);l<n&&(n=l,i=o)}return(r=i)===null||r===void 0?void 0:r.value}});var eD=e=>e.options.defaultTooltipEventType,tD=e=>e.options.validateTooltipEventTypes;function rD(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Nd(e,t){var r=eD(e),n=tD(e);return rD(t,r,n)}function PV(e){return ge(t=>Nd(t,e))}var nD=(e,t)=>{var r,n=Number(t);if(!(ia(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},TV=e=>e.tooltip.settings,ki={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},CV={itemInteraction:{click:ki,hover:ki},axisInteraction:{click:ki,hover:ki},keyboardInteraction:ki,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},aD=yr({name:"tooltip",initialState:CV,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ot()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sn(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:ot()},removeTooltipEntrySettings:{reducer(e,t){var r=Sn(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ot()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:MV,replaceTooltipEntrySettings:RV,removeTooltipEntrySettings:DV,setTooltipSettingsState:kV,setActiveMouseOverItemIndex:iD,mouseLeaveItem:IV,mouseLeaveChart:sD,setActiveClickItemIndex:LV,setMouseOverAxisIndex:oD,setMouseClickAxisIndex:$V,setSyncInteraction:Oc,setKeyboardInteraction:jm}=aD.actions,zV=aD.reducer;function pT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ch(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(r),!0).forEach(function(n){BV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BV(e,t,r){return(t=UV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UV(e){var t=qV(e,"string");return typeof t=="symbol"?t:t+""}function qV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function HV(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function FV(e){return e.index!=null}var lD=(e,t,r,n)=>{if(t==null)return ki;var i=HV(e,t,r);if(i==null)return ki;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(FV(i)){if(o)return ch(ch({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return ch(ch({},ki),{},{coordinate:i.coordinate})};function KV(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function GV(e,t){var r=KV(e),n=t[0],i=t[1];if(r===void 0)return!1;var o=Math.min(n,i),l=Math.max(n,i);return r>=o&&r<=l}function YV(e,t,r){if(r==null||t==null)return!0;var n=Ot(e,t);return n==null||!na(r)?!0:GV(n,r)}var Ec=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!Be(o))return i;var l=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(l,Math.min(o,c)),m=t[f];return m==null||YV(m,r,n)?String(f):null},uD=(e,t,r,n,i,o,l)=>{if(o!=null){var c=l[0],f=c==null?void 0:c.getPosition(o);if(f!=null)return f;var m=i==null?void 0:i[Number(o)];if(m)switch(r){case"horizontal":return{x:m.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:m.coordinate}}}},cD=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;if(r==="hover"?i=e.itemInteraction.hover.graphicalItemId:i=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&i==null)return e.tooltipItemPayloads;if(i==null&&(n!=null||e.keyboardInteraction.active)){var o=e.tooltipItemPayloads[0];return o!=null?[o]:[]}return e.tooltipItemPayloads.filter(l=>{var c;return((c=l.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},dD=e=>e.options.tooltipPayloadSearcher,cu=e=>e.tooltip;function yT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yT(Object(r),!0).forEach(function(n){VV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function VV(e,t,r){return(t=QV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QV(e){var t=XV(e,"string");return typeof t=="symbol"?t:t+""}function XV(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZV(e){if(typeof e=="string"||typeof e=="number")return e}function WV(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function JV(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function gT(e){if(typeof e=="string")return e}function eQ(e){if(!(e==null||typeof e!="object")){var t="name"in e?ZV(e.name):void 0,r="unit"in e?WV(e.unit):void 0,n="dataKey"in e?JV(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?gT(e.color):void 0,l="fill"in e?gT(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:l}}}function tQ(e,t){return e??t}var fD=(e,t,r,n,i,o,l)=>{if(!(t==null||o==null)){var{chartData:c,computedData:f,dataStartIndex:m,dataEndIndex:p}=r,y=[];return e.reduce((v,x)=>{var j,{dataDefinedOnItem:w,settings:N}=x,O=tQ(w,c),P=Array.isArray(O)?zR(O,m,p):O,E=(j=N==null?void 0:N.dataKey)!==null&&j!==void 0?j:n,A=N==null?void 0:N.nameKey,T;if(n&&Array.isArray(P)&&!Array.isArray(P[0])&&l==="axis"?T=KM(P,n,i):T=o(P,t,f,A),Array.isArray(T))T.forEach(R=>{var D,I,k=eQ(R),H=k==null?void 0:k.name,q=k==null?void 0:k.dataKey,ae=k==null?void 0:k.payload,Q=vT(vT({},N),{},{name:H,unit:k==null?void 0:k.unit,color:(D=k==null?void 0:k.color)!==null&&D!==void 0?D:N==null?void 0:N.color,fill:(I=k==null?void 0:k.fill)!==null&&I!==void 0?I:N==null?void 0:N.fill});v.push(cA({tooltipEntrySettings:Q,dataKey:q,payload:ae,value:Ot(ae,q),name:H==null?void 0:String(H)}))});else{var M;v.push(cA({tooltipEntrySettings:N,dataKey:E,payload:T,value:Ot(T,E),name:(M=Ot(T,A))!==null&&M!==void 0?M:N==null?void 0:N.name}))}return v},y)}},vw=V([Bt,b3,Tj],y3),rQ=V([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),nQ=V([Qt,iu],j3),go=V([rQ,Bt,nQ],w3,{memoizeOptions:{resultEqualityCheck:xp}}),aQ=V([go],e=>e.filter(vp)),hD=V([go],O3,{memoizeOptions:{resultEqualityCheck:xp}}),iQ=V([go],e=>e.some(t=>!t.data)),lo=V([hD,Un],E3),sQ=V([aQ,Un,Bt],k4),gw=V([lo,Bt,go,Un,iQ,hD],A3),mD=V([Bt],cw),oQ=V([Bt],e=>e.allowDataOverflow),pD=V([mD,oQ],p4),lQ=V([go],e=>e.filter(vp)),uQ=V([sQ,lQ,fp,A4],T3),cQ=V([uQ,Un,Qt,pD],C3),dQ=V([go],N3),fQ=V([lo,Bt,dQ,dw,Qt,M7],D3,{memoizeOptions:{resultEqualityCheck:gp}}),hQ=V([k3,Qt,iu],lu),mQ=V([hQ,Qt],$3),pQ=V([I3,Qt,iu],lu),yQ=V([pQ,Qt],z3),vQ=V([L3,Qt,iu],lu),gQ=V([vQ,Qt],B3),xQ=V([mQ,gQ,yQ],bm),bQ=V([Bt,mD,pD,cQ,fQ,xQ,Ze,Qt],U3),Zl=V([Bt,Ze,lo,gw,fp,Qt,bQ],q3),jQ=V([Zl,Bt,vw],H3),wQ=V([Bt,Zl,jQ,Qt],F3),yD=e=>{var t=Qt(e),r=iu(e),n=!1;return Sd(e,t,r,n)},vD=V([Bt,yD],hp),SQ=V([Bt,vw,wQ,vD],ow),gD=V([SQ],Lj),NQ=V([Ze,gw,Bt,Qt],W3),OQ=V([Ze,gw,Bt,Qt],Y3),_Q=(e,t,r,n,i,o,l,c)=>{if(t){var{type:f}=t,m=Xa(e,c);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,y=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return y=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?zr(i[0]-i[1])*2*y:y,m&&l?l.map((v,x)=>{var j=n.map(v);return Be(j)?{coordinate:j+y,value:v,index:x,offset:y}:null}).filter(Br):n.domain().map((v,x)=>{var j=n.map(v);return Be(j)?{coordinate:j+y,value:o?o[v]:v,index:x,offset:y}:null}).filter(Br)}}},ri=V([Ze,Bt,vw,gD,yD,NQ,OQ,Qt],_Q),xw=V([eD,tD,TV],(e,t,r)=>rD(r.shared,e,t)),xD=e=>e.tooltip.settings.trigger,bw=e=>e.tooltip.settings.defaultIndex,Od=V([cu,xw,xD,bw],lD),uo=V([Od,lo,Xl,Zl],Ec),bD=V([ri,uo],nD),jD=V([Od],e=>{if(e)return e.dataKey}),EQ=V([Od],e=>{if(e)return e.graphicalItemId}),wD=V([cu,xw,xD,bw],cD),AQ=V([Za,Wa,Ze,Yt,ri,bw,wD],uD),PQ=V([Od,AQ],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),TQ=V([Od],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),CQ=V([wD,uo,Un,Xl,bD,dD,xw],fD),MQ=V([CQ],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function xT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xT(Object(r),!0).forEach(function(n){RQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RQ(e,t,r){return(t=DQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DQ(e){var t=kQ(e,"string");return typeof t=="symbol"?t:t+""}function kQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IQ=()=>ge(Bt),LQ=()=>{var e=IQ(),t=ge(ri),r=ge(gD);return Fl(!e||!r?void 0:bT(bT({},e),{},{scale:r}),t)};function jT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jT(Object(r),!0).forEach(function(n){$Q(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $Q(e,t,r){return(t=zQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zQ(e){var t=BQ(e,"string");return typeof t=="symbol"?t:t+""}function BQ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var UQ=(e,t,r,n)=>{var i=t.find(o=>o&&o.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.relativeY};if(e==="vertical")return{x:n.relativeX,y:i.coordinate}}return{x:0,y:0}},qQ=(e,t,r,n)=>{var i=t.find(m=>m&&m.index===r);if(i){if(e==="centric"){var o=i.coordinate,{radius:l}=n;return dl(dl(dl({},n),ir(n.cx,n.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,{angle:f}=n;return dl(dl(dl({},n),ir(n.cx,n.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function HQ(e,t){var{relativeX:r,relativeY:n}=e;return r>=t.left&&r<=t.left+t.width&&n>=t.top&&n<=t.top+t.height}var SD=(e,t,r,n,i)=>{var o,l=(o=t==null?void 0:t.length)!==null&&o!==void 0?o:0;if(l<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var c=0;c<l;c++){var f,m,p,y,v,x=c>0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(m=r[l-1])===null||m===void 0?void 0:m.coordinate,j=(p=r[c])===null||p===void 0?void 0:p.coordinate,w=c>=l-1?(y=r[0])===null||y===void 0?void 0:y.coordinate:(v=r[c+1])===null||v===void 0?void 0:v.coordinate,N=void 0;if(!(x==null||j==null||w==null))if(zr(j-x)!==zr(w-j)){var O=[];if(zr(w-j)===zr(i[1]-i[0])){N=w;var P=j+i[1]-i[0];O[0]=Math.min(P,(P+x)/2),O[1]=Math.max(P,(P+x)/2)}else{N=x;var E=w+i[1]-i[0];O[0]=Math.min(j,(E+j)/2),O[1]=Math.max(j,(E+j)/2)}var A=[Math.min(j,(N+j)/2),Math.max(j,(N+j)/2)];if(e>A[0]&&e<=A[1]||e>=O[0]&&e<=O[1]){var T;return(T=r[c])===null||T===void 0?void 0:T.index}}else{var M=Math.min(x,w),R=Math.max(x,w);if(e>(M+j)/2&&e<=(R+j)/2){var D;return(D=r[c])===null||D===void 0?void 0:D.index}}}else if(t)for(var I=0;I<l;I++){var k=t[I];if(k!=null){var H=t[I+1],q=t[I-1];if(I===0&&H!=null&&e<=(k.coordinate+H.coordinate)/2||I===l-1&&q!=null&&e>(k.coordinate+q.coordinate)/2||I>0&&I<l-1&&q!=null&&H!=null&&e>(k.coordinate+q.coordinate)/2&&e<=(k.coordinate+H.coordinate)/2)return k.index}}return-1},FQ=()=>ge(Tj),jw=(e,t)=>t,ND=(e,t,r)=>r,ww=(e,t,r,n)=>n,KQ=V(ri,e=>Km(e,t=>t.coordinate)),Sw=V([cu,jw,ND,ww],lD),Nw=V([Sw,lo,Xl,Zl],Ec),GQ=(e,t,r)=>{if(t!=null){var n=cu(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},OD=V([cu,jw,ND,ww],cD),wm=V([Za,Wa,Ze,Yt,ri,ww,OD],uD),YQ=V([Sw,wm],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),_D=V([ri,Nw],nD),VQ=V([OD,Nw,Un,Xl,_D,dD,jw],fD),QQ=V([Sw,Nw],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),XQ=(e,t,r,n,i,o,l)=>{if(!(!e||!r||!n||!i)&&HQ(e,l)){var c=Aq(e,t),f=SD(c,o,i,r,n),m=UQ(t,i,f,e);return{activeIndex:String(f),activeCoordinate:m}}},ZQ=(e,t,r,n,i,o,l)=>{if(!(!e||!n||!i||!o||!r)){var c=b7(e,r);if(c){var f=Pq(c,t),m=SD(f,l,o,n,i),p=qQ(t,o,m,c);return{activeIndex:String(m),activeCoordinate:p}}}},WQ=(e,t,r,n,i,o,l,c)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?XQ(e,t,n,i,o,l,c):ZQ(e,t,r,n,i,o,l)},JQ=V(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),eX=V(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Kt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:G7}});function wT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ST(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wT(Object(r),!0).forEach(function(n){tX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tX(e,t,r){return(t=rX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rX(e){var t=nX(e,"string");return typeof t=="symbol"?t:t+""}function nX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var aX={},iX={zIndexMap:Object.values(Kt).reduce((e,t)=>ST(ST({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),aX)},sX=new Set(Object.values(Kt));function oX(e){return sX.has(e)}var ED=yr({name:"zIndex",initialState:iX,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:ot()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!oX(r)&&delete e.zIndexMap[r])},prepare:ot()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:n,isPanorama:i}=t.payload;e.zIndexMap[r]?i?e.zIndexMap[r].panoramaElement=n:e.zIndexMap[r].element=n:e.zIndexMap[r]={consumers:0,element:i?void 0:n,panoramaElement:i?n:void 0}},prepare:ot()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:ot()}}}),{registerZIndexPortal:lX,unregisterZIndexPortal:z0,registerZIndexPortalElement:uX,unregisterZIndexPortalElement:cX}=ED.actions,dX=ED.reducer;function En(e){var{zIndex:t,children:r}=e,n=lH(),i=n&&t!==void 0&&t!==0,o=vr(),l=S.useRef(void 0),c=S.useRef(new Set),f=ut(),m=ge(y=>JQ(y,t,o));if(S.useLayoutEffect(()=>{if(!i){var y=c.current;y.forEach(x=>{f(z0({zIndex:x}))}),y.clear(),l.current=void 0;return}if(c.current.has(t)||(f(lX({zIndex:t})),c.current.add(t)),m){l.current=m;var v=c.current;v.forEach(x=>{x!==t&&(f(z0({zIndex:x})),v.delete(x))})}},[f,t,i,m]),S.useLayoutEffect(()=>{var y=c.current;return()=>{y.forEach(v=>{f(z0({zIndex:v}))}),y.clear()}},[f]),!i)return r;var p=m??l.current;return p?Im.createPortal(r,p):null}function fb(){return fb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},fb.apply(null,arguments)}function NT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NT(Object(r),!0).forEach(function(n){fX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fX(e,t,r){return(t=hX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hX(e){var t=mX(e,"string");return typeof t=="symbol"?t:t+""}function mX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pX(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function yX(e){var t,{coordinate:r,payload:n,index:i,offset:o,tooltipAxisBandSize:l,layout:c,cursor:f,tooltipEventType:m,chartName:p}=e,y=r,v=n,x=i;if(!f||!y||p!=="ScatterChart"&&m!=="axis")return null;var j,w,N;if(p==="ScatterChart")j=y,w=DF,N=Kt.cursorLine;else if(p==="BarChart")j=kF(c,y,o,l),w=c4,N=Kt.cursorRectangle;else if(c==="radial"&&YM(y)){var{cx:O,cy:P,radius:E,startAngle:A,endAngle:T}=d4(y);j={cx:O,cy:P,startAngle:A,endAngle:T,innerRadius:E,outerRadius:E},w=h4,N=Kt.cursorLine}else j={points:N7(c,y,o)},w=i4,N=Kt.cursorLine;var M=typeof f=="object"&&"className"in f?f.className:void 0,R=dh(dh(dh(dh({stroke:"#ccc",pointerEvents:"none"},o),j),ld(f)),{},{payload:v,payloadIndex:x,className:Xe("recharts-tooltip-cursor",M)});return S.createElement(En,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:N},S.createElement(pX,{cursor:f,cursorComp:w,cursorProps:R}))}function vX(e){var t=LQ(),r=GR(),n=po(),i=FQ();return t==null||r==null||n==null||i==null?null:S.createElement(yX,fb({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var AD=S.createContext(null),gX=()=>S.useContext(AD),B0={exports:{}},OT;function xX(){return OT||(OT=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,m,p){this.fn=f,this.context=m,this.once=p||!1}function o(f,m,p,y,v){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,y||f,v),j=r?r+m:m;return f._events[j]?f._events[j].fn?f._events[j]=[f._events[j],x]:f._events[j].push(x):(f._events[j]=x,f._eventsCount++),f}function l(f,m){--f._eventsCount===0?f._events=new n:delete f._events[m]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var m=[],p,y;if(this._eventsCount===0)return m;for(y in p=this._events)t.call(p,y)&&m.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(p)):m},c.prototype.listeners=function(m){var p=r?r+m:m,y=this._events[p];if(!y)return[];if(y.fn)return[y.fn];for(var v=0,x=y.length,j=new Array(x);v<x;v++)j[v]=y[v].fn;return j},c.prototype.listenerCount=function(m){var p=r?r+m:m,y=this._events[p];return y?y.fn?1:y.length:0},c.prototype.emit=function(m,p,y,v,x,j){var w=r?r+m:m;if(!this._events[w])return!1;var N=this._events[w],O=arguments.length,P,E;if(N.fn){switch(N.once&&this.removeListener(m,N.fn,void 0,!0),O){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,p),!0;case 3:return N.fn.call(N.context,p,y),!0;case 4:return N.fn.call(N.context,p,y,v),!0;case 5:return N.fn.call(N.context,p,y,v,x),!0;case 6:return N.fn.call(N.context,p,y,v,x,j),!0}for(E=1,P=new Array(O-1);E<O;E++)P[E-1]=arguments[E];N.fn.apply(N.context,P)}else{var A=N.length,T;for(E=0;E<A;E++)switch(N[E].once&&this.removeListener(m,N[E].fn,void 0,!0),O){case 1:N[E].fn.call(N[E].context);break;case 2:N[E].fn.call(N[E].context,p);break;case 3:N[E].fn.call(N[E].context,p,y);break;case 4:N[E].fn.call(N[E].context,p,y,v);break;default:if(!P)for(T=1,P=new Array(O-1);T<O;T++)P[T-1]=arguments[T];N[E].fn.apply(N[E].context,P)}}return!0},c.prototype.on=function(m,p,y){return o(this,m,p,y,!1)},c.prototype.once=function(m,p,y){return o(this,m,p,y,!0)},c.prototype.removeListener=function(m,p,y,v){var x=r?r+m:m;if(!this._events[x])return this;if(!p)return l(this,x),this;var j=this._events[x];if(j.fn)j.fn===p&&(!v||j.once)&&(!y||j.context===y)&&l(this,x);else{for(var w=0,N=[],O=j.length;w<O;w++)(j[w].fn!==p||v&&!j[w].once||y&&j[w].context!==y)&&N.push(j[w]);N.length?this._events[x]=N.length===1?N[0]:N:l(this,x)}return this},c.prototype.removeAllListeners=function(m){var p;return m?(p=r?r+m:m,this._events[p]&&l(this,p)):(this._events=new n,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,e.exports=c})(B0)),B0.exports}var bX=xX();const jX=ns(bX);var Zc=new jX,hb="recharts.syncEvent.tooltip",_T="recharts.syncEvent.brush",PD=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!ia(r))return e[r]}},wX={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},TD=yr({name:"options",initialState:wX,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),SX=TD.reducer,{createEventEmitter:NX}=TD.actions;function OX(e){return e.tooltip.syncInteraction}var _X={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},CD=yr({name:"chartData",initialState:_X,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:ET,setDataStartEndIndexes:EX,setComputedData:Bie}=CD.actions,AX=CD.reducer,PX=["x","y"];function AT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(r),!0).forEach(function(n){TX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TX(e,t,r){return(t=CX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CX(e){var t=MX(e,"string");return typeof t=="symbol"?t:t+""}function MX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function RX(e,t){if(e==null)return{};var r,n,i=DX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function DX(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function kX(){var e=ge(Cj),t=ge(Mj),r=ut(),n=ge(P4),i=ge(ri),o=po(),l=sp(),c=ge(f=>f.rootProps.className);S.useEffect(()=>{if(e==null)return mo;var f=(m,p,y)=>{if(t!==y&&e===m){if(p.payload.active===!1){r(Oc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(l&&p!==null&&p!==void 0&&(v=p.payload)!==null&&v!==void 0&&v.coordinate&&p.payload.sourceViewBox){var x=p.payload.coordinate,{x:j,y:w}=x,N=RX(x,PX),{x:O,y:P,width:E,height:A}=p.payload.sourceViewBox,T=fl(fl({},N),{},{x:l.x+(E?(j-O)/E:0)*l.width,y:l.y+(A?(w-P)/A:0)*l.height});r(fl(fl({},p),{},{payload:fl(fl({},p.payload),{},{coordinate:T})}))}else r(p);return}if(i!=null){var M;if(typeof n=="function"){var R={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},D=n(i,R);M=i[D]}else n==="value"&&(M=i.find(B=>String(B.value)===p.payload.label));var{coordinate:I}=p.payload;if(I==null||l==null){r(Oc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(M==null){r(Oc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:k,y:H}=I,q=Math.min(k,l.x+l.width),ae=Math.min(H,l.y+l.height),Q={x:o==="horizontal"?M.coordinate:q,y:o==="horizontal"?ae:M.coordinate},Z=Oc({active:p.payload.active,coordinate:Q,dataKey:p.payload.dataKey,index:String(M.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(Z)}}};return Zc.on(hb,f),()=>{Zc.off(hb,f)}},[c,r,t,e,n,i,o,l])}function IX(){var e=ge(Cj),t=ge(Mj),r=ut();S.useEffect(()=>{if(e==null)return mo;var n=(i,o,l)=>{t!==l&&e===i&&r(EX(o))};return Zc.on(_T,n),()=>{Zc.off(_T,n)}},[r,t,e])}function LX(){var e=ut();S.useEffect(()=>{e(NX())},[e]),kX(),IX()}function $X(e,t,r,n,i,o){var l=ge(j=>GQ(j,e,t)),c=ge(EQ),f=ge(Mj),m=ge(Cj),p=ge(P4),y=ge(OX),v=(y==null?void 0:y.sourceViewBox)!=null,x=sp();S.useEffect(()=>{if(!v&&m!=null&&f!=null){var j=Oc({active:o,coordinate:r,dataKey:l,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:c});Zc.emit(hb,m,j,f)}},[v,r,l,c,i,n,f,m,p,o,x])}function PT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(r),!0).forEach(function(n){zX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zX(e,t,r){return(t=BX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BX(e){var t=UX(e,"string");return typeof t=="symbol"?t:t+""}function UX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qX(e){return e.dataKey}function HX(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(uF,t)}var CT=[],FX={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Ow(e){var t,r,n=or(e,FX),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:c,content:f,filterNull:m,isAnimationActive:p,offset:y,payloadUniqBy:v,position:x,reverseDirection:j,useTranslate3d:w,wrapperStyle:N,cursor:O,shared:P,trigger:E,defaultIndex:A,portal:T,axisId:M}=n,R=ut(),D=typeof A=="number"?String(A):A;S.useEffect(()=>{R(kV({shared:P,trigger:E,axisId:M,active:i,defaultIndex:D}))},[R,P,E,M,i,D]);var I=sp(),k=a4(),H=PV(P),{activeIndex:q,isActive:ae}=(t=ge(Ce=>QQ(Ce,H,E,D)))!==null&&t!==void 0?t:{},Q=ge(Ce=>VQ(Ce,H,E,D)),Z=ge(Ce=>_D(Ce,H,E,D)),B=ge(Ce=>YQ(Ce,H,E,D)),K=Q,ee=gX(),se=(r=i??ae)!==null&&r!==void 0?r:!1,[ue,L]=uR([K,se]),W=H==="axis"?Z:void 0;$X(H,E,B,W,q,se);var le=T??ee;if(le==null||I==null||H==null)return null;var oe=K??CT;se||(oe=CT),m&&oe.length&&(oe=aR(oe.filter(Ce=>Ce.value!=null&&(Ce.hide!==!0||n.includeHidden)),v,qX));var ye=oe.length>0,Se=TT(TT({},n),{},{payload:oe,label:W,active:se,activeIndex:q,coordinate:B,accessibilityLayer:k}),Ne=S.createElement(bF,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:se,coordinate:B,hasPayload:ye,offset:y,position:x,reverseDirection:j,useTranslate3d:w,viewBox:I,wrapperStyle:N,lastBoundingBox:ue,innerRef:L,hasPortalFromProps:!!T},HX(f,Se));return S.createElement(S.Fragment,null,Im.createPortal(Ne,le),se&&S.createElement(vX,{cursor:O,tooltipEventType:H,coordinate:B,payload:oe,index:q}))}var _w=e=>null;_w.displayName="Cell";function KX(e,t,r){return(t=GX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GX(e){var t=YX(e,"string");return typeof t=="symbol"?t:t+""}function YX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class VX{constructor(t){KX(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function MT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function QX(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MT(Object(r),!0).forEach(function(n){XX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XX(e,t,r){return(t=ZX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZX(e){var t=WX(e,"string");return typeof t=="symbol"?t:t+""}function WX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var JX={cacheSize:2e3,enableCache:!0},MD=QX({},JX),RT=new VX(MD.cacheSize),eZ={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},DT="recharts_measurement_span";function tZ(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",l=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(o,"|").concat(l,"|").concat(c)}var kT=(e,t)=>{try{var r=document.getElementById(DT);r||(r=document.createElement("span"),r.setAttribute("id",DT),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,eZ,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Ac=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||pd.isSsr)return{width:0,height:0};if(!MD.enableCache)return kT(t,r);var n=tZ(t,r),i=RT.get(n);if(i)return i;var o=kT(t,r);return RT.set(n,o),o},RD;function rZ(e,t,r){return(t=nZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nZ(e){var t=aZ(e,"string");return typeof t=="symbol"?t:t+""}function aZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,LT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iZ=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,sZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,oZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},lZ=["cm","mm","pt","pc","in","Q","px"];function uZ(e){return lZ.includes(e)}var jl="NaN";function cZ(e,t){return e*oZ[t]}class ar{static parse(t){var r,[,n,i]=(r=sZ.exec(t))!==null&&r!==void 0?r:[];return n==null?ar.NaN:new ar(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,ia(t)&&(this.unit=""),r!==""&&!iZ.test(r)&&(this.num=NaN,this.unit=""),uZ(r)&&(this.num=cZ(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new ar(NaN,""):new ar(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ar(NaN,""):new ar(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ar(NaN,""):new ar(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ar(NaN,""):new ar(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ia(this.num)}}RD=ar;rZ(ar,"NaN",new RD(NaN,""));function DD(e){if(e==null||e.includes(jl))return jl;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,o]=(r=IT.exec(t))!==null&&r!==void 0?r:[],l=ar.parse(n??""),c=ar.parse(o??""),f=i==="*"?l.multiply(c):l.divide(c);if(f.isNaN())return jl;t=t.replace(IT,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var m,[,p,y,v]=(m=LT.exec(t))!==null&&m!==void 0?m:[],x=ar.parse(p??""),j=ar.parse(v??""),w=y==="+"?x.add(j):x.subtract(j);if(w.isNaN())return jl;t=t.replace(LT,w.toString())}return t}var $T=/\(([^()]*)\)/;function dZ(e){for(var t=e,r;(r=$T.exec(t))!=null;){var[,n]=r;t=t.replace($T,DD(n))}return t}function fZ(e){var t=e.replace(/\s+/g,"");return t=dZ(t),t=DD(t),t}function hZ(e){try{return fZ(e)}catch{return jl}}function U0(e){var t=hZ(e.slice(5,-1));return t===jl?"":t}var mZ=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],pZ=["dx","dy","angle","className","breakAll"];function mb(){return mb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mb.apply(null,arguments)}function zT(e,t){if(e==null)return{};var r,n,i=yZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function yZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var kD=/[ \f\n\r\t\v\u2028\u2029]+/,ID=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];ht(t)||(r?i=t.toString().split(""):i=t.toString().split(kD));var o=i.map(c=>({word:c,width:Ac(c,n).width})),l=r?0:Ac(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function LD(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function vZ(e){return ht(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var $D=(e,t,r,n)=>e.reduce((i,o)=>{var{word:l,width:c}=o,f=i[i.length-1];if(f&&c!=null&&(t==null||n||f.width+c+r<Number(t)))f.words.push(l),f.width+=c+r;else{var m={words:[l],width:c};i.push(m)}return i},[]),zD=e=>e.reduce((t,r)=>t.width>r.width?t:r),gZ="…",BT=(e,t,r,n,i,o,l,c)=>{var f=e.slice(0,t),m=ID({breakAll:r,style:n,children:f+gZ});if(!m)return[!1,[]];var p=$D(m.wordsWithComputedWidth,o,l,c),y=p.length>i||zD(p).width>Number(o);return[y,p]},xZ=(e,t,r,n,i)=>{var{maxLines:o,children:l,style:c,breakAll:f}=e,m=pe(o),p=String(l),y=$D(t,n,r,i);if(!m||i)return y;var v=y.length>o||zD(y).width>Number(n);if(!v)return y;for(var x=0,j=p.length-1,w=0,N;x<=j&&w<=p.length-1;){var O=Math.floor((x+j)/2),P=O-1,[E,A]=BT(p,P,f,c,o,n,r,i),[T]=BT(p,O,f,c,o,n,r,i);if(!E&&!T&&(x=O+1),E&&T&&(j=O-1),!E&&T){N=A;break}w++}return N||y},UT=e=>{var t=ht(e)?[]:e.toString().split(kD);return[{words:t,width:void 0}]},bZ=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:o,maxLines:l}=e;if((t||r)&&!pd.isSsr){var c,f,m=ID({breakAll:o,children:n,style:i});if(m){var{wordsWithComputedWidth:p,spaceWidth:y}=m;c=p,f=y}else return UT(n);return xZ({breakAll:o,children:n,maxLines:l,style:i},c,f,t,!!r)}return UT(n)},BD="#808080",jZ={angle:0,breakAll:!1,capHeight:"0.71em",fill:BD,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Ew=S.forwardRef((e,t)=>{var r=or(e,jZ),{x:n,y:i,lineHeight:o,capHeight:l,fill:c,scaleToFit:f,textAnchor:m,verticalAnchor:p}=r,y=zT(r,mZ),v=S.useMemo(()=>bZ({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width}),[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),{dx:x,dy:j,angle:w,className:N,breakAll:O}=y,P=zT(y,pZ);if(!sa(n)||!sa(i)||v.length===0)return null;var E=Number(n)+(pe(x)?x:0),A=Number(i)+(pe(j)?j:0);if(!Be(E)||!Be(A))return null;var T;switch(p){case"start":T=U0("calc(".concat(l,")"));break;case"middle":T=U0("calc(".concat((v.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:T=U0("calc(".concat(v.length-1," * -").concat(o,")"));break}var M=[],R=v[0];if(f&&R!=null){var D=R.width,{width:I}=y;M.push("scale(".concat(pe(I)&&pe(D)?I/D:1,")"))}return w&&M.push("rotate(".concat(w,", ").concat(E,", ").concat(A,")")),M.length&&(P.transform=M.join(" ")),S.createElement("text",mb({},Nr(P),{ref:t,x:E,y:A,className:Xe("recharts-text",N),textAnchor:m,fill:c.includes("url")?BD:c}),v.map((k,H)=>{var q=k.words.join(O?"":" ");return S.createElement("tspan",{x:E,dy:H===0?T:o,key:"".concat(q,"-").concat(H)},q)}))});Ew.displayName="Text";function qT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qT(Object(r),!0).forEach(function(n){wZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wZ(e,t,r){return(t=SZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SZ(e){var t=NZ(e,"string");return typeof t=="symbol"?t:t+""}function NZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OZ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:o,y:l,height:c,upperWidth:f,lowerWidth:m}=jj(t),p=o,y=o+(f-m)/2,v=(p+y)/2,x=(f+m)/2,j=p+f/2,w=c>=0?1:-1,N=w*n,O=w>0?"end":"start",P=w>0?"start":"end",E=f>=0?1:-1,A=E*n,T=E>0?"end":"start",M=E>0?"start":"end",R=i;if(r==="top"){var D={x:p+f/2,y:l-N,horizontalAnchor:"middle",verticalAnchor:O};return R&&(D.height=Math.max(l-R.y,0),D.width=f),D}if(r==="bottom"){var I={x:y+m/2,y:l+c+N,horizontalAnchor:"middle",verticalAnchor:P};return R&&(I.height=Math.max(R.y+R.height-(l+c),0),I.width=m),I}if(r==="left"){var k={x:v-A,y:l+c/2,horizontalAnchor:T,verticalAnchor:"middle"};return R&&(k.width=Math.max(k.x-R.x,0),k.height=c),k}if(r==="right"){var H={x:v+x+A,y:l+c/2,horizontalAnchor:M,verticalAnchor:"middle"};return R&&(H.width=Math.max(R.x+R.width-H.x,0),H.height=c),H}var q=R?{width:x,height:c}:{};return r==="insideLeft"?Qn({x:v+A,y:l+c/2,horizontalAnchor:M,verticalAnchor:"middle"},q):r==="insideRight"?Qn({x:v+x-A,y:l+c/2,horizontalAnchor:T,verticalAnchor:"middle"},q):r==="insideTop"?Qn({x:p+f/2,y:l+N,horizontalAnchor:"middle",verticalAnchor:P},q):r==="insideBottom"?Qn({x:y+m/2,y:l+c-N,horizontalAnchor:"middle",verticalAnchor:O},q):r==="insideTopLeft"?Qn({x:p+A,y:l+N,horizontalAnchor:M,verticalAnchor:P},q):r==="insideTopRight"?Qn({x:p+f-A,y:l+N,horizontalAnchor:T,verticalAnchor:P},q):r==="insideBottomLeft"?Qn({x:y+A,y:l+c-N,horizontalAnchor:M,verticalAnchor:O},q):r==="insideBottomRight"?Qn({x:y+m-A,y:l+c-N,horizontalAnchor:T,verticalAnchor:O},q):r&&typeof r=="object"&&(pe(r.x)||no(r.x))&&(pe(r.y)||no(r.y))?Qn({x:o+Ln(r.x,x),y:l+Ln(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},q):Qn({x:j,y:l+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},q)},_Z=["labelRef"],EZ=["content"];function HT(e,t){if(e==null)return{};var r,n,i=AZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function AZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function FT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _c(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FT(Object(r),!0).forEach(function(n){PZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PZ(e,t,r){return(t=TZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TZ(e){var t=CZ(e,"string");return typeof t=="symbol"?t:t+""}function CZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},La.apply(null,arguments)}var UD=S.createContext(null),MZ=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:l,children:c}=e,f=S.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:l}),[t,r,n,i,o,l]);return S.createElement(UD.Provider,{value:f},c)},qD=()=>{var e=S.useContext(UD),t=sp();return e||(t?jj(t):void 0)},RZ=S.createContext(null),DZ=()=>{var e=S.useContext(RZ),t=ge(D4);return e||t},kZ=e=>{var{value:t,formatter:r}=e,n=ht(e.children)?t:e.children;return typeof r=="function"?r(n):n},Aw=e=>e!=null&&typeof e=="function",IZ=(e,t)=>{var r=zr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},LZ=(e,t,r,n,i)=>{var{offset:o,className:l}=e,{cx:c,cy:f,innerRadius:m,outerRadius:p,startAngle:y,endAngle:v,clockWise:x}=i,j=(m+p)/2,w=IZ(y,v),N=w>=0?1:-1,O,P;switch(t){case"insideStart":O=y+N*o,P=x;break;case"insideEnd":O=v-N*o,P=!x;break;case"end":O=v+N*o,P=x;break;default:throw new Error("Unsupported position ".concat(t))}P=w<=0?P:!P;var E=ir(c,f,j,O),A=ir(c,f,j,O+(P?1:-1)*359),T="M".concat(E.x,",").concat(E.y,`
|
|
108
|
+
A`).concat(j,",").concat(j,",0,1,").concat(P?0:1,`,
|
|
109
|
+
`).concat(A.x,",").concat(A.y),M=ht(e.id)?$c("recharts-radial-line-"):e.id;return S.createElement("text",La({},n,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",l)}),S.createElement("defs",null,S.createElement("path",{id:M,d:T})),S.createElement("textPath",{xlinkHref:"#".concat(M)},r))},$Z=(e,t,r)=>{var{cx:n,cy:i,innerRadius:o,outerRadius:l,startAngle:c,endAngle:f}=e,m=(c+f)/2;if(r==="outside"){var{x:p,y}=ir(n,i,l+t,m);return{x:p,y,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var v=(o+l)/2,{x,y:j}=ir(n,i,v,m);return{x,y:j,textAnchor:"middle",verticalAnchor:"middle"}},Oh=e=>e!=null&&"cx"in e&&pe(e.cx),zZ={angle:0,offset:5,zIndex:Kt.label,position:"middle",textBreakAll:!1};function BZ(e){if(!Oh(e))return e;var{cx:t,cy:r,outerRadius:n}=e,i=n*2;return{x:t-n,y:r-n,width:i,upperWidth:i,lowerWidth:i,height:i}}function Ri(e){var t=or(e,zZ),{viewBox:r,parentViewBox:n,position:i,value:o,children:l,content:c,className:f="",textBreakAll:m,labelRef:p}=t,y=DZ(),v=qD(),x=i==="center"?v:y??v,j,w,N;r==null?j=x:Oh(r)?j=r:j=jj(r);var O=BZ(j);if(!j||ht(o)&&ht(l)&&!S.isValidElement(c)&&typeof c!="function")return null;var P=_c(_c({},t),{},{viewBox:j});if(S.isValidElement(c)){var{labelRef:E}=P,A=HT(P,_Z);return S.cloneElement(c,A)}if(typeof c=="function"){var{content:T}=P,M=HT(P,EZ);if(w=S.createElement(c,M),S.isValidElement(w))return w}else w=kZ(t);var R=Nr(t);if(Oh(j)){if(i==="insideStart"||i==="insideEnd"||i==="end")return LZ(t,i,w,R,j);N=$Z(j,t.offset,t.position)}else{if(!O)return null;var D=OZ({viewBox:O,position:i,offset:t.offset,parentViewBox:Oh(n)?void 0:n});N=_c(_c({x:D.x,y:D.y,textAnchor:D.horizontalAnchor,verticalAnchor:D.verticalAnchor},D.width!==void 0?{width:D.width}:{}),D.height!==void 0?{height:D.height}:{})}return S.createElement(En,{zIndex:t.zIndex},S.createElement(Ew,La({ref:p,className:Xe("recharts-label",f)},R,N,{textAnchor:LD(R.textAnchor)?R.textAnchor:N.textAnchor,breakAll:m}),w))}Ri.displayName="Label";var UZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?S.createElement(Ri,La({key:"label-implicit"},n)):sa(e)?S.createElement(Ri,La({key:"label-implicit",value:e},n)):S.isValidElement(e)?e.type===Ri?S.cloneElement(e,_c({key:"label-implicit"},n)):S.createElement(Ri,La({key:"label-implicit",content:e},n)):Aw(e)?S.createElement(Ri,La({key:"label-implicit",content:e},n)):e&&typeof e=="object"?S.createElement(Ri,La({},e,{key:"label-implicit"},n)):null};function qZ(e){var{label:t,labelRef:r}=e,n=qD();return UZ(t,n,r)||null}var HZ=["valueAccessor"],FZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function Sm(){return Sm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sm.apply(null,arguments)}function KT(e,t){if(e==null)return{};var r,n,i=KZ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function KZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var GZ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(vZ(t))return t},HD=S.createContext(void 0),FD=HD.Provider,KD=S.createContext(void 0);KD.Provider;function YZ(){return S.useContext(HD)}function VZ(){return S.useContext(KD)}function _h(e){var{valueAccessor:t=GZ}=e,r=KT(e,HZ),{dataKey:n,clockWise:i,id:o,textBreakAll:l,zIndex:c}=r,f=KT(r,FZ),m=YZ(),p=VZ(),y=m||p;return!y||!y.length?null:S.createElement(En,{zIndex:c??Kt.label},S.createElement(rn,{className:"recharts-label-list"},y.map((v,x)=>{var j,w=ht(n)?t(v,x):Ot(v.payload,n),N=ht(o)?{}:{id:"".concat(o,"-").concat(x)};return S.createElement(Ri,Sm({key:"label-".concat(x)},Nr(v),f,N,{fill:(j=r.fill)!==null&&j!==void 0?j:v.fill,parentViewBox:v.parentViewBox,value:w,textBreakAll:l,viewBox:v.viewBox,index:x,zIndex:0}))})))}_h.displayName="LabelList";function GD(e){var{label:t}=e;return t?t===!0?S.createElement(_h,{key:"labelList-implicit"}):S.isValidElement(t)||Aw(t)?S.createElement(_h,{key:"labelList-implicit",content:t}):typeof t=="object"?S.createElement(_h,Sm({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function pb(){return pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pb.apply(null,arguments)}var YD=e=>{var{cx:t,cy:r,r:n,className:i}=e,o=Xe("recharts-dot",i);return pe(t)&&pe(r)&&pe(n)?S.createElement("circle",pb({},In(e),uj(e),{className:o,cx:t,cy:r,r:n})):null},QZ={radiusAxis:{},angleAxis:{}},VD=yr({name:"polarAxis",initialState:QZ,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:Uie,removeRadiusAxis:qie,addAngleAxis:Hie,removeAngleAxis:Fie}=VD.actions,XZ=VD.reducer;function ZZ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var q0={exports:{}},tt={};/**
|
|
110
|
+
* @license React
|
|
111
|
+
* react-is.production.js
|
|
112
|
+
*
|
|
113
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
114
|
+
*
|
|
115
|
+
* This source code is licensed under the MIT license found in the
|
|
116
|
+
* LICENSE file in the root directory of this source tree.
|
|
117
|
+
*/var GT;function WZ(){if(GT)return tt;GT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function j(w){if(typeof w=="object"&&w!==null){var N=w.$$typeof;switch(N){case e:switch(w=w.type,w){case r:case i:case n:case f:case m:case v:return w;default:switch(w=w&&w.$$typeof,w){case l:case c:case y:case p:return w;case o:return w;default:return N}}case t:return N}}}return tt.ContextConsumer=o,tt.ContextProvider=l,tt.Element=e,tt.ForwardRef=c,tt.Fragment=r,tt.Lazy=y,tt.Memo=p,tt.Portal=t,tt.Profiler=i,tt.StrictMode=n,tt.Suspense=f,tt.SuspenseList=m,tt.isContextConsumer=function(w){return j(w)===o},tt.isContextProvider=function(w){return j(w)===l},tt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},tt.isForwardRef=function(w){return j(w)===c},tt.isFragment=function(w){return j(w)===r},tt.isLazy=function(w){return j(w)===y},tt.isMemo=function(w){return j(w)===p},tt.isPortal=function(w){return j(w)===t},tt.isProfiler=function(w){return j(w)===i},tt.isStrictMode=function(w){return j(w)===n},tt.isSuspense=function(w){return j(w)===f},tt.isSuspenseList=function(w){return j(w)===m},tt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===n||w===f||w===m||typeof w=="object"&&w!==null&&(w.$$typeof===y||w.$$typeof===p||w.$$typeof===l||w.$$typeof===o||w.$$typeof===c||w.$$typeof===x||w.getModuleId!==void 0)},tt.typeOf=j,tt}var YT;function JZ(){return YT||(YT=1,q0.exports=WZ()),q0.exports}var eW=JZ(),VT=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",QT=null,H0=null,QD=e=>{if(e===QT&&Array.isArray(H0))return H0;var t=[];return S.Children.forEach(e,r=>{ht(r)||(eW.isFragment(r)?t=t.concat(QD(r.props.children)):t.push(r))}),H0=t,QT=e,t};function tW(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>VT(i)):n=[VT(t)],QD(e).forEach(i=>{var o=ql(i,"type.displayName")||ql(i,"type.name");o&&n.indexOf(o)!==-1&&r.push(i)}),r}var XD=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,F0={},XT;function rW(){return XT||(XT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var i;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const o=r[Symbol.toStringTag];return o==null||!((i=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&i.writable)?!1:r.toString()===`[object ${o}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(F0)),F0}var K0,ZT;function nW(){return ZT||(ZT=1,K0=rW().isPlainObject),K0}var aW=nW();const iW=ns(aW);var WT,JT,eC,tC,rC;function nC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function aC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nC(Object(r),!0).forEach(function(n){sW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sW(e,t,r){return(t=oW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oW(e){var t=lW(e,"string");return typeof t=="symbol"?t:t+""}function lW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;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 r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Nm.apply(null,arguments)}function xc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var iC=(e,t,r,n,i)=>{var o=r-n,l;return l=bt(WT||(WT=xc(["M ",",",""])),e,t),l+=bt(JT||(JT=xc(["L ",",",""])),e+r,t),l+=bt(eC||(eC=xc(["L ",",",""])),e+r-o/2,t+i),l+=bt(tC||(tC=xc(["L ",",",""])),e+r-o/2-n,t+i),l+=bt(rC||(rC=xc(["L ",","," Z"])),e,t),l},uW={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},cW=e=>{var t=or(e,uW),{x:r,y:n,upperWidth:i,lowerWidth:o,height:l,className:c}=t,{animationEasing:f,animationDuration:m,animationBegin:p,isUpdateAnimationActive:y}=t,v=S.useRef(null),[x,j]=S.useState(-1),w=S.useRef(i),N=S.useRef(o),O=S.useRef(l),P=S.useRef(r),E=S.useRef(n),A=dp(e,"trapezoid-");if(S.useEffect(()=>{if(v.current&&v.current.getTotalLength)try{var Q=v.current.getTotalLength();Q&&j(Q)}catch{}},[]),r!==+r||n!==+n||i!==+i||o!==+o||l!==+l||i===0&&o===0||l===0)return null;var T=Xe("recharts-trapezoid",c);if(!y)return S.createElement("g",null,S.createElement("path",Nm({},Nr(t),{className:T,d:iC(r,n,i,o,l)})));var M=w.current,R=N.current,D=O.current,I=P.current,k=E.current,H="0px ".concat(x===-1?1:x,"px"),q="".concat(x,"px ").concat(x,"px"),ae=s4(["strokeDasharray"],m,f);return S.createElement(cp,{animationId:A,key:A,canBegin:x>0,duration:m,easing:f,isActive:y,begin:p},Q=>{var Z=jt(M,i,Q),B=jt(R,o,Q),K=jt(D,l,Q),ee=jt(I,r,Q),se=jt(k,n,Q);v.current&&(w.current=Z,N.current=B,O.current=K,P.current=ee,E.current=se);var ue=Q>0?{transition:ae,strokeDasharray:q}:{strokeDasharray:H};return S.createElement("path",Nm({},Nr(t),{className:T,d:iC(ee,se,Z,B,K),ref:v,style:aC(aC({},ue),t.style)}))})},dW=["option","shapeType","activeClassName","inActiveClassName"];function fW(e,t){if(e==null)return{};var r,n,i=hW(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function hW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function sC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Om(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sC(Object(r),!0).forEach(function(n){mW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mW(e,t,r){return(t=pW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function pW(e){var t=yW(e,"string");return typeof t=="symbol"?t:t+""}function yW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vW(e,t){return Om(Om({},t),e)}function gW(e,t){return e==="symbols"}function oC(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return S.createElement(c4,r);case"trapezoid":return S.createElement(cW,r);case"sector":return S.createElement(h4,r);case"symbols":if(gW(t))return S.createElement(lj,r);break;case"curve":return S.createElement(i4,r);default:return null}}function xW(e){return S.isValidElement(e)?e.props:e}function ZD(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=fW(e,dW),l;if(S.isValidElement(t))l=S.cloneElement(t,Om(Om({},o),xW(t)));else if(typeof t=="function")l=t(o,o.index);else if(iW(t)&&typeof t!="boolean"){var c=vW(t,o);l=S.createElement(oC,{shapeType:r,elementProps:c})}else{var f=o;l=S.createElement(oC,{shapeType:r,elementProps:f})}return o.isActive?S.createElement(rn,{className:n},l):S.createElement(rn,{className:i},l)}var WD=(e,t,r)=>{var n=ut();return(i,o)=>l=>{e==null||e(i,o,l),n(iD({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},JD=e=>{var t=ut();return(r,n)=>i=>{e==null||e(r,n,i),t(IV())}},ek=(e,t,r)=>{var n=ut();return(i,o)=>l=>{e==null||e(i,o,l),n(LV({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function tk(e){var{tooltipEntrySettings:t}=e,r=ut(),n=vr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(MV(t)):i.current!==t&&r(RV({prev:i.current,next:t})),i.current=t)},[t,r,n]),S.useLayoutEffect(()=>()=>{i.current&&(r(DV(i.current)),i.current=null)},[r]),null}function rk(e){var{legendPayload:t}=e,r=ut(),n=vr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(wH(t)):i.current!==t&&r(SH({prev:i.current,next:t})),i.current=t)},[r,n,t]),S.useLayoutEffect(()=>()=>{i.current&&(r(NH(i.current)),i.current=null)},[r]),null}var G0,bW=()=>{var[e]=S.useState(()=>$c("uid-"));return e},jW=(G0=QL.useId)!==null&&G0!==void 0?G0:bW;function wW(e,t){var r=jW();return t||(e?"".concat(e,"-").concat(r):r)}var SW=S.createContext(void 0),nk=e=>{var{id:t,type:r,children:n}=e,i=wW("recharts-".concat(r),t);return S.createElement(SW.Provider,{value:i},n(i))},NW={cartesianItems:[],polarItems:[]},ak=yr({name:"graphicalItems",initialState:NW,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ot()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sn(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:ot()},removeCartesianGraphicalItem:{reducer(e,t){var r=Sn(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ot()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ot()},removePolarGraphicalItem:{reducer(e,t){var r=Sn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ot()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=Sn(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:ot()}}}),{addCartesianGraphicalItem:OW,replaceCartesianGraphicalItem:_W,removeCartesianGraphicalItem:EW,addPolarGraphicalItem:Kie,removePolarGraphicalItem:Gie,replacePolarGraphicalItem:Yie}=ak.actions,AW=ak.reducer,PW=e=>{var t=ut(),r=S.useRef(null);return S.useLayoutEffect(()=>{r.current===null?t(OW(e)):r.current!==e&&t(_W({prev:r.current,next:e})),r.current=e},[t,e]),S.useLayoutEffect(()=>()=>{r.current&&(t(EW(r.current)),r.current=null)},[t]),null},ik=S.memo(PW),TW=["points"];function lC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Y0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lC(Object(r),!0).forEach(function(n){CW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CW(e,t,r){return(t=MW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MW(e){var t=RW(e,"string");return typeof t=="symbol"?t:t+""}function RW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_m.apply(null,arguments)}function DW(e,t){if(e==null)return{};var r,n,i=kW(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function kW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function IW(e){var{option:t,dotProps:r,className:n}=e;if(S.isValidElement(t))return S.cloneElement(t,r);if(typeof t=="function")return t(r);var i=Xe(n,typeof t!="boolean"?t.className:""),o=r??{},{points:l}=o,c=DW(o,TW);return S.createElement(YD,_m({},c,{className:i}))}function LW(e,t){return e==null?!1:t?!0:e.length===1}function $W(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:o,baseProps:l,needClip:c,clipPathId:f,zIndex:m=Kt.scatter}=e;if(!LW(t,r))return null;var p=XD(r),y=l6(r),v=t.map((j,w)=>{var N,O,P=Y0(Y0(Y0({r:3},l),y),{},{index:w,cx:(N=j.x)!==null&&N!==void 0?N:void 0,cy:(O=j.y)!==null&&O!==void 0?O:void 0,dataKey:o,value:j.value,payload:j.payload,points:t});return S.createElement(IW,{key:"dot-".concat(w),option:r,dotProps:P,className:i})}),x={};return c&&f!=null&&(x.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),S.createElement(En,{zIndex:m},S.createElement(rn,_m({className:n},x),v))}function uC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uC(Object(r),!0).forEach(function(n){zW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zW(e,t,r){return(t=BW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BW(e){var t=UW(e,"string");return typeof t=="symbol"?t:t+""}function UW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sk=0,qW={xAxis:{},yAxis:{},zAxis:{}},ok=yr({name:"cartesianAxis",initialState:qW,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ot()},replaceXAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.xAxis[r.id],e.xAxis[n.id]=n)},prepare:ot()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ot()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ot()},replaceYAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.yAxis[r.id],e.yAxis[n.id]=n)},prepare:ot()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ot()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ot()},replaceZAxis:{reducer(e,t){var{prev:r,next:n}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==n.id&&delete e.zAxis[r.id],e.zAxis[n.id]=n)},prepare:ot()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ot()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var o,l=i.widthHistory||[];if(l.length===3&&l[0]===l[2]&&n===l[1]&&n!==i.width&&Math.abs(n-((o=l[0])!==null&&o!==void 0?o:0))<=1)return;var c=[...l,n].slice(-3);e.yAxis[r]=cC(cC({},i),{},{width:n,widthHistory:c})}}}}),{addXAxis:HW,replaceXAxis:FW,removeXAxis:KW,addYAxis:GW,replaceYAxis:YW,removeYAxis:VW,addZAxis:Vie,replaceZAxis:Qie,removeZAxis:Xie,updateYAxisWidth:QW}=ok.actions,XW=ok.reducer,ZW=V([Yt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),WW=V([ZW,Za,Wa],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),Pw=()=>ge(WW),JW=()=>ge(MQ);function dC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function V0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dC(Object(r),!0).forEach(function(n){eJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eJ(e,t,r){return(t=tJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tJ(e){var t=rJ(e,"string");return typeof t=="symbol"?t:t+""}function rJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nJ=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:o,clipPath:l}=e;if(i===!1||t.x==null||t.y==null)return null;var c={index:r,dataKey:o,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=V0(V0(V0({},c),ld(i)),uj(i)),m;return S.isValidElement(i)?m=S.cloneElement(i,f):typeof i=="function"?m=i(f):m=S.createElement(YD,f),S.createElement(rn,{className:"recharts-active-dot",clipPath:l},m)};function aJ(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:o,zIndex:l=Kt.activeDot}=e,c=ge(uo),f=JW();if(t==null||f==null)return null;var m=t.find(p=>f.includes(p.payload));return ht(m)?null:S.createElement(En,{zIndex:l},S.createElement(nJ,{point:m,childIndex:Number(c),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var fC=(e,t,r)=>{var n=r??e;if(!ht(n))return Ln(n,t,0)},iJ=(e,t,r)=>{var n={},i=e.filter(vp),o=e.filter(m=>m.stackId==null),l=i.reduce((m,p)=>{var y=m[p.stackId];return y==null&&(y=[]),y.push(p),m[p.stackId]=y,m},n),c=Object.entries(l).map(m=>{var p,[y,v]=m,x=v.map(w=>w.dataKey),j=fC(t,r,(p=v[0])===null||p===void 0?void 0:p.barSize);return{stackId:y,dataKeys:x,barSize:j}}),f=o.map(m=>{var p=[m.dataKey].filter(v=>v!=null),y=fC(t,r,m.barSize);return{stackId:void 0,dataKeys:p,barSize:y}});return[...c,...f]};function hC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hC(Object(r),!0).forEach(function(n){sJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sJ(e,t,r){return(t=oJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oJ(e){var t=lJ(e,"string");return typeof t=="symbol"?t:t+""}function lJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uJ(e,t,r,n,i){var o,l=n.length;if(!(l<1)){var c=Ln(e,r,0,!0),f,m=[];if(Be((o=n[0])===null||o===void 0?void 0:o.barSize)){var p=!1,y=r/l,v=n.reduce((P,E)=>P+(E.barSize||0),0);v+=(l-1)*c,v>=r&&(v-=(l-1)*c,c=0),v>=r&&y>0&&(p=!0,y*=.9,v=l*y);var x=(r-v)/2>>0,j={offset:x-c,size:0};f=n.reduce((P,E)=>{var A,T={stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:j.offset+j.size+c,size:p?y:(A=E.barSize)!==null&&A!==void 0?A:0}},M=[...P,T];return j=T.position,M},m)}else{var w=Ln(t,r,0,!0);r-2*w-(l-1)*c<=0&&(c=0);var N=(r-2*w-(l-1)*c)/l;N>1&&(N>>=0);var O=Be(i)?Math.min(N,i):N;f=n.reduce((P,E,A)=>[...P,{stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:w+(N+c)*A+(N-O)/2,size:O}}],m)}return f}}var cJ=(e,t,r,n,i,o,l)=>{var c=ht(l)?t:l,f=uJ(r,n,i!==o?i:o,e,c);return i!==o&&f!=null&&(f=f.map(m=>fh(fh({},m),{},{position:fh(fh({},m.position),{},{offset:m.position.offset-i/2})}))),f},dJ=(e,t)=>{var r=Ij(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:o}=i;if(o)return o.find(l=>l.key===r)}}}},fJ=(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function hJ(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Be(e.zIndex)?e.zIndex:t}var mJ=e=>{var{chartData:t}=e,r=ut(),n=vr();return S.useEffect(()=>n?()=>{}:(r(ET(t)),()=>{r(ET(void 0))}),[t,r,n]),null},mC={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},lk=yr({name:"brush",initialState:mC,reducers:{setBrushSettings(e,t){return t.payload==null?mC:t.payload}}}),{setBrushSettings:Zie}=lk.actions,pJ=lk.reducer;function yJ(e){return(e%180+180)%180}var vJ=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=yJ(i),l=o*Math.PI/180,c=Math.atan(n/r),f=l>c&&l<Math.PI-c?n/Math.sin(l):r/Math.cos(l);return Math.abs(f)},gJ={dots:[],areas:[],lines:[]},uk=yr({name:"referenceElements",initialState:gJ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Sn(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Sn(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Sn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:Wie,removeDot:Jie,addArea:ese,removeArea:tse,addLine:rse,removeLine:nse}=uk.actions,xJ=uk.reducer,bJ=S.createContext(void 0),jJ=e=>{var{children:t}=e,[r]=S.useState("".concat($c("recharts"),"-clip")),n=Pw();if(n==null)return null;var{x:i,y:o,width:l,height:c}=n;return S.createElement(bJ.Provider,{value:r},S.createElement("defs",null,S.createElement("clipPath",{id:r},S.createElement("rect",{x:i,y:o,height:c,width:l}))),t)};function ck(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],n=0;n<e.length;n+=t){var i=e[n];i!==void 0&&r.push(i)}return r}function wJ(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return vJ(n,r)}function SJ(e,t,r){var n=r==="width",{x:i,y:o,width:l,height:c}=e;return t===1?{start:n?i:o,end:n?i+l:o+c}:{start:n?i+l:o+c,end:n?i:o}}function Wc(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var o=r();return e*(t-e*o/2-n)>=0&&e*(t+e*o/2-i)<=0}function NJ(e,t){return ck(e,t+1)}function OJ(e,t,r,n,i){for(var o=(n||[]).slice(),{start:l,end:c}=t,f=0,m=1,p=l,y=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:ck(n,m)};var w=f,N,O=()=>(N===void 0&&(N=r(j,w)),N),P=j.coordinate,E=f===0||Wc(e,P,O,p,c);E||(f=0,p=l,m+=1),E&&(p=P+e*(O()/2+i),f+=m)},v;m<=o.length;)if(v=y(),v)return v.v;return[]}function _J(e,t,r,n,i){var o=(n||[]).slice(),l=o.length;if(l===0)return[];for(var{start:c,end:f}=t,m=1;m<=l;m++){for(var p=(l-1)%m,y=c,v=!0,x=function(){var A=n[w];if(A==null)return 0;var T=w,M,R=()=>(M===void 0&&(M=r(A,T)),M),D=A.coordinate,I=w===p||Wc(e,D,R,y,f);if(!I)return v=!1,1;I&&(y=D+e*(R()/2+i))},j,w=p;w<l&&(j=x(),!(j!==0&&j===1));w+=m);if(v){for(var N=[],O=p;O<l;O+=m){var P=n[O];P!=null&&N.push(P)}return N}}return[]}function pC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pC(Object(r),!0).forEach(function(n){EJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EJ(e,t,r){return(t=AJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AJ(e){var t=PJ(e,"string");return typeof t=="symbol"?t:t+""}function PJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TJ(e,t,r,n,i){for(var o=(n||[]).slice(),l=o.length,{start:c}=t,{end:f}=t,m=function(v){var x=o[v];if(x==null)return 1;var j=x,w,N=()=>(w===void 0&&(w=r(x,v)),w);if(v===l-1){var O=e*(j.coordinate+e*N()/2-f);o[v]=j=fr(fr({},j),{},{tickCoord:O>0?j.coordinate-O*e:j.coordinate})}else o[v]=j=fr(fr({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var P=Wc(e,j.tickCoord,N,c,f);P&&(f=j.tickCoord-e*(N()/2+i),o[v]=fr(fr({},j),{},{isShow:!0}))}},p=l-1;p>=0;p--)m(p);return o}function CJ(e,t,r,n,i,o){var l=(n||[]).slice(),c=l.length,{start:f,end:m}=t;if(o){var p=n[c-1];if(p!=null){var y=r(p,c-1),v=e*(p.coordinate+e*y/2-m);if(l[c-1]=p=fr(fr({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate}),p.tickCoord!=null){var x=Wc(e,p.tickCoord,()=>y,f,m);x&&(m=p.tickCoord-e*(y/2+i),l[c-1]=fr(fr({},p),{},{isShow:!0}))}}}for(var j=o?c-1:c,w=function(P){var E=l[P];if(E==null)return 1;var A=E,T,M=()=>(T===void 0&&(T=r(E,P)),T);if(P===0){var R=e*(A.coordinate-e*M()/2-f);l[P]=A=fr(fr({},A),{},{tickCoord:R<0?A.coordinate-R*e:A.coordinate})}else l[P]=A=fr(fr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var D=Wc(e,A.tickCoord,M,f,m);D&&(f=A.tickCoord+e*(M()/2+i),l[P]=fr(fr({},A),{},{isShow:!0}))}},N=0;N<j;N++)w(N);return l}function Tw(e,t,r){var{tick:n,ticks:i,viewBox:o,minTickGap:l,orientation:c,interval:f,tickFormatter:m,unit:p,angle:y}=e;if(!i||!i.length||!n)return[];if(pe(f)||pd.isSsr){var v;return(v=NJ(i,pe(f)?f:0))!==null&&v!==void 0?v:[]}var x=[],j=c==="top"||c==="bottom"?"width":"height",w=p&&j==="width"?Ac(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},N=(T,M)=>{var R=typeof m=="function"?m(T.value,M):T.value;return j==="width"?wJ(Ac(R,{fontSize:t,letterSpacing:r}),w,y):Ac(R,{fontSize:t,letterSpacing:r})[j]},O=i[0],P=i[1],E=i.length>=2&&O!=null&&P!=null?zr(P.coordinate-O.coordinate):1,A=SJ(o,E,j);return f==="equidistantPreserveStart"?OJ(E,A,N,i,l):f==="equidistantPreserveEnd"?_J(E,A,N,i,l):(f==="preserveStart"||f==="preserveStartEnd"?x=CJ(E,A,N,i,l,f==="preserveStartEnd"):x=TJ(E,A,N,i,l),x.filter(T=>T.isShow))}var MJ=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:o=0}=e,l=0;if(t){Array.from(t).forEach(p=>{if(p){var y=p.getBoundingClientRect();y.width>l&&(l=y.width)}});var c=r?r.getBoundingClientRect().width:0,f=i+o,m=l+f+c+(r?n:0);return Math.round(m)}return 0},RJ={xAxis:{},yAxis:{}},dk=yr({name:"renderedTicks",initialState:RJ,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:n,ticks:i}=t.payload;e[r][n]=i},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:n}=t.payload;delete e[r][n]}}}),{setRenderedTicks:DJ,removeRenderedTicks:kJ}=dk.actions,IJ=dk.reducer,LJ=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function $J(e,t){if(e==null)return{};var r,n,i=zJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function zJ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function co(){return co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},co.apply(null,arguments)}function yC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yC(Object(r),!0).forEach(function(n){BJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function BJ(e,t,r){return(t=UJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UJ(e){var t=qJ(e,"string");return typeof t=="symbol"?t:t+""}function qJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fa={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Kt.axis};function HJ(e){var{x:t,y:r,width:n,height:i,orientation:o,mirror:l,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var m=xt(xt(xt({},f),In(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!l||o==="bottom"&&l);m=xt(xt({},m),{},{x1:t,y1:r+p*i,x2:t+n,y2:r+p*i})}else{var y=+(o==="left"&&!l||o==="right"&&l);m=xt(xt({},m),{},{x1:t+y*n,y1:r,x2:t+y*n,y2:r+i})}return S.createElement("line",co({},m,{className:Xe("recharts-cartesian-axis-line",ql(c,"className"))}))}function FJ(e,t,r,n,i,o,l,c,f){var m,p,y,v,x,j,w=c?-1:1,N=e.tickSize||l,O=pe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":m=p=e.coordinate,v=r+ +!c*i,y=v-w*N,j=y-w*f,x=O;break;case"left":y=v=e.coordinate,p=t+ +!c*n,m=p-w*N,x=m-w*f,j=O;break;case"right":y=v=e.coordinate,p=t+ +c*n,m=p+w*N,x=m+w*f,j=O;break;default:m=p=e.coordinate,v=r+ +c*i,y=v+w*N,j=y+w*f,x=O;break}return{line:{x1:m,y1:y,x2:p,y2:v},tick:{x,y:j}}}function KJ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function GJ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function YJ(e){var{option:t,tickProps:r,value:n}=e,i,o=Xe(r.className,"recharts-cartesian-axis-tick-value");if(S.isValidElement(t))i=S.cloneElement(t,xt(xt({},r),{},{className:o}));else if(typeof t=="function")i=t(xt(xt({},r),{},{className:o}));else{var l="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(l=Xe(l,ZZ(t))),i=S.createElement(Ew,co({},r,{className:l}),n)}return i}function VJ(e){var{ticks:t,axisType:r,axisId:n}=e,i=ut();return S.useEffect(()=>{if(n==null||r==null)return mo;var o=t.map(l=>({value:l.value,coordinate:l.coordinate,offset:l.offset,index:l.index}));return i(DJ({ticks:o,axisId:n,axisType:r})),()=>{i(kJ({axisId:n,axisType:r}))}},[i,t,n,r]),null}var QJ=S.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:o,tickFormatter:l,unit:c,padding:f,tickTextProps:m,orientation:p,mirror:y,x:v,y:x,width:j,height:w,tickSize:N,tickMargin:O,fontSize:P,letterSpacing:E,getTicksConfig:A,events:T,axisType:M,axisId:R}=e,D=Tw(xt(xt({},A),{},{ticks:r}),P,E),I=In(A),k=ld(n),H=LD(I.textAnchor)?I.textAnchor:KJ(p,y),q=GJ(p,y),ae={};typeof i=="object"&&(ae=i);var Q=xt(xt({},I),{},{fill:"none"},ae),Z=D.map(ee=>xt({entry:ee},FJ(ee,v,x,j,w,p,N,y,O))),B=Z.map(ee=>{var{entry:se,line:ue}=ee;return S.createElement(rn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(se.value,"-").concat(se.coordinate,"-").concat(se.tickCoord)},i&&S.createElement("line",co({},Q,ue,{className:Xe("recharts-cartesian-axis-tick-line",ql(i,"className"))})))}),K=Z.map((ee,se)=>{var ue,L,{entry:W,tick:le}=ee,oe=xt(xt(xt(xt({verticalAnchor:q},I),{},{textAnchor:H,stroke:"none",fill:o},le),{},{index:se,payload:W,visibleTicksCount:D.length,tickFormatter:l,padding:f},m),{},{angle:(ue=(L=m==null?void 0:m.angle)!==null&&L!==void 0?L:I.angle)!==null&&ue!==void 0?ue:0}),ye=xt(xt({},oe),k);return S.createElement(rn,co({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(W.value,"-").concat(W.coordinate,"-").concat(W.tickCoord)},Fm(T,W,se)),n&&S.createElement(YJ,{option:n,tickProps:ye,value:"".concat(typeof l=="function"?l(W.value,se):W.value).concat(c||"")}))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(M,"-ticks")},S.createElement(VJ,{ticks:D,axisId:R,axisType:M}),K.length>0&&S.createElement(En,{zIndex:Kt.label},S.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(M,"-tick-labels"),ref:t},K)),B.length>0&&S.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(M,"-tick-lines")},B))}),XJ=S.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:o,hide:l,ticks:c,axisType:f,axisId:m}=e,p=$J(e,LJ),[y,v]=S.useState(""),[x,j]=S.useState(""),w=S.useRef(null);S.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var O;return MJ({ticks:w.current,label:(O=e.labelRef)===null||O===void 0?void 0:O.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var N=S.useCallback(O=>{if(O){var P=O.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=P;var E=P[0];if(E){var A=window.getComputedStyle(E),T=A.fontSize,M=A.letterSpacing;(T!==y||M!==x)&&(v(T),j(M))}}},[y,x]);return l||n!=null&&n<=0||i!=null&&i<=0?null:S.createElement(En,{zIndex:e.zIndex},S.createElement(rn,{className:Xe("recharts-cartesian-axis",o)},S.createElement(HJ,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:In(e)}),S.createElement(QJ,{ref:N,axisType:f,events:p,fontSize:y,getTicksConfig:e,height:e.height,letterSpacing:x,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:m}),S.createElement(MZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},S.createElement(qZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Cw=S.forwardRef((e,t)=>{var r=or(e,Fa);return S.createElement(XJ,co({},r,{ref:t}))});Cw.displayName="CartesianAxis";var ZJ=["x1","y1","x2","y2","key"],WJ=["offset"],JJ=["xAxisId","yAxisId"],eee=["xAxisId","yAxisId"];function vC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(r),!0).forEach(function(n){tee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tee(e,t,r){return(t=ree(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ree(e){var t=nee(e,"string");return typeof t=="symbol"?t:t+""}function nee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$s.apply(null,arguments)}function Em(e,t){if(e==null)return{};var r,n,i=aee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function aee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var iee=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:o,height:l,ry:c}=e;return S.createElement("rect",{x:n,y:i,ry:c,width:o,height:l,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function fk(e){var{option:t,lineItemProps:r}=e,n;if(S.isValidElement(t))n=S.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:o,y1:l,x2:c,y2:f,key:m}=r,p=Em(r,ZJ),y=(i=In(p))!==null&&i!==void 0?i:{},{offset:v}=y,x=Em(y,WJ);n=S.createElement("line",$s({},x,{x1:o,y1:l,x2:c,y2:f,fill:"none",key:m}))}return n}function see(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:o,yAxisId:l}=e,c=Em(e,JJ),f=i.map((m,p)=>{var y=hr(hr({},c),{},{x1:t,y1:m,x2:t+r,y2:m,key:"line-".concat(p),index:p});return S.createElement(fk,{key:"line-".concat(p),option:n,lineItemProps:y})});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function oee(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:o,yAxisId:l}=e,c=Em(e,eee),f=i.map((m,p)=>{var y=hr(hr({},c),{},{x1:m,y1:t,x2:m,y2:t+r,key:"line-".concat(p),index:p});return S.createElement(fk,{option:n,lineItemProps:y,key:"line-".concat(p)})});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function lee(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:o,height:l,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!t||!t.length||c==null)return null;var m=c.map(y=>Math.round(y+i-i)).sort((y,v)=>y-v);i!==m[0]&&m.unshift(0);var p=m.map((y,v)=>{var x=m[v+1],j=x==null,w=j?i+l-y:x-y;if(w<=0)return null;var N=v%t.length;return S.createElement("rect",{key:"react-".concat(v),y,x:n,height:w,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function uee(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:o,width:l,height:c,verticalPoints:f}=e;if(!t||!r||!r.length)return null;var m=f.map(y=>Math.round(y+i-i)).sort((y,v)=>y-v);i!==m[0]&&m.unshift(0);var p=m.map((y,v)=>{var x=m[v+1],j=x==null,w=j?i+l-y:x-y;if(w<=0)return null;var N=v%r.length;return S.createElement("rect",{key:"react-".concat(v),x:y,y:o,width:w,height:c,stroke:"none",fill:r[N],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var cee=(e,t)=>{var{xAxis:r,width:n,height:i,offset:o}=e;return BR(Tw(hr(hr(hr({},Fa),r),{},{ticks:UR(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},dee=(e,t)=>{var{yAxis:r,width:n,height:i,offset:o}=e;return BR(Tw(hr(hr(hr({},Fa),r),{},{ticks:UR(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},fee={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Kt.grid};function Tp(e){var t=wj(),r=Sj(),n=GR(),i=hr(hr({},or(e,fee)),{},{x:pe(e.x)?e.x:n.left,y:pe(e.y)?e.y:n.top,width:pe(e.width)?e.width:n.width,height:pe(e.height)?e.height:n.height}),{xAxisId:o,yAxisId:l,x:c,y:f,width:m,height:p,syncWithTicks:y,horizontalValues:v,verticalValues:x}=i,j=vr(),w=ge(I=>mT(I,"xAxis",o,j)),N=ge(I=>mT(I,"yAxis",l,j));if(!oa(m)||!oa(p)||!pe(c)||!pe(f))return null;var O=i.verticalCoordinatesGenerator||cee,P=i.horizontalCoordinatesGenerator||dee,{horizontalPoints:E,verticalPoints:A}=i;if((!E||!E.length)&&typeof P=="function"){var T=v&&v.length,M=P({yAxis:N?hr(hr({},N),{},{ticks:T?v:N.ticks}):void 0,width:t??m,height:r??p,offset:n},T?!0:y);Wh(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(E=M)}if((!A||!A.length)&&typeof O=="function"){var R=x&&x.length,D=O({xAxis:w?hr(hr({},w),{},{ticks:R?x:w.ticks}):void 0,width:t??m,height:r??p,offset:n},R?!0:y);Wh(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(A=D)}return S.createElement(En,{zIndex:i.zIndex},S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(iee,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),S.createElement(lee,$s({},i,{horizontalPoints:E})),S.createElement(uee,$s({},i,{verticalPoints:A})),S.createElement(see,$s({},i,{offset:n,horizontalPoints:E,xAxis:w,yAxis:N})),S.createElement(oee,$s({},i,{offset:n,verticalPoints:A,xAxis:w,yAxis:N}))))}Tp.displayName="CartesianGrid";var hee={},hk=yr({name:"errorBars",initialState:hee,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(o=>o.dataKey===n.dataKey&&o.direction===n.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:ase,replaceErrorBar:ise,removeErrorBar:sse}=hk.actions,mee=hk.reducer,pee=["children"];function yee(e,t){if(e==null)return{};var r,n,i=vee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function vee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var gee={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},xee=S.createContext(gee);function mk(e){var{children:t}=e,r=yee(e,pee);return S.createElement(xee.Provider,{value:r},t)}function Mw(e,t){var r,n,i=ge(m=>ei(m,e)),o=ge(m=>ti(m,t)),l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:kt.allowDataOverflow,c=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:It.allowDataOverflow,f=l||c;return{needClip:f,needClipX:l,needClipY:c}}function pk(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Pw(),{needClipX:o,needClipY:l,needClip:c}=Mw(t,r);if(!c||!i)return null;var{x:f,y:m,width:p,height:y}=i;return S.createElement("clipPath",{id:"clipPath-".concat(n)},S.createElement("rect",{x:o?f:f-p/2,y:l?m:m-y/2,width:o?p:p*2,height:l?y:y*2}))}var yk=(e,t,r,n)=>ts(e,"xAxis",t,n),vk=(e,t,r,n)=>es(e,"xAxis",t,n),gk=(e,t,r,n)=>ts(e,"yAxis",r,n),xk=(e,t,r,n)=>es(e,"yAxis",r,n),bee=V([Ze,yk,gk,vk,xk],(e,t,r,n,i)=>Xa(e,"xAxis")?Fl(t,n,!1):Fl(r,i,!1)),jee=(e,t,r,n,i)=>i;function wee(e){return e.type==="line"}var See=V([_p,jee],(e,t)=>e.filter(wee).find(r=>r.id===t)),Nee=V([Ze,yk,gk,vk,xk,See,bee,yd],(e,t,r,n,i,o,l,c)=>{var{chartData:f,dataStartIndex:m,dataEndIndex:p}=c;if(!(o==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||l==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:y,data:v}=o,x;if(v!=null&&v.length>0?x=v:x=f==null?void 0:f.slice(m,p+1),x!=null)return Kee({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:y,bandSize:l,displayedData:x})}});function Oee(e){var t=ld(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:o}=t,l=Number(i),c=Number(o);return(Number.isNaN(l)||l<0)&&(l=r),(Number.isNaN(c)||c<0)&&(c=n),{r:l,strokeWidth:c}}return{r,strokeWidth:n}}var _ee=["id"],Eee=["type","layout","connectNulls","needClip","shape"],Aee=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jc.apply(null,arguments)}function gC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gC(Object(r),!0).forEach(function(n){Pee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Pee(e,t,r){return(t=Tee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tee(e){var t=Cee(e,"string");return typeof t=="symbol"?t:t+""}function Cee(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Rw(e,t){if(e==null)return{};var r,n,i=Mee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Mee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ree=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:tp(r,t),payload:e}]},Dee=S.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:o,name:l,hide:c,unit:f,tooltipType:m,id:p}=e,y={dataDefinedOnItem:r,getPosition:mo,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:tp(l,t),hide:c,type:m,color:n,unit:f,graphicalItemId:p}};return S.createElement(tk,{tooltipEntrySettings:y})}),bk=(e,t)=>"".concat(t,"px ").concat(e,"px");function kee(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var Iee=(e,t,r)=>{var n=r.reduce((v,x)=>v+x,0);if(!n)return bk(t,e);for(var i=Math.floor(e/n),o=e%n,l=[],c=0,f=0;c<r.length;f+=(m=r[c])!==null&&m!==void 0?m:0,++c){var m,p=r[c];if(p!=null&&f+p>o){l=[...r.slice(0,c),o-f];break}}var y=l.length%2===0?[0,t]:[t];return[...kee(r,i),...l,...y].map(v=>"".concat(v,"px")).join(", ")};function Lee(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:o,needClip:l}=n,{id:c}=n,f=Rw(n,_ee),m=In(f);return S.createElement($W,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:m,needClip:l,clipPathId:t})}function $ee(e){var{showLabels:t,children:r,points:n}=e,i=S.useMemo(()=>n==null?void 0:n.map(o=>{var l,c,f={x:(l=o.x)!==null&&l!==void 0?l:0,y:(c=o.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ea(ea({},f),{},{value:o.value,payload:o.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[n]);return S.createElement(FD,{value:t?i:void 0},r)}function xC(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:o}=e,{type:l,layout:c,connectNulls:f,needClip:m,shape:p}=o,y=Rw(o,Eee),v=ea(ea({},Nr(y)),{},{fill:"none",className:"recharts-line-curve",clipPath:m?"url(#clipPath-".concat(t,")"):void 0,points:n,type:l,layout:c,connectNulls:f,strokeDasharray:i??o.strokeDasharray});return S.createElement(S.Fragment,null,(n==null?void 0:n.length)>1&&S.createElement(ZD,Jc({shapeType:"curve",option:p},v,{pathRef:r})),S.createElement(Lee,{points:n,clipPathId:t,props:o}))}function zee(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Bee(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:c,isAnimationActive:f,animationBegin:m,animationDuration:p,animationEasing:y,animateNewValues:v,width:x,height:j,onAnimationEnd:w,onAnimationStart:N}=r,O=i.current,P=dp(l,"recharts-line-"),E=S.useRef(P),[A,T]=S.useState(!1),M=!A,R=S.useCallback(()=>{typeof w=="function"&&w(),T(!1)},[w]),D=S.useCallback(()=>{typeof N=="function"&&N(),T(!0)},[N]),I=zee(n.current),k=S.useRef(0);E.current!==P&&(k.current=o.current,E.current=P);var H=k.current;return S.createElement($ee,{points:l,showLabels:M},r.children,S.createElement(cp,{animationId:P,begin:m,duration:p,isActive:f,easing:y,onAnimationEnd:R,onAnimationStart:D,key:P},q=>{var ae=jt(H,I+H,q),Q=Math.min(ae,I),Z;if(f)if(c){var B="".concat(c).split(/[,\s]+/gim).map(se=>parseFloat(se));Z=Iee(Q,I,B)}else Z=bk(I,Q);else Z=c==null?void 0:String(c);if(q>0&&I>0&&(i.current=l,o.current=Math.max(o.current,Q)),O){var K=O.length/l.length,ee=q===1?l:l.map((se,ue)=>{var L=Math.floor(ue*K);if(O[L]){var W=O[L];return ea(ea({},se),{},{x:jt(W.x,se.x,q),y:jt(W.y,se.y,q)})}return v?ea(ea({},se),{},{x:jt(x*2,se.x,q),y:jt(j/2,se.y,q)}):ea(ea({},se),{},{x:se.x,y:se.y})});return i.current=ee,S.createElement(xC,{props:r,points:ee,clipPathId:t,pathRef:n,strokeDasharray:Z})}return S.createElement(xC,{props:r,points:l,clipPathId:t,pathRef:n,strokeDasharray:Z})}),S.createElement(GD,{label:r.label}))}function Uee(e){var{clipPathId:t,props:r}=e,n=S.useRef(null),i=S.useRef(0),o=S.useRef(null);return S.createElement(Bee,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:o})}var qee=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:Ot(e.payload,t)}};class Hee extends S.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:o,yAxisId:l,top:c,left:f,width:m,height:p,id:y,needClip:v,zIndex:x}=this.props;if(t)return null;var j=Xe("recharts-line",i),w=y,{r:N,strokeWidth:O}=Oee(r),P=XD(r),E=N*2+O,A=v?"url(#clipPath-".concat(P?"":"dots-").concat(w,")"):void 0;return S.createElement(En,{zIndex:x},S.createElement(rn,{className:j},v&&S.createElement("defs",null,S.createElement(pk,{clipPathId:w,xAxisId:o,yAxisId:l}),!P&&S.createElement("clipPath",{id:"clipPath-dots-".concat(w)},S.createElement("rect",{x:f-E/2,y:c-E/2,width:m+E,height:p+E}))),S.createElement(mk,{xAxisId:o,yAxisId:l,data:n,dataPointFormatter:qee,errorBarOffset:0},S.createElement(Uee,{props:this.props,clipPathId:w}))),S.createElement(aJ,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}var jk={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Kt.line,type:"linear"};function Fee(e){var t=or(e,jk),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:c,dot:f,hide:m,isAnimationActive:p,label:y,legendType:v,xAxisId:x,yAxisId:j,id:w}=t,N=Rw(t,Aee),{needClip:O}=Mw(x,j),P=Pw(),E=po(),A=vr(),T=ge(k=>Nee(k,x,j,A,w));if(E!=="horizontal"&&E!=="vertical"||T==null||P==null)return null;var{height:M,width:R,x:D,y:I}=P;return S.createElement(Hee,Jc({},N,{id:w,connectNulls:c,dot:f,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:p,hide:m,label:y,legendType:v,xAxisId:x,yAxisId:j,points:T,layout:E,height:M,width:R,left:D,top:I,needClip:O}))}function Kee(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:c,displayedData:f}=e;return f.map((m,p)=>{var y=Ot(m,l);if(t==="horizontal"){var v=sA({axis:r,ticks:i,bandSize:c,entry:m,index:p}),x=ht(y)?null:n.scale.map(y);return{x:v,y:x??null,value:y,payload:m}}var j=ht(y)?null:r.scale.map(y),w=sA({axis:n,ticks:o,bandSize:c,entry:m,index:p});return j==null||w==null?null:{x:j,y:w,value:y,payload:m}}).filter(Boolean)}function Gee(e){var t=or(e,jk),r=vr();return S.createElement(nk,{id:t.id,type:"line"},n=>S.createElement(S.Fragment,null,S.createElement(rk,{legendPayload:Ree(t)}),S.createElement(Dee,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),S.createElement(ik,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),S.createElement(Fee,Jc({},t,{id:n}))))}var wk=S.memo(Gee,ru);wk.displayName="Line";function xo(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.xAxisId)!==null&&r!==void 0?r:sk}function bo(e,t){var r,n;return(r=(n=e.graphicalItems.cartesianItems.find(i=>i.id===t))===null||n===void 0?void 0:n.yAxisId)!==null&&r!==void 0?r:sk}var Yee="Invariant failed";function Vee(e,t){throw new Error(Yee)}function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yb.apply(null,arguments)}function Dw(e){return S.createElement(ZD,yb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var Qee=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(pe(t))return t;var o=pe(n)||ht(n);return o?t(n,i):(o||Vee(),r)}},Xee=(e,t,r)=>r,Zee=(e,t)=>t,_d=V([_p,Zee],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),Wee=V([_d],e=>e==null?void 0:e.maxBarSize),Jee=(e,t,r,n)=>n,ete=V([Ze,_p,xo,bo,Xee],(e,t,r,n,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===r:o.yAxisId===n).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),tte=(e,t,r)=>{var n=Ze(e),i=xo(e,t),o=bo(e,t);if(!(i==null||o==null))return n==="horizontal"?db(e,"yAxis",o,r):db(e,"xAxis",i,r)},rte=(e,t)=>{var r=Ze(e),n=xo(e,t),i=bo(e,t);if(!(n==null||i==null))return r==="horizontal"?hT(e,"xAxis",n):hT(e,"yAxis",i)},nte=V([ete,z7,rte],iJ),ate=(e,t,r)=>{var n,i,o=_d(e,t);if(o==null)return 0;var l=xo(e,t),c=bo(e,t);if(l==null||c==null)return 0;var f=Ze(e),m=_4(e),{maxBarSize:p}=o,y=ht(p)?m:p,v,x;return f==="horizontal"?(v=ts(e,"xAxis",l,r),x=es(e,"xAxis",l,r)):(v=ts(e,"yAxis",c,r),x=es(e,"yAxis",c,r)),(n=(i=Fl(v,x,!0))!==null&&i!==void 0?i:y)!==null&&n!==void 0?n:0},Sk=(e,t,r)=>{var n=Ze(e),i=xo(e,t),o=bo(e,t);if(!(i==null||o==null)){var l,c;return n==="horizontal"?(l=ts(e,"xAxis",i,r),c=es(e,"xAxis",i,r)):(l=ts(e,"yAxis",o,r),c=es(e,"yAxis",o,r)),Fl(l,c)}},ite=V([nte,_4,$7,E4,ate,Sk,Wee],cJ),ste=(e,t,r)=>{var n=xo(e,t);if(n!=null)return ts(e,"xAxis",n,r)},ote=(e,t,r)=>{var n=bo(e,t);if(n!=null)return ts(e,"yAxis",n,r)},lte=(e,t,r)=>{var n=xo(e,t);if(n!=null)return es(e,"xAxis",n,r)},ute=(e,t,r)=>{var n=bo(e,t);if(n!=null)return es(e,"yAxis",n,r)},cte=V([ite,_d],fJ),dte=V([tte,_d],dJ),fte=V([Yt,gj,ste,ote,lte,ute,cte,Ze,T7,Sk,dte,_d,Jee],(e,t,r,n,i,o,l,c,f,m,p,y,v)=>{var{chartData:x,dataStartIndex:j,dataEndIndex:w}=f;if(!(y==null||l==null||t==null||c!=="horizontal"&&c!=="vertical"||r==null||n==null||i==null||o==null||m==null)){var{data:N}=y,O;if(N!=null&&N.length>0?O=N:O=x==null?void 0:x.slice(j,w+1),O!=null)return Bte({layout:c,barSettings:y,pos:l,parentViewBox:t,bandSize:m,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,stackedData:p,displayedData:O,offset:e,cells:v,dataStartIndex:j})}}),hte=["index"];function vb(){return vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vb.apply(null,arguments)}function mte(e,t){if(e==null)return{};var r,n,i=pte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function pte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Nk=S.createContext(void 0),yte=e=>{var t=S.useContext(Nk);if(t!=null)return t.stackId;if(e!=null)return Sq(e)},vte=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),gte=e=>{var t=S.useContext(Nk);if(t!=null){var{stackId:r}=t;return"url(#".concat(vte(r,e),")")}},Ok=e=>{var{index:t}=e,r=mte(e,hte),n=gte(t);return S.createElement(rn,vb({className:"recharts-bar-stack-layer",clipPath:n},r))},xte=["onMouseEnter","onMouseLeave","onClick"],bte=["value","background","tooltipPosition"],jte=["id"],wte=["onMouseEnter","onClick","onMouseLeave"];function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rs.apply(null,arguments)}function bC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bC(Object(r),!0).forEach(function(n){Ste(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ste(e,t,r){return(t=Nte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nte(e){var t=Ote(e,"string");return typeof t=="symbol"?t:t+""}function Ote(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Am(e,t){if(e==null)return{};var r,n,i=_te(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function _te(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ete=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:tp(r,t),payload:e}]},Ate=S.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:o,hide:l,unit:c,tooltipType:f,id:m}=e,p={dataDefinedOnItem:void 0,getPosition:mo,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:tp(o,t),hide:l,type:f,color:i,unit:c,graphicalItemId:m}};return S.createElement(tk,{tooltipEntrySettings:p})});function Pte(e){var t=ge(uo),{data:r,dataKey:n,background:i,allOtherBarProps:o}=e,{onMouseEnter:l,onMouseLeave:c,onClick:f}=o,m=Am(o,xte),p=WD(l,n,o.id),y=JD(c),v=ek(f,n,o.id);if(!i||r==null)return null;var x=ld(i);return S.createElement(En,{zIndex:hJ(i,Kt.barBackground)},r.map((j,w)=>{var{value:N,background:O,tooltipPosition:P}=j,E=Am(j,bte);if(!O)return null;var A=p(j,w),T=y(j,w),M=v(j,w),R=jr(jr(jr(jr(jr({option:i,isActive:String(w)===t},E),{},{fill:"#eee"},O),x),Fm(m,j,w)),{},{onMouseEnter:A,onMouseLeave:T,onClick:M,dataKey:n,index:w,className:"recharts-bar-background-rectangle"});return S.createElement(Dw,rs({key:"background-bar-".concat(w)},R))}))}function Tte(e){var{showLabels:t,children:r,rects:n}=e,i=n==null?void 0:n.map(o=>{var l={x:o.x,y:o.y,width:o.width,lowerWidth:o.width,upperWidth:o.width,height:o.height};return jr(jr({},l),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:l,fill:o.fill})});return S.createElement(FD,{value:t?i:void 0},r)}function Cte(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:o,dataKey:l}=e,c=ge(uo),f=ge(jD),m=r&&String(i.originalDataIndex)===c&&(f==null||l===f),[p,y]=S.useState(!1),[v,x]=S.useState(!1);S.useEffect(()=>{var E;return m?(y(!0),E=requestAnimationFrame(()=>{x(!0)})):x(!1),()=>{cancelAnimationFrame(E)}},[m]);var j=S.useCallback(()=>{m||y(!1)},[m]),w=m&&v,N=m||p,O;m?r===!0?O=t:O=r:O=t;var P=S.createElement(Dw,rs({},n,{name:String(n.name)},i,{isActive:w,option:O,index:o,dataKey:l,onTransitionEnd:j}));return N?S.createElement(En,{zIndex:Kt.activeBar},S.createElement(Ok,{index:i.originalDataIndex},P)):P}function Mte(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:o}=e;return S.createElement(Dw,rs({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:o}))}function Rte(e){var t,{data:r,props:n}=e,i=(t=In(n))!==null&&t!==void 0?t:{},{id:o}=i,l=Am(i,jte),{shape:c,dataKey:f,activeBar:m}=n,{onMouseEnter:p,onClick:y,onMouseLeave:v}=n,x=Am(n,wte),j=WD(p,f,o),w=JD(v),N=ek(y,f,o);return r?S.createElement(S.Fragment,null,r.map((O,P)=>S.createElement(Ok,rs({index:O.originalDataIndex,key:"rectangle-".concat(O==null?void 0:O.x,"-").concat(O==null?void 0:O.y,"-").concat(O==null?void 0:O.value,"-").concat(P),className:"recharts-bar-rectangle"},Fm(x,O,P),{onMouseEnter:j(O,P),onMouseLeave:w(O,P),onClick:N(O,P)}),m?S.createElement(Cte,{shape:c,activeBar:m,baseProps:l,entry:O,index:P,dataKey:f}):S.createElement(Mte,{shape:c,baseProps:l,entry:O,index:P,dataKey:f})))):null}function Dte(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:o,animationBegin:l,animationDuration:c,animationEasing:f,onAnimationEnd:m,onAnimationStart:p}=t,y=r.current,v=dp(t,"recharts-bar-"),[x,j]=S.useState(!1),w=!x,N=S.useCallback(()=>{typeof m=="function"&&m(),j(!1)},[m]),O=S.useCallback(()=>{typeof p=="function"&&p(),j(!0)},[p]);return S.createElement(Tte,{showLabels:w,rects:n},S.createElement(cp,{animationId:v,begin:l,duration:c,isActive:o,easing:f,onAnimationEnd:N,onAnimationStart:O,key:v},P=>{var E=P===1?n:n==null?void 0:n.map((A,T)=>{var M=y&&y[T];if(M)return jr(jr({},A),{},{x:jt(M.x,A.x,P),y:jt(M.y,A.y,P),width:jt(M.width,A.width,P),height:jt(M.height,A.height,P)});if(i==="horizontal"){var R=jt(0,A.height,P),D=jt(A.stackedBarStart,A.y,P);return jr(jr({},A),{},{y:D,height:R})}var I=jt(0,A.width,P),k=jt(A.stackedBarStart,A.x,P);return jr(jr({},A),{},{width:I,x:k})});return P>0&&(r.current=E??null),E==null?null:S.createElement(rn,null,S.createElement(Rte,{props:t,data:E}))}),S.createElement(GD,{label:t.label}),t.children)}function kte(e){var t=S.useRef(null);return S.createElement(Dte,{previousRectanglesRef:t,props:e})}var _k=0,Ite=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Ot(e,t)}};class Lte extends S.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:o,yAxisId:l,needClip:c,background:f,id:m}=this.props;if(t||r==null)return null;var p=Xe("recharts-bar",i),y=m;return S.createElement(rn,{className:p,id:m},c&&S.createElement("defs",null,S.createElement(pk,{clipPathId:y,xAxisId:o,yAxisId:l})),S.createElement(rn,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(y,")"):void 0},S.createElement(Pte,{data:r,dataKey:n,background:f,allOtherBarProps:this.props}),S.createElement(kte,this.props)))}}var $te={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:_k,xAxisId:0,yAxisId:0,zIndex:Kt.bar};function zte(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:f,animationEasing:m,isAnimationActive:p}=e,{needClip:y}=Mw(t,r),v=po(),x=vr(),j=tW(e.children,_w),w=ge(P=>fte(P,e.id,x,j));if(v!=="vertical"&&v!=="horizontal")return null;var N,O=w==null?void 0:w[0];return O==null||O.height==null||O.width==null?N=0:N=v==="vertical"?O.height/2:O.width/2,S.createElement(mk,{xAxisId:t,yAxisId:r,data:w,dataPointFormatter:Ite,errorBarOffset:N},S.createElement(Lte,rs({},e,{layout:v,needClip:y,data:w,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:f,animationEasing:m,isAnimationActive:p})))}function Bte(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:o,bandSize:l,xAxis:c,yAxis:f,xAxisTicks:m,yAxisTicks:p,stackedData:y,displayedData:v,offset:x,cells:j,parentViewBox:w,dataStartIndex:N}=e,O=t==="horizontal"?f:c,P=y?O.scale.domain():null,E=Nq({numericAxis:O}),A=O.scale.map(E);return v.map((T,M)=>{var R,D,I,k,H,q;if(y){var ae=y[M+N];if(ae==null)return null;R=gq(ae,P)}else R=Ot(T,r),Array.isArray(R)||(R=[E,R]);var Q=Qee(n,_k)(R[1],M);if(t==="horizontal"){var Z,B=f.scale.map(R[0]),K=f.scale.map(R[1]);if(B==null||K==null)return null;D=oA({axis:c,ticks:m,bandSize:l,offset:o.offset,entry:T,index:M}),I=(Z=K??B)!==null&&Z!==void 0?Z:void 0,k=o.size;var ee=B-K;if(H=ia(ee)?0:ee,q={x:D,y:x.top,width:k,height:x.height},Math.abs(Q)>0&&Math.abs(H)<Math.abs(Q)){var se=zr(H||Q)*(Math.abs(Q)-Math.abs(H));I-=se,H+=se}}else{var ue=c.scale.map(R[0]),L=c.scale.map(R[1]);if(ue==null||L==null)return null;if(D=ue,I=oA({axis:f,ticks:p,bandSize:l,offset:o.offset,entry:T,index:M}),k=L-ue,H=o.size,q={x:x.left,y:I,width:x.width,height:H},Math.abs(Q)>0&&Math.abs(k)<Math.abs(Q)){var W=zr(k||Q)*(Math.abs(Q)-Math.abs(k));k+=W}}if(D==null||I==null||k==null||H==null||!i&&(k===0||H===0))return null;var le=jr(jr({},T),{},{stackedBarStart:A,x:D,y:I,width:k,height:H,value:y?R:R[1],payload:T,background:q,tooltipPosition:{x:D+k/2,y:I+H/2},parentViewBox:w,originalDataIndex:M},j&&j[M]&&j[M].props);return le}).filter(Boolean)}function Ute(e){var t=or(e,$te),r=yte(t.stackId),n=vr();return S.createElement(nk,{id:t.id,type:"bar"},i=>S.createElement(S.Fragment,null,S.createElement(rk,{legendPayload:Ete(t)}),S.createElement(Ate,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:i}),S.createElement(ik,{type:"bar",id:i,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n,hasCustomShape:t.shape!=null}),S.createElement(En,{zIndex:t.zIndex},S.createElement(zte,rs({},t,{id:i})))))}var kw=S.memo(Ute,ru);kw.displayName="Bar";var qte=["domain","range"],Hte=["domain","range"];function jC(e,t){if(e==null)return{};var r,n,i=Fte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Fte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function wC(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function Ek(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=jC(e,qte),{domain:o,range:l}=t,c=jC(t,Hte);return!wC(r,o)||!wC(n,l)?!1:ru(i,c)}var Kte=["type"],Gte=["dangerouslySetInnerHTML","ticks","scale"],Yte=["id","scale"];function gb(){return gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gb.apply(null,arguments)}function SC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function NC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SC(Object(r),!0).forEach(function(n){Vte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vte(e,t,r){return(t=Qte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qte(e){var t=Xte(e,"string");return typeof t=="symbol"?t:t+""}function Xte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xb(e,t){if(e==null)return{};var r,n,i=Zte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Wte(e){var t=ut(),r=S.useRef(null),n=YR(),{type:i}=e,o=xb(e,Kte),l=mp(n,"xAxis",i),c=S.useMemo(()=>{if(l!=null)return NC(NC({},o),{},{type:l})},[o,l]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(HW(c)):r.current!==c&&t(FW({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(KW(r.current)),r.current=null)},[t]),null}var Jte=e=>{var{xAxisId:t,className:r}=e,n=ge(gj),i=vr(),o="xAxis",l=ge(O=>J3(O,o,t,i)),c=ge(O=>X3(O,t)),f=ge(O=>bV(O,t)),m=ge(O=>g3(O,t));if(c==null||f==null||m==null)return null;var{dangerouslySetInnerHTML:p,ticks:y,scale:v}=e,x=xb(e,Gte),{id:j,scale:w}=m,N=xb(m,Yte);return S.createElement(Cw,gb({},x,N,{x:f.x,y:f.y,width:c.width,height:c.height,className:Xe("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:l,axisType:o,axisId:t}))},ere={allowDataOverflow:kt.allowDataOverflow,allowDecimals:kt.allowDecimals,allowDuplicatedCategory:kt.allowDuplicatedCategory,angle:kt.angle,axisLine:Fa.axisLine,height:kt.height,hide:!1,includeHidden:kt.includeHidden,interval:kt.interval,label:!1,minTickGap:kt.minTickGap,mirror:kt.mirror,orientation:kt.orientation,padding:kt.padding,reversed:kt.reversed,scale:kt.scale,tick:kt.tick,tickCount:kt.tickCount,tickLine:Fa.tickLine,tickSize:Fa.tickSize,type:kt.type,niceTicks:kt.niceTicks,xAxisId:0},tre=e=>{var t=or(e,ere);return S.createElement(S.Fragment,null,S.createElement(Wte,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),S.createElement(Jte,t))},Cp=S.memo(tre,Ek);Cp.displayName="XAxis";var rre=["type"],nre=["dangerouslySetInnerHTML","ticks","scale"],are=["id","scale"];function bb(){return bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bb.apply(null,arguments)}function OC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OC(Object(r),!0).forEach(function(n){ire(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ire(e,t,r){return(t=sre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sre(e){var t=ore(e,"string");return typeof t=="symbol"?t:t+""}function ore(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jb(e,t){if(e==null)return{};var r,n,i=lre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ure(e){var t=ut(),r=S.useRef(null),n=YR(),{type:i}=e,o=jb(e,rre),l=mp(n,"yAxis",i),c=S.useMemo(()=>{if(l!=null)return _C(_C({},o),{},{type:l})},[l,o]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(GW(c)):r.current!==c&&t(YW({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(VW(r.current)),r.current=null)},[t]),null}function cre(e){var{yAxisId:t,className:r,width:n,label:i}=e,o=S.useRef(null),l=S.useRef(null),c=ge(gj),f=vr(),m=ut(),p="yAxis",y=ge(M=>Z3(M,t)),v=ge(M=>wV(M,t)),x=ge(M=>J3(M,p,t,f)),j=ge(M=>x3(M,t));if(S.useLayoutEffect(()=>{if(!(n!=="auto"||!y||Aw(i)||S.isValidElement(i)||j==null)){var M=o.current;if(M){var R=M.getCalculatedWidth();Math.round(y.width)!==Math.round(R)&&m(QW({id:t,width:R}))}}},[x,y,m,i,t,n,j]),y==null||v==null||j==null)return null;var{dangerouslySetInnerHTML:w,ticks:N,scale:O}=e,P=jb(e,nre),{id:E,scale:A}=j,T=jb(j,are);return S.createElement(Cw,bb({},P,T,{ref:o,labelRef:l,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:y.width,height:y.height,className:Xe("recharts-".concat(p," ").concat(p),r),viewBox:c,ticks:x,axisType:p,axisId:t}))}var dre={allowDataOverflow:It.allowDataOverflow,allowDecimals:It.allowDecimals,allowDuplicatedCategory:It.allowDuplicatedCategory,angle:It.angle,axisLine:Fa.axisLine,hide:!1,includeHidden:It.includeHidden,interval:It.interval,label:!1,minTickGap:It.minTickGap,mirror:It.mirror,orientation:It.orientation,padding:It.padding,reversed:It.reversed,scale:It.scale,tick:It.tick,tickCount:It.tickCount,tickLine:Fa.tickLine,tickSize:Fa.tickSize,type:It.type,niceTicks:It.niceTicks,width:It.width,yAxisId:0},fre=e=>{var t=or(e,dre);return S.createElement(S.Fragment,null,S.createElement(ure,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),S.createElement(cre,t))},Mp=S.memo(fre,Ek);Mp.displayName="YAxis";var hre=(e,t)=>t,Iw=V([hre,Ze,D4,Qt,vD,ri,KQ,Yt],WQ);function mre(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Lw(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(mre(e)){var i=e.currentTarget.getBBox();r=i.width>0?t.width/i.width:1,n=i.height>0?t.height/i.height:1}else{var o=e.currentTarget;r=o.offsetWidth>0?t.width/o.offsetWidth:1,n=o.offsetHeight>0?t.height/o.offsetHeight:1}var l=(c,f)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>l(c.clientX,c.clientY)):l(e.clientX,e.clientY)}var Ak=nn("mouseClick"),Pk=dd();Pk.startListening({actionCreator:Ak,effect:(e,t)=>{var r=e.payload,n=Iw(t.getState(),Lw(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch($V({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var wb=nn("mouseMove"),Tk=dd(),hl=null,_s=null,Q0=null;Tk.startListening({actionCreator:wb,effect:(e,t)=>{var r=e.payload,n=t.getState(),{throttleDelay:i,throttledEvents:o}=n.eventSettings,l=o==="all"||(o==null?void 0:o.includes("mousemove"));hl!==null&&(cancelAnimationFrame(hl),hl=null),_s!==null&&(typeof i!="number"||!l)&&(clearTimeout(_s),_s=null),Q0=Lw(r);var c=()=>{var f=t.getState(),m=Nd(f,f.tooltip.settings.shared);if(!Q0){hl=null,_s=null;return}if(m==="axis"){var p=Iw(f,Q0);(p==null?void 0:p.activeIndex)!=null?t.dispatch(oD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(sD())}hl=null,_s=null};if(!l){c();return}i==="raf"?hl=requestAnimationFrame(c):typeof i=="number"&&_s===null&&(_s=setTimeout(c,i))}});function pre(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var EC={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},Ck=yr({name:"rootProps",initialState:EC,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:EC.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),yre=Ck.reducer,{updateOptions:vre}=Ck.actions,gre=null,xre={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},Mk=yr({name:"polarOptions",initialState:gre,reducers:xre}),{updatePolarOptions:ose}=Mk.actions,bre=Mk.reducer,Rk=nn("keyDown"),Dk=nn("focus"),kk=nn("blur"),Rp=dd(),ml=null,Es=null,hh=null;Rp.startListening({actionCreator:Rk,effect:(e,t)=>{hh=e.payload,ml!==null&&(cancelAnimationFrame(ml),ml=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,o=i==="all"||i.includes("keydown");Es!==null&&(typeof n!="number"||!o)&&(clearTimeout(Es),Es=null);var l=()=>{try{var c=t.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:m}=c.tooltip,p=hh;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var y=Ec(m,lo(c),Xl(c),Zl(c)),v=y==null?-1:Number(y),x=!Number.isFinite(v)||v<0,j=ri(c),w=lo(c),N=Nd(c,c.tooltip.settings.shared);if(p==="Enter"){if(x)return;var O=wm(c,N,"hover",String(m.index));t.dispatch(jm({active:!m.active,activeIndex:m.index,activeCoordinate:O}));return}var P=EV(c),E=P==="left-to-right"?1:-1,A=p==="ArrowRight"?1:-1,T;if(x){var M=Xl(c),R=Zl(c),D=A*E,I=Q=>({active:!1,index:String(Q),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(T=-1,D>0){for(var k=0;k<w.length;k++)if(Ec(I(k),w,M,R)!=null){T=k;break}}else for(var H=w.length-1;H>=0;H--)if(Ec(I(H),w,M,R)!=null){T=H;break}if(T<0)return}else{T=v+A*E;var q=(j==null?void 0:j.length)||w.length;if(q===0||T>=q||T<0)return}var ae=wm(c,N,"hover",String(T));t.dispatch(jm({active:!0,activeIndex:T.toString(),activeCoordinate:ae}))}finally{ml=null,Es=null}};if(!o){l();return}n==="raf"?ml=requestAnimationFrame(l):typeof n=="number"&&Es===null&&(l(),hh=null,Es=setTimeout(()=>{hh?l():(Es=null,ml=null)},n))}});Rp.startListening({actionCreator:Dk,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var o="0",l=Nd(r,r.tooltip.settings.shared),c=wm(r,l,"hover",String(o));t.dispatch(jm({active:!0,activeIndex:o,activeCoordinate:c}))}}}});Rp.startListening({actionCreator:kk,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(jm({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function Ik(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var gn=nn("externalEvent"),Lk=dd(),mh=new Map,bc=new Map,X0=new Map;Lk.startListening({actionCreator:gn,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,o=Ik(n);X0.set(i,{handler:r,reactEvent:o});var l=mh.get(i);l!==void 0&&(cancelAnimationFrame(l),mh.delete(i));var c=t.getState(),{throttleDelay:f,throttledEvents:m}=c.eventSettings,p=m,y=p==="all"||(p==null?void 0:p.includes(i)),v=bc.get(i);v!==void 0&&(typeof f!="number"||!y)&&(clearTimeout(v),bc.delete(i));var x=()=>{var N=X0.get(i);try{if(!N)return;var{handler:O,reactEvent:P}=N,E=t.getState(),A={activeCoordinate:PQ(E),activeDataKey:jD(E),activeIndex:uo(E),activeLabel:bD(E),activeTooltipIndex:uo(E),isTooltipActive:TQ(E)};O&&O(A,P)}finally{mh.delete(i),bc.delete(i),X0.delete(i)}};if(!y){x();return}if(f==="raf"){var j=requestAnimationFrame(x);mh.set(i,j)}else if(typeof f=="number"){if(!bc.has(i)){x();var w=setTimeout(x,f);bc.set(i,w)}}else x()}}});var jre=V([cu],e=>e.tooltipItemPayloads),wre=V([jre,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(o=>o.settings.graphicalItemId===r);if(n!=null){var{getPosition:i}=n;if(i!=null)return i(t)}}}),$k=nn("touchMove"),zk=dd(),As=null,Pi=null,AC=null,jc=null;zk.startListening({actionCreator:$k,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){jc=Ik(r);var n=t.getState(),{throttleDelay:i,throttledEvents:o}=n.eventSettings,l=o==="all"||o.includes("touchmove");As!==null&&(cancelAnimationFrame(As),As=null),Pi!==null&&(typeof i!="number"||!l)&&(clearTimeout(Pi),Pi=null),AC=Array.from(r.touches).map(f=>Lw({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var c=()=>{if(jc!=null){var f=t.getState(),m=Nd(f,f.tooltip.settings.shared);if(m==="axis"){var p,y=(p=AC)===null||p===void 0?void 0:p[0];if(y==null){As=null,Pi=null;return}var v=Iw(f,y);(v==null?void 0:v.activeIndex)!=null&&t.dispatch(oD({activeIndex:v.activeIndex,activeDataKey:void 0,activeCoordinate:v.activeCoordinate}))}else if(m==="item"){var x,j=jc.touches[0];if(document.elementFromPoint==null||j==null)return;var w=document.elementFromPoint(j.clientX,j.clientY);if(!w||!w.getAttribute)return;var N=w.getAttribute(Cq),O=(x=w.getAttribute(Mq))!==null&&x!==void 0?x:void 0,P=go(f).find(T=>T.id===O);if(N==null||P==null||O==null)return;var{dataKey:E}=P,A=wre(f,N,O);t.dispatch(iD({activeDataKey:E,activeIndex:N,activeCoordinate:A,activeGraphicalItemId:O}))}As=null,Pi=null}};if(!l){c();return}i==="raf"?As=requestAnimationFrame(c):typeof i=="number"&&Pi===null&&(c(),jc=null,Pi=setTimeout(()=>{jc?c():(Pi=null,As=null)},i))}}});var Bk={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Uk=yr({name:"eventSettings",initialState:Bk,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:Sre}=Uk.actions,Nre=Uk.reducer,Ore=dR({brush:pJ,cartesianAxis:XW,chartData:AX,errorBars:mee,eventSettings:Nre,graphicalItems:AW,layout:hq,legend:OH,options:SX,polarAxis:XZ,polarOptions:bre,referenceElements:xJ,renderedTicks:IJ,rootProps:yre,tooltip:zV,zIndex:dX}),_re=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return $9({reducer:Ore,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([Pk.middleware,Tk.middleware,Rp.middleware,Lk.middleware,zk.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(_R({type:"raf"}))},devTools:{serialize:{replacer:pre},name:"recharts-".concat(r)}})};function Ere(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=vr(),o=S.useRef(null);if(i)return r;o.current==null&&(o.current=_re(t,n));var l=dj;return S.createElement(UH,{context:l,store:o.current},r)}function Are(e){var{layout:t,margin:r}=e,n=ut(),i=vr();return S.useEffect(()=>{i||(n(cq(t)),n(uq(r)))},[n,i,t,r]),null}var Pre=S.memo(Are,ru);function Tre(e){var t=ut();return S.useEffect(()=>{t(vre(e))},[t,e]),null}var Cre=e=>{var t=ut();return S.useEffect(()=>{t(Sre(e))},[t,e]),null},Mre=S.memo(Cre,ru);function PC(e){var{zIndex:t,isPanorama:r}=e,n=S.useRef(null),i=ut();return S.useLayoutEffect(()=>(n.current&&i(uX({zIndex:t,element:n.current,isPanorama:r})),()=>{i(cX({zIndex:t,isPanorama:r}))}),[i,t,r]),S.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function TC(e){var{children:t,isPanorama:r}=e,n=ge(eX);if(!n||n.length===0)return t;var i=n.filter(l=>l<0),o=n.filter(l=>l>0);return S.createElement(S.Fragment,null,i.map(l=>S.createElement(PC,{key:l,zIndex:l,isPanorama:r})),t,o.map(l=>S.createElement(PC,{key:l,zIndex:l,isPanorama:r})))}var Rre=["children"];function Dre(e,t){if(e==null)return{};var r,n,i=kre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function kre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Pm(){return Pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pm.apply(null,arguments)}var Ire={width:"100%",height:"100%",display:"block"},Lre=S.forwardRef((e,t)=>{var r=wj(),n=Sj(),i=a4();if(!oa(r)||!oa(n))return null;var{children:o,otherAttributes:l,title:c,desc:f}=e,m,p;return l!=null&&(typeof l.tabIndex=="number"?m=l.tabIndex:m=i?0:void 0,typeof l.role=="string"?p=l.role:p=i?"application":void 0),S.createElement(tj,Pm({},l,{title:c,desc:f,role:p,tabIndex:m,width:r,height:n,style:Ire,ref:t}),o)}),$re=e=>{var{children:t}=e,r=ge(ip);if(!r)return null;var{width:n,height:i,y:o,x:l}=r;return S.createElement(tj,{width:n,height:i,x:l,y:o},t)},CC=S.forwardRef((e,t)=>{var{children:r}=e,n=Dre(e,Rre),i=vr();return i?S.createElement($re,null,S.createElement(TC,{isPanorama:!0},r)):S.createElement(Lre,Pm({ref:t},n),S.createElement(TC,{isPanorama:!1},r))});function zre(){var e=ut(),[t,r]=S.useState(null),n=ge(Tq);return S.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;Be(o)&&o!==n&&e(fq(o))}},[t,e,n]),r}function MC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bre(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MC(Object(r),!0).forEach(function(n){Ure(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ure(e,t,r){return(t=qre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qre(e){var t=Hre(e,"string");return typeof t=="symbol"?t:t+""}function Hre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Wi(){return Wi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Wi.apply(null,arguments)}var Fre=()=>(LX(),null);function Tm(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Kre=S.forwardRef((e,t)=>{var r,n,i=S.useRef(null),[o,l]=S.useState({containerWidth:Tm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Tm((n=e.style)===null||n===void 0?void 0:n.height)}),c=S.useCallback((m,p)=>{l(y=>{var v=Math.round(m),x=Math.round(p);return y.containerWidth===v&&y.containerHeight===x?y:{containerWidth:v,containerHeight:x}})},[]),f=S.useCallback(m=>{if(typeof t=="function"&&t(m),i.current!=null&&(i.current.disconnect(),i.current=null),m!=null&&typeof ResizeObserver<"u"){var{width:p,height:y}=m.getBoundingClientRect();c(p,y);var v=j=>{var w=j[0];if(w!=null){var{width:N,height:O}=w.contentRect;c(N,O)}},x=new ResizeObserver(v);x.observe(m),i.current=x}},[t,c]);return S.useEffect(()=>()=>{var m=i.current;m!=null&&m.disconnect()},[c]),S.createElement(S.Fragment,null,S.createElement(hd,{width:o.containerWidth,height:o.containerHeight}),S.createElement("div",Wi({ref:f},e)))}),Gre=S.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,o]=S.useState({containerWidth:Tm(r),containerHeight:Tm(n)}),l=S.useCallback((f,m)=>{o(p=>{var y=Math.round(f),v=Math.round(m);return p.containerWidth===y&&p.containerHeight===v?p:{containerWidth:y,containerHeight:v}})},[]),c=S.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:m,height:p}=f.getBoundingClientRect();l(m,p)}},[t,l]);return S.createElement(S.Fragment,null,S.createElement(hd,{width:i.containerWidth,height:i.containerHeight}),S.createElement("div",Wi({ref:c},e)))}),Yre=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return S.createElement(S.Fragment,null,S.createElement(hd,{width:r,height:n}),S.createElement("div",Wi({ref:t},e)))}),Vre=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?S.createElement(Gre,Wi({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?S.createElement(Yre,Wi({},e,{width:r,height:n,ref:t})):S.createElement(S.Fragment,null,S.createElement(hd,{width:r,height:n}),S.createElement("div",Wi({ref:t},e)))});function Qre(e){return e?Kre:Vre}var Xre=S.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:o,onContextMenu:l,onDoubleClick:c,onMouseDown:f,onMouseEnter:m,onMouseLeave:p,onMouseMove:y,onMouseUp:v,onTouchEnd:x,onTouchMove:j,onTouchStart:w,style:N,width:O,responsive:P,dispatchTouchEvents:E=!0}=e,A=S.useRef(null),T=ut(),[M,R]=S.useState(null),[D,I]=S.useState(null),k=zre(),H=xj(),q=(H==null?void 0:H.width)>0?H.width:O,ae=(H==null?void 0:H.height)>0?H.height:i,Q=S.useCallback(te=>{k(te),typeof t=="function"&&t(te),R(te),I(te),te!=null&&(A.current=te)},[k,t,R,I]),Z=S.useCallback(te=>{T(Ak(te)),T(gn({handler:o,reactEvent:te}))},[T,o]),B=S.useCallback(te=>{T(wb(te)),T(gn({handler:m,reactEvent:te}))},[T,m]),K=S.useCallback(te=>{T(sD()),T(gn({handler:p,reactEvent:te}))},[T,p]),ee=S.useCallback(te=>{T(wb(te)),T(gn({handler:y,reactEvent:te}))},[T,y]),se=S.useCallback(()=>{T(Dk())},[T]),ue=S.useCallback(()=>{T(kk())},[T]),L=S.useCallback(te=>{T(Rk(te.key))},[T]),W=S.useCallback(te=>{T(gn({handler:l,reactEvent:te}))},[T,l]),le=S.useCallback(te=>{T(gn({handler:c,reactEvent:te}))},[T,c]),oe=S.useCallback(te=>{T(gn({handler:f,reactEvent:te}))},[T,f]),ye=S.useCallback(te=>{T(gn({handler:v,reactEvent:te}))},[T,v]),Se=S.useCallback(te=>{T(gn({handler:w,reactEvent:te}))},[T,w]),Ne=S.useCallback(te=>{E&&T($k(te)),T(gn({handler:j,reactEvent:te}))},[T,E,j]),Ce=S.useCallback(te=>{T(gn({handler:x,reactEvent:te}))},[T,x]),de=Qre(P);return S.createElement(AD.Provider,{value:M},S.createElement(_M.Provider,{value:D},S.createElement(de,{width:q??(N==null?void 0:N.width),height:ae??(N==null?void 0:N.height),className:Xe("recharts-wrapper",n),style:Bre({position:"relative",cursor:"default",width:q,height:ae},N),onClick:Z,onContextMenu:W,onDoubleClick:le,onFocus:se,onBlur:ue,onKeyDown:L,onMouseDown:oe,onMouseEnter:B,onMouseLeave:K,onMouseMove:ee,onMouseUp:ye,onTouchEnd:Ce,onTouchMove:Ne,onTouchStart:Se,ref:Q},S.createElement(Fre,null),r)))}),Zre=["width","height","responsive","children","className","style","compact","title","desc"];function Wre(e,t){if(e==null)return{};var r,n,i=Jre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Jre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ene=S.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:o,className:l,style:c,compact:f,title:m,desc:p}=e,y=Wre(e,Zre),v=In(y);return f?S.createElement(S.Fragment,null,S.createElement(hd,{width:r,height:n}),S.createElement(CC,{otherAttributes:v,title:m,desc:p},o)):S.createElement(Xre,{className:l,style:c,width:r,height:n,responsive:i??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},S.createElement(CC,{otherAttributes:v,title:m,desc:p,ref:t},S.createElement(jJ,null,o)))});function Sb(){return Sb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sb.apply(null,arguments)}function RC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RC(Object(r),!0).forEach(function(n){rne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rne(e,t,r){return(t=nne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nne(e){var t=ane(e,"string");return typeof t=="symbol"?t:t+""}function ane(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ine={top:5,right:5,bottom:5,left:5},sne=tne({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:ine,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},Bk),qk=S.forwardRef(function(t,r){var n,i=or(t.categoricalChartProps,sne),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:m}=t,p={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return S.createElement(Ere,{preloadedState:{options:p},reduxStoreName:(n=m.id)!==null&&n!==void 0?n:o},S.createElement(mJ,{chartData:m.data}),S.createElement(Pre,{layout:i.layout,margin:i.margin}),S.createElement(Mre,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),S.createElement(Tre,{baseValue:i.baseValue,accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className,reverseStackOrder:i.reverseStackOrder}),S.createElement(ene,Sb({},i,{ref:r})))}),one=["axis"],lne=S.forwardRef((e,t)=>S.createElement(qk,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:one,tooltipPayloadSearcher:PD,categoricalChartProps:e,ref:t})),une=["axis","item"],Hk=S.forwardRef((e,t)=>S.createElement(qk,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:une,tooltipPayloadSearcher:PD,categoricalChartProps:e,ref:t}));const Di="",Nb=[{value:"all",label:"All time"},{value:"24h",label:"Last 24h",windowMs:1440*60*1e3},{value:"7d",label:"Last 7d",windowMs:10080*60*1e3},{value:"30d",label:"Last 30d",windowMs:720*60*60*1e3}],Z0=10;function cne(e,t,r=new Date){const n=dne(e),i=hne(e,n),o=mne(n.flatMap(y=>y.category??[])),l=o.length>0,c=n.some(y=>y.startedAtMs!==void 0),f=Nb.find(y=>y.value===t.timePeriod)??Nb[0],m=f.windowMs===void 0?void 0:r.getTime()-f.windowMs,p=n.filter(y=>t.experiment&&y.experiment!==t.experiment||t.category&&y.category!==t.category?!1:m!==void 0?y.startedAtMs!==void 0&&y.startedAtMs>=m:!0);return{buckets:pne(p.map(y=>y.score)),experimentOptions:i,categoryOptions:o,totalScores:n.length,filteredScores:p.length,categoryAvailable:l,hasTimestampedScores:c}}function dne(e){return e.runs&&e.runs.length>0?e.runs.flatMap(t=>fne(t)):e.cells.flatMap(t=>t.tests.flatMap(r=>{const n=Fk(r,t.experiment);return n?[n]:[]}))}function fne(e){const t=vne(e.started_at);return e.tests.flatMap(r=>{const n=Fk(r,e.experiment);return n?[{...n,startedAtMs:t}]:[]})}function Fk(e,t){if(!Number.isFinite(e.score))return;const r=yne(e.category);return{score:e.score,experiment:t,...r&&{category:r}}}function hne(e,t){const r=new Map,n=new Set(e.experiments);for(const i of e.cells)n.add(i.experiment);for(const i of t)n.add(i.experiment),r.set(i.experiment,(r.get(i.experiment)??0)+1);return[...n].sort((i,o)=>i.localeCompare(o)).map(i=>({value:i,label:i,count:r.get(i)??0}))}function mne(e){const t=new Map;for(const r of e)t.set(r,(t.get(r)??0)+1);return[...t.entries()].sort(([r],[n])=>r.localeCompare(n)).map(([r,n])=>({value:r,label:r,count:n}))}function pne(e){if(e.length===0)return[];const t=Array.from({length:Z0},(r,n)=>({range:`${n*10}-${(n+1)*10}%`,count:0}));for(const r of e){const n=Math.max(0,Math.min(r,1)),i=Math.min(Math.floor(n*Z0),Z0-1);t[i].count++}return t}function yne(e){const t=e==null?void 0:e.trim();return t||void 0}function vne(e){const t=Date.parse(e);return Number.isFinite(t)?t:void 0}const Nt={green:"#34d399",red:"#f87171",gray:"#4b5563",cyan:"#22d3ee",gridLine:"#1f2937",labelText:"#9ca3af"},DC=["#22d3ee","#34d399","#facc15","#f87171","#a78bfa","#fb923c","#f472b6","#60a5fa"];function gne(e){return DC[e%DC.length]}function xne({data:e,projectId:t}){const[r,n]=S.useState(!0),[i,o]=S.useState(""),l=e.targets,c=Ue(t?cM(t,i||void 0):Y8(i||void 0)),f=i?c.data:void 0,m=S.useMemo(()=>_ne(e.runs??[]),[e.runs]);return d.jsxs("div",{className:"rounded-lg border border-gray-800",children:[d.jsxs("button",{type:"button",onClick:()=>n(p=>!p),className:"flex w-full items-center justify-between px-4 py-3 text-left transition-colors hover:bg-gray-900/30",children:[d.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Analytics"}),d.jsx("span",{className:"text-xs text-gray-500",children:r?"▸ Show":"▾ Hide"})]}),!r&&d.jsxs("div",{className:"space-y-6 border-t border-gray-800 px-4 py-4",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("label",{htmlFor:"baseline-select",className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Baseline target"}),d.jsxs("select",{id:"baseline-select",value:i,onChange:p=>o(p.target.value),className:"rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:[d.jsx("option",{value:"",children:"Select a baseline…"}),l.map(p=>d.jsx("option",{value:p,children:p},p))]}),i&&c.isLoading&&d.jsx("span",{className:"text-xs text-gray-500",children:"Loading…"})]}),i&&f&&d.jsx(bne,{data:f,baseline:i}),e.runs&&e.runs.length>0&&l.length>1&&d.jsx(jne,{runs:e.runs,targets:l}),i&&f&&d.jsx(wne,{data:f,baseline:i}),d.jsx(Sne,{data:e}),m.length>1&&l.length>0&&d.jsx(Ene,{data:m,targets:l}),!i&&d.jsx("p",{className:"text-xs text-gray-500",children:"Select a baseline target above to see gain and delta charts."})]})]})}function $w({active:e,payload:t,label:r}){return!e||!(t!=null&&t.length)?null:d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-900 px-3 py-2 text-xs shadow-xl",children:[r&&d.jsx("div",{className:"mb-1 font-medium text-gray-300",children:r}),t.map((n,i)=>d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:n.color}}),d.jsxs("span",{className:"text-gray-400",children:[n.name,":"]}),d.jsx("span",{className:"tabular-nums text-gray-200",children:typeof n.value=="number"?n.value.toFixed(3):n.value})]},`${n.name}-${i}`))]})}function Wl({title:e,children:t}){return d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:e}),t]})}function bne({data:e,baseline:t}){const r=S.useMemo(()=>{const i=[];for(const o of e.cells)o.target!==t&&o.delta!==void 0&&i.push({experiment:o.experiment,target:o.target,g:o.normalized_gain??null,delta:o.delta});return i.sort((o,l)=>Math.abs(l.g??0)-Math.abs(o.g??0)),i},[e.cells,t]);if(r.length===0)return d.jsx(Wl,{title:"Normalized Gain (g)",children:d.jsx("p",{className:"text-xs text-gray-500",children:"No gain data available. Ensure multiple targets exist."})});const n=r.map(i=>({name:`${i.target} · ${i.experiment}`,g:i.g??0,isNull:i.g===null}));return d.jsx(Wl,{title:"Normalized Gain (g)",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(bj,{width:"100%",height:Math.max(200,n.length*32),children:d.jsxs(Hk,{data:n,layout:"vertical",margin:{left:120,right:20,top:5,bottom:5},children:[d.jsx(Tp,{strokeDasharray:"3 3",stroke:Nt.gridLine,horizontal:!1}),d.jsx(Cp,{type:"number",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Mp,{type:"category",dataKey:"name",tick:{fill:Nt.labelText,fontSize:11},width:120,axisLine:{stroke:Nt.gridLine}}),d.jsx(Ow,{content:d.jsx($w,{})}),d.jsx(kw,{dataKey:"g",name:"Normalized Gain",children:n.map(i=>d.jsx(_w,{fill:i.isNull?Nt.gray:i.g>0?Nt.green:i.g<0?Nt.red:Nt.gray},i.name))})]})})})})}function jne({runs:e,targets:t}){const{tags:r,grid:n}=S.useMemo(()=>{const i=new Map;for(const c of e)for(const f of c.tags??[]){let m=i.get(f);m||(m=new Map,i.set(f,m));let p=m.get(c.target);p||(p={passed:0,total:0},m.set(c.target,p)),p.passed+=c.passed_count,p.total+=c.eval_count}const o=[...i.keys()].sort(),l=o.map(c=>{const f={tag:c},m=i.get(c);if(!m)return f;for(const p of t){const y=m.get(p);f[p]=y&&y.total>0?y.passed/y.total:-1}return f});return{tags:o,grid:l}},[e,t]);return r.length===0?null:d.jsx(Wl,{title:"Pass Rate by Tag × Target",children:d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tag"}),t.map(i=>d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:i},i))]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(i=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:i.tag}),t.map(o=>{const l=i[o];if(l<0)return d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},o);const c=Math.round(l*100),f=l>=.8?"bg-emerald-400/20 text-emerald-400":l>=.5?"bg-yellow-400/20 text-yellow-400":"bg-red-400/20 text-red-400";return d.jsx("td",{className:"px-4 py-3",children:d.jsxs("span",{className:`inline-block rounded px-2 py-0.5 text-xs tabular-nums font-medium ${f}`,children:[c,"%"]})},o)})]},i.tag))})]})})})}function wne({data:e,baseline:t}){const r=S.useMemo(()=>e.cells.filter(n=>n.target!==t&&n.delta!==void 0&&n.delta<0).sort((n,i)=>(n.delta??0)-(i.delta??0)),[e.cells,t]);return r.length===0?null:d.jsx(Wl,{title:"Regressions vs. Baseline",children:d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Delta"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"g"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(n=>{var i;return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n.experiment}),d.jsx("td",{className:"px-4 py-3 text-gray-300",children:n.target}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[Math.round(n.avg_score*100),"%"]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:(i=n.delta)==null?void 0:i.toFixed(3)}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:n.normalized_gain!==void 0&&n.normalized_gain!==null?n.normalized_gain.toFixed(3):"—"})]},`${n.experiment}::${n.target}`)})})]})})})}const kC={experiment:Di,category:Di,timePeriod:"all"};function Sne({data:e}){const[t,r]=S.useState(kC),n=S.useMemo(()=>cne(e,t),[e,t]);S.useEffect(()=>{r(m=>{const p=!m.experiment||n.experimentOptions.some(x=>x.value===m.experiment),y=!m.category||n.categoryOptions.some(x=>x.value===m.category),v=m.timePeriod==="all"||n.hasTimestampedScores;return p&&y&&v?m:{experiment:p?m.experiment:Di,category:y?m.category:Di,timePeriod:v?m.timePeriod:"all"}})},[n.experimentOptions,n.categoryOptions,n.hasTimestampedScores]);const i=(m,p)=>{r(y=>({...y,[m]:p}))},o=()=>r(kC),l=t.experiment!==Di||t.category!==Di||t.timePeriod!=="all",c=n.totalScores>0,f=One(n,t);return d.jsx(Wl,{title:"Score Distribution",children:d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 px-3 py-3",children:[d.jsxs("div",{className:"grid gap-3 sm:grid-cols-3",children:[d.jsxs(W0,{id:"score-distribution-experiment",label:"Experiment",value:t.experiment,onChange:m=>i("experiment",m),disabled:n.experimentOptions.length===0,children:[d.jsx("option",{value:Di,children:"All experiments"}),n.experimentOptions.map(m=>d.jsxs("option",{value:m.value,children:[m.label," (",m.count,")"]},m.value))]}),d.jsxs(W0,{id:"score-distribution-category",label:"Category",value:t.category,onChange:m=>i("category",m),disabled:!n.categoryAvailable,help:n.categoryAvailable||!c?void 0:"Category metadata is not present in these compare results.",children:[d.jsx("option",{value:Di,children:"All categories"}),n.categoryOptions.map(m=>d.jsxs("option",{value:m.value,children:[m.label," (",m.count,")"]},m.value))]}),d.jsx(W0,{id:"score-distribution-time",label:"Time period",value:t.timePeriod,onChange:m=>i("timePeriod",m),disabled:!n.hasTimestampedScores,help:n.hasTimestampedScores||!c?void 0:"Recent windows need run timestamps from compare data.",children:Nb.map(m=>d.jsx("option",{value:m.value,children:m.label},m.value))})]}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-2 border-t border-gray-800/70 pt-3 text-xs",children:[d.jsxs("span",{className:"tabular-nums text-gray-400",children:["Showing ",d.jsx("span",{className:"text-gray-200",children:n.filteredScores})," of"," ",d.jsx("span",{className:"text-gray-200",children:n.totalScores})," scores"]}),l&&d.jsx("button",{type:"button",onClick:o,className:"text-gray-500 underline-offset-2 transition-colors hover:text-gray-300 hover:underline",children:"Clear filters"})]})]}),n.buckets.length>0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(bj,{width:"100%",height:200,children:d.jsxs(Hk,{data:n.buckets,margin:{left:10,right:10,top:5,bottom:5},children:[d.jsx(Tp,{strokeDasharray:"3 3",stroke:Nt.gridLine,vertical:!1}),d.jsx(Cp,{dataKey:"range",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Mp,{tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Ow,{content:d.jsx($w,{})}),d.jsx(kw,{dataKey:"count",name:"Tests",fill:Nt.cyan,radius:[2,2,0,0]})]})})}):d.jsx(Nne,{message:f})]})})}function W0({id:e,label:t,value:r,onChange:n,disabled:i,help:o,children:l}){return d.jsxs("div",{className:"min-w-0 space-y-1",children:[d.jsx("label",{htmlFor:e,className:"block text-xs font-medium uppercase tracking-wider text-gray-500",children:t}),d.jsx("select",{id:e,value:r,disabled:i,onChange:c=>n(c.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-100 transition-colors focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-600",children:l}),o&&d.jsx("p",{className:"text-xs leading-5 text-gray-500",children:o})]})}function Nne({message:e}){return d.jsx("div",{className:"rounded-lg border border-dashed border-gray-800 bg-gray-900/20 px-4 py-8 text-center",children:d.jsx("p",{className:"text-sm text-gray-400",children:e})})}function One(e,t){return e.totalScores===0?"No test scores are available in this comparison yet.":t.category&&!e.categoryAvailable?"Category metadata is not available in these compare results.":"No scores match the selected distribution filters."}function _ne(e){if(e.length===0)return[];const t=new Map;for(const n of e){const i=n.started_at.slice(0,10);let o=t.get(i);o||(o=new Map,t.set(i,o));let l=o.get(n.target);l||(l={scoreSum:0,count:0},o.set(n.target,l)),l.scoreSum+=n.avg_score,l.count++}return[...t.keys()].sort().map(n=>{const i={date:n},o=t.get(n);if(!o)return i;for(const[l,c]of o)i[l]=Math.round(c.scoreSum/c.count*1e3)/1e3;return i})}function Ene({data:e,targets:t}){return d.jsx(Wl,{title:"Score Trend Over Time",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(bj,{width:"100%",height:250,children:d.jsxs(lne,{data:e,margin:{left:10,right:20,top:5,bottom:5},children:[d.jsx(Tp,{strokeDasharray:"3 3",stroke:Nt.gridLine}),d.jsx(Cp,{dataKey:"date",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Mp,{domain:[0,1],tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Ow,{content:d.jsx($w,{})}),d.jsx(r4,{wrapperStyle:{fontSize:12,color:Nt.labelText}}),t.map((r,n)=>d.jsx(wk,{type:"monotone",dataKey:r,stroke:gne(n),strokeWidth:2,dot:{r:3},connectNulls:!0},r))]})})})})}function tn({rate:e}){const t=Math.round(e*100);return d.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[d.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${t}%`}}),d.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[t,"%"]})]})}function Kk({data:e,isLoading:t,isError:r,error:n,projectId:i,readOnly:o}){var P,E;const[l,c]=S.useState("aggregated"),[f,m]=S.useState([]),{allTags:p,tagCounts:y}=S.useMemo(()=>{const A=new Map;for(const T of(e==null?void 0:e.runs)??[])for(const M of T.tags??[])A.set(M,(A.get(M)??0)+1);return{allTags:[...A.keys()].sort(),tagCounts:A}},[e==null?void 0:e.runs]),v=S.useMemo(()=>{if(!e||f.length===0)return e;const A=new Set(f),T=(e.runs??[]).filter(k=>(k.tags??[]).some(H=>A.has(H))),M=new Map,R=new Set,D=new Set;for(const k of T){R.add(k.experiment),D.add(k.target);const H=`${k.experiment}::${k.target}`,q=M.get(H)??{experiment:k.experiment,target:k.target,eval_count:0,quality_count:0,passed_count:0,execution_error_count:0,score_sum:0,tests:[]},ae=Ul(k);q.eval_count+=k.eval_count,q.quality_count+=ae,q.passed_count+=k.passed_count,q.execution_error_count+=Gt(k),q.score_sum+=k.avg_score*ae;for(const Q of k.tests)q.tests.push(Q);M.set(H,q)}const I=[...M.values()].map(k=>{const H=new Map;for(const q of k.tests)H.set(q.test_id,q);return{experiment:k.experiment,target:k.target,eval_count:k.eval_count,quality_count:k.quality_count,passed_count:k.passed_count,execution_error_count:k.execution_error_count,pass_rate:k.quality_count>0?k.passed_count/k.quality_count:0,avg_score:k.quality_count>0?k.score_sum/k.quality_count:0,tests:[...H.values()].slice(-100)}});return{...e,experiments:[...R].sort(),targets:[...D].sort(),cells:I,runs:T}},[e,f]),x=A=>{m(T=>T.includes(A)?T.filter(M=>M!==A):[...T,A])},j=()=>m([]),w=((P=v==null?void 0:v.runs)==null?void 0:P.length)??0,N=e&&e.cells.length>0,O=f.length>0&&v&&(((E=v.runs)==null?void 0:E.length)??0)===0;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(Pne,{mode:l,onModeChange:c,runsCount:w}),t&&d.jsx(Fne,{}),!t&&r&&n&&d.jsx(qne,{message:`Failed to load comparison data: ${n.message}`}),!t&&!r&&!N&&d.jsx(Hne,{}),!t&&!r&&N&&d.jsxs(d.Fragment,{children:[p.length>0&&d.jsx(Ane,{allTags:p,tagCounts:y,selected:f,onToggle:x,onClear:j}),O?d.jsx(Dp,{headline:`No runs match ${f.map(A=>`\`${A}\``).join(" + ")}`,body:"Clear the filter or pick a different tag combination.",action:{label:"Clear filter",onClick:j}}):v&&d.jsxs(d.Fragment,{children:[l==="aggregated"&&d.jsx(Cne,{data:v,projectId:i}),l==="per-run"&&d.jsx(Ine,{data:v,projectId:i,readOnly:o??!1})]})]})]})}function Ane({allTags:e,tagCounts:t,selected:r,onToggle:n,onClear:i}){const o=new Set(r),l=r.length>0;return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Filter by tag"}),e.map(c=>{const f=o.has(c),m=t.get(c)??0;return d.jsxs("button",{type:"button",onClick:()=>n(c),"aria-pressed":f,className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors ${f?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300 hover:border-cyan-800/80":"border-gray-700 text-gray-400 hover:border-gray-600 hover:text-gray-200"}`,children:[d.jsx("span",{children:c}),d.jsx("span",{className:`rounded px-1 text-[0.65rem] tabular-nums ${f?"bg-cyan-900/50 text-cyan-200":"bg-gray-800 text-gray-500"}`,children:m})]},c)}),l&&d.jsx("button",{type:"button",onClick:i,className:"ml-1 text-xs text-gray-500 underline-offset-2 transition-colors hover:text-gray-300 hover:underline",children:"Clear"})]}),d.jsxs("p",{className:"mt-2 text-xs text-gray-500",children:["Showing runs with ",d.jsx("span",{className:"text-gray-400",children:"any"})," selected tag."]})]})}function Pne({mode:e,onModeChange:t,runsCount:r}){return d.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:"Analyze runs"}),d.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Study one experiment against another, or pit individual runs head-to-head."})]}),d.jsx(Tne,{mode:e,onChange:t,runsCount:r})]})}function Tne({mode:e,onChange:t,runsCount:r}){const n=r===0;return d.jsxs("div",{role:"tablist","aria-label":"Comparison view mode",className:"inline-flex items-center rounded-lg border border-gray-800 bg-gray-900/50 p-1",children:[d.jsx(IC,{active:e==="aggregated",onClick:()=>t("aggregated"),children:"Aggregated"}),d.jsxs(IC,{active:e==="per-run",onClick:()=>t("per-run"),disabled:n,title:n?"No runs available":void 0,children:["Per run",r>0&&d.jsx("span",{className:"ml-1.5 rounded bg-gray-800 px-1.5 py-0.5 text-xs tabular-nums text-gray-400",children:r})]})]})}function IC({active:e,onClick:t,disabled:r,title:n,children:i}){return d.jsx("button",{type:"button",role:"tab","aria-selected":e,onClick:t,disabled:r,title:n,className:`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${e?"bg-gray-800 text-cyan-400 shadow-sm":"text-gray-400 hover:text-gray-200 disabled:text-gray-600 disabled:hover:text-gray-600"}`,children:i})}function Cne({data:e,projectId:t}){const{experiments:r,targets:n,cells:i}=e,o=S.useMemo(()=>{const l=new Map;for(const c of i)l.set(`${c.experiment}::${c.target}`,c);return l},[i]);return r.length<=1&&n.length<=1?d.jsx(Dp,{headline:"Not enough variation to compare",body:`The aggregated matrix requires at least 2 experiments or 2 targets. Currently ${r.length} experiment(s) and ${n.length} target(s).`}):d.jsxs("div",{className:"space-y-3",children:[d.jsx(Une,{}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:d.jsx("span",{className:"text-xs uppercase tracking-wider",children:"Target ↓ / Experiment →"})}),r.map(l=>d.jsx("th",{className:"px-4 py-3 font-medium text-gray-300",children:l},l))]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(l=>d.jsx(Mne,{target:l,experiments:r,cellMap:o},l))})]})}),d.jsx(xne,{data:e,projectId:t})]})}function Mne({target:e,experiments:t,cellMap:r}){return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:e}),t.map(n=>{const i=r.get(`${n}::${e}`);return d.jsx("td",{className:"px-4 py-3",children:i?d.jsx(Rne,{cell:i}):d.jsx(Dne,{})},n)})]})}function Rne({cell:e}){const[t,r]=S.useState(!1),n=Math.round(e.avg_score*100),i=Ul(e),o=Gt(e);return d.jsxs("div",{className:"space-y-2",children:[d.jsxs("button",{type:"button",className:"group flex w-full flex-col gap-1 rounded-md border border-gray-800 bg-gray-900/40 px-3 py-2 text-left transition-colors hover:border-gray-700 hover:bg-gray-900/70",onClick:()=>r(l=>!l),"aria-expanded":t,children:[d.jsx(tn,{rate:e.pass_rate}),d.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums text-gray-500",children:[d.jsxs("span",{children:[d.jsx("span",{className:"text-emerald-400",children:e.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:i})]}),d.jsx("span",{className:"text-gray-700",children:"·"}),d.jsxs("span",{children:["avg ",n,"%"]}),o>0&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-gray-700",children:"·"}),d.jsxs("span",{className:"text-amber-400",children:[o," errors"]})]})]})]}),t&&d.jsx(kne,{tests:e.tests})]})}function Dne(){return d.jsx("div",{className:"text-center text-gray-600",children:"—"})}function kne({tests:e}){return d.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2",children:[d.jsx("div",{className:"mb-1.5 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Test cases"}),d.jsx("ul",{className:"space-y-1",children:e.map(t=>{const r=t.execution_status==="execution_error";return d.jsxs("li",{className:"flex items-center gap-2 text-xs",children:[d.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${r?"bg-amber-400":t.passed?"bg-emerald-400":"bg-red-400"}`}),d.jsx("span",{className:"flex-1 truncate text-gray-300",title:t.test_id,children:t.test_id}),d.jsx("span",{className:`tabular-nums ${r?"text-amber-400":t.passed?"text-emerald-400":"text-red-400"}`,children:r?"error":`${Math.round(t.score*100)}%`})]},t.test_id)})})]})}function Ine({data:e,projectId:t,readOnly:r}){const n=e.runs??[],[i,o]=S.useState(new Set),[l,c]=S.useState(!1),[f,m]=S.useState(null),p=x=>{o(j=>{const w=new Set(j);return w.has(x)?w.delete(x):w.add(x),w})},y=()=>o(new Set),v=S.useMemo(()=>n.filter(x=>i.has(x.run_id)),[n,i]);return n.length===0?d.jsx(Dp,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):l&&v.length>=2?d.jsx(zne,{runs:v,onBack:()=>c(!1)}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("div",{className:"flex items-center justify-between text-sm text-gray-400",children:d.jsxs("span",{children:[d.jsx("span",{className:"font-medium text-gray-300",children:n.length})," run",n.length===1?"":"s"," — select two or more to compare side-by-side"]})}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"w-10 px-3 py-3","aria-label":"Select"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Timestamp"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tags"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Tests"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(x=>d.jsx(Lne,{run:x,checked:i.has(x.run_id),onToggle:()=>p(x.run_id),editing:f===x.run_id,onStartEdit:()=>m(x.run_id),onEndEdit:()=>m(null),projectId:t,readOnly:r},x.run_id))})]})}),i.size>0&&d.jsxs("div",{role:"toolbar","aria-label":"Selection actions",className:"sticky bottom-4 z-10 flex items-center justify-between gap-3 rounded-lg border border-cyan-900/50 bg-gray-900/95 px-4 py-3 shadow-xl backdrop-blur",children:[d.jsxs("div",{className:"text-sm text-gray-300",children:[d.jsx("span",{className:"font-semibold tabular-nums text-cyan-400",children:i.size})," ","selected"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:y,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"}),d.jsxs("button",{type:"button",disabled:i.size<2,onClick:()=>c(!0),className:"inline-flex items-center gap-1.5 rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:["Compare ",i.size,d.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})]})}function Lne({run:e,checked:t,onToggle:r,editing:n,onStartEdit:i,onEndEdit:o,projectId:l,readOnly:c}){const f=Math.round(e.avg_score*100),m=Ul(e),p=Gt(e),y=!c,v=S.useRef(null),x=e.tags??[],j=e.metadata_dirty===!0,w=x[0]??e.run_id,N=Kne(e.run_id),O=x.length>0?"inline-flex flex-wrap items-center gap-1 rounded-md px-1 py-0.5 transition-colors hover:bg-gray-800/60":j?"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs text-yellow-300 transition-colors hover:border-yellow-700":"rounded-md border border-dashed border-gray-700 px-2 py-0.5 text-xs text-gray-500 transition-colors hover:border-cyan-800 hover:text-cyan-400",P=S.useRef(n);return S.useEffect(()=>{var E;P.current&&!n&&((E=v.current)==null||E.focus()),P.current=n},[n]),d.jsxs(d.Fragment,{children:[d.jsxs("tr",{className:`transition-colors ${t?"bg-cyan-950/20 hover:bg-cyan-950/30":"hover:bg-gray-900/30"}`,children:[d.jsx("td",{className:"px-3 py-3 align-middle",children:d.jsx("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-gray-700 bg-gray-900 text-cyan-500 accent-cyan-500 focus:ring-cyan-500",checked:t,onChange:r,"aria-label":`Select run ${w}`})}),d.jsxs("td",{className:"px-4 py-3 align-middle",title:e.run_id,children:[d.jsx("div",{className:"font-medium text-gray-200 tabular-nums",children:Gk(e.started_at)}),N&&d.jsx("div",{className:"text-xs text-gray-500",children:N})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:y?d.jsx("button",{ref:v,type:"button",onClick:E=>{E.stopPropagation(),i()},className:O,"aria-label":x.length>0?"Edit tags":"Add tags",children:x.length>0?d.jsx(LC,{tags:x,dirty:j}):j?d.jsx(d.Fragment,{children:"Pending clear"}):d.jsx(d.Fragment,{children:"+ tags"})}):x.length>0?d.jsx(LC,{tags:x,dirty:j}):d.jsx("span",{className:j?"text-yellow-400":"text-gray-600",children:j?"Pending clear":"—"})}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.experiment}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.target}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[d.jsx("div",{children:m}),p>0&&d.jsxs("div",{className:"text-xs text-amber-400",children:[p," errors"]})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:d.jsx(tn,{rate:e.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[f,"%"]})]}),n&&d.jsx("tr",{className:"bg-gray-950/80",children:d.jsx("td",{colSpan:8,className:"px-4 py-3",children:d.jsx($ne,{runId:e.run_id,currentTags:x,source:e.source,projectId:l,onClose:o})})})]})}function LC({tags:e,dirty:t}){return d.jsxs("span",{className:"inline-flex flex-wrap items-center gap-1",children:[e.map(r=>d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:r},r)),t?d.jsx("span",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs font-medium text-yellow-300",children:"Pending sync"}):null]})}function $ne({runId:e,currentTags:t,source:r,projectId:n,onClose:i}){const[o,l]=S.useState(t),[c,f]=S.useState(""),[m,p]=S.useState(null),y=ca(),v=S.useRef(null);S.useEffect(()=>{var E;(E=v.current)==null||E.focus()},[]);const x=xx({mutationFn:()=>pB(e,o,n),onSuccess:()=>{y.invalidateQueries({queryKey:["compare"]}),y.invalidateQueries({queryKey:["runs"]}),y.invalidateQueries({queryKey:["remote-status",n??""]}),n&&(y.invalidateQueries({queryKey:["projects",n,"compare"]}),y.invalidateQueries({queryKey:["projects",n,"runs"]})),i()},onError:E=>p(E.message)}),j=xx({mutationFn:()=>yB(e,n),onSuccess:()=>{y.invalidateQueries({queryKey:["compare"]}),y.invalidateQueries({queryKey:["runs"]}),y.invalidateQueries({queryKey:["remote-status",n??""]}),n&&(y.invalidateQueries({queryKey:["projects",n,"compare"]}),y.invalidateQueries({queryKey:["projects",n,"runs"]})),i()},onError:E=>p(E.message)}),w=x.isPending||j.isPending,N=o.length!==t.length||o.some((E,A)=>E!==t[A]),O=()=>{const E=c.trim();if(E!==""){if(o.includes(E)){f("");return}l([...o,E]),f(""),p(null)}},P=E=>{l(o.filter(A=>A!==E))};return d.jsxs("div",{className:"space-y-2 rounded-md border border-gray-800 bg-gray-900/60 p-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:"Tag run"}),d.jsx("span",{className:"text-xs text-gray-500",children:"Multi-valued. Enter or comma adds; Backspace removes the last chip."})]}),r==="remote"?d.jsx("div",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-3 py-2 text-xs text-yellow-300",children:"Remote tag edits are saved as local metadata. Use Sync Metadata to push them to the results repo."}):null,d.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-gray-700 bg-gray-950 px-2 py-1.5 focus-within:border-cyan-500 focus-within:ring-1 focus-within:ring-cyan-500",children:[o.map(E=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:[E,d.jsx("button",{type:"button",onClick:()=>P(E),disabled:w,className:"text-cyan-500 transition-colors hover:text-cyan-200 disabled:opacity-50","aria-label":`Remove tag ${E}`,children:"×"})]},E)),d.jsx("input",{ref:v,type:"text",className:"flex-1 min-w-[140px] bg-transparent text-sm text-gray-100 placeholder:text-gray-600 focus:outline-none disabled:opacity-50",placeholder:o.length===0?"e.g. baseline, v2-prompt, slow":"Add tag…",value:c,onChange:E=>{p(null),f(E.target.value)},maxLength:60,disabled:w,onKeyDown:E=>{E.key==="Enter"||E.key===","?(E.preventDefault(),O()):E.key==="Backspace"&&c===""&&o.length>0?(E.preventDefault(),l(o.slice(0,-1))):E.key==="Escape"&&i()},onBlur:O})]}),d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx("button",{type:"button",onClick:i,disabled:w,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:opacity-50",children:"Cancel"}),t.length>0&&d.jsx("button",{type:"button",onClick:()=>{w||j.mutate()},disabled:w,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:opacity-50",children:"Clear all"}),d.jsx("button",{type:"button",disabled:!N||w,onClick:()=>{w||!N||x.mutate()},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:x.isPending?"Saving…":"Save"})]}),m&&d.jsx("div",{className:"rounded-md border border-red-900/60 bg-red-950/30 px-3 py-1.5 text-xs text-red-400",children:m})]})}function zne({runs:e,onBack:t}){const r=S.useMemo(()=>{const i=new Set,o=[];for(const l of e)for(const c of l.tests)i.has(c.test_id)||(i.add(c.test_id),o.push(c.test_id));return o},[e]),n=S.useMemo(()=>e.map(i=>{const o=new Map;for(const l of i.tests)o.set(l.test_id,l);return o}),[e]);return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("button",{type:"button",onClick:t,className:"inline-flex items-center gap-1 text-sm text-cyan-400 transition-colors hover:text-cyan-300",children:[d.jsx("span",{"aria-hidden":!0,children:"←"})," Back to runs"]}),d.jsxs("span",{className:"text-sm text-gray-500",children:[e.length," runs · ",r.length," tests"]})]}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsxs("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:[d.jsxs("tr",{children:[d.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-3 font-medium text-gray-400 backdrop-blur",children:"Test case"}),e.map(i=>d.jsx("th",{className:"px-4 py-3 align-bottom",children:d.jsx(Bne,{run:i})},i.run_id))]}),d.jsxs("tr",{className:"border-t border-gray-800/50 bg-gray-900/30",children:[d.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-2 text-xs font-medium uppercase tracking-wider text-gray-500 backdrop-blur",children:"Pass rate"}),e.map(i=>d.jsx("th",{className:"px-4 py-2",children:d.jsx(tn,{rate:i.pass_rate})},i.run_id))]})]}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(i=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"sticky left-0 z-10 bg-gray-950/70 px-4 py-3 font-medium text-gray-200 backdrop-blur",children:i}),n.map((o,l)=>{const c=o.get(i),f=e[l].run_id;return c?d.jsx("td",{className:"px-4 py-3",children:d.jsx("div",{className:"flex items-center gap-2",children:c.execution_status==="execution_error"?d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":!0,className:"h-1.5 w-1.5 rounded-full bg-amber-400"}),d.jsx("span",{className:"tabular-nums text-amber-400",children:"error"})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${c.passed?"bg-emerald-400":"bg-red-400"}`}),d.jsxs("span",{className:`tabular-nums ${c.passed?"text-emerald-400":"text-red-400"}`,children:[Math.round(c.score*100),"%"]})]})})},f):d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},f)})]},i))})]})})]})}function Bne({run:e}){const t=e.tags??[];return d.jsxs("div",{className:"min-w-[140px] space-y-1",children:[d.jsx("div",{className:"text-sm font-medium text-gray-200 tabular-nums",title:e.run_id,children:Gk(e.started_at)}),t.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-1.5 py-0.5 text-[0.7rem] font-medium text-cyan-300",children:r},r))}),d.jsxs("div",{className:"text-xs text-gray-500",children:[e.experiment," · ",e.target]})]})}function Une(){return d.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",role:"note",children:[d.jsx(ph,{className:"bg-emerald-400",label:"80%+"}),d.jsx(ph,{className:"bg-yellow-400",label:"50–80%"}),d.jsx(ph,{className:"bg-red-400",label:"< 50%"}),d.jsx(ph,{className:"bg-gray-700",label:"no data"})]})}function ph({className:e,label:t}){return d.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[d.jsx("span",{className:`h-2 w-2 rounded-full ${e}`,"aria-hidden":!0}),d.jsx("span",{children:t})]})}function qne({message:e}){return d.jsx("div",{className:"rounded-lg border border-red-900/60 bg-red-950/30 p-4 text-sm text-red-400",children:e})}function Hne(){return d.jsx(Dp,{headline:"No comparison data yet",body:"Run evaluations with different experiment and target combinations to populate this view."})}function Dp({headline:e,body:t,action:r}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:e}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:t}),r&&d.jsx("button",{type:"button",onClick:r.onClick,className:"mt-4 inline-flex items-center rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400",children:r.label})]})}function Fne(){return d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("div",{className:"animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}function Gk(e){try{const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const r=t.getFullYear(),n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),o=String(t.getHours()).padStart(2,"0"),l=String(t.getMinutes()).padStart(2,"0");return`${r}-${n}-${i} ${o}:${l}`}catch{return e}}function Kne(e){const t=e.split("::");return t.length<2?null:t.slice(0,-1).join(" · ")}function Yk({projectId:e}){const{data:t,isLoading:r}=e?Ue(Gb(e)):iM();if(r)return d.jsx(Gne,{});const n=(t==null?void 0:t.experiments)??[];return n.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Experiments will appear here once evaluations are run with experiment labels."})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[760px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Targets"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(i=>{const o=Ul(i),l=Gt(i);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:e?d.jsx(Oe,{to:"/projects/$projectId/experiments/$experimentName",params:{projectId:e,experimentName:i.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:i.name}):d.jsx(Oe,{to:"/experiments/$experimentName",params:{experimentName:i.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:i.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:i.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:i.target_count}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:i.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),o]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:l>0?l:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(tn,{rate:i.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:$C(i.last_run).full,children:$C(i.last_run).date})]},i.name)})})]})})}function $C(e){if(!e)return{date:"N/A",full:"N/A"};try{const t=new Date(e);if(Number.isNaN(t.getTime()))return{date:"N/A",full:"N/A"};const r=t.toLocaleString(),n=Date.now()-t.getTime(),i=Math.floor(n/6e4),o=Math.floor(n/36e5);let l;return i<1?l="just now":i<60?l=`${i} min ago`:o<24?l=`${o} hour${o===1?"":"s"} ago`:l=t.toLocaleDateString(),{date:l,full:r}}catch{return{date:"N/A",full:"N/A"}}}function Gne(){return d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("div",{className:"min-w-[760px] animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}function Yne(e){if(!e)return"No runs";const t=new Date(e);if(Number.isNaN(t.getTime()))return"N/A";const r=Date.now()-t.getTime(),n=Math.floor(r/6e4);if(n<1)return"Just now";if(n<60)return`${n}m ago`;const i=Math.floor(n/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Vne({project:e,canRemove:t=!1,onRemove:r}){const n=Math.round(e.pass_rate*100),i=Gt(e),[o,l]=S.useState(!1),[c,f]=S.useState(!1),[m,p]=S.useState(!1),[y,v]=S.useState(null),x=S.useId(),j=S.useId(),w=S.useRef(null),N=S.useRef(null),O=S.useRef(null);S.useEffect(()=>{if(!o)return;function T(R){var I,k;const D=R.target;(I=w.current)!=null&&I.contains(D)||(k=N.current)!=null&&k.contains(D)||l(!1)}function M(R){var D;R.key==="Escape"&&(l(!1),(D=w.current)==null||D.focus())}return document.addEventListener("pointerdown",T),document.addEventListener("keydown",M),()=>{document.removeEventListener("pointerdown",T),document.removeEventListener("keydown",M)}},[o]),S.useEffect(()=>{var T;c&&((T=O.current)==null||T.focus())},[c]);function P(){l(!1),v(null),f(!0)}async function E(){if(!(!r||m)){p(!0),v(null);try{await r(e)}catch(T){v(T.message),p(!1)}}}function A(){var T;m||(f(!1),v(null),(T=w.current)==null||T.focus())}return d.jsxs("article",{className:"group relative rounded-lg border border-gray-800 bg-gray-900/50 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[d.jsxs(Oe,{to:"/projects/$projectId",params:{projectId:e.id},className:"block p-5 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-cyan-500",children:[d.jsx("div",{className:"flex items-start justify-between",children:d.jsxs("div",{className:"min-w-0 flex-1 pr-10",children:[d.jsx("h3",{className:"truncate text-lg font-semibold text-white group-hover:text-cyan-400",children:e.name}),d.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:e.path})]})}),d.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-3",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),d.jsx("p",{className:"text-lg font-semibold text-white",children:e.run_count})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),d.jsx("p",{className:`text-lg font-semibold ${e.run_count===0?"text-gray-500":n>=80?"text-emerald-400":n>=50?"text-yellow-400":"text-red-400"}`,children:e.run_count>0?`${n}%`:"--"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Errors"}),d.jsx("p",{className:`text-lg font-semibold ${i>0?"text-amber-300":"text-gray-500"}`,children:i})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),d.jsx("p",{className:"text-sm text-gray-300",children:Yne(e.last_run)})]})]})]}),t&&r?d.jsxs("div",{className:"absolute right-3 top-3 z-10",children:[d.jsx("button",{ref:w,type:"button","aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?x:void 0,"aria-label":`Open ${e.name} project menu`,onClick:()=>l(T=>!T),className:"flex h-8 w-8 items-center justify-center rounded-md text-lg leading-none text-gray-500 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:d.jsx("span",{"aria-hidden":"true",children:"..."})}),o?d.jsx("div",{ref:N,id:x,role:"menu","aria-label":`${e.name} actions`,className:"absolute right-0 top-10 w-44 overflow-hidden rounded-md border border-gray-800 bg-gray-950 py-1 shadow-xl",children:d.jsx("button",{type:"button",role:"menuitem",onClick:P,className:"block w-full px-3 py-2 text-left text-sm text-red-400 transition-colors hover:bg-red-950/30 hover:text-red-300 focus:bg-red-950/30 focus:outline-none",children:"Remove project"})}):null]}):null,c?d.jsx("dialog",{ref:O,open:!0,"aria-modal":"true","aria-labelledby":j,tabIndex:-1,onKeyDown:T=>{T.key==="Escape"&&(T.preventDefault(),A())},className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"w-full max-w-md overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsx("div",{className:"border-b border-gray-800 px-4 py-3",children:d.jsx("h2",{id:j,className:"text-lg font-semibold text-white",children:"Remove project?"})}),d.jsxs("div",{className:"space-y-3 p-4",children:[d.jsxs("p",{className:"text-sm text-gray-300",children:["Remove ",d.jsx("span",{className:"font-medium text-white",children:e.name})," from this Dashboard registry."]}),d.jsxs("p",{className:"text-sm text-gray-500",children:["The project folder and files stay on disk at ",e.path,"."]}),y?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:y}):null]}),d.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("button",{type:"button",onClick:A,disabled:m,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:cursor-not-allowed disabled:opacity-50",children:"Cancel"}),d.jsx("button",{type:"button",onClick:()=>void E(),disabled:m,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm font-medium text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:cursor-not-allowed disabled:opacity-50",children:m?"Removing...":"Remove project"})]})]})}):null]})}function Qne(e){return e.map(t=>({path:t.path,relativePath:t.relative_path,category:t.category}))}function Xne(e){return(e.split(",").at(-1)??"").trim()}function Zne(e,t){const r=Xne(t).toLowerCase();return r?e.filter(n=>n.relativePath.toLowerCase().includes(r)||n.category.toLowerCase().includes(r)):e}function Wne(e,t){const r=e.split(",");return[...(/,\s*$/.test(e)?r:r.slice(0,-1)).map(c=>c.trim()).filter(Boolean).filter(c=>c!==t),t].join(", ")}function Jne(e,t,r){return t?e:zw(e,r)}function zw(e,t){return e||String(t??Ic)}function eae({suiteFilter:e,testIds:t,target:r,thresholdInput:n,studioThreshold:i,workers:o,dryRun:l}){const c={};e.trim()&&(c.suite_filter=e.trim()),t.length>0&&(c.test_ids=t),r&&(c.target=r);const f=zw(n,i);return f&&(c.threshold=Number.parseFloat(f)),o&&(c.workers=Number.parseInt(o,10)),l&&(c.dry_run=!0),c}function jo({open:e,onClose:t,projectId:r,prefill:n}){const i=ca(),o=ho(),[l,c]=S.useState((n==null?void 0:n.suiteFilter)??""),[f,m]=S.useState(""),[p,y]=S.useState((n==null?void 0:n.testIds)??[]),[v,x]=S.useState((n==null?void 0:n.target)??""),[j,w]=S.useState(""),[N,O]=S.useState(!1),[P,E]=S.useState(""),[A,T]=S.useState(!1),[M,R]=S.useState(!1),[D,I]=S.useState(null),[k,H]=S.useState(null),[q,ae]=S.useState(!1),[Q,Z]=S.useState(null),{data:B}=xB(r),{data:K}=jB(r),{data:ee}=Yb(D,r),{data:se}=mt(r),ue=S.useMemo(()=>Qne((B==null?void 0:B.eval_files)??[]),[B]),L=S.useMemo(()=>Zne(ue,l),[ue,l]),W=S.useMemo(()=>(K==null?void 0:K.targets)??[],[K]),le=S.useMemo(()=>zw(j,se==null?void 0:se.threshold),[se==null?void 0:se.threshold,j]),oe=S.useMemo(()=>Jne(j,N,se==null?void 0:se.threshold),[se==null?void 0:se.threshold,j,N]);S.useEffect(()=>{e&&(c((n==null?void 0:n.suiteFilter)??""),y((n==null?void 0:n.testIds)??[]),x((n==null?void 0:n.target)??""),m(""),w(""),O(!1),E(""),T(!1),R(!1),I(null),H(null),ae(!1),Z(null))},[e,n]),S.useEffect(()=>{((ee==null?void 0:ee.status)==="finished"||(ee==null?void 0:ee.status)==="failed")&&(i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["projects"]}))},[ee==null?void 0:ee.status,i]);const ye=S.useCallback(()=>eae({suiteFilter:l,testIds:p,target:v,thresholdInput:j,studioThreshold:se==null?void 0:se.threshold,workers:P,dryRun:A}),[A,se==null?void 0:se.threshold,l,v,p,j,P]);S.useEffect(()=>{const te=ye();if(!te.suite_filter&&(!te.test_ids||te.test_ids.length===0)){Z(null);return}OB(te,r).then(we=>Z(we.command)).catch(()=>Z(null))},[ye,r]);function Se(){const te=f.trim();te&&!p.includes(te)&&y([...p,te]),m("")}function Ne(te){y(p.filter(we=>we!==te))}async function Ce(){H(null),ae(!0);try{const te=ye(),we=await hM(te,r);I(we.id)}catch(te){H(te.message)}finally{ae(!1)}}if(!e)return null;if(D&&ee){let te=function(){t(),o({to:EB(r)})};return d.jsx(zC,{onClose:t,title:"Eval Run",children:d.jsx(tae,{status:ee,onClose:t,onRunInBackground:te,runId:D})})}const de=!!(l.trim()||p.length>0);return d.jsx(zC,{onClose:t,title:"Run Eval",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),d.jsx("input",{id:"suite-filter",type:"text",value:l,onChange:te=>c(te.target.value),placeholder:"evals/**/*.eval.yaml",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),ue.length>0&&d.jsx("div",{className:"mt-1.5 max-h-44 overflow-y-auto rounded-md border border-gray-800 bg-gray-950/60 p-1",children:L.length>0?L.map(te=>d.jsxs("button",{type:"button",onClick:()=>c(we=>Wne(we,te.relativePath)),className:"block w-full rounded px-2 py-1 text-left text-xs text-gray-400 hover:bg-gray-800 hover:text-gray-200",children:[d.jsx("span",{className:"block truncate",children:te.relativePath}),te.category&&d.jsx("span",{className:"block truncate text-[11px] text-gray-600",children:te.category})]},te.relativePath)):d.jsx("div",{className:"px-2 py-1 text-xs text-gray-500",children:"No matching eval files"})})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"test-id-input",type:"text",value:f,onChange:te=>m(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),Se())},placeholder:"auth-*, retrieval-basic",className:"flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),d.jsx("button",{type:"button",onClick:Se,disabled:!f.trim(),className:"rounded-md bg-gray-700 px-3 py-2 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),p.length>0&&d.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:p.map(te=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cyan-900/40 px-2.5 py-0.5 text-xs text-cyan-300",children:[te,d.jsx("button",{type:"button",onClick:()=>Ne(te),className:"text-cyan-400 hover:text-white",children:"×"})]},te))})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),d.jsxs("select",{id:"target-override",value:v,onChange:te=>x(te.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white focus:border-cyan-600 focus:outline-none",children:[d.jsx("option",{value:"",children:"Use eval's configured target"}),W.map(te=>d.jsx("option",{value:te,children:te},te))]})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>R(!M),className:"text-sm text-gray-400 hover:text-gray-200",children:[M?"▾":"▸"," Advanced Options"]}),M&&d.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),d.jsx("input",{id:"threshold-input",type:"number",value:oe,onChange:te=>{O(!0),w(te.target.value)},min:"0",max:"1",step:"0.1",placeholder:le,className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),d.jsx("input",{id:"workers-input",type:"number",value:P,onChange:te=>E(te.target.value),min:"1",max:"50",placeholder:"3",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),d.jsx("div",{className:"col-span-2",children:d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx("input",{type:"checkbox",checked:A,onChange:te=>T(te.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),Q&&d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[d.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),d.jsx("code",{className:"block break-all text-xs text-cyan-300",children:Q})]}),k&&d.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:k}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),d.jsx("button",{type:"button",onClick:Ce,disabled:!de||q,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:q?"Launching…":"Run Now"})]})]})})}function zC({children:e,onClose:t,title:r}){return d.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:d.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:r}),d.jsx("button",{type:"button",onClick:t,className:"text-gray-400 hover:text-white",children:"✕"})]}),d.jsx("div",{className:"px-5 py-4",children:e})]})})}function tae({status:e,onClose:t,onRunInBackground:r,runId:n}){const i=e.status==="finished"||e.status==="failed",o={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"};return d.jsxs("div",{className:"space-y-3",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("span",{className:`text-sm font-medium ${o[e.status]??"text-gray-400"}`,children:[e.status==="running"&&"●"," ",e.status.charAt(0).toUpperCase()+e.status.slice(1)]}),!i&&d.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]}),d.jsx("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:d.jsx("code",{className:"block break-all text-xs text-cyan-300",children:e.command})}),e.stdout&&d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-md bg-gray-950 p-3",children:d.jsx("pre",{className:"whitespace-pre-wrap text-xs text-gray-300",children:e.stdout.slice(-3e3)})}),e.stderr&&d.jsx("div",{className:"max-h-24 overflow-y-auto rounded-md bg-red-950/20 p-3",children:d.jsx("pre",{className:"whitespace-pre-wrap text-xs text-red-300",children:e.stderr.slice(-2e3)})}),d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs text-gray-500",children:i?d.jsxs(d.Fragment,{children:["Exit code: ",e.exit_code,e.finished_at&&` · ${new Date(e.finished_at).toLocaleTimeString()}`]}):n&&d.jsx("button",{type:"button",onClick:r,className:"text-xs text-gray-400 hover:text-cyan-400",children:"Run in background"})}),i&&d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Close"})]})]})}function J0(e){if(e.source==="remote")return"Remote runs cannot be combined or deleted from the local workspace.";if(e.status==="starting"||e.status==="running")return"Running runs cannot be combined or deleted yet."}function rae(e){return`${e} local run${e===1?"":"s"} selected`}function nae(e,t){return`Combined ${e} local run${e===1?"":"s"} into ${t}.`}function aae(e){return`Deleted ${e} local run${e===1?"":"s"}.`}function iae(e){if(!e)return{date:"N/A",full:"N/A"};try{const t=new Date(e);if(Number.isNaN(t.getTime()))return{date:"N/A",full:"N/A"};const r=t.toLocaleString(),n=Date.now()-t.getTime(),i=Math.floor(n/6e4),o=Math.floor(n/36e5);let l;return i<1?l="just now":i<60?l=`${i} min ago`:o<24?l=`${o} hour${o===1?"":"s"} ago`:l=t.toLocaleDateString(),{date:l,full:r}}catch{return{date:"N/A",full:"N/A"}}}function sae(e,t){const r=iae(e.timestamp),n=e.status==="starting"||e.status==="running",i=Wb(e,{includePassRate:!1}),o=i.label,l=Gt(e),c=Math.max(0,e.test_count-l),f=c>0?e.pass_rate>=t:l===0,m=Math.round(e.pass_rate*c),p=c-m,y=e.metadata_dirty===!0;return{run:e,ts:r,isActive:n,label:o,display:i,errors:l,qualityCount:c,passing:f,passedCount:m,failedCount:p,metadataDirty:y}}function kp({runs:e,projectId:t,emptyMessage:r,hasNextPage:n=!1,isFetchingNextPage:i=!1,onLoadMore:o,enableCombine:l=!1}){const{data:c}=mt(t),f=ca(),m=(c==null?void 0:c.threshold)??Ic,p=S.useRef(null),y=S.useRef(null),v=S.useRef(!1),[x,j]=S.useState([]),[w,N]=S.useState(null),[O,P]=S.useState(!1),[E,A]=S.useState(!1),T=S.useMemo(()=>e.map(Q=>sae(Q,m)),[m,e]),M=S.useMemo(()=>e.filter(Q=>l&&!J0(Q)).map(Q=>Q.filename),[l,e]),R=new Set(x);S.useEffect(()=>{i||(v.current=!1)},[i]),S.useEffect(()=>{if(!n||!o)return;const Q=[];if(p.current&&Q.push(p.current),y.current&&Q.push(y.current),Q.length===0)return;const Z=new IntersectionObserver(B=>{B.some(K=>K.isIntersecting)&&!i&&!v.current&&(v.current=!0,o())},{rootMargin:"200px 0px"});for(const B of Q)Z.observe(B);return()=>Z.disconnect()},[n,i,o]),S.useEffect(()=>{const Q=new Set(M);j(Z=>Z.filter(B=>Q.has(B)))},[M]);async function D(){if(t){await Promise.all([f.invalidateQueries({queryKey:["projects",t,"runs"]}),f.invalidateQueries({queryKey:["projects",t,"experiments"]}),f.invalidateQueries({queryKey:["projects",t,"compare"]}),f.invalidateQueries({queryKey:["projects",t,"targets"]})]);return}await Promise.all([f.invalidateQueries({queryKey:["runs"]}),f.invalidateQueries({queryKey:["experiments"]}),f.invalidateQueries({queryKey:["compare"]}),f.invalidateQueries({queryKey:["targets"]})])}async function I(){if(x.length<2||O)return;const Q=[...x];N(null),P(!0);try{let Z;try{Z=await R_(Q,"error",t)}catch(B){if(!(B instanceof fM)||B.status!==409)throw B;const K=B.duplicates.length;if(!window.confirm(`${K} duplicate (test_id, target) pair${K===1?"":"s"} found. Replace duplicates with the latest timestamp?`))return;Z=await R_(Q,"latest",t)}j([]),N({kind:"success",message:nae(Q.length,Z.display_name),combinedRunId:Z.run_id,sourceRunIds:Q}),await D()}catch(Z){N({kind:"error",message:Z.message})}finally{P(!1)}}async function k(){x.length===0||E||await q(x,"selected")}async function H(){const Q=(w==null?void 0:w.sourceRunIds)??[];Q.length===0||E||await q(Q,"combined-sources")}async function q(Q,Z){const B=Q.length,K=B===1?"run":"runs",ee=Z==="combined-sources"?`Delete the ${B} source local ${K} used for the combined run? The combined run will remain.`:`Delete ${B} local ${K}? This removes the run workspace and artifacts from disk.`;if(window.confirm(ee)){N(null),A(!0);try{for(const ue of Q)await mB(ue,t);j([]),N({kind:"success",message:aae(B)}),await D()}catch(ue){N({kind:"error",message:ue.message})}finally{A(!1)}}}function ae(Q){j(Z=>Z.includes(Q)?Z.filter(B=>B!==Q):[...Z,Q])}return e.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:r??d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):d.jsxs("div",{className:"space-y-3",children:[l&&d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0 space-y-1",children:[d.jsx("p",{className:"text-sm font-medium text-gray-200",children:rae(x.length)}),d.jsx("p",{className:"text-xs text-gray-500",children:"Select completed local runs to combine or delete. Remote runs stay read-only here."}),w&&d.jsx("div",{className:`mt-2 rounded-md border px-3 py-2 text-sm ${w.kind==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":"border-red-900/60 bg-red-950/20 text-red-300"}`,role:w.kind==="error"?"alert":"status",children:d.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[d.jsx("span",{children:w.message}),w.combinedRunId?t?d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:t,runId:w.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):d.jsx(Oe,{to:"/runs/$runId",params:{runId:w.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):null,w.sourceRunIds&&w.sourceRunIds.length>0?d.jsx("button",{type:"button",onClick:()=>void H(),disabled:E||O,className:"font-medium text-red-300 hover:text-red-200 hover:underline disabled:cursor-not-allowed disabled:text-gray-500",children:E?"Deleting sources...":"Delete source runs"}):null]})})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>void k(),disabled:x.length===0||E||O,className:"whitespace-nowrap rounded-md border border-red-900/70 px-3 py-1.5 text-sm font-medium text-red-300 hover:border-red-700 hover:bg-red-950/40 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-500",children:E?"Deleting...":"Delete selected"}),d.jsx("button",{type:"button",onClick:()=>void I(),disabled:x.length<2||O||E,className:"whitespace-nowrap rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-400",children:O?"Combining...":"Combine selected"})]})]}),d.jsxs("div",{className:"space-y-2 sm:hidden",children:[T.map(Q=>{const{run:Z,ts:B,label:K,display:ee,errors:se,qualityCount:ue,passedCount:L,failedCount:W,metadataDirty:le}=Q,oe=J0(Z),ye=!oe&&M.includes(Z.filename);return d.jsxs("article",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-3 py-3",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[l&&d.jsx("input",{type:"checkbox",checked:R.has(Z.filename),disabled:!ye,onChange:()=>ae(Z.filename),title:oe,"aria-label":oe?`${K}: ${oe}`:`Select ${K}`,className:"mt-1 h-4 w-4 shrink-0 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"}),d.jsx(HC,{view:Q,className:"mt-1 shrink-0"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx(BC,{projectId:t,runId:Z.filename,label:ee.primary,title:ee.title,className:"block truncate text-sm font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),ee.secondary?d.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-500",title:ee.title,children:ee.secondary}):null,d.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[d.jsx(UC,{source:Z.source}),le?d.jsx(qC,{}):null,d.jsx("span",{className:"text-xs text-gray-500",title:B.full,children:B.date})]})]})]}),d.jsxs("dl",{className:"mt-3 grid grid-cols-2 gap-x-3 gap-y-2 border-t border-gray-800/70 pt-3",children:[d.jsx(pl,{label:"Pass Rate",valueClassName:"text-gray-300",children:d.jsx(tn,{rate:Z.pass_rate})}),d.jsx(pl,{label:"Total",valueClassName:"text-gray-300",children:ue}),d.jsx(pl,{label:"Passed",valueClassName:"text-emerald-300",children:L}),d.jsx(pl,{label:"Failures",valueClassName:"text-red-400",children:W>0?W:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(pl,{label:"Errors",valueClassName:"text-amber-300",children:se>0?se:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(pl,{label:"Source",valueClassName:"text-gray-400",children:Z.source==="remote"?"Remote":"Local"})]})]},Z.filename)}),(n||i)&&d.jsx("div",{ref:y,className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})]}),d.jsx("div",{className:"hidden max-w-full overflow-x-auto rounded-lg border border-gray-800 sm:block",children:d.jsxs("table",{className:"min-w-[780px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[l&&d.jsx("th",{className:"w-10 px-4 py-3"}),d.jsx("th",{className:"w-8 px-4 py-3"}),d.jsx("th",{className:"w-[22rem] px-4 py-3 font-medium text-gray-400",children:"Run"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Source"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Errors"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),d.jsxs("tbody",{className:"divide-y divide-gray-800/50",children:[T.map(Q=>{const{run:Z,ts:B,label:K,display:ee,errors:se,qualityCount:ue,passedCount:L,failedCount:W,metadataDirty:le}=Q,oe=J0(Z),ye=!oe&&M.includes(Z.filename);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[l&&d.jsx("td",{className:"px-4 py-3",children:d.jsx("input",{type:"checkbox",checked:R.has(Z.filename),disabled:!ye,onChange:()=>ae(Z.filename),title:oe,"aria-label":oe?`${K}: ${oe}`:`Select ${K}`,className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"})}),d.jsx("td",{className:"px-4 py-3 text-center",children:d.jsx(HC,{view:Q})}),d.jsx("td",{className:"w-[22rem] max-w-[22rem] px-4 py-3",children:d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx(BC,{projectId:t,runId:Z.filename,label:ee.primary,title:ee.title,className:"block min-w-0 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),le?d.jsx(qC,{}):null]}),ee.secondary?d.jsx("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:ee.title,children:ee.secondary}):null]})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(UC,{source:Z.source})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:L}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:W>0?W:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums",children:se>0?d.jsx("span",{className:"text-amber-300",children:se}):d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:ue}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(tn,{rate:Z.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:B.full,children:B.date})]},Z.filename)}),(n||i)&&d.jsx("tr",{ref:p,children:d.jsx("td",{colSpan:l?10:9,className:"px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})})]})]})})]})}function BC({projectId:e,runId:t,label:r,title:n,className:i}){return e?d.jsx(Oe,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:i,title:n,children:r}):d.jsx(Oe,{to:"/runs/$runId",params:{runId:t},className:i,title:n,children:r})}function UC({source:e}){return d.jsx("span",{className:`inline-flex rounded-md border px-2 py-0.5 text-xs font-medium ${e==="remote"?"border-cyan-900/60 bg-cyan-950/20 text-cyan-300":"border-gray-800 bg-gray-900/70 text-gray-400"}`,children:e==="remote"?"Remote":"Local"})}function qC(){return d.jsx("span",{className:"shrink-0 rounded-md border border-yellow-900/60 bg-yellow-950/20 px-1.5 py-0.5 text-xs text-yellow-300",title:"Use Sync Metadata to push this metadata to the results repo.",children:"Pending sync"})}function HC({view:e,className:t=""}){return e.isActive?d.jsx("span",{className:`inline-block h-2 w-2 animate-pulse rounded-full bg-cyan-400 ${t}`,title:e.run.status==="starting"?"Starting...":"Running...","aria-label":e.run.status==="starting"?"Starting":"Running"}):e.qualityCount===0&&e.errors>0?d.jsx("span",{className:`text-base font-bold text-amber-300 ${t}`,title:"Execution errors",children:"!"}):d.jsx("span",{className:`text-base font-bold ${e.passing?"text-emerald-400":"text-red-400"} ${t}`,children:e.passing?"✓":"✗"})}function pl({label:e,valueClassName:t,children:r}){return d.jsxs("div",{className:"min-w-0",children:[d.jsx("dt",{className:"text-xs text-gray-500",children:e}),d.jsx("dd",{className:`mt-1 min-w-0 text-sm tabular-nums ${t}`,children:r})]})}function Vk({filter:e,onFilterChange:t,remoteStatus:r,syncInFlight:n,onSync:i,projectName:o,syncFeedback:l}){var w,N;const c=(r==null?void 0:r.configured)===!0,f=L8(r,n),m=n===!0||!f.canSync,p={neutral:"border-gray-700 bg-gray-800/70 text-gray-300",good:"border-emerald-800/70 bg-emerald-950/30 text-emerald-300",info:"border-cyan-800/70 bg-cyan-950/30 text-cyan-300",warn:"border-yellow-800/70 bg-yellow-950/30 text-yellow-300",danger:"border-red-800/70 bg-red-950/30 text-red-300"}[f.tone],y=(l==null?void 0:l.kind)==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":(l==null?void 0:l.kind)==="warning"?"border-yellow-900/60 bg-yellow-950/20 text-yellow-300":"border-red-900/60 bg-red-950/20 text-red-300",v=((w=r==null?void 0:r.dirty_paths)==null?void 0:w.length)??0,x=((N=r==null?void 0:r.conflicted_paths)==null?void 0:N.length)??0,j=k8(r,o);return d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-2",children:["all","local","remote"].map(O=>{const P=O==="remote"&&!c;return d.jsx("button",{type:"button",onClick:()=>t(O),title:P?"Remote results are not configured":void 0,className:`rounded-full px-3 py-1 text-sm font-medium transition-colors ${e===O?"bg-cyan-500/20 text-cyan-300":P?"bg-gray-800 text-gray-600":"bg-gray-800 text-gray-400 hover:text-gray-200"}`,children:O==="all"?"All Sources":O==="local"?"Local Only":"Remote Only"},O)})}),c?d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${p}`,children:f.label}),i?d.jsx("button",{type:"button",onClick:i,disabled:m,title:f.canSync?void 0:f.nextAction,className:"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm font-medium text-cyan-300 transition-colors hover:bg-cyan-900/50 disabled:cursor-not-allowed disabled:opacity-60",children:n?"Syncing...":f.actionLabel}):null]}):null]}),c?d.jsxs("div",{className:"space-y-2 text-sm",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-gray-400",children:j.map(O=>d.jsx("span",{children:O},O))}),d.jsx("p",{className:f.tone==="danger"?"text-red-300":"text-gray-400",children:f.summary}),f.nextAction?d.jsx("p",{className:"text-xs text-gray-500",children:f.nextAction}):null,v>0||x>0?d.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[v>0?d.jsxs("span",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-yellow-300",children:[v," dirty path",v===1?"":"s"]}):null,x>0?d.jsxs("span",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-2 py-0.5 text-red-300",children:[x," conflicted path",x===1?"":"s"]}):null]}):null]}):e==="all"?d.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results"})," to"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}):null,l?d.jsx("div",{className:`rounded-md border px-3 py-2 text-sm ${y}`,role:l.kind==="error"?"alert":"status",children:l.message}):null,r!=null&&r.last_error?d.jsxs("div",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-3 py-2 text-sm text-red-300",role:"alert",children:[d.jsx("p",{className:"font-medium",children:"Remote sync error"}),d.jsx("p",{children:r.last_error}),d.jsx("p",{className:"mt-1 text-xs text-red-200/80",children:qb(r)})]}):null,r!=null&&r.git_diff_summary&&f.state!=="clean"?d.jsx("pre",{className:"max-h-32 overflow-auto whitespace-pre-wrap rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2 text-xs text-gray-500",children:r.git_diff_summary}):null]})}const FC="remote::";function oae(e){return e.startsWith(FC)?e.slice(FC.length):e}function Ip(e){const t=new Map;for(const r of e){const n=oae(r.filename),i=t.get(n);(!i||i.source==="remote"&&r.source==="local")&&t.set(n,r)}return[...t.values()]}function Qk({projectId:e}={}){var y,v;const[t,r]=S.useState(null),n=Ue(e?fB(e):Q8),i=Ue(e?Kb(e):Hb),o=((y=n.data)==null?void 0:y.targets)??[],l=((v=i.data)==null?void 0:v.runs)??[],c=n.error??i.error,f=n.isLoading||i.isLoading,m=S.useMemo(()=>o.find(x=>x.name===t)??null,[t,o]);S.useEffect(()=>{t&&!o.some(x=>x.name===t)&&r(null)},[t,o]);const p=S.useMemo(()=>{if(!m)return[];const x=new Map;for(const j of l){if((j.target??"default")!==m.name)continue;const N=j.experiment??"default",O=x.get(N)??[];O.push(j),x.set(N,O)}return[...x.entries()].map(([j,w])=>lae(j,Ip(w))).sort((j,w)=>j.latestTimestamp&&w.latestTimestamp&&j.latestTimestamp!==w.latestTimestamp?w.latestTimestamp.localeCompare(j.latestTimestamp):j.latestTimestamp?-1:w.latestTimestamp?1:j.name.localeCompare(w.name))},[l,m]);return f?d.jsx(dae,{}):c?d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load targets: ",c.message]}):o.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Targets will appear here once evaluations are run with target labels."})]}):m?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"space-y-3",children:[d.jsx("button",{type:"button",onClick:()=>r(null),className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"← Back to targets"}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:m.name}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[m.run_count," run",m.run_count===1?"":"s"," ·"," ",m.experiment_count," experiment",m.experiment_count===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:m.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),Ul(m)," evals passed",Gt(m)>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",Gt(m)," execution errors"]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(tn,{rate:m.pass_rate})})]})})]}),p.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No runs found for this target"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This target summary exists, but there are no matching runs to group by experiment."})]}):d.jsx("div",{className:"space-y-6",children:p.map(x=>d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-medium text-gray-200",children:uae(x.name)}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[x.runs.length," run",x.runs.length===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:x.passedCount}),d.jsx("span",{className:"text-gray-600",children:" / "}),x.qualityCount," evals passed",x.executionErrorCount>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",x.executionErrorCount," execution errors"]}),x.latestTimestamp&&d.jsxs("span",{className:"ml-2 text-gray-500",children:["· Last run ",cae(x.latestTimestamp)]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(tn,{rate:x.passRate})})]}),d.jsx(kp,{runs:x.runs,projectId:e})]},x.name))})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[720px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:o.map(x=>{const j=Ul(x),w=Gt(x);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsx("button",{type:"button",onClick:()=>r(x.name),className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.experiment_count}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(tn,{rate:x.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:x.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:j})]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:w>0?w:d.jsx("span",{className:"text-gray-600",children:"0"})})]},x.name)})})]})})}function lae(e,t){let r=0,n=0,i=0,o=0,l=null;for(const c of t){const f=Gt(c),m=Math.max(0,c.test_count-f);r+=c.test_count,n+=m,o+=f,i+=Math.round(c.pass_rate*m),c.timestamp&&(!l||c.timestamp>l)&&(l=c.timestamp)}return{name:e,runs:t,latestTimestamp:l,evalCount:r,qualityCount:n,passedCount:i,executionErrorCount:o,passRate:n>0?i/n:0}}function uae(e){return e==="default"?"Default experiment":e}function cae(e){const t=new Date(e);if(Number.isNaN(t.getTime()))return e;const r=Date.now()-t.getTime(),n=Math.floor(r/6e4),i=Math.floor(r/36e5);return n<1?"just now":n<60?`${n} min ago`:i<24?`${i} hour${i===1?"":"s"} ago`:t.toLocaleDateString()}function dae(){return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[d.jsx("div",{className:"h-6 w-40 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"mt-3 h-4 w-72 animate-pulse rounded bg-gray-800"})]}),d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("div",{className:"animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},e))]})}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[d.jsx("div",{className:"h-5 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"mt-3 h-4 w-56 animate-pulse rounded bg-gray-800"})]})]})}const KC=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Targets"}],fae=_r("/")({component:hae});function hae(){const e=ho(),n=Bb().location.search.tab,{data:i,isLoading:o}=sd(),{data:l,isLoading:c}=mt(),f=(i==null?void 0:i.projects)??[],[m,p]=S.useState(void 0);S.useEffect(()=>{if(o||c)return;const v=l==null?void 0:l.current_project_id;if(!v){p(null);return}const x=_B(v),j=typeof window<"u"&&window.sessionStorage.getItem(x)==="1",w=AB(f.map(N=>N.id),v,j);typeof window<"u"&&w&&window.sessionStorage.setItem(x,"1"),p(w??null)},[l==null?void 0:l.current_project_id,c,f,o]);const y=PB(f.map(v=>v.id),l==null?void 0:l.project_dashboard,m??void 0,n);return S.useEffect(()=>{y.kind==="redirect"&&y.redirectPath&&e({to:y.redirectPath,replace:!0})},[y,e]),o||c||m===void 0?d.jsx(Ob,{}):y.kind==="redirect"?d.jsx(Ob,{}):y.kind==="dashboard"?d.jsx(mae,{}):d.jsx(pae,{})}function mae(){const{data:e}=sd(),{data:t}=mt(),r=ca(),[n,i]=S.useState(!1),[o,l]=S.useState(!1),[c,f]=S.useState(null),m=(e==null?void 0:e.projects)??[],p=(t==null?void 0:t.read_only)===!0;async function y(v){await oB(v.id),r.setQueryData(["projects"],x=>x&&{projects:x.projects.filter(j=>j.id!==v.id)}),f(`Project removed from Dashboard: ${v.name}. Files were left on disk.`),r.invalidateQueries({queryKey:["projects"]})}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Projects"}),d.jsx("div",{className:"flex gap-2",children:!p&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"}),d.jsx("button",{type:"button",onClick:()=>{f(null),i(!0)},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400",children:"Add Project"})]})})]}),c&&d.jsx("div",{className:"rounded-lg border border-cyan-900/60 bg-cyan-950/30 p-3 text-sm text-cyan-300",children:c}),m.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:"No projects registered yet."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Add a project path to start browsing runs, experiments, analytics, and targets."})]}):d.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:m.map(v=>d.jsx(Vne,{project:v,canRemove:!p,onRemove:y},v.id))}),!p&&d.jsx(jo,{open:o,onClose:()=>l(!1)}),!p&&d.jsx(a6,{open:n,onClose:()=>i(!1),onAdded:v=>{f(`Project registered: ${v.name}`),r.invalidateQueries({queryKey:["projects"]})}})]})}function pae(){const r=Bb().location.search.tab,n=ho(),i=ca(),{data:o,isLoading:l,error:c,hasNextPage:f,fetchNextPage:m,isFetchingNextPage:p}=tB(),{data:y}=Lm(),{data:v}=mt(),[x,j]=S.useState(!1),[w,N]=S.useState("all"),[O,P]=S.useState(!1),[E,A]=S.useState(null),T=(v==null?void 0:v.read_only)===!0,M=KC.some(I=>I.id===r)?r:"runs",R=w==="all"?Ip((o==null?void 0:o.runs)??[]):((o==null?void 0:o.runs)??[]).filter(I=>I.source===w);async function D(){P(!0),A(null);try{const I=await dM();i.setQueryData(Fb().queryKey,I),A(eM(I)),Promise.all([i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["experiments"]}),i.invalidateQueries({queryKey:["compare"]}),i.invalidateQueries({queryKey:["targets"]}),i.invalidateQueries({queryKey:["remote-status",""]})]).catch(()=>{})}catch(I){A(tM(I,y)),i.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{P(!1)}}return S.useEffect(()=>{if((E==null?void 0:E.kind)!=="success")return;const I=window.setTimeout(()=>A(null),7e3);return()=>window.clearTimeout(I)},[E]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(v==null?void 0:v.project_name)&&d.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:v.project_name})]}),!T&&d.jsx("button",{type:"button",onClick:()=>j(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:flex-nowrap",children:KC.map(I=>d.jsx("button",{type:"button",onClick:()=>n({to:"/",search:{tab:I.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${M===I.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:I.label},I.id))})}),M==="runs"&&d.jsx(vae,{runs:R,isLoading:l,error:c,sourceFilter:w,onSourceFilterChange:N,remoteStatus:y,syncInFlight:O,syncFeedback:E,onSyncRemote:D,projectName:v==null?void 0:v.project_name,hasNextPage:f,isFetchingNextPage:p,onLoadMore:()=>void m(),readOnly:T}),M==="experiments"&&d.jsx(Yk,{}),M==="analytics"&&d.jsx(yae,{readOnly:T}),M==="targets"&&d.jsx(Qk,{}),!T&&d.jsx(jo,{open:x,onClose:()=>j(!1)})]})}function yae({readOnly:e}){const{data:t,isLoading:r,isError:n,error:i}=nB();return d.jsx(Kk,{data:t,isLoading:r,isError:n,error:i,readOnly:e})}function vae({runs:e,isLoading:t,error:r,sourceFilter:n,onSourceFilterChange:i,remoteStatus:o,syncInFlight:l,syncFeedback:c,onSyncRemote:f,projectName:m,hasNextPage:p,isFetchingNextPage:y,onLoadMore:v,readOnly:x}){return t?d.jsx(Ob,{}):r?d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",r.message]}):d.jsxs("div",{className:"space-y-4",children:[d.jsx(gae,{}),d.jsx(Vk,{filter:n,onFilterChange:i,remoteStatus:o,syncInFlight:l,onSync:f,projectName:m,syncFeedback:c}),d.jsx(kp,{runs:e,enableCombine:!x,hasNextPage:p,isFetchingNextPage:y,onLoadMore:v,emptyMessage:n==="remote"?o!=null&&o.configured?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No remote runs found."}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Sync remote results or run an eval with"," ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"sync.auto_push: true"})," ","in your config."]})]}):d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"Remote results are not configured."}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Add ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"results"})," ","to"," ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:".agentv/config.yaml"})," ","to enable remote result syncing."]})]}):void 0})]})}function gae(){const{data:e}=Vb(),t=((e==null?void 0:e.runs)??[]).filter(r=>r.status==="starting"||r.status==="running");return t.length===0?null:d.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[d.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),d.jsx("ul",{className:"divide-y divide-gray-800/50",children:t.map(r=>d.jsxs("li",{className:"flex items-center justify-between px-4 py-3",children:[d.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[d.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),d.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:r.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(r.started_at).toLocaleTimeString()})]}),d.jsx(Oe,{to:"/jobs/$runId",params:{runId:r.id},className:"ml-4 flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},r.id))})]})}function Ob(){return d.jsx("div",{className:"space-y-2",children:["s1","s2","s3","s4","s5"].map(e=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},e))})}function Xk(e){return e==="finished"||e==="failed"}function xae(e,t){return t||!e?!1:!Xk(e)}function bae(e,t,r,n){return t||n&&!Xk(n)?!1:!!(e.some(i=>i.executionStatus==="execution_error")||r!==void 0&&e.length<r)}function jae(e){const t={suite_filter:e.suiteFilter,output:e.runDir};return e.target&&(t.target=e.target),e.mode==="resume"?t.resume=!0:t.rerun_failed=!0,t}function Zk({results:e,runDir:t,suiteFilter:r,target:n,projectId:i,isReadOnly:o,plannedTestCount:l,runStatus:c}){const f=ho(),[m,p]=S.useState(null),[y,v]=S.useState(null);if(!bae(e,o,l,c))return null;const x=!!t&&!!r,j=t?r?"":"Original eval file path missing from benchmark.json — cannot determine what to resume":"Run directory unavailable (remote run cannot be resumed in place)";async function w(N){if(!(!x||!t||!r)){p(N),v(null);try{const O=jae({mode:N,runDir:t,suiteFilter:r,target:n}),P=await hM(O,i);f(i?{to:"/projects/$projectId/jobs/$runId",params:{projectId:i,runId:P.id}}:{to:"/jobs/$runId",params:{runId:P.id}})}catch(O){v(O instanceof Error?O.message:"Failed to launch resume"),p(null)}}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>w("resume"),disabled:!x||m!==null,title:x?"Skip already-completed tests, run the rest":j,className:"rounded-md bg-amber-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-500 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"resume-run-button",children:m==="resume"?"Resuming…":"↻ Resume run"}),d.jsx("button",{type:"button",onClick:()=>w("rerun"),disabled:!x||m!==null,title:x?"Re-run failed/errored tests, keep passing results":j,className:"rounded-md border border-amber-600/60 bg-transparent px-3 py-1.5 text-sm font-medium text-amber-300 hover:bg-amber-950/40 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"rerun-failed-button",children:m==="rerun"?"Re-running…":"Rerun failed cases"})]}),y&&d.jsx("p",{className:"text-xs text-red-400",children:y})]})}function Jl({total:e,passed:t,failed:r,passRate:n,executionErrors:i=0,totalCost:o}){const l=Math.round(n*100),c=l>=80?"text-cyan-400":l>=60?"text-amber-400":"text-red-400";return d.jsxs("div",{className:"flex flex-wrap items-center gap-6 rounded-lg border border-gray-800 bg-gray-900/60 px-5 py-3",children:[d.jsx(yl,{label:"Pass Rate",value:`${l}%`,accent:c,large:!0}),d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(yl,{label:"Passed",value:String(t),accent:"text-emerald-400"}),d.jsx(yl,{label:"Failures",value:String(r),accent:"text-red-400"}),i>0&&d.jsx(yl,{label:"Execution Errors",value:String(i),accent:"text-amber-400"}),d.jsx(yl,{label:"Total",value:String(e)}),o!==void 0&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(yl,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function yl({label:e,value:t,accent:r,large:n}){return d.jsxs("div",{className:"flex flex-col",children:[d.jsx("span",{className:"text-xs text-gray-500",children:e}),d.jsx("span",{className:`tabular-nums font-semibold ${n?"text-2xl":"text-lg"} ${r??"text-white"}`,children:t})]})}function wae(e,t){const r=new Map;for(const n of e){const i=n.category??"Uncategorized",o=n.suite??"Uncategorized";r.has(i)||r.set(i,new Map);const l=r.get(i),c=l.get(o)??[];c.push(n),l.set(o,c)}return Array.from(r.entries()).map(([n,i])=>{const o=Array.from(i.entries()).map(([x,j])=>{const w=Bm(j,t);return{name:x,passed:w.passed,failed:w.failed,executionErrors:w.executionErrors,total:w.total,avgScore:w.avgScore}}).sort((x,j)=>x.name.localeCompare(j.name)),l=o.reduce((x,j)=>x+j.total,0),c=o.reduce((x,j)=>x+j.passed,0),f=o.reduce((x,j)=>x+j.failed,0),m=o.reduce((x,j)=>x+j.executionErrors,0),p=l-m,y=o.reduce((x,j)=>x+j.avgScore*(j.total-j.executionErrors),0),v=kB(n);return{name:n,displayName:v.label,mutedDisplayName:v.mutedLabel,suites:o,total:l,passed:c,failed:f,executionErrors:m,avgScore:p>0?y/p:0}}).sort((n,i)=>n.name.localeCompare(i.name))}function Wk({results:e,runId:t,projectId:r}){const{data:n}=mt(r),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,o=e.length,l=Bm(e,i),c=e.reduce((p,y)=>p+(y.costUsd??0),0),f=wae(e,i),m=Xb(e);return o===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(Jl,{total:0,passed:0,failed:0,passRate:0}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(Jl,{total:o,passed:l.passed,failed:l.failed,passRate:l.passRate,executionErrors:l.executionErrors,totalCost:c>0?c:void 0}),d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[620px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:f.map(p=>{const y=d.jsxs("span",{className:"flex min-w-0 items-baseline gap-2",children:[d.jsx("span",{className:"truncate",children:p.displayName}),p.mutedDisplayName?d.jsx("span",{className:"truncate text-xs font-normal text-gray-500",title:p.mutedDisplayName,children:p.mutedDisplayName}):null]});return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-2.5 font-medium text-gray-200",children:r?d.jsx(Oe,{to:"/projects/$projectId/runs/$runId/category/$category",params:{projectId:r,runId:t,category:p.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:p.mutedDisplayName??p.displayName,children:y}):d.jsx(Oe,{to:"/runs/$runId/category/$category",params:{runId:t,category:p.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:p.mutedDisplayName??p.displayName,children:y})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(tn,{rate:p.total-p.executionErrors>0?p.passed/(p.total-p.executionErrors):0})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:p.passed}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:p.failed>0?p.failed:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-amber-400",children:p.executionErrors>0?p.executionErrors:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:p.total})]},p.name)})})]})})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"All Evals"}),d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[760px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"w-8 px-4 py-3"}),d.jsx("th",{className:"w-[24rem] px-4 py-3 font-medium text-gray-400",children:"Test ID"}),d.jsx("th",{className:"w-[12rem] px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:e.map((p,y)=>{const v=zm(p),x=Ji(p.score,i);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 text-center",children:v?d.jsx("span",{className:"text-base font-bold text-amber-400",children:"!"}):d.jsx("span",{className:`text-base font-bold ${x?"text-emerald-400":"text-red-400"}`,children:x?"✓":"✗"})}),d.jsx("td",{className:"w-[24rem] max-w-[24rem] px-4 py-3",children:d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r?d.jsx(Oe,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:r,runId:t,evalId:p.testId},className:"min-w-0 flex-1 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline",title:p.testId,children:p.testId}):d.jsx(Oe,{to:"/evals/$runId/$evalId",params:{runId:t,evalId:p.testId},className:"min-w-0 flex-1 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline",title:p.testId,children:p.testId}),m?d.jsx(xM,{suite:p.suite,className:"max-w-[10rem]"}):null]})}),d.jsx("td",{className:"w-[12rem] max-w-[12rem] truncate px-4 py-3 text-gray-400",title:p.target??void 0,children:p.target??"-"}),d.jsx("td",{className:"px-4 py-3",children:v?d.jsx("span",{className:"inline-flex rounded-full bg-amber-900/40 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):d.jsx(tn,{rate:p.score})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:p.durationMs!=null?`${(p.durationMs/1e3).toFixed(1)}s`:"-"}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:p.costUsd!=null?`$${p.costUsd.toFixed(4)}`:"-"})]},`${p.testId}-${y}`)})})]})})]}),d.jsx(Sae,{runId:t,projectId:r})]})}function Sae({runId:e,projectId:t}){const[r,n]=S.useState(!1),{data:i,isLoading:o,error:l}=K8(e,t);return!o&&!l&&i==null?null:d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"flex w-full items-center justify-between rounded-lg border border-gray-800 bg-gray-900/50 px-4 py-2 text-left text-sm font-medium text-gray-300 transition-colors hover:bg-gray-900","aria-expanded":r,children:[d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx("span",{"aria-hidden":"true",children:r?"▾":"▸"}),"Run Log"]}),d.jsx("span",{className:"text-xs text-gray-500",children:o?"Loading…":l?"Failed to load":i?`${i.length} chars`:""})]}),r&&d.jsx("div",{className:"mt-2 overflow-hidden rounded-lg border border-gray-800 bg-black",children:l?d.jsxs("div",{className:"p-4 text-sm text-red-400",children:["Failed to load run log: ",l.message]}):d.jsx("pre",{className:"max-h-[480px] overflow-auto whitespace-pre-wrap break-words p-4 font-mono text-xs leading-relaxed text-gray-200",children:i??""})})]})}function Lp({status:e}){const t=e==="finished"||e==="failed",n={starting:"text-yellow-400",running:"text-cyan-400",finished:"text-emerald-400",failed:"text-red-400"}[e]??"text-gray-400";return d.jsxs(d.Fragment,{children:[d.jsx("span",{className:`text-sm font-medium ${n}`,children:e.charAt(0).toUpperCase()+e.slice(1)}),!t&&d.jsx("span",{className:"inline-block h-3 w-3 animate-spin rounded-full border-2 border-cyan-400 border-t-transparent"})]})}function $p({runId:e,status:t,isReadOnly:r,projectId:n}){const[i,o]=S.useState(!1),[l,c]=S.useState(null);if(!xae(t,r))return null;async function f(){o(!0),c(null);try{await wB(e,n)}catch(m){c(m instanceof Error?m.message:"Failed to stop run"),o(!1)}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsx("button",{type:"button",onClick:f,disabled:i,className:"inline-flex items-center gap-2 rounded-md border border-gray-700 bg-transparent px-3 py-1.5 text-sm font-medium text-gray-300 hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"stop-run-button",children:i?"Stopping…":d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":"true",className:"inline-block h-2.5 w-2.5 rounded-[1px] bg-current"}),"Stop"]})}),l&&d.jsx("p",{className:"text-xs text-red-400",children:l})]})}const Jk=_r("/runs/$runId")({component:Nae});function Nae(){var w;const{runId:e}=Jk.useParams(),{data:t,isLoading:r,error:n}=id(e),{data:i}=mt(),{data:o}=Lm(),[l,c]=S.useState(!1),f=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(N=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},N))})]});if(n)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",n.message]});const m=(w=t==null?void 0:t.results)==null?void 0:w[0],p=m==null?void 0:m.target,y=p?{target:p}:void 0,v=t==null?void 0:t.status,x=v==="starting"||v==="running",j=yM({runId:e,results:(t==null?void 0:t.results)??[],source:t==null?void 0:t.source,sourceLabel:t==null?void 0:t.source_label,remoteRepo:(t==null?void 0:t.source)==="remote"?o==null?void 0:o.repo:void 0,formatTimestamp:N=>new Date(N).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:j.heading,children:j.heading}),j.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:j.sourceBadge}):null]}),j.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:j.meta}):null,j.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:j.sourceContext.map(N=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[N.label,":"]})," ",N.value]},`${N.label}:${N.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!f&&x?d.jsx($p,{runId:e,status:v,isReadOnly:f}):d.jsx(Zk,{results:(t==null?void 0:t.results)??[],runDir:t==null?void 0:t.run_dir,suiteFilter:t==null?void 0:t.suite_filter,target:p??void 0,isReadOnly:f,plannedTestCount:t==null?void 0:t.planned_test_count,runStatus:v}),v&&d.jsx(Lp,{status:v}),!f&&!x&&d.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run evals"})]})]}),d.jsx(Wk,{results:(t==null?void 0:t.results)??[],runId:e}),!f&&d.jsx(jo,{open:l,onClose:()=>c(!1),prefill:y})]})}const ex=[{id:"runs",label:"🏃 Recent Runs",title:"Recent Runs"},{id:"experiments",label:"🧪 Experiments",title:"Experiments"},{id:"analytics",label:"📊 Analytics",title:"Analytics"},{id:"targets",label:"🤖 Targets",title:"Targets"}],e5=_r("/projects/$projectId")({component:Oae});function Oae(){var x;const{projectId:e}=e5.useParams(),n=Bb().location.search.tab,i=ho(),[o,l]=S.useState(!1),{data:c}=mt(e),{data:f}=sd(),m=(c==null?void 0:c.read_only)===!0,p=mM(e,f==null?void 0:f.projects),y=ex.some(j=>j.id===n)?n:"runs",v=((x=ex.find(j=>j.id===y))==null?void 0:x.title)??"Recent Runs";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:v}),!m&&d.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),d.jsx("div",{className:"border-b border-gray-800 sm:overflow-x-auto",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:min-w-max sm:flex-nowrap",children:ex.map(j=>d.jsx("button",{type:"button",onClick:()=>i({to:"/projects/$projectId",params:{projectId:e},search:{tab:j.id}}),className:`shrink-0 px-4 py-2 text-sm font-medium transition-colors ${y===j.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:j.label},j.id))})}),y==="runs"&&d.jsx(_ae,{projectId:e,projectName:p,readOnly:m}),y==="experiments"&&d.jsx(Yk,{projectId:e}),y==="analytics"&&d.jsx(Eae,{projectId:e,readOnly:m}),y==="targets"&&d.jsx(Qk,{projectId:e}),!m&&d.jsx(jo,{open:o,onClose:()=>l(!1),projectId:e})]})}function _ae({projectId:e,projectName:t,readOnly:r}){const n=ca(),{data:i,isLoading:o,error:l,hasNextPage:c,fetchNextPage:f,isFetchingNextPage:m}=cB(e),{data:p}=Vb(e),{data:y}=Lm(e),[v,x]=S.useState("all"),[j,w]=S.useState(!1),[N,O]=S.useState(null),P=((p==null?void 0:p.runs)??[]).filter(T=>T.status==="starting"||T.status==="running"),E=v==="all"?Ip((i==null?void 0:i.runs)??[]):((i==null?void 0:i.runs)??[]).filter(T=>T.source===v);async function A(){w(!0),O(null);try{const T=await dM(e);n.setQueryData(Fb(e).queryKey,T);const M=eM(T);O(M),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"experiments"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(T){O(tM(T,y)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{w(!1)}}return S.useEffect(()=>{if((N==null?void 0:N.kind)!=="success")return;const T=window.setTimeout(()=>O(null),7e3);return()=>window.clearTimeout(T)},[N]),o?d.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(T=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},T))}):l?d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load runs: ",l.message]}):d.jsxs("div",{className:"space-y-4",children:[P.length>0&&d.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[d.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),d.jsx("ul",{className:"divide-y divide-gray-800/50",children:P.map(T=>d.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d.jsxs("div",{className:"min-w-0 flex items-center gap-3",children:[d.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),d.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:T.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(T.started_at).toLocaleTimeString()})]}),d.jsx(Oe,{to:"/projects/$projectId/jobs/$runId",params:{projectId:e,runId:T.id},className:"flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},T.id))})]}),d.jsx(Vk,{filter:v,onFilterChange:x,remoteStatus:y,syncInFlight:j,onSync:A,projectName:t,syncFeedback:N}),d.jsx(kp,{runs:E,projectId:e,enableCombine:!r,hasNextPage:c,isFetchingNextPage:m,onLoadMore:()=>void f()})]})}function Eae({projectId:e,readOnly:t}){const{data:r,isLoading:n,isError:i,error:o}=Ue(cM(e));return d.jsx(Kk,{data:r,isLoading:n,isError:i,error:o,projectId:e,readOnly:t})}const t5=_r("/jobs/$runId")({component:Aae});function Aae(){const{runId:e}=t5.useParams(),{data:t,isLoading:r,error:n}=Yb(e),{data:i}=mt(),o=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(tx,{}),d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(n||!t)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(tx,{}),d.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:n?`Failed to load run: ${n.message}`:"Run not found."})]});const l=t.status==="finished"||t.status==="failed";return d.jsxs("div",{className:"space-y-4",children:[d.jsx(tx,{}),d.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:e}),d.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(t.started_at).toLocaleString(),t.finished_at&&d.jsxs(d.Fragment,{children:[" · ","Finished ",new Date(t.finished_at).toLocaleString()," · ",Math.round((new Date(t.finished_at).getTime()-new Date(t.started_at).getTime())/1e3),"s"]})]})]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[d.jsx($p,{runId:e,status:t.status,isReadOnly:o}),d.jsx(Lp,{status:t.status})]})]}),d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),d.jsx("code",{className:"break-all text-xs text-cyan-300",children:t.command})]}),t.stdout?d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),d.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:t.stdout})})]}):!l&&d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[d.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-gray-500 border-t-transparent"}),"Waiting for output…"]}),t.stderr&&d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:t.stderr})})]}),l&&d.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",d.jsx("span",{className:t.exit_code===0?"text-emerald-400":"text-red-400",children:t.exit_code})]})]})}function tx(){return d.jsx(Oe,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}function r5({experimentName:e,projectId:t}){var v;const{data:r,isLoading:n}=Ue(t?Gb(t):aM),{data:i,isLoading:o}=Ue(t?Kb(t):Hb);if(n||o)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(x=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});const c=(v=r==null?void 0:r.experiments)==null?void 0:v.find(x=>x.name===e),f=Ip(((i==null?void 0:i.runs)??[]).filter(x=>(x.experiment??"default")===e)),m=(c==null?void 0:c.pass_rate)??0,p=f.length,y=(c==null?void 0:c.target_count)??0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:e}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[p," run",p!==1?"s":""," · ",y," target",y!==1?"s":"",(c==null?void 0:c.last_run)&&d.jsxs("span",{className:"ml-2",children:["· Last run: ",GC(c.last_run)]})]})]}),c&&d.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[d.jsx(yh,{label:"Runs",value:String(p)}),d.jsx(yh,{label:"Targets",value:String(y)}),d.jsx(yh,{label:"Pass Rate",value:`${Math.round(m*100)}%`,accent:"text-cyan-400"}),d.jsx(yh,{label:"Last Run",value:GC(c.last_run)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),d.jsx(kp,{runs:f,projectId:t,emptyMessage:d.jsxs("div",{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found for this experiment."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Runs will appear here once this experiment has execution results."})]})})]})]})}function yh({label:e,value:t,accent:r}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("p",{className:"text-sm text-gray-400",children:e}),d.jsx("p",{className:`mt-1 text-2xl font-semibold tabular-nums ${r??"text-white"}`,children:t})]})}function GC(e){if(!e)return"N/A";try{const t=new Date(e);return Number.isNaN(t.getTime())?"N/A":t.toLocaleString()}catch{return"N/A"}}const n5=_r("/experiments/$experimentName")({component:Pae});function Pae(){const{experimentName:e}=n5.useParams();return d.jsx(r5,{experimentName:e})}async function Tae(e,t){const r=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:e,comment:t}]})});if(!r.ok)throw new Error(`Failed to save feedback: ${r.status}`);return r.json()}function Cae({testId:e}){var p;const{data:t}=rB(),r=ca(),n=(p=t==null?void 0:t.reviews)==null?void 0:p.find(y=>y.test_id===e),[i,o]=S.useState((n==null?void 0:n.comment)??""),[l,c]=S.useState(!1);S.useEffect(()=>{o((n==null?void 0:n.comment)??""),c(!1)},[n==null?void 0:n.comment]);const f=xx({mutationFn:()=>Tae(e,i),onSuccess:()=>{r.invalidateQueries({queryKey:["feedback"]}),c(!0),setTimeout(()=>c(!1),2e3)}}),m=S.useCallback(()=>{f.mutate()},[f]);return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-400",children:"Feedback"}),d.jsx("textarea",{value:i,onChange:y=>{o(y.target.value),c(!1)},placeholder:"Add feedback for this test...",className:"w-full rounded-md border border-gray-700 bg-gray-800 p-3 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-400 focus:outline-none",rows:3}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:m,disabled:f.isPending,className:"rounded-md bg-cyan-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:f.isPending?"Saving...":"Save Feedback"}),l&&d.jsx("span",{className:"text-sm text-emerald-400",children:"Saved"}),f.isError&&d.jsx("span",{className:"text-sm text-red-400",children:"Error saving feedback"})]})]})}function Mae(e){var r;switch((r=e.split(".").pop())==null?void 0:r.toLowerCase()){case"ts":case"tsx":return"📘";case"json":return"📋";case"log":case"txt":return"📜";case"md":return"📝";default:return"📄"}}function a5(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),r.children&&t.push(...a5(r.children)));return t}function i5({node:e,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o=0}){const l=e.type==="dir",c=n.has(e.path),f=t===e.path;return d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>{l?i(e.path):r(e.path)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors ${f?"bg-cyan-400/20 text-cyan-400":"text-gray-300 hover:bg-gray-800/50 hover:text-gray-200"}`,style:{paddingLeft:`${o*16+8}px`},children:[d.jsx("span",{className:"flex-shrink-0 text-xs",children:l?c?"📂":"📁":Mae(e.name)}),d.jsx("span",{className:"truncate",children:e.name})]}),l&&c&&e.children&&d.jsx("div",{children:e.children.map(m=>d.jsx(i5,{node:m,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o+1},m.path))})]})}function Rae({files:e,selectedPath:t,onSelect:r}){const[n,i]=S.useState(()=>new Set(a5(e))),o=l=>{i(c=>{const f=new Set(c);return f.has(l)?f.delete(l):f.add(l),f})};return d.jsxs("div",{className:"w-full md:w-64 overflow-y-auto rounded-lg border border-gray-800 bg-gray-900 py-2",children:[e.length===0&&d.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),e.map(l=>d.jsx(i5,{node:l,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:o},l.path))]})}const Dae="modulepreload",kae=function(e){return"/"+e},YC={},Iae=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let l=function(m){return Promise.all(m.map(p=>Promise.resolve(p).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=l(r.map(m=>{if(m=kae(m),m in YC)return;YC[m]=!0;const p=m.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const v=document.createElement("link");if(v.rel=p?"stylesheet":Dae,p||(v.as="script"),v.crossOrigin="",v.href=m,f&&v.setAttribute("nonce",f),document.head.appendChild(v),p)return new Promise((x,j)=>{v.addEventListener("load",x),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})},Lae=S.lazy(()=>Iae(()=>import("./index-ZSsKg-gp.js"),[]));function $ae({value:e,language:t="json",height:r="400px"}){return d.jsx(S.Suspense,{fallback:d.jsx("div",{className:"flex items-center justify-center rounded-lg bg-gray-900 p-8 text-gray-500",children:"Loading editor..."}),children:d.jsx(Lae,{height:r,language:t,value:e,theme:"vs-dark",options:{readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,fontSize:13,lineNumbers:"on",wordWrap:"on",padding:{top:12}}})})}function Cm({score:e,className:t=""}){const r=Math.round(Math.max(0,Math.min(1,e))*100);return d.jsxs("div",{className:`flex items-center gap-3 ${t}`,children:[d.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-gray-800",children:d.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-cyan-400 to-blue-500 transition-all duration-300",style:{width:`${r}%`}})}),d.jsxs("span",{className:"w-12 text-right text-sm font-medium tabular-nums text-gray-300",children:[r,"%"]})]})}const zae={system:{container:"border-gray-800 bg-gray-900/70",badge:"border-gray-700 bg-gray-800 text-gray-300",label:"System",accent:"text-gray-400"},user:{container:"border-cyan-900/60 bg-cyan-950/20",badge:"border-cyan-900/60 bg-cyan-950/30 text-cyan-300",label:"User",accent:"text-cyan-300"},assistant:{container:"border-gray-800 bg-gray-900",badge:"border-gray-700 bg-gray-800 text-gray-200",label:"Assistant",accent:"text-gray-300"},tool:{container:"border-amber-900/60 bg-amber-950/20",badge:"border-amber-900/60 bg-amber-950/30 text-amber-300",label:"Tool result",accent:"text-amber-300"},function:{container:"border-amber-900/60 bg-amber-950/20",badge:"border-amber-900/60 bg-amber-950/30 text-amber-300",label:"Function result",accent:"text-amber-300"}};function Ed(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Bae(e){return!Ed(e)||e.tool_calls!==void 0&&!Array.isArray(e.tool_calls)?!1:typeof e.test_id=="string"&&typeof e.target=="string"&&typeof e.message_index=="number"&&Number.isFinite(e.message_index)&&typeof e.role=="string"}function Uae(e){const t=[],r=e.split(/\r?\n/);for(let n=0;n<r.length;n+=1){const i=r[n].trim();if(i)try{const o=JSON.parse(i);if(!Bae(o))return{entries:t,error:`Line ${n+1} is not a transcript JSONL row.`};t.push(o)}catch(o){return{entries:t,error:`Line ${n+1} is invalid JSON: ${o.message}`}}}return{entries:t}}function s5(e){const t=[];for(const r of e)r.type==="file"?t.push(r):r.children&&t.push(...s5(r.children));return t}function qae(e){return e.replace(/\\/g,"/")}function o5(e,t){const r=s5(e);for(const n of t){const i=r.find(o=>{const l=qae(o.path);return l===n||l.endsWith(`/${n}`)});if(i)return i.path}}function Hae(e){return o5(e,["outputs/transcript.jsonl"])}function Fae(e){return o5(e,["outputs/answer.md"])}function zp(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function Kae(e){if(typeof e=="number")return`$${e.toFixed(4)}`}function Bw(e){if(!e)return;const t=[];return typeof e.input=="number"&&t.push(`${e.input} in`),typeof e.output=="number"&&t.push(`${e.output} out`),typeof e.reasoning=="number"&&t.push(`${e.reasoning} reasoning`),typeof e.cached=="number"&&t.push(`${e.cached} cached`),t.length>0?t.join(" / "):void 0}function l5(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Gae(e){if(Array.isArray(e)){const t=e.map(r=>{if(Ed(r)&&r.type==="text"&&typeof r.text=="string")return r.text}).filter(r=>r!==void 0);if(t.length===e.length&&t.length>0)return t.join(`
|
|
118
|
+
`)}return l5(e)}function Mm(e,t){for(const r of t){const n=e[r];if(typeof n=="string"&&n.trim())return n}}function _b(e,t){for(const r of t)if(e[r]!==void 0)return e[r]}function u5(e,t){const r=e[t];return Ed(r)?r:void 0}function Yae(e,t){const r=u5(e,"function");return Mm(e,["tool","name","tool_name"])??(r?Mm(r,["name"]):void 0)??`Tool ${t+1}`}function Vae(e){const t=u5(e,"function");return _b(e,["input","arguments","args","parameters"])??(t?_b(t,["arguments"]):void 0)}function Qae(e){return _b(e,["output","result","content"])}function Xae(e){return e!=null&&!(typeof e=="string"&&e.length===0)}function zs({label:e,value:t,tone:r="default"}){return Xae(t)?d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:r==="error"?"text-xs font-medium text-red-300":"text-xs font-medium text-gray-400",children:e}),d.jsx("pre",{className:"max-h-80 overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{children:l5(t)})})]}):null}function Lr({children:e}){return d.jsx("span",{className:"rounded-md border border-gray-800 bg-gray-950 px-2 py-0.5 text-xs text-gray-400",children:e})}function rx({href:e,children:t,download:r=!1}){return e?d.jsx("a",{href:e,target:"_blank",rel:"noreferrer",download:r,className:"rounded-md px-3 py-1.5 text-sm text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:t}):null}function VC({path:e,onOpenFile:t,children:r}){return!e||!t?null:d.jsx("button",{type:"button",onClick:()=>t(e),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:r})}function Zae({call:e,index:t}){const r=Yae(e,t),n=Mm(e,["id","call_id","tool_call_id"]),i=Mm(e,["status"]),o=typeof e.duration_ms=="number"?zp(e.duration_ms):void 0,l=Ed(e.metadata)?e.metadata:void 0;return d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-950/80 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[d.jsx("span",{children:"Tool call"}),d.jsx("span",{className:"ml-2 rounded-md border border-amber-900/60 bg-amber-950/30 px-2 py-0.5 text-xs text-amber-300",children:r}),i&&d.jsx("span",{className:"ml-2 text-xs text-gray-500",children:i}),o&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:o})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&d.jsxs(Lr,{children:["id: ",n]}),o&&d.jsxs(Lr,{children:["duration: ",o]}),i&&d.jsxs(Lr,{children:["status: ",i]})]}),d.jsx(zs,{label:"Arguments",value:Vae(e)}),d.jsx(zs,{label:"Result",value:Qae(e)}),d.jsx(zs,{label:"Error",value:e.error,tone:"error"}),d.jsx(zs,{label:"Metadata",value:l})]})]})}function Wae({line:e}){const t=zp(e.duration_ms),r=Bw(e.token_usage);return d.jsxs("details",{className:"rounded-md border border-amber-900/50 bg-gray-950/60 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-amber-300",children:[e.name?`Tool result · ${e.name}`:"Tool result",t&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:t})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.name&&d.jsxs(Lr,{children:["name: ",e.name]}),t&&d.jsxs(Lr,{children:["duration: ",t]}),r&&d.jsxs(Lr,{children:["tokens: ",r]})]}),d.jsx(zs,{label:"Result",value:e.content}),d.jsx(zs,{label:"Metadata",value:e.metadata})]})]})}function Jae({line:e,ordinal:t}){const r=zae[e.role]??{container:"border-gray-800 bg-gray-900",badge:"border-gray-700 bg-gray-800 text-gray-300",label:e.role,accent:"text-gray-300"},n=Gae(e.content),i=zp(e.duration_ms),o=Bw(e.token_usage),l=Array.isArray(e.tool_calls)?e.tool_calls.filter(Ed):[];return d.jsxs("article",{className:`rounded-lg border p-4 ${r.container}`,children:[d.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:`rounded-md border px-2 py-0.5 text-xs font-medium ${r.badge}`,children:r.label}),e.name&&d.jsx("span",{className:`truncate text-sm font-medium ${r.accent}`,children:e.name})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-500",children:[d.jsxs("span",{className:"tabular-nums",children:["#",t+1]}),e.start_time&&d.jsx("span",{children:e.start_time}),i&&d.jsx("span",{className:"tabular-nums",children:i}),o&&d.jsx("span",{children:o})]})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[e.role==="tool"||e.role==="function"?d.jsx(Wae,{line:e}):n.trim().length>0?d.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm leading-6 text-gray-200",children:n}):d.jsx("p",{className:"text-sm text-gray-500",children:"No message content recorded."}),l.length>0&&d.jsx("div",{className:"space-y-2",children:l.map((c,f)=>d.jsx(Zae,{call:c,index:f},`${e.message_index}-${f}`))}),e.metadata&&e.role!=="tool"&&e.role!=="function"&&d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-950/60 p-3",children:[d.jsx("summary",{className:"cursor-pointer text-xs font-medium text-gray-400",children:"Message metadata"}),d.jsx("div",{className:"mt-3",children:d.jsx(zs,{label:"Metadata",value:e.metadata})})]})]})]})}function eie({entries:e,transcriptPath:t}){var m,p,y;const r=e[0],n=(m=r==null?void 0:r.source)==null?void 0:m.provider,i=(p=r==null?void 0:r.source)==null?void 0:p.model,o=(y=r==null?void 0:r.source)==null?void 0:y.session_id,l=zp(r==null?void 0:r.transcript_duration_ms),c=Bw(r==null?void 0:r.transcript_token_usage),f=Kae(r==null?void 0:r.transcript_cost_usd);return d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsxs(Lr,{children:[e.length," messages"]}),n&&d.jsxs(Lr,{children:["provider: ",n]}),i&&d.jsxs(Lr,{children:["model: ",i]}),o&&d.jsxs(Lr,{children:["session: ",o]}),l&&d.jsxs(Lr,{children:["duration: ",l]}),c&&d.jsxs(Lr,{children:["tokens: ",c]}),f&&d.jsxs(Lr,{children:["cost: ",f]}),t&&d.jsx(Lr,{children:t})]})}function tie({entries:e,finalAnswer:t,answerPath:r,transcriptPath:n,answerHref:i,transcriptHref:o,transcriptDownloadHref:l,onOpenFile:c}){const f=[...e].sort((p,y)=>p.message_index-y.message_index),m=!!r;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("section",{className:"rounded-lg border border-emerald-900/50 bg-emerald-950/20 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-emerald-300",children:"Final answer"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Highlighted from canonical ",d.jsx("code",{children:"outputs/answer.md"}),"; transcript context stays below."]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(VC,{path:r,onOpenFile:c,children:"Open answer.md in Files"}),d.jsx(rx,{href:i,children:"Open answer.md"})]})]}),m?d.jsx("pre",{className:"mt-3 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md border border-emerald-900/40 bg-gray-950/80 p-3 text-sm leading-6 text-gray-100",children:t&&t.trim().length>0?t:"answer.md is empty."}):d.jsxs("p",{className:"mt-3 rounded-md border border-gray-800 bg-gray-950/60 p-3 text-sm text-gray-400",children:["No canonical ",d.jsx("code",{children:"outputs/answer.md"})," artifact was found. The transcript viewer does not fall back to ",d.jsx("code",{children:"response.md"}),"."]})]}),d.jsx("section",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Transcript timeline"}),d.jsx(eie,{entries:f,transcriptPath:n})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(VC,{path:n,onOpenFile:c,children:"Open raw JSONL in Files"}),d.jsx(rx,{href:o,children:"Open raw JSONL"}),d.jsx(rx,{href:l,download:!0,children:"Download JSONL"})]})]})}),d.jsx("div",{className:"space-y-3",children:f.map((p,y)=>d.jsx(Jae,{line:p,ordinal:y},`${p.message_index}-${p.role}-${y}`))})]})}function c5(e){for(const t of e){if(t.type==="file")return t.path;if(t.children){const r=c5(t.children);if(r)return r}}return null}function d5({eval:e,runId:t,projectId:r}){const[n,i]=S.useState("checks"),[o,l]=S.useState(null),{data:c}=mt(r),f=(c==null?void 0:c.read_only)===!0,m=[{id:"checks",label:"Checks"},{id:"transcript",label:"Transcript"},{id:"source",label:"Source"},{id:"files",label:"Files"},...f?[]:[{id:"feedback",label:"Feedback"}]],p=y=>{l(y),i("files")};return d.jsxs("div",{className:"flex min-h-full flex-col",children:[d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex gap-1 px-4",children:m.map(y=>d.jsx("button",{type:"button",onClick:()=>i(y.id),className:`px-4 py-2 text-sm font-medium transition-colors ${n===y.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:y.label},y.id))})}),d.jsxs("div",{className:"min-h-0 flex-1",children:[n==="checks"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(iie,{result:e,projectId:r})}),n==="files"&&d.jsx("div",{className:"h-full p-4",children:d.jsx(oie,{result:e,runId:t,projectId:r,selectedPath:o,onSelectedPathChange:l})}),n==="transcript"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(sie,{result:e,runId:t,projectId:r,onOpenFile:p})}),n==="source"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(aie,{result:e})}),!f&&n==="feedback"&&d.jsx("div",{className:"p-4",children:d.jsx(Cae,{testId:e.testId})})]})]})}function rie(e){if(e!==void 0)return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function jn({label:e,value:t}){return t===void 0||t===""?null:d.jsxs("div",{className:"min-w-0",children:[d.jsx("dt",{className:"text-xs font-medium uppercase text-gray-500",children:e}),d.jsx("dd",{className:"mt-1 break-words font-mono text-sm text-gray-200",children:String(t)})]})}function f5({file:e}){var r,n;const t=rie(e.size_bytes);return d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(jn,{label:"Path",value:e.display_path}),d.jsx(jn,{label:"SHA-256",value:e.content_sha256}),d.jsx(jn,{label:"Size",value:t}),d.jsx(jn,{label:"Omitted",value:((r=e.omitted)==null?void 0:r.message)??((n=e.omitted)==null?void 0:n.reason)})]})}function Pc({value:e,language:t}){return d.jsx("pre",{className:"max-h-96 overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{"data-language":t,children:e})})}function nie({file:e}){const t=`${e.kind}${e.grader_name?` · ${e.grader_name}`:""}`;return d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-900 p-3",open:!1,children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[d.jsx("span",{children:t}),d.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:e.display_path})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsx(f5,{file:e}),e.command&&e.command.length>0&&d.jsx(Pc,{value:JSON.stringify(e.command,null,2),language:"json"}),e.content&&d.jsx(Pc,{value:e.content})]})]})}function aie({result:e}){var r,n,i;const t=e.source_traceability;return!t||t.status!=="captured"?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source metadata"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:(t==null?void 0:t.message)??"Source metadata was not captured for this run."})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("section",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-300",children:"Traceability"}),d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(jn,{label:"Eval file",value:(r=t.eval_file)==null?void 0:r.display_path}),d.jsx(jn,{label:"Test ID",value:t.test_id??e.testId}),d.jsx(jn,{label:"Suite",value:e.suite}),d.jsx(jn,{label:"Category",value:e.category}),d.jsx(jn,{label:"Target",value:e.target})]})]}),((n=t.source_test)==null?void 0:n.yaml)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source Test"}),d.jsx(Pc,{value:t.source_test.yaml,language:"yaml"})]}),((i=t.eval_file)==null?void 0:i.content)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Eval File Snapshot"}),d.jsx(f5,{file:t.eval_file}),d.jsx(Pc,{value:t.eval_file.content,language:"yaml"})]}),t.graders&&t.graders.length>0&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Graders"}),d.jsx("div",{className:"space-y-3",children:t.graders.map(o=>d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-900 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[o.name,d.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:o.type})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("dl",{className:"grid gap-3 md:grid-cols-3",children:[d.jsx(jn,{label:"Weight",value:o.weight}),d.jsx(jn,{label:"Required",value:o.required}),d.jsx(jn,{label:"Min score",value:o.min_score})]}),d.jsx(Pc,{value:JSON.stringify(o.definition,null,2),language:"json"})]})]},`${o.name}-${o.type}`))})]}),t.referenced_files&&t.referenced_files.length>0&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Referenced Files"}),d.jsx("div",{className:"space-y-3",children:t.referenced_files.map((o,l)=>d.jsx(nie,{file:o},`${o.kind}-${o.display_path}-${o.grader_name??""}-${l}`))})]})]})}function QC({assertion:e}){return d.jsxs("div",{className:`flex items-start gap-3 rounded-lg border p-3 ${e.passed?"border-emerald-900/50 bg-emerald-950/20":"border-red-900/50 bg-red-950/20"}`,children:[d.jsx("span",{className:`mt-0.5 text-lg ${e.passed?"text-emerald-400":"text-red-400"}`,children:e.passed?"✓":"✗"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("p",{className:"text-sm text-gray-200",children:[e.text,e.durationMs!=null&&d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:["(",(e.durationMs/1e3).toFixed(1),"s)"]})]}),e.evidence&&d.jsx("p",{className:"mt-1 text-xs text-gray-400",children:e.evidence})]})]})}function iie({result:e,projectId:t}){const{data:r}=mt(t),n=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,i=!Ji(e.score,n)||e.executionStatus==="error"||e.executionStatus==="failed",o=(e.scores??[]).filter(p=>Array.isArray(p.assertions)&&p.assertions.length>0),l=o.length>0,c=e.assertions??[],f=[];e.error&&f.push(e.error),(e.executionStatus==="error"||e.executionStatus==="failed")&&f.push(`Execution status: ${e.executionStatus}`);const m=l?o.flatMap(p=>p.assertions):c;for(const p of m.filter(y=>!y.passed)){const y=p.evidence?`${p.text}: ${p.evidence}`:p.text;f.push(y)}if(e.scores){for(const p of e.scores)if(!Ji(p.score,n)&&p.details){const y=typeof p.details=="string"?p.details:JSON.stringify(p.details,null,2);f.push(`[${p.name??p.type??"evaluator"}] ${y}`)}}return d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),d.jsx("div",{className:"flex-1",children:d.jsx(Cm,{score:e.score})})]})}),e.scores&&e.scores.length>0&&d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Grader Scores"}),d.jsx("div",{className:"space-y-3",children:e.scores.map((p,y)=>d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:p.name??p.type??`Score ${y+1}`}),d.jsx("div",{className:"flex-1",children:d.jsx(Cm,{score:p.score})})]},`${p.name??p.type??y}`))})]}),l?d.jsx("div",{className:"space-y-6",children:o.map((p,y)=>{const v=p.name??p.type??`Grader ${y+1}`;return d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:v}),p.assertions.map((x,j)=>d.jsx(QC,{assertion:x},`${x.text}-${j}`))]},`${p.name??p.type??y}`)})}):c.length>0?d.jsx("div",{className:"space-y-2",children:c.map((p,y)=>d.jsx(QC,{assertion:p},`${p.text}-${y}`))}):d.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),i&&f.length>0&&d.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),d.jsx("div",{className:"space-y-2",children:f.map(p=>d.jsx("p",{className:"text-sm text-gray-300",children:p},p))})]})]})}function h5(e,t){if(!t)return!1;for(const r of e)if(r.type==="file"&&r.path===t||r.children&&h5(r.children,t))return!0;return!1}function sie({result:e,runId:t,projectId:r,onOpenFile:n}){const i=e.testId,{data:o,isLoading:l}=r?Ue(uM(r,t,i)):sM(t,i),c=(o==null?void 0:o.files)??[],f=Hae(c),m=Fae(c),{data:p,isLoading:y}=r?Ue(_x(r,t,i,f??"")):Ox(t,i,f??""),{data:v}=r?Ue(_x(r,t,i,m??"")):Ox(t,i,m??""),x=S.useMemo(()=>Uae((p==null?void 0:p.content)??""),[p==null?void 0:p.content]);if(l)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:"Loading transcript artifacts..."});if(!f)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"No structured transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["This run does not include canonical ",d.jsx("code",{children:"outputs/transcript.jsonl"}),". Dashboard does not parse ",d.jsx("code",{children:"response.md"})," or markdown transcripts for this view."]})]});if(y)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:["Loading ",d.jsx("code",{children:f}),"..."]});if(x.error)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be parsed"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:x.error}),d.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:()=>n(f),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open raw JSONL in Files"}),d.jsx("a",{href:xl({projectId:r,runId:t,evalId:i,filePath:f,raw:!0}),target:"_blank",rel:"noreferrer",className:"rounded-md px-3 py-1.5 text-sm text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:"Open raw JSONL"})]})]});if(x.entries.length===0)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[d.jsx("code",{children:f})," exists but contains no JSONL rows."]})]});const j=m?xl({projectId:r,runId:t,evalId:i,filePath:m,raw:!0}):void 0,w=xl({projectId:r,runId:t,evalId:i,filePath:f,raw:!0}),N=xl({projectId:r,runId:t,evalId:i,filePath:f,download:!0});return d.jsx(tie,{entries:x.entries,finalAnswer:m?(v==null?void 0:v.content)??e.output:void 0,answerPath:m,transcriptPath:f,answerHref:j,transcriptHref:w,transcriptDownloadHref:N,onOpenFile:n})}function oie({result:e,runId:t,projectId:r,selectedPath:n,onSelectedPathChange:i}){const o=e.testId,{data:l}=r?Ue(uM(r,t,o)):sM(t,o),c=(l==null?void 0:l.files)??[],[f,m]=S.useState(null),[p,y]=S.useState(!1),v=n??f,x=h5(c,v)?v:c.length>0?c5(c):null,{data:j,isLoading:w}=r?Ue(_x(r,t,o,x??"")):Ox(t,o,x??"");if(c.length===0)return d.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const N=x?w?"Loading...":(j==null?void 0:j.content)??"":"",O=x?(j==null?void 0:j.language)??"plaintext":"plaintext";return d.jsxs("div",{className:"relative flex h-full min-h-[400px] gap-4",children:[d.jsx("div",{className:`${p?"block":"hidden"} md:block w-full md:w-auto`,children:d.jsx(Rae,{files:c,selectedPath:x,onSelect:P=>{m(P),i(P),y(!1)}})}),d.jsx("div",{className:`${p?"hidden":"block"} md:block flex-1 h-full`,children:d.jsx($ae,{value:N,language:O,height:"100%"})}),d.jsx("button",{type:"button",onClick:()=>y(!p),className:"md:hidden fixed bottom-4 right-4 z-50 flex items-center gap-2 rounded-full bg-gray-800 px-4 py-2.5 text-sm font-medium text-gray-200 shadow-lg border border-gray-700 hover:bg-gray-700 active:bg-gray-600 transition-colors","aria-label":p?"Switch to file content viewer":"Switch to file tree",children:p?d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"📄"}),d.jsx("span",{children:"Content"})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"📁"}),d.jsx("span",{children:"Files"})]})})]})}const m5=_r("/evals/$runId/$evalId")({component:lie});function lie(){const{runId:e,evalId:t}=m5.useParams(),{data:r,isLoading:n,error:i}=id(e),{data:o}=mt(),[l,c]=S.useState(!1),f=(o==null?void 0:o.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",i.message]});const m=r==null?void 0:r.results.find(v=>v.testId===t);if(!m)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:t})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:e}),"."]})});const p=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8,y=Ji(m.score,p)&&m.executionStatus!=="error"&&m.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",e," / Eval: ",t]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${y?"text-emerald-400":"text-red-400"}`,children:y?"✓":"✗"}),t]})]}),!f&&d.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),d.jsx(d5,{eval:m,runId:e}),!f&&d.jsx(jo,{open:l,onClose:()=>c(!1),prefill:{testIds:[t],target:m.target}})]})}const p5=_r("/runs/$runId_/suite/$suite")({component:uie});function uie(){const{runId:e,suite:t}=p5.useParams(),{data:r,isLoading:n,error:i}=id(e),{data:o}=mt(),l=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(y=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const c=((r==null?void 0:r.results)??[]).filter(y=>(y.suite??"Uncategorized")===t),f=c.length,m=Bm(c,l),p=c.reduce((y,v)=>y+(v.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",e]})]}),d.jsx(Jl,{total:f,passed:m.passed,failed:m.failed,passRate:m.passRate,executionErrors:m.executionErrors,totalCost:p>0?p:void 0}),f===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:c.map((y,v)=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsx(Oe,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:y.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:y.testId})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",children:y.target??"-"}),d.jsx("td",{className:"px-4 py-3",children:zm(y)?d.jsx("span",{className:"inline-flex rounded-full bg-amber-900/40 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):d.jsx(tn,{rate:y.score})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:y.durationMs!=null?`${(y.durationMs/1e3).toFixed(1)}s`:"-"}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:y.costUsd!=null?`$${y.costUsd.toFixed(4)}`:"-"})]},`${y.testId}-${v}`))})]})})]})}const y5=_r("/runs/$runId_/category/$category")({component:cie});function cie(){const{runId:e,category:t}=y5.useParams(),{data:r,isLoading:n,error:i}=oM(e,t);if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",i.message]});const o=(r==null?void 0:r.suites)??[],l=o.reduce((v,x)=>v+x.total,0),c=o.reduce((v,x)=>v+x.passed,0),f=o.reduce((v,x)=>v+x.failed,0),m=o.reduce((v,x)=>v+Gt(x),0),p=l-m,y=p>0?c/p:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",e]})]}),d.jsx(Jl,{total:l,passed:c,failed:f,passRate:y,executionErrors:m}),o.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),d.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:o.map(v=>d.jsxs(Oe,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:v.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:v.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[v.passed,"/",wM(v)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Cm,{score:v.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[v.passed," passed"]}),v.failed>0&&d.jsxs("span",{className:"text-red-400",children:[v.failed," failed"]}),Gt(v)>0&&d.jsxs("span",{className:"text-amber-400",children:[Gt(v)," execution errors"]})]})]},v.name))})]})]})}const v5=_r("/projects/$projectId_/runs/$runId")({component:die});function die(){var N;const{projectId:e,runId:t}=v5.useParams(),{data:r,isLoading:n,error:i}=od(e,t),{data:o}=mt(e),{data:l}=Lm(e),[c,f]=S.useState(!1),m=(o==null?void 0:o.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(O=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},O))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const p=(N=r==null?void 0:r.results)==null?void 0:N[0],y=p==null?void 0:p.target,v=y?{target:y}:void 0,x=r==null?void 0:r.status,j=x==="starting"||x==="running",w=yM({runId:t,results:(r==null?void 0:r.results)??[],source:r==null?void 0:r.source,sourceLabel:r==null?void 0:r.source_label,remoteRepo:(r==null?void 0:r.source)==="remote"?l==null?void 0:l.repo:void 0,formatTimestamp:O=>new Date(O).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:w.heading,children:w.heading}),w.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:w.sourceBadge}):null]}),w.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:w.meta}):null,w.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:w.sourceContext.map(O=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[O.label,":"]})," ",O.value]},`${O.label}:${O.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!m&&j?d.jsx($p,{runId:t,status:x,isReadOnly:m,projectId:e}):d.jsx(Zk,{results:(r==null?void 0:r.results)??[],runDir:r==null?void 0:r.run_dir,suiteFilter:r==null?void 0:r.suite_filter,target:y??void 0,projectId:e,isReadOnly:m,plannedTestCount:r==null?void 0:r.planned_test_count,runStatus:x}),x&&d.jsx(Lp,{status:x}),!m&&!j&&d.jsx("button",{type:"button",onClick:()=>f(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run evals"})]})]}),d.jsx(Wk,{results:(r==null?void 0:r.results)??[],runId:t,projectId:e}),!m&&d.jsx(jo,{open:c,onClose:()=>f(!1),projectId:e,prefill:v})]})}const g5=_r("/projects/$projectId_/jobs/$runId")({component:fie});function fie(){const{projectId:e,runId:t}=g5.useParams(),{data:r,isLoading:n,error:i}=Yb(t,e),{data:o}=mt(e),l=(o==null?void 0:o.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(nx,{projectId:e}),d.jsx("div",{className:"h-8 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-64 animate-pulse rounded-lg bg-gray-900"})]});if(i||!r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(nx,{projectId:e}),d.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4 text-sm text-red-400",children:i?`Failed to load run: ${i.message}`:"Run not found."})]});const c=r.status==="finished"||r.status==="failed";return d.jsxs("div",{className:"space-y-4",children:[d.jsx(nx,{projectId:e}),d.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("h1",{className:"truncate font-mono text-base font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-0.5 text-xs text-gray-500",children:["Started ",new Date(r.started_at).toLocaleString(),r.finished_at&&d.jsxs(d.Fragment,{children:[" · ","Finished ",new Date(r.finished_at).toLocaleString()," · ",Math.round((new Date(r.finished_at).getTime()-new Date(r.started_at).getTime())/1e3),"s"]})]})]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-3",children:[d.jsx($p,{runId:t,status:r.status,isReadOnly:l,projectId:e}),d.jsx(Lp,{status:r.status})]})]}),d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 px-4 py-3",children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Command"}),d.jsx("code",{className:"break-all text-xs text-cyan-300",children:r.command})]}),r.stdout?d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Output"}),d.jsx("div",{className:"max-h-[60vh] overflow-y-auto rounded-lg border border-gray-700 bg-gray-950 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-gray-200",children:r.stdout})})]}):!c&&d.jsxs("div",{className:"flex items-center gap-2 text-sm text-gray-500",children:[d.jsx("span",{className:"inline-block h-2.5 w-2.5 animate-spin rounded-full border-2 border-gray-500 border-t-transparent"}),"Waiting for output…"]}),r.stderr&&d.jsxs("div",{children:[d.jsx("p",{className:"mb-1 text-xs font-medium uppercase tracking-wider text-red-500",children:"Stderr"}),d.jsx("div",{className:"max-h-48 overflow-y-auto rounded-lg border border-red-900/40 bg-red-950/20 p-4",children:d.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs text-red-300",children:r.stderr})})]}),c&&d.jsxs("p",{className:"text-xs text-gray-500",children:["Exit code:"," ",d.jsx("span",{className:r.exit_code===0?"text-emerald-400":"text-red-400",children:r.exit_code})]})]})}function nx({projectId:e}){return d.jsx(Oe,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const x5=_r("/projects/$projectId_/experiments/$experimentName")({component:hie});function hie(){const{projectId:e,experimentName:t}=x5.useParams();return d.jsx(r5,{experimentName:t,projectId:e})}const b5=_r("/projects/$projectId_/evals/$runId/$evalId")({component:mie});function mie(){const{projectId:e,runId:t,evalId:r}=b5.useParams(),{data:n,isLoading:i,error:o}=od(e,t),{data:l}=mt(e),[c,f]=S.useState(!1),m=(l==null?void 0:l.read_only)===!0;if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(o)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",o.message]});const p=n==null?void 0:n.results.find(x=>x.testId===r);if(!p)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:r})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:t}),"."]})});const y=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8,v=Ji(p.score,y)&&p.executionStatus!=="error"&&p.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",t," / Eval: ",r]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${v?"text-emerald-400":"text-red-400"}`,children:v?"✓":"✗"}),r]})]}),!m&&d.jsx("button",{type:"button",onClick:()=>f(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),d.jsx(d5,{eval:p,runId:t,projectId:e}),!m&&d.jsx(jo,{open:c,onClose:()=>f(!1),projectId:e,prefill:{testIds:[r],target:p.target}})]})}const j5=_r("/projects/$projectId_/runs/$runId_/suite/$suite")({component:pie});function pie(){const{projectId:e,runId:t,suite:r}=j5.useParams(),{data:n,isLoading:i,error:o}=od(e,t),{data:l}=mt(e),c=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8;if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(o)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",o.message]});const f=((n==null?void 0:n.results)??[]).filter(v=>(v.suite??"Uncategorized")===r),m=f.length,p=Bm(f,c),y=f.reduce((v,x)=>v+(x.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",t]})]}),d.jsx(Jl,{total:m,passed:p.passed,failed:p.failed,passRate:p.passRate,executionErrors:p.executionErrors,totalCost:y>0?y:void 0}),m===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:f.map((v,x)=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsx(Oe,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:v.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:v.testId})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",children:v.target??"-"}),d.jsx("td",{className:"px-4 py-3",children:zm(v)?d.jsx("span",{className:"inline-flex rounded-full bg-amber-900/40 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):d.jsx(tn,{rate:v.score})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:v.durationMs!=null?`${(v.durationMs/1e3).toFixed(1)}s`:"-"}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:v.costUsd!=null?`$${v.costUsd.toFixed(4)}`:"-"})]},`${v.testId}-${x}`))})]})})]})}const w5=_r("/projects/$projectId_/runs/$runId_/category/$category")({component:yie});function yie(){const{projectId:e,runId:t,category:r}=w5.useParams(),{data:n,isLoading:i,error:o}=Ue(lM(e,t,r));if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(x=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});if(o)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",o.message]});const l=(n==null?void 0:n.suites)??[],c=l.reduce((x,j)=>x+j.total,0),f=l.reduce((x,j)=>x+j.passed,0),m=l.reduce((x,j)=>x+j.failed,0),p=l.reduce((x,j)=>x+Gt(j),0),y=c-p,v=y>0?f/y:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",t]})]}),d.jsx(Jl,{total:c,passed:f,failed:m,passRate:v,executionErrors:p}),l.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No suites in this category"})}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:"Suites"}),d.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:l.map(x=>d.jsxs(Oe,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,suite:x.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:x.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[x.passed,"/",wM(x)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Cm,{score:x.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[x.passed," passed"]}),x.failed>0&&d.jsxs("span",{className:"text-red-400",children:[x.failed," failed"]}),Gt(x)>0&&d.jsxs("span",{className:"text-amber-400",children:[Gt(x)," execution errors"]})]})]},x.name))})]})]})}const vie=r6.update({id:"/settings",path:"/settings",getParentRoute:()=>pr}),gie=fae.update({id:"/",path:"/",getParentRoute:()=>pr}),xie=Jk.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>pr}),bie=e5.update({id:"/projects/$projectId",path:"/projects/$projectId",getParentRoute:()=>pr}),jie=t5.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>pr}),wie=n5.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>pr}),Sie=m5.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>pr}),Nie=p5.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>pr}),Oie=y5.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>pr}),_ie=v5.update({id:"/projects/$projectId_/runs/$runId",path:"/projects/$projectId/runs/$runId",getParentRoute:()=>pr}),Eie=g5.update({id:"/projects/$projectId_/jobs/$runId",path:"/projects/$projectId/jobs/$runId",getParentRoute:()=>pr}),Aie=x5.update({id:"/projects/$projectId_/experiments/$experimentName",path:"/projects/$projectId/experiments/$experimentName",getParentRoute:()=>pr}),Pie=b5.update({id:"/projects/$projectId_/evals/$runId/$evalId",path:"/projects/$projectId/evals/$runId/$evalId",getParentRoute:()=>pr}),Tie=j5.update({id:"/projects/$projectId_/runs/$runId_/suite/$suite",path:"/projects/$projectId/runs/$runId/suite/$suite",getParentRoute:()=>pr}),Cie=w5.update({id:"/projects/$projectId_/runs/$runId_/category/$category",path:"/projects/$projectId/runs/$runId/category/$category",getParentRoute:()=>pr}),Mie={IndexRoute:gie,SettingsRoute:vie,ExperimentsExperimentNameRoute:wie,JobsRunIdRoute:jie,ProjectsProjectIdRoute:bie,RunsRunIdRoute:xie,EvalsRunIdEvalIdRoute:Sie,ProjectsProjectIdExperimentsExperimentNameRoute:Aie,ProjectsProjectIdJobsRunIdRoute:Eie,ProjectsProjectIdRunsRunIdRoute:_ie,RunsRunIdCategoryCategoryRoute:Oie,RunsRunIdSuiteSuiteRoute:Nie,ProjectsProjectIdEvalsRunIdEvalIdRoute:Pie,ProjectsProjectIdRunsRunIdCategoryCategoryRoute:Cie,ProjectsProjectIdRunsRunIdSuiteSuiteRoute:Tie},Rie=pr._addFileChildren(Mie)._addFileTypes(),Die=new E$({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),kie=P8({routeTree:Rie}),S5=document.getElementById("root");if(!S5)throw new Error("Root element not found");t$.createRoot(S5).render(d.jsx(S.StrictMode,{children:d.jsx(A$,{client:Die,children:d.jsx(M8,{router:kie})})}));export{$l as W,S as r};
|