agentv 5.1.0-next.1 → 5.3.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/README.md +16 -12
- package/dist/{artifact-writer-IORG7CW5.js → artifact-writer-JFNIPMKW.js} +5 -5
- package/dist/{chunk-ZGPCX334.js → chunk-6ZZCDZPD.js} +4101 -1204
- package/dist/chunk-6ZZCDZPD.js.map +1 -0
- package/dist/{chunk-CBBBRTQ3.js → chunk-BHKQHG26.js} +64 -3
- package/dist/chunk-BHKQHG26.js.map +1 -0
- package/dist/{chunk-AM2IPHKS.js → chunk-FVR4RQFK.js} +302 -162
- package/dist/chunk-FVR4RQFK.js.map +1 -0
- package/dist/{chunk-GIRUNQGP.js → chunk-T32NL3E6.js} +262 -154
- package/dist/chunk-T32NL3E6.js.map +1 -0
- package/dist/{chunk-GJWPQXHN.js → chunk-V52ATPTT.js} +104 -188
- package/dist/chunk-V52ATPTT.js.map +1 -0
- package/dist/cli.js +6 -6
- package/dist/dashboard/assets/{index-BSHoWrdr.js → index-DNgf3qJ2.js} +1 -1
- package/dist/dashboard/assets/{index-zvUKAkKn.css → index-D_bokML8.css} +1 -1
- package/dist/dashboard/assets/index-r_jSJmlw.js +121 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/{dist-2D2GBHZV.js → dist-6Z7U473R.js} +14 -8
- package/dist/index.js +6 -6
- package/dist/{interactive-V4SEHLNY.js → interactive-RUY3OCBI.js} +6 -6
- package/dist/skills/agentv-bench/SKILL.md +17 -13
- package/dist/skills/agentv-bench/agents/analyzer.md +1 -1
- package/dist/skills/agentv-bench/agents/comparator.md +3 -3
- package/dist/skills/agentv-bench/agents/grader.md +4 -2
- package/dist/skills/agentv-bench/references/description-optimization.md +5 -6
- package/dist/skills/agentv-bench/references/environment-adaptation.md +2 -2
- package/dist/skills/agentv-bench/references/eval-yaml-spec.md +35 -19
- package/dist/skills/agentv-bench/references/migrating-from-skill-creator.md +1 -1
- package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +125 -28
- package/dist/skills/agentv-eval-writer/SKILL.md +113 -87
- package/dist/skills/agentv-eval-writer/references/eval.schema.json +772 -1367
- package/dist/{ts-eval-loader-SSPJVEHD-AL2A3V5Z.js → ts-eval-loader-DQDYRULE-V3377FOL.js} +3 -2
- package/package.json +8 -2
- package/dist/chunk-AM2IPHKS.js.map +0 -1
- package/dist/chunk-CBBBRTQ3.js.map +0 -1
- package/dist/chunk-GIRUNQGP.js.map +0 -1
- package/dist/chunk-GJWPQXHN.js.map +0 -1
- package/dist/chunk-ZGPCX334.js.map +0 -1
- package/dist/dashboard/assets/index-BaLLxmVO.js +0 -121
- /package/dist/{artifact-writer-IORG7CW5.js.map → artifact-writer-JFNIPMKW.js.map} +0 -0
- /package/dist/{dist-2D2GBHZV.js.map → dist-6Z7U473R.js.map} +0 -0
- /package/dist/{interactive-V4SEHLNY.js.map → interactive-RUY3OCBI.js.map} +0 -0
- /package/dist/{ts-eval-loader-SSPJVEHD-AL2A3V5Z.js.map → ts-eval-loader-DQDYRULE-V3377FOL.js.map} +0 -0
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
var I$=Object.defineProperty;var uO=e=>{throw TypeError(e)};var $$=(e,t,r)=>t in e?I$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var fv=(e,t,r)=>$$(e,typeof t!="symbol"?t+"":t,r),hv=(e,t,r)=>t.has(e)||uO("Cannot "+r);var U=(e,t,r)=>(hv(e,t,"read from private field"),r?r.call(e):t.get(e)),Ne=(e,t,r)=>t.has(e)?uO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(hv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Le=(e,t,r)=>(hv(e,t,"access private method"),r);var th=(e,t,r,n)=>({set _(i){fe(e,t,i,r)},get _(){return U(e,t,n)}});function z$(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 rs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var mv={exports:{}},nc={};/**
|
|
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 cO;function B$(){if(cO)return nc;cO=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 nc.Fragment=t,nc.jsx=r,nc.jsxs=r,nc}var dO;function U$(){return dO||(dO=1,mv.exports=B$()),mv.exports}var d=U$(),pv={exports:{}},Oe={};/**
|
|
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 fO;function q$(){if(fO)return Oe;fO=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"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=y&&L[y]||L["@@iterator"],typeof L=="function"?L:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function _(L,X,le){this.props=L,this.context=X,this.refs=N,this.updater=le||b}_.prototype.isReactComponent={},_.prototype.setState=function(L,X){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,X,"setState")},_.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function E(){}E.prototype=_.prototype;function T(L,X,le){this.props=L,this.context=X,this.refs=N,this.updater=le||b}var A=T.prototype=new E;A.constructor=T,w(A,_.prototype),A.isPureReactComponent=!0;var C=Array.isArray;function R(){}var D={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function $(L,X,le){var ue=le.ref;return{$$typeof:e,type:L,key:X,ref:ue!==void 0?ue:null,props:le}}function I(L,X){return $(L.type,X,L.props)}function F(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function H(L){var X={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(le){return X[le]})}var ie=/\/+/g;function Z(L,X){return typeof L=="object"&&L!==null&&L.key!=null?H(""+L.key):X.toString(36)}function G(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(R,R):(L.status="pending",L.then(function(X){L.status==="pending"&&(L.status="fulfilled",L.value=X)},function(X){L.status==="pending"&&(L.status="rejected",L.reason=X)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function k(L,X,le,ue,pe){var xe=typeof L;(xe==="undefined"||xe==="boolean")&&(L=null);var we=!1;if(L===null)we=!0;else switch(xe){case"bigint":case"string":case"number":we=!0;break;case"object":switch(L.$$typeof){case e:case t:we=!0;break;case p:return we=L._init,k(we(L._payload),X,le,ue,pe)}}if(we)return pe=pe(L),we=ue===""?"."+Z(L,0):ue,C(pe)?(le="",we!=null&&(le=we.replace(ie,"$&/")+"/"),k(pe,X,le,"",function(te){return te})):pe!=null&&(F(pe)&&(pe=I(pe,le+(pe.key==null||L&&L.key===pe.key?"":(""+pe.key).replace(ie,"$&/")+"/")+we)),X.push(pe)),1;we=0;var _e=ue===""?".":ue+":";if(C(L))for(var de=0;de<L.length;de++)ue=L[de],xe=_e+Z(ue,de),we+=k(ue,X,le,xe,pe);else if(de=x(L),typeof de=="function")for(L=de.call(L),de=0;!(ue=L.next()).done;)ue=ue.value,xe=_e+Z(ue,de++),we+=k(ue,X,le,xe,pe);else if(xe==="object"){if(typeof L.then=="function")return k(G(L),X,le,ue,pe);throw X=String(L),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return we}function q(L,X,le){if(L==null)return L;var ue=[],pe=0;return k(L,ue,"","",function(xe){return X.call(le,xe,pe++)}),ue}function J(L){if(L._status===-1){var X=L._result;X=X(),X.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=X)}if(L._status===1)return L._result.default;throw L._result}var re=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=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(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},oe={map:q,forEach:function(L,X,le){q(L,function(){X.apply(this,arguments)},le)},count:function(L){var X=0;return q(L,function(){X++}),X},toArray:function(L){return q(L,function(X){return X})||[]},only:function(L){if(!F(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Oe.Activity=g,Oe.Children=oe,Oe.Component=_,Oe.Fragment=r,Oe.Profiler=i,Oe.PureComponent=T,Oe.StrictMode=n,Oe.Suspense=f,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(L){return D.H.useMemoCache(L)}},Oe.cache=function(L){return function(){return L.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(L,X,le){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var ue=w({},L.props),pe=L.key;if(X!=null)for(xe in X.key!==void 0&&(pe=""+X.key),X)!M.call(X,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&X.ref===void 0||(ue[xe]=X[xe]);var xe=arguments.length-2;if(xe===1)ue.children=le;else if(1<xe){for(var we=Array(xe),_e=0;_e<xe;_e++)we[_e]=arguments[_e+2];ue.children=we}return $(L.type,pe,ue)},Oe.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},Oe.createElement=function(L,X,le){var ue,pe={},xe=null;if(X!=null)for(ue in X.key!==void 0&&(xe=""+X.key),X)M.call(X,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(pe[ue]=X[ue]);var we=arguments.length-2;if(we===1)pe.children=le;else if(1<we){for(var _e=Array(we),de=0;de<we;de++)_e[de]=arguments[de+2];pe.children=_e}if(L&&L.defaultProps)for(ue in we=L.defaultProps,we)pe[ue]===void 0&&(pe[ue]=we[ue]);return $(L,xe,pe)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(L){return{$$typeof:c,render:L}},Oe.isValidElement=F,Oe.lazy=function(L){return{$$typeof:p,_payload:{_status:-1,_result:L},_init:J}},Oe.memo=function(L,X){return{$$typeof:h,type:L,compare:X===void 0?null:X}},Oe.startTransition=function(L){var X=D.T,le={};D.T=le;try{var ue=L(),pe=D.S;pe!==null&&pe(le,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(R,re)}catch(xe){re(xe)}finally{X!==null&&le.types!==null&&(X.types=le.types),D.T=X}},Oe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Oe.use=function(L){return D.H.use(L)},Oe.useActionState=function(L,X,le){return D.H.useActionState(L,X,le)},Oe.useCallback=function(L,X){return D.H.useCallback(L,X)},Oe.useContext=function(L){return D.H.useContext(L)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(L,X){return D.H.useDeferredValue(L,X)},Oe.useEffect=function(L,X){return D.H.useEffect(L,X)},Oe.useEffectEvent=function(L){return D.H.useEffectEvent(L)},Oe.useId=function(){return D.H.useId()},Oe.useImperativeHandle=function(L,X,le){return D.H.useImperativeHandle(L,X,le)},Oe.useInsertionEffect=function(L,X){return D.H.useInsertionEffect(L,X)},Oe.useLayoutEffect=function(L,X){return D.H.useLayoutEffect(L,X)},Oe.useMemo=function(L,X){return D.H.useMemo(L,X)},Oe.useOptimistic=function(L,X){return D.H.useOptimistic(L,X)},Oe.useReducer=function(L,X,le){return D.H.useReducer(L,X,le)},Oe.useRef=function(L){return D.H.useRef(L)},Oe.useState=function(L){return D.H.useState(L)},Oe.useSyncExternalStore=function(L,X,le){return D.H.useSyncExternalStore(L,X,le)},Oe.useTransition=function(){return D.H.useTransition()},Oe.version="19.2.4",Oe}var hO;function eu(){return hO||(hO=1,pv.exports=q$()),pv.exports}var S=eu();const zl=rs(S),H$=z$({__proto__:null,default:zl},[S]);var gv={exports:{}},ac={},yv={exports:{}},vv={};/**
|
|
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 mO;function F$(){return mO||(mO=1,(function(e){function t(k,q){var J=k.length;k.push(q);e:for(;0<J;){var re=J-1>>>1,oe=k[re];if(0<i(oe,q))k[re]=q,k[J]=oe,J=re;else break e}}function r(k){return k.length===0?null:k[0]}function n(k){if(k.length===0)return null;var q=k[0],J=k.pop();if(J!==q){k[0]=J;e:for(var re=0,oe=k.length,L=oe>>>1;re<L;){var X=2*(re+1)-1,le=k[X],ue=X+1,pe=k[ue];if(0>i(le,J))ue<oe&&0>i(pe,le)?(k[re]=pe,k[ue]=J,re=ue):(k[re]=le,k[X]=J,re=X);else if(ue<oe&&0>i(pe,J))k[re]=pe,k[ue]=J,re=ue;else break e}}return q}function i(k,q){var J=k.sortIndex-q.sortIndex;return J!==0?J:k.id-q.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=[],h=[],p=1,g=null,y=3,x=!1,b=!1,w=!1,N=!1,_=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function A(k){for(var q=r(h);q!==null;){if(q.callback===null)n(h);else if(q.startTime<=k)n(h),q.sortIndex=q.expirationTime,t(f,q);else break;q=r(h)}}function C(k){if(w=!1,A(k),!b)if(r(f)!==null)b=!0,R||(R=!0,H());else{var q=r(h);q!==null&&G(C,q.startTime-k)}}var R=!1,D=-1,M=5,$=-1;function I(){return N?!0:!(e.unstable_now()-$<M)}function F(){if(N=!1,R){var k=e.unstable_now();$=k;var q=!0;try{e:{b=!1,w&&(w=!1,E(D),D=-1),x=!0;var J=y;try{t:{for(A(k),g=r(f);g!==null&&!(g.expirationTime>k&&I());){var re=g.callback;if(typeof re=="function"){g.callback=null,y=g.priorityLevel;var oe=re(g.expirationTime<=k);if(k=e.unstable_now(),typeof oe=="function"){g.callback=oe,A(k),q=!0;break t}g===r(f)&&n(f),A(k)}else n(f);g=r(f)}if(g!==null)q=!0;else{var L=r(h);L!==null&&G(C,L.startTime-k),q=!1}}break e}finally{g=null,y=J,x=!1}q=void 0}}finally{q?H():R=!1}}}var H;if(typeof T=="function")H=function(){T(F)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,Z=ie.port2;ie.port1.onmessage=F,H=function(){Z.postMessage(null)}}else H=function(){_(F,0)};function G(k,q){D=_(function(){k(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(k){k.callback=null},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(k){switch(y){case 1:case 2:case 3:var q=3;break;default:q=y}var J=y;y=q;try{return k()}finally{y=J}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(k,q){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var J=y;y=k;try{return q()}finally{y=J}},e.unstable_scheduleCallback=function(k,q,J){var re=e.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?re+J:re):J=re,k){case 1:var oe=-1;break;case 2:oe=250;break;case 5:oe=1073741823;break;case 4:oe=1e4;break;default:oe=5e3}return oe=J+oe,k={id:p++,callback:q,priorityLevel:k,startTime:J,expirationTime:oe,sortIndex:-1},J>re?(k.sortIndex=J,t(h,k),r(f)===null&&k===r(h)&&(w?(E(D),D=-1):w=!0,G(C,J-re))):(k.sortIndex=oe,t(f,k),b||x||(b=!0,R||(R=!0,H()))),k},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(k){var q=y;return function(){var J=y;y=q;try{return k.apply(this,arguments)}finally{y=J}}}})(vv)),vv}var pO;function K$(){return pO||(pO=1,yv.exports=F$()),yv.exports}var xv={exports:{}},pr={};/**
|
|
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 gO;function G$(){if(gO)return pr;gO=1;var e=eu();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" 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,h,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:g==null?null:""+g,children:f,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return pr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,pr.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(f,h,null,p)},pr.flushSync=function(f){var h=l.T,p=n.p;try{if(l.T=null,n.p=2,f)return f()}finally{l.T=h,n.p=p,n.d.f()}},pr.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(f,h))},pr.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},pr.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,g=c(p,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?n.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:x}):p==="script"&&n.d.X(f,{crossOrigin:g,integrity:y,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},pr.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=c(h.as,h.crossOrigin);n.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&n.d.M(f)},pr.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,g=c(p,h.crossOrigin);n.d.L(f,p,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},pr.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=c(h.as,h.crossOrigin);n.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else n.d.m(f)},pr.requestFormReset=function(f){n.d.r(f)},pr.unstable_batchedUpdates=function(f,h){return f(h)},pr.useFormState=function(f,h,p){return l.H.useFormState(f,h,p)},pr.useFormStatus=function(){return l.H.useHostTransitionStatus()},pr.version="19.2.4",pr}var yO;function D2(){if(yO)return xv.exports;yO=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(),xv.exports=G$(),xv.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 vO;function Y$(){if(vO)return ac;vO=1;var e=K$(),t=eu(),r=D2();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 h(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,m=s;;){var v=u.return;if(v===null)break;var j=v.alternate;if(j===null){if(m=v.return,m!==null){u=m;continue}break}if(v.child===j.child){for(j=v.child;j;){if(j===u)return f(v),a;if(j===m)return f(v),s;j=j.sibling}throw Error(n(188))}if(u.return!==m.return)u=v,m=j;else{for(var O=!1,P=v.child;P;){if(P===u){O=!0,u=v,m=j;break}if(P===m){O=!0,m=v,u=j;break}P=P.sibling}if(!O){for(P=j.child;P;){if(P===u){O=!0,u=j,m=v;break}if(P===m){O=!0,m=j,u=v;break}P=P.sibling}if(!O)throw Error(n(189))}}if(u.alternate!==m)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 g=Object.assign,y=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),E=Symbol.for("react.consumer"),T=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function H(a){return a===null||typeof a!="object"?null:(a=F&&a[F]||a["@@iterator"],typeof a=="function"?a:null)}var ie=Symbol.for("react.client.reference");function Z(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ie?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case _:return"Profiler";case N:return"StrictMode";case C:return"Suspense";case R:return"SuspenseList";case $:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case T:return a.displayName||"Context";case E: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 D:return s=a.displayName||null,s!==null?s:Z(a.type)||"Memo";case M:s=a._payload,a=a._init;try{return Z(a(s))}catch{}}return null}var G=Array.isArray,k=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J={pending:!1,data:null,method:null,action:null},re=[],oe=-1;function L(a){return{current:a}}function X(a){0>oe||(a.current=re[oe],re[oe]=null,oe--)}function le(a,s){oe++,re[oe]=a.current,a.current=s}var ue=L(null),pe=L(null),xe=L(null),we=L(null);function _e(a,s){switch(le(xe,s),le(pe,a),le(ue,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?R_(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=R_(s),a=M_(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}X(ue),le(ue,a)}function de(){X(ue),X(pe),X(xe)}function te(a){a.memoizedState!==null&&le(we,a);var s=ue.current,u=M_(s,a.type);s!==u&&(le(pe,a),le(ue,u))}function je(a){pe.current===a&&(X(ue),X(pe)),we.current===a&&(X(we),Ju._currentValue=J)}var ce,Et;function Me(a){if(ce===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ce=s&&s[1]||"",Et=-1<u.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ce+a+Et}var At=!1;function Tt(a,s){if(!a||At)return"";At=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(ee){var W=ee}Reflect.construct(a,[],se)}else{try{se.call()}catch(ee){W=ee}a.call(se.prototype)}}else{try{throw Error()}catch(ee){W=ee}(se=a())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=m.DetermineComponentFrameRoot(),O=j[0],P=j[1];if(O&&P){var z=O.split(`
|
|
44
|
-
`),V=P.split(`
|
|
45
|
-
`);for(v=m=0;m<z.length&&!z[m].includes("DetermineComponentFrameRoot");)m++;for(;v<V.length&&!V[v].includes("DetermineComponentFrameRoot");)v++;if(m===z.length||v===V.length)for(m=z.length-1,v=V.length-1;1<=m&&0<=v&&z[m]!==V[v];)v--;for(;1<=m&&0<=v;m--,v--)if(z[m]!==V[v]){if(m!==1||v!==1)do if(m--,v--,0>v||z[m]!==V[v]){var ne=`
|
|
46
|
-
`+z[m].replace(" at new "," at ");return a.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",a.displayName)),ne}while(1<=m&&0<=v);break}}}finally{At=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Me(u):""}function hr(a,s){switch(a.tag){case 26:case 27:case 5:return Me(a.type);case 16:return Me("Lazy");case 13:return a.child!==s&&s!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return Tt(a.type,!1);case 11:return Tt(a.type.render,!1);case 1:return Tt(a.type,!0);case 31:return Me("Activity");default:return""}}function pa(a){try{var s="",u=null;do s+=hr(a,u),u=a,a=a.return;while(a);return s}catch(m){return`
|
|
47
|
-
Error generating stack: `+m.message+`
|
|
48
|
-
`+m.stack}}var Cn=Object.prototype.hasOwnProperty,cu=e.unstable_scheduleCallback,wo=e.unstable_cancelCallback,Jp=e.unstable_shouldYield,kd=e.unstable_requestPaint,Ce=e.unstable_now,mr=e.unstable_getCurrentPriorityLevel,Kn=e.unstable_ImmediatePriority,Ld=e.unstable_UserBlockingPriority,Id=e.unstable_NormalPriority,vL=e.unstable_LowPriority,fS=e.unstable_IdlePriority,xL=e.log,bL=e.unstable_setDisableYieldValue,du=null,Fr=null;function ni(a){if(typeof xL=="function"&&bL(a),Fr&&typeof Fr.setStrictMode=="function")try{Fr.setStrictMode(du,a)}catch{}}var Kr=Math.clz32?Math.clz32:SL,jL=Math.log,wL=Math.LN2;function SL(a){return a>>>=0,a===0?32:31-(jL(a)/wL|0)|0}var $d=256,zd=262144,Bd=4194304;function is(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 Ud(a,s,u){var m=a.pendingLanes;if(m===0)return 0;var v=0,j=a.suspendedLanes,O=a.pingedLanes;a=a.warmLanes;var P=m&134217727;return P!==0?(m=P&~j,m!==0?v=is(m):(O&=P,O!==0?v=is(O):u||(u=P&~a,u!==0&&(v=is(u))))):(P=m&~j,P!==0?v=is(P):O!==0?v=is(O):u||(u=m&~a,u!==0&&(v=is(u)))),v===0?0:s!==0&&s!==v&&(s&j)===0&&(j=v&-v,u=s&-s,j>=u||j===32&&(u&4194048)!==0)?s:v}function fu(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function NL(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 hS(){var a=Bd;return Bd<<=1,(Bd&62914560)===0&&(Bd=4194304),a}function eg(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function hu(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function _L(a,s,u,m,v,j){var O=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 P=a.entanglements,z=a.expirationTimes,V=a.hiddenUpdates;for(u=O&~u;0<u;){var ne=31-Kr(u),se=1<<ne;P[ne]=0,z[ne]=-1;var W=V[ne];if(W!==null)for(V[ne]=null,ne=0;ne<W.length;ne++){var ee=W[ne];ee!==null&&(ee.lane&=-536870913)}u&=~se}m!==0&&mS(a,m,0),j!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=j&~(O&~s))}function mS(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var m=31-Kr(s);a.entangledLanes|=s,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function pS(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var m=31-Kr(u),v=1<<m;v&s|a[m]&s&&(a[m]|=s),u&=~v}}function gS(a,s){var u=s&-s;return u=(u&42)!==0?1:tg(u),(u&(a.suspendedLanes|s))!==0?0:u}function tg(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 rg(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function yS(){var a=q.p;return a!==0?a:(a=window.event,a===void 0?32:rO(a.type))}function vS(a,s){var u=q.p;try{return q.p=a,s()}finally{q.p=u}}var ai=Math.random().toString(36).slice(2),Zt="__reactFiber$"+ai,Cr="__reactProps$"+ai,So="__reactContainer$"+ai,ng="__reactEvents$"+ai,OL="__reactListeners$"+ai,EL="__reactHandles$"+ai,xS="__reactResources$"+ai,mu="__reactMarker$"+ai;function ag(a){delete a[Zt],delete a[Cr],delete a[ng],delete a[OL],delete a[EL]}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=B_(a);a!==null;){if(u=a[Zt])return u;a=B_(a)}return s}a=u,u=a.parentNode}return null}function _o(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 pu(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(n(33))}function Oo(a){var s=a[xS];return s||(s=a[xS]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qt(a){a[mu]=!0}var bS=new Set,jS={};function ss(a,s){Eo(a,s),Eo(a+"Capture",s)}function Eo(a,s){for(jS[a]=s,a=0;a<s.length;a++)bS.add(s[a])}var AL=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]*$"),wS={},SS={};function TL(a){return Cn.call(SS,a)?!0:Cn.call(wS,a)?!1:AL.test(a)?SS[a]=!0:(wS[a]=!0,!1)}function qd(a,s,u){if(TL(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var m=s.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function Hd(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 ga(a,s,u,m){if(m===null)a.removeAttribute(u);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+m)}}function un(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function NS(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function CL(a,s,u){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var v=m.get,j=m.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return v.call(this)},set:function(O){u=""+O,j.call(this,O)}}),Object.defineProperty(a,s,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(O){u=""+O},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function ig(a){if(!a._valueTracker){var s=NS(a)?"checked":"value";a._valueTracker=CL(a,s,""+a[s])}}function _S(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return a&&(m=NS(a)?a.checked?"true":"false":a.value),a=m,a!==u?(s.setValue(a),!0):!1}function Fd(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 PL=/[\n"\\]/g;function cn(a){return a.replace(PL,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function sg(a,s,u,m,v,j,O,P){a.name="",O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?a.type=O:a.removeAttribute("type"),s!=null?O==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+un(s)):a.value!==""+un(s)&&(a.value=""+un(s)):O!=="submit"&&O!=="reset"||a.removeAttribute("value"),s!=null?og(a,O,un(s)):u!=null?og(a,O,un(u)):m!=null&&a.removeAttribute("value"),v==null&&j!=null&&(a.defaultChecked=!!j),v!=null&&(a.checked=v&&typeof v!="function"&&typeof v!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+un(P):a.removeAttribute("name")}function OS(a,s,u,m,v,j,O,P){if(j!=null&&typeof j!="function"&&typeof j!="symbol"&&typeof j!="boolean"&&(a.type=j),s!=null||u!=null){if(!(j!=="submit"&&j!=="reset"||s!=null)){ig(a);return}u=u!=null?""+un(u):"",s=s!=null?""+un(s):u,P||s===a.value||(a.value=s),a.defaultValue=s}m=m??v,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=P?a.checked:!!m,a.defaultChecked=!!m,O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(a.name=O),ig(a)}function og(a,s,u){s==="number"&&Fd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Ao(a,s,u,m){if(a=a.options,s){s={};for(var v=0;v<u.length;v++)s["$"+u[v]]=!0;for(u=0;u<a.length;u++)v=s.hasOwnProperty("$"+a[u].value),a[u].selected!==v&&(a[u].selected=v),v&&m&&(a[u].defaultSelected=!0)}else{for(u=""+un(u),s=null,v=0;v<a.length;v++){if(a[v].value===u){a[v].selected=!0,m&&(a[v].defaultSelected=!0);return}s!==null||a[v].disabled||(s=a[v])}s!==null&&(s.selected=!0)}}function ES(a,s,u){if(s!=null&&(s=""+un(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+un(u):""}function AS(a,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(n(92));if(G(m)){if(1<m.length)throw Error(n(93));m=m[0]}u=m}u==null&&(u=""),s=u}u=un(s),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),ig(a)}function To(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var RL=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 TS(a,s,u){var m=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?m?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":m?a.setProperty(s,u):typeof u!="number"||u===0||RL.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function CS(a,s,u){if(s!=null&&typeof s!="object")throw Error(n(62));if(a=a.style,u!=null){for(var m in u)!u.hasOwnProperty(m)||s!=null&&s.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var v in s)m=s[v],s.hasOwnProperty(v)&&u[v]!==m&&TS(a,v,m)}else for(var j in s)s.hasOwnProperty(j)&&TS(a,j,s[j])}function lg(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 ML=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"]]),DL=/^[\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 Kd(a){return DL.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ya(){}var ug=null;function cg(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Co=null,Po=null;function PS(a){var s=_o(a);if(s&&(a=s.stateNode)){var u=a[Cr]||null;e:switch(a=s.stateNode,s.type){case"input":if(sg(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="'+cn(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var m=u[s];if(m!==a&&m.form===a.form){var v=m[Cr]||null;if(!v)throw Error(n(90));sg(m,v.value,v.defaultValue,v.defaultValue,v.checked,v.defaultChecked,v.type,v.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===a.form&&_S(m)}break e;case"textarea":ES(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Ao(a,!!u.multiple,s,!1)}}}var dg=!1;function RS(a,s,u){if(dg)return a(s,u);dg=!0;try{var m=a(s);return m}finally{if(dg=!1,(Co!==null||Po!==null)&&(Mf(),Co&&(s=Co,a=Po,Po=Co=null,PS(s),a)))for(s=0;s<a.length;s++)PS(a[s])}}function gu(a,s){var u=a.stateNode;if(u===null)return null;var m=u[Cr]||null;if(m===null)return null;u=m[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(n(231,s,typeof u));return u}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fg=!1;if(va)try{var yu={};Object.defineProperty(yu,"passive",{get:function(){fg=!0}}),window.addEventListener("test",yu,yu),window.removeEventListener("test",yu,yu)}catch{fg=!1}var ii=null,hg=null,Gd=null;function MS(){if(Gd)return Gd;var a,s=hg,u=s.length,m,v="value"in ii?ii.value:ii.textContent,j=v.length;for(a=0;a<u&&s[a]===v[a];a++);var O=u-a;for(m=1;m<=O&&s[u-m]===v[j-m];m++);return Gd=v.slice(a,1<m?1-m:void 0)}function Yd(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 Vd(){return!0}function DS(){return!1}function Pr(a){function s(u,m,v,j,O){this._reactName=u,this._targetInst=v,this.type=m,this.nativeEvent=j,this.target=O,this.currentTarget=null;for(var P in a)a.hasOwnProperty(P)&&(u=a[P],this[P]=u?u(j):j[P]);return this.isDefaultPrevented=(j.defaultPrevented!=null?j.defaultPrevented:j.returnValue===!1)?Vd:DS,this.isPropagationStopped=DS,this}return g(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=Vd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Vd)},persist:function(){},isPersistent:Vd}),s}var os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qd=Pr(os),vu=g({},os,{view:0,detail:0}),kL=Pr(vu),mg,pg,xu,Xd=g({},vu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yg,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!==xu&&(xu&&a.type==="mousemove"?(mg=a.screenX-xu.screenX,pg=a.screenY-xu.screenY):pg=mg=0,xu=a),mg)},movementY:function(a){return"movementY"in a?a.movementY:pg}}),kS=Pr(Xd),LL=g({},Xd,{dataTransfer:0}),IL=Pr(LL),$L=g({},vu,{relatedTarget:0}),gg=Pr($L),zL=g({},os,{animationName:0,elapsedTime:0,pseudoElement:0}),BL=Pr(zL),UL=g({},os,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),qL=Pr(UL),HL=g({},os,{data:0}),LS=Pr(HL),FL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},KL={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"},GL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function YL(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=GL[a])?!!s[a]:!1}function yg(){return YL}var VL=g({},vu,{key:function(a){if(a.key){var s=FL[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Yd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?KL[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yg,charCode:function(a){return a.type==="keypress"?Yd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Yd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),QL=Pr(VL),XL=g({},Xd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),IS=Pr(XL),WL=g({},vu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yg}),ZL=Pr(WL),JL=g({},os,{propertyName:0,elapsedTime:0,pseudoElement:0}),eI=Pr(JL),tI=g({},Xd,{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}),rI=Pr(tI),nI=g({},os,{newState:0,oldState:0}),aI=Pr(nI),iI=[9,13,27,32],vg=va&&"CompositionEvent"in window,bu=null;va&&"documentMode"in document&&(bu=document.documentMode);var sI=va&&"TextEvent"in window&&!bu,$S=va&&(!vg||bu&&8<bu&&11>=bu),zS=" ",BS=!1;function US(a,s){switch(a){case"keyup":return iI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qS(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Ro=!1;function oI(a,s){switch(a){case"compositionend":return qS(s);case"keypress":return s.which!==32?null:(BS=!0,zS);case"textInput":return a=s.data,a===zS&&BS?null:a;default:return null}}function lI(a,s){if(Ro)return a==="compositionend"||!vg&&US(a,s)?(a=MS(),Gd=hg=ii=null,Ro=!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 $S&&s.locale!=="ko"?null:s.data;default:return null}}var uI={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 HS(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!uI[a.type]:s==="textarea"}function FS(a,s,u,m){Co?Po?Po.push(m):Po=[m]:Co=m,s=Bf(s,"onChange"),0<s.length&&(u=new Qd("onChange","change",null,u,m),a.push({event:u,listeners:s}))}var ju=null,wu=null;function cI(a){O_(a,0)}function Wd(a){var s=pu(a);if(_S(s))return a}function KS(a,s){if(a==="change")return s}var GS=!1;if(va){var xg;if(va){var bg="oninput"in document;if(!bg){var YS=document.createElement("div");YS.setAttribute("oninput","return;"),bg=typeof YS.oninput=="function"}xg=bg}else xg=!1;GS=xg&&(!document.documentMode||9<document.documentMode)}function VS(){ju&&(ju.detachEvent("onpropertychange",QS),wu=ju=null)}function QS(a){if(a.propertyName==="value"&&Wd(wu)){var s=[];FS(s,wu,a,cg(a)),RS(cI,s)}}function dI(a,s,u){a==="focusin"?(VS(),ju=s,wu=u,ju.attachEvent("onpropertychange",QS)):a==="focusout"&&VS()}function fI(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Wd(wu)}function hI(a,s){if(a==="click")return Wd(s)}function mI(a,s){if(a==="input"||a==="change")return Wd(s)}function pI(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Gr=typeof Object.is=="function"?Object.is:pI;function Su(a,s){if(Gr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var v=u[m];if(!Cn.call(s,v)||!Gr(a[v],s[v]))return!1}return!0}function XS(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function WS(a,s){var u=XS(a);a=0;for(var m;u;){if(u.nodeType===3){if(m=a+u.textContent.length,a<=s&&m>=s)return{node:u,offset:s-a};a=m}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=XS(u)}}function ZS(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?ZS(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function JS(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Fd(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=Fd(a.document)}return s}function jg(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 gI=va&&"documentMode"in document&&11>=document.documentMode,Mo=null,wg=null,Nu=null,Sg=!1;function e1(a,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Sg||Mo==null||Mo!==Fd(m)||(m=Mo,"selectionStart"in m&&jg(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Nu&&Su(Nu,m)||(Nu=m,m=Bf(wg,"onSelect"),0<m.length&&(s=new Qd("onSelect","select",null,s,u),a.push({event:s,listeners:m}),s.target=Mo)))}function ls(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var Do={animationend:ls("Animation","AnimationEnd"),animationiteration:ls("Animation","AnimationIteration"),animationstart:ls("Animation","AnimationStart"),transitionrun:ls("Transition","TransitionRun"),transitionstart:ls("Transition","TransitionStart"),transitioncancel:ls("Transition","TransitionCancel"),transitionend:ls("Transition","TransitionEnd")},Ng={},t1={};va&&(t1=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 us(a){if(Ng[a])return Ng[a];if(!Do[a])return a;var s=Do[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in t1)return Ng[a]=s[u];return a}var r1=us("animationend"),n1=us("animationiteration"),a1=us("animationstart"),yI=us("transitionrun"),vI=us("transitionstart"),xI=us("transitioncancel"),i1=us("transitionend"),s1=new Map,_g="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(" ");_g.push("scrollEnd");function Pn(a,s){s1.set(a,s),ss(s,[a])}var Zd=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)},dn=[],ko=0,Og=0;function Jd(){for(var a=ko,s=Og=ko=0;s<a;){var u=dn[s];dn[s++]=null;var m=dn[s];dn[s++]=null;var v=dn[s];dn[s++]=null;var j=dn[s];if(dn[s++]=null,m!==null&&v!==null){var O=m.pending;O===null?v.next=v:(v.next=O.next,O.next=v),m.pending=v}j!==0&&o1(u,v,j)}}function ef(a,s,u,m){dn[ko++]=a,dn[ko++]=s,dn[ko++]=u,dn[ko++]=m,Og|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function Eg(a,s,u,m){return ef(a,s,u,m),tf(a)}function cs(a,s){return ef(a,null,null,s),tf(a)}function o1(a,s,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var v=!1,j=a.return;j!==null;)j.childLanes|=u,m=j.alternate,m!==null&&(m.childLanes|=u),j.tag===22&&(a=j.stateNode,a===null||a._visibility&1||(v=!0)),a=j,j=j.return;return a.tag===3?(j=a.stateNode,v&&s!==null&&(v=31-Kr(u),a=j.hiddenUpdates,m=a[v],m===null?a[v]=[s]:m.push(s),s.lane=u|536870912),j):null}function tf(a){if(50<Gu)throw Gu=0,Ly=null,Error(n(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Lo={};function bI(a,s,u,m){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Yr(a,s,u,m){return new bI(a,s,u,m)}function Ag(a){return a=a.prototype,!(!a||!a.isReactComponent)}function xa(a,s){var u=a.alternate;return u===null?(u=Yr(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 l1(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 rf(a,s,u,m,v,j){var O=0;if(m=a,typeof a=="function")Ag(a)&&(O=1);else if(typeof a=="string")O=_$(a,u,ue.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case $:return a=Yr(31,u,s,v),a.elementType=$,a.lanes=j,a;case w:return ds(u.children,v,j,s);case N:O=8,v|=24;break;case _:return a=Yr(12,u,s,v|2),a.elementType=_,a.lanes=j,a;case C:return a=Yr(13,u,s,v),a.elementType=C,a.lanes=j,a;case R:return a=Yr(19,u,s,v),a.elementType=R,a.lanes=j,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case T:O=10;break e;case E:O=9;break e;case A:O=11;break e;case D:O=14;break e;case M:O=16,m=null;break e}O=29,u=Error(n(130,a===null?"null":typeof a,"")),m=null}return s=Yr(O,u,s,v),s.elementType=a,s.type=m,s.lanes=j,s}function ds(a,s,u,m){return a=Yr(7,a,m,s),a.lanes=u,a}function Tg(a,s,u){return a=Yr(6,a,null,s),a.lanes=u,a}function u1(a){var s=Yr(18,null,null,0);return s.stateNode=a,s}function Cg(a,s,u){return s=Yr(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var c1=new WeakMap;function fn(a,s){if(typeof a=="object"&&a!==null){var u=c1.get(a);return u!==void 0?u:(s={value:a,source:s,stack:pa(s)},c1.set(a,s),s)}return{value:a,source:s,stack:pa(s)}}var Io=[],$o=0,nf=null,_u=0,hn=[],mn=0,si=null,Gn=1,Yn="";function ba(a,s){Io[$o++]=_u,Io[$o++]=nf,nf=a,_u=s}function d1(a,s,u){hn[mn++]=Gn,hn[mn++]=Yn,hn[mn++]=si,si=a;var m=Gn;a=Yn;var v=32-Kr(m)-1;m&=~(1<<v),u+=1;var j=32-Kr(s)+v;if(30<j){var O=v-v%5;j=(m&(1<<O)-1).toString(32),m>>=O,v-=O,Gn=1<<32-Kr(s)+v|u<<v|m,Yn=j+a}else Gn=1<<j|u<<v|m,Yn=a}function Pg(a){a.return!==null&&(ba(a,1),d1(a,1,0))}function Rg(a){for(;a===nf;)nf=Io[--$o],Io[$o]=null,_u=Io[--$o],Io[$o]=null;for(;a===si;)si=hn[--mn],hn[mn]=null,Yn=hn[--mn],hn[mn]=null,Gn=hn[--mn],hn[mn]=null}function f1(a,s){hn[mn++]=Gn,hn[mn++]=Yn,hn[mn++]=si,Gn=s.id,Yn=s.overflow,si=a}var Jt=null,it=null,Ie=!1,oi=null,pn=!1,Mg=Error(n(519));function li(a){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ou(fn(s,a)),Mg}function h1(a){var s=a.stateNode,u=a.type,m=a.memoizedProps;switch(s[Zt]=a,s[Cr]=m,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<Vu.length;u++)Re(Vu[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),OS(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Re("invalid",s);break;case"textarea":Re("invalid",s),AS(s,m.value,m.defaultValue,m.children)}u=m.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||m.suppressHydrationWarning===!0||C_(s.textContent,u)?(m.popover!=null&&(Re("beforetoggle",s),Re("toggle",s)),m.onScroll!=null&&Re("scroll",s),m.onScrollEnd!=null&&Re("scrollend",s),m.onClick!=null&&(s.onclick=ya),s=!0):s=!1,s||li(a,!0)}function m1(a){for(Jt=a.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:Jt=Jt.return}}function zo(a){if(a!==Jt)return!1;if(!Ie)return m1(a),Ie=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Wy(a.type,a.memoizedProps)),u=!u),u&&it&&li(a),m1(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=z_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=z_(a)}else s===27?(s=it,wi(a.type)?(a=rv,rv=null,it=a):it=s):it=Jt?yn(a.stateNode.nextSibling):null;return!0}function fs(){it=Jt=null,Ie=!1}function Dg(){var a=oi;return a!==null&&(kr===null?kr=a:kr.push.apply(kr,a),oi=null),a}function Ou(a){oi===null?oi=[a]:oi.push(a)}var kg=L(null),hs=null,ja=null;function ui(a,s,u){le(kg,s._currentValue),s._currentValue=u}function wa(a){a._currentValue=kg.current,X(kg)}function Lg(a,s,u){for(;a!==null;){var m=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,m!==null&&(m.childLanes|=s)):m!==null&&(m.childLanes&s)!==s&&(m.childLanes|=s),a===u)break;a=a.return}}function Ig(a,s,u,m){var v=a.child;for(v!==null&&(v.return=a);v!==null;){var j=v.dependencies;if(j!==null){var O=v.child;j=j.firstContext;e:for(;j!==null;){var P=j;j=v;for(var z=0;z<s.length;z++)if(P.context===s[z]){j.lanes|=u,P=j.alternate,P!==null&&(P.lanes|=u),Lg(j.return,u,a),m||(O=null);break e}j=P.next}}else if(v.tag===18){if(O=v.return,O===null)throw Error(n(341));O.lanes|=u,j=O.alternate,j!==null&&(j.lanes|=u),Lg(O,u,a),O=null}else O=v.child;if(O!==null)O.return=v;else for(O=v;O!==null;){if(O===a){O=null;break}if(v=O.sibling,v!==null){v.return=O.return,O=v;break}O=O.return}v=O}}function Bo(a,s,u,m){a=null;for(var v=s,j=!1;v!==null;){if(!j){if((v.flags&524288)!==0)j=!0;else if((v.flags&262144)!==0)break}if(v.tag===10){var O=v.alternate;if(O===null)throw Error(n(387));if(O=O.memoizedProps,O!==null){var P=v.type;Gr(v.pendingProps.value,O.value)||(a!==null?a.push(P):a=[P])}}else if(v===we.current){if(O=v.alternate,O===null)throw Error(n(387));O.memoizedState.memoizedState!==v.memoizedState.memoizedState&&(a!==null?a.push(Ju):a=[Ju])}v=v.return}a!==null&&Ig(s,a,u,m),s.flags|=262144}function af(a){for(a=a.firstContext;a!==null;){if(!Gr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ms(a){hs=a,ja=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function er(a){return p1(hs,a)}function sf(a,s){return hs===null&&ms(a),p1(a,s)}function p1(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},ja===null){if(a===null)throw Error(n(308));ja=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ja=ja.next=s;return u}var jI=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,m){a.push(m)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},wI=e.unstable_scheduleCallback,SI=e.unstable_NormalPriority,Ct={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $g(){return{controller:new jI,data:new Map,refCount:0}}function Eu(a){a.refCount--,a.refCount===0&&wI(SI,function(){a.controller.abort()})}var Au=null,zg=0,Uo=0,qo=null;function NI(a,s){if(Au===null){var u=Au=[];zg=0,Uo=qy(),qo={status:"pending",value:void 0,then:function(m){u.push(m)}}}return zg++,s.then(g1,g1),s}function g1(){if(--zg===0&&Au!==null){qo!==null&&(qo.status="fulfilled");var a=Au;Au=null,Uo=0,qo=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function _I(a,s){var u=[],m={status:"pending",value:null,reason:null,then:function(v){u.push(v)}};return a.then(function(){m.status="fulfilled",m.value=s;for(var v=0;v<u.length;v++)(0,u[v])(s)},function(v){for(m.status="rejected",m.reason=v,v=0;v<u.length;v++)(0,u[v])(void 0)}),m}var y1=k.S;k.S=function(a,s){e_=Ce(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&NI(a,s),y1!==null&&y1(a,s)};var ps=L(null);function Bg(){var a=ps.current;return a!==null?a:rt.pooledCache}function of(a,s){s===null?le(ps,ps.current):le(ps,s.pool)}function v1(){var a=Bg();return a===null?null:{parent:Ct._currentValue,pool:a}}var Ho=Error(n(460)),Ug=Error(n(474)),lf=Error(n(542)),uf={then:function(){}};function x1(a){return a=a.status,a==="fulfilled"||a==="rejected"}function b1(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(ya,ya),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,w1(a),a;default:if(typeof s.status=="string")s.then(ya,ya);else{if(a=rt,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=s,a.status="pending",a.then(function(m){if(s.status==="pending"){var v=s;v.status="fulfilled",v.value=m}},function(m){if(s.status==="pending"){var v=s;v.status="rejected",v.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,w1(a),a}throw ys=s,Ho}}function gs(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ys=u,Ho):u}}var ys=null;function j1(){if(ys===null)throw Error(n(459));var a=ys;return ys=null,a}function w1(a){if(a===Ho||a===lf)throw Error(n(483))}var Fo=null,Tu=0;function cf(a){var s=Tu;return Tu+=1,Fo===null&&(Fo=[]),b1(Fo,a,s)}function Cu(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function df(a,s){throw s.$$typeof===y?Error(n(525)):(a=Object.prototype.toString.call(s),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function S1(a){function s(K,B){if(a){var Y=K.deletions;Y===null?(K.deletions=[B],K.flags|=16):Y.push(B)}}function u(K,B){if(!a)return null;for(;B!==null;)s(K,B),B=B.sibling;return null}function m(K){for(var B=new Map;K!==null;)K.key!==null?B.set(K.key,K):B.set(K.index,K),K=K.sibling;return B}function v(K,B){return K=xa(K,B),K.index=0,K.sibling=null,K}function j(K,B,Y){return K.index=Y,a?(Y=K.alternate,Y!==null?(Y=Y.index,Y<B?(K.flags|=67108866,B):Y):(K.flags|=67108866,B)):(K.flags|=1048576,B)}function O(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function P(K,B,Y,ae){return B===null||B.tag!==6?(B=Tg(Y,K.mode,ae),B.return=K,B):(B=v(B,Y),B.return=K,B)}function z(K,B,Y,ae){var be=Y.type;return be===w?ne(K,B,Y.props.children,ae,Y.key):B!==null&&(B.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===M&&gs(be)===B.type)?(B=v(B,Y.props),Cu(B,Y),B.return=K,B):(B=rf(Y.type,Y.key,Y.props,null,K.mode,ae),Cu(B,Y),B.return=K,B)}function V(K,B,Y,ae){return B===null||B.tag!==4||B.stateNode.containerInfo!==Y.containerInfo||B.stateNode.implementation!==Y.implementation?(B=Cg(Y,K.mode,ae),B.return=K,B):(B=v(B,Y.children||[]),B.return=K,B)}function ne(K,B,Y,ae,be){return B===null||B.tag!==7?(B=ds(Y,K.mode,ae,be),B.return=K,B):(B=v(B,Y),B.return=K,B)}function se(K,B,Y){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=Tg(""+B,K.mode,Y),B.return=K,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case x:return Y=rf(B.type,B.key,B.props,null,K.mode,Y),Cu(Y,B),Y.return=K,Y;case b:return B=Cg(B,K.mode,Y),B.return=K,B;case M:return B=gs(B),se(K,B,Y)}if(G(B)||H(B))return B=ds(B,K.mode,Y,null),B.return=K,B;if(typeof B.then=="function")return se(K,cf(B),Y);if(B.$$typeof===T)return se(K,sf(K,B),Y);df(K,B)}return null}function W(K,B,Y,ae){var be=B!==null?B.key:null;if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return be!==null?null:P(K,B,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case x:return Y.key===be?z(K,B,Y,ae):null;case b:return Y.key===be?V(K,B,Y,ae):null;case M:return Y=gs(Y),W(K,B,Y,ae)}if(G(Y)||H(Y))return be!==null?null:ne(K,B,Y,ae,null);if(typeof Y.then=="function")return W(K,B,cf(Y),ae);if(Y.$$typeof===T)return W(K,B,sf(K,Y),ae);df(K,Y)}return null}function ee(K,B,Y,ae,be){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return K=K.get(Y)||null,P(B,K,""+ae,be);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case x:return K=K.get(ae.key===null?Y:ae.key)||null,z(B,K,ae,be);case b:return K=K.get(ae.key===null?Y:ae.key)||null,V(B,K,ae,be);case M:return ae=gs(ae),ee(K,B,Y,ae,be)}if(G(ae)||H(ae))return K=K.get(Y)||null,ne(B,K,ae,be,null);if(typeof ae.then=="function")return ee(K,B,Y,cf(ae),be);if(ae.$$typeof===T)return ee(K,B,Y,sf(B,ae),be);df(B,ae)}return null}function me(K,B,Y,ae){for(var be=null,qe=null,ye=B,Te=B=0,ke=null;ye!==null&&Te<Y.length;Te++){ye.index>Te?(ke=ye,ye=null):ke=ye.sibling;var He=W(K,ye,Y[Te],ae);if(He===null){ye===null&&(ye=ke);break}a&&ye&&He.alternate===null&&s(K,ye),B=j(He,B,Te),qe===null?be=He:qe.sibling=He,qe=He,ye=ke}if(Te===Y.length)return u(K,ye),Ie&&ba(K,Te),be;if(ye===null){for(;Te<Y.length;Te++)ye=se(K,Y[Te],ae),ye!==null&&(B=j(ye,B,Te),qe===null?be=ye:qe.sibling=ye,qe=ye);return Ie&&ba(K,Te),be}for(ye=m(ye);Te<Y.length;Te++)ke=ee(ye,K,Te,Y[Te],ae),ke!==null&&(a&&ke.alternate!==null&&ye.delete(ke.key===null?Te:ke.key),B=j(ke,B,Te),qe===null?be=ke:qe.sibling=ke,qe=ke);return a&&ye.forEach(function(Ei){return s(K,Ei)}),Ie&&ba(K,Te),be}function Se(K,B,Y,ae){if(Y==null)throw Error(n(151));for(var be=null,qe=null,ye=B,Te=B=0,ke=null,He=Y.next();ye!==null&&!He.done;Te++,He=Y.next()){ye.index>Te?(ke=ye,ye=null):ke=ye.sibling;var Ei=W(K,ye,He.value,ae);if(Ei===null){ye===null&&(ye=ke);break}a&&ye&&Ei.alternate===null&&s(K,ye),B=j(Ei,B,Te),qe===null?be=Ei:qe.sibling=Ei,qe=Ei,ye=ke}if(He.done)return u(K,ye),Ie&&ba(K,Te),be;if(ye===null){for(;!He.done;Te++,He=Y.next())He=se(K,He.value,ae),He!==null&&(B=j(He,B,Te),qe===null?be=He:qe.sibling=He,qe=He);return Ie&&ba(K,Te),be}for(ye=m(ye);!He.done;Te++,He=Y.next())He=ee(ye,K,Te,He.value,ae),He!==null&&(a&&He.alternate!==null&&ye.delete(He.key===null?Te:He.key),B=j(He,B,Te),qe===null?be=He:qe.sibling=He,qe=He);return a&&ye.forEach(function(L$){return s(K,L$)}),Ie&&ba(K,Te),be}function et(K,B,Y,ae){if(typeof Y=="object"&&Y!==null&&Y.type===w&&Y.key===null&&(Y=Y.props.children),typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case x:e:{for(var be=Y.key;B!==null;){if(B.key===be){if(be=Y.type,be===w){if(B.tag===7){u(K,B.sibling),ae=v(B,Y.props.children),ae.return=K,K=ae;break e}}else if(B.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===M&&gs(be)===B.type){u(K,B.sibling),ae=v(B,Y.props),Cu(ae,Y),ae.return=K,K=ae;break e}u(K,B);break}else s(K,B);B=B.sibling}Y.type===w?(ae=ds(Y.props.children,K.mode,ae,Y.key),ae.return=K,K=ae):(ae=rf(Y.type,Y.key,Y.props,null,K.mode,ae),Cu(ae,Y),ae.return=K,K=ae)}return O(K);case b:e:{for(be=Y.key;B!==null;){if(B.key===be)if(B.tag===4&&B.stateNode.containerInfo===Y.containerInfo&&B.stateNode.implementation===Y.implementation){u(K,B.sibling),ae=v(B,Y.children||[]),ae.return=K,K=ae;break e}else{u(K,B);break}else s(K,B);B=B.sibling}ae=Cg(Y,K.mode,ae),ae.return=K,K=ae}return O(K);case M:return Y=gs(Y),et(K,B,Y,ae)}if(G(Y))return me(K,B,Y,ae);if(H(Y)){if(be=H(Y),typeof be!="function")throw Error(n(150));return Y=be.call(Y),Se(K,B,Y,ae)}if(typeof Y.then=="function")return et(K,B,cf(Y),ae);if(Y.$$typeof===T)return et(K,B,sf(K,Y),ae);df(K,Y)}return typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint"?(Y=""+Y,B!==null&&B.tag===6?(u(K,B.sibling),ae=v(B,Y),ae.return=K,K=ae):(u(K,B),ae=Tg(Y,K.mode,ae),ae.return=K,K=ae),O(K)):u(K,B)}return function(K,B,Y,ae){try{Tu=0;var be=et(K,B,Y,ae);return Fo=null,be}catch(ye){if(ye===Ho||ye===lf)throw ye;var qe=Yr(29,ye,null,K.mode);return qe.lanes=ae,qe.return=K,qe}finally{}}}var vs=S1(!0),N1=S1(!1),ci=!1;function qg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hg(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 m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Ge&2)!==0){var v=m.pending;return v===null?s.next=s:(s.next=v.next,v.next=s),m.pending=s,s=tf(a),o1(a,null,u),s}return ef(a,m,s,u),tf(a)}function Pu(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,pS(a,u)}}function Fg(a,s){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var v=null,j=null;if(u=u.firstBaseUpdate,u!==null){do{var O={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};j===null?v=j=O:j=j.next=O,u=u.next}while(u!==null);j===null?v=j=s:j=j.next=s}else v=j=s;u={baseState:m.baseState,firstBaseUpdate:v,lastBaseUpdate:j,shared:m.shared,callbacks:m.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var Kg=!1;function Ru(){if(Kg){var a=qo;if(a!==null)throw a}}function Mu(a,s,u,m){Kg=!1;var v=a.updateQueue;ci=!1;var j=v.firstBaseUpdate,O=v.lastBaseUpdate,P=v.shared.pending;if(P!==null){v.shared.pending=null;var z=P,V=z.next;z.next=null,O===null?j=V:O.next=V,O=z;var ne=a.alternate;ne!==null&&(ne=ne.updateQueue,P=ne.lastBaseUpdate,P!==O&&(P===null?ne.firstBaseUpdate=V:P.next=V,ne.lastBaseUpdate=z))}if(j!==null){var se=v.baseState;O=0,ne=V=z=null,P=j;do{var W=P.lane&-536870913,ee=W!==P.lane;if(ee?(De&W)===W:(m&W)===W){W!==0&&W===Uo&&(Kg=!0),ne!==null&&(ne=ne.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var me=a,Se=P;W=s;var et=u;switch(Se.tag){case 1:if(me=Se.payload,typeof me=="function"){se=me.call(et,se,W);break e}se=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=Se.payload,W=typeof me=="function"?me.call(et,se,W):me,W==null)break e;se=g({},se,W);break e;case 2:ci=!0}}W=P.callback,W!==null&&(a.flags|=64,ee&&(a.flags|=8192),ee=v.callbacks,ee===null?v.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ne===null?(V=ne=ee,z=se):ne=ne.next=ee,O|=W;if(P=P.next,P===null){if(P=v.shared.pending,P===null)break;ee=P,P=ee.next,ee.next=null,v.lastBaseUpdate=ee,v.shared.pending=null}}while(!0);ne===null&&(z=se),v.baseState=z,v.firstBaseUpdate=V,v.lastBaseUpdate=ne,j===null&&(v.shared.lanes=0),yi|=O,a.lanes=O,a.memoizedState=se}}function _1(a,s){if(typeof a!="function")throw Error(n(191,a));a.call(s)}function O1(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)_1(u[a],s)}var Ko=L(null),ff=L(0);function E1(a,s){a=Pa,le(ff,a),le(Ko,s),Pa=a|s.baseLanes}function Gg(){le(ff,Pa),le(Ko,Ko.current)}function Yg(){Pa=ff.current,X(Ko),X(ff)}var Vr=L(null),gn=null;function hi(a){var s=a.alternate;le(wt,wt.current&1),le(Vr,a),gn===null&&(s===null||Ko.current!==null||s.memoizedState!==null)&&(gn=a)}function Vg(a){le(wt,wt.current),le(Vr,a),gn===null&&(gn=a)}function A1(a){a.tag===22?(le(wt,wt.current),le(Vr,a),gn===null&&(gn=a)):mi()}function mi(){le(wt,wt.current),le(Vr,Vr.current)}function Qr(a){X(Vr),gn===a&&(gn=null),X(wt)}var wt=L(0);function hf(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||ev(u)||tv(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 Sa=0,Ae=null,Ze=null,Pt=null,mf=!1,Go=!1,xs=!1,pf=0,Du=0,Yo=null,OI=0;function gt(){throw Error(n(321))}function Qg(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Gr(a[u],s[u]))return!1;return!0}function Xg(a,s,u,m,v,j){return Sa=j,Ae=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,k.H=a===null||a.memoizedState===null?dN:dy,xs=!1,j=u(m,v),xs=!1,Go&&(j=C1(s,u,m,v)),T1(a),j}function T1(a){k.H=Iu;var s=Ze!==null&&Ze.next!==null;if(Sa=0,Pt=Ze=Ae=null,mf=!1,Du=0,Yo=null,s)throw Error(n(300));a===null||Rt||(a=a.dependencies,a!==null&&af(a)&&(Rt=!0))}function C1(a,s,u,m){Ae=a;var v=0;do{if(Go&&(Yo=null),Du=0,Go=!1,25<=v)throw Error(n(301));if(v+=1,Pt=Ze=null,a.updateQueue!=null){var j=a.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}k.H=fN,j=s(u,m)}while(Go);return j}function EI(){var a=k.H,s=a.useState()[0];return s=typeof s.then=="function"?ku(s):s,a=a.useState()[0],(Ze!==null?Ze.memoizedState:null)!==a&&(Ae.flags|=1024),s}function Wg(){var a=pf!==0;return pf=0,a}function Zg(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function Jg(a){if(mf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}mf=!1}Sa=0,Pt=Ze=Ae=null,Go=!1,Du=pf=0,Yo=null}function wr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?Ae.memoizedState=Pt=a:Pt=Pt.next=a,Pt}function St(){if(Ze===null){var a=Ae.alternate;a=a!==null?a.memoizedState:null}else a=Ze.next;var s=Pt===null?Ae.memoizedState:Pt.next;if(s!==null)Pt=s,Ze=a;else{if(a===null)throw Ae.alternate===null?Error(n(467)):Error(n(310));Ze=a,a={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},Pt===null?Ae.memoizedState=Pt=a:Pt=Pt.next=a}return Pt}function gf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ku(a){var s=Du;return Du+=1,Yo===null&&(Yo=[]),a=b1(Yo,a,s),s=Ae,(Pt===null?s.memoizedState:Pt.next)===null&&(s=s.alternate,k.H=s===null||s.memoizedState===null?dN:dy),a}function yf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return ku(a);if(a.$$typeof===T)return er(a)}throw Error(n(438,String(a)))}function ey(a){var s=null,u=Ae.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var m=Ae.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(v){return v.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=gf(),Ae.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),m=0;m<a;m++)u[m]=I;return s.index++,u}function Na(a,s){return typeof s=="function"?s(a):s}function vf(a){var s=St();return ty(s,Ze,a)}function ty(a,s,u){var m=a.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=u;var v=a.baseQueue,j=m.pending;if(j!==null){if(v!==null){var O=v.next;v.next=j.next,j.next=O}s.baseQueue=v=j,m.pending=null}if(j=a.baseState,v===null)a.memoizedState=j;else{s=v.next;var P=O=null,z=null,V=s,ne=!1;do{var se=V.lane&-536870913;if(se!==V.lane?(De&se)===se:(Sa&se)===se){var W=V.revertLane;if(W===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),se===Uo&&(ne=!0);else if((Sa&W)===W){V=V.next,W===Uo&&(ne=!0);continue}else se={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},z===null?(P=z=se,O=j):z=z.next=se,Ae.lanes|=W,yi|=W;se=V.action,xs&&u(j,se),j=V.hasEagerState?V.eagerState:u(j,se)}else W={lane:se,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},z===null?(P=z=W,O=j):z=z.next=W,Ae.lanes|=se,yi|=se;V=V.next}while(V!==null&&V!==s);if(z===null?O=j:z.next=P,!Gr(j,a.memoizedState)&&(Rt=!0,ne&&(u=qo,u!==null)))throw u;a.memoizedState=j,a.baseState=O,a.baseQueue=z,m.lastRenderedState=j}return v===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function ry(a){var s=St(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=a;var m=u.dispatch,v=u.pending,j=s.memoizedState;if(v!==null){u.pending=null;var O=v=v.next;do j=a(j,O.action),O=O.next;while(O!==v);Gr(j,s.memoizedState)||(Rt=!0),s.memoizedState=j,s.baseQueue===null&&(s.baseState=j),u.lastRenderedState=j}return[j,m]}function P1(a,s,u){var m=Ae,v=St(),j=Ie;if(j){if(u===void 0)throw Error(n(407));u=u()}else u=s();var O=!Gr((Ze||v).memoizedState,u);if(O&&(v.memoizedState=u,Rt=!0),v=v.queue,iy(D1.bind(null,m,v,a),[a]),v.getSnapshot!==s||O||Pt!==null&&Pt.memoizedState.tag&1){if(m.flags|=2048,Vo(9,{destroy:void 0},M1.bind(null,m,v,u,s),null),rt===null)throw Error(n(349));j||(Sa&127)!==0||R1(m,s,u)}return u}function R1(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ae.updateQueue,s===null?(s=gf(),Ae.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function M1(a,s,u,m){s.value=u,s.getSnapshot=m,k1(s)&&L1(a)}function D1(a,s,u){return u(function(){k1(s)&&L1(a)})}function k1(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Gr(a,u)}catch{return!0}}function L1(a){var s=cs(a,2);s!==null&&Lr(s,a,2)}function ny(a){var s=wr();if(typeof a=="function"){var u=a;if(a=u(),xs){ni(!0);try{u()}finally{ni(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:a},s}function I1(a,s,u,m){return a.baseState=u,ty(a,Ze,typeof m=="function"?m:Na)}function AI(a,s,u,m,v){if(jf(a))throw Error(n(485));if(a=s.action,a!==null){var j={payload:v,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(O){j.listeners.push(O)}};k.T!==null?u(!0):j.isTransition=!1,m(j),u=s.pending,u===null?(j.next=s.pending=j,$1(s,j)):(j.next=u.next,s.pending=u.next=j)}}function $1(a,s){var u=s.action,m=s.payload,v=a.state;if(s.isTransition){var j=k.T,O={};k.T=O;try{var P=u(v,m),z=k.S;z!==null&&z(O,P),z1(a,s,P)}catch(V){ay(a,s,V)}finally{j!==null&&O.types!==null&&(j.types=O.types),k.T=j}}else try{j=u(v,m),z1(a,s,j)}catch(V){ay(a,s,V)}}function z1(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){B1(a,s,m)},function(m){return ay(a,s,m)}):B1(a,s,u)}function B1(a,s,u){s.status="fulfilled",s.value=u,U1(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,$1(a,u)))}function ay(a,s,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,U1(s),s=s.next;while(s!==m)}a.action=null}function U1(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function q1(a,s){return s}function H1(a,s){if(Ie){var u=rt.formState;if(u!==null){e:{var m=Ae;if(Ie){if(it){t:{for(var v=it,j=pn;v.nodeType!==8;){if(!j){v=null;break t}if(v=yn(v.nextSibling),v===null){v=null;break t}}j=v.data,v=j==="F!"||j==="F"?v:null}if(v){it=yn(v.nextSibling),m=v.data==="F!";break e}}li(m)}m=!1}m&&(s=u[0])}}return u=wr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:q1,lastRenderedState:s},u.queue=m,u=lN.bind(null,Ae,m),m.dispatch=u,m=ny(!1),j=cy.bind(null,Ae,!1,m.queue),m=wr(),v={state:s,dispatch:null,action:a,pending:null},m.queue=v,u=AI.bind(null,Ae,v,j,u),v.dispatch=u,m.memoizedState=a,[s,u,!1]}function F1(a){var s=St();return K1(s,Ze,a)}function K1(a,s,u){if(s=ty(a,s,q1)[0],a=vf(Na)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=ku(s)}catch(O){throw O===Ho?lf:O}else m=s;s=St();var v=s.queue,j=v.dispatch;return u!==s.memoizedState&&(Ae.flags|=2048,Vo(9,{destroy:void 0},TI.bind(null,v,u),null)),[m,j,a]}function TI(a,s){a.action=s}function G1(a){var s=St(),u=Ze;if(u!==null)return K1(s,u,a);St(),s=s.memoizedState,u=St();var m=u.queue.dispatch;return u.memoizedState=a,[s,m,!1]}function Vo(a,s,u,m){return a={tag:a,create:u,deps:m,inst:s,next:null},s=Ae.updateQueue,s===null&&(s=gf(),Ae.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(m=u.next,u.next=a,a.next=m,s.lastEffect=a),a}function Y1(){return St().memoizedState}function xf(a,s,u,m){var v=wr();Ae.flags|=a,v.memoizedState=Vo(1|s,{destroy:void 0},u,m===void 0?null:m)}function bf(a,s,u,m){var v=St();m=m===void 0?null:m;var j=v.memoizedState.inst;Ze!==null&&m!==null&&Qg(m,Ze.memoizedState.deps)?v.memoizedState=Vo(s,j,u,m):(Ae.flags|=a,v.memoizedState=Vo(1|s,j,u,m))}function V1(a,s){xf(8390656,8,a,s)}function iy(a,s){bf(2048,8,a,s)}function CI(a){Ae.flags|=4;var s=Ae.updateQueue;if(s===null)s=gf(),Ae.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function Q1(a){var s=St().memoizedState;return CI({ref:s,nextImpl:a}),function(){if((Ge&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function X1(a,s){return bf(4,2,a,s)}function W1(a,s){return bf(4,4,a,s)}function Z1(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 J1(a,s,u){u=u!=null?u.concat([a]):null,bf(4,4,Z1.bind(null,s,a),u)}function sy(){}function eN(a,s){var u=St();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&Qg(s,m[1])?m[0]:(u.memoizedState=[a,s],a)}function tN(a,s){var u=St();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&Qg(s,m[1]))return m[0];if(m=a(),xs){ni(!0);try{a()}finally{ni(!1)}}return u.memoizedState=[m,s],m}function oy(a,s,u){return u===void 0||(Sa&1073741824)!==0&&(De&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=r_(),Ae.lanes|=a,yi|=a,u)}function rN(a,s,u,m){return Gr(u,s)?u:Ko.current!==null?(a=oy(a,u,m),Gr(a,s)||(Rt=!0),a):(Sa&42)===0||(Sa&1073741824)!==0&&(De&261930)===0?(Rt=!0,a.memoizedState=u):(a=r_(),Ae.lanes|=a,yi|=a,s)}function nN(a,s,u,m,v){var j=q.p;q.p=j!==0&&8>j?j:8;var O=k.T,P={};k.T=P,cy(a,!1,s,u);try{var z=v(),V=k.S;if(V!==null&&V(P,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ne=_I(z,m);Lu(a,s,ne,Zr(a))}else Lu(a,s,m,Zr(a))}catch(se){Lu(a,s,{then:function(){},status:"rejected",reason:se},Zr())}finally{q.p=j,O!==null&&P.types!==null&&(O.types=P.types),k.T=O}}function PI(){}function ly(a,s,u,m){if(a.tag!==5)throw Error(n(476));var v=aN(a).queue;nN(a,v,s,J,u===null?PI:function(){return iN(a),u(m)})}function aN(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:J},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function iN(a){var s=aN(a);s.next===null&&(s=a.alternate.memoizedState),Lu(a,s.next.queue,{},Zr())}function uy(){return er(Ju)}function sN(){return St().memoizedState}function oN(){return St().memoizedState}function RI(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Zr();a=di(u);var m=fi(s,a,u);m!==null&&(Lr(m,s,u),Pu(m,s,u)),s={cache:$g()},a.payload=s;return}s=s.return}}function MI(a,s,u){var m=Zr();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},jf(a)?uN(s,u):(u=Eg(a,s,u,m),u!==null&&(Lr(u,a,m),cN(u,s,m)))}function lN(a,s,u){var m=Zr();Lu(a,s,u,m)}function Lu(a,s,u,m){var v={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(jf(a))uN(s,v);else{var j=a.alternate;if(a.lanes===0&&(j===null||j.lanes===0)&&(j=s.lastRenderedReducer,j!==null))try{var O=s.lastRenderedState,P=j(O,u);if(v.hasEagerState=!0,v.eagerState=P,Gr(P,O))return ef(a,s,v,0),rt===null&&Jd(),!1}catch{}finally{}if(u=Eg(a,s,v,m),u!==null)return Lr(u,a,m),cN(u,s,m),!0}return!1}function cy(a,s,u,m){if(m={lane:2,revertLane:qy(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},jf(a)){if(s)throw Error(n(479))}else s=Eg(a,u,m,2),s!==null&&Lr(s,a,2)}function jf(a){var s=a.alternate;return a===Ae||s!==null&&s===Ae}function uN(a,s){Go=mf=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function cN(a,s,u){if((u&4194048)!==0){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,pS(a,u)}}var Iu={readContext:er,use:yf,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Iu.useEffectEvent=gt;var dN={readContext:er,use:yf,useCallback:function(a,s){return wr().memoizedState=[a,s===void 0?null:s],a},useContext:er,useEffect:V1,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,xf(4194308,4,Z1.bind(null,s,a),u)},useLayoutEffect:function(a,s){return xf(4194308,4,a,s)},useInsertionEffect:function(a,s){xf(4,2,a,s)},useMemo:function(a,s){var u=wr();s=s===void 0?null:s;var m=a();if(xs){ni(!0);try{a()}finally{ni(!1)}}return u.memoizedState=[m,s],m},useReducer:function(a,s,u){var m=wr();if(u!==void 0){var v=u(s);if(xs){ni(!0);try{u(s)}finally{ni(!1)}}}else v=s;return m.memoizedState=m.baseState=v,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:v},m.queue=a,a=a.dispatch=MI.bind(null,Ae,a),[m.memoizedState,a]},useRef:function(a){var s=wr();return a={current:a},s.memoizedState=a},useState:function(a){a=ny(a);var s=a.queue,u=lN.bind(null,Ae,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:sy,useDeferredValue:function(a,s){var u=wr();return oy(u,a,s)},useTransition:function(){var a=ny(!1);return a=nN.bind(null,Ae,a.queue,!0,!1),wr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var m=Ae,v=wr();if(Ie){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),rt===null)throw Error(n(349));(De&127)!==0||R1(m,s,u)}v.memoizedState=u;var j={value:u,getSnapshot:s};return v.queue=j,V1(D1.bind(null,m,j,a),[a]),m.flags|=2048,Vo(9,{destroy:void 0},M1.bind(null,m,j,u,s),null),u},useId:function(){var a=wr(),s=rt.identifierPrefix;if(Ie){var u=Yn,m=Gn;u=(m&~(1<<32-Kr(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=pf++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=OI++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:uy,useFormState:H1,useActionState:H1,useOptimistic:function(a){var s=wr();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=cy.bind(null,Ae,!0,u),u.dispatch=s,[a,s]},useMemoCache:ey,useCacheRefresh:function(){return wr().memoizedState=RI.bind(null,Ae)},useEffectEvent:function(a){var s=wr(),u={impl:a};return s.memoizedState=u,function(){if((Ge&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},dy={readContext:er,use:yf,useCallback:eN,useContext:er,useEffect:iy,useImperativeHandle:J1,useInsertionEffect:X1,useLayoutEffect:W1,useMemo:tN,useReducer:vf,useRef:Y1,useState:function(){return vf(Na)},useDebugValue:sy,useDeferredValue:function(a,s){var u=St();return rN(u,Ze.memoizedState,a,s)},useTransition:function(){var a=vf(Na)[0],s=St().memoizedState;return[typeof a=="boolean"?a:ku(a),s]},useSyncExternalStore:P1,useId:sN,useHostTransitionStatus:uy,useFormState:F1,useActionState:F1,useOptimistic:function(a,s){var u=St();return I1(u,Ze,a,s)},useMemoCache:ey,useCacheRefresh:oN};dy.useEffectEvent=Q1;var fN={readContext:er,use:yf,useCallback:eN,useContext:er,useEffect:iy,useImperativeHandle:J1,useInsertionEffect:X1,useLayoutEffect:W1,useMemo:tN,useReducer:ry,useRef:Y1,useState:function(){return ry(Na)},useDebugValue:sy,useDeferredValue:function(a,s){var u=St();return Ze===null?oy(u,a,s):rN(u,Ze.memoizedState,a,s)},useTransition:function(){var a=ry(Na)[0],s=St().memoizedState;return[typeof a=="boolean"?a:ku(a),s]},useSyncExternalStore:P1,useId:sN,useHostTransitionStatus:uy,useFormState:G1,useActionState:G1,useOptimistic:function(a,s){var u=St();return Ze!==null?I1(u,Ze,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:ey,useCacheRefresh:oN};fN.useEffectEvent=Q1;function fy(a,s,u,m){s=a.memoizedState,u=u(m,s),u=u==null?s:g({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var hy={enqueueSetState:function(a,s,u){a=a._reactInternals;var m=Zr(),v=di(m);v.payload=s,u!=null&&(v.callback=u),s=fi(a,v,m),s!==null&&(Lr(s,a,m),Pu(s,a,m))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var m=Zr(),v=di(m);v.tag=1,v.payload=s,u!=null&&(v.callback=u),s=fi(a,v,m),s!==null&&(Lr(s,a,m),Pu(s,a,m))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Zr(),m=di(u);m.tag=2,s!=null&&(m.callback=s),s=fi(a,m,u),s!==null&&(Lr(s,a,u),Pu(s,a,u))}};function hN(a,s,u,m,v,j,O){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,j,O):s.prototype&&s.prototype.isPureReactComponent?!Su(u,m)||!Su(v,j):!0}function mN(a,s,u,m){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,m),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,m),s.state!==a&&hy.enqueueReplaceState(s,s.state,null)}function bs(a,s){var u=s;if("ref"in s){u={};for(var m in s)m!=="ref"&&(u[m]=s[m])}if(a=a.defaultProps){u===s&&(u=g({},u));for(var v in a)u[v]===void 0&&(u[v]=a[v])}return u}function pN(a){Zd(a)}function gN(a){console.error(a)}function yN(a){Zd(a)}function wf(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function vN(a,s,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(v){setTimeout(function(){throw v})}}function my(a,s,u){return u=di(u),u.tag=3,u.payload={element:null},u.callback=function(){wf(a,s)},u}function xN(a){return a=di(a),a.tag=3,a}function bN(a,s,u,m){var v=u.type.getDerivedStateFromError;if(typeof v=="function"){var j=m.value;a.payload=function(){return v(j)},a.callback=function(){vN(s,u,m)}}var O=u.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(a.callback=function(){vN(s,u,m),typeof v!="function"&&(vi===null?vi=new Set([this]):vi.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function DI(a,s,u,m,v){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&Bo(s,u,v,!0),u=Vr.current,u!==null){switch(u.tag){case 31:case 13:return gn===null?Df():u.alternate===null&&yt===0&&(yt=3),u.flags&=-257,u.flags|=65536,u.lanes=v,m===uf?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),zy(a,m,v)),!1;case 22:return u.flags|=65536,m===uf?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([m])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([m]):u.add(m)),zy(a,m,v)),!1}throw Error(n(435,u.tag))}return zy(a,m,v),Df(),!1}if(Ie)return s=Vr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=v,m!==Mg&&(a=Error(n(422),{cause:m}),Ou(fn(a,u)))):(m!==Mg&&(s=Error(n(423),{cause:m}),Ou(fn(s,u))),a=a.current.alternate,a.flags|=65536,v&=-v,a.lanes|=v,m=fn(m,u),v=my(a.stateNode,m,v),Fg(a,v),yt!==4&&(yt=2)),!1;var j=Error(n(520),{cause:m});if(j=fn(j,u),Ku===null?Ku=[j]:Ku.push(j),yt!==4&&(yt=2),s===null)return!0;m=fn(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=v&-v,u.lanes|=a,a=my(u.stateNode,m,a),Fg(u,a),!1;case 1:if(s=u.type,j=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||j!==null&&typeof j.componentDidCatch=="function"&&(vi===null||!vi.has(j))))return u.flags|=65536,v&=-v,u.lanes|=v,v=xN(v),bN(v,a,u,m),Fg(u,v),!1}u=u.return}while(u!==null);return!1}var py=Error(n(461)),Rt=!1;function tr(a,s,u,m){s.child=a===null?N1(s,null,u,m):vs(s,a.child,u,m)}function jN(a,s,u,m,v){u=u.render;var j=s.ref;if("ref"in m){var O={};for(var P in m)P!=="ref"&&(O[P]=m[P])}else O=m;return ms(s),m=Xg(a,s,u,O,j,v),P=Wg(),a!==null&&!Rt?(Zg(a,s,v),_a(a,s,v)):(Ie&&P&&Pg(s),s.flags|=1,tr(a,s,m,v),s.child)}function wN(a,s,u,m,v){if(a===null){var j=u.type;return typeof j=="function"&&!Ag(j)&&j.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=j,SN(a,s,j,m,v)):(a=rf(u.type,null,m,s,s.mode,v),a.ref=s.ref,a.return=s,s.child=a)}if(j=a.child,!Sy(a,v)){var O=j.memoizedProps;if(u=u.compare,u=u!==null?u:Su,u(O,m)&&a.ref===s.ref)return _a(a,s,v)}return s.flags|=1,a=xa(j,m),a.ref=s.ref,a.return=s,s.child=a}function SN(a,s,u,m,v){if(a!==null){var j=a.memoizedProps;if(Su(j,m)&&a.ref===s.ref)if(Rt=!1,s.pendingProps=m=j,Sy(a,v))(a.flags&131072)!==0&&(Rt=!0);else return s.lanes=a.lanes,_a(a,s,v)}return gy(a,s,u,m,v)}function NN(a,s,u,m){var v=m.children,j=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((s.flags&128)!==0){if(j=j!==null?j.baseLanes|u:u,a!==null){for(m=s.child=a.child,v=0;m!==null;)v=v|m.lanes|m.childLanes,m=m.sibling;m=v&~j}else m=0,s.child=null;return _N(a,s,j,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&of(s,j!==null?j.cachePool:null),j!==null?E1(s,j):Gg(),A1(s);else return m=s.lanes=536870912,_N(a,s,j!==null?j.baseLanes|u:u,u,m)}else j!==null?(of(s,j.cachePool),E1(s,j),mi(),s.memoizedState=null):(a!==null&&of(s,null),Gg(),mi());return tr(a,s,v,u),s.child}function $u(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function _N(a,s,u,m,v){var j=Bg();return j=j===null?null:{parent:Ct._currentValue,pool:j},s.memoizedState={baseLanes:u,cachePool:j},a!==null&&of(s,null),Gg(),A1(s),a!==null&&Bo(a,s,m,!0),s.childLanes=v,null}function Sf(a,s){return s=_f({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function ON(a,s,u){return vs(s,a.child,null,u),a=Sf(s,s.pendingProps),a.flags|=2,Qr(s),s.memoizedState=null,a}function kI(a,s,u){var m=s.pendingProps,v=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Ie){if(m.mode==="hidden")return a=Sf(s,m),s.lanes=536870912,$u(null,a);if(Vg(s),(a=it)?(a=$_(a,pn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:si!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=u1(a),u.return=s,s.child=u,Jt=s,it=null)):a=null,a===null)throw li(s);return s.lanes=536870912,null}return Sf(s,m)}var j=a.memoizedState;if(j!==null){var O=j.dehydrated;if(Vg(s),v)if(s.flags&256)s.flags&=-257,s=ON(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(n(558));else if(Rt||Bo(a,s,u,!1),v=(u&a.childLanes)!==0,Rt||v){if(m=rt,m!==null&&(O=gS(m,u),O!==0&&O!==j.retryLane))throw j.retryLane=O,cs(a,O),Lr(m,a,O),py;Df(),s=ON(a,s,u)}else a=j.treeContext,it=yn(O.nextSibling),Jt=s,Ie=!0,oi=null,pn=!1,a!==null&&f1(s,a),s=Sf(s,m),s.flags|=4096;return s}return a=xa(a.child,{mode:m.mode,children:m.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Nf(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 gy(a,s,u,m,v){return ms(s),u=Xg(a,s,u,m,void 0,v),m=Wg(),a!==null&&!Rt?(Zg(a,s,v),_a(a,s,v)):(Ie&&m&&Pg(s),s.flags|=1,tr(a,s,u,v),s.child)}function EN(a,s,u,m,v,j){return ms(s),s.updateQueue=null,u=C1(s,m,u,v),T1(a),m=Wg(),a!==null&&!Rt?(Zg(a,s,j),_a(a,s,j)):(Ie&&m&&Pg(s),s.flags|=1,tr(a,s,u,j),s.child)}function AN(a,s,u,m,v){if(ms(s),s.stateNode===null){var j=Lo,O=u.contextType;typeof O=="object"&&O!==null&&(j=er(O)),j=new u(m,j),s.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=hy,s.stateNode=j,j._reactInternals=s,j=s.stateNode,j.props=m,j.state=s.memoizedState,j.refs={},qg(s),O=u.contextType,j.context=typeof O=="object"&&O!==null?er(O):Lo,j.state=s.memoizedState,O=u.getDerivedStateFromProps,typeof O=="function"&&(fy(s,u,O,m),j.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof j.getSnapshotBeforeUpdate=="function"||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(O=j.state,typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount(),O!==j.state&&hy.enqueueReplaceState(j,j.state,null),Mu(s,m,j,v),Ru(),j.state=s.memoizedState),typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(a===null){j=s.stateNode;var P=s.memoizedProps,z=bs(u,P);j.props=z;var V=j.context,ne=u.contextType;O=Lo,typeof ne=="object"&&ne!==null&&(O=er(ne));var se=u.getDerivedStateFromProps;ne=typeof se=="function"||typeof j.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,ne||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(P||V!==O)&&mN(s,j,m,O),ci=!1;var W=s.memoizedState;j.state=W,Mu(s,m,j,v),Ru(),V=s.memoizedState,P||W!==V||ci?(typeof se=="function"&&(fy(s,u,se,m),V=s.memoizedState),(z=ci||hN(s,u,z,m,W,V,O))?(ne||typeof j.UNSAFE_componentWillMount!="function"&&typeof j.componentWillMount!="function"||(typeof j.componentWillMount=="function"&&j.componentWillMount(),typeof j.UNSAFE_componentWillMount=="function"&&j.UNSAFE_componentWillMount()),typeof j.componentDidMount=="function"&&(s.flags|=4194308)):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=V),j.props=m,j.state=V,j.context=O,m=z):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{j=s.stateNode,Hg(a,s),O=s.memoizedProps,ne=bs(u,O),j.props=ne,se=s.pendingProps,W=j.context,V=u.contextType,z=Lo,typeof V=="object"&&V!==null&&(z=er(V)),P=u.getDerivedStateFromProps,(V=typeof P=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(O!==se||W!==z)&&mN(s,j,m,z),ci=!1,W=s.memoizedState,j.state=W,Mu(s,m,j,v),Ru();var ee=s.memoizedState;O!==se||W!==ee||ci||a!==null&&a.dependencies!==null&&af(a.dependencies)?(typeof P=="function"&&(fy(s,u,P,m),ee=s.memoizedState),(ne=ci||hN(s,u,ne,m,W,ee,z)||a!==null&&a.dependencies!==null&&af(a.dependencies))?(V||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(m,ee,z),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(m,ee,z)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||O===a.memoizedProps&&W===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&W===a.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=ee),j.props=m,j.state=ee,j.context=z,m=ne):(typeof j.componentDidUpdate!="function"||O===a.memoizedProps&&W===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&W===a.memoizedState||(s.flags|=1024),m=!1)}return j=m,Nf(a,s),m=(s.flags&128)!==0,j||m?(j=s.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:j.render(),s.flags|=1,a!==null&&m?(s.child=vs(s,a.child,null,v),s.child=vs(s,null,u,v)):tr(a,s,u,v),s.memoizedState=j.state,a=s.child):a=_a(a,s,v),a}function TN(a,s,u,m){return fs(),s.flags|=256,tr(a,s,u,m),s.child}var yy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vy(a){return{baseLanes:a,cachePool:v1()}}function xy(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Wr),a}function CN(a,s,u){var m=s.pendingProps,v=!1,j=(s.flags&128)!==0,O;if((O=j)||(O=a!==null&&a.memoizedState===null?!1:(wt.current&2)!==0),O&&(v=!0,s.flags&=-129),O=(s.flags&32)!==0,s.flags&=-33,a===null){if(Ie){if(v?hi(s):mi(),(a=it)?(a=$_(a,pn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:si!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=u1(a),u.return=s,s.child=u,Jt=s,it=null)):a=null,a===null)throw li(s);return tv(a)?s.lanes=32:s.lanes=536870912,null}var P=m.children;return m=m.fallback,v?(mi(),v=s.mode,P=_f({mode:"hidden",children:P},v),m=ds(m,v,u,null),P.return=s,m.return=s,P.sibling=m,s.child=P,m=s.child,m.memoizedState=vy(u),m.childLanes=xy(a,O,u),s.memoizedState=yy,$u(null,m)):(hi(s),by(s,P))}var z=a.memoizedState;if(z!==null&&(P=z.dehydrated,P!==null)){if(j)s.flags&256?(hi(s),s.flags&=-257,s=jy(a,s,u)):s.memoizedState!==null?(mi(),s.child=a.child,s.flags|=128,s=null):(mi(),P=m.fallback,v=s.mode,m=_f({mode:"visible",children:m.children},v),P=ds(P,v,u,null),P.flags|=2,m.return=s,P.return=s,m.sibling=P,s.child=m,vs(s,a.child,null,u),m=s.child,m.memoizedState=vy(u),m.childLanes=xy(a,O,u),s.memoizedState=yy,s=$u(null,m));else if(hi(s),tv(P)){if(O=P.nextSibling&&P.nextSibling.dataset,O)var V=O.dgst;O=V,m=Error(n(419)),m.stack="",m.digest=O,Ou({value:m,source:null,stack:null}),s=jy(a,s,u)}else if(Rt||Bo(a,s,u,!1),O=(u&a.childLanes)!==0,Rt||O){if(O=rt,O!==null&&(m=gS(O,u),m!==0&&m!==z.retryLane))throw z.retryLane=m,cs(a,m),Lr(O,a,m),py;ev(P)||Df(),s=jy(a,s,u)}else ev(P)?(s.flags|=192,s.child=a.child,s=null):(a=z.treeContext,it=yn(P.nextSibling),Jt=s,Ie=!0,oi=null,pn=!1,a!==null&&f1(s,a),s=by(s,m.children),s.flags|=4096);return s}return v?(mi(),P=m.fallback,v=s.mode,z=a.child,V=z.sibling,m=xa(z,{mode:"hidden",children:m.children}),m.subtreeFlags=z.subtreeFlags&65011712,V!==null?P=xa(V,P):(P=ds(P,v,u,null),P.flags|=2),P.return=s,m.return=s,m.sibling=P,s.child=m,$u(null,m),m=s.child,P=a.child.memoizedState,P===null?P=vy(u):(v=P.cachePool,v!==null?(z=Ct._currentValue,v=v.parent!==z?{parent:z,pool:z}:v):v=v1(),P={baseLanes:P.baseLanes|u,cachePool:v}),m.memoizedState=P,m.childLanes=xy(a,O,u),s.memoizedState=yy,$u(a.child,m)):(hi(s),u=a.child,a=u.sibling,u=xa(u,{mode:"visible",children:m.children}),u.return=s,u.sibling=null,a!==null&&(O=s.deletions,O===null?(s.deletions=[a],s.flags|=16):O.push(a)),s.child=u,s.memoizedState=null,u)}function by(a,s){return s=_f({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function _f(a,s){return a=Yr(22,a,null,s),a.lanes=0,a}function jy(a,s,u){return vs(s,a.child,null,u),a=by(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function PN(a,s,u){a.lanes|=s;var m=a.alternate;m!==null&&(m.lanes|=s),Lg(a.return,s,u)}function wy(a,s,u,m,v,j){var O=a.memoizedState;O===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:v,treeForkCount:j}:(O.isBackwards=s,O.rendering=null,O.renderingStartTime=0,O.last=m,O.tail=u,O.tailMode=v,O.treeForkCount=j)}function RN(a,s,u){var m=s.pendingProps,v=m.revealOrder,j=m.tail;m=m.children;var O=wt.current,P=(O&2)!==0;if(P?(O=O&1|2,s.flags|=128):O&=1,le(wt,O),tr(a,s,m,u),m=Ie?_u:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&PN(a,u,s);else if(a.tag===19)PN(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(v){case"forwards":for(u=s.child,v=null;u!==null;)a=u.alternate,a!==null&&hf(a)===null&&(v=u),u=u.sibling;u=v,u===null?(v=s.child,s.child=null):(v=u.sibling,u.sibling=null),wy(s,!1,v,u,j,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,v=s.child,s.child=null;v!==null;){if(a=v.alternate,a!==null&&hf(a)===null){s.child=v;break}a=v.sibling,v.sibling=u,u=v,v=a}wy(s,!0,u,null,j,m);break;case"together":wy(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function _a(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),yi|=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=xa(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=xa(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function Sy(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&af(a)))}function LI(a,s,u){switch(s.tag){case 3:_e(s,s.stateNode.containerInfo),ui(s,Ct,a.memoizedState.cache),fs();break;case 27:case 5:te(s);break;case 4:_e(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,Vg(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(hi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?CN(a,s,u):(hi(s),a=_a(a,s,u),a!==null?a.sibling:null);hi(s);break;case 19:var v=(a.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(Bo(a,s,u,!1),m=(u&s.childLanes)!==0),v){if(m)return RN(a,s,u);s.flags|=128}if(v=s.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),le(wt,wt.current),m)break;return null;case 22:return s.lanes=0,NN(a,s,u,s.pendingProps);case 24:ui(s,Ct,a.memoizedState.cache)}return _a(a,s,u)}function MN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Rt=!0;else{if(!Sy(a,u)&&(s.flags&128)===0)return Rt=!1,LI(a,s,u);Rt=(a.flags&131072)!==0}else Rt=!1,Ie&&(s.flags&1048576)!==0&&d1(s,_u,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(a=gs(s.elementType),s.type=a,typeof a=="function")Ag(a)?(m=bs(a,m),s.tag=1,s=AN(null,s,a,m,u)):(s.tag=0,s=gy(null,s,a,m,u));else{if(a!=null){var v=a.$$typeof;if(v===A){s.tag=11,s=jN(null,s,a,m,u);break e}else if(v===D){s.tag=14,s=wN(null,s,a,m,u);break e}}throw s=Z(a)||a,Error(n(306,s,""))}}return s;case 0:return gy(a,s,s.type,s.pendingProps,u);case 1:return m=s.type,v=bs(m,s.pendingProps),AN(a,s,m,v,u);case 3:e:{if(_e(s,s.stateNode.containerInfo),a===null)throw Error(n(387));m=s.pendingProps;var j=s.memoizedState;v=j.element,Hg(a,s),Mu(s,m,null,u);var O=s.memoizedState;if(m=O.cache,ui(s,Ct,m),m!==j.cache&&Ig(s,[Ct],u,!0),Ru(),m=O.element,j.isDehydrated)if(j={element:m,isDehydrated:!1,cache:O.cache},s.updateQueue.baseState=j,s.memoizedState=j,s.flags&256){s=TN(a,s,m,u);break e}else if(m!==v){v=fn(Error(n(424)),s),Ou(v),s=TN(a,s,m,u);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(it=yn(a.firstChild),Jt=s,Ie=!0,oi=null,pn=!0,u=N1(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(fs(),m===v){s=_a(a,s,u);break e}tr(a,s,m,u)}s=s.child}return s;case 26:return Nf(a,s),a===null?(u=F_(s.type,null,s.pendingProps,null))?s.memoizedState=u:Ie||(u=s.type,a=s.pendingProps,m=Uf(xe.current).createElement(u),m[Zt]=s,m[Cr]=a,rr(m,u,a),qt(m),s.stateNode=m):s.memoizedState=F_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return te(s),a===null&&Ie&&(m=s.stateNode=U_(s.type,s.pendingProps,xe.current),Jt=s,pn=!0,v=it,wi(s.type)?(rv=v,it=yn(m.firstChild)):it=v),tr(a,s,s.pendingProps.children,u),Nf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Ie&&((v=m=it)&&(m=f$(m,s.type,s.pendingProps,pn),m!==null?(s.stateNode=m,Jt=s,it=yn(m.firstChild),pn=!1,v=!0):v=!1),v||li(s)),te(s),v=s.type,j=s.pendingProps,O=a!==null?a.memoizedProps:null,m=j.children,Wy(v,j)?m=null:O!==null&&Wy(v,O)&&(s.flags|=32),s.memoizedState!==null&&(v=Xg(a,s,EI,null,null,u),Ju._currentValue=v),Nf(a,s),tr(a,s,m,u),s.child;case 6:return a===null&&Ie&&((a=u=it)&&(u=h$(u,s.pendingProps,pn),u!==null?(s.stateNode=u,Jt=s,it=null,a=!0):a=!1),a||li(s)),null;case 13:return CN(a,s,u);case 4:return _e(s,s.stateNode.containerInfo),m=s.pendingProps,a===null?s.child=vs(s,null,m,u):tr(a,s,m,u),s.child;case 11:return jN(a,s,s.type,s.pendingProps,u);case 7:return tr(a,s,s.pendingProps,u),s.child;case 8:return tr(a,s,s.pendingProps.children,u),s.child;case 12:return tr(a,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,ui(s,s.type,m.value),tr(a,s,m.children,u),s.child;case 9:return v=s.type._context,m=s.pendingProps.children,ms(s),v=er(v),m=m(v),s.flags|=1,tr(a,s,m,u),s.child;case 14:return wN(a,s,s.type,s.pendingProps,u);case 15:return SN(a,s,s.type,s.pendingProps,u);case 19:return RN(a,s,u);case 31:return kI(a,s,u);case 22:return NN(a,s,u,s.pendingProps);case 24:return ms(s),m=er(Ct),a===null?(v=Bg(),v===null&&(v=rt,j=$g(),v.pooledCache=j,j.refCount++,j!==null&&(v.pooledCacheLanes|=u),v=j),s.memoizedState={parent:m,cache:v},qg(s),ui(s,Ct,v)):((a.lanes&u)!==0&&(Hg(a,s),Mu(s,null,null,u),Ru()),v=a.memoizedState,j=s.memoizedState,v.parent!==m?(v={parent:m,cache:m},s.memoizedState=v,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=v),ui(s,Ct,m)):(m=j.cache,ui(s,Ct,m),m!==v.cache&&Ig(s,[Ct],u,!0))),tr(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(n(156,s.tag))}function Oa(a){a.flags|=4}function Ny(a,s,u,m,v){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(v&335544128)===v)if(a.stateNode.complete)a.flags|=8192;else if(s_())a.flags|=8192;else throw ys=uf,Ug}else a.flags&=-16777217}function DN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!Q_(s))if(s_())a.flags|=8192;else throw ys=uf,Ug}function Of(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?hS():536870912,a.lanes|=s,Zo|=s)}function zu(a,s){if(!Ie)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function st(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(s)for(var v=a.child;v!==null;)u|=v.lanes|v.childLanes,m|=v.subtreeFlags&65011712,m|=v.flags&65011712,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)u|=v.lanes|v.childLanes,m|=v.subtreeFlags,m|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=m,a.childLanes=u,s}function II(a,s,u){var m=s.pendingProps;switch(Rg(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(s),null;case 1:return st(s),null;case 3:return u=s.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),wa(Ct),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(zo(s)?Oa(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Dg())),st(s),null;case 26:var v=s.type,j=s.memoizedState;return a===null?(Oa(s),j!==null?(st(s),DN(s,j)):(st(s),Ny(s,v,null,m,u))):j?j!==a.memoizedState?(Oa(s),st(s),DN(s,j)):(st(s),s.flags&=-16777217):(a=a.memoizedProps,a!==m&&Oa(s),st(s),Ny(s,v,a,m,u)),null;case 27:if(je(s),u=xe.current,v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return st(s),null}a=ue.current,zo(s)?h1(s):(a=U_(v,m,u),s.stateNode=a,Oa(s))}return st(s),null;case 5:if(je(s),v=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return st(s),null}if(j=ue.current,zo(s))h1(s);else{var O=Uf(xe.current);switch(j){case 1:j=O.createElementNS("http://www.w3.org/2000/svg",v);break;case 2:j=O.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;default:switch(v){case"svg":j=O.createElementNS("http://www.w3.org/2000/svg",v);break;case"math":j=O.createElementNS("http://www.w3.org/1998/Math/MathML",v);break;case"script":j=O.createElement("div"),j.innerHTML="<script><\/script>",j=j.removeChild(j.firstChild);break;case"select":j=typeof m.is=="string"?O.createElement("select",{is:m.is}):O.createElement("select"),m.multiple?j.multiple=!0:m.size&&(j.size=m.size);break;default:j=typeof m.is=="string"?O.createElement(v,{is:m.is}):O.createElement(v)}}j[Zt]=s,j[Cr]=m;e:for(O=s.child;O!==null;){if(O.tag===5||O.tag===6)j.appendChild(O.stateNode);else if(O.tag!==4&&O.tag!==27&&O.child!==null){O.child.return=O,O=O.child;continue}if(O===s)break e;for(;O.sibling===null;){if(O.return===null||O.return===s)break e;O=O.return}O.sibling.return=O.return,O=O.sibling}s.stateNode=j;e:switch(rr(j,v,m),v){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Oa(s)}}return st(s),Ny(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==m&&Oa(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(a=xe.current,zo(s)){if(a=s.stateNode,u=s.memoizedProps,m=null,v=Jt,v!==null)switch(v.tag){case 27:case 5:m=v.memoizedProps}a[Zt]=s,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||C_(a.nodeValue,u)),a||li(s,!0)}else a=Uf(a).createTextNode(m),a[Zt]=s,s.stateNode=a}return st(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(m=zo(s),u!==null){if(a===null){if(!m)throw Error(n(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(557));a[Zt]=s}else fs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),a=!1}else u=Dg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Qr(s),s):(Qr(s),null);if((s.flags&128)!==0)throw Error(n(558))}return st(s),null;case 13:if(m=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(v=zo(s),m!==null&&m.dehydrated!==null){if(a===null){if(!v)throw Error(n(318));if(v=s.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(n(317));v[Zt]=s}else fs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),v=!1}else v=Dg(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=v),v=!0;if(!v)return s.flags&256?(Qr(s),s):(Qr(s),null)}return Qr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=s.child,v=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(v=m.alternate.memoizedState.cachePool.pool),j=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(j=m.memoizedState.cachePool.pool),j!==v&&(m.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),Of(s,s.updateQueue),st(s),null);case 4:return de(),a===null&&Gy(s.stateNode.containerInfo),st(s),null;case 10:return wa(s.type),st(s),null;case 19:if(X(wt),m=s.memoizedState,m===null)return st(s),null;if(v=(s.flags&128)!==0,j=m.rendering,j===null)if(v)zu(m,!1);else{if(yt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(j=hf(a),j!==null){for(s.flags|=128,zu(m,!1),a=j.updateQueue,s.updateQueue=a,Of(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)l1(u,a),u=u.sibling;return le(wt,wt.current&1|2),Ie&&ba(s,m.treeForkCount),s.child}a=a.sibling}m.tail!==null&&Ce()>Pf&&(s.flags|=128,v=!0,zu(m,!1),s.lanes=4194304)}else{if(!v)if(a=hf(j),a!==null){if(s.flags|=128,v=!0,a=a.updateQueue,s.updateQueue=a,Of(s,a),zu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!j.alternate&&!Ie)return st(s),null}else 2*Ce()-m.renderingStartTime>Pf&&u!==536870912&&(s.flags|=128,v=!0,zu(m,!1),s.lanes=4194304);m.isBackwards?(j.sibling=s.child,s.child=j):(a=m.last,a!==null?a.sibling=j:s.child=j,m.last=j)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=Ce(),a.sibling=null,u=wt.current,le(wt,v?u&1|2:u&1),Ie&&ba(s,m.treeForkCount),a):(st(s),null);case 22:case 23:return Qr(s),Yg(),m=s.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(u&536870912)!==0&&(s.flags&128)===0&&(st(s),s.subtreeFlags&6&&(s.flags|=8192)):st(s),u=s.updateQueue,u!==null&&Of(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),m=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(m=s.memoizedState.cachePool.pool),m!==u&&(s.flags|=2048),a!==null&&X(ps),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),wa(Ct),st(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function $I(a,s){switch(Rg(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return wa(Ct),de(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return je(s),null;case 31:if(s.memoizedState!==null){if(Qr(s),s.alternate===null)throw Error(n(340));fs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Qr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(n(340));fs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return X(wt),null;case 4:return de(),null;case 10:return wa(s.type),null;case 22:case 23:return Qr(s),Yg(),a!==null&&X(ps),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return wa(Ct),null;case 25:return null;default:return null}}function kN(a,s){switch(Rg(s),s.tag){case 3:wa(Ct),de();break;case 26:case 27:case 5:je(s);break;case 4:de();break;case 31:s.memoizedState!==null&&Qr(s);break;case 13:Qr(s);break;case 19:X(wt);break;case 10:wa(s.type);break;case 22:case 23:Qr(s),Yg(),a!==null&&X(ps);break;case 24:wa(Ct)}}function Bu(a,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var v=m.next;u=v;do{if((u.tag&a)===a){m=void 0;var j=u.create,O=u.inst;m=j(),O.destroy=m}u=u.next}while(u!==v)}}catch(P){Qe(s,s.return,P)}}function pi(a,s,u){try{var m=s.updateQueue,v=m!==null?m.lastEffect:null;if(v!==null){var j=v.next;m=j;do{if((m.tag&a)===a){var O=m.inst,P=O.destroy;if(P!==void 0){O.destroy=void 0,v=s;var z=u,V=P;try{V()}catch(ne){Qe(v,z,ne)}}}m=m.next}while(m!==j)}}catch(ne){Qe(s,s.return,ne)}}function LN(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{O1(s,u)}catch(m){Qe(a,a.return,m)}}}function IN(a,s,u){u.props=bs(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){Qe(a,s,m)}}function Uu(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof u=="function"?a.refCleanup=u(m):u.current=m}}catch(v){Qe(a,s,v)}}function Vn(a,s){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(v){Qe(a,s,v)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(v){Qe(a,s,v)}else u.current=null}function $N(a){var s=a.type,u=a.memoizedProps,m=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(v){Qe(a,a.return,v)}}function _y(a,s,u){try{var m=a.stateNode;s$(m,a.type,u,s),m[Cr]=s}catch(v){Qe(a,a.return,v)}}function zN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&wi(a.type)||a.tag===4}function Oy(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||zN(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 Ey(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=ya));else if(m!==4&&(m===27&&wi(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(Ey(a,s,u),a=a.sibling;a!==null;)Ey(a,s,u),a=a.sibling}function Ef(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(m!==4&&(m===27&&wi(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(Ef(a,s,u),a=a.sibling;a!==null;)Ef(a,s,u),a=a.sibling}function BN(a){var s=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,v=s.attributes;v.length;)s.removeAttributeNode(v[0]);rr(s,m,u),s[Zt]=a,s[Cr]=u}catch(j){Qe(a,a.return,j)}}var Ea=!1,Mt=!1,Ay=!1,UN=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function zI(a,s){if(a=a.containerInfo,Qy=Vf,a=JS(a),jg(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var v=m.anchorOffset,j=m.focusNode;m=m.focusOffset;try{u.nodeType,j.nodeType}catch{u=null;break e}var O=0,P=-1,z=-1,V=0,ne=0,se=a,W=null;t:for(;;){for(var ee;se!==u||v!==0&&se.nodeType!==3||(P=O+v),se!==j||m!==0&&se.nodeType!==3||(z=O+m),se.nodeType===3&&(O+=se.nodeValue.length),(ee=se.firstChild)!==null;)W=se,se=ee;for(;;){if(se===a)break t;if(W===u&&++V===v&&(P=O),W===j&&++ne===m&&(z=O),(ee=se.nextSibling)!==null)break;se=W,W=se.parentNode}se=ee}u=P===-1||z===-1?null:{start:P,end:z}}else u=null}u=u||{start:0,end:0}}else u=null;for(Xy={focusedElem:a,selectionRange:u},Vf=!1,Ht=s;Ht!==null;)if(s=Ht,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Ht=a;else for(;Ht!==null;){switch(s=Ht,j=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)v=a[u],v.ref.impl=v.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&j!==null){a=void 0,u=s,v=j.memoizedProps,j=j.memoizedState,m=u.stateNode;try{var me=bs(u.type,v);a=m.getSnapshotBeforeUpdate(me,j),m.__reactInternalSnapshotBeforeUpdate=a}catch(Se){Qe(u,u.return,Se)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)Jy(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Jy(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,Ht=a;break}Ht=s.return}}function qN(a,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Ta(a,u),m&4&&Bu(5,u);break;case 1:if(Ta(a,u),m&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(O){Qe(u,u.return,O)}else{var v=bs(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(v,s,a.__reactInternalSnapshotBeforeUpdate)}catch(O){Qe(u,u.return,O)}}m&64&&LN(u),m&512&&Uu(u,u.return);break;case 3:if(Ta(a,u),m&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{O1(a,s)}catch(O){Qe(u,u.return,O)}}break;case 27:s===null&&m&4&&BN(u);case 26:case 5:Ta(a,u),s===null&&m&4&&$N(u),m&512&&Uu(u,u.return);break;case 12:Ta(a,u);break;case 31:Ta(a,u),m&4&&KN(a,u);break;case 13:Ta(a,u),m&4&&GN(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=VI.bind(null,u),m$(a,u))));break;case 22:if(m=u.memoizedState!==null||Ea,!m){s=s!==null&&s.memoizedState!==null||Mt,v=Ea;var j=Mt;Ea=m,(Mt=s)&&!j?Ca(a,u,(u.subtreeFlags&8772)!==0):Ta(a,u),Ea=v,Mt=j}break;case 30:break;default:Ta(a,u)}}function HN(a){var s=a.alternate;s!==null&&(a.alternate=null,HN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&ag(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 dt=null,Rr=!1;function Aa(a,s,u){for(u=u.child;u!==null;)FN(a,s,u),u=u.sibling}function FN(a,s,u){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(du,u)}catch{}switch(u.tag){case 26:Mt||Vn(u,s),Aa(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Mt||Vn(u,s);var m=dt,v=Rr;wi(u.type)&&(dt=u.stateNode,Rr=!1),Aa(a,s,u),Xu(u.stateNode),dt=m,Rr=v;break;case 5:Mt||Vn(u,s);case 6:if(m=dt,v=Rr,dt=null,Aa(a,s,u),dt=m,Rr=v,dt!==null)if(Rr)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(u.stateNode)}catch(j){Qe(u,s,j)}else try{dt.removeChild(u.stateNode)}catch(j){Qe(u,s,j)}break;case 18:dt!==null&&(Rr?(a=dt,L_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),sl(a)):L_(dt,u.stateNode));break;case 4:m=dt,v=Rr,dt=u.stateNode.containerInfo,Rr=!0,Aa(a,s,u),dt=m,Rr=v;break;case 0:case 11:case 14:case 15:pi(2,u,s),Mt||pi(4,u,s),Aa(a,s,u);break;case 1:Mt||(Vn(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&IN(u,s,m)),Aa(a,s,u);break;case 21:Aa(a,s,u);break;case 22:Mt=(m=Mt)||u.memoizedState!==null,Aa(a,s,u),Mt=m;break;default:Aa(a,s,u)}}function KN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{sl(a)}catch(u){Qe(s,s.return,u)}}}function GN(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){Qe(s,s.return,u)}}function BI(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new UN),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new UN),s;default:throw Error(n(435,a.tag))}}function Af(a,s){var u=BI(a);s.forEach(function(m){if(!u.has(m)){u.add(m);var v=QI.bind(null,a,m);m.then(v,v)}})}function Mr(a,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var v=u[m],j=a,O=s,P=O;e:for(;P!==null;){switch(P.tag){case 27:if(wi(P.type)){dt=P.stateNode,Rr=!1;break e}break;case 5:dt=P.stateNode,Rr=!1;break e;case 3:case 4:dt=P.stateNode.containerInfo,Rr=!0;break e}P=P.return}if(dt===null)throw Error(n(160));FN(j,O,v),dt=null,Rr=!1,j=v.alternate,j!==null&&(j.return=null),v.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)YN(s,a),s=s.sibling}var Rn=null;function YN(a,s){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Mr(s,a),Dr(a),m&4&&(pi(3,a,a.return),Bu(3,a),pi(5,a,a.return));break;case 1:Mr(s,a),Dr(a),m&512&&(Mt||u===null||Vn(u,u.return)),m&64&&Ea&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var v=Rn;if(Mr(s,a),Dr(a),m&512&&(Mt||u===null||Vn(u,u.return)),m&4){var j=u!==null?u.memoizedState:null;if(m=a.memoizedState,u===null)if(m===null)if(a.stateNode===null){e:{m=a.type,u=a.memoizedProps,v=v.ownerDocument||v;t:switch(m){case"title":j=v.getElementsByTagName("title")[0],(!j||j[mu]||j[Zt]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=v.createElement(m),v.head.insertBefore(j,v.querySelector("head > title"))),rr(j,m,u),j[Zt]=a,qt(j),m=j;break e;case"link":var O=Y_("link","href",v).get(m+(u.href||""));if(O){for(var P=0;P<O.length;P++)if(j=O[P],j.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&j.getAttribute("rel")===(u.rel==null?null:u.rel)&&j.getAttribute("title")===(u.title==null?null:u.title)&&j.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){O.splice(P,1);break t}}j=v.createElement(m),rr(j,m,u),v.head.appendChild(j);break;case"meta":if(O=Y_("meta","content",v).get(m+(u.content||""))){for(P=0;P<O.length;P++)if(j=O[P],j.getAttribute("content")===(u.content==null?null:""+u.content)&&j.getAttribute("name")===(u.name==null?null:u.name)&&j.getAttribute("property")===(u.property==null?null:u.property)&&j.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&j.getAttribute("charset")===(u.charSet==null?null:u.charSet)){O.splice(P,1);break t}}j=v.createElement(m),rr(j,m,u),v.head.appendChild(j);break;default:throw Error(n(468,m))}j[Zt]=a,qt(j),m=j}a.stateNode=m}else V_(v,a.type,a.stateNode);else a.stateNode=G_(v,m,a.memoizedProps);else j!==m?(j===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):j.count--,m===null?V_(v,a.type,a.stateNode):G_(v,m,a.memoizedProps)):m===null&&a.stateNode!==null&&_y(a,a.memoizedProps,u.memoizedProps)}break;case 27:Mr(s,a),Dr(a),m&512&&(Mt||u===null||Vn(u,u.return)),u!==null&&m&4&&_y(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Mr(s,a),Dr(a),m&512&&(Mt||u===null||Vn(u,u.return)),a.flags&32){v=a.stateNode;try{To(v,"")}catch(me){Qe(a,a.return,me)}}m&4&&a.stateNode!=null&&(v=a.memoizedProps,_y(a,v,u!==null?u.memoizedProps:v)),m&1024&&(Ay=!0);break;case 6:if(Mr(s,a),Dr(a),m&4){if(a.stateNode===null)throw Error(n(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(me){Qe(a,a.return,me)}}break;case 3:if(Ff=null,v=Rn,Rn=qf(s.containerInfo),Mr(s,a),Rn=v,Dr(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{sl(s.containerInfo)}catch(me){Qe(a,a.return,me)}Ay&&(Ay=!1,VN(a));break;case 4:m=Rn,Rn=qf(a.stateNode.containerInfo),Mr(s,a),Dr(a),Rn=m;break;case 12:Mr(s,a),Dr(a);break;case 31:Mr(s,a),Dr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Af(a,m)));break;case 13:Mr(s,a),Dr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Cf=Ce()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Af(a,m)));break;case 22:v=a.memoizedState!==null;var z=u!==null&&u.memoizedState!==null,V=Ea,ne=Mt;if(Ea=V||v,Mt=ne||z,Mr(s,a),Mt=ne,Ea=V,Dr(a),m&8192)e:for(s=a.stateNode,s._visibility=v?s._visibility&-2:s._visibility|1,v&&(u===null||z||Ea||Mt||js(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){z=u=s;try{if(j=z.stateNode,v)O=j.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none";else{P=z.stateNode;var se=z.memoizedProps.style,W=se!=null&&se.hasOwnProperty("display")?se.display:null;P.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(me){Qe(z,z.return,me)}}}else if(s.tag===6){if(u===null){z=s;try{z.stateNode.nodeValue=v?"":z.memoizedProps}catch(me){Qe(z,z.return,me)}}}else if(s.tag===18){if(u===null){z=s;try{var ee=z.stateNode;v?I_(ee,!0):I_(z.stateNode,!1)}catch(me){Qe(z,z.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}m&4&&(m=a.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,Af(a,u))));break;case 19:Mr(s,a),Dr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Af(a,m)));break;case 30:break;case 21:break;default:Mr(s,a),Dr(a)}}function Dr(a){var s=a.flags;if(s&2){try{for(var u,m=a.return;m!==null;){if(zN(m)){u=m;break}m=m.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var v=u.stateNode,j=Oy(a);Ef(a,j,v);break;case 5:var O=u.stateNode;u.flags&32&&(To(O,""),u.flags&=-33);var P=Oy(a);Ef(a,P,O);break;case 3:case 4:var z=u.stateNode.containerInfo,V=Oy(a);Ey(a,V,z);break;default:throw Error(n(161))}}catch(ne){Qe(a,a.return,ne)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function VN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;VN(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function Ta(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)qN(a,s.alternate,s),s=s.sibling}function js(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),js(s);break;case 1:Vn(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&IN(s,s.return,u),js(s);break;case 27:Xu(s.stateNode);case 26:case 5:Vn(s,s.return),js(s);break;case 22:s.memoizedState===null&&js(s);break;case 30:js(s);break;default:js(s)}a=a.sibling}}function Ca(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,v=a,j=s,O=j.flags;switch(j.tag){case 0:case 11:case 15:Ca(v,j,u),Bu(4,j);break;case 1:if(Ca(v,j,u),m=j,v=m.stateNode,typeof v.componentDidMount=="function")try{v.componentDidMount()}catch(V){Qe(m,m.return,V)}if(m=j,v=m.updateQueue,v!==null){var P=m.stateNode;try{var z=v.shared.hiddenCallbacks;if(z!==null)for(v.shared.hiddenCallbacks=null,v=0;v<z.length;v++)_1(z[v],P)}catch(V){Qe(m,m.return,V)}}u&&O&64&&LN(j),Uu(j,j.return);break;case 27:BN(j);case 26:case 5:Ca(v,j,u),u&&m===null&&O&4&&$N(j),Uu(j,j.return);break;case 12:Ca(v,j,u);break;case 31:Ca(v,j,u),u&&O&4&&KN(v,j);break;case 13:Ca(v,j,u),u&&O&4&&GN(v,j);break;case 22:j.memoizedState===null&&Ca(v,j,u),Uu(j,j.return);break;case 30:break;default:Ca(v,j,u)}s=s.sibling}}function Ty(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&&Eu(u))}function Cy(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Eu(a))}function Mn(a,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)QN(a,s,u,m),s=s.sibling}function QN(a,s,u,m){var v=s.flags;switch(s.tag){case 0:case 11:case 15:Mn(a,s,u,m),v&2048&&Bu(9,s);break;case 1:Mn(a,s,u,m);break;case 3:Mn(a,s,u,m),v&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Eu(a)));break;case 12:if(v&2048){Mn(a,s,u,m),a=s.stateNode;try{var j=s.memoizedProps,O=j.id,P=j.onPostCommit;typeof P=="function"&&P(O,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(z){Qe(s,s.return,z)}}else Mn(a,s,u,m);break;case 31:Mn(a,s,u,m);break;case 13:Mn(a,s,u,m);break;case 23:break;case 22:j=s.stateNode,O=s.alternate,s.memoizedState!==null?j._visibility&2?Mn(a,s,u,m):qu(a,s):j._visibility&2?Mn(a,s,u,m):(j._visibility|=2,Qo(a,s,u,m,(s.subtreeFlags&10256)!==0||!1)),v&2048&&Ty(O,s);break;case 24:Mn(a,s,u,m),v&2048&&Cy(s.alternate,s);break;default:Mn(a,s,u,m)}}function Qo(a,s,u,m,v){for(v=v&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var j=a,O=s,P=u,z=m,V=O.flags;switch(O.tag){case 0:case 11:case 15:Qo(j,O,P,z,v),Bu(8,O);break;case 23:break;case 22:var ne=O.stateNode;O.memoizedState!==null?ne._visibility&2?Qo(j,O,P,z,v):qu(j,O):(ne._visibility|=2,Qo(j,O,P,z,v)),v&&V&2048&&Ty(O.alternate,O);break;case 24:Qo(j,O,P,z,v),v&&V&2048&&Cy(O.alternate,O);break;default:Qo(j,O,P,z,v)}s=s.sibling}}function qu(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,m=s,v=m.flags;switch(m.tag){case 22:qu(u,m),v&2048&&Ty(m.alternate,m);break;case 24:qu(u,m),v&2048&&Cy(m.alternate,m);break;default:qu(u,m)}s=s.sibling}}var Hu=8192;function Xo(a,s,u){if(a.subtreeFlags&Hu)for(a=a.child;a!==null;)XN(a,s,u),a=a.sibling}function XN(a,s,u){switch(a.tag){case 26:Xo(a,s,u),a.flags&Hu&&a.memoizedState!==null&&O$(u,Rn,a.memoizedState,a.memoizedProps);break;case 5:Xo(a,s,u);break;case 3:case 4:var m=Rn;Rn=qf(a.stateNode.containerInfo),Xo(a,s,u),Rn=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=Hu,Hu=16777216,Xo(a,s,u),Hu=m):Xo(a,s,u));break;default:Xo(a,s,u)}}function WN(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function Fu(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];Ht=m,JN(m,a)}WN(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ZN(a),a=a.sibling}function ZN(a){switch(a.tag){case 0:case 11:case 15:Fu(a),a.flags&2048&&pi(9,a,a.return);break;case 3:Fu(a);break;case 12:Fu(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Tf(a)):Fu(a);break;default:Fu(a)}}function Tf(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var m=s[u];Ht=m,JN(m,a)}WN(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:pi(8,s,s.return),Tf(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Tf(s));break;default:Tf(s)}a=a.sibling}}function JN(a,s){for(;Ht!==null;){var u=Ht;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 m=u.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Eu(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Ht=m;else e:for(u=a;Ht!==null;){m=Ht;var v=m.sibling,j=m.return;if(HN(m),m===u){Ht=null;break e}if(v!==null){v.return=j,Ht=v;break e}Ht=j}}}var UI={getCacheForType:function(a){var s=er(Ct),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return er(Ct).controller.signal}},qI=typeof WeakMap=="function"?WeakMap:Map,Ge=0,rt=null,Pe=null,De=0,Ve=0,Xr=null,gi=!1,Wo=!1,Py=!1,Pa=0,yt=0,yi=0,ws=0,Ry=0,Wr=0,Zo=0,Ku=null,kr=null,My=!1,Cf=0,e_=0,Pf=1/0,Rf=null,vi=null,kt=0,xi=null,Jo=null,Ra=0,Dy=0,ky=null,t_=null,Gu=0,Ly=null;function Zr(){return(Ge&2)!==0&&De!==0?De&-De:k.T!==null?qy():yS()}function r_(){if(Wr===0)if((De&536870912)===0||Ie){var a=zd;zd<<=1,(zd&3932160)===0&&(zd=262144),Wr=a}else Wr=536870912;return a=Vr.current,a!==null&&(a.flags|=32),Wr}function Lr(a,s,u){(a===rt&&(Ve===2||Ve===9)||a.cancelPendingCommit!==null)&&(el(a,0),bi(a,De,Wr,!1)),hu(a,u),((Ge&2)===0||a!==rt)&&(a===rt&&((Ge&2)===0&&(ws|=u),yt===4&&bi(a,De,Wr,!1)),Qn(a))}function n_(a,s,u){if((Ge&6)!==0)throw Error(n(327));var m=!u&&(s&127)===0&&(s&a.expiredLanes)===0||fu(a,s),v=m?KI(a,s):$y(a,s,!0),j=m;do{if(v===0){Wo&&!m&&bi(a,s,0,!1);break}else{if(u=a.current.alternate,j&&!HI(u)){v=$y(a,s,!1),j=!1;continue}if(v===2){if(j=s,a.errorRecoveryDisabledLanes&j)var O=0;else O=a.pendingLanes&-536870913,O=O!==0?O:O&536870912?536870912:0;if(O!==0){s=O;e:{var P=a;v=Ku;var z=P.current.memoizedState.isDehydrated;if(z&&(el(P,O).flags|=256),O=$y(P,O,!1),O!==2){if(Py&&!z){P.errorRecoveryDisabledLanes|=j,ws|=j,v=4;break e}j=kr,kr=v,j!==null&&(kr===null?kr=j:kr.push.apply(kr,j))}v=O}if(j=!1,v!==2)continue}}if(v===1){el(a,0),bi(a,s,0,!0);break}e:{switch(m=a,j=v,j){case 0:case 1:throw Error(n(345));case 4:if((s&4194048)!==s)break;case 6:bi(m,s,Wr,!gi);break e;case 2:kr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(v=Cf+300-Ce(),10<v)){if(bi(m,s,Wr,!gi),Ud(m,0,!0)!==0)break e;Ra=s,m.timeoutHandle=D_(a_.bind(null,m,u,kr,Rf,My,s,Wr,ws,Zo,gi,j,"Throttled",-0,0),v);break e}a_(m,u,kr,Rf,My,s,Wr,ws,Zo,gi,j,null,-0,0)}}break}while(!0);Qn(a)}function a_(a,s,u,m,v,j,O,P,z,V,ne,se,W,ee){if(a.timeoutHandle=-1,se=s.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ya},XN(s,j,se);var me=(j&62914560)===j?Cf-Ce():(j&4194048)===j?e_-Ce():0;if(me=E$(se,me),me!==null){Ra=j,a.cancelPendingCommit=me(f_.bind(null,a,s,j,u,m,v,O,P,z,ne,se,null,W,ee)),bi(a,j,O,!V);return}}f_(a,s,j,u,m,v,O,P,z)}function HI(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var v=u[m],j=v.getSnapshot;v=v.value;try{if(!Gr(j(),v))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function bi(a,s,u,m){s&=~Ry,s&=~ws,a.suspendedLanes|=s,a.pingedLanes&=~s,m&&(a.warmLanes|=s),m=a.expirationTimes;for(var v=s;0<v;){var j=31-Kr(v),O=1<<j;m[j]=-1,v&=~O}u!==0&&mS(a,u,s)}function Mf(){return(Ge&6)===0?(Yu(0),!1):!0}function Iy(){if(Pe!==null){if(Ve===0)var a=Pe.return;else a=Pe,ja=hs=null,Jg(a),Fo=null,Tu=0,a=Pe;for(;a!==null;)kN(a.alternate,a),a=a.return;Pe=null}}function el(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,u$(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Ra=0,Iy(),rt=a,Pe=u=xa(a.current,null),De=s,Ve=0,Xr=null,gi=!1,Wo=fu(a,s),Py=!1,Zo=Wr=Ry=ws=yi=yt=0,kr=Ku=null,My=!1,(s&8)!==0&&(s|=s&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=s;0<m;){var v=31-Kr(m),j=1<<v;s|=a[v],m&=~j}return Pa=s,Jd(),u}function i_(a,s){Ae=null,k.H=Iu,s===Ho||s===lf?(s=j1(),Ve=3):s===Ug?(s=j1(),Ve=4):Ve=s===py?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Xr=s,Pe===null&&(yt=1,wf(a,fn(s,a.current)))}function s_(){var a=Vr.current;return a===null?!0:(De&4194048)===De?gn===null:(De&62914560)===De||(De&536870912)!==0?a===gn:!1}function o_(){var a=k.H;return k.H=Iu,a===null?Iu:a}function l_(){var a=k.A;return k.A=UI,a}function Df(){yt=4,gi||(De&4194048)!==De&&Vr.current!==null||(Wo=!0),(yi&134217727)===0&&(ws&134217727)===0||rt===null||bi(rt,De,Wr,!1)}function $y(a,s,u){var m=Ge;Ge|=2;var v=o_(),j=l_();(rt!==a||De!==s)&&(Rf=null,el(a,s)),s=!1;var O=yt;e:do try{if(Ve!==0&&Pe!==null){var P=Pe,z=Xr;switch(Ve){case 8:Iy(),O=6;break e;case 3:case 2:case 9:case 6:Vr.current===null&&(s=!0);var V=Ve;if(Ve=0,Xr=null,tl(a,P,z,V),u&&Wo){O=0;break e}break;default:V=Ve,Ve=0,Xr=null,tl(a,P,z,V)}}FI(),O=yt;break}catch(ne){i_(a,ne)}while(!0);return s&&a.shellSuspendCounter++,ja=hs=null,Ge=m,k.H=v,k.A=j,Pe===null&&(rt=null,De=0,Jd()),O}function FI(){for(;Pe!==null;)u_(Pe)}function KI(a,s){var u=Ge;Ge|=2;var m=o_(),v=l_();rt!==a||De!==s?(Rf=null,Pf=Ce()+500,el(a,s)):Wo=fu(a,s);e:do try{if(Ve!==0&&Pe!==null){s=Pe;var j=Xr;t:switch(Ve){case 1:Ve=0,Xr=null,tl(a,s,j,1);break;case 2:case 9:if(x1(j)){Ve=0,Xr=null,c_(s);break}s=function(){Ve!==2&&Ve!==9||rt!==a||(Ve=7),Qn(a)},j.then(s,s);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:x1(j)?(Ve=0,Xr=null,c_(s)):(Ve=0,Xr=null,tl(a,s,j,7));break;case 5:var O=null;switch(Pe.tag){case 26:O=Pe.memoizedState;case 5:case 27:var P=Pe;if(O?Q_(O):P.stateNode.complete){Ve=0,Xr=null;var z=P.sibling;if(z!==null)Pe=z;else{var V=P.return;V!==null?(Pe=V,kf(V)):Pe=null}break t}}Ve=0,Xr=null,tl(a,s,j,5);break;case 6:Ve=0,Xr=null,tl(a,s,j,6);break;case 8:Iy(),yt=6;break e;default:throw Error(n(462))}}GI();break}catch(ne){i_(a,ne)}while(!0);return ja=hs=null,k.H=m,k.A=v,Ge=u,Pe!==null?0:(rt=null,De=0,Jd(),yt)}function GI(){for(;Pe!==null&&!Jp();)u_(Pe)}function u_(a){var s=MN(a.alternate,a,Pa);a.memoizedProps=a.pendingProps,s===null?kf(a):Pe=s}function c_(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=EN(u,s,s.pendingProps,s.type,void 0,De);break;case 11:s=EN(u,s,s.pendingProps,s.type.render,s.ref,De);break;case 5:Jg(s);default:kN(u,s),s=Pe=l1(s,Pa),s=MN(u,s,Pa)}a.memoizedProps=a.pendingProps,s===null?kf(a):Pe=s}function tl(a,s,u,m){ja=hs=null,Jg(s),Fo=null,Tu=0;var v=s.return;try{if(DI(a,v,s,u,De)){yt=1,wf(a,fn(u,a.current)),Pe=null;return}}catch(j){if(v!==null)throw Pe=v,j;yt=1,wf(a,fn(u,a.current)),Pe=null;return}s.flags&32768?(Ie||m===1?a=!0:Wo||(De&536870912)!==0?a=!1:(gi=a=!0,(m===2||m===9||m===3||m===6)&&(m=Vr.current,m!==null&&m.tag===13&&(m.flags|=16384))),d_(s,a)):kf(s)}function kf(a){var s=a;do{if((s.flags&32768)!==0){d_(s,gi);return}a=s.return;var u=II(s.alternate,s,Pa);if(u!==null){Pe=u;return}if(s=s.sibling,s!==null){Pe=s;return}Pe=s=a}while(s!==null);yt===0&&(yt=5)}function d_(a,s){do{var u=$I(a.alternate,a);if(u!==null){u.flags&=32767,Pe=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Pe=a;return}Pe=a=u}while(a!==null);yt=6,Pe=null}function f_(a,s,u,m,v,j,O,P,z){a.cancelPendingCommit=null;do Lf();while(kt!==0);if((Ge&6)!==0)throw Error(n(327));if(s!==null){if(s===a.current)throw Error(n(177));if(j=s.lanes|s.childLanes,j|=Og,_L(a,u,j,O,P,z),a===rt&&(Pe=rt=null,De=0),Jo=s,xi=a,Ra=u,Dy=j,ky=v,t_=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,XI(Id,function(){return y_(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=k.T,k.T=null,v=q.p,q.p=2,O=Ge,Ge|=4;try{zI(a,s,u)}finally{Ge=O,q.p=v,k.T=m}}kt=1,h_(),m_(),p_()}}function h_(){if(kt===1){kt=0;var a=xi,s=Jo,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=k.T,k.T=null;var m=q.p;q.p=2;var v=Ge;Ge|=4;try{YN(s,a);var j=Xy,O=JS(a.containerInfo),P=j.focusedElem,z=j.selectionRange;if(O!==P&&P&&P.ownerDocument&&ZS(P.ownerDocument.documentElement,P)){if(z!==null&&jg(P)){var V=z.start,ne=z.end;if(ne===void 0&&(ne=V),"selectionStart"in P)P.selectionStart=V,P.selectionEnd=Math.min(ne,P.value.length);else{var se=P.ownerDocument||document,W=se&&se.defaultView||window;if(W.getSelection){var ee=W.getSelection(),me=P.textContent.length,Se=Math.min(z.start,me),et=z.end===void 0?Se:Math.min(z.end,me);!ee.extend&&Se>et&&(O=et,et=Se,Se=O);var K=WS(P,Se),B=WS(P,et);if(K&&B&&(ee.rangeCount!==1||ee.anchorNode!==K.node||ee.anchorOffset!==K.offset||ee.focusNode!==B.node||ee.focusOffset!==B.offset)){var Y=se.createRange();Y.setStart(K.node,K.offset),ee.removeAllRanges(),Se>et?(ee.addRange(Y),ee.extend(B.node,B.offset)):(Y.setEnd(B.node,B.offset),ee.addRange(Y))}}}}for(se=[],ee=P;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<se.length;P++){var ae=se[P];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}Vf=!!Qy,Xy=Qy=null}finally{Ge=v,q.p=m,k.T=u}}a.current=s,kt=2}}function m_(){if(kt===2){kt=0;var a=xi,s=Jo,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=k.T,k.T=null;var m=q.p;q.p=2;var v=Ge;Ge|=4;try{qN(a,s.alternate,s)}finally{Ge=v,q.p=m,k.T=u}}kt=3}}function p_(){if(kt===4||kt===3){kt=0,kd();var a=xi,s=Jo,u=Ra,m=t_;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?kt=5:(kt=0,Jo=xi=null,g_(a,a.pendingLanes));var v=a.pendingLanes;if(v===0&&(vi=null),rg(u),s=s.stateNode,Fr&&typeof Fr.onCommitFiberRoot=="function")try{Fr.onCommitFiberRoot(du,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=k.T,v=q.p,q.p=2,k.T=null;try{for(var j=a.onRecoverableError,O=0;O<m.length;O++){var P=m[O];j(P.value,{componentStack:P.stack})}}finally{k.T=s,q.p=v}}(Ra&3)!==0&&Lf(),Qn(a),v=a.pendingLanes,(u&261930)!==0&&(v&42)!==0?a===Ly?Gu++:(Gu=0,Ly=a):Gu=0,Yu(0)}}function g_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Eu(s)))}function Lf(){return h_(),m_(),p_(),y_()}function y_(){if(kt!==5)return!1;var a=xi,s=Dy;Dy=0;var u=rg(Ra),m=k.T,v=q.p;try{q.p=32>u?32:u,k.T=null,u=ky,ky=null;var j=xi,O=Ra;if(kt=0,Jo=xi=null,Ra=0,(Ge&6)!==0)throw Error(n(331));var P=Ge;if(Ge|=4,ZN(j.current),QN(j,j.current,O,u),Ge=P,Yu(0,!1),Fr&&typeof Fr.onPostCommitFiberRoot=="function")try{Fr.onPostCommitFiberRoot(du,j)}catch{}return!0}finally{q.p=v,k.T=m,g_(a,s)}}function v_(a,s,u){s=fn(u,s),s=my(a.stateNode,s,2),a=fi(a,s,2),a!==null&&(hu(a,2),Qn(a))}function Qe(a,s,u){if(a.tag===3)v_(a,a,u);else for(;s!==null;){if(s.tag===3){v_(s,a,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(vi===null||!vi.has(m))){a=fn(u,a),u=xN(2),m=fi(s,u,2),m!==null&&(bN(u,m,s,a),hu(m,2),Qn(m));break}}s=s.return}}function zy(a,s,u){var m=a.pingCache;if(m===null){m=a.pingCache=new qI;var v=new Set;m.set(s,v)}else v=m.get(s),v===void 0&&(v=new Set,m.set(s,v));v.has(u)||(Py=!0,v.add(u),a=YI.bind(null,a,s,u),s.then(a,a))}function YI(a,s,u){var m=a.pingCache;m!==null&&m.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,rt===a&&(De&u)===u&&(yt===4||yt===3&&(De&62914560)===De&&300>Ce()-Cf?(Ge&2)===0&&el(a,0):Ry|=u,Zo===De&&(Zo=0)),Qn(a)}function x_(a,s){s===0&&(s=hS()),a=cs(a,s),a!==null&&(hu(a,s),Qn(a))}function VI(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),x_(a,u)}function QI(a,s){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,v=a.memoizedState;v!==null&&(u=v.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(s),x_(a,u)}function XI(a,s){return cu(a,s)}var If=null,rl=null,By=!1,$f=!1,Uy=!1,ji=0;function Qn(a){a!==rl&&a.next===null&&(rl===null?If=rl=a:rl=rl.next=a),$f=!0,By||(By=!0,ZI())}function Yu(a,s){if(!Uy&&$f){Uy=!0;do for(var u=!1,m=If;m!==null;){if(a!==0){var v=m.pendingLanes;if(v===0)var j=0;else{var O=m.suspendedLanes,P=m.pingedLanes;j=(1<<31-Kr(42|a)+1)-1,j&=v&~(O&~P),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(u=!0,S_(m,j))}else j=De,j=Ud(m,m===rt?j:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(j&3)===0||fu(m,j)||(u=!0,S_(m,j));m=m.next}while(u);Uy=!1}}function WI(){b_()}function b_(){$f=By=!1;var a=0;ji!==0&&l$()&&(a=ji);for(var s=Ce(),u=null,m=If;m!==null;){var v=m.next,j=j_(m,s);j===0?(m.next=null,u===null?If=v:u.next=v,v===null&&(rl=u)):(u=m,(a!==0||(j&3)!==0)&&($f=!0)),m=v}kt!==0&&kt!==5||Yu(a),ji!==0&&(ji=0)}function j_(a,s){for(var u=a.suspendedLanes,m=a.pingedLanes,v=a.expirationTimes,j=a.pendingLanes&-62914561;0<j;){var O=31-Kr(j),P=1<<O,z=v[O];z===-1?((P&u)===0||(P&m)!==0)&&(v[O]=NL(P,s)):z<=s&&(a.expiredLanes|=P),j&=~P}if(s=rt,u=De,u=Ud(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===s&&(Ve===2||Ve===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&wo(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||fu(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(m!==null&&wo(m),rg(u)){case 2:case 8:u=Ld;break;case 32:u=Id;break;case 268435456:u=fS;break;default:u=Id}return m=w_.bind(null,a),u=cu(u,m),a.callbackPriority=s,a.callbackNode=u,s}return m!==null&&m!==null&&wo(m),a.callbackPriority=2,a.callbackNode=null,2}function w_(a,s){if(kt!==0&&kt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(Lf()&&a.callbackNode!==u)return null;var m=De;return m=Ud(a,a===rt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(n_(a,m,s),j_(a,Ce()),a.callbackNode!=null&&a.callbackNode===u?w_.bind(null,a):null)}function S_(a,s){if(Lf())return null;n_(a,s,!0)}function ZI(){c$(function(){(Ge&6)!==0?cu(Kn,WI):b_()})}function qy(){if(ji===0){var a=Uo;a===0&&(a=$d,$d<<=1,($d&261888)===0&&($d=256)),ji=a}return ji}function N_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Kd(""+a)}function __(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 JI(a,s,u,m,v){if(s==="submit"&&u&&u.stateNode===v){var j=N_((v[Cr]||null).action),O=m.submitter;O&&(s=(s=O[Cr]||null)?N_(s.formAction):O.getAttribute("formAction"),s!==null&&(j=s,O=null));var P=new Qd("action","action",null,m,v);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ji!==0){var z=O?__(v,O):new FormData(v);ly(u,{pending:!0,data:z,method:v.method,action:j},null,z)}}else typeof j=="function"&&(P.preventDefault(),z=O?__(v,O):new FormData(v),ly(u,{pending:!0,data:z,method:v.method,action:j},j,z))},currentTarget:v}]})}}for(var Hy=0;Hy<_g.length;Hy++){var Fy=_g[Hy],e$=Fy.toLowerCase(),t$=Fy[0].toUpperCase()+Fy.slice(1);Pn(e$,"on"+t$)}Pn(r1,"onAnimationEnd"),Pn(n1,"onAnimationIteration"),Pn(a1,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(yI,"onTransitionRun"),Pn(vI,"onTransitionStart"),Pn(xI,"onTransitionCancel"),Pn(i1,"onTransitionEnd"),Eo("onMouseEnter",["mouseout","mouseover"]),Eo("onMouseLeave",["mouseout","mouseover"]),Eo("onPointerEnter",["pointerout","pointerover"]),Eo("onPointerLeave",["pointerout","pointerover"]),ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ss("onBeforeInput",["compositionend","keypress","textInput","paste"]),ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vu="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(" "),r$=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vu));function O_(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],v=m.event;m=m.listeners;e:{var j=void 0;if(s)for(var O=m.length-1;0<=O;O--){var P=m[O],z=P.instance,V=P.currentTarget;if(P=P.listener,z!==j&&v.isPropagationStopped())break e;j=P,v.currentTarget=V;try{j(v)}catch(ne){Zd(ne)}v.currentTarget=null,j=z}else for(O=0;O<m.length;O++){if(P=m[O],z=P.instance,V=P.currentTarget,P=P.listener,z!==j&&v.isPropagationStopped())break e;j=P,v.currentTarget=V;try{j(v)}catch(ne){Zd(ne)}v.currentTarget=null,j=z}}}}function Re(a,s){var u=s[ng];u===void 0&&(u=s[ng]=new Set);var m=a+"__bubble";u.has(m)||(E_(s,a,2,!1),u.add(m))}function Ky(a,s,u){var m=0;s&&(m|=4),E_(u,a,m,s)}var zf="_reactListening"+Math.random().toString(36).slice(2);function Gy(a){if(!a[zf]){a[zf]=!0,bS.forEach(function(u){u!=="selectionchange"&&(r$.has(u)||Ky(u,!1,a),Ky(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[zf]||(s[zf]=!0,Ky("selectionchange",!1,s))}}function E_(a,s,u,m){switch(rO(s)){case 2:var v=C$;break;case 8:v=P$;break;default:v=ov}u=v.bind(null,s,u,a),v=void 0,!fg||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(v=!0),m?v!==void 0?a.addEventListener(s,u,{capture:!0,passive:v}):a.addEventListener(s,u,!0):v!==void 0?a.addEventListener(s,u,{passive:v}):a.addEventListener(s,u,!1)}function Yy(a,s,u,m,v){var j=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var O=m.tag;if(O===3||O===4){var P=m.stateNode.containerInfo;if(P===v)break;if(O===4)for(O=m.return;O!==null;){var z=O.tag;if((z===3||z===4)&&O.stateNode.containerInfo===v)return;O=O.return}for(;P!==null;){if(O=No(P),O===null)return;if(z=O.tag,z===5||z===6||z===26||z===27){m=j=O;continue e}P=P.parentNode}}m=m.return}RS(function(){var V=j,ne=cg(u),se=[];e:{var W=s1.get(a);if(W!==void 0){var ee=Qd,me=a;switch(a){case"keypress":if(Yd(u)===0)break e;case"keydown":case"keyup":ee=QL;break;case"focusin":me="focus",ee=gg;break;case"focusout":me="blur",ee=gg;break;case"beforeblur":case"afterblur":ee=gg;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":ee=kS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=IL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=ZL;break;case r1:case n1:case a1:ee=BL;break;case i1:ee=eI;break;case"scroll":case"scrollend":ee=kL;break;case"wheel":ee=rI;break;case"copy":case"cut":case"paste":ee=qL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=IS;break;case"toggle":case"beforetoggle":ee=aI}var Se=(s&4)!==0,et=!Se&&(a==="scroll"||a==="scrollend"),K=Se?W!==null?W+"Capture":null:W;Se=[];for(var B=V,Y;B!==null;){var ae=B;if(Y=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||Y===null||K===null||(ae=gu(B,K),ae!=null&&Se.push(Qu(B,ae,Y))),et)break;B=B.return}0<Se.length&&(W=new ee(W,me,null,u,ne),se.push({event:W,listeners:Se}))}}if((s&7)===0){e:{if(W=a==="mouseover"||a==="pointerover",ee=a==="mouseout"||a==="pointerout",W&&u!==ug&&(me=u.relatedTarget||u.fromElement)&&(No(me)||me[So]))break e;if((ee||W)&&(W=ne.window===ne?ne:(W=ne.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(me=u.relatedTarget||u.toElement,ee=V,me=me?No(me):null,me!==null&&(et=o(me),Se=me.tag,me!==et||Se!==5&&Se!==27&&Se!==6)&&(me=null)):(ee=null,me=V),ee!==me)){if(Se=kS,ae="onMouseLeave",K="onMouseEnter",B="mouse",(a==="pointerout"||a==="pointerover")&&(Se=IS,ae="onPointerLeave",K="onPointerEnter",B="pointer"),et=ee==null?W:pu(ee),Y=me==null?W:pu(me),W=new Se(ae,B+"leave",ee,u,ne),W.target=et,W.relatedTarget=Y,ae=null,No(ne)===V&&(Se=new Se(K,B+"enter",me,u,ne),Se.target=Y,Se.relatedTarget=et,ae=Se),et=ae,ee&&me)t:{for(Se=n$,K=ee,B=me,Y=0,ae=K;ae;ae=Se(ae))Y++;ae=0;for(var be=B;be;be=Se(be))ae++;for(;0<Y-ae;)K=Se(K),Y--;for(;0<ae-Y;)B=Se(B),ae--;for(;Y--;){if(K===B||B!==null&&K===B.alternate){Se=K;break t}K=Se(K),B=Se(B)}Se=null}else Se=null;ee!==null&&A_(se,W,ee,Se,!1),me!==null&&et!==null&&A_(se,et,me,Se,!0)}}e:{if(W=V?pu(V):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var qe=KS;else if(HS(W))if(GS)qe=mI;else{qe=fI;var ye=dI}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?V&&lg(V.elementType)&&(qe=KS):qe=hI;if(qe&&(qe=qe(a,V))){FS(se,qe,u,ne);break e}ye&&ye(a,W,V),a==="focusout"&&V&&W.type==="number"&&V.memoizedProps.value!=null&&og(W,"number",W.value)}switch(ye=V?pu(V):window,a){case"focusin":(HS(ye)||ye.contentEditable==="true")&&(Mo=ye,wg=V,Nu=null);break;case"focusout":Nu=wg=Mo=null;break;case"mousedown":Sg=!0;break;case"contextmenu":case"mouseup":case"dragend":Sg=!1,e1(se,u,ne);break;case"selectionchange":if(gI)break;case"keydown":case"keyup":e1(se,u,ne)}var Te;if(vg)e:{switch(a){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else Ro?US(a,u)&&(ke="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(ke="onCompositionStart");ke&&($S&&u.locale!=="ko"&&(Ro||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Ro&&(Te=MS()):(ii=ne,hg="value"in ii?ii.value:ii.textContent,Ro=!0)),ye=Bf(V,ke),0<ye.length&&(ke=new LS(ke,a,null,u,ne),se.push({event:ke,listeners:ye}),Te?ke.data=Te:(Te=qS(u),Te!==null&&(ke.data=Te)))),(Te=sI?oI(a,u):lI(a,u))&&(ke=Bf(V,"onBeforeInput"),0<ke.length&&(ye=new LS("onBeforeInput","beforeinput",null,u,ne),se.push({event:ye,listeners:ke}),ye.data=Te)),JI(se,a,V,u,ne)}O_(se,s)})}function Qu(a,s,u){return{instance:a,listener:s,currentTarget:u}}function Bf(a,s){for(var u=s+"Capture",m=[];a!==null;){var v=a,j=v.stateNode;if(v=v.tag,v!==5&&v!==26&&v!==27||j===null||(v=gu(a,u),v!=null&&m.unshift(Qu(a,v,j)),v=gu(a,s),v!=null&&m.push(Qu(a,v,j))),a.tag===3)return m;a=a.return}return[]}function n$(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function A_(a,s,u,m,v){for(var j=s._reactName,O=[];u!==null&&u!==m;){var P=u,z=P.alternate,V=P.stateNode;if(P=P.tag,z!==null&&z===m)break;P!==5&&P!==26&&P!==27||V===null||(z=V,v?(V=gu(u,j),V!=null&&O.unshift(Qu(u,V,z))):v||(V=gu(u,j),V!=null&&O.push(Qu(u,V,z)))),u=u.return}O.length!==0&&a.push({event:s,listeners:O})}var a$=/\r\n?/g,i$=/\u0000|\uFFFD/g;function T_(a){return(typeof a=="string"?a:""+a).replace(a$,`
|
|
49
|
-
`).replace(i$,"")}function C_(a,s){return s=T_(s),T_(a)===s}function Je(a,s,u,m,v,j){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||To(a,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&To(a,""+m);break;case"className":Hd(a,"class",m);break;case"tabIndex":Hd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Hd(a,u,m);break;case"style":CS(a,m,j);break;case"data":if(s!=="object"){Hd(a,"data",m);break}case"src":case"href":if(m===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Kd(""+m),a.setAttribute(u,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof j=="function"&&(u==="formAction"?(s!=="input"&&Je(a,s,"name",v.name,v,null),Je(a,s,"formEncType",v.formEncType,v,null),Je(a,s,"formMethod",v.formMethod,v,null),Je(a,s,"formTarget",v.formTarget,v,null)):(Je(a,s,"encType",v.encType,v,null),Je(a,s,"method",v.method,v,null),Je(a,s,"target",v.target,v,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Kd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ya);break;case"onScroll":m!=null&&Re("scroll",a);break;case"onScrollEnd":m!=null&&Re("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(v.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}u=Kd(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":Re("beforetoggle",a),Re("toggle",a),qd(a,"popover",m);break;case"xlinkActuate":ga(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ga(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ga(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ga(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ga(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ga(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ga(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ga(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ga(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":qd(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=ML.get(u)||u,qd(a,u,m))}}function Vy(a,s,u,m,v,j){switch(u){case"style":CS(a,m,j);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(v.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"children":typeof m=="string"?To(a,m):(typeof m=="number"||typeof m=="bigint")&&To(a,""+m);break;case"onScroll":m!=null&&Re("scroll",a);break;case"onScrollEnd":m!=null&&Re("scrollend",a);break;case"onClick":m!=null&&(a.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jS.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(v=u.endsWith("Capture"),s=u.slice(2,v?u.length-7:void 0),j=a[Cr]||null,j=j!=null?j[u]:null,typeof j=="function"&&a.removeEventListener(s,j,v),typeof m=="function")){typeof j!="function"&&j!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,m,v);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):qd(a,u,m)}}}function rr(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 m=!1,v=!1,j;for(j in u)if(u.hasOwnProperty(j)){var O=u[j];if(O!=null)switch(j){case"src":m=!0;break;case"srcSet":v=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,j,O,u,null)}}v&&Je(a,s,"srcSet",u.srcSet,u,null),m&&Je(a,s,"src",u.src,u,null);return;case"input":Re("invalid",a);var P=j=O=v=null,z=null,V=null;for(m in u)if(u.hasOwnProperty(m)){var ne=u[m];if(ne!=null)switch(m){case"name":v=ne;break;case"type":O=ne;break;case"checked":z=ne;break;case"defaultChecked":V=ne;break;case"value":j=ne;break;case"defaultValue":P=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(n(137,s));break;default:Je(a,s,m,ne,u,null)}}OS(a,j,P,z,V,O,v,!1);return;case"select":Re("invalid",a),m=O=j=null;for(v in u)if(u.hasOwnProperty(v)&&(P=u[v],P!=null))switch(v){case"value":j=P;break;case"defaultValue":O=P;break;case"multiple":m=P;default:Je(a,s,v,P,u,null)}s=j,u=O,a.multiple=!!m,s!=null?Ao(a,!!m,s,!1):u!=null&&Ao(a,!!m,u,!0);return;case"textarea":Re("invalid",a),j=v=m=null;for(O in u)if(u.hasOwnProperty(O)&&(P=u[O],P!=null))switch(O){case"value":m=P;break;case"defaultValue":v=P;break;case"children":j=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(n(91));break;default:Je(a,s,O,P,u,null)}AS(a,m,v,j);return;case"option":for(z in u)if(u.hasOwnProperty(z)&&(m=u[z],m!=null))switch(z){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Je(a,s,z,m,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(m=0;m<Vu.length;m++)Re(Vu[m],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(V in u)if(u.hasOwnProperty(V)&&(m=u[V],m!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,V,m,u,null)}return;default:if(lg(s)){for(ne in u)u.hasOwnProperty(ne)&&(m=u[ne],m!==void 0&&Vy(a,s,ne,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&&Je(a,s,P,m,u,null))}function s$(a,s,u,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var v=null,j=null,O=null,P=null,z=null,V=null,ne=null;for(ee in u){var se=u[ee];if(u.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":z=se;default:m.hasOwnProperty(ee)||Je(a,s,ee,null,m,se)}}for(var W in m){var ee=m[W];if(se=u[W],m.hasOwnProperty(W)&&(ee!=null||se!=null))switch(W){case"type":j=ee;break;case"name":v=ee;break;case"checked":V=ee;break;case"defaultChecked":ne=ee;break;case"value":O=ee;break;case"defaultValue":P=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(n(137,s));break;default:ee!==se&&Je(a,s,W,ee,m,se)}}sg(a,O,P,z,V,ne,j,v);return;case"select":ee=O=P=W=null;for(j in u)if(z=u[j],u.hasOwnProperty(j)&&z!=null)switch(j){case"value":break;case"multiple":ee=z;default:m.hasOwnProperty(j)||Je(a,s,j,null,m,z)}for(v in m)if(j=m[v],z=u[v],m.hasOwnProperty(v)&&(j!=null||z!=null))switch(v){case"value":W=j;break;case"defaultValue":P=j;break;case"multiple":O=j;default:j!==z&&Je(a,s,v,j,m,z)}s=P,u=O,m=ee,W!=null?Ao(a,!!u,W,!1):!!m!=!!u&&(s!=null?Ao(a,!!u,s,!0):Ao(a,!!u,u?[]:"",!1));return;case"textarea":ee=W=null;for(P in u)if(v=u[P],u.hasOwnProperty(P)&&v!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:Je(a,s,P,null,m,v)}for(O in m)if(v=m[O],j=u[O],m.hasOwnProperty(O)&&(v!=null||j!=null))switch(O){case"value":W=v;break;case"defaultValue":ee=v;break;case"children":break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(n(91));break;default:v!==j&&Je(a,s,O,v,m,j)}ES(a,W,ee);return;case"option":for(var me in u)if(W=u[me],u.hasOwnProperty(me)&&W!=null&&!m.hasOwnProperty(me))switch(me){case"selected":a.selected=!1;break;default:Je(a,s,me,null,m,W)}for(z in m)if(W=m[z],ee=u[z],m.hasOwnProperty(z)&&W!==ee&&(W!=null||ee!=null))switch(z){case"selected":a.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:Je(a,s,z,W,m,ee)}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 Se in u)W=u[Se],u.hasOwnProperty(Se)&&W!=null&&!m.hasOwnProperty(Se)&&Je(a,s,Se,null,m,W);for(V in m)if(W=m[V],ee=u[V],m.hasOwnProperty(V)&&W!==ee&&(W!=null||ee!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(n(137,s));break;default:Je(a,s,V,W,m,ee)}return;default:if(lg(s)){for(var et in u)W=u[et],u.hasOwnProperty(et)&&W!==void 0&&!m.hasOwnProperty(et)&&Vy(a,s,et,void 0,m,W);for(ne in m)W=m[ne],ee=u[ne],!m.hasOwnProperty(ne)||W===ee||W===void 0&&ee===void 0||Vy(a,s,ne,W,m,ee);return}}for(var K in u)W=u[K],u.hasOwnProperty(K)&&W!=null&&!m.hasOwnProperty(K)&&Je(a,s,K,null,m,W);for(se in m)W=m[se],ee=u[se],!m.hasOwnProperty(se)||W===ee||W==null&&ee==null||Je(a,s,se,W,m,ee)}function P_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function o$(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var v=u[m],j=v.transferSize,O=v.initiatorType,P=v.duration;if(j&&P&&P_(O)){for(O=0,P=v.responseEnd,m+=1;m<u.length;m++){var z=u[m],V=z.startTime;if(V>P)break;var ne=z.transferSize,se=z.initiatorType;ne&&P_(se)&&(z=z.responseEnd,O+=ne*(z<P?1:(P-V)/(z-V)))}if(--m,s+=8*(j+O)/(v.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Qy=null,Xy=null;function Uf(a){return a.nodeType===9?a:a.ownerDocument}function R_(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 M_(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 Wy(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 Zy=null;function l$(){var a=window.event;return a&&a.type==="popstate"?a===Zy?!1:(Zy=a,!0):(Zy=null,!1)}var D_=typeof setTimeout=="function"?setTimeout:void 0,u$=typeof clearTimeout=="function"?clearTimeout:void 0,k_=typeof Promise=="function"?Promise:void 0,c$=typeof queueMicrotask=="function"?queueMicrotask:typeof k_<"u"?function(a){return k_.resolve(null).then(a).catch(d$)}:D_;function d$(a){setTimeout(function(){throw a})}function wi(a){return a==="head"}function L_(a,s){var u=s,m=0;do{var v=u.nextSibling;if(a.removeChild(u),v&&v.nodeType===8)if(u=v.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(v),sl(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Xu(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Xu(u);for(var j=u.firstChild;j;){var O=j.nextSibling,P=j.nodeName;j[mu]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&j.rel.toLowerCase()==="stylesheet"||u.removeChild(j),j=O}}else u==="body"&&Xu(a.ownerDocument.body);u=v}while(u);sl(s)}function I_(a,s){var u=a;a=0;do{var m=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),m&&m.nodeType===8)if(u=m.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=m}while(u)}function Jy(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":Jy(u),ag(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function f$(a,s,u,m){for(;a.nodeType===1;){var v=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[mu])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(j=a.getAttribute("rel"),j==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(j!==v.rel||a.getAttribute("href")!==(v.href==null||v.href===""?null:v.href)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin)||a.getAttribute("title")!==(v.title==null?null:v.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(j=a.getAttribute("src"),(j!==(v.src==null?null:v.src)||a.getAttribute("type")!==(v.type==null?null:v.type)||a.getAttribute("crossorigin")!==(v.crossOrigin==null?null:v.crossOrigin))&&j&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var j=v.name==null?null:""+v.name;if(v.type==="hidden"&&a.getAttribute("name")===j)return a}else return a;if(a=yn(a.nextSibling),a===null)break}return null}function h$(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=yn(a.nextSibling),a===null))return null;return a}function $_(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=yn(a.nextSibling),a===null))return null;return a}function ev(a){return a.data==="$?"||a.data==="$~"}function tv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function m$(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var m=function(){s(),u.removeEventListener("DOMContentLoaded",m)};u.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function yn(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 rv=null;function z_(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return yn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function B_(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 U_(a,s,u){switch(s=Uf(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 Xu(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);ag(a)}var vn=new Map,q_=new Set;function qf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ma=q.d;q.d={f:p$,r:g$,D:y$,C:v$,L:x$,m:b$,X:w$,S:j$,M:S$};function p$(){var a=Ma.f(),s=Mf();return a||s}function g$(a){var s=_o(a);s!==null&&s.tag===5&&s.type==="form"?iN(s):Ma.r(a)}var nl=typeof document>"u"?null:document;function H_(a,s,u){var m=nl;if(m&&typeof s=="string"&&s){var v=cn(s);v='link[rel="'+a+'"][href="'+v+'"]',typeof u=="string"&&(v+='[crossorigin="'+u+'"]'),q_.has(v)||(q_.add(v),a={rel:a,crossOrigin:u,href:s},m.querySelector(v)===null&&(s=m.createElement("link"),rr(s,"link",a),qt(s),m.head.appendChild(s)))}}function y$(a){Ma.D(a),H_("dns-prefetch",a,null)}function v$(a,s){Ma.C(a,s),H_("preconnect",a,s)}function x$(a,s,u){Ma.L(a,s,u);var m=nl;if(m&&a&&s){var v='link[rel="preload"][as="'+cn(s)+'"]';s==="image"&&u&&u.imageSrcSet?(v+='[imagesrcset="'+cn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(v+='[imagesizes="'+cn(u.imageSizes)+'"]')):v+='[href="'+cn(a)+'"]';var j=v;switch(s){case"style":j=al(a);break;case"script":j=il(a)}vn.has(j)||(a=g({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),vn.set(j,a),m.querySelector(v)!==null||s==="style"&&m.querySelector(Wu(j))||s==="script"&&m.querySelector(Zu(j))||(s=m.createElement("link"),rr(s,"link",a),qt(s),m.head.appendChild(s)))}}function b$(a,s){Ma.m(a,s);var u=nl;if(u&&a){var m=s&&typeof s.as=="string"?s.as:"script",v='link[rel="modulepreload"][as="'+cn(m)+'"][href="'+cn(a)+'"]',j=v;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=il(a)}if(!vn.has(j)&&(a=g({rel:"modulepreload",href:a},s),vn.set(j,a),u.querySelector(v)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Zu(j)))return}m=u.createElement("link"),rr(m,"link",a),qt(m),u.head.appendChild(m)}}}function j$(a,s,u){Ma.S(a,s,u);var m=nl;if(m&&a){var v=Oo(m).hoistableStyles,j=al(a);s=s||"default";var O=v.get(j);if(!O){var P={loading:0,preload:null};if(O=m.querySelector(Wu(j)))P.loading=5;else{a=g({rel:"stylesheet",href:a,"data-precedence":s},u),(u=vn.get(j))&&nv(a,u);var z=O=m.createElement("link");qt(z),rr(z,"link",a),z._p=new Promise(function(V,ne){z.onload=V,z.onerror=ne}),z.addEventListener("load",function(){P.loading|=1}),z.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Hf(O,s,m)}O={type:"stylesheet",instance:O,count:1,state:P},v.set(j,O)}}}function w$(a,s){Ma.X(a,s);var u=nl;if(u&&a){var m=Oo(u).hoistableScripts,v=il(a),j=m.get(v);j||(j=u.querySelector(Zu(v)),j||(a=g({src:a,async:!0},s),(s=vn.get(v))&&av(a,s),j=u.createElement("script"),qt(j),rr(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(v,j))}}function S$(a,s){Ma.M(a,s);var u=nl;if(u&&a){var m=Oo(u).hoistableScripts,v=il(a),j=m.get(v);j||(j=u.querySelector(Zu(v)),j||(a=g({src:a,async:!0,type:"module"},s),(s=vn.get(v))&&av(a,s),j=u.createElement("script"),qt(j),rr(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(v,j))}}function F_(a,s,u,m){var v=(v=xe.current)?qf(v):null;if(!v)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=Oo(v).hoistableStyles,m=u.get(s),m||(m={type:"style",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=al(u.href);var j=Oo(v).hoistableStyles,O=j.get(a);if(O||(v=v.ownerDocument||v,O={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(a,O),(j=v.querySelector(Wu(a)))&&!j._p&&(O.instance=j,O.state.loading=5),vn.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},vn.set(a,u),j||N$(v,a,u,O.state))),s&&m===null)throw Error(n(528,""));return O}if(s&&m!==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=Oo(v).hoistableScripts,m=u.get(s),m||(m={type:"script",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,a))}}function al(a){return'href="'+cn(a)+'"'}function Wu(a){return'link[rel="stylesheet"]['+a+"]"}function K_(a){return g({},a,{"data-precedence":a.precedence,precedence:null})}function N$(a,s,u,m){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?m.loading=1:(s=a.createElement("link"),m.preload=s,s.addEventListener("load",function(){return m.loading|=1}),s.addEventListener("error",function(){return m.loading|=2}),rr(s,"link",u),qt(s),a.head.appendChild(s))}function il(a){return'[src="'+cn(a)+'"]'}function Zu(a){return"script[async]"+a}function G_(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var m=a.querySelector('style[data-href~="'+cn(u.href)+'"]');if(m)return s.instance=m,qt(m),m;var v=g({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),qt(m),rr(m,"style",v),Hf(m,u.precedence,a),s.instance=m;case"stylesheet":v=al(u.href);var j=a.querySelector(Wu(v));if(j)return s.state.loading|=4,s.instance=j,qt(j),j;m=K_(u),(v=vn.get(v))&&nv(m,v),j=(a.ownerDocument||a).createElement("link"),qt(j);var O=j;return O._p=new Promise(function(P,z){O.onload=P,O.onerror=z}),rr(j,"link",m),s.state.loading|=4,Hf(j,u.precedence,a),s.instance=j;case"script":return j=il(u.src),(v=a.querySelector(Zu(j)))?(s.instance=v,qt(v),v):(m=u,(v=vn.get(j))&&(m=g({},u),av(m,v)),a=a.ownerDocument||a,v=a.createElement("script"),qt(v),rr(v,"link",m),a.head.appendChild(v),s.instance=v);case"void":return null;default:throw Error(n(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,Hf(m,u.precedence,a));return s.instance}function Hf(a,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),v=m.length?m[m.length-1]:null,j=v,O=0;O<m.length;O++){var P=m[O];if(P.dataset.precedence===s)j=P;else if(j!==v)break}j?j.parentNode.insertBefore(a,j.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function nv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function av(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var Ff=null;function Y_(a,s,u){if(Ff===null){var m=new Map,v=Ff=new Map;v.set(u,m)}else v=Ff,m=v.get(u),m||(m=new Map,v.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),v=0;v<u.length;v++){var j=u[v];if(!(j[mu]||j[Zt]||a==="link"&&j.getAttribute("rel")==="stylesheet")&&j.namespaceURI!=="http://www.w3.org/2000/svg"){var O=j.getAttribute(s)||"";O=a+O;var P=m.get(O);P?P.push(j):m.set(O,[j])}}return m}function V_(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function _$(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 Q_(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function O$(a,s,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var v=al(m.href),j=s.querySelector(Wu(v));if(j){s=j._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Kf.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=j,qt(j);return}j=s.ownerDocument||s,m=K_(m),(v=vn.get(v))&&nv(m,v),j=j.createElement("link"),qt(j);var O=j;O._p=new Promise(function(P,z){O.onload=P,O.onerror=z}),rr(j,"link",m),u.instance=j}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Kf.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var iv=0;function E$(a,s){return a.stylesheets&&a.count===0&&Yf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Yf(a,a.stylesheets),a.unsuspend){var j=a.unsuspend;a.unsuspend=null,j()}},6e4+s);0<a.imgBytes&&iv===0&&(iv=62500*o$());var v=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Yf(a,a.stylesheets),a.unsuspend)){var j=a.unsuspend;a.unsuspend=null,j()}},(a.imgBytes>iv?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(v)}}:null}function Kf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Gf=null;function Yf(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Gf=new Map,s.forEach(A$,a),Gf=null,Kf.call(a))}function A$(a,s){if(!(s.state.loading&4)){var u=Gf.get(a);if(u)var m=u.get(null);else{u=new Map,Gf.set(a,u);for(var v=a.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<v.length;j++){var O=v[j];(O.nodeName==="LINK"||O.getAttribute("media")!=="not all")&&(u.set(O.dataset.precedence,O),m=O)}m&&u.set(null,m)}v=s.instance,O=v.getAttribute("data-precedence"),j=u.get(O)||m,j===m&&u.set(null,v),u.set(O,v),this.count++,m=Kf.bind(this),v.addEventListener("load",m),v.addEventListener("error",m),j?j.parentNode.insertBefore(v,j.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(v,a.firstChild)),s.state.loading|=4}}var Ju={$$typeof:T,Provider:null,Consumer:null,_currentValue:J,_currentValue2:J,_threadCount:0};function T$(a,s,u,m,v,j,O,P,z){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=eg(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eg(0),this.hiddenUpdates=eg(null),this.identifierPrefix=m,this.onUncaughtError=v,this.onCaughtError=j,this.onRecoverableError=O,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function X_(a,s,u,m,v,j,O,P,z,V,ne,se){return a=new T$(a,s,u,O,z,V,ne,se,P),s=1,j===!0&&(s|=24),j=Yr(3,null,null,s),a.current=j,j.stateNode=a,s=$g(),s.refCount++,a.pooledCache=s,s.refCount++,j.memoizedState={element:m,isDehydrated:u,cache:s},qg(j),a}function W_(a){return a?(a=Lo,a):Lo}function Z_(a,s,u,m,v,j){v=W_(v),m.context===null?m.context=v:m.pendingContext=v,m=di(s),m.payload={element:u},j=j===void 0?null:j,j!==null&&(m.callback=j),u=fi(a,m,s),u!==null&&(Lr(u,a,s),Pu(u,a,s))}function J_(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function sv(a,s){J_(a,s),(a=a.alternate)&&J_(a,s)}function eO(a){if(a.tag===13||a.tag===31){var s=cs(a,67108864);s!==null&&Lr(s,a,67108864),sv(a,67108864)}}function tO(a){if(a.tag===13||a.tag===31){var s=Zr();s=tg(s);var u=cs(a,s);u!==null&&Lr(u,a,s),sv(a,s)}}var Vf=!0;function C$(a,s,u,m){var v=k.T;k.T=null;var j=q.p;try{q.p=2,ov(a,s,u,m)}finally{q.p=j,k.T=v}}function P$(a,s,u,m){var v=k.T;k.T=null;var j=q.p;try{q.p=8,ov(a,s,u,m)}finally{q.p=j,k.T=v}}function ov(a,s,u,m){if(Vf){var v=lv(m);if(v===null)Yy(a,s,m,Qf,u),nO(a,m);else if(M$(v,a,s,u,m))m.stopPropagation();else if(nO(a,m),s&4&&-1<R$.indexOf(a)){for(;v!==null;){var j=_o(v);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var O=is(j.pendingLanes);if(O!==0){var P=j;for(P.pendingLanes|=2,P.entangledLanes|=2;O;){var z=1<<31-Kr(O);P.entanglements[1]|=z,O&=~z}Qn(j),(Ge&6)===0&&(Pf=Ce()+500,Yu(0))}}break;case 31:case 13:P=cs(j,2),P!==null&&Lr(P,j,2),Mf(),sv(j,2)}if(j=lv(m),j===null&&Yy(a,s,m,Qf,u),j===v)break;v=j}v!==null&&m.stopPropagation()}else Yy(a,s,m,null,u)}}function lv(a){return a=cg(a),uv(a)}var Qf=null;function uv(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 rO(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(mr()){case Kn:return 2;case Ld:return 8;case Id:case vL:return 32;case fS:return 268435456;default:return 32}default:return 32}}var cv=!1,Si=null,Ni=null,_i=null,ec=new Map,tc=new Map,Oi=[],R$="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 nO(a,s){switch(a){case"focusin":case"focusout":Si=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":ec.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":tc.delete(s.pointerId)}}function rc(a,s,u,m,v,j){return a===null||a.nativeEvent!==j?(a={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:j,targetContainers:[v]},s!==null&&(s=_o(s),s!==null&&eO(s)),a):(a.eventSystemFlags|=m,s=a.targetContainers,v!==null&&s.indexOf(v)===-1&&s.push(v),a)}function M$(a,s,u,m,v){switch(s){case"focusin":return Si=rc(Si,a,s,u,m,v),!0;case"dragenter":return Ni=rc(Ni,a,s,u,m,v),!0;case"mouseover":return _i=rc(_i,a,s,u,m,v),!0;case"pointerover":var j=v.pointerId;return ec.set(j,rc(ec.get(j)||null,a,s,u,m,v)),!0;case"gotpointercapture":return j=v.pointerId,tc.set(j,rc(tc.get(j)||null,a,s,u,m,v)),!0}return!1}function aO(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,vS(a.priority,function(){tO(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,vS(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 Xf(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=lv(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);ug=m,u.target.dispatchEvent(m),ug=null}else return s=_o(u),s!==null&&eO(s),a.blockedOn=u,!1;s.shift()}return!0}function iO(a,s,u){Xf(a)&&u.delete(s)}function D$(){cv=!1,Si!==null&&Xf(Si)&&(Si=null),Ni!==null&&Xf(Ni)&&(Ni=null),_i!==null&&Xf(_i)&&(_i=null),ec.forEach(iO),tc.forEach(iO)}function Wf(a,s){a.blockedOn===s&&(a.blockedOn=null,cv||(cv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,D$)))}var Zf=null;function sO(a){Zf!==a&&(Zf=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Zf===a&&(Zf=null);for(var s=0;s<a.length;s+=3){var u=a[s],m=a[s+1],v=a[s+2];if(typeof m!="function"){if(uv(m||u)===null)continue;break}var j=_o(u);j!==null&&(a.splice(s,3),s-=3,ly(j,{pending:!0,data:v,method:u.method,action:m},m,v))}}))}function sl(a){function s(z){return Wf(z,a)}Si!==null&&Wf(Si,a),Ni!==null&&Wf(Ni,a),_i!==null&&Wf(_i,a),ec.forEach(s),tc.forEach(s);for(var u=0;u<Oi.length;u++){var m=Oi[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<Oi.length&&(u=Oi[0],u.blockedOn===null);)aO(u),u.blockedOn===null&&Oi.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var v=u[m],j=u[m+1],O=v[Cr]||null;if(typeof j=="function")O||sO(u);else if(O){var P=null;if(j&&j.hasAttribute("formAction")){if(v=j,O=j[Cr]||null)P=O.formAction;else if(uv(v)!==null)continue}else P=O.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),sO(u)}}}function oO(){function a(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(O){return v=O})},focusReset:"manual",scroll:"manual"})}function s(){v!==null&&(v(),v=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var j=navigation.currentEntry;j&&j.url!=null&&navigation.navigate(j.url,{state:j.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,v=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),v!==null&&(v(),v=null)}}}function dv(a){this._internalRoot=a}Jf.prototype.render=dv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(n(409));var u=s.current,m=Zr();Z_(u,m,a,s,null,null)},Jf.prototype.unmount=dv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;Z_(a.current,2,null,a,null,null),Mf(),s[So]=null}};function Jf(a){this._internalRoot=a}Jf.prototype.unstable_scheduleHydration=function(a){if(a){var s=yS();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Oi.length&&s!==0&&s<Oi[u].priority;u++);Oi.splice(u,0,a),u===0&&aO(a)}};var lO=t.version;if(lO!=="19.2.4")throw Error(n(527,lO,"19.2.4"));q.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=h(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var k$={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var eh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!eh.isDisabled&&eh.supportsFiber)try{du=eh.inject(k$),Fr=eh}catch{}}return ac.createRoot=function(a,s){if(!i(a))throw Error(n(299));var u=!1,m="",v=pN,j=gN,O=yN;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(v=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(O=s.onRecoverableError)),s=X_(a,1,!1,null,null,u,m,null,v,j,O,oO),a[So]=s.current,Gy(a),new dv(s)},ac.hydrateRoot=function(a,s,u){if(!i(a))throw Error(n(299));var m=!1,v="",j=pN,O=gN,P=yN,z=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(v=u.identifierPrefix),u.onUncaughtError!==void 0&&(j=u.onUncaughtError),u.onCaughtError!==void 0&&(O=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&(z=u.formState)),s=X_(a,1,!0,s,u??null,m,v,z,j,O,P,oO),s.context=W_(null),u=s.current,m=Zr(),m=tg(m),v=di(m),v.callback=null,fi(u,v,m),u=m,s.current.lanes=u,hu(s,u),Qn(s),a[So]=s.current,Gy(a),new Jf(s)},ac.version="19.2.4",ac}var xO;function V$(){if(xO)return gv.exports;xO=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(),gv.exports=Y$(),gv.exports}var Q$=V$(),cd=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(){}},zs,Li,El,N2,X$=(N2=class extends cd{constructor(){super();Ne(this,zs);Ne(this,Li);Ne(this,El);fe(this,El,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){U(this,Li)||this.setEventListener(U(this,El))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,Li))==null||t.call(this),fe(this,Li,void 0))}setEventListener(t){var r;fe(this,El,t),(r=U(this,Li))==null||r.call(this),fe(this,Li,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){U(this,zs)!==t&&(fe(this,zs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof U(this,zs)=="boolean"?U(this,zs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},zs=new WeakMap,Li=new WeakMap,El=new WeakMap,N2),Fb=new X$,W$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ii,Hb,_2,Z$=(_2=class{constructor(){Ne(this,Ii,W$);Ne(this,Hb,!1)}setTimeoutProvider(e){fe(this,Ii,e)}setTimeout(e,t){return U(this,Ii).setTimeout(e,t)}clearTimeout(e){U(this,Ii).clearTimeout(e)}setInterval(e,t){return U(this,Ii).setInterval(e,t)}clearInterval(e){U(this,Ii).clearInterval(e)}},Ii=new WeakMap,Hb=new WeakMap,_2),Ps=new Z$;function J$(e){setTimeout(e,0)}var ez=typeof window>"u"||"Deno"in globalThis;function $r(){}function tz(e,t){return typeof e=="function"?e(t):e}function bx(e){return typeof e=="number"&&e>=0&&e!==1/0}function k2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yi(e,t){return typeof e=="function"?e(t):e}function Nn(e,t){return typeof e=="function"?e(t):e}function bO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:l,stale:c}=e;if(l){if(n){if(t.queryHash!==Kb(l,t.options))return!1}else if(!Pc(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 jO(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(Cc(t.options.mutationKey)!==Cc(o))return!1}else if(!Pc(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Kb(e,t){return((t==null?void 0:t.queryKeyHashFn)||Cc)(e)}function Cc(e){return JSON.stringify(e,(t,r)=>wx(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Pc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Pc(e[r],t[r])):!1}var rz=Object.prototype.hasOwnProperty;function L2(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=wO(e)&&wO(t);if(!n&&!(wx(e)&&wx(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 h=0;for(let p=0;p<c;p++){const g=n?p:l[p],y=e[g],x=t[g];if(y===x){f[g]=y,(n?p<o:rz.call(e,g))&&h++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){f[g]=x;continue}const b=L2(y,x,r+1);f[g]=b,b===y&&h++}return o===c&&h===o?e:f}function jx(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 wO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wx(e){if(!SO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!SO(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function SO(e){return Object.prototype.toString.call(e)==="[object Object]"}function nz(e){return new Promise(t=>{Ps.setTimeout(t,e)})}function Sx(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?L2(e,t):t}function az(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function iz(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Gb=Symbol();function I2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Gb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function $2(e,t){return typeof e=="function"?e(...t):!!e}function sz(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 Rc=(()=>{let e=()=>ez;return{isServer(){return e()},setIsServer(t){e=t}}})();function Nx(){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 oz=J$;function lz(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=oz;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 or=lz(),Al,$i,Tl,O2,uz=(O2=class extends cd{constructor(){super();Ne(this,Al,!0);Ne(this,$i);Ne(this,Tl);fe(this,Tl,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(){U(this,$i)||this.setEventListener(U(this,Tl))}onUnsubscribe(){var t;this.hasListeners()||((t=U(this,$i))==null||t.call(this),fe(this,$i,void 0))}setEventListener(t){var r;fe(this,Tl,t),(r=U(this,$i))==null||r.call(this),fe(this,$i,t(this.setOnline.bind(this)))}setOnline(t){U(this,Al)!==t&&(fe(this,Al,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return U(this,Al)}},Al=new WeakMap,$i=new WeakMap,Tl=new WeakMap,O2),Lh=new uz;function cz(e){return Math.min(1e3*2**e,3e4)}function z2(e){return(e??"online")==="online"?Lh.isOnline():!0}var _x=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function B2(e){let t=!1,r=0,n;const i=Nx(),o=()=>i.status!=="pending",l=w=>{var N;if(!o()){const _=new _x(w);y(_),(N=e.onCancel)==null||N.call(e,_)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>Fb.isFocused()&&(e.networkMode==="always"||Lh.isOnline())&&e.canRun(),p=()=>z2(e.networkMode)&&e.canRun(),g=w=>{o()||(n==null||n(),i.resolve(w))},y=w=>{o()||(n==null||n(),i.reject(w))},x=()=>new Promise(w=>{var N;n=_=>{(o()||h())&&w(_)},(N=e.onPause)==null||N.call(e)}).then(()=>{var w;n=void 0,o()||(w=e.onContinue)==null||w.call(e)}),b=()=>{if(o())return;let w;const N=r===0?e.initialPromise:void 0;try{w=N??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var R;if(o())return;const E=e.retry??(Rc.isServer()?0:3),T=e.retryDelay??cz,A=typeof T=="function"?T(r,_):T,C=E===!0||typeof E=="number"&&r<E||typeof E=="function"&&E(r,_);if(t||!C){y(_);return}r++,(R=e.onFail)==null||R.call(e,r,_),nz(A).then(()=>h()?void 0:x()).then(()=>{t?y(_):b()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:f,canStart:p,start:()=>(p()?b():x().then(b),i)}}var Bs,E2,U2=(E2=class{constructor(){Ne(this,Bs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bx(this.gcTime)&&fe(this,Bs,Ps.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rc.isServer()?1/0:300*1e3))}clearGcTimeout(){U(this,Bs)&&(Ps.clearTimeout(U(this,Bs)),fe(this,Bs,void 0))}},Bs=new WeakMap,E2),Us,Cl,Sn,qs,Ft,id,Hs,en,q2,Da,A2,dz=(A2=class extends U2{constructor(t){super();Ne(this,en);Ne(this,Us);Ne(this,Cl);Ne(this,Sn);Ne(this,qs);Ne(this,Ft);Ne(this,id);Ne(this,Hs);fe(this,Hs,!1),fe(this,id,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,qs,t.client),fe(this,Sn,U(this,qs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,Us,_O(this.options)),this.state=t.state??U(this,Us),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=U(this,Ft))==null?void 0:t.promise}setOptions(t){if(this.options={...U(this,id),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=_O(this.options);r.data!==void 0&&(this.setState(NO(r.data,r.dataUpdatedAt)),fe(this,Us,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&U(this,Sn).remove(this)}setData(t,r){const n=Sx(this.state.data,t,this.options);return Le(this,en,Da).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Le(this,en,Da).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=U(this,Ft))==null?void 0:n.promise;return(i=U(this,Ft))==null||i.cancel(t),r?r.then($r).catch($r):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return U(this,Us)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Nn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Gb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Yi(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:!k2(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=U(this,Ft))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=U(this,Ft))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),U(this,Sn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(U(this,Ft)&&(U(this,Hs)||Le(this,en,q2).call(this)?U(this,Ft).cancel({revert:!0}):U(this,Ft).cancelRetry()),this.scheduleGc()),U(this,Sn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Le(this,en,Da).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,p,g,y,x,b,w,N,_,E,T;if(this.state.fetchStatus!=="idle"&&((f=U(this,Ft))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(U(this,Ft))return U(this,Ft).continueRetry(),U(this,Ft).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(C=>C.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(fe(this,Hs,!0),n.signal)})},o=()=>{const A=I2(this.options,r),R=(()=>{const D={client:U(this,qs),queryKey:this.queryKey,meta:this.meta};return i(D),D})();return fe(this,Hs,!1),this.options.persister?this.options.persister(A,R,this):A(R)},c=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:U(this,qs),state:this.state,fetchFn:o};return i(A),A})();(h=this.options.behavior)==null||h.onFetch(c,this),fe(this,Cl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Le(this,en,Da).call(this,{type:"fetch",meta:(g=c.fetchOptions)==null?void 0:g.meta}),fe(this,Ft,B2({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof _x&&A.revert&&this.setState({...U(this,Cl),fetchStatus:"idle"}),n.abort()},onFail:(A,C)=>{Le(this,en,Da).call(this,{type:"failed",failureCount:A,error:C})},onPause:()=>{Le(this,en,Da).call(this,{type:"pause"})},onContinue:()=>{Le(this,en,Da).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await U(this,Ft).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(x=(y=U(this,Sn).config).onSuccess)==null||x.call(y,A,this),(w=(b=U(this,Sn).config).onSettled)==null||w.call(b,A,this.state.error,this),A}catch(A){if(A instanceof _x){if(A.silent)return U(this,Ft).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Le(this,en,Da).call(this,{type:"error",error:A}),(_=(N=U(this,Sn).config).onError)==null||_.call(N,A,this),(T=(E=U(this,Sn).config).onSettled)==null||T.call(E,this.state.data,A,this),A}finally{this.scheduleGc()}}},Us=new WeakMap,Cl=new WeakMap,Sn=new WeakMap,qs=new WeakMap,Ft=new WeakMap,id=new WeakMap,Hs=new WeakMap,en=new WeakSet,q2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Da=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,...H2(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...NO(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Cl,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),or.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),U(this,Sn).notify({query:this,type:"updated",action:t})})},A2);function H2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:z2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function NO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function _O(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 Ir,$e,sd,Sr,Fs,Pl,La,zi,od,Rl,Ml,Ks,Gs,Bi,Dl,Ye,jc,Ox,Ex,Ax,Tx,Cx,Px,Rx,K2,T2,F2=(T2=class extends cd{constructor(t,r){super();Ne(this,Ye);Ne(this,Ir);Ne(this,$e);Ne(this,sd);Ne(this,Sr);Ne(this,Fs);Ne(this,Pl);Ne(this,La);Ne(this,zi);Ne(this,od);Ne(this,Rl);Ne(this,Ml);Ne(this,Ks);Ne(this,Gs);Ne(this,Bi);Ne(this,Dl,new Set);this.options=r,fe(this,Ir,t),fe(this,zi,null),fe(this,La,Nx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(U(this,$e).addObserver(this),OO(U(this,$e),this.options)?Le(this,Ye,jc).call(this):this.updateResult(),Le(this,Ye,Tx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Mx(U(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Mx(U(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Le(this,Ye,Cx).call(this),Le(this,Ye,Px).call(this),U(this,$e).removeObserver(this)}setOptions(t){const r=this.options,n=U(this,$e);if(this.options=U(this,Ir).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nn(this.options.enabled,U(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Le(this,Ye,Rx).call(this),U(this,$e).setOptions(this.options),r._defaulted&&!jx(this.options,r)&&U(this,Ir).getQueryCache().notify({type:"observerOptionsUpdated",query:U(this,$e),observer:this});const i=this.hasListeners();i&&EO(U(this,$e),n,this.options,r)&&Le(this,Ye,jc).call(this),this.updateResult(),i&&(U(this,$e)!==n||Nn(this.options.enabled,U(this,$e))!==Nn(r.enabled,U(this,$e))||Yi(this.options.staleTime,U(this,$e))!==Yi(r.staleTime,U(this,$e)))&&Le(this,Ye,Ox).call(this);const o=Le(this,Ye,Ex).call(this);i&&(U(this,$e)!==n||Nn(this.options.enabled,U(this,$e))!==Nn(r.enabled,U(this,$e))||o!==U(this,Bi))&&Le(this,Ye,Ax).call(this,o)}getOptimisticResult(t){const r=U(this,Ir).getQueryCache().build(U(this,Ir),t),n=this.createResult(r,t);return hz(this,n)&&(fe(this,Sr,n),fe(this,Pl,this.options),fe(this,Fs,U(this,$e).state)),n}getCurrentResult(){return U(this,Sr)}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&&U(this,La).status==="pending"&&U(this,La).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){U(this,Dl).add(t)}getCurrentQuery(){return U(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=U(this,Ir).defaultQueryOptions(t),n=U(this,Ir).getQueryCache().build(U(this,Ir),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Le(this,Ye,jc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),U(this,Sr)))}createResult(t,r){var $;const n=U(this,$e),i=this.options,o=U(this,Sr),l=U(this,Fs),c=U(this,Pl),h=t!==n?t.state:U(this,sd),{state:p}=t;let g={...p},y=!1,x;if(r._optimisticResults){const I=this.hasListeners(),F=!I&&OO(t,r),H=I&&EO(t,n,r,i);(F||H)&&(g={...g,...H2(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:N}=g;x=g.data;let _=!1;if(r.placeholderData!==void 0&&x===void 0&&N==="pending"){let I;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(I=o.data,_=!0):I=typeof r.placeholderData=="function"?r.placeholderData(($=U(this,Ml))==null?void 0:$.state.data,U(this,Ml)):r.placeholderData,I!==void 0&&(N="success",x=Sx(o==null?void 0:o.data,I,r),y=!0)}if(r.select&&x!==void 0&&!_)if(o&&x===(l==null?void 0:l.data)&&r.select===U(this,od))x=U(this,Rl);else try{fe(this,od,r.select),x=r.select(x),x=Sx(o==null?void 0:o.data,x,r),fe(this,Rl,x),fe(this,zi,null)}catch(I){fe(this,zi,I)}U(this,zi)&&(b=U(this,zi),x=U(this,Rl),w=Date.now(),N="error");const E=g.fetchStatus==="fetching",T=N==="pending",A=N==="error",C=T&&E,R=x!==void 0,M={status:N,fetchStatus:g.fetchStatus,isPending:T,isSuccess:N==="success",isError:A,isInitialLoading:C,isLoading:C,data:x,dataUpdatedAt:g.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!T,isLoadingError:A&&!R,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:A&&R,isStale:Yb(t,r),refetch:this.refetch,promise:U(this,La),isEnabled:Nn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const I=M.data!==void 0,F=M.status==="error"&&!I,H=G=>{F?G.reject(M.error):I&&G.resolve(M.data)},ie=()=>{const G=fe(this,La,M.promise=Nx());H(G)},Z=U(this,La);switch(Z.status){case"pending":t.queryHash===n.queryHash&&H(Z);break;case"fulfilled":(F||M.data!==Z.value)&&ie();break;case"rejected":(!F||M.error!==Z.reason)&&ie();break}}return M}updateResult(){const t=U(this,Sr),r=this.createResult(U(this,$e),this.options);if(fe(this,Fs,U(this,$e).state),fe(this,Pl,this.options),U(this,Fs).data!==void 0&&fe(this,Ml,U(this,$e)),jx(r,t))return;fe(this,Sr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!U(this,Dl).size)return!0;const l=new Set(o??U(this,Dl));return this.options.throwOnError&&l.add("error"),Object.keys(U(this,Sr)).some(c=>{const f=c;return U(this,Sr)[f]!==t[f]&&l.has(f)})};Le(this,Ye,K2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Le(this,Ye,Tx).call(this)}},Ir=new WeakMap,$e=new WeakMap,sd=new WeakMap,Sr=new WeakMap,Fs=new WeakMap,Pl=new WeakMap,La=new WeakMap,zi=new WeakMap,od=new WeakMap,Rl=new WeakMap,Ml=new WeakMap,Ks=new WeakMap,Gs=new WeakMap,Bi=new WeakMap,Dl=new WeakMap,Ye=new WeakSet,jc=function(t){Le(this,Ye,Rx).call(this);let r=U(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch($r)),r},Ox=function(){Le(this,Ye,Cx).call(this);const t=Yi(this.options.staleTime,U(this,$e));if(Rc.isServer()||U(this,Sr).isStale||!bx(t))return;const n=k2(U(this,Sr).dataUpdatedAt,t)+1;fe(this,Ks,Ps.setTimeout(()=>{U(this,Sr).isStale||this.updateResult()},n))},Ex=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(U(this,$e)):this.options.refetchInterval)??!1},Ax=function(t){Le(this,Ye,Px).call(this),fe(this,Bi,t),!(Rc.isServer()||Nn(this.options.enabled,U(this,$e))===!1||!bx(U(this,Bi))||U(this,Bi)===0)&&fe(this,Gs,Ps.setInterval(()=>{(this.options.refetchIntervalInBackground||Fb.isFocused())&&Le(this,Ye,jc).call(this)},U(this,Bi)))},Tx=function(){Le(this,Ye,Ox).call(this),Le(this,Ye,Ax).call(this,Le(this,Ye,Ex).call(this))},Cx=function(){U(this,Ks)&&(Ps.clearTimeout(U(this,Ks)),fe(this,Ks,void 0))},Px=function(){U(this,Gs)&&(Ps.clearInterval(U(this,Gs)),fe(this,Gs,void 0))},Rx=function(){const t=U(this,Ir).getQueryCache().build(U(this,Ir),this.options);if(t===U(this,$e))return;const r=U(this,$e);fe(this,$e,t),fe(this,sd,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},K2=function(t){or.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(U(this,Sr))}),U(this,Ir).getQueryCache().notify({query:U(this,$e),type:"observerResultsUpdated"})})},T2);function fz(e,t){return Nn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function OO(e,t){return fz(e,t)||e.state.data!==void 0&&Mx(e,t,t.refetchOnMount)}function Mx(e,t,r){if(Nn(t.enabled,e)!==!1&&Yi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Yb(e,t)}return!1}function EO(e,t,r,n){return(e!==t||Nn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Yb(e,r)}function Yb(e,t){return Nn(t.enabled,e)!==!1&&e.isStaleByTime(Yi(t.staleTime,e))}function hz(e,t){return!jx(e.getCurrentResult(),t)}function Ih(e){return{onFetch:(t,r)=>{var p,g,y,x,b;const n=t.options,i=(y=(g=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:g.fetchMore)==null?void 0:y.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],l=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let w=!1;const N=T=>{sz(T,()=>t.signal,()=>w=!0)},_=I2(t.options,t.fetchOptions),E=async(T,A,C)=>{if(w)return Promise.reject();if(A==null&&T.pages.length)return Promise.resolve(T);const D=(()=>{const F={client:t.client,queryKey:t.queryKey,pageParam:A,direction:C?"backward":"forward",meta:t.options.meta};return N(F),F})(),M=await _(D),{maxPages:$}=t.options,I=C?iz:az;return{pages:I(T.pages,M,$),pageParams:I(T.pageParams,A,$)}};if(i&&o.length){const T=i==="backward",A=T?G2:Dx,C={pages:o,pageParams:l},R=A(n,C);c=await E(C,R,T)}else{const T=e??o.length;do{const A=f===0?l[0]??n.initialPageParam:Dx(n,c);if(f>0&&A==null)break;c=await E(c,A),f++}while(f<T)}return c};t.options.persister?t.fetchFn=()=>{var w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function Dx(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 mz(e,t){return t?Dx(e,t)!=null:!1}function pz(e,t){return!t||!e.getPreviousPageParam?!1:G2(e,t)!=null}var gz=class extends F2{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:Ih()})}getOptimisticResult(e){return e.behavior=Ih(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,w;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:l,isRefetchError:c}=n,f=(w=(b=r.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:w.direction,h=l&&f==="forward",p=i&&f==="forward",g=l&&f==="backward",y=i&&f==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:mz(t,r.data),hasPreviousPage:pz(t,r.data),isFetchNextPageError:h,isFetchingNextPage:p,isFetchPreviousPageError:g,isFetchingPreviousPage:y,isRefetchError:c&&!h&&!g,isRefetching:o&&!p&&!y}}},ld,ea,gr,Ys,ta,Ci,C2,yz=(C2=class extends U2{constructor(t){super();Ne(this,ta);Ne(this,ld);Ne(this,ea);Ne(this,gr);Ne(this,Ys);fe(this,ld,t.client),this.mutationId=t.mutationId,fe(this,gr,t.mutationCache),fe(this,ea,[]),this.state=t.state||vz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){U(this,ea).includes(t)||(U(this,ea).push(t),this.clearGcTimeout(),U(this,gr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,ea,U(this,ea).filter(r=>r!==t)),this.scheduleGc(),U(this,gr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){U(this,ea).length||(this.state.status==="pending"?this.scheduleGc():U(this,gr).remove(this))}continue(){var t;return((t=U(this,Ys))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,f,h,p,g,y,x,b,w,N,_,E,T,A,C,R,D;const r=()=>{Le(this,ta,Ci).call(this,{type:"continue"})},n={client:U(this,ld),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Ys,B2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,$)=>{Le(this,ta,Ci).call(this,{type:"failed",failureCount:M,error:$})},onPause:()=>{Le(this,ta,Ci).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>U(this,gr).canRun(this)}));const i=this.state.status==="pending",o=!U(this,Ys).canStart();try{if(i)r();else{Le(this,ta,Ci).call(this,{type:"pending",variables:t,isPaused:o}),U(this,gr).config.onMutate&&await U(this,gr).config.onMutate(t,this,n);const $=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,n));$!==this.state.context&&Le(this,ta,Ci).call(this,{type:"pending",context:$,variables:t,isPaused:o})}const M=await U(this,Ys).start();return await((h=(f=U(this,gr).config).onSuccess)==null?void 0:h.call(f,M,t,this.state.context,this,n)),await((g=(p=this.options).onSuccess)==null?void 0:g.call(p,M,t,this.state.context,n)),await((x=(y=U(this,gr).config).onSettled)==null?void 0:x.call(y,M,null,this.state.variables,this.state.context,this,n)),await((w=(b=this.options).onSettled)==null?void 0:w.call(b,M,null,t,this.state.context,n)),Le(this,ta,Ci).call(this,{type:"success",data:M}),M}catch(M){try{await((_=(N=U(this,gr).config).onError)==null?void 0:_.call(N,M,t,this.state.context,this,n))}catch($){Promise.reject($)}try{await((T=(E=this.options).onError)==null?void 0:T.call(E,M,t,this.state.context,n))}catch($){Promise.reject($)}try{await((C=(A=U(this,gr).config).onSettled)==null?void 0:C.call(A,void 0,M,this.state.variables,this.state.context,this,n))}catch($){Promise.reject($)}try{await((D=(R=this.options).onSettled)==null?void 0:D.call(R,void 0,M,t,this.state.context,n))}catch($){Promise.reject($)}throw Le(this,ta,Ci).call(this,{type:"error",error:M}),M}finally{U(this,gr).runNext(this)}}},ld=new WeakMap,ea=new WeakMap,gr=new WeakMap,Ys=new WeakMap,ta=new WeakSet,Ci=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),or.batch(()=>{U(this,ea).forEach(n=>{n.onMutationUpdate(t)}),U(this,gr).notify({mutation:this,type:"updated",action:t})})},C2);function vz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ia,Dn,ud,P2,xz=(P2=class extends cd{constructor(t={}){super();Ne(this,Ia);Ne(this,Dn);Ne(this,ud);this.config=t,fe(this,Ia,new Set),fe(this,Dn,new Map),fe(this,ud,0)}build(t,r,n){const i=new yz({client:t,mutationCache:this,mutationId:++th(this,ud)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){U(this,Ia).add(t);const r=rh(t);if(typeof r=="string"){const n=U(this,Dn).get(r);n?n.push(t):U(this,Dn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(U(this,Ia).delete(t)){const r=rh(t);if(typeof r=="string"){const n=U(this,Dn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&U(this,Dn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=rh(t);if(typeof r=="string"){const n=U(this,Dn).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=rh(t);if(typeof r=="string"){const i=(n=U(this,Dn).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(){or.batch(()=>{U(this,Ia).forEach(t=>{this.notify({type:"removed",mutation:t})}),U(this,Ia).clear(),U(this,Dn).clear()})}getAll(){return Array.from(U(this,Ia))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>jO(r,n))}findAll(t={}){return this.getAll().filter(r=>jO(t,r))}notify(t){or.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return or.batch(()=>Promise.all(t.map(r=>r.continue().catch($r))))}},Ia=new WeakMap,Dn=new WeakMap,ud=new WeakMap,P2);function rh(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ra,R2,bz=(R2=class extends cd{constructor(t={}){super();Ne(this,ra);this.config=t,fe(this,ra,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Kb(i,r);let l=this.get(o);return l||(l=new dz({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){U(this,ra).has(t.queryHash)||(U(this,ra).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=U(this,ra).get(t.queryHash);r&&(t.destroy(),r===t&&U(this,ra).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){or.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return U(this,ra).get(t)}getAll(){return[...U(this,ra).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>bO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>bO(t,n)):r}notify(t){or.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){or.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){or.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ra=new WeakMap,R2),vt,Ui,qi,kl,Ll,Hi,Il,$l,M2,jz=(M2=class{constructor(e={}){Ne(this,vt);Ne(this,Ui);Ne(this,qi);Ne(this,kl);Ne(this,Ll);Ne(this,Hi);Ne(this,Il);Ne(this,$l);fe(this,vt,e.queryCache||new bz),fe(this,Ui,e.mutationCache||new xz),fe(this,qi,e.defaultOptions||{}),fe(this,kl,new Map),fe(this,Ll,new Map),fe(this,Hi,0)}mount(){th(this,Hi)._++,U(this,Hi)===1&&(fe(this,Il,Fb.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,vt).onFocus())})),fe(this,$l,Lh.subscribe(async e=>{e&&(await this.resumePausedMutations(),U(this,vt).onOnline())})))}unmount(){var e,t;th(this,Hi)._--,U(this,Hi)===0&&((e=U(this,Il))==null||e.call(this),fe(this,Il,void 0),(t=U(this,$l))==null||t.call(this),fe(this,$l,void 0))}isFetching(e){return U(this,vt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return U(this,Ui).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=U(this,vt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=U(this,vt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Yi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return U(this,vt).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=U(this,vt).get(n.queryHash),o=i==null?void 0:i.state.data,l=tz(t,o);if(l!==void 0)return U(this,vt).build(this,n).setData(l,{...r,manual:!0})}setQueriesData(e,t,r){return or.batch(()=>U(this,vt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=U(this,vt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=U(this,vt);or.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=U(this,vt);return or.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=or.batch(()=>U(this,vt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then($r).catch($r)}invalidateQueries(e,t={}){return or.batch(()=>(U(this,vt).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=or.batch(()=>U(this,vt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch($r)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then($r)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=U(this,vt).build(this,t);return r.isStaleByTime(Yi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then($r).catch($r)}fetchInfiniteQuery(e){return e.behavior=Ih(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then($r).catch($r)}ensureInfiniteQueryData(e){return e.behavior=Ih(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Lh.isOnline()?U(this,Ui).resumePausedMutations():Promise.resolve()}getQueryCache(){return U(this,vt)}getMutationCache(){return U(this,Ui)}getDefaultOptions(){return U(this,qi)}setDefaultOptions(e){fe(this,qi,e)}setQueryDefaults(e,t){U(this,kl).set(Cc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...U(this,kl).values()],r={};return t.forEach(n=>{Pc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){U(this,Ll).set(Cc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...U(this,Ll).values()],r={};return t.forEach(n=>{Pc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...U(this,qi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Kb(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===Gb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...U(this,qi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){U(this,vt).clear(),U(this,Ui).clear()}},vt=new WeakMap,Ui=new WeakMap,qi=new WeakMap,kl=new WeakMap,Ll=new WeakMap,Hi=new WeakMap,Il=new WeakMap,$l=new WeakMap,M2),Y2=S.createContext(void 0),co=e=>{const t=S.useContext(Y2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},wz=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(Y2.Provider,{value:e,children:t})),V2=S.createContext(!1),Sz=()=>S.useContext(V2);V2.Provider;function Nz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var _z=S.createContext(Nz()),Oz=()=>S.useContext(_z),Ez=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?$2(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},Az=e=>{S.useEffect(()=>{e.clearReset()},[e])},Tz=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||$2(r,[e.error,n])),Cz=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))}},Pz=(e,t)=>e.isLoading&&e.isFetching&&!t,Rz=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,AO=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Q2(e,t,r){var y,x,b,w;const n=Sz(),i=Oz(),o=co(),l=o.defaultQueryOptions(e);(x=(y=o.getDefaultOptions().queries)==null?void 0:y._experimental_beforeQuery)==null||x.call(y,l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=n?"isRestoring":"optimistic",Cz(l),Ez(l,i,c),Az(i);const f=!o.getQueryCache().get(l.queryHash),[h]=S.useState(()=>new t(o,l)),p=h.getOptimisticResult(l),g=!n&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const _=g?h.subscribe(or.batchCalls(N)):$r;return h.updateResult(),_},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),S.useEffect(()=>{h.setOptions(l)},[l,h]),Rz(l,p))throw AO(l,h,i);if(Tz({result:p,errorResetBoundary:i,throwOnError:l.throwOnError,query:c,suspense:l.suspense}))throw p.error;if((w=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||w.call(b,l,p),l.experimental_prefetchInRender&&!Rc.isServer()&&Pz(p,n)){const N=f?AO(l,h,i):c==null?void 0:c.promise;N==null||N.catch($r).finally(()=>{h.updateResult()})}return l.notifyOnChangeProps?p:h.trackResult(p)}function Ue(e,t){return Q2(e,F2)}function X2(e,t){return Q2(e,gz)}var wc=typeof window<"u"?S.useLayoutEffect:S.useEffect;function bv(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 Mz(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 Dz(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}var W2=!1;function Mc(e){return e[e.length-1]}function kz(e){return typeof e=="function"}function Fi(e,t){return kz(e)?e(t):e}var Lz=Object.prototype.hasOwnProperty,TO=Object.prototype.propertyIsEnumerable,Iz=()=>Object.create(null),Ss=(e,t)=>za(e,t,Iz);function za(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const i=t,o=RO(e)&&RO(i);if(!o&&!(Bl(e)&&Bl(i)))return i;const l=o?e:CO(e);if(!l)return i;const c=o?i:CO(i);if(!c)return i;const f=l.length,h=c.length,p=o?new Array(h):r();let g=0;for(let y=0;y<h;y++){const x=o?y:c[y],b=e[x],w=i[x];if(b===w){p[x]=b,(o?y<f:Lz.call(e,x))&&g++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[x]=w;continue}const N=za(b,w,r,n+1);p[x]=N,N===b&&g++}return f===h&&g===f?e:p}function CO(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!TO.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(!TO.call(e,i))return!1;n.push(i)}return n}function Bl(e){if(!PO(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!PO(r)||!r.hasOwnProperty("isPrototypeOf"))}function PO(e){return Object.prototype.toString.call(e)==="[object Object]"}function RO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vs(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(!Vs(e[n],t[n],r))return!1;return!0}if(Bl(e)&&Bl(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)&&!Vs(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||!Vs(e[l],t[l],r)))return!1;return i===o}return!1}function Ul(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 Dc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function $z(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function MO(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 $z(t)}var zz=["http:","https:","mailto:","tel:"];function $h(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}function ic(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+=MO(e.slice(r,i.index))+i[0],r=t.lastIndex;n=n+MO(r?e.slice(r):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function Bz(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Uz(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 qa(){throw new Error("Invariant failed")}function kc(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,Z2=5;function qz(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 Vb(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=qz(o);if(l){const[c,f]=l,h=o.charCodeAt(c+1);if(h===45){if(c+2<o.length&&o.charCodeAt(c+2)===36){const p=c+3,g=f;if(p<g)return r[0]=3,r[1]=t+c,r[2]=t+p,r[3]=t+g,r[4]=t+f+1,r[5]=i,r}}else if(h===36){const p=c+1,g=c+2;return g===f?(r[0]=2,r[1]=t+c,r[2]=t+p,r[3]=t+g,r[4]=t+f+1,r[5]=e.length,r):(r[0]=1,r[1]=t+c,r[2]=t+g,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 Gm(e,t,r,n,i,o,l){var f,h,p,g,y,x,b,w,N,_,E,T,A;l==null||l(r);let c=n;{const C=r.fullPath??r.from,R=C.length,D=((f=r.options)==null?void 0:f.caseSensitive)??e,M=!!((p=(h=r.options)==null?void 0:h.params)!=null&&p.parse&&((y=(g=r.options)==null?void 0:g.skipRouteOnParseError)!=null&&y.params));for(;c<R;){const I=Vb(C,c,t);let F;const H=c,ie=I[5];switch(c=ie+1,o++,I[0]){case 0:{const Z=C.substring(I[2],I[3]);if(D){const G=(x=i.static)==null?void 0:x.get(Z);if(G)F=G;else{i.static??(i.static=new Map);const k=Ms(r.fullPath??r.from);k.parent=i,k.depth=o,F=k,i.static.set(Z,k)}}else{const G=Z.toLowerCase(),k=(b=i.staticInsensitive)==null?void 0:b.get(G);if(k)F=k;else{i.staticInsensitive??(i.staticInsensitive=new Map);const q=Ms(r.fullPath??r.from);q.parent=i,q.depth=o,F=q,i.staticInsensitive.set(G,q)}}break}case 1:{const Z=C.substring(H,I[1]),G=C.substring(I[4],ie),k=D&&!!(Z||G),q=Z?k?Z:Z.toLowerCase():void 0,J=G?k?G:G.toLowerCase():void 0,re=!M&&((w=i.dynamic)==null?void 0:w.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===k&&oe.prefix===q&&oe.suffix===J));if(re)F=re;else{const oe=wv(1,r.fullPath??r.from,k,q,J);F=oe,oe.depth=o,oe.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(oe)}break}case 3:{const Z=C.substring(H,I[1]),G=C.substring(I[4],ie),k=D&&!!(Z||G),q=Z?k?Z:Z.toLowerCase():void 0,J=G?k?G:G.toLowerCase():void 0,re=!M&&((N=i.optional)==null?void 0:N.find(oe=>!oe.skipOnParamError&&oe.caseSensitive===k&&oe.prefix===q&&oe.suffix===J));if(re)F=re;else{const oe=wv(3,r.fullPath??r.from,k,q,J);F=oe,oe.parent=i,oe.depth=o,i.optional??(i.optional=[]),i.optional.push(oe)}break}case 2:{const Z=C.substring(H,I[1]),G=C.substring(I[4],ie),k=D&&!!(Z||G),q=Z?k?Z:Z.toLowerCase():void 0,J=G?k?G:G.toLowerCase():void 0,re=wv(2,r.fullPath??r.from,k,q,J);F=re,re.parent=i,re.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(re)}}i=F}if(M&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const I=Ms(r.fullPath??r.from);I.kind=Z2,I.parent=i,o++,I.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(I),i=I}const $=(r.path||!r.children)&&!r.isRoot;if($&&C.endsWith("/")){const I=Ms(r.fullPath??r.from);I.kind=Rs,I.parent=i,o++,I.depth=o,i.index=I,i=I}i.parse=((E=(_=r.options)==null?void 0:_.params)==null?void 0:E.parse)??null,i.skipOnParamError=M,i.parsingPriority=((A=(T=r.options)==null?void 0:T.skipRouteOnParseError)==null?void 0:A.priority)??0,$&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const C of r.children)Gm(e,t,C,c,i,o,l)}function jv(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 Pi(e){var t,r,n;if(e.pathless)for(const i of e.pathless)Pi(i);if(e.static)for(const i of e.static.values())Pi(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Pi(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(jv);for(const i of e.dynamic)Pi(i)}if((r=e.optional)!=null&&r.length){e.optional.sort(jv);for(const i of e.optional)Pi(i)}if((n=e.wildcard)!=null&&n.length){e.wildcard.sort(jv);for(const i of e.wildcard)Pi(i)}}function Ms(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 wv(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 Hz(e,t){const r=Ms("/"),n=new Uint16Array(6);for(const i of e)Gm(!1,n,i,1,r,0);Pi(r),t.masksTree=r,t.flatCache=kc(1e3)}function Fz(e,t){e||(e="/");const r=t.flatCache.get(e);if(r)return r;const n=Qb(e,t.masksTree);return t.flatCache.set(e,n),n}function Kz(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=Ms("/"),Gm(t,new Uint16Array(6),{from:e},1,l,0),i.singleCache.set(o,l)),Qb(n,l,r)}function Gz(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=Qb(e,t.segmentTree,r)}catch(l){if(l instanceof URIError)o=null;else throw l}return o&&(o.branch=Qz(o.route)),t.matchCache.set(n,o),o}function Yz(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Vz(e,t=!1,r){const n=Ms(e.fullPath),i=new Uint16Array(6),o={},l={};let c=0;return Gm(t,i,e,1,n,0,f=>{if(r==null||r(f,c),f.id in o&&qa(),o[f.id]=f,c!==0&&f.path){const h=Yz(f.fullPath);(!l[h]||f.fullPath.endsWith("/"))&&(l[h]=f)}c++}),Pi(n),{processedTree:{segmentTree:n,singleCache:kc(1e3),matchCache:kc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:l}}function Qb(e,t,r=!1){const n=e.split("/"),i=Wz(e,n,t,r);if(!i)return null;const[o]=J2(e,n,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function J2(e,t,r){var p,g,y,x,b,w,N,_,E,T;const n=Xz(r.node);let i=null;const o=Object.create(null);let l=((p=r.extract)==null?void 0:p.part)??0,c=((g=r.extract)==null?void 0:g.node)??0,f=((y=r.extract)==null?void 0:y.path)??0,h=((x=r.extract)==null?void 0:x.segment)??0;for(;c<n.length;l++,c++,f++,h++){const A=n[c];if(A.kind===Rs)break;if(A.kind===Z2){h--,l--,f--;continue}const C=t[l],R=f;if(C&&(f+=C.length),A.kind===1){i??(i=r.node.fullPath.split("/"));const D=i[h],M=((b=A.prefix)==null?void 0:b.length)??0;if(D.charCodeAt(M)===123){const $=((w=A.suffix)==null?void 0:w.length)??0,I=D.substring(M+2,D.length-$-1),F=C.substring(M,C.length-$);o[I]=decodeURIComponent(F)}else{const $=D.substring(1);o[$]=decodeURIComponent(C)}}else if(A.kind===3){if(r.skipped&1<<c){l--,f=R-1;continue}i??(i=r.node.fullPath.split("/"));const D=i[h],M=((N=A.prefix)==null?void 0:N.length)??0,$=((_=A.suffix)==null?void 0:_.length)??0,I=D.substring(M+3,D.length-$-1),F=A.suffix||A.prefix?C.substring(M,C.length-$):C;F&&(o[I]=decodeURIComponent(F))}else if(A.kind===2){const D=A,M=e.substring(R+(((E=D.prefix)==null?void 0:E.length)??0),e.length-(((T=D.suffix)==null?void 0:T.length)??0)),$=decodeURIComponent(M);o["*"]=$,o._splat=$;break}}return r.rawParams&&Object.assign(o,r.rawParams),[o,{part:l,node:c,path:f,segment:h}]}function Qz(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Xz(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Wz(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,h=null,p=null;for(;c.length;){const g=c.pop(),{node:y,index:x,skipped:b,depth:w,statics:N,dynamics:_,optionals:E}=g;let{extract:T,rawParams:A,parsedParams:C}=g;if(y.skipOnParamError){if(!Sv(e,t,g))continue;A=g.rawParams,T=g.extract,C=g.parsedParams}n&&y.route&&y.kind!==Rs&&sc(h,g)&&(h=g);const R=x===l;if(R&&(y.route&&!o&&sc(p,g)&&(p=g),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const D=R?void 0:t[x];let M;if(R&&y.index){const $={node:y.index,index:x,skipped:b,depth:w+1,statics:N,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C};let I=!0;if(y.index.skipOnParamError&&(Sv(e,t,$)||(I=!1)),I){if(N===l&&!_&&!E&&!b)return $;sc(p,$)&&(p=$)}}if(y.wildcard&&sc(f,g))for(const $ of y.wildcard){const{prefix:I,suffix:F}=$;if(I&&(R||!($.caseSensitive?D:M??(M=D.toLowerCase())).startsWith(I)))continue;if(F){if(R)continue;const ie=t.slice(x).join("/").slice(-F.length);if(($.caseSensitive?ie:ie.toLowerCase())!==F)continue}const H={node:$,index:l,skipped:b,depth:w,statics:N,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C};if(!($.skipOnParamError&&!Sv(e,t,H))){f=H;break}}if(y.optional){const $=b|1<<w,I=w+1;for(let F=y.optional.length-1;F>=0;F--){const H=y.optional[F];c.push({node:H,index:x,skipped:$,depth:I,statics:N,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C})}if(!R)for(let F=y.optional.length-1;F>=0;F--){const H=y.optional[F],{prefix:ie,suffix:Z}=H;if(ie||Z){const G=H.caseSensitive?D:M??(M=D.toLowerCase());if(ie&&!G.startsWith(ie)||Z&&!G.endsWith(Z))continue}c.push({node:H,index:x+1,skipped:b,depth:I,statics:N,dynamics:_,optionals:E+1,extract:T,rawParams:A,parsedParams:C})}}if(!R&&y.dynamic&&D)for(let $=y.dynamic.length-1;$>=0;$--){const I=y.dynamic[$],{prefix:F,suffix:H}=I;if(F||H){const ie=I.caseSensitive?D:M??(M=D.toLowerCase());if(F&&!ie.startsWith(F)||H&&!ie.endsWith(H))continue}c.push({node:I,index:x+1,skipped:b,depth:w+1,statics:N,dynamics:_+1,optionals:E,extract:T,rawParams:A,parsedParams:C})}if(!R&&y.staticInsensitive){const $=y.staticInsensitive.get(M??(M=D.toLowerCase()));$&&c.push({node:$,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C})}if(!R&&y.static){const $=y.static.get(D);$&&c.push({node:$,index:x+1,skipped:b,depth:w+1,statics:N+1,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C})}if(y.pathless){const $=w+1;for(let I=y.pathless.length-1;I>=0;I--){const F=y.pathless[I];c.push({node:F,index:x,skipped:b,depth:$,statics:N,dynamics:_,optionals:E,extract:T,rawParams:A,parsedParams:C})}}}if(p&&f)return sc(f,p)?p:f;if(p)return p;if(f)return f;if(n&&h){let g=h.index;for(let x=0;x<h.index;x++)g+=t[x].length;const y=g===e.length?"/":e.slice(g);return h.rawParams??(h.rawParams=Object.create(null)),h.rawParams["**"]=decodeURIComponent(y),h}return null}function Sv(e,t,r){try{const[n,i]=J2(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 sc(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 Oh(e){return Xb(e.filter(t=>t!==void 0).join("/"))}function Xb(e){return e.replace(/\/{2,}/g,"/")}function eR(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Vi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function tR(e){return Vi(eR(e))}function zh(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Zz(e,t,r){return zh(e,r)===zh(t,r)}function Jz({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 g=n.get(l);if(g)return g}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 g=t.split("/");for(let y=0,x=g.length;y<x;y++){const b=g[y];b===""?y?y===x-1&&c.push(b):c=[b]:b===".."?c.pop():b==="."||c.push(b)}}c.length>1&&(Mc(c)===""?r==="never"&&c.pop():r==="always"&&c.push(""));let f,h="";for(let g=0;g<c.length;g++){g>0&&(h+="/");const y=c[g];if(!y)continue;f=Vb(y,0,f);const x=f[0];if(x===0){h+=y;continue}const b=f[5],w=y.substring(0,f[1]),N=y.substring(f[4],b),_=y.substring(f[2],f[3]);x===1?h+=w||N?`${w}{$${_}}${N}`:`$${_}`:x===2?h+=w||N?`${w}{$}${N}`:"$":h+=`${w}{-$${_}}${N}`}h=Xb(h);const p=h||"/";return l&&n&&n.set(l,p),p}function e8(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 Nv(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=>kO(i,r)).join("/"):kO(n,r)}function DO({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,h="";for(;c<l;){const p=c;f=Vb(e,p,f);const g=f[5];if(c=g+1,p===g)continue;const y=f[0];if(y===0){h+="/"+e.substring(p,g);continue}if(y===2){const x=t._splat;o._splat=x,o["*"]=x;const b=e.substring(p,f[1]),w=e.substring(f[4],g);if(!x){i=!0,(b||w)&&(h+="/"+b+w);continue}const N=Nv("_splat",t,r);h+="/"+b+N+w;continue}if(y===1){const x=e.substring(f[2],f[3]);!i&&!(x in t)&&(i=!0),o[x]=t[x];const b=e.substring(p,f[1]),w=e.substring(f[4],g),N=Nv(x,t,r)??"undefined";h+="/"+b+N+w;continue}if(y===3){const x=e.substring(f[2],f[3]),b=t[x];if(b==null)continue;o[x]=b;const w=e.substring(p,f[1]),N=e.substring(f[4],g),_=Nv(x,t,r)??"";h+="/"+w+_+N;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:o,interpolatedPath:h||"/",isMissingParams:i}}function kO(e,t){const r=encodeURIComponent(e);return(t==null?void 0:t(r))??r}function Or(e){return!!(e!=null&&e.isNotFound)}function t8(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var r8="tsr-scroll-restoration-v1_3";function n8(){const e=t8();if(!e)return null;let t={};try{const n=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Bl(n)&&(t=n)}catch{}return{get state(){return t},set:n=>{t=Fi(n,t)||t},persist:()=>{try{e.setItem(r8,JSON.stringify(t))}catch{}}}}var LO=n8(),a8=e=>e.state.__TSR_key||e.href;function i8(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 nh=!1,oc="window",IO="data-scroll-restoration-id";function s8(e,t){if(!LO)return;const r=LO;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,nh=!1;const n=e.options.getScrollRestorationKey||a8,i=new Map;window.history.scrollRestoration="manual";const o=c=>{if(!(nh||!e.isScrollRestoring))if(c.target===document||c.target===window)i.set(oc,{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 h;if(!e.isScrollRestoring||!c||i.size===0||!r)return;const f=(h=r.state)[c]||(h[c]={});for(const[p,g]of i){let y;if(p===oc)y=oc;else if(p.isConnected){const x=p.getAttribute(IO);y=x?`[${IO}="${x}"]`:i8(p)}y&&(f[y]=g)}};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 g;const f=n(c.toLocation),h=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}))){nh=!0;try{const y=e.isScrollRestoring?r.state[f]:void 0;let x=!1;if(y)for(const b in y){const w=y[b];if(!Bl(w))continue;const{scrollX:N,scrollY:_}=w;if(!(!Number.isFinite(N)||!Number.isFinite(_))){if(b===oc)window.scrollTo({top:_,left:N,behavior:h}),x=!0;else if(b){let E;try{E=document.querySelector(b)}catch{continue}E&&(E.scrollLeft=N,E.scrollTop=_,x=!0)}}}if(!x){const b=e.history.location.hash.slice(1);if(b){const w=((g=window.history.state)==null?void 0:g.__hashScrollIntoViewOptions)??!0;if(w){const N=document.getElementById(b);N&&N.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:h};if(window.scrollTo(w),p)for(const N of p){if(N===oc)continue;const _=typeof N=="function"?N():document.querySelector(N);_&&_.scrollTo(w)}}}}finally{nh=!1}e.isScrollRestoring&&r.set(y=>(y[f]||(y[f]={}),y))}})}function o8(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 _v(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function l8(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]=_v(i):Array.isArray(o)?o.push(_v(i)):r[n]=[o,_v(i)]}return r}var u8=d8(JSON.parse),c8=f8(JSON.stringify,JSON.parse);function d8(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=l8(t);for(const n in r){const i=r[n];if(typeof i=="string")try{r[n]=e(i)}catch{}}return r}}function f8(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=o8(i,n);return o?`?${o}`:""}}var Qs="__root__";function Wb(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 zr(e){return e instanceof Response&&!!e.options}function h8(e){return{input:({url:t})=>{for(const r of e)t=kx(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=rR(e[r],t);return t}}}function m8(e){const t=tR(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=Oh(["/",t,l.pathname]),l)}}function kx(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 rR(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 p8(e,t){const{createMutableStore:r,createReadonlyStore:n,batch:i,init:o}=t,l=new Map,c=new Map,f=new Map,h=r(e.status),p=r(e.loadedAt),g=r(e.isLoading),y=r(e.isTransitioning),x=r(e.location),b=r(e.resolvedLocation),w=r(e.statusCode),N=r(e.redirect),_=r([]),E=r([]),T=r([]),A=n(()=>Ov(l,_.state)),C=n(()=>Ov(c,E.state)),R=n(()=>Ov(f,T.state)),D=n(()=>_.state[0]),M=n(()=>_.state.some(q=>{var J;return((J=l.get(q))==null?void 0:J.state.status)==="pending"})),$=n(()=>{var q;return{locationHref:x.state.href,resolvedLocationHref:(q=b.state)==null?void 0:q.href,status:h.state}}),I=n(()=>({status:h.state,loadedAt:p.state,isLoading:g.state,isTransitioning:y.state,matches:A.state,location:x.state,resolvedLocation:b.state,statusCode:w.state,redirect:N.state})),F=kc(64);function H(q){let J=F.get(q);return J||(J=n(()=>{const re=_.state;for(const oe of re){const L=l.get(oe);if(L&&L.routeId===q)return L.state}}),F.set(q,J)),J}const ie={status:h,loadedAt:p,isLoading:g,isTransitioning:y,location:x,resolvedLocation:b,statusCode:w,redirect:N,matchesId:_,pendingMatchesId:E,cachedMatchesId:T,activeMatchesSnapshot:A,pendingMatchesSnapshot:C,cachedMatchesSnapshot:R,firstMatchId:D,hasPendingMatches:M,matchRouteReactivity:$,activeMatchStoresById:l,pendingMatchStoresById:c,cachedMatchStoresById:f,__store:I,getMatchStoreByRouteId:H,setActiveMatches:Z,setPendingMatches:G,setCachedMatches:k};Z(e.matches),o==null||o(ie);function Z(q){Ev(q,l,_,r,i)}function G(q){Ev(q,c,E,r,i)}function k(q){Ev(q,f,T,r,i)}return ie}function Ov(e,t){const r=[];for(const n of t){const i=e.get(n);i&&r.push(i.state)}return r}function Ev(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 h=n(c);h.routeId=c.routeId,t.set(c.id,h);continue}f.routeId=c.routeId,f.state!==c&&f.setState(()=>c)}Uz(r.state,o)||r.setState(()=>o)})}var Lx=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},g8=e=>e.stores.matchesId.state.some(t=>{var r;return(r=e.stores.activeMatchStoresById.get(t))==null?void 0:r.state._forcePending}),Ym=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),Xs=(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},$O=(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},Ki=(e,t,r)=>{var n,i,o;if(!(!zr(r)&&!Or(r)))throw zr(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:zr(r)?"redirected":l.status==="pending"?"success":l.status,context:Xs(e,t.index),isFetching:!1,error:r})),Or(r)&&!r.routeId&&(r.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),zr(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},nR=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},zO=(e,t,r)=>{const n=Xs(e,r);e.updateMatch(t,i=>({...i,context:n}))},lc=(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),Ki(e,e.router.getMatch(i),r);try{(f=(c=l.options).onError)==null||f.call(c,r)}catch(h){r=h,Ki(e,e.router.getMatch(i),r)}e.updateMatch(i,h=>{var p,g;return(p=h._nonReactive.beforeLoadPromise)==null||p.resolve(),h._nonReactive.beforeLoadPromise=void 0,(g=h._nonReactive.loadPromise)==null||g.resolve(),{...h,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!zr(r)&&!Or(r)&&(e.serialError??(e.serialError=r))},aR=(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&&!Ym(e,t)&&(r.options.loader||r.options.beforeLoad||sR(r))&&typeof i=="number"&&i!==1/0&&(r.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const l=setTimeout(()=>{Lx(e)},i);n._nonReactive.pendingTimeout=l}},y8=(e,t,r)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;aR(e,t,r,n);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&Ki(e,o,o.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(i):i()},v8=(e,t,r,n)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Ul(()=>{o==null||o.resolve(),o=void 0});const{paramsError:l,searchError:c}=i;l&&lc(e,r,l,"PARSE_PARAMS"),c&&lc(e,r,c,"VALIDATE_SEARCH"),aR(e,t,n,i);const f=new AbortController;let h=!1;const p=()=>{h||(h=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:f})))},g=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!n.options.beforeLoad){e.router.batch(()=>{p(),g()});return}i._nonReactive.beforeLoadPromise=Ul();const y={...Xs(e,r,!1),...i.__routeContext},{search:x,params:b,cause:w}=i,N=Ym(e,t),_={search:x,abortController:f,params:b,preload:N,context:y,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},E=A=>{if(A===void 0){e.router.batch(()=>{p(),g()});return}(zr(A)||Or(A))&&(p(),lc(e,r,A,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,C=>({...C,__beforeLoadContext:A})),g()})};let T;try{if(T=n.options.beforeLoad(_),Dc(T))return p(),T.catch(A=>{lc(e,r,A,"BEFORE_LOAD")}).then(E)}catch(A){p(),lc(e,r,A,"BEFORE_LOAD")}E(T)},x8=(e,t)=>{const{id:r,routeId:n}=e.matches[t],i=e.router.looseRoutesById[n],o=()=>c(),l=()=>v8(e,r,t,i),c=()=>{if(nR(e,r))return;const f=y8(e,r,i);return Dc(f)?f.then(l):l()};return o()},b8=(e,t,r)=>{var o,l,c,f,h,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=(h=r.options).headers)==null?void 0:p.call(h,i)]).then(([g,y,x])=>({meta:g==null?void 0:g.meta,links:g==null?void 0:g.links,headScripts:g==null?void 0:g.scripts,headers:x,scripts:y,styles:g==null?void 0:g.styles}))},iR=(e,t,r,n,i)=>{const o=t[n-1],{params:l,loaderDeps:c,abortController:f,cause:h}=e.router.getMatch(r),p=Xs(e,n),g=Ym(e,r);return{params:l,deps:c,preload:!!g,parentMatchPromise:o,abortController:f,context:p,location:e.location,navigate:y=>e.router.navigate({...y,_fromLocation:e.location}),cause:g?"preload":h,route:i,...e.router.options.additionalContext}},BO=async(e,t,r,n,i)=>{var o,l,c,f,h;try{const p=e.router.getMatch(r);try{(!(W2??e.router.isServer)||p.ssr===!0)&&Lc(i);const g=i.options.loader,y=typeof g=="function"?g:g==null?void 0:g.handler,x=y==null?void 0:y(iR(e,t,r,n,i)),b=!!y&&Dc(x);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||p._nonReactive.minPendingPromise)&&e.updateMatch(r,N=>({...N,isFetching:"loader"})),y){const N=b?await x:x;Ki(e,e.router.getMatch(r),N),N!==void 0&&e.updateMatch(r,_=>({..._,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:Xs(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(g){let y=g;if((y==null?void 0:y.name)==="AbortError"){if(p.abortController.signal.aborted){(o=p._nonReactive.loaderPromise)==null||o.resolve(),p._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,b=>({...b,status:b.status==="pending"?"success":b.status,isFetching:!1,context:Xs(e,n)}));return}const x=p._nonReactive.minPendingPromise;x&&await x,Or(g)&&await((c=(l=i.options.notFoundComponent)==null?void 0:l.preload)==null?void 0:c.call(l)),Ki(e,e.router.getMatch(r),g);try{(h=(f=i.options).onError)==null||h.call(f,g)}catch(b){y=b,Ki(e,e.router.getMatch(r),b)}!zr(y)&&!Or(y)&&await Lc(i,["errorComponent"]),e.updateMatch(r,b=>({...b,error:y,context:Xs(e,n),status:"error",isFetching:!1}))}}catch(p){const g=e.router.getMatch(r);g&&(g._nonReactive.loaderPromise=void 0),Ki(e,g,p)}},j8=async(e,t,r)=>{var x,b,w,N;async function n(_,E,T,A,C){const R=Date.now()-E.updatedAt,D=_?C.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:C.options.staleTime??e.router.options.defaultStaleTime??0,M=C.options.shouldReload,$=typeof M=="function"?M(iR(e,t,i,r,C)):M,{status:I,invalid:F}=A,H=R>=D&&(!!e.forceStaleReload||A.cause==="enter"||T!==void 0&&T!==A.id);l=I==="success"&&(F||($??H)),_&&C.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{var ie,Z;try{await BO(e,t,i,r,C);const G=e.router.getMatch(i);(ie=G._nonReactive.loaderPromise)==null||ie.resolve(),(Z=G._nonReactive.loadPromise)==null||Z.resolve(),G._nonReactive.loaderPromise=void 0,G._nonReactive.loadPromise=void 0}catch(G){zr(G)&&await e.router.navigate(G.options)}})()):I!=="success"||l?await BO(e,t,i,r,C):zO(e,i,r))}const{id:i,routeId:o}=e.matches[r];let l=!1,c=!1;const f=e.router.looseRoutesById[o],h=f.options.loader,p=((typeof h=="function"||h==null?void 0:h.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(nR(e,i)){if(!e.router.getMatch(i))return e.matches[r];zO(e,i,r)}else{const _=e.router.getMatch(i),E=e.router.stores.matchesId.state[r],T=((x=E&&e.router.stores.activeMatchStoresById.get(E)||null)==null?void 0:x.routeId)===o?E:(b=e.router.stores.activeMatchesSnapshot.state.find(C=>C.routeId===o))==null?void 0:b.id,A=Ym(e,i);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&p)return _;await _._nonReactive.loaderPromise;const C=e.router.getMatch(i),R=C._nonReactive.error||C.error;R&&Ki(e,C,R),C.status==="pending"&&await n(A,_,T,C,f)}else{const C=A&&!e.router.stores.activeMatchStoresById.has(i),R=e.router.getMatch(i);R._nonReactive.loaderPromise=Ul(),C!==R.preload&&e.updateMatch(i,D=>({...D,preload:C})),await n(A,_,T,R,f)}}const g=e.router.getMatch(i);c||((w=g._nonReactive.loaderPromise)==null||w.resolve(),(N=g._nonReactive.loadPromise)==null||N.resolve(),g._nonReactive.loadPromise=void 0),clearTimeout(g._nonReactive.pendingTimeout),g._nonReactive.pendingTimeout=void 0,c||(g._nonReactive.loaderPromise=void 0),g._nonReactive.dehydrated=void 0;const y=c?g.isFetching:!1;return y!==g.isFetching||g.invalid!==!1?(e.updateMatch(i,_=>({..._,isFetching:y,invalid:!1})),e.router.getMatch(i)):g};async function UO(e){var y,x;const t=e,r=[];g8(t.router)&&Lx(t);let n;for(let b=0;b<t.matches.length;b++){try{const w=x8(t,b);Dc(w)&&await w}catch(w){if(zr(w))throw w;if(Or(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?$O(t,n):void 0,l=n&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let c,f;for(let b=0;b<l;b++)r.push(j8(t,r,b));try{await Promise.all(r)}catch{const b=await Promise.allSettled(r);for(const w of b){if(w.status!=="rejected")continue;const N=w.reason;if(zr(N))throw N;Or(N)?c??(c=N):f??(f=N)}if(f!==void 0)throw f}const h=c??(n&&!t.preload?n:void 0);let p=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!h&&n&&t.preload)return t.matches;if(h){const b=$O(t,h);b===void 0&&qa();const w=t.matches[b],N=t.router.looseRoutesById[w.routeId],_=(y=t.router.options)==null?void 0:y.defaultNotFoundComponent;!N.options.notFoundComponent&&_&&(N.options.notFoundComponent=_),h.routeId=w.routeId;const E=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,T=>({...T,...E?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:h},isFetching:!1})),p=b,await Lc(N,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(x=t.router.getMatch(b.id))!=null&&x.globalNotFound&&t.updateMatch(b.id,w=>({...w,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Lc(b,["errorComponent"])}for(let b=0;b<=p;b++){const{id:w,routeId:N}=t.matches[b],_=t.router.looseRoutesById[N];try{const E=b8(t,w,_);if(E){const T=await E;t.updateMatch(w,A=>({...A,...T}))}}catch(E){console.error(`Error executing head for route ${N}:`,E)}}const g=Lx(t);if(Dc(g)&&await g,h)throw h;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function qO(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 Lc(e,t=Eh){!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===Eh?(()=>{if(e._componentsPromise===void 0){const n=qO(e,Eh);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():qO(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function sR(e){var t;for(const r of Eh)if((t=e.options[r])!=null&&t.preload)return!0;return!1}var Eh=["component","errorComponent","pendingComponent","notFoundComponent"],Qi="__TSR_index",HO="popstate",FO="beforeunload";function w8(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 g,y;if((c==null?void 0:c.ignoreBlocker)??!1){l();return}const h=((g=e.getBlockers)==null?void 0:g.call(e))??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&h.length&&p)for(const x of h){const b=Bh(f.path,f.state);if(await x.blockerFn({currentLocation:t,nextLocation:b,action:f.type})){(y=e.onBlocked)==null||y.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 h=t.state[Qi];c=KO(h+1,c),o({task:()=>{e.pushState(l,c),n({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:l,state:c})},replace:(l,c,f)=>{const h=t.state[Qi];c=KO(h,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[Qi]!==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,g;const h=((p=e.getBlockers)==null?void 0:p.call(e))??[];(g=e.setBlockers)==null||g.call(e,h.filter(y=>y!==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 KO(e,t){t||(t={});const r=Zb();return{...t,key:r,__TSR_key:r,[Qi]:e}}function S8(e){var M,$;const t=typeof document<"u"?window:void 0,r=t.history.pushState,n=t.history.replaceState;let i=[];const o=()=>i,l=I=>i=I,c=(I=>I),f=(()=>Bh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((M=t.history.state)!=null&&M.__TSR_key)&&!(($=t.history.state)!=null&&$.key)){const I=Zb();t.history.replaceState({[Qi]:0,key:I,__TSR_key:I},"")}let h=f(),p,g=!1,y=!1,x=!1,b=!1;const w=()=>h;let N,_;const E=()=>{N&&(D._ignoreSubscribers=!0,(N.isPush?t.history.pushState:t.history.replaceState)(N.state,"",N.href),D._ignoreSubscribers=!1,N=void 0,_=void 0,p=void 0)},T=(I,F,H)=>{const ie=c(F);_||(p=h),h=Bh(F,H),N={href:ie,state:H,isPush:(N==null?void 0:N.isPush)||I==="push"},_||(_=Promise.resolve().then(()=>E()))},A=I=>{h=f(),D.notify({type:I})},C=async()=>{if(y){y=!1;return}const I=f(),F=I.state[Qi]-h.state[Qi],H=F===1,ie=F===-1,Z=!H&&!ie||g;g=!1;const G=Z?"GO":ie?"BACK":"FORWARD",k=Z?{type:"GO",index:F}:{type:ie?"BACK":"FORWARD"};if(x)x=!1;else{const q=o();if(typeof document<"u"&&q.length){for(const J of q)if(await J.blockerFn({currentLocation:h,nextLocation:I,action:G})){y=!0,t.history.go(1),D.notify(k);return}}}h=f(),D.notify(k)},R=I=>{if(b){b=!1;return}let F=!1;const H=o();if(typeof document<"u"&&H.length)for(const ie of H){const Z=ie.enableBeforeUnload??!0;if(Z===!0){F=!0;break}if(typeof Z=="function"&&Z()===!0){F=!0;break}}if(F)return I.preventDefault(),I.returnValue=""},D=w8({getLocation:w,getLength:()=>t.history.length,pushState:(I,F)=>T("push",I,F),replaceState:(I,F)=>T("replace",I,F),back:I=>(I&&(x=!0),b=!0,t.history.back()),forward:I=>{I&&(x=!0),b=!0,t.history.forward()},go:I=>{g=!0,t.history.go(I)},createHref:I=>c(I),flush:E,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(FO,R,{capture:!0}),t.removeEventListener(HO,C)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:o,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(FO,R,{capture:!0}),t.addEventListener(HO,C),t.history.pushState=function(...I){const F=r.apply(t.history,I);return D._ignoreSubscribers||A("PUSH"),F},t.history.replaceState=function(...I){const F=n.apply(t.history,I);return D._ignoreSubscribers||A("REPLACE"),F},D}function N8(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Bh(e,t){const r=N8(e),n=r.indexOf("#"),i=r.indexOf("?"),o=Zb();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||{[Qi]:0,key:o,__TSR_key:o}}}function Zb(){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 _8=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=e8(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=S8()),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 g;this.resolvePathCache=kc(1e3),g=this.buildRouteTree(),this.setRoutes(g)}if(!this.stores&&this.latestLocation){const g=this.getStoreConfig(this);this.batch=g.batch,this.stores=p8(E8(this.latestLocation),g),s8(this)}let c=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(o||i!==f||l!==h){this.basepath=f;const g=[],y=tR(f);y&&y!=="/"&&g.push(m8({basepath:f})),h&&g.push(h),this.rewrite=g.length===0?void 0:g.length===1?g[0]:h8(g),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=Vz(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&Hz(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:h,hash:p,href:g,state:y})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const _=this.options.parseSearch(h),E=this.options.stringifySearch(_);return{href:f+E+p,publicHref:g,pathname:ic(f).path,external:!1,searchStr:E,search:Ss(n==null?void 0:n.search,_),hash:ic(p.slice(1)).path,state:za(n==null?void 0:n.state,y)}}const x=new URL(g,this.origin),b=kx(this.rewrite,x),w=this.options.parseSearch(b.search),N=this.options.stringifySearch(w);return b.search=N,{href:b.href.replace(b.origin,""),publicHref:g,pathname:ic(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:N,search:Ss(n==null?void 0:n.search,w),hash:ic(b.hash.slice(1)).path,state:za(n==null?void 0:n.state,y)}},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)=>Jz({base:r,to:Xb(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=>A8({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 I,F;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,h=this.resolvePathWithBase(f,"."),p=c.search,g=Object.assign(Object.create(null),c.params),y=o.to?this.resolvePathWithBase(h,`${o.to}`):this.resolvePathWithBase(h,"."),x=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?g:Object.assign(g,Fi(o.params,g)),b=this.getMatchedRoutes(y);let w=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(w=[...w,this.options.notFoundRoute]),Object.keys(x).length>0)for(const H of w){const ie=((I=H.options.params)==null?void 0:I.stringify)??H.options.stringifyParams;if(ie)try{Object.assign(x,ie(x))}catch{}}const N=r.leaveParams?y:ic(DO({path:y,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=p;if(r._includeValidateSearch&&((F=this.options.search)!=null&&F.strict)){const H={};w.forEach(ie=>{if(ie.options.validateSearch)try{Object.assign(H,Ah(ie.options.validateSearch,{...H,..._}))}catch{}}),_=H}_=T8({search:_,dest:o,destRoutes:w,_includeValidateSearch:r._includeValidateSearch}),_=Ss(p,_);const E=this.options.stringifySearch(_),T=o.hash===!0?l.hash:o.hash?Fi(o.hash,l.hash):void 0,A=T?`#${T}`:"";let C=o.state===!0?l.state:o.state?Fi(o.state,l.state):{};C=za(l.state,C);const R=`${N}${E}${A}`;let D,M,$=!1;if(this.rewrite){const H=new URL(R,this.origin),ie=rR(this.rewrite,H);D=H.href.replace(H.origin,""),ie.origin!==this.origin?(M=ie.href,$=!0):M=ie.pathname+ie.search+ie.hash}else D=Bz(R),M=D;return{publicHref:M,href:D,pathname:N,search:_,searchStr:E,state:C,hash:T??"",external:$,unmaskOnReload:o.unmaskOnReload}},i=(o={},l)=>{const c=n(o);let f=l?n(l):void 0;if(!f){const h=Object.create(null);if(this.options.routeMasks){const p=Fz(c.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:g,params:y,...x}=p.route,b=y===!1||y===null?Object.create(null):(y??!0)===!0?h:Object.assign(h,Fi(y,h));l={from:r.from,...x,params:b},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 h=Vs(i.state,this.latestLocation.state);return f.forEach(p=>{delete i.state[p]}),h},l=Vi(this.latestLocation.href)===Vi(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Ul(()=>{c==null||c.resolve(),c=void 0}),l&&o())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...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=h??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 g=this.history.location.state.__TSR_index,y=Bh(c,{__TSR_index:r?g:g+1}),x=new URL(y.pathname,this.origin);f.to=kx(this.rewrite,x).pathname,f.search=this.options.parseSearch(y.search),f.hash=y.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const p=this.commitLocation({...h,viewTransition:o,replace:r,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:r,reloadDocument:n,href:i,publicHref:o,...l})=>{var f,h;let c=!1;if(i)try{new URL(`${i}`),c=!0}catch{}if(c&&!n&&(n=!0),n){if(r!==void 0||!i){const g=this.buildLocation({to:r,...l});i=i??g.publicHref,o=o??g.publicHref}const p=!c&&o?o:i;if($h(p,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const g=((h=(f=this.history).getBlockers)==null?void 0:h.call(f))??[];for(const y of g)if(y!=null&&y.blockerFn&&await y.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 h;try{this.beforeLoad();const p=this.latestLocation,g=this.stores.resolvedLocation.state,y=wl(p,g);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...y}),this.emit({type:"onBeforeLoad",...y}),await UO({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 _,E;let x=null,b=null,w=null,N=null;this.batch(()=>{const T=this.stores.pendingMatchesSnapshot.state,A=T.length,C=this.stores.activeMatchesSnapshot.state;x=A?C.filter(M=>!this.stores.pendingMatchStoresById.has(M.id)):null;const R=new Set;for(const M of this.stores.pendingMatchStoresById.values())M.routeId&&R.add(M.routeId);const D=new Set;for(const M of this.stores.activeMatchStoresById.values())M.routeId&&D.add(M.routeId);b=A?C.filter(M=>!R.has(M.routeId)):null,w=A?T.filter(M=>!D.has(M.routeId)):null,N=A?T.filter(M=>D.has(M.routeId)):C,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),A&&(this.stores.setActiveMatches(T),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[T,A]of[[b,"onLeave"],[w,"onEnter"],[N,"onStay"]])if(T)for(const C of T)(E=(_=this.looseRoutesById[C.routeId].options)[A])==null||E.call(_,C)})})}})}catch(p){zr(p)?(n=p,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):Or(p)&&(i=p);const g=n?n.status:i?404:this.stores.activeMatchesSnapshot.state.some(y=>y.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>g),this.stores.redirect.setState(()=>n)})}this.latestLoadPromise===o&&((h=this.commitLocationPromise)==null||h.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(h=>h!==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&&$h(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=Lc,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 UO({router:this,matches:i,location:n,preload:!0,updateMatch:(f,h)=>{o.has(f)?i=i.map(p=>p.id===f?h(p):p):this.updateMatch(f,h)}}),i}catch(f){if(zr(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:n});Or(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=Kz(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,l.pathname,this.processedTree);return!c||r.params&&!Vs(c.rawParams,r.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?Vs(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??c8,parseSearch:e.parseSearch??u8,protocolAllowlist:e.protocolAllowlist??zz}),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 g,y;const r=this.getMatchedRoutes(e.pathname),{foundRoute:n,routeParams:i,parsedParams:o}=r;let{matchedRoutes:l}=r,c=!1;(n?n.path!=="/"&&i["**"]:Vi(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:c=!0);const f=c?P8(this.options.notFoundMode,l):void 0,h=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 b=l[x],w=h[x-1];let N,_,E;{const G=(w==null?void 0:w.search)??e.search,k=(w==null?void 0:w._strictSearch)??void 0;try{const q=Ah(b.options.validateSearch,{...G})??void 0;N={...G,...q},_={...k,...q},E=void 0}catch(q){let J=q;if(q instanceof Uh||(J=new Uh(q.message,{cause:q})),t!=null&&t.throwOnError)throw J;N=G,_={},E=J}}const T=((y=(g=b.options).loaderDeps)==null?void 0:y.call(g,{search:N}))??"",A=T?JSON.stringify(T):"",{interpolatedPath:C,usedParams:R}=DO({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),D=b.id+C+A,M=this.getMatch(D),$=p.get(b.id),I=(M==null?void 0:M._strictParams)??R;let F;if(!M)try{GO(b,R,o,I)}catch(G){if(Or(G)||zr(G)?F=G:F=new O8(G.message,{cause:G}),t!=null&&t.throwOnError)throw F}Object.assign(i,I);const H=$?"stay":"enter";let ie;if(M)ie={...M,cause:H,params:($==null?void 0:$.params)??i,_strictParams:I,search:Ss($?$.search:M.search,N),_strictSearch:_};else{const G=b.options.loader||b.options.beforeLoad||b.lazyFn||sR(b)?"pending":"success";ie={id:D,ssr:b.options.ssr,index:x,routeId:b.id,params:($==null?void 0:$.params)??i,_strictParams:I,pathname:C,updatedAt:Date.now(),search:$?Ss($.search,N):N,_strictSearch:_,searchError:void 0,status:G,isFetching:!1,error:void 0,paramsError:F,__routeContext:void 0,_nonReactive:{loadPromise:Ul()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:H,loaderDeps:$?za($.loaderDeps,T):T,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(ie.globalNotFound=f===b.id),ie.searchError=E;const Z=this.getParentContext(w);ie.context={...Z,...ie.__routeContext,...ie.__beforeLoadContext},h[x]=ie}for(let x=0;x<h.length;x++){const b=h[x],w=this.looseRoutesById[b.routeId],N=this.getMatch(b.id),_=p.get(b.routeId);if(b.params=_?Ss(_.params,i):i,!N){const E=h[x-1],T=this.getParentContext(E);if(w.options.context){const A={deps:b.loaderDeps,params:b.params,context:T??{},location:e,navigate:C=>this.navigate({...C,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:h,routeId:w.id};b.__routeContext=w.options.context(A)??void 0}b.context={...T,...b.__routeContext,...b.__beforeLoadContext}}}return h}matchRoutesLightweight(e){var p;const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),i=Mc(t),o={...e.search};for(const g of t)try{Object.assign(o,Ah(g.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 h;if(f)h=c.params;else{const g=Object.assign(Object.create(null),r);for(const y of t)try{GO(y,r,n??{},g)}catch{}h=g}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:h}}},Uh=class extends Error{},O8=class extends Error{};function E8(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Ah(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Uh("Async validation not supported");if(r.issues)throw new Uh(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 A8({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),i=Vi(e);let o,l;const c=Gz(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 T8({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return C8(r)(e,t,n??!1)}function C8(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 h=c;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(h=o.options.preSearchFilters.reduce((g,y)=>y(g),c));const p=f(h);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((g,y)=>y(g),p):p};t.middlewares.push(l)}if(o.options.validateSearch){const l=({search:c,next:f})=>{const h=f(c);if(!t._includeValidateSearch)return h;try{return{...h,...Ah(o.options.validateSearch,h)??void 0}}catch{return h}};t.middlewares.push(l)}}const r=({search:o})=>{const l=t.dest;return l.search?l.search===!0?o:Fi(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 P8(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 Qs}function GO(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 R8="Error preloading route! ☝️",oR=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,h;this.originalIndex=t.originalIndex;const r=this.options,n=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(h=(f=this.options).getParentRoute)==null?void 0:h.call(f),n?this._path=Qs:this.parentRoute||qa();let i=n?Qs:r==null?void 0:r.path;i&&i!=="/"&&(i=eR(i));const o=(r==null?void 0:r.id)||i;let l=n?Qs:Oh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),l!=="__root__"&&(l=Oh(["/",l]));const c=l==="__root__"?"/":Oh([this.parentRoute.fullPath,i]);this._path=i,this._id=l,this._fullPath=c,this._to=Vi(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=>Wb({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.")}},M8=class extends oR{constructor(e){super(e)}};function D8(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 Jb(e){const t=e.errorComponent??ej;return d.jsx(k8,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?S.createElement(t,{error:r,reset:n}):e.children})}var k8=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 ej({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 L8({children:e,fallback:t=null}){return lR()?d.jsx(zl.Fragment,{children:e}):d.jsx(zl.Fragment,{children:t})}function lR(){return zl.useSyncExternalStore(I8,()=>!0,()=>!1)}function I8(){return()=>{}}var uR=S.createContext(null);function xr(e){return S.useContext(uR)}var Vm=S.createContext(void 0),$8=S.createContext(void 0),ft=(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))(ft||{});function z8({update:e,notify:t,unwatched:r}){return{link:n,unlink:i,propagate:o,checkDirty:l,shallowPropagate:c};function n(h,p,g){const y=p.depsTail;if(y!==void 0&&y.dep===h)return;const x=y!==void 0?y.nextDep:p.deps;if(x!==void 0&&x.dep===h){x.version=g,p.depsTail=x;return}const b=h.subsTail;if(b!==void 0&&b.version===g&&b.sub===p)return;const w=p.depsTail=h.subsTail={version:g,dep:h,sub:p,prevDep:y,nextDep:x,prevSub:b,nextSub:void 0};x!==void 0&&(x.prevDep=w),y!==void 0?y.nextDep=w:p.deps=w,b!==void 0?b.nextSub=w:h.subs=w}function i(h,p=h.sub){const g=h.dep,y=h.prevDep,x=h.nextDep,b=h.nextSub,w=h.prevSub;return x!==void 0?x.prevDep=y:p.depsTail=y,y!==void 0?y.nextDep=x:p.deps=x,b!==void 0?b.prevSub=w:g.subsTail=w,w!==void 0?w.nextSub=b:(g.subs=b)===void 0&&r(g),x}function o(h){let p=h.nextSub,g;e:do{const y=h.sub;let x=y.flags;if(x&60?x&12?x&4?!(x&48)&&f(h,y)?(y.flags=x|40,x&=1):x=0:y.flags=x&-9|32:x=0:y.flags=x|32,x&2&&t(y),x&1){const b=y.subs;if(b!==void 0){const w=(h=b).nextSub;w!==void 0&&(g={value:p,prev:g},p=w);continue}}if((h=p)!==void 0){p=h.nextSub;continue}for(;g!==void 0;)if(h=g.value,g=g.prev,h!==void 0){p=h.nextSub;continue e}break}while(!0)}function l(h,p){let g,y=0,x=!1;e:do{const b=h.dep,w=b.flags;if(p.flags&16)x=!0;else if((w&17)===17){if(e(b)){const N=b.subs;N.nextSub!==void 0&&c(N),x=!0}}else if((w&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(g={value:h,prev:g}),h=b.deps,p=b,++y;continue}if(!x){const N=h.nextDep;if(N!==void 0){h=N;continue}}for(;y--;){const N=p.subs,_=N.nextSub!==void 0;if(_?(h=g.value,g=g.prev):h=N,x){if(e(p)){_&&c(N),p=h.sub;continue}x=!1}else p.flags&=-33;p=h.sub;const E=h.nextDep;if(E!==void 0){h=E;continue e}}return x}while(!0)}function c(h){do{const p=h.sub,g=p.flags;(g&48)===32&&(p.flags=g|16,(g&6)===2&&t(p))}while((h=h.nextSub)!==void 0)}function f(h,p){let g=p.depsTail;for(;g!==void 0;){if(g===h)return!0;g=g.prevDep}return!1}}function tj(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 Ix=[];let Th=0;const{link:YO,unlink:B8,propagate:U8,checkDirty:cR,shallowPropagate:VO}=z8({update(e){return e._update()},notify(e){Ix[$x++]=e,e.flags&=~ft.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ft.Mutable|ft.Dirty,qh(e))}});let ah=0,$x=0,Jn,zx=0;function dR(e){try{++zx,e()}finally{--zx||fR()}}function qh(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=B8(r,e)}function fR(){if(!(zx>0)){for(;ah<$x;){const e=Ix[ah];Ix[ah++]=void 0,e.notify()}ah=0,$x=0}}function hR(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?ft.None:ft.Mutable,get(){return Jn!==void 0&&YO(i,Jn,Th),i._snapshot},subscribe(o){const l=tj(o),c={current:!1},f=q8(()=>{var h;i.get(),c.current?(h=l.next)==null||h.call(l,i._snapshot):c.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(o){const l=Jn,c=Object.is;if(r)Jn=i,++Th,i.depsTail=void 0;else if(o===void 0)return!1;r&&(i.flags=ft.Mutable|ft.RecursedCheck);try{const f=i._snapshot,h=typeof o=="function"?o(f):o===void 0&&r?n(f):o;return f===void 0||!c(f,h)?(i._snapshot=h,!0):!1}finally{Jn=l,r&&(i.flags&=~ft.RecursedCheck),qh(i)}}};return r?(i.flags=ft.Mutable|ft.Dirty,i.get=function(){const o=i.flags;if(o&ft.Dirty||o&ft.Pending&&cR(i.deps,i)){if(i._update()){const l=i.subs;l!==void 0&&VO(l)}}else o&ft.Pending&&(i.flags=o&~ft.Pending);return Jn!==void 0&&YO(i,Jn,Th),i._snapshot}):i.set=function(o){if(i._update(o)){const l=i.subs;l!==void 0&&(U8(l),VO(l),fR())}},i}function q8(e){const t=()=>{const n=Jn;Jn=r,++Th,r.depsTail=void 0,r.flags=ft.Watching|ft.RecursedCheck;try{return e()}finally{Jn=n,r.flags&=~ft.RecursedCheck,qh(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ft.Watching|ft.RecursedCheck,notify(){const n=this.flags;n&ft.Dirty||n&ft.Pending&&cR(this.deps,this)?t():this.flags=ft.Watching},stop(){this.flags=ft.None,this.depsTail=void 0,qh(this)}};return t(),r}class H8{constructor(t){this.atom=hR(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(tj(t))}}class F8{constructor(t){this.atom=hR(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(tj(t))}}function QO(e){return typeof e=="function"?new F8(e):new H8(e)}var Av={exports:{}},Tv={},Cv={exports:{}},Pv={};/**
|
|
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 XO;function K8(){if(XO)return Pv;XO=1;var e=eu();function t(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(g,y){var x=y(),b=n({inst:{value:x,getSnapshot:y}}),w=b[0].inst,N=b[1];return o(function(){w.value=x,w.getSnapshot=y,f(w)&&N({inst:w})},[g,x,y]),i(function(){return f(w)&&N({inst:w}),g(function(){f(w)&&N({inst:w})})},[g]),l(x),x}function f(g){var y=g.getSnapshot;g=g.value;try{var x=y();return!r(g,x)}catch{return!0}}function h(g,y){return y()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return Pv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Pv}var WO;function G8(){return WO||(WO=1,Cv.exports=K8()),Cv.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 ZO;function Y8(){if(ZO)return Tv;ZO=1;var e=eu(),t=G8();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&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 Tv.useSyncExternalStoreWithSelector=function(h,p,g,y,x){var b=o(null);if(b.current===null){var w={hasValue:!1,value:null};b.current=w}else w=b.current;b=c(function(){function _(R){if(!E){if(E=!0,T=R,R=y(R),x!==void 0&&w.hasValue){var D=w.value;if(x(D,R))return A=D}return A=R}if(D=A,n(T,R))return D;var M=y(R);return x!==void 0&&x(D,M)?(T=R,D):(T=R,A=M)}var E=!1,T,A,C=g===void 0?null:g;return[function(){return _(p())},C===null?void 0:function(){return _(C())}]},[p,g,y,x]);var N=i(h,b[0],b[1]);return l(function(){w.hasValue=!0,w.value=N},[N]),f(N),N},Tv}var JO;function V8(){return JO||(JO=1,Av.exports=Y8()),Av.exports}var mR=V8();function Q8(e,t){return e===t}function cr(e,t,r=Q8){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 mR.useSyncExternalStoreWithSelector(n,i,i,t,r)}var X8={state:void 0,get:()=>{},subscribe:()=>()=>{}};function fo(e){const t=xr(),r=S.useContext(e.from?$8:Vm),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 cr(i??X8,l=>{if((e.shouldThrow??!0)&&!l&&qa(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const f=za(o.current,c);return o.current=f,f}return c})}function pR(e){return fo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function gR(e){const{select:t,...r}=e;return fo({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function yR(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 vR(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=xr();return S.useCallback(r=>t.navigate({...r,from:r.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function xR(e){return fo({...e,select:t=>e.select?e.select(t.context):t.context})}var Qm=D2();function W8(e,t){const r=xr(),n=Dz(t),{activeProps:i,inactiveProps:o,activeOptions:l,to:c,preload:f,preloadDelay:h,hashScrollIntoView:p,replace:g,startTransition:y,resetScroll:x,viewTransition:b,children:w,target:N,disabled:_,style:E,className:T,onClick:A,onBlur:C,onFocus:R,onMouseEnter:D,onMouseLeave:M,onTouchStart:$,ignoreBlocker:I,params:F,search:H,hash:ie,state:Z,mask:G,reloadDocument:k,unsafeRelative:q,from:J,_fromLocation:re,...oe}=e,L=lR(),X=S.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),le=cr(r.stores.location,Ce=>Ce,(Ce,mr)=>Ce.href===mr.href),ue=S.useMemo(()=>{const Ce={_fromLocation:le,...X};return r.buildLocation(Ce)},[r,le,X]),pe=ue.maskedLocation?ue.maskedLocation.publicHref:ue.publicHref,xe=ue.maskedLocation?ue.maskedLocation.external:ue.external,we=S.useMemo(()=>nB(pe,xe,r.history,_),[_,xe,pe,r.history]),_e=S.useMemo(()=>{if(we!=null&&we.external)return $h(we.href,r.protocolAllowlist)?void 0:we.href;if(!aB(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),$h(c,r.protocolAllowlist)?void 0:c}catch{}},[c,we,r.protocolAllowlist]),de=S.useMemo(()=>{if(_e)return!1;if(l!=null&&l.exact){if(!Zz(le.pathname,ue.pathname,r.basepath))return!1}else{const Ce=zh(le.pathname,r.basepath),mr=zh(ue.pathname,r.basepath);if(!(Ce.startsWith(mr)&&(Ce.length===mr.length||Ce[mr.length]==="/")))return!1}return((l==null?void 0:l.includeSearch)??!0)&&!Vs(le.search,ue.search,{partial:!(l!=null&&l.exact),ignoreUndefined:!(l!=null&&l.explicitUndefined)})?!1:l!=null&&l.includeHash?L&&le.hash===ue.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,_e,L,ue.hash,ue.pathname,ue.search,r.basepath]),te=de?Fi(i,{})??Z8:Rv,je=de?Rv:Fi(o,{})??Rv,ce=[T,te.className,je.className].filter(Boolean).join(" "),Et=(E||te.style||je.style)&&{...E,...te.style,...je.style},[Me,At]=S.useState(!1),Tt=S.useRef(!1),hr=e.reloadDocument||_e?!1:f??r.options.defaultPreload,pa=h??r.options.defaultPreloadDelay??0,Cn=S.useCallback(()=>{r.preloadRoute({...X,_builtLocation:ue}).catch(Ce=>{console.warn(Ce),console.warn(R8)})},[r,X,ue]);Mz(n,S.useCallback(Ce=>{Ce!=null&&Ce.isIntersecting&&Cn()},[Cn]),rB,{disabled:!!_||hr!=="viewport"}),S.useEffect(()=>{Tt.current||!_&&hr==="render"&&(Cn(),Tt.current=!0)},[_,Cn,hr]);const cu=Ce=>{const mr=Ce.currentTarget.getAttribute("target"),Kn=N!==void 0?N:mr;if(!_&&!iB(Ce)&&!Ce.defaultPrevented&&(!Kn||Kn==="_self")&&Ce.button===0){Ce.preventDefault(),Qm.flushSync(()=>{At(!0)});const Ld=r.subscribe("onResolved",()=>{Ld(),At(!1)});r.navigate({...X,replace:g,resetScroll:x,hashScrollIntoView:p,startTransition:y,viewTransition:b,ignoreBlocker:I})}};if(_e)return{...oe,ref:n,href:_e,...w&&{children:w},...N&&{target:N},..._&&{disabled:_},...E&&{style:E},...T&&{className:T},...A&&{onClick:A},...C&&{onBlur:C},...R&&{onFocus:R},...D&&{onMouseEnter:D},...M&&{onMouseLeave:M},...$&&{onTouchStart:$}};const wo=Ce=>{if(_||hr!=="intent")return;if(!pa){Cn();return}const mr=Ce.currentTarget;if(uc.has(mr))return;const Kn=setTimeout(()=>{uc.delete(mr),Cn()},pa);uc.set(mr,Kn)},Jp=Ce=>{_||hr!=="intent"||Cn()},kd=Ce=>{if(_||!hr||!pa)return;const mr=Ce.currentTarget,Kn=uc.get(mr);Kn&&(clearTimeout(Kn),uc.delete(mr))};return{...oe,...te,...je,href:we==null?void 0:we.href,ref:n,onClick:ol([A,cu]),onBlur:ol([C,kd]),onFocus:ol([R,wo]),onMouseEnter:ol([D,wo]),onMouseLeave:ol([M,kd]),onTouchStart:ol([$,Jp]),disabled:!!_,target:N,...Et&&{style:Et},...ce&&{className:ce},..._&&J8,...de&&eB,...L&&Me&&tB}}var Rv={},Z8={className:"active"},J8={role:"link","aria-disabled":!0},eB={"data-status":"active","aria-current":"page"},tB={"data-transitioning":"transitioning"},uc=new WeakMap,rB={rootMargin:"100px"},ol=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function nB(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function aB(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Ee=S.forwardRef((e,t)=>{const{_asChild:r,...n}=e,{type:i,...o}=W8(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 iB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var sB=class extends oR{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=>xR({...r,from:this.id}),this.useSearch=r=>vR({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>yR({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>gR({...r,from:this.id}),this.useLoaderData=r=>pR({...r,from:this.id}),this.useNavigate=()=>ho({from:this.fullPath}),this.Link=zl.forwardRef((r,n)=>d.jsx(Ee,{ref:n,from:this.fullPath,...r}))}};function oB(e){return new sB(e)}var lB=class extends M8{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=>xR({...t,from:this.id}),this.useSearch=t=>vR({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>yR({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>gR({...t,from:this.id}),this.useLoaderData=t=>pR({...t,from:this.id}),this.useNavigate=()=>ho({from:this.fullPath}),this.Link=zl.forwardRef((t,r)=>d.jsx(Ee,{ref:r,from:this.fullPath,...t}))}};function uB(e){return new lB(e)}function dr(e){return typeof e=="object"?new eE(e,{silent:!0}).createRoute(e):new eE(e,{silent:!0}).createRoute}var eE=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=oB(r);return n.isRoot=!1,n},this.silent=t==null?void 0:t.silent}};function cB(e){const t=xr(),r=`not-found-${cr(t.stores.location,n=>n.pathname)}-${cr(t.stores.status,n=>n)}`;return d.jsx(Jb,{getResetKey:()=>r,onCatch:(n,i)=>{var o;if(Or(n))(o=e.onCatch)==null||o.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(Or(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function dB(){return d.jsx("p",{children:"Not Found"})}function yl(e){return d.jsx(d.Fragment,{children:e.children})}function bR(e,t,r){return t.options.notFoundComponent?d.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?d.jsx(e.options.defaultNotFoundComponent,{...r}):d.jsx(dB,{})}function fB(e){return null}function hB(){return fB(xr()),null}var jR=S.memo(function({matchId:t}){const r=xr(),n=r.stores.activeMatchStoresById.get(t);n||qa();const i=cr(r.stores.loadedAt,l=>l),o=cr(n,l=>l);return d.jsx(mB,{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 mB({router:e,matchId:t,resetKey:r,matchState:n}){var b,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,h=i.isRoot?i.options.notFoundComponent??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,p=n.ssr===!1||n.ssr==="data-only",g=(!i.isRoot||i.options.wrapInSuspense||p)&&(i.options.wrapInSuspense??o??(((w=i.options.errorComponent)==null?void 0:w.preload)||p))?S.Suspense:yl,y=c?Jb:yl,x=h?cB:yl;return d.jsxs(i.isRoot?i.options.shellComponent??yl:yl,{children:[d.jsx(Vm.Provider,{value:t,children:d.jsx(g,{fallback:l,children:d.jsx(y,{getResetKey:()=>r,errorComponent:c||ej,onCatch:(N,_)=>{if(Or(N))throw N;f==null||f(N,_)},children:d.jsx(x,{fallback:N=>{if(!h||N.routeId&&N.routeId!==n.routeId||!N.routeId&&!i.isRoot)throw N;return S.createElement(h,N)},children:p||n._displayPending?d.jsx(L8,{fallback:l,children:d.jsx(tE,{matchId:t})}):d.jsx(tE,{matchId:t})})})})}),n.parentRouteId===Qs?d.jsxs(d.Fragment,{children:[d.jsx(pB,{resetKey:r}),e.options.scrollRestoration&&W2?d.jsx(hB,{}):null]}):null]})}function pB({resetKey:e}){const t=xr(),r=S.useRef(void 0);return wc(()=>{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 tE=S.memo(function({matchId:t}){var h,p,g,y;const r=xr(),n=r.stores.activeMatchStoresById.get(t);n||qa();const i=cr(n,x=>x),o=i.routeId,l=r.routesById[o],c=S.useMemo(()=>{var b;const x=(b=r.routesById[o].options.remountDeps??r.options.defaultRemountDeps)==null?void 0:b({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(wR,{})},[c,l.options.component,r.options.defaultComponent]);if(i._displayPending)throw(h=r.getMatch(i.id))==null?void 0:h._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 b=r.getMatch(i.id);if(b&&!b._nonReactive.minPendingPromise){const w=Ul();b._nonReactive.minPendingPromise=w,setTimeout(()=>{w.resolve(),b._nonReactive.minPendingPromise=void 0},x)}}throw(g=r.getMatch(i.id))==null?void 0:g._nonReactive.loadPromise}if(i.status==="notFound")return Or(i.error)||qa(),bR(r,l,i.error);if(i.status==="redirected")throw zr(i.error)||qa(),(y=r.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise;if(i.status==="error")throw i.error;return f}),wR=S.memo(function(){const t=xr(),r=S.useContext(Vm);let n,i=!1,o;{const h=r?t.stores.activeMatchStoresById.get(r):void 0;[n,i]=cr(h,p=>[p==null?void 0:p.routeId,(p==null?void 0:p.globalNotFound)??!1]),o=cr(t.stores.matchesId,p=>p[p.findIndex(g=>g===r)+1])}const l=n?t.routesById[n]:void 0,c=t.options.defaultPendingComponent?d.jsx(t.options.defaultPendingComponent,{}):null;if(i)return l||qa(),bR(t,l,void 0);if(!o)return null;const f=d.jsx(jR,{matchId:o});return n===Qs?d.jsx(S.Suspense,{fallback:c,children:f}):f});function gB(){const e=xr(),t=S.useRef({router:e,mounted:!1}),[r,n]=S.useState(!1),i=cr(e.stores.isLoading,g=>g),o=cr(e.stores.hasPendingMatches,g=>g),l=bv(i),c=i||r||o,f=bv(c),h=i||o,p=bv(h);return e.startTransition=g=>{n(!0),S.startTransition(()=>{g(),n(!1)})},S.useEffect(()=>{const g=e.history.subscribe(e.load),y=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Vi(e.latestLocation.publicHref)!==Vi(y.publicHref)&&e.commitLocation({...y,replace:!0}),()=>{g()}},[e,e.history]),wc(()=>{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(y){console.error(y)}})()},[e]),wc(()=>{l&&!i&&e.emit({type:"onLoad",...wl(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,e,i]),wc(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...wl(e.stores.location.state,e.stores.resolvedLocation.state)})},[h,p,e]),wc(()=>{if(f&&!c){const g=wl(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...g}),dR(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),g.hrefChanged&&D8(e)}},[c,f,e]),null}function yB(){const e=xr(),t=e.routesById[Qs].options.pendingComponent??e.options.defaultPendingComponent,r=t?d.jsx(t,{}):null,n=d.jsxs(typeof document<"u"&&e.ssr?yl:S.Suspense,{fallback:r,children:[d.jsx(gB,{}),d.jsx(vB,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:n}):n}function vB(){const e=xr(),t=cr(e.stores.firstMatchId,i=>i),r=cr(e.stores.loadedAt,i=>i),n=t?d.jsx(jR,{matchId:t}):null;return d.jsx(Vm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:d.jsx(Jb,{getResetKey:()=>r,errorComponent:ej,onCatch:void 0,children:n})})}function xB(){const e=xr();return cr(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 bB(e){const t=xr(),r=S.useRef(void 0);return cr(t.stores.activeMatchesSnapshot,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=za(r.current,i);return r.current=o,o}return i})}var jB=e=>({createMutableStore:QO,createReadonlyStore:QO,batch:dR}),wB=e=>new SB(e),SB=class extends _8{constructor(e){super(e,jB)}};function NB({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(uR.Provider,{value:e,children:t});return e.options.Wrap?d.jsx(e.options.Wrap,{children:n}):n}function _B({router:e,...t}){return d.jsx(NB,{router:e,...t,children:d.jsx(yB,{})})}function rj(e){const r=xr();return S.useRef(void 0),cr(r.stores.__store,n=>n)}function nj(e){const t=xr(),r=S.useRef(void 0);return cr(t.stores.location,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=za(r.current,i);return r.current=o,o}return i})}const SR=S.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function OB({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(SR.Provider,{value:o,children:e})}function NR(){return S.useContext(SR)}function EB(e){return`agentv.studio.initial-project-redirect:${e}`}function aj(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 Bx(e,t,r){return r?`/projects/${encodeURIComponent(r)}/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`:`/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function dd(e){return e.resultDir?{result_dir:e.resultDir}:e.evalPath?{eval_path:e.evalPath}:{}}function AB(e,t,r={}){const n=Bx(e,t,r.projectId),o=new URLSearchParams(dd(r)).toString();return o?`${n}?${o}`:n}function Xm(e){return e.result_dir?e.result_dir:[e.eval_path??e.suite??"",e.testId,e.target??""].join(":")}function Wm(e,t,r={}){return e.testId===t&&(!r.resultDir||e.result_dir===r.resultDir)&&(!r.evalPath||e.eval_path===r.evalPath)}function rE(e,t,r){const n=`tags/${encodeURIComponent(e)}/${encodeURIComponent(t)}`;return r?`/projects/${encodeURIComponent(r)}/${n}`:`/${n}`}function nE(e,t){return t?`/projects/${encodeURIComponent(t)}/jobs/${encodeURIComponent(e)}`:`/jobs/${encodeURIComponent(e)}`}function aE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`}function iE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`}function TB(e){return e?aj(e,"runs"):"/?tab=runs"}function CB(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:aj(r,n)}:{kind:"dashboard"}}function nr(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 RB(e){const t=[];for(let r=1;r<e.length;r++){const n=e[r],i=n.routeId??n.id,o=n.params;if(!(i==="/"||i==="/_layout")){if(i.includes("/projects/$projectId")&&o.projectId){const l=o.projectId,c=aj(o.projectId);if(t.some(f=>f.to===c)||t.push({label:l,to:c}),i==="/projects/$projectId")continue}i.includes("/projects/$projectId_/jobs/$runId")?t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:nE(o.runId,o.projectId)}):i.includes("/projects/$projectId_/runs/$runId/category/$category")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId,o.projectId)}),t.push({label:o.category??"Category",to:aE(o.runId,o.category??"Category",o.projectId)})):i.includes("/projects/$projectId_/runs/$runId/suite/$suite")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId,o.projectId)}),t.push({label:o.suite??"Suite",to:iE(o.runId,o.suite??"Suite",o.projectId)})):i.includes("/projects/$projectId_/runs/$runId")?t.push({label:nr(o.runId),to:Ai(o.runId,o.projectId)}):i.includes("/projects/$projectId_/evals/$runId/$evalId")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId,o.projectId)}),t.push({label:o.evalId??"Eval",to:Bx(o.runId,o.evalId??"Eval",o.projectId)})):i.includes("/projects/$projectId_/tags/$key/$value")?t.push({label:o.value??"Tag",to:rE(o.key??"experiment",o.value??"Tag",o.projectId)}):i.includes("/runs/$runId/category/$category")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId)}),t.push({label:o.category??"Category",to:aE(o.runId,o.category??"Category")})):i.includes("/runs/$runId/suite/$suite")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId)}),t.push({label:o.suite??"Suite",to:iE(o.runId,o.suite??"Suite")})):i.includes("/jobs/$runId")?t.push({label:nr(o.runId),to:nE(o.runId)}):i.includes("/runs/$runId")?t.push({label:nr(o.runId),to:Ai(o.runId)}):i.includes("/evals/$runId/$evalId")?(t.some(l=>l.label===nr(o.runId))||t.push({label:nr(o.runId),to:Ai(o.runId)}),t.push({label:o.evalId??"Eval",to:Bx(o.runId,o.evalId??"Eval")})):i.includes("/tags/$key/$value")?t.push({label:o.value??"Tag",to:rE(o.key??"experiment",o.value??"Tag")}):i==="/settings"&&t.push({label:"Settings",to:"/settings"})}}return t}function MB(){const e=bB(),{toggle:t}=NR(),r=RB(e),n=r.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:[n?d.jsx(Ee,{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"}),r.map((i,o)=>{const l=o===r.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:">"}),l?d.jsx("span",{className:"min-w-0 truncate text-gray-400",children:i.label}):d.jsx(Ee,{to:i.to??"/",className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",children:i.label})]},`${i.label}-${o}`)})]})]})}function DB(e){const t=e.pending_merge;if(t)return{tempBranch:t.temp_branch,targetBranch:t.target_branch,...t.compare_url!==void 0&&{compareUrl:t.compare_url},...t.contributed_run_count!==void 0&&{contributedRunCount:t.contributed_run_count},createdAt:t.created_at}}function _R(e){if(!e)return;const t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toLocaleString()}function kB(e){const t=_R(e);return t?`Last synced ${t}`:"Never synced"}function ij(e){return typeof e!="number"||!Number.isFinite(e)?"Remote runs unknown":`${e} remote run${e===1?"":"s"}`}function OR(e,t,r){const n=r?` (${r})`:"";return`${e} of ${t} run${t===1?"":"s"} on remote${n}`}function LB(e,t,r){return(e==null?void 0:e.configured)!==!0?[]:[t?`Project: ${t}`:void 0,r??ij(e.run_count),kB(e.last_synced_at),e.repo?`Repo: ${e.repo}`:void 0].filter(n=>n!==void 0)}function IB(e){return(e==null?void 0:e.sync_status)==="syncing"}function $B(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";if(r==="needs_human_merge"){const n=DB(e);return n?{state:"needs_human_merge",label:"Pending merge",actionLabel:"Sync Project",tone:"warn",summary:e.block_reason??`Local results could not be auto-merged, so they were pushed to ${n.tempBranch} for review.`,nextAction:`No history was rewritten and the canonical branch was left untouched. Merge the branch into ${n.targetBranch} on GitHub, then click "I merged it — resync".`,canSync:!1,pendingMerge:n}:{state:"needs_human_merge",label:"Needs human merge",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??"The results branch diverged and a genuine content conflict could not be auto-merged.",nextAction:"The remote branch is unchanged and no history was rewritten. Resolve the conflict with a GitHub pull request, then sync again.",canSync:!1}}return r==="push_conflict"?{state:"push_conflict",label:"Push conflict",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??"The remote results branch changed before local results could be pushed.",nextAction:"Sync stopped before changing the results branch. Refresh status, then retry — results sync auto-merges concurrent writes and never force-pushes.",canSync:!1}: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 Results",tone:"warn",summary:e.block_reason??"Local result artifacts have pending edits.",nextAction:e.auto_push===!0?"Sync Project will commit safe result artifact changes before syncing.":"Review or commit the pending result artifacts; 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 results are in sync.",canSync:!0}}function zB(e){return typeof e!="number"||!Number.isFinite(e)?"remote results":ij(e)}function sE(e){const t=[`Synced ${zB(e.run_count)}`];e.repo&&t.push(`from ${e.repo}`);const r=_R(e.last_synced_at);return r&&t.push(`at ${r}`),`${t.join(" ")}.`}function BB(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 ${ij(t)} ${t===1?"remains":"remain"} available.`:"The remote results cache remains available."}function sj(e){return[BB(e),"Resolve the results repo issue, then sync remote results again."].filter(t=>t!==void 0).join(" ")}function Hh(e){if(e.blocked||e.sync_status==="conflicted"||e.sync_status==="diverged"||e.sync_status==="push_conflict"){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}. ${sj(e)}`}}const t=[e.commit_created?"committed pending results":void 0,e.pull_performed?"pulled remote results":void 0,e.auto_merged_remote?"Merged remote (auto)":void 0,e.push_performed?"pushed local results":void 0].filter(r=>r!==void 0);return{kind:"success",message:t.length>0?`${sE(e)} Sync completed: ${t.join(", ")}.`:`${sE(e)} Project results were already up to date.`}}function Fh(e,t){return{kind:"error",message:`Sync failed: ${e instanceof Error?e.message:String(e)}. ${sj(t)}`}}async function Fe(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function UB(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 qB=50;function ER(e,t){const r=new URLSearchParams({limit:String(qB)});return t&&r.set("cursor",t),`${e}?${r.toString()}`}function AR(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 oE(e){return e.split("/").filter(t=>t.length>0).map(t=>encodeURIComponent(t)).join("/")}function fd(e,t){const r=t.toString();return r?`${e}?${r}`:e}function hd(e){const t=new URLSearchParams;return e&&t.set("result_dir",e),t}function aa(e){const t=e.projectId?`${ut(e.projectId)}/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${oE(e.filePath)}`:`/api/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${oE(e.filePath)}`,r=hd(e.resultDir);return e.raw&&r.set("raw","1"),e.download&&r.set("download","1"),fd(t,r)}const oj={queryKey:["runs"],queryFn:()=>Fe("/api/runs"),refetchInterval:5e3},HB={queryKey:["runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:e})=>Fe(ER("/api/runs",e)),getNextPageParam:e=>e.next_cursor,refetchInterval:5e3};function FB(e){return{queryKey:["runs",e],queryFn:()=>Fe(`/api/runs/${encodeURIComponent(e)}`),enabled:!!e}}function KB(e,t){const r=t?`${ut(t)}/runs/${encodeURIComponent(e)}/log`:`/api/runs/${encodeURIComponent(e)}/log`;return{queryKey:["runs",e,"log",t??""],queryFn:()=>UB(r),enabled:!!e,refetchInterval:3e3}}function GB(e,t){return Ue(KB(e,t))}const xl="experiment",YB={queryKey:["tags","keys"],queryFn:()=>Fe("/api/tags")};function lj(e){return{queryKey:["tags","groups",e],queryFn:()=>Fe(`/api/tags?key=${encodeURIComponent(e)}`),enabled:!!e}}function VB(e){return{queryKey:["projects",e,"tags","keys"],queryFn:()=>Fe(`${ut(e)}/tags`),enabled:!!e}}function uj(e,t){return{queryKey:["projects",e,"tags","groups",t],queryFn:()=>Fe(`${ut(e)}/tags?key=${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function QB(e){return{queryKey:["compare","baseline",e??""],queryFn:()=>Fe(`/api/compare?baseline=${encodeURIComponent(e??"")}`),enabled:!!e}}const XB={queryKey:["compare"],queryFn:()=>Fe("/api/compare")},WB={queryKey:["targets"],queryFn:()=>Fe("/api/targets")};function ZB(e,t,r){const n=`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/files`;return{queryKey:["runs",e,"evals",t,r??"","files"],queryFn:()=>Fe(fd(n,hd(r))),enabled:!!e&&!!t}}function JB(e,t,r,n){return{queryKey:["runs",e,"evals",t,n??"","files",r],queryFn:()=>Fe(aa({runId:e,evalId:t,filePath:r,resultDir:n})),enabled:!!e&&!!t&&!!r}}function e6(e,t,r){const n=`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/transcript`;return{queryKey:["runs",e,"evals",t,r??"","transcript"],queryFn:()=>Fe(fd(n,hd(r))),enabled:!!e&&!!t}}function t6(e,t){return{queryKey:["runs",e,"categories",t,"suites"],queryFn:()=>Fe(`/api/runs/${encodeURIComponent(e)}/categories/${encodeURIComponent(t)}/suites`),enabled:!!e&&!!t}}const r6={queryKey:["config"],queryFn:()=>Fe("/api/config"),staleTime:5e3};function Ic(e){const t=e?`${ut(e)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",e??""],queryFn:()=>Fe(t),staleTime:5e3,refetchInterval:r=>IB(r.state.data)?1e3:!1}}function n6(){return Ue(oj)}function a6(){var t;const e=X2(HB);return{...e,data:AR((t=e.data)==null?void 0:t.pages)}}function md(e){return Ue(FB(e))}function i6(){return Ue(XB)}function s6(e,t,r){return Ue(ZB(e,t,r))}function Kh(e,t,r,n){return Ue(JB(e,t,r,n))}function o6(e,t,r){return Ue(e6(e,t,r))}function TR(e,t){return Ue(t6(e,t))}function pt(e){return Ue(e?x6(e):r6)}function Zm(e){return Ue(Ic(e))}const $c=.8,Jm="AgentV";function eo(e,t=$c){return e>=t}const l6={queryKey:["projects"],queryFn:()=>Fe("/api/projects"),refetchInterval:1e4};function cj(){return Ue(l6)}async function u6(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 c6(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,path:r.path,addedAt:r.added_at,lastOpenedAt:r.last_opened_at}}async function d6(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 ut(e){return`/api/projects/${encodeURIComponent(e)}`}function dj(e){return{queryKey:["projects",e,"runs"],queryFn:()=>Fe(`${ut(e)}/runs`),enabled:!!e,refetchInterval:5e3}}function f6(e){return{queryKey:["projects",e,"runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:t})=>Fe(ER(`${ut(e)}/runs`,t)),getNextPageParam:t=>t.next_cursor,enabled:!!e,refetchInterval:5e3}}function h6(e){return Ue(dj(e))}function m6(e){var r;const t=X2(f6(e));return{...t,data:AR((r=t.data)==null?void 0:r.pages)}}function p6(e,t){return{queryKey:["projects",e,"runs",t],queryFn:()=>Fe(`${ut(e)}/runs/${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function pd(e,t){return Ue(p6(e,t))}function CR(e,t,r){return{queryKey:["projects",e,"runs",t,"categories",r,"suites"],queryFn:()=>Fe(`${ut(e)}/runs/${encodeURIComponent(t)}/categories/${encodeURIComponent(r)}/suites`),enabled:!!e&&!!t&&!!r}}function g6(e,t,r,n){const i=`${ut(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/files`;return{queryKey:["projects",e,"runs",t,"evals",r,n??"","files"],queryFn:()=>Fe(fd(i,hd(n))),enabled:!!e&&!!t&&!!r}}function Gh(e,t,r,n,i){return{queryKey:["projects",e,"runs",t,"evals",r,i??"","files",n],queryFn:()=>Fe(aa({projectId:e,runId:t,evalId:r,filePath:n,resultDir:i})),enabled:!!e&&!!t&&!!r&&!!n}}function y6(e,t,r,n){const i=`${ut(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/transcript`;return{queryKey:["projects",e,"runs",t,"evals",r,n??"","transcript"],queryFn:()=>Fe(fd(i,hd(n))),enabled:!!e&&!!t&&!!r}}function PR(e,t){const r=`${ut(e)}/compare`;return t?{queryKey:["projects",e,"compare","baseline",t],queryFn:()=>Fe(`${r}?baseline=${encodeURIComponent(t)}`),enabled:!!e}:{queryKey:["projects",e,"compare"],queryFn:()=>Fe(r),enabled:!!e}}function v6(e){return{queryKey:["projects",e,"targets"],queryFn:()=>Fe(`${ut(e)}/targets`),enabled:!!e}}function x6(e){return{queryKey:["projects",e,"config"],queryFn:()=>Fe(`${ut(e)}/config`),enabled:!!e,staleTime:5e3}}async function RR(e){const t=e?`${ut(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()}async function MR(e){const t=e?`${ut(e)}/remote/sync/confirm-merge`:"/api/remote/sync/confirm-merge",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 confirm results merge: ${r.status}`)}return r.json()}class DR extends Error{constructor(t,r,n=[]){super(t),this.status=r,this.duplicates=n,this.name="CombineRunsApiError"}}async function lE(e,t,r,n,i){const o=r?`${ut(r)}/runs/combine`:"/api/runs/combine",l=await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({run_ids:e,duplicate_policy:t,...i!=null&&i.trim()?{experiment:i.trim()}:{}})});if(!l.ok){const c=await l.json().catch(()=>({error:l.statusText}));throw new DR(c.error??`Failed to combine runs: ${l.status}`,l.status,c.duplicates??[])}return l.json()}async function b6(e,t){const r=t?`${ut(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 j6(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 w6(e){const t=e?`${ut(e)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",e??""],queryFn:()=>Fe(t),staleTime:3e4}}function S6(e){return Ue(w6(e))}function N6(e){const t=e?`${ut(e)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",e??""],queryFn:()=>Fe(t),staleTime:3e4}}function _6(e){return Ue(N6(e))}async function kR(e,t){const r=t?`${ut(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 O6(e,t){const r=t?`${ut(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 E6(e,t){const r=t?`${ut(t)}/eval/status/${e}`:`/api/eval/status/${e}`;return{queryKey:["eval-status",t??"",e],queryFn:()=>Fe(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 fj(e,t){return Ue(E6(e,t))}function A6(e){const t=e?`${ut(e)}/eval/runs`:"/api/eval/runs";return{queryKey:["eval-runs",e??""],queryFn:()=>Fe(t),refetchInterval:3e3}}function hj(e){return Ue(A6(e))}async function T6(e,t){const r=t?`${ut(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 C6(e){switch(e){case"inline_experiment":return"Inline experiment config";case"cli_flags":return"CLI runtime flags";case"mixed":return"Mixed runtime config";case"defaults":return"Default runtime config";default:return"Runtime config unknown"}}function LR(e){var t;return((t=e.experiment)==null?void 0:t.trim())||"default"}function mj(e){return e?C6(e.config_source):"Runtime source unknown"}function P6(e){if(!e)return"Runtime source metadata was not recorded for this run.";const t=[mj(e)];return e.eval_files&&e.eval_files.length>0&&t.push(`Eval files: ${e.eval_files.join(", ")}`),e.wrapper_eval_file&&t.push(`Wrapper eval: ${e.wrapper_eval_file}`),t.join(`
|
|
66
|
-
`)}function IR(e){return e&&e!=="default"?e:void 0}function R6(e,t){const r=[IR(t==null?void 0:t.experiment),t==null?void 0:t.target].filter(n=>!!n);return r.length>0?r.join(" · "):e}function zc(e){const t=e==null?void 0:e.trim();return t||void 0}function $R(e){const t=e.results[0],r=zc(e.sourceLabel),n=e.source==="remote",i=n&&r?r:R6(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,IR(t==null?void 0:t.experiment),o,n?void 0:e.source].filter(h=>!!h),c=zc(e.remoteRepo),f=[];return f.push({label:"Experiment namespace",value:LR({experiment:t==null?void 0:t.experiment,runtime_source:e.runtimeSource})}),e.runtimeSource&&f.push({label:"Runtime source",value:mj(e.runtimeSource)}),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 M6(e){return e.replace(/\.eval\.(ya?ml|json|jsonl)$/i,"").replace(/\.(ya?ml|json|jsonl)$/i,"")}function D6(e){const t=zc(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("/")?M6(n):t)||t,title:t}}function zR(e){return zc(e.eval_path)??zc(e.suite)}function k6(e){return D6(zR(e))}function BR(e){const t=e.map(n=>zR(n)??"");return t.filter(n=>n&&n!=="Uncategorized").length>0&&new Set(t).size>1}const Yh="remote::";function UR(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 Ha(e){const t=e==null?void 0:e.trim();return t||void 0}function L6(e){const t=Ha(e);return t&&t!=="default"&&t!=="-"?t:void 0}function qR(e){let t=e.trim();return t.startsWith(Yh)&&(t=t.slice(Yh.length)),t.replace(/\.(jsonl|json)$/i,"")}function I6(e){const r=qR(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,h="000"]=r,p=new Date(`${n}-${i}-${o}T${l}:${c}:${f}.${h}Z`);return Number.isNaN(p.getTime())?void 0:p}function pj(e,t){const r=Ha(e);return r?I6(r)?!0:qR(r)===UR(t):!1}function $6(e,t){const r=Ha(e);if(!r)return;const n=r.startsWith(Yh)?r.slice(Yh.length):r,i=n.lastIndexOf("::");if(i!==-1){const o=n.slice(i+2);if(pj(o,t))return Ha(n.slice(0,i))}return n}function z6(e){return[Ha(e.display_name),Ha(e.title),$6(e.filename,e.timestamp)].find(r=>!!r&&!pj(r,e.timestamp))}function B6(e){return`${Math.round(e*100)}%`}function U6(e,t){const r=[t],n=Ha(e.filename),i=Ha(e.display_name),o=Ha(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(`
|
|
67
|
-
`)}function gj(e,t={}){const r=UR(e.timestamp),n=L6(e.experiment),i=z6(e),o=n&&!pj(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(B6(e.pass_rate));const h=f.join(" · "),p=h?`${l} · ${h}`:l;return{primary:l,secondary:h,label:p,title:U6(e,p)}}function Zi(e){return e?e.charAt(0).toUpperCase()+e.slice(1):"Tag"}function yj({appName:e}){return e!==Jm?d.jsx("span",{className:"av-brand-name",children:e}):d.jsxs("span",{className:"av-brand-name","aria-label":"AgentV",children:[d.jsx("span",{className:"av-brand-name__letter","aria-hidden":"true",children:"A"}),d.jsx("span",{className:"av-brand-name__middle","aria-hidden":"true",children:"gent"}),d.jsx("span",{className:"av-brand-name__letter","aria-hidden":"true",children:"V"})]})}function q6({result:e,className:t=""}){const r=k6(e);return r?d.jsx("span",{className:`block truncate text-gray-500 ${t}`,title:r.title,children:r.label}):null}function qn({children:e}){const{isOpen:t,close:r}=NR(),i=nj().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 ma({projectId:e}){const{data:t}=pt(e),r=(t==null?void 0:t.app_name)??Jm;return d.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:d.jsx(Ee,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(yj,{appName:r})})})}function HR({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 FR({result:e,passThreshold:t,showEvalSourceLabel:r}){const n=eo(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(q6,{result:e,className:"mt-1 max-w-full text-[11px] leading-4"}):null]})]})}function KR(){const t=nj().search;return{resultDir:t.result_dir,evalPath:t.eval_path}}const uE=[{id:"runs",label:"Recent Runs",description:"Run review"},{id:"tags",label:"Tags",description:"Grouped runs"},{id:"analytics",label:"Analytics",description:"Compare scores"},{id:"targets",label:"Targets",description:"Target results"}];function Mv(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 cE({projectId:e}){const t=nj(),{data:r}=cj(),n=(r==null?void 0:r.projects)??[],i=t.search,o=uE.some(c=>c.id===i.tab)?i.tab:"runs",l=!e&&n.length===0;return d.jsxs(qn,{children:[d.jsx(ma,{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(Ee,{to:"/",className:Mv(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(Ee,{to:"/settings",className:Mv(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"}),uE.map(c=>d.jsxs(Ee,{to:"/",search:{tab:c.id},className:Mv(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 H6(){const e=xB(),t=e({to:"/projects/$projectId/evals/$runId/$evalId",fuzzy:!0}),r=e({to:"/projects/$projectId/runs/$runId",fuzzy:!0}),n=e({to:"/projects/$projectId/tags/$key/$value",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:b,evalId:w}=t;return d.jsx(V6,{projectId:x,runId:b,currentEvalId:w})}if(i&&typeof i=="object"&&"projectId"in i){const{projectId:x,runId:b,category:w}=i;return d.jsx(X6,{projectId:x,runId:b,category:w})}if(o&&typeof o=="object"&&"projectId"in o){const{projectId:x,runId:b,suite:w}=o;return d.jsx(Q6,{projectId:x,runId:b,suite:w})}if(r&&typeof r=="object"&&"projectId"in r){const{projectId:x,runId:b}=r;return d.jsx(dE,{projectId:x,currentRunId:b})}if(l&&typeof l=="object"&&"projectId"in l){const{projectId:x}=l;return d.jsx(dE,{projectId:x})}if(n&&typeof n=="object"&&"projectId"in n){const{projectId:x,key:b,value:w}=n;return d.jsx(W6,{projectId:x,tagKey:b,currentValue:w})}if(c&&typeof c=="object"&&"projectId"in c){const{projectId:x}=c;return d.jsx(cE,{projectId:x})}const f=e({to:"/runs/$runId",fuzzy:!0}),h=e({to:"/evals/$runId/$evalId",fuzzy:!0}),p=e({to:"/runs/$runId/category/$category",fuzzy:!0}),g=e({to:"/runs/$runId/suite/$suite",fuzzy:!0}),y=e({to:"/tags/$key/$value",fuzzy:!0});if(p&&typeof p=="object"&&"runId"in p){const{runId:x,category:b}=p;return d.jsx(Y6,{runId:x,category:b})}if(g&&typeof g=="object"&&"runId"in g){const{runId:x,suite:b}=g;return d.jsx(G6,{runId:x,suite:b})}if(h&&typeof h=="object"&&"runId"in h){const{runId:x,evalId:b}=h;return d.jsx(K6,{runId:x,currentEvalId:b})}if(y&&typeof y=="object"&&"key"in y){const{key:x,value:b}=y;return d.jsx(Z6,{tagKey:x,currentValue:b})}if(f&&typeof f=="object"&&"runId"in f){const{runId:x}=f;return d.jsx(F6,{currentRunId:x})}return d.jsx(cE,{})}function F6({currentRunId:e}){const{data:t}=n6(),{data:r}=pt(),{data:n}=hj(),i=((n==null?void 0:n.runs)??[]).filter(o=>o.status==="starting"||o.status==="running").length;return d.jsxs(qn,{children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[d.jsx(Ee,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(yj,{appName:(r==null?void 0:r.app_name)??Jm})}),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=gj(o),c=e===o.filename;return d.jsx(Ee,{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(HR,{display:l})},o.filename)})]}),d.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:d.jsx(Ee,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function K6({runId:e,currentEvalId:t}){const{data:r}=md(e),{data:n}=pt(),i=KR(),o=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=BR((r==null?void 0:r.results)??[]);return d.jsxs(qn,{children:[d.jsx(ma,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{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(c=>{const f=dd({resultDir:c.result_dir,evalPath:c.eval_path}),h=Wm(c,t,i);return d.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:c.testId},search:f,className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${h?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(FR,{result:c,passThreshold:o,showEvalSourceLabel:l})},Xm(c))})]})]})}function G6({runId:e,suite:t}){const{data:r}=md(e),{data:n}=pt(),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(qn,{children:[d.jsx(ma,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{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=eo(l.score,i),f=dd({resultDir:l.result_dir,evalPath:l.eval_path});return d.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:l.testId},search:f,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})]},Xm(l))})]})]})}function Y6({runId:e,category:t}){const{data:r}=TR(e,t),n=(r==null?void 0:r.suites)??[];return d.jsxs(qn,{children:[d.jsx(ma,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{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(Ee,{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 dE({projectId:e,currentRunId:t}){const{data:r}=h6(e);return d.jsxs(qn,{children:[d.jsx(ma,{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=gj(n),o=t===n.filename;return d.jsx(Ee,{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(HR,{display:i})},n.filename)})]})]})}function V6({projectId:e,runId:t,currentEvalId:r}){const{data:n}=pd(e,t),{data:i}=pt(e),o=KR(),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,c=BR((n==null?void 0:n.results)??[]);return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{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(f=>{const h=dd({resultDir:f.result_dir,evalPath:f.eval_path}),p=Wm(f,r,o);return d.jsx(Ee,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:f.testId},search:h,className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${p?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(FR,{result:f,passThreshold:l,showEvalSourceLabel:c})},Xm(f))})]})]})}function Q6({projectId:e,runId:t,suite:r}){const{data:n}=pd(e,t),{data:i}=pt(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(qn,{children:[d.jsx(ma,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{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=eo(c.score,o),h=dd({resultDir:c.result_dir,evalPath:c.eval_path});return d.jsxs(Ee,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},search:h,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})]},Xm(c))})]})]})}function X6({projectId:e,runId:t,category:r}){const{data:n}=Ue(CR(e,t,r)),i=(n==null?void 0:n.suites)??[];return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(Ee,{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(Ee,{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 W6({projectId:e,tagKey:t,currentValue:r}){const{data:n}=Ue(uj(e,t)),i=(n==null?void 0:n.groups)??[];return d.jsxs(qn,{children:[d.jsx(ma,{projectId:e}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsxs(Ee,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"tags",key:t},className:"text-xs text-gray-400 hover:text-cyan-400",children:["← All ",Zi(t)," values"]})}),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:Zi(t)}),i.map(o=>{const l=o.name===r;return d.jsx(Ee,{to:"/projects/$projectId/tags/$key/$value",params:{projectId:e,key:t,value:o.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${l?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:o.name},o.name)})]})]})}function Z6({tagKey:e,currentValue:t}){const{data:r}=Ue(lj(e)),n=(r==null?void 0:r.groups)??[];return d.jsxs(qn,{children:[d.jsx(ma,{}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsxs(Ee,{to:"/",search:{tab:"tags",key:e},className:"text-xs text-gray-400 hover:text-cyan-400",children:["← All ",Zi(e)," values"]})}),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:Zi(e)}),n.map(i=>{const o=i.name===t;return d.jsx(Ee,{to:"/tags/$key/$value",params:{key:e,value: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 J6(){return d.jsx(OB,{children:d.jsx(eU,{})})}function eU(){return d.jsxs("div",{className:"flex h-screen overflow-hidden",children:[d.jsx(H6,{}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[d.jsx(MB,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(wR,{})})]})]})}const Yt=uB({component:J6}),tU=dr("/settings")({component:rU});function rU(){const{data:e,isLoading:t}=pt(),r=co(),[n,i]=S.useState(""),[o,l]=S.useState(!1),[c,f]=S.useState(null),h=(e==null?void 0:e.threshold)??$c,p=n||String(h),g=(e==null?void 0:e.read_only)===!0,y=(e==null?void 0:e.app_name)??Jm,x=async()=>{const b=Number.parseFloat(n||String(h));if(Number.isNaN(b)||b<0||b>1){f({type:"error",text:"Threshold must be a number between 0 and 1"});return}l(!0),f(null);try{await j6({threshold:b}),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(yj,{appName:y})]})]}),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: ",$c]}),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:b=>i(b.target.value),disabled:g,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:[!g&&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"}),g&&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 fE({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 nU({open:e,onClose:t,onAdded:r}){const n=S.useRef(null),[i,o]=S.useState(null),[l,c]=S.useState(""),[f,h]=S.useState(""),[p,g]=S.useState(null),[y,x]=S.useState(null),[b,w]=S.useState(!1),[N,_]=S.useState(!1),E=S.useCallback(async(M,$={})=>{w(!0),g(null),x(null);try{const I=await u6(M);o(I),c(I.path),h($.selectCurrent&&I.current.hasAgentv?I.current.path:"")}catch(I){g(I.message)}finally{w(!1)}},[]);S.useEffect(()=>{var M;e&&(o(null),c(""),h(""),g(null),x(null),_(!1),(M=n.current)==null||M.focus(),E(void 0,{selectCurrent:!0}))},[E,e]),S.useEffect(()=>{if(!e)return;function M($){$.key==="Escape"&&($.preventDefault(),t())}return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[t,e]);const T=S.useMemo(()=>!i||!f?null:f===i.current.path?i.current:i.entries.find(M=>M.path===f)??null,[i,f]),A=!!(T!=null&&T.hasAgentv)&&!N;function C(M){M.preventDefault(),E(l,{selectCurrent:!0})}async function R(){if(!(!f||!A)){_(!0),x(null);try{const M=await c6(f);r(M),t()}catch(M){x(M.message)}finally{_(!1)}}}if(!e)return null;const D=f?T!=null&&T.hasAgentv?`Ready to add ${T.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:C,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:M=>c(M.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:b||N}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{type:"button",onClick:()=>(i==null?void 0:i.parentPath)&&void E(i.parentPath),disabled:!(i!=null&&i.parentPath)||b||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 E(l),disabled:b||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:b||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)??(b?"Loading folders...":"No folder loaded")})]}),d.jsx("div",{className:"max-h-80 overflow-y-auto",children:i?d.jsxs(d.Fragment,{children:[d.jsx(fE,{entry:i.current,current:!0,selected:f===i.current.path,onSelect:()=>h(i.current.path),onOpen:()=>void E(i.current.path,{selectCurrent:!0})}),i.entries.map(M=>d.jsx(fE,{entry:M,selected:f===M.path,onSelect:()=>h(M.path),onOpen:()=>void E(M.path,{selectCurrent:!0})},M.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:b?"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 ${T!=null&&T.hasAgentv?"text-cyan-300":"text-gray-500"}`,children:D})]})}),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-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 R(),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 GR(e){return e.executionStatus==="execution_error"}function ep(e,t){let r=0,n=0,i=0,o=0;for(const c of e){if(GR(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 ur(e){return e.execution_error_count??0}function YR(e){return Math.max(0,e.total-ur(e))}function Bc(e){return e.quality_count??Math.max(0,e.eval_count-ur(e))}function VR(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=VR(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=VR(e))&&(n&&(n+=" "),n+=t);return n}var aU=["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 vj(e){if(typeof e!="string")return!1;var t=aU;return t.includes(e)}var iU=["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"],sU=new Set(iU);function QR(e){return typeof e!="string"?!1:sU.has(e)}function XR(e){return typeof e=="string"&&e.startsWith("data-")}function zn(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(QR(r)||XR(r))&&(t[r]=e[r]);return t}function gd(e){if(e==null)return null;if(S.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return zn(t)}return typeof e=="object"&&!Array.isArray(e)?zn(e):null}function Er(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(QR(r)||XR(r)||vj(r))&&(t[r]=e[r]);return t}function oU(e){return e==null?null:S.isValidElement(e)?Er(e.props):typeof e=="object"&&!Array.isArray(e)?Er(e):null}var lU=["children","width","height","viewBox","className","style","title","desc"];function Ux(){return Ux=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},Ux.apply(null,arguments)}function uU(e,t){if(e==null)return{};var r,n,i=cU(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 cU(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 xj=S.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:o,className:l,style:c,title:f,desc:h}=e,p=uU(e,lU),g=o||{width:n,height:i,x:0,y:0},y=Xe("recharts-surface",l);return S.createElement("svg",Ux({},Er(p),{className:y,width:n,height:i,style:c,viewBox:"".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),ref:t}),S.createElement("title",null,f),S.createElement("desc",null,h),r)}),dU=["children","className"];function qx(){return qx=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},qx.apply(null,arguments)}function fU(e,t){if(e==null)return{};var r,n,i=hU(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 hU(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 sn=S.forwardRef((e,t)=>{var{children:r,className:n}=e,i=fU(e,dU),o=Xe("recharts-layer",n);return S.createElement("g",qx({className:o},Er(i),{ref:t}),r)}),WR=S.createContext(null),mU=()=>S.useContext(WR);function at(e){return function(){return e}}const ZR=Math.cos,Vh=Math.sin,Hn=Math.sqrt,Qh=Math.PI,tp=2*Qh,Hx=Math.PI,Fx=2*Hx,As=1e-6,pU=Fx-As;function JR(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function gU(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return JR;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 yU{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?JR:gU(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,h=i-r,p=l-t,g=c-r,y=p*p+g*g;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(y>As)if(!(Math.abs(g*f-h*p)>As)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-l,b=i-c,w=f*f+h*h,N=x*x+b*b,_=Math.sqrt(w),E=Math.sqrt(y),T=o*Math.tan((Hx-Math.acos((w+y-N)/(2*_*E)))/2),A=T/E,C=T/_;Math.abs(A-1)>As&&this._append`L${t+A*p},${r+A*g}`,this._append`A${o},${o},0,0,${+(g*x>p*b)},${this._x1=t+C*f},${this._y1=r+C*h}`}}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),h=t+c,p=r+f,g=1^l,y=l?i-o:o-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>As||Math.abs(this._y1-p)>As)&&this._append`L${h},${p}`,n&&(y<0&&(y=y%Fx+Fx),y>pU?this._append`A${n},${n},0,1,${g},${t-c},${r-f}A${n},${n},0,1,${g},${this._x1=h},${this._y1=p}`:y>As&&this._append`A${n},${n},0,${+(y>=Hx)},${g},${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 bj(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 yU(t)}function jj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function eM(e){this._context=e}eM.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 rp(e){return new eM(e)}function tM(e){return e[0]}function rM(e){return e[1]}function nM(e,t){var r=at(!0),n=null,i=rp,o=null,l=bj(c);e=typeof e=="function"?e:e===void 0?tM:at(e),t=typeof t=="function"?t:t===void 0?rM:at(t);function c(f){var h,p=(f=jj(f)).length,g,y=!1,x;for(n==null&&(o=i(x=l())),h=0;h<=p;++h)!(h<p&&r(g=f[h],h,f))===y&&((y=!y)?o.lineStart():o.lineEnd()),y&&o.point(+e(g,h,f),+t(g,h,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 ih(e,t,r){var n=null,i=at(!0),o=null,l=rp,c=null,f=bj(h);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?rM:at(+r);function h(g){var y,x,b,w=(g=jj(g)).length,N,_=!1,E,T=new Array(w),A=new Array(w);for(o==null&&(c=l(E=f())),y=0;y<=w;++y){if(!(y<w&&i(N=g[y],y,g))===_)if(_=!_)x=y,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),b=y-1;b>=x;--b)c.point(T[b],A[b]);c.lineEnd(),c.areaEnd()}_&&(T[y]=+e(N,y,g),A[y]=+t(N,y,g),c.point(n?+n(N,y,g):T[y],r?+r(N,y,g):A[y]))}if(E)return c=null,E+""||null}function p(){return nM().defined(i).curve(l).context(o)}return h.x=function(g){return arguments.length?(e=typeof g=="function"?g:at(+g),n=null,h):e},h.x0=function(g){return arguments.length?(e=typeof g=="function"?g:at(+g),h):e},h.x1=function(g){return arguments.length?(n=g==null?null:typeof g=="function"?g:at(+g),h):n},h.y=function(g){return arguments.length?(t=typeof g=="function"?g:at(+g),r=null,h):t},h.y0=function(g){return arguments.length?(t=typeof g=="function"?g:at(+g),h):t},h.y1=function(g){return arguments.length?(r=g==null?null:typeof g=="function"?g:at(+g),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(g){return arguments.length?(i=typeof g=="function"?g:at(!!g),h):i},h.curve=function(g){return arguments.length?(l=g,o!=null&&(c=l(o)),h):l},h.context=function(g){return arguments.length?(g==null?o=c=null:c=l(o=g),h):o},h}class aM{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 vU(e){return new aM(e,!0)}function xU(e){return new aM(e,!1)}const wj={draw(e,t){const r=Hn(t/Qh);e.moveTo(r,0),e.arc(0,0,r,0,tp)}},bU={draw(e,t){const r=Hn(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()}},iM=Hn(1/3),jU=iM*2,wU={draw(e,t){const r=Hn(t/jU),n=r*iM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},SU={draw(e,t){const r=Hn(t),n=-r/2;e.rect(n,n,r,r)}},NU=.8908130915292852,sM=Vh(Qh/10)/Vh(7*Qh/10),_U=Vh(tp/10)*sM,OU=-ZR(tp/10)*sM,EU={draw(e,t){const r=Hn(t*NU),n=_U*r,i=OU*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const l=tp*o/5,c=ZR(l),f=Vh(l);e.lineTo(f*r,-c*r),e.lineTo(c*n-f*i,f*n+c*i)}e.closePath()}},Dv=Hn(3),AU={draw(e,t){const r=-Hn(t/(Dv*3));e.moveTo(0,r*2),e.lineTo(-Dv*r,-r),e.lineTo(Dv*r,-r),e.closePath()}},xn=-.5,bn=Hn(3)/2,Kx=1/Hn(12),TU=(Kx/2+1)*3,CU={draw(e,t){const r=Hn(t/TU),n=r/2,i=r*Kx,o=n,l=r*Kx+r,c=-o,f=l;e.moveTo(n,i),e.lineTo(o,l),e.lineTo(c,f),e.lineTo(xn*n-bn*i,bn*n+xn*i),e.lineTo(xn*o-bn*l,bn*o+xn*l),e.lineTo(xn*c-bn*f,bn*c+xn*f),e.lineTo(xn*n+bn*i,xn*i-bn*n),e.lineTo(xn*o+bn*l,xn*l-bn*o),e.lineTo(xn*c+bn*f,xn*f-bn*c),e.closePath()}};function PU(e,t){let r=null,n=bj(i);e=typeof e=="function"?e:at(e||wj),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 Xh(){}function Wh(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 oM(e){this._context=e}oM.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:Wh(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:Wh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function RU(e){return new oM(e)}function lM(e){this._context=e}lM.prototype={areaStart:Xh,areaEnd:Xh,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:Wh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function MU(e){return new lM(e)}function uM(e){this._context=e}uM.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:Wh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function DU(e){return new uM(e)}function cM(e){this._context=e}cM.prototype={areaStart:Xh,areaEnd:Xh,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 kU(e){return new cM(e)}function hE(e){return e<0?-1:1}function mE(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(hE(o)+hE(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function pE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function kv(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 Zh(e){this._context=e}Zh.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:kv(this,this._t0,pE(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,kv(this,pE(this,r=mE(this,e,t)),r);break;default:kv(this,this._t0,r=mE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function dM(e){this._context=new fM(e)}(dM.prototype=Object.create(Zh.prototype)).point=function(e,t){Zh.prototype.point.call(this,t,e)};function fM(e){this._context=e}fM.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 LU(e){return new Zh(e)}function IU(e){return new dM(e)}function hM(e){this._context=e}hM.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=gE(e),i=gE(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 gE(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 $U(e){return new hM(e)}function np(e,t){this._context=e,this._t=t}np.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 zU(e){return new np(e,.5)}function BU(e){return new np(e,0)}function UU(e){return new np(e,1)}function to(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 Gx(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function qU(e,t){return e[t]}function HU(e){const t=[];return t.key=e,t}function FU(){var e=at([]),t=Gx,r=to,n=qU;function i(o){var l=Array.from(e.apply(this,arguments),HU),c,f=l.length,h=-1,p;for(const g of o)for(c=0,++h;c<f;++c)(l[c][h]=[0,+n(g,l[c].key,h,o)]).data=g;for(c=0,p=jj(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?Gx:typeof o=="function"?o:at(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??to,i):r},i}function KU(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}to(e,t)}}function GU(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}to(e,t)}}function YU(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,h=0;c<l;++c){for(var p=e[t[c]],g=p[n][1]||0,y=p[n-1][1]||0,x=(g-y)/2,b=0;b<c;++b){var w=e[t[b]],N=w[n][1]||0,_=w[n-1][1]||0;x+=N-_}f+=g,h+=x*g}i[n-1][1]+=i[n-1][0]=r,f&&(r-=h/f)}i[n-1][1]+=i[n-1][0]=r,to(e,t)}}var Lv={},Iv={},yE;function VU(){return yE||(yE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Iv)),Iv}var $v={},vE;function mM(){return vE||(vE=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})($v)),$v}var zv={},xE;function Sj(){return xE||(xE=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})(zv)),zv}var Bv={},Uv={},bE;function QU(){return bE||(bE=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})(Uv)),Uv}var jE;function Nj(){return jE||(jE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=QU(),r=Sj();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="",h="",p=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<l;){const g=i[c];h?g==="\\"&&c+1<l?(c++,f+=i[c]):g===h?h="":f+=g:p?g==='"'||g==="'"?h=g:g==="]"?(p=!1,o.push(f),f=""):f+=g:g==="["?(p=!0,f&&(o.push(f),f="")):g==="."?f&&(o.push(f),f=""):f+=g,c++}return f&&o.push(f),o}e.toPath=n})(Bv)),Bv}var wE;function _j(){return wE||(wE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VU(),r=mM(),n=Sj(),i=Nj();function o(c,f,h){if(c==null)return h;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return h;const p=c[f];return p===void 0?r.isDeepKey(f)?o(c,i.toPath(f),h):h:p}case"number":case"symbol":{typeof f=="number"&&(f=n.toKey(f));const p=c[f];return p===void 0?h:p}default:{if(Array.isArray(f))return l(c,f,h);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return h;const p=c[f];return p===void 0?h:p}}}function l(c,f,h){if(f.length===0)return h;let p=c;for(let g=0;g<f.length;g++){if(p==null||t.isUnsafeProperty(f[g]))return h;p=p[f[g]]}return p===void 0?h:p}e.get=o})(Lv)),Lv}var qv,SE;function XU(){return SE||(SE=1,qv=_j().get),qv}var WU=XU();const ql=rs(WU);var ZU=4;function Gi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ZU,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+Gi(c)+o:i+o},"")}var Br=e=>e===0?0:e>0?1:-1,ua=e=>typeof e=="number"&&e!=+e,ro=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ge=e=>(typeof e=="number"||e instanceof Number)&&!ua(e),ca=e=>ge(e)||typeof e=="string",JU=0,Uc=e=>{var t=++JU;return"".concat(e||"").concat(t)},Bn=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(!ge(t)&&typeof t!="string")return n;var o;if(ro(t)){if(r==null)return n;var l=t.indexOf("%");o=r*parseFloat(t.slice(0,l))/100}else o=+t;return ua(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},pM=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 ge(e)&&ge(t)?Gi(e+r*(t-e)):t}function gM(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):ql(n,t))===r)}var mt=e=>e===null||typeof e>"u",yd=e=>mt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Ur(e){return e!=null}function mo(){}var e9=["type","size","sizeType"];function Yx(){return Yx=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},Yx.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 _E(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){t9(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 t9(e,t,r){return(t=r9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r9(e){var t=n9(e,"string");return typeof t=="symbol"?t:t+""}function n9(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 a9(e,t){if(e==null)return{};var r,n,i=i9(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 i9(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 yM={symbolCircle:wj,symbolCross:bU,symbolDiamond:wU,symbolSquare:SU,symbolStar:EU,symbolTriangle:AU,symbolWye:CU},s9=Math.PI/180,o9=e=>{var t="symbol".concat(yd(e));return yM[t]||wj},l9=(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*s9;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}},u9=(e,t)=>{yM["symbol".concat(yd(e))]=t},Oj=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=a9(e,e9),o=_E(_E({},i),{},{type:t,size:r,sizeType:n}),l="circle";typeof t=="string"&&(l=t);var c=()=>{var y=o9(l),x=PU().type(y).size(l9(r,n,l)),b=x();if(b!==null)return b},{className:f,cx:h,cy:p}=o,g=Er(o);return ge(h)&&ge(p)&&ge(r)?S.createElement("path",Yx({},g,{className:Xe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};Oj.registerSymbol=u9;var vM=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Ej=(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=>{vj(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},c9=(e,t,r)=>n=>(e(t,r,n),null),ap=(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];vj(i)&&typeof o=="function"&&(n||(n={}),n[i]=c9(o,t,r))}),n};function OE(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 d9(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OE(Object(r),!0).forEach(function(n){f9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f9(e,t,r){return(t=h9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h9(e){var t=m9(e,"string");return typeof t=="symbol"?t:t+""}function m9(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 fr(e,t){var r=d9({},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 Jh(){return Jh=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},Jh.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 xM(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){p9(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 p9(e,t,r){return(t=g9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g9(e){var t=y9(e,"string");return typeof t=="symbol"?t:t+""}function y9(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 wn=32,v9={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function x9(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function b9(e){var{data:t,iconType:r,inactiveColor:n}=e,i=wn/2,o=wn/6,l=wn/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:x9(t.payload),x1:0,y1:i,x2:wn,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,`
|
|
68
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
|
|
69
|
-
H`).concat(wn,"M").concat(2*l,",").concat(i,`
|
|
70
|
-
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(wn/8,"h").concat(wn,"v").concat(wn*3/4,"h").concat(-wn,"z"),className:"recharts-legend-icon"});if(S.isValidElement(t.legendIcon)){var h=xM({},t);return delete h.legendIcon,S.cloneElement(t.legendIcon,h)}return S.createElement(Oj,{fill:c,cx:i,cy:i,size:wn,sizeType:"diameter",type:f})}function j9(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:o,iconType:l,labelStyle:c}=e,f={x:0,y:0,width:wn,height:wn},h={display:n==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((g,y)=>{var x=g.formatter||i,b=Xe({"recharts-legend-item":!0,["legend-item-".concat(y)]:!0,inactive:g.inactive});if(g.type==="none")return null;var w=typeof c=="object"?xM({},c):{};w.color=g.inactive?o:w.color||g.color;var N=x?x(g.value,g,y):g.value;return S.createElement("li",Jh({className:b,style:h,key:"legend-item-".concat(y)},ap(e,g,y)),S.createElement(xj,{width:r,height:r,viewBox:f,style:p,"aria-label":"".concat(g.value," legend icon")},S.createElement(b9,{data:g,iconType:l,inactiveColor:o})),S.createElement("span",{className:"recharts-legend-item-text",style:w},N))})}var w9=e=>{var t=fr(e,v9),{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(j9,Jh({},t,{payload:r})))},Hv={},Fv={},AE;function S9(){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})(Fv)),Fv}var Kv={},TE;function N9(){return TE||(TE=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})(Kv)),Kv}var Gv={},CE;function bM(){return CE||(CE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Gv)),Gv}var Yv={},Vv={},Qv={},PE;function _9(){return PE||(PE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Qv)),Qv}var RE;function jM(){return RE||(RE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_9();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Vv)),Vv}var Xv={},ME;function O9(){return ME||(ME=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Xv)),Xv}var DE;function E9(){return DE||(DE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jM(),r=O9();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(Yv)),Yv}var Wv={},Zv={},kE;function A9(){return kE||(kE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_j();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Zv)),Zv}var Jv={},e0={},t0={},r0={},LE;function wM(){return LE||(LE=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})(r0)),r0}var n0={},IE;function SM(){return IE||(IE=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})(n0)),n0}var a0={},$E;function NM(){return $E||($E=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})(a0)),a0}var zE;function T9(){return zE||(zE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wM(),r=SM(),n=NM();function i(p,g,y){return typeof y!="function"?i(p,g,()=>{}):o(p,g,function x(b,w,N,_,E,T){const A=y(b,w,N,_,E,T);return A!==void 0?!!A:o(b,w,x,T)},new Map)}function o(p,g,y,x){if(g===p)return!0;switch(typeof g){case"object":return l(p,g,y,x);case"function":return Object.keys(g).length>0?o(p,{...g},y,x):n.isEqualsSameValueZero(p,g);default:return t.isObject(p)?typeof g=="string"?g==="":!0:n.isEqualsSameValueZero(p,g)}}function l(p,g,y,x){if(g==null)return!0;if(Array.isArray(g))return f(p,g,y,x);if(g instanceof Map)return c(p,g,y,x);if(g instanceof Set)return h(p,g,y,x);const b=Object.keys(g);if(p==null||r.isPrimitive(p))return b.length===0;if(b.length===0)return!0;if(x!=null&&x.has(g))return x.get(g)===p;x==null||x.set(g,p);try{for(let w=0;w<b.length;w++){const N=b[w];if(!r.isPrimitive(p)&&!(N in p)||g[N]===void 0&&p[N]!==void 0||g[N]===null&&p[N]!==null||!y(p[N],g[N],N,p,g,x))return!1}return!0}finally{x==null||x.delete(g)}}function c(p,g,y,x){if(g.size===0)return!0;if(!(p instanceof Map))return!1;for(const[b,w]of g.entries()){const N=p.get(b);if(y(N,w,b,p,g,x)===!1)return!1}return!0}function f(p,g,y,x){if(g.length===0)return!0;if(!Array.isArray(p))return!1;const b=new Set;for(let w=0;w<g.length;w++){const N=g[w];let _=!1;for(let E=0;E<p.length;E++){if(b.has(E))continue;const T=p[E];let A=!1;if(y(T,N,w,p,g,x)&&(A=!0),A){b.add(E),_=!0;break}}if(!_)return!1}return!0}function h(p,g,y,x){return g.size===0?!0:p instanceof Set?f([...p],[...g],y,x):!1}e.isMatchWith=i,e.isSetMatch=h})(t0)),t0}var BE;function _M(){return BE||(BE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=T9();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(e0)),e0}var i0={},s0={},o0={},UE;function C9(){return UE||(UE=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})(o0)),o0}var l0={},qE;function Aj(){return qE||(qE=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})(l0)),l0}var u0={},HE;function OM(){return HE||(HE=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]",h="[object Set]",p="[object Array]",g="[object Function]",y="[object ArrayBuffer]",x="[object Object]",b="[object Error]",w="[object DataView]",N="[object Uint8Array]",_="[object Uint8ClampedArray]",E="[object Uint16Array]",T="[object Uint32Array]",A="[object BigUint64Array]",C="[object Int8Array]",R="[object Int16Array]",D="[object Int32Array]",M="[object BigInt64Array]",$="[object Float32Array]",I="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=y,e.arrayTag=p,e.bigInt64ArrayTag=M,e.bigUint64ArrayTag=A,e.booleanTag=i,e.dataViewTag=w,e.dateTag=c,e.errorTag=b,e.float32ArrayTag=$,e.float64ArrayTag=I,e.functionTag=g,e.int16ArrayTag=R,e.int32ArrayTag=D,e.int8ArrayTag=C,e.mapTag=f,e.numberTag=n,e.objectTag=x,e.regexpTag=t,e.setTag=h,e.stringTag=r,e.symbolTag=l,e.uint16ArrayTag=E,e.uint32ArrayTag=T,e.uint8ArrayTag=N,e.uint8ClampedArrayTag=_})(u0)),u0}var c0={},FE;function P9(){return FE||(FE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(c0)),c0}var KE;function EM(){return KE||(KE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=C9(),r=Aj(),n=OM(),i=SM(),o=P9();function l(p,g){return c(p,void 0,p,new Map,g)}function c(p,g,y,x=new Map,b=void 0){const w=b==null?void 0:b(p,g,y,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 _=0;_<p.length;_++)N[_]=c(p[_],_,y,x,b);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[_,E]of p)N.set(_,c(E,_,y,x,b));return N}if(p instanceof Set){const N=new Set;x.set(p,N);for(const _ of p)N.add(c(_,void 0,y,x,b));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 _=0;_<p.length;_++)N[_]=c(p[_],_,y,x,b);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,y,x,b),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,y,x,b),N}if(typeof Blob<"u"&&p instanceof Blob){const N=new Blob([p],{type:p.type});return x.set(p,N),f(N,p,y,x,b),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,y,x,b),N}if(p instanceof Boolean){const N=new Boolean(p.valueOf());return x.set(p,N),f(N,p,y,x,b),N}if(p instanceof Number){const N=new Number(p.valueOf());return x.set(p,N),f(N,p,y,x,b),N}if(p instanceof String){const N=new String(p.valueOf());return x.set(p,N),f(N,p,y,x,b),N}if(typeof p=="object"&&h(p)){const N=Object.create(Object.getPrototypeOf(p));return x.set(p,N),f(N,p,y,x,b),N}return p}function f(p,g,y=p,x,b){const w=[...Object.keys(g),...t.getSymbols(g)];for(let N=0;N<w.length;N++){const _=w[N],E=Object.getOwnPropertyDescriptor(p,_);(E==null||E.writable)&&(p[_]=c(g[_],_,y,x,b))}}function h(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})(s0)),s0}var GE;function R9(){return GE||(GE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EM();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(i0)),i0}var YE;function M9(){return YE||(YE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_M(),r=R9();function n(i){return i=r.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=n})(Jv)),Jv}var d0={},f0={},h0={},VE;function D9(){return VE||(VE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EM(),r=Aj(),n=OM();function i(o,l){return t.cloneDeepWith(o,(c,f,h,p)=>{const g=l==null?void 0:l(c,f,h,p);if(g!==void 0)return g;if(typeof o=="object"){if(r.getTag(o)===n.objectTag&&typeof o.constructor!="function"){const y={};return p.set(o,y),t.copyProperties(y,o,h,p),y}switch(Object.prototype.toString.call(o)){case n.numberTag:case n.stringTag:case n.booleanTag:{const y=new o.constructor(o==null?void 0:o.valueOf());return t.copyProperties(y,o),y}case n.argumentsTag:{const y={};return t.copyProperties(y,o),y.length=o.length,y[Symbol.iterator]=o[Symbol.iterator],y}default:return}}})}e.cloneDeepWith=i})(h0)),h0}var QE;function k9(){return QE||(QE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=D9();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(f0)),f0}var m0={},p0={},XE;function AM(){return XE||(XE=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})(p0)),p0}var g0={},WE;function L9(){return WE||(WE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Aj();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(g0)),g0}var ZE;function I9(){return ZE||(ZE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=mM(),r=AM(),n=L9(),i=Nj();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 h=l;for(let p=0;p<f.length;p++){const g=f[p];if((h==null||!Object.hasOwn(h,g))&&!((Array.isArray(h)||n.isArguments(h))&&r.isIndex(g)&&g<h.length))return!1;h=h[g]}return!0}e.has=o})(m0)),m0}var JE;function $9(){return JE||(JE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_M(),r=Sj(),n=k9(),i=_j(),o=I9();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(h){const p=i.get(h,c);return p===void 0?o.has(h,c):f===void 0?p===void 0:t.isMatch(p,f)}}e.matchesProperty=l})(d0)),d0}var eA;function z9(){return eA||(eA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bM(),r=A9(),n=M9(),i=$9();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})(Wv)),Wv}var tA;function B9(){return tA||(tA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=S9(),r=N9(),n=bM(),i=E9(),o=z9();function l(c,f=n.identity){return i.isArrayLikeObject(c)?t.uniqBy(Array.from(c),r.ary(o.iteratee(f),1)):[]}e.uniqBy=l})(Hv)),Hv}var y0,rA;function U9(){return rA||(rA=1,y0=B9().uniqBy),y0}var q9=U9();const nA=rs(q9);function TM(e,t,r){return t===!0?nA(e,r):typeof t=="function"?nA(e,t):e}var Tj=S.createContext(null),H9=e=>e,ct=()=>{var e=S.useContext(Tj);return e?e.store.dispatch:H9},Ch=()=>{},F9=()=>Ch,K9=(e,t)=>e===t;function ve(e){var t=S.useContext(Tj),r=S.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Ch,[t,e]);return mR.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:F9,t?t.store.getState:Ch,t?t.store.getState:Ch,r,K9)}function G9(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Y9(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function V9(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 aA=e=>Array.isArray(e)?e:[e];function Q9(e){const t=Array.isArray(e[0])?e[0]:e;return V9(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function X9(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var W9=class{constructor(e){this.value=e}deref(){return this.value}},Z9=typeof WeakRef<"u"?WeakRef:W9,J9=0,iA=1;function sh(){return{s:J9,v:void 0,o:null,p:null}}function CM(e,t={}){let r=sh();const{resultEqualityCheck:n}=t;let i,o=0;function l(){var g;let c=r;const{length:f}=arguments;for(let y=0,x=f;y<x;y++){const b=arguments[y];if(typeof b=="function"||typeof b=="object"&&b!==null){let w=c.o;w===null&&(c.o=w=new WeakMap);const N=w.get(b);N===void 0?(c=sh(),w.set(b,c)):c=N}else{let w=c.p;w===null&&(c.p=w=new Map);const N=w.get(b);N===void 0?(c=sh(),w.set(b,c)):c=N}}const h=c;let p;if(c.s===iA)p=c.v;else if(p=e.apply(null,arguments),o++,n){const y=((g=i==null?void 0:i.deref)==null?void 0:g.call(i))??i;y!=null&&n(y,p)&&(p=y,o!==0&&o--),i=typeof p=="object"&&p!==null||typeof p=="function"?new Z9(p):p}return h.s=iA,h.v=p,p}return l.clearCache=()=>{r=sh(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function eq(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,l=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),G9(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:g,memoizeOptions:y=[],argsMemoize:x=CM,argsMemoizeOptions:b=[]}=p,w=aA(y),N=aA(b),_=Q9(i),E=g(function(){return o++,h.apply(null,arguments)},...w),T=x(function(){l++;const C=X9(_,arguments);return c=E.apply(null,C),c},...N);return Object.assign(T,{resultFunc:h,memoizedResultFunc:E,dependencies:_,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:g,argsMemoize:x})};return Object.assign(n,{withTypes:()=>n}),n}var Q=eq(CM),tq=Object.assign((e,t=Q)=>{Y9(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:()=>tq}),v0={},x0={},b0={},sA;function rq(){return sA||(sA=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})(b0)),b0}var j0={},w0={},oA;function PM(){return oA||(oA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(w0)),w0}var lA;function nq(){return lA||(lA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PM(),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})(j0)),j0}var uA;function aq(){return uA||(uA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rq(),r=nq(),n=Nj();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 h=(x,b)=>{let w=x;for(let N=0;N<b.length&&w!=null;++N)w=w[b[N]];return w},p=(x,b)=>b==null||x==null?b:typeof x=="object"&&"key"in x?Object.hasOwn(b,x.key)?b[x.key]:h(b,x.path):typeof x=="function"?x(b):Array.isArray(x)?h(b,x):typeof b=="object"?b[x]:b,g=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:g.map(b=>p(b,x))})).slice().sort((x,b)=>{for(let w=0;w<g.length;w++){const N=t.compareValues(x.criteria[w],b.criteria[w],c[w]);if(N!==0)return N}return 0}).map(x=>x.original)}e.orderBy=i})(x0)),x0}var S0={},cA;function iq(){return cA||(cA=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 h=0;h<c.length;h++){const p=c[h];Array.isArray(p)&&f<o?l(p,f+1):i.push(p)}};return l(r,0),i}e.flatten=t})(S0)),S0}var N0={},dA;function RM(){return dA||(dA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AM(),r=jM(),n=wM(),i=NM();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})(N0)),N0}var fA;function sq(){return fA||(fA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aq(),r=iq(),n=RM();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})(v0)),v0}var _0,hA;function oq(){return hA||(hA=1,_0=sq().sortBy),_0}var lq=oq();const ip=rs(lq);var MM=e=>e.legend.settings,uq=e=>e.legend.size,cq=e=>e.legend.payload,dq=Q([cq,MM],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?ip(n,r):n});function fq(){return ve(dq)}var oh=1;function DM(){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)>oh||Math.abs(l.left-t.left)>oh||Math.abs(l.top-t.top)>oh||Math.abs(l.width-t.width)>oh)&&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 ar(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 hq=typeof Symbol=="function"&&Symbol.observable||"@@observable",mA=hq,O0=()=>Math.random().toString(36).substring(7).split("").join("."),mq={INIT:`@@redux/INIT${O0()}`,REPLACE:`@@redux/REPLACE${O0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${O0()}`},em=mq;function Cj(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 kM(e,t,r){if(typeof e!="function")throw new Error(ar(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ar(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ar(1));return r(kM)(e,t)}let n=e,i=t,o=new Map,l=o,c=0,f=!1;function h(){l===o&&(l=new Map,o.forEach((N,_)=>{l.set(_,N)}))}function p(){if(f)throw new Error(ar(3));return i}function g(N){if(typeof N!="function")throw new Error(ar(4));if(f)throw new Error(ar(5));let _=!0;h();const E=c++;return l.set(E,N),function(){if(_){if(f)throw new Error(ar(6));_=!1,h(),l.delete(E),o=null}}}function y(N){if(!Cj(N))throw new Error(ar(7));if(typeof N.type>"u")throw new Error(ar(8));if(typeof N.type!="string")throw new Error(ar(17));if(f)throw new Error(ar(9));try{f=!0,i=n(i,N)}finally{f=!1}return(o=l).forEach(E=>{E()}),N}function x(N){if(typeof N!="function")throw new Error(ar(10));n=N,y({type:em.REPLACE})}function b(){const N=g;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(ar(11));function E(){const A=_;A.next&&A.next(p())}return E(),{unsubscribe:N(E)}},[mA](){return this}}}return y({type:em.INIT}),{dispatch:y,subscribe:g,getState:p,replaceReducer:x,[mA]:b}}function pq(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:em.INIT})>"u")throw new Error(ar(12));if(typeof r(void 0,{type:em.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ar(13))})}function LM(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{pq(r)}catch(o){i=o}return function(l={},c){if(i)throw i;let f=!1;const h={};for(let p=0;p<n.length;p++){const g=n[p],y=r[g],x=l[g],b=y(x,c);if(typeof b>"u")throw c&&c.type,new Error(ar(14));h[g]=b,f=f||b!==x}return f=f||n.length!==Object.keys(l).length,f?h:l}}function tm(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function gq(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(ar(15))};const l={getState:i.getState,dispatch:(f,...h)=>o(f,...h)},c=e.map(f=>f(l));return o=tm(...c)(i.dispatch),{...i,dispatch:o}}}function IM(e){return Cj(e)&&"type"in e&&typeof e.type=="string"}var $M=Symbol.for("immer-nothing"),pA=Symbol.for("immer-draftable"),Ar=Symbol.for("immer-state");function Ln(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object,Hl=rn.getPrototypeOf,rm="constructor",sp="prototype",Vx="configurable",nm="enumerable",Ph="writable",qc="value",Ga=e=>!!e&&!!e[Ar];function Un(e){var t;return e?zM(e)||lp(e)||!!e[pA]||!!((t=e[rm])!=null&&t[pA])||up(e)||cp(e):!1}var yq=rn[sp][rm].toString(),gA=new WeakMap;function zM(e){if(!e||!Pj(e))return!1;const t=Hl(e);if(t===null||t===rn[sp])return!0;const r=rn.hasOwnProperty.call(t,rm)&&t[rm];if(r===Object)return!0;if(!vl(r))return!1;let n=gA.get(r);return n===void 0&&(n=Function.toString.call(r),gA.set(r,n)),n===yq}function op(e,t,r=!0){vd(e)===0?(r?Reflect.ownKeys(e):rn.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function vd(e){const t=e[Ar];return t?t.type_:lp(e)?1:up(e)?2:cp(e)?3:0}var yA=(e,t,r=vd(e))=>r===2?e.has(t):rn[sp].hasOwnProperty.call(e,t),Qx=(e,t,r=vd(e))=>r===2?e.get(t):e[t],am=(e,t,r,n=vd(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function vq(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var lp=Array.isArray,up=e=>e instanceof Map,cp=e=>e instanceof Set,Pj=e=>typeof e=="object",vl=e=>typeof e=="function",E0=e=>typeof e=="boolean";function xq(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var ka=e=>e.copy_||e.base_,Rj=e=>e.modified_?e.copy_:e.base_;function Xx(e,t){if(up(e))return new Map(e);if(cp(e))return new Set(e);if(lp(e))return Array[sp].slice.call(e);const r=zM(e);if(t===!0||t==="class_only"&&!r){const n=rn.getOwnPropertyDescriptors(e);delete n[Ar];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const l=i[o],c=n[l];c[Ph]===!1&&(c[Ph]=!0,c[Vx]=!0),(c.get||c.set)&&(n[l]={[Vx]:!0,[Ph]:!0,[nm]:c[nm],[qc]:e[l]})}return rn.create(Hl(e),n)}else{const n=Hl(e);if(n!==null&&r)return{...e};const i=rn.create(n);return rn.assign(i,e)}}function Mj(e,t=!1){return dp(e)||Ga(e)||!Un(e)||(vd(e)>1&&rn.defineProperties(e,{set:lh,add:lh,clear:lh,delete:lh}),rn.freeze(e),t&&op(e,(r,n)=>{Mj(n,!0)},!1)),e}function bq(){Ln(2)}var lh={[qc]:bq};function dp(e){return e===null||!Pj(e)?!0:rn.isFrozen(e)}var im="MapSet",Wx="Patches",vA="ArrayMethods",BM={};function no(e){const t=BM[e];return t||Ln(0,e),t}var xA=e=>!!BM[e],Hc,UM=()=>Hc,jq=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:xA(im)?no(im):void 0,arrayMethodsPlugin_:xA(vA)?no(vA):void 0});function bA(e,t){t&&(e.patchPlugin_=no(Wx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Zx(e){Jx(e),e.drafts_.forEach(wq),e.drafts_=null}function Jx(e){e===Hc&&(Hc=e.parent_)}var jA=e=>Hc=jq(Hc,e);function wq(e){const t=e[Ar];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];if(e!==void 0&&e!==r){r[Ar].modified_&&(Zx(t),Ln(4)),Un(e)&&(e=SA(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Ar].base_,e,t)}else e=SA(t,r);return Sq(t,e,!0),Zx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==$M?e:void 0}function SA(e,t){if(dp(t))return t;const r=t[Ar];if(!r)return sm(t,e.handledSet_,e);if(!fp(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);FM(r,e)}return r.copy_}function Sq(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Mj(t,r)}function qM(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var fp=(e,t)=>e.scope_===t,Nq=[];function HM(e,t,r,n){const i=ka(e),o=e.type_;if(n!==void 0&&Qx(i,n,o)===t){am(i,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;op(i,(f,h)=>{if(Ga(h)){const p=c.get(h)||[];p.push(f),c.set(h,p)}})}const l=e.draftLocations_.get(t)??Nq;for(const c of l)am(i,c,r,o)}function _q(e,t,r){e.callbacks_.push(function(i){var c;const o=t;if(!o||!fp(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const l=Rj(o);HM(e,o.draft_??o,l,r),FM(o,i)})}function FM(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)}qM(e)}}function Oq(e,t,r){const{scope_:n}=e;if(Ga(r)){const i=r[Ar];fp(i,n)&&i.callbacks_.push(function(){Rh(e);const l=Rj(i);HM(e,r,l,t)})}else Un(r)&&e.callbacks_.push(function(){const o=ka(e);e.type_===3?o.has(r)&&sm(r,n.handledSet_,n):Qx(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&sm(Qx(e.copy_,t,e.type_),n.handledSet_,n)})}function sm(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ga(e)||t.has(e)||!Un(e)||dp(e)||(t.add(e),op(e,(n,i)=>{if(Ga(i)){const o=i[Ar];if(fp(o,r)){const l=Rj(o);am(e,n,l,e.type_),qM(o)}}else Un(i)&&sm(i,t,r)})),e}function Eq(e,t){const r=lp(e),n={type_:r?1:0,scope_:t?t.scope_:UM(),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=om;r&&(i=[n],o=Fc);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=l,[c,n]}var om={get(e,t){if(t===Ar)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=ka(e);if(!yA(i,t,e.type_))return Aq(e,i,t);const o=i[t];if(e.finalized_||!Un(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&xq(t))return o;if(o===A0(e.base_,t)){Rh(e);const l=e.type_===1?+t:t,c=tb(e.scope_,o,e,l);return e.copy_[l]=c}return o},has(e,t){return t in ka(e)},ownKeys(e){return Reflect.ownKeys(ka(e))},set(e,t,r){const n=KM(ka(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=A0(ka(e),t),o=i==null?void 0:i[Ar];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(vq(r,i)&&(r!==void 0||yA(e.base_,t,e.type_)))return!0;Rh(e),eb(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),Oq(e,t,r)),!0},deleteProperty(e,t){return Rh(e),A0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),eb(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=ka(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Ph]:!0,[Vx]:e.type_!==1||t!=="length",[nm]:n[nm],[qc]:r[t]}},defineProperty(){Ln(11)},getPrototypeOf(e){return Hl(e.base_)},setPrototypeOf(){Ln(12)}},Fc={};for(let e in om){let t=om[e];Fc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Fc.deleteProperty=function(e,t){return Fc.set.call(this,e,t,void 0)};Fc.set=function(e,t,r){return om.set.call(this,e[0],t,r,e[0])};function A0(e,t){const r=e[Ar];return(r?ka(r):e)[t]}function Aq(e,t,r){var i;const n=KM(t,r);return n?qc in n?n[qc]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function KM(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 eb(e){e.modified_||(e.modified_=!0,e.parent_&&eb(e.parent_))}function Rh(e){e.copy_||(e.assigned_=new Map,e.copy_=Xx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Tq=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(vl(r)&&!vl(n)){const l=n;n=r;const c=this;return function(h=l,...p){return c.produce(h,g=>n.call(this,g,...p))}}vl(n)||Ln(6),i!==void 0&&!vl(i)&&Ln(7);let o;if(Un(r)){const l=jA(this),c=tb(l,r,void 0);let f=!0;try{o=n(c),f=!1}finally{f?Zx(l):Jx(l)}return bA(l,i),wA(o,l)}else if(!r||!Pj(r)){if(o=n(r),o===void 0&&(o=r),o===$M&&(o=void 0),this.autoFreeze_&&Mj(o,!0),i){const l=[],c=[];no(Wx).generateReplacementPatches_(r,o,{patches_:l,inversePatches_:c}),i(l,c)}return o}else Ln(1,r)},this.produceWithPatches=(r,n)=>{if(vl(r))return(c,...f)=>this.produceWithPatches(c,h=>r(h,...f));let i,o;return[this.produce(r,n,(c,f)=>{i=c,o=f}),i,o]},E0(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),E0(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),E0(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Un(t)||Ln(8),Ga(t)&&(t=_n(t));const r=jA(this),n=tb(r,t,void 0);return n[Ar].isManual_=!0,Jx(r),n}finishDraft(t,r){const n=t&&t[Ar];(!n||!n.isManual_)&&Ln(9);const{scope_:i}=n;return bA(i,r),wA(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=no(Wx).applyPatches_;return Ga(t)?i(t,r):this.produce(t,o=>i(o,r))}};function tb(e,t,r,n){const[i,o]=up(t)?no(im).proxyMap_(t,r):cp(t)?no(im).proxySet_(t,r):Eq(t,r);return((r==null?void 0:r.scope_)??UM()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?_q(r,o,n):o.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:h}=f;o.modified_&&h&&h.generatePatches_(o,[],f)}),i}function _n(e){return Ga(e)||Ln(10,e),GM(e)}function GM(e){if(!Un(e)||dp(e))return e;const t=e[Ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Xx(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Xx(e,!0);return op(r,(i,o)=>{am(r,i,GM(o))},n),t&&(t.finalized_=!1),r}var Cq=new Tq,YM=Cq.produce;function VM(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var Pq=VM(),Rq=VM,Mq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?tm:tm.apply(null,arguments)};function on(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(nn(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=>IM(n)&&n.type===e,r}var QM=class Sc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Sc.prototype)}static get[Symbol.species](){return Sc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Sc(...t[0].concat(this)):new Sc(...t.concat(this))}};function NA(e){return Un(e)?YM(e,()=>{}):e}function uh(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Dq(e){return typeof e=="boolean"}var kq=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new QM;return r&&(Dq(r)?l.push(Pq):l.push(Rq(r.extraArgument))),l},XM="RTK_autoBatch",ot=()=>e=>({payload:e,meta:{[XM]:!0}}),_A=e=>t=>{setTimeout(t,e)},WM=(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:_A(10):e.type==="callback"?e.queueNotification:_A(e.timeout),h=()=>{l=!1,o&&(o=!1,c.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const g=()=>i&&p(),y=n.subscribe(g);return c.add(p),()=>{y(),c.delete(p)}},dispatch(p){var g;try{return i=!((g=p==null?void 0:p.meta)!=null&&g[XM]),o=!i,o&&(l||(l=!0,f(h))),n.dispatch(p)}finally{i=!0}}})},Lq=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new QM(e);return n&&i.push(WM(typeof n=="object"?n:void 0)),i};function Iq(e){const t=kq(),{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(Cj(r))c=LM(r);else throw new Error(nn(1));let f;typeof n=="function"?f=n(t):f=t();let h=tm;i&&(h=Mq({trace:!1,...typeof i=="object"&&i}));const p=gq(...f),g=Lq(p);let y=typeof l=="function"?l(g):g();const x=h(...y);return kM(c,o,x)}function ZM(e){const t={},r=[];let n;const i={addCase(o,l){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(nn(28));if(c in t)throw new Error(nn(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 $q(e){return typeof e=="function"}function zq(e,t){let[r,n,i]=ZM(t),o;if($q(e))o=()=>NA(e());else{const c=NA(e);o=()=>c}function l(c=o(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[i]),h.reduce((p,g)=>{if(g)if(Ga(p)){const x=g(p,f);return x===void 0?p:x}else{if(Un(p))return YM(p,y=>g(y,f));{const y=g(p,f);if(y===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return p},c)}return l.getInitialState=o,l}var Bq="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Uq=(e=21)=>{let t="",r=e;for(;r--;)t+=Bq[Math.random()*64|0];return t},qq=Symbol.for("rtk-slice-createasyncthunk");function Hq(e,t){return`${e}/${t}`}function Fq({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[qq];return function(i){const{name:o,reducerPath:l=o}=i;if(!o)throw new Error(nn(11));const c=(typeof i.reducers=="function"?i.reducers(Gq()):i.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(A,C){const R=typeof A=="string"?A:A.type;if(!R)throw new Error(nn(12));if(R in h.sliceCaseReducersByType)throw new Error(nn(13));return h.sliceCaseReducersByType[R]=C,p},addMatcher(A,C){return h.sliceMatchers.push({matcher:A,reducer:C}),p},exposeAction(A,C){return h.actionCreators[A]=C,p},exposeCaseReducer(A,C){return h.sliceCaseReducersByName[A]=C,p}};f.forEach(A=>{const C=c[A],R={reducerName:A,type:Hq(o,A),createNotation:typeof i.reducers=="function"};Vq(C)?Xq(R,C,p,t):Yq(R,C,p)});function g(){const[A={},C=[],R=void 0]=typeof i.extraReducers=="function"?ZM(i.extraReducers):[i.extraReducers],D={...A,...h.sliceCaseReducersByType};return zq(i.initialState,M=>{for(let $ in D)M.addCase($,D[$]);for(let $ of h.sliceMatchers)M.addMatcher($.matcher,$.reducer);for(let $ of C)M.addMatcher($.matcher,$.reducer);R&&M.addDefaultCase(R)})}const y=A=>A,x=new Map,b=new WeakMap;let w;function N(A,C){return w||(w=g()),w(A,C)}function _(){return w||(w=g()),w.getInitialState()}function E(A,C=!1){function R(M){let $=M[A];return typeof $>"u"&&C&&($=uh(b,R,_)),$}function D(M=y){const $=uh(x,C,()=>new WeakMap);return uh($,M,()=>{const I={};for(const[F,H]of Object.entries(i.selectors??{}))I[F]=Kq(H,M,()=>uh(b,M,_),C);return I})}return{reducerPath:A,getSelectors:D,get selectors(){return D(R)},selectSlice:R}}const T={name:o,reducer:N,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:_,...E(l),injectInto(A,{reducerPath:C,...R}={}){const D=C??l;return A.inject({reducerPath:D,reducer:N},R),{...T,...E(D,!0)}}};return T}}function Kq(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 br=Fq();function Gq(){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 Yq({type:e,reducerName:t,createNotation:r},n,i){let o,l;if("reducer"in n){if(r&&!Qq(n))throw new Error(nn(17));o=n.reducer,l=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,l?on(e,l):on(e))}function Vq(e){return e._reducerDefinitionType==="asyncThunk"}function Qq(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Xq({type:e,reducerName:t},r,n,i){if(!i)throw new Error(nn(18));const{payloadCreator:o,fulfilled:l,pending:c,rejected:f,settled:h,options:p}=r,g=i(e,o,p);n.exposeAction(t,g),l&&n.addCase(g.fulfilled,l),c&&n.addCase(g.pending,c),f&&n.addCase(g.rejected,f),h&&n.addMatcher(g.settled,h),n.exposeCaseReducer(t,{fulfilled:l||ch,pending:c||ch,rejected:f||ch,settled:h||ch})}function ch(){}var Wq="task",JM="listener",e3="completed",Dj="cancelled",Zq=`task-${Dj}`,Jq=`task-${e3}`,rb=`${JM}-${Dj}`,e7=`${JM}-${e3}`,hp=class{constructor(e){fv(this,"name","TaskAbortError");fv(this,"message");this.code=e,this.message=`${Wq} ${Dj} (reason: ${e})`}},kj=(e,t)=>{if(typeof e!="function")throw new TypeError(nn(32))},lm=()=>{},t3=(e,t=lm)=>(e.catch(t),e),r3=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ws=e=>{if(e.aborted)throw new hp(e.reason)};function n3(e,t){let r=lm;return new Promise((n,i)=>{const o=()=>i(new hp(e.reason));if(e.aborted){o();return}r=r3(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=lm})}var t7=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof hp?"cancelled":"rejected",error:r}}finally{t==null||t()}},um=e=>t=>t3(n3(e,t).then(r=>(Ws(e),r))),a3=e=>{const t=um(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Sl}=Object,OA={},mp="listenerMiddleware",r7=(e,t)=>{const r=n=>r3(e,()=>n.abort(e.reason));return(n,i)=>{kj(n);const o=new AbortController;r(o);const l=t7(async()=>{Ws(e),Ws(o.signal);const c=await n({pause:um(o.signal),delay:a3(o.signal),signal:o.signal});return Ws(o.signal),c},()=>o.abort(Jq));return i!=null&&i.autoJoin&&t.push(l.catch(lm)),{result:um(e)(l),cancel(){o.abort(Zq)}}}},n7=(e,t)=>{const r=async(n,i)=>{Ws(t);let o=()=>{};const c=[new Promise((f,h)=>{let p=e({predicate:n,effect:(g,y)=>{y.unsubscribe(),f([g,y.getState(),y.getOriginalState()])}});o=()=>{p(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await n3(t,Promise.race(c));return Ws(t),f}finally{o()}};return(n,i)=>t3(r(n,i))},i3=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=on(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(nn(21));return kj(o),{predicate:i,type:t,effect:o}},s3=Sl(e=>{const{type:t,predicate:r,effect:n}=i3(e);return{id:Uq(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(nn(22))}}},{withTypes:()=>s3}),EA=(e,t)=>{const{type:r,effect:n,predicate:i}=i3(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},nb=e=>{e.pending.forEach(t=>{t.abort(rb)})},a7=(e,t)=>()=>{for(const r of t.keys())nb(r);e.clear()},AA=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},o3=Sl(on(`${mp}/add`),{withTypes:()=>o3}),i7=on(`${mp}/removeAll`),l3=Sl(on(`${mp}/remove`),{withTypes:()=>l3}),s7=(...e)=>{console.error(`${mp}/error`,...e)},xd=(e={})=>{const t=new Map,r=new Map,n=x=>{const b=r.get(x)??0;r.set(x,b+1)},i=x=>{const b=r.get(x)??1;b===1?r.delete(x):r.set(x,b-1)},{extra:o,onError:l=s7}=e;kj(l);const c=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),b=>{x.unsubscribe(),b!=null&&b.cancelActive&&nb(x)}),f=x=>{const b=EA(t,x)??s3(x);return c(b)};Sl(f,{withTypes:()=>f});const h=x=>{const b=EA(t,x);return b&&(b.unsubscribe(),x.cancelActive&&nb(b)),!!b};Sl(h,{withTypes:()=>h});const p=async(x,b,w,N)=>{const _=new AbortController,E=n7(f,_.signal),T=[];try{x.pending.add(_),n(x),await Promise.resolve(x.effect(b,Sl({},w,{getOriginalState:N,condition:(A,C)=>E(A,C).then(Boolean),take:E,delay:a3(_.signal),pause:um(_.signal),extra:o,signal:_.signal,fork:r7(_.signal,T),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((A,C,R)=>{A!==_&&(A.abort(rb),R.delete(A))})},cancel:()=>{_.abort(rb),x.pending.delete(_)},throwIfCancelled:()=>{Ws(_.signal)}})))}catch(A){A instanceof hp||AA(l,A,{raisedBy:"effect"})}finally{await Promise.all(T),_.abort(e7),i(x),x.pending.delete(_)}},g=a7(t,r);return{middleware:x=>b=>w=>{if(!IM(w))return b(w);if(o3.match(w))return f(w.payload);if(i7.match(w)){g();return}if(l3.match(w))return h(w.payload);let N=x.getState();const _=()=>{if(N===OA)throw new Error(nn(23));return N};let E;try{if(E=b(w),t.size>0){const T=x.getState(),A=Array.from(t.values());for(const C of A){let R=!1;try{R=C.predicate(w,T,N)}catch(D){R=!1,AA(l,D,{raisedBy:"predicate"})}R&&p(C,w,x,_)}}}finally{N=OA}return E},startListening:f,stopListening:h,clearListeners:g}};function nn(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 o7={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},u3=br({name:"chartLayout",initialState:o7,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:l7,setLayout:u7,setChartSize:c7,setScale:d7}=u3.actions,f7=u3.reducer;function c3(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 da(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}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 bl(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){h7(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 h7(e,t,r){return(t=m7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m7(e){var t=p7(e,"string");return typeof t=="symbol"?t:t+""}function p7(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 mt(e)||mt(t)?r:ca(t)?ql(e,t,r):typeof t=="function"?t(e):r}var g7=(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"&&ge(e[o]))return bl(bl({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&l!=="middle"&&ge(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",d3=(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},f3=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:o,scale:l,realScaleType:c,isCategorical:f,categoricalDomain:h,tickCount:p,ticks:g,niceTicks:y,axisType:x}=e;if(!l)return null;var b=c==="scaleBand"&&l.bandwidth?l.bandwidth()/2:2,w=i==="category"&&l.bandwidth?l.bandwidth()/b:0;if(w=x==="angleAxis"&&o&&o.length>=2?Br(o[0]-o[1])*2*w:w,g||y){var N=(g||y||[]).map((_,E)=>{var T=n?n.indexOf(_):_,A=l.map(T);return Be(A)?{coordinate:A+w,value:_,offset:w,index:E}:null}).filter(Ur);return N}return f&&h?h.map((_,E)=>{var T=l.map(_);return Be(T)?{coordinate:T+w,value:_,index:E,offset:w}:null}).filter(Ur):l.ticks&&p!=null?l.ticks(p).map((_,E)=>{var T=l.map(_);return Be(T)?{coordinate:T+w,value:_,index:E,offset:w}:null}).filter(Ur):l.domain().map((_,E)=>{var T=l.map(_);return Be(T)?{coordinate:T+w,value:n?n[_]:_,index:E,offset:w}:null}).filter(Ur)},y7=(e,t)=>{if(!t||t.length!==2||!ge(t[0])||!ge(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(!ge(e[0])||e[0]<r)&&(i[0]=r),(!ge(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},v7=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],h=f==null?void 0:f[i];if(h!=null){var p=h[1],g=h[0],y=ua(p)?g:p;y>=0?(h[0]=o,o+=y,h[1]=o):(h[0]=l,l+=y,h[1]=l)}}}},x7=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 h=ua(f[1])?f[0]:f[1];h>=0?(f[0]=o,o+=h,f[1]=o):(f[0]=0,f[1]=0)}}}},b7={sign:v7,expand:KU,none:to,silhouette:GU,wiggle:YU,positive:x7},j7=(e,t,r)=>{var n,i=(n=b7[r])!==null&&n!==void 0?n:to,o=FU().keys(t).value((c,f)=>Number(Ot(c,f,0))).order(Gx).offset(i),l=o(e);return l.forEach((c,f)=>{c.forEach((h,p)=>{var g=Ot(e[p],t[f],0);Array.isArray(g)&&g.length===2&&ge(g[0])&&ge(g[1])&&(h[0]=g[0],h[1]=g[1])})}),l};function w7(e){return e==null?void 0:String(e)}function CA(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:o,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!mt(i[t.dataKey])){var c=gM(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,mt(l)?t.dataKey:l),h=t.scale.map(f);return ge(h)?h:null}var PA=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(mt(c))return null;var f=t.scale.map(c);return ge(f)?f-i/2+n:null},S7=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]},N7=e=>{var t=e.flat(2).filter(ge);return[Math.min(...t),Math.max(...t)]},_7=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],O7=(e,t,r)=>{if(e!=null)return _7(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var{stackedData:l}=o,c=l.reduce((f,h)=>{var p=c3(h,t,r),g=N7(p);return!Be(g[0])||!Be(g[1])?f:[Math.min(f[0],g[0]),Math.max(f[1],g[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},RA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,MA=/^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=ip(t,p=>p.coordinate),o=1/0,l=1,c=i.length;l<c;l++){var f=i[l],h=i[l-1];o=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function DA(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 pp(e,t){if(e)return String(e);if(typeof t=="string")return t}var E7=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},A7=(e,t)=>t==="centric"?e.angle:e.radius,Wa=e=>e.layout.width,Za=e=>e.layout.height,T7=e=>e.layout.scale,h3=e=>e.layout.margin,gp=Q(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),yp=Q(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),C7="data-recharts-item-index",P7="data-recharts-item-id",bd=60;function kA(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?kA(Object(r),!0).forEach(function(n){R7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function R7(e,t,r){return(t=M7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M7(e){var t=D7(e,"string");return typeof t=="symbol"?t:t+""}function D7(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 k7=e=>e.brush.height;function L7(e){var t=yp(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:bd;return r+i}return r},0)}function I7(e){var t=yp(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:bd;return r+i}return r},0)}function $7(e){var t=gp(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function z7(e){var t=gp(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Vt=Q([Wa,Za,h3,k7,L7,I7,$7,z7,MM,uq],(e,t,r,n,i,o,l,c,f,h)=>{var p={left:(r.left||0)+i,right:(r.right||0)+o},g={top:(r.top||0)+l,bottom:(r.bottom||0)+c},y=dh(dh({},g),p),x=y.bottom;y.bottom+=n,y=g7(y,f,h);var b=e-y.left-y.right,w=t-y.top-y.bottom;return dh(dh({brushBottom:x},y),{},{width:Math.max(b,0),height:Math.max(w,0)})}),B7=Q(Vt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Lj=Q(Wa,Za,(e,t)=>({x:0,y:0,width:e,height:t})),U7=S.createContext(null),jr=()=>S.useContext(U7)!=null,vp=e=>e.brush,xp=Q([vp,Vt,h3],(e,t,r)=>({height:e.height,x:ge(e.x)?e.x:t.left,y:ge(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:ge(e.width)?e.width:t.width})),T0={},C0={},P0={},LA;function q7(){return LA||(LA=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"),h=o==null||o.includes("trailing"),p=()=>{c!==null&&(r.apply(l,c),l=void 0,c=null)},g=()=>{h&&p(),w()};let y=null;const x=()=>{y!=null&&clearTimeout(y),y=setTimeout(()=>{y=null,g()},n)},b=()=>{y!==null&&(clearTimeout(y),y=null)},w=()=>{b(),l=void 0,c=null},N=()=>{p()},_=function(...E){if(i!=null&&i.aborted)return;l=this,c=E;const T=y==null;x(),f&&T&&p()};return _.schedule=x,_.cancel=w,_.flush=N,i==null||i.addEventListener("abort",w,{once:!0}),_}e.debounce=t})(P0)),P0}var IA;function H7(){return IA||(IA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=q7();function r(n,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:c=!0,maxWait:f}=o,h=Array(2);l&&(h[0]="leading"),c&&(h[1]="trailing");let p,g=null;const y=t.debounce(function(...w){p=n.apply(this,w),g=null},i,{edges:h}),x=function(...w){return f!=null&&(g===null&&(g=Date.now()),Date.now()-g>=f)?(p=n.apply(this,w),g=Date.now(),y.cancel(),y.schedule(),p):(y.apply(this,w),p)},b=()=>(y.flush(),p);return x.cancel=y.cancel,x.flush=b,x}e.debounce=r})(C0)),C0}var $A;function F7(){return $A||($A=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H7();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})(T0)),T0}var R0,zA;function K7(){return zA||(zA=1,R0=F7().throttle),R0}var G7=K7();const Y7=rs(G7);var cm=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++]))}},ia={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},m3=(e,t,r)=>{var{width:n=ia.width,height:i=ia.height,aspect:o,maxHeight:l}=r,c=ro(n)?e:Number(n),f=ro(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}},V7={width:0,height:0,overflow:"visible"},Q7={width:0,overflowX:"visible"},X7={height:0,overflowY:"visible"},W7={},Z7=e=>{var{width:t,height:r}=e,n=ro(t),i=ro(r);return n&&i?V7:n?Q7:i?X7:W7};function J7(e){var{width:t,height:r,aspect:n}=e,i=t,o=r;return i===void 0&&o===void 0?(i=ia.width,o=ia.height):i===void 0?i=n&&n>0?void 0:ia.width:o===void 0&&(o=n&&n>0?void 0:ia.height),{width:i,height:o}}function ab(){return ab=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},ab.apply(null,arguments)}function BA(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 UA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?BA(Object(r),!0).forEach(function(n){eH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eH(e,t,r){return(t=tH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tH(e){var t=rH(e,"string");return typeof t=="symbol"?t:t+""}function rH(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 p3=S.createContext(ia.initialDimension);function nH(e){return da(e.width)&&da(e.height)}function g3(e){var{children:t,width:r,height:n}=e,i=S.useMemo(()=>({width:r,height:n}),[r,n]);return nH(i)?S.createElement(p3.Provider,{value:i},t):null}var Ij=()=>S.useContext(p3),aH=S.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=ia.initialDimension,width:i,height:o,minWidth:l=ia.minWidth,minHeight:c,maxHeight:f,children:h,debounce:p=ia.debounce,id:g,className:y,onResize:x,style:b={}}=e,w=S.useRef(null),N=S.useRef();N.current=x,S.useImperativeHandle(t,()=>w.current);var[_,E]=S.useState({containerWidth:n.width,containerHeight:n.height}),T=S.useCallback((M,$)=>{E(I=>{var F=Math.round(M),H=Math.round($);return I.containerWidth===F&&I.containerHeight===H?I:{containerWidth:F,containerHeight:H}})},[]);S.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return mo;var M=H=>{var ie,Z=H[0];if(Z!=null){var{width:G,height:k}=Z.contentRect;T(G,k),(ie=N.current)===null||ie===void 0||ie.call(N,G,k)}};p>0&&(M=Y7(M,p,{trailing:!0,leading:!1}));var $=new ResizeObserver(M),{width:I,height:F}=w.current.getBoundingClientRect();return T(I,F),$.observe(w.current),()=>{$.disconnect()}},[T,p]);var{containerWidth:A,containerHeight:C}=_;cm(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:R,calculatedHeight:D}=m3(A,C,{width:i,height:o,aspect:r,maxHeight:f});return cm(R!=null&&R>0||D!=null&&D>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
71
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
72
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
73
|
-
height and width.`,R,D,i,o,l,c,r),S.createElement("div",{id:g?"".concat(g):void 0,className:Xe("recharts-responsive-container",y),style:UA(UA({},b),{},{width:i,height:o,minWidth:l,minHeight:c,maxHeight:f}),ref:w},S.createElement("div",{style:Z7({width:i,height:o})},S.createElement(g3,{width:R,height:D},h)))}),$j=S.forwardRef((e,t)=>{var r=Ij();if(da(r.width)&&da(r.height))return e.children;var{width:n,height:i}=J7({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=m3(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return ge(o)&&ge(l)?S.createElement(g3,{width:o,height:l},e.children):S.createElement(aH,ab({},e,{width:n,height:i,ref:t}))});function zj(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 bp=()=>{var e,t=jr(),r=ve(B7),n=ve(xp),i=(e=ve(vp))===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}},iH={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},y3=()=>{var e;return(e=ve(Vt))!==null&&e!==void 0?e:iH},Bj=()=>ve(Wa),Uj=()=>ve(Za),sH=()=>ve(e=>e.layout.margin),We=e=>e.layout.layoutType,po=()=>ve(We),v3=()=>{var e=po();if(e==="horizontal"||e==="vertical")return e},x3=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},oH=()=>{var e=po();return e!==void 0},jd=e=>{var t=ct(),r=jr(),{width:n,height:i}=e,o=Ij(),l=n,c=i;return o&&(l=o.width>0?o.width:n,c=o.height>0?o.height:i),S.useEffect(()=>{!r&&da(l)&&da(c)&&t(c7({width:l,height:c}))},[t,r,l,c]),null},b3=Symbol.for("immer-nothing"),qA=Symbol.for("immer-draftable"),ln=Symbol.for("immer-state");function In(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kc=Object.getPrototypeOf;function Kl(e){return!!e&&!!e[ln]}function ao(e){var t;return e?j3(e)||Array.isArray(e)||!!e[qA]||!!((t=e.constructor)!=null&&t[qA])||wd(e)||wp(e):!1}var lH=Object.prototype.constructor.toString(),HA=new WeakMap;function j3(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=HA.get(r);return n===void 0&&(n=Function.toString.call(r),HA.set(r,n)),n===lH}function dm(e,t,r=!0){jp(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 jp(e){const t=e[ln];return t?t.type_:Array.isArray(e)?1:wd(e)?2:wp(e)?3:0}function ib(e,t){return jp(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function w3(e,t,r){const n=jp(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function uH(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function wd(e){return e instanceof Map}function wp(e){return e instanceof Set}function Ts(e){return e.copy_||e.base_}function sb(e,t){if(wd(e))return new Map(e);if(wp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=j3(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[ln];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(Kc(e),n)}else{const n=Kc(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function qj(e,t=!1){return Sp(e)||Kl(e)||!ao(e)||(jp(e)>1&&Object.defineProperties(e,{set:fh,add:fh,clear:fh,delete:fh}),Object.freeze(e),t&&Object.values(e).forEach(r=>qj(r,!0))),e}function cH(){In(2)}var fh={value:cH};function Sp(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var dH={};function io(e){const t=dH[e];return t||In(0,e),t}var Gc;function S3(){return Gc}function fH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function FA(e,t){t&&(io("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ob(e){lb(e),e.drafts_.forEach(hH),e.drafts_=null}function lb(e){e===Gc&&(Gc=e.parent_)}function KA(e){return Gc=fH(Gc,e)}function hH(e){const t=e[ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function GA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ln].modified_&&(ob(t),In(4)),ao(e)&&(e=fm(t,e),t.parent_||hm(t,e)),t.patches_&&io("Patches").generateReplacementPatches_(r[ln].base_,e,t.patches_,t.inversePatches_)):e=fm(t,r,[]),ob(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==b3?e:void 0}function fm(e,t,r){if(Sp(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[ln];if(!i)return dm(t,(o,l)=>YA(e,i,t,o,l,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return hm(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),dm(l,(f,h)=>YA(e,i,o,f,h,r,c),n),hm(e,o,!1),r&&e.patches_&&io("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function YA(e,t,r,n,i,o,l){if(i==null||typeof i!="object"&&!l)return;const c=Sp(i);if(!(c&&!l)){if(Kl(i)){const f=o&&t&&t.type_!==3&&!ib(t.assigned_,n)?o.concat(n):void 0,h=fm(e,i,f);if(w3(r,n,h),Kl(h))e.canAutoFreeze_=!1;else return}else l&&r.add(i);if(ao(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;fm(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(wd(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&hm(e,i)}}}function hm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&qj(t,r)}function mH(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:S3(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=Hj;r&&(i=[n],o=Yc);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=l,c}var Hj={get(e,t){if(t===ln)return e;const r=Ts(e);if(!ib(r,t))return pH(e,r,t);const n=r[t];return e.finalized_||!ao(n)?n:n===M0(e.base_,t)?(D0(e),e.copy_[t]=cb(n,e)):n},has(e,t){return t in Ts(e)},ownKeys(e){return Reflect.ownKeys(Ts(e))},set(e,t,r){const n=N3(Ts(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=M0(Ts(e),t),o=i==null?void 0:i[ln];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(uH(r,i)&&(r!==void 0||ib(e.base_,t)))return!0;D0(e),ub(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 M0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,D0(e),ub(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(){In(11)},getPrototypeOf(e){return Kc(e.base_)},setPrototypeOf(){In(12)}},Yc={};dm(Hj,(e,t)=>{Yc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Yc.deleteProperty=function(e,t){return Yc.set.call(this,e,t,void 0)};Yc.set=function(e,t,r){return Hj.set.call(this,e[0],t,r,e[0])};function M0(e,t){const r=e[ln];return(r?Ts(r):e)[t]}function pH(e,t,r){var i;const n=N3(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function N3(e,t){if(!(t in e))return;let r=Kc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Kc(r)}}function ub(e){e.modified_||(e.modified_=!0,e.parent_&&ub(e.parent_))}function D0(e){e.copy_||(e.copy_=sb(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var gH=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,...h){return l.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&In(6),n!==void 0&&typeof n!="function"&&In(7);let i;if(ao(t)){const o=KA(this),l=cb(t,void 0);let c=!0;try{i=r(l),c=!1}finally{c?ob(o):lb(o)}return FA(o,n),GA(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===b3&&(i=void 0),this.autoFreeze_&&qj(i,!0),n){const o=[],l=[];io("Patches").generateReplacementPatches_(t,i,o,l),n(o,l)}return i}else In(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){ao(e)||In(8),Kl(e)&&(e=yH(e));const t=KA(this),r=cb(e,void 0);return r[ln].isManual_=!0,lb(t),r}finishDraft(e,t){const r=e&&e[ln];(!r||!r.isManual_)&&In(9);const{scope_:n}=r;return FA(n,t),GA(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=io("Patches").applyPatches_;return Kl(e)?n(e,t):this.produce(e,i=>n(i,t))}};function cb(e,t){const r=wd(e)?io("MapSet").proxyMap_(e,t):wp(e)?io("MapSet").proxySet_(e,t):mH(e,t);return(t?t.scope_:S3()).drafts_.push(r),r}function yH(e){return Kl(e)||In(10,e),_3(e)}function _3(e){if(!ao(e)||Sp(e))return e;const t=e[ln];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=sb(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=sb(e,!0);return dm(r,(i,o)=>{w3(r,i,_3(o))},n),t&&(t.finalized_=!1),r}var vH=new gH;vH.produce;var xH={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},O3=br({name:"legend",initialState:xH,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=_n(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:ot()},removeLegendPayload:{reducer(e,t){var r=_n(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ot()}}}),{setLegendSize:VA,setLegendSettings:bH,addLegendPayload:jH,replaceLegendPayload:wH,removeLegendPayload:SH}=O3.actions,NH=O3.reducer,k0={exports:{}},L0={};/**
|
|
74
|
-
* @license React
|
|
75
|
-
* use-sync-external-store-with-selector.production.js
|
|
76
|
-
*
|
|
77
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the MIT license found in the
|
|
80
|
-
* LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/var QA;function _H(){if(QA)return L0;QA=1;var e=eu();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}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 L0.useSyncExternalStoreWithSelector=function(f,h,p,g,y){var x=i(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=l(function(){function N(C){if(!_){if(_=!0,E=C,C=g(C),y!==void 0&&b.hasValue){var R=b.value;if(y(R,C))return T=R}return T=C}if(R=T,r(E,C))return R;var D=g(C);return y!==void 0&&y(R,D)?(E=C,R):(E=C,T=D)}var _=!1,E,T,A=p===void 0?null:p;return[function(){return N(h())},A===null?void 0:function(){return N(A())}]},[h,p,g,y]);var w=n(f,x[0],x[1]);return o(function(){b.hasValue=!0,b.value=w},[w]),c(w),w},L0}var XA;function OH(){return XA||(XA=1,k0.exports=_H()),k0.exports}OH();function EH(e){e()}function AH(){let e=null,t=null;return{clear(){e=null,t=null},notify(){EH(()=>{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 WA={notify(){},get:()=>[]};function TH(e,t){let r,n=WA,i=0,o=!1;function l(w){p();const N=n.subscribe(w);let _=!1;return()=>{_||(_=!0,N(),g())}}function c(){n.notify()}function f(){b.onStateChange&&b.onStateChange()}function h(){return o}function p(){i++,r||(r=e.subscribe(f),n=AH())}function g(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=WA)}function y(){o||(o=!0,p())}function x(){o&&(o=!1,g())}const b={addNestedSub:l,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:y,tryUnsubscribe:x,getListeners:()=>n};return b}var CH=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PH=CH(),RH=()=>typeof navigator<"u"&&navigator.product==="ReactNative",MH=RH(),DH=()=>PH||MH?S.useLayoutEffect:S.useEffect,kH=DH();function ZA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function LH(e,t){if(ZA(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])||!ZA(e[r[i]],t[r[i]]))return!1;return!0}var I0=Symbol.for("react-redux-context"),$0=typeof globalThis<"u"?globalThis:{};function IH(){if(!S.createContext)return{};const e=$0[I0]??($0[I0]=new Map);let t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var $H=IH();function zH(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]);kH(()=>{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||$H;return S.createElement(c.Provider,{value:o},t)}var BH=zH,UH=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function qH(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function tu(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(UH.has(n)){if(e[n]==null&&t[n]==null)continue;if(!LH(e[n],t[n]))return!1}else if(!qH(e[n],t[n]))return!1;return!0}var HH=["contextPayload"];function db(){return db=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},db.apply(null,arguments)}function JA(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?JA(Object(r),!0).forEach(function(n){FH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FH(e,t,r){return(t=KH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KH(e){var t=GH(e,"string");return typeof t=="symbol"?t:t+""}function GH(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 YH(e,t){if(e==null)return{};var r,n,i=VH(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 VH(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 QH(e){return e.value}function XH(e){var{contextPayload:t}=e,r=YH(e,HH),n=TM(t,e.payloadUniqBy,QH),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(w9,i)}function WH(e,t,r,n,i,o){var{layout:l,align:c,verticalAlign:f}=t,h,p;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(c==="center"&&l==="vertical"?h={left:((n||0)-o.width)/2}:h=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({},h),p)}function ZH(e){var t=ct();return S.useEffect(()=>{t(bH(e))},[t,e]),null}function JH(e){var t=ct();return S.useEffect(()=>(t(VA(e)),()=>{t(VA({width:0,height:0}))}),[t,e]),null}function eF(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var tF={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function rF(e){var t=fr(e,tF),r=fq(),n=mU(),i=sH(),{width:o,height:l,wrapperStyle:c,portal:f}=t,[h,p]=DM([r]),g=Bj(),y=Uj();if(g==null||y==null)return null;var x=g-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),b=eF(t.layout,l,o,x),w=f?c:Gl(Gl({position:"absolute",width:(b==null?void 0:b.width)||o||"auto",height:(b==null?void 0:b.height)||l||"auto"},WH(c,t,i,g,y,h)),c),N=f??n;if(N==null||r==null)return null;var _=S.createElement("div",{className:"recharts-legend-wrapper",style:w,ref:p},S.createElement(ZH,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!f&&S.createElement(JH,{width:h.width,height:h.height}),S.createElement(XH,db({},t,b,{margin:i,chartWidth:g,chartHeight:y,contextPayload:r})));return Qm.createPortal(_,N)}var E3=S.memo(rF,tu);E3.displayName="Legend";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 eT(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?eT(Object(r),!0).forEach(function(n){nF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nF(e,t,r){return(t=aF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aF(e){var t=iF(e,"string");return typeof t=="symbol"?t:t+""}function iF(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 sF(e){return Array.isArray(e)&&ca(e[0])&&ca(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 oF(e,t){return t==null?e:ip(e,t)}var lF=e=>{var{separator:t=ll.separator,contentStyle:r,itemStyle:n,labelStyle:i=ll.labelStyle,payload:o,formatter:l,itemSorter:c,wrapperClassName:f,labelClassName:h,label:p,labelFormatter:g,accessibilityLayer:y=ll.accessibilityLayer}=e,x=()=>{if(o&&o.length){var C={padding:0,margin:0},R=oF(o,c),D=R.map((M,$)=>{if(!M||M.type==="none")return null;var I=M.formatter||l||sF,{value:F,name:H}=M,ie=F,Z=H;if(I){var G=I(F,H,M,$,o);if(Array.isArray(G))[ie,Z]=G;else if(G!=null)ie=G;else return null}var k=cc(cc({},ll.itemStyle),{},{color:M.color||ll.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:k},ca(Z)?S.createElement("span",{className:"recharts-tooltip-item-name"},Z):null,ca(Z)?S.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,S.createElement("span",{className:"recharts-tooltip-item-value"},ie),S.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:C},D)}return null},b=cc(cc({},ll.contentStyle),r),w=cc({margin:0},i),N=!mt(p),_=N?p:"",E=Xe("recharts-default-tooltip",f),T=Xe("recharts-tooltip-label",h);N&&g&&o!==void 0&&o!==null&&(_=g(p,o));var A=y?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",fb({className:E,style:b},A),S.createElement("p",{className:T,style:w},S.isValidElement(_)?_:"".concat(_)),x())},dc="recharts-tooltip-wrapper",uF={visibility:"hidden"};function cF(e){var{coordinate:t,translateX:r,translateY:n}=e;return Xe(dc,{["".concat(dc,"-right")]:ge(r)&&t&&ge(t.x)&&r>=t.x,["".concat(dc,"-left")]:ge(r)&&t&&ge(t.x)&&r<t.x,["".concat(dc,"-bottom")]:ge(n)&&t&&ge(t.y)&&n>=t.y,["".concat(dc,"-top")]:ge(n)&&t&&ge(t.y)&&n<t.y})}function tT(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:o,reverseDirection:l,tooltipDimension:c,viewBox:f,viewBoxDimension:h}=e;if(o&&ge(o[n]))return o[n];var p=r[n]-c-(i>0?i:0),g=r[n]+i;if(t[n])return l[n]?p:g;var y=f[n];if(y==null)return 0;if(l[n]){var x=p,b=y;return x<b?Math.max(g,y):Math.max(p,y)}if(h==null)return 0;var w=g+c,N=y+h;return w>N?Math.max(p,y):Math.max(g,y)}function dF(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 fF(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:o,reverseDirection:l,tooltipBox:c,useTranslate3d:f,viewBox:h}=e,p,g,y;return c.height>0&&c.width>0&&r?(g=tT({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:l,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),y=tT({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:l,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),p=dF({translateX:g,translateY:y,useTranslate3d:f})):p=uF,{cssProperties:p,cssClasses:cF({translateX:g,translateY:y,coordinate:r})}}var hF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Sd={isSsr:hF()};function A3(){var[e,t]=S.useState(()=>Sd.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 rT(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?rT(Object(r),!0).forEach(function(n){mF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mF(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=gF(e,"string");return typeof t=="symbol"?t:t+""}function gF(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 yF(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function vF(e){var t,r,n,i,o,l,c=A3(),[f,h]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var N,_,E,T;h({dismissed:!0,dismissedAtCoordinate:{x:(N=(_=e.coordinate)===null||_===void 0?void 0:_.x)!==null&&N!==void 0?N:0,y:(E=(T=e.coordinate)===null||T===void 0?void 0:T.y)!==null&&E!==void 0?E:0}})}};return document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[(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)&&h(ul(ul({},f),{},{dismissed:!1}));var{cssClasses:p,cssProperties:g}=fF({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}),y=e.hasPortalFromProps?{}:ul(ul({transition:yF({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},g),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),x=ul(ul({},y),{},{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 xF=S.memo(vF),T3=()=>{var e;return(e=ve(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function hb(){return hb=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},hb.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 aT(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){bF(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 bF(e,t,r){return(t=jF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jF(e){var t=wF(e,"string");return typeof t=="symbol"?t:t+""}function wF(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={curveBasisClosed:MU,curveBasisOpen:DU,curveBasis:RU,curveBumpX:vU,curveBumpY:xU,curveLinearClosed:kU,curveLinear:rp,curveMonotoneX:LU,curveMonotoneY:IU,curveNatural:$U,curveStep:zU,curveStepAfter:UU,curveStepBefore:BU},mm=e=>Be(e.x)&&Be(e.y),sT=e=>e.base!=null&&mm(e.base)&&mm(e),fc=e=>e.x,hc=e=>e.y,SF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(yd(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=iT["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return iT[r]||rp},oT={connectNulls:!1,type:"linear"},NF=e=>{var{type:t=oT.type,points:r=[],baseLine:n,layout:i,connectNulls:o=oT.connectNulls}=e,l=SF(t,i),c=o?r.filter(mm):r;if(Array.isArray(n)){var f,h=r.map((b,w)=>aT(aT({},b),{},{base:n[w]}));i==="vertical"?f=ih().y(hc).x1(fc).x0(b=>b.base.x):f=ih().x(fc).y1(hc).y0(b=>b.base.y);var p=f.defined(sT).curve(l),g=o?h.filter(sT):h;return p(g)}var y;i==="vertical"&&ge(n)?y=ih().y(hc).x1(fc).x0(n):ge(n)?y=ih().x(fc).y1(hc).y0(n):y=nM().x(fc).y(hc);var x=y.defined(mm).curve(l);return x(c)},C3=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?NF(l):n;return S.createElement("path",hb({},zn(e),Ej(e),{className:Xe("recharts-curve",t),d:c===null?void 0:c,ref:i}))},_F=["x","y","top","left","width","height","className"];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 lT(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 OF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lT(Object(r),!0).forEach(function(n){EF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EF(e,t,r){return(t=AF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AF(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=PF(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 PF(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),MF=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),h=OF({x:t,y:r,top:n,left:i,width:o,height:l},f);return!ge(t)||!ge(r)||!ge(o)||!ge(l)||!ge(n)||!ge(i)?null:S.createElement("path",mb({},Er(h),{className:Xe("recharts-cross",c),d:RF(t,r,o,l,n,i)}))};function DF(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 uT(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 cT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uT(Object(r),!0).forEach(function(n){kF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kF(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=IF(e,"string");return typeof t=="symbol"?t:t+""}function IF(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 $F=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),P3=(e,t,r)=>e.map(n=>"".concat($F(n)," ").concat(t,"ms ").concat(r)).join(","),zF=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Vc=(e,t)=>Object.keys(t).reduce((r,n)=>cT(cT({},r),{},{[n]:e(n,t[n])}),{});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 $t(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){BF(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 BF(e,t,r){return(t=UF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UF(e){var t=qF(e,"string");return typeof t=="symbol"?t:t+""}function qF(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 pm=(e,t,r)=>e+(t-e)*r,pb=e=>{var{from:t,to:r}=e;return t!==r},R3=(e,t,r)=>{var n=Vc((i,o)=>{if(pb(o)){var[l,c]=e(o.from,o.to,o.velocity);return $t($t({},o),{},{from:l,velocity:c})}return o},t);return r<1?Vc((i,o)=>pb(o)&&n[i]!=null?$t($t({},o),{},{velocity:pm(o.velocity,n[i].velocity,r),from:pm(o.from,n[i].from,r)}):o,t):R3(e,n,r-1)};function HF(e,t,r,n,i,o){var l,c=n.reduce((y,x)=>$t($t({},y),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),f=()=>Vc((y,x)=>x.from,c),h=()=>!Object.values(c).filter(pb).length,p=null,g=y=>{l||(l=y);var x=y-l,b=x/r.dt;c=R3(r,c,b),i($t($t($t({},e),t),f())),l=y,h()||(p=o.setTimeout(g))};return()=>(p=o.setTimeout(g),()=>{var y;(y=p)===null||y===void 0||y()})}function FF(e,t,r,n,i,o,l){var c=null,f=i.reduce((g,y)=>{var x=e[y],b=t[y];return x==null||b==null?g:$t($t({},g),{},{[y]:[x,b]})},{}),h,p=g=>{h||(h=g);var y=(g-h)/n,x=Vc((w,N)=>pm(...N,r(y)),f);if(o($t($t($t({},e),t),x)),y<1)c=l.setTimeout(p);else{var b=Vc((w,N)=>pm(...N,r(1)),f);o($t($t($t({},e),t),b))}};return()=>(c=l.setTimeout(p),()=>{var g;(g=c)===null||g===void 0||g()})}const KF=(e,t,r,n,i,o)=>{var l=zF(e,t);return r==null?()=>(i($t($t({},e),t)),()=>{}):r.isStepper===!0?HF(e,t,r,l,i,o):FF(e,t,r,n,l,i,o)};var gm=1e-4,M3=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],D3=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),fT=(e,t)=>r=>{var n=M3(e,t);return D3(n,r)},GF=(e,t)=>r=>{var n=M3(e,t),i=[...n.map((o,l)=>o*l).slice(1),0];return D3(i,r)},YF=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]]},VF=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=YF(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},QF=(e,t,r,n)=>{var i=fT(e,r),o=fT(t,n),l=GF(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,g=p,y=0;y<8;++y){var x=i(g)-p,b=l(g);if(Math.abs(x-p)<gm||b<gm)return o(g);g=c(g-x/b)}return o(g)};return f.isStepper=!1,f},hT=function(){return QF(...VF(...arguments))},XF=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 h=-(l-c)*r,p=f*n,g=f+(h-p)*i/1e3,y=f*i/1e3+l;return Math.abs(y-c)<gm&&Math.abs(g)<gm?[c,0]:[y,g]};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 hT(e);case"spring":return XF();default:if(e.split("(")[0]==="cubic-bezier")return hT(e)}return typeof e=="function"?e:null};function ZF(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,...h]=c;if(typeof f=="number"){i=e.setTimeout(o.bind(null,h),f);return}o(f),i=e.setTimeout(o.bind(null,h));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 JF{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 eK(){return ZF(new JF)}var tK=S.createContext(eK);function rK(e,t){var r=S.useContext(tK);return S.useMemo(()=>t??r(e),[e,t,r])}var nK={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},mT={t:0},z0={t:1};function Np(e){var t=fr(e,nK),{isActive:r,canBegin:n,duration:i,easing:o,begin:l,onAnimationEnd:c,onAnimationStart:f,children:h}=t,p=A3(),g=r==="auto"?!Sd.isSsr&&!p:r,y=rK(t.animationId,t.animationManager),[x,b]=S.useState(g?mT:z0),w=S.useRef(null);return S.useEffect(()=>{g||b(z0)},[g]),S.useEffect(()=>{if(!g||!n)return mo;var N=KF(mT,z0,WF(o),i,b,y.getTimeoutController()),_=()=>{w.current=N()};return y.start([f,l,_,i,c]),()=>{y.stop(),w.current&&w.current(),c()}},[g,n,i,o,l,f,c,y]),h(x.t)}function _p(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=S.useRef(Uc(t)),n=S.useRef(e);return n.current!==e&&(r.current=Uc(t),n.current=e),r.current}var aK=["radius"],iK=["radius"],pT,gT,yT,vT,xT,bT,jT,wT,ST,NT;function _T(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 OT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_T(Object(r),!0).forEach(function(n){sK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_T(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sK(e,t,r){return(t=oK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oK(e){var t=lK(e,"string");return typeof t=="symbol"?t:t+""}function lK(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 ym(){return ym=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},ym.apply(null,arguments)}function ET(e,t){if(e==null)return{};var r,n,i=uK(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 uK(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 Xn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var AT=(e,t,r,n,i)=>{var o=Gi(r),l=Gi(n),c=Math.min(Math.abs(o)/2,Math.abs(l)/2),f=l>=0?1:-1,h=o>=0?1:-1,p=l>=0&&o>=0||l<0&&o<0?1:0,g;if(c>0&&Array.isArray(i)){for(var y=[0,0,0,0],x=0,b=4;x<b;x++){var w,N=(w=i[x])!==null&&w!==void 0?w:0;y[x]=N>c?c:N}g=bt(pT||(pT=Xn(["M",",",""])),e,t+f*y[0]),y[0]>0&&(g+=bt(gT||(gT=Xn(["A ",",",",0,0,",",",",",""])),y[0],y[0],p,e+h*y[0],t)),g+=bt(yT||(yT=Xn(["L ",",",""])),e+r-h*y[1],t),y[1]>0&&(g+=bt(vT||(vT=Xn(["A ",",",",0,0,",`,
|
|
82
|
-
`,",",""])),y[1],y[1],p,e+r,t+f*y[1])),g+=bt(xT||(xT=Xn(["L ",",",""])),e+r,t+n-f*y[2]),y[2]>0&&(g+=bt(bT||(bT=Xn(["A ",",",",0,0,",`,
|
|
83
|
-
`,",",""])),y[2],y[2],p,e+r-h*y[2],t+n)),g+=bt(jT||(jT=Xn(["L ",",",""])),e+h*y[3],t+n),y[3]>0&&(g+=bt(wT||(wT=Xn(["A ",",",",0,0,",`,
|
|
84
|
-
`,",",""])),y[3],y[3],p,e,t+n-f*y[3])),g+="Z"}else if(c>0&&i===+i&&i>0){var _=Math.min(c,i);g=bt(ST||(ST=Xn(["M ",",",`
|
|
85
|
-
A `,",",",0,0,",",",",",`
|
|
86
|
-
L `,",",`
|
|
87
|
-
A `,",",",0,0,",",",",",`
|
|
88
|
-
L `,",",`
|
|
89
|
-
A `,",",",0,0,",",",",",`
|
|
90
|
-
L `,",",`
|
|
91
|
-
A `,",",",0,0,",",",","," Z"])),e,t+f*_,_,_,p,e+h*_,t,e+r-h*_,t,_,_,p,e+r,t+f*_,e+r,t+n-f*_,_,_,p,e+r-h*_,t+n,e+h*_,t+n,_,_,p,e,t+n-f*_)}else g=bt(NT||(NT=Xn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return g},TT={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},k3=e=>{var t=fr(e,TT),r=S.useRef(null),[n,i]=S.useState(-1);S.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var q=r.current.getTotalLength();q&&i(q)}catch{}},[]);var{x:o,y:l,width:c,height:f,radius:h,className:p}=t,{animationEasing:g,animationDuration:y,animationBegin:x,isAnimationActive:b,isUpdateAnimationActive:w}=t,N=S.useRef(c),_=S.useRef(f),E=S.useRef(o),T=S.useRef(l),A=S.useMemo(()=>({x:o,y:l,width:c,height:f,radius:h}),[o,l,c,f,h]),C=_p(A,"rectangle-");if(o!==+o||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var R=Xe("recharts-rectangle",p);if(!w){var D=Er(t),{radius:M}=D,$=ET(D,aK);return S.createElement("path",ym({},$,{x:Gi(o),y:Gi(l),width:Gi(c),height:Gi(f),radius:typeof h=="number"?h:void 0,className:R,d:AT(o,l,c,f,h)}))}var I=N.current,F=_.current,H=E.current,ie=T.current,Z="0px ".concat(n===-1?1:n,"px"),G="".concat(n,"px ").concat(n,"px"),k=P3(["strokeDasharray"],y,typeof g=="string"?g:TT.animationEasing);return S.createElement(Np,{animationId:C,key:C,canBegin:n>0,duration:y,easing:g,isActive:w,begin:x},q=>{var J=jt(I,c,q),re=jt(F,f,q),oe=jt(H,o,q),L=jt(ie,l,q);r.current&&(N.current=J,_.current=re,E.current=oe,T.current=L);var X;b?q>0?X={transition:k,strokeDasharray:G}:X={strokeDasharray:Z}:X={strokeDasharray:G};var le=Er(t),{radius:ue}=le,pe=ET(le,iK);return S.createElement("path",ym({},pe,{radius:typeof h=="number"?h:void 0,className:R,d:AT(oe,L,J,re,h),ref:r,style:OT(OT({},X),t.style)}))})};function CT(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 PT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CT(Object(r),!0).forEach(function(n){cK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cK(e,t,r){return(t=dK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dK(e){var t=fK(e,"string");return typeof t=="symbol"?t:t+""}function fK(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 vm=Math.PI/180,hK=e=>e*180/Math.PI,lr=(e,t,r,n)=>({x:e+Math.cos(-vm*n)*r,y:t+Math.sin(-vm*n)*r}),mK=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},pK=(e,t)=>{var{x:r,y:n}=e,{x:i,y:o}=t;return Math.sqrt((r-i)**2+(n-o)**2)},gK=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:o}=t,l=pK({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:hK(f),angleInRadian:f}},yK=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}},vK=(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},xK=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:o}=gK({x:r,y:n},t),{innerRadius:l,outerRadius:c}=t;if(i<l||i>c||i===0)return null;var{startAngle:f,endAngle:h}=yK(t),p=o,g;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;g=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;g=p>=h&&p<=f}return g?PT(PT({},t),{},{radius:i,angle:vK(p,t)}):null};function L3(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:o}=e,l=lr(t,r,n,i),c=lr(t,r,n,o);return{points:[l,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var RT,MT,DT,kT,LT,IT,$T;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 Ds(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var bK=(e,t)=>{var r=Br(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},hh=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:o,isExternal:l,cornerRadius:c,cornerIsExternal:f}=e,h=c*(l?1:-1)+n,p=Math.asin(c/h)/vm,g=f?i:i+o*p,y=lr(t,r,h,g),x=lr(t,r,n,g),b=f?i-o*p:i,w=lr(t,r,h*Math.cos(p*vm),b);return{center:y,circleTangency:x,lineTangency:w,theta:p}},I3=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:o,endAngle:l}=e,c=bK(o,l),f=o+c,h=lr(t,r,i,o),p=lr(t,r,i,f),g=bt(RT||(RT=Ds(["M ",",",`
|
|
92
|
-
A `,",",`,0,
|
|
93
|
-
`,",",`,
|
|
94
|
-
`,",",`
|
|
95
|
-
`])),h.x,h.y,i,i,+(Math.abs(c)>180),+(o>f),p.x,p.y);if(n>0){var y=lr(t,r,n,o),x=lr(t,r,n,f);g+=bt(MT||(MT=Ds(["L ",",",`
|
|
96
|
-
A `,",",`,0,
|
|
97
|
-
`,",",`,
|
|
98
|
-
`,","," Z"])),x.x,x.y,n,n,+(Math.abs(c)>180),+(o<=f),y.x,y.y)}else g+=bt(DT||(DT=Ds(["L ",","," Z"])),t,r);return g},jK=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:f,endAngle:h}=e,p=Br(h-f),{circleTangency:g,lineTangency:y,theta:x}=hh({cx:t,cy:r,radius:i,angle:f,sign:p,cornerRadius:o,cornerIsExternal:c}),{circleTangency:b,lineTangency:w,theta:N}=hh({cx:t,cy:r,radius:i,angle:h,sign:-p,cornerRadius:o,cornerIsExternal:c}),_=c?Math.abs(f-h):Math.abs(f-h)-x-N;if(_<0)return l?bt(kT||(kT=Ds(["M ",",",`
|
|
99
|
-
a`,",",",0,0,1,",`,0
|
|
100
|
-
a`,",",",0,0,1,",`,0
|
|
101
|
-
`])),y.x,y.y,o,o,o*2,o,o,-o*2):I3({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var E=bt(LT||(LT=Ds(["M ",",",`
|
|
102
|
-
A`,",",",0,0,",",",",",`
|
|
103
|
-
A`,",",",0,",",",",",",",`
|
|
104
|
-
A`,",",",0,0,",",",",",`
|
|
105
|
-
`])),y.x,y.y,o,o,+(p<0),g.x,g.y,i,i,+(_>180),+(p<0),b.x,b.y,o,o,+(p<0),w.x,w.y);if(n>0){var{circleTangency:T,lineTangency:A,theta:C}=hh({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:R,lineTangency:D,theta:M}=hh({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),$=c?Math.abs(f-h):Math.abs(f-h)-C-M;if($<0&&o===0)return"".concat(E,"L").concat(t,",").concat(r,"Z");E+=bt(IT||(IT=Ds(["L",",",`
|
|
106
|
-
A`,",",",0,0,",",",",",`
|
|
107
|
-
A`,",",",0,",",",",",",",`
|
|
108
|
-
A`,",",",0,0,",",",",","Z"])),D.x,D.y,o,o,+(p<0),R.x,R.y,n,n,+($>180),+(p>0),T.x,T.y,o,o,+(p<0),A.x,A.y)}else E+=bt($T||($T=Ds(["L",",","Z"])),t,r);return E},wK={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},$3=e=>{var t=fr(e,wK),{cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p,className:g}=t;if(o<i||h===p)return null;var y=Xe("recharts-sector",g),x=o-i,b=Bn(l,x,0,!0),w;return b>0&&Math.abs(h-p)<360?w=jK({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(b,x/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p}):w=I3({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:h,endAngle:p}),S.createElement("path",gb({},Er(t),{className:y,d:w}))};function SK(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(vM(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:o,outerRadius:l,angle:c}=t,f=lr(n,i,o,c),h=lr(n,i,l,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return L3(t)}}var B0={},U0={},q0={},zT;function NK(){return zT||(zT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PM();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(q0)),q0}var BT;function _K(){return BT||(BT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NK();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})(U0)),U0}var UT;function OK(){return UT||(UT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=RM(),r=_K();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 h=0;h<c;h++)f[h]=i,i+=l;return f}e.range=n})(B0)),B0}var H0,qT;function EK(){return qT||(qT=1,H0=OK().range),H0}var AK=EK();const z3=rs(AK);var Fn=e=>e.chartData,Fj=Q([Fn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Nd=(e,t,r,n)=>n?Fj(e):Fn(e),TK=(e,t,r)=>r?Fj(e):Fn(e),CK=Q([Nd],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});Q([Fj],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var PK=Q([Fn],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function oa(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Be(t)&&Be(r))return!0}return!1}function HT(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function B3(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(oa(l))return l}}function RK(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(oa(n))return HT(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(ge(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"&&RA.test(i)){var f=RA.exec(i);if(f==null||f[1]==null||t==null)l=void 0;else{var h=+f[1];l=t[0]-h}}else l=t==null?void 0:t[0];if(o==="auto")t!=null&&(c=Math.max(...t));else if(ge(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"&&MA.test(o)){var p=MA.exec(o);if(p==null||p[1]==null||t==null)c=void 0;else{var g=+p[1];c=t[1]+g}}else c=t==null?void 0:t[1];var y=[l,c];if(oa(y))return t==null?y:HT(y,t,r)}}}var ru=1e9,MK={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Gj,ht=!0,En="[DecimalError] ",Zs=En+"Invalid argument: ",Kj=En+"Exponent out of range: ",nu=Math.floor,Cs=Math.pow,DK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,tn,Kt=1e7,lt=7,U3=9007199254740991,xm=nu(U3/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 Fa(this,new this.constructor(e))};he.dividedToIntegerBy=he.idiv=function(e){var t=this,r=t.constructor;return nt(Fa(t,new r(e),0,1),r.precision)};he.equals=he.eq=function(e){return!this.cmp(e)};he.exponent=function(){return Dt(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(tn))throw Error(En+"NaN");if(r.s<1)throw Error(En+(r.s?"NaN":"-Infinity"));return r.eq(tn)?new n(0):(ht=!1,t=Fa(Qc(r,o),Qc(e,o),o),ht=!0,nt(t,i))};he.minus=he.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?F3(t,e):q3(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(En+"NaN");return r.s?(ht=!1,t=Fa(r,e,0,1).times(e),ht=!0,r.minus(t)):nt(new n(r),i)};he.naturalExponential=he.exp=function(){return H3(this)};he.naturalLogarithm=he.ln=function(){return Qc(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?q3(t,e):F3(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(Zs+e);if(t=Dt(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(En+"NaN")}for(e=Dt(c),ht=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=sa(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=nu((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(Fa(c,o,l+2)).times(.5),sa(o.d).slice(0,l)===(t=sa(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 ht=!0,nt(n,r)};he.times=he.mul=function(e){var t,r,n,i,o,l,c,f,h,p=this,g=p.constructor,y=p.d,x=(e=new g(e)).d;if(!p.s||!e.s)return new g(0);for(e.s*=p.s,r=p.e+e.e,f=y.length,h=x.length,f<h&&(o=y,y=x,x=o,l=f,f=h,h=l),o=[],l=f+h,n=l;n--;)o.push(0);for(n=h;--n>=0;){for(t=0,i=f+n;i>n;)c=o[i]+x[n]*y[i-n-1]+t,o[i--]=c%Kt|0,t=c/Kt|0;o[i]=(o[i]+t)%Kt|0}for(;!o[--l];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,ht?nt(e,g.precision):e};he.toDecimalPlaces=he.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(fa(e,0,ru),t===void 0?t=n.rounding:fa(t,0,8),nt(r,e+Dt(r)+1,t))};he.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=so(n,!0):(fa(e,0,ru),t===void 0?t=i.rounding:fa(t,0,8),n=nt(new i(n),e+1,t),r=so(n,!0,e+1)),r};he.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?so(i):(fa(e,0,ru),t===void 0?t=o.rounding:fa(t,0,8),n=nt(new o(i),e+Dt(i)+1,t),r=so(n.abs(),!1,e+Dt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};he.toInteger=he.toint=function(){var e=this,t=e.constructor;return nt(new t(e),Dt(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,h=12,p=+(e=new f(e));if(!e.s)return new f(tn);if(c=new f(c),!c.s){if(e.s<1)throw Error(En+"Infinity");return c}if(c.eq(tn))return c;if(n=f.precision,e.eq(tn))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)<=U3){for(i=new f(tn),t=Math.ceil(n/lt+4),ht=!1;r%2&&(i=i.times(c),KT(i.d,t)),r=nu(r/2),r!==0;)c=c.times(c),KT(c.d,t);return ht=!0,e.s<0?new f(tn).div(i):nt(i,n)}}else if(o<0)throw Error(En+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ht=!1,i=e.times(Qc(c,n+h)),ht=!0,i=H3(i),i.s=o,i};he.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Dt(i),n=so(i,r<=o.toExpNeg||r>=o.toExpPos)):(fa(e,1,ru),t===void 0?t=o.rounding:fa(t,0,8),i=nt(new o(i),e,t),r=Dt(i),n=so(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):(fa(e,1,ru),t===void 0?t=n.rounding:fa(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=Dt(e),r=e.constructor;return so(e,t<=r.toExpNeg||t>=r.toExpPos)};function q3(e,t){var r,n,i,o,l,c,f,h,p=e.constructor,g=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),ht?nt(t,g):t;if(f=e.d,h=t.d,l=e.e,i=t.e,f=f.slice(),o=l-i,o){for(o<0?(n=f,o=-o,c=h.length):(n=h,i=l,c=f.length),l=Math.ceil(g/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=h.length,c-o<0&&(o=c,n=h,h=f,f=n),r=0;o;)r=(f[--o]=f[o]+h[o]+r)/Kt|0,f[o]%=Kt;for(r&&(f.unshift(r),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,ht?nt(t,g):t}function fa(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Zs+e)}function sa(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+=Ri(r)),o+=n;l=e[t],n=l+"",r=lt-n.length,r&&(o+=Ri(r))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Fa=(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%Kt|0,l=o/Kt|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*Kt+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,l){var c,f,h,p,g,y,x,b,w,N,_,E,T,A,C,R,D,M,$=n.constructor,I=n.s==i.s?1:-1,F=n.d,H=i.d;if(!n.s)return new $(n);if(!i.s)throw Error(En+"Division by zero");for(f=n.e-i.e,D=H.length,C=F.length,x=new $(I),b=x.d=[],h=0;H[h]==(F[h]||0);)++h;if(H[h]>(F[h]||0)&&--f,o==null?E=o=$.precision:l?E=o+(Dt(n)-Dt(i))+1:E=o,E<0)return new $(0);if(E=E/lt+2|0,h=0,D==1)for(p=0,H=H[0],E++;(h<C||p)&&E--;h++)T=p*Kt+(F[h]||0),b[h]=T/H|0,p=T%H|0;else{for(p=Kt/(H[0]+1)|0,p>1&&(H=e(H,p),F=e(F,p),D=H.length,C=F.length),A=D,w=F.slice(0,D),N=w.length;N<D;)w[N++]=0;M=H.slice(),M.unshift(0),R=H[0],H[1]>=Kt/2&&++R;do p=0,c=t(H,w,D,N),c<0?(_=w[0],D!=N&&(_=_*Kt+(w[1]||0)),p=_/R|0,p>1?(p>=Kt&&(p=Kt-1),g=e(H,p),y=g.length,N=w.length,c=t(g,w,y,N),c==1&&(p--,r(g,D<y?M:H,y))):(p==0&&(c=p=1),g=H.slice()),y=g.length,y<N&&g.unshift(0),r(w,g,N),c==-1&&(N=w.length,c=t(H,w,D,N),c<1&&(p++,r(w,D<N?M:H,N))),N=w.length):c===0&&(p++,w=[0]),b[h++]=p,c&&w[0]?w[N++]=F[A]||0:(w=[F[A]],N=1);while((A++<C||w[0]!==void 0)&&E--)}return b[0]||b.shift(),x.e=f,nt(x,l?o+Dt(x)+1:o)}})();function H3(e,t){var r,n,i,o,l,c,f=0,h=0,p=e.constructor,g=p.precision;if(Dt(e)>16)throw Error(Kj+Dt(e));if(!e.s)return new p(tn);for(ht=!1,c=g,l=new p(.03125);e.abs().gte(.1);)e=e.times(l),h+=5;for(n=Math.log(Cs(2,h))/Math.LN10*2+5|0,c+=n,r=i=o=new p(tn),p.precision=c;;){if(i=nt(i.times(e),c),r=r.times(++f),l=o.plus(Fa(i,r,c)),sa(l.d).slice(0,c)===sa(o.d).slice(0,c)){for(;h--;)o=nt(o.times(o),c);return p.precision=g,t==null?(ht=!0,nt(o,g)):o}o=l}}function Dt(e){for(var t=e.e*lt,r=e.d[0];r>=10;r/=10)t++;return t}function F0(e,t,r){if(t>e.LN10.sd())throw ht=!0,r&&(e.precision=r),Error(En+"LN10 precision limit exceeded");return nt(new e(e.LN10),t)}function Ri(e){for(var t="";e--;)t+="0";return t}function Qc(e,t){var r,n,i,o,l,c,f,h,p,g=1,y=10,x=e,b=x.d,w=x.constructor,N=w.precision;if(x.s<1)throw Error(En+(x.s?"NaN":"-Infinity"));if(x.eq(tn))return new w(0);if(t==null?(ht=!1,h=N):h=t,x.eq(10))return t==null&&(ht=!0),F0(w,h);if(h+=y,w.precision=h,r=sa(b),n=r.charAt(0),o=Dt(x),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(e),r=sa(x.d),n=r.charAt(0),g++;o=Dt(x),n>1?(x=new w("0."+r),o++):x=new w(n+"."+r.slice(1))}else return f=F0(w,h+2,N).times(o+""),x=Qc(new w(n+"."+r.slice(1)),h-y).plus(f),w.precision=N,t==null?(ht=!0,nt(x,N)):x;for(c=l=x=Fa(x.minus(tn),x.plus(tn),h),p=nt(x.times(x),h),i=3;;){if(l=nt(l.times(p),h),f=c.plus(Fa(l,new w(i),h)),sa(f.d).slice(0,h)===sa(c.d).slice(0,h))return c=c.times(2),o!==0&&(c=c.plus(F0(w,h+2,N).times(o+""))),c=Fa(c,new w(g),h),w.precision=N,t==null?(ht=!0,nt(c,N)):c;c=f,i+=2}}function FT(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=nu(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),ht&&(e.e>xm||e.e<-xm))throw Error(Kj+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,h,p,g=e.d;for(l=1,o=g[0];o>=10;o/=10)l++;if(n=t-l,n<0)n+=lt,i=t,h=g[p=0];else{if(p=Math.ceil((n+1)/lt),o=g.length,p>=o)return e;for(h=o=g[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=h/o%10|0,f=t<0||g[p+1]!==void 0||h%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?h/Cs(10,l-i):0:g[p-1])%10&1||r==(e.s<0?8:7))),t<1||!g[0])return f?(o=Dt(e),g.length=1,t=t-o-1,g[0]=Cs(10,(lt-t%lt)%lt),e.e=nu(-t/lt)||0):(g.length=1,g[0]=e.e=e.s=0),e;if(n==0?(g.length=p,o=1,p--):(g.length=p+1,o=Cs(10,lt-n),g[p]=i>0?(h/Cs(10,l-i)%Cs(10,i)|0)*o:0),f)for(;;)if(p==0){(g[0]+=o)==Kt&&(g[0]=1,++e.e);break}else{if(g[p]+=o,g[p]!=Kt)break;g[p--]=0,o=1}for(n=g.length;g[--n]===0;)g.pop();if(ht&&(e.e>xm||e.e<-xm))throw Error(Kj+Dt(e));return e}function F3(e,t){var r,n,i,o,l,c,f,h,p,g,y=e.constructor,x=y.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new y(e),ht?nt(t,x):t;if(f=e.d,g=t.d,n=t.e,h=e.e,f=f.slice(),l=h-n,l){for(p=l<0,p?(r=f,l=-l,c=g.length):(r=g,n=h,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=g.length,p=i<c,p&&(c=i),i=0;i<c;i++)if(f[i]!=g[i]){p=f[i]<g[i];break}l=0}for(p&&(r=f,f=g,g=r,t.s=-t.s),c=f.length,i=g.length-c;i>0;--i)f[c++]=0;for(i=g.length;i>l;){if(f[--i]<g[i]){for(o=i;o&&f[--o]===0;)f[o]=Kt-1;--f[o],f[i]+=Kt}f[i]-=g[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ht?nt(t,x):t):new y(0)}function so(e,t,r){var n,i=Dt(e),o=sa(e.d),l=o.length;return t?(r&&(n=r-l)>0?o=o.charAt(0)+"."+o.slice(1)+Ri(n):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ri(-i-1)+o,r&&(n=r-l)>0&&(o+=Ri(n))):i>=l?(o+=Ri(i+1-l),r&&(n=r-i-1)>0&&(o=o+"."+Ri(n))):((n=i+1)<l&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-l)>0&&(i+1===l&&(o+="."),o+=Ri(n))),e.s<0?"-"+o:o}function KT(e,t){if(e.length>t)return e.length=t,!0}function K3(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(Zs+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 FT(l,o.toString())}else if(typeof o!="string")throw Error(Zs+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,DK.test(o))FT(l,o);else throw Error(Zs+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=K3,i.config=i.set=kK,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 kK(e){if(!e||typeof e!="object")throw Error(En+"Object expected");var t,r,n,i=["precision",1,ru,"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(nu(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Zs+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Zs+r+": "+n);return this}var Gj=K3(MK);tn=new Gj(1);const ze=Gj;function G3(e){var t;return e===0?t=1:t=Math.floor(new ze(e).abs().log(10).toNumber())+1,t}function Y3(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 V3=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Yj=(e,t,r)=>{if(e.lte(0))return new ze(0);var n=G3(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()))},Q3=(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(),h=i.findIndex(x=>x>=f-1e-10);if(h===-1&&(c=c.mul(10),h=0),h+=r,h>=i.length){var p=Math.floor(h/i.length);h%=i.length,c=c.mul(new ze(10).pow(p))}var g=(n=i[h])!==null&&n!==void 0?n:1,y=new ze(g).mul(c);return t?y:new ze(Math.ceil(y.toNumber()))},LK=(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(G3(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},X3=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]:Yj;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 h=Math.ceil(f.sub(t).div(c).toNumber()),p=Math.ceil(new ze(r).sub(f).div(c).toNumber()),g=h+p+1;return g>n?X3(t,r,n,i,o+1,l):(g<n&&(p=r>0?p+(n-g):p,h=r>0?h:h+(n-g)),{step:c,tickMin:f.sub(new ze(h).mul(c)),tickMax:f.add(new ze(p).mul(c))})},GT=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,h]=V3([r,n]);if(f===-1/0||h===1/0){var p=h===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),h];return r>n?p.reverse():p}if(f===h)return LK(f,i,o);var g=l==="snap125"?Q3:Yj,{step:y,tickMin:x,tickMax:b}=X3(f,h,c,o,0,g),w=Y3(x,b.add(new ze(.1).mul(y)),y);return r>n?w.reverse():w},YT=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]=V3([n,i]);if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var h=l==="snap125"?Q3:Yj,p=Math.max(r,2),g=h(new ze(f).sub(c).div(p-1),o,0),y=[...Y3(new ze(c),new ze(f),g),f];return o===!1&&(y=y.map(x=>Math.round(x))),n>i?y.reverse():y},W3=e=>e.rootProps.maxBarSize,IK=e=>e.rootProps.barGap,Z3=e=>e.rootProps.barCategoryGap,$K=e=>e.rootProps.barSize,Op=e=>e.rootProps.stackOffset,J3=e=>e.rootProps.reverseStackOrder,Vj=e=>e.options.chartName,Qj=e=>e.rootProps.syncId,e4=e=>e.rootProps.syncMethod,Xj=e=>e.options.eventEmitter,Gt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Ns={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Wn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},Ep=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Ap(e,t,r){if(r!=="auto")return r;if(e!=null)return Xa(e,t)?"category":"number"}function VT(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 bm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?VT(Object(r),!0).forEach(function(n){zK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):VT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zK(e,t,r){return(t=BK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BK(e){var t=UK(e,"string");return typeof t=="symbol"?t:t+""}function UK(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 QT={allowDataOverflow:Ns.allowDataOverflow,allowDecimals:Ns.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Ns.angleAxisId,includeHidden:!1,name:void 0,reversed:Ns.reversed,scale:Ns.scale,tick:Ns.tick,tickCount:void 0,ticks:void 0,type:Ns.type,unit:void 0,niceTicks:"auto"},XT={allowDataOverflow:Wn.allowDataOverflow,allowDecimals:Wn.allowDecimals,allowDuplicatedCategory:Wn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Wn.radiusAxisId,includeHidden:Wn.includeHidden,name:void 0,reversed:Wn.reversed,scale:Wn.scale,tick:Wn.tick,tickCount:Wn.tickCount,ticks:void 0,type:Wn.type,unit:void 0,niceTicks:"auto"},qK=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Wj=Q([qK,x3],(e,t)=>{var r;if(e!=null)return e;var n=(r=Ap(t,"angleAxis",QT.type))!==null&&r!==void 0?r:"category";return bm(bm({},QT),{},{type:n})}),HK=(e,t)=>e.polarAxis.radiusAxis[t],Zj=Q([HK,x3],(e,t)=>{var r;if(e!=null)return e;var n=(r=Ap(t,"radiusAxis",XT.type))!==null&&r!==void 0?r:"category";return bm(bm({},XT),{},{type:n})}),Tp=e=>e.polarOptions,Jj=Q([Wa,Za,Vt],mK),t4=Q([Tp,Jj],(e,t)=>{if(e!=null)return Bn(e.innerRadius,t,0)}),r4=Q([Tp,Jj],(e,t)=>{if(e!=null)return Bn(e.outerRadius,t,t*.8)}),FK=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},n4=Q([Tp],FK);Q([Wj,n4],Ep);var a4=Q([Jj,t4,r4],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});Q([Zj,a4],Ep);var i4=Q([We,Tp,t4,r4,Wa,Za],(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:h}=t;return{cx:Bn(l,i,i/2),cy:Bn(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Qt=(e,t)=>t,Cp=(e,t,r)=>r;function ew(e){return e==null?void 0:e.id}function s4(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=r,l=new Map;return e.forEach(c=>{var f,h=(f=c.data)!==null&&f!==void 0?f:n;if(!(h==null||h.length===0)){var p=ew(c);h.forEach((g,y)=>{var x=o==null||i?y:String(Ot(g,o,null)),b=Ot(g,c.dataKey,0),w;l.has(x)?w=l.get(x):w={},Object.assign(w,{[p]:b}),l.set(x,w)})}}),Array.from(l.values())}function Pp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Rp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Mp(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function KK(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 Xt=e=>{var t=We(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},au=e=>e.tooltip.settings.axisId;function tw(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 GK=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!oa(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 Xi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function YK(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rw(e){let t,r,n;e.length!==2?(t=Xi,r=(c,f)=>Xi(e(c),f),n=(c,f)=>e(c)-f):(t=e===Xi||e===YK?e:VK,r=e,n=e);function i(c,f,h=0,p=c.length){if(h<p){if(t(f,f)!==0)return p;do{const g=h+p>>>1;r(c[g],f)<0?h=g+1:p=g}while(h<p)}return h}function o(c,f,h=0,p=c.length){if(h<p){if(t(f,f)!==0)return p;do{const g=h+p>>>1;r(c[g],f)<=0?h=g+1:p=g}while(h<p)}return h}function l(c,f,h=0,p=c.length){const g=i(c,f,h,p-1);return g>h&&n(c[g-1],f)>-n(c[g],f)?g-1:g}return{left:i,center:l,right:o}}function VK(){return 0}function o4(e){return e===null?NaN:+e}function*QK(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const XK=rw(Xi),_d=XK.right;rw(o4).center;class WT extends Map{constructor(t,r=JK){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(ZT(this,t))}has(t){return super.has(ZT(this,t))}set(t,r){return super.set(WK(this,t),r)}delete(t){return super.delete(ZK(this,t))}}function ZT({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function WK({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function ZK({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function JK(e){return e!==null&&typeof e=="object"?e.valueOf():e}function eG(e=Xi){if(e===Xi)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 tG=Math.sqrt(50),rG=Math.sqrt(10),nG=Math.sqrt(2);function jm(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>=tG?10:o>=rG?5:o>=nG?2:1;let c,f,h;return i<0?(h=Math.pow(10,-i)/l,c=Math.round(e*h),f=Math.round(t*h),c/h<e&&++c,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*l,c=Math.round(e/h),f=Math.round(t/h),c*h<e&&++c,f*h>t&&--f),f<c&&.5<=r&&r<2?jm(e,t,r*2):[c,f,h]}function yb(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?jm(t,e,r):jm(e,t,r);if(!(o>=i))return[];const c=o-i+1,f=new Array(c);if(n)if(l<0)for(let h=0;h<c;++h)f[h]=(o-h)/-l;else for(let h=0;h<c;++h)f[h]=(o-h)*l;else if(l<0)for(let h=0;h<c;++h)f[h]=(i+h)/-l;else for(let h=0;h<c;++h)f[h]=(i+h)*l;return f}function vb(e,t,r){return t=+t,e=+e,r=+r,jm(e,t,r)[2]}function xb(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?vb(t,e,r):vb(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function JT(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function eC(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function u4(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:eG(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),g=.5*Math.exp(2*p/3),y=.5*Math.sqrt(p*g*(f-g)/f)*(h-f/2<0?-1:1),x=Math.max(r,Math.floor(t-h*g/f+y)),b=Math.min(n,Math.floor(t+(f-h)*g/f+y));u4(e,t,x,b,i)}const o=e[t];let l=r,c=n;for(mc(e,r,t),i(e[n],o)>0&&mc(e,r,n);l<c;){for(mc(e,l,c),++l,--c;i(e[l],o)<0;)++l;for(;i(e[c],o)>0;)--c}i(e[r],o)===0?mc(e,r,c):(++c,mc(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function mc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function aG(e,t,r){if(e=Float64Array.from(QK(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return eC(e);if(t>=1)return JT(e);var n,i=(n-1)*t,o=Math.floor(i),l=JT(u4(e,o).subarray(0,o+1)),c=eC(e.subarray(o+1));return l+(c-l)*(i-o)}}function iG(e,t,r=o4){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 sG(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 An(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 bb=Symbol("implicit");function nw(){var e=new WT,t=[],r=[],n=bb;function i(o){let l=e.get(o);if(l===void 0){if(n!==bb)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 WT;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 nw(t,r).unknown(n)},An.apply(i,arguments),i}function aw(){var e=nw().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,l,c=!1,f=0,h=0,p=.5;delete e.unknown;function g(){var y=t().length,x=i<n,b=x?i:n,w=x?n:i;o=(w-b)/Math.max(1,y-f+h*2),c&&(o=Math.floor(o)),b+=(w-b-o*(y-f))*p,l=o*(1-f),c&&(b=Math.round(b),l=Math.round(l));var N=sG(y).map(function(_){return b+o*_});return r(x?N.reverse():N)}return e.domain=function(y){return arguments.length?(t(y),g()):t()},e.range=function(y){return arguments.length?([n,i]=y,n=+n,i=+i,g()):[n,i]},e.rangeRound=function(y){return[n,i]=y,n=+n,i=+i,c=!0,g()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(y){return arguments.length?(c=!!y,g()):c},e.padding=function(y){return arguments.length?(f=Math.min(1,h=+y),g()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),g()):f},e.paddingOuter=function(y){return arguments.length?(h=+y,g()):h},e.align=function(y){return arguments.length?(p=Math.max(0,Math.min(1,y)),g()):p},e.copy=function(){return aw(t(),[n,i]).round(c).paddingInner(f).paddingOuter(h).align(p)},An.apply(g(),arguments)}function c4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return c4(t())},e}function oG(){return c4(aw.apply(null,arguments).paddingInner(1))}function iw(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function d4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Od(){}var Xc=.7,wm=1/Xc,Nl="\\s*([+-]?\\d+)\\s*",Wc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",la="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",lG=/^#([0-9a-f]{3,8})$/,uG=new RegExp(`^rgb\\(${Nl},${Nl},${Nl}\\)$`),cG=new RegExp(`^rgb\\(${la},${la},${la}\\)$`),dG=new RegExp(`^rgba\\(${Nl},${Nl},${Nl},${Wc}\\)$`),fG=new RegExp(`^rgba\\(${la},${la},${la},${Wc}\\)$`),hG=new RegExp(`^hsl\\(${Wc},${la},${la}\\)$`),mG=new RegExp(`^hsla\\(${Wc},${la},${la},${Wc}\\)$`),tC={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};iw(Od,Zc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:rC,formatHex:rC,formatHex8:pG,formatHsl:gG,formatRgb:nC,toString:nC});function rC(){return this.rgb().formatHex()}function pG(){return this.rgb().formatHex8()}function gG(){return f4(this).formatHsl()}function nC(){return this.rgb().formatRgb()}function Zc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=lG.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?aC(t):r===3?new qr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?mh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?mh(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=uG.exec(e))?new qr(t[1],t[2],t[3],1):(t=cG.exec(e))?new qr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=dG.exec(e))?mh(t[1],t[2],t[3],t[4]):(t=fG.exec(e))?mh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=hG.exec(e))?oC(t[1],t[2]/100,t[3]/100,1):(t=mG.exec(e))?oC(t[1],t[2]/100,t[3]/100,t[4]):tC.hasOwnProperty(e)?aC(tC[e]):e==="transparent"?new qr(NaN,NaN,NaN,0):null}function aC(e){return new qr(e>>16&255,e>>8&255,e&255,1)}function mh(e,t,r,n){return n<=0&&(e=t=r=NaN),new qr(e,t,r,n)}function yG(e){return e instanceof Od||(e=Zc(e)),e?(e=e.rgb(),new qr(e.r,e.g,e.b,e.opacity)):new qr}function jb(e,t,r,n){return arguments.length===1?yG(e):new qr(e,t,r,n??1)}function qr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}iw(qr,jb,d4(Od,{brighter(e){return e=e==null?wm:Math.pow(wm,e),new qr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Xc:Math.pow(Xc,e),new qr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new qr(Js(this.r),Js(this.g),Js(this.b),Sm(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:iC,formatHex:iC,formatHex8:vG,formatRgb:sC,toString:sC}));function iC(){return`#${ks(this.r)}${ks(this.g)}${ks(this.b)}`}function vG(){return`#${ks(this.r)}${ks(this.g)}${ks(this.b)}${ks((isNaN(this.opacity)?1:this.opacity)*255)}`}function sC(){const e=Sm(this.opacity);return`${e===1?"rgb(":"rgba("}${Js(this.r)}, ${Js(this.g)}, ${Js(this.b)}${e===1?")":`, ${e})`}`}function Sm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Js(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ks(e){return e=Js(e),(e<16?"0":"")+e.toString(16)}function oC(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new $n(e,t,r,n)}function f4(e){if(e instanceof $n)return new $n(e.h,e.s,e.l,e.opacity);if(e instanceof Od||(e=Zc(e)),!e)return new $n;if(e instanceof $n)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 $n(l,c,f,e.opacity)}function xG(e,t,r,n){return arguments.length===1?f4(e):new $n(e,t,r,n??1)}function $n(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}iw($n,xG,d4(Od,{brighter(e){return e=e==null?wm:Math.pow(wm,e),new $n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Xc:Math.pow(Xc,e),new $n(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 qr(K0(e>=240?e-240:e+120,i,n),K0(e,i,n),K0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new $n(lC(this.h),ph(this.s),ph(this.l),Sm(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=Sm(this.opacity);return`${e===1?"hsl(":"hsla("}${lC(this.h)}, ${ph(this.s)*100}%, ${ph(this.l)*100}%${e===1?")":`, ${e})`}`}}));function lC(e){return e=(e||0)%360,e<0?e+360:e}function ph(e){return Math.max(0,Math.min(1,e||0))}function K0(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 sw=e=>()=>e;function bG(e,t){return function(r){return e+r*t}}function jG(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 wG(e){return(e=+e)==1?h4:function(t,r){return r-t?jG(t,r,e):sw(isNaN(t)?r:t)}}function h4(e,t){var r=t-e;return r?bG(e,r):sw(isNaN(e)?t:e)}const uC=(function e(t){var r=wG(t);function n(i,o){var l=r((i=jb(i)).r,(o=jb(o)).r),c=r(i.g,o.g),f=r(i.b,o.b),h=h4(i.opacity,o.opacity);return function(p){return i.r=l(p),i.g=c(p),i.b=f(p),i.opacity=h(p),i+""}}return n.gamma=e,n})(1);function SG(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 NG(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _G(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]=iu(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 OG(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Nm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function EG(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]=iu(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var wb=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,G0=new RegExp(wb.source,"g");function AG(e){return function(){return e}}function TG(e){return function(t){return e(t)+""}}function CG(e,t){var r=wb.lastIndex=G0.lastIndex=0,n,i,o,l=-1,c=[],f=[];for(e=e+"",t=t+"";(n=wb.exec(e))&&(i=G0.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:Nm(n,i)})),r=G0.lastIndex;return r<t.length&&(o=t.slice(r),c[l]?c[l]+=o:c[++l]=o),c.length<2?f[0]?TG(f[0].x):AG(t):(t=f.length,function(h){for(var p=0,g;p<t;++p)c[(g=f[p]).i]=g.x(h);return c.join("")})}function iu(e,t){var r=typeof t,n;return t==null||r==="boolean"?sw(t):(r==="number"?Nm:r==="string"?(n=Zc(t))?(t=n,uC):CG:t instanceof Zc?uC:t instanceof Date?OG:NG(t)?SG:Array.isArray(t)?_G:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?EG:Nm)(e,t)}function ow(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function PG(e,t){t===void 0&&(t=e,e=iu);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 RG(e){return function(){return e}}function _m(e){return+e}var cC=[0,1];function _r(e){return e}function Sb(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:RG(isNaN(t)?NaN:.5)}function MG(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function DG(e,t,r){var n=e[0],i=e[1],o=t[0],l=t[1];return i<n?(n=Sb(i,n),o=r(l,o)):(n=Sb(n,i),o=r(o,l)),function(c){return o(n(c))}}function kG(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]=Sb(e[l],e[l+1]),o[l]=r(t[l],t[l+1]);return function(c){var f=_d(e,c,1,n)-1;return o[f](i[f](c))}}function Ed(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Dp(){var e=cC,t=cC,r=iu,n,i,o,l=_r,c,f,h;function p(){var y=Math.min(e.length,t.length);return l!==_r&&(l=MG(e[0],e[y-1])),c=y>2?kG:DG,f=h=null,g}function g(y){return y==null||isNaN(y=+y)?o:(f||(f=c(e.map(n),t,r)))(n(l(y)))}return g.invert=function(y){return l(i((h||(h=c(t,e.map(n),Nm)))(y)))},g.domain=function(y){return arguments.length?(e=Array.from(y,_m),p()):e.slice()},g.range=function(y){return arguments.length?(t=Array.from(y),p()):t.slice()},g.rangeRound=function(y){return t=Array.from(y),r=ow,p()},g.clamp=function(y){return arguments.length?(l=y?!0:_r,p()):l!==_r},g.interpolate=function(y){return arguments.length?(r=y,p()):r},g.unknown=function(y){return arguments.length?(o=y,g):o},function(y,x){return n=y,i=x,p()}}function lw(){return Dp()(_r,_r)}function LG(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Om(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=Om(Math.abs(e)),e?e[1]:NaN}function IG(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 $G(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var zG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Jc(e){if(!(t=zG.exec(e)))throw new Error("invalid format: "+e);var t;return new uw({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]})}Jc.prototype=uw.prototype;function uw(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+""}uw.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 BG(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 Em;function UG(e,t){var r=Om(e,t);if(!r)return Em=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Em=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")+Om(e,Math.max(0,t+o-1))[0]}function dC(e,t){var r=Om(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 fC={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:LG,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)=>dC(e*100,t),r:dC,s:UG,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function hC(e){return e}var mC=Array.prototype.map,pC=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qG(e){var t=e.grouping===void 0||e.thousands===void 0?hC:IG(mC.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?hC:$G(mC.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 h(g,y){g=Jc(g);var x=g.fill,b=g.align,w=g.sign,N=g.symbol,_=g.zero,E=g.width,T=g.comma,A=g.precision,C=g.trim,R=g.type;R==="n"?(T=!0,R="g"):fC[R]||(A===void 0&&(A=12),C=!0,R="g"),(_||x==="0"&&b==="=")&&(_=!0,x="0",b="=");var D=(y&&y.prefix!==void 0?y.prefix:"")+(N==="$"?r:N==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():""),M=(N==="$"?n:/[%p]/.test(R)?l:"")+(y&&y.suffix!==void 0?y.suffix:""),$=fC[R],I=/[defgprs%]/.test(R);A=A===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function F(H){var ie=D,Z=M,G,k,q;if(R==="c")Z=$(H)+Z,H="";else{H=+H;var J=H<0||1/H<0;if(H=isNaN(H)?f:$(Math.abs(H),A),C&&(H=BG(H)),J&&+H==0&&w!=="+"&&(J=!1),ie=(J?w==="("?w:c:w==="-"||w==="("?"":w)+ie,Z=(R==="s"&&!isNaN(H)&&Em!==void 0?pC[8+Em/3]:"")+Z+(J&&w==="("?")":""),I){for(G=-1,k=H.length;++G<k;)if(q=H.charCodeAt(G),48>q||q>57){Z=(q===46?i+H.slice(G+1):H.slice(G))+Z,H=H.slice(0,G);break}}}T&&!_&&(H=t(H,1/0));var re=ie.length+H.length+Z.length,oe=re<E?new Array(E-re+1).join(x):"";switch(T&&_&&(H=t(oe+H,oe.length?E-Z.length:1/0),oe=""),b){case"<":H=ie+H+Z+oe;break;case"=":H=ie+oe+H+Z;break;case"^":H=oe.slice(0,re=oe.length>>1)+ie+H+Z+oe.slice(re);break;default:H=oe+ie+H+Z;break}return o(H)}return F.toString=function(){return g+""},F}function p(g,y){var x=Math.max(-8,Math.min(8,Math.floor(Yl(y)/3)))*3,b=Math.pow(10,-x),w=h((g=Jc(g),g.type="f",g),{suffix:pC[8+x/3]});return function(N){return w(b*N)}}return{format:h,formatPrefix:p}}var gh,cw,m4;HG({thousands:",",grouping:[3],currency:["$",""]});function HG(e){return gh=qG(e),cw=gh.format,m4=gh.formatPrefix,gh}function FG(e){return Math.max(0,-Yl(Math.abs(e)))}function KG(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yl(t)/3)))*3-Yl(Math.abs(e)))}function GG(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yl(t)-Yl(e))+1}function p4(e,t,r,n){var i=xb(e,t,r),o;switch(n=Jc(n??",f"),n.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=KG(i,l))&&(n.precision=o),m4(n,l)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=GG(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=FG(i))&&(n.precision=o-(n.type==="%")*2);break}}return cw(n)}function ns(e){var t=e.domain;return e.ticks=function(r){var n=t();return yb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return p4(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,h,p=10;for(c<l&&(h=l,l=c,c=h,h=i,i=o,o=h);p-- >0;){if(h=vb(l,c,r),h===f)return n[i]=l,n[o]=c,t(n);if(h>0)l=Math.floor(l/h)*h,c=Math.ceil(c/h)*h;else if(h<0)l=Math.ceil(l*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function g4(){var e=lw();return e.copy=function(){return Ed(e,g4())},An.apply(e,arguments),ns(e)}function y4(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,_m),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return y4(e).unknown(t)},e=arguments.length?Array.from(e,_m):[0,1],ns(r)}function v4(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 gC(e){return Math.log(e)}function yC(e){return Math.exp(e)}function YG(e){return-Math.log(-e)}function VG(e){return-Math.exp(-e)}function QG(e){return isFinite(e)?+("1e"+e):e<0?0:e}function XG(e){return e===10?QG:e===Math.E?Math.exp:t=>Math.pow(e,t)}function WG(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 vC(e){return(t,r)=>-e(-t,r)}function dw(e){const t=e(gC,yC),r=t.domain;let n=10,i,o;function l(){return i=WG(n),o=XG(n),r()[0]<0?(i=vC(i),o=vC(o),e(YG,VG)):e(gC,yC),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 h=f[0],p=f[f.length-1];const g=p<h;g&&([h,p]=[p,h]);let y=i(h),x=i(p),b,w;const N=c==null?10:+c;let _=[];if(!(n%1)&&x-y<N){if(y=Math.floor(y),x=Math.ceil(x),h>0){for(;y<=x;++y)for(b=1;b<n;++b)if(w=y<0?b/o(-y):b*o(y),!(w<h)){if(w>p)break;_.push(w)}}else for(;y<=x;++y)for(b=n-1;b>=1;--b)if(w=y>0?b/o(-y):b*o(y),!(w<h)){if(w>p)break;_.push(w)}_.length*2<N&&(_=yb(h,p,N))}else _=yb(y,x,Math.min(x-y,N)).map(o);return g?_.reverse():_},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Jc(f)).precision==null&&(f.trim=!0),f=cw(f)),c===1/0)return f;const h=Math.max(1,n*c/t.ticks().length);return p=>{let g=p/o(Math.round(i(p)));return g*n<n-.5&&(g*=n),g<=h?f(p):""}},t.nice=()=>r(v4(r(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function x4(){const e=dw(Dp()).domain([1,10]);return e.copy=()=>Ed(e,x4()).base(e.base()),An.apply(e,arguments),e}function xC(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function bC(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function fw(e){var t=1,r=e(xC(t),bC(t));return r.constant=function(n){return arguments.length?e(xC(t=+n),bC(t)):t},ns(r)}function b4(){var e=fw(Dp());return e.copy=function(){return Ed(e,b4()).constant(e.constant())},An.apply(e,arguments)}function jC(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function ZG(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function JG(e){return e<0?-e*e:e*e}function hw(e){var t=e(_r,_r),r=1;function n(){return r===1?e(_r,_r):r===.5?e(ZG,JG):e(jC(r),jC(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ns(t)}function mw(){var e=hw(Dp());return e.copy=function(){return Ed(e,mw()).exponent(e.exponent())},An.apply(e,arguments),e}function eY(){return mw.apply(null,arguments).exponent(.5)}function wC(e){return Math.sign(e)*e*e}function tY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function j4(){var e=lw(),t=[0,1],r=!1,n;function i(o){var l=tY(e(o));return isNaN(l)?n:r?Math.round(l):l}return i.invert=function(o){return e.invert(wC(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,_m)).map(wC)),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 j4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},An.apply(i,arguments),ns(i)}function w4(){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]=iG(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?n:t[_d(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(Xi),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 w4().domain(e).range(t).unknown(n)},An.apply(o,arguments)}function S4(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function l(f){return f!=null&&f<=f?i[_d(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 h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},l.unknown=function(f){return arguments.length&&(o=f),l},l.thresholds=function(){return n.slice()},l.copy=function(){return S4().domain([e,t]).range(i).unknown(o)},An.apply(ns(l),arguments)}function N4(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[_d(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 N4().domain(e).range(t).unknown(r)},An.apply(i,arguments)}const Y0=new Date,V0=new Date;function Bt(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 h;do f.push(h=new Date(+o)),t(o,c),e(o);while(h<o&&o<l);return f},i.filter=o=>Bt(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)=>(Y0.setTime(+o),V0.setTime(+l),e(Y0),e(V0),Math.floor(r(Y0,V0))),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 Am=Bt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Am.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Bt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Am);Am.range;const Ba=1e3,On=Ba*60,Ua=On*60,Ya=Ua*24,pw=Ya*7,SC=Ya*30,Q0=Ya*365,Ls=Bt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getUTCSeconds());Ls.range;const gw=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ba)},(e,t)=>{e.setTime(+e+t*On)},(e,t)=>(t-e)/On,e=>e.getMinutes());gw.range;const yw=Bt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*On)},(e,t)=>(t-e)/On,e=>e.getUTCMinutes());yw.range;const vw=Bt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ba-e.getMinutes()*On)},(e,t)=>{e.setTime(+e+t*Ua)},(e,t)=>(t-e)/Ua,e=>e.getHours());vw.range;const xw=Bt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ua)},(e,t)=>(t-e)/Ua,e=>e.getUTCHours());xw.range;const Ad=Bt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*On)/Ya,e=>e.getDate()-1);Ad.range;const kp=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ya,e=>e.getUTCDate()-1);kp.range;const _4=Bt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Ya,e=>Math.floor(e/Ya));_4.range;function go(e){return Bt(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())*On)/pw)}const Lp=go(0),Tm=go(1),rY=go(2),nY=go(3),Vl=go(4),aY=go(5),iY=go(6);Lp.range;Tm.range;rY.range;nY.range;Vl.range;aY.range;iY.range;function yo(e){return Bt(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)/pw)}const Ip=yo(0),Cm=yo(1),sY=yo(2),oY=yo(3),Ql=yo(4),lY=yo(5),uY=yo(6);Ip.range;Cm.range;sY.range;oY.range;Ql.range;lY.range;uY.range;const bw=Bt(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());bw.range;const jw=Bt(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());jw.range;const Va=Bt(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:Bt(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=Bt(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:Bt(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 O4(e,t,r,n,i,o){const l=[[Ls,1,Ba],[Ls,5,5*Ba],[Ls,15,15*Ba],[Ls,30,30*Ba],[o,1,On],[o,5,5*On],[o,15,15*On],[o,30,30*On],[i,1,Ua],[i,3,3*Ua],[i,6,6*Ua],[i,12,12*Ua],[n,1,Ya],[n,2,2*Ya],[r,1,pw],[t,1,SC],[t,3,3*SC],[e,1,Q0]];function c(h,p,g){const y=p<h;y&&([h,p]=[p,h]);const x=g&&typeof g.range=="function"?g:f(h,p,g),b=x?x.range(h,+p+1):[];return y?b.reverse():b}function f(h,p,g){const y=Math.abs(p-h)/g,x=rw(([,,N])=>N).right(l,y);if(x===l.length)return e.every(xb(h/Q0,p/Q0,g));if(x===0)return Am.every(Math.max(xb(h,p,g),1));const[b,w]=l[y/l[x-1][2]<l[x][2]/y?x-1:x];return b.every(w)}return[c,f]}const[cY,dY]=O4(Qa,jw,Ip,_4,xw,yw),[fY,hY]=O4(Va,bw,Lp,Ad,vw,gw);function X0(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 W0(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 pc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function mY(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,h=gc(i),p=yc(i),g=gc(o),y=yc(o),x=gc(l),b=yc(l),w=gc(c),N=yc(c),_=gc(f),E=yc(f),T={a:q,A:J,b:re,B:oe,c:null,d:TC,e:TC,f:IY,g:YY,G:QY,H:DY,I:kY,j:LY,L:E4,m:$Y,M:zY,p:L,q:X,Q:RC,s:MC,S:BY,u:UY,U:qY,V:HY,w:FY,W:KY,x:null,X:null,y:GY,Y:VY,Z:XY,"%":PC},A={a:le,A:ue,b:pe,B:xe,c:null,d:CC,e:CC,f:eV,g:cV,G:fV,H:WY,I:ZY,j:JY,L:T4,m:tV,M:rV,p:we,q:_e,Q:RC,s:MC,S:nV,u:aV,U:iV,V:sV,w:oV,W:lV,x:null,X:null,y:uV,Y:dV,Z:hV,"%":PC},C={a:I,A:F,b:H,B:ie,c:Z,d:EC,e:EC,f:CY,g:OC,G:_C,H:AC,I:AC,j:OY,L:TY,m:_Y,M:EY,p:$,q:NY,Q:RY,s:MY,S:AY,u:xY,U:bY,V:jY,w:vY,W:wY,x:G,X:k,y:OC,Y:_C,Z:SY,"%":PY};T.x=R(r,T),T.X=R(n,T),T.c=R(t,T),A.x=R(r,A),A.X=R(n,A),A.c=R(t,A);function R(de,te){return function(je){var ce=[],Et=-1,Me=0,At=de.length,Tt,hr,pa;for(je instanceof Date||(je=new Date(+je));++Et<At;)de.charCodeAt(Et)===37&&(ce.push(de.slice(Me,Et)),(hr=NC[Tt=de.charAt(++Et)])!=null?Tt=de.charAt(++Et):hr=Tt==="e"?" ":"0",(pa=te[Tt])&&(Tt=pa(je,hr)),ce.push(Tt),Me=Et+1);return ce.push(de.slice(Me,Et)),ce.join("")}}function D(de,te){return function(je){var ce=pc(1900,void 0,1),Et=M(ce,de,je+="",0),Me,At;if(Et!=je.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?(Me=W0(pc(ce.y,0,1)),At=Me.getUTCDay(),Me=At>4||At===0?Cm.ceil(Me):Cm(Me),Me=kp.offset(Me,(ce.V-1)*7),ce.y=Me.getUTCFullYear(),ce.m=Me.getUTCMonth(),ce.d=Me.getUTCDate()+(ce.w+6)%7):(Me=X0(pc(ce.y,0,1)),At=Me.getDay(),Me=At>4||At===0?Tm.ceil(Me):Tm(Me),Me=Ad.offset(Me,(ce.V-1)*7),ce.y=Me.getFullYear(),ce.m=Me.getMonth(),ce.d=Me.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),At="Z"in ce?W0(pc(ce.y,0,1)).getUTCDay():X0(pc(ce.y,0,1)).getDay(),ce.m=0,ce.d="W"in ce?(ce.w+6)%7+ce.W*7-(At+5)%7:ce.w+ce.U*7-(At+6)%7);return"Z"in ce?(ce.H+=ce.Z/100|0,ce.M+=ce.Z%100,W0(ce)):X0(ce)}}function M(de,te,je,ce){for(var Et=0,Me=te.length,At=je.length,Tt,hr;Et<Me;){if(ce>=At)return-1;if(Tt=te.charCodeAt(Et++),Tt===37){if(Tt=te.charAt(Et++),hr=C[Tt in NC?te.charAt(Et++):Tt],!hr||(ce=hr(de,je,ce))<0)return-1}else if(Tt!=je.charCodeAt(ce++))return-1}return ce}function $(de,te,je){var ce=h.exec(te.slice(je));return ce?(de.p=p.get(ce[0].toLowerCase()),je+ce[0].length):-1}function I(de,te,je){var ce=x.exec(te.slice(je));return ce?(de.w=b.get(ce[0].toLowerCase()),je+ce[0].length):-1}function F(de,te,je){var ce=g.exec(te.slice(je));return ce?(de.w=y.get(ce[0].toLowerCase()),je+ce[0].length):-1}function H(de,te,je){var ce=_.exec(te.slice(je));return ce?(de.m=E.get(ce[0].toLowerCase()),je+ce[0].length):-1}function ie(de,te,je){var ce=w.exec(te.slice(je));return ce?(de.m=N.get(ce[0].toLowerCase()),je+ce[0].length):-1}function Z(de,te,je){return M(de,t,te,je)}function G(de,te,je){return M(de,r,te,je)}function k(de,te,je){return M(de,n,te,je)}function q(de){return l[de.getDay()]}function J(de){return o[de.getDay()]}function re(de){return f[de.getMonth()]}function oe(de){return c[de.getMonth()]}function L(de){return i[+(de.getHours()>=12)]}function X(de){return 1+~~(de.getMonth()/3)}function le(de){return l[de.getUTCDay()]}function ue(de){return o[de.getUTCDay()]}function pe(de){return f[de.getUTCMonth()]}function xe(de){return c[de.getUTCMonth()]}function we(de){return i[+(de.getUTCHours()>=12)]}function _e(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var te=R(de+="",T);return te.toString=function(){return de},te},parse:function(de){var te=D(de+="",!1);return te.toString=function(){return de},te},utcFormat:function(de){var te=R(de+="",A);return te.toString=function(){return de},te},utcParse:function(de){var te=D(de+="",!0);return te.toString=function(){return de},te}}}var NC={"-":"",_:" ",0:"0"},Wt=/^\s*\d+/,pY=/^%/,gY=/[\\^$*+?|[\]().{}]/g;function Ke(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 yY(e){return e.replace(gY,"\\$&")}function gc(e){return new RegExp("^(?:"+e.map(yY).join("|")+")","i")}function yc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function vY(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function xY(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function bY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function jY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function wY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function _C(e,t,r){var n=Wt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function OC(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function SY(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 NY(e,t,r){var n=Wt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function _Y(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function EC(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function OY(e,t,r){var n=Wt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function AC(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function EY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function AY(e,t,r){var n=Wt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function TY(e,t,r){var n=Wt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function CY(e,t,r){var n=Wt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function PY(e,t,r){var n=pY.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function RY(e,t,r){var n=Wt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function MY(e,t,r){var n=Wt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function TC(e,t){return Ke(e.getDate(),t,2)}function DY(e,t){return Ke(e.getHours(),t,2)}function kY(e,t){return Ke(e.getHours()%12||12,t,2)}function LY(e,t){return Ke(1+Ad.count(Va(e),e),t,3)}function E4(e,t){return Ke(e.getMilliseconds(),t,3)}function IY(e,t){return E4(e,t)+"000"}function $Y(e,t){return Ke(e.getMonth()+1,t,2)}function zY(e,t){return Ke(e.getMinutes(),t,2)}function BY(e,t){return Ke(e.getSeconds(),t,2)}function UY(e){var t=e.getDay();return t===0?7:t}function qY(e,t){return Ke(Lp.count(Va(e)-1,e),t,2)}function A4(e){var t=e.getDay();return t>=4||t===0?Vl(e):Vl.ceil(e)}function HY(e,t){return e=A4(e),Ke(Vl.count(Va(e),e)+(Va(e).getDay()===4),t,2)}function FY(e){return e.getDay()}function KY(e,t){return Ke(Tm.count(Va(e)-1,e),t,2)}function GY(e,t){return Ke(e.getFullYear()%100,t,2)}function YY(e,t){return e=A4(e),Ke(e.getFullYear()%100,t,2)}function VY(e,t){return Ke(e.getFullYear()%1e4,t,4)}function QY(e,t){var r=e.getDay();return e=r>=4||r===0?Vl(e):Vl.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function XY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function CC(e,t){return Ke(e.getUTCDate(),t,2)}function WY(e,t){return Ke(e.getUTCHours(),t,2)}function ZY(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function JY(e,t){return Ke(1+kp.count(Qa(e),e),t,3)}function T4(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function eV(e,t){return T4(e,t)+"000"}function tV(e,t){return Ke(e.getUTCMonth()+1,t,2)}function rV(e,t){return Ke(e.getUTCMinutes(),t,2)}function nV(e,t){return Ke(e.getUTCSeconds(),t,2)}function aV(e){var t=e.getUTCDay();return t===0?7:t}function iV(e,t){return Ke(Ip.count(Qa(e)-1,e),t,2)}function C4(e){var t=e.getUTCDay();return t>=4||t===0?Ql(e):Ql.ceil(e)}function sV(e,t){return e=C4(e),Ke(Ql.count(Qa(e),e)+(Qa(e).getUTCDay()===4),t,2)}function oV(e){return e.getUTCDay()}function lV(e,t){return Ke(Cm.count(Qa(e)-1,e),t,2)}function uV(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function cV(e,t){return e=C4(e),Ke(e.getUTCFullYear()%100,t,2)}function dV(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function fV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Ql(e):Ql.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function hV(){return"+0000"}function PC(){return"%"}function RC(e){return+e}function MC(e){return Math.floor(+e/1e3)}var cl,P4,R4;mV({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 mV(e){return cl=mY(e),P4=cl.format,cl.parse,R4=cl.utcFormat,cl.utcParse,cl}function pV(e){return new Date(e)}function gV(e){return e instanceof Date?+e:+new Date(+e)}function ww(e,t,r,n,i,o,l,c,f,h){var p=lw(),g=p.invert,y=p.domain,x=h(".%L"),b=h(":%S"),w=h("%I:%M"),N=h("%I %p"),_=h("%a %d"),E=h("%b %d"),T=h("%B"),A=h("%Y");function C(R){return(f(R)<R?x:c(R)<R?b:l(R)<R?w:o(R)<R?N:n(R)<R?i(R)<R?_:E:r(R)<R?T:A)(R)}return p.invert=function(R){return new Date(g(R))},p.domain=function(R){return arguments.length?y(Array.from(R,gV)):y().map(pV)},p.ticks=function(R){var D=y();return e(D[0],D[D.length-1],R??10)},p.tickFormat=function(R,D){return D==null?C:h(D)},p.nice=function(R){var D=y();return(!R||typeof R.range!="function")&&(R=t(D[0],D[D.length-1],R??10)),R?y(v4(D,R)):p},p.copy=function(){return Ed(p,ww(e,t,r,n,i,o,l,c,f,h))},p}function yV(){return An.apply(ww(fY,hY,Va,bw,Lp,Ad,vw,gw,Ls,P4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function vV(){return An.apply(ww(cY,dY,Qa,jw,Ip,kp,xw,yw,Ls,R4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function $p(){var e=0,t=1,r,n,i,o,l=_r,c=!1,f;function h(g){return g==null||isNaN(g=+g)?f:l(i===0?.5:(g=(o(g)-r)*i,c?Math.max(0,Math.min(1,g)):g))}h.domain=function(g){return arguments.length?([e,t]=g,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(g){return arguments.length?(c=!!g,h):c},h.interpolator=function(g){return arguments.length?(l=g,h):l};function p(g){return function(y){var x,b;return arguments.length?([x,b]=y,l=g(x,b),h):[l(0),l(1)]}}return h.range=p(iu),h.rangeRound=p(ow),h.unknown=function(g){return arguments.length?(f=g,h):f},function(g){return o=g,r=g(e),n=g(t),i=r===n?0:1/(n-r),h}}function as(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function M4(){var e=ns($p()(_r));return e.copy=function(){return as(e,M4())},Ja.apply(e,arguments)}function D4(){var e=dw($p()).domain([1,10]);return e.copy=function(){return as(e,D4()).base(e.base())},Ja.apply(e,arguments)}function k4(){var e=fw($p());return e.copy=function(){return as(e,k4()).constant(e.constant())},Ja.apply(e,arguments)}function Sw(){var e=hw($p());return e.copy=function(){return as(e,Sw()).exponent(e.exponent())},Ja.apply(e,arguments)}function xV(){return Sw.apply(null,arguments).exponent(.5)}function L4(){var e=[],t=_r;function r(n){if(n!=null&&!isNaN(n=+n))return t((_d(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(Xi),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)=>aG(e,o/n))},r.copy=function(){return L4(t).domain(e)},Ja.apply(r,arguments)}function zp(){var e=0,t=.5,r=1,n=1,i,o,l,c,f,h=_r,p,g=!1,y;function x(w){return isNaN(w=+w)?y:(w=.5+((w=+p(w))-o)*(n*w<n*o?c:f),h(g?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?(g=!!w,x):g},x.interpolator=function(w){return arguments.length?(h=w,x):h};function b(w){return function(N){var _,E,T;return arguments.length?([_,E,T]=N,h=PG(w,[_,E,T]),x):[h(0),h(.5),h(1)]}}return x.range=b(iu),x.rangeRound=b(ow),x.unknown=function(w){return arguments.length?(y=w,x):y},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 I4(){var e=ns(zp()(_r));return e.copy=function(){return as(e,I4())},Ja.apply(e,arguments)}function $4(){var e=dw(zp()).domain([.1,1,10]);return e.copy=function(){return as(e,$4()).base(e.base())},Ja.apply(e,arguments)}function z4(){var e=fw(zp());return e.copy=function(){return as(e,z4()).constant(e.constant())},Ja.apply(e,arguments)}function Nw(){var e=hw(zp());return e.copy=function(){return as(e,Nw()).exponent(e.exponent())},Ja.apply(e,arguments)}function bV(){return Nw.apply(null,arguments).exponent(.5)}const B4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:aw,scaleDiverging:I4,scaleDivergingLog:$4,scaleDivergingPow:Nw,scaleDivergingSqrt:bV,scaleDivergingSymlog:z4,scaleIdentity:y4,scaleImplicit:bb,scaleLinear:g4,scaleLog:x4,scaleOrdinal:nw,scalePoint:oG,scalePow:mw,scaleQuantile:w4,scaleQuantize:S4,scaleRadial:j4,scaleSequential:M4,scaleSequentialLog:D4,scaleSequentialPow:Sw,scaleSequentialQuantile:L4,scaleSequentialSqrt:xV,scaleSequentialSymlog:k4,scaleSqrt:eY,scaleSymlog:b4,scaleThreshold:N4,scaleTime:yV,scaleUtc:vV,tickFormat:p4},Symbol.toStringTag,{value:"Module"}));function jV(e){var t=B4;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(yd(e));if(r in t&&typeof t[r]=="function")return t[r]()}function DC(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=jV(e);if(n!=null)return n.domain(t).range(r),n}}function _w(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?DC(e.scale,r,n):DC(t,r,n)}function wV(e){return"scale".concat(yd(e))}function SV(e){return wV(e)in B4}var U4=(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 SV(n)?n:"point"}};function NV(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 q4(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=NV(n,o);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(l=n[f-1])!==null&&l!==void 0?l:0,p=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(o-h)<=Math.abs(o-p)?r[f-1]:r[f]}}}function _V(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):q4(e,void 0)}function kC(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 Pm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kC(Object(r),!0).forEach(function(n){OV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OV(e,t,r){return(t=EV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EV(e){var t=AV(e,"string");return typeof t=="symbol"?t:t+""}function AV(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 Nb=[0,"auto"],Lt={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"},H4=(e,t)=>e.cartesianAxis.xAxis[t],ei=(e,t)=>{var r=H4(e,t);return r??Lt},It={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Nb,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:bd},F4=(e,t)=>e.cartesianAxis.yAxis[t],ti=(e,t)=>{var r=F4(e,t);return r??It},TV={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:""},Ow=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??TV},Tr=(e,t,r)=>{switch(t){case"xAxis":return ei(e,r);case"yAxis":return ti(e,r);case"zAxis":return Ow(e,r);case"angleAxis":return Wj(e,r);case"radiusAxis":return Zj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},CV=(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))}},Td=(e,t,r)=>{switch(t){case"xAxis":return ei(e,r);case"yAxis":return ti(e,r);case"angleAxis":return Wj(e,r);case"radiusAxis":return Zj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},K4=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function G4(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 Bp=e=>e.graphicalItems.cartesianItems,PV=Q([Qt,Cp],G4),Y4=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),su=Q([Bp,Tr,PV],Y4,{memoizeOptions:{resultEqualityCheck:Mp}}),V4=Q([su],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Pp)),Q4=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),RV=Q([su],Q4),X4=e=>e.map(t=>t.data).filter(Boolean).flat(1),MV=Q([su],e=>e.some(t=>!t.data)),W4=Q([su],X4,{memoizeOptions:{resultEqualityCheck:Mp}}),Z4=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},Ew=Q([W4,Nd],Z4),DV=(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})),J4=(e,t,r,n,i,o)=>{var{chartData:l=[],dataStartIndex:c,dataEndIndex:f}=n,h=DV(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var p=l.slice(c,f+1),g=p.map(y=>({value:Ot(y,t.dataKey)})).filter(y=>y.value!=null);return[...g,...h]}return h},Cd=Q([Ew,Tr,su,Nd,MV,W4],J4);function _l(e){if(ca(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function LC(e){if(Array.isArray(e)){var t=[_l(e[0]),_l(e[1])];return oa(t)?t:void 0}var r=_l(e);if(r!=null)return[r,r]}function ha(e){return e.map(_l).filter(Ur)}function kV(e,t){var r=_l(e),n=_l(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var LV=Q([Cd],e=>e==null?void 0:e.map(t=>t.value).sort(kV));function eD(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function IV(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!ua(t))n=t;else if(Array.isArray(t)){var i=ha(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:ha(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 Ut=e=>{var t=Xt(e),r=au(e);return Td(e,t,r)},Xl=Q([Ut],e=>e==null?void 0:e.dataKey),$V=Q([V4,Nd,Ut],s4),tD=(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,h=n?[...f].reverse():f,p=h.map(ew);return[c,{stackedData:j7(e,p,r),graphicalItems:h}]}))},_b=Q([$V,V4,Op,J3],tD),rD=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(n==null&&r!=="zAxis"){var l=O7(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},zV=Q([Tr],e=>e.allowDataOverflow),Aw=e=>{var t;if(e==null||!("domain"in e))return Nb;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=ha(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:Nb},nD=Q([Tr],Aw),aD=Q([nD,zV],B3),BV=Q([_b,Fn,Qt,aD],rD,{memoizeOptions:{resultEqualityCheck:Rp}}),Tw=e=>e.errorBars,UV=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>eD(r,n)),Rm=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]}},iD=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(h=>{var p,g=h.data!=null?[...h.data]:l,y=(p=i[h.id])===null||p===void 0?void 0:p.filter(x=>eD(o,x));g.forEach(x=>{var b,w=Ot(x,(b=r.dataKey)!==null&&b!==void 0?b:h.dataKey),N=IV(x,w,y);if(N.length>=2){var _=Math.min(...N),E=Math.max(...N);(c==null||_<c)&&(c=_),(f==null||E>f)&&(f=E)}var T=LC(w);T!=null&&(c=c==null?T[0]:Math.min(c,T[0]),f=f==null?T[1]:Math.max(f,T[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=LC(Ot(h,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]},qV=Q([Ew,Tr,RV,Tw,Qt,CK],iD,{memoizeOptions:{resultEqualityCheck:Rp}});function HV(e){var{value:t}=e;if(ca(t)||t instanceof Date)return t}var FV=(e,t,r)=>{var n=e.map(HV).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&pM(n))?z3(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},sD=e=>e.referenceElements.dots,ou=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),KV=Q([sD,Qt,Cp],ou),oD=e=>e.referenceElements.areas,GV=Q([oD,Qt,Cp],ou),lD=e=>e.referenceElements.lines,YV=Q([lD,Qt,Cp],ou),uD=(e,t)=>{if(e!=null){var r=ha(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},VV=Q(KV,Qt,uD),cD=(e,t)=>{if(e!=null){var r=ha(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)]}},QV=Q([GV,Qt],cD);function XV(e){var t;if(e.x!=null)return ha([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:ha(r)}function WV(e){var t;if(e.y!=null)return ha([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:ha(r)}var dD=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?XV(n):WV(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},ZV=Q([YV,Qt],dD),JV=Q(VV,ZV,QV,(e,t,r)=>Rm(e,r,t)),fD=(e,t,r,n,i,o,l,c)=>{if(r!=null)return r;var f=l==="vertical"&&c==="xAxis"||l==="horizontal"&&c==="yAxis",h=f?Rm(n,o,i):Rm(o,i);return RK(t,h,e.allowDataOverflow)},eQ=Q([Tr,nD,aD,BV,qV,JV,We,Qt],fD,{memoizeOptions:{resultEqualityCheck:Rp}}),tQ=[0,1],hD=(e,t,r,n,i,o,l)=>{if(!((e==null||r==null||r.length===0)&&l===void 0)){var{dataKey:c,type:f}=e,h=Xa(t,o);if(h&&c==null){var p;return z3(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?FV(n,e,h):i==="expand"&&!h?tQ:l}},Cw=Q([Tr,We,Ew,Cd,Op,Qt,eQ],hD),lu=Q([Tr,K4,Vj],U4),mD=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=Aw(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&oa(e)){if(o)return GT(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return YT(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&oa(e))return GT(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&oa(e))return YT(e,t.tickCount,t.allowDecimals,"adaptive")}}},Pw=Q([Cw,Td,lu],mD),pD=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&oa(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],h=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(l,c),Math.max(f,h)]}return t},rQ=Q([Tr,Cw,Pw,Qt],pD),nQ=Q(Cd,Tr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ha(e.map(g=>g.value))).sort((g,y)=>g-y),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],h=n[c+1];if(!(f==null||h==null)){var p=h-f;r=Math.min(r,p)}}return r/l}}),gD=Q(nQ,We,Z3,Vt,(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=Bn(r,e*o),c=e*o/2;return c-l-(c-l)/o*l}return 0}),aQ=(e,t,r)=>{var n=ei(e,t);return n==null||typeof n.padding!="string"?0:gD(e,"xAxis",t,r,n.padding)},iQ=(e,t,r)=>{var n=ti(e,t);return n==null||typeof n.padding!="string"?0:gD(e,"yAxis",t,r,n.padding)},sQ=Q(ei,aQ,(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}}),oQ=Q(ti,iQ,(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}}),lQ=Q([Vt,sQ,xp,vp,(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]}),uQ=Q([Vt,We,oQ,xp,vp,(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]}),Pd=(e,t,r,n)=>{var i;switch(t){case"xAxis":return lQ(e,r,n);case"yAxis":return uQ(e,r,n);case"zAxis":return(i=Ow(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return n4(e);case"radiusAxis":return a4(e,r);default:return}},yD=Q([Tr,Pd],Ep),cQ=Q([lu,rQ],GK),Rw=Q([Tr,lu,cQ,yD],_w),vD=(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)}},Mw=Q([We,Cd,Td,Qt],vD),Up=Q([Rw],tw);Q([Rw],_V);Q([Rw,LV],q4);Q([su,Tw,Qt],UV);function xD(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var qp=(e,t)=>t,Hp=(e,t,r)=>r,dQ=Q(gp,qp,Hp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(xD)),fQ=Q(yp,qp,Hp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(xD)),bD=(e,t)=>({width:e.width,height:t.height}),hQ=(e,t)=>{var r=typeof t.width=="number"?t.width:bd;return{width:r,height:e.height}},jD=Q(Vt,ei,bD),mQ=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},pQ=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},gQ=Q(Za,Vt,dQ,qp,Hp,(e,t,r,n,i)=>{var o={},l;return r.forEach(c=>{var f=bD(t,c);l==null&&(l=mQ(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;o[c.id]=l-Number(h)*f.height,l+=(h?-1:1)*f.height}),o}),yQ=Q(Wa,Vt,fQ,qp,Hp,(e,t,r,n,i)=>{var o={},l;return r.forEach(c=>{var f=hQ(t,c);l==null&&(l=pQ(t,n,e));var h=n==="left"&&!i||n==="right"&&i;o[c.id]=l-Number(h)*f.width,l+=(h?-1:1)*f.width}),o}),vQ=(e,t)=>{var r=ei(e,t);if(r!=null)return gQ(e,r.orientation,r.mirror)},xQ=Q([Vt,ei,vQ,(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}}}),bQ=(e,t)=>{var r=ti(e,t);if(r!=null)return yQ(e,r.orientation,r.mirror)},jQ=Q([Vt,ti,bQ,(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}}}),wD=Q(Vt,ti,(e,t)=>{var r=typeof t.width=="number"?t.width:bd;return{width:r,height:e.height}}),IC=(e,t,r)=>{switch(t){case"xAxis":return jD(e,r).width;case"yAxis":return wD(e,r).height;default:return}},SD=(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),h=f.filter(p=>p!=null);if(l&&c&&o==="category"&&i&&pM(h))return f}},Dw=Q([We,Cd,Tr,Qt],SD),$C=Q([We,CV,lu,Up,Dw,Mw,Pd,Pw,Qt],(e,t,r,n,i,o,l,c,f)=>{if(t!=null){var h=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:h,niceTicks:c,range:l,realScaleType:r,scale:n}}}),wQ=(e,t,r,n,i,o,l,c,f)=>{if(!(t==null||n==null)){var h=Xa(e,f),{type:p,ticks:g,tickCount:y}=t,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,b=p==="category"&&n.bandwidth?n.bandwidth()/x:0;b=f==="angleAxis"&&o!=null&&o.length>=2?Br(o[0]-o[1])*2*b:b;var w=g||i;return w?w.map((N,_)=>{var E=l?l.indexOf(N):N,T=n.map(E);return Be(T)?{index:_,coordinate:T+b,value:N,offset:b}:null}).filter(Ur):h&&c?c.map((N,_)=>{var E=n.map(N);return Be(E)?{coordinate:E+b,value:N,index:_,offset:b}:null}).filter(Ur):n.ticks?n.ticks(y).map((N,_)=>{var E=n.map(N);return Be(E)?{coordinate:E+b,value:N,index:_,offset:b}:null}).filter(Ur):n.domain().map((N,_)=>{var E=n.map(N);return Be(E)?{coordinate:E+b,value:l?l[N]:N,index:_,offset:b}:null}).filter(Ur)}},ND=Q([We,Td,lu,Up,Pw,Pd,Dw,Mw,Qt],wQ),SQ=(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,h=0;return h=l==="angleAxis"&&(n==null?void 0:n.length)>=2?Br(n[0]-n[1])*2*h:h,c&&o?o.map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+h,value:p,index:g,offset:h}:null}).filter(Ur):r.ticks?r.ticks(f).map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+h,value:p,index:g,offset:h}:null}).filter(Ur):r.domain().map((p,g)=>{var y=r.map(p);return Be(y)?{coordinate:y+h,value:i?i[p]:p,index:g,offset:h}:null}).filter(Ur)}},Ji=Q([We,Td,Up,Pd,Dw,Mw,Qt],SQ),es=Q(Tr,Up,(e,t)=>{if(!(e==null||t==null))return Pm(Pm({},e),{},{scale:t})}),NQ=Q([Tr,lu,Cw,yD],_w),_Q=Q([NQ],tw);Q((e,t,r)=>Ow(e,r),_Q,(e,t)=>{if(!(e==null||t==null))return Pm(Pm({},e),{},{scale:t})});var OQ=Q([We,gp,yp],(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}}),EQ=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};Q([EQ],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 _D=e=>e.options.defaultTooltipEventType,OD=e=>e.options.validateTooltipEventTypes;function ED(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Rd(e,t){var r=_D(e),n=OD(e);return ED(t,r,n)}function AQ(e){return ve(t=>Rd(t,e))}var AD=(e,t)=>{var r,n=Number(t);if(!(ua(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},TQ=e=>e.tooltip.settings,ki={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},CQ={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}},TD=br({name:"tooltip",initialState:CQ,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ot()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=_n(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:ot()},removeTooltipEntrySettings:{reducer(e,t){var r=_n(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:PQ,replaceTooltipEntrySettings:RQ,removeTooltipEntrySettings:MQ,setTooltipSettingsState:DQ,setActiveMouseOverItemIndex:CD,mouseLeaveItem:kQ,mouseLeaveChart:PD,setActiveClickItemIndex:LQ,setMouseOverAxisIndex:RD,setMouseClickAxisIndex:IQ,setSyncInteraction:Nc,setKeyboardInteraction:Mm}=TD.actions,$Q=TD.reducer;function zC(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 yh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zC(Object(r),!0).forEach(function(n){zQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zQ(e,t,r){return(t=BQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BQ(e){var t=UQ(e,"string");return typeof t=="symbol"?t:t+""}function UQ(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 qQ(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function HQ(e){return e.index!=null}var MD=(e,t,r,n)=>{if(t==null)return ki;var i=qQ(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(HQ(i)){if(o)return yh(yh({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return yh(yh({},ki),{},{coordinate:i.coordinate})};function FQ(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 KQ(e,t){var r=FQ(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 GQ(e,t,r){if(r==null||t==null)return!0;var n=Ot(e,t);return n==null||!oa(r)?!0:KQ(n,r)}var Oc=(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)),h=t[f];return h==null||GQ(h,r,n)?String(f):null},DD=(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 h=i==null?void 0:i[Number(o)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},kD=(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})},LD=e=>e.options.tooltipPayloadSearcher,uu=e=>e.tooltip;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 UC(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){YQ(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 YQ(e,t,r){return(t=VQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VQ(e){var t=QQ(e,"string");return typeof t=="symbol"?t:t+""}function QQ(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 XQ(e){if(typeof e=="string"||typeof e=="number")return e}function WQ(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function ZQ(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function qC(e){if(typeof e=="string")return e}function JQ(e){if(!(e==null||typeof e!="object")){var t="name"in e?XQ(e.name):void 0,r="unit"in e?WQ(e.unit):void 0,n="dataKey"in e?ZQ(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?qC(e.color):void 0,l="fill"in e?qC(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:l}}}function eX(e,t){return e??t}var ID=(e,t,r,n,i,o,l)=>{if(!(t==null||o==null)){var{chartData:c,computedData:f,dataStartIndex:h,dataEndIndex:p}=r,g=[];return e.reduce((y,x)=>{var b,{dataDefinedOnItem:w,settings:N}=x,_=eX(w,c),E=Array.isArray(_)?c3(_,h,p):_,T=(b=N==null?void 0:N.dataKey)!==null&&b!==void 0?b:n,A=N==null?void 0:N.nameKey,C;if(n&&Array.isArray(E)&&!Array.isArray(E[0])&&l==="axis"?C=gM(E,n,i):C=o(E,t,f,A),Array.isArray(C))C.forEach(D=>{var M,$,I=JQ(D),F=I==null?void 0:I.name,H=I==null?void 0:I.dataKey,ie=I==null?void 0:I.payload,Z=UC(UC({},N),{},{name:F,unit:I==null?void 0:I.unit,color:(M=I==null?void 0:I.color)!==null&&M!==void 0?M:N==null?void 0:N.color,fill:($=I==null?void 0:I.fill)!==null&&$!==void 0?$:N==null?void 0:N.fill});y.push(DA({tooltipEntrySettings:Z,dataKey:H,payload:ie,value:Ot(ie,H),name:F==null?void 0:String(F)}))});else{var R;y.push(DA({tooltipEntrySettings:N,dataKey:T,payload:C,value:Ot(C,T),name:(R=Ot(C,A))!==null&&R!==void 0?R:N==null?void 0:N.name}))}return y},g)}},kw=Q([Ut,K4,Vj],U4),tX=Q([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),rX=Q([Xt,au],G4),vo=Q([tX,Ut,rX],Y4,{memoizeOptions:{resultEqualityCheck:Mp}}),nX=Q([vo],e=>e.filter(Pp)),$D=Q([vo],X4,{memoizeOptions:{resultEqualityCheck:Mp}}),aX=Q([vo],e=>e.some(t=>!t.data)),oo=Q([$D,Fn],Z4),iX=Q([nX,Fn,Ut],s4),Lw=Q([oo,Ut,vo,Fn,aX,$D],J4),zD=Q([Ut],Aw),sX=Q([Ut],e=>e.allowDataOverflow),BD=Q([zD,sX],B3),oX=Q([vo],e=>e.filter(Pp)),lX=Q([iX,oX,Op,J3],tD),uX=Q([lX,Fn,Xt,BD],rD),cX=Q([vo],Q4),dX=Q([oo,Ut,cX,Tw,Xt,PK],iD,{memoizeOptions:{resultEqualityCheck:Rp}}),fX=Q([sD,Xt,au],ou),hX=Q([fX,Xt],uD),mX=Q([oD,Xt,au],ou),pX=Q([mX,Xt],cD),gX=Q([lD,Xt,au],ou),yX=Q([gX,Xt],dD),vX=Q([hX,yX,pX],Rm),xX=Q([Ut,zD,BD,uX,dX,vX,We,Xt],fD),Wl=Q([Ut,We,oo,Lw,Op,Xt,xX],hD),bX=Q([Wl,Ut,kw],mD),jX=Q([Ut,Wl,bX,Xt],pD),UD=e=>{var t=Xt(e),r=au(e),n=!1;return Pd(e,t,r,n)},qD=Q([Ut,UD],Ep),wX=Q([Ut,kw,jX,qD],_w),HD=Q([wX],tw),SX=Q([We,Lw,Ut,Xt],SD),NX=Q([We,Lw,Ut,Xt],vD),_X=(e,t,r,n,i,o,l,c)=>{if(t){var{type:f}=t,h=Xa(e,c);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,g=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return g=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?Br(i[0]-i[1])*2*g:g,h&&l?l.map((y,x)=>{var b=n.map(y);return Be(b)?{coordinate:b+g,value:y,index:x,offset:g}:null}).filter(Ur):n.domain().map((y,x)=>{var b=n.map(y);return Be(b)?{coordinate:b+g,value:o?o[y]:y,index:x,offset:g}:null}).filter(Ur)}}},ri=Q([We,Ut,kw,HD,UD,SX,NX,Xt],_X),Iw=Q([_D,OD,TQ],(e,t,r)=>ED(r.shared,e,t)),FD=e=>e.tooltip.settings.trigger,$w=e=>e.tooltip.settings.defaultIndex,Md=Q([uu,Iw,FD,$w],MD),lo=Q([Md,oo,Xl,Wl],Oc),KD=Q([ri,lo],AD),GD=Q([Md],e=>{if(e)return e.dataKey}),OX=Q([Md],e=>{if(e)return e.graphicalItemId}),YD=Q([uu,Iw,FD,$w],kD),EX=Q([Wa,Za,We,Vt,ri,$w,YD],DD),AX=Q([Md,EX],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),TX=Q([Md],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),CX=Q([YD,lo,Fn,Xl,KD,LD,Iw],ID),PX=Q([CX],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});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 FC(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){RX(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 RX(e,t,r){return(t=MX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MX(e){var t=DX(e,"string");return typeof t=="symbol"?t:t+""}function DX(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 kX=()=>ve(Ut),LX=()=>{var e=kX(),t=ve(ri),r=ve(HD);return Fl(!e||!r?void 0:FC(FC({},e),{},{scale:r}),t)};function KC(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?KC(Object(r),!0).forEach(function(n){IX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):KC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IX(e,t,r){return(t=$X(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $X(e){var t=zX(e,"string");return typeof t=="symbol"?t:t+""}function zX(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 BX=(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}},UX=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var o=i.coordinate,{radius:l}=n;return dl(dl(dl({},n),lr(n.cx,n.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,{angle:f}=n;return dl(dl(dl({},n),lr(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 qX(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 VD=(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,h,p,g,y,x=c>0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(h=r[l-1])===null||h===void 0?void 0:h.coordinate,b=(p=r[c])===null||p===void 0?void 0:p.coordinate,w=c>=l-1?(g=r[0])===null||g===void 0?void 0:g.coordinate:(y=r[c+1])===null||y===void 0?void 0:y.coordinate,N=void 0;if(!(x==null||b==null||w==null))if(Br(b-x)!==Br(w-b)){var _=[];if(Br(w-b)===Br(i[1]-i[0])){N=w;var E=b+i[1]-i[0];_[0]=Math.min(E,(E+x)/2),_[1]=Math.max(E,(E+x)/2)}else{N=x;var T=w+i[1]-i[0];_[0]=Math.min(b,(T+b)/2),_[1]=Math.max(b,(T+b)/2)}var A=[Math.min(b,(N+b)/2),Math.max(b,(N+b)/2)];if(e>A[0]&&e<=A[1]||e>=_[0]&&e<=_[1]){var C;return(C=r[c])===null||C===void 0?void 0:C.index}}else{var R=Math.min(x,w),D=Math.max(x,w);if(e>(R+b)/2&&e<=(D+b)/2){var M;return(M=r[c])===null||M===void 0?void 0:M.index}}}else if(t)for(var $=0;$<l;$++){var I=t[$];if(I!=null){var F=t[$+1],H=t[$-1];if($===0&&F!=null&&e<=(I.coordinate+F.coordinate)/2||$===l-1&&H!=null&&e>(I.coordinate+H.coordinate)/2||$>0&&$<l-1&&H!=null&&F!=null&&e>(I.coordinate+H.coordinate)/2&&e<=(I.coordinate+F.coordinate)/2)return I.index}}return-1},HX=()=>ve(Vj),zw=(e,t)=>t,QD=(e,t,r)=>r,Bw=(e,t,r,n)=>n,FX=Q(ri,e=>ip(e,t=>t.coordinate)),Uw=Q([uu,zw,QD,Bw],MD),qw=Q([Uw,oo,Xl,Wl],Oc),KX=(e,t,r)=>{if(t!=null){var n=uu(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},XD=Q([uu,zw,QD,Bw],kD),Dm=Q([Wa,Za,We,Vt,ri,Bw,XD],DD),GX=Q([Uw,Dm],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),WD=Q([ri,qw],AD),YX=Q([XD,qw,Fn,Xl,WD,LD,zw],ID),VX=Q([Uw,qw],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),QX=(e,t,r,n,i,o,l)=>{if(!(!e||!r||!n||!i)&&qX(e,l)){var c=E7(e,t),f=VD(c,o,i,r,n),h=BX(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},XX=(e,t,r,n,i,o,l)=>{if(!(!e||!n||!i||!o||!r)){var c=xK(e,r);if(c){var f=A7(c,t),h=VD(f,l,o,n,i),p=UX(t,o,h,c);return{activeIndex:String(h),activeCoordinate:p}}}},WX=(e,t,r,n,i,o,l,c)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?QX(e,t,n,i,o,l,c):XX(e,t,r,n,i,o,l)},ZX=Q(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}}),JX=Q(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Gt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:KK}});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 YC(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){eW(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 eW(e,t,r){return(t=tW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tW(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)}var nW={},aW={zIndexMap:Object.values(Gt).reduce((e,t)=>YC(YC({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),nW)},iW=new Set(Object.values(Gt));function sW(e){return iW.has(e)}var ZD=br({name:"zIndex",initialState:aW,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&&!sW(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:oW,unregisterZIndexPortal:Z0,registerZIndexPortalElement:lW,unregisterZIndexPortalElement:uW}=ZD.actions,cW=ZD.reducer;function Tn(e){var{zIndex:t,children:r}=e,n=oH(),i=n&&t!==void 0&&t!==0,o=jr(),l=S.useRef(void 0),c=S.useRef(new Set),f=ct(),h=ve(g=>ZX(g,t,o));if(S.useLayoutEffect(()=>{if(!i){var g=c.current;g.forEach(x=>{f(Z0({zIndex:x}))}),g.clear(),l.current=void 0;return}if(c.current.has(t)||(f(oW({zIndex:t})),c.current.add(t)),h){l.current=h;var y=c.current;y.forEach(x=>{x!==t&&(f(Z0({zIndex:x})),y.delete(x))})}},[f,t,i,h]),S.useLayoutEffect(()=>{var g=c.current;return()=>{g.forEach(y=>{f(Z0({zIndex:y}))}),g.clear()}},[f]),!i)return r;var p=h??l.current;return p?Qm.createPortal(r,p):null}function Ob(){return Ob=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},Ob.apply(null,arguments)}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 vh(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){dW(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 dW(e,t,r){return(t=fW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fW(e){var t=hW(e,"string");return typeof t=="symbol"?t:t+""}function hW(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 mW(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function pW(e){var t,{coordinate:r,payload:n,index:i,offset:o,tooltipAxisBandSize:l,layout:c,cursor:f,tooltipEventType:h,chartName:p}=e,g=r,y=n,x=i;if(!f||!g||p!=="ScatterChart"&&h!=="axis")return null;var b,w,N;if(p==="ScatterChart")b=g,w=MF,N=Gt.cursorLine;else if(p==="BarChart")b=DF(c,g,o,l),w=k3,N=Gt.cursorRectangle;else if(c==="radial"&&vM(g)){var{cx:_,cy:E,radius:T,startAngle:A,endAngle:C}=L3(g);b={cx:_,cy:E,startAngle:A,endAngle:C,innerRadius:T,outerRadius:T},w=$3,N=Gt.cursorLine}else b={points:SK(c,g,o)},w=C3,N=Gt.cursorLine;var R=typeof f=="object"&&"className"in f?f.className:void 0,D=vh(vh(vh(vh({stroke:"#ccc",pointerEvents:"none"},o),b),gd(f)),{},{payload:y,payloadIndex:x,className:Xe("recharts-tooltip-cursor",R)});return S.createElement(Tn,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:N},S.createElement(mW,{cursor:f,cursorComp:w,cursorProps:D}))}function gW(e){var t=LX(),r=y3(),n=po(),i=HX();return t==null||r==null||n==null||i==null?null:S.createElement(pW,Ob({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var JD=S.createContext(null),yW=()=>S.useContext(JD),J0={exports:{}},QC;function vW(){return QC||(QC=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,h,p){this.fn=f,this.context=h,this.once=p||!1}function o(f,h,p,g,y){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,g||f,y),b=r?r+h:h;return f._events[b]?f._events[b].fn?f._events[b]=[f._events[b],x]:f._events[b].push(x):(f._events[b]=x,f._eventsCount++),f}function l(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],p,g;if(this._eventsCount===0)return h;for(g in p=this._events)t.call(p,g)&&h.push(r?g.slice(1):g);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},c.prototype.listeners=function(h){var p=r?r+h:h,g=this._events[p];if(!g)return[];if(g.fn)return[g.fn];for(var y=0,x=g.length,b=new Array(x);y<x;y++)b[y]=g[y].fn;return b},c.prototype.listenerCount=function(h){var p=r?r+h:h,g=this._events[p];return g?g.fn?1:g.length:0},c.prototype.emit=function(h,p,g,y,x,b){var w=r?r+h:h;if(!this._events[w])return!1;var N=this._events[w],_=arguments.length,E,T;if(N.fn){switch(N.once&&this.removeListener(h,N.fn,void 0,!0),_){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,g),!0;case 4:return N.fn.call(N.context,p,g,y),!0;case 5:return N.fn.call(N.context,p,g,y,x),!0;case 6:return N.fn.call(N.context,p,g,y,x,b),!0}for(T=1,E=new Array(_-1);T<_;T++)E[T-1]=arguments[T];N.fn.apply(N.context,E)}else{var A=N.length,C;for(T=0;T<A;T++)switch(N[T].once&&this.removeListener(h,N[T].fn,void 0,!0),_){case 1:N[T].fn.call(N[T].context);break;case 2:N[T].fn.call(N[T].context,p);break;case 3:N[T].fn.call(N[T].context,p,g);break;case 4:N[T].fn.call(N[T].context,p,g,y);break;default:if(!E)for(C=1,E=new Array(_-1);C<_;C++)E[C-1]=arguments[C];N[T].fn.apply(N[T].context,E)}}return!0},c.prototype.on=function(h,p,g){return o(this,h,p,g,!1)},c.prototype.once=function(h,p,g){return o(this,h,p,g,!0)},c.prototype.removeListener=function(h,p,g,y){var x=r?r+h:h;if(!this._events[x])return this;if(!p)return l(this,x),this;var b=this._events[x];if(b.fn)b.fn===p&&(!y||b.once)&&(!g||b.context===g)&&l(this,x);else{for(var w=0,N=[],_=b.length;w<_;w++)(b[w].fn!==p||y&&!b[w].once||g&&b[w].context!==g)&&N.push(b[w]);N.length?this._events[x]=N.length===1?N[0]:N:l(this,x)}return this},c.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,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})(J0)),J0.exports}var xW=vW();const bW=rs(xW);var ed=new bW,Eb="recharts.syncEvent.tooltip",XC="recharts.syncEvent.brush",ek=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!ua(r))return e[r]}},jW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},tk=br({name:"options",initialState:jW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),wW=tk.reducer,{createEventEmitter:SW}=tk.actions;function NW(e){return e.tooltip.syncInteraction}var _W={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},rk=br({name:"chartData",initialState:_W,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:WC,setDataStartEndIndexes:OW,setComputedData:ile}=rk.actions,EW=rk.reducer,AW=["x","y"];function ZC(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?ZC(Object(r),!0).forEach(function(n){TW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TW(e,t,r){return(t=CW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CW(e){var t=PW(e,"string");return typeof t=="symbol"?t:t+""}function PW(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=MW(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 MW(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 DW(){var e=ve(Qj),t=ve(Xj),r=ct(),n=ve(e4),i=ve(ri),o=po(),l=bp(),c=ve(f=>f.rootProps.className);S.useEffect(()=>{if(e==null)return mo;var f=(h,p,g)=>{if(t!==g&&e===h){if(p.payload.active===!1){r(Nc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var y;if(l&&p!==null&&p!==void 0&&(y=p.payload)!==null&&y!==void 0&&y.coordinate&&p.payload.sourceViewBox){var x=p.payload.coordinate,{x:b,y:w}=x,N=RW(x,AW),{x:_,y:E,width:T,height:A}=p.payload.sourceViewBox,C=fl(fl({},N),{},{x:l.x+(T?(b-_)/T:0)*l.width,y:l.y+(A?(w-E)/A:0)*l.height});r(fl(fl({},p),{},{payload:fl(fl({},p.payload),{},{coordinate:C})}))}else r(p);return}if(i!=null){var R;if(typeof n=="function"){var D={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},M=n(i,D);R=i[M]}else n==="value"&&(R=i.find(k=>String(k.value)===p.payload.label));var{coordinate:$}=p.payload;if($==null||l==null){r(Nc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(R==null){r(Nc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:I,y:F}=$,H=Math.min(I,l.x+l.width),ie=Math.min(F,l.y+l.height),Z={x:o==="horizontal"?R.coordinate:H,y:o==="horizontal"?ie:R.coordinate},G=Nc({active:p.payload.active,coordinate:Z,dataKey:p.payload.dataKey,index:String(R.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(G)}}};return ed.on(Eb,f),()=>{ed.off(Eb,f)}},[c,r,t,e,n,i,o,l])}function kW(){var e=ve(Qj),t=ve(Xj),r=ct();S.useEffect(()=>{if(e==null)return mo;var n=(i,o,l)=>{t!==l&&e===i&&r(OW(o))};return ed.on(XC,n),()=>{ed.off(XC,n)}},[r,t,e])}function LW(){var e=ct();S.useEffect(()=>{e(SW())},[e]),DW(),kW()}function IW(e,t,r,n,i,o){var l=ve(b=>KX(b,e,t)),c=ve(OX),f=ve(Xj),h=ve(Qj),p=ve(e4),g=ve(NW),y=(g==null?void 0:g.sourceViewBox)!=null,x=bp();S.useEffect(()=>{if(!y&&h!=null&&f!=null){var b=Nc({active:o,coordinate:r,dataKey:l,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:c});ed.emit(Eb,h,b,f)}},[y,r,l,c,i,n,f,h,p,o,x])}function JC(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 eP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?JC(Object(r),!0).forEach(function(n){$W(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):JC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $W(e,t,r){return(t=zW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zW(e){var t=BW(e,"string");return typeof t=="symbol"?t:t+""}function BW(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 UW(e){return e.dataKey}function qW(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(lF,t)}var tP=[],HW={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 Hw(e){var t,r,n=fr(e,HW),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:c,content:f,filterNull:h,isAnimationActive:p,offset:g,payloadUniqBy:y,position:x,reverseDirection:b,useTranslate3d:w,wrapperStyle:N,cursor:_,shared:E,trigger:T,defaultIndex:A,portal:C,axisId:R}=n,D=ct(),M=typeof A=="number"?String(A):A;S.useEffect(()=>{D(DQ({shared:E,trigger:T,axisId:R,active:i,defaultIndex:M}))},[D,E,T,R,i,M]);var $=bp(),I=T3(),F=AQ(E),{activeIndex:H,isActive:ie}=(t=ve(_e=>VX(_e,F,T,M)))!==null&&t!==void 0?t:{},Z=ve(_e=>YX(_e,F,T,M)),G=ve(_e=>WD(_e,F,T,M)),k=ve(_e=>GX(_e,F,T,M)),q=Z,J=yW(),re=(r=i??ie)!==null&&r!==void 0?r:!1,[oe,L]=DM([q,re]),X=F==="axis"?G:void 0;IW(F,T,k,X,H,re);var le=C??J;if(le==null||$==null||F==null)return null;var ue=q??tP;re||(ue=tP),h&&ue.length&&(ue=TM(ue.filter(_e=>_e.value!=null&&(_e.hide!==!0||n.includeHidden)),y,UW));var pe=ue.length>0,xe=eP(eP({},n),{},{payload:ue,label:X,active:re,activeIndex:H,coordinate:k,accessibilityLayer:I}),we=S.createElement(xF,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:re,coordinate:k,hasPayload:pe,offset:g,position:x,reverseDirection:b,useTranslate3d:w,viewBox:$,wrapperStyle:N,lastBoundingBox:oe,innerRef:L,hasPortalFromProps:!!C},qW(f,xe));return S.createElement(S.Fragment,null,Qm.createPortal(we,le),re&&S.createElement(gW,{cursor:_,tooltipEventType:F,coordinate:k,payload:ue,index:H}))}var Fw=e=>null;Fw.displayName="Cell";function FW(e,t,r){return(t=KW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KW(e){var t=GW(e,"string");return typeof t=="symbol"?t:t+""}function GW(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 YW{constructor(t){FW(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 rP(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 VW(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rP(Object(r),!0).forEach(function(n){QW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QW(e,t,r){return(t=XW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XW(e){var t=WW(e,"string");return typeof t=="symbol"?t:t+""}function WW(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 ZW={cacheSize:2e3,enableCache:!0},nk=VW({},ZW),nP=new YW(nk.cacheSize),JW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},aP="recharts_measurement_span";function eZ(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 iP=(e,t)=>{try{var r=document.getElementById(aP);r||(r=document.createElement("span"),r.setAttribute("id",aP),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,JW,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Ec=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Sd.isSsr)return{width:0,height:0};if(!nk.enableCache)return iP(t,r);var n=eZ(t,r),i=nP.get(n);if(i)return i;var o=iP(t,r);return nP.set(n,o),o},ak;function tZ(e,t,r){return(t=rZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rZ(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 sP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,oP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,aZ=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,iZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,sZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},oZ=["cm","mm","pt","pc","in","Q","px"];function lZ(e){return oZ.includes(e)}var jl="NaN";function uZ(e,t){return e*sZ[t]}class sr{static parse(t){var r,[,n,i]=(r=iZ.exec(t))!==null&&r!==void 0?r:[];return n==null?sr.NaN:new sr(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,ua(t)&&(this.unit=""),r!==""&&!aZ.test(r)&&(this.num=NaN,this.unit=""),lZ(r)&&(this.num=uZ(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new sr(NaN,""):new sr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new sr(NaN,""):new sr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new sr(NaN,""):new sr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new sr(NaN,""):new sr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ua(this.num)}}ak=sr;tZ(sr,"NaN",new ak(NaN,""));function ik(e){if(e==null||e.includes(jl))return jl;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,o]=(r=sP.exec(t))!==null&&r!==void 0?r:[],l=sr.parse(n??""),c=sr.parse(o??""),f=i==="*"?l.multiply(c):l.divide(c);if(f.isNaN())return jl;t=t.replace(sP,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,p,g,y]=(h=oP.exec(t))!==null&&h!==void 0?h:[],x=sr.parse(p??""),b=sr.parse(y??""),w=g==="+"?x.add(b):x.subtract(b);if(w.isNaN())return jl;t=t.replace(oP,w.toString())}return t}var lP=/\(([^()]*)\)/;function cZ(e){for(var t=e,r;(r=lP.exec(t))!=null;){var[,n]=r;t=t.replace(lP,ik(n))}return t}function dZ(e){var t=e.replace(/\s+/g,"");return t=cZ(t),t=ik(t),t}function fZ(e){try{return dZ(e)}catch{return jl}}function ex(e){var t=fZ(e.slice(5,-1));return t===jl?"":t}var hZ=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],mZ=["dx","dy","angle","className","breakAll"];function Ab(){return Ab=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},Ab.apply(null,arguments)}function uP(e,t){if(e==null)return{};var r,n,i=pZ(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 pZ(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 sk=/[ \f\n\r\t\v\u2028\u2029]+/,ok=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];mt(t)||(r?i=t.toString().split(""):i=t.toString().split(sk));var o=i.map(c=>({word:c,width:Ec(c,n).width})),l=r?0:Ec(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function lk(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function gZ(e){return mt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var uk=(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 h={words:[l],width:c};i.push(h)}return i},[]),ck=e=>e.reduce((t,r)=>t.width>r.width?t:r),yZ="…",cP=(e,t,r,n,i,o,l,c)=>{var f=e.slice(0,t),h=ok({breakAll:r,style:n,children:f+yZ});if(!h)return[!1,[]];var p=uk(h.wordsWithComputedWidth,o,l,c),g=p.length>i||ck(p).width>Number(o);return[g,p]},vZ=(e,t,r,n,i)=>{var{maxLines:o,children:l,style:c,breakAll:f}=e,h=ge(o),p=String(l),g=uk(t,n,r,i);if(!h||i)return g;var y=g.length>o||ck(g).width>Number(n);if(!y)return g;for(var x=0,b=p.length-1,w=0,N;x<=b&&w<=p.length-1;){var _=Math.floor((x+b)/2),E=_-1,[T,A]=cP(p,E,f,c,o,n,r,i),[C]=cP(p,_,f,c,o,n,r,i);if(!T&&!C&&(x=_+1),T&&C&&(b=_-1),!T&&C){N=A;break}w++}return N||g},dP=e=>{var t=mt(e)?[]:e.toString().split(sk);return[{words:t,width:void 0}]},xZ=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:o,maxLines:l}=e;if((t||r)&&!Sd.isSsr){var c,f,h=ok({breakAll:o,children:n,style:i});if(h){var{wordsWithComputedWidth:p,spaceWidth:g}=h;c=p,f=g}else return dP(n);return vZ({breakAll:o,children:n,maxLines:l,style:i},c,f,t,!!r)}return dP(n)},dk="#808080",bZ={angle:0,breakAll:!1,capHeight:"0.71em",fill:dk,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Kw=S.forwardRef((e,t)=>{var r=fr(e,bZ),{x:n,y:i,lineHeight:o,capHeight:l,fill:c,scaleToFit:f,textAnchor:h,verticalAnchor:p}=r,g=uP(r,hZ),y=S.useMemo(()=>xZ({breakAll:g.breakAll,children:g.children,maxLines:g.maxLines,scaleToFit:f,style:g.style,width:g.width}),[g.breakAll,g.children,g.maxLines,f,g.style,g.width]),{dx:x,dy:b,angle:w,className:N,breakAll:_}=g,E=uP(g,mZ);if(!ca(n)||!ca(i)||y.length===0)return null;var T=Number(n)+(ge(x)?x:0),A=Number(i)+(ge(b)?b:0);if(!Be(T)||!Be(A))return null;var C;switch(p){case"start":C=ex("calc(".concat(l,")"));break;case"middle":C=ex("calc(".concat((y.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:C=ex("calc(".concat(y.length-1," * -").concat(o,")"));break}var R=[],D=y[0];if(f&&D!=null){var M=D.width,{width:$}=g;R.push("scale(".concat(ge($)&&ge(M)?$/M:1,")"))}return w&&R.push("rotate(".concat(w,", ").concat(T,", ").concat(A,")")),R.length&&(E.transform=R.join(" ")),S.createElement("text",Ab({},Er(E),{ref:t,x:T,y:A,className:Xe("recharts-text",N),textAnchor:h,fill:c.includes("url")?dk:c}),y.map((I,F)=>{var H=I.words.join(_?"":" ");return S.createElement("tspan",{x:T,dy:F===0?C:o,key:"".concat(H,"-").concat(F)},H)}))});Kw.displayName="Text";function fP(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 Zn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fP(Object(r),!0).forEach(function(n){jZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jZ(e,t,r){return(t=wZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wZ(e){var t=SZ(e,"string");return typeof t=="symbol"?t:t+""}function SZ(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 NZ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:o,y:l,height:c,upperWidth:f,lowerWidth:h}=zj(t),p=o,g=o+(f-h)/2,y=(p+g)/2,x=(f+h)/2,b=p+f/2,w=c>=0?1:-1,N=w*n,_=w>0?"end":"start",E=w>0?"start":"end",T=f>=0?1:-1,A=T*n,C=T>0?"end":"start",R=T>0?"start":"end",D=i;if(r==="top"){var M={x:p+f/2,y:l-N,horizontalAnchor:"middle",verticalAnchor:_};return D&&(M.height=Math.max(l-D.y,0),M.width=f),M}if(r==="bottom"){var $={x:g+h/2,y:l+c+N,horizontalAnchor:"middle",verticalAnchor:E};return D&&($.height=Math.max(D.y+D.height-(l+c),0),$.width=h),$}if(r==="left"){var I={x:y-A,y:l+c/2,horizontalAnchor:C,verticalAnchor:"middle"};return D&&(I.width=Math.max(I.x-D.x,0),I.height=c),I}if(r==="right"){var F={x:y+x+A,y:l+c/2,horizontalAnchor:R,verticalAnchor:"middle"};return D&&(F.width=Math.max(D.x+D.width-F.x,0),F.height=c),F}var H=D?{width:x,height:c}:{};return r==="insideLeft"?Zn({x:y+A,y:l+c/2,horizontalAnchor:R,verticalAnchor:"middle"},H):r==="insideRight"?Zn({x:y+x-A,y:l+c/2,horizontalAnchor:C,verticalAnchor:"middle"},H):r==="insideTop"?Zn({x:p+f/2,y:l+N,horizontalAnchor:"middle",verticalAnchor:E},H):r==="insideBottom"?Zn({x:g+h/2,y:l+c-N,horizontalAnchor:"middle",verticalAnchor:_},H):r==="insideTopLeft"?Zn({x:p+A,y:l+N,horizontalAnchor:R,verticalAnchor:E},H):r==="insideTopRight"?Zn({x:p+f-A,y:l+N,horizontalAnchor:C,verticalAnchor:E},H):r==="insideBottomLeft"?Zn({x:g+A,y:l+c-N,horizontalAnchor:R,verticalAnchor:_},H):r==="insideBottomRight"?Zn({x:g+h-A,y:l+c-N,horizontalAnchor:C,verticalAnchor:_},H):r&&typeof r=="object"&&(ge(r.x)||ro(r.x))&&(ge(r.y)||ro(r.y))?Zn({x:o+Bn(r.x,x),y:l+Bn(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},H):Zn({x:b,y:l+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},H)},_Z=["labelRef"],OZ=["content"];function hP(e,t){if(e==null)return{};var r,n,i=EZ(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 EZ(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 mP(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?mP(Object(r),!0).forEach(function(n){AZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AZ(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 $a(){return $a=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},$a.apply(null,arguments)}var fk=S.createContext(null),PZ=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(fk.Provider,{value:f},c)},hk=()=>{var e=S.useContext(fk),t=bp();return e||(t?zj(t):void 0)},RZ=S.createContext(null),MZ=()=>{var e=S.useContext(RZ),t=ve(i4);return e||t},DZ=e=>{var{value:t,formatter:r}=e,n=mt(e.children)?t:e.children;return typeof r=="function"?r(n):n},Gw=e=>e!=null&&typeof e=="function",kZ=(e,t)=>{var r=Br(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:h,outerRadius:p,startAngle:g,endAngle:y,clockWise:x}=i,b=(h+p)/2,w=kZ(g,y),N=w>=0?1:-1,_,E;switch(t){case"insideStart":_=g+N*o,E=x;break;case"insideEnd":_=y-N*o,E=!x;break;case"end":_=y+N*o,E=x;break;default:throw new Error("Unsupported position ".concat(t))}E=w<=0?E:!E;var T=lr(c,f,b,_),A=lr(c,f,b,_+(E?1:-1)*359),C="M".concat(T.x,",").concat(T.y,`
|
|
109
|
-
A`).concat(b,",").concat(b,",0,1,").concat(E?0:1,`,
|
|
110
|
-
`).concat(A.x,",").concat(A.y),R=mt(e.id)?Uc("recharts-radial-line-"):e.id;return S.createElement("text",$a({},n,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",l)}),S.createElement("defs",null,S.createElement("path",{id:R,d:C})),S.createElement("textPath",{xlinkHref:"#".concat(R)},r))},IZ=(e,t,r)=>{var{cx:n,cy:i,innerRadius:o,outerRadius:l,startAngle:c,endAngle:f}=e,h=(c+f)/2;if(r==="outside"){var{x:p,y:g}=lr(n,i,l+t,h);return{x:p,y:g,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 y=(o+l)/2,{x,y:b}=lr(n,i,y,h);return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Mh=e=>e!=null&&"cx"in e&&ge(e.cx),$Z={angle:0,offset:5,zIndex:Gt.label,position:"middle",textBreakAll:!1};function zZ(e){if(!Mh(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 Mi(e){var t=fr(e,$Z),{viewBox:r,parentViewBox:n,position:i,value:o,children:l,content:c,className:f="",textBreakAll:h,labelRef:p}=t,g=MZ(),y=hk(),x=i==="center"?y:g??y,b,w,N;r==null?b=x:Mh(r)?b=r:b=zj(r);var _=zZ(b);if(!b||mt(o)&&mt(l)&&!S.isValidElement(c)&&typeof c!="function")return null;var E=_c(_c({},t),{},{viewBox:b});if(S.isValidElement(c)){var{labelRef:T}=E,A=hP(E,_Z);return S.cloneElement(c,A)}if(typeof c=="function"){var{content:C}=E,R=hP(E,OZ);if(w=S.createElement(c,R),S.isValidElement(w))return w}else w=DZ(t);var D=Er(t);if(Mh(b)){if(i==="insideStart"||i==="insideEnd"||i==="end")return LZ(t,i,w,D,b);N=IZ(b,t.offset,t.position)}else{if(!_)return null;var M=NZ({viewBox:_,position:i,offset:t.offset,parentViewBox:Mh(n)?void 0:n});N=_c(_c({x:M.x,y:M.y,textAnchor:M.horizontalAnchor,verticalAnchor:M.verticalAnchor},M.width!==void 0?{width:M.width}:{}),M.height!==void 0?{height:M.height}:{})}return S.createElement(Tn,{zIndex:t.zIndex},S.createElement(Kw,$a({ref:p,className:Xe("recharts-label",f)},D,N,{textAnchor:lk(D.textAnchor)?D.textAnchor:N.textAnchor,breakAll:h}),w))}Mi.displayName="Label";var BZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?S.createElement(Mi,$a({key:"label-implicit"},n)):ca(e)?S.createElement(Mi,$a({key:"label-implicit",value:e},n)):S.isValidElement(e)?e.type===Mi?S.cloneElement(e,_c({key:"label-implicit"},n)):S.createElement(Mi,$a({key:"label-implicit",content:e},n)):Gw(e)?S.createElement(Mi,$a({key:"label-implicit",content:e},n)):e&&typeof e=="object"?S.createElement(Mi,$a({},e,{key:"label-implicit"},n)):null};function UZ(e){var{label:t,labelRef:r}=e,n=hk();return BZ(t,n,r)||null}var qZ=["valueAccessor"],HZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function km(){return km=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},km.apply(null,arguments)}function pP(e,t){if(e==null)return{};var r,n,i=FZ(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 FZ(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 KZ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(gZ(t))return t},mk=S.createContext(void 0),pk=mk.Provider,gk=S.createContext(void 0);gk.Provider;function GZ(){return S.useContext(mk)}function YZ(){return S.useContext(gk)}function Dh(e){var{valueAccessor:t=KZ}=e,r=pP(e,qZ),{dataKey:n,clockWise:i,id:o,textBreakAll:l,zIndex:c}=r,f=pP(r,HZ),h=GZ(),p=YZ(),g=h||p;return!g||!g.length?null:S.createElement(Tn,{zIndex:c??Gt.label},S.createElement(sn,{className:"recharts-label-list"},g.map((y,x)=>{var b,w=mt(n)?t(y,x):Ot(y.payload,n),N=mt(o)?{}:{id:"".concat(o,"-").concat(x)};return S.createElement(Mi,km({key:"label-".concat(x)},Er(y),f,N,{fill:(b=r.fill)!==null&&b!==void 0?b:y.fill,parentViewBox:y.parentViewBox,value:w,textBreakAll:l,viewBox:y.viewBox,index:x,zIndex:0}))})))}Dh.displayName="LabelList";function yk(e){var{label:t}=e;return t?t===!0?S.createElement(Dh,{key:"labelList-implicit"}):S.isValidElement(t)||Gw(t)?S.createElement(Dh,{key:"labelList-implicit",content:t}):typeof t=="object"?S.createElement(Dh,km({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Tb(){return Tb=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},Tb.apply(null,arguments)}var vk=e=>{var{cx:t,cy:r,r:n,className:i}=e,o=Xe("recharts-dot",i);return ge(t)&&ge(r)&&ge(n)?S.createElement("circle",Tb({},zn(e),Ej(e),{className:o,cx:t,cy:r,r:n})):null},VZ={radiusAxis:{},angleAxis:{}},xk=br({name:"polarAxis",initialState:VZ,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:sle,removeRadiusAxis:ole,addAngleAxis:lle,removeAngleAxis:ule}=xk.actions,QZ=xk.reducer;function XZ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var tx={exports:{}},tt={};/**
|
|
111
|
-
* @license React
|
|
112
|
-
* react-is.production.js
|
|
113
|
-
*
|
|
114
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
115
|
-
*
|
|
116
|
-
* This source code is licensed under the MIT license found in the
|
|
117
|
-
* LICENSE file in the root directory of this source tree.
|
|
118
|
-
*/var gP;function WZ(){if(gP)return tt;gP=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"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function b(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 h:case y:return w;default:switch(w=w&&w.$$typeof,w){case l:case c:case g: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=g,tt.Memo=p,tt.Portal=t,tt.Profiler=i,tt.StrictMode=n,tt.Suspense=f,tt.SuspenseList=h,tt.isContextConsumer=function(w){return b(w)===o},tt.isContextProvider=function(w){return b(w)===l},tt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},tt.isForwardRef=function(w){return b(w)===c},tt.isFragment=function(w){return b(w)===r},tt.isLazy=function(w){return b(w)===g},tt.isMemo=function(w){return b(w)===p},tt.isPortal=function(w){return b(w)===t},tt.isProfiler=function(w){return b(w)===i},tt.isStrictMode=function(w){return b(w)===n},tt.isSuspense=function(w){return b(w)===f},tt.isSuspenseList=function(w){return b(w)===h},tt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===n||w===f||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===g||w.$$typeof===p||w.$$typeof===l||w.$$typeof===o||w.$$typeof===c||w.$$typeof===x||w.getModuleId!==void 0)},tt.typeOf=b,tt}var yP;function ZZ(){return yP||(yP=1,tx.exports=WZ()),tx.exports}var JZ=ZZ(),vP=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",xP=null,rx=null,bk=e=>{if(e===xP&&Array.isArray(rx))return rx;var t=[];return S.Children.forEach(e,r=>{mt(r)||(JZ.isFragment(r)?t=t.concat(bk(r.props.children)):t.push(r))}),rx=t,xP=e,t};function eJ(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>vP(i)):n=[vP(t)],bk(e).forEach(i=>{var o=ql(i,"type.displayName")||ql(i,"type.name");o&&n.indexOf(o)!==-1&&r.push(i)}),r}var jk=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,nx={},bP;function tJ(){return bP||(bP=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})(nx)),nx}var ax,jP;function rJ(){return jP||(jP=1,ax=tJ().isPlainObject),ax}var nJ=rJ();const aJ=rs(nJ);var wP,SP,NP,_P,OP;function EP(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 AP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EP(Object(r),!0).forEach(function(n){iJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iJ(e,t,r){return(t=sJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sJ(e){var t=oJ(e,"string");return typeof t=="symbol"?t:t+""}function oJ(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 Lm(){return Lm=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},Lm.apply(null,arguments)}function vc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var TP=(e,t,r,n,i)=>{var o=r-n,l;return l=bt(wP||(wP=vc(["M ",",",""])),e,t),l+=bt(SP||(SP=vc(["L ",",",""])),e+r,t),l+=bt(NP||(NP=vc(["L ",",",""])),e+r-o/2,t+i),l+=bt(_P||(_P=vc(["L ",",",""])),e+r-o/2-n,t+i),l+=bt(OP||(OP=vc(["L ",","," Z"])),e,t),l},lJ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},uJ=e=>{var t=fr(e,lJ),{x:r,y:n,upperWidth:i,lowerWidth:o,height:l,className:c}=t,{animationEasing:f,animationDuration:h,animationBegin:p,isUpdateAnimationActive:g}=t,y=S.useRef(null),[x,b]=S.useState(-1),w=S.useRef(i),N=S.useRef(o),_=S.useRef(l),E=S.useRef(r),T=S.useRef(n),A=_p(e,"trapezoid-");if(S.useEffect(()=>{if(y.current&&y.current.getTotalLength)try{var Z=y.current.getTotalLength();Z&&b(Z)}catch{}},[]),r!==+r||n!==+n||i!==+i||o!==+o||l!==+l||i===0&&o===0||l===0)return null;var C=Xe("recharts-trapezoid",c);if(!g)return S.createElement("g",null,S.createElement("path",Lm({},Er(t),{className:C,d:TP(r,n,i,o,l)})));var R=w.current,D=N.current,M=_.current,$=E.current,I=T.current,F="0px ".concat(x===-1?1:x,"px"),H="".concat(x,"px ").concat(x,"px"),ie=P3(["strokeDasharray"],h,f);return S.createElement(Np,{animationId:A,key:A,canBegin:x>0,duration:h,easing:f,isActive:g,begin:p},Z=>{var G=jt(R,i,Z),k=jt(D,o,Z),q=jt(M,l,Z),J=jt($,r,Z),re=jt(I,n,Z);y.current&&(w.current=G,N.current=k,_.current=q,E.current=J,T.current=re);var oe=Z>0?{transition:ie,strokeDasharray:H}:{strokeDasharray:F};return S.createElement("path",Lm({},Er(t),{className:C,d:TP(J,re,G,k,q),ref:y,style:AP(AP({},oe),t.style)}))})},cJ=["option","shapeType","activeClassName","inActiveClassName"];function dJ(e,t){if(e==null)return{};var r,n,i=fJ(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 fJ(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 CP(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 Im(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?CP(Object(r),!0).forEach(function(n){hJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):CP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function hJ(e,t,r){return(t=mJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function mJ(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 gJ(e,t){return Im(Im({},t),e)}function yJ(e,t){return e==="symbols"}function PP(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return S.createElement(k3,r);case"trapezoid":return S.createElement(uJ,r);case"sector":return S.createElement($3,r);case"symbols":if(yJ(t))return S.createElement(Oj,r);break;case"curve":return S.createElement(C3,r);default:return null}}function vJ(e){return S.isValidElement(e)?e.props:e}function wk(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=dJ(e,cJ),l;if(S.isValidElement(t))l=S.cloneElement(t,Im(Im({},o),vJ(t)));else if(typeof t=="function")l=t(o,o.index);else if(aJ(t)&&typeof t!="boolean"){var c=gJ(t,o);l=S.createElement(PP,{shapeType:r,elementProps:c})}else{var f=o;l=S.createElement(PP,{shapeType:r,elementProps:f})}return o.isActive?S.createElement(sn,{className:n},l):S.createElement(sn,{className:i},l)}var Sk=(e,t,r)=>{var n=ct();return(i,o)=>l=>{e==null||e(i,o,l),n(CD({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},Nk=e=>{var t=ct();return(r,n)=>i=>{e==null||e(r,n,i),t(kQ())}},_k=(e,t,r)=>{var n=ct();return(i,o)=>l=>{e==null||e(i,o,l),n(LQ({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function Ok(e){var{tooltipEntrySettings:t}=e,r=ct(),n=jr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(PQ(t)):i.current!==t&&r(RQ({prev:i.current,next:t})),i.current=t)},[t,r,n]),S.useLayoutEffect(()=>()=>{i.current&&(r(MQ(i.current)),i.current=null)},[r]),null}function Ek(e){var{legendPayload:t}=e,r=ct(),n=jr(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(jH(t)):i.current!==t&&r(wH({prev:i.current,next:t})),i.current=t)},[r,n,t]),S.useLayoutEffect(()=>()=>{i.current&&(r(SH(i.current)),i.current=null)},[r]),null}var ix,xJ=()=>{var[e]=S.useState(()=>Uc("uid-"));return e},bJ=(ix=H$.useId)!==null&&ix!==void 0?ix:xJ;function jJ(e,t){var r=bJ();return t||(e?"".concat(e,"-").concat(r):r)}var wJ=S.createContext(void 0),Ak=e=>{var{id:t,type:r,children:n}=e,i=jJ("recharts-".concat(r),t);return S.createElement(wJ.Provider,{value:i},n(i))},SJ={cartesianItems:[],polarItems:[]},Tk=br({name:"graphicalItems",initialState:SJ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ot()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=_n(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:ot()},removeCartesianGraphicalItem:{reducer(e,t){var r=_n(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=_n(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=_n(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:ot()}}}),{addCartesianGraphicalItem:NJ,replaceCartesianGraphicalItem:_J,removeCartesianGraphicalItem:OJ,addPolarGraphicalItem:cle,removePolarGraphicalItem:dle,replacePolarGraphicalItem:fle}=Tk.actions,EJ=Tk.reducer,AJ=e=>{var t=ct(),r=S.useRef(null);return S.useLayoutEffect(()=>{r.current===null?t(NJ(e)):r.current!==e&&t(_J({prev:r.current,next:e})),r.current=e},[t,e]),S.useLayoutEffect(()=>()=>{r.current&&(t(OJ(r.current)),r.current=null)},[t]),null},Ck=S.memo(AJ),TJ=["points"];function RP(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 sx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RP(Object(r),!0).forEach(function(n){CJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CJ(e,t,r){return(t=PJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PJ(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)}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 MJ(e,t){if(e==null)return{};var r,n,i=DJ(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 DJ(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 kJ(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=MJ(o,TJ);return S.createElement(vk,$m({},c,{className:i}))}function LJ(e,t){return e==null?!1:t?!0:e.length===1}function IJ(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:o,baseProps:l,needClip:c,clipPathId:f,zIndex:h=Gt.scatter}=e;if(!LJ(t,r))return null;var p=jk(r),g=oU(r),y=t.map((b,w)=>{var N,_,E=sx(sx(sx({r:3},l),g),{},{index:w,cx:(N=b.x)!==null&&N!==void 0?N:void 0,cy:(_=b.y)!==null&&_!==void 0?_:void 0,dataKey:o,value:b.value,payload:b.payload,points:t});return S.createElement(kJ,{key:"dot-".concat(w),option:r,dotProps:E,className:i})}),x={};return c&&f!=null&&(x.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),S.createElement(Tn,{zIndex:h},S.createElement(sn,$m({className:n},x),y))}function MP(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 DP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MP(Object(r),!0).forEach(function(n){$J(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function $J(e,t,r){return(t=zJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zJ(e){var t=BJ(e,"string");return typeof t=="symbol"?t:t+""}function BJ(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 Pk=0,UJ={xAxis:{},yAxis:{},zAxis:{}},Rk=br({name:"cartesianAxis",initialState:UJ,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]=DP(DP({},i),{},{width:n,widthHistory:c})}}}}),{addXAxis:qJ,replaceXAxis:HJ,removeXAxis:FJ,addYAxis:KJ,replaceYAxis:GJ,removeYAxis:YJ,addZAxis:hle,replaceZAxis:mle,removeZAxis:ple,updateYAxisWidth:VJ}=Rk.actions,QJ=Rk.reducer,XJ=Q([Vt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),WJ=Q([XJ,Wa,Za],(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)}}),Yw=()=>ve(WJ),ZJ=()=>ve(PX);function kP(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 ox(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kP(Object(r),!0).forEach(function(n){JJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function JJ(e,t,r){return(t=eee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eee(e){var t=tee(e,"string");return typeof t=="symbol"?t:t+""}function tee(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 ree=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=ox(ox(ox({},c),gd(i)),Ej(i)),h;return S.isValidElement(i)?h=S.cloneElement(i,f):typeof i=="function"?h=i(f):h=S.createElement(vk,f),S.createElement(sn,{className:"recharts-active-dot",clipPath:l},h)};function nee(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:o,zIndex:l=Gt.activeDot}=e,c=ve(lo),f=ZJ();if(t==null||f==null)return null;var h=t.find(p=>f.includes(p.payload));return mt(h)?null:S.createElement(Tn,{zIndex:l},S.createElement(ree,{point:h,childIndex:Number(c),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var LP=(e,t,r)=>{var n=r??e;if(!mt(n))return Bn(n,t,0)},aee=(e,t,r)=>{var n={},i=e.filter(Pp),o=e.filter(h=>h.stackId==null),l=i.reduce((h,p)=>{var g=h[p.stackId];return g==null&&(g=[]),g.push(p),h[p.stackId]=g,h},n),c=Object.entries(l).map(h=>{var p,[g,y]=h,x=y.map(w=>w.dataKey),b=LP(t,r,(p=y[0])===null||p===void 0?void 0:p.barSize);return{stackId:g,dataKeys:x,barSize:b}}),f=o.map(h=>{var p=[h.dataKey].filter(y=>y!=null),g=LP(t,r,h.barSize);return{stackId:void 0,dataKeys:p,barSize:g}});return[...c,...f]};function IP(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 xh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?IP(Object(r),!0).forEach(function(n){iee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iee(e,t,r){return(t=see(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function see(e){var t=oee(e,"string");return typeof t=="symbol"?t:t+""}function oee(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 lee(e,t,r,n,i){var o,l=n.length;if(!(l<1)){var c=Bn(e,r,0,!0),f,h=[];if(Be((o=n[0])===null||o===void 0?void 0:o.barSize)){var p=!1,g=r/l,y=n.reduce((E,T)=>E+(T.barSize||0),0);y+=(l-1)*c,y>=r&&(y-=(l-1)*c,c=0),y>=r&&g>0&&(p=!0,g*=.9,y=l*g);var x=(r-y)/2>>0,b={offset:x-c,size:0};f=n.reduce((E,T)=>{var A,C={stackId:T.stackId,dataKeys:T.dataKeys,position:{offset:b.offset+b.size+c,size:p?g:(A=T.barSize)!==null&&A!==void 0?A:0}},R=[...E,C];return b=C.position,R},h)}else{var w=Bn(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 _=Be(i)?Math.min(N,i):N;f=n.reduce((E,T,A)=>[...E,{stackId:T.stackId,dataKeys:T.dataKeys,position:{offset:w+(N+c)*A+(N-_)/2,size:_}}],h)}return f}}var uee=(e,t,r,n,i,o,l)=>{var c=mt(l)?t:l,f=lee(r,n,i!==o?i:o,e,c);return i!==o&&f!=null&&(f=f.map(h=>xh(xh({},h),{},{position:xh(xh({},h.position),{},{offset:h.position.offset-i/2})}))),f},cee=(e,t)=>{var r=ew(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)}}}},dee=(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 fee(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Be(e.zIndex)?e.zIndex:t}var hee=e=>{var{chartData:t}=e,r=ct(),n=jr();return S.useEffect(()=>n?()=>{}:(r(WC(t)),()=>{r(WC(void 0))}),[t,r,n]),null},$P={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Mk=br({name:"brush",initialState:$P,reducers:{setBrushSettings(e,t){return t.payload==null?$P:t.payload}}}),{setBrushSettings:gle}=Mk.actions,mee=Mk.reducer;function pee(e){return(e%180+180)%180}var gee=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=pee(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)},yee={dots:[],areas:[],lines:[]},Dk=br({name:"referenceElements",initialState:yee,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=_n(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=_n(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=_n(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:yle,removeDot:vle,addArea:xle,removeArea:ble,addLine:jle,removeLine:wle}=Dk.actions,vee=Dk.reducer,xee=S.createContext(void 0),bee=e=>{var{children:t}=e,[r]=S.useState("".concat(Uc("recharts"),"-clip")),n=Yw();if(n==null)return null;var{x:i,y:o,width:l,height:c}=n;return S.createElement(xee.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 kk(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 jee(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return gee(n,r)}function wee(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 td(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 See(e,t){return kk(e,t+1)}function Nee(e,t,r,n,i){for(var o=(n||[]).slice(),{start:l,end:c}=t,f=0,h=1,p=l,g=function(){var b=n==null?void 0:n[f];if(b===void 0)return{v:kk(n,h)};var w=f,N,_=()=>(N===void 0&&(N=r(b,w)),N),E=b.coordinate,T=f===0||td(e,E,_,p,c);T||(f=0,p=l,h+=1),T&&(p=E+e*(_()/2+i),f+=h)},y;h<=o.length;)if(y=g(),y)return y.v;return[]}function _ee(e,t,r,n,i){var o=(n||[]).slice(),l=o.length;if(l===0)return[];for(var{start:c,end:f}=t,h=1;h<=l;h++){for(var p=(l-1)%h,g=c,y=!0,x=function(){var A=n[w];if(A==null)return 0;var C=w,R,D=()=>(R===void 0&&(R=r(A,C)),R),M=A.coordinate,$=w===p||td(e,M,D,g,f);if(!$)return y=!1,1;$&&(g=M+e*(D()/2+i))},b,w=p;w<l&&(b=x(),!(b!==0&&b===1));w+=h);if(y){for(var N=[],_=p;_<l;_+=h){var E=n[_];E!=null&&N.push(E)}return N}}return[]}function zP(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 yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zP(Object(r),!0).forEach(function(n){Oee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Oee(e,t,r){return(t=Eee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Eee(e){var t=Aee(e,"string");return typeof t=="symbol"?t:t+""}function Aee(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 Tee(e,t,r,n,i){for(var o=(n||[]).slice(),l=o.length,{start:c}=t,{end:f}=t,h=function(y){var x=o[y];if(x==null)return 1;var b=x,w,N=()=>(w===void 0&&(w=r(x,y)),w);if(y===l-1){var _=e*(b.coordinate+e*N()/2-f);o[y]=b=yr(yr({},b),{},{tickCoord:_>0?b.coordinate-_*e:b.coordinate})}else o[y]=b=yr(yr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var E=td(e,b.tickCoord,N,c,f);E&&(f=b.tickCoord-e*(N()/2+i),o[y]=yr(yr({},b),{},{isShow:!0}))}},p=l-1;p>=0;p--)h(p);return o}function Cee(e,t,r,n,i,o){var l=(n||[]).slice(),c=l.length,{start:f,end:h}=t;if(o){var p=n[c-1];if(p!=null){var g=r(p,c-1),y=e*(p.coordinate+e*g/2-h);if(l[c-1]=p=yr(yr({},p),{},{tickCoord:y>0?p.coordinate-y*e:p.coordinate}),p.tickCoord!=null){var x=td(e,p.tickCoord,()=>g,f,h);x&&(h=p.tickCoord-e*(g/2+i),l[c-1]=yr(yr({},p),{},{isShow:!0}))}}}for(var b=o?c-1:c,w=function(E){var T=l[E];if(T==null)return 1;var A=T,C,R=()=>(C===void 0&&(C=r(T,E)),C);if(E===0){var D=e*(A.coordinate-e*R()/2-f);l[E]=A=yr(yr({},A),{},{tickCoord:D<0?A.coordinate-D*e:A.coordinate})}else l[E]=A=yr(yr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var M=td(e,A.tickCoord,R,f,h);M&&(f=A.tickCoord+e*(R()/2+i),l[E]=yr(yr({},A),{},{isShow:!0}))}},N=0;N<b;N++)w(N);return l}function Vw(e,t,r){var{tick:n,ticks:i,viewBox:o,minTickGap:l,orientation:c,interval:f,tickFormatter:h,unit:p,angle:g}=e;if(!i||!i.length||!n)return[];if(ge(f)||Sd.isSsr){var y;return(y=See(i,ge(f)?f:0))!==null&&y!==void 0?y:[]}var x=[],b=c==="top"||c==="bottom"?"width":"height",w=p&&b==="width"?Ec(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},N=(C,R)=>{var D=typeof h=="function"?h(C.value,R):C.value;return b==="width"?jee(Ec(D,{fontSize:t,letterSpacing:r}),w,g):Ec(D,{fontSize:t,letterSpacing:r})[b]},_=i[0],E=i[1],T=i.length>=2&&_!=null&&E!=null?Br(E.coordinate-_.coordinate):1,A=wee(o,T,b);return f==="equidistantPreserveStart"?Nee(T,A,N,i,l):f==="equidistantPreserveEnd"?_ee(T,A,N,i,l):(f==="preserveStart"||f==="preserveStartEnd"?x=Cee(T,A,N,i,l,f==="preserveStartEnd"):x=Tee(T,A,N,i,l),x.filter(C=>C.isShow))}var Pee=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 g=p.getBoundingClientRect();g.width>l&&(l=g.width)}});var c=r?r.getBoundingClientRect().width:0,f=i+o,h=l+f+c+(r?n:0);return Math.round(h)}return 0},Ree={xAxis:{},yAxis:{}},Lk=br({name:"renderedTicks",initialState:Ree,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:Mee,removeRenderedTicks:Dee}=Lk.actions,kee=Lk.reducer,Lee=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Iee(e,t){if(e==null)return{};var r,n,i=$ee(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 $ee(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 uo(){return uo=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},uo.apply(null,arguments)}function BP(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?BP(Object(r),!0).forEach(function(n){zee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):BP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zee(e,t,r){return(t=Bee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bee(e){var t=Uee(e,"string");return typeof t=="symbol"?t:t+""}function Uee(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={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:Gt.axis};function qee(e){var{x:t,y:r,width:n,height:i,orientation:o,mirror:l,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var h=xt(xt(xt({},f),zn(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!l||o==="bottom"&&l);h=xt(xt({},h),{},{x1:t,y1:r+p*i,x2:t+n,y2:r+p*i})}else{var g=+(o==="left"&&!l||o==="right"&&l);h=xt(xt({},h),{},{x1:t+g*n,y1:r,x2:t+g*n,y2:r+i})}return S.createElement("line",uo({},h,{className:Xe("recharts-cartesian-axis-line",ql(c,"className"))}))}function Hee(e,t,r,n,i,o,l,c,f){var h,p,g,y,x,b,w=c?-1:1,N=e.tickSize||l,_=ge(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":h=p=e.coordinate,y=r+ +!c*i,g=y-w*N,b=g-w*f,x=_;break;case"left":g=y=e.coordinate,p=t+ +!c*n,h=p-w*N,x=h-w*f,b=_;break;case"right":g=y=e.coordinate,p=t+ +c*n,h=p+w*N,x=h+w*f,b=_;break;default:h=p=e.coordinate,y=r+ +c*i,g=y+w*N,b=g+w*f,x=_;break}return{line:{x1:h,y1:g,x2:p,y2:y},tick:{x,y:b}}}function Fee(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Kee(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Gee(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,XZ(t))),i=S.createElement(Kw,uo({},r,{className:l}),n)}return i}function Yee(e){var{ticks:t,axisType:r,axisId:n}=e,i=ct();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(Mee({ticks:o,axisId:n,axisType:r})),()=>{i(Dee({axisId:n,axisType:r}))}},[i,t,n,r]),null}var Vee=S.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:o,tickFormatter:l,unit:c,padding:f,tickTextProps:h,orientation:p,mirror:g,x:y,y:x,width:b,height:w,tickSize:N,tickMargin:_,fontSize:E,letterSpacing:T,getTicksConfig:A,events:C,axisType:R,axisId:D}=e,M=Vw(xt(xt({},A),{},{ticks:r}),E,T),$=zn(A),I=gd(n),F=lk($.textAnchor)?$.textAnchor:Fee(p,g),H=Kee(p,g),ie={};typeof i=="object"&&(ie=i);var Z=xt(xt({},$),{},{fill:"none"},ie),G=M.map(J=>xt({entry:J},Hee(J,y,x,b,w,p,N,g,_))),k=G.map(J=>{var{entry:re,line:oe}=J;return S.createElement(sn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(re.value,"-").concat(re.coordinate,"-").concat(re.tickCoord)},i&&S.createElement("line",uo({},Z,oe,{className:Xe("recharts-cartesian-axis-tick-line",ql(i,"className"))})))}),q=G.map((J,re)=>{var oe,L,{entry:X,tick:le}=J,ue=xt(xt(xt(xt({verticalAnchor:H},$),{},{textAnchor:F,stroke:"none",fill:o},le),{},{index:re,payload:X,visibleTicksCount:M.length,tickFormatter:l,padding:f},h),{},{angle:(oe=(L=h==null?void 0:h.angle)!==null&&L!==void 0?L:$.angle)!==null&&oe!==void 0?oe:0}),pe=xt(xt({},ue),I);return S.createElement(sn,uo({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(X.value,"-").concat(X.coordinate,"-").concat(X.tickCoord)},ap(C,X,re)),n&&S.createElement(Gee,{option:n,tickProps:pe,value:"".concat(typeof l=="function"?l(X.value,re):X.value).concat(c||"")}))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(R,"-ticks")},S.createElement(Yee,{ticks:M,axisId:D,axisType:R}),q.length>0&&S.createElement(Tn,{zIndex:Gt.label},S.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(R,"-tick-labels"),ref:t},q)),k.length>0&&S.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(R,"-tick-lines")},k))}),Qee=S.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:o,hide:l,ticks:c,axisType:f,axisId:h}=e,p=Iee(e,Lee),[g,y]=S.useState(""),[x,b]=S.useState(""),w=S.useRef(null);S.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return Pee({ticks:w.current,label:(_=e.labelRef)===null||_===void 0?void 0:_.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var N=S.useCallback(_=>{if(_){var E=_.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=E;var T=E[0];if(T){var A=window.getComputedStyle(T),C=A.fontSize,R=A.letterSpacing;(C!==g||R!==x)&&(y(C),b(R))}}},[g,x]);return l||n!=null&&n<=0||i!=null&&i<=0?null:S.createElement(Tn,{zIndex:e.zIndex},S.createElement(sn,{className:Xe("recharts-cartesian-axis",o)},S.createElement(qee,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:zn(e)}),S.createElement(Vee,{ref:N,axisType:f,events:p,fontSize:g,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:h}),S.createElement(PZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},S.createElement(UZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Qw=S.forwardRef((e,t)=>{var r=fr(e,Ka);return S.createElement(Qee,uo({},r,{ref:t}))});Qw.displayName="CartesianAxis";var Xee=["x1","y1","x2","y2","key"],Wee=["offset"],Zee=["xAxisId","yAxisId"],Jee=["xAxisId","yAxisId"];function UP(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 vr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UP(Object(r),!0).forEach(function(n){ete(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ete(e,t,r){return(t=tte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tte(e){var t=rte(e,"string");return typeof t=="symbol"?t:t+""}function rte(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 Is(){return Is=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},Is.apply(null,arguments)}function zm(e,t){if(e==null)return{};var r,n,i=nte(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 nte(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 ate=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 Ik(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:h}=r,p=zm(r,Xee),g=(i=zn(p))!==null&&i!==void 0?i:{},{offset:y}=g,x=zm(g,Wee);n=S.createElement("line",Is({},x,{x1:o,y1:l,x2:c,y2:f,fill:"none",key:h}))}return n}function ite(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=zm(e,Zee),f=i.map((h,p)=>{var g=vr(vr({},c),{},{x1:t,y1:h,x2:t+r,y2:h,key:"line-".concat(p),index:p});return S.createElement(Ik,{key:"line-".concat(p),option:n,lineItemProps:g})});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function ste(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=zm(e,Jee),f=i.map((h,p)=>{var g=vr(vr({},c),{},{x1:h,y1:t,x2:h,y2:t+r,key:"line-".concat(p),index:p});return S.createElement(Ik,{option:n,lineItemProps:g,key:"line-".concat(p)})});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function ote(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 h=c.map(g=>Math.round(g+i-i)).sort((g,y)=>g-y);i!==h[0]&&h.unshift(0);var p=h.map((g,y)=>{var x=h[y+1],b=x==null,w=b?i+l-g:x-g;if(w<=0)return null;var N=y%t.length;return S.createElement("rect",{key:"react-".concat(y),y:g,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 lte(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 h=f.map(g=>Math.round(g+i-i)).sort((g,y)=>g-y);i!==h[0]&&h.unshift(0);var p=h.map((g,y)=>{var x=h[y+1],b=x==null,w=b?i+l-g:x-g;if(w<=0)return null;var N=y%r.length;return S.createElement("rect",{key:"react-".concat(y),x:g,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 ute=(e,t)=>{var{xAxis:r,width:n,height:i,offset:o}=e;return d3(Vw(vr(vr(vr({},Ka),r),{},{ticks:f3(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},cte=(e,t)=>{var{yAxis:r,width:n,height:i,offset:o}=e;return d3(Vw(vr(vr(vr({},Ka),r),{},{ticks:f3(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},dte={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Gt.grid};function Fp(e){var t=Bj(),r=Uj(),n=y3(),i=vr(vr({},fr(e,dte)),{},{x:ge(e.x)?e.x:n.left,y:ge(e.y)?e.y:n.top,width:ge(e.width)?e.width:n.width,height:ge(e.height)?e.height:n.height}),{xAxisId:o,yAxisId:l,x:c,y:f,width:h,height:p,syncWithTicks:g,horizontalValues:y,verticalValues:x}=i,b=jr(),w=ve($=>$C($,"xAxis",o,b)),N=ve($=>$C($,"yAxis",l,b));if(!da(h)||!da(p)||!ge(c)||!ge(f))return null;var _=i.verticalCoordinatesGenerator||ute,E=i.horizontalCoordinatesGenerator||cte,{horizontalPoints:T,verticalPoints:A}=i;if((!T||!T.length)&&typeof E=="function"){var C=y&&y.length,R=E({yAxis:N?vr(vr({},N),{},{ticks:C?y:N.ticks}):void 0,width:t??h,height:r??p,offset:n},C?!0:g);cm(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof R,"]")),Array.isArray(R)&&(T=R)}if((!A||!A.length)&&typeof _=="function"){var D=x&&x.length,M=_({xAxis:w?vr(vr({},w),{},{ticks:D?x:w.ticks}):void 0,width:t??h,height:r??p,offset:n},D?!0:g);cm(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(A=M)}return S.createElement(Tn,{zIndex:i.zIndex},S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(ate,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),S.createElement(ote,Is({},i,{horizontalPoints:T})),S.createElement(lte,Is({},i,{verticalPoints:A})),S.createElement(ite,Is({},i,{offset:n,horizontalPoints:T,xAxis:w,yAxis:N})),S.createElement(ste,Is({},i,{offset:n,verticalPoints:A,xAxis:w,yAxis:N}))))}Fp.displayName="CartesianGrid";var fte={},$k=br({name:"errorBars",initialState:fte,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:Sle,replaceErrorBar:Nle,removeErrorBar:_le}=$k.actions,hte=$k.reducer,mte=["children"];function pte(e,t){if(e==null)return{};var r,n,i=gte(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 gte(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 yte={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},vte=S.createContext(yte);function zk(e){var{children:t}=e,r=pte(e,mte);return S.createElement(vte.Provider,{value:r},t)}function Xw(e,t){var r,n,i=ve(h=>ei(h,e)),o=ve(h=>ti(h,t)),l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:Lt.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 Bk(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Yw(),{needClipX:o,needClipY:l,needClip:c}=Xw(t,r);if(!c||!i)return null;var{x:f,y:h,width:p,height:g}=i;return S.createElement("clipPath",{id:"clipPath-".concat(n)},S.createElement("rect",{x:o?f:f-p/2,y:l?h:h-g/2,width:o?p:p*2,height:l?g:g*2}))}var Uk=(e,t,r,n)=>es(e,"xAxis",t,n),qk=(e,t,r,n)=>Ji(e,"xAxis",t,n),Hk=(e,t,r,n)=>es(e,"yAxis",r,n),Fk=(e,t,r,n)=>Ji(e,"yAxis",r,n),xte=Q([We,Uk,Hk,qk,Fk],(e,t,r,n,i)=>Xa(e,"xAxis")?Fl(t,n,!1):Fl(r,i,!1)),bte=(e,t,r,n,i)=>i;function jte(e){return e.type==="line"}var wte=Q([Bp,bte],(e,t)=>e.filter(jte).find(r=>r.id===t)),Ste=Q([We,Uk,Hk,qk,Fk,wte,xte,Nd],(e,t,r,n,i,o,l,c)=>{var{chartData:f,dataStartIndex:h,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:g,data:y}=o,x;if(y!=null&&y.length>0?x=y:x=f==null?void 0:f.slice(h,p+1),x!=null)return Fte({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:g,bandSize:l,displayedData:x})}});function Nte(e){var t=gd(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 _te=["id"],Ote=["type","layout","connectNulls","needClip","shape"],Ete=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function rd(){return rd=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},rd.apply(null,arguments)}function qP(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 na(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qP(Object(r),!0).forEach(function(n){Ate(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ate(e,t,r){return(t=Tte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Tte(e){var t=Cte(e,"string");return typeof t=="symbol"?t:t+""}function Cte(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 Ww(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 Rte=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:pp(r,t),payload:e}]},Mte=S.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:o,name:l,hide:c,unit:f,tooltipType:h,id:p}=e,g={dataDefinedOnItem:r,getPosition:mo,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:pp(l,t),hide:c,type:h,color:n,unit:f,graphicalItemId:p}};return S.createElement(Ok,{tooltipEntrySettings:g})}),Kk=(e,t)=>"".concat(t,"px ").concat(e,"px");function Dte(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var kte=(e,t,r)=>{var n=r.reduce((y,x)=>y+x,0);if(!n)return Kk(t,e);for(var i=Math.floor(e/n),o=e%n,l=[],c=0,f=0;c<r.length;f+=(h=r[c])!==null&&h!==void 0?h:0,++c){var h,p=r[c];if(p!=null&&f+p>o){l=[...r.slice(0,c),o-f];break}}var g=l.length%2===0?[0,t]:[t];return[...Dte(r,i),...l,...g].map(y=>"".concat(y,"px")).join(", ")};function Lte(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:o,needClip:l}=n,{id:c}=n,f=Ww(n,_te),h=zn(f);return S.createElement(IJ,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:h,needClip:l,clipPathId:t})}function Ite(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 na(na({},f),{},{value:o.value,payload:o.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[n]);return S.createElement(pk,{value:t?i:void 0},r)}function HP(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:o}=e,{type:l,layout:c,connectNulls:f,needClip:h,shape:p}=o,g=Ww(o,Ote),y=na(na({},Er(g)),{},{fill:"none",className:"recharts-line-curve",clipPath:h?"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(wk,rd({shapeType:"curve",option:p},y,{pathRef:r})),S.createElement(Lte,{points:n,clipPathId:t,props:o}))}function $te(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function zte(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:c,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:g,animateNewValues:y,width:x,height:b,onAnimationEnd:w,onAnimationStart:N}=r,_=i.current,E=_p(l,"recharts-line-"),T=S.useRef(E),[A,C]=S.useState(!1),R=!A,D=S.useCallback(()=>{typeof w=="function"&&w(),C(!1)},[w]),M=S.useCallback(()=>{typeof N=="function"&&N(),C(!0)},[N]),$=$te(n.current),I=S.useRef(0);T.current!==E&&(I.current=o.current,T.current=E);var F=I.current;return S.createElement(Ite,{points:l,showLabels:R},r.children,S.createElement(Np,{animationId:E,begin:h,duration:p,isActive:f,easing:g,onAnimationEnd:D,onAnimationStart:M,key:E},H=>{var ie=jt(F,$+F,H),Z=Math.min(ie,$),G;if(f)if(c){var k="".concat(c).split(/[,\s]+/gim).map(re=>parseFloat(re));G=kte(Z,$,k)}else G=Kk($,Z);else G=c==null?void 0:String(c);if(H>0&&$>0&&(i.current=l,o.current=Math.max(o.current,Z)),_){var q=_.length/l.length,J=H===1?l:l.map((re,oe)=>{var L=Math.floor(oe*q);if(_[L]){var X=_[L];return na(na({},re),{},{x:jt(X.x,re.x,H),y:jt(X.y,re.y,H)})}return y?na(na({},re),{},{x:jt(x*2,re.x,H),y:jt(b/2,re.y,H)}):na(na({},re),{},{x:re.x,y:re.y})});return i.current=J,S.createElement(HP,{props:r,points:J,clipPathId:t,pathRef:n,strokeDasharray:G})}return S.createElement(HP,{props:r,points:l,clipPathId:t,pathRef:n,strokeDasharray:G})}),S.createElement(yk,{label:r.label}))}function Bte(e){var{clipPathId:t,props:r}=e,n=S.useRef(null),i=S.useRef(0),o=S.useRef(null);return S.createElement(zte,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:o})}var Ute=(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 qte extends S.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:o,yAxisId:l,top:c,left:f,width:h,height:p,id:g,needClip:y,zIndex:x}=this.props;if(t)return null;var b=Xe("recharts-line",i),w=g,{r:N,strokeWidth:_}=Nte(r),E=jk(r),T=N*2+_,A=y?"url(#clipPath-".concat(E?"":"dots-").concat(w,")"):void 0;return S.createElement(Tn,{zIndex:x},S.createElement(sn,{className:b},y&&S.createElement("defs",null,S.createElement(Bk,{clipPathId:w,xAxisId:o,yAxisId:l}),!E&&S.createElement("clipPath",{id:"clipPath-dots-".concat(w)},S.createElement("rect",{x:f-T/2,y:c-T/2,width:h+T,height:p+T}))),S.createElement(zk,{xAxisId:o,yAxisId:l,data:n,dataPointFormatter:Ute,errorBarOffset:0},S.createElement(Bte,{props:this.props,clipPathId:w}))),S.createElement(nee,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}var Gk={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:Gt.line,type:"linear"};function Hte(e){var t=fr(e,Gk),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:c,dot:f,hide:h,isAnimationActive:p,label:g,legendType:y,xAxisId:x,yAxisId:b,id:w}=t,N=Ww(t,Ete),{needClip:_}=Xw(x,b),E=Yw(),T=po(),A=jr(),C=ve(I=>Ste(I,x,b,A,w));if(T!=="horizontal"&&T!=="vertical"||C==null||E==null)return null;var{height:R,width:D,x:M,y:$}=E;return S.createElement(qte,rd({},N,{id:w,connectNulls:c,dot:f,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:p,hide:h,label:g,legendType:y,xAxisId:x,yAxisId:b,points:C,layout:T,height:R,width:D,left:M,top:$,needClip:_}))}function Fte(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:c,displayedData:f}=e;return f.map((h,p)=>{var g=Ot(h,l);if(t==="horizontal"){var y=CA({axis:r,ticks:i,bandSize:c,entry:h,index:p}),x=mt(g)?null:n.scale.map(g);return{x:y,y:x??null,value:g,payload:h}}var b=mt(g)?null:r.scale.map(g),w=CA({axis:n,ticks:o,bandSize:c,entry:h,index:p});return b==null||w==null?null:{x:b,y:w,value:g,payload:h}}).filter(Boolean)}function Kte(e){var t=fr(e,Gk),r=jr();return S.createElement(Ak,{id:t.id,type:"line"},n=>S.createElement(S.Fragment,null,S.createElement(Ek,{legendPayload:Rte(t)}),S.createElement(Mte,{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(Ck,{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(Hte,rd({},t,{id:n}))))}var Yk=S.memo(Kte,tu);Yk.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:Pk}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:Pk}var Gte="Invariant failed";function Yte(e,t){throw new Error(Gte)}function Cb(){return Cb=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},Cb.apply(null,arguments)}function Zw(e){return S.createElement(wk,Cb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var Vte=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(ge(t))return t;var o=ge(n)||mt(n);return o?t(n,i):(o||Yte(),r)}},Qte=(e,t,r)=>r,Xte=(e,t)=>t,Dd=Q([Bp,Xte],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),Wte=Q([Dd],e=>e==null?void 0:e.maxBarSize),Zte=(e,t,r,n)=>n,Jte=Q([We,Bp,xo,bo,Qte],(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")),ere=(e,t,r)=>{var n=We(e),i=xo(e,t),o=bo(e,t);if(!(i==null||o==null))return n==="horizontal"?_b(e,"yAxis",o,r):_b(e,"xAxis",i,r)},tre=(e,t)=>{var r=We(e),n=xo(e,t),i=bo(e,t);if(!(n==null||i==null))return r==="horizontal"?IC(e,"xAxis",n):IC(e,"yAxis",i)},rre=Q([Jte,$K,tre],aee),nre=(e,t,r)=>{var n,i,o=Dd(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=We(e),h=W3(e),{maxBarSize:p}=o,g=mt(p)?h:p,y,x;return f==="horizontal"?(y=es(e,"xAxis",l,r),x=Ji(e,"xAxis",l,r)):(y=es(e,"yAxis",c,r),x=Ji(e,"yAxis",c,r)),(n=(i=Fl(y,x,!0))!==null&&i!==void 0?i:g)!==null&&n!==void 0?n:0},Vk=(e,t,r)=>{var n=We(e),i=xo(e,t),o=bo(e,t);if(!(i==null||o==null)){var l,c;return n==="horizontal"?(l=es(e,"xAxis",i,r),c=Ji(e,"xAxis",i,r)):(l=es(e,"yAxis",o,r),c=Ji(e,"yAxis",o,r)),Fl(l,c)}},are=Q([rre,W3,IK,Z3,nre,Vk,Wte],uee),ire=(e,t,r)=>{var n=xo(e,t);if(n!=null)return es(e,"xAxis",n,r)},sre=(e,t,r)=>{var n=bo(e,t);if(n!=null)return es(e,"yAxis",n,r)},ore=(e,t,r)=>{var n=xo(e,t);if(n!=null)return Ji(e,"xAxis",n,r)},lre=(e,t,r)=>{var n=bo(e,t);if(n!=null)return Ji(e,"yAxis",n,r)},ure=Q([are,Dd],dee),cre=Q([ere,Dd],cee),dre=Q([Vt,Lj,ire,sre,ore,lre,ure,We,TK,Vk,cre,Dd,Zte],(e,t,r,n,i,o,l,c,f,h,p,g,y)=>{var{chartData:x,dataStartIndex:b,dataEndIndex:w}=f;if(!(g==null||l==null||t==null||c!=="horizontal"&&c!=="vertical"||r==null||n==null||i==null||o==null||h==null)){var{data:N}=g,_;if(N!=null&&N.length>0?_=N:_=x==null?void 0:x.slice(b,w+1),_!=null)return zre({layout:c,barSettings:g,pos:l,parentViewBox:t,bandSize:h,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,stackedData:p,displayedData:_,offset:e,cells:y,dataStartIndex:b})}}),fre=["index"];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)}function hre(e,t){if(e==null)return{};var r,n,i=mre(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 mre(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 Qk=S.createContext(void 0),pre=e=>{var t=S.useContext(Qk);if(t!=null)return t.stackId;if(e!=null)return w7(e)},gre=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),yre=e=>{var t=S.useContext(Qk);if(t!=null){var{stackId:r}=t;return"url(#".concat(gre(r,e),")")}},Xk=e=>{var{index:t}=e,r=hre(e,fre),n=yre(t);return S.createElement(sn,Pb({className:"recharts-bar-stack-layer",clipPath:n},r))},vre=["onMouseEnter","onMouseLeave","onClick"],xre=["value","background","tooltipPosition"],bre=["id"],jre=["onMouseEnter","onClick","onMouseLeave"];function ts(){return ts=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},ts.apply(null,arguments)}function FP(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 Nr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FP(Object(r),!0).forEach(function(n){wre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wre(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=Nre(e,"string");return typeof t=="symbol"?t:t+""}function Nre(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 Bm(e,t){if(e==null)return{};var r,n,i=_re(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 _re(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 Ore=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:pp(r,t),payload:e}]},Ere=S.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:o,hide:l,unit:c,tooltipType:f,id:h}=e,p={dataDefinedOnItem:void 0,getPosition:mo,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:pp(o,t),hide:l,type:f,color:i,unit:c,graphicalItemId:h}};return S.createElement(Ok,{tooltipEntrySettings:p})});function Are(e){var t=ve(lo),{data:r,dataKey:n,background:i,allOtherBarProps:o}=e,{onMouseEnter:l,onMouseLeave:c,onClick:f}=o,h=Bm(o,vre),p=Sk(l,n,o.id),g=Nk(c),y=_k(f,n,o.id);if(!i||r==null)return null;var x=gd(i);return S.createElement(Tn,{zIndex:fee(i,Gt.barBackground)},r.map((b,w)=>{var{value:N,background:_,tooltipPosition:E}=b,T=Bm(b,xre);if(!_)return null;var A=p(b,w),C=g(b,w),R=y(b,w),D=Nr(Nr(Nr(Nr(Nr({option:i,isActive:String(w)===t},T),{},{fill:"#eee"},_),x),ap(h,b,w)),{},{onMouseEnter:A,onMouseLeave:C,onClick:R,dataKey:n,index:w,className:"recharts-bar-background-rectangle"});return S.createElement(Zw,ts({key:"background-bar-".concat(w)},D))}))}function Tre(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 Nr(Nr({},l),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:l,fill:o.fill})});return S.createElement(pk,{value:t?i:void 0},r)}function Cre(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:o,dataKey:l}=e,c=ve(lo),f=ve(GD),h=r&&String(i.originalDataIndex)===c&&(f==null||l===f),[p,g]=S.useState(!1),[y,x]=S.useState(!1);S.useEffect(()=>{var T;return h?(g(!0),T=requestAnimationFrame(()=>{x(!0)})):x(!1),()=>{cancelAnimationFrame(T)}},[h]);var b=S.useCallback(()=>{h||g(!1)},[h]),w=h&&y,N=h||p,_;h?r===!0?_=t:_=r:_=t;var E=S.createElement(Zw,ts({},n,{name:String(n.name)},i,{isActive:w,option:_,index:o,dataKey:l,onTransitionEnd:b}));return N?S.createElement(Tn,{zIndex:Gt.activeBar},S.createElement(Xk,{index:i.originalDataIndex},E)):E}function Pre(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:o}=e;return S.createElement(Zw,ts({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:o}))}function Rre(e){var t,{data:r,props:n}=e,i=(t=zn(n))!==null&&t!==void 0?t:{},{id:o}=i,l=Bm(i,bre),{shape:c,dataKey:f,activeBar:h}=n,{onMouseEnter:p,onClick:g,onMouseLeave:y}=n,x=Bm(n,jre),b=Sk(p,f,o),w=Nk(y),N=_k(g,f,o);return r?S.createElement(S.Fragment,null,r.map((_,E)=>S.createElement(Xk,ts({index:_.originalDataIndex,key:"rectangle-".concat(_==null?void 0:_.x,"-").concat(_==null?void 0:_.y,"-").concat(_==null?void 0:_.value,"-").concat(E),className:"recharts-bar-rectangle"},ap(x,_,E),{onMouseEnter:b(_,E),onMouseLeave:w(_,E),onClick:N(_,E)}),h?S.createElement(Cre,{shape:c,activeBar:h,baseProps:l,entry:_,index:E,dataKey:f}):S.createElement(Pre,{shape:c,baseProps:l,entry:_,index:E,dataKey:f})))):null}function Mre(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:o,animationBegin:l,animationDuration:c,animationEasing:f,onAnimationEnd:h,onAnimationStart:p}=t,g=r.current,y=_p(t,"recharts-bar-"),[x,b]=S.useState(!1),w=!x,N=S.useCallback(()=>{typeof h=="function"&&h(),b(!1)},[h]),_=S.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]);return S.createElement(Tre,{showLabels:w,rects:n},S.createElement(Np,{animationId:y,begin:l,duration:c,isActive:o,easing:f,onAnimationEnd:N,onAnimationStart:_,key:y},E=>{var T=E===1?n:n==null?void 0:n.map((A,C)=>{var R=g&&g[C];if(R)return Nr(Nr({},A),{},{x:jt(R.x,A.x,E),y:jt(R.y,A.y,E),width:jt(R.width,A.width,E),height:jt(R.height,A.height,E)});if(i==="horizontal"){var D=jt(0,A.height,E),M=jt(A.stackedBarStart,A.y,E);return Nr(Nr({},A),{},{y:M,height:D})}var $=jt(0,A.width,E),I=jt(A.stackedBarStart,A.x,E);return Nr(Nr({},A),{},{width:$,x:I})});return E>0&&(r.current=T??null),T==null?null:S.createElement(sn,null,S.createElement(Rre,{props:t,data:T}))}),S.createElement(yk,{label:t.label}),t.children)}function Dre(e){var t=S.useRef(null);return S.createElement(Mre,{previousRectanglesRef:t,props:e})}var Wk=0,kre=(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 Lre extends S.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:o,yAxisId:l,needClip:c,background:f,id:h}=this.props;if(t||r==null)return null;var p=Xe("recharts-bar",i),g=h;return S.createElement(sn,{className:p,id:h},c&&S.createElement("defs",null,S.createElement(Bk,{clipPathId:g,xAxisId:o,yAxisId:l})),S.createElement(sn,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(g,")"):void 0},S.createElement(Are,{data:r,dataKey:n,background:f,allOtherBarProps:this.props}),S.createElement(Dre,this.props)))}}var Ire={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:Wk,xAxisId:0,yAxisId:0,zIndex:Gt.bar};function $re(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:p}=e,{needClip:g}=Xw(t,r),y=po(),x=jr(),b=eJ(e.children,Fw),w=ve(E=>dre(E,e.id,x,b));if(y!=="vertical"&&y!=="horizontal")return null;var N,_=w==null?void 0:w[0];return _==null||_.height==null||_.width==null?N=0:N=y==="vertical"?_.height/2:_.width/2,S.createElement(zk,{xAxisId:t,yAxisId:r,data:w,dataPointFormatter:kre,errorBarOffset:N},S.createElement(Lre,ts({},e,{layout:y,needClip:g,data:w,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:p})))}function zre(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:o,bandSize:l,xAxis:c,yAxis:f,xAxisTicks:h,yAxisTicks:p,stackedData:g,displayedData:y,offset:x,cells:b,parentViewBox:w,dataStartIndex:N}=e,_=t==="horizontal"?f:c,E=g?_.scale.domain():null,T=S7({numericAxis:_}),A=_.scale.map(T);return y.map((C,R)=>{var D,M,$,I,F,H;if(g){var ie=g[R+N];if(ie==null)return null;D=y7(ie,E)}else D=Ot(C,r),Array.isArray(D)||(D=[T,D]);var Z=Vte(n,Wk)(D[1],R);if(t==="horizontal"){var G,k=f.scale.map(D[0]),q=f.scale.map(D[1]);if(k==null||q==null)return null;M=PA({axis:c,ticks:h,bandSize:l,offset:o.offset,entry:C,index:R}),$=(G=q??k)!==null&&G!==void 0?G:void 0,I=o.size;var J=k-q;if(F=ua(J)?0:J,H={x:M,y:x.top,width:I,height:x.height},Math.abs(Z)>0&&Math.abs(F)<Math.abs(Z)){var re=Br(F||Z)*(Math.abs(Z)-Math.abs(F));$-=re,F+=re}}else{var oe=c.scale.map(D[0]),L=c.scale.map(D[1]);if(oe==null||L==null)return null;if(M=oe,$=PA({axis:f,ticks:p,bandSize:l,offset:o.offset,entry:C,index:R}),I=L-oe,F=o.size,H={x:x.left,y:$,width:x.width,height:F},Math.abs(Z)>0&&Math.abs(I)<Math.abs(Z)){var X=Br(I||Z)*(Math.abs(Z)-Math.abs(I));I+=X}}if(M==null||$==null||I==null||F==null||!i&&(I===0||F===0))return null;var le=Nr(Nr({},C),{},{stackedBarStart:A,x:M,y:$,width:I,height:F,value:g?D:D[1],payload:C,background:H,tooltipPosition:{x:M+I/2,y:$+F/2},parentViewBox:w,originalDataIndex:R},b&&b[R]&&b[R].props);return le}).filter(Boolean)}function Bre(e){var t=fr(e,Ire),r=pre(t.stackId),n=jr();return S.createElement(Ak,{id:t.id,type:"bar"},i=>S.createElement(S.Fragment,null,S.createElement(Ek,{legendPayload:Ore(t)}),S.createElement(Ere,{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(Ck,{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(Tn,{zIndex:t.zIndex},S.createElement($re,ts({},t,{id:i})))))}var Jw=S.memo(Bre,tu);Jw.displayName="Bar";var Ure=["domain","range"],qre=["domain","range"];function KP(e,t){if(e==null)return{};var r,n,i=Hre(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 Hre(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 GP(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 Zk(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=KP(e,Ure),{domain:o,range:l}=t,c=KP(t,qre);return!GP(r,o)||!GP(n,l)?!1:tu(i,c)}var Fre=["type"],Kre=["dangerouslySetInnerHTML","ticks","scale"],Gre=["id","scale"];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 YP(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 VP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?YP(Object(r),!0).forEach(function(n){Yre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):YP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Yre(e,t,r){return(t=Vre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Vre(e){var t=Qre(e,"string");return typeof t=="symbol"?t:t+""}function Qre(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 Mb(e,t){if(e==null)return{};var r,n,i=Xre(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 Xre(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 Wre(e){var t=ct(),r=S.useRef(null),n=v3(),{type:i}=e,o=Mb(e,Fre),l=Ap(n,"xAxis",i),c=S.useMemo(()=>{if(l!=null)return VP(VP({},o),{},{type:l})},[o,l]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(qJ(c)):r.current!==c&&t(HJ({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(FJ(r.current)),r.current=null)},[t]),null}var Zre=e=>{var{xAxisId:t,className:r}=e,n=ve(Lj),i=jr(),o="xAxis",l=ve(_=>ND(_,o,t,i)),c=ve(_=>jD(_,t)),f=ve(_=>xQ(_,t)),h=ve(_=>H4(_,t));if(c==null||f==null||h==null)return null;var{dangerouslySetInnerHTML:p,ticks:g,scale:y}=e,x=Mb(e,Kre),{id:b,scale:w}=h,N=Mb(h,Gre);return S.createElement(Qw,Rb({},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}))},Jre={allowDataOverflow:Lt.allowDataOverflow,allowDecimals:Lt.allowDecimals,allowDuplicatedCategory:Lt.allowDuplicatedCategory,angle:Lt.angle,axisLine:Ka.axisLine,height:Lt.height,hide:!1,includeHidden:Lt.includeHidden,interval:Lt.interval,label:!1,minTickGap:Lt.minTickGap,mirror:Lt.mirror,orientation:Lt.orientation,padding:Lt.padding,reversed:Lt.reversed,scale:Lt.scale,tick:Lt.tick,tickCount:Lt.tickCount,tickLine:Ka.tickLine,tickSize:Ka.tickSize,type:Lt.type,niceTicks:Lt.niceTicks,xAxisId:0},ene=e=>{var t=fr(e,Jre);return S.createElement(S.Fragment,null,S.createElement(Wre,{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(Zre,t))},Kp=S.memo(ene,Zk);Kp.displayName="XAxis";var tne=["type"],rne=["dangerouslySetInnerHTML","ticks","scale"],nne=["id","scale"];function Db(){return Db=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},Db.apply(null,arguments)}function QP(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 XP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?QP(Object(r),!0).forEach(function(n){ane(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):QP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function ane(e,t,r){return(t=ine(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ine(e){var t=sne(e,"string");return typeof t=="symbol"?t:t+""}function sne(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 kb(e,t){if(e==null)return{};var r,n,i=one(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 one(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 lne(e){var t=ct(),r=S.useRef(null),n=v3(),{type:i}=e,o=kb(e,tne),l=Ap(n,"yAxis",i),c=S.useMemo(()=>{if(l!=null)return XP(XP({},o),{},{type:l})},[l,o]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(KJ(c)):r.current!==c&&t(GJ({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(YJ(r.current)),r.current=null)},[t]),null}function une(e){var{yAxisId:t,className:r,width:n,label:i}=e,o=S.useRef(null),l=S.useRef(null),c=ve(Lj),f=jr(),h=ct(),p="yAxis",g=ve(R=>wD(R,t)),y=ve(R=>jQ(R,t)),x=ve(R=>ND(R,p,t,f)),b=ve(R=>F4(R,t));if(S.useLayoutEffect(()=>{if(!(n!=="auto"||!g||Gw(i)||S.isValidElement(i)||b==null)){var R=o.current;if(R){var D=R.getCalculatedWidth();Math.round(g.width)!==Math.round(D)&&h(VJ({id:t,width:D}))}}},[x,g,h,i,t,n,b]),g==null||y==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:N,scale:_}=e,E=kb(e,rne),{id:T,scale:A}=b,C=kb(b,nne);return S.createElement(Qw,Db({},E,C,{ref:o,labelRef:l,x:y.x,y:y.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:g.width,height:g.height,className:Xe("recharts-".concat(p," ").concat(p),r),viewBox:c,ticks:x,axisType:p,axisId:t}))}var cne={allowDataOverflow:It.allowDataOverflow,allowDecimals:It.allowDecimals,allowDuplicatedCategory:It.allowDuplicatedCategory,angle:It.angle,axisLine:Ka.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:Ka.tickLine,tickSize:Ka.tickSize,type:It.type,niceTicks:It.niceTicks,width:It.width,yAxisId:0},dne=e=>{var t=fr(e,cne);return S.createElement(S.Fragment,null,S.createElement(lne,{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(une,t))},Gp=S.memo(dne,Zk);Gp.displayName="YAxis";var fne=(e,t)=>t,eS=Q([fne,We,i4,Xt,qD,ri,FX,Vt],WX);function hne(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function tS(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(hne(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 Jk=on("mouseClick"),e5=xd();e5.startListening({actionCreator:Jk,effect:(e,t)=>{var r=e.payload,n=eS(t.getState(),tS(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(IQ({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Lb=on("mouseMove"),t5=xd(),hl=null,_s=null,lx=null;t5.startListening({actionCreator:Lb,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),lx=tS(r);var c=()=>{var f=t.getState(),h=Rd(f,f.tooltip.settings.shared);if(!lx){hl=null,_s=null;return}if(h==="axis"){var p=eS(f,lx);(p==null?void 0:p.activeIndex)!=null?t.dispatch(RD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(PD())}hl=null,_s=null};if(!l){c();return}i==="raf"?hl=requestAnimationFrame(c):typeof i=="number"&&_s===null&&(_s=setTimeout(c,i))}});function mne(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 WP={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},r5=br({name:"rootProps",initialState:WP,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:WP.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}}}),pne=r5.reducer,{updateOptions:gne}=r5.actions,yne=null,vne={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)},n5=br({name:"polarOptions",initialState:yne,reducers:vne}),{updatePolarOptions:Ole}=n5.actions,xne=n5.reducer,a5=on("keyDown"),i5=on("focus"),s5=on("blur"),Yp=xd(),ml=null,Os=null,bh=null;Yp.startListening({actionCreator:a5,effect:(e,t)=>{bh=e.payload,ml!==null&&(cancelAnimationFrame(ml),ml=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,o=i==="all"||i.includes("keydown");Os!==null&&(typeof n!="number"||!o)&&(clearTimeout(Os),Os=null);var l=()=>{try{var c=t.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:h}=c.tooltip,p=bh;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var g=Oc(h,oo(c),Xl(c),Wl(c)),y=g==null?-1:Number(g),x=!Number.isFinite(y)||y<0,b=ri(c),w=oo(c),N=Rd(c,c.tooltip.settings.shared);if(p==="Enter"){if(x)return;var _=Dm(c,N,"hover",String(h.index));t.dispatch(Mm({active:!h.active,activeIndex:h.index,activeCoordinate:_}));return}var E=OQ(c),T=E==="left-to-right"?1:-1,A=p==="ArrowRight"?1:-1,C;if(x){var R=Xl(c),D=Wl(c),M=A*T,$=Z=>({active:!1,index:String(Z),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(C=-1,M>0){for(var I=0;I<w.length;I++)if(Oc($(I),w,R,D)!=null){C=I;break}}else for(var F=w.length-1;F>=0;F--)if(Oc($(F),w,R,D)!=null){C=F;break}if(C<0)return}else{C=y+A*T;var H=(b==null?void 0:b.length)||w.length;if(H===0||C>=H||C<0)return}var ie=Dm(c,N,"hover",String(C));t.dispatch(Mm({active:!0,activeIndex:C.toString(),activeCoordinate:ie}))}finally{ml=null,Os=null}};if(!o){l();return}n==="raf"?ml=requestAnimationFrame(l):typeof n=="number"&&Os===null&&(l(),bh=null,Os=setTimeout(()=>{bh?l():(Os=null,ml=null)},n))}});Yp.startListening({actionCreator:i5,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=Rd(r,r.tooltip.settings.shared),c=Dm(r,l,"hover",String(o));t.dispatch(Mm({active:!0,activeIndex:o,activeCoordinate:c}))}}}});Yp.startListening({actionCreator:s5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(Mm({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function o5(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 jn=on("externalEvent"),l5=xd(),jh=new Map,xc=new Map,ux=new Map;l5.startListening({actionCreator:jn,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,o=o5(n);ux.set(i,{handler:r,reactEvent:o});var l=jh.get(i);l!==void 0&&(cancelAnimationFrame(l),jh.delete(i));var c=t.getState(),{throttleDelay:f,throttledEvents:h}=c.eventSettings,p=h,g=p==="all"||(p==null?void 0:p.includes(i)),y=xc.get(i);y!==void 0&&(typeof f!="number"||!g)&&(clearTimeout(y),xc.delete(i));var x=()=>{var N=ux.get(i);try{if(!N)return;var{handler:_,reactEvent:E}=N,T=t.getState(),A={activeCoordinate:AX(T),activeDataKey:GD(T),activeIndex:lo(T),activeLabel:KD(T),activeTooltipIndex:lo(T),isTooltipActive:TX(T)};_&&_(A,E)}finally{jh.delete(i),xc.delete(i),ux.delete(i)}};if(!g){x();return}if(f==="raf"){var b=requestAnimationFrame(x);jh.set(i,b)}else if(typeof f=="number"){if(!xc.has(i)){x();var w=setTimeout(x,f);xc.set(i,w)}}else x()}}});var bne=Q([uu],e=>e.tooltipItemPayloads),jne=Q([bne,(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)}}}),u5=on("touchMove"),c5=xd(),Es=null,Ti=null,ZP=null,bc=null;c5.startListening({actionCreator:u5,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){bc=o5(r);var n=t.getState(),{throttleDelay:i,throttledEvents:o}=n.eventSettings,l=o==="all"||o.includes("touchmove");Es!==null&&(cancelAnimationFrame(Es),Es=null),Ti!==null&&(typeof i!="number"||!l)&&(clearTimeout(Ti),Ti=null),ZP=Array.from(r.touches).map(f=>tS({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var c=()=>{if(bc!=null){var f=t.getState(),h=Rd(f,f.tooltip.settings.shared);if(h==="axis"){var p,g=(p=ZP)===null||p===void 0?void 0:p[0];if(g==null){Es=null,Ti=null;return}var y=eS(f,g);(y==null?void 0:y.activeIndex)!=null&&t.dispatch(RD({activeIndex:y.activeIndex,activeDataKey:void 0,activeCoordinate:y.activeCoordinate}))}else if(h==="item"){var x,b=bc.touches[0];if(document.elementFromPoint==null||b==null)return;var w=document.elementFromPoint(b.clientX,b.clientY);if(!w||!w.getAttribute)return;var N=w.getAttribute(C7),_=(x=w.getAttribute(P7))!==null&&x!==void 0?x:void 0,E=vo(f).find(C=>C.id===_);if(N==null||E==null||_==null)return;var{dataKey:T}=E,A=jne(f,N,_);t.dispatch(CD({activeDataKey:T,activeIndex:N,activeCoordinate:A,activeGraphicalItemId:_}))}Es=null,Ti=null}};if(!l){c();return}i==="raf"?Es=requestAnimationFrame(c):typeof i=="number"&&Ti===null&&(c(),bc=null,Ti=setTimeout(()=>{bc?c():(Ti=null,Es=null)},i))}}});var d5={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},f5=br({name:"eventSettings",initialState:d5,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:wne}=f5.actions,Sne=f5.reducer,Nne=LM({brush:mee,cartesianAxis:QJ,chartData:EW,errorBars:hte,eventSettings:Sne,graphicalItems:EJ,layout:f7,legend:NH,options:wW,polarAxis:QZ,polarOptions:xne,referenceElements:vee,renderedTicks:kee,rootProps:pne,tooltip:$Q,zIndex:cW}),_ne=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Iq({reducer:Nne,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([e5.middleware,t5.middleware,Yp.middleware,l5.middleware,c5.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(WM({type:"raf"}))},devTools:{serialize:{replacer:mne},name:"recharts-".concat(r)}})};function One(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=jr(),o=S.useRef(null);if(i)return r;o.current==null&&(o.current=_ne(t,n));var l=Tj;return S.createElement(BH,{context:l,store:o.current},r)}function Ene(e){var{layout:t,margin:r}=e,n=ct(),i=jr();return S.useEffect(()=>{i||(n(u7(t)),n(l7(r)))},[n,i,t,r]),null}var Ane=S.memo(Ene,tu);function Tne(e){var t=ct();return S.useEffect(()=>{t(gne(e))},[t,e]),null}var Cne=e=>{var t=ct();return S.useEffect(()=>{t(wne(e))},[t,e]),null},Pne=S.memo(Cne,tu);function JP(e){var{zIndex:t,isPanorama:r}=e,n=S.useRef(null),i=ct();return S.useLayoutEffect(()=>(n.current&&i(lW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(uW({zIndex:t,isPanorama:r}))}),[i,t,r]),S.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function e2(e){var{children:t,isPanorama:r}=e,n=ve(JX);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(JP,{key:l,zIndex:l,isPanorama:r})),t,o.map(l=>S.createElement(JP,{key:l,zIndex:l,isPanorama:r})))}var Rne=["children"];function Mne(e,t){if(e==null)return{};var r,n,i=Dne(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 Dne(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 Um(){return Um=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},Um.apply(null,arguments)}var kne={width:"100%",height:"100%",display:"block"},Lne=S.forwardRef((e,t)=>{var r=Bj(),n=Uj(),i=T3();if(!da(r)||!da(n))return null;var{children:o,otherAttributes:l,title:c,desc:f}=e,h,p;return l!=null&&(typeof l.tabIndex=="number"?h=l.tabIndex:h=i?0:void 0,typeof l.role=="string"?p=l.role:p=i?"application":void 0),S.createElement(xj,Um({},l,{title:c,desc:f,role:p,tabIndex:h,width:r,height:n,style:kne,ref:t}),o)}),Ine=e=>{var{children:t}=e,r=ve(xp);if(!r)return null;var{width:n,height:i,y:o,x:l}=r;return S.createElement(xj,{width:n,height:i,x:l,y:o},t)},t2=S.forwardRef((e,t)=>{var{children:r}=e,n=Mne(e,Rne),i=jr();return i?S.createElement(Ine,null,S.createElement(e2,{isPanorama:!0},r)):S.createElement(Lne,Um({ref:t},n),S.createElement(e2,{isPanorama:!1},r))});function $ne(){var e=ct(),[t,r]=S.useState(null),n=ve(T7);return S.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;Be(o)&&o!==n&&e(d7(o))}},[t,e,n]),r}function r2(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 zne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r2(Object(r),!0).forEach(function(n){Bne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bne(e,t,r){return(t=Une(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Une(e){var t=qne(e,"string");return typeof t=="symbol"?t:t+""}function qne(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 Hne=()=>(LW(),null);function qm(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Fne=S.forwardRef((e,t)=>{var r,n,i=S.useRef(null),[o,l]=S.useState({containerWidth:qm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:qm((n=e.style)===null||n===void 0?void 0:n.height)}),c=S.useCallback((h,p)=>{l(g=>{var y=Math.round(h),x=Math.round(p);return g.containerWidth===y&&g.containerHeight===x?g:{containerWidth:y,containerHeight:x}})},[]),f=S.useCallback(h=>{if(typeof t=="function"&&t(h),i.current!=null&&(i.current.disconnect(),i.current=null),h!=null&&typeof ResizeObserver<"u"){var{width:p,height:g}=h.getBoundingClientRect();c(p,g);var y=b=>{var w=b[0];if(w!=null){var{width:N,height:_}=w.contentRect;c(N,_)}},x=new ResizeObserver(y);x.observe(h),i.current=x}},[t,c]);return S.useEffect(()=>()=>{var h=i.current;h!=null&&h.disconnect()},[c]),S.createElement(S.Fragment,null,S.createElement(jd,{width:o.containerWidth,height:o.containerHeight}),S.createElement("div",Wi({ref:f},e)))}),Kne=S.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,o]=S.useState({containerWidth:qm(r),containerHeight:qm(n)}),l=S.useCallback((f,h)=>{o(p=>{var g=Math.round(f),y=Math.round(h);return p.containerWidth===g&&p.containerHeight===y?p:{containerWidth:g,containerHeight:y}})},[]),c=S.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:h,height:p}=f.getBoundingClientRect();l(h,p)}},[t,l]);return S.createElement(S.Fragment,null,S.createElement(jd,{width:i.containerWidth,height:i.containerHeight}),S.createElement("div",Wi({ref:c},e)))}),Gne=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return S.createElement(S.Fragment,null,S.createElement(jd,{width:r,height:n}),S.createElement("div",Wi({ref:t},e)))}),Yne=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?S.createElement(Kne,Wi({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?S.createElement(Gne,Wi({},e,{width:r,height:n,ref:t})):S.createElement(S.Fragment,null,S.createElement(jd,{width:r,height:n}),S.createElement("div",Wi({ref:t},e)))});function Vne(e){return e?Fne:Yne}var Qne=S.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:o,onContextMenu:l,onDoubleClick:c,onMouseDown:f,onMouseEnter:h,onMouseLeave:p,onMouseMove:g,onMouseUp:y,onTouchEnd:x,onTouchMove:b,onTouchStart:w,style:N,width:_,responsive:E,dispatchTouchEvents:T=!0}=e,A=S.useRef(null),C=ct(),[R,D]=S.useState(null),[M,$]=S.useState(null),I=$ne(),F=Ij(),H=(F==null?void 0:F.width)>0?F.width:_,ie=(F==null?void 0:F.height)>0?F.height:i,Z=S.useCallback(te=>{I(te),typeof t=="function"&&t(te),D(te),$(te),te!=null&&(A.current=te)},[I,t,D,$]),G=S.useCallback(te=>{C(Jk(te)),C(jn({handler:o,reactEvent:te}))},[C,o]),k=S.useCallback(te=>{C(Lb(te)),C(jn({handler:h,reactEvent:te}))},[C,h]),q=S.useCallback(te=>{C(PD()),C(jn({handler:p,reactEvent:te}))},[C,p]),J=S.useCallback(te=>{C(Lb(te)),C(jn({handler:g,reactEvent:te}))},[C,g]),re=S.useCallback(()=>{C(i5())},[C]),oe=S.useCallback(()=>{C(s5())},[C]),L=S.useCallback(te=>{C(a5(te.key))},[C]),X=S.useCallback(te=>{C(jn({handler:l,reactEvent:te}))},[C,l]),le=S.useCallback(te=>{C(jn({handler:c,reactEvent:te}))},[C,c]),ue=S.useCallback(te=>{C(jn({handler:f,reactEvent:te}))},[C,f]),pe=S.useCallback(te=>{C(jn({handler:y,reactEvent:te}))},[C,y]),xe=S.useCallback(te=>{C(jn({handler:w,reactEvent:te}))},[C,w]),we=S.useCallback(te=>{T&&C(u5(te)),C(jn({handler:b,reactEvent:te}))},[C,T,b]),_e=S.useCallback(te=>{C(jn({handler:x,reactEvent:te}))},[C,x]),de=Vne(E);return S.createElement(JD.Provider,{value:R},S.createElement(WR.Provider,{value:M},S.createElement(de,{width:H??(N==null?void 0:N.width),height:ie??(N==null?void 0:N.height),className:Xe("recharts-wrapper",n),style:zne({position:"relative",cursor:"default",width:H,height:ie},N),onClick:G,onContextMenu:X,onDoubleClick:le,onFocus:re,onBlur:oe,onKeyDown:L,onMouseDown:ue,onMouseEnter:k,onMouseLeave:q,onMouseMove:J,onMouseUp:pe,onTouchEnd:_e,onTouchMove:we,onTouchStart:xe,ref:Z},S.createElement(Hne,null),r)))}),Xne=["width","height","responsive","children","className","style","compact","title","desc"];function Wne(e,t){if(e==null)return{};var r,n,i=Zne(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 Zne(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 Jne=S.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:o,className:l,style:c,compact:f,title:h,desc:p}=e,g=Wne(e,Xne),y=zn(g);return f?S.createElement(S.Fragment,null,S.createElement(jd,{width:r,height:n}),S.createElement(t2,{otherAttributes:y,title:h,desc:p},o)):S.createElement(Qne,{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(t2,{otherAttributes:y,title:h,desc:p,ref:t},S.createElement(bee,null,o)))});function Ib(){return Ib=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},Ib.apply(null,arguments)}function n2(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 eae(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(r),!0).forEach(function(n){tae(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tae(e,t,r){return(t=rae(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rae(e){var t=nae(e,"string");return typeof t=="symbol"?t:t+""}function nae(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 aae={top:5,right:5,bottom:5,left:5},iae=eae({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:aae,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},d5),h5=S.forwardRef(function(t,r){var n,i=fr(t.categoricalChartProps,iae),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:h}=t,p={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return S.createElement(One,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:o},S.createElement(hee,{chartData:h.data}),S.createElement(Ane,{layout:i.layout,margin:i.margin}),S.createElement(Pne,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),S.createElement(Tne,{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(Jne,Ib({},i,{ref:r})))}),sae=["axis"],oae=S.forwardRef((e,t)=>S.createElement(h5,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:sae,tooltipPayloadSearcher:ek,categoricalChartProps:e,ref:t})),lae=["axis","item"],m5=S.forwardRef((e,t)=>S.createElement(h5,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:lae,tooltipPayloadSearcher:ek,categoricalChartProps:e,ref:t}));const p5="Uncategorized";function g5(e){const t=e==null?void 0:e.replace(/\\/g,"/").split("/").map(r=>r.trim()).filter(r=>r.length>0).join("/");return t&&t.length>0?t:p5}function uae(e,t){const r=new Map,n=o=>{const l=r.get(o);if(l)return l;const c={results:[],suites:new Set,children:new Set};return r.set(o,c),c};for(const o of e){const l=g5(o.category),c=o.suite??"Uncategorized",f=cae(l);for(const h of f){const p=n(h);p.results.push(o),p.suites.add(c)}for(let h=1;h<f.length;h++)n(f[h-1]).children.add(f[h])}const i=new Map([...r.entries()].map(([o,l])=>[o,hae(o,l,t)]));return[...i.values()].filter(o=>!o.parent).sort(v5).map(o=>y5(o,r,i))}function cae(e){const t=e.split("/").filter(r=>r.length>0);return t.length===0?[p5]:t.map((r,n)=>t.slice(0,n+1).join("/"))}function dae(e){const t=e.split("/");return t.length>1?t.slice(0,-1).join("/"):void 0}function fae(e){return e.split("/").at(-1)??e}function hae(e,t,r){const n=ep(t.results,r),i=dae(e);return{name:e,label:fae(e),...i&&{parent:i},depth:e.split("/").filter(Boolean).length-1,total:n.total,passed:n.passed,failed:n.failed,executionErrors:n.executionErrors,avgScore:n.avgScore,suiteCount:t.suites.size,childCount:t.children.size,children:[]}}function y5(e,t,r){var i;const n=[...((i=t.get(e.name))==null?void 0:i.children)??[]].map(o=>r.get(o)).filter(o=>!!o).sort(v5).map(o=>y5(o,t,r));return{...e,children:n}}function v5(e,t){return e.name.localeCompare(t.name)}const Di="",$b=[{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}],cx=10;function mae(e,t,r=new Date){const n=pae(e),i=yae(e,n),o=vae(n.flatMap(g=>g.category?jae(g.category):[])),l=o.length>0,c=n.some(g=>g.startedAtMs!==void 0),f=$b.find(g=>g.value===t.timePeriod)??$b[0],h=f.windowMs===void 0?void 0:r.getTime()-f.windowMs,p=n.filter(g=>t.experiment&&g.experiment!==t.experiment||t.category&&!wae(g.category,t.category)?!1:h!==void 0?g.startedAtMs!==void 0&&g.startedAtMs>=h:!0);return{buckets:xae(p.map(g=>g.score)),experimentOptions:i,categoryOptions:o,totalScores:n.length,filteredScores:p.length,categoryAvailable:l,hasTimestampedScores:c}}function pae(e){return e.runs&&e.runs.length>0?e.runs.flatMap(t=>gae(t)):e.cells.flatMap(t=>t.tests.flatMap(r=>{const n=x5(r,t.experiment);return n?[n]:[]}))}function gae(e){const t=Sae(e.started_at);return e.tests.flatMap(r=>{const n=x5(r,e.experiment);return n?[{...n,startedAtMs:t}]:[]})}function x5(e,t){if(!Number.isFinite(e.score))return;const r=bae(e.category);return{score:e.score,experiment:t,...r&&{category:r}}}function yae(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 vae(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 xae(e){if(e.length===0)return[];const t=Array.from({length:cx},(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*cx),cx-1);t[i].count++}return t}function bae(e){const t=e==null?void 0:e.trim();return t?g5(t):void 0}function jae(e){const t=e.split("/").filter(r=>r.length>0);return t.map((r,n)=>t.slice(0,n+1).join("/"))}function wae(e,t){return e!==void 0&&(e===t||e.startsWith(`${t}/`))}function Sae(e){const t=Date.parse(e);return Number.isFinite(t)?t:void 0}const _t={green:"#34d399",red:"#f87171",gray:"#4b5563",cyan:"#22d3ee",gridLine:"#1f2937",labelText:"#9ca3af"},a2=["#22d3ee","#34d399","#facc15","#f87171","#a78bfa","#fb923c","#f472b6","#60a5fa"];function Nae(e){return a2[e%a2.length]}function _ae({data:e,projectId:t}){const[r,n]=S.useState(!0),[i,o]=S.useState(""),l=e.targets,c=Ue(t?PR(t,i||void 0):QB(i||void 0)),f=i?c.data:void 0,h=S.useMemo(()=>Pae(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(Oae,{data:f,baseline:i}),i&&f&&d.jsx(Eae,{data:f,baseline:i}),d.jsx(Aae,{data:e}),h.length>1&&l.length>0&&d.jsx(Rae,{data:h,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 rS({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 nd({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 Oae({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(nd,{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(nd,{title:"Normalized Gain (g)",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx($j,{width:"100%",height:Math.max(200,n.length*32),children:d.jsxs(m5,{data:n,layout:"vertical",margin:{left:120,right:20,top:5,bottom:5},children:[d.jsx(Fp,{strokeDasharray:"3 3",stroke:_t.gridLine,horizontal:!1}),d.jsx(Kp,{type:"number",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Gp,{type:"category",dataKey:"name",tick:{fill:_t.labelText,fontSize:11},width:120,axisLine:{stroke:_t.gridLine}}),d.jsx(Hw,{content:d.jsx(rS,{})}),d.jsx(Jw,{dataKey:"g",name:"Normalized Gain",children:n.map(i=>d.jsx(Fw,{fill:i.isNull?_t.gray:i.g>0?_t.green:i.g<0?_t.red:_t.gray},i.name))})]})})})})}function Eae({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(nd,{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 i2={experiment:Di,category:Di,timePeriod:"all"};function Aae({data:e}){const[t,r]=S.useState(i2),n=S.useMemo(()=>mae(e,t),[e,t]);S.useEffect(()=>{r(h=>{const p=!h.experiment||n.experimentOptions.some(x=>x.value===h.experiment),g=!h.category||n.categoryOptions.some(x=>x.value===h.category),y=h.timePeriod==="all"||n.hasTimestampedScores;return p&&g&&y?h:{experiment:p?h.experiment:Di,category:g?h.category:Di,timePeriod:y?h.timePeriod:"all"}})},[n.experimentOptions,n.categoryOptions,n.hasTimestampedScores]);const i=(h,p)=>{r(g=>({...g,[h]:p}))},o=()=>r(i2),l=t.experiment!==Di||t.category!==Di||t.timePeriod!=="all",c=n.totalScores>0,f=Cae(n,t);return d.jsx(nd,{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(dx,{id:"score-distribution-experiment",label:"Experiment",value:t.experiment,onChange:h=>i("experiment",h),disabled:n.experimentOptions.length===0,children:[d.jsx("option",{value:Di,children:"All experiments"}),n.experimentOptions.map(h=>d.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),d.jsxs(dx,{id:"score-distribution-category",label:"Category",value:t.category,onChange:h=>i("category",h),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(h=>d.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),d.jsx(dx,{id:"score-distribution-time",label:"Time period",value:t.timePeriod,onChange:h=>i("timePeriod",h),disabled:!n.hasTimestampedScores,help:n.hasTimestampedScores||!c?void 0:"Recent windows need run timestamps from compare data.",children:$b.map(h=>d.jsx("option",{value:h.value,children:h.label},h.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($j,{width:"100%",height:200,children:d.jsxs(m5,{data:n.buckets,margin:{left:10,right:10,top:5,bottom:5},children:[d.jsx(Fp,{strokeDasharray:"3 3",stroke:_t.gridLine,vertical:!1}),d.jsx(Kp,{dataKey:"range",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Gp,{tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Hw,{content:d.jsx(rS,{})}),d.jsx(Jw,{dataKey:"count",name:"Tests",fill:_t.cyan,radius:[2,2,0,0]})]})})}):d.jsx(Tae,{message:f})]})})}function dx({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 Tae({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 Cae(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 Pae(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 Rae({data:e,targets:t}){return d.jsx(nd,{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($j,{width:"100%",height:250,children:d.jsxs(oae,{data:e,margin:{left:10,right:20,top:5,bottom:5},children:[d.jsx(Fp,{strokeDasharray:"3 3",stroke:_t.gridLine}),d.jsx(Kp,{dataKey:"date",tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Gp,{domain:[0,1],tick:{fill:_t.labelText,fontSize:11},axisLine:{stroke:_t.gridLine}}),d.jsx(Hw,{content:d.jsx(rS,{})}),d.jsx(E3,{wrapperStyle:{fontSize:12,color:_t.labelText}}),t.map((r,n)=>d.jsx(Yk,{type:"monotone",dataKey:r,stroke:Nae(n),strokeWidth:2,dot:{r:3},connectNulls:!0},r))]})})})})}function an({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 b5({data:e,isLoading:t,isError:r,error:n,projectId:i}){var h;const[o,l]=S.useState("aggregated"),c=((h=e==null?void 0:e.runs)==null?void 0:h.length)??0,f=e&&e.cells.length>0;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(Mae,{mode:o,onModeChange:l,runsCount:c}),t&&d.jsx(Yae,{}),!t&&r&&n&&d.jsx(Kae,{message:`Failed to load comparison data: ${n.message}`}),!t&&!r&&!f&&d.jsx(Gae,{}),!t&&!r&&f&&e&&d.jsxs(d.Fragment,{children:[o==="aggregated"&&d.jsx(kae,{data:e,projectId:i}),o==="per-run"&&d.jsx(Bae,{data:e})]})]})}function Mae({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(Dae,{mode:e,onChange:t,runsCount:r})]})}function Dae({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(s2,{active:e==="aggregated",onClick:()=>t("aggregated"),children:"Aggregated"}),d.jsxs(s2,{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 s2({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 kae({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(nS,{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(Fae,{}),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(Lae,{target:l,experiments:r,cellMap:o},l))})]})}),d.jsx(_ae,{data:e,projectId:t})]})}function Lae({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(Iae,{cell:i}):d.jsx($ae,{})},n)})]})}function Iae({cell:e}){const[t,r]=S.useState(!1),n=Math.round(e.avg_score*100),i=Bc(e),o=ur(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(an,{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(zae,{tests:e.tests})]})}function $ae(){return d.jsx("div",{className:"text-center text-gray-600",children:"—"})}function zae({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 Bae({data:e}){const t=e.runs??[],[r,n]=S.useState(new Set),[i,o]=S.useState(!1),l=h=>{n(p=>{const g=new Set(p);return g.has(h)?g.delete(h):g.add(h),g})},c=()=>n(new Set),f=S.useMemo(()=>t.filter(h=>r.has(h.run_id)),[t,r]);return t.length===0?d.jsx(nS,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):i&&f.length>=2?d.jsx(qae,{runs:f,onBack:()=>o(!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:t.length})," run",t.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:"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:t.map(h=>d.jsx(Uae,{run:h,checked:r.has(h.run_id),onToggle:()=>l(h.run_id)},h.run_id))})]})}),r.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:r.size})," ","selected"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:c,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:r.size<2,onClick:()=>o(!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 ",r.size,d.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})]})}function Uae({run:e,checked:t,onToggle:r}){const n=Math.round(e.avg_score*100),i=Bc(e),o=ur(e),l=Vae(e.run_id);return 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 ${e.run_id}`})}),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:j5(e.started_at)}),l&&d.jsx("div",{className:"text-xs text-gray-500",children:l})]}),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:i}),o>0&&d.jsxs("div",{className:"text-xs text-amber-400",children:[o," errors"]})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:d.jsx(an,{rate:e.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[n,"%"]})]})}function qae({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(Hae,{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(an,{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 Hae({run:e}){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:j5(e.started_at)}),d.jsxs("div",{className:"text-xs text-gray-500",children:[e.experiment," · ",e.target]})]})}function Fae(){return d.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",role:"note",children:[d.jsx(wh,{className:"bg-emerald-400",label:"80%+"}),d.jsx(wh,{className:"bg-yellow-400",label:"50–80%"}),d.jsx(wh,{className:"bg-red-400",label:"< 50%"}),d.jsx(wh,{className:"bg-gray-700",label:"no data"})]})}function wh({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 Kae({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 Gae(){return d.jsx(nS,{headline:"No comparison data yet",body:"Run evaluations with different experiment and target combinations to populate this view."})}function nS({headline:e,body:t}){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})]})}function Yae(){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 j5(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 Vae(e){const t=e.split("::");return t.length<2?null:t.slice(0,-1).join(" · ")}function Qae(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 Xae({project:e,canRemove:t=!1,onRemove:r}){const n=Math.round(e.pass_rate*100),i=ur(e),[o,l]=S.useState(!1),[c,f]=S.useState(!1),[h,p]=S.useState(!1),[g,y]=S.useState(null),x=S.useId(),b=S.useId(),w=S.useRef(null),N=S.useRef(null),_=S.useRef(null);S.useEffect(()=>{if(!o)return;function C(D){var $,I;const M=D.target;($=w.current)!=null&&$.contains(M)||(I=N.current)!=null&&I.contains(M)||l(!1)}function R(D){var M;D.key==="Escape"&&(l(!1),(M=w.current)==null||M.focus())}return document.addEventListener("pointerdown",C),document.addEventListener("keydown",R),()=>{document.removeEventListener("pointerdown",C),document.removeEventListener("keydown",R)}},[o]),S.useEffect(()=>{var C;c&&((C=_.current)==null||C.focus())},[c]);function E(){l(!1),y(null),f(!0)}async function T(){if(!(!r||h)){p(!0),y(null);try{await r(e)}catch(C){y(C.message),p(!1)}}}function A(){var C;h||(f(!1),y(null),(C=w.current)==null||C.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(Ee,{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.id}),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:Qae(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.id} project menu`,onClick:()=>l(C=>!C),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.id} 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:E,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:_,open:!0,"aria-modal":"true","aria-labelledby":b,tabIndex:-1,onKeyDown:C=>{C.key==="Escape"&&(C.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:b,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.id})," 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,"."]}),g?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:g}):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:h,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 T(),disabled:h,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:h?"Removing...":"Remove project"})]})]})}):null]})}function Wae(e){return e.map(t=>({path:t.path,relativePath:t.relative_path,category:t.category}))}function Zae(e){return(e.split(",").at(-1)??"").trim()}function Jae(e,t){const r=Zae(t).toLowerCase();return r?e.filter(n=>n.relativePath.toLowerCase().includes(r)||n.category.toLowerCase().includes(r)):e}function eie(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 tie(e,t,r){return t?e:aS(e,r)}function aS(e,t){return e||String(t??$c)}function rie({suiteFilter:e,testIds:t,target:r,experiment:n,thresholdInput:i,studioThreshold:o,workers:l}){const c={};e.trim()&&(c.suite_filter=e.trim()),t.length>0&&(c.test_ids=t),r&&(c.target=r),n.trim()&&(c.experiment=n.trim());const f=aS(i,o);return f&&(c.threshold=Number.parseFloat(f)),l&&(c.workers=Number.parseInt(l,10)),c}const fx="default";function jo({open:e,onClose:t,projectId:r,prefill:n}){const i=co(),o=ho(),[l,c]=S.useState((n==null?void 0:n.suiteFilter)??""),[f,h]=S.useState(""),[p,g]=S.useState((n==null?void 0:n.testIds)??[]),[y,x]=S.useState((n==null?void 0:n.target)??""),[b,w]=S.useState(fx),[N,_]=S.useState(""),[E,T]=S.useState(!1),[A,C]=S.useState(""),[R,D]=S.useState(!1),[M,$]=S.useState(null),[I,F]=S.useState(null),[H,ie]=S.useState(!1),[Z,G]=S.useState(null),{data:k}=S6(r),{data:q}=_6(r),{data:J}=fj(M,r),{data:re}=pt(r),oe=S.useMemo(()=>Wae((k==null?void 0:k.eval_files)??[]),[k]),L=S.useMemo(()=>Jae(oe,l),[oe,l]),X=S.useMemo(()=>(q==null?void 0:q.targets)??[],[q]),le=S.useMemo(()=>aS(N,re==null?void 0:re.threshold),[re==null?void 0:re.threshold,N]),ue=S.useMemo(()=>tie(N,E,re==null?void 0:re.threshold),[re==null?void 0:re.threshold,N,E]);S.useEffect(()=>{e&&(c((n==null?void 0:n.suiteFilter)??""),g((n==null?void 0:n.testIds)??[]),x((n==null?void 0:n.target)??""),w(fx),h(""),_(""),T(!1),C(""),D(!1),$(null),F(null),ie(!1),G(null))},[e,n]),S.useEffect(()=>{((J==null?void 0:J.status)==="finished"||(J==null?void 0:J.status)==="failed")&&(i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["projects"]}))},[J==null?void 0:J.status,i]);const pe=S.useCallback(()=>rie({suiteFilter:l,testIds:p,target:y,experiment:b,thresholdInput:N,studioThreshold:re==null?void 0:re.threshold,workers:A}),[b,re==null?void 0:re.threshold,l,y,p,N,A]);S.useEffect(()=>{const te=pe();if(!te.suite_filter&&(!te.test_ids||te.test_ids.length===0)){G(null);return}T6(te,r).then(je=>G(je.command)).catch(()=>G(null))},[pe,r]);function xe(){const te=f.trim();te&&!p.includes(te)&&g([...p,te]),h("")}function we(te){g(p.filter(je=>je!==te))}async function _e(){F(null),ie(!0);try{const te=pe(),je=await kR(te,r);$(je.id)}catch(te){F(te.message)}finally{ie(!1)}}if(!e)return null;if(M&&J){let te=function(){t(),o({to:TB(r)})};return d.jsx(o2,{onClose:t,title:"Eval Run",children:d.jsx(nie,{status:J,onClose:t,onRunInBackground:te,runId:M})})}const de=!!(l.trim()||p.length>0);return d.jsx(o2,{onClose:t,title:"Start",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"}),oe.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(je=>eie(je,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=>h(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),xe())},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:xe,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:()=>we(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:y,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"}),X.map(te=>d.jsx("option",{value:te,children:te},te))]})]}),d.jsx("div",{className:"rounded-md border border-gray-800 bg-gray-950/40 p-3",children:d.jsxs("div",{children:[d.jsx("label",{htmlFor:"experiment-input",className:"mb-1 block text-xs font-medium text-gray-400",children:"Experiment"}),d.jsx("input",{id:"experiment-input",type:"text",value:b,onChange:te=>w(te.target.value),placeholder:fx,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.jsxs("button",{type:"button",onClick:()=>D(!R),className:"text-sm text-gray-400 hover:text-gray-200",children:[R?"▾":"▸"," Advanced Options"]}),R&&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:ue,onChange:te=>{T(!0),_(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:A,onChange:te=>C(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"})]})]})]}),Z&&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:Z})]}),I&&d.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:I}),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:_e,disabled:!de||H,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:H?"Launching…":"Start"})]})]})})}function o2({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:"max-h-[80vh] w-full max-w-lg overflow-y-auto 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 nie({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 hx(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 aie(e){return`${e} local run${e===1?"":"s"} selected`}function iie(e,t){return`Combined ${e} local run${e===1?"":"s"} into ${t}.`}function sie(e){return`Deleted ${e} local run${e===1?"":"s"}.`}function oie(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 lie(e,t){const r=oie(e.timestamp),n=e.status==="starting"||e.status==="running",i=gj(e,{includePassRate:!1}),o=i.label,l=ur(e),c=e.test_count,f=Math.max(0,e.test_count-l),h=f>0?e.pass_rate>=t:l===0,p=Math.round(e.pass_rate*f),g=f-p,y=LR(e),x=e.runtime_source?mj(e.runtime_source):void 0,b=e.runtime_source?P6(e.runtime_source):void 0;return{run:e,ts:r,isActive:n,label:o,display:i,errors:l,totalCount:c,qualityCount:f,passing:h,passedCount:p,failedCount:g,experimentNamespace:y,runtimeSourceLabel:x,runtimeSourceTitle:b}}function Vp({runs:e,projectId:t,emptyMessage:r,hasNextPage:n=!1,isFetchingNextPage:i=!1,onLoadMore:o,enableCombine:l=!1,remoteBranch:c}){const{data:f}=pt(t),h=co(),p=(f==null?void 0:f.threshold)??$c,g=S.useRef(null),y=S.useRef(null),x=S.useRef(!1),[b,w]=S.useState([]),[N,_]=S.useState(null),[E,T]=S.useState(!1),[A,C]=S.useState(!1),R=S.useMemo(()=>e.map(k=>lie(k,p)),[p,e]),D=S.useMemo(()=>e.filter(k=>l&&!hx(k)).map(k=>k.filename),[l,e]),M=new Set(b),$=S.useMemo(()=>new Map(e.map(k=>[k.filename,k])),[e]);S.useEffect(()=>{i||(x.current=!1)},[i]),S.useEffect(()=>{if(!n||!o)return;const k=[];if(g.current&&k.push(g.current),y.current&&k.push(y.current),k.length===0)return;const q=new IntersectionObserver(J=>{J.some(re=>re.isIntersecting)&&!i&&!x.current&&(x.current=!0,o())},{rootMargin:"200px 0px"});for(const J of k)q.observe(J);return()=>q.disconnect()},[n,i,o]),S.useEffect(()=>{const k=new Set(D);w(q=>q.filter(J=>k.has(J)))},[D]);async function I(){if(t){await Promise.all([h.invalidateQueries({queryKey:["projects",t,"runs"]}),h.invalidateQueries({queryKey:["projects",t,"tags"]}),h.invalidateQueries({queryKey:["projects",t,"compare"]}),h.invalidateQueries({queryKey:["projects",t,"targets"]})]);return}await Promise.all([h.invalidateQueries({queryKey:["runs"]}),h.invalidateQueries({queryKey:["tags"]}),h.invalidateQueries({queryKey:["compare"]}),h.invalidateQueries({queryKey:["targets"]})])}async function F(){if(b.length<2||E)return;const k=[...b],q=[...new Set(k.map(re=>{var oe,L;return((L=(oe=$.get(re))==null?void 0:oe.experiment)==null?void 0:L.trim())||"default"}).filter(Boolean))].sort();let J;if(q.length>1){const re=window.prompt(`Selected runs span experiments (${q.join(", ")}). Enter a new experiment name for the combined run:`);if(re===null)return;if(J=re.trim(),!J){_({kind:"error",message:"Experiment name is required to combine runs from multiple experiments."});return}}_(null),T(!0);try{let re;try{re=await lE(k,"error",t,void 0,J)}catch(oe){if(!(oe instanceof DR)||oe.status!==409)throw oe;const L=oe.duplicates.length;if(!window.confirm(`${L} duplicate (test_id, target) pair${L===1?"":"s"} found. Replace duplicates with the latest timestamp?`))return;re=await lE(k,"latest",t,void 0,J)}w([]),_({kind:"success",message:iie(k.length,re.display_name),combinedRunId:re.run_id,sourceRunIds:k}),await I()}catch(re){_({kind:"error",message:re.message})}finally{T(!1)}}async function H(){b.length===0||A||await Z(b,"selected")}async function ie(){const k=(N==null?void 0:N.sourceRunIds)??[];k.length===0||A||await Z(k,"combined-sources")}async function Z(k,q){const J=k.length,re=J===1?"run":"runs",oe=q==="combined-sources"?`Delete the ${J} source local ${re} used for the combined run? The combined run will remain.`:`Delete ${J} local ${re}? This removes the run workspace and artifacts from disk.`;if(window.confirm(oe)){_(null),C(!0);try{for(const X of k)await b6(X,t);w([]),_({kind:"success",message:sie(J)}),await I()}catch(X){_({kind:"error",message:X.message})}finally{C(!1)}}}function G(k){w(q=>q.includes(k)?q.filter(J=>J!==k):[...q,k])}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:aie(b.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."}),N&&d.jsx("div",{className:`mt-2 rounded-md border px-3 py-2 text-sm ${N.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:N.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:N.message}),N.combinedRunId?t?d.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:t,runId:N.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):d.jsx(Ee,{to:"/runs/$runId",params:{runId:N.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):null,N.sourceRunIds&&N.sourceRunIds.length>0?d.jsx("button",{type:"button",onClick:()=>void ie(),disabled:A||E,className:"font-medium text-red-300 hover:text-red-200 hover:underline disabled:cursor-not-allowed disabled:text-gray-500",children:A?"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 H(),disabled:b.length===0||A||E,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:A?"Deleting...":"Delete selected"}),d.jsx("button",{type:"button",onClick:()=>void F(),disabled:b.length<2||E||A,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:E?"Combining...":"Combine selected"})]})]}),d.jsxs("div",{className:"space-y-2 sm:hidden",children:[R.map(k=>{const{run:q,ts:J,label:re,display:oe,errors:L,totalCount:X,passedCount:le,failedCount:ue,experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}=k,_e=hx(q),de=!_e&&D.includes(q.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:M.has(q.filename),disabled:!de,onChange:()=>G(q.filename),title:_e,"aria-label":_e?`${re}: ${_e}`:`Select ${re}`,className:"mt-1 h-4 w-4 shrink-0 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"}),d.jsx(c2,{view:k,className:"mt-1 shrink-0"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx(l2,{projectId:t,runId:q.filename,label:oe.primary,title:oe.title,className:"block truncate text-sm font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),oe.secondary?d.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-500",title:oe.title,children:oe.secondary}):null,d.jsx(die,{experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}),d.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[d.jsx(u2,{onRemote:q.on_remote===!0,branch:c}),d.jsx("span",{className:"text-xs text-gray-500",title:J.full,children:J.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(an,{rate:q.pass_rate})}),d.jsx(pl,{label:"Total",valueClassName:"text-gray-300",children:X}),d.jsx(pl,{label:"Passed",valueClassName:"text-emerald-300",children:le}),d.jsx(pl,{label:"Failures",valueClassName:"text-red-400",children:ue>0?ue:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(pl,{label:"Errors",valueClassName:"text-amber-300",children:L>0?L:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(pl,{label:"Remote",valueClassName:"text-gray-400",children:q.on_remote===!0?"On remote":"Local only"})]})]},q.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-[860px] 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-[18rem] px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"w-[16rem] px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Remote"}),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:[R.map(k=>{var je;const{run:q,ts:J,label:re,display:oe,errors:L,totalCount:X,passedCount:le,failedCount:ue,experimentNamespace:pe,runtimeSourceLabel:xe,runtimeSourceTitle:we}=k,_e=hx(q),de=!_e&&D.includes(q.filename),te=((je=q.target)==null?void 0:je.trim())||oe.primary;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:M.has(q.filename),disabled:!de,onChange:()=>G(q.filename),title:_e,"aria-label":_e?`${re}: ${_e}`:`Select ${re}`,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(c2,{view:k})}),d.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-3",children:d.jsxs("div",{className:"min-w-0",children:[d.jsx("div",{className:"truncate font-medium text-gray-200",title:`Experiment: ${pe}`,children:pe}),xe?d.jsx("div",{className:"mt-0.5 truncate text-xs text-cyan-300",title:we??xe,children:xe}):null]})}),d.jsx("td",{className:"w-[16rem] max-w-[16rem] px-4 py-3",children:d.jsx("div",{className:"min-w-0",children:d.jsx("div",{className:"flex min-w-0 items-center gap-2",children:d.jsx(l2,{projectId:t,runId:q.filename,label:te,title:oe.title,className:"block min-w-0 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline"})})})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(u2,{onRemote:q.on_remote===!0,branch:c})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:le}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:ue>0?ue:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums",children:L>0?d.jsx("span",{className:"text-amber-300",children:L}):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:X}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(an,{rate:q.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:J.full,children:J.date})]},q.filename)}),(n||i)&&d.jsx("tr",{ref:g,children:d.jsx("td",{colSpan:l?11:10,className:"px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})})]})]})})]})}function l2({projectId:e,runId:t,label:r,title:n,className:i}){return e?d.jsx(Ee,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:i,title:n,children:r}):d.jsx(Ee,{to:"/runs/$runId",params:{runId:t},className:i,title:n,children:r})}function u2({onRemote:e,branch:t}){return e?d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",title:t?`On ${t}`:"On the remote results branch","aria-label":t?`On remote branch ${t}`:"On the remote results branch",children:[d.jsx(uie,{}),"Synced"]}):d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-gray-800 bg-gray-900/70 px-2 py-0.5 text-xs font-medium text-gray-500",title:"Local only — not pushed","aria-label":"Local only — not pushed",children:[d.jsx(cie,{}),"Local only"]})}function uie(){return d.jsxs("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[d.jsx("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5 5 0 0 1 16 9a3.5 3.5 0 0 1 1 6.86"}),d.jsx("path",{d:"m9 14 2 2 4-4"})]})}function cie(){return d.jsx("svg",{viewBox:"0 0 24 24",className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:d.jsx("path",{d:"M7 18a4 4 0 0 1-.5-7.97A5 5 0 0 1 16 9a3.5 3.5 0 0 1 1 6.86"})})}function die({experimentNamespace:e,runtimeSourceLabel:t,runtimeSourceTitle:r}){return d.jsxs("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 text-[11px]",children:[d.jsxs("span",{className:"max-w-full truncate rounded-md border border-gray-800 bg-gray-950/50 px-1.5 py-0.5 text-gray-400",title:`Experiment namespace: ${e}`,children:["Experiment: ",e]}),t?d.jsxs("span",{className:"max-w-full truncate rounded-md border border-cyan-900/50 bg-cyan-950/20 px-1.5 py-0.5 text-cyan-300",title:r??t,children:["Runtime: ",t]}):null]})}function c2({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 w5({remoteStatus:e,syncInFlight:t,onSync:r,projectName:n,syncFeedback:i,onRemoteSummary:o,onConfirmMerge:l,confirmMergeInFlight:c}){var _,E;const f=(e==null?void 0:e.configured)===!0,h=$B(e,t),p=t===!0||!h.canSync,g=h.pendingMerge,y={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"}[h.tone],x=(i==null?void 0:i.kind)==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":(i==null?void 0:i.kind)==="warning"?"border-yellow-900/60 bg-yellow-950/20 text-yellow-300":"border-red-900/60 bg-red-950/20 text-red-300",b=((_=e==null?void 0:e.dirty_paths)==null?void 0:_.length)??0,w=((E=e==null?void 0:e.conflicted_paths)==null?void 0:E.length)??0,N=LB(e,n,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.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-sm font-medium text-gray-200",children:"Recent Runs"}),f&&o?d.jsx("p",{className:"mt-0.5 text-xs text-gray-500",children:o}):null]}),f?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 ${y}`,children:h.label}),r?d.jsx("button",{type:"button",onClick:r,disabled:p,title:h.canSync?void 0:h.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:t?"Syncing...":h.actionLabel}):null]}):null]}),f?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:N.map(T=>d.jsx("span",{children:T},T))}),d.jsx("p",{className:h.tone==="danger"?"text-red-300":"text-gray-400",children:h.summary}),h.nextAction?d.jsx("p",{className:"text-xs text-gray-500",children:h.nextAction}):null,b>0||w>0?d.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[b>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:[b," dirty path",b===1?"":"s"]}):null,w>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:[w," conflicted path",w===1?"":"s"]}):null]}):null]}):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."]}),g?d.jsxs("div",{className:"space-y-2 rounded-md border border-yellow-900/60 bg-yellow-950/20 px-3 py-2.5 text-sm text-yellow-200",children:[d.jsx("p",{className:"font-medium text-yellow-300",children:"Pending merge on GitHub"}),d.jsxs("p",{className:"text-yellow-200/90",children:["Local results were pushed to"," ",d.jsx("code",{className:"rounded bg-yellow-950/60 px-1 font-mono text-xs text-yellow-200",children:g.tempBranch})," ","instead of force-pushing"," ",d.jsx("code",{className:"rounded bg-yellow-950/60 px-1 font-mono text-xs text-yellow-200",children:g.targetBranch}),typeof g.contributedRunCount=="number"?` (${g.contributedRunCount} run${g.contributedRunCount===1?"":"s"})`:"",". Merge it on GitHub, then resync."]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-0.5",children:[g.compareUrl?d.jsx("a",{href:g.compareUrl,target:"_blank",rel:"noreferrer noopener",className:"rounded-md border border-yellow-700 bg-yellow-950/40 px-3 py-1.5 text-sm font-medium text-yellow-200 transition-colors hover:bg-yellow-900/40",children:"Open merge on GitHub ↗"}):null,l?d.jsx("button",{type:"button",onClick:l,disabled:c===!0||t===!0,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:c?"Resyncing...":"I merged it — resync"}):null]})]}):null,i?d.jsx("div",{className:`rounded-md border px-3 py-2 text-sm ${x}`,role:i.kind==="error"?"alert":"status",children:i.message}):null,e!=null&&e.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:e.last_error}),d.jsx("p",{className:"mt-1 text-xs text-red-200/80",children:sj(e)})]}):null,e!=null&&e.git_diff_summary&&h.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:e.git_diff_summary}):null]})}function S5({projectId:e,tagKey:t,onTagKeyChange:r}){const{data:n}=Ue(e?VB(e):YB),i=(n==null?void 0:n.keys)??[xl],o=i.includes(t),l=o?t:i.includes(xl)?xl:i[0]??xl;S.useEffect(()=>{n&&!o&&l!==t&&r(l)},[n,o,l,t,r]);const{data:c,isLoading:f}=Ue(e?uj(e,l):lj(l)),h=(c==null?void 0:c.groups)??[];return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("label",{htmlFor:"tag-key-select",className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Group by"}),d.jsx("select",{id:"tag-key-select",value:l,onChange:p=>r(p.target.value),className:"rounded-md border border-gray-700 bg-gray-900 px-2 py-1 text-sm text-gray-200 focus:border-cyan-700 focus:outline-none",children:i.map(p=>d.jsx("option",{value:p,children:Zi(p)},p))})]}),f?d.jsx(fie,{}):h.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsxs("p",{className:"text-lg text-gray-400",children:["No values found for tag `",l,"`"]}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Values will appear here once evaluations are run with a ",d.jsx("code",{children:l})," tag."]})]}):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:Zi(l)}),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:h.map(p=>{const g=Bc(p),y=ur(p);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(Ee,{to:"/projects/$projectId/tags/$key/$value",params:{projectId:e,key:l,value:p.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p.name}):d.jsx(Ee,{to:"/tags/$key/$value",params:{key:l,value:p.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:p.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:p.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:p.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:p.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),g]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:y>0?y:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(an,{rate:p.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:d2(p.last_run).full,children:d2(p.last_run).date})]},p.name)})})]})})]})}function d2(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 fie(){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))]})})}const f2="remote::";function hie(e){return e.startsWith(f2)?e.slice(f2.length):e}function Qp(e){const t=new Map;for(const r of e){const n=hie(r.filename),i=t.get(n);if(!i){t.set(n,r);continue}const o=i.source==="remote"&&r.source==="local"?r:i;t.set(n,{...o,on_remote:i.on_remote===!0||r.on_remote===!0})}return[...t.values()]}function N5({projectId:e}={}){var g,y;const[t,r]=S.useState(null),n=Ue(e?v6(e):WB),i=Ue(e?dj(e):oj),o=((g=n.data)==null?void 0:g.targets)??[],l=((y=i.data)==null?void 0:y.runs)??[],c=n.error??i.error,f=n.isLoading||i.isLoading,h=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(!h)return[];const x=new Map;for(const b of l){if((b.target??"default")!==h.name)continue;const N=b.experiment??"default",_=x.get(N)??[];_.push(b),x.set(N,_)}return[...x.entries()].map(([b,w])=>mie(b,Qp(w))).sort((b,w)=>b.latestTimestamp&&w.latestTimestamp&&b.latestTimestamp!==w.latestTimestamp?w.latestTimestamp.localeCompare(b.latestTimestamp):b.latestTimestamp?-1:w.latestTimestamp?1:b.name.localeCompare(w.name))},[l,h]);return f?d.jsx(yie,{}):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."})]}):h?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:h.name}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[h.run_count," run",h.run_count===1?"":"s"," ·"," ",h.experiment_count," experiment",h.experiment_count===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:h.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),Bc(h)," evals passed",ur(h)>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",ur(h)," execution errors"]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(an,{rate:h.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:pie(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 ",gie(x.latestTimestamp)]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(an,{rate:x.passRate})})]}),d.jsx(Vp,{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 b=Bc(x),w=ur(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(an,{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:b})]}),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 mie(e,t){let r=0,n=0,i=0,o=0,l=null;for(const c of t){const f=ur(c),h=Math.max(0,c.test_count-f);r+=c.test_count,n+=h,o+=f,i+=Math.round(c.pass_rate*h),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 pie(e){return e==="default"?"Default experiment":e}function gie(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 yie(){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 h2=[{id:"runs",label:"🏃 Recent Runs"},{id:"tags",label:"🏷️ Tags"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Targets"}],vie=dr("/")({component:xie});function xie(){const e=ho(),n=rj().location.search.tab,{data:i,isLoading:o}=cj(),{data:l,isLoading:c}=pt(),f=(i==null?void 0:i.projects)??[],[h,p]=S.useState(void 0);S.useEffect(()=>{if(o||c)return;const y=l==null?void 0:l.current_project_id;if(!y){p(null);return}const x=EB(y),b=typeof window<"u"&&window.sessionStorage.getItem(x)==="1",w=CB(f.map(N=>N.id),y,b);typeof window<"u"&&w&&window.sessionStorage.setItem(x,"1"),p(w??null)},[l==null?void 0:l.current_project_id,c,f,o]);const g=PB(f.map(y=>y.id),l==null?void 0:l.project_dashboard,h??void 0,n);return S.useEffect(()=>{g.kind==="redirect"&&g.redirectPath&&e({to:g.redirectPath,replace:!0})},[g,e]),o||c||h===void 0?d.jsx(zb,{}):g.kind==="redirect"?d.jsx(zb,{}):g.kind==="dashboard"?d.jsx(bie,{}):d.jsx(jie,{})}function bie(){const{data:e}=cj(),{data:t}=pt(),r=co(),[n,i]=S.useState(!1),[o,l]=S.useState(!1),[c,f]=S.useState(null),h=(e==null?void 0:e.projects)??[],p=(t==null?void 0:t.read_only)===!0;async function g(y){await d6(y.id),r.setQueryData(["projects"],x=>x&&{projects:x.projects.filter(b=>b.id!==y.id)}),f(`Project removed from Dashboard: ${y.id}. 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:"Start"}),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}),h.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, tags, analytics, and targets."})]}):d.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:h.map(y=>d.jsx(Xae,{project:y,canRemove:!p,onRemove:g},y.id))}),!p&&d.jsx(jo,{open:o,onClose:()=>l(!1)}),!p&&d.jsx(nU,{open:n,onClose:()=>i(!1),onAdded:y=>{f(`Project registered: ${y.id}`),r.invalidateQueries({queryKey:["projects"]})}})]})}function jie(){var ie;const t=rj().location.search,r=t.tab,n=(ie=t.key)!=null&&ie.trim()?t.key:xl,i=ho(),o=co(),{data:l,isLoading:c,error:f,hasNextPage:h,fetchNextPage:p,isFetchingNextPage:g}=a6(),{data:y}=Zm(),{data:x}=pt(),[b,w]=S.useState(!1),[N,_]=S.useState(!1),[E,T]=S.useState(!1),[A,C]=S.useState(null),R=(x==null?void 0:x.read_only)===!0,D=h2.some(Z=>Z.id===r)?r:"runs",M=Qp((l==null?void 0:l.runs)??[]),$=M.filter(Z=>Z.on_remote===!0).length,I=(y==null?void 0:y.configured)===!0?OR($,M.length,y.branch):void 0;async function F(){_(!0),C(null);try{const Z=await RR();o.setQueryData(Ic().queryKey,Z),C(Hh(Z)),Promise.all([o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["tags"]}),o.invalidateQueries({queryKey:["compare"]}),o.invalidateQueries({queryKey:["targets"]}),o.invalidateQueries({queryKey:["remote-status",""]})]).catch(()=>{})}catch(Z){C(Fh(Z,y)),o.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{_(!1)}}S.useEffect(()=>{if((A==null?void 0:A.kind)!=="success")return;const Z=window.setTimeout(()=>C(null),7e3);return()=>window.clearTimeout(Z)},[A]);async function H(){T(!0),C(null);try{const Z=await MR();o.setQueryData(Ic().queryKey,Z),C(Hh(Z)),Promise.all([o.invalidateQueries({queryKey:["runs"]}),o.invalidateQueries({queryKey:["tags"]}),o.invalidateQueries({queryKey:["compare"]}),o.invalidateQueries({queryKey:["targets"]}),o.invalidateQueries({queryKey:["remote-status",""]})]).catch(()=>{})}catch(Z){C(Fh(Z,y)),o.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{T(!1)}}return 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"}),(x==null?void 0:x.project_name)&&d.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:x.project_name})]}),!R&&d.jsx("button",{type:"button",onClick:()=>w(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"Start"})]}),d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:flex-nowrap",children:h2.map(Z=>d.jsx("button",{type:"button",onClick:()=>i({to:"/",search:Z.id==="tags"?{tab:Z.id,key:n}:{tab:Z.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${D===Z.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:Z.label},Z.id))})}),D==="runs"&&d.jsx(Sie,{runs:M,isLoading:c,error:f,remoteStatus:y,syncInFlight:N,syncFeedback:A,onSyncRemote:F,onConfirmMerge:H,confirmMergeInFlight:E,projectName:x==null?void 0:x.project_name,onRemoteSummary:I,hasNextPage:h,isFetchingNextPage:g,onLoadMore:()=>void p(),readOnly:R}),D==="tags"&&d.jsx(S5,{tagKey:n,onTagKeyChange:Z=>i({to:"/",search:{tab:"tags",key:Z}})}),D==="analytics"&&d.jsx(wie,{readOnly:R}),D==="targets"&&d.jsx(N5,{}),!R&&d.jsx(jo,{open:b,onClose:()=>w(!1)})]})}function wie({readOnly:e}){const{data:t,isLoading:r,isError:n,error:i}=i6();return d.jsx(b5,{data:t,isLoading:r,isError:n,error:i,readOnly:e})}function Sie({runs:e,isLoading:t,error:r,remoteStatus:n,syncInFlight:i,syncFeedback:o,onSyncRemote:l,onConfirmMerge:c,confirmMergeInFlight:f,projectName:h,onRemoteSummary:p,hasNextPage:g,isFetchingNextPage:y,onLoadMore:x,readOnly:b}){return t?d.jsx(zb,{}):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(Nie,{}),d.jsx(w5,{remoteStatus:n,syncInFlight:i,onSync:l,projectName:h,syncFeedback:o,onRemoteSummary:p,onConfirmMerge:c,confirmMergeInFlight:f}),d.jsx(Vp,{runs:e,enableCombine:!b,remoteBranch:n==null?void 0:n.branch,hasNextPage:g,isFetchingNextPage:y,onLoadMore:x})]})}function Nie(){const{data:e}=hj(),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(Ee,{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 zb(){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 _5(e){return e==="finished"||e==="failed"}function _ie(e,t){return t||!e?!1:!_5(e)}function Oie(e,t,r,n){return t||n&&!_5(n)?!1:!!(e.some(i=>i.executionStatus==="execution_error")||r!==void 0&&e.length<r)}function Eie(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 Aie(e){const t=!e.ready||e.busy!==null;return[{mode:"rerun",label:"Re-run",title:e.ready?"Re-run failed or missing work, keep passing results":e.disabledReason,disabled:t,testId:"rerun-failed-menu-item"},{mode:"resume",label:"Resume",title:e.ready?"Resume missing or errored work":e.disabledReason,disabled:t,testId:"resume-run-menu-item"}]}function O5({results:e,runDir:t,suiteFilter:r,target:n,projectId:i,isReadOnly:o,plannedTestCount:l,runStatus:c}){const f=ho(),h=S.useRef(null),[p,g]=S.useState(null),[y,x]=S.useState(null),[b,w]=S.useState(!1),N=Oie(e,o,l,c),_=!!t&&!!r,T=Aie({ready:_,busy:p,disabledReason:t?r?"":"Original eval file path missing from summary.json — cannot determine what to resume":"Run directory unavailable (remote run cannot be resumed in place)"});if(S.useEffect(()=>{if(!b)return;function C(D){h.current&&!h.current.contains(D.target)&&w(!1)}function R(D){D.key==="Escape"&&w(!1)}return document.addEventListener("pointerdown",C),document.addEventListener("keydown",R),()=>{document.removeEventListener("pointerdown",C),document.removeEventListener("keydown",R)}},[b]),!N)return null;async function A(C){if(!(!_||!t||!r)){w(!1),g(C),x(null);try{const R=Eie({mode:C,runDir:t,suiteFilter:r,target:n}),D=await kR(R,i);f(i?{to:"/projects/$projectId/jobs/$runId",params:{projectId:i,runId:D.id}}:{to:"/jobs/$runId",params:{runId:D.id}})}catch(R){x(R instanceof Error?R.message:"Failed to launch resume"),g(null)}}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",ref:h,children:[d.jsxs("div",{className:"relative",children:[d.jsx("button",{type:"button",onClick:()=>w(C=>!C),disabled:p!==null,"aria-haspopup":"menu","aria-expanded":b,className:"rounded-md border border-gray-700 bg-gray-900 px-3 py-1.5 text-sm font-medium text-gray-200 hover:border-gray-600 hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"run-actions-menu-button",children:p==="resume"?"Resuming...":p==="rerun"?"Re-running...":"Actions"}),b&&d.jsx("div",{className:"absolute left-0 z-20 mt-2 w-48 overflow-hidden rounded-md border border-gray-700 bg-gray-950 py-1 text-sm shadow-xl shadow-black/30 sm:left-auto sm:right-0",role:"menu","aria-label":"Run actions",children:T.map(C=>d.jsx("button",{type:"button",role:"menuitem",onClick:()=>void A(C.mode),disabled:C.disabled,title:C.title,className:"block w-full px-3 py-2 text-left text-gray-200 hover:bg-gray-800 disabled:cursor-not-allowed disabled:text-gray-500","data-testid":C.testId,children:C.label},C.mode))})]}),y&&d.jsx("p",{className:"text-xs text-red-400",children:y})]})}function E5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function A5(e){return typeof e=="string"&&e.trim().length>0?e.trim():void 0}function Tie(e){const t=A5(e);if(t)try{const r=new URL(t);return!["http:","https:"].includes(r.protocol)||r.username||r.password?void 0:(r.search="",r.hash="",r.toString())}catch{return}}function Cie(e){const t=A5(e.provider);return t===void 0||t.toLowerCase()==="phoenix"}function Pie(e){if(e)return{provider:e.external_trace_provider??e["external_trace.provider"],ui_url:e.external_trace_ui_url??e.external_trace_url??e["external_trace.ui_url"]??e["external_trace.url"]}}function Rie(e){const t=e,r=E5(e.metadata)?e.metadata:void 0;return[t.external_trace,t.externalTrace,r==null?void 0:r.external_trace,r==null?void 0:r.externalTrace,Pie(r)]}function Mie(e){for(const t of e)for(const r of Rie(t)){if(!E5(r)||!Cie(r))continue;const n=Tie(r.ui_url??r.uiUrl??r.url??r.href);if(n)return n}}const T5=[{id:"all",label:"All"},{id:"passing",label:"Passing"},{id:"failing",label:"Failing"},{id:"errors",label:"Errors"},{id:"grader_errors",label:"Grader errors"}],C5="all",P5="all";function zt(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function m2(e){return[...new Set([...e].filter(t=>t.trim().length>0))].sort((t,r)=>t.localeCompare(r))}function R5(e,t){return zt(e.name)??zt(e.type)??`Grader ${t+1}`}function M5(e,t){var r,n;return e.verdict==="fail"||e.score<t||(r=e.assertions)!=null&&r.some(i=>!i.passed)?!0:((n=e.scores)==null?void 0:n.some(i=>M5(i,t)))??!1}function D5(e){if(!e||e.length===0)return[];const t=[];return e.forEach((r,n)=>{t.push(R5(r,n),r.type??"",r.verdict??"");for(const i of r.assertions??[])t.push(i.text,i.evidence??"");t.push(...D5(r.scores))}),t.filter(r=>r.length>0)}function Bb(e){return!e||e.length===0?[]:e.flatMap(t=>[...t.assertions??[],...Bb(t.scores)])}function Die(e){const t=new Set;return e.filter(r=>{const n=`${r.text}\0${r.evidence??""}\0${r.passed}`;return t.has(n)?!1:(t.add(n),!0)})}function kie(e){const t=new Map;return e==null||e.forEach((r,n)=>{const i=R5(r,n);t.has(i)||t.set(i,r)}),t}function Lie(e){const t=e.tokenUsage;if(!t)return;const r=[t.input,t.output,t.reasoning,t.cached].filter(n=>typeof n=="number"&&Number.isFinite(n));if(r.length!==0)return r.reduce((n,i)=>n+i,0)}function mx(e){return e.filter(t=>typeof t=="number"&&Number.isFinite(t))}function kh(e){return e.attempts??e.trials??[]}function Iie(e,t){return e.verdict==="pass"?!0:e.verdict==="fail"?!1:typeof e.score=="number"?e.score>=t:!1}function $ie(e){return[e.metrics_path,e.timing_path,e.grading_path,e.transcript_path,e.answer_path].filter(Boolean).length}function zie(e){const t=zt(e.model);if(t)return t;const r=e.metadata;if(r)return zt(r.model)??zt(r.model_name)??zt(r.target_model)??zt(r.provider_model)}function Bie(e){const t=zt(e.target)??"default",r=zt(e.targetUsed);return r&&r!==t?`${t} -> ${r}`:t}function Uie(e){return zt(e.eval_path)??zt(e.suite)}function qie(e,t){const r=zt(e.result_dir);return r?`result_dir:${r}`:["result",zt(e.eval_path)??zt(e.suite)??"",e.testId,zt(e.target)??"",zt(e.targetUsed)??"",zt(e.timestamp)??"",String(t)].join(":")}function Hie(e,t,r){var N;const n=GR(e),i=!n&&e.score>=r,o=n?"error":i?"passing":"failing",l=kie(e.scores),c=[...l.keys()],f=((N=e.scores)==null?void 0:N.some(_=>M5(_,r)))??!1,h=zie(e),p=Bie(e),g=Uie(e),y=zt(e.suite),x=zt(e.category),b=Lie(e),w=[e.testId,p,h??"",g??"",y??"",x??"",e.executionStatus??"",e.error??"",...D5(e.scores),...(e.assertions??[]).flatMap(_=>[_.text,_.evidence??""])];return{key:qie(e,t),result:e,index:t,testId:e.testId,status:o,statusLabel:n?"Error":i?"Passing":"Failing",passing:i,executionError:n,graderError:f,targetLabel:p,...h&&{modelLabel:h},...g&&{evalLabel:g},...x&&{categoryLabel:x},...b!==void 0&&{tokenTotal:b},graderNames:c,graderScores:l,searchText:w.join(" ").toLowerCase()}}function Fie(e,t){const r=kh(e.result).filter(g=>g.attempt_path||g.run_path||g.verdict);if(r.length<=1)return;const n=r.filter(g=>Iie(g,t)).length,i=r.filter(g=>g.execution_status==="execution_error").length,o=mx(r.map(g=>g.duration_ms)),l=mx(r.map(g=>g.score)),c=mx(r.map(g=>g.total_tool_calls)),f=r.reduce((g,y)=>g+$ie(y),0),h=Die([...e.result.assertions??[],...Bb(e.result.scores),...r.flatMap(g=>[...g.assertions??[],...Bb(g.scores)])]),p=h.filter(g=>g.passed).length;return{row:e,trials:r,trialCount:r.length,passedTrials:n,failedTrials:r.length-n,executionErrorTrials:i,passRate:r.length>0?n/r.length:0,meanScore:l.length>0?l.reduce((g,y)=>g+y,0)/l.length:e.result.score,assertionCount:h.length,passedAssertions:p,...h.length>0&&{assertionPassRate:p/h.length},...o.length>0&&{meanDurationMs:o.reduce((g,y)=>g+y,0)/o.length},...c.length>0&&{totalToolCalls:c.reduce((g,y)=>g+y,0)},artifactCount:f}}function Kie(e,t){const r=e.some(h=>kh(h.result).length>1),n=e.some(h=>h.evalLabel),i=e.some(h=>h.categoryLabel),o=e.some(h=>h.result.durationMs!=null||kh(h.result).some(p=>p.duration_ms!=null)),l=e.some(h=>h.result.costUsd!=null||h.tokenTotal!=null||kh(h.result).some(p=>p.cost_usd!=null||p.total_tokens!=null||p.token_usage!=null)),c=e.some(h=>h.result.error);return[{id:"status",label:"Status",kind:"base",defaultVisible:!0},...r?[{id:"expander",label:"Expand",kind:"base",defaultVisible:!0}]:[],{id:"test",label:"Test ID",kind:"base",defaultVisible:!0},{id:"target",label:"Target",kind:"base",defaultVisible:!0},...n?[{id:"eval",label:"Eval",kind:"base",defaultVisible:!0}]:[],{id:"score",label:"Score",kind:"base",defaultVisible:!0},...i?[{id:"category",label:"Category",kind:"base",defaultVisible:!1}]:[],...o?[{id:"duration",label:"Duration",kind:"base",defaultVisible:!0}]:[],...l?[{id:"cost_tokens",label:"Cost / Tokens",kind:"base",defaultVisible:!0}]:[],...c?[{id:"error",label:"Error",kind:"base",defaultVisible:!1}]:[],...t.map(h=>({id:`grader:${h}`,label:h,kind:"grader",defaultVisible:!0}))]}function Gie(e){return e==="scorer_errors"?"grader_errors":T5.some(t=>t.id===e)?e:"all"}function Yie(e){const t=e.filter(r=>r.defaultVisible).map(r=>r.id);return t.length>0?t:e.slice(0,4).map(r=>r.id)}function Vie(e,t){if(!t.some(l=>l.id==="expander"))return[...e];if(e.includes("expander")||!e.includes("test"))return[...e];const r=[...e],n=r.indexOf("status"),i=r.indexOf("test"),o=n>=0?n+1:i;return r.splice(o,0,"expander"),r}function Qie(e,t,r,n){var p,g;const i=new Set(t.map(y=>y.id)),o=((p=e==null?void 0:e.visibleColumnIds)==null?void 0:p.map(y=>y.startsWith("scorer:")?`grader:${y.slice(7)}`:y).filter(y=>i.has(y)))??[],l=o.length>0?Vie(o,t):Yie(t),c=e!=null&&e.target&&r.includes(e.target)?e.target:C5,f=(e==null?void 0:e.grader)??(e==null?void 0:e.scorer),h=f&&n.includes(f)?f:P5;return{view:Gie(e==null?void 0:e.view),search:((g=e==null?void 0:e.search)==null?void 0:g.trim())??"",target:c,grader:h,visibleColumnIds:l}}function Xie(e,t){switch(t){case"passing":return e.status==="passing";case"failing":return e.status==="failing";case"errors":return e.status==="error";case"grader_errors":return e.graderError;case"all":return!0}}function Wie(e){return{all:e.length,passing:e.filter(t=>t.status==="passing").length,failing:e.filter(t=>t.status==="failing").length,errors:e.filter(t=>t.status==="error").length,grader_errors:e.filter(t=>t.graderError).length}}function Zie(e){const t=e.results.map((y,x)=>Hie(y,x,e.passThreshold)),r=m2(t.map(y=>y.targetLabel)),n=m2(t.flatMap(y=>y.graderNames)),i=Kie(t,n),o=Qie(e.state,i,r,n),l=o.search.toLowerCase(),c=new Set(o.visibleColumnIds),f=t.filter(y=>!(!Xie(y,o.view)||o.target!==C5&&y.targetLabel!==o.target||o.grader!==P5&&!y.graderScores.has(o.grader)||l&&!y.searchText.includes(l))),h=t.map(y=>Fie(y,e.passThreshold)).filter(y=>!!y),p=new Set(f.map(y=>y.key)),g=h.filter(y=>p.has(y.row.key));return{rows:t,filteredRows:f,repeatGroups:h,filteredRepeatGroups:g,columns:i,visibleColumns:i.filter(y=>c.has(y.id)),state:o,targetOptions:r,graderOptions:n,viewCounts:Wie(t)}}function Jie(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 ese(e){if(e.type==="file")return e.storage==="git"&&e.ref?e.ref:e.storage&&e.storage!=="local"?e.storage:void 0}function k5(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),r.children&&t.push(...k5(r.children)));return t}function L5({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,h=ese(e);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?"📂":"📁":Jie(e.name)}),d.jsx("span",{className:"truncate",children:e.name}),h&&d.jsx("span",{className:"ml-auto max-w-32 flex-shrink-0 truncate rounded border border-gray-700 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-gray-400",title:[e.kind?`kind: ${e.kind}`:void 0,e.ref?`ref: ${e.ref}`:void 0,e.key?`key: ${e.key}`:void 0].filter(Boolean).join(`
|
|
119
|
-
`),children:h})]}),l&&c&&e.children&&d.jsx("div",{children:e.children.map(p=>d.jsx(L5,{node:p,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o+1},p.path))})]})}function tse({files:e,selectedPath:t,onSelect:r}){const[n,i]=S.useState(()=>new Set(k5(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(L5,{node:l,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:o},l.path))]})}const rse="modulepreload",nse=function(e){return"/"+e},p2={},ase=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let l=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};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(h=>{if(h=nse(h),h in p2)return;p2[h]=!0;const p=h.endsWith(".css"),g=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":rse,p||(y.as="script"),y.crossOrigin="",y.href=h,f&&y.setAttribute("nonce",f),document.head.appendChild(y),p)return new Promise((x,b)=>{y.addEventListener("load",x),y.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${h}`)))})}))}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)})},ise=S.lazy(()=>ase(()=>import("./index-BSHoWrdr.js"),[]));function sse({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(ise,{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 Zl({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 ose={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 Hr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function lse(e){return!Hr(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 g2(e){return Hr(e)&&e.v===1&&typeof e.agent=="string"&&(e.type==="system"||e.type==="user"||e.type==="assistant")&&Array.isArray(e.content)}function use(e){const t=Hr(e.result)?e.result:void 0,r=cse(e.metadata,t==null?void 0:t.metadata);return{id:typeof e.id=="string"?e.id:void 0,tool:typeof e.tool_name=="string"?e.tool_name:typeof e.name=="string"?e.name:"tool",input:e.input,output:t==null?void 0:t.output,error:t==null?void 0:t.error,status:typeof(t==null?void 0:t.status)=="string"?t.status:void 0,duration_ms:typeof(t==null?void 0:t.duration_ms)=="number"?t.duration_ms:void 0,metadata:r}}function cse(e,t){const r=Hr(e),n=Hr(t);if(r&&n)return{...e,result:t};if(r)return e;if(n)return t}function y2(e,t,r){const n=e.content,i=n.filter(f=>Hr(f)&&f.type==="tool_use").map(use),o=typeof e.input_tokens=="number"?e.input_tokens:void 0,l=typeof e.output_tokens=="number"?e.output_tokens:void 0,c=o!==void 0||l!==void 0?{input:o??0,output:l??0}:void 0;return{test_id:(r==null?void 0:r.testId)??"",target:(r==null?void 0:r.target)??e.agent,message_index:t,role:e.type,agent:e.agent,model:typeof e.model=="string"?e.model:void 0,content:n,tool_calls:i.length>0?i:void 0,start_time:typeof e.ts=="string"?e.ts:void 0,token_usage:c,metadata:typeof e.id=="string"?{id:e.id}:void 0,source:{provider:e.agent,session_id:"",model:typeof e.model=="string"?e.model:void 0,timestamp:typeof e.ts=="string"?e.ts:void 0}}}function I5(e){const t=e.trim();if(t.startsWith("{"))try{const i=JSON.parse(t);if(Hr(i)&&Array.isArray(i.turns)){const o=typeof i.target=="string"?i.target:void 0,l=Hr(i.metadata)&&typeof i.metadata.test_id=="string"?i.metadata.test_id:void 0;return{entries:i.turns.flatMap((f,h)=>g2(f)?[y2(f,h,{target:o,testId:l})]:[])}}}catch{}const r=[],n=e.split(/\r?\n/);for(let i=0;i<n.length;i+=1){const o=n[i].trim();if(o)try{const l=JSON.parse(o);if(g2(l)){r.push(y2(l,r.length));continue}if(!lse(l))return{entries:r,error:`Line ${i+1} is not a transcript JSONL row.`};r.push(l)}catch(l){return{entries:r,error:`Line ${i+1} is invalid JSON: ${l.message}`}}}return{entries:r}}function Hm(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function dse(e){if(typeof e=="number")return`$${e.toFixed(4)}`}function iS(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 $5(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function fse(e){if(Array.isArray(e)){const t=e.map(r=>{if(Hr(r)&&r.type==="text"&&typeof r.text=="string")return r.text;if(Hr(r)&&r.type==="thinking"&&typeof r.text=="string")return`Thinking:
|
|
120
|
-
${r.text}`;if(Hr(r)&&r.type==="image"&&typeof r.source=="string")return`Image: ${r.source}`}).filter(r=>r!==void 0);if(t.length>0)return t.join(`
|
|
121
|
-
`)}return $5(e)}function ad(e,t){for(const r of t){const n=e[r];if(typeof n=="string"&&n.trim())return n}}function Ub(e,t){for(const r of t)if(e[r]!==void 0)return e[r]}function z5(e,t){const r=e[t];return Hr(r)?r:void 0}function hse(e,t){const r=z5(e,"function");return ad(e,["tool","name","tool_name"])??(r?ad(r,["name"]):void 0)??`Tool ${t+1}`}function mse(e){const t=z5(e,"function");return Ub(e,["input","arguments","args","parameters"])??(t?Ub(t,["arguments"]):void 0)}function pse(e){return Ub(e,["output","result","content"])}function gse(e,t){return`${e.message_index}-${e.role}-${t}`}function yse(e){return[...e].sort((t,r)=>t.message_index-r.message_index).map((t,r)=>{const n=ose[t.role]??{container:"border-gray-800 bg-gray-900",badge:"border-gray-700 bg-gray-800 text-gray-300",label:t.role,accent:"text-gray-300"},i=gse(t,r),o=(Array.isArray(t.tool_calls)?t.tool_calls.filter(Hr):[]).map((l,c)=>{const f=ad(l,["id","call_id","tool_call_id"]);return{id:`${i}-tool-${f??c}`,call:l,index:c,name:hse(l,c),status:ad(l,["status"]),duration:typeof l.duration_ms=="number"?Hm(l.duration_ms):void 0}});return{id:i,anchorId:`message-${r+1}`,line:t,ordinal:r,roleStyle:n,content:fse(t.content),duration:Hm(t.duration_ms),tokenUsage:iS(t.token_usage),toolCalls:o}})}function v2(e){const t=new Set;e[0]&&t.add(e[0].id);const r=e[e.length-1];return r&&t.add(r.id),t}function vse(e){const t=new Map;for(const r of e)t.set(r.line.role,(t.get(r.line.role)??0)+1);return t}function xse(e){const t=new Map;let r=0;for(const n of e)for(const i of n.toolCalls)r+=1,t.set(i.name,(t.get(i.name)??0)+1);return{total:r,byName:t}}function bse(e){return e!=null&&!(typeof e=="string"&&e.length===0)}function $s({label:e,value:t,tone:r="default"}){return bse(t)?d.jsxs("div",{className:"min-w-0 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 max-w-full overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{children:$5(t)})})]}):null}function ir({children:e}){return d.jsx("span",{className:"inline-flex min-w-0 max-w-full break-all rounded-md border border-gray-800 bg-gray-950 px-2 py-0.5 text-xs text-gray-400",children:e})}function px({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 x2({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 jse({toolCall:e,expanded:t,onToggle:r}){const{call:n,index:i,name:o,status:l,duration:c}=e,f=ad(n,["id","call_id","tool_call_id"]),h=Hr(n.metadata)?n.metadata:void 0;return d.jsxs("details",{className:"min-w-0 rounded-md border border-gray-800 bg-gray-950/80 p-3",open:t,"data-testid":`tool-call-${f??i}`,"data-expanded":t?"true":"false",onToggle:p=>r(e.id,p.currentTarget.open),children:[d.jsx("summary",{className:"min-w-0 cursor-pointer list-none text-sm font-medium text-gray-200",children:d.jsxs("span",{className:"inline-flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-xs text-gray-500",children:t?"-":"+"}),d.jsx("span",{children:"Tool call"}),d.jsx("span",{className:"rounded-md border border-amber-900/60 bg-amber-950/30 px-2 py-0.5 text-xs text-amber-300",children:o}),l&&d.jsx("span",{className:"text-xs text-gray-500",children:l}),c&&d.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:c})]})}),d.jsxs("div",{className:"mt-3 min-w-0 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[f&&d.jsxs(ir,{children:["id: ",f]}),c&&d.jsxs(ir,{children:["duration: ",c]}),l&&d.jsxs(ir,{children:["status: ",l]})]}),d.jsx($s,{label:"Arguments",value:mse(n)}),d.jsx($s,{label:"Result",value:pse(n)}),d.jsx($s,{label:"Error",value:n.error,tone:"error"}),d.jsx($s,{label:"Metadata",value:h})]})]})}function wse({line:e}){const t=Hm(e.duration_ms),r=iS(e.token_usage);return d.jsxs("details",{className:"min-w-0 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 min-w-0 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.name&&d.jsxs(ir,{children:["name: ",e.name]}),t&&d.jsxs(ir,{children:["duration: ",t]}),r&&d.jsxs(ir,{children:["tokens: ",r]})]}),d.jsx($s,{label:"Result",value:e.content}),d.jsx($s,{label:"Metadata",value:e.metadata})]})]})}function Sse({message:e,expanded:t,expandedToolIds:r,onToggleMessage:n,onToggleTool:i}){const{line:o,ordinal:l,roleStyle:c,content:f,duration:h,tokenUsage:p,toolCalls:g}=e;return d.jsxs("details",{id:e.anchorId,className:`min-w-0 scroll-mt-6 rounded-lg border ${c.container}`,open:t,"data-testid":`message-row-${l+1}`,"data-expanded":t?"true":"false",onToggle:y=>n(e.id,y.currentTarget.open),children:[d.jsx("summary",{className:"min-w-0 cursor-pointer list-none px-4 py-3",children:d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-xs text-gray-500",children:t?"-":"+"}),d.jsx("span",{className:`rounded-md border px-2 py-0.5 text-xs font-medium ${c.badge}`,children:c.label}),o.name&&d.jsx("span",{className:`truncate text-sm font-medium ${c.accent}`,children:o.name}),g.length>0&&d.jsxs("span",{className:"rounded-md border border-amber-900/60 bg-amber-950/30 px-2 py-0.5 text-xs text-amber-300",children:[g.length," tool ",g.length===1?"call":"calls"]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-500",children:[d.jsxs("a",{href:`#${e.anchorId}`,className:"tabular-nums text-gray-400 hover:text-cyan-300 hover:underline",onClick:y=>y.stopPropagation(),children:["#",l+1]}),o.start_time&&d.jsx("span",{children:o.start_time}),h&&d.jsx("span",{className:"tabular-nums",children:h}),p&&d.jsx("span",{children:p})]})]})}),d.jsxs("div",{className:"space-y-3 border-t border-gray-800/70 px-4 py-3",children:[o.role==="tool"||o.role==="function"?d.jsx(wse,{line:o}):f.trim().length>0?d.jsx("pre",{className:"max-w-full whitespace-pre-wrap break-words text-sm leading-6 text-gray-200",children:f}):d.jsx("p",{className:"text-sm text-gray-500",children:"No message content recorded."}),g.length>0&&d.jsx("div",{className:"space-y-2",children:g.map(y=>d.jsx(jse,{toolCall:y,expanded:r.has(y.id),onToggle:i},y.id))}),o.metadata&&o.role!=="tool"&&o.role!=="function"&&d.jsxs("details",{className:"min-w-0 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($s,{label:"Metadata",value:o.metadata})})]})]})]})}function Nse({messages:e,transcriptPath:t}){var g,y,x,b;const r=(g=e[0])==null?void 0:g.line,n=((y=r==null?void 0:r.source)==null?void 0:y.provider)??(r==null?void 0:r.agent),i=((x=r==null?void 0:r.source)==null?void 0:x.model)??(r==null?void 0:r.model),o=(b=r==null?void 0:r.source)==null?void 0:b.session_id,l=Hm(r==null?void 0:r.transcript_duration_ms),c=iS(r==null?void 0:r.transcript_token_usage),f=dse(r==null?void 0:r.transcript_cost_usd),h=vse(e),p=xse(e);return d.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[d.jsxs(ir,{children:[e.length," messages"]}),Array.from(h.entries()).map(([w,N])=>d.jsxs(ir,{children:[w,": ",N]},w)),p.total>0&&d.jsxs(ir,{children:[p.total," tool calls"]}),Array.from(p.byName.entries()).map(([w,N])=>d.jsxs(ir,{children:[w,": ",N]},w)),n&&d.jsxs(ir,{children:["provider: ",n]}),i&&d.jsxs(ir,{children:["model: ",i]}),o&&d.jsxs(ir,{children:["session: ",o]}),l&&d.jsxs(ir,{children:["duration: ",l]}),c&&d.jsxs(ir,{children:["tokens: ",c]}),f&&d.jsxs(ir,{children:["cost: ",f]}),t&&d.jsx(ir,{children:t})]})}function _se(e,t){switch(t){case"messages":return e.filter(r=>r.line.role!=="tool"&&r.line.role!=="function");case"with-tools":return e.filter(r=>r.toolCalls.length>0);case"tool-results":return e.filter(r=>r.line.role==="tool"||r.line.role==="function");case"all":return[...e]}}function Sh({active:e,count:t,children:r,onClick:n}){return d.jsxs("button",{type:"button",onClick:n,className:e?"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm text-cyan-200":"rounded-md border border-gray-800 bg-gray-950 px-3 py-1.5 text-sm text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:[r,d.jsx("span",{className:"ml-2 text-xs text-gray-500",children:t})]})}function B5({entries:e,finalAnswer:t,answerPath:r,transcriptPath:n,answerHref:i,transcriptHref:o,transcriptDownloadHref:l,onOpenFile:c}){const f=S.useMemo(()=>yse(e),[e]),[h,p]=S.useState(()=>v2(f)),[g,y]=S.useState(()=>new Set),[x,b]=S.useState("all"),w=!!r,N=S.useMemo(()=>f.flatMap(M=>M.toolCalls.map($=>$.id)),[f]),_=S.useMemo(()=>_se(f,x),[f,x]),E=f.filter(M=>M.line.role!=="tool"&&M.line.role!=="function").length,T=f.filter(M=>M.line.role==="tool"||M.line.role==="function").length,A=f.filter(M=>M.toolCalls.length>0).length;S.useEffect(()=>{p(v2(f)),y(new Set),b("all")},[f]);function C(M,$){p(I=>{const F=new Set(I);return $?F.add(M):F.delete(M),F})}function R(M,$){y(I=>{const F=new Set(I);return $?F.add(M):F.delete(M),F})}function D(){y(new Set(N)),p(M=>{const $=new Set(M);for(const I of f)I.toolCalls.length>0&&$.add(I.id);return $})}return d.jsxs("div",{className:"min-w-0 space-y-4",children:[w&&d.jsxs("section",{className:"min-w-0 rounded-lg border border-emerald-900/50 bg-emerald-950/20 p-4",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0",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 min-w-0 flex-wrap items-center gap-2",children:[d.jsx(x2,{path:r,onOpenFile:c,children:"Open answer.md in Files"}),d.jsx(px,{href:i,children:"Open answer.md"})]})]}),d.jsx("pre",{className:"mt-3 max-h-64 max-w-full 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.jsx("section",{className:"min-w-0 rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex min-w-0 flex-wrap items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0 space-y-2",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Transcript timeline"}),d.jsx(Nse,{messages:f,transcriptPath:n})]}),d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx(x2,{path:n,onOpenFile:c,children:"Open transcript.json in Files"}),d.jsx(px,{href:o,children:"Open normalized JSON"}),d.jsx(px,{href:l,download:!0,children:"Download normalized JSON"})]})]})}),d.jsx("section",{className:"min-w-0 rounded-lg border border-gray-800 bg-gray-900 p-3",children:d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[d.jsx(Sh,{active:x==="all",count:f.length,onClick:()=>b("all"),children:"All"}),d.jsx(Sh,{active:x==="messages",count:E,onClick:()=>b("messages"),children:"Messages"}),d.jsx(Sh,{active:x==="with-tools",count:A,onClick:()=>b("with-tools"),children:"Has tools"}),d.jsx(Sh,{active:x==="tool-results",count:T,onClick:()=>b("tool-results"),children:"Tool results"})]}),N.length>0&&d.jsxs("div",{className:"flex min-w-0 flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:D,className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-amber-800 hover:text-amber-200",children:"Expand all tool calls"}),d.jsx("button",{type:"button",onClick:()=>y(new Set),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-gray-600 hover:text-gray-100",children:"Collapse all tool calls"})]})]})}),d.jsx("div",{className:"space-y-3",children:_.map(M=>d.jsx(Sse,{message:M,expanded:h.has(M.id),expandedToolIds:g,onToggleMessage:C,onToggleTool:R},M.id))})]})}function U5(e){for(const t of e){if(t.type==="file")return t.path;if(t.children){const r=U5(t.children);if(r)return r}}return null}function sS(e,t=0){return e.attempt_path??e.run_path??`attempt-${e.attempt??t+1}`}function Ose(e,t=0){return typeof e.sample_index=="number"?e.sample_index:typeof e.attempt=="number"?e.attempt+1:t+1}function q5(e,t=0){const r=`Attempt ${Ose(e,t)}`;return typeof e.retry_index=="number"&&e.retry_index>0?`${r} retry ${e.retry_index}`:r}function Ese(e){if(e.total_tokens!=null)return e.total_tokens;const t=e.token_usage;if(!t)return;const r=[t.input,t.output,t.reasoning,t.cached].filter(n=>typeof n=="number"&&Number.isFinite(n));return r.length>0?r.reduce((n,i)=>n+i,0):void 0}function Ac(e){return e==null||!Number.isFinite(e)?"-":`${Math.round(e*100)}%`}function H5(e){if(e==null)return"-";if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),r=Math.round(e%6e4/1e3);return`${t}m ${r}s`}function Ase(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function Tse(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function Cse(e,t){return{...e,score:t.score??e.score,executionStatus:t.execution_status??e.executionStatus,error:t.error,costUsd:t.cost_usd??e.costUsd,durationMs:t.duration_ms??e.durationMs,scores:t.scores,assertions:t.assertions,trials:void 0,aggregation:void 0,grading_path:t.grading_path,timing_path:t.timing_path,metrics_path:t.metrics_path,transcript_path:t.transcript_path,output_path:t.answer_path,answer_path:t.answer_path}}function oS({eval:e,runId:t,projectId:r,repeatGroup:n,selectedTrial:i=null,initialTab:o="checks",initialSelectedFilePath:l=null,onSelectTrial:c}){const[f,h]=S.useState(o),[p,g]=S.useState(l),y=i?Cse(e,i):e,x=n!=null&&i==null;S.useEffect(()=>{h(o),g(l)},[o,l]);const b=[{id:"checks",label:"Checks"},{id:"transcript",label:"Transcript"},{id:"source",label:"Source"},{id:"files",label:"Files"}],w=N=>{g(N),h("files")};return d.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[d.jsx("div",{className:"min-w-0 border-b border-gray-800",children:d.jsx("div",{className:"flex min-w-0 gap-1 overflow-x-auto px-4",children:b.map(N=>d.jsx("button",{type:"button",onClick:()=>h(N.id),className:`px-4 py-2 text-sm font-medium transition-colors ${f===N.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:N.label},N.id))})}),d.jsxs("div",{className:"min-h-0 min-w-0 flex-1 overflow-hidden",children:[f==="checks"&&d.jsx("div",{className:"min-w-0 overflow-auto p-4",children:x?d.jsx(kse,{result:e,group:n,onSelectTrial:c}):i?d.jsx(Ise,{result:y,trial:i,runId:t,projectId:r,onOpenFile:w}):d.jsx(K5,{result:y,projectId:r})}),f==="files"&&d.jsx("div",{className:"h-full min-h-0 p-4",children:d.jsx(Use,{result:y,runId:t,projectId:r,selectedPath:p,onSelectedPathChange:g})}),f==="transcript"&&d.jsx("div",{className:"min-w-0 overflow-auto p-4",children:x?d.jsx($se,{result:e,group:n,runId:t,projectId:r,onSelectTrial:c}):i?d.jsx(zse,{result:y,trial:i,runId:t,projectId:r,onOpenFile:w}):d.jsx(Bse,{result:y,runId:t,projectId:r,onOpenFile:w})}),f==="source"&&d.jsx("div",{className:"min-w-0 overflow-auto p-4",children:d.jsx(Mse,{result:y})})]})]})}function Pse(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 Jr({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=Pse(e.size_bytes);return d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(Jr,{label:"Path",value:e.display_path}),d.jsx(Jr,{label:"SHA-256",value:e.content_sha256}),d.jsx(Jr,{label:"Size",value:t}),d.jsx(Jr,{label:"Omitted",value:((r=e.omitted)==null?void 0:r.message)??((n=e.omitted)==null?void 0:n.reason)})]})}function Tc({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 Rse({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(Tc,{value:JSON.stringify(e.command,null,2),language:"json"}),e.content&&d.jsx(Tc,{value:e.content})]})]})}function Mse({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(Jr,{label:"Eval file",value:(r=t.eval_file)==null?void 0:r.display_path}),d.jsx(Jr,{label:"Eval",value:e.eval_path}),d.jsx(Jr,{label:"Test ID",value:t.test_id??e.testId}),d.jsx(Jr,{label:"Legacy suite",value:e.suite}),d.jsx(Jr,{label:"Category",value:e.category}),d.jsx(Jr,{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(Tc,{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(Tc,{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(Jr,{label:"Weight",value:o.weight}),d.jsx(Jr,{label:"Required",value:o.required}),d.jsx(Jr,{label:"Min score",value:o.min_score})]}),d.jsx(Tc,{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(Rse,{file:o},`${o.kind}-${o.display_path}-${o.grader_name??""}-${l}`))})]})]})}function qb({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 K5({result:e,projectId:t}){const{data:r}=pt(t),n=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,i=!eo(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 h=l?o.flatMap(p=>p.assertions):c;for(const p of h.filter(g=>!g.passed)){const g=p.evidence?`${p.text}: ${p.evidence}`:p.text;f.push(g)}if(e.scores){for(const p of e.scores)if(!eo(p.score,n)&&p.details){const g=typeof p.details=="string"?p.details:JSON.stringify(p.details,null,2);f.push(`[${p.name??p.type??"evaluator"}] ${g}`)}}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(Zl,{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,g)=>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 ${g+1}`}),d.jsx("div",{className:"flex-1",children:d.jsx(Zl,{score:p.score})})]},`${p.name??p.type??g}`))})]}),l?d.jsx("div",{className:"space-y-6",children:o.map((p,g)=>{const y=p.name??p.type??`Grader ${g+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:y}),p.assertions.map((x,b)=>d.jsx(qb,{assertion:x},`${x.text}-${b}`))]},`${p.name??p.type??g}`)})}):c.length>0?d.jsx("div",{className:"space-y-2",children:c.map((p,g)=>d.jsx(qb,{assertion:p},`${p.text}-${g}`))}):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 kn({label:e,value:t}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-3",children:[d.jsx("div",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:e}),d.jsx("div",{className:"mt-1 font-mono text-sm text-gray-200",children:t??"-"})]})}function Dse({trial:e,index:t,onSelectTrial:r}){const n=sS(e,t),i=q5(e,t);return d.jsxs("div",{className:"grid gap-2 rounded-md border border-gray-800 bg-gray-950/50 p-3 text-sm md:grid-cols-[minmax(8rem,1fr)_auto] md:items-center",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("span",{className:"font-medium text-gray-200",children:i}),d.jsx("span",{className:"rounded-md border border-gray-800 px-1.5 py-0.5 text-[11px] font-medium text-gray-500",children:n})]}),d.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs text-gray-500",children:[d.jsxs("span",{children:[Ac(e.score)," score"]}),d.jsx("span",{children:e.verdict??"unknown"}),e.duration_ms!=null?d.jsx("span",{children:H5(e.duration_ms)}):null,e.total_tool_calls!=null?d.jsxs("span",{children:[e.total_tool_calls," tool calls"]}):null]})]}),d.jsxs("div",{className:"flex flex-wrap gap-2 md:justify-end",children:[d.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(e,"checks"),className:"rounded-md border border-gray-700 px-2.5 py-1 text-xs text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Checks"}),d.jsx("button",{type:"button",onClick:()=>r==null?void 0:r(e,"files"),disabled:!e.grading_path&&!e.metrics_path&&!e.timing_path,className:"rounded-md border border-gray-700 px-2.5 py-1 text-xs text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300 disabled:cursor-not-allowed disabled:opacity-50",children:"Files"})]})]})}function kse({result:e,group:t,onSelectTrial:r}){return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsxs("p",{className:"mb-3 text-sm text-gray-400",children:["Aggregate across ",t.trialCount," attempts for this test case."]}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-4",children:[d.jsx(kn,{label:"Attempt success",value:Ac(t.passRate)}),d.jsx(kn,{label:"Mean score",value:Ac(t.meanScore)}),d.jsx(kn,{label:"Attempts passed",value:`${t.passedTrials}/${t.trialCount}`}),d.jsx(kn,{label:"Assertion pass",value:Ac(t.assertionPassRate)}),t.executionErrorTrials>0?d.jsx(kn,{label:"Execution errors",value:String(t.executionErrorTrials)}):null]})]}),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:"Aggregate Grader Scores"}),d.jsx("div",{className:"space-y-3",children:e.scores.map((n,i)=>d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:n.name??n.type??`Score ${i+1}`}),d.jsx("div",{className:"flex-1",children:d.jsx(Zl,{score:n.score})})]},`${n.name??n.type??i}`))})]}):null,d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Attempts"}),t.trials.map((n,i)=>d.jsx(Dse,{trial:n,index:i,onSelectTrial:r},sS(n,i)))]})]})}function Lse(e){if(!e)return null;try{const t=JSON.parse(e),n=(Array.isArray(t.assertion_results)?t.assertion_results:Array.isArray(t.assertions)?t.assertions:[]).flatMap(o=>{if(!o||typeof o!="object")return[];const l=o;return typeof l.text!="string"||typeof l.passed!="boolean"?[]:[{text:l.text,passed:l.passed,evidence:typeof l.evidence=="string"?l.evidence:void 0}]}),i=t.summary&&typeof t.summary=="object"?t.summary:void 0;return{assertions:n,summary:i}}catch(t){return{assertions:[],error:t instanceof Error?t.message:String(t)}}}function Ise({result:e,trial:t,runId:r,projectId:n,onOpenFile:i}){const o=t.grading_path,l=e.result_dir,c=e.testId,{data:f,isLoading:h}=n&&o?Ue(Gh(n,r,c,o,l)):Kh(r,c,o??"",l),p=Lse(f==null?void 0:f.content);return o?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:"Attempt score"}),d.jsx("div",{className:"flex-1",children:d.jsx(Zl,{score:e.score})})]})}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[d.jsx(kn,{label:"Duration",value:H5(t.duration_ms)}),d.jsx(kn,{label:"Cost",value:Ase(t.cost_usd)}),d.jsx(kn,{label:"Tokens",value:Tse(Ese(t))})]}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-400",children:"Grading"}),d.jsx("button",{type:"button",onClick:()=>i(o),className:"rounded-md border border-gray-700 px-3 py-1.5 text-xs text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open grading JSON"})]}),h?d.jsx("p",{className:"mt-3 text-sm text-gray-500",children:"Loading grading artifact..."}):null,p!=null&&p.error?d.jsx("p",{className:"mt-3 text-sm text-red-300",children:p.error}):null,p!=null&&p.summary?d.jsxs("div",{className:"mt-3 grid gap-3 md:grid-cols-3",children:[d.jsx(kn,{label:"Assertion pass rate",value:Ac(p.summary.pass_rate)}),d.jsx(kn,{label:"Passed",value:String(p.summary.passed??0)}),d.jsx(kn,{label:"Failed",value:String(p.summary.failed??0)})]}):null]}),p&&p.assertions.length>0?d.jsx("div",{className:"space-y-2",children:p.assertions.map((g,y)=>d.jsx(qb,{assertion:g},`${g.text}-${y}`))}):h?null:d.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded in grading.json."})]}):d.jsx(K5,{result:e,projectId:n})}function G5(e,t){if(!t)return!1;for(const r of e)if(r.type==="file"&&r.path===t||r.children&&G5(r.children,t))return!0;return!1}function $se({result:e,group:t,runId:r,projectId:n,onSelectTrial:i}){return d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:"Attempt transcripts"}),t.trials.map((o,l)=>{const c=sS(o,l),f=q5(o,l),h=o.transcript_path,p=h?aa({projectId:n,runId:r,evalId:e.testId,filePath:h,resultDir:e.result_dir,raw:!0}):void 0;return d.jsxs("div",{className:"grid gap-2 rounded-md border border-gray-800 bg-gray-950/50 p-3 text-sm md:grid-cols-[minmax(8rem,1fr)_auto] md:items-center",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("span",{className:"font-medium text-gray-200",children:f}),d.jsx("span",{className:"rounded-md border border-gray-800 px-1.5 py-0.5 text-[11px] font-medium text-gray-500",children:c})]}),d.jsx("div",{className:"mt-1 truncate font-mono text-xs text-gray-500",title:h,children:h??"No transcript artifact"})]}),d.jsxs("div",{className:"flex flex-wrap gap-2 md:justify-end",children:[d.jsx("button",{type:"button",onClick:()=>i==null?void 0:i(o,"transcript"),disabled:!h,className:"rounded-md border border-gray-700 px-2.5 py-1 text-xs text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300 disabled:cursor-not-allowed disabled:opacity-50",children:"View"}),p?d.jsx("a",{href:p,target:"_blank",rel:"noreferrer",className:"rounded-md px-2.5 py-1 text-xs text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:"Raw"}):null]})]},c)})]})}function zse({result:e,trial:t,runId:r,projectId:n,onOpenFile:i}){const o=e.testId,l=e.result_dir,c=t.transcript_path,f=t.answer_path,{data:h,isLoading:p}=n&&c?Ue(Gh(n,r,o,c,l)):Kh(r,o,c??"",l),{data:g}=n&&f?Ue(Gh(n,r,o,f,l)):Kh(r,o,f??"",l),y=(h==null?void 0:h.content)??"",x=S.useMemo(()=>I5(y),[y]);if(!c)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.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This attempt does not include a transcript artifact."})]});if(p)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:"Loading transcript artifact..."});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.jsx("button",{type:"button",onClick:()=>i(c),className:"mt-3 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"})]});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:c})," exists but contains no JSONL rows."]})]});const b=f?aa({projectId:n,runId:r,evalId:o,filePath:f,resultDir:l,raw:!0}):void 0,w=aa({projectId:n,runId:r,evalId:o,filePath:c,resultDir:l,raw:!0}),N=aa({projectId:n,runId:r,evalId:o,filePath:c,resultDir:l,download:!0});return d.jsx(B5,{entries:x.entries,finalAnswer:f?(g==null?void 0:g.content)??e.output:void 0,answerPath:f,transcriptPath:c,answerHref:b,transcriptHref:w,transcriptDownloadHref:N,onOpenFile:i})}function Bse({result:e,runId:t,projectId:r,onOpenFile:n}){const i=e.testId,o=e.result_dir,{data:l,isLoading:c,error:f}=r?Ue(y6(r,t,i,o)):o6(t,i,o),h=l==null?void 0:l.transcript_path,p=l==null?void 0:l.answer_path,g=(l==null?void 0:l.status)==="ok"?l.content??"":"",y=S.useMemo(()=>I5(g),[g]);if(c)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:"Loading transcript artifact..."});if(f)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 loaded"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:f.message})]});if(!l||l.status==="missing")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.jsx("p",{className:"mt-2 text-sm text-gray-500",children:(l==null?void 0:l.message)??"This run does not include canonical transcript.json. Dashboard does not parse response.md or markdown transcripts for this view."})]});if(l.status==="dangling"||l.status==="unsupported")return d.jsxs("div",{className:"rounded-lg border border-amber-900/50 bg-amber-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-amber-300",children:l.status==="dangling"?"Transcript artifact unavailable":"Transcript pointer unsupported"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:l.message??"The transcript artifact could not be resolved."}),h?d.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:h}):null,l.pointer?d.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:l.pointer}):null]});if(y.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:y.error}),d.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:h?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>n(h),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:aa({projectId:r,runId:t,evalId:i,filePath:h,resultDir:o,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"})]}):null})]});if(y.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:h})," exists but contains no JSONL rows."]})]});const x=p?aa({projectId:r,runId:t,evalId:i,filePath:p,resultDir:o,raw:!0}):void 0,b=h?aa({projectId:r,runId:t,evalId:i,filePath:h,resultDir:o,raw:!0}):void 0,w=h?aa({projectId:r,runId:t,evalId:i,filePath:h,resultDir:o,download:!0}):void 0;return d.jsx(B5,{entries:y.entries,finalAnswer:p?l.answer_content??e.output:void 0,answerPath:p,transcriptPath:h,answerHref:x,transcriptHref:b,transcriptDownloadHref:w,onOpenFile:n})}function Use({result:e,runId:t,projectId:r,selectedPath:n,onSelectedPathChange:i}){const o=e.testId,l=e.result_dir,{data:c}=r?Ue(g6(r,t,o,l)):s6(t,o,l),f=(c==null?void 0:c.files)??[],[h,p]=S.useState(null),[g,y]=S.useState(!1),x=n??h,b=G5(f,x)?x:f.length>0?U5(f):null,{data:w,isLoading:N}=r?Ue(Gh(r,t,o,b??"",l)):Kh(t,o,b??"",l);if(f.length===0)return d.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const _=b?N?"Loading...":(w==null?void 0:w.content)??"":"",E=b?(w==null?void 0:w.language)??"plaintext":"plaintext";return d.jsxs("div",{className:"relative flex h-full min-h-0 min-w-0 gap-4 overflow-hidden",children:[d.jsx("div",{className:`${g?"block":"hidden"} min-h-0 w-full overflow-auto md:block md:w-auto`,children:d.jsx(tse,{files:f,selectedPath:b,onSelect:T=>{p(T),i(T),y(!1)}})}),d.jsx("div",{className:`${g?"hidden":"block"} h-full min-h-0 min-w-0 flex-1 overflow-hidden md:block`,children:d.jsx(sse,{value:_,language:E,height:"100%"})}),d.jsx("button",{type:"button",onClick:()=>y(!g),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":g?"Switch to file content viewer":"Switch to file tree",children:g?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 Nt={view:"results_view",search:"results_q",target:"results_target",grader:"results_grader",legacyScorer:"results_scorer",columns:"results_cols",detail:"results_detail"},qse="✓",Hse="✗";function gx(){var t;if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return{view:e.get(Nt.view)??void 0,search:e.get(Nt.search)??void 0,target:e.get(Nt.target)??void 0,grader:e.get(Nt.grader)??e.get(Nt.legacyScorer)??void 0,visibleColumnIds:((t=e.get(Nt.columns))==null?void 0:t.split(",").map(r=>r.trim()).filter(Boolean))??void 0}}function Fse(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e.view==="all"?t.delete(Nt.view):t.set(Nt.view,e.view),e.search?t.set(Nt.search,e.search):t.delete(Nt.search),e.target==="all"?t.delete(Nt.target):t.set(Nt.target,e.target),t.delete(Nt.legacyScorer),e.grader==="all"?t.delete(Nt.grader):t.set(Nt.grader,e.grader),e.visibleColumnIds.length>0?t.set(Nt.columns,e.visibleColumnIds.join(",")):t.delete(Nt.columns);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function b2(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(Nt.detail)}function Nh(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e?t.set(Nt.detail,e):t.delete(Nt.detail);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function Fm(e){return`${Math.round(e*100)}%`}function lS(e){if(e==null)return"-";if(e<1e3)return`${Math.round(e)}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;const t=Math.floor(e/6e4),r=Math.round(e%6e4/1e3);return`${t}m ${r}s`}function Y5(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function V5(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function Kse(e){if(!e)return;const t=[e.input,e.output,e.reasoning,e.cached].filter(r=>typeof r=="number"&&Number.isFinite(r));return t.length>0?t.reduce((r,n)=>r+n,0):void 0}function Q5(e){return e.total_tokens??Kse(e.token_usage)}function Km(e,t=0){return e.attempt_path??e.run_path??`attempt-${e.attempt??t+1}`}function Gse(e){const t=e.tokenUsage;if(!t)return;const r=[t.input!=null?`${t.input} in`:void 0,t.output!=null?`${t.output} out`:void 0,t.reasoning!=null?`${t.reasoning} reason`:void 0,t.cached!=null?`${t.cached} cached`:void 0].filter(n=>!!n);return r.length>0?r.join(" / "):void 0}function Yse(e){return e>=.8?"text-emerald-300":e>=.5?"text-yellow-300":"text-red-300"}function X5(e){var t,r;return e.verdict==="fail"||(t=e.assertions)!=null&&t.some(n=>!n.passed)?!0:((r=e.scores)==null?void 0:r.some(X5))??!1}function uS({results:e,runId:t,projectId:r,passThreshold:n,title:i="Results",emptyMessage:o}){const[l,c]=S.useState(()=>gx()),[f,h]=S.useState(()=>b2()),[p,g]=S.useState(null),[y,x]=S.useState(null),[b,w]=S.useState("checks"),[N,_]=S.useState(()=>new Set),E=S.useMemo(()=>Zie({results:e,passThreshold:n,state:l}),[n,e,l]),T=new Set(E.state.visibleColumnIds),A=f!=null?E.filteredRows.find(G=>G.key===f)??null:null,C=S.useMemo(()=>new Map(E.repeatGroups.map(G=>[G.row.key,G])),[E.repeatGroups]),R=A?C.get(A.key):void 0,D=R&&p?R.trials.find((G,k)=>Km(G,k)===p)??null:null;S.useEffect(()=>{const G=()=>{c(gx()),h(b2()),g(null),x(null),w("checks")};return window.addEventListener("popstate",G),()=>window.removeEventListener("popstate",G)},[]),S.useEffect(()=>{!f||A||(Nh(null),h(null))},[A,f]);function M(G){const k={...E.state,...G};Fse(k),c(gx())}function $(){if(typeof window>"u")return;const G=new URLSearchParams(window.location.search);for(const J of Object.values(Nt))G.delete(J);const k=G.toString(),q=`${window.location.pathname}${k?`?${k}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",q),c({}),h(null),g(null),x(null),w("checks")}function I(G){const k=new Set(E.state.visibleColumnIds);k.has(G)?k.delete(G):k.add(G),M({visibleColumnIds:[...k]})}function F(G){Nh(G),h(G),g(null),x(null),w("checks")}function H(G,k,q="checks"){Nh(G),h(G),g(Km(k)),w(q),x(Wse(k))}function ie(){Nh(null),h(null),g(null),x(null),w("checks")}function Z(G){_(k=>{const q=new Set(k);return q.has(G)?q.delete(G):q.add(G),q})}return e.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:o??d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"})}):d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-baseline sm:justify-between",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-400",children:i}),d.jsxs("p",{className:"text-xs text-gray-500",children:[E.filteredRows.length," of ",E.rows.length," rows"]})]}),d.jsxs("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/40 p-3",children:[d.jsx("div",{className:"flex flex-wrap gap-2",children:T5.map(G=>d.jsxs("button",{type:"button",onClick:()=>M({view:G.id}),className:`inline-flex items-center gap-2 rounded-md border px-2.5 py-1.5 text-sm transition-colors ${E.state.view===G.id?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300":"border-gray-800 bg-gray-950/70 text-gray-400 hover:border-gray-700 hover:text-gray-200"}`,children:[d.jsx("span",{children:G.label}),d.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:E.viewCounts[G.id]})]},G.id))}),d.jsxs("div",{className:"grid gap-2 lg:grid-cols-[minmax(220px,1fr)_minmax(150px,220px)_minmax(150px,220px)_auto_auto]",children:[d.jsxs("label",{className:"min-w-0",children:[d.jsx("span",{className:"sr-only",children:"Search results"}),d.jsx("input",{type:"search",value:E.state.search,onChange:G=>M({search:G.target.value}),placeholder:"Search tests, targets, graders, assertions",className:"w-full 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"})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by target"}),d.jsxs("select",{value:E.state.target,onChange:G=>M({target:G.target.value}),className:"w-full 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:"all",children:"All targets"}),E.targetOptions.map(G=>d.jsx("option",{value:G,children:G},G))]})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by grader"}),d.jsxs("select",{value:E.state.grader,onChange:G=>M({grader:G.target.value}),className:"w-full 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:"all",children:"All graders"}),E.graderOptions.map(G=>d.jsx("option",{value:G,children:G},G))]})]}),d.jsxs("details",{className:"group relative",children:[d.jsx("summary",{className:"list-none rounded-md border border-gray-700 bg-gray-950 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-gray-600 hover:text-gray-100 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Display"}),d.jsxs("div",{className:"absolute right-0 z-10 mt-2 w-64 max-w-[calc(100vw-2rem)] rounded-lg border border-gray-800 bg-gray-950 p-3",children:[d.jsx("div",{className:"mb-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Columns"}),d.jsx("div",{className:"max-h-72 space-y-2 overflow-auto pr-1",children:E.columns.map(G=>d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:T.has(G.id),onChange:()=>I(G.id),className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500"}),d.jsx("span",{className:"min-w-0 truncate",title:G.label,children:G.label})]},G.id))})]})]}),d.jsx("button",{type:"button",onClick:$,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"})]})]}),d.jsxs("div",{className:A?"grid min-w-0 max-w-full gap-4 xl:grid-cols-[minmax(0,1fr)_minmax(360px,42rem)]":"",children:[d.jsx("div",{className:"min-w-0",children:E.filteredRows.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 matching evaluations"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Adjust the result filters or display preset."})]}):d.jsx(Vse,{rows:E.filteredRows,visibleColumns:E.visibleColumns,passThreshold:n,selectedRowKey:f,selectedTrialPath:p,repeatGroupsByRowKey:C,expandedRepeatRows:N,onToggleRepeatGroup:Z,onOpenDetail:F,onOpenTrialDetail:H})}),A&&d.jsx(uoe,{row:A,runId:t,projectId:r,repeatGroup:R,selectedTrial:D,selectedTrialPath:p,initialTab:b,initialFilePath:y,onOpenTrialDetail:(G,k)=>H(A.key,G,k),onClose:ie})]})]})}function Vse({rows:e,visibleColumns:t,passThreshold:r,selectedRowKey:n,selectedTrialPath:i,repeatGroupsByRowKey:o,expandedRepeatRows:l,onToggleRepeatGroup:c,onOpenDetail:f,onOpenTrialDetail:h}){return d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full whitespace-nowrap text-left text-sm",style:{minWidth:`${ioe(t)}px`},children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsx("tr",{children:t.map(p=>d.jsx("th",{className:soe(p.id),title:p.label,children:d.jsx("span",{className:aoe(p.id)?"sr-only":"block max-w-48 truncate",children:p.label})},p.id))})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:e.map(p=>{const g=o.get(p.key),y=n===p.key&&!i,x=g?l.has(p.key):!1;return d.jsxs(S.Fragment,{children:[d.jsx("tr",{className:`cursor-pointer transition-colors ${y?"bg-cyan-950/20":"hover:bg-gray-900/30"} ${g?"bg-gray-950/20":""}`,onClick:()=>f(p.key),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f(p.key))},tabIndex:0,"aria-selected":y,children:t.map(b=>d.jsx("td",{className:j2(b.id,"py-3"),children:d.jsx(ooe,{column:b,row:p,repeatGroup:g,repeatExpanded:x,passThreshold:r,isSelected:y,onToggleRepeatGroup:c})},`${p.key}:${b.id}`))}),g&&x?g.trials.map((b,w)=>{const N=Km(b,w),_=n===p.key&&i===N;return d.jsx("tr",{className:`cursor-pointer bg-gray-950/60 transition-colors ${_?"bg-cyan-950/20":"hover:bg-gray-900/50"}`,"aria-label":`${cS(b,w)} for ${p.testId}`,onClick:()=>h(p.key,b),onKeyDown:E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),h(p.key,b))},tabIndex:0,"aria-selected":_,children:t.map(E=>d.jsx("td",{className:j2(E.id,"py-2"),children:d.jsx(Zse,{column:E,row:p,trial:b,index:w,passThreshold:r})},`${p.key}:${N}:${E.id}`))},`${p.key}:${N}`)}):null]},p.key)})})]})})}function Qse(e,t){return e.verdict==="pass"?!0:e.verdict==="fail"?!1:typeof e.score=="number"?e.score>=t:!1}function Xse(e,t=0){return typeof e.sample_index=="number"?e.sample_index:typeof e.attempt=="number"?e.attempt+1:t+1}function cS(e,t=0){const r=`Attempt ${Xse(e,t)}`;return typeof e.retry_index=="number"&&e.retry_index>0?`${r} retry ${e.retry_index}`:r}function Wse(e){return e.grading_path??e.metrics_path??e.timing_path??e.transcript_path??e.answer_path??null}function W5(e,t){return e?t?`[target:${t}] ${e}`:e:t?`Target error: ${t}`:void 0}function Z5(e){var t,r,n,i;return((t=e.target_execution)==null?void 0:t.error_kind)??((r=e.target_execution)==null?void 0:r.errorKind)??((n=e.targetExecution)==null?void 0:n.error_kind)??((i=e.targetExecution)==null?void 0:i.errorKind)}function Zse({column:e,row:t,trial:r,index:n,passThreshold:i}){const o=Qse(r,i),l=r.execution_status==="execution_error",c=l?"error":o?"passing":"failing",f=l?"Error":o?"Passing":"Failing",h=cS(r,n),p=Km(r,n);switch(e.id){case"status":return d.jsx(dS,{status:c,label:f});case"expander":return d.jsx("span",{"aria-hidden":"true",className:"mx-auto block h-7 w-px bg-gray-800"});case"test":return d.jsx(Jse,{label:h,artifactLabel:p,parentTestId:t.testId,trial:r});case"target":return d.jsx(eL,{target:t.targetLabel,tone:"text-gray-500"});case"score":return d.jsx(an,{rate:r.score??0});case"eval":return d.jsx(Ol,{value:t.evalLabel,tone:"text-gray-500"});case"category":return d.jsx(Ol,{value:t.categoryLabel,tone:"text-gray-500"});case"duration":return d.jsx("span",{className:"text-gray-500",children:lS(r.duration_ms)});case"cost_tokens":return d.jsx(hoe,{trial:r});case"review":return d.jsx("span",{className:"text-gray-700",children:"-"});case"error":return d.jsx(Ol,{value:W5(r.error,Z5(r)),tone:"text-red-300"});default:return d.jsx("span",{className:"text-gray-700",children:"-"})}}function Jse({label:e,artifactLabel:t,parentTestId:r,trial:n}){return d.jsxs("div",{className:"max-w-[28rem] min-w-0 border-l border-gray-800 pl-3",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"rounded-md border border-gray-800 bg-gray-900 px-1.5 py-0.5 text-[11px] font-medium text-gray-500",children:"Attempt"}),d.jsx("span",{className:"truncate font-medium text-gray-300",title:e,children:e})]}),d.jsxs("div",{className:"mt-0.5 truncate text-xs text-gray-600",title:`${r} · ${t}`,children:["Under ",r," · ",t]}),d.jsx("div",{className:"mt-0.5 flex min-w-0 flex-wrap gap-x-3 gap-y-0.5 text-xs text-gray-600",children:n.total_tool_calls!=null?d.jsxs("span",{children:[n.total_tool_calls," tool calls"]}):null}),n.error?d.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:n.error,children:n.error}):null]})}function dS({status:e,label:t}){const r=e==="passing",n=e==="error"||e==="partial",i=r?qse:Hse,o=r?"text-emerald-300":n?"text-amber-300":"text-red-300";return d.jsx("span",{className:`inline-flex text-base font-semibold ${o}`,title:t,children:i})}function eoe({group:e,passThreshold:t}){const n=e.passRate>=t?"passing":e.passedTrials>0?"partial":"failing";return d.jsx(dS,{status:n,label:`${e.passedTrials}/${e.trialCount} attempts passed`})}function toe({group:e}){const t=e.passedTrials===e.trialCount?"Stable pass":e.passedTrials===0?"Stable fail":"Flaky",r=[`${e.passedTrials}/${e.trialCount} attempts passed`,`${Fm(e.passRate)} success`,`${Fm(e.meanScore)} mean score`,e.executionErrorTrials>0?`${e.executionErrorTrials} execution errors`:void 0,e.assertionPassRate!=null?`${e.passedAssertions}/${e.assertionCount} assertions`:void 0].filter(n=>!!n);return d.jsxs("div",{className:"mt-1 flex max-w-[34rem] flex-wrap items-center gap-x-2 gap-y-1 text-xs",children:[d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-1.5 py-0.5 font-medium text-cyan-300",children:"Aggregate case"}),d.jsx("span",{className:t==="Stable pass"?"text-emerald-300":t==="Stable fail"?"text-red-300":"text-yellow-300",children:t}),d.jsx("span",{className:"min-w-0 truncate text-gray-500",title:r.join(" · "),children:r.join(" · ")})]})}function roe({group:e}){return d.jsxs("div",{className:"flex min-w-0 flex-col items-end gap-1",children:[d.jsx(an,{rate:e.passRate}),d.jsx("div",{className:"text-xs text-gray-500",children:"Attempt success"}),d.jsxs("div",{className:"text-xs tabular-nums text-gray-600",children:["Mean score ",Fm(e.meanScore)]})]})}function noe({group:e,row:t}){return d.jsxs("span",{className:"text-gray-400",children:["Avg ",lS(e.meanDurationMs??t.result.durationMs)]})}function J5(e){return["duration","cost_tokens"].includes(e)||e.startsWith("grader:")}function Xp(e){return e==="status"||e==="expander"}function aoe(e){return Xp(e)}function ioe(e){const t=e.reduce((r,n)=>r+(Xp(n.id)?44:136),0);return Math.max(760,t)}function soe(e){return Xp(e)?"w-11 min-w-11 max-w-11 px-2 py-3 text-center font-medium text-gray-400":`px-4 py-3 font-medium text-gray-400 ${J5(e)?"text-right":""}`}function j2(e,t){return Xp(e)?`w-11 min-w-11 max-w-11 px-2 ${t} text-center align-middle`:`px-4 ${t} align-middle ${J5(e)?"text-right tabular-nums":""}`}function ooe({column:e,row:t,repeatGroup:r,repeatExpanded:n,passThreshold:i,isSelected:o,onToggleRepeatGroup:l}){if(e.id.startsWith("grader:")){const c=e.id.slice(7);return d.jsx(moe,{score:t.graderScores.get(c),passThreshold:i})}switch(e.id){case"status":return r?d.jsx(eoe,{group:r,passThreshold:i}):d.jsx(dS,{status:t.status,label:t.statusLabel});case"expander":return r?d.jsx(coe,{row:t,repeatExpanded:n,onToggleRepeatGroup:l}):d.jsx("span",{"aria-hidden":"true",className:"block h-5"});case"test":return d.jsx(loe,{row:t,repeatGroup:r,isSelected:o});case"target":return d.jsx(eL,{target:t.targetLabel});case"score":return t.executionError?d.jsx("span",{className:"inline-flex rounded-md border border-amber-900/60 bg-amber-950/20 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):r?d.jsx(roe,{group:r}):d.jsx(an,{rate:t.result.score});case"eval":return d.jsx(Ol,{value:t.evalLabel});case"category":return d.jsx(Ol,{value:t.categoryLabel});case"duration":return r?d.jsx(noe,{group:r,row:t}):d.jsx("span",{className:"text-gray-400",children:lS(t.result.durationMs)});case"cost_tokens":return d.jsx(foe,{row:t,repeatGroup:r});case"error":return d.jsx(Ol,{value:W5(t.result.error,Z5(t.result)),tone:"text-red-300"});default:return d.jsx("span",{className:"text-gray-600",children:"-"})}}function loe({row:e,repeatGroup:t,isSelected:r}){return d.jsxs("div",{className:"max-w-[24rem] min-w-0",children:[d.jsx("span",{className:`block min-w-0 truncate text-left font-medium ${r?"text-cyan-200":"text-cyan-400"}`,title:e.testId,children:e.testId}),t?d.jsx(toe,{group:t}):null,e.result.error?d.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:e.result.error,children:e.result.error}):null]})}function uoe({row:e,runId:t,projectId:r,repeatGroup:n,selectedTrial:i,selectedTrialPath:o,initialTab:l,initialFilePath:c,onOpenTrialDetail:f,onClose:h}){const p=AB(t,e.testId,{projectId:r,resultDir:e.result.result_dir,evalPath:e.result.eval_path}),g=i?`${e.testId} · ${cS(i)}`:e.testId,y=n&&!i,x=`${e.key}:${o??""}:${l}`;return d.jsxs("aside",{ref:doe,className:"min-w-0 max-w-full overflow-hidden rounded-lg border border-gray-800 bg-gray-950/80 xl:sticky xl:top-4 xl:max-h-[calc(100vh-2rem)]",children:[d.jsxs("div",{className:"flex min-w-0 items-start justify-between gap-3 border-b border-gray-800 px-4 py-3",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Row detail"}),d.jsx("h4",{className:"mt-1 truncate text-base font-semibold text-white",title:g,children:g}),d.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",title:e.targetLabel,children:[e.targetLabel,e.evalLabel?` · ${e.evalLabel}`:""]})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("a",{href:p,className:"rounded-md border border-gray-800 px-2.5 py-1.5 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:"Full page"}),d.jsx("button",{type:"button",onClick:h,className:"rounded-md border border-gray-800 px-2.5 py-1.5 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200",children:"Close"})]})]}),d.jsx("div",{className:"h-[36rem] min-h-[28rem] min-w-0 overflow-hidden xl:h-[calc(100vh-9rem)]",children:d.jsx(oS,{eval:e.result,runId:t,projectId:r,repeatGroup:y?n:void 0,selectedTrial:i,initialTab:l,initialSelectedFilePath:c,onSelectTrial:f},`${e.key}:${o??"aggregate"}:${c??""}`)})]},x)}function eL({target:e,tone:t="text-gray-300"}){return d.jsx("div",{className:`max-w-[14rem] truncate ${t}`,title:e,children:e})}function coe({row:e,repeatExpanded:t,onToggleRepeatGroup:r}){return d.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),r(e.key)},className:"inline-flex h-6 w-6 items-center justify-center rounded-md border border-gray-800 text-xs text-gray-400 transition-colors hover:border-gray-700 hover:text-gray-200","aria-expanded":t,"aria-label":`${t?"Collapse":"Expand"} attempts for ${e.testId}`,children:t?"-":"+"})}function doe(e){e&&window.requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest",inline:"nearest"})})}function foe({row:e,repeatGroup:t}){const r=(t==null?void 0:t.trials.map(h=>h.cost_usd).filter(h=>typeof h=="number"&&Number.isFinite(h)))??[],n=(t==null?void 0:t.trials.map(Q5).filter(h=>typeof h=="number"&&Number.isFinite(h)))??[],i=r.length>0?r.reduce((h,p)=>h+p,0):void 0,o=n.length>0?n.reduce((h,p)=>h+p,0):void 0,l=Y5(e.result.costUsd??i),c=V5(e.tokenTotal??o),f=Gse(e.result);return!l&&!c?d.jsx("span",{className:"text-gray-600",children:"-"}):d.jsxs("div",{className:"min-w-0 text-right",children:[l?d.jsx("div",{className:"tabular-nums text-gray-300",children:l}):null,c?d.jsx("div",{className:"text-xs tabular-nums text-gray-500",title:f,children:c}):null]})}function hoe({trial:e}){const t=Y5(e.cost_usd),r=V5(Q5(e));return!t&&!r?d.jsx("span",{className:"text-gray-700",children:"-"}):d.jsxs("div",{className:"min-w-0 text-right",children:[t?d.jsx("div",{className:"tabular-nums text-gray-500",children:t}):null,r?d.jsx("div",{className:"text-xs tabular-nums text-gray-600",children:r}):null]})}function moe({score:e,passThreshold:t}){if(!e)return d.jsx("span",{className:"text-gray-600",children:"-"});const r=e.score<t||X5(e);return d.jsxs("div",{className:"min-w-0 text-right",children:[d.jsx("div",{className:`tabular-nums ${Yse(e.score)}`,children:Fm(e.score)}),d.jsx("div",{className:r?"text-xs text-red-300":"text-xs text-gray-500",children:r?"Fail":e.verdict??"Pass"})]})}function Ol({value:e,tone:t="text-gray-400"}){return e?d.jsx("span",{className:`block max-w-[14rem] truncate ${t}`,title:e,children:e}):d.jsx("span",{className:"text-gray-600",children:"-"})}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(gl,{label:"Pass Rate",value:`${l}%`,accent:c,large:!0}),d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(gl,{label:"Passed",value:String(t),accent:"text-emerald-400"}),d.jsx(gl,{label:"Failures",value:String(r),accent:"text-red-400"}),i>0&&d.jsx(gl,{label:"Execution Errors",value:String(i),accent:"text-amber-400"}),d.jsx(gl,{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(gl,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function gl({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 tL({results:e,runId:t,projectId:r}){const{data:n}=pt(r),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,[o,l]=S.useState({}),c=Mie(e),f=e.length,h=ep(e,i),p=e.reduce((b,w)=>b+(w.costUsd??0),0),g=uae(e,i),y=rL(g,o),x=b=>{l(w=>({...w,[b]:!w[b]}))};return f===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(Jl,{total:0,passed:0,failed:0,passRate:0}),d.jsx(w2,{href:c}),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:f,passed:h.passed,failed:h.failed,passRate:h.passRate,executionErrors:h.executionErrors,totalCost:p>0?p:void 0}),d.jsx(w2,{href:c}),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:y.map(b=>{const w=o[b.name]===!0;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:d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"inline-block h-4 shrink-0",style:{width:`${b.depth*16}px`}}),b.childCount>0?d.jsx("button",{type:"button",className:"flex h-5 w-5 shrink-0 items-center justify-center rounded border border-gray-700 text-xs text-gray-400 hover:border-gray-600 hover:text-gray-200",onClick:()=>x(b.name),"aria-label":`${w?"Collapse":"Expand"} ${b.name}`,"aria-expanded":w,children:w?"-":"+"}):d.jsx("span",{className:"h-5 w-5 shrink-0"}),r?d.jsx(Ee,{to:"/projects/$projectId/runs/$runId/category/$category",params:{projectId:r,runId:t,category:b.name},className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",title:b.name,children:b.label}):d.jsx(Ee,{to:"/runs/$runId/category/$category",params:{runId:t,category:b.name},className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",title:b.name,children:b.label}),b.depth>0?d.jsx("span",{className:"truncate text-xs font-normal text-gray-500",children:b.name}):null,b.childCount>0?d.jsx("span",{className:"shrink-0 text-xs font-normal text-gray-500",children:b.childCount}):null]})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(an,{rate:b.total-b.executionErrors>0?b.passed/(b.total-b.executionErrors):0})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:b.passed}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:b.failed>0?b.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:b.executionErrors>0?b.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:b.total})]},b.name)})})]})})]}),d.jsx(uS,{results:e,runId:t,projectId:r,passThreshold:i,title:"All Evals"}),d.jsx(poe,{runId:t,projectId:r})]})}function rL(e,t){return e.flatMap(r=>[r,...t[r.name]?rL(r.children,t):[]])}function w2({href:e}){return e?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 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-gray-200",children:"External trace"}),d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Phoenix"})]}),d.jsx("a",{href:e,target:"_blank",rel:"noreferrer",className:"inline-flex items-center rounded-md border border-cyan-900/70 px-2.5 py-1 text-sm font-medium text-cyan-300 transition-colors hover:border-cyan-700 hover:bg-cyan-950/40 hover:text-cyan-200 hover:underline",children:"Open in Phoenix"})]})}):null}function poe({runId:e,projectId:t}){const[r,n]=S.useState(!1),{data:i,isLoading:o,error:l}=GB(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 Wp({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 Zp({runId:e,status:t,isReadOnly:r,projectId:n}){const[i,o]=S.useState(!1),[l,c]=S.useState(null);if(!_ie(t,r))return null;async function f(){o(!0),c(null);try{await O6(e,n)}catch(h){c(h instanceof Error?h.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 nL=dr("/runs/$runId")({component:goe});function goe(){var w;const{runId:e}=nL.useParams(),{data:t,isLoading:r,error:n}=md(e),{data:i}=pt(),{data:o}=Zm(),[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 h=(w=t==null?void 0:t.results)==null?void 0:w[0],p=h==null?void 0:h.target,g=p?{target:p}:void 0,y=t==null?void 0:t.status,x=y==="starting"||y==="running",b=$R({runId:e,results:(t==null?void 0:t.results)??[],source:t==null?void 0:t.source,sourceLabel:t==null?void 0:t.source_label,runtimeSource:t==null?void 0:t.runtime_source,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:b.heading,children:b.heading}),b.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:b.sourceBadge}):null]}),b.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:b.meta}):null,b.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:b.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(Zp,{runId:e,status:y,isReadOnly:f}):d.jsx(O5,{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:y}),y&&d.jsx(Wp,{status:y}),!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:"Start"})]})]}),d.jsx(tL,{results:(t==null?void 0:t.results)??[],runId:e}),!f&&d.jsx(jo,{open:l,onClose:()=>c(!1),prefill:g})]})}const yx=[{id:"runs",label:"🏃 Recent Runs",title:"Recent Runs"},{id:"tags",label:"🏷️ Tags",title:"Tags"},{id:"analytics",label:"📊 Analytics",title:"Analytics"},{id:"targets",label:"🤖 Targets",title:"Targets"}],aL=dr("/projects/$projectId")({component:yoe});function yoe(){var x,b;const{projectId:e}=aL.useParams(),r=rj().location.search,n=r.tab,i=(x=r.key)!=null&&x.trim()?r.key:xl,o=ho(),[l,c]=S.useState(!1),{data:f}=pt(e),h=(f==null?void 0:f.read_only)===!0,p=e,g=yx.some(w=>w.id===n)?n:"runs",y=((b=yx.find(w=>w.id===g))==null?void 0:b.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:y}),!h&&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:"Start"})]}),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:yx.map(w=>d.jsx("button",{type:"button",onClick:()=>o({to:"/projects/$projectId",params:{projectId:e},search:w.id==="tags"?{tab:w.id,key:i}:{tab:w.id}}),className:`shrink-0 px-4 py-2 text-sm font-medium transition-colors ${g===w.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:w.label},w.id))})}),g==="runs"&&d.jsx(voe,{projectId:e,projectName:p,readOnly:h}),g==="tags"&&d.jsx(S5,{projectId:e,tagKey:i,onTagKeyChange:w=>o({to:"/projects/$projectId",params:{projectId:e},search:{tab:"tags",key:w}})}),g==="analytics"&&d.jsx(xoe,{projectId:e,readOnly:h}),g==="targets"&&d.jsx(N5,{projectId:e}),!h&&d.jsx(jo,{open:l,onClose:()=>c(!1),projectId:e})]})}function voe({projectId:e,projectName:t,readOnly:r}){const n=co(),{data:i,isLoading:o,error:l,hasNextPage:c,fetchNextPage:f,isFetchingNextPage:h}=m6(e),{data:p}=hj(e),{data:g}=Zm(e),[y,x]=S.useState(!1),[b,w]=S.useState(!1),[N,_]=S.useState(null),E=((p==null?void 0:p.runs)??[]).filter(M=>M.status==="starting"||M.status==="running"),T=Qp((i==null?void 0:i.runs)??[]),A=T.filter(M=>M.on_remote===!0).length,C=(g==null?void 0:g.configured)===!0?OR(A,T.length,g.branch):void 0;async function R(){x(!0),_(null);try{const M=await RR(e);n.setQueryData(Ic(e).queryKey,M);const $=Hh(M);_($),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"tags"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(M){_(Fh(M,g)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{x(!1)}}async function D(){w(!0),_(null);try{const M=await MR(e);n.setQueryData(Ic(e).queryKey,M),_(Hh(M)),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"tags"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(M){_(Fh(M,g)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{w(!1)}}return S.useEffect(()=>{if((N==null?void 0:N.kind)!=="success")return;const M=window.setTimeout(()=>_(null),7e3);return()=>window.clearTimeout(M)},[N]),o?d.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(M=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},M))}):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:[E.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:E.map(M=>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:M.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(M.started_at).toLocaleTimeString()})]}),d.jsx(Ee,{to:"/projects/$projectId/jobs/$runId",params:{projectId:e,runId:M.id},className:"flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},M.id))})]}),d.jsx(w5,{remoteStatus:g,syncInFlight:y,onSync:R,projectName:t,syncFeedback:N,onRemoteSummary:C,onConfirmMerge:D,confirmMergeInFlight:b}),d.jsx(Vp,{runs:T,projectId:e,enableCombine:!r,remoteBranch:g==null?void 0:g.branch,hasNextPage:c,isFetchingNextPage:h,onLoadMore:()=>void f()})]})}function xoe({projectId:e,readOnly:t}){const{data:r,isLoading:n,isError:i,error:o}=Ue(PR(e));return d.jsx(b5,{data:r,isLoading:n,isError:i,error:o,projectId:e,readOnly:t})}const iL=dr("/jobs/$runId")({component:boe});function boe(){const{runId:e}=iL.useParams(),{data:t,isLoading:r,error:n}=fj(e),{data:i}=pt(),o=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(vx,{}),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(vx,{}),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(vx,{}),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(Zp,{runId:e,status:t.status,isReadOnly:o}),d.jsx(Wp,{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 vx(){return d.jsx(Ee,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const joe=dr("/experiments/$experimentName")({beforeLoad:({params:e})=>{throw Wb({to:"/tags/$key/$value",params:{key:"experiment",value:e.experimentName}})}});function woe(e){return`(no ${e})`}function Soe(e,t){var n,i;if(t==="experiment")return e.experiment??((n=e.run_tags)==null?void 0:n.experiment)??"default";const r=(i=e.run_tags)==null?void 0:i[t];return r===void 0||r===""?woe(t):r}function sL({tagKey:e,tagValue:t,projectId:r}){var x;const{data:n,isLoading:i}=Ue(r?uj(r,e):lj(e)),{data:o,isLoading:l}=Ue(r?dj(r):oj);if(i||l)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(b=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},b))})]});const f=(x=n==null?void 0:n.groups)==null?void 0:x.find(b=>b.name===t),h=Qp(((o==null?void 0:o.runs)??[]).filter(b=>Soe(b,e)===t)),p=(f==null?void 0:f.pass_rate)??0,g=h.length,y=(f==null?void 0:f.target_count)??0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:Zi(e)}),d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[g," run",g!==1?"s":""," · ",y," target",y!==1?"s":"",(f==null?void 0:f.last_run)&&d.jsxs("span",{className:"ml-2",children:["· Last run: ",S2(f.last_run)]})]})]}),f&&d.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[d.jsx(_h,{label:"Runs",value:String(g)}),d.jsx(_h,{label:"Targets",value:String(y)}),d.jsx(_h,{label:"Pass Rate",value:`${Math.round(p*100)}%`,accent:"text-cyan-400"}),d.jsx(_h,{label:"Last Run",value:S2(f.last_run)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),d.jsx(Vp,{runs:h,projectId:r,emptyMessage:d.jsxs("div",{children:[d.jsxs("p",{className:"text-lg text-gray-400",children:["No evaluation runs found for ",Zi(e)," ",d.jsx("code",{children:t}),"."]}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Runs will appear here once this value has execution results."})]})})]})]})}function _h({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 S2(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 oL=dr("/tags/$key/$value")({component:Noe});function Noe(){const{key:e,value:t}=oL.useParams();return d.jsx(sL,{tagKey:e,tagValue:t})}const lL=dr("/evals/$runId/$evalId")({component:_oe});function _oe(){const{runId:e,evalId:t}=lL.useParams(),r=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("result_dir")??void 0,n=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("eval_path")??void 0,{data:i,isLoading:o,error:l}=md(e),{data:c}=pt(),[f,h]=S.useState(!1),p=(c==null?void 0:c.read_only)===!0;if(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:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(l)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: ",l.message]});const g=i==null?void 0:i.results.find(b=>Wm(b,t,{resultDir:r,evalPath:n}));if(!g)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 y=(c==null?void 0:c.threshold)??(c==null?void 0:c.pass_threshold)??.8,x=eo(g.score,y)&&g.executionStatus!=="error"&&g.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: ",g.eval_path??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 ${x?"text-emerald-400":"text-red-400"}`,children:x?"✓":"✗"}),t]})]}),!p&&d.jsx("button",{type:"button",onClick:()=>h(!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(oS,{eval:g,runId:e}),!p&&d.jsx(jo,{open:f,onClose:()=>h(!1),prefill:{testIds:[t],target:g.target}})]})}const uL=dr("/runs/$runId_/suite/$suite")({component:Ooe});function Ooe(){const{runId:e,suite:t}=uL.useParams(),{data:r,isLoading:n,error:i}=md(e),{data:o}=pt(),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(g=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},g))})]});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(g=>(g.suite??"Uncategorized")===t),f=c.length,h=ep(c,l),p=c.reduce((g,y)=>g+(y.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:h.passed,failed:h.failed,passRate:h.passRate,executionErrors:h.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(uS,{results:c,runId:e,passThreshold:l,title:"Suite Evals"})]})}const cL=dr("/runs/$runId_/category/$category")({component:Eoe});function Eoe(){const{runId:e,category:t}=cL.useParams(),{data:r,isLoading:n,error:i}=TR(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(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 category: ",i.message]});const o=(r==null?void 0:r.suites)??[],l=o.reduce((y,x)=>y+x.total,0),c=o.reduce((y,x)=>y+x.passed,0),f=o.reduce((y,x)=>y+x.failed,0),h=o.reduce((y,x)=>y+ur(x),0),p=l-h,g=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:g,executionErrors:h}),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(y=>d.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:y.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:y.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[y.passed,"/",YR(y)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Zl,{score:y.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[y.passed," passed"]}),y.failed>0&&d.jsxs("span",{className:"text-red-400",children:[y.failed," failed"]}),ur(y)>0&&d.jsxs("span",{className:"text-amber-400",children:[ur(y)," execution errors"]})]})]},y.name))})]})]})}const dL=dr("/projects/$projectId_/runs/$runId")({component:Aoe});function Aoe(){var N;const{projectId:e,runId:t}=dL.useParams(),{data:r,isLoading:n,error:i}=pd(e,t),{data:o}=pt(e),{data:l}=Zm(e),[c,f]=S.useState(!1),h=(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(_=>d.jsx("div",{className:"h-20 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 run: ",i.message]});const p=(N=r==null?void 0:r.results)==null?void 0:N[0],g=p==null?void 0:p.target,y=g?{target:g}:void 0,x=r==null?void 0:r.status,b=x==="starting"||x==="running",w=$R({runId:t,results:(r==null?void 0:r.results)??[],source:r==null?void 0:r.source,sourceLabel:r==null?void 0:r.source_label,runtimeSource:r==null?void 0:r.runtime_source,remoteRepo:(r==null?void 0:r.source)==="remote"?l==null?void 0:l.repo:void 0,formatTimestamp:_=>new Date(_).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(_=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[_.label,":"]})," ",_.value]},`${_.label}:${_.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!h&&b?d.jsx(Zp,{runId:t,status:x,isReadOnly:h,projectId:e}):d.jsx(O5,{results:(r==null?void 0:r.results)??[],runDir:r==null?void 0:r.run_dir,suiteFilter:r==null?void 0:r.suite_filter,target:g??void 0,projectId:e,isReadOnly:h,plannedTestCount:r==null?void 0:r.planned_test_count,runStatus:x}),x&&d.jsx(Wp,{status:x}),!h&&!b&&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:"Start"})]})]}),d.jsx(tL,{results:(r==null?void 0:r.results)??[],runId:t,projectId:e}),!h&&d.jsx(jo,{open:c,onClose:()=>f(!1),projectId:e,prefill:y})]})}const fL=dr("/projects/$projectId_/jobs/$runId")({component:Toe});function Toe(){const{projectId:e,runId:t}=fL.useParams(),{data:r,isLoading:n,error:i}=fj(t,e),{data:o}=pt(e),l=(o==null?void 0:o.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(xx,{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(xx,{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(xx,{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(Zp,{runId:t,status:r.status,isReadOnly:l,projectId:e}),d.jsx(Wp,{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 xx({projectId:e}){return d.jsx(Ee,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const Coe=dr("/projects/$projectId_/experiments/$experimentName")({beforeLoad:({params:e})=>{throw Wb({to:"/projects/$projectId/tags/$key/$value",params:{projectId:e.projectId,key:"experiment",value:e.experimentName}})}}),hL=dr("/projects/$projectId_/tags/$key/$value")({component:Poe});function Poe(){const{projectId:e,key:t,value:r}=hL.useParams();return d.jsx(sL,{tagKey:t,tagValue:r,projectId:e})}const mL=dr("/projects/$projectId_/evals/$runId/$evalId")({component:Roe});function Roe(){const{projectId:e,runId:t,evalId:r}=mL.useParams(),n=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("result_dir")??void 0,i=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("eval_path")??void 0,{data:o,isLoading:l,error:c}=pd(e,t),{data:f}=pt(e),[h,p]=S.useState(!1),g=(f==null?void 0:f.read_only)===!0;if(l)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(c)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: ",c.message]});const y=o==null?void 0:o.results.find(w=>Wm(w,r,{resultDir:n,evalPath:i}));if(!y)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 x=(f==null?void 0:f.threshold)??(f==null?void 0:f.pass_threshold)??.8,b=eo(y.score,x)&&y.executionStatus!=="error"&&y.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: ",y.eval_path??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 ${b?"text-emerald-400":"text-red-400"}`,children:b?"✓":"✗"}),r]})]}),!g&&d.jsx("button",{type:"button",onClick:()=>p(!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(oS,{eval:y,runId:t,projectId:e}),!g&&d.jsx(jo,{open:h,onClose:()=>p(!1),projectId:e,prefill:{testIds:[r],target:y.target}})]})}const pL=dr("/projects/$projectId_/runs/$runId_/suite/$suite")({component:Moe});function Moe(){const{projectId:e,runId:t,suite:r}=pL.useParams(),{data:n,isLoading:i,error:o}=pd(e,t),{data:l}=pt(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(y=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});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(y=>(y.suite??"Uncategorized")===r),h=f.length,p=ep(f,c),g=f.reduce((y,x)=>y+(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:h,passed:p.passed,failed:p.failed,passRate:p.passRate,executionErrors:p.executionErrors,totalCost:g>0?g:void 0}),h===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(uS,{results:f,runId:t,projectId:e,passThreshold:c,title:"Suite Evals"})]})}const gL=dr("/projects/$projectId_/runs/$runId_/category/$category")({component:Doe});function Doe(){const{projectId:e,runId:t,category:r}=gL.useParams(),{data:n,isLoading:i,error:o}=Ue(CR(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,b)=>x+b.total,0),f=l.reduce((x,b)=>x+b.passed,0),h=l.reduce((x,b)=>x+b.failed,0),p=l.reduce((x,b)=>x+ur(b),0),g=c-p,y=g>0?f/g: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:h,passRate:y,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(Ee,{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,"/",YR(x)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Zl,{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"]}),ur(x)>0&&d.jsxs("span",{className:"text-amber-400",children:[ur(x)," execution errors"]})]})]},x.name))})]})]})}const koe=tU.update({id:"/settings",path:"/settings",getParentRoute:()=>Yt}),Loe=vie.update({id:"/",path:"/",getParentRoute:()=>Yt}),Ioe=nL.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>Yt}),$oe=aL.update({id:"/projects/$projectId",path:"/projects/$projectId",getParentRoute:()=>Yt}),zoe=iL.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>Yt}),Boe=joe.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>Yt}),Uoe=oL.update({id:"/tags/$key/$value",path:"/tags/$key/$value",getParentRoute:()=>Yt}),qoe=lL.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>Yt}),Hoe=uL.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>Yt}),Foe=cL.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>Yt}),Koe=dL.update({id:"/projects/$projectId_/runs/$runId",path:"/projects/$projectId/runs/$runId",getParentRoute:()=>Yt}),Goe=fL.update({id:"/projects/$projectId_/jobs/$runId",path:"/projects/$projectId/jobs/$runId",getParentRoute:()=>Yt}),Yoe=Coe.update({id:"/projects/$projectId_/experiments/$experimentName",path:"/projects/$projectId/experiments/$experimentName",getParentRoute:()=>Yt}),Voe=hL.update({id:"/projects/$projectId_/tags/$key/$value",path:"/projects/$projectId/tags/$key/$value",getParentRoute:()=>Yt}),Qoe=mL.update({id:"/projects/$projectId_/evals/$runId/$evalId",path:"/projects/$projectId/evals/$runId/$evalId",getParentRoute:()=>Yt}),Xoe=pL.update({id:"/projects/$projectId_/runs/$runId_/suite/$suite",path:"/projects/$projectId/runs/$runId/suite/$suite",getParentRoute:()=>Yt}),Woe=gL.update({id:"/projects/$projectId_/runs/$runId_/category/$category",path:"/projects/$projectId/runs/$runId/category/$category",getParentRoute:()=>Yt}),Zoe={IndexRoute:Loe,SettingsRoute:koe,ExperimentsExperimentNameRoute:Boe,JobsRunIdRoute:zoe,ProjectsProjectIdRoute:$oe,RunsRunIdRoute:Ioe,EvalsRunIdEvalIdRoute:qoe,TagsKeyValueRoute:Uoe,ProjectsProjectIdExperimentsExperimentNameRoute:Yoe,ProjectsProjectIdJobsRunIdRoute:Goe,ProjectsProjectIdRunsRunIdRoute:Koe,RunsRunIdCategoryCategoryRoute:Foe,RunsRunIdSuiteSuiteRoute:Hoe,ProjectsProjectIdEvalsRunIdEvalIdRoute:Qoe,ProjectsProjectIdTagsKeyValueRoute:Voe,ProjectsProjectIdRunsRunIdCategoryCategoryRoute:Woe,ProjectsProjectIdRunsRunIdSuiteSuiteRoute:Xoe},Joe=Yt._addFileChildren(Zoe)._addFileTypes(),ele=new jz({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),tle=wB({routeTree:Joe}),yL=document.getElementById("root");if(!yL)throw new Error("Root element not found");Q$.createRoot(yL).render(d.jsx(S.StrictMode,{children:d.jsx(wz,{client:ele,children:d.jsx(_B,{router:tle})})}));export{zl as W,S as r};
|