agentv 5.0.0-next.1 → 5.2.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 +239 -53
- package/dist/{agentv-provider-AYXH7WLW-NJRC6UQX.js → agentv-provider-AYXH7WLW-6YZKZ7PS.js} +2 -2
- package/dist/{artifact-writer-QD52FC56.js → artifact-writer-SN6UNL5G.js} +15 -8
- package/dist/{chunk-GZJMODLW.js → chunk-3S6A2RKR.js} +45880 -30542
- package/dist/chunk-3S6A2RKR.js.map +1 -0
- package/dist/{chunk-6Q56CEXV.js → chunk-3X357HS4.js} +7900 -8985
- package/dist/chunk-3X357HS4.js.map +1 -0
- package/dist/{chunk-6JVM4GJI.js → chunk-46K2OET3.js} +187 -80
- package/dist/chunk-46K2OET3.js.map +1 -0
- package/dist/{chunk-IJEZFZJR.js → chunk-7BGERE6L.js} +2 -2
- package/dist/chunk-7BGERE6L.js.map +1 -0
- package/dist/{chunk-UG4JHZYM.js → chunk-ALVZQUZP.js} +670 -1427
- package/dist/chunk-ALVZQUZP.js.map +1 -0
- package/dist/{chunk-RCIEHFQ2.js → chunk-PEUTJS7B.js} +3 -3
- package/dist/{chunk-5H446C7X.js → chunk-QMRVH5ZP.js} +2 -8
- package/dist/{chunk-IBI7A5RP.js → chunk-T4AD3H3Y.js} +3444 -2251
- package/dist/chunk-T4AD3H3Y.js.map +1 -0
- package/dist/cli.js +8 -9
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/assets/{index-D5_8DE_B.js → index-DNgf3qJ2.js} +1 -1
- package/dist/dashboard/assets/index-D_bokML8.css +1 -0
- package/dist/dashboard/assets/index-r_jSJmlw.js +121 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/{dist-KJ6PELQY.js → dist-DEPJOMCA.js} +74 -60
- package/dist/{docker-workspace-ZJ2ESVBI-6UDETQII.js → docker-workspace-NNK4Z6FR-QRTIG6TM.js} +3 -3
- package/dist/{exec-MYPAJJP7-C5HD5WG5.js → exec-4HFFRQ3B-AXDMJNLJ.js} +3 -3
- package/dist/index.js +8 -9
- package/dist/{interactive-2WMVAASS.js → interactive-36ZNMQB2.js} +13 -29
- package/dist/interactive-36ZNMQB2.js.map +1 -0
- package/dist/skills/agentv-bench/SKILL.md +38 -34
- package/dist/skills/agentv-bench/agents/analyzer.md +6 -6
- package/dist/skills/agentv-bench/agents/comparator.md +4 -5
- package/dist/skills/agentv-bench/agents/grader.md +4 -4
- package/dist/skills/agentv-bench/references/autoresearch.md +3 -3
- package/dist/skills/agentv-bench/references/description-optimization.md +2 -2
- package/dist/skills/agentv-bench/references/environment-adaptation.md +10 -10
- package/dist/skills/agentv-bench/references/eval-yaml-spec.md +51 -30
- package/dist/skills/agentv-bench/references/migrating-from-skill-creator.md +4 -4
- package/dist/skills/agentv-bench/references/subagent-pipeline.md +13 -12
- package/dist/skills/agentv-eval-migrations/SKILL.md +33 -0
- package/dist/skills/agentv-eval-migrations/references/breaking-changes.md +1012 -0
- package/dist/skills/agentv-eval-review/SKILL.md +6 -3
- package/dist/skills/agentv-eval-review/scripts/lint_eval.py +1 -1
- package/dist/skills/agentv-eval-writer/SKILL.md +380 -246
- package/dist/skills/agentv-eval-writer/references/{config-schema.json → config.schema.json} +6 -5
- package/dist/skills/agentv-eval-writer/references/custom-evaluators.md +23 -18
- package/dist/skills/agentv-eval-writer/references/eval.schema.json +9852 -0
- package/dist/skills/agentv-eval-writer/references/python-helpers.md +8 -8
- package/dist/skills/agentv-eval-writer/references/rubric-evaluator.md +21 -22
- package/dist/skills/agentv-trace-analyst/SKILL.md +4 -4
- package/dist/templates/.agentv/targets.yaml +41 -40
- package/dist/{ts-eval-loader-RE43OAGX-AMRCUKBZ.js → ts-eval-loader-OMG2JBHP-OP5RR7A3.js} +5 -4
- package/package.json +19 -4
- package/dist/chunk-6JVM4GJI.js.map +0 -1
- package/dist/chunk-6Q56CEXV.js.map +0 -1
- package/dist/chunk-76FOHROU.js +0 -96
- package/dist/chunk-76FOHROU.js.map +0 -1
- package/dist/chunk-GZJMODLW.js.map +0 -1
- package/dist/chunk-HSHTTN6C.js +0 -565
- package/dist/chunk-HSHTTN6C.js.map +0 -1
- package/dist/chunk-IBI7A5RP.js.map +0 -1
- package/dist/chunk-IJEZFZJR.js.map +0 -1
- package/dist/chunk-LRULMAAA.js +0 -1711
- package/dist/chunk-LRULMAAA.js.map +0 -1
- package/dist/chunk-R3CXYNTN.js +0 -1238
- package/dist/chunk-R3CXYNTN.js.map +0 -1
- package/dist/chunk-UG4JHZYM.js.map +0 -1
- package/dist/chunk-VQ2ZO7XJ.js +0 -2098
- package/dist/chunk-VQ2ZO7XJ.js.map +0 -1
- package/dist/chunk-XALGXSKB.js +0 -21
- package/dist/chunk-XALGXSKB.js.map +0 -1
- package/dist/dashboard/assets/index-BVMrdN8a.js +0 -119
- package/dist/dashboard/assets/index-DZWXfWsv.css +0 -1
- package/dist/esm-NNMQYIKT.js +0 -32
- package/dist/esm-R77SNOF5.js +0 -65
- package/dist/esm-RVQPUGWH.js +0 -1207
- package/dist/esm-RVQPUGWH.js.map +0 -1
- package/dist/esm-TTEMJEVV.js +0 -933
- package/dist/esm-TTEMJEVV.js.map +0 -1
- package/dist/esm-ZADQ4XQH-QUFGGZL4.js +0 -924
- package/dist/esm-ZADQ4XQH-QUFGGZL4.js.map +0 -1
- package/dist/exec-MYPAJJP7-C5HD5WG5.js.map +0 -1
- package/dist/getMachineId-bsd-HSK5LZMG.js +0 -41
- package/dist/getMachineId-bsd-HSK5LZMG.js.map +0 -1
- package/dist/getMachineId-darwin-4DP6CCJV.js +0 -41
- package/dist/getMachineId-darwin-4DP6CCJV.js.map +0 -1
- package/dist/getMachineId-linux-44LJ5UJB.js +0 -33
- package/dist/getMachineId-linux-44LJ5UJB.js.map +0 -1
- package/dist/getMachineId-unsupported-NVK6IATM.js +0 -24
- package/dist/getMachineId-unsupported-NVK6IATM.js.map +0 -1
- package/dist/getMachineId-win-YZ36S7VA.js +0 -43
- package/dist/getMachineId-win-YZ36S7VA.js.map +0 -1
- package/dist/interactive-2WMVAASS.js.map +0 -1
- package/dist/otlp-json-file-exporter-RY63S3IG-PZBQPVYY.js +0 -9
- package/dist/otlp-json-file-exporter-RY63S3IG-PZBQPVYY.js.map +0 -1
- package/dist/skills/agentv-eval-writer/references/eval-schema.json +0 -17295
- package/dist/skills/agentv-eval-writer/references/experiment-schema.json +0 -278
- package/dist/src-76ISS3LH.js +0 -1733
- package/dist/src-76ISS3LH.js.map +0 -1
- package/dist/ts-eval-loader-RE43OAGX-AMRCUKBZ.js.map +0 -1
- /package/dist/{agentv-provider-AYXH7WLW-NJRC6UQX.js.map → agentv-provider-AYXH7WLW-6YZKZ7PS.js.map} +0 -0
- /package/dist/{artifact-writer-QD52FC56.js.map → artifact-writer-SN6UNL5G.js.map} +0 -0
- /package/dist/{chunk-RCIEHFQ2.js.map → chunk-PEUTJS7B.js.map} +0 -0
- /package/dist/{chunk-5H446C7X.js.map → chunk-QMRVH5ZP.js.map} +0 -0
- /package/dist/{dist-KJ6PELQY.js.map → dist-DEPJOMCA.js.map} +0 -0
- /package/dist/{docker-workspace-ZJ2ESVBI-6UDETQII.js.map → docker-workspace-NNK4Z6FR-QRTIG6TM.js.map} +0 -0
- /package/dist/{esm-NNMQYIKT.js.map → exec-4HFFRQ3B-AXDMJNLJ.js.map} +0 -0
- /package/dist/{esm-R77SNOF5.js.map → ts-eval-loader-OMG2JBHP-OP5RR7A3.js.map} +0 -0
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
var P$=Object.defineProperty;var sO=e=>{throw TypeError(e)};var R$=(e,t,r)=>t in e?P$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var pv=(e,t,r)=>R$(e,typeof t!="symbol"?t+"":t,r),yv=(e,t,r)=>t.has(e)||sO("Cannot "+r);var q=(e,t,r)=>(yv(e,t,"read from private field"),r?r.call(e):t.get(e)),je=(e,t,r)=>t.has(e)?sO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),me=(e,t,r,n)=>(yv(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Te=(e,t,r)=>(yv(e,t,"access private method"),r);var nh=(e,t,r,n)=>({set _(i){me(e,t,i,r)},get _(){return q(e,t,n)}});function M$(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 ss(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gv={exports:{}},uc={};/**
|
|
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 oO;function D$(){if(oO)return uc;oO=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 uc.Fragment=t,uc.jsx=r,uc.jsxs=r,uc}var lO;function k$(){return lO||(lO=1,gv.exports=D$()),gv.exports}var d=k$(),vv={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 uO;function L$(){if(uO)return Oe;uO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),g=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=g&&I[g]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,N={};function _(I,Q,le){this.props=I,this.context=Q,this.refs=N,this.updater=le||b}_.prototype.isReactComponent={},_.prototype.setState=function(I,Q){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,Q,"setState")},_.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function A(){}A.prototype=_.prototype;function C(I,Q,le){this.props=I,this.context=Q,this.refs=N,this.updater=le||b}var E=C.prototype=new A;E.constructor=C,w(E,_.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function R(){}var D={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function U(I,Q,le){var oe=le.ref;return{$$typeof:e,type:I,key:Q,ref:oe!==void 0?oe:null,props:le}}function k(I,Q){return U(I.type,Q,I.props)}function H(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function B(I){var Q={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(le){return Q[le]})}var ae=/\/+/g;function ee(I,Q){return typeof I=="object"&&I!==null&&I.key!=null?B(""+I.key):Q.toString(36)}function ne(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(R,R):(I.status="pending",I.then(function(Q){I.status==="pending"&&(I.status="fulfilled",I.value=Q)},function(Q){I.status==="pending"&&(I.status="rejected",I.reason=Q)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function $(I,Q,le,oe,fe){var xe=typeof I;(xe==="undefined"||xe==="boolean")&&(I=null);var Se=!1;if(I===null)Se=!0;else switch(xe){case"bigint":case"string":case"number":Se=!0;break;case"object":switch(I.$$typeof){case e:case t:Se=!0;break;case p:return Se=I._init,$(Se(I._payload),Q,le,oe,fe)}}if(Se)return fe=fe(I),Se=oe===""?"."+ee(I,0):oe,T(fe)?(le="",Se!=null&&(le=Se.replace(ae,"$&/")+"/"),$(fe,Q,le,"",function(de){return de})):fe!=null&&(H(fe)&&(fe=k(fe,le+(fe.key==null||I&&I.key===fe.key?"":(""+fe.key).replace(ae,"$&/")+"/")+Se)),Q.push(fe)),1;Se=0;var Me=oe===""?".":oe+":";if(T(I))for(var ce=0;ce<I.length;ce++)oe=I[ce],xe=Me+ee(oe,ce),Se+=$(oe,Q,le,xe,fe);else if(ce=v(I),typeof ce=="function")for(I=ce.call(I),ce=0;!(oe=I.next()).done;)oe=oe.value,xe=Me+ee(oe,ce++),Se+=$(oe,Q,le,xe,fe);else if(xe==="object"){if(typeof I.then=="function")return $(ne(I),Q,le,oe,fe);throw Q=String(I),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return Se}function L(I,Q,le){if(I==null)return I;var oe=[],fe=0;return $(I,oe,"","",function(xe){return Q.call(le,xe,fe++)}),oe}function W(I){if(I._status===-1){var Q=I._result;Q=Q(),Q.then(function(le){(I._status===0||I._status===-1)&&(I._status=1,I._result=le)},function(le){(I._status===0||I._status===-1)&&(I._status=2,I._result=le)}),I._status===-1&&(I._status=0,I._result=Q)}if(I._status===1)return I._result.default;throw I._result}var te=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},se={map:L,forEach:function(I,Q,le){L(I,function(){Q.apply(this,arguments)},le)},count:function(I){var Q=0;return L(I,function(){Q++}),Q},toArray:function(I){return L(I,function(Q){return Q})||[]},only:function(I){if(!H(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Oe.Activity=y,Oe.Children=se,Oe.Component=_,Oe.Fragment=r,Oe.Profiler=i,Oe.PureComponent=C,Oe.StrictMode=n,Oe.Suspense=h,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(I){return D.H.useMemoCache(I)}},Oe.cache=function(I){return function(){return I.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(I,Q,le){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var oe=w({},I.props),fe=I.key;if(Q!=null)for(xe in Q.key!==void 0&&(fe=""+Q.key),Q)!M.call(Q,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&Q.ref===void 0||(oe[xe]=Q[xe]);var xe=arguments.length-2;if(xe===1)oe.children=le;else if(1<xe){for(var Se=Array(xe),Me=0;Me<xe;Me++)Se[Me]=arguments[Me+2];oe.children=Se}return U(I.type,fe,oe)},Oe.createContext=function(I){return I={$$typeof:l,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:o,_context:I},I},Oe.createElement=function(I,Q,le){var oe,fe={},xe=null;if(Q!=null)for(oe in Q.key!==void 0&&(xe=""+Q.key),Q)M.call(Q,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(fe[oe]=Q[oe]);var Se=arguments.length-2;if(Se===1)fe.children=le;else if(1<Se){for(var Me=Array(Se),ce=0;ce<Se;ce++)Me[ce]=arguments[ce+2];fe.children=Me}if(I&&I.defaultProps)for(oe in Se=I.defaultProps,Se)fe[oe]===void 0&&(fe[oe]=Se[oe]);return U(I,xe,fe)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(I){return{$$typeof:c,render:I}},Oe.isValidElement=H,Oe.lazy=function(I){return{$$typeof:p,_payload:{_status:-1,_result:I},_init:W}},Oe.memo=function(I,Q){return{$$typeof:f,type:I,compare:Q===void 0?null:Q}},Oe.startTransition=function(I){var Q=D.T,le={};D.T=le;try{var oe=I(),fe=D.S;fe!==null&&fe(le,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(R,te)}catch(xe){te(xe)}finally{Q!==null&&le.types!==null&&(Q.types=le.types),D.T=Q}},Oe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},Oe.use=function(I){return D.H.use(I)},Oe.useActionState=function(I,Q,le){return D.H.useActionState(I,Q,le)},Oe.useCallback=function(I,Q){return D.H.useCallback(I,Q)},Oe.useContext=function(I){return D.H.useContext(I)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(I,Q){return D.H.useDeferredValue(I,Q)},Oe.useEffect=function(I,Q){return D.H.useEffect(I,Q)},Oe.useEffectEvent=function(I){return D.H.useEffectEvent(I)},Oe.useId=function(){return D.H.useId()},Oe.useImperativeHandle=function(I,Q,le){return D.H.useImperativeHandle(I,Q,le)},Oe.useInsertionEffect=function(I,Q){return D.H.useInsertionEffect(I,Q)},Oe.useLayoutEffect=function(I,Q){return D.H.useLayoutEffect(I,Q)},Oe.useMemo=function(I,Q){return D.H.useMemo(I,Q)},Oe.useOptimistic=function(I,Q){return D.H.useOptimistic(I,Q)},Oe.useReducer=function(I,Q,le){return D.H.useReducer(I,Q,le)},Oe.useRef=function(I){return D.H.useRef(I)},Oe.useState=function(I){return D.H.useState(I)},Oe.useSyncExternalStore=function(I,Q,le){return D.H.useSyncExternalStore(I,Q,le)},Oe.useTransition=function(){return D.H.useTransition()},Oe.version="19.2.4",Oe}var cO;function iu(){return cO||(cO=1,vv.exports=L$()),vv.exports}var S=iu();const ql=ss(S),I$=M$({__proto__:null,default:ql},[S]);var xv={exports:{}},cc={},bv={exports:{}},jv={};/**
|
|
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 dO;function $$(){return dO||(dO=1,(function(e){function t($,L){var W=$.length;$.push(L);e:for(;0<W;){var te=W-1>>>1,se=$[te];if(0<i(se,L))$[te]=L,$[W]=se,W=te;else break e}}function r($){return $.length===0?null:$[0]}function n($){if($.length===0)return null;var L=$[0],W=$.pop();if(W!==L){$[0]=W;e:for(var te=0,se=$.length,I=se>>>1;te<I;){var Q=2*(te+1)-1,le=$[Q],oe=Q+1,fe=$[oe];if(0>i(le,W))oe<se&&0>i(fe,le)?($[te]=fe,$[oe]=W,te=oe):($[te]=le,$[Q]=W,te=Q);else if(oe<se&&0>i(fe,W))$[te]=fe,$[oe]=W,te=oe;else break e}}return L}function i($,L){var W=$.sortIndex-L.sortIndex;return W!==0?W:$.id-L.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 h=[],f=[],p=1,y=null,g=3,v=!1,b=!1,w=!1,N=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function E($){for(var L=r(f);L!==null;){if(L.callback===null)n(f);else if(L.startTime<=$)n(f),L.sortIndex=L.expirationTime,t(h,L);else break;L=r(f)}}function T($){if(w=!1,E($),!b)if(r(h)!==null)b=!0,R||(R=!0,B());else{var L=r(f);L!==null&&ne(T,L.startTime-$)}}var R=!1,D=-1,M=5,U=-1;function k(){return N?!0:!(e.unstable_now()-U<M)}function H(){if(N=!1,R){var $=e.unstable_now();U=$;var L=!0;try{e:{b=!1,w&&(w=!1,A(D),D=-1),v=!0;var W=g;try{t:{for(E($),y=r(h);y!==null&&!(y.expirationTime>$&&k());){var te=y.callback;if(typeof te=="function"){y.callback=null,g=y.priorityLevel;var se=te(y.expirationTime<=$);if($=e.unstable_now(),typeof se=="function"){y.callback=se,E($),L=!0;break t}y===r(h)&&n(h),E($)}else n(h);y=r(h)}if(y!==null)L=!0;else{var I=r(f);I!==null&&ne(T,I.startTime-$),L=!1}}break e}finally{y=null,g=W,v=!1}L=void 0}}finally{L?B():R=!1}}}var B;if(typeof C=="function")B=function(){C(H)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,ee=ae.port2;ae.port1.onmessage=H,B=function(){ee.postMessage(null)}}else B=function(){_(H,0)};function ne($,L){D=_(function(){$(e.unstable_now())},L)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function($){switch(g){case 1:case 2:case 3:var L=3;break;default:L=g}var W=g;g=L;try{return $()}finally{g=W}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function($,L){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var W=g;g=$;try{return L()}finally{g=W}},e.unstable_scheduleCallback=function($,L,W){var te=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?te+W:te):W=te,$){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=W+se,$={id:p++,callback:L,priorityLevel:$,startTime:W,expirationTime:se,sortIndex:-1},W>te?($.sortIndex=W,t(f,$),r(h)===null&&$===r(f)&&(w?(A(D),D=-1):w=!0,ne(T,W-te))):($.sortIndex=se,t(h,$),b||v||(b=!0,R||(R=!0,B()))),$},e.unstable_shouldYield=k,e.unstable_wrapCallback=function($){var L=g;return function(){var W=g;g=L;try{return $.apply(this,arguments)}finally{g=W}}}})(jv)),jv}var fO;function z$(){return fO||(fO=1,bv.exports=$$()),bv.exports}var wv={exports:{}},hr={};/**
|
|
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 hO;function B$(){if(hO)return hr;hO=1;var e=iu();function t(h){var f="https://react.dev/errors/"+h;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)f+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+f+" 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(h,f,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:h,containerInfo:f,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(h,f){if(h==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return hr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,hr.createPortal=function(h,f){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(h,f,null,p)},hr.flushSync=function(h){var f=l.T,p=n.p;try{if(l.T=null,n.p=2,h)return h()}finally{l.T=f,n.p=p,n.d.f()}},hr.preconnect=function(h,f){typeof h=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,n.d.C(h,f))},hr.prefetchDNS=function(h){typeof h=="string"&&n.d.D(h)},hr.preinit=function(h,f){if(typeof h=="string"&&f&&typeof f.as=="string"){var p=f.as,y=c(p,f.crossOrigin),g=typeof f.integrity=="string"?f.integrity:void 0,v=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;p==="style"?n.d.S(h,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:y,integrity:g,fetchPriority:v}):p==="script"&&n.d.X(h,{crossOrigin:y,integrity:g,fetchPriority:v,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},hr.preinitModule=function(h,f){if(typeof h=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var p=c(f.as,f.crossOrigin);n.d.M(h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&n.d.M(h)},hr.preload=function(h,f){if(typeof h=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var p=f.as,y=c(p,f.crossOrigin);n.d.L(h,p,{crossOrigin:y,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},hr.preloadModule=function(h,f){if(typeof h=="string")if(f){var p=c(f.as,f.crossOrigin);n.d.m(h,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else n.d.m(h)},hr.requestFormReset=function(h){n.d.r(h)},hr.unstable_batchedUpdates=function(h,f){return h(f)},hr.useFormState=function(h,f,p){return l.H.useFormState(h,f,p)},hr.useFormStatus=function(){return l.H.useHostTransitionStatus()},hr.version="19.2.4",hr}var mO;function D2(){if(mO)return wv.exports;mO=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(),wv.exports=B$(),wv.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 pO;function U$(){if(pO)return cc;pO=1;var e=z$(),t=iu(),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 h(a){if(o(a)!==a)throw Error(n(188))}function f(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 x=u.return;if(x===null)break;var j=x.alternate;if(j===null){if(m=x.return,m!==null){u=m;continue}break}if(x.child===j.child){for(j=x.child;j;){if(j===u)return h(x),a;if(j===m)return h(x),s;j=j.sibling}throw Error(n(188))}if(u.return!==m.return)u=x,m=j;else{for(var O=!1,P=x.child;P;){if(P===u){O=!0,u=x,m=j;break}if(P===m){O=!0,m=x,u=j;break}P=P.sibling}if(!O){for(P=j.child;P;){if(P===u){O=!0,u=j,m=x;break}if(P===m){O=!0,m=j,u=x;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 y=Object.assign,g=Symbol.for("react.element"),v=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"),A=Symbol.for("react.consumer"),C=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),k=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function B(a){return a===null||typeof a!="object"?null:(a=H&&a[H]||a["@@iterator"],typeof a=="function"?a:null)}var ae=Symbol.for("react.client.reference");function ee(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ae?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case _:return"Profiler";case N:return"StrictMode";case T:return"Suspense";case R:return"SuspenseList";case U:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case b:return"Portal";case C:return a.displayName||"Context";case A:return(a._context.displayName||"Context")+".Consumer";case E:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case D:return s=a.displayName||null,s!==null?s:ee(a.type)||"Memo";case M:s=a._payload,a=a._init;try{return ee(a(s))}catch{}}return null}var ne=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},te=[],se=-1;function I(a){return{current:a}}function Q(a){0>se||(a.current=te[se],te[se]=null,se--)}function le(a,s){se++,te[se]=a.current,a.current=s}var oe=I(null),fe=I(null),xe=I(null),Se=I(null);function Me(a,s){switch(le(xe,s),le(fe,a),le(oe,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?C_(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=C_(s),a=T_(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}Q(oe),le(oe,a)}function ce(){Q(oe),Q(fe),Q(xe)}function de(a){a.memoizedState!==null&&le(Se,a);var s=oe.current,u=T_(s,a.type);s!==u&&(le(fe,a),le(oe,u))}function _e(a){fe.current===a&&(Q(oe),Q(fe)),Se.current===a&&(Q(Se),ic._currentValue=W)}var ue,gt;function Pe(a){if(ue===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ue=s&&s[1]||"",gt=-1<u.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ue+a+gt}var vt=!1;function xt(a,s){if(!a||vt)return"";vt=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(s){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(Z){var X=Z}Reflect.construct(a,[],ie)}else{try{ie.call()}catch(Z){X=Z}a.call(ie.prototype)}}else{try{throw Error()}catch(Z){X=Z}(ie=a())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(Z){if(Z&&X&&typeof Z.stack=="string")return[Z.stack,X.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var j=m.DetermineComponentFrameRoot(),O=j[0],P=j[1];if(O&&P){var z=O.split(`
|
|
44
|
-
`),Y=P.split(`
|
|
45
|
-
`);for(x=m=0;m<z.length&&!z[m].includes("DetermineComponentFrameRoot");)m++;for(;x<Y.length&&!Y[x].includes("DetermineComponentFrameRoot");)x++;if(m===z.length||x===Y.length)for(m=z.length-1,x=Y.length-1;1<=m&&0<=x&&z[m]!==Y[x];)x--;for(;1<=m&&0<=x;m--,x--)if(z[m]!==Y[x]){if(m!==1||x!==1)do if(m--,x--,0>x||z[m]!==Y[x]){var J=`
|
|
46
|
-
`+z[m].replace(" at new "," at ");return a.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",a.displayName)),J}while(1<=m&&0<=x);break}}}finally{vt=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Pe(u):""}function Ht(a,s){switch(a.tag){case 26:case 27:case 5:return Pe(a.type);case 16:return Pe("Lazy");case 13:return a.child!==s&&s!==null?Pe("Suspense Fallback"):Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return xt(a.type,!1);case 11:return xt(a.type.render,!1);case 1:return xt(a.type,!0);case 31:return Pe("Activity");default:return""}}function he(a){try{var s="",u=null;do s+=Ht(a,u),u=a,a=a.return;while(a);return s}catch(m){return`
|
|
47
|
-
Error generating stack: `+m.message+`
|
|
48
|
-
`+m.stack}}var Ot=Object.prototype.hasOwnProperty,yu=e.unstable_scheduleCallback,Oo=e.unstable_cancelCallback,ry=e.unstable_shouldYield,Id=e.unstable_requestPaint,Re=e.unstable_now,fr=e.unstable_getCurrentPriorityLevel,Kn=e.unstable_ImmediatePriority,$d=e.unstable_UserBlockingPriority,zd=e.unstable_NormalPriority,fL=e.unstable_LowPriority,uS=e.unstable_IdlePriority,hL=e.log,mL=e.unstable_setDisableYieldValue,gu=null,Kr=null;function oi(a){if(typeof hL=="function"&&mL(a),Kr&&typeof Kr.setStrictMode=="function")try{Kr.setStrictMode(gu,a)}catch{}}var Gr=Math.clz32?Math.clz32:gL,pL=Math.log,yL=Math.LN2;function gL(a){return a>>>=0,a===0?32:31-(pL(a)/yL|0)|0}var Bd=256,Ud=262144,qd=4194304;function us(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 Fd(a,s,u){var m=a.pendingLanes;if(m===0)return 0;var x=0,j=a.suspendedLanes,O=a.pingedLanes;a=a.warmLanes;var P=m&134217727;return P!==0?(m=P&~j,m!==0?x=us(m):(O&=P,O!==0?x=us(O):u||(u=P&~a,u!==0&&(x=us(u))))):(P=m&~j,P!==0?x=us(P):O!==0?x=us(O):u||(u=m&~a,u!==0&&(x=us(u)))),x===0?0:s!==0&&s!==x&&(s&j)===0&&(j=x&-x,u=s&-s,j>=u||j===32&&(u&4194048)!==0)?s:x}function vu(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function vL(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 cS(){var a=qd;return qd<<=1,(qd&62914560)===0&&(qd=4194304),a}function ny(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function xu(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function xL(a,s,u,m,x,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,Y=a.hiddenUpdates;for(u=O&~u;0<u;){var J=31-Gr(u),ie=1<<J;P[J]=0,z[J]=-1;var X=Y[J];if(X!==null)for(Y[J]=null,J=0;J<X.length;J++){var Z=X[J];Z!==null&&(Z.lane&=-536870913)}u&=~ie}m!==0&&dS(a,m,0),j!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=j&~(O&~s))}function dS(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var m=31-Gr(s);a.entangledLanes|=s,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function fS(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var m=31-Gr(u),x=1<<m;x&s|a[m]&s&&(a[m]|=s),u&=~x}}function hS(a,s){var u=s&-s;return u=(u&42)!==0?1:ay(u),(u&(a.suspendedLanes|s))!==0?0:u}function ay(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 iy(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function mS(){var a=L.p;return a!==0?a:(a=window.event,a===void 0?32:J_(a.type))}function pS(a,s){var u=L.p;try{return L.p=a,s()}finally{L.p=u}}var li=Math.random().toString(36).slice(2),tr="__reactFiber$"+li,Pr="__reactProps$"+li,Eo="__reactContainer$"+li,sy="__reactEvents$"+li,bL="__reactListeners$"+li,jL="__reactHandles$"+li,yS="__reactResources$"+li,bu="__reactMarker$"+li;function oy(a){delete a[tr],delete a[Pr],delete a[sy],delete a[bL],delete a[jL]}function Ao(a){var s=a[tr];if(s)return s;for(var u=a.parentNode;u;){if(s=u[Eo]||u[tr]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=I_(a);a!==null;){if(u=a[tr])return u;a=I_(a)}return s}a=u,u=a.parentNode}return null}function Co(a){if(a=a[tr]||a[Eo]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function ju(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(n(33))}function To(a){var s=a[yS];return s||(s=a[yS]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Kt(a){a[bu]=!0}var gS=new Set,vS={};function cs(a,s){Po(a,s),Po(a+"Capture",s)}function Po(a,s){for(vS[a]=s,a=0;a<s.length;a++)gS.add(s[a])}var wL=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]*$"),xS={},bS={};function SL(a){return Ot.call(bS,a)?!0:Ot.call(xS,a)?!1:wL.test(a)?bS[a]=!0:(xS[a]=!0,!1)}function Hd(a,s,u){if(SL(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 Kd(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 jS(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function NL(a,s,u){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var x=m.get,j=m.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return x.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 ly(a){if(!a._valueTracker){var s=jS(a)?"checked":"value";a._valueTracker=NL(a,s,""+a[s])}}function wS(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return a&&(m=jS(a)?a.checked?"true":"false":a.value),a=m,a!==u?(s.setValue(a),!0):!1}function Gd(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 _L=/[\n"\\]/g;function cn(a){return a.replace(_L,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function uy(a,s,u,m,x,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?cy(a,O,un(s)):u!=null?cy(a,O,un(u)):m!=null&&a.removeAttribute("value"),x==null&&j!=null&&(a.defaultChecked=!!j),x!=null&&(a.checked=x&&typeof x!="function"&&typeof x!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?a.name=""+un(P):a.removeAttribute("name")}function SS(a,s,u,m,x,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)){ly(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??x,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),ly(a)}function cy(a,s,u){s==="number"&&Gd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function Ro(a,s,u,m){if(a=a.options,s){s={};for(var x=0;x<u.length;x++)s["$"+u[x]]=!0;for(u=0;u<a.length;u++)x=s.hasOwnProperty("$"+a[u].value),a[u].selected!==x&&(a[u].selected=x),x&&m&&(a[u].defaultSelected=!0)}else{for(u=""+un(u),s=null,x=0;x<a.length;x++){if(a[x].value===u){a[x].selected=!0,m&&(a[x].defaultSelected=!0);return}s!==null||a[x].disabled||(s=a[x])}s!==null&&(s.selected=!0)}}function NS(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 _S(a,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(n(92));if(ne(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),ly(a)}function Mo(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var OL=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 OS(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||OL.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function ES(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 x in s)m=s[x],s.hasOwnProperty(x)&&u[x]!==m&&OS(a,x,m)}else for(var j in s)s.hasOwnProperty(j)&&OS(a,j,s[j])}function dy(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 EL=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),AL=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Yd(a){return AL.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function va(){}var fy=null;function hy(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Do=null,ko=null;function AS(a){var s=Co(a);if(s&&(a=s.stateNode)){var u=a[Pr]||null;e:switch(a=s.stateNode,s.type){case"input":if(uy(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 x=m[Pr]||null;if(!x)throw Error(n(90));uy(m,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===a.form&&wS(m)}break e;case"textarea":NS(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&Ro(a,!!u.multiple,s,!1)}}}var my=!1;function CS(a,s,u){if(my)return a(s,u);my=!0;try{var m=a(s);return m}finally{if(my=!1,(Do!==null||ko!==null)&&(kf(),Do&&(s=Do,a=ko,ko=Do=null,AS(s),a)))for(s=0;s<a.length;s++)AS(a[s])}}function wu(a,s){var u=a.stateNode;if(u===null)return null;var m=u[Pr]||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 xa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),py=!1;if(xa)try{var Su={};Object.defineProperty(Su,"passive",{get:function(){py=!0}}),window.addEventListener("test",Su,Su),window.removeEventListener("test",Su,Su)}catch{py=!1}var ui=null,yy=null,Vd=null;function TS(){if(Vd)return Vd;var a,s=yy,u=s.length,m,x="value"in ui?ui.value:ui.textContent,j=x.length;for(a=0;a<u&&s[a]===x[a];a++);var O=u-a;for(m=1;m<=O&&s[u-m]===x[j-m];m++);return Vd=x.slice(a,1<m?1-m:void 0)}function Qd(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 Xd(){return!0}function PS(){return!1}function Rr(a){function s(u,m,x,j,O){this._reactName=u,this._targetInst=x,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)?Xd:PS,this.isPropagationStopped=PS,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Xd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Xd)},persist:function(){},isPersistent:Xd}),s}var ds={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wd=Rr(ds),Nu=y({},ds,{view:0,detail:0}),CL=Rr(Nu),gy,vy,_u,Zd=y({},Nu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:by,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!==_u&&(_u&&a.type==="mousemove"?(gy=a.screenX-_u.screenX,vy=a.screenY-_u.screenY):vy=gy=0,_u=a),gy)},movementY:function(a){return"movementY"in a?a.movementY:vy}}),RS=Rr(Zd),TL=y({},Zd,{dataTransfer:0}),PL=Rr(TL),RL=y({},Nu,{relatedTarget:0}),xy=Rr(RL),ML=y({},ds,{animationName:0,elapsedTime:0,pseudoElement:0}),DL=Rr(ML),kL=y({},ds,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),LL=Rr(kL),IL=y({},ds,{data:0}),MS=Rr(IL),$L={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zL={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"},BL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UL(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=BL[a])?!!s[a]:!1}function by(){return UL}var qL=y({},Nu,{key:function(a){if(a.key){var s=$L[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Qd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?zL[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:by,charCode:function(a){return a.type==="keypress"?Qd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Qd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),FL=Rr(qL),HL=y({},Zd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),DS=Rr(HL),KL=y({},Nu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:by}),GL=Rr(KL),YL=y({},ds,{propertyName:0,elapsedTime:0,pseudoElement:0}),VL=Rr(YL),QL=y({},Zd,{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}),XL=Rr(QL),WL=y({},ds,{newState:0,oldState:0}),ZL=Rr(WL),JL=[9,13,27,32],jy=xa&&"CompositionEvent"in window,Ou=null;xa&&"documentMode"in document&&(Ou=document.documentMode);var eI=xa&&"TextEvent"in window&&!Ou,kS=xa&&(!jy||Ou&&8<Ou&&11>=Ou),LS=" ",IS=!1;function $S(a,s){switch(a){case"keyup":return JL.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zS(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Lo=!1;function tI(a,s){switch(a){case"compositionend":return zS(s);case"keypress":return s.which!==32?null:(IS=!0,LS);case"textInput":return a=s.data,a===LS&&IS?null:a;default:return null}}function rI(a,s){if(Lo)return a==="compositionend"||!jy&&$S(a,s)?(a=TS(),Vd=yy=ui=null,Lo=!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 kS&&s.locale!=="ko"?null:s.data;default:return null}}var nI={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 BS(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!nI[a.type]:s==="textarea"}function US(a,s,u,m){Do?ko?ko.push(m):ko=[m]:Do=m,s=qf(s,"onChange"),0<s.length&&(u=new Wd("onChange","change",null,u,m),a.push({event:u,listeners:s}))}var Eu=null,Au=null;function aI(a){S_(a,0)}function Jd(a){var s=ju(a);if(wS(s))return a}function qS(a,s){if(a==="change")return s}var FS=!1;if(xa){var wy;if(xa){var Sy="oninput"in document;if(!Sy){var HS=document.createElement("div");HS.setAttribute("oninput","return;"),Sy=typeof HS.oninput=="function"}wy=Sy}else wy=!1;FS=wy&&(!document.documentMode||9<document.documentMode)}function KS(){Eu&&(Eu.detachEvent("onpropertychange",GS),Au=Eu=null)}function GS(a){if(a.propertyName==="value"&&Jd(Au)){var s=[];US(s,Au,a,hy(a)),CS(aI,s)}}function iI(a,s,u){a==="focusin"?(KS(),Eu=s,Au=u,Eu.attachEvent("onpropertychange",GS)):a==="focusout"&&KS()}function sI(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Jd(Au)}function oI(a,s){if(a==="click")return Jd(s)}function lI(a,s){if(a==="input"||a==="change")return Jd(s)}function uI(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Yr=typeof Object.is=="function"?Object.is:uI;function Cu(a,s){if(Yr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var x=u[m];if(!Ot.call(s,x)||!Yr(a[x],s[x]))return!1}return!0}function YS(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function VS(a,s){var u=YS(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=YS(u)}}function QS(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?QS(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function XS(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Gd(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=Gd(a.document)}return s}function Ny(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 cI=xa&&"documentMode"in document&&11>=document.documentMode,Io=null,_y=null,Tu=null,Oy=!1;function WS(a,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;Oy||Io==null||Io!==Gd(m)||(m=Io,"selectionStart"in m&&Ny(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}),Tu&&Cu(Tu,m)||(Tu=m,m=qf(_y,"onSelect"),0<m.length&&(s=new Wd("onSelect","select",null,s,u),a.push({event:s,listeners:m}),s.target=Io)))}function fs(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var $o={animationend:fs("Animation","AnimationEnd"),animationiteration:fs("Animation","AnimationIteration"),animationstart:fs("Animation","AnimationStart"),transitionrun:fs("Transition","TransitionRun"),transitionstart:fs("Transition","TransitionStart"),transitioncancel:fs("Transition","TransitionCancel"),transitionend:fs("Transition","TransitionEnd")},Ey={},ZS={};xa&&(ZS=document.createElement("div").style,"AnimationEvent"in window||(delete $o.animationend.animation,delete $o.animationiteration.animation,delete $o.animationstart.animation),"TransitionEvent"in window||delete $o.transitionend.transition);function hs(a){if(Ey[a])return Ey[a];if(!$o[a])return a;var s=$o[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in ZS)return Ey[a]=s[u];return a}var JS=hs("animationend"),e1=hs("animationiteration"),t1=hs("animationstart"),dI=hs("transitionrun"),fI=hs("transitionstart"),hI=hs("transitioncancel"),r1=hs("transitionend"),n1=new Map,Ay="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(" ");Ay.push("scrollEnd");function Pn(a,s){n1.set(a,s),cs(s,[a])}var ef=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=[],zo=0,Cy=0;function tf(){for(var a=zo,s=Cy=zo=0;s<a;){var u=dn[s];dn[s++]=null;var m=dn[s];dn[s++]=null;var x=dn[s];dn[s++]=null;var j=dn[s];if(dn[s++]=null,m!==null&&x!==null){var O=m.pending;O===null?x.next=x:(x.next=O.next,O.next=x),m.pending=x}j!==0&&a1(u,x,j)}}function rf(a,s,u,m){dn[zo++]=a,dn[zo++]=s,dn[zo++]=u,dn[zo++]=m,Cy|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function Ty(a,s,u,m){return rf(a,s,u,m),nf(a)}function ms(a,s){return rf(a,null,null,s),nf(a)}function a1(a,s,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var x=!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||(x=!0)),a=j,j=j.return;return a.tag===3?(j=a.stateNode,x&&s!==null&&(x=31-Gr(u),a=j.hiddenUpdates,m=a[x],m===null?a[x]=[s]:m.push(s),s.lane=u|536870912),j):null}function nf(a){if(50<Zu)throw Zu=0,zg=null,Error(n(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var Bo={};function mI(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 Vr(a,s,u,m){return new mI(a,s,u,m)}function Py(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ba(a,s){var u=a.alternate;return u===null?(u=Vr(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 i1(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 af(a,s,u,m,x,j){var O=0;if(m=a,typeof a=="function")Py(a)&&(O=1);else if(typeof a=="string")O=x$(a,u,oe.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case U:return a=Vr(31,u,s,x),a.elementType=U,a.lanes=j,a;case w:return ps(u.children,x,j,s);case N:O=8,x|=24;break;case _:return a=Vr(12,u,s,x|2),a.elementType=_,a.lanes=j,a;case T:return a=Vr(13,u,s,x),a.elementType=T,a.lanes=j,a;case R:return a=Vr(19,u,s,x),a.elementType=R,a.lanes=j,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case C:O=10;break e;case A:O=9;break e;case E: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=Vr(O,u,s,x),s.elementType=a,s.type=m,s.lanes=j,s}function ps(a,s,u,m){return a=Vr(7,a,m,s),a.lanes=u,a}function Ry(a,s,u){return a=Vr(6,a,null,s),a.lanes=u,a}function s1(a){var s=Vr(18,null,null,0);return s.stateNode=a,s}function My(a,s,u){return s=Vr(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var o1=new WeakMap;function fn(a,s){if(typeof a=="object"&&a!==null){var u=o1.get(a);return u!==void 0?u:(s={value:a,source:s,stack:he(s)},o1.set(a,s),s)}return{value:a,source:s,stack:he(s)}}var Uo=[],qo=0,sf=null,Pu=0,hn=[],mn=0,ci=null,Gn=1,Yn="";function ja(a,s){Uo[qo++]=Pu,Uo[qo++]=sf,sf=a,Pu=s}function l1(a,s,u){hn[mn++]=Gn,hn[mn++]=Yn,hn[mn++]=ci,ci=a;var m=Gn;a=Yn;var x=32-Gr(m)-1;m&=~(1<<x),u+=1;var j=32-Gr(s)+x;if(30<j){var O=x-x%5;j=(m&(1<<O)-1).toString(32),m>>=O,x-=O,Gn=1<<32-Gr(s)+x|u<<x|m,Yn=j+a}else Gn=1<<j|u<<x|m,Yn=a}function Dy(a){a.return!==null&&(ja(a,1),l1(a,1,0))}function ky(a){for(;a===sf;)sf=Uo[--qo],Uo[qo]=null,Pu=Uo[--qo],Uo[qo]=null;for(;a===ci;)ci=hn[--mn],hn[mn]=null,Yn=hn[--mn],hn[mn]=null,Gn=hn[--mn],hn[mn]=null}function u1(a,s){hn[mn++]=Gn,hn[mn++]=Yn,hn[mn++]=ci,Gn=s.id,Yn=s.overflow,ci=a}var rr=null,ot=null,$e=!1,di=null,pn=!1,Ly=Error(n(519));function fi(a){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ru(fn(s,a)),Ly}function c1(a){var s=a.stateNode,u=a.type,m=a.memoizedProps;switch(s[tr]=a,s[Pr]=m,u){case"dialog":ke("cancel",s),ke("close",s);break;case"iframe":case"object":case"embed":ke("load",s);break;case"video":case"audio":for(u=0;u<ec.length;u++)ke(ec[u],s);break;case"source":ke("error",s);break;case"img":case"image":case"link":ke("error",s),ke("load",s);break;case"details":ke("toggle",s);break;case"input":ke("invalid",s),SS(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":ke("invalid",s);break;case"textarea":ke("invalid",s),_S(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||E_(s.textContent,u)?(m.popover!=null&&(ke("beforetoggle",s),ke("toggle",s)),m.onScroll!=null&&ke("scroll",s),m.onScrollEnd!=null&&ke("scrollend",s),m.onClick!=null&&(s.onclick=va),s=!0):s=!1,s||fi(a,!0)}function d1(a){for(rr=a.return;rr;)switch(rr.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:rr=rr.return}}function Fo(a){if(a!==rr)return!1;if(!$e)return d1(a),$e=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||ev(a.type,a.memoizedProps)),u=!u),u&&ot&&fi(a),d1(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));ot=L_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));ot=L_(a)}else s===27?(s=ot,Oi(a.type)?(a=iv,iv=null,ot=a):ot=s):ot=rr?gn(a.stateNode.nextSibling):null;return!0}function ys(){ot=rr=null,$e=!1}function Iy(){var a=di;return a!==null&&(Lr===null?Lr=a:Lr.push.apply(Lr,a),di=null),a}function Ru(a){di===null?di=[a]:di.push(a)}var $y=I(null),gs=null,wa=null;function hi(a,s,u){le($y,s._currentValue),s._currentValue=u}function Sa(a){a._currentValue=$y.current,Q($y)}function zy(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 By(a,s,u,m){var x=a.child;for(x!==null&&(x.return=a);x!==null;){var j=x.dependencies;if(j!==null){var O=x.child;j=j.firstContext;e:for(;j!==null;){var P=j;j=x;for(var z=0;z<s.length;z++)if(P.context===s[z]){j.lanes|=u,P=j.alternate,P!==null&&(P.lanes|=u),zy(j.return,u,a),m||(O=null);break e}j=P.next}}else if(x.tag===18){if(O=x.return,O===null)throw Error(n(341));O.lanes|=u,j=O.alternate,j!==null&&(j.lanes|=u),zy(O,u,a),O=null}else O=x.child;if(O!==null)O.return=x;else for(O=x;O!==null;){if(O===a){O=null;break}if(x=O.sibling,x!==null){x.return=O.return,O=x;break}O=O.return}x=O}}function Ho(a,s,u,m){a=null;for(var x=s,j=!1;x!==null;){if(!j){if((x.flags&524288)!==0)j=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var O=x.alternate;if(O===null)throw Error(n(387));if(O=O.memoizedProps,O!==null){var P=x.type;Yr(x.pendingProps.value,O.value)||(a!==null?a.push(P):a=[P])}}else if(x===Se.current){if(O=x.alternate,O===null)throw Error(n(387));O.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(a!==null?a.push(ic):a=[ic])}x=x.return}a!==null&&By(s,a,u,m),s.flags|=262144}function of(a){for(a=a.firstContext;a!==null;){if(!Yr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function vs(a){gs=a,wa=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function nr(a){return f1(gs,a)}function lf(a,s){return gs===null&&vs(a),f1(a,s)}function f1(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},wa===null){if(a===null)throw Error(n(308));wa=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else wa=wa.next=s;return u}var pI=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()})}},yI=e.unstable_scheduleCallback,gI=e.unstable_NormalPriority,Rt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Uy(){return{controller:new pI,data:new Map,refCount:0}}function Mu(a){a.refCount--,a.refCount===0&&yI(gI,function(){a.controller.abort()})}var Du=null,qy=0,Ko=0,Go=null;function vI(a,s){if(Du===null){var u=Du=[];qy=0,Ko=Kg(),Go={status:"pending",value:void 0,then:function(m){u.push(m)}}}return qy++,s.then(h1,h1),s}function h1(){if(--qy===0&&Du!==null){Go!==null&&(Go.status="fulfilled");var a=Du;Du=null,Ko=0,Go=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function xI(a,s){var u=[],m={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return a.then(function(){m.status="fulfilled",m.value=s;for(var x=0;x<u.length;x++)(0,u[x])(s)},function(x){for(m.status="rejected",m.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),m}var m1=$.S;$.S=function(a,s){WN=Re(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&vI(a,s),m1!==null&&m1(a,s)};var xs=I(null);function Fy(){var a=xs.current;return a!==null?a:nt.pooledCache}function uf(a,s){s===null?le(xs,xs.current):le(xs,s.pool)}function p1(){var a=Fy();return a===null?null:{parent:Rt._currentValue,pool:a}}var Yo=Error(n(460)),Hy=Error(n(474)),cf=Error(n(542)),df={then:function(){}};function y1(a){return a=a.status,a==="fulfilled"||a==="rejected"}function g1(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(va,va),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,x1(a),a;default:if(typeof s.status=="string")s.then(va,va);else{if(a=nt,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=s,a.status="pending",a.then(function(m){if(s.status==="pending"){var x=s;x.status="fulfilled",x.value=m}},function(m){if(s.status==="pending"){var x=s;x.status="rejected",x.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,x1(a),a}throw js=s,Yo}}function bs(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(js=u,Yo):u}}var js=null;function v1(){if(js===null)throw Error(n(459));var a=js;return js=null,a}function x1(a){if(a===Yo||a===cf)throw Error(n(483))}var Vo=null,ku=0;function ff(a){var s=ku;return ku+=1,Vo===null&&(Vo=[]),g1(Vo,a,s)}function Lu(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function hf(a,s){throw s.$$typeof===g?Error(n(525)):(a=Object.prototype.toString.call(s),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function b1(a){function s(K,F){if(a){var G=K.deletions;G===null?(K.deletions=[F],K.flags|=16):G.push(F)}}function u(K,F){if(!a)return null;for(;F!==null;)s(K,F),F=F.sibling;return null}function m(K){for(var F=new Map;K!==null;)K.key!==null?F.set(K.key,K):F.set(K.index,K),K=K.sibling;return F}function x(K,F){return K=ba(K,F),K.index=0,K.sibling=null,K}function j(K,F,G){return K.index=G,a?(G=K.alternate,G!==null?(G=G.index,G<F?(K.flags|=67108866,F):G):(K.flags|=67108866,F)):(K.flags|=1048576,F)}function O(K){return a&&K.alternate===null&&(K.flags|=67108866),K}function P(K,F,G,re){return F===null||F.tag!==6?(F=Ry(G,K.mode,re),F.return=K,F):(F=x(F,G),F.return=K,F)}function z(K,F,G,re){var we=G.type;return we===w?J(K,F,G.props.children,re,G.key):F!==null&&(F.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===M&&bs(we)===F.type)?(F=x(F,G.props),Lu(F,G),F.return=K,F):(F=af(G.type,G.key,G.props,null,K.mode,re),Lu(F,G),F.return=K,F)}function Y(K,F,G,re){return F===null||F.tag!==4||F.stateNode.containerInfo!==G.containerInfo||F.stateNode.implementation!==G.implementation?(F=My(G,K.mode,re),F.return=K,F):(F=x(F,G.children||[]),F.return=K,F)}function J(K,F,G,re,we){return F===null||F.tag!==7?(F=ps(G,K.mode,re,we),F.return=K,F):(F=x(F,G),F.return=K,F)}function ie(K,F,G){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Ry(""+F,K.mode,G),F.return=K,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case v:return G=af(F.type,F.key,F.props,null,K.mode,G),Lu(G,F),G.return=K,G;case b:return F=My(F,K.mode,G),F.return=K,F;case M:return F=bs(F),ie(K,F,G)}if(ne(F)||B(F))return F=ps(F,K.mode,G,null),F.return=K,F;if(typeof F.then=="function")return ie(K,ff(F),G);if(F.$$typeof===C)return ie(K,lf(K,F),G);hf(K,F)}return null}function X(K,F,G,re){var we=F!==null?F.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return we!==null?null:P(K,F,""+G,re);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case v:return G.key===we?z(K,F,G,re):null;case b:return G.key===we?Y(K,F,G,re):null;case M:return G=bs(G),X(K,F,G,re)}if(ne(G)||B(G))return we!==null?null:J(K,F,G,re,null);if(typeof G.then=="function")return X(K,F,ff(G),re);if(G.$$typeof===C)return X(K,F,lf(K,G),re);hf(K,G)}return null}function Z(K,F,G,re,we){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return K=K.get(G)||null,P(F,K,""+re,we);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case v:return K=K.get(re.key===null?G:re.key)||null,z(F,K,re,we);case b:return K=K.get(re.key===null?G:re.key)||null,Y(F,K,re,we);case M:return re=bs(re),Z(K,F,G,re,we)}if(ne(re)||B(re))return K=K.get(G)||null,J(F,K,re,we,null);if(typeof re.then=="function")return Z(K,F,G,ff(re),we);if(re.$$typeof===C)return Z(K,F,G,lf(F,re),we);hf(F,re)}return null}function ye(K,F,G,re){for(var we=null,Fe=null,ve=F,Ce=F=0,Ie=null;ve!==null&&Ce<G.length;Ce++){ve.index>Ce?(Ie=ve,ve=null):Ie=ve.sibling;var He=X(K,ve,G[Ce],re);if(He===null){ve===null&&(ve=Ie);break}a&&ve&&He.alternate===null&&s(K,ve),F=j(He,F,Ce),Fe===null?we=He:Fe.sibling=He,Fe=He,ve=Ie}if(Ce===G.length)return u(K,ve),$e&&ja(K,Ce),we;if(ve===null){for(;Ce<G.length;Ce++)ve=ie(K,G[Ce],re),ve!==null&&(F=j(ve,F,Ce),Fe===null?we=ve:Fe.sibling=ve,Fe=ve);return $e&&ja(K,Ce),we}for(ve=m(ve);Ce<G.length;Ce++)Ie=Z(ve,K,Ce,G[Ce],re),Ie!==null&&(a&&Ie.alternate!==null&&ve.delete(Ie.key===null?Ce:Ie.key),F=j(Ie,F,Ce),Fe===null?we=Ie:Fe.sibling=Ie,Fe=Ie);return a&&ve.forEach(function(Pi){return s(K,Pi)}),$e&&ja(K,Ce),we}function Ne(K,F,G,re){if(G==null)throw Error(n(151));for(var we=null,Fe=null,ve=F,Ce=F=0,Ie=null,He=G.next();ve!==null&&!He.done;Ce++,He=G.next()){ve.index>Ce?(Ie=ve,ve=null):Ie=ve.sibling;var Pi=X(K,ve,He.value,re);if(Pi===null){ve===null&&(ve=Ie);break}a&&ve&&Pi.alternate===null&&s(K,ve),F=j(Pi,F,Ce),Fe===null?we=Pi:Fe.sibling=Pi,Fe=Pi,ve=Ie}if(He.done)return u(K,ve),$e&&ja(K,Ce),we;if(ve===null){for(;!He.done;Ce++,He=G.next())He=ie(K,He.value,re),He!==null&&(F=j(He,F,Ce),Fe===null?we=He:Fe.sibling=He,Fe=He);return $e&&ja(K,Ce),we}for(ve=m(ve);!He.done;Ce++,He=G.next())He=Z(ve,K,Ce,He.value,re),He!==null&&(a&&He.alternate!==null&&ve.delete(He.key===null?Ce:He.key),F=j(He,F,Ce),Fe===null?we=He:Fe.sibling=He,Fe=He);return a&&ve.forEach(function(T$){return s(K,T$)}),$e&&ja(K,Ce),we}function tt(K,F,G,re){if(typeof G=="object"&&G!==null&&G.type===w&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case v:e:{for(var we=G.key;F!==null;){if(F.key===we){if(we=G.type,we===w){if(F.tag===7){u(K,F.sibling),re=x(F,G.props.children),re.return=K,K=re;break e}}else if(F.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===M&&bs(we)===F.type){u(K,F.sibling),re=x(F,G.props),Lu(re,G),re.return=K,K=re;break e}u(K,F);break}else s(K,F);F=F.sibling}G.type===w?(re=ps(G.props.children,K.mode,re,G.key),re.return=K,K=re):(re=af(G.type,G.key,G.props,null,K.mode,re),Lu(re,G),re.return=K,K=re)}return O(K);case b:e:{for(we=G.key;F!==null;){if(F.key===we)if(F.tag===4&&F.stateNode.containerInfo===G.containerInfo&&F.stateNode.implementation===G.implementation){u(K,F.sibling),re=x(F,G.children||[]),re.return=K,K=re;break e}else{u(K,F);break}else s(K,F);F=F.sibling}re=My(G,K.mode,re),re.return=K,K=re}return O(K);case M:return G=bs(G),tt(K,F,G,re)}if(ne(G))return ye(K,F,G,re);if(B(G)){if(we=B(G),typeof we!="function")throw Error(n(150));return G=we.call(G),Ne(K,F,G,re)}if(typeof G.then=="function")return tt(K,F,ff(G),re);if(G.$$typeof===C)return tt(K,F,lf(K,G),re);hf(K,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,F!==null&&F.tag===6?(u(K,F.sibling),re=x(F,G),re.return=K,K=re):(u(K,F),re=Ry(G,K.mode,re),re.return=K,K=re),O(K)):u(K,F)}return function(K,F,G,re){try{ku=0;var we=tt(K,F,G,re);return Vo=null,we}catch(ve){if(ve===Yo||ve===cf)throw ve;var Fe=Vr(29,ve,null,K.mode);return Fe.lanes=re,Fe.return=K,Fe}finally{}}}var ws=b1(!0),j1=b1(!1),mi=!1;function Ky(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gy(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 pi(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function yi(a,s,u){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Ge&2)!==0){var x=m.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),m.pending=s,s=nf(a),a1(a,null,u),s}return rf(a,m,s,u),nf(a)}function Iu(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,fS(a,u)}}function Yy(a,s){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var x=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?x=j=O:j=j.next=O,u=u.next}while(u!==null);j===null?x=j=s:j=j.next=s}else x=j=s;u={baseState:m.baseState,firstBaseUpdate:x,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 Vy=!1;function $u(){if(Vy){var a=Go;if(a!==null)throw a}}function zu(a,s,u,m){Vy=!1;var x=a.updateQueue;mi=!1;var j=x.firstBaseUpdate,O=x.lastBaseUpdate,P=x.shared.pending;if(P!==null){x.shared.pending=null;var z=P,Y=z.next;z.next=null,O===null?j=Y:O.next=Y,O=z;var J=a.alternate;J!==null&&(J=J.updateQueue,P=J.lastBaseUpdate,P!==O&&(P===null?J.firstBaseUpdate=Y:P.next=Y,J.lastBaseUpdate=z))}if(j!==null){var ie=x.baseState;O=0,J=Y=z=null,P=j;do{var X=P.lane&-536870913,Z=X!==P.lane;if(Z?(Le&X)===X:(m&X)===X){X!==0&&X===Ko&&(Vy=!0),J!==null&&(J=J.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var ye=a,Ne=P;X=s;var tt=u;switch(Ne.tag){case 1:if(ye=Ne.payload,typeof ye=="function"){ie=ye.call(tt,ie,X);break e}ie=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ne.payload,X=typeof ye=="function"?ye.call(tt,ie,X):ye,X==null)break e;ie=y({},ie,X);break e;case 2:mi=!0}}X=P.callback,X!==null&&(a.flags|=64,Z&&(a.flags|=8192),Z=x.callbacks,Z===null?x.callbacks=[X]:Z.push(X))}else Z={lane:X,tag:P.tag,payload:P.payload,callback:P.callback,next:null},J===null?(Y=J=Z,z=ie):J=J.next=Z,O|=X;if(P=P.next,P===null){if(P=x.shared.pending,P===null)break;Z=P,P=Z.next,Z.next=null,x.lastBaseUpdate=Z,x.shared.pending=null}}while(!0);J===null&&(z=ie),x.baseState=z,x.firstBaseUpdate=Y,x.lastBaseUpdate=J,j===null&&(x.shared.lanes=0),ji|=O,a.lanes=O,a.memoizedState=ie}}function w1(a,s){if(typeof a!="function")throw Error(n(191,a));a.call(s)}function S1(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)w1(u[a],s)}var Qo=I(null),mf=I(0);function N1(a,s){a=Ra,le(mf,a),le(Qo,s),Ra=a|s.baseLanes}function Qy(){le(mf,Ra),le(Qo,Qo.current)}function Xy(){Ra=mf.current,Q(Qo),Q(mf)}var Qr=I(null),yn=null;function gi(a){var s=a.alternate;le(Et,Et.current&1),le(Qr,a),yn===null&&(s===null||Qo.current!==null||s.memoizedState!==null)&&(yn=a)}function Wy(a){le(Et,Et.current),le(Qr,a),yn===null&&(yn=a)}function _1(a){a.tag===22?(le(Et,Et.current),le(Qr,a),yn===null&&(yn=a)):vi()}function vi(){le(Et,Et.current),le(Qr,Qr.current)}function Xr(a){Q(Qr),yn===a&&(yn=null),Q(Et)}var Et=I(0);function pf(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||nv(u)||av(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 Na=0,Ae=null,Je=null,Mt=null,yf=!1,Xo=!1,Ss=!1,gf=0,Bu=0,Wo=null,bI=0;function bt(){throw Error(n(321))}function Zy(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Yr(a[u],s[u]))return!1;return!0}function Jy(a,s,u,m,x,j){return Na=j,Ae=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,$.H=a===null||a.memoizedState===null?lN:mg,Ss=!1,j=u(m,x),Ss=!1,Xo&&(j=E1(s,u,m,x)),O1(a),j}function O1(a){$.H=Fu;var s=Je!==null&&Je.next!==null;if(Na=0,Mt=Je=Ae=null,yf=!1,Bu=0,Wo=null,s)throw Error(n(300));a===null||Dt||(a=a.dependencies,a!==null&&of(a)&&(Dt=!0))}function E1(a,s,u,m){Ae=a;var x=0;do{if(Xo&&(Wo=null),Bu=0,Xo=!1,25<=x)throw Error(n(301));if(x+=1,Mt=Je=null,a.updateQueue!=null){var j=a.updateQueue;j.lastEffect=null,j.events=null,j.stores=null,j.memoCache!=null&&(j.memoCache.index=0)}$.H=uN,j=s(u,m)}while(Xo);return j}function jI(){var a=$.H,s=a.useState()[0];return s=typeof s.then=="function"?Uu(s):s,a=a.useState()[0],(Je!==null?Je.memoizedState:null)!==a&&(Ae.flags|=1024),s}function eg(){var a=gf!==0;return gf=0,a}function tg(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function rg(a){if(yf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}yf=!1}Na=0,Mt=Je=Ae=null,Xo=!1,Bu=gf=0,Wo=null}function jr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Ae.memoizedState=Mt=a:Mt=Mt.next=a,Mt}function At(){if(Je===null){var a=Ae.alternate;a=a!==null?a.memoizedState:null}else a=Je.next;var s=Mt===null?Ae.memoizedState:Mt.next;if(s!==null)Mt=s,Je=a;else{if(a===null)throw Ae.alternate===null?Error(n(467)):Error(n(310));Je=a,a={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},Mt===null?Ae.memoizedState=Mt=a:Mt=Mt.next=a}return Mt}function vf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Uu(a){var s=Bu;return Bu+=1,Wo===null&&(Wo=[]),a=g1(Wo,a,s),s=Ae,(Mt===null?s.memoizedState:Mt.next)===null&&(s=s.alternate,$.H=s===null||s.memoizedState===null?lN:mg),a}function xf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Uu(a);if(a.$$typeof===C)return nr(a)}throw Error(n(438,String(a)))}function ng(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(x){return x.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=vf(),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]=k;return s.index++,u}function _a(a,s){return typeof s=="function"?s(a):s}function bf(a){var s=At();return ag(s,Je,a)}function ag(a,s,u){var m=a.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=u;var x=a.baseQueue,j=m.pending;if(j!==null){if(x!==null){var O=x.next;x.next=j.next,j.next=O}s.baseQueue=x=j,m.pending=null}if(j=a.baseState,x===null)a.memoizedState=j;else{s=x.next;var P=O=null,z=null,Y=s,J=!1;do{var ie=Y.lane&-536870913;if(ie!==Y.lane?(Le&ie)===ie:(Na&ie)===ie){var X=Y.revertLane;if(X===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),ie===Ko&&(J=!0);else if((Na&X)===X){Y=Y.next,X===Ko&&(J=!0);continue}else ie={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},z===null?(P=z=ie,O=j):z=z.next=ie,Ae.lanes|=X,ji|=X;ie=Y.action,Ss&&u(j,ie),j=Y.hasEagerState?Y.eagerState:u(j,ie)}else X={lane:ie,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},z===null?(P=z=X,O=j):z=z.next=X,Ae.lanes|=ie,ji|=ie;Y=Y.next}while(Y!==null&&Y!==s);if(z===null?O=j:z.next=P,!Yr(j,a.memoizedState)&&(Dt=!0,J&&(u=Go,u!==null)))throw u;a.memoizedState=j,a.baseState=O,a.baseQueue=z,m.lastRenderedState=j}return x===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function ig(a){var s=At(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=a;var m=u.dispatch,x=u.pending,j=s.memoizedState;if(x!==null){u.pending=null;var O=x=x.next;do j=a(j,O.action),O=O.next;while(O!==x);Yr(j,s.memoizedState)||(Dt=!0),s.memoizedState=j,s.baseQueue===null&&(s.baseState=j),u.lastRenderedState=j}return[j,m]}function A1(a,s,u){var m=Ae,x=At(),j=$e;if(j){if(u===void 0)throw Error(n(407));u=u()}else u=s();var O=!Yr((Je||x).memoizedState,u);if(O&&(x.memoizedState=u,Dt=!0),x=x.queue,lg(P1.bind(null,m,x,a),[a]),x.getSnapshot!==s||O||Mt!==null&&Mt.memoizedState.tag&1){if(m.flags|=2048,Zo(9,{destroy:void 0},T1.bind(null,m,x,u,s),null),nt===null)throw Error(n(349));j||(Na&127)!==0||C1(m,s,u)}return u}function C1(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ae.updateQueue,s===null?(s=vf(),Ae.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function T1(a,s,u,m){s.value=u,s.getSnapshot=m,R1(s)&&M1(a)}function P1(a,s,u){return u(function(){R1(s)&&M1(a)})}function R1(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Yr(a,u)}catch{return!0}}function M1(a){var s=ms(a,2);s!==null&&Ir(s,a,2)}function sg(a){var s=jr();if(typeof a=="function"){var u=a;if(a=u(),Ss){oi(!0);try{u()}finally{oi(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:a},s}function D1(a,s,u,m){return a.baseState=u,ag(a,Je,typeof m=="function"?m:_a)}function wI(a,s,u,m,x){if(Sf(a))throw Error(n(485));if(a=s.action,a!==null){var j={payload:x,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(O){j.listeners.push(O)}};$.T!==null?u(!0):j.isTransition=!1,m(j),u=s.pending,u===null?(j.next=s.pending=j,k1(s,j)):(j.next=u.next,s.pending=u.next=j)}}function k1(a,s){var u=s.action,m=s.payload,x=a.state;if(s.isTransition){var j=$.T,O={};$.T=O;try{var P=u(x,m),z=$.S;z!==null&&z(O,P),L1(a,s,P)}catch(Y){og(a,s,Y)}finally{j!==null&&O.types!==null&&(j.types=O.types),$.T=j}}else try{j=u(x,m),L1(a,s,j)}catch(Y){og(a,s,Y)}}function L1(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){I1(a,s,m)},function(m){return og(a,s,m)}):I1(a,s,u)}function I1(a,s,u){s.status="fulfilled",s.value=u,$1(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,k1(a,u)))}function og(a,s,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,$1(s),s=s.next;while(s!==m)}a.action=null}function $1(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function z1(a,s){return s}function B1(a,s){if($e){var u=nt.formState;if(u!==null){e:{var m=Ae;if($e){if(ot){t:{for(var x=ot,j=pn;x.nodeType!==8;){if(!j){x=null;break t}if(x=gn(x.nextSibling),x===null){x=null;break t}}j=x.data,x=j==="F!"||j==="F"?x:null}if(x){ot=gn(x.nextSibling),m=x.data==="F!";break e}}fi(m)}m=!1}m&&(s=u[0])}}return u=jr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:z1,lastRenderedState:s},u.queue=m,u=iN.bind(null,Ae,m),m.dispatch=u,m=sg(!1),j=hg.bind(null,Ae,!1,m.queue),m=jr(),x={state:s,dispatch:null,action:a,pending:null},m.queue=x,u=wI.bind(null,Ae,x,j,u),x.dispatch=u,m.memoizedState=a,[s,u,!1]}function U1(a){var s=At();return q1(s,Je,a)}function q1(a,s,u){if(s=ag(a,s,z1)[0],a=bf(_a)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Uu(s)}catch(O){throw O===Yo?cf:O}else m=s;s=At();var x=s.queue,j=x.dispatch;return u!==s.memoizedState&&(Ae.flags|=2048,Zo(9,{destroy:void 0},SI.bind(null,x,u),null)),[m,j,a]}function SI(a,s){a.action=s}function F1(a){var s=At(),u=Je;if(u!==null)return q1(s,u,a);At(),s=s.memoizedState,u=At();var m=u.queue.dispatch;return u.memoizedState=a,[s,m,!1]}function Zo(a,s,u,m){return a={tag:a,create:u,deps:m,inst:s,next:null},s=Ae.updateQueue,s===null&&(s=vf(),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 H1(){return At().memoizedState}function jf(a,s,u,m){var x=jr();Ae.flags|=a,x.memoizedState=Zo(1|s,{destroy:void 0},u,m===void 0?null:m)}function wf(a,s,u,m){var x=At();m=m===void 0?null:m;var j=x.memoizedState.inst;Je!==null&&m!==null&&Zy(m,Je.memoizedState.deps)?x.memoizedState=Zo(s,j,u,m):(Ae.flags|=a,x.memoizedState=Zo(1|s,j,u,m))}function K1(a,s){jf(8390656,8,a,s)}function lg(a,s){wf(2048,8,a,s)}function NI(a){Ae.flags|=4;var s=Ae.updateQueue;if(s===null)s=vf(),Ae.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function G1(a){var s=At().memoizedState;return NI({ref:s,nextImpl:a}),function(){if((Ge&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function Y1(a,s){return wf(4,2,a,s)}function V1(a,s){return wf(4,4,a,s)}function Q1(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 X1(a,s,u){u=u!=null?u.concat([a]):null,wf(4,4,Q1.bind(null,s,a),u)}function ug(){}function W1(a,s){var u=At();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&Zy(s,m[1])?m[0]:(u.memoizedState=[a,s],a)}function Z1(a,s){var u=At();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&Zy(s,m[1]))return m[0];if(m=a(),Ss){oi(!0);try{a()}finally{oi(!1)}}return u.memoizedState=[m,s],m}function cg(a,s,u){return u===void 0||(Na&1073741824)!==0&&(Le&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=JN(),Ae.lanes|=a,ji|=a,u)}function J1(a,s,u,m){return Yr(u,s)?u:Qo.current!==null?(a=cg(a,u,m),Yr(a,s)||(Dt=!0),a):(Na&42)===0||(Na&1073741824)!==0&&(Le&261930)===0?(Dt=!0,a.memoizedState=u):(a=JN(),Ae.lanes|=a,ji|=a,s)}function eN(a,s,u,m,x){var j=L.p;L.p=j!==0&&8>j?j:8;var O=$.T,P={};$.T=P,hg(a,!1,s,u);try{var z=x(),Y=$.S;if(Y!==null&&Y(P,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var J=xI(z,m);qu(a,s,J,Jr(a))}else qu(a,s,m,Jr(a))}catch(ie){qu(a,s,{then:function(){},status:"rejected",reason:ie},Jr())}finally{L.p=j,O!==null&&P.types!==null&&(O.types=P.types),$.T=O}}function _I(){}function dg(a,s,u,m){if(a.tag!==5)throw Error(n(476));var x=tN(a).queue;eN(a,x,s,W,u===null?_I:function(){return rN(a),u(m)})}function tN(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:W},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function rN(a){var s=tN(a);s.next===null&&(s=a.alternate.memoizedState),qu(a,s.next.queue,{},Jr())}function fg(){return nr(ic)}function nN(){return At().memoizedState}function aN(){return At().memoizedState}function OI(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Jr();a=pi(u);var m=yi(s,a,u);m!==null&&(Ir(m,s,u),Iu(m,s,u)),s={cache:Uy()},a.payload=s;return}s=s.return}}function EI(a,s,u){var m=Jr();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Sf(a)?sN(s,u):(u=Ty(a,s,u,m),u!==null&&(Ir(u,a,m),oN(u,s,m)))}function iN(a,s,u){var m=Jr();qu(a,s,u,m)}function qu(a,s,u,m){var x={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Sf(a))sN(s,x);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(x.hasEagerState=!0,x.eagerState=P,Yr(P,O))return rf(a,s,x,0),nt===null&&tf(),!1}catch{}finally{}if(u=Ty(a,s,x,m),u!==null)return Ir(u,a,m),oN(u,s,m),!0}return!1}function hg(a,s,u,m){if(m={lane:2,revertLane:Kg(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Sf(a)){if(s)throw Error(n(479))}else s=Ty(a,u,m,2),s!==null&&Ir(s,a,2)}function Sf(a){var s=a.alternate;return a===Ae||s!==null&&s===Ae}function sN(a,s){Xo=yf=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function oN(a,s,u){if((u&4194048)!==0){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,fS(a,u)}}var Fu={readContext:nr,use:xf,useCallback:bt,useContext:bt,useEffect:bt,useImperativeHandle:bt,useLayoutEffect:bt,useInsertionEffect:bt,useMemo:bt,useReducer:bt,useRef:bt,useState:bt,useDebugValue:bt,useDeferredValue:bt,useTransition:bt,useSyncExternalStore:bt,useId:bt,useHostTransitionStatus:bt,useFormState:bt,useActionState:bt,useOptimistic:bt,useMemoCache:bt,useCacheRefresh:bt};Fu.useEffectEvent=bt;var lN={readContext:nr,use:xf,useCallback:function(a,s){return jr().memoizedState=[a,s===void 0?null:s],a},useContext:nr,useEffect:K1,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,jf(4194308,4,Q1.bind(null,s,a),u)},useLayoutEffect:function(a,s){return jf(4194308,4,a,s)},useInsertionEffect:function(a,s){jf(4,2,a,s)},useMemo:function(a,s){var u=jr();s=s===void 0?null:s;var m=a();if(Ss){oi(!0);try{a()}finally{oi(!1)}}return u.memoizedState=[m,s],m},useReducer:function(a,s,u){var m=jr();if(u!==void 0){var x=u(s);if(Ss){oi(!0);try{u(s)}finally{oi(!1)}}}else x=s;return m.memoizedState=m.baseState=x,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:x},m.queue=a,a=a.dispatch=EI.bind(null,Ae,a),[m.memoizedState,a]},useRef:function(a){var s=jr();return a={current:a},s.memoizedState=a},useState:function(a){a=sg(a);var s=a.queue,u=iN.bind(null,Ae,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:ug,useDeferredValue:function(a,s){var u=jr();return cg(u,a,s)},useTransition:function(){var a=sg(!1);return a=eN.bind(null,Ae,a.queue,!0,!1),jr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var m=Ae,x=jr();if($e){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),nt===null)throw Error(n(349));(Le&127)!==0||C1(m,s,u)}x.memoizedState=u;var j={value:u,getSnapshot:s};return x.queue=j,K1(P1.bind(null,m,j,a),[a]),m.flags|=2048,Zo(9,{destroy:void 0},T1.bind(null,m,j,u,s),null),u},useId:function(){var a=jr(),s=nt.identifierPrefix;if($e){var u=Yn,m=Gn;u=(m&~(1<<32-Gr(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=gf++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=bI++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:fg,useFormState:B1,useActionState:B1,useOptimistic:function(a){var s=jr();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=hg.bind(null,Ae,!0,u),u.dispatch=s,[a,s]},useMemoCache:ng,useCacheRefresh:function(){return jr().memoizedState=OI.bind(null,Ae)},useEffectEvent:function(a){var s=jr(),u={impl:a};return s.memoizedState=u,function(){if((Ge&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},mg={readContext:nr,use:xf,useCallback:W1,useContext:nr,useEffect:lg,useImperativeHandle:X1,useInsertionEffect:Y1,useLayoutEffect:V1,useMemo:Z1,useReducer:bf,useRef:H1,useState:function(){return bf(_a)},useDebugValue:ug,useDeferredValue:function(a,s){var u=At();return J1(u,Je.memoizedState,a,s)},useTransition:function(){var a=bf(_a)[0],s=At().memoizedState;return[typeof a=="boolean"?a:Uu(a),s]},useSyncExternalStore:A1,useId:nN,useHostTransitionStatus:fg,useFormState:U1,useActionState:U1,useOptimistic:function(a,s){var u=At();return D1(u,Je,a,s)},useMemoCache:ng,useCacheRefresh:aN};mg.useEffectEvent=G1;var uN={readContext:nr,use:xf,useCallback:W1,useContext:nr,useEffect:lg,useImperativeHandle:X1,useInsertionEffect:Y1,useLayoutEffect:V1,useMemo:Z1,useReducer:ig,useRef:H1,useState:function(){return ig(_a)},useDebugValue:ug,useDeferredValue:function(a,s){var u=At();return Je===null?cg(u,a,s):J1(u,Je.memoizedState,a,s)},useTransition:function(){var a=ig(_a)[0],s=At().memoizedState;return[typeof a=="boolean"?a:Uu(a),s]},useSyncExternalStore:A1,useId:nN,useHostTransitionStatus:fg,useFormState:F1,useActionState:F1,useOptimistic:function(a,s){var u=At();return Je!==null?D1(u,Je,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:ng,useCacheRefresh:aN};uN.useEffectEvent=G1;function pg(a,s,u,m){s=a.memoizedState,u=u(m,s),u=u==null?s:y({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var yg={enqueueSetState:function(a,s,u){a=a._reactInternals;var m=Jr(),x=pi(m);x.payload=s,u!=null&&(x.callback=u),s=yi(a,x,m),s!==null&&(Ir(s,a,m),Iu(s,a,m))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var m=Jr(),x=pi(m);x.tag=1,x.payload=s,u!=null&&(x.callback=u),s=yi(a,x,m),s!==null&&(Ir(s,a,m),Iu(s,a,m))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Jr(),m=pi(u);m.tag=2,s!=null&&(m.callback=s),s=yi(a,m,u),s!==null&&(Ir(s,a,u),Iu(s,a,u))}};function cN(a,s,u,m,x,j,O){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,j,O):s.prototype&&s.prototype.isPureReactComponent?!Cu(u,m)||!Cu(x,j):!0}function dN(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&&yg.enqueueReplaceState(s,s.state,null)}function Ns(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=y({},u));for(var x in a)u[x]===void 0&&(u[x]=a[x])}return u}function fN(a){ef(a)}function hN(a){console.error(a)}function mN(a){ef(a)}function Nf(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function pN(a,s,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function gg(a,s,u){return u=pi(u),u.tag=3,u.payload={element:null},u.callback=function(){Nf(a,s)},u}function yN(a){return a=pi(a),a.tag=3,a}function gN(a,s,u,m){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var j=m.value;a.payload=function(){return x(j)},a.callback=function(){pN(s,u,m)}}var O=u.stateNode;O!==null&&typeof O.componentDidCatch=="function"&&(a.callback=function(){pN(s,u,m),typeof x!="function"&&(wi===null?wi=new Set([this]):wi.add(this));var P=m.stack;this.componentDidCatch(m.value,{componentStack:P!==null?P:""})})}function AI(a,s,u,m,x){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&Ho(s,u,x,!0),u=Qr.current,u!==null){switch(u.tag){case 31:case 13:return yn===null?Lf():u.alternate===null&&jt===0&&(jt=3),u.flags&=-257,u.flags|=65536,u.lanes=x,m===df?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),qg(a,m,x)),!1;case 22:return u.flags|=65536,m===df?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)),qg(a,m,x)),!1}throw Error(n(435,u.tag))}return qg(a,m,x),Lf(),!1}if($e)return s=Qr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=x,m!==Ly&&(a=Error(n(422),{cause:m}),Ru(fn(a,u)))):(m!==Ly&&(s=Error(n(423),{cause:m}),Ru(fn(s,u))),a=a.current.alternate,a.flags|=65536,x&=-x,a.lanes|=x,m=fn(m,u),x=gg(a.stateNode,m,x),Yy(a,x),jt!==4&&(jt=2)),!1;var j=Error(n(520),{cause:m});if(j=fn(j,u),Wu===null?Wu=[j]:Wu.push(j),jt!==4&&(jt=2),s===null)return!0;m=fn(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=x&-x,u.lanes|=a,a=gg(u.stateNode,m,a),Yy(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"&&(wi===null||!wi.has(j))))return u.flags|=65536,x&=-x,u.lanes|=x,x=yN(x),gN(x,a,u,m),Yy(u,x),!1}u=u.return}while(u!==null);return!1}var vg=Error(n(461)),Dt=!1;function ar(a,s,u,m){s.child=a===null?j1(s,null,u,m):ws(s,a.child,u,m)}function vN(a,s,u,m,x){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 vs(s),m=Jy(a,s,u,O,j,x),P=eg(),a!==null&&!Dt?(tg(a,s,x),Oa(a,s,x)):($e&&P&&Dy(s),s.flags|=1,ar(a,s,m,x),s.child)}function xN(a,s,u,m,x){if(a===null){var j=u.type;return typeof j=="function"&&!Py(j)&&j.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=j,bN(a,s,j,m,x)):(a=af(u.type,null,m,s,s.mode,x),a.ref=s.ref,a.return=s,s.child=a)}if(j=a.child,!Og(a,x)){var O=j.memoizedProps;if(u=u.compare,u=u!==null?u:Cu,u(O,m)&&a.ref===s.ref)return Oa(a,s,x)}return s.flags|=1,a=ba(j,m),a.ref=s.ref,a.return=s,s.child=a}function bN(a,s,u,m,x){if(a!==null){var j=a.memoizedProps;if(Cu(j,m)&&a.ref===s.ref)if(Dt=!1,s.pendingProps=m=j,Og(a,x))(a.flags&131072)!==0&&(Dt=!0);else return s.lanes=a.lanes,Oa(a,s,x)}return xg(a,s,u,m,x)}function jN(a,s,u,m){var x=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,x=0;m!==null;)x=x|m.lanes|m.childLanes,m=m.sibling;m=x&~j}else m=0,s.child=null;return wN(a,s,j,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&uf(s,j!==null?j.cachePool:null),j!==null?N1(s,j):Qy(),_1(s);else return m=s.lanes=536870912,wN(a,s,j!==null?j.baseLanes|u:u,u,m)}else j!==null?(uf(s,j.cachePool),N1(s,j),vi(),s.memoizedState=null):(a!==null&&uf(s,null),Qy(),vi());return ar(a,s,x,u),s.child}function Hu(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function wN(a,s,u,m,x){var j=Fy();return j=j===null?null:{parent:Rt._currentValue,pool:j},s.memoizedState={baseLanes:u,cachePool:j},a!==null&&uf(s,null),Qy(),_1(s),a!==null&&Ho(a,s,m,!0),s.childLanes=x,null}function _f(a,s){return s=Ef({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function SN(a,s,u){return ws(s,a.child,null,u),a=_f(s,s.pendingProps),a.flags|=2,Xr(s),s.memoizedState=null,a}function CI(a,s,u){var m=s.pendingProps,x=(s.flags&128)!==0;if(s.flags&=-129,a===null){if($e){if(m.mode==="hidden")return a=_f(s,m),s.lanes=536870912,Hu(null,a);if(Wy(s),(a=ot)?(a=k_(a,pn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:ci!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=s1(a),u.return=s,s.child=u,rr=s,ot=null)):a=null,a===null)throw fi(s);return s.lanes=536870912,null}return _f(s,m)}var j=a.memoizedState;if(j!==null){var O=j.dehydrated;if(Wy(s),x)if(s.flags&256)s.flags&=-257,s=SN(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(n(558));else if(Dt||Ho(a,s,u,!1),x=(u&a.childLanes)!==0,Dt||x){if(m=nt,m!==null&&(O=hS(m,u),O!==0&&O!==j.retryLane))throw j.retryLane=O,ms(a,O),Ir(m,a,O),vg;Lf(),s=SN(a,s,u)}else a=j.treeContext,ot=gn(O.nextSibling),rr=s,$e=!0,di=null,pn=!1,a!==null&&u1(s,a),s=_f(s,m),s.flags|=4096;return s}return a=ba(a.child,{mode:m.mode,children:m.children}),a.ref=s.ref,s.child=a,a.return=s,a}function Of(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 xg(a,s,u,m,x){return vs(s),u=Jy(a,s,u,m,void 0,x),m=eg(),a!==null&&!Dt?(tg(a,s,x),Oa(a,s,x)):($e&&m&&Dy(s),s.flags|=1,ar(a,s,u,x),s.child)}function NN(a,s,u,m,x,j){return vs(s),s.updateQueue=null,u=E1(s,m,u,x),O1(a),m=eg(),a!==null&&!Dt?(tg(a,s,j),Oa(a,s,j)):($e&&m&&Dy(s),s.flags|=1,ar(a,s,u,j),s.child)}function _N(a,s,u,m,x){if(vs(s),s.stateNode===null){var j=Bo,O=u.contextType;typeof O=="object"&&O!==null&&(j=nr(O)),j=new u(m,j),s.memoizedState=j.state!==null&&j.state!==void 0?j.state:null,j.updater=yg,s.stateNode=j,j._reactInternals=s,j=s.stateNode,j.props=m,j.state=s.memoizedState,j.refs={},Ky(s),O=u.contextType,j.context=typeof O=="object"&&O!==null?nr(O):Bo,j.state=s.memoizedState,O=u.getDerivedStateFromProps,typeof O=="function"&&(pg(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&&yg.enqueueReplaceState(j,j.state,null),zu(s,m,j,x),$u(),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=Ns(u,P);j.props=z;var Y=j.context,J=u.contextType;O=Bo,typeof J=="object"&&J!==null&&(O=nr(J));var ie=u.getDerivedStateFromProps;J=typeof ie=="function"||typeof j.getSnapshotBeforeUpdate=="function",P=s.pendingProps!==P,J||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(P||Y!==O)&&dN(s,j,m,O),mi=!1;var X=s.memoizedState;j.state=X,zu(s,m,j,x),$u(),Y=s.memoizedState,P||X!==Y||mi?(typeof ie=="function"&&(pg(s,u,ie,m),Y=s.memoizedState),(z=mi||cN(s,u,z,m,X,Y,O))?(J||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=Y),j.props=m,j.state=Y,j.context=O,m=z):(typeof j.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{j=s.stateNode,Gy(a,s),O=s.memoizedProps,J=Ns(u,O),j.props=J,ie=s.pendingProps,X=j.context,Y=u.contextType,z=Bo,typeof Y=="object"&&Y!==null&&(z=nr(Y)),P=u.getDerivedStateFromProps,(Y=typeof P=="function"||typeof j.getSnapshotBeforeUpdate=="function")||typeof j.UNSAFE_componentWillReceiveProps!="function"&&typeof j.componentWillReceiveProps!="function"||(O!==ie||X!==z)&&dN(s,j,m,z),mi=!1,X=s.memoizedState,j.state=X,zu(s,m,j,x),$u();var Z=s.memoizedState;O!==ie||X!==Z||mi||a!==null&&a.dependencies!==null&&of(a.dependencies)?(typeof P=="function"&&(pg(s,u,P,m),Z=s.memoizedState),(J=mi||cN(s,u,J,m,X,Z,z)||a!==null&&a.dependencies!==null&&of(a.dependencies))?(Y||typeof j.UNSAFE_componentWillUpdate!="function"&&typeof j.componentWillUpdate!="function"||(typeof j.componentWillUpdate=="function"&&j.componentWillUpdate(m,Z,z),typeof j.UNSAFE_componentWillUpdate=="function"&&j.UNSAFE_componentWillUpdate(m,Z,z)),typeof j.componentDidUpdate=="function"&&(s.flags|=4),typeof j.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof j.componentDidUpdate!="function"||O===a.memoizedProps&&X===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&X===a.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=Z),j.props=m,j.state=Z,j.context=z,m=J):(typeof j.componentDidUpdate!="function"||O===a.memoizedProps&&X===a.memoizedState||(s.flags|=4),typeof j.getSnapshotBeforeUpdate!="function"||O===a.memoizedProps&&X===a.memoizedState||(s.flags|=1024),m=!1)}return j=m,Of(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=ws(s,a.child,null,x),s.child=ws(s,null,u,x)):ar(a,s,u,x),s.memoizedState=j.state,a=s.child):a=Oa(a,s,x),a}function ON(a,s,u,m){return ys(),s.flags|=256,ar(a,s,u,m),s.child}var bg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jg(a){return{baseLanes:a,cachePool:p1()}}function wg(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Zr),a}function EN(a,s,u){var m=s.pendingProps,x=!1,j=(s.flags&128)!==0,O;if((O=j)||(O=a!==null&&a.memoizedState===null?!1:(Et.current&2)!==0),O&&(x=!0,s.flags&=-129),O=(s.flags&32)!==0,s.flags&=-33,a===null){if($e){if(x?gi(s):vi(),(a=ot)?(a=k_(a,pn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:ci!==null?{id:Gn,overflow:Yn}:null,retryLane:536870912,hydrationErrors:null},u=s1(a),u.return=s,s.child=u,rr=s,ot=null)):a=null,a===null)throw fi(s);return av(a)?s.lanes=32:s.lanes=536870912,null}var P=m.children;return m=m.fallback,x?(vi(),x=s.mode,P=Ef({mode:"hidden",children:P},x),m=ps(m,x,u,null),P.return=s,m.return=s,P.sibling=m,s.child=P,m=s.child,m.memoizedState=jg(u),m.childLanes=wg(a,O,u),s.memoizedState=bg,Hu(null,m)):(gi(s),Sg(s,P))}var z=a.memoizedState;if(z!==null&&(P=z.dehydrated,P!==null)){if(j)s.flags&256?(gi(s),s.flags&=-257,s=Ng(a,s,u)):s.memoizedState!==null?(vi(),s.child=a.child,s.flags|=128,s=null):(vi(),P=m.fallback,x=s.mode,m=Ef({mode:"visible",children:m.children},x),P=ps(P,x,u,null),P.flags|=2,m.return=s,P.return=s,m.sibling=P,s.child=m,ws(s,a.child,null,u),m=s.child,m.memoizedState=jg(u),m.childLanes=wg(a,O,u),s.memoizedState=bg,s=Hu(null,m));else if(gi(s),av(P)){if(O=P.nextSibling&&P.nextSibling.dataset,O)var Y=O.dgst;O=Y,m=Error(n(419)),m.stack="",m.digest=O,Ru({value:m,source:null,stack:null}),s=Ng(a,s,u)}else if(Dt||Ho(a,s,u,!1),O=(u&a.childLanes)!==0,Dt||O){if(O=nt,O!==null&&(m=hS(O,u),m!==0&&m!==z.retryLane))throw z.retryLane=m,ms(a,m),Ir(O,a,m),vg;nv(P)||Lf(),s=Ng(a,s,u)}else nv(P)?(s.flags|=192,s.child=a.child,s=null):(a=z.treeContext,ot=gn(P.nextSibling),rr=s,$e=!0,di=null,pn=!1,a!==null&&u1(s,a),s=Sg(s,m.children),s.flags|=4096);return s}return x?(vi(),P=m.fallback,x=s.mode,z=a.child,Y=z.sibling,m=ba(z,{mode:"hidden",children:m.children}),m.subtreeFlags=z.subtreeFlags&65011712,Y!==null?P=ba(Y,P):(P=ps(P,x,u,null),P.flags|=2),P.return=s,m.return=s,m.sibling=P,s.child=m,Hu(null,m),m=s.child,P=a.child.memoizedState,P===null?P=jg(u):(x=P.cachePool,x!==null?(z=Rt._currentValue,x=x.parent!==z?{parent:z,pool:z}:x):x=p1(),P={baseLanes:P.baseLanes|u,cachePool:x}),m.memoizedState=P,m.childLanes=wg(a,O,u),s.memoizedState=bg,Hu(a.child,m)):(gi(s),u=a.child,a=u.sibling,u=ba(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 Sg(a,s){return s=Ef({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function Ef(a,s){return a=Vr(22,a,null,s),a.lanes=0,a}function Ng(a,s,u){return ws(s,a.child,null,u),a=Sg(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function AN(a,s,u){a.lanes|=s;var m=a.alternate;m!==null&&(m.lanes|=s),zy(a.return,s,u)}function _g(a,s,u,m,x,j){var O=a.memoizedState;O===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:x,treeForkCount:j}:(O.isBackwards=s,O.rendering=null,O.renderingStartTime=0,O.last=m,O.tail=u,O.tailMode=x,O.treeForkCount=j)}function CN(a,s,u){var m=s.pendingProps,x=m.revealOrder,j=m.tail;m=m.children;var O=Et.current,P=(O&2)!==0;if(P?(O=O&1|2,s.flags|=128):O&=1,le(Et,O),ar(a,s,m,u),m=$e?Pu:0,!P&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&AN(a,u,s);else if(a.tag===19)AN(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(x){case"forwards":for(u=s.child,x=null;u!==null;)a=u.alternate,a!==null&&pf(a)===null&&(x=u),u=u.sibling;u=x,u===null?(x=s.child,s.child=null):(x=u.sibling,u.sibling=null),_g(s,!1,x,u,j,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,x=s.child,s.child=null;x!==null;){if(a=x.alternate,a!==null&&pf(a)===null){s.child=x;break}a=x.sibling,x.sibling=u,u=x,x=a}_g(s,!0,u,null,j,m);break;case"together":_g(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function Oa(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),ji|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(Ho(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=ba(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=ba(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function Og(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&of(a)))}function TI(a,s,u){switch(s.tag){case 3:Me(s,s.stateNode.containerInfo),hi(s,Rt,a.memoizedState.cache),ys();break;case 27:case 5:de(s);break;case 4:Me(s,s.stateNode.containerInfo);break;case 10:hi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Wy(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(gi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?EN(a,s,u):(gi(s),a=Oa(a,s,u),a!==null?a.sibling:null);gi(s);break;case 19:var x=(a.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(Ho(a,s,u,!1),m=(u&s.childLanes)!==0),x){if(m)return CN(a,s,u);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),le(Et,Et.current),m)break;return null;case 22:return s.lanes=0,jN(a,s,u,s.pendingProps);case 24:hi(s,Rt,a.memoizedState.cache)}return Oa(a,s,u)}function TN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Dt=!0;else{if(!Og(a,u)&&(s.flags&128)===0)return Dt=!1,TI(a,s,u);Dt=(a.flags&131072)!==0}else Dt=!1,$e&&(s.flags&1048576)!==0&&l1(s,Pu,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(a=bs(s.elementType),s.type=a,typeof a=="function")Py(a)?(m=Ns(a,m),s.tag=1,s=_N(null,s,a,m,u)):(s.tag=0,s=xg(null,s,a,m,u));else{if(a!=null){var x=a.$$typeof;if(x===E){s.tag=11,s=vN(null,s,a,m,u);break e}else if(x===D){s.tag=14,s=xN(null,s,a,m,u);break e}}throw s=ee(a)||a,Error(n(306,s,""))}}return s;case 0:return xg(a,s,s.type,s.pendingProps,u);case 1:return m=s.type,x=Ns(m,s.pendingProps),_N(a,s,m,x,u);case 3:e:{if(Me(s,s.stateNode.containerInfo),a===null)throw Error(n(387));m=s.pendingProps;var j=s.memoizedState;x=j.element,Gy(a,s),zu(s,m,null,u);var O=s.memoizedState;if(m=O.cache,hi(s,Rt,m),m!==j.cache&&By(s,[Rt],u,!0),$u(),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=ON(a,s,m,u);break e}else if(m!==x){x=fn(Error(n(424)),s),Ru(x),s=ON(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(ot=gn(a.firstChild),rr=s,$e=!0,di=null,pn=!0,u=j1(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(ys(),m===x){s=Oa(a,s,u);break e}ar(a,s,m,u)}s=s.child}return s;case 26:return Of(a,s),a===null?(u=U_(s.type,null,s.pendingProps,null))?s.memoizedState=u:$e||(u=s.type,a=s.pendingProps,m=Ff(xe.current).createElement(u),m[tr]=s,m[Pr]=a,ir(m,u,a),Kt(m),s.stateNode=m):s.memoizedState=U_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return de(s),a===null&&$e&&(m=s.stateNode=$_(s.type,s.pendingProps,xe.current),rr=s,pn=!0,x=ot,Oi(s.type)?(iv=x,ot=gn(m.firstChild)):ot=x),ar(a,s,s.pendingProps.children,u),Of(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&$e&&((x=m=ot)&&(m=s$(m,s.type,s.pendingProps,pn),m!==null?(s.stateNode=m,rr=s,ot=gn(m.firstChild),pn=!1,x=!0):x=!1),x||fi(s)),de(s),x=s.type,j=s.pendingProps,O=a!==null?a.memoizedProps:null,m=j.children,ev(x,j)?m=null:O!==null&&ev(x,O)&&(s.flags|=32),s.memoizedState!==null&&(x=Jy(a,s,jI,null,null,u),ic._currentValue=x),Of(a,s),ar(a,s,m,u),s.child;case 6:return a===null&&$e&&((a=u=ot)&&(u=o$(u,s.pendingProps,pn),u!==null?(s.stateNode=u,rr=s,ot=null,a=!0):a=!1),a||fi(s)),null;case 13:return EN(a,s,u);case 4:return Me(s,s.stateNode.containerInfo),m=s.pendingProps,a===null?s.child=ws(s,null,m,u):ar(a,s,m,u),s.child;case 11:return vN(a,s,s.type,s.pendingProps,u);case 7:return ar(a,s,s.pendingProps,u),s.child;case 8:return ar(a,s,s.pendingProps.children,u),s.child;case 12:return ar(a,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,hi(s,s.type,m.value),ar(a,s,m.children,u),s.child;case 9:return x=s.type._context,m=s.pendingProps.children,vs(s),x=nr(x),m=m(x),s.flags|=1,ar(a,s,m,u),s.child;case 14:return xN(a,s,s.type,s.pendingProps,u);case 15:return bN(a,s,s.type,s.pendingProps,u);case 19:return CN(a,s,u);case 31:return CI(a,s,u);case 22:return jN(a,s,u,s.pendingProps);case 24:return vs(s),m=nr(Rt),a===null?(x=Fy(),x===null&&(x=nt,j=Uy(),x.pooledCache=j,j.refCount++,j!==null&&(x.pooledCacheLanes|=u),x=j),s.memoizedState={parent:m,cache:x},Ky(s),hi(s,Rt,x)):((a.lanes&u)!==0&&(Gy(a,s),zu(s,null,null,u),$u()),x=a.memoizedState,j=s.memoizedState,x.parent!==m?(x={parent:m,cache:m},s.memoizedState=x,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=x),hi(s,Rt,m)):(m=j.cache,hi(s,Rt,m),m!==x.cache&&By(s,[Rt],u,!0))),ar(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(n(156,s.tag))}function Ea(a){a.flags|=4}function Eg(a,s,u,m,x){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(x&335544128)===x)if(a.stateNode.complete)a.flags|=8192;else if(n_())a.flags|=8192;else throw js=df,Hy}else a.flags&=-16777217}function PN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!G_(s))if(n_())a.flags|=8192;else throw js=df,Hy}function Af(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?cS():536870912,a.lanes|=s,rl|=s)}function Ku(a,s){if(!$e)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 lt(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(s)for(var x=a.child;x!==null;)u|=x.lanes|x.childLanes,m|=x.subtreeFlags&65011712,m|=x.flags&65011712,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)u|=x.lanes|x.childLanes,m|=x.subtreeFlags,m|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=m,a.childLanes=u,s}function PI(a,s,u){var m=s.pendingProps;switch(ky(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(s),null;case 1:return lt(s),null;case 3:return u=s.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),Sa(Rt),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(Fo(s)?Ea(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Iy())),lt(s),null;case 26:var x=s.type,j=s.memoizedState;return a===null?(Ea(s),j!==null?(lt(s),PN(s,j)):(lt(s),Eg(s,x,null,m,u))):j?j!==a.memoizedState?(Ea(s),lt(s),PN(s,j)):(lt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==m&&Ea(s),lt(s),Eg(s,x,a,m,u)),null;case 27:if(_e(s),u=xe.current,x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&Ea(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return lt(s),null}a=oe.current,Fo(s)?c1(s):(a=$_(x,m,u),s.stateNode=a,Ea(s))}return lt(s),null;case 5:if(_e(s),x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&Ea(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return lt(s),null}if(j=oe.current,Fo(s))c1(s);else{var O=Ff(xe.current);switch(j){case 1:j=O.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:j=O.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":j=O.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":j=O.createElementNS("http://www.w3.org/1998/Math/MathML",x);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(x,{is:m.is}):O.createElement(x)}}j[tr]=s,j[Pr]=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(ir(j,x,m),x){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Ea(s)}}return lt(s),Eg(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==m&&Ea(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(a=xe.current,Fo(s)){if(a=s.stateNode,u=s.memoizedProps,m=null,x=rr,x!==null)switch(x.tag){case 27:case 5:m=x.memoizedProps}a[tr]=s,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||E_(a.nodeValue,u)),a||fi(s,!0)}else a=Ff(a).createTextNode(m),a[tr]=s,s.stateNode=a}return lt(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(m=Fo(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[tr]=s}else ys(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;lt(s),a=!1}else u=Iy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Xr(s),s):(Xr(s),null);if((s.flags&128)!==0)throw Error(n(558))}return lt(s),null;case 13:if(m=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(x=Fo(s),m!==null&&m.dehydrated!==null){if(a===null){if(!x)throw Error(n(318));if(x=s.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[tr]=s}else ys(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;lt(s),x=!1}else x=Iy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=x),x=!0;if(!x)return s.flags&256?(Xr(s),s):(Xr(s),null)}return Xr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=s.child,x=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(x=m.alternate.memoizedState.cachePool.pool),j=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(j=m.memoizedState.cachePool.pool),j!==x&&(m.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),Af(s,s.updateQueue),lt(s),null);case 4:return ce(),a===null&&Qg(s.stateNode.containerInfo),lt(s),null;case 10:return Sa(s.type),lt(s),null;case 19:if(Q(Et),m=s.memoizedState,m===null)return lt(s),null;if(x=(s.flags&128)!==0,j=m.rendering,j===null)if(x)Ku(m,!1);else{if(jt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(j=pf(a),j!==null){for(s.flags|=128,Ku(m,!1),a=j.updateQueue,s.updateQueue=a,Af(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)i1(u,a),u=u.sibling;return le(Et,Et.current&1|2),$e&&ja(s,m.treeForkCount),s.child}a=a.sibling}m.tail!==null&&Re()>Mf&&(s.flags|=128,x=!0,Ku(m,!1),s.lanes=4194304)}else{if(!x)if(a=pf(j),a!==null){if(s.flags|=128,x=!0,a=a.updateQueue,s.updateQueue=a,Af(s,a),Ku(m,!0),m.tail===null&&m.tailMode==="hidden"&&!j.alternate&&!$e)return lt(s),null}else 2*Re()-m.renderingStartTime>Mf&&u!==536870912&&(s.flags|=128,x=!0,Ku(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=Re(),a.sibling=null,u=Et.current,le(Et,x?u&1|2:u&1),$e&&ja(s,m.treeForkCount),a):(lt(s),null);case 22:case 23:return Xr(s),Xy(),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&&(lt(s),s.subtreeFlags&6&&(s.flags|=8192)):lt(s),u=s.updateQueue,u!==null&&Af(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&&Q(xs),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),Sa(Rt),lt(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function RI(a,s){switch(ky(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Sa(Rt),ce(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return _e(s),null;case 31:if(s.memoizedState!==null){if(Xr(s),s.alternate===null)throw Error(n(340));ys()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Xr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(n(340));ys()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return Q(Et),null;case 4:return ce(),null;case 10:return Sa(s.type),null;case 22:case 23:return Xr(s),Xy(),a!==null&&Q(xs),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Sa(Rt),null;case 25:return null;default:return null}}function RN(a,s){switch(ky(s),s.tag){case 3:Sa(Rt),ce();break;case 26:case 27:case 5:_e(s);break;case 4:ce();break;case 31:s.memoizedState!==null&&Xr(s);break;case 13:Xr(s);break;case 19:Q(Et);break;case 10:Sa(s.type);break;case 22:case 23:Xr(s),Xy(),a!==null&&Q(xs);break;case 24:Sa(Rt)}}function Gu(a,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var x=m.next;u=x;do{if((u.tag&a)===a){m=void 0;var j=u.create,O=u.inst;m=j(),O.destroy=m}u=u.next}while(u!==x)}}catch(P){Xe(s,s.return,P)}}function xi(a,s,u){try{var m=s.updateQueue,x=m!==null?m.lastEffect:null;if(x!==null){var j=x.next;m=j;do{if((m.tag&a)===a){var O=m.inst,P=O.destroy;if(P!==void 0){O.destroy=void 0,x=s;var z=u,Y=P;try{Y()}catch(J){Xe(x,z,J)}}}m=m.next}while(m!==j)}}catch(J){Xe(s,s.return,J)}}function MN(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{S1(s,u)}catch(m){Xe(a,a.return,m)}}}function DN(a,s,u){u.props=Ns(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){Xe(a,s,m)}}function Yu(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof u=="function"?a.refCleanup=u(m):u.current=m}}catch(x){Xe(a,s,x)}}function Vn(a,s){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(x){Xe(a,s,x)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){Xe(a,s,x)}else u.current=null}function kN(a){var s=a.type,u=a.memoizedProps,m=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&m.focus();break e;case"img":u.src?m.src=u.src:u.srcSet&&(m.srcset=u.srcSet)}}catch(x){Xe(a,a.return,x)}}function Ag(a,s,u){try{var m=a.stateNode;e$(m,a.type,u,s),m[Pr]=s}catch(x){Xe(a,a.return,x)}}function LN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Oi(a.type)||a.tag===4}function Cg(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||LN(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&&Oi(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 Tg(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=va));else if(m!==4&&(m===27&&Oi(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(Tg(a,s,u),a=a.sibling;a!==null;)Tg(a,s,u),a=a.sibling}function Cf(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&&Oi(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(Cf(a,s,u),a=a.sibling;a!==null;)Cf(a,s,u),a=a.sibling}function IN(a){var s=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,x=s.attributes;x.length;)s.removeAttributeNode(x[0]);ir(s,m,u),s[tr]=a,s[Pr]=u}catch(j){Xe(a,a.return,j)}}var Aa=!1,kt=!1,Pg=!1,$N=typeof WeakSet=="function"?WeakSet:Set,Gt=null;function MI(a,s){if(a=a.containerInfo,Zg=Xf,a=XS(a),Ny(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var m=u.getSelection&&u.getSelection();if(m&&m.rangeCount!==0){u=m.anchorNode;var x=m.anchorOffset,j=m.focusNode;m=m.focusOffset;try{u.nodeType,j.nodeType}catch{u=null;break e}var O=0,P=-1,z=-1,Y=0,J=0,ie=a,X=null;t:for(;;){for(var Z;ie!==u||x!==0&&ie.nodeType!==3||(P=O+x),ie!==j||m!==0&&ie.nodeType!==3||(z=O+m),ie.nodeType===3&&(O+=ie.nodeValue.length),(Z=ie.firstChild)!==null;)X=ie,ie=Z;for(;;){if(ie===a)break t;if(X===u&&++Y===x&&(P=O),X===j&&++J===m&&(z=O),(Z=ie.nextSibling)!==null)break;ie=X,X=ie.parentNode}ie=Z}u=P===-1||z===-1?null:{start:P,end:z}}else u=null}u=u||{start:0,end:0}}else u=null;for(Jg={focusedElem:a,selectionRange:u},Xf=!1,Gt=s;Gt!==null;)if(s=Gt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Gt=a;else for(;Gt!==null;){switch(s=Gt,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++)x=a[u],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&j!==null){a=void 0,u=s,x=j.memoizedProps,j=j.memoizedState,m=u.stateNode;try{var ye=Ns(u.type,x);a=m.getSnapshotBeforeUpdate(ye,j),m.__reactInternalSnapshotBeforeUpdate=a}catch(Ne){Xe(u,u.return,Ne)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)rv(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":rv(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,Gt=a;break}Gt=s.return}}function zN(a,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:Ta(a,u),m&4&&Gu(5,u);break;case 1:if(Ta(a,u),m&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(O){Xe(u,u.return,O)}else{var x=Ns(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(x,s,a.__reactInternalSnapshotBeforeUpdate)}catch(O){Xe(u,u.return,O)}}m&64&&MN(u),m&512&&Yu(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{S1(a,s)}catch(O){Xe(u,u.return,O)}}break;case 27:s===null&&m&4&&IN(u);case 26:case 5:Ta(a,u),s===null&&m&4&&kN(u),m&512&&Yu(u,u.return);break;case 12:Ta(a,u);break;case 31:Ta(a,u),m&4&&qN(a,u);break;case 13:Ta(a,u),m&4&&FN(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=qI.bind(null,u),l$(a,u))));break;case 22:if(m=u.memoizedState!==null||Aa,!m){s=s!==null&&s.memoizedState!==null||kt,x=Aa;var j=kt;Aa=m,(kt=s)&&!j?Pa(a,u,(u.subtreeFlags&8772)!==0):Ta(a,u),Aa=x,kt=j}break;case 30:break;default:Ta(a,u)}}function BN(a){var s=a.alternate;s!==null&&(a.alternate=null,BN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&oy(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 ft=null,Mr=!1;function Ca(a,s,u){for(u=u.child;u!==null;)UN(a,s,u),u=u.sibling}function UN(a,s,u){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(gu,u)}catch{}switch(u.tag){case 26:kt||Vn(u,s),Ca(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:kt||Vn(u,s);var m=ft,x=Mr;Oi(u.type)&&(ft=u.stateNode,Mr=!1),Ca(a,s,u),rc(u.stateNode),ft=m,Mr=x;break;case 5:kt||Vn(u,s);case 6:if(m=ft,x=Mr,ft=null,Ca(a,s,u),ft=m,Mr=x,ft!==null)if(Mr)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(u.stateNode)}catch(j){Xe(u,s,j)}else try{ft.removeChild(u.stateNode)}catch(j){Xe(u,s,j)}break;case 18:ft!==null&&(Mr?(a=ft,M_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),cl(a)):M_(ft,u.stateNode));break;case 4:m=ft,x=Mr,ft=u.stateNode.containerInfo,Mr=!0,Ca(a,s,u),ft=m,Mr=x;break;case 0:case 11:case 14:case 15:xi(2,u,s),kt||xi(4,u,s),Ca(a,s,u);break;case 1:kt||(Vn(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&DN(u,s,m)),Ca(a,s,u);break;case 21:Ca(a,s,u);break;case 22:kt=(m=kt)||u.memoizedState!==null,Ca(a,s,u),kt=m;break;default:Ca(a,s,u)}}function qN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{cl(a)}catch(u){Xe(s,s.return,u)}}}function FN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{cl(a)}catch(u){Xe(s,s.return,u)}}function DI(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new $N),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new $N),s;default:throw Error(n(435,a.tag))}}function Tf(a,s){var u=DI(a);s.forEach(function(m){if(!u.has(m)){u.add(m);var x=FI.bind(null,a,m);m.then(x,x)}})}function Dr(a,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var x=u[m],j=a,O=s,P=O;e:for(;P!==null;){switch(P.tag){case 27:if(Oi(P.type)){ft=P.stateNode,Mr=!1;break e}break;case 5:ft=P.stateNode,Mr=!1;break e;case 3:case 4:ft=P.stateNode.containerInfo,Mr=!0;break e}P=P.return}if(ft===null)throw Error(n(160));UN(j,O,x),ft=null,Mr=!1,j=x.alternate,j!==null&&(j.return=null),x.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)HN(s,a),s=s.sibling}var Rn=null;function HN(a,s){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Dr(s,a),kr(a),m&4&&(xi(3,a,a.return),Gu(3,a),xi(5,a,a.return));break;case 1:Dr(s,a),kr(a),m&512&&(kt||u===null||Vn(u,u.return)),m&64&&Aa&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?m:u.concat(m))));break;case 26:var x=Rn;if(Dr(s,a),kr(a),m&512&&(kt||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,x=x.ownerDocument||x;t:switch(m){case"title":j=x.getElementsByTagName("title")[0],(!j||j[bu]||j[tr]||j.namespaceURI==="http://www.w3.org/2000/svg"||j.hasAttribute("itemprop"))&&(j=x.createElement(m),x.head.insertBefore(j,x.querySelector("head > title"))),ir(j,m,u),j[tr]=a,Kt(j),m=j;break e;case"link":var O=H_("link","href",x).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=x.createElement(m),ir(j,m,u),x.head.appendChild(j);break;case"meta":if(O=H_("meta","content",x).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=x.createElement(m),ir(j,m,u),x.head.appendChild(j);break;default:throw Error(n(468,m))}j[tr]=a,Kt(j),m=j}a.stateNode=m}else K_(x,a.type,a.stateNode);else a.stateNode=F_(x,m,a.memoizedProps);else j!==m?(j===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):j.count--,m===null?K_(x,a.type,a.stateNode):F_(x,m,a.memoizedProps)):m===null&&a.stateNode!==null&&Ag(a,a.memoizedProps,u.memoizedProps)}break;case 27:Dr(s,a),kr(a),m&512&&(kt||u===null||Vn(u,u.return)),u!==null&&m&4&&Ag(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Dr(s,a),kr(a),m&512&&(kt||u===null||Vn(u,u.return)),a.flags&32){x=a.stateNode;try{Mo(x,"")}catch(ye){Xe(a,a.return,ye)}}m&4&&a.stateNode!=null&&(x=a.memoizedProps,Ag(a,x,u!==null?u.memoizedProps:x)),m&1024&&(Pg=!0);break;case 6:if(Dr(s,a),kr(a),m&4){if(a.stateNode===null)throw Error(n(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(ye){Xe(a,a.return,ye)}}break;case 3:if(Gf=null,x=Rn,Rn=Hf(s.containerInfo),Dr(s,a),Rn=x,kr(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{cl(s.containerInfo)}catch(ye){Xe(a,a.return,ye)}Pg&&(Pg=!1,KN(a));break;case 4:m=Rn,Rn=Hf(a.stateNode.containerInfo),Dr(s,a),kr(a),Rn=m;break;case 12:Dr(s,a),kr(a);break;case 31:Dr(s,a),kr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Tf(a,m)));break;case 13:Dr(s,a),kr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Rf=Re()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Tf(a,m)));break;case 22:x=a.memoizedState!==null;var z=u!==null&&u.memoizedState!==null,Y=Aa,J=kt;if(Aa=Y||x,kt=J||z,Dr(s,a),kt=J,Aa=Y,kr(a),m&8192)e:for(s=a.stateNode,s._visibility=x?s._visibility&-2:s._visibility|1,x&&(u===null||z||Aa||kt||_s(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){z=u=s;try{if(j=z.stateNode,x)O=j.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none";else{P=z.stateNode;var ie=z.memoizedProps.style,X=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;P.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ye){Xe(z,z.return,ye)}}}else if(s.tag===6){if(u===null){z=s;try{z.stateNode.nodeValue=x?"":z.memoizedProps}catch(ye){Xe(z,z.return,ye)}}}else if(s.tag===18){if(u===null){z=s;try{var Z=z.stateNode;x?D_(Z,!0):D_(z.stateNode,!1)}catch(ye){Xe(z,z.return,ye)}}}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,Tf(a,u))));break;case 19:Dr(s,a),kr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Tf(a,m)));break;case 30:break;case 21:break;default:Dr(s,a),kr(a)}}function kr(a){var s=a.flags;if(s&2){try{for(var u,m=a.return;m!==null;){if(LN(m)){u=m;break}m=m.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var x=u.stateNode,j=Cg(a);Cf(a,j,x);break;case 5:var O=u.stateNode;u.flags&32&&(Mo(O,""),u.flags&=-33);var P=Cg(a);Cf(a,P,O);break;case 3:case 4:var z=u.stateNode.containerInfo,Y=Cg(a);Tg(a,Y,z);break;default:throw Error(n(161))}}catch(J){Xe(a,a.return,J)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function KN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;KN(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;)zN(a,s.alternate,s),s=s.sibling}function _s(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:xi(4,s,s.return),_s(s);break;case 1:Vn(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&DN(s,s.return,u),_s(s);break;case 27:rc(s.stateNode);case 26:case 5:Vn(s,s.return),_s(s);break;case 22:s.memoizedState===null&&_s(s);break;case 30:_s(s);break;default:_s(s)}a=a.sibling}}function Pa(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,x=a,j=s,O=j.flags;switch(j.tag){case 0:case 11:case 15:Pa(x,j,u),Gu(4,j);break;case 1:if(Pa(x,j,u),m=j,x=m.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(Y){Xe(m,m.return,Y)}if(m=j,x=m.updateQueue,x!==null){var P=m.stateNode;try{var z=x.shared.hiddenCallbacks;if(z!==null)for(x.shared.hiddenCallbacks=null,x=0;x<z.length;x++)w1(z[x],P)}catch(Y){Xe(m,m.return,Y)}}u&&O&64&&MN(j),Yu(j,j.return);break;case 27:IN(j);case 26:case 5:Pa(x,j,u),u&&m===null&&O&4&&kN(j),Yu(j,j.return);break;case 12:Pa(x,j,u);break;case 31:Pa(x,j,u),u&&O&4&&qN(x,j);break;case 13:Pa(x,j,u),u&&O&4&&FN(x,j);break;case 22:j.memoizedState===null&&Pa(x,j,u),Yu(j,j.return);break;case 30:break;default:Pa(x,j,u)}s=s.sibling}}function Rg(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&&Mu(u))}function Mg(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Mu(a))}function Mn(a,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)GN(a,s,u,m),s=s.sibling}function GN(a,s,u,m){var x=s.flags;switch(s.tag){case 0:case 11:case 15:Mn(a,s,u,m),x&2048&&Gu(9,s);break;case 1:Mn(a,s,u,m);break;case 3:Mn(a,s,u,m),x&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Mu(a)));break;case 12:if(x&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){Xe(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):Vu(a,s):j._visibility&2?Mn(a,s,u,m):(j._visibility|=2,Jo(a,s,u,m,(s.subtreeFlags&10256)!==0||!1)),x&2048&&Rg(O,s);break;case 24:Mn(a,s,u,m),x&2048&&Mg(s.alternate,s);break;default:Mn(a,s,u,m)}}function Jo(a,s,u,m,x){for(x=x&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var j=a,O=s,P=u,z=m,Y=O.flags;switch(O.tag){case 0:case 11:case 15:Jo(j,O,P,z,x),Gu(8,O);break;case 23:break;case 22:var J=O.stateNode;O.memoizedState!==null?J._visibility&2?Jo(j,O,P,z,x):Vu(j,O):(J._visibility|=2,Jo(j,O,P,z,x)),x&&Y&2048&&Rg(O.alternate,O);break;case 24:Jo(j,O,P,z,x),x&&Y&2048&&Mg(O.alternate,O);break;default:Jo(j,O,P,z,x)}s=s.sibling}}function Vu(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,m=s,x=m.flags;switch(m.tag){case 22:Vu(u,m),x&2048&&Rg(m.alternate,m);break;case 24:Vu(u,m),x&2048&&Mg(m.alternate,m);break;default:Vu(u,m)}s=s.sibling}}var Qu=8192;function el(a,s,u){if(a.subtreeFlags&Qu)for(a=a.child;a!==null;)YN(a,s,u),a=a.sibling}function YN(a,s,u){switch(a.tag){case 26:el(a,s,u),a.flags&Qu&&a.memoizedState!==null&&b$(u,Rn,a.memoizedState,a.memoizedProps);break;case 5:el(a,s,u);break;case 3:case 4:var m=Rn;Rn=Hf(a.stateNode.containerInfo),el(a,s,u),Rn=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=Qu,Qu=16777216,el(a,s,u),Qu=m):el(a,s,u));break;default:el(a,s,u)}}function VN(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 Xu(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];Gt=m,XN(m,a)}VN(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)QN(a),a=a.sibling}function QN(a){switch(a.tag){case 0:case 11:case 15:Xu(a),a.flags&2048&&xi(9,a,a.return);break;case 3:Xu(a);break;case 12:Xu(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Pf(a)):Xu(a);break;default:Xu(a)}}function Pf(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];Gt=m,XN(m,a)}VN(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:xi(8,s,s.return),Pf(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Pf(s));break;default:Pf(s)}a=a.sibling}}function XN(a,s){for(;Gt!==null;){var u=Gt;switch(u.tag){case 0:case 11:case 15:xi(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:Mu(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,Gt=m;else e:for(u=a;Gt!==null;){m=Gt;var x=m.sibling,j=m.return;if(BN(m),m===u){Gt=null;break e}if(x!==null){x.return=j,Gt=x;break e}Gt=j}}}var kI={getCacheForType:function(a){var s=nr(Rt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return nr(Rt).controller.signal}},LI=typeof WeakMap=="function"?WeakMap:Map,Ge=0,nt=null,De=null,Le=0,Qe=0,Wr=null,bi=!1,tl=!1,Dg=!1,Ra=0,jt=0,ji=0,Os=0,kg=0,Zr=0,rl=0,Wu=null,Lr=null,Lg=!1,Rf=0,WN=0,Mf=1/0,Df=null,wi=null,It=0,Si=null,nl=null,Ma=0,Ig=0,$g=null,ZN=null,Zu=0,zg=null;function Jr(){return(Ge&2)!==0&&Le!==0?Le&-Le:$.T!==null?Kg():mS()}function JN(){if(Zr===0)if((Le&536870912)===0||$e){var a=Ud;Ud<<=1,(Ud&3932160)===0&&(Ud=262144),Zr=a}else Zr=536870912;return a=Qr.current,a!==null&&(a.flags|=32),Zr}function Ir(a,s,u){(a===nt&&(Qe===2||Qe===9)||a.cancelPendingCommit!==null)&&(al(a,0),Ni(a,Le,Zr,!1)),xu(a,u),((Ge&2)===0||a!==nt)&&(a===nt&&((Ge&2)===0&&(Os|=u),jt===4&&Ni(a,Le,Zr,!1)),Qn(a))}function e_(a,s,u){if((Ge&6)!==0)throw Error(n(327));var m=!u&&(s&127)===0&&(s&a.expiredLanes)===0||vu(a,s),x=m?zI(a,s):Ug(a,s,!0),j=m;do{if(x===0){tl&&!m&&Ni(a,s,0,!1);break}else{if(u=a.current.alternate,j&&!II(u)){x=Ug(a,s,!1),j=!1;continue}if(x===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;x=Wu;var z=P.current.memoizedState.isDehydrated;if(z&&(al(P,O).flags|=256),O=Ug(P,O,!1),O!==2){if(Dg&&!z){P.errorRecoveryDisabledLanes|=j,Os|=j,x=4;break e}j=Lr,Lr=x,j!==null&&(Lr===null?Lr=j:Lr.push.apply(Lr,j))}x=O}if(j=!1,x!==2)continue}}if(x===1){al(a,0),Ni(a,s,0,!0);break}e:{switch(m=a,j=x,j){case 0:case 1:throw Error(n(345));case 4:if((s&4194048)!==s)break;case 6:Ni(m,s,Zr,!bi);break e;case 2:Lr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(x=Rf+300-Re(),10<x)){if(Ni(m,s,Zr,!bi),Fd(m,0,!0)!==0)break e;Ma=s,m.timeoutHandle=P_(t_.bind(null,m,u,Lr,Df,Lg,s,Zr,Os,rl,bi,j,"Throttled",-0,0),x);break e}t_(m,u,Lr,Df,Lg,s,Zr,Os,rl,bi,j,null,-0,0)}}break}while(!0);Qn(a)}function t_(a,s,u,m,x,j,O,P,z,Y,J,ie,X,Z){if(a.timeoutHandle=-1,ie=s.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:va},YN(s,j,ie);var ye=(j&62914560)===j?Rf-Re():(j&4194048)===j?WN-Re():0;if(ye=j$(ie,ye),ye!==null){Ma=j,a.cancelPendingCommit=ye(u_.bind(null,a,s,j,u,m,x,O,P,z,J,ie,null,X,Z)),Ni(a,j,O,!Y);return}}u_(a,s,j,u,m,x,O,P,z)}function II(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var m=0;m<u.length;m++){var x=u[m],j=x.getSnapshot;x=x.value;try{if(!Yr(j(),x))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ni(a,s,u,m){s&=~kg,s&=~Os,a.suspendedLanes|=s,a.pingedLanes&=~s,m&&(a.warmLanes|=s),m=a.expirationTimes;for(var x=s;0<x;){var j=31-Gr(x),O=1<<j;m[j]=-1,x&=~O}u!==0&&dS(a,u,s)}function kf(){return(Ge&6)===0?(Ju(0),!1):!0}function Bg(){if(De!==null){if(Qe===0)var a=De.return;else a=De,wa=gs=null,rg(a),Vo=null,ku=0,a=De;for(;a!==null;)RN(a.alternate,a),a=a.return;De=null}}function al(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,n$(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Ma=0,Bg(),nt=a,De=u=ba(a.current,null),Le=s,Qe=0,Wr=null,bi=!1,tl=vu(a,s),Dg=!1,rl=Zr=kg=Os=ji=jt=0,Lr=Wu=null,Lg=!1,(s&8)!==0&&(s|=s&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=s;0<m;){var x=31-Gr(m),j=1<<x;s|=a[x],m&=~j}return Ra=s,tf(),u}function r_(a,s){Ae=null,$.H=Fu,s===Yo||s===cf?(s=v1(),Qe=3):s===Hy?(s=v1(),Qe=4):Qe=s===vg?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Wr=s,De===null&&(jt=1,Nf(a,fn(s,a.current)))}function n_(){var a=Qr.current;return a===null?!0:(Le&4194048)===Le?yn===null:(Le&62914560)===Le||(Le&536870912)!==0?a===yn:!1}function a_(){var a=$.H;return $.H=Fu,a===null?Fu:a}function i_(){var a=$.A;return $.A=kI,a}function Lf(){jt=4,bi||(Le&4194048)!==Le&&Qr.current!==null||(tl=!0),(ji&134217727)===0&&(Os&134217727)===0||nt===null||Ni(nt,Le,Zr,!1)}function Ug(a,s,u){var m=Ge;Ge|=2;var x=a_(),j=i_();(nt!==a||Le!==s)&&(Df=null,al(a,s)),s=!1;var O=jt;e:do try{if(Qe!==0&&De!==null){var P=De,z=Wr;switch(Qe){case 8:Bg(),O=6;break e;case 3:case 2:case 9:case 6:Qr.current===null&&(s=!0);var Y=Qe;if(Qe=0,Wr=null,il(a,P,z,Y),u&&tl){O=0;break e}break;default:Y=Qe,Qe=0,Wr=null,il(a,P,z,Y)}}$I(),O=jt;break}catch(J){r_(a,J)}while(!0);return s&&a.shellSuspendCounter++,wa=gs=null,Ge=m,$.H=x,$.A=j,De===null&&(nt=null,Le=0,tf()),O}function $I(){for(;De!==null;)s_(De)}function zI(a,s){var u=Ge;Ge|=2;var m=a_(),x=i_();nt!==a||Le!==s?(Df=null,Mf=Re()+500,al(a,s)):tl=vu(a,s);e:do try{if(Qe!==0&&De!==null){s=De;var j=Wr;t:switch(Qe){case 1:Qe=0,Wr=null,il(a,s,j,1);break;case 2:case 9:if(y1(j)){Qe=0,Wr=null,o_(s);break}s=function(){Qe!==2&&Qe!==9||nt!==a||(Qe=7),Qn(a)},j.then(s,s);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:y1(j)?(Qe=0,Wr=null,o_(s)):(Qe=0,Wr=null,il(a,s,j,7));break;case 5:var O=null;switch(De.tag){case 26:O=De.memoizedState;case 5:case 27:var P=De;if(O?G_(O):P.stateNode.complete){Qe=0,Wr=null;var z=P.sibling;if(z!==null)De=z;else{var Y=P.return;Y!==null?(De=Y,If(Y)):De=null}break t}}Qe=0,Wr=null,il(a,s,j,5);break;case 6:Qe=0,Wr=null,il(a,s,j,6);break;case 8:Bg(),jt=6;break e;default:throw Error(n(462))}}BI();break}catch(J){r_(a,J)}while(!0);return wa=gs=null,$.H=m,$.A=x,Ge=u,De!==null?0:(nt=null,Le=0,tf(),jt)}function BI(){for(;De!==null&&!ry();)s_(De)}function s_(a){var s=TN(a.alternate,a,Ra);a.memoizedProps=a.pendingProps,s===null?If(a):De=s}function o_(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=NN(u,s,s.pendingProps,s.type,void 0,Le);break;case 11:s=NN(u,s,s.pendingProps,s.type.render,s.ref,Le);break;case 5:rg(s);default:RN(u,s),s=De=i1(s,Ra),s=TN(u,s,Ra)}a.memoizedProps=a.pendingProps,s===null?If(a):De=s}function il(a,s,u,m){wa=gs=null,rg(s),Vo=null,ku=0;var x=s.return;try{if(AI(a,x,s,u,Le)){jt=1,Nf(a,fn(u,a.current)),De=null;return}}catch(j){if(x!==null)throw De=x,j;jt=1,Nf(a,fn(u,a.current)),De=null;return}s.flags&32768?($e||m===1?a=!0:tl||(Le&536870912)!==0?a=!1:(bi=a=!0,(m===2||m===9||m===3||m===6)&&(m=Qr.current,m!==null&&m.tag===13&&(m.flags|=16384))),l_(s,a)):If(s)}function If(a){var s=a;do{if((s.flags&32768)!==0){l_(s,bi);return}a=s.return;var u=PI(s.alternate,s,Ra);if(u!==null){De=u;return}if(s=s.sibling,s!==null){De=s;return}De=s=a}while(s!==null);jt===0&&(jt=5)}function l_(a,s){do{var u=RI(a.alternate,a);if(u!==null){u.flags&=32767,De=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){De=a;return}De=a=u}while(a!==null);jt=6,De=null}function u_(a,s,u,m,x,j,O,P,z){a.cancelPendingCommit=null;do $f();while(It!==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|=Cy,xL(a,u,j,O,P,z),a===nt&&(De=nt=null,Le=0),nl=s,Si=a,Ma=u,Ig=j,$g=x,ZN=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,HI(zd,function(){return m_(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=$.T,$.T=null,x=L.p,L.p=2,O=Ge,Ge|=4;try{MI(a,s,u)}finally{Ge=O,L.p=x,$.T=m}}It=1,c_(),d_(),f_()}}function c_(){if(It===1){It=0;var a=Si,s=nl,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=$.T,$.T=null;var m=L.p;L.p=2;var x=Ge;Ge|=4;try{HN(s,a);var j=Jg,O=XS(a.containerInfo),P=j.focusedElem,z=j.selectionRange;if(O!==P&&P&&P.ownerDocument&&QS(P.ownerDocument.documentElement,P)){if(z!==null&&Ny(P)){var Y=z.start,J=z.end;if(J===void 0&&(J=Y),"selectionStart"in P)P.selectionStart=Y,P.selectionEnd=Math.min(J,P.value.length);else{var ie=P.ownerDocument||document,X=ie&&ie.defaultView||window;if(X.getSelection){var Z=X.getSelection(),ye=P.textContent.length,Ne=Math.min(z.start,ye),tt=z.end===void 0?Ne:Math.min(z.end,ye);!Z.extend&&Ne>tt&&(O=tt,tt=Ne,Ne=O);var K=VS(P,Ne),F=VS(P,tt);if(K&&F&&(Z.rangeCount!==1||Z.anchorNode!==K.node||Z.anchorOffset!==K.offset||Z.focusNode!==F.node||Z.focusOffset!==F.offset)){var G=ie.createRange();G.setStart(K.node,K.offset),Z.removeAllRanges(),Ne>tt?(Z.addRange(G),Z.extend(F.node,F.offset)):(G.setEnd(F.node,F.offset),Z.addRange(G))}}}}for(ie=[],Z=P;Z=Z.parentNode;)Z.nodeType===1&&ie.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<ie.length;P++){var re=ie[P];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}Xf=!!Zg,Jg=Zg=null}finally{Ge=x,L.p=m,$.T=u}}a.current=s,It=2}}function d_(){if(It===2){It=0;var a=Si,s=nl,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=$.T,$.T=null;var m=L.p;L.p=2;var x=Ge;Ge|=4;try{zN(a,s.alternate,s)}finally{Ge=x,L.p=m,$.T=u}}It=3}}function f_(){if(It===4||It===3){It=0,Id();var a=Si,s=nl,u=Ma,m=ZN;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?It=5:(It=0,nl=Si=null,h_(a,a.pendingLanes));var x=a.pendingLanes;if(x===0&&(wi=null),iy(u),s=s.stateNode,Kr&&typeof Kr.onCommitFiberRoot=="function")try{Kr.onCommitFiberRoot(gu,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=$.T,x=L.p,L.p=2,$.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{$.T=s,L.p=x}}(Ma&3)!==0&&$f(),Qn(a),x=a.pendingLanes,(u&261930)!==0&&(x&42)!==0?a===zg?Zu++:(Zu=0,zg=a):Zu=0,Ju(0)}}function h_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Mu(s)))}function $f(){return c_(),d_(),f_(),m_()}function m_(){if(It!==5)return!1;var a=Si,s=Ig;Ig=0;var u=iy(Ma),m=$.T,x=L.p;try{L.p=32>u?32:u,$.T=null,u=$g,$g=null;var j=Si,O=Ma;if(It=0,nl=Si=null,Ma=0,(Ge&6)!==0)throw Error(n(331));var P=Ge;if(Ge|=4,QN(j.current),GN(j,j.current,O,u),Ge=P,Ju(0,!1),Kr&&typeof Kr.onPostCommitFiberRoot=="function")try{Kr.onPostCommitFiberRoot(gu,j)}catch{}return!0}finally{L.p=x,$.T=m,h_(a,s)}}function p_(a,s,u){s=fn(u,s),s=gg(a.stateNode,s,2),a=yi(a,s,2),a!==null&&(xu(a,2),Qn(a))}function Xe(a,s,u){if(a.tag===3)p_(a,a,u);else for(;s!==null;){if(s.tag===3){p_(s,a,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(wi===null||!wi.has(m))){a=fn(u,a),u=yN(2),m=yi(s,u,2),m!==null&&(gN(u,m,s,a),xu(m,2),Qn(m));break}}s=s.return}}function qg(a,s,u){var m=a.pingCache;if(m===null){m=a.pingCache=new LI;var x=new Set;m.set(s,x)}else x=m.get(s),x===void 0&&(x=new Set,m.set(s,x));x.has(u)||(Dg=!0,x.add(u),a=UI.bind(null,a,s,u),s.then(a,a))}function UI(a,s,u){var m=a.pingCache;m!==null&&m.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,nt===a&&(Le&u)===u&&(jt===4||jt===3&&(Le&62914560)===Le&&300>Re()-Rf?(Ge&2)===0&&al(a,0):kg|=u,rl===Le&&(rl=0)),Qn(a)}function y_(a,s){s===0&&(s=cS()),a=ms(a,s),a!==null&&(xu(a,s),Qn(a))}function qI(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),y_(a,u)}function FI(a,s){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,x=a.memoizedState;x!==null&&(u=x.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(s),y_(a,u)}function HI(a,s){return yu(a,s)}var zf=null,sl=null,Fg=!1,Bf=!1,Hg=!1,_i=0;function Qn(a){a!==sl&&a.next===null&&(sl===null?zf=sl=a:sl=sl.next=a),Bf=!0,Fg||(Fg=!0,GI())}function Ju(a,s){if(!Hg&&Bf){Hg=!0;do for(var u=!1,m=zf;m!==null;){if(a!==0){var x=m.pendingLanes;if(x===0)var j=0;else{var O=m.suspendedLanes,P=m.pingedLanes;j=(1<<31-Gr(42|a)+1)-1,j&=x&~(O&~P),j=j&201326741?j&201326741|1:j?j|2:0}j!==0&&(u=!0,b_(m,j))}else j=Le,j=Fd(m,m===nt?j:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(j&3)===0||vu(m,j)||(u=!0,b_(m,j));m=m.next}while(u);Hg=!1}}function KI(){g_()}function g_(){Bf=Fg=!1;var a=0;_i!==0&&r$()&&(a=_i);for(var s=Re(),u=null,m=zf;m!==null;){var x=m.next,j=v_(m,s);j===0?(m.next=null,u===null?zf=x:u.next=x,x===null&&(sl=u)):(u=m,(a!==0||(j&3)!==0)&&(Bf=!0)),m=x}It!==0&&It!==5||Ju(a),_i!==0&&(_i=0)}function v_(a,s){for(var u=a.suspendedLanes,m=a.pingedLanes,x=a.expirationTimes,j=a.pendingLanes&-62914561;0<j;){var O=31-Gr(j),P=1<<O,z=x[O];z===-1?((P&u)===0||(P&m)!==0)&&(x[O]=vL(P,s)):z<=s&&(a.expiredLanes|=P),j&=~P}if(s=nt,u=Le,u=Fd(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===s&&(Qe===2||Qe===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&Oo(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||vu(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(m!==null&&Oo(m),iy(u)){case 2:case 8:u=$d;break;case 32:u=zd;break;case 268435456:u=uS;break;default:u=zd}return m=x_.bind(null,a),u=yu(u,m),a.callbackPriority=s,a.callbackNode=u,s}return m!==null&&m!==null&&Oo(m),a.callbackPriority=2,a.callbackNode=null,2}function x_(a,s){if(It!==0&&It!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if($f()&&a.callbackNode!==u)return null;var m=Le;return m=Fd(a,a===nt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(e_(a,m,s),v_(a,Re()),a.callbackNode!=null&&a.callbackNode===u?x_.bind(null,a):null)}function b_(a,s){if($f())return null;e_(a,s,!0)}function GI(){a$(function(){(Ge&6)!==0?yu(Kn,KI):g_()})}function Kg(){if(_i===0){var a=Ko;a===0&&(a=Bd,Bd<<=1,(Bd&261888)===0&&(Bd=256)),_i=a}return _i}function j_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Yd(""+a)}function w_(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 YI(a,s,u,m,x){if(s==="submit"&&u&&u.stateNode===x){var j=j_((x[Pr]||null).action),O=m.submitter;O&&(s=(s=O[Pr]||null)?j_(s.formAction):O.getAttribute("formAction"),s!==null&&(j=s,O=null));var P=new Wd("action","action",null,m,x);a.push({event:P,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(_i!==0){var z=O?w_(x,O):new FormData(x);dg(u,{pending:!0,data:z,method:x.method,action:j},null,z)}}else typeof j=="function"&&(P.preventDefault(),z=O?w_(x,O):new FormData(x),dg(u,{pending:!0,data:z,method:x.method,action:j},j,z))},currentTarget:x}]})}}for(var Gg=0;Gg<Ay.length;Gg++){var Yg=Ay[Gg],VI=Yg.toLowerCase(),QI=Yg[0].toUpperCase()+Yg.slice(1);Pn(VI,"on"+QI)}Pn(JS,"onAnimationEnd"),Pn(e1,"onAnimationIteration"),Pn(t1,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(dI,"onTransitionRun"),Pn(fI,"onTransitionStart"),Pn(hI,"onTransitionCancel"),Pn(r1,"onTransitionEnd"),Po("onMouseEnter",["mouseout","mouseover"]),Po("onMouseLeave",["mouseout","mouseover"]),Po("onPointerEnter",["pointerout","pointerover"]),Po("onPointerLeave",["pointerout","pointerover"]),cs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),cs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),cs("onBeforeInput",["compositionend","keypress","textInput","paste"]),cs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),cs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ec="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(" "),XI=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ec));function S_(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],x=m.event;m=m.listeners;e:{var j=void 0;if(s)for(var O=m.length-1;0<=O;O--){var P=m[O],z=P.instance,Y=P.currentTarget;if(P=P.listener,z!==j&&x.isPropagationStopped())break e;j=P,x.currentTarget=Y;try{j(x)}catch(J){ef(J)}x.currentTarget=null,j=z}else for(O=0;O<m.length;O++){if(P=m[O],z=P.instance,Y=P.currentTarget,P=P.listener,z!==j&&x.isPropagationStopped())break e;j=P,x.currentTarget=Y;try{j(x)}catch(J){ef(J)}x.currentTarget=null,j=z}}}}function ke(a,s){var u=s[sy];u===void 0&&(u=s[sy]=new Set);var m=a+"__bubble";u.has(m)||(N_(s,a,2,!1),u.add(m))}function Vg(a,s,u){var m=0;s&&(m|=4),N_(u,a,m,s)}var Uf="_reactListening"+Math.random().toString(36).slice(2);function Qg(a){if(!a[Uf]){a[Uf]=!0,gS.forEach(function(u){u!=="selectionchange"&&(XI.has(u)||Vg(u,!1,a),Vg(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Uf]||(s[Uf]=!0,Vg("selectionchange",!1,s))}}function N_(a,s,u,m){switch(J_(s)){case 2:var x=N$;break;case 8:x=_$;break;default:x=cv}u=x.bind(null,s,u,a),x=void 0,!py||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),m?x!==void 0?a.addEventListener(s,u,{capture:!0,passive:x}):a.addEventListener(s,u,!0):x!==void 0?a.addEventListener(s,u,{passive:x}):a.addEventListener(s,u,!1)}function Xg(a,s,u,m,x){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===x)break;if(O===4)for(O=m.return;O!==null;){var z=O.tag;if((z===3||z===4)&&O.stateNode.containerInfo===x)return;O=O.return}for(;P!==null;){if(O=Ao(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}CS(function(){var Y=j,J=hy(u),ie=[];e:{var X=n1.get(a);if(X!==void 0){var Z=Wd,ye=a;switch(a){case"keypress":if(Qd(u)===0)break e;case"keydown":case"keyup":Z=FL;break;case"focusin":ye="focus",Z=xy;break;case"focusout":ye="blur",Z=xy;break;case"beforeblur":case"afterblur":Z=xy;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":Z=RS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=PL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=GL;break;case JS:case e1:case t1:Z=DL;break;case r1:Z=VL;break;case"scroll":case"scrollend":Z=CL;break;case"wheel":Z=XL;break;case"copy":case"cut":case"paste":Z=LL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=DS;break;case"toggle":case"beforetoggle":Z=ZL}var Ne=(s&4)!==0,tt=!Ne&&(a==="scroll"||a==="scrollend"),K=Ne?X!==null?X+"Capture":null:X;Ne=[];for(var F=Y,G;F!==null;){var re=F;if(G=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||G===null||K===null||(re=wu(F,K),re!=null&&Ne.push(tc(F,re,G))),tt)break;F=F.return}0<Ne.length&&(X=new Z(X,ye,null,u,J),ie.push({event:X,listeners:Ne}))}}if((s&7)===0){e:{if(X=a==="mouseover"||a==="pointerover",Z=a==="mouseout"||a==="pointerout",X&&u!==fy&&(ye=u.relatedTarget||u.fromElement)&&(Ao(ye)||ye[Eo]))break e;if((Z||X)&&(X=J.window===J?J:(X=J.ownerDocument)?X.defaultView||X.parentWindow:window,Z?(ye=u.relatedTarget||u.toElement,Z=Y,ye=ye?Ao(ye):null,ye!==null&&(tt=o(ye),Ne=ye.tag,ye!==tt||Ne!==5&&Ne!==27&&Ne!==6)&&(ye=null)):(Z=null,ye=Y),Z!==ye)){if(Ne=RS,re="onMouseLeave",K="onMouseEnter",F="mouse",(a==="pointerout"||a==="pointerover")&&(Ne=DS,re="onPointerLeave",K="onPointerEnter",F="pointer"),tt=Z==null?X:ju(Z),G=ye==null?X:ju(ye),X=new Ne(re,F+"leave",Z,u,J),X.target=tt,X.relatedTarget=G,re=null,Ao(J)===Y&&(Ne=new Ne(K,F+"enter",ye,u,J),Ne.target=G,Ne.relatedTarget=tt,re=Ne),tt=re,Z&&ye)t:{for(Ne=WI,K=Z,F=ye,G=0,re=K;re;re=Ne(re))G++;re=0;for(var we=F;we;we=Ne(we))re++;for(;0<G-re;)K=Ne(K),G--;for(;0<re-G;)F=Ne(F),re--;for(;G--;){if(K===F||F!==null&&K===F.alternate){Ne=K;break t}K=Ne(K),F=Ne(F)}Ne=null}else Ne=null;Z!==null&&__(ie,X,Z,Ne,!1),ye!==null&&tt!==null&&__(ie,tt,ye,Ne,!0)}}e:{if(X=Y?ju(Y):window,Z=X.nodeName&&X.nodeName.toLowerCase(),Z==="select"||Z==="input"&&X.type==="file")var Fe=qS;else if(BS(X))if(FS)Fe=lI;else{Fe=sI;var ve=iI}else Z=X.nodeName,!Z||Z.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Y&&dy(Y.elementType)&&(Fe=qS):Fe=oI;if(Fe&&(Fe=Fe(a,Y))){US(ie,Fe,u,J);break e}ve&&ve(a,X,Y),a==="focusout"&&Y&&X.type==="number"&&Y.memoizedProps.value!=null&&cy(X,"number",X.value)}switch(ve=Y?ju(Y):window,a){case"focusin":(BS(ve)||ve.contentEditable==="true")&&(Io=ve,_y=Y,Tu=null);break;case"focusout":Tu=_y=Io=null;break;case"mousedown":Oy=!0;break;case"contextmenu":case"mouseup":case"dragend":Oy=!1,WS(ie,u,J);break;case"selectionchange":if(cI)break;case"keydown":case"keyup":WS(ie,u,J)}var Ce;if(jy)e:{switch(a){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Lo?$S(a,u)&&(Ie="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(kS&&u.locale!=="ko"&&(Lo||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Lo&&(Ce=TS()):(ui=J,yy="value"in ui?ui.value:ui.textContent,Lo=!0)),ve=qf(Y,Ie),0<ve.length&&(Ie=new MS(Ie,a,null,u,J),ie.push({event:Ie,listeners:ve}),Ce?Ie.data=Ce:(Ce=zS(u),Ce!==null&&(Ie.data=Ce)))),(Ce=eI?tI(a,u):rI(a,u))&&(Ie=qf(Y,"onBeforeInput"),0<Ie.length&&(ve=new MS("onBeforeInput","beforeinput",null,u,J),ie.push({event:ve,listeners:Ie}),ve.data=Ce)),YI(ie,a,Y,u,J)}S_(ie,s)})}function tc(a,s,u){return{instance:a,listener:s,currentTarget:u}}function qf(a,s){for(var u=s+"Capture",m=[];a!==null;){var x=a,j=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||j===null||(x=wu(a,u),x!=null&&m.unshift(tc(a,x,j)),x=wu(a,s),x!=null&&m.push(tc(a,x,j))),a.tag===3)return m;a=a.return}return[]}function WI(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function __(a,s,u,m,x){for(var j=s._reactName,O=[];u!==null&&u!==m;){var P=u,z=P.alternate,Y=P.stateNode;if(P=P.tag,z!==null&&z===m)break;P!==5&&P!==26&&P!==27||Y===null||(z=Y,x?(Y=wu(u,j),Y!=null&&O.unshift(tc(u,Y,z))):x||(Y=wu(u,j),Y!=null&&O.push(tc(u,Y,z)))),u=u.return}O.length!==0&&a.push({event:s,listeners:O})}var ZI=/\r\n?/g,JI=/\u0000|\uFFFD/g;function O_(a){return(typeof a=="string"?a:""+a).replace(ZI,`
|
|
49
|
-
`).replace(JI,"")}function E_(a,s){return s=O_(s),O_(a)===s}function et(a,s,u,m,x,j){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||Mo(a,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&Mo(a,""+m);break;case"className":Kd(a,"class",m);break;case"tabIndex":Kd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":Kd(a,u,m);break;case"style":ES(a,m,j);break;case"data":if(s!=="object"){Kd(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=Yd(""+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"&&et(a,s,"name",x.name,x,null),et(a,s,"formEncType",x.formEncType,x,null),et(a,s,"formMethod",x.formMethod,x,null),et(a,s,"formTarget",x.formTarget,x,null)):(et(a,s,"encType",x.encType,x,null),et(a,s,"method",x.method,x,null),et(a,s,"target",x.target,x,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Yd(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=va);break;case"onScroll":m!=null&&ke("scroll",a);break;case"onScrollEnd":m!=null&&ke("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(x.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=Yd(""+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":ke("beforetoggle",a),ke("toggle",a),Hd(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":Hd(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=EL.get(u)||u,Hd(a,u,m))}}function Wg(a,s,u,m,x,j){switch(u){case"style":ES(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(x.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"children":typeof m=="string"?Mo(a,m):(typeof m=="number"||typeof m=="bigint")&&Mo(a,""+m);break;case"onScroll":m!=null&&ke("scroll",a);break;case"onScrollEnd":m!=null&&ke("scrollend",a);break;case"onClick":m!=null&&(a.onclick=va);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vS.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),s=u.slice(2,x?u.length-7:void 0),j=a[Pr]||null,j=j!=null?j[u]:null,typeof j=="function"&&a.removeEventListener(s,j,x),typeof m=="function")){typeof j!="function"&&j!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,m,x);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):Hd(a,u,m)}}}function ir(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ke("error",a),ke("load",a);var m=!1,x=!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":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:et(a,s,j,O,u,null)}}x&&et(a,s,"srcSet",u.srcSet,u,null),m&&et(a,s,"src",u.src,u,null);return;case"input":ke("invalid",a);var P=j=O=x=null,z=null,Y=null;for(m in u)if(u.hasOwnProperty(m)){var J=u[m];if(J!=null)switch(m){case"name":x=J;break;case"type":O=J;break;case"checked":z=J;break;case"defaultChecked":Y=J;break;case"value":j=J;break;case"defaultValue":P=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(n(137,s));break;default:et(a,s,m,J,u,null)}}SS(a,j,P,z,Y,O,x,!1);return;case"select":ke("invalid",a),m=O=j=null;for(x in u)if(u.hasOwnProperty(x)&&(P=u[x],P!=null))switch(x){case"value":j=P;break;case"defaultValue":O=P;break;case"multiple":m=P;default:et(a,s,x,P,u,null)}s=j,u=O,a.multiple=!!m,s!=null?Ro(a,!!m,s,!1):u!=null&&Ro(a,!!m,u,!0);return;case"textarea":ke("invalid",a),j=x=m=null;for(O in u)if(u.hasOwnProperty(O)&&(P=u[O],P!=null))switch(O){case"value":m=P;break;case"defaultValue":x=P;break;case"children":j=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(n(91));break;default:et(a,s,O,P,u,null)}_S(a,m,x,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:et(a,s,z,m,u,null)}return;case"dialog":ke("beforetoggle",a),ke("toggle",a),ke("cancel",a),ke("close",a);break;case"iframe":case"object":ke("load",a);break;case"video":case"audio":for(m=0;m<ec.length;m++)ke(ec[m],a);break;case"image":ke("error",a),ke("load",a);break;case"details":ke("toggle",a);break;case"embed":case"source":case"link":ke("error",a),ke("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in u)if(u.hasOwnProperty(Y)&&(m=u[Y],m!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:et(a,s,Y,m,u,null)}return;default:if(dy(s)){for(J in u)u.hasOwnProperty(J)&&(m=u[J],m!==void 0&&Wg(a,s,J,m,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(m=u[P],m!=null&&et(a,s,P,m,u,null))}function e$(a,s,u,m){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,j=null,O=null,P=null,z=null,Y=null,J=null;for(Z in u){var ie=u[Z];if(u.hasOwnProperty(Z)&&ie!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":z=ie;default:m.hasOwnProperty(Z)||et(a,s,Z,null,m,ie)}}for(var X in m){var Z=m[X];if(ie=u[X],m.hasOwnProperty(X)&&(Z!=null||ie!=null))switch(X){case"type":j=Z;break;case"name":x=Z;break;case"checked":Y=Z;break;case"defaultChecked":J=Z;break;case"value":O=Z;break;case"defaultValue":P=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(n(137,s));break;default:Z!==ie&&et(a,s,X,Z,m,ie)}}uy(a,O,P,z,Y,J,j,x);return;case"select":Z=O=P=X=null;for(j in u)if(z=u[j],u.hasOwnProperty(j)&&z!=null)switch(j){case"value":break;case"multiple":Z=z;default:m.hasOwnProperty(j)||et(a,s,j,null,m,z)}for(x in m)if(j=m[x],z=u[x],m.hasOwnProperty(x)&&(j!=null||z!=null))switch(x){case"value":X=j;break;case"defaultValue":P=j;break;case"multiple":O=j;default:j!==z&&et(a,s,x,j,m,z)}s=P,u=O,m=Z,X!=null?Ro(a,!!u,X,!1):!!m!=!!u&&(s!=null?Ro(a,!!u,s,!0):Ro(a,!!u,u?[]:"",!1));return;case"textarea":Z=X=null;for(P in u)if(x=u[P],u.hasOwnProperty(P)&&x!=null&&!m.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:et(a,s,P,null,m,x)}for(O in m)if(x=m[O],j=u[O],m.hasOwnProperty(O)&&(x!=null||j!=null))switch(O){case"value":X=x;break;case"defaultValue":Z=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(n(91));break;default:x!==j&&et(a,s,O,x,m,j)}NS(a,X,Z);return;case"option":for(var ye in u)if(X=u[ye],u.hasOwnProperty(ye)&&X!=null&&!m.hasOwnProperty(ye))switch(ye){case"selected":a.selected=!1;break;default:et(a,s,ye,null,m,X)}for(z in m)if(X=m[z],Z=u[z],m.hasOwnProperty(z)&&X!==Z&&(X!=null||Z!=null))switch(z){case"selected":a.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:et(a,s,z,X,m,Z)}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 Ne in u)X=u[Ne],u.hasOwnProperty(Ne)&&X!=null&&!m.hasOwnProperty(Ne)&&et(a,s,Ne,null,m,X);for(Y in m)if(X=m[Y],Z=u[Y],m.hasOwnProperty(Y)&&X!==Z&&(X!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(n(137,s));break;default:et(a,s,Y,X,m,Z)}return;default:if(dy(s)){for(var tt in u)X=u[tt],u.hasOwnProperty(tt)&&X!==void 0&&!m.hasOwnProperty(tt)&&Wg(a,s,tt,void 0,m,X);for(J in m)X=m[J],Z=u[J],!m.hasOwnProperty(J)||X===Z||X===void 0&&Z===void 0||Wg(a,s,J,X,m,Z);return}}for(var K in u)X=u[K],u.hasOwnProperty(K)&&X!=null&&!m.hasOwnProperty(K)&&et(a,s,K,null,m,X);for(ie in m)X=m[ie],Z=u[ie],!m.hasOwnProperty(ie)||X===Z||X==null&&Z==null||et(a,s,ie,X,m,Z)}function A_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function t$(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var x=u[m],j=x.transferSize,O=x.initiatorType,P=x.duration;if(j&&P&&A_(O)){for(O=0,P=x.responseEnd,m+=1;m<u.length;m++){var z=u[m],Y=z.startTime;if(Y>P)break;var J=z.transferSize,ie=z.initiatorType;J&&A_(ie)&&(z=z.responseEnd,O+=J*(z<P?1:(P-Y)/(z-Y)))}if(--m,s+=8*(j+O)/(x.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Zg=null,Jg=null;function Ff(a){return a.nodeType===9?a:a.ownerDocument}function C_(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 T_(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 ev(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 tv=null;function r$(){var a=window.event;return a&&a.type==="popstate"?a===tv?!1:(tv=a,!0):(tv=null,!1)}var P_=typeof setTimeout=="function"?setTimeout:void 0,n$=typeof clearTimeout=="function"?clearTimeout:void 0,R_=typeof Promise=="function"?Promise:void 0,a$=typeof queueMicrotask=="function"?queueMicrotask:typeof R_<"u"?function(a){return R_.resolve(null).then(a).catch(i$)}:P_;function i$(a){setTimeout(function(){throw a})}function Oi(a){return a==="head"}function M_(a,s){var u=s,m=0;do{var x=u.nextSibling;if(a.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(x),cl(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")rc(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,rc(u);for(var j=u.firstChild;j;){var O=j.nextSibling,P=j.nodeName;j[bu]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&j.rel.toLowerCase()==="stylesheet"||u.removeChild(j),j=O}}else u==="body"&&rc(a.ownerDocument.body);u=x}while(u);cl(s)}function D_(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 rv(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":rv(u),oy(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function s$(a,s,u,m){for(;a.nodeType===1;){var x=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[bu])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!==x.rel||a.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||a.getAttribute("title")!==(x.title==null?null:x.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(j=a.getAttribute("src"),(j!==(x.src==null?null:x.src)||a.getAttribute("type")!==(x.type==null?null:x.type)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&j&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var j=x.name==null?null:""+x.name;if(x.type==="hidden"&&a.getAttribute("name")===j)return a}else return a;if(a=gn(a.nextSibling),a===null)break}return null}function o$(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=gn(a.nextSibling),a===null))return null;return a}function k_(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=gn(a.nextSibling),a===null))return null;return a}function nv(a){return a.data==="$?"||a.data==="$~"}function av(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function l$(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 gn(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 iv=null;function L_(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return gn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function I_(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 $_(a,s,u){switch(s=Ff(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 rc(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);oy(a)}var vn=new Map,z_=new Set;function Hf(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Da=L.d;L.d={f:u$,r:c$,D:d$,C:f$,L:h$,m:m$,X:y$,S:p$,M:g$};function u$(){var a=Da.f(),s=kf();return a||s}function c$(a){var s=Co(a);s!==null&&s.tag===5&&s.type==="form"?rN(s):Da.r(a)}var ol=typeof document>"u"?null:document;function B_(a,s,u){var m=ol;if(m&&typeof s=="string"&&s){var x=cn(s);x='link[rel="'+a+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),z_.has(x)||(z_.add(x),a={rel:a,crossOrigin:u,href:s},m.querySelector(x)===null&&(s=m.createElement("link"),ir(s,"link",a),Kt(s),m.head.appendChild(s)))}}function d$(a){Da.D(a),B_("dns-prefetch",a,null)}function f$(a,s){Da.C(a,s),B_("preconnect",a,s)}function h$(a,s,u){Da.L(a,s,u);var m=ol;if(m&&a&&s){var x='link[rel="preload"][as="'+cn(s)+'"]';s==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+cn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+cn(u.imageSizes)+'"]')):x+='[href="'+cn(a)+'"]';var j=x;switch(s){case"style":j=ll(a);break;case"script":j=ul(a)}vn.has(j)||(a=y({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),vn.set(j,a),m.querySelector(x)!==null||s==="style"&&m.querySelector(nc(j))||s==="script"&&m.querySelector(ac(j))||(s=m.createElement("link"),ir(s,"link",a),Kt(s),m.head.appendChild(s)))}}function m$(a,s){Da.m(a,s);var u=ol;if(u&&a){var m=s&&typeof s.as=="string"?s.as:"script",x='link[rel="modulepreload"][as="'+cn(m)+'"][href="'+cn(a)+'"]',j=x;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":j=ul(a)}if(!vn.has(j)&&(a=y({rel:"modulepreload",href:a},s),vn.set(j,a),u.querySelector(x)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(ac(j)))return}m=u.createElement("link"),ir(m,"link",a),Kt(m),u.head.appendChild(m)}}}function p$(a,s,u){Da.S(a,s,u);var m=ol;if(m&&a){var x=To(m).hoistableStyles,j=ll(a);s=s||"default";var O=x.get(j);if(!O){var P={loading:0,preload:null};if(O=m.querySelector(nc(j)))P.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},u),(u=vn.get(j))&&sv(a,u);var z=O=m.createElement("link");Kt(z),ir(z,"link",a),z._p=new Promise(function(Y,J){z.onload=Y,z.onerror=J}),z.addEventListener("load",function(){P.loading|=1}),z.addEventListener("error",function(){P.loading|=2}),P.loading|=4,Kf(O,s,m)}O={type:"stylesheet",instance:O,count:1,state:P},x.set(j,O)}}}function y$(a,s){Da.X(a,s);var u=ol;if(u&&a){var m=To(u).hoistableScripts,x=ul(a),j=m.get(x);j||(j=u.querySelector(ac(x)),j||(a=y({src:a,async:!0},s),(s=vn.get(x))&&ov(a,s),j=u.createElement("script"),Kt(j),ir(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(x,j))}}function g$(a,s){Da.M(a,s);var u=ol;if(u&&a){var m=To(u).hoistableScripts,x=ul(a),j=m.get(x);j||(j=u.querySelector(ac(x)),j||(a=y({src:a,async:!0,type:"module"},s),(s=vn.get(x))&&ov(a,s),j=u.createElement("script"),Kt(j),ir(j,"link",a),u.head.appendChild(j)),j={type:"script",instance:j,count:1,state:null},m.set(x,j))}}function U_(a,s,u,m){var x=(x=xe.current)?Hf(x):null;if(!x)throw Error(n(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=ll(u.href),u=To(x).hoistableStyles,m=u.get(s),m||(m={type:"style",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=ll(u.href);var j=To(x).hoistableStyles,O=j.get(a);if(O||(x=x.ownerDocument||x,O={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},j.set(a,O),(j=x.querySelector(nc(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||v$(x,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=ul(u),u=To(x).hoistableScripts,m=u.get(s),m||(m={type:"script",instance:null,count:0,state:null},u.set(s,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,a))}}function ll(a){return'href="'+cn(a)+'"'}function nc(a){return'link[rel="stylesheet"]['+a+"]"}function q_(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function v$(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}),ir(s,"link",u),Kt(s),a.head.appendChild(s))}function ul(a){return'[src="'+cn(a)+'"]'}function ac(a){return"script[async]"+a}function F_(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,Kt(m),m;var x=y({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),Kt(m),ir(m,"style",x),Kf(m,u.precedence,a),s.instance=m;case"stylesheet":x=ll(u.href);var j=a.querySelector(nc(x));if(j)return s.state.loading|=4,s.instance=j,Kt(j),j;m=q_(u),(x=vn.get(x))&&sv(m,x),j=(a.ownerDocument||a).createElement("link"),Kt(j);var O=j;return O._p=new Promise(function(P,z){O.onload=P,O.onerror=z}),ir(j,"link",m),s.state.loading|=4,Kf(j,u.precedence,a),s.instance=j;case"script":return j=ul(u.src),(x=a.querySelector(ac(j)))?(s.instance=x,Kt(x),x):(m=u,(x=vn.get(j))&&(m=y({},u),ov(m,x)),a=a.ownerDocument||a,x=a.createElement("script"),Kt(x),ir(x,"link",m),a.head.appendChild(x),s.instance=x);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,Kf(m,u.precedence,a));return s.instance}function Kf(a,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=m.length?m[m.length-1]:null,j=x,O=0;O<m.length;O++){var P=m[O];if(P.dataset.precedence===s)j=P;else if(j!==x)break}j?j.parentNode.insertBefore(a,j.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function sv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function ov(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var Gf=null;function H_(a,s,u){if(Gf===null){var m=new Map,x=Gf=new Map;x.set(u,m)}else x=Gf,m=x.get(u),m||(m=new Map,x.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),x=0;x<u.length;x++){var j=u[x];if(!(j[bu]||j[tr]||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 K_(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function x$(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 G_(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function b$(a,s,u,m){if(u.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=ll(m.href),j=s.querySelector(nc(x));if(j){s=j._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Yf.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=j,Kt(j);return}j=s.ownerDocument||s,m=q_(m),(x=vn.get(x))&&sv(m,x),j=j.createElement("link"),Kt(j);var O=j;O._p=new Promise(function(P,z){O.onload=P,O.onerror=z}),ir(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=Yf.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var lv=0;function j$(a,s){return a.stylesheets&&a.count===0&&Qf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Qf(a,a.stylesheets),a.unsuspend){var j=a.unsuspend;a.unsuspend=null,j()}},6e4+s);0<a.imgBytes&&lv===0&&(lv=62500*t$());var x=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Qf(a,a.stylesheets),a.unsuspend)){var j=a.unsuspend;a.unsuspend=null,j()}},(a.imgBytes>lv?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(x)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Vf=null;function Qf(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Vf=new Map,s.forEach(w$,a),Vf=null,Yf.call(a))}function w$(a,s){if(!(s.state.loading&4)){var u=Vf.get(a);if(u)var m=u.get(null);else{u=new Map,Vf.set(a,u);for(var x=a.querySelectorAll("link[data-precedence],style[data-precedence]"),j=0;j<x.length;j++){var O=x[j];(O.nodeName==="LINK"||O.getAttribute("media")!=="not all")&&(u.set(O.dataset.precedence,O),m=O)}m&&u.set(null,m)}x=s.instance,O=x.getAttribute("data-precedence"),j=u.get(O)||m,j===m&&u.set(null,x),u.set(O,x),this.count++,m=Yf.bind(this),x.addEventListener("load",m),x.addEventListener("error",m),j?j.parentNode.insertBefore(x,j.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(x,a.firstChild)),s.state.loading|=4}}var ic={$$typeof:C,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function S$(a,s,u,m,x,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=ny(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ny(0),this.hiddenUpdates=ny(null),this.identifierPrefix=m,this.onUncaughtError=x,this.onCaughtError=j,this.onRecoverableError=O,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function Y_(a,s,u,m,x,j,O,P,z,Y,J,ie){return a=new S$(a,s,u,O,z,Y,J,ie,P),s=1,j===!0&&(s|=24),j=Vr(3,null,null,s),a.current=j,j.stateNode=a,s=Uy(),s.refCount++,a.pooledCache=s,s.refCount++,j.memoizedState={element:m,isDehydrated:u,cache:s},Ky(j),a}function V_(a){return a?(a=Bo,a):Bo}function Q_(a,s,u,m,x,j){x=V_(x),m.context===null?m.context=x:m.pendingContext=x,m=pi(s),m.payload={element:u},j=j===void 0?null:j,j!==null&&(m.callback=j),u=yi(a,m,s),u!==null&&(Ir(u,a,s),Iu(u,a,s))}function X_(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function uv(a,s){X_(a,s),(a=a.alternate)&&X_(a,s)}function W_(a){if(a.tag===13||a.tag===31){var s=ms(a,67108864);s!==null&&Ir(s,a,67108864),uv(a,67108864)}}function Z_(a){if(a.tag===13||a.tag===31){var s=Jr();s=ay(s);var u=ms(a,s);u!==null&&Ir(u,a,s),uv(a,s)}}var Xf=!0;function N$(a,s,u,m){var x=$.T;$.T=null;var j=L.p;try{L.p=2,cv(a,s,u,m)}finally{L.p=j,$.T=x}}function _$(a,s,u,m){var x=$.T;$.T=null;var j=L.p;try{L.p=8,cv(a,s,u,m)}finally{L.p=j,$.T=x}}function cv(a,s,u,m){if(Xf){var x=dv(m);if(x===null)Xg(a,s,m,Wf,u),eO(a,m);else if(E$(x,a,s,u,m))m.stopPropagation();else if(eO(a,m),s&4&&-1<O$.indexOf(a)){for(;x!==null;){var j=Co(x);if(j!==null)switch(j.tag){case 3:if(j=j.stateNode,j.current.memoizedState.isDehydrated){var O=us(j.pendingLanes);if(O!==0){var P=j;for(P.pendingLanes|=2,P.entangledLanes|=2;O;){var z=1<<31-Gr(O);P.entanglements[1]|=z,O&=~z}Qn(j),(Ge&6)===0&&(Mf=Re()+500,Ju(0))}}break;case 31:case 13:P=ms(j,2),P!==null&&Ir(P,j,2),kf(),uv(j,2)}if(j=dv(m),j===null&&Xg(a,s,m,Wf,u),j===x)break;x=j}x!==null&&m.stopPropagation()}else Xg(a,s,m,null,u)}}function dv(a){return a=hy(a),fv(a)}var Wf=null;function fv(a){if(Wf=null,a=Ao(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 Wf=a,null}function J_(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(fr()){case Kn:return 2;case $d:return 8;case zd:case fL:return 32;case uS:return 268435456;default:return 32}default:return 32}}var hv=!1,Ei=null,Ai=null,Ci=null,sc=new Map,oc=new Map,Ti=[],O$="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 eO(a,s){switch(a){case"focusin":case"focusout":Ei=null;break;case"dragenter":case"dragleave":Ai=null;break;case"mouseover":case"mouseout":Ci=null;break;case"pointerover":case"pointerout":sc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":oc.delete(s.pointerId)}}function lc(a,s,u,m,x,j){return a===null||a.nativeEvent!==j?(a={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:j,targetContainers:[x]},s!==null&&(s=Co(s),s!==null&&W_(s)),a):(a.eventSystemFlags|=m,s=a.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),a)}function E$(a,s,u,m,x){switch(s){case"focusin":return Ei=lc(Ei,a,s,u,m,x),!0;case"dragenter":return Ai=lc(Ai,a,s,u,m,x),!0;case"mouseover":return Ci=lc(Ci,a,s,u,m,x),!0;case"pointerover":var j=x.pointerId;return sc.set(j,lc(sc.get(j)||null,a,s,u,m,x)),!0;case"gotpointercapture":return j=x.pointerId,oc.set(j,lc(oc.get(j)||null,a,s,u,m,x)),!0}return!1}function tO(a){var s=Ao(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,pS(a.priority,function(){Z_(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,pS(a.priority,function(){Z_(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 Zf(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=dv(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);fy=m,u.target.dispatchEvent(m),fy=null}else return s=Co(u),s!==null&&W_(s),a.blockedOn=u,!1;s.shift()}return!0}function rO(a,s,u){Zf(a)&&u.delete(s)}function A$(){hv=!1,Ei!==null&&Zf(Ei)&&(Ei=null),Ai!==null&&Zf(Ai)&&(Ai=null),Ci!==null&&Zf(Ci)&&(Ci=null),sc.forEach(rO),oc.forEach(rO)}function Jf(a,s){a.blockedOn===s&&(a.blockedOn=null,hv||(hv=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,A$)))}var eh=null;function nO(a){eh!==a&&(eh=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){eh===a&&(eh=null);for(var s=0;s<a.length;s+=3){var u=a[s],m=a[s+1],x=a[s+2];if(typeof m!="function"){if(fv(m||u)===null)continue;break}var j=Co(u);j!==null&&(a.splice(s,3),s-=3,dg(j,{pending:!0,data:x,method:u.method,action:m},m,x))}}))}function cl(a){function s(z){return Jf(z,a)}Ei!==null&&Jf(Ei,a),Ai!==null&&Jf(Ai,a),Ci!==null&&Jf(Ci,a),sc.forEach(s),oc.forEach(s);for(var u=0;u<Ti.length;u++){var m=Ti[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<Ti.length&&(u=Ti[0],u.blockedOn===null);)tO(u),u.blockedOn===null&&Ti.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var x=u[m],j=u[m+1],O=x[Pr]||null;if(typeof j=="function")O||nO(u);else if(O){var P=null;if(j&&j.hasAttribute("formAction")){if(x=j,O=j[Pr]||null)P=O.formAction;else if(fv(x)!==null)continue}else P=O.action;typeof P=="function"?u[m+1]=P:(u.splice(m,3),m-=3),nO(u)}}}function aO(){function a(j){j.canIntercept&&j.info==="react-transition"&&j.intercept({handler:function(){return new Promise(function(O){return x=O})},focusReset:"manual",scroll:"manual"})}function s(){x!==null&&(x(),x=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,x=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),x!==null&&(x(),x=null)}}}function mv(a){this._internalRoot=a}th.prototype.render=mv.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(n(409));var u=s.current,m=Jr();Q_(u,m,a,s,null,null)},th.prototype.unmount=mv.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;Q_(a.current,2,null,a,null,null),kf(),s[Eo]=null}};function th(a){this._internalRoot=a}th.prototype.unstable_scheduleHydration=function(a){if(a){var s=mS();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Ti.length&&s!==0&&s<Ti[u].priority;u++);Ti.splice(u,0,a),u===0&&tO(a)}};var iO=t.version;if(iO!=="19.2.4")throw Error(n(527,iO,"19.2.4"));L.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=f(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var C$={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rh.isDisabled&&rh.supportsFiber)try{gu=rh.inject(C$),Kr=rh}catch{}}return cc.createRoot=function(a,s){if(!i(a))throw Error(n(299));var u=!1,m="",x=fN,j=hN,O=mN;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(j=s.onCaughtError),s.onRecoverableError!==void 0&&(O=s.onRecoverableError)),s=Y_(a,1,!1,null,null,u,m,null,x,j,O,aO),a[Eo]=s.current,Qg(a),new mv(s)},cc.hydrateRoot=function(a,s,u){if(!i(a))throw Error(n(299));var m=!1,x="",j=fN,O=hN,P=mN,z=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(x=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=Y_(a,1,!0,s,u??null,m,x,z,j,O,P,aO),s.context=V_(null),u=s.current,m=Jr(),m=ay(m),x=pi(m),x.callback=null,yi(u,x,m),u=m,s.current.lanes=u,xu(s,u),Qn(s),a[Eo]=s.current,Qg(a),new th(s)},cc.version="19.2.4",cc}var yO;function q$(){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=U$(),xv.exports}var F$=q$(),su=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(){}},Fs,Bi,Tl,S2,H$=(S2=class extends su{constructor(){super();je(this,Fs);je(this,Bi);je(this,Tl);me(this,Tl,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){q(this,Bi)||this.setEventListener(q(this,Tl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,Bi))==null||t.call(this),me(this,Bi,void 0))}setEventListener(t){var r;me(this,Tl,t),(r=q(this,Bi))==null||r.call(this),me(this,Bi,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){q(this,Fs)!==t&&(me(this,Fs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof q(this,Fs)=="boolean"?q(this,Fs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Fs=new WeakMap,Bi=new WeakMap,Tl=new WeakMap,S2),Yb=new H$,K$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ui,Gb,N2,G$=(N2=class{constructor(){je(this,Ui,K$);je(this,Gb,!1)}setTimeoutProvider(e){me(this,Ui,e)}setTimeout(e,t){return q(this,Ui).setTimeout(e,t)}clearTimeout(e){q(this,Ui).clearTimeout(e)}setInterval(e,t){return q(this,Ui).setInterval(e,t)}clearInterval(e){q(this,Ui).clearInterval(e)}},Ui=new WeakMap,Gb=new WeakMap,N2),ks=new G$;function Y$(e){setTimeout(e,0)}var V$=typeof window>"u"||"Deno"in globalThis;function Sr(){}function Q$(e,t){return typeof e=="function"?e(t):e}function Sx(e){return typeof e=="number"&&e>=0&&e!==1/0}function k2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Zi(e,t){return typeof e=="function"?e(t):e}function _n(e,t){return typeof e=="function"?e(t):e}function gO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:o,queryKey:l,stale:c}=e;if(l){if(n){if(t.queryHash!==Vb(l,t.options))return!1}else if(!Lc(t.queryKey,l))return!1}if(r!=="all"){const h=t.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function vO(e,t){const{exact:r,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(ao(t.options.mutationKey)!==ao(o))return!1}else if(!Lc(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Vb(e,t){return((t==null?void 0:t.queryKeyHashFn)||ao)(e)}function ao(e){return JSON.stringify(e,(t,r)=>Nx(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Lc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Lc(e[r],t[r])):!1}var X$=Object.prototype.hasOwnProperty;function L2(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=xO(e)&&xO(t);if(!n&&!(Nx(e)&&Nx(t)))return t;const o=(n?e:Object.keys(e)).length,l=n?t:Object.keys(t),c=l.length,h=n?new Array(c):{};let f=0;for(let p=0;p<c;p++){const y=n?p:l[p],g=e[y],v=t[y];if(g===v){h[y]=g,(n?p<o:X$.call(e,y))&&f++;continue}if(g===null||v===null||typeof g!="object"||typeof v!="object"){h[y]=v;continue}const b=L2(g,v,r+1);h[y]=b,b===g&&f++}return o===c&&f===o?e:h}function zh(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 xO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Nx(e){if(!bO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!bO(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function bO(e){return Object.prototype.toString.call(e)==="[object Object]"}function W$(e){return new Promise(t=>{ks.setTimeout(t,e)})}function _x(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?L2(e,t):t}function Z$(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function J$(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Qb=Symbol();function I2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Qb?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Xb(e,t){return typeof e=="function"?e(...t):!!e}function ez(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 Ic=(()=>{let e=()=>V$;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ox(){let e,t;const r=new Promise((i,o)=>{e=i,t=o});r.status="pending",r.catch(()=>{});function n(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},r.reject=i=>{n({status:"rejected",reason:i}),t(i)},r}var tz=Y$;function rz(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=tz;const o=c=>{t?e.push(c):i(()=>{r(c)})},l=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(h=>{r(h)})})})};return{batch:c=>{let h;t++;try{h=c()}finally{t--,t||l()}return h},batchCalls:c=>(...h)=>{o(()=>{c(...h)})},schedule:o,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var Ut=rz(),Pl,qi,Rl,_2,nz=(_2=class extends su{constructor(){super();je(this,Pl,!0);je(this,qi);je(this,Rl);me(this,Rl,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(){q(this,qi)||this.setEventListener(q(this,Rl))}onUnsubscribe(){var t;this.hasListeners()||((t=q(this,qi))==null||t.call(this),me(this,qi,void 0))}setEventListener(t){var r;me(this,Rl,t),(r=q(this,qi))==null||r.call(this),me(this,qi,t(this.setOnline.bind(this)))}setOnline(t){q(this,Pl)!==t&&(me(this,Pl,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return q(this,Pl)}},Pl=new WeakMap,qi=new WeakMap,Rl=new WeakMap,_2),Bh=new nz;function az(e){return Math.min(1e3*2**e,3e4)}function $2(e){return(e??"online")==="online"?Bh.isOnline():!0}var Ex=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function z2(e){let t=!1,r=0,n;const i=Ox(),o=()=>i.status!=="pending",l=w=>{var N;if(!o()){const _=new Ex(w);g(_),(N=e.onCancel)==null||N.call(e,_)}},c=()=>{t=!0},h=()=>{t=!1},f=()=>Yb.isFocused()&&(e.networkMode==="always"||Bh.isOnline())&&e.canRun(),p=()=>$2(e.networkMode)&&e.canRun(),y=w=>{o()||(n==null||n(),i.resolve(w))},g=w=>{o()||(n==null||n(),i.reject(w))},v=()=>new Promise(w=>{var N;n=_=>{(o()||f())&&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(y).catch(_=>{var R;if(o())return;const A=e.retry??(Ic.isServer()?0:3),C=e.retryDelay??az,E=typeof C=="function"?C(r,_):C,T=A===!0||typeof A=="number"&&r<A||typeof A=="function"&&A(r,_);if(t||!T){g(_);return}r++,(R=e.onFail)==null||R.call(e,r,_),W$(E).then(()=>f()?void 0:v()).then(()=>{t?g(_):b()})})};return{promise:i,status:()=>i.status,cancel:l,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:h,canStart:p,start:()=>(p()?b():v().then(b),i)}}var Hs,O2,B2=(O2=class{constructor(){je(this,Hs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Sx(this.gcTime)&&me(this,Hs,ks.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ic.isServer()?1/0:300*1e3))}clearGcTimeout(){q(this,Hs)&&(ks.clearTimeout(q(this,Hs)),me(this,Hs,void 0))}},Hs=new WeakMap,O2),Ks,Ml,Sn,Gs,Yt,od,Ys,en,U2,ka,E2,iz=(E2=class extends B2{constructor(t){super();je(this,en);je(this,Ks);je(this,Ml);je(this,Sn);je(this,Gs);je(this,Yt);je(this,od);je(this,Ys);me(this,Ys,!1),me(this,od,t.defaultOptions),this.setOptions(t.options),this.observers=[],me(this,Gs,t.client),me(this,Sn,q(this,Gs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,me(this,Ks,wO(this.options)),this.state=t.state??q(this,Ks),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=q(this,Yt))==null?void 0:t.promise}setOptions(t){if(this.options={...q(this,od),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=wO(this.options);r.data!==void 0&&(this.setState(jO(r.data,r.dataUpdatedAt)),me(this,Ks,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&q(this,Sn).remove(this)}setData(t,r){const n=_x(this.state.data,t,this.options);return Te(this,en,ka).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Te(this,en,ka).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=q(this,Yt))==null?void 0:n.promise;return(i=q(this,Yt))==null||i.cancel(t),r?r.then(Sr).catch(Sr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return q(this,Ks)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>_n(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qb||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Zi(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=q(this,Yt))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=q(this,Yt))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),q(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||(q(this,Yt)&&(q(this,Ys)||Te(this,en,U2).call(this)?q(this,Yt).cancel({revert:!0}):q(this,Yt).cancelRetry()),this.scheduleGc()),q(this,Sn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Te(this,en,ka).call(this,{type:"invalidate"})}async fetch(t,r){var h,f,p,y,g,v,b,w,N,_,A,C;if(this.state.fetchStatus!=="idle"&&((h=q(this,Yt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(q(this,Yt))return q(this,Yt).continueRetry(),q(this,Yt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const E=this.observers.find(T=>T.options.queryFn);E&&this.setOptions(E.options)}const n=new AbortController,i=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(me(this,Ys,!0),n.signal)})},o=()=>{const E=I2(this.options,r),R=(()=>{const D={client:q(this,Gs),queryKey:this.queryKey,meta:this.meta};return i(D),D})();return me(this,Ys,!1),this.options.persister?this.options.persister(E,R,this):E(R)},c=(()=>{const E={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:q(this,Gs),state:this.state,fetchFn:o};return i(E),E})();(f=this.options.behavior)==null||f.onFetch(c,this),me(this,Ml,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Te(this,en,ka).call(this,{type:"fetch",meta:(y=c.fetchOptions)==null?void 0:y.meta}),me(this,Yt,z2({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:E=>{E instanceof Ex&&E.revert&&this.setState({...q(this,Ml),fetchStatus:"idle"}),n.abort()},onFail:(E,T)=>{Te(this,en,ka).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{Te(this,en,ka).call(this,{type:"pause"})},onContinue:()=>{Te(this,en,ka).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const E=await q(this,Yt).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(v=(g=q(this,Sn).config).onSuccess)==null||v.call(g,E,this),(w=(b=q(this,Sn).config).onSettled)==null||w.call(b,E,this.state.error,this),E}catch(E){if(E instanceof Ex){if(E.silent)return q(this,Yt).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw Te(this,en,ka).call(this,{type:"error",error:E}),(_=(N=q(this,Sn).config).onError)==null||_.call(N,E,this),(C=(A=q(this,Sn).config).onSettled)==null||C.call(A,this.state.data,E,this),E}finally{this.scheduleGc()}}},Ks=new WeakMap,Ml=new WeakMap,Sn=new WeakMap,Gs=new WeakMap,Yt=new WeakMap,od=new WeakMap,Ys=new WeakMap,en=new WeakSet,U2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ka=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,...q2(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...jO(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return me(this,Ml,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),Ut.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),q(this,Sn).notify({query:this,type:"updated",action:t})})},E2);function q2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function jO(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function wO(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 $r,ze,ld,wr,Vs,Dl,Ia,Fi,ud,kl,Ll,Qs,Xs,Hi,Il,Ve,Ec,Ax,Cx,Tx,Px,Rx,Mx,Dx,H2,A2,F2=(A2=class extends su{constructor(t,r){super();je(this,Ve);je(this,$r);je(this,ze);je(this,ld);je(this,wr);je(this,Vs);je(this,Dl);je(this,Ia);je(this,Fi);je(this,ud);je(this,kl);je(this,Ll);je(this,Qs);je(this,Xs);je(this,Hi);je(this,Il,new Set);this.options=r,me(this,$r,t),me(this,Fi,null),me(this,Ia,Ox()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(q(this,ze).addObserver(this),SO(q(this,ze),this.options)?Te(this,Ve,Ec).call(this):this.updateResult(),Te(this,Ve,Px).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kx(q(this,ze),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kx(q(this,ze),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Te(this,Ve,Rx).call(this),Te(this,Ve,Mx).call(this),q(this,ze).removeObserver(this)}setOptions(t){const r=this.options,n=q(this,ze);if(this.options=q(this,$r).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof _n(this.options.enabled,q(this,ze))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Te(this,Ve,Dx).call(this),q(this,ze).setOptions(this.options),r._defaulted&&!zh(this.options,r)&&q(this,$r).getQueryCache().notify({type:"observerOptionsUpdated",query:q(this,ze),observer:this});const i=this.hasListeners();i&&NO(q(this,ze),n,this.options,r)&&Te(this,Ve,Ec).call(this),this.updateResult(),i&&(q(this,ze)!==n||_n(this.options.enabled,q(this,ze))!==_n(r.enabled,q(this,ze))||Zi(this.options.staleTime,q(this,ze))!==Zi(r.staleTime,q(this,ze)))&&Te(this,Ve,Ax).call(this);const o=Te(this,Ve,Cx).call(this);i&&(q(this,ze)!==n||_n(this.options.enabled,q(this,ze))!==_n(r.enabled,q(this,ze))||o!==q(this,Hi))&&Te(this,Ve,Tx).call(this,o)}getOptimisticResult(t){const r=q(this,$r).getQueryCache().build(q(this,$r),t),n=this.createResult(r,t);return oz(this,n)&&(me(this,wr,n),me(this,Dl,this.options),me(this,Vs,q(this,ze).state)),n}getCurrentResult(){return q(this,wr)}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&&q(this,Ia).status==="pending"&&q(this,Ia).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){q(this,Il).add(t)}getCurrentQuery(){return q(this,ze)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=q(this,$r).defaultQueryOptions(t),n=q(this,$r).getQueryCache().build(q(this,$r),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Te(this,Ve,Ec).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),q(this,wr)))}createResult(t,r){var U;const n=q(this,ze),i=this.options,o=q(this,wr),l=q(this,Vs),c=q(this,Dl),f=t!==n?t.state:q(this,ld),{state:p}=t;let y={...p},g=!1,v;if(r._optimisticResults){const k=this.hasListeners(),H=!k&&SO(t,r),B=k&&NO(t,n,r,i);(H||B)&&(y={...y,...q2(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:b,errorUpdatedAt:w,status:N}=y;v=y.data;let _=!1;if(r.placeholderData!==void 0&&v===void 0&&N==="pending"){let k;o!=null&&o.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(k=o.data,_=!0):k=typeof r.placeholderData=="function"?r.placeholderData((U=q(this,Ll))==null?void 0:U.state.data,q(this,Ll)):r.placeholderData,k!==void 0&&(N="success",v=_x(o==null?void 0:o.data,k,r),g=!0)}if(r.select&&v!==void 0&&!_)if(o&&v===(l==null?void 0:l.data)&&r.select===q(this,ud))v=q(this,kl);else try{me(this,ud,r.select),v=r.select(v),v=_x(o==null?void 0:o.data,v,r),me(this,kl,v),me(this,Fi,null)}catch(k){me(this,Fi,k)}q(this,Fi)&&(b=q(this,Fi),v=q(this,kl),w=Date.now(),N="error");const A=y.fetchStatus==="fetching",C=N==="pending",E=N==="error",T=C&&A,R=v!==void 0,M={status:N,fetchStatus:y.fetchStatus,isPending:C,isSuccess:N==="success",isError:E,isInitialLoading:T,isLoading:T,data:v,dataUpdatedAt:y.dataUpdatedAt,error:b,errorUpdatedAt:w,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>f.dataUpdateCount||y.errorUpdateCount>f.errorUpdateCount,isFetching:A,isRefetching:A&&!C,isLoadingError:E&&!R,isPaused:y.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:E&&R,isStale:Wb(t,r),refetch:this.refetch,promise:q(this,Ia),isEnabled:_n(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const k=M.data!==void 0,H=M.status==="error"&&!k,B=ne=>{H?ne.reject(M.error):k&&ne.resolve(M.data)},ae=()=>{const ne=me(this,Ia,M.promise=Ox());B(ne)},ee=q(this,Ia);switch(ee.status){case"pending":t.queryHash===n.queryHash&&B(ee);break;case"fulfilled":(H||M.data!==ee.value)&&ae();break;case"rejected":(!H||M.error!==ee.reason)&&ae();break}}return M}updateResult(){const t=q(this,wr),r=this.createResult(q(this,ze),this.options);if(me(this,Vs,q(this,ze).state),me(this,Dl,this.options),q(this,Vs).data!==void 0&&me(this,Ll,q(this,ze)),zh(r,t))return;me(this,wr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!q(this,Il).size)return!0;const l=new Set(o??q(this,Il));return this.options.throwOnError&&l.add("error"),Object.keys(q(this,wr)).some(c=>{const h=c;return q(this,wr)[h]!==t[h]&&l.has(h)})};Te(this,Ve,H2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Te(this,Ve,Px).call(this)}},$r=new WeakMap,ze=new WeakMap,ld=new WeakMap,wr=new WeakMap,Vs=new WeakMap,Dl=new WeakMap,Ia=new WeakMap,Fi=new WeakMap,ud=new WeakMap,kl=new WeakMap,Ll=new WeakMap,Qs=new WeakMap,Xs=new WeakMap,Hi=new WeakMap,Il=new WeakMap,Ve=new WeakSet,Ec=function(t){Te(this,Ve,Dx).call(this);let r=q(this,ze).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(Sr)),r},Ax=function(){Te(this,Ve,Rx).call(this);const t=Zi(this.options.staleTime,q(this,ze));if(Ic.isServer()||q(this,wr).isStale||!Sx(t))return;const n=k2(q(this,wr).dataUpdatedAt,t)+1;me(this,Qs,ks.setTimeout(()=>{q(this,wr).isStale||this.updateResult()},n))},Cx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(q(this,ze)):this.options.refetchInterval)??!1},Tx=function(t){Te(this,Ve,Mx).call(this),me(this,Hi,t),!(Ic.isServer()||_n(this.options.enabled,q(this,ze))===!1||!Sx(q(this,Hi))||q(this,Hi)===0)&&me(this,Xs,ks.setInterval(()=>{(this.options.refetchIntervalInBackground||Yb.isFocused())&&Te(this,Ve,Ec).call(this)},q(this,Hi)))},Px=function(){Te(this,Ve,Ax).call(this),Te(this,Ve,Tx).call(this,Te(this,Ve,Cx).call(this))},Rx=function(){q(this,Qs)&&(ks.clearTimeout(q(this,Qs)),me(this,Qs,void 0))},Mx=function(){q(this,Xs)&&(ks.clearInterval(q(this,Xs)),me(this,Xs,void 0))},Dx=function(){const t=q(this,$r).getQueryCache().build(q(this,$r),this.options);if(t===q(this,ze))return;const r=q(this,ze);me(this,ze,t),me(this,ld,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},H2=function(t){Ut.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(q(this,wr))}),q(this,$r).getQueryCache().notify({query:q(this,ze),type:"observerResultsUpdated"})})},A2);function sz(e,t){return _n(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function SO(e,t){return sz(e,t)||e.state.data!==void 0&&kx(e,t,t.refetchOnMount)}function kx(e,t,r){if(_n(t.enabled,e)!==!1&&Zi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Wb(e,t)}return!1}function NO(e,t,r,n){return(e!==t||_n(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Wb(e,r)}function Wb(e,t){return _n(t.enabled,e)!==!1&&e.isStaleByTime(Zi(t.staleTime,e))}function oz(e,t){return!zh(e.getCurrentResult(),t)}function Uh(e){return{onFetch:(t,r)=>{var p,y,g,v,b;const n=t.options,i=(g=(y=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:y.fetchMore)==null?void 0:g.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],l=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},h=0;const f=async()=>{let w=!1;const N=C=>{ez(C,()=>t.signal,()=>w=!0)},_=I2(t.options,t.fetchOptions),A=async(C,E,T)=>{if(w)return Promise.reject();if(E==null&&C.pages.length)return Promise.resolve(C);const D=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:E,direction:T?"backward":"forward",meta:t.options.meta};return N(H),H})(),M=await _(D),{maxPages:U}=t.options,k=T?J$:Z$;return{pages:k(C.pages,M,U),pageParams:k(C.pageParams,E,U)}};if(i&&o.length){const C=i==="backward",E=C?K2:Lx,T={pages:o,pageParams:l},R=E(n,T);c=await A(T,R,C)}else{const C=e??o.length;do{const E=h===0?l[0]??n.initialPageParam:Lx(n,c);if(h>0&&E==null)break;c=await A(c,E),h++}while(h<C)}return c};t.options.persister?t.fetchFn=()=>{var w,N;return(N=(w=t.options).persister)==null?void 0:N.call(w,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=f}}}function Lx(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 K2(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 lz(e,t){return t?Lx(e,t)!=null:!1}function uz(e,t){return!t||!e.getPreviousPageParam?!1:K2(e,t)!=null}var cz=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:Uh()})}getOptimisticResult(e){return e.behavior=Uh(),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,h=(w=(b=r.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:w.direction,f=l&&h==="forward",p=i&&h==="forward",y=l&&h==="backward",g=i&&h==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:lz(t,r.data),hasPreviousPage:uz(t,r.data),isFetchNextPageError:f,isFetchingNextPage:p,isFetchPreviousPageError:y,isFetchingPreviousPage:g,isRefetchError:c&&!f&&!y,isRefetching:o&&!p&&!g}}},cd,ea,mr,Ws,ta,Di,C2,dz=(C2=class extends B2{constructor(t){super();je(this,ta);je(this,cd);je(this,ea);je(this,mr);je(this,Ws);me(this,cd,t.client),this.mutationId=t.mutationId,me(this,mr,t.mutationCache),me(this,ea,[]),this.state=t.state||G2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){q(this,ea).includes(t)||(q(this,ea).push(t),this.clearGcTimeout(),q(this,mr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){me(this,ea,q(this,ea).filter(r=>r!==t)),this.scheduleGc(),q(this,mr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){q(this,ea).length||(this.state.status==="pending"?this.scheduleGc():q(this,mr).remove(this))}continue(){var t;return((t=q(this,Ws))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,c,h,f,p,y,g,v,b,w,N,_,A,C,E,T,R,D;const r=()=>{Te(this,ta,Di).call(this,{type:"continue"})},n={client:q(this,cd),meta:this.options.meta,mutationKey:this.options.mutationKey};me(this,Ws,z2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(M,U)=>{Te(this,ta,Di).call(this,{type:"failed",failureCount:M,error:U})},onPause:()=>{Te(this,ta,Di).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>q(this,mr).canRun(this)}));const i=this.state.status==="pending",o=!q(this,Ws).canStart();try{if(i)r();else{Te(this,ta,Di).call(this,{type:"pending",variables:t,isPaused:o}),q(this,mr).config.onMutate&&await q(this,mr).config.onMutate(t,this,n);const U=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t,n));U!==this.state.context&&Te(this,ta,Di).call(this,{type:"pending",context:U,variables:t,isPaused:o})}const M=await q(this,Ws).start();return await((f=(h=q(this,mr).config).onSuccess)==null?void 0:f.call(h,M,t,this.state.context,this,n)),await((y=(p=this.options).onSuccess)==null?void 0:y.call(p,M,t,this.state.context,n)),await((v=(g=q(this,mr).config).onSettled)==null?void 0:v.call(g,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)),Te(this,ta,Di).call(this,{type:"success",data:M}),M}catch(M){try{await((_=(N=q(this,mr).config).onError)==null?void 0:_.call(N,M,t,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((C=(A=this.options).onError)==null?void 0:C.call(A,M,t,this.state.context,n))}catch(U){Promise.reject(U)}try{await((T=(E=q(this,mr).config).onSettled)==null?void 0:T.call(E,void 0,M,this.state.variables,this.state.context,this,n))}catch(U){Promise.reject(U)}try{await((D=(R=this.options).onSettled)==null?void 0:D.call(R,void 0,M,t,this.state.context,n))}catch(U){Promise.reject(U)}throw Te(this,ta,Di).call(this,{type:"error",error:M}),M}finally{q(this,mr).runNext(this)}}},cd=new WeakMap,ea=new WeakMap,mr=new WeakMap,Ws=new WeakMap,ta=new WeakSet,Di=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),Ut.batch(()=>{q(this,ea).forEach(n=>{n.onMutationUpdate(t)}),q(this,mr).notify({mutation:this,type:"updated",action:t})})},C2);function G2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $a,Dn,dd,T2,fz=(T2=class extends su{constructor(t={}){super();je(this,$a);je(this,Dn);je(this,dd);this.config=t,me(this,$a,new Set),me(this,Dn,new Map),me(this,dd,0)}build(t,r,n){const i=new dz({client:t,mutationCache:this,mutationId:++nh(this,dd)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){q(this,$a).add(t);const r=ah(t);if(typeof r=="string"){const n=q(this,Dn).get(r);n?n.push(t):q(this,Dn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(q(this,$a).delete(t)){const r=ah(t);if(typeof r=="string"){const n=q(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&&q(this,Dn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=ah(t);if(typeof r=="string"){const n=q(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=ah(t);if(typeof r=="string"){const i=(n=q(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(){Ut.batch(()=>{q(this,$a).forEach(t=>{this.notify({type:"removed",mutation:t})}),q(this,$a).clear(),q(this,Dn).clear()})}getAll(){return Array.from(q(this,$a))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>vO(r,n))}findAll(t={}){return this.getAll().filter(r=>vO(t,r))}notify(t){Ut.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return Ut.batch(()=>Promise.all(t.map(r=>r.continue().catch(Sr))))}},$a=new WeakMap,Dn=new WeakMap,dd=new WeakMap,T2);function ah(e){var t;return(t=e.options.scope)==null?void 0:t.id}var za,Ki,zr,Ba,Qa,Eh,Ix,P2,hz=(P2=class extends su{constructor(r,n){super();je(this,Qa);je(this,za);je(this,Ki);je(this,zr);je(this,Ba);me(this,za,r),this.setOptions(n),this.bindMethods(),Te(this,Qa,Eh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=q(this,za).defaultMutationOptions(r),zh(this.options,n)||q(this,za).getMutationCache().notify({type:"observerOptionsUpdated",mutation:q(this,zr),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&ao(n.mutationKey)!==ao(this.options.mutationKey)?this.reset():((i=q(this,zr))==null?void 0:i.state.status)==="pending"&&q(this,zr).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=q(this,zr))==null||r.removeObserver(this)}onMutationUpdate(r){Te(this,Qa,Eh).call(this),Te(this,Qa,Ix).call(this,r)}getCurrentResult(){return q(this,Ki)}reset(){var r;(r=q(this,zr))==null||r.removeObserver(this),me(this,zr,void 0),Te(this,Qa,Eh).call(this),Te(this,Qa,Ix).call(this)}mutate(r,n){var i;return me(this,Ba,n),(i=q(this,zr))==null||i.removeObserver(this),me(this,zr,q(this,za).getMutationCache().build(q(this,za),this.options)),q(this,zr).addObserver(this),q(this,zr).execute(r)}},za=new WeakMap,Ki=new WeakMap,zr=new WeakMap,Ba=new WeakMap,Qa=new WeakSet,Eh=function(){var n;const r=((n=q(this,zr))==null?void 0:n.state)??G2();me(this,Ki,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Ix=function(r){Ut.batch(()=>{var n,i,o,l,c,h,f,p;if(q(this,Ba)&&this.hasListeners()){const y=q(this,Ki).variables,g=q(this,Ki).context,v={client:q(this,za),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(i=(n=q(this,Ba)).onSuccess)==null||i.call(n,r.data,y,g,v)}catch(b){Promise.reject(b)}try{(l=(o=q(this,Ba)).onSettled)==null||l.call(o,r.data,null,y,g,v)}catch(b){Promise.reject(b)}}else if((r==null?void 0:r.type)==="error"){try{(h=(c=q(this,Ba)).onError)==null||h.call(c,r.error,y,g,v)}catch(b){Promise.reject(b)}try{(p=(f=q(this,Ba)).onSettled)==null||p.call(f,void 0,r.error,y,g,v)}catch(b){Promise.reject(b)}}}this.listeners.forEach(y=>{y(q(this,Ki))})})},P2),ra,R2,mz=(R2=class extends su{constructor(t={}){super();je(this,ra);this.config=t,me(this,ra,new Map)}build(t,r,n){const i=r.queryKey,o=r.queryHash??Vb(i,r);let l=this.get(o);return l||(l=new iz({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){q(this,ra).has(t.queryHash)||(q(this,ra).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=q(this,ra).get(t.queryHash);r&&(t.destroy(),r===t&&q(this,ra).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ut.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return q(this,ra).get(t)}getAll(){return[...q(this,ra).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>gO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>gO(t,n)):r}notify(t){Ut.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){Ut.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ut.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ra=new WeakMap,R2),wt,Gi,Yi,$l,zl,Vi,Bl,Ul,M2,pz=(M2=class{constructor(e={}){je(this,wt);je(this,Gi);je(this,Yi);je(this,$l);je(this,zl);je(this,Vi);je(this,Bl);je(this,Ul);me(this,wt,e.queryCache||new mz),me(this,Gi,e.mutationCache||new fz),me(this,Yi,e.defaultOptions||{}),me(this,$l,new Map),me(this,zl,new Map),me(this,Vi,0)}mount(){nh(this,Vi)._++,q(this,Vi)===1&&(me(this,Bl,Yb.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,wt).onFocus())})),me(this,Ul,Bh.subscribe(async e=>{e&&(await this.resumePausedMutations(),q(this,wt).onOnline())})))}unmount(){var e,t;nh(this,Vi)._--,q(this,Vi)===0&&((e=q(this,Bl))==null||e.call(this),me(this,Bl,void 0),(t=q(this,Ul))==null||t.call(this),me(this,Ul,void 0))}isFetching(e){return q(this,wt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return q(this,Gi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=q(this,wt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=q(this,wt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Zi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return q(this,wt).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=q(this,wt).get(n.queryHash),o=i==null?void 0:i.state.data,l=Q$(t,o);if(l!==void 0)return q(this,wt).build(this,n).setData(l,{...r,manual:!0})}setQueriesData(e,t,r){return Ut.batch(()=>q(this,wt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=q(this,wt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=q(this,wt);Ut.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=q(this,wt);return Ut.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=Ut.batch(()=>q(this,wt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(Sr).catch(Sr)}invalidateQueries(e,t={}){return Ut.batch(()=>(q(this,wt).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=Ut.batch(()=>q(this,wt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,r);return r.throwOnError||(o=o.catch(Sr)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Sr)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=q(this,wt).build(this,t);return r.isStaleByTime(Zi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Sr).catch(Sr)}fetchInfiniteQuery(e){return e.behavior=Uh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Sr).catch(Sr)}ensureInfiniteQueryData(e){return e.behavior=Uh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Bh.isOnline()?q(this,Gi).resumePausedMutations():Promise.resolve()}getQueryCache(){return q(this,wt)}getMutationCache(){return q(this,Gi)}getDefaultOptions(){return q(this,Yi)}setDefaultOptions(e){me(this,Yi,e)}setQueryDefaults(e,t){q(this,$l).set(ao(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...q(this,$l).values()],r={};return t.forEach(n=>{Lc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){q(this,zl).set(ao(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...q(this,zl).values()],r={};return t.forEach(n=>{Lc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...q(this,Yi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Vb(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===Qb&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...q(this,Yi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){q(this,wt).clear(),q(this,Gi).clear()}},wt=new WeakMap,Gi=new WeakMap,Yi=new WeakMap,$l=new WeakMap,zl=new WeakMap,Vi=new WeakMap,Bl=new WeakMap,Ul=new WeakMap,M2),Y2=S.createContext(void 0),pa=e=>{const t=S.useContext(Y2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},yz=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(Y2.Provider,{value:e,children:t})),V2=S.createContext(!1),gz=()=>S.useContext(V2);V2.Provider;function vz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var xz=S.createContext(vz()),bz=()=>S.useContext(xz),jz=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?Xb(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},wz=e=>{S.useEffect(()=>{e.clearReset()},[e])},Sz=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||Xb(r,[e.error,n])),Nz=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))}},_z=(e,t)=>e.isLoading&&e.isFetching&&!t,Oz=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,_O=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Q2(e,t,r){var g,v,b,w;const n=gz(),i=bz(),o=pa(),l=o.defaultQueryOptions(e);(v=(g=o.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||v.call(g,l);const c=o.getQueryCache().get(l.queryHash);l._optimisticResults=n?"isRestoring":"optimistic",Nz(l),jz(l,i,c),wz(i);const h=!o.getQueryCache().get(l.queryHash),[f]=S.useState(()=>new t(o,l)),p=f.getOptimisticResult(l),y=!n&&e.subscribed!==!1;if(S.useSyncExternalStore(S.useCallback(N=>{const _=y?f.subscribe(Ut.batchCalls(N)):Sr;return f.updateResult(),_},[f,y]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),S.useEffect(()=>{f.setOptions(l)},[l,f]),Oz(l,p))throw _O(l,f,i);if(Sz({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&&!Ic.isServer()&&_z(p,n)){const N=h?_O(l,f,i):c==null?void 0:c.promise;N==null||N.catch(Sr).finally(()=>{f.updateResult()})}return l.notifyOnChangeProps?p:f.trackResult(p)}function qe(e,t){return Q2(e,F2)}function $x(e,t){const r=pa(),[n]=S.useState(()=>new hz(r,e));S.useEffect(()=>{n.setOptions(e)},[n,e]);const i=S.useSyncExternalStore(S.useCallback(l=>n.subscribe(Ut.batchCalls(l)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=S.useCallback((l,c)=>{n.mutate(l,c).catch(Sr)},[n]);if(i.error&&Xb(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function X2(e,t){return Q2(e,cz)}var Ac=typeof window<"u"?S.useLayoutEffect:S.useEffect;function Sv(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 Ez(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 Az(e){const t=S.useRef(null);return S.useImperativeHandle(e,()=>t.current,[]),t}var W2=!1;function $c(e){return e[e.length-1]}function Cz(e){return typeof e=="function"}function Qi(e,t){return Cz(e)?e(t):e}var Tz=Object.prototype.hasOwnProperty,OO=Object.prototype.propertyIsEnumerable,Pz=()=>Object.create(null),Es=(e,t)=>qa(e,t,Pz);function qa(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const i=t,o=CO(e)&&CO(i);if(!o&&!(Fl(e)&&Fl(i)))return i;const l=o?e:EO(e);if(!l)return i;const c=o?i:EO(i);if(!c)return i;const h=l.length,f=c.length,p=o?new Array(f):r();let y=0;for(let g=0;g<f;g++){const v=o?g:c[g],b=e[v],w=i[v];if(b===w){p[v]=b,(o?g<h:Tz.call(e,v))&&y++;continue}if(b===null||w===null||typeof b!="object"||typeof w!="object"){p[v]=w;continue}const N=qa(b,w,r,n+1);p[v]=N,N===b&&y++}return h===f&&y===h?e:p}function EO(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!OO.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(!OO.call(e,i))return!1;n.push(i)}return n}function Fl(e){if(!AO(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!AO(r)||!r.hasOwnProperty("isPrototypeOf"))}function AO(e){return Object.prototype.toString.call(e)==="[object Object]"}function CO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Zs(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(!Zs(e[n],t[n],r))return!1;return!0}if(Fl(e)&&Fl(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)&&!Zs(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||!Zs(e[l],t[l],r)))return!1;return i===o}return!1}function Hl(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 zc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Rz(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function TO(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 Rz(t)}var Mz=["http:","https:","mailto:","tel:"];function qh(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}function dc(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+=TO(e.slice(r,i.index))+i[0],r=t.lastIndex;n=n+TO(r?e.slice(r):e);let o=!1;return n.startsWith("//")&&(o=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:o}}function Dz(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function kz(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 Ka(){throw new Error("Invariant failed")}function Bc(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 h=r;t.delete(h.key),h.next&&(r=h.next,h.next.prev=void 0),h===n&&(n=void 0)}const c=t.get(o);if(c)c.value=l,i(c);else{const h={key:o,value:l,prev:n};n&&(n.next=h),n=h,r||(r=h),t.set(o,h)}},clear(){t.clear(),r=void 0,n=void 0}}}var Ls=4,Z2=5;function Lz(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 Zb(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=Lz(o);if(l){const[c,h]=l,f=o.charCodeAt(c+1);if(f===45){if(c+2<o.length&&o.charCodeAt(c+2)===36){const p=c+3,y=h;if(p<y)return r[0]=3,r[1]=t+c,r[2]=t+p,r[3]=t+y,r[4]=t+h+1,r[5]=i,r}}else if(f===36){const p=c+1,y=c+2;return y===h?(r[0]=2,r[1]=t+c,r[2]=t+p,r[3]=t+y,r[4]=t+h+1,r[5]=e.length,r):(r[0]=1,r[1]=t+c,r[2]=t+y,r[3]=t+h,r[4]=t+h+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 Qm(e,t,r,n,i,o,l){var h,f,p,y,g,v,b,w,N,_,A,C,E;l==null||l(r);let c=n;{const T=r.fullPath??r.from,R=T.length,D=((h=r.options)==null?void 0:h.caseSensitive)??e,M=!!((p=(f=r.options)==null?void 0:f.params)!=null&&p.parse&&((g=(y=r.options)==null?void 0:y.skipRouteOnParseError)!=null&&g.params));for(;c<R;){const k=Zb(T,c,t);let H;const B=c,ae=k[5];switch(c=ae+1,o++,k[0]){case 0:{const ee=T.substring(k[2],k[3]);if(D){const ne=(v=i.static)==null?void 0:v.get(ee);if(ne)H=ne;else{i.static??(i.static=new Map);const $=Is(r.fullPath??r.from);$.parent=i,$.depth=o,H=$,i.static.set(ee,$)}}else{const ne=ee.toLowerCase(),$=(b=i.staticInsensitive)==null?void 0:b.get(ne);if($)H=$;else{i.staticInsensitive??(i.staticInsensitive=new Map);const L=Is(r.fullPath??r.from);L.parent=i,L.depth=o,H=L,i.staticInsensitive.set(ne,L)}}break}case 1:{const ee=T.substring(B,k[1]),ne=T.substring(k[4],ae),$=D&&!!(ee||ne),L=ee?$?ee:ee.toLowerCase():void 0,W=ne?$?ne:ne.toLowerCase():void 0,te=!M&&((w=i.dynamic)==null?void 0:w.find(se=>!se.skipOnParamError&&se.caseSensitive===$&&se.prefix===L&&se.suffix===W));if(te)H=te;else{const se=_v(1,r.fullPath??r.from,$,L,W);H=se,se.depth=o,se.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(se)}break}case 3:{const ee=T.substring(B,k[1]),ne=T.substring(k[4],ae),$=D&&!!(ee||ne),L=ee?$?ee:ee.toLowerCase():void 0,W=ne?$?ne:ne.toLowerCase():void 0,te=!M&&((N=i.optional)==null?void 0:N.find(se=>!se.skipOnParamError&&se.caseSensitive===$&&se.prefix===L&&se.suffix===W));if(te)H=te;else{const se=_v(3,r.fullPath??r.from,$,L,W);H=se,se.parent=i,se.depth=o,i.optional??(i.optional=[]),i.optional.push(se)}break}case 2:{const ee=T.substring(B,k[1]),ne=T.substring(k[4],ae),$=D&&!!(ee||ne),L=ee?$?ee:ee.toLowerCase():void 0,W=ne?$?ne:ne.toLowerCase():void 0,te=_v(2,r.fullPath??r.from,$,L,W);H=te,te.parent=i,te.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(te)}}i=H}if(M&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const k=Is(r.fullPath??r.from);k.kind=Z2,k.parent=i,o++,k.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(k),i=k}const U=(r.path||!r.children)&&!r.isRoot;if(U&&T.endsWith("/")){const k=Is(r.fullPath??r.from);k.kind=Ls,k.parent=i,o++,k.depth=o,i.index=k,i=k}i.parse=((A=(_=r.options)==null?void 0:_.params)==null?void 0:A.parse)??null,i.skipOnParamError=M,i.parsingPriority=((E=(C=r.options)==null?void 0:C.skipRouteOnParseError)==null?void 0:E.priority)??0,U&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const T of r.children)Qm(e,t,T,c,i,o,l)}function Nv(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 ki(e){var t,r,n;if(e.pathless)for(const i of e.pathless)ki(i);if(e.static)for(const i of e.static.values())ki(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())ki(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(Nv);for(const i of e.dynamic)ki(i)}if((r=e.optional)!=null&&r.length){e.optional.sort(Nv);for(const i of e.optional)ki(i)}if((n=e.wildcard)!=null&&n.length){e.wildcard.sort(Nv);for(const i of e.wildcard)ki(i)}}function Is(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 _v(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 Iz(e,t){const r=Is("/"),n=new Uint16Array(6);for(const i of e)Qm(!1,n,i,1,r,0);ki(r),t.masksTree=r,t.flatCache=Bc(1e3)}function $z(e,t){e||(e="/");const r=t.flatCache.get(e);if(r)return r;const n=Jb(e,t.masksTree);return t.flatCache.set(e,n),n}function zz(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=Is("/"),Qm(t,new Uint16Array(6),{from:e},1,l,0),i.singleCache.set(o,l)),Jb(n,l,r)}function Bz(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=Jb(e,t.segmentTree,r)}catch(l){if(l instanceof URIError)o=null;else throw l}return o&&(o.branch=Fz(o.route)),t.matchCache.set(n,o),o}function Uz(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function qz(e,t=!1,r){const n=Is(e.fullPath),i=new Uint16Array(6),o={},l={};let c=0;return Qm(t,i,e,1,n,0,h=>{if(r==null||r(h,c),h.id in o&&Ka(),o[h.id]=h,c!==0&&h.path){const f=Uz(h.fullPath);(!l[f]||h.fullPath.endsWith("/"))&&(l[f]=h)}c++}),ki(n),{processedTree:{segmentTree:n,singleCache:Bc(1e3),matchCache:Bc(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:l}}function Jb(e,t,r=!1){const n=e.split("/"),i=Kz(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,y,g,v,b,w,N,_,A,C;const n=Hz(r.node);let i=null;const o=Object.create(null);let l=((p=r.extract)==null?void 0:p.part)??0,c=((y=r.extract)==null?void 0:y.node)??0,h=((g=r.extract)==null?void 0:g.path)??0,f=((v=r.extract)==null?void 0:v.segment)??0;for(;c<n.length;l++,c++,h++,f++){const E=n[c];if(E.kind===Ls)break;if(E.kind===Z2){f--,l--,h--;continue}const T=t[l],R=h;if(T&&(h+=T.length),E.kind===1){i??(i=r.node.fullPath.split("/"));const D=i[f],M=((b=E.prefix)==null?void 0:b.length)??0;if(D.charCodeAt(M)===123){const U=((w=E.suffix)==null?void 0:w.length)??0,k=D.substring(M+2,D.length-U-1),H=T.substring(M,T.length-U);o[k]=decodeURIComponent(H)}else{const U=D.substring(1);o[U]=decodeURIComponent(T)}}else if(E.kind===3){if(r.skipped&1<<c){l--,h=R-1;continue}i??(i=r.node.fullPath.split("/"));const D=i[f],M=((N=E.prefix)==null?void 0:N.length)??0,U=((_=E.suffix)==null?void 0:_.length)??0,k=D.substring(M+3,D.length-U-1),H=E.suffix||E.prefix?T.substring(M,T.length-U):T;H&&(o[k]=decodeURIComponent(H))}else if(E.kind===2){const D=E,M=e.substring(R+(((A=D.prefix)==null?void 0:A.length)??0),e.length-(((C=D.suffix)==null?void 0:C.length)??0)),U=decodeURIComponent(M);o["*"]=U,o._splat=U;break}}return r.rawParams&&Object.assign(o,r.rawParams),[o,{part:l,node:c,path:h,segment:f}]}function Fz(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Hz(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Kz(e,t,r,n){if(e==="/"&&r.index)return{node:r.index,skipped:0};const i=!$c(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 h=null,f=null,p=null;for(;c.length;){const y=c.pop(),{node:g,index:v,skipped:b,depth:w,statics:N,dynamics:_,optionals:A}=y;let{extract:C,rawParams:E,parsedParams:T}=y;if(g.skipOnParamError){if(!Ov(e,t,y))continue;E=y.rawParams,C=y.extract,T=y.parsedParams}n&&g.route&&g.kind!==Ls&&fc(f,y)&&(f=y);const R=v===l;if(R&&(g.route&&!o&&fc(p,y)&&(p=y),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const D=R?void 0:t[v];let M;if(R&&g.index){const U={node:g.index,index:v,skipped:b,depth:w+1,statics:N,dynamics:_,optionals:A,extract:C,rawParams:E,parsedParams:T};let k=!0;if(g.index.skipOnParamError&&(Ov(e,t,U)||(k=!1)),k){if(N===l&&!_&&!A&&!b)return U;fc(p,U)&&(p=U)}}if(g.wildcard&&fc(h,y))for(const U of g.wildcard){const{prefix:k,suffix:H}=U;if(k&&(R||!(U.caseSensitive?D:M??(M=D.toLowerCase())).startsWith(k)))continue;if(H){if(R)continue;const ae=t.slice(v).join("/").slice(-H.length);if((U.caseSensitive?ae:ae.toLowerCase())!==H)continue}const B={node:U,index:l,skipped:b,depth:w,statics:N,dynamics:_,optionals:A,extract:C,rawParams:E,parsedParams:T};if(!(U.skipOnParamError&&!Ov(e,t,B))){h=B;break}}if(g.optional){const U=b|1<<w,k=w+1;for(let H=g.optional.length-1;H>=0;H--){const B=g.optional[H];c.push({node:B,index:v,skipped:U,depth:k,statics:N,dynamics:_,optionals:A,extract:C,rawParams:E,parsedParams:T})}if(!R)for(let H=g.optional.length-1;H>=0;H--){const B=g.optional[H],{prefix:ae,suffix:ee}=B;if(ae||ee){const ne=B.caseSensitive?D:M??(M=D.toLowerCase());if(ae&&!ne.startsWith(ae)||ee&&!ne.endsWith(ee))continue}c.push({node:B,index:v+1,skipped:b,depth:k,statics:N,dynamics:_,optionals:A+1,extract:C,rawParams:E,parsedParams:T})}}if(!R&&g.dynamic&&D)for(let U=g.dynamic.length-1;U>=0;U--){const k=g.dynamic[U],{prefix:H,suffix:B}=k;if(H||B){const ae=k.caseSensitive?D:M??(M=D.toLowerCase());if(H&&!ae.startsWith(H)||B&&!ae.endsWith(B))continue}c.push({node:k,index:v+1,skipped:b,depth:w+1,statics:N,dynamics:_+1,optionals:A,extract:C,rawParams:E,parsedParams:T})}if(!R&&g.staticInsensitive){const U=g.staticInsensitive.get(M??(M=D.toLowerCase()));U&&c.push({node:U,index:v+1,skipped:b,depth:w+1,statics:N+1,dynamics:_,optionals:A,extract:C,rawParams:E,parsedParams:T})}if(!R&&g.static){const U=g.static.get(D);U&&c.push({node:U,index:v+1,skipped:b,depth:w+1,statics:N+1,dynamics:_,optionals:A,extract:C,rawParams:E,parsedParams:T})}if(g.pathless){const U=w+1;for(let k=g.pathless.length-1;k>=0;k--){const H=g.pathless[k];c.push({node:H,index:v,skipped:b,depth:U,statics:N,dynamics:_,optionals:A,extract:C,rawParams:E,parsedParams:T})}}}if(p&&h)return fc(h,p)?p:h;if(p)return p;if(h)return h;if(n&&f){let y=f.index;for(let v=0;v<f.index;v++)y+=t[v].length;const g=y===e.length?"/":e.slice(y);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(g),f}return null}function Ov(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 fc(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===Ls)>(e.node.kind===Ls)||t.node.kind===Ls==(e.node.kind===Ls)&&t.depth>e.depth))):!0}function Ah(e){return ej(e.filter(t=>t!==void 0).join("/"))}function ej(e){return e.replace(/\/{2,}/g,"/")}function eR(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ji(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function tR(e){return Ji(eR(e))}function Fh(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Gz(e,t,r){return Fh(e,r)===Fh(t,r)}function Yz({base:e,to:t,trailingSlash:r="never",cache:n}){const i=t.startsWith("/"),o=!i&&t===".";let l;if(n){l=i?t:o?e:e+"\0"+t;const y=n.get(l);if(y)return y}let c;if(o)c=e.split("/");else if(i)c=t.split("/");else{for(c=e.split("/");c.length>1&&$c(c)==="";)c.pop();const y=t.split("/");for(let g=0,v=y.length;g<v;g++){const b=y[g];b===""?g?g===v-1&&c.push(b):c=[b]:b===".."?c.pop():b==="."||c.push(b)}}c.length>1&&($c(c)===""?r==="never"&&c.pop():r==="always"&&c.push(""));let h,f="";for(let y=0;y<c.length;y++){y>0&&(f+="/");const g=c[y];if(!g)continue;h=Zb(g,0,h);const v=h[0];if(v===0){f+=g;continue}const b=h[5],w=g.substring(0,h[1]),N=g.substring(h[4],b),_=g.substring(h[2],h[3]);v===1?f+=w||N?`${w}{$${_}}${N}`:`$${_}`:v===2?f+=w||N?`${w}{$}${N}`:"$":f+=`${w}{-$${_}}${N}`}f=ej(f);const p=f||"/";return l&&n&&n.set(l,p),p}function Vz(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 Ev(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=>RO(i,r)).join("/"):RO(n,r)}function PO({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,h,f="";for(;c<l;){const p=c;h=Zb(e,p,h);const y=h[5];if(c=y+1,p===y)continue;const g=h[0];if(g===0){f+="/"+e.substring(p,y);continue}if(g===2){const v=t._splat;o._splat=v,o["*"]=v;const b=e.substring(p,h[1]),w=e.substring(h[4],y);if(!v){i=!0,(b||w)&&(f+="/"+b+w);continue}const N=Ev("_splat",t,r);f+="/"+b+N+w;continue}if(g===1){const v=e.substring(h[2],h[3]);!i&&!(v in t)&&(i=!0),o[v]=t[v];const b=e.substring(p,h[1]),w=e.substring(h[4],y),N=Ev(v,t,r)??"undefined";f+="/"+b+N+w;continue}if(g===3){const v=e.substring(h[2],h[3]),b=t[v];if(b==null)continue;o[v]=b;const w=e.substring(p,h[1]),N=e.substring(h[4],y),_=Ev(v,t,r)??"";f+="/"+w+_+N;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function RO(e,t){const r=encodeURIComponent(e);return(t==null?void 0:t(r))??r}function Or(e){return!!(e!=null&&e.isNotFound)}function Qz(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var Xz="tsr-scroll-restoration-v1_3";function Wz(){const e=Qz();if(!e)return null;let t={};try{const n=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Fl(n)&&(t=n)}catch{}return{get state(){return t},set:n=>{t=Qi(n,t)||t},persist:()=>{try{e.setItem(Xz,JSON.stringify(t))}catch{}}}}var MO=Wz(),Zz=e=>e.state.__TSR_key||e.href;function Jz(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 ih=!1,hc="window",DO="data-scroll-restoration-id";function e8(e,t){if(!MO)return;const r=MO;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,ih=!1;const n=e.options.getScrollRestorationKey||Zz,i=new Map;window.history.scrollRestoration="manual";const o=c=>{if(!(ih||!e.isScrollRestoring))if(c.target===document||c.target===window)i.set(hc,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const h=c.target;i.set(h,{scrollX:h.scrollLeft||0,scrollY:h.scrollTop||0})}},l=c=>{var f;if(!e.isScrollRestoring||!c||i.size===0||!r)return;const h=(f=r.state)[c]||(f[c]={});for(const[p,y]of i){let g;if(p===hc)g=hc;else if(p.isConnected){const v=p.getAttribute(DO);g=v?`[${DO}="${v}"]`:Jz(p)}g&&(h[g]=y)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",c=>{l(c.fromLocation?n(c.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{l(n(e.stores.resolvedLocation.state??e.stores.location.state)),r.persist()}),e.subscribe("onRendered",c=>{var y;const h=n(c.toLocation),f=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}))){ih=!0;try{const g=e.isScrollRestoring?r.state[h]:void 0;let v=!1;if(g)for(const b in g){const w=g[b];if(!Fl(w))continue;const{scrollX:N,scrollY:_}=w;if(!(!Number.isFinite(N)||!Number.isFinite(_))){if(b===hc)window.scrollTo({top:_,left:N,behavior:f}),v=!0;else if(b){let A;try{A=document.querySelector(b)}catch{continue}A&&(A.scrollLeft=N,A.scrollTop=_,v=!0)}}}if(!v){const b=e.history.location.hash.slice(1);if(b){const w=((y=window.history.state)==null?void 0:y.__hashScrollIntoViewOptions)??!0;if(w){const N=document.getElementById(b);N&&N.scrollIntoView(w)}}else{const w={top:0,left:0,behavior:f};if(window.scrollTo(w),p)for(const N of p){if(N===hc)continue;const _=typeof N=="function"?N():document.querySelector(N);_&&_.scrollTo(w)}}}}finally{ih=!1}e.isScrollRestoring&&r.set(g=>(g[h]||(g[h]={}),g))}})}function t8(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 Av(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function r8(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]=Av(i):Array.isArray(o)?o.push(Av(i)):r[n]=[o,Av(i)]}return r}var n8=i8(JSON.parse),a8=s8(JSON.stringify,JSON.parse);function i8(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=r8(t);for(const n in r){const i=r[n];if(typeof i=="string")try{r[n]=e(i)}catch{}}return r}}function s8(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=t8(i,n);return o?`?${o}`:""}}var Js="__root__";function o8(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 Ur(e){return e instanceof Response&&!!e.options}function l8(e){return{input:({url:t})=>{for(const r of e)t=zx(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=rR(e[r],t);return t}}}function u8(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=Ah(["/",t,l.pathname]),l)}}function zx(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 c8(e,t){const{createMutableStore:r,createReadonlyStore:n,batch:i,init:o}=t,l=new Map,c=new Map,h=new Map,f=r(e.status),p=r(e.loadedAt),y=r(e.isLoading),g=r(e.isTransitioning),v=r(e.location),b=r(e.resolvedLocation),w=r(e.statusCode),N=r(e.redirect),_=r([]),A=r([]),C=r([]),E=n(()=>Cv(l,_.state)),T=n(()=>Cv(c,A.state)),R=n(()=>Cv(h,C.state)),D=n(()=>_.state[0]),M=n(()=>_.state.some(L=>{var W;return((W=l.get(L))==null?void 0:W.state.status)==="pending"})),U=n(()=>{var L;return{locationHref:v.state.href,resolvedLocationHref:(L=b.state)==null?void 0:L.href,status:f.state}}),k=n(()=>({status:f.state,loadedAt:p.state,isLoading:y.state,isTransitioning:g.state,matches:E.state,location:v.state,resolvedLocation:b.state,statusCode:w.state,redirect:N.state})),H=Bc(64);function B(L){let W=H.get(L);return W||(W=n(()=>{const te=_.state;for(const se of te){const I=l.get(se);if(I&&I.routeId===L)return I.state}}),H.set(L,W)),W}const ae={status:f,loadedAt:p,isLoading:y,isTransitioning:g,location:v,resolvedLocation:b,statusCode:w,redirect:N,matchesId:_,pendingMatchesId:A,cachedMatchesId:C,activeMatchesSnapshot:E,pendingMatchesSnapshot:T,cachedMatchesSnapshot:R,firstMatchId:D,hasPendingMatches:M,matchRouteReactivity:U,activeMatchStoresById:l,pendingMatchStoresById:c,cachedMatchStoresById:h,__store:k,getMatchStoreByRouteId:B,setActiveMatches:ee,setPendingMatches:ne,setCachedMatches:$};ee(e.matches),o==null||o(ae);function ee(L){Tv(L,l,_,r,i)}function ne(L){Tv(L,c,A,r,i)}function $(L){Tv(L,h,C,r,i)}return ae}function Cv(e,t){const r=[];for(const n of t){const i=e.get(n);i&&r.push(i.state)}return r}function Tv(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 h=t.get(c.id);if(!h){const f=n(c);f.routeId=c.routeId,t.set(c.id,f);continue}h.routeId=c.routeId,h.state!==c&&h.setState(()=>c)}kz(r.state,o)||r.setState(()=>o)})}var Bx=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},d8=e=>e.stores.matchesId.state.some(t=>{var r;return(r=e.stores.activeMatchStoresById.get(t))==null?void 0:r.state._forcePending}),Xm=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),eo=(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},kO=(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},Xi=(e,t,r)=>{var n,i,o;if(!(!Ur(r)&&!Or(r)))throw Ur(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:Ur(r)?"redirected":l.status==="pending"?"success":l.status,context:eo(e,t.index),isFetching:!1,error:r})),Or(r)&&!r.routeId&&(r.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),Ur(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)},LO=(e,t,r)=>{const n=eo(e,r);e.updateMatch(t,i=>({...i,context:n}))},mc=(e,t,r,n)=>{var c,h;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),Xi(e,e.router.getMatch(i),r);try{(h=(c=l.options).onError)==null||h.call(c,r)}catch(f){r=f,Xi(e,e.router.getMatch(i),r)}e.updateMatch(i,f=>{var p,y;return(p=f._nonReactive.beforeLoadPromise)==null||p.resolve(),f._nonReactive.beforeLoadPromise=void 0,(y=f._nonReactive.loadPromise)==null||y.resolve(),{...f,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!Ur(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&&!Xm(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(()=>{Bx(e)},i);n._nonReactive.pendingTimeout=l}},f8=(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")&&Xi(e,o,o.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(i):i()},h8=(e,t,r,n)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Hl(()=>{o==null||o.resolve(),o=void 0});const{paramsError:l,searchError:c}=i;l&&mc(e,r,l,"PARSE_PARAMS"),c&&mc(e,r,c,"VALIDATE_SEARCH"),aR(e,t,n,i);const h=new AbortController;let f=!1;const p=()=>{f||(f=!0,e.updateMatch(t,E=>({...E,isFetching:"beforeLoad",fetchCount:E.fetchCount+1,abortController:h})))},y=()=>{var E;(E=i._nonReactive.beforeLoadPromise)==null||E.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!n.options.beforeLoad){e.router.batch(()=>{p(),y()});return}i._nonReactive.beforeLoadPromise=Hl();const g={...eo(e,r,!1),...i.__routeContext},{search:v,params:b,cause:w}=i,N=Xm(e,t),_={search:v,abortController:h,params:b,preload:N,context:g,location:e.location,navigate:E=>e.router.navigate({...E,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:N?"preload":w,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},A=E=>{if(E===void 0){e.router.batch(()=>{p(),y()});return}(Ur(E)||Or(E))&&(p(),mc(e,r,E,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,T=>({...T,__beforeLoadContext:E})),y()})};let C;try{if(C=n.options.beforeLoad(_),zc(C))return p(),C.catch(E=>{mc(e,r,E,"BEFORE_LOAD")}).then(A)}catch(E){p(),mc(e,r,E,"BEFORE_LOAD")}A(C)},m8=(e,t)=>{const{id:r,routeId:n}=e.matches[t],i=e.router.looseRoutesById[n],o=()=>c(),l=()=>h8(e,r,t,i),c=()=>{if(nR(e,r))return;const h=f8(e,r,i);return zc(h)?h.then(l):l()};return o()},p8=(e,t,r)=>{var o,l,c,h,f,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),(h=(c=r.options).scripts)==null?void 0:h.call(c,i),(p=(f=r.options).headers)==null?void 0:p.call(f,i)]).then(([y,g,v])=>({meta:y==null?void 0:y.meta,links:y==null?void 0:y.links,headScripts:y==null?void 0:y.scripts,headers:v,scripts:g,styles:y==null?void 0:y.styles}))},iR=(e,t,r,n,i)=>{const o=t[n-1],{params:l,loaderDeps:c,abortController:h,cause:f}=e.router.getMatch(r),p=eo(e,n),y=Xm(e,r);return{params:l,deps:c,preload:!!y,parentMatchPromise:o,abortController:h,context:p,location:e.location,navigate:g=>e.router.navigate({...g,_fromLocation:e.location}),cause:y?"preload":f,route:i,...e.router.options.additionalContext}},IO=async(e,t,r,n,i)=>{var o,l,c,h,f;try{const p=e.router.getMatch(r);try{(!(W2??e.router.isServer)||p.ssr===!0)&&Uc(i);const y=i.options.loader,g=typeof y=="function"?y:y==null?void 0:y.handler,v=g==null?void 0:g(iR(e,t,r,n,i)),b=!!g&&zc(v);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"})),g){const N=b?await v:v;Xi(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:eo(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(y){let g=y;if((g==null?void 0:g.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:eo(e,n)}));return}const v=p._nonReactive.minPendingPromise;v&&await v,Or(y)&&await((c=(l=i.options.notFoundComponent)==null?void 0:l.preload)==null?void 0:c.call(l)),Xi(e,e.router.getMatch(r),y);try{(f=(h=i.options).onError)==null||f.call(h,y)}catch(b){g=b,Xi(e,e.router.getMatch(r),b)}!Ur(g)&&!Or(g)&&await Uc(i,["errorComponent"]),e.updateMatch(r,b=>({...b,error:g,context:eo(e,n),status:"error",isFetching:!1}))}}catch(p){const y=e.router.getMatch(r);y&&(y._nonReactive.loaderPromise=void 0),Xi(e,y,p)}},y8=async(e,t,r)=>{var v,b,w,N;async function n(_,A,C,E,T){const R=Date.now()-A.updatedAt,D=_?T.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??e.router.options.defaultStaleTime??0,M=T.options.shouldReload,U=typeof M=="function"?M(iR(e,t,i,r,T)):M,{status:k,invalid:H}=E,B=R>=D&&(!!e.forceStaleReload||E.cause==="enter"||C!==void 0&&C!==E.id);l=k==="success"&&(H||(U??B)),_&&T.options.preload===!1||(l&&!e.sync&&p?(c=!0,(async()=>{var ae,ee;try{await IO(e,t,i,r,T);const ne=e.router.getMatch(i);(ae=ne._nonReactive.loaderPromise)==null||ae.resolve(),(ee=ne._nonReactive.loadPromise)==null||ee.resolve(),ne._nonReactive.loaderPromise=void 0,ne._nonReactive.loadPromise=void 0}catch(ne){Ur(ne)&&await e.router.navigate(ne.options)}})()):k!=="success"||l?await IO(e,t,i,r,T):LO(e,i,r))}const{id:i,routeId:o}=e.matches[r];let l=!1,c=!1;const h=e.router.looseRoutesById[o],f=h.options.loader,p=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(nR(e,i)){if(!e.router.getMatch(i))return e.matches[r];LO(e,i,r)}else{const _=e.router.getMatch(i),A=e.router.stores.matchesId.state[r],C=((v=A&&e.router.stores.activeMatchStoresById.get(A)||null)==null?void 0:v.routeId)===o?A:(b=e.router.stores.activeMatchesSnapshot.state.find(T=>T.routeId===o))==null?void 0:b.id,E=Xm(e,i);if(_._nonReactive.loaderPromise){if(_.status==="success"&&!e.sync&&!_.preload&&p)return _;await _._nonReactive.loaderPromise;const T=e.router.getMatch(i),R=T._nonReactive.error||T.error;R&&Xi(e,T,R),T.status==="pending"&&await n(E,_,C,T,h)}else{const T=E&&!e.router.stores.activeMatchStoresById.has(i),R=e.router.getMatch(i);R._nonReactive.loaderPromise=Hl(),T!==R.preload&&e.updateMatch(i,D=>({...D,preload:T})),await n(E,_,C,R,h)}}const y=e.router.getMatch(i);c||((w=y._nonReactive.loaderPromise)==null||w.resolve(),(N=y._nonReactive.loadPromise)==null||N.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,c||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const g=c?y.isFetching:!1;return g!==y.isFetching||y.invalid!==!1?(e.updateMatch(i,_=>({..._,isFetching:g,invalid:!1})),e.router.getMatch(i)):y};async function $O(e){var g,v;const t=e,r=[];d8(t.router)&&Bx(t);let n;for(let b=0;b<t.matches.length;b++){try{const w=m8(t,b);zc(w)&&await w}catch(w){if(Ur(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?kO(t,n):void 0,l=n&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let c,h;for(let b=0;b<l;b++)r.push(y8(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(Ur(N))throw N;Or(N)?c??(c=N):h??(h=N)}if(h!==void 0)throw h}const f=c??(n&&!t.preload?n:void 0);let p=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!f&&n&&t.preload)return t.matches;if(f){const b=kO(t,f);b===void 0&&Ka();const w=t.matches[b],N=t.router.looseRoutesById[w.routeId],_=(g=t.router.options)==null?void 0:g.defaultNotFoundComponent;!N.options.notFoundComponent&&_&&(N.options.notFoundComponent=_),f.routeId=w.routeId;const A=w.routeId===t.router.routeTree.id;t.updateMatch(w.id,C=>({...C,...A?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),p=b,await Uc(N,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(v=t.router.getMatch(b.id))!=null&&v.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 Uc(b,["errorComponent"])}for(let b=0;b<=p;b++){const{id:w,routeId:N}=t.matches[b],_=t.router.looseRoutesById[N];try{const A=p8(t,w,_);if(A){const C=await A;t.updateMatch(w,E=>({...E,...C}))}}catch(A){console.error(`Error executing head for route ${N}:`,A)}}const y=Bx(t);if(zc(y)&&await y,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function zO(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 Uc(e,t=Ch){!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===Ch?(()=>{if(e._componentsPromise===void 0){const n=zO(e,Ch);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():zO(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function sR(e){var t;for(const r of Ch)if((t=e.options[r])!=null&&t.preload)return!0;return!1}var Ch=["component","errorComponent","pendingComponent","notFoundComponent"],es="__TSR_index",BO="popstate",UO="beforeunload";function g8(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,...h})=>{var y,g;if((c==null?void 0:c.ignoreBlocker)??!1){l();return}const f=((y=e.getBlockers)==null?void 0:y.call(e))??[],p=h.type==="PUSH"||h.type==="REPLACE";if(typeof document<"u"&&f.length&&p)for(const v of f){const b=Hh(h.path,h.state);if(await v.blockerFn({currentLocation:t,nextLocation:b,action:h.type})){(g=e.onBlocked)==null||g.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,h)=>{const f=t.state[es];c=qO(f+1,c),o({task:()=>{e.pushState(l,c),n({type:"PUSH"})},navigateOpts:h,type:"PUSH",path:l,state:c})},replace:(l,c,h)=>{const f=t.state[es];c=qO(f,c),o({task:()=>{e.replaceState(l,c),n({type:"REPLACE"})},navigateOpts:h,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[es]!==0,createHref:l=>e.createHref(l),block:l=>{var h;if(!e.setBlockers)return()=>{};const c=((h=e.getBlockers)==null?void 0:h.call(e))??[];return e.setBlockers([...c,l]),()=>{var p,y;const f=((p=e.getBlockers)==null?void 0:p.call(e))??[];(y=e.setBlockers)==null||y.call(e,f.filter(g=>g!==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 qO(e,t){t||(t={});const r=tj();return{...t,key:r,__TSR_key:r,[es]:e}}function v8(e){var M,U;const t=typeof document<"u"?window:void 0,r=t.history.pushState,n=t.history.replaceState;let i=[];const o=()=>i,l=k=>i=k,c=(k=>k),h=(()=>Hh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((M=t.history.state)!=null&&M.__TSR_key)&&!((U=t.history.state)!=null&&U.key)){const k=tj();t.history.replaceState({[es]:0,key:k,__TSR_key:k},"")}let f=h(),p,y=!1,g=!1,v=!1,b=!1;const w=()=>f;let N,_;const A=()=>{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)},C=(k,H,B)=>{const ae=c(H);_||(p=f),f=Hh(H,B),N={href:ae,state:B,isPush:(N==null?void 0:N.isPush)||k==="push"},_||(_=Promise.resolve().then(()=>A()))},E=k=>{f=h(),D.notify({type:k})},T=async()=>{if(g){g=!1;return}const k=h(),H=k.state[es]-f.state[es],B=H===1,ae=H===-1,ee=!B&&!ae||y;y=!1;const ne=ee?"GO":ae?"BACK":"FORWARD",$=ee?{type:"GO",index:H}:{type:ae?"BACK":"FORWARD"};if(v)v=!1;else{const L=o();if(typeof document<"u"&&L.length){for(const W of L)if(await W.blockerFn({currentLocation:f,nextLocation:k,action:ne})){g=!0,t.history.go(1),D.notify($);return}}}f=h(),D.notify($)},R=k=>{if(b){b=!1;return}let H=!1;const B=o();if(typeof document<"u"&&B.length)for(const ae of B){const ee=ae.enableBeforeUnload??!0;if(ee===!0){H=!0;break}if(typeof ee=="function"&&ee()===!0){H=!0;break}}if(H)return k.preventDefault(),k.returnValue=""},D=g8({getLocation:w,getLength:()=>t.history.length,pushState:(k,H)=>C("push",k,H),replaceState:(k,H)=>C("replace",k,H),back:k=>(k&&(v=!0),b=!0,t.history.back()),forward:k=>{k&&(v=!0),b=!0,t.history.forward()},go:k=>{y=!0,t.history.go(k)},createHref:k=>c(k),flush:A,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(UO,R,{capture:!0}),t.removeEventListener(BO,T)},onBlocked:()=>{p&&f!==p&&(f=p)},getBlockers:o,setBlockers:l,notifyOnIndexChange:!1});return t.addEventListener(UO,R,{capture:!0}),t.addEventListener(BO,T),t.history.pushState=function(...k){const H=r.apply(t.history,k);return D._ignoreSubscribers||E("PUSH"),H},t.history.replaceState=function(...k){const H=n.apply(t.history,k);return D._ignoreSubscribers||E("REPLACE"),H},D}function x8(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Hh(e,t){const r=x8(e),n=r.indexOf("#"),i=r.indexOf("?"),o=tj();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||{[es]:0,key:o,__TSR_key:o}}}function tj(){return(Math.random()+1).toString(36).substring(7)}function _l(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 b8=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=Vz(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=v8()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let y;this.resolvePathCache=Bc(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=c8(w8(this.latestLocation),y),e8(this)}let c=!1;const h=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==h||l!==f){this.basepath=h;const y=[],g=tR(h);g&&g!=="/"&&y.push(u8({basepath:h})),f&&y.push(f),this.rewrite=y.length===0?void 0:y.length===1?y[0]:l8(y),this.history&&this.updateLatestLocation(),c=!0}c&&this.stores&&this.stores.location.setState(()=>this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((p=window.CSS)==null?void 0:p.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=qz(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&Iz(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:h,search:f,hash:p,href:y,state:g})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(h)){const _=this.options.parseSearch(f),A=this.options.stringifySearch(_);return{href:h+A+p,publicHref:y,pathname:dc(h).path,external:!1,searchStr:A,search:Es(n==null?void 0:n.search,_),hash:dc(p.slice(1)).path,state:qa(n==null?void 0:n.state,g)}}const v=new URL(y,this.origin),b=zx(this.rewrite,v),w=this.options.parseSearch(b.search),N=this.options.stringifySearch(w);return b.search=N,{href:b.href.replace(b.origin,""),publicHref:y,pathname:dc(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:N,search:Es(n==null?void 0:n.search,w),hash:dc(b.hash.slice(1)).path,state:qa(n==null?void 0:n.state,g)}},o=i(r),{__tempLocation:l,__tempKey:c}=o.state;if(l&&(!c||c===this.tempLocationKey)){const h=i(l);return h.state.key=o.state.key,h.state.__TSR_key=o.state.__TSR_key,delete h.state.__tempLocation,{...h,maskedLocation:o}}return o},this.resolvePathWithBase=(r,n)=>Yz({base:r,to:ej(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=>S8({pathname:r,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=r=>{const n=this.getMatch(r);n&&(n.abortController.abort(),clearTimeout(n._nonReactive.pendingTimeout),n._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingMatchesId.state.forEach(r=>{this.cancelMatch(r)}),this.stores.matchesId.state.forEach(r=>{var i;if(this.stores.pendingMatchStoresById.has(r))return;const n=(i=this.stores.activeMatchStoresById.get(r))==null?void 0:i.state;n&&(n.status==="pending"||n.isFetching==="loader")&&this.cancelMatch(r)})},this.buildLocation=r=>{const n=(o={})=>{var k,H;const l=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(l);o.from;const h=o.unsafeRelative==="path"?l.pathname:o.from??c.fullPath,f=this.resolvePathWithBase(h,"."),p=c.search,y=Object.assign(Object.create(null),c.params),g=o.to?this.resolvePathWithBase(f,`${o.to}`):this.resolvePathWithBase(f,"."),v=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?y:Object.assign(y,Qi(o.params,y)),b=this.getMatchedRoutes(g);let w=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(w=[...w,this.options.notFoundRoute]),Object.keys(v).length>0)for(const B of w){const ae=((k=B.options.params)==null?void 0:k.stringify)??B.options.stringifyParams;if(ae)try{Object.assign(v,ae(v))}catch{}}const N=r.leaveParams?g:dc(PO({path:g,params:v,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=p;if(r._includeValidateSearch&&((H=this.options.search)!=null&&H.strict)){const B={};w.forEach(ae=>{if(ae.options.validateSearch)try{Object.assign(B,Th(ae.options.validateSearch,{...B,..._}))}catch{}}),_=B}_=N8({search:_,dest:o,destRoutes:w,_includeValidateSearch:r._includeValidateSearch}),_=Es(p,_);const A=this.options.stringifySearch(_),C=o.hash===!0?l.hash:o.hash?Qi(o.hash,l.hash):void 0,E=C?`#${C}`:"";let T=o.state===!0?l.state:o.state?Qi(o.state,l.state):{};T=qa(l.state,T);const R=`${N}${A}${E}`;let D,M,U=!1;if(this.rewrite){const B=new URL(R,this.origin),ae=rR(this.rewrite,B);D=B.href.replace(B.origin,""),ae.origin!==this.origin?(M=ae.href,U=!0):M=ae.pathname+ae.search+ae.hash}else D=Dz(R),M=D;return{publicHref:M,href:D,pathname:N,search:_,searchStr:A,state:T,hash:C??"",external:U,unmaskOnReload:o.unmaskOnReload}},i=(o={},l)=>{const c=n(o);let h=l?n(l):void 0;if(!h){const f=Object.create(null);if(this.options.routeMasks){const p=$z(c.pathname,this.processedTree);if(p){Object.assign(f,p.rawParams);const{from:y,params:g,...v}=p.route,b=g===!1||g===null?Object.create(null):(g??!0)===!0?f:Object.assign(f,Qi(g,f));l={from:r.from,...v,params:b},h=n(l)}}}return h&&(c.maskedLocation=h),c};return r.mask?i(r,{from:r.from,...r.mask}):i(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:n,...i})=>{const o=()=>{const h=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];h.forEach(p=>{i.state[p]=this.latestLocation.state[p]});const f=Zs(i.state,this.latestLocation.state);return h.forEach(p=>{delete i.state[p]}),f},l=Ji(this.latestLocation.href)===Ji(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Hl(()=>{c==null||c.resolve(),c=void 0}),l&&o())this.load();else{let{maskedLocation:h,hashScrollIntoView:f,...p}=i;h&&(p={...h,state:{...h.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=f??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,...h}={})=>{if(c){const y=this.history.location.state.__TSR_index,g=Hh(c,{__TSR_index:r?y:y+1}),v=new URL(g.pathname,this.origin);h.to=zx(this.rewrite,v).pathname,h.search=this.options.parseSearch(g.search),h.hash=g.hash.slice(1)}const f=this.buildLocation({...h,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const p=this.commitLocation({...f,viewTransition:o,replace:r,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:l});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:r,reloadDocument:n,href:i,publicHref:o,...l})=>{var h,f;let c=!1;if(i)try{new URL(`${i}`),c=!0}catch{}if(c&&!n&&(n=!0),n){if(r!==void 0||!i){const y=this.buildLocation({to:r,...l});i=i??y.publicHref,o=o??y.publicHref}const p=!c&&o?o:i;if(qh(p,this.protocolAllowlist))return Promise.resolve();if(!l.ignoreBlocker){const y=((f=(h=this.history).getBlockers)==null?void 0:f.call(h))??[];for(const g of y)if(g!=null&&g.blockerFn&&await g.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(h=>{this.startTransition(async()=>{var f;try{this.beforeLoad();const p=this.latestLocation,y=this.stores.resolvedLocation.state,g=_l(p,y);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...g}),this.emit({type:"onBeforeLoad",...g}),await $O({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 _,A;let v=null,b=null,w=null,N=null;this.batch(()=>{const C=this.stores.pendingMatchesSnapshot.state,E=C.length,T=this.stores.activeMatchesSnapshot.state;v=E?T.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=E?T.filter(M=>!R.has(M.routeId)):null,w=E?C.filter(M=>!D.has(M.routeId)):null,N=E?C.filter(M=>D.has(M.routeId)):T,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),E&&(this.stores.setActiveMatches(C),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...v.filter(M=>M.status!=="error"&&M.status!=="notFound"&&M.status!=="redirected")]),this.clearExpiredCache())});for(const[C,E]of[[b,"onLeave"],[w,"onEnter"],[N,"onStay"]])if(C)for(const T of C)(A=(_=this.looseRoutesById[T.routeId].options)[E])==null||A.call(_,T)})})}})}catch(p){Ur(p)?(n=p,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):Or(p)&&(i=p);const y=n?n.status:i?404:this.stores.activeMatchesSnapshot.state.some(g=>g.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>y),this.stores.redirect.setState(()=>n)})}this.latestLoadPromise===o&&((f=this.commitLocationPromise)==null||f.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),h()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.activeMatchesSnapshot.state.some(h=>h.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(_l(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(h=>h.filter(f=>f!==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&&qh(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=Uc,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(h=>!l.has(h.id));if(c.length){const h=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...h,...c])}try{return i=await $O({router:this,matches:i,location:n,preload:!0,updateMatch:(h,f)=>{o.has(h)?i=i.map(p=>p.id===h?f(p):p):this.updateMatch(h,f)}}),i}catch(h){if(Ur(h))return h.options.reloadDocument?void 0:await this.preloadRoute({...h.options,_fromLocation:n});Or(h)||console.error(h);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=zz(o.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,l.pathname,this.processedTree);return!c||r.params&&!Zs(c.rawParams,r.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?Zs(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??a8,parseSearch:e.parseSearch??n8,protocolAllowlist:e.protocolAllowlist??Mz}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var y,g;const r=this.getMatchedRoutes(e.pathname),{foundRoute:n,routeParams:i,parsedParams:o}=r;let{matchedRoutes:l}=r,c=!1;(n?n.path!=="/"&&i["**"]:Ji(e.pathname))&&(this.options.notFoundRoute?l=[...l,this.options.notFoundRoute]:c=!0);const h=c?O8(this.options.notFoundMode,l):void 0,f=new Array(l.length),p=new Map;for(const v of this.stores.activeMatchStoresById.values())v.routeId&&p.set(v.routeId,v.state);for(let v=0;v<l.length;v++){const b=l[v],w=f[v-1];let N,_,A;{const ne=(w==null?void 0:w.search)??e.search,$=(w==null?void 0:w._strictSearch)??void 0;try{const L=Th(b.options.validateSearch,{...ne})??void 0;N={...ne,...L},_={...$,...L},A=void 0}catch(L){let W=L;if(L instanceof Kh||(W=new Kh(L.message,{cause:L})),t!=null&&t.throwOnError)throw W;N=ne,_={},A=W}}const C=((g=(y=b.options).loaderDeps)==null?void 0:g.call(y,{search:N}))??"",E=C?JSON.stringify(C):"",{interpolatedPath:T,usedParams:R}=PO({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),D=b.id+T+E,M=this.getMatch(D),U=p.get(b.id),k=(M==null?void 0:M._strictParams)??R;let H;if(!M)try{FO(b,R,o,k)}catch(ne){if(Or(ne)||Ur(ne)?H=ne:H=new j8(ne.message,{cause:ne}),t!=null&&t.throwOnError)throw H}Object.assign(i,k);const B=U?"stay":"enter";let ae;if(M)ae={...M,cause:B,params:(U==null?void 0:U.params)??i,_strictParams:k,search:Es(U?U.search:M.search,N),_strictSearch:_};else{const ne=b.options.loader||b.options.beforeLoad||b.lazyFn||sR(b)?"pending":"success";ae={id:D,ssr:b.options.ssr,index:v,routeId:b.id,params:(U==null?void 0:U.params)??i,_strictParams:k,pathname:T,updatedAt:Date.now(),search:U?Es(U.search,N):N,_strictSearch:_,searchError:void 0,status:ne,isFetching:!1,error:void 0,paramsError:H,__routeContext:void 0,_nonReactive:{loadPromise:Hl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:B,loaderDeps:U?qa(U.loaderDeps,C):C,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||(ae.globalNotFound=h===b.id),ae.searchError=A;const ee=this.getParentContext(w);ae.context={...ee,...ae.__routeContext,...ae.__beforeLoadContext},f[v]=ae}for(let v=0;v<f.length;v++){const b=f[v],w=this.looseRoutesById[b.routeId],N=this.getMatch(b.id),_=p.get(b.routeId);if(b.params=_?Es(_.params,i):i,!N){const A=f[v-1],C=this.getParentContext(A);if(w.options.context){const E={deps:b.loaderDeps,params:b.params,context:C??{},location:e,navigate:T=>this.navigate({...T,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:f,routeId:w.id};b.__routeContext=w.options.context(E)??void 0}b.context={...C,...b.__routeContext,...b.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var p;const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),i=$c(t),o={...e.search};for(const y of t)try{Object.assign(o,Th(y.options.validateSearch,o))}catch{}const l=$c(this.stores.matchesId.state),c=l&&((p=this.stores.activeMatchStoresById.get(l))==null?void 0:p.state),h=c&&c.routeId===i.id&&c.pathname===e.pathname;let f;if(h)f=c.params;else{const y=Object.assign(Object.create(null),r);for(const g of t)try{FO(g,r,n??{},y)}catch{}f=y}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:f}}},Kh=class extends Error{},j8=class extends Error{};function w8(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function Th(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Kh("Async validation not supported");if(r.issues)throw new Kh(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 S8({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),i=Ji(e);let o,l;const c=Bz(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 N8({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return _8(r)(e,t,n??!1)}function _8(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:h})=>{let f=c;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((y,g)=>g(y),c));const p=h(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((y,g)=>g(y),p):p};t.middlewares.push(l)}if(o.options.validateSearch){const l=({search:c,next:h})=>{const f=h(c);if(!t._includeValidateSearch)return f;try{return{...f,...Th(o.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(l)}}const r=({search:o})=>{const l=t.dest;return l.search?l.search===!0?o:Qi(l.search,o):{}};t.middlewares.push(r);const n=(o,l,c)=>{if(o>=c.length)return l;const h=c[o];return h({search:l,next:p=>n(o+1,p,c)})};return function(l,c,h){return t.dest=c,t._includeValidateSearch=h,n(0,l,t.middlewares)}}function O8(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 Js}function FO(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 E8="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 h,f;this.originalIndex=t.originalIndex;const r=this.options,n=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(f=(h=this.options).getParentRoute)==null?void 0:f.call(h),n?this._path=Js:this.parentRoute||Ka();let i=n?Js:r==null?void 0:r.path;i&&i!=="/"&&(i=eR(i));const o=(r==null?void 0:r.id)||i;let l=n?Js:Ah([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),l!=="__root__"&&(l=Ah(["/",l]));const c=l==="__root__"?"/":Ah([this.parentRoute.fullPath,i]);this._path=i,this._id=l,this._fullPath=c,this._to=Ji(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=>o8({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.")}},A8=class extends oR{constructor(e){super(e)}};function C8(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 rj(e){const t=e.errorComponent??nj;return d.jsx(T8,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?S.createElement(t,{error:r,reset:n}):e.children})}var T8=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 nj({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 P8({children:e,fallback:t=null}){return lR()?d.jsx(ql.Fragment,{children:e}):d.jsx(ql.Fragment,{children:t})}function lR(){return ql.useSyncExternalStore(R8,()=>!0,()=>!1)}function R8(){return()=>{}}var uR=S.createContext(null);function gr(e){return S.useContext(uR)}var Wm=S.createContext(void 0),M8=S.createContext(void 0),ht=(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))(ht||{});function D8({update:e,notify:t,unwatched:r}){return{link:n,unlink:i,propagate:o,checkDirty:l,shallowPropagate:c};function n(f,p,y){const g=p.depsTail;if(g!==void 0&&g.dep===f)return;const v=g!==void 0?g.nextDep:p.deps;if(v!==void 0&&v.dep===f){v.version=y,p.depsTail=v;return}const b=f.subsTail;if(b!==void 0&&b.version===y&&b.sub===p)return;const w=p.depsTail=f.subsTail={version:y,dep:f,sub:p,prevDep:g,nextDep:v,prevSub:b,nextSub:void 0};v!==void 0&&(v.prevDep=w),g!==void 0?g.nextDep=w:p.deps=w,b!==void 0?b.nextSub=w:f.subs=w}function i(f,p=f.sub){const y=f.dep,g=f.prevDep,v=f.nextDep,b=f.nextSub,w=f.prevSub;return v!==void 0?v.prevDep=g:p.depsTail=g,g!==void 0?g.nextDep=v:p.deps=v,b!==void 0?b.prevSub=w:y.subsTail=w,w!==void 0?w.nextSub=b:(y.subs=b)===void 0&&r(y),v}function o(f){let p=f.nextSub,y;e:do{const g=f.sub;let v=g.flags;if(v&60?v&12?v&4?!(v&48)&&h(f,g)?(g.flags=v|40,v&=1):v=0:g.flags=v&-9|32:v=0:g.flags=v|32,v&2&&t(g),v&1){const b=g.subs;if(b!==void 0){const w=(f=b).nextSub;w!==void 0&&(y={value:p,prev:y},p=w);continue}}if((f=p)!==void 0){p=f.nextSub;continue}for(;y!==void 0;)if(f=y.value,y=y.prev,f!==void 0){p=f.nextSub;continue e}break}while(!0)}function l(f,p){let y,g=0,v=!1;e:do{const b=f.dep,w=b.flags;if(p.flags&16)v=!0;else if((w&17)===17){if(e(b)){const N=b.subs;N.nextSub!==void 0&&c(N),v=!0}}else if((w&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(y={value:f,prev:y}),f=b.deps,p=b,++g;continue}if(!v){const N=f.nextDep;if(N!==void 0){f=N;continue}}for(;g--;){const N=p.subs,_=N.nextSub!==void 0;if(_?(f=y.value,y=y.prev):f=N,v){if(e(p)){_&&c(N),p=f.sub;continue}v=!1}else p.flags&=-33;p=f.sub;const A=f.nextDep;if(A!==void 0){f=A;continue e}}return v}while(!0)}function c(f){do{const p=f.sub,y=p.flags;(y&48)===32&&(p.flags=y|16,(y&6)===2&&t(p))}while((f=f.nextSub)!==void 0)}function h(f,p){let y=p.depsTail;for(;y!==void 0;){if(y===f)return!0;y=y.prevDep}return!1}}function aj(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 Ux=[];let Ph=0;const{link:HO,unlink:k8,propagate:L8,checkDirty:cR,shallowPropagate:KO}=D8({update(e){return e._update()},notify(e){Ux[qx++]=e,e.flags&=~ht.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ht.Mutable|ht.Dirty,Gh(e))}});let sh=0,qx=0,Jn,Fx=0;function dR(e){try{++Fx,e()}finally{--Fx||fR()}}function Gh(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=k8(r,e)}function fR(){if(!(Fx>0)){for(;sh<qx;){const e=Ux[sh];Ux[sh++]=void 0,e.notify()}sh=0,qx=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?ht.None:ht.Mutable,get(){return Jn!==void 0&&HO(i,Jn,Ph),i._snapshot},subscribe(o){const l=aj(o),c={current:!1},h=I8(()=>{var f;i.get(),c.current?(f=l.next)==null||f.call(l,i._snapshot):c.current=!0});return{unsubscribe:()=>{h.stop()}}},_update(o){const l=Jn,c=Object.is;if(r)Jn=i,++Ph,i.depsTail=void 0;else if(o===void 0)return!1;r&&(i.flags=ht.Mutable|ht.RecursedCheck);try{const h=i._snapshot,f=typeof o=="function"?o(h):o===void 0&&r?n(h):o;return h===void 0||!c(h,f)?(i._snapshot=f,!0):!1}finally{Jn=l,r&&(i.flags&=~ht.RecursedCheck),Gh(i)}}};return r?(i.flags=ht.Mutable|ht.Dirty,i.get=function(){const o=i.flags;if(o&ht.Dirty||o&ht.Pending&&cR(i.deps,i)){if(i._update()){const l=i.subs;l!==void 0&&KO(l)}}else o&ht.Pending&&(i.flags=o&~ht.Pending);return Jn!==void 0&&HO(i,Jn,Ph),i._snapshot}):i.set=function(o){if(i._update(o)){const l=i.subs;l!==void 0&&(L8(l),KO(l),fR())}},i}function I8(e){const t=()=>{const n=Jn;Jn=r,++Ph,r.depsTail=void 0,r.flags=ht.Watching|ht.RecursedCheck;try{return e()}finally{Jn=n,r.flags&=~ht.RecursedCheck,Gh(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ht.Watching|ht.RecursedCheck,notify(){const n=this.flags;n&ht.Dirty||n&ht.Pending&&cR(this.deps,this)?t():this.flags=ht.Watching},stop(){this.flags=ht.None,this.depsTail=void 0,Gh(this)}};return t(),r}class $8{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(aj(t))}}class z8{constructor(t){this.atom=hR(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(aj(t))}}function GO(e){return typeof e=="function"?new z8(e):new $8(e)}var Pv={exports:{}},Rv={},Mv={exports:{}},Dv={};/**
|
|
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 YO;function B8(){if(YO)return Dv;YO=1;var e=iu();function t(y,g){return y===g&&(y!==0||1/y===1/g)||y!==y&&g!==g}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,l=e.useDebugValue;function c(y,g){var v=g(),b=n({inst:{value:v,getSnapshot:g}}),w=b[0].inst,N=b[1];return o(function(){w.value=v,w.getSnapshot=g,h(w)&&N({inst:w})},[y,v,g]),i(function(){return h(w)&&N({inst:w}),y(function(){h(w)&&N({inst:w})})},[y]),l(v),v}function h(y){var g=y.getSnapshot;y=y.value;try{var v=g();return!r(y,v)}catch{return!0}}function f(y,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:c;return Dv.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Dv}var VO;function U8(){return VO||(VO=1,Mv.exports=B8()),Mv.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 QO;function q8(){if(QO)return Rv;QO=1;var e=iu(),t=U8();function r(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,l=e.useEffect,c=e.useMemo,h=e.useDebugValue;return Rv.useSyncExternalStoreWithSelector=function(f,p,y,g,v){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(!A){if(A=!0,C=R,R=g(R),v!==void 0&&w.hasValue){var D=w.value;if(v(D,R))return E=D}return E=R}if(D=E,n(C,R))return D;var M=g(R);return v!==void 0&&v(D,M)?(C=R,D):(C=R,E=M)}var A=!1,C,E,T=y===void 0?null:y;return[function(){return _(p())},T===null?void 0:function(){return _(T())}]},[p,y,g,v]);var N=i(f,b[0],b[1]);return l(function(){w.hasValue=!0,w.value=N},[N]),h(N),N},Rv}var XO;function F8(){return XO||(XO=1,Pv.exports=q8()),Pv.exports}var mR=F8();function H8(e,t){return e===t}function cr(e,t,r=H8){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 K8={state:void 0,get:()=>{},subscribe:()=>()=>{}};function yo(e){const t=gr(),r=S.useContext(e.from?M8:Wm),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??K8,l=>{if((e.shouldThrow??!0)&&!l&&Ka(),l===void 0)return;const c=e.select?e.select(l):l;if(e.structuralSharing??t.options.defaultStructuralSharing){const h=qa(o.current,c);return o.current=h,h}return c})}function pR(e){return yo({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function yR(e){const{select:t,...r}=e;return yo({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function gR(e){return yo({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 yo({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function go(e){const t=gr();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 yo({...e,select:t=>e.select?e.select(t.context):t.context})}var Zm=D2();function G8(e,t){const r=gr(),n=Az(t),{activeProps:i,inactiveProps:o,activeOptions:l,to:c,preload:h,preloadDelay:f,hashScrollIntoView:p,replace:y,startTransition:g,resetScroll:v,viewTransition:b,children:w,target:N,disabled:_,style:A,className:C,onClick:E,onBlur:T,onFocus:R,onMouseEnter:D,onMouseLeave:M,onTouchStart:U,ignoreBlocker:k,params:H,search:B,hash:ae,state:ee,mask:ne,reloadDocument:$,unsafeRelative:L,from:W,_fromLocation:te,...se}=e,I=lR(),Q=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,Re=>Re,(Re,fr)=>Re.href===fr.href),oe=S.useMemo(()=>{const Re={_fromLocation:le,...Q};return r.buildLocation(Re)},[r,le,Q]),fe=oe.maskedLocation?oe.maskedLocation.publicHref:oe.publicHref,xe=oe.maskedLocation?oe.maskedLocation.external:oe.external,Se=S.useMemo(()=>Z8(fe,xe,r.history,_),[_,xe,fe,r.history]),Me=S.useMemo(()=>{if(Se!=null&&Se.external)return qh(Se.href,r.protocolAllowlist)?void 0:Se.href;if(!J8(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),qh(c,r.protocolAllowlist)?void 0:c}catch{}},[c,Se,r.protocolAllowlist]),ce=S.useMemo(()=>{if(Me)return!1;if(l!=null&&l.exact){if(!Gz(le.pathname,oe.pathname,r.basepath))return!1}else{const Re=Fh(le.pathname,r.basepath),fr=Fh(oe.pathname,r.basepath);if(!(Re.startsWith(fr)&&(Re.length===fr.length||Re[fr.length]==="/")))return!1}return((l==null?void 0:l.includeSearch)??!0)&&!Zs(le.search,oe.search,{partial:!(l!=null&&l.exact),ignoreUndefined:!(l!=null&&l.explicitUndefined)})?!1:l!=null&&l.includeHash?I&&le.hash===oe.hash:!0},[l==null?void 0:l.exact,l==null?void 0:l.explicitUndefined,l==null?void 0:l.includeHash,l==null?void 0:l.includeSearch,le,Me,I,oe.hash,oe.pathname,oe.search,r.basepath]),de=ce?Qi(i,{})??Y8:kv,_e=ce?kv:Qi(o,{})??kv,ue=[C,de.className,_e.className].filter(Boolean).join(" "),gt=(A||de.style||_e.style)&&{...A,...de.style,..._e.style},[Pe,vt]=S.useState(!1),xt=S.useRef(!1),Ht=e.reloadDocument||Me?!1:h??r.options.defaultPreload,he=f??r.options.defaultPreloadDelay??0,Ot=S.useCallback(()=>{r.preloadRoute({...Q,_builtLocation:oe}).catch(Re=>{console.warn(Re),console.warn(E8)})},[r,Q,oe]);Ez(n,S.useCallback(Re=>{Re!=null&&Re.isIntersecting&&Ot()},[Ot]),W8,{disabled:!!_||Ht!=="viewport"}),S.useEffect(()=>{xt.current||!_&&Ht==="render"&&(Ot(),xt.current=!0)},[_,Ot,Ht]);const yu=Re=>{const fr=Re.currentTarget.getAttribute("target"),Kn=N!==void 0?N:fr;if(!_&&!e6(Re)&&!Re.defaultPrevented&&(!Kn||Kn==="_self")&&Re.button===0){Re.preventDefault(),Zm.flushSync(()=>{vt(!0)});const $d=r.subscribe("onResolved",()=>{$d(),vt(!1)});r.navigate({...Q,replace:y,resetScroll:v,hashScrollIntoView:p,startTransition:g,viewTransition:b,ignoreBlocker:k})}};if(Me)return{...se,ref:n,href:Me,...w&&{children:w},...N&&{target:N},..._&&{disabled:_},...A&&{style:A},...C&&{className:C},...E&&{onClick:E},...T&&{onBlur:T},...R&&{onFocus:R},...D&&{onMouseEnter:D},...M&&{onMouseLeave:M},...U&&{onTouchStart:U}};const Oo=Re=>{if(_||Ht!=="intent")return;if(!he){Ot();return}const fr=Re.currentTarget;if(pc.has(fr))return;const Kn=setTimeout(()=>{pc.delete(fr),Ot()},he);pc.set(fr,Kn)},ry=Re=>{_||Ht!=="intent"||Ot()},Id=Re=>{if(_||!Ht||!he)return;const fr=Re.currentTarget,Kn=pc.get(fr);Kn&&(clearTimeout(Kn),pc.delete(fr))};return{...se,...de,..._e,href:Se==null?void 0:Se.href,ref:n,onClick:dl([E,yu]),onBlur:dl([T,Id]),onFocus:dl([R,Oo]),onMouseEnter:dl([D,Oo]),onMouseLeave:dl([M,Id]),onTouchStart:dl([U,ry]),disabled:!!_,target:N,...gt&&{style:gt},...ue&&{className:ue},..._&&V8,...ce&&Q8,...I&&Pe&&X8}}var kv={},Y8={className:"active"},V8={role:"link","aria-disabled":!0},Q8={"data-status":"active","aria-current":"page"},X8={"data-transitioning":"transitioning"},pc=new WeakMap,W8={rootMargin:"100px"},dl=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function Z8(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function J8(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}=G8(n,t),l=typeof n.children=="function"?n.children({isActive:o["data-status"]==="active"}):n.children;if(!r){const{disabled:c,...h}=o;return S.createElement("a",h,l)}return S.createElement(r,o,l)});function e6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var t6=class extends oR{constructor(t){super(t),this.useMatch=r=>yo({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=>gR({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>yR({...r,from:this.id}),this.useLoaderData=r=>pR({...r,from:this.id}),this.useNavigate=()=>go({from:this.fullPath}),this.Link=ql.forwardRef((r,n)=>d.jsx(Ee,{ref:n,from:this.fullPath,...r}))}};function r6(e){return new t6(e)}var n6=class extends A8{constructor(e){super(e),this.useMatch=t=>yo({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=>gR({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>yR({...t,from:this.id}),this.useLoaderData=t=>pR({...t,from:this.id}),this.useNavigate=()=>go({from:this.fullPath}),this.Link=ql.forwardRef((t,r)=>d.jsx(Ee,{ref:r,from:this.fullPath,...t}))}};function a6(e){return new n6(e)}function Cr(e){return typeof e=="object"?new WO(e,{silent:!0}).createRoute(e):new WO(e,{silent:!0}).createRoute}var WO=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=r6(r);return n.isRoot=!1,n},this.silent=t==null?void 0:t.silent}};function i6(e){const t=gr(),r=`not-found-${cr(t.stores.location,n=>n.pathname)}-${cr(t.stores.status,n=>n)}`;return d.jsx(rj,{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 s6(){return d.jsx("p",{children:"Not Found"})}function jl(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(s6,{})}function o6(e){return null}function l6(){return o6(gr()),null}var jR=S.memo(function({matchId:t}){const r=gr(),n=r.stores.activeMatchStoresById.get(t);n||Ka();const i=cr(r.stores.loadedAt,l=>l),o=cr(n,l=>l);return d.jsx(u6,{router:r,matchId:t,resetKey:i,matchState:S.useMemo(()=>{var h;const l=o.routeId,c=(h=r.routesById[l].parentRoute)==null?void 0:h.id;return{routeId:l,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:c}},[o._displayPending,o.routeId,o.ssr,r.routesById])})});function u6({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,h=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,p=n.ssr===!1||n.ssr==="data-only",y=(!i.isRoot||i.options.wrapInSuspense||p)&&(i.options.wrapInSuspense??o??(((w=i.options.errorComponent)==null?void 0:w.preload)||p))?S.Suspense:jl,g=c?rj:jl,v=f?i6:jl;return d.jsxs(i.isRoot?i.options.shellComponent??jl:jl,{children:[d.jsx(Wm.Provider,{value:t,children:d.jsx(y,{fallback:l,children:d.jsx(g,{getResetKey:()=>r,errorComponent:c||nj,onCatch:(N,_)=>{if(Or(N))throw N;h==null||h(N,_)},children:d.jsx(v,{fallback:N=>{if(!f||N.routeId&&N.routeId!==n.routeId||!N.routeId&&!i.isRoot)throw N;return S.createElement(f,N)},children:p||n._displayPending?d.jsx(P8,{fallback:l,children:d.jsx(ZO,{matchId:t})}):d.jsx(ZO,{matchId:t})})})})}),n.parentRouteId===Js?d.jsxs(d.Fragment,{children:[d.jsx(c6,{resetKey:r}),e.options.scrollRestoration&&W2?d.jsx(l6,{}):null]}):null]})}function c6({resetKey:e}){const t=gr(),r=S.useRef(void 0);return Ac(()=>{const n=t.latestLocation.href;(r.current===void 0||r.current!==n)&&(t.emit({type:"onRendered",..._l(t.stores.location.state,t.stores.resolvedLocation.state)}),r.current=n)},[t.latestLocation.state.__TSR_key,e,t]),null}var ZO=S.memo(function({matchId:t}){var f,p,y,g;const r=gr(),n=r.stores.activeMatchStoresById.get(t);n||Ka();const i=cr(n,v=>v),o=i.routeId,l=r.routesById[o],c=S.useMemo(()=>{var b;const v=(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 v?JSON.stringify(v):void 0},[o,i.loaderDeps,i._strictParams,i._strictSearch,r.options.defaultRemountDeps,r.routesById]),h=S.useMemo(()=>{const v=l.options.component??r.options.defaultComponent;return v?d.jsx(v,{},c):d.jsx(wR,{})},[c,l.options.component,r.options.defaultComponent]);if(i._displayPending)throw(f=r.getMatch(i.id))==null?void 0:f._nonReactive.displayPendingPromise;if(i._forcePending)throw(p=r.getMatch(i.id))==null?void 0:p._nonReactive.minPendingPromise;if(i.status==="pending"){const v=l.options.pendingMinMs??r.options.defaultPendingMinMs;if(v){const b=r.getMatch(i.id);if(b&&!b._nonReactive.minPendingPromise){const w=Hl();b._nonReactive.minPendingPromise=w,setTimeout(()=>{w.resolve(),b._nonReactive.minPendingPromise=void 0},v)}}throw(y=r.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise}if(i.status==="notFound")return Or(i.error)||Ka(),bR(r,l,i.error);if(i.status==="redirected")throw Ur(i.error)||Ka(),(g=r.getMatch(i.id))==null?void 0:g._nonReactive.loadPromise;if(i.status==="error")throw i.error;return h}),wR=S.memo(function(){const t=gr(),r=S.useContext(Wm);let n,i=!1,o;{const f=r?t.stores.activeMatchStoresById.get(r):void 0;[n,i]=cr(f,p=>[p==null?void 0:p.routeId,(p==null?void 0:p.globalNotFound)??!1]),o=cr(t.stores.matchesId,p=>p[p.findIndex(y=>y===r)+1])}const l=n?t.routesById[n]:void 0,c=t.options.defaultPendingComponent?d.jsx(t.options.defaultPendingComponent,{}):null;if(i)return l||Ka(),bR(t,l,void 0);if(!o)return null;const h=d.jsx(jR,{matchId:o});return n===Js?d.jsx(S.Suspense,{fallback:c,children:h}):h});function d6(){const e=gr(),t=S.useRef({router:e,mounted:!1}),[r,n]=S.useState(!1),i=cr(e.stores.isLoading,y=>y),o=cr(e.stores.hasPendingMatches,y=>y),l=Sv(i),c=i||r||o,h=Sv(c),f=i||o,p=Sv(f);return e.startTransition=y=>{n(!0),S.startTransition(()=>{y(),n(!1)})},S.useEffect(()=>{const y=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ji(e.latestLocation.publicHref)!==Ji(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{y()}},[e,e.history]),Ac(()=>{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(g){console.error(g)}})()},[e]),Ac(()=>{l&&!i&&e.emit({type:"onLoad",..._l(e.stores.location.state,e.stores.resolvedLocation.state)})},[l,e,i]),Ac(()=>{p&&!f&&e.emit({type:"onBeforeRouteMount",..._l(e.stores.location.state,e.stores.resolvedLocation.state)})},[f,p,e]),Ac(()=>{if(h&&!c){const y=_l(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...y}),dR(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),y.hrefChanged&&C8(e)}},[c,h,e]),null}function f6(){const e=gr(),t=e.routesById[Js].options.pendingComponent??e.options.defaultPendingComponent,r=t?d.jsx(t,{}):null,n=d.jsxs(typeof document<"u"&&e.ssr?jl:S.Suspense,{fallback:r,children:[d.jsx(d6,{}),d.jsx(h6,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:n}):n}function h6(){const e=gr(),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(Wm.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:d.jsx(rj,{getResetKey:()=>r,errorComponent:nj,onCatch:void 0,children:n})})}function m6(){const e=gr();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 p6(e){const t=gr(),r=S.useRef(void 0);return cr(t.stores.activeMatchesSnapshot,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=qa(r.current,i);return r.current=o,o}return i})}var y6=e=>({createMutableStore:GO,createReadonlyStore:GO,batch:dR}),g6=e=>new v6(e),v6=class extends b8{constructor(e){super(e,y6)}};function x6({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 b6({router:e,...t}){return d.jsx(x6,{router:e,...t,children:d.jsx(f6,{})})}function ij(e){const r=gr();return S.useRef(void 0),cr(r.stores.__store,n=>n)}function SR(e){const t=gr(),r=S.useRef(void 0);return cr(t.stores.location,n=>{const i=n;if(t.options.defaultStructuralSharing){const o=qa(r.current,i);return r.current=o,o}return i})}const NR=S.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function j6({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(NR.Provider,{value:o,children:e})}function _R(){return S.useContext(NR)}function w6(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 OR(e){if(!e)return;const t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toLocaleString()}function S6(e){const t=OR(e);return t?`Last synced ${t}`:"Never synced"}function sj(e){return typeof e!="number"||!Number.isFinite(e)?"Remote runs unknown":`${e} remote run${e===1?"":"s"}`}function ER(e,t,r){const n=r?` (${r})`:"";return`${e} of ${t} run${t===1?"":"s"} on remote${n}`}function N6(e,t,r){return(e==null?void 0:e.configured)!==!0?[]:[t?`Project: ${t}`:void 0,r??sj(e.run_count),S6(e.last_synced_at),e.repo?`Repo: ${e.repo}`:void 0].filter(n=>n!==void 0)}function _6(e){return(e==null?void 0:e.sync_status)==="syncing"}function O6(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=w6(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 Metadata",tone:"warn",summary:e.block_reason??"Local result metadata has pending edits.",nextAction:e.auto_push===!0?"Sync Project will commit safe result metadata changes before syncing.":"Review or commit the pending result metadata; no reset will be performed.",canSync:!0}:r==="behind"?{state:"behind",label:"Behind",actionLabel:"Sync Project",tone:"info",summary:`Remote has ${e.behind??0} commit${e.behind===1?"":"s"} to pull.`,nextAction:"Sync Project will fast-forward when possible.",canSync:!0}:r==="ahead"?{state:"ahead",label:"Ahead",actionLabel:"Push Results",tone:"info",summary:`Local results are ${e.ahead??0} commit${e.ahead===1?"":"s"} ahead.`,nextAction:e.auto_push===!0?"Sync Project will push safe result changes.":"Enable auto_push or push the results repo manually.",canSync:!0}:{state:"clean",label:"Clean",actionLabel:"Sync Project",tone:"good",summary:"Local and remote result metadata are in sync.",canSync:!0}}function E6(e){return typeof e!="number"||!Number.isFinite(e)?"remote results":sj(e)}function JO(e){const t=[`Synced ${E6(e.run_count)}`];e.repo&&t.push(`from ${e.repo}`);const r=OR(e.last_synced_at);return r&&t.push(`at ${r}`),`${t.join(" ")}.`}function A6(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 ${sj(t)} ${t===1?"remains":"remain"} available.`:"The remote results cache remains available."}function oj(e){return[A6(e),"Resolve the results repo issue, then sync remote results again."].filter(t=>t!==void 0).join(" ")}function Yh(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}. ${oj(e)}`}}const t=[e.commit_created?"committed pending metadata":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?`${JO(e)} Sync completed: ${t.join(", ")}.`:`${JO(e)} Project results were already up to date.`}}function Vh(e,t){return{kind:"error",message:`Sync failed: ${e instanceof Error?e.message:String(e)}. ${oj(t)}`}}async function Ye(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function C6(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 T6=50;function AR(e,t){const r=new URLSearchParams({limit:String(T6)});return t&&r.set("cursor",t),`${e}?${r.toString()}`}function CR(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 eE(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("artifact_dir",e),t}function ia(e){const t=e.projectId?`${it(e.projectId)}/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${eE(e.filePath)}`:`/api/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${eE(e.filePath)}`,r=hd(e.artifactDir);return e.raw&&r.set("raw","1"),e.download&&r.set("download","1"),fd(t,r)}const lj={queryKey:["runs"],queryFn:()=>Ye("/api/runs"),refetchInterval:5e3},P6={queryKey:["runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:e})=>Ye(AR("/api/runs",e)),getNextPageParam:e=>e.next_cursor,refetchInterval:5e3};function R6(e){return{queryKey:["runs",e],queryFn:()=>Ye(`/api/runs/${encodeURIComponent(e)}`),enabled:!!e}}function M6(e,t){const r=t?`${it(t)}/runs/${encodeURIComponent(e)}/log`:`/api/runs/${encodeURIComponent(e)}/log`;return{queryKey:["runs",e,"log",t??""],queryFn:()=>C6(r),enabled:!!e,refetchInterval:3e3}}function D6(e,t){return qe(M6(e,t))}function k6(e){const t=e?`${it(e)}/feedback`:"/api/feedback";return{queryKey:["feedback",e??""],queryFn:()=>Ye(t)}}const TR={queryKey:["experiments"],queryFn:()=>Ye("/api/experiments")};function L6(e){return{queryKey:["compare","baseline",e??""],queryFn:()=>Ye(`/api/compare?baseline=${encodeURIComponent(e??"")}`),enabled:!!e}}const I6={queryKey:["compare"],queryFn:()=>Ye("/api/compare")},$6={queryKey:["targets"],queryFn:()=>Ye("/api/targets")};function z6(e,t,r){const n=`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/files`;return{queryKey:["runs",e,"evals",t,r??"","files"],queryFn:()=>Ye(fd(n,hd(r))),enabled:!!e&&!!t}}function B6(e,t,r,n){return{queryKey:["runs",e,"evals",t,n??"","files",r],queryFn:()=>Ye(ia({runId:e,evalId:t,filePath:r,artifactDir:n})),enabled:!!e&&!!t&&!!r}}function U6(e,t,r){const n=`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/transcript`;return{queryKey:["runs",e,"evals",t,r??"","transcript"],queryFn:()=>Ye(fd(n,hd(r))),enabled:!!e&&!!t}}function q6(e,t){return{queryKey:["runs",e,"categories",t,"suites"],queryFn:()=>Ye(`/api/runs/${encodeURIComponent(e)}/categories/${encodeURIComponent(t)}/suites`),enabled:!!e&&!!t}}const F6={queryKey:["config"],queryFn:()=>Ye("/api/config"),staleTime:5e3};function qc(e){const t=e?`${it(e)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",e??""],queryFn:()=>Ye(t),staleTime:5e3,refetchInterval:r=>_6(r.state.data)?1e3:!1}}function H6(){return qe(lj)}function K6(){var t;const e=X2(P6);return{...e,data:CR((t=e.data)==null?void 0:t.pages)}}function md(e){return qe(R6(e))}function PR(e){return qe(k6(e))}function RR(){return qe(TR)}function G6(){return qe(I6)}function Y6(e,t,r){return qe(z6(e,t,r))}function Qh(e,t,r,n){return qe(B6(e,t,r,n))}function V6(e,t,r){return qe(U6(e,t,r))}function MR(e,t){return qe(q6(e,t))}function yt(e){return qe(e?sB(e):F6)}function Jm(e){return qe(qc(e))}const Fc=.8,ep="agentv";function io(e,t=Fc){return e>=t}const Q6={queryKey:["projects"],queryFn:()=>Ye("/api/projects"),refetchInterval:1e4};function pd(){return qe(Q6)}async function X6(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 W6(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})});if(!t.ok){const n=await t.json();throw new Error(n.error||`Failed to add project: ${t.status}`)}const r=await t.json();return{id:r.id,name:r.name,path:r.path,addedAt:r.added_at,lastOpenedAt:r.last_opened_at}}async function Z6(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 it(e){return`/api/projects/${encodeURIComponent(e)}`}function uj(e){return{queryKey:["projects",e,"runs"],queryFn:()=>Ye(`${it(e)}/runs`),enabled:!!e,refetchInterval:5e3}}function J6(e){return{queryKey:["projects",e,"runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:t})=>Ye(AR(`${it(e)}/runs`,t)),getNextPageParam:t=>t.next_cursor,enabled:!!e,refetchInterval:5e3}}function eB(e){return qe(uj(e))}function tB(e){var r;const t=X2(J6(e));return{...t,data:CR((r=t.data)==null?void 0:r.pages)}}function rB(e,t){return{queryKey:["projects",e,"runs",t],queryFn:()=>Ye(`${it(e)}/runs/${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function yd(e,t){return qe(rB(e,t))}function DR(e,t,r){return{queryKey:["projects",e,"runs",t,"categories",r,"suites"],queryFn:()=>Ye(`${it(e)}/runs/${encodeURIComponent(t)}/categories/${encodeURIComponent(r)}/suites`),enabled:!!e&&!!t&&!!r}}function nB(e,t,r,n){const i=`${it(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/files`;return{queryKey:["projects",e,"runs",t,"evals",r,n??"","files"],queryFn:()=>Ye(fd(i,hd(n))),enabled:!!e&&!!t&&!!r}}function Xh(e,t,r,n,i){return{queryKey:["projects",e,"runs",t,"evals",r,i??"","files",n],queryFn:()=>Ye(ia({projectId:e,runId:t,evalId:r,filePath:n,artifactDir:i})),enabled:!!e&&!!t&&!!r&&!!n}}function aB(e,t,r,n){const i=`${it(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/transcript`;return{queryKey:["projects",e,"runs",t,"evals",r,n??"","transcript"],queryFn:()=>Ye(fd(i,hd(n))),enabled:!!e&&!!t&&!!r}}function cj(e){return{queryKey:["projects",e,"experiments"],queryFn:()=>Ye(`${it(e)}/experiments`),enabled:!!e}}function kR(e,t){const r=`${it(e)}/compare`;return t?{queryKey:["projects",e,"compare","baseline",t],queryFn:()=>Ye(`${r}?baseline=${encodeURIComponent(t)}`),enabled:!!e}:{queryKey:["projects",e,"compare"],queryFn:()=>Ye(r),enabled:!!e}}function iB(e){return{queryKey:["projects",e,"targets"],queryFn:()=>Ye(`${it(e)}/targets`),enabled:!!e}}function sB(e){return{queryKey:["projects",e,"config"],queryFn:()=>Ye(`${it(e)}/config`),enabled:!!e,staleTime:5e3}}async function LR(e){const t=e?`${it(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 IR(e){const t=e?`${it(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 $R extends Error{constructor(t,r,n=[]){super(t),this.status=r,this.duplicates=n,this.name="CombineRunsApiError"}}async function tE(e,t,r,n,i){const o=r?`${it(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 $R(c.error??`Failed to combine runs: ${l.status}`,l.status,c.duplicates??[])}return l.json()}async function oB(e,t){const r=t?`${it(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 lB(e,t,r,n){const i=r?`${it(r)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,o=await fetch(i,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:t,...n?{expected_tag_revision:n}:{}})});if(!o.ok){const l=await o.json().catch(()=>({error:o.statusText}));throw new Error(l.error??`Failed to save tags: ${o.status}`)}return o.json()}async function uB(e,t,r){const n=t?`${it(t)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,i=await fetch(n,{method:"DELETE",...r?{headers:{"Content-Type":"application/json"},body:JSON.stringify({expected_tag_revision:r})}:{}});if(!i.ok){const o=await i.json().catch(()=>({error:i.statusText}));throw new Error(o.error??`Failed to delete tags: ${i.status}`)}}async function cB(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 dB(e){const t=e?`${it(e)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",e??""],queryFn:()=>Ye(t),staleTime:3e4}}function fB(e){return qe(dB(e))}function hB(e){const t=e?`${it(e)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",e??""],queryFn:()=>Ye(t),staleTime:3e4}}function mB(e){return qe(hB(e))}async function zR(e,t){const r=t?`${it(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 pB(e,t){const r=t?`${it(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 yB(e,t){const r=t?`${it(t)}/eval/status/${e}`:`/api/eval/status/${e}`;return{queryKey:["eval-status",t??"",e],queryFn:()=>Ye(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 dj(e,t){return qe(yB(e,t))}function gB(e){const t=e?`${it(e)}/eval/runs`:"/api/eval/runs";return{queryKey:["eval-runs",e??""],queryFn:()=>Ye(t),refetchInterval:3e3}}function fj(e){return qe(gB(e))}async function vB(e,t){const r=t?`${it(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 xB(e){return`agentv.studio.initial-project-redirect:${e}`}function hj(e,t){const r=`/projects/${encodeURIComponent(e)}`;return t?`${r}?tab=${encodeURIComponent(t)}`:r}function Ri(e,t){return t?`/projects/${encodeURIComponent(t)}/runs/${encodeURIComponent(e)}`:`/runs/${encodeURIComponent(e)}`}function rE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`:`/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function nE(e,t){return t?`/projects/${encodeURIComponent(t)}/experiments/${encodeURIComponent(e)}`:`/experiments/${encodeURIComponent(e)}`}function aE(e,t){return t?`/projects/${encodeURIComponent(t)}/jobs/${encodeURIComponent(e)}`:`/jobs/${encodeURIComponent(e)}`}function iE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`}function sE(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`}function bB(e){return e?hj(e,"runs"):"/?tab=runs"}function jB(e,t,r=!1){if(!r)return t&&e.includes(t)?t:void 0}function wB(e,t,r,n){return t===!1?{kind:"single-project-home"}:r&&e.includes(r)?{kind:"redirect",redirectPath:hj(r,n)}:{kind:"dashboard"}}function BR(e,t){var n,i;return((i=(n=t==null?void 0:t.find(o=>o.id===e))==null?void 0:n.name)==null?void 0:i.trim())||e}function sr(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 SB(e,t=[]){const r=[];for(let n=1;n<e.length;n++){const i=e[n],o=i.routeId??i.id,l=i.params;if(!(o==="/"||o==="/_layout")){if(o.includes("/projects/$projectId")&&l.projectId){const c=BR(l.projectId,t),h=hj(l.projectId);if(r.some(f=>f.to===h)||r.push({label:c,to:h}),o==="/projects/$projectId")continue}o.includes("/projects/$projectId_/jobs/$runId")?r.some(c=>c.label===sr(l.runId))||r.push({label:sr(l.runId),to:aE(l.runId,l.projectId)}):o.includes("/projects/$projectId_/runs/$runId/category/$category")?(r.some(c=>c.label===sr(l.runId))||r.push({label:sr(l.runId),to:Ri(l.runId,l.projectId)}),r.push({label:l.category??"Category",to:iE(l.runId,l.category??"Category",l.projectId)})):o.includes("/projects/$projectId_/runs/$runId/suite/$suite")?(r.some(c=>c.label===sr(l.runId))||r.push({label:sr(l.runId),to:Ri(l.runId,l.projectId)}),r.push({label:l.suite??"Suite",to:sE(l.runId,l.suite??"Suite",l.projectId)})):o.includes("/projects/$projectId_/runs/$runId")?r.push({label:sr(l.runId),to:Ri(l.runId,l.projectId)}):o.includes("/projects/$projectId_/evals/$runId/$evalId")?(r.some(c=>c.label===sr(l.runId))||r.push({label:sr(l.runId),to:Ri(l.runId,l.projectId)}),r.push({label:l.evalId??"Eval",to:rE(l.runId,l.evalId??"Eval",l.projectId)})):o.includes("/projects/$projectId_/experiments/$experimentName")?r.push({label:l.experimentName??"Experiment",to:nE(l.experimentName??"Experiment",l.projectId)}):o.includes("/runs/$runId/category/$category")?(r.some(c=>c.label===sr(l.runId))||r.push({label:sr(l.runId),to:Ri(l.runId)}),r.push({label:l.category??"Category",to:iE(l.runId,l.category??"Category")})):o.includes("/runs/$runId/suite/$suite")?(r.some(c=>c.label===sr(l.runId))||r.push({label:sr(l.runId),to:Ri(l.runId)}),r.push({label:l.suite??"Suite",to:sE(l.runId,l.suite??"Suite")})):o.includes("/jobs/$runId")?r.push({label:sr(l.runId),to:aE(l.runId)}):o.includes("/runs/$runId")?r.push({label:sr(l.runId),to:Ri(l.runId)}):o.includes("/evals/$runId/$evalId")?(r.some(c=>c.label===sr(l.runId))||r.push({label:sr(l.runId),to:Ri(l.runId)}),r.push({label:l.evalId??"Eval",to:rE(l.runId,l.evalId??"Eval")})):o.includes("/experiments/$experimentName")?r.push({label:l.experimentName??"Experiment",to:nE(l.experimentName??"Experiment")}):o==="/settings"&&r.push({label:"Settings",to:"/settings"})}}return r}function NB(){const e=p6(),{toggle:t}=_R(),{data:r}=pd(),n=SB(e,r==null?void 0:r.projects),i=n.length>0;return d.jsxs("nav",{"aria-label":"Breadcrumb",className:"flex min-h-12 min-w-0 items-center gap-2 border-b border-gray-800 bg-gray-950 px-4 py-2 text-sm md:px-6",children:[d.jsx("button",{type:"button",onClick:t,className:"shrink-0 text-gray-400 hover:text-gray-200 md:hidden","aria-label":"Toggle navigation",children:d.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",role:"img","aria-label":"Toggle navigation",children:[d.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),d.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),d.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[i?d.jsx(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"}),n.map((o,l)=>{const c=l===n.length-1;return d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:"shrink-0 text-gray-600",children:">"}),c?d.jsx("span",{className:"min-w-0 truncate text-gray-400",children:o.label}):d.jsx(Ee,{to:o.to??"/",className:"min-w-0 truncate text-cyan-400 hover:text-cyan-300 hover:underline",children:o.label})]},`${o.label}-${l}`)})]})]})}function UR(e){return e&&e!=="default"?e:void 0}function _B(e,t){const r=[UR(t==null?void 0:t.experiment),t==null?void 0:t.target].filter(n=>!!n);return r.length>0?r.join(" · "):e}function Hc(e){const t=e==null?void 0:e.trim();return t||void 0}function qR(e){const t=e.results[0],r=Hc(e.sourceLabel),n=e.source==="remote",i=n&&r?r:_B(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,UR(t==null?void 0:t.experiment),o,n?void 0:e.source].filter(f=>!!f),c=Hc(e.remoteRepo),h=[];return n&&(r&&r!==i&&h.push({label:"Source",value:r}),c&&h.push({label:"Repo",value:c})),{heading:i,meta:l.join(" · "),...n&&{sourceBadge:"Remote"},...r&&{sourceLabel:r},sourceContext:h}}function OB(e){const t=e.replace(/\\/g,"/");return t==="."||t===".."||t.startsWith("./")||t.startsWith("../")||t.startsWith("/")||/^[A-Za-z]:\//.test(t)||t.includes("/../")||t.includes("/./")}function EB(e){var r;return((r=e.split(/[\\/]+/).filter(n=>n&&n!=="."&&n!=="..").at(-1))==null?void 0:r.trim())||void 0}function AB(e){const t=Hc(e)??"Uncategorized";return OB(t)?{label:EB(t)??"Uncategorized",mutedLabel:t}:{label:t}}function CB(e){return e.replace(/\.eval\.(ya?ml|json|jsonl)$/i,"").replace(/\.(ya?ml|json|jsonl)$/i,"")}function TB(e){const t=Hc(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("/")?CB(n):t)||t,title:t}}function FR(e){const t=e.map(n=>Hc(n.suite)??"");return t.filter(n=>n&&n!=="Uncategorized").length>0&&new Set(t).size>1}const Wh="remote::";function HR(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 Ga(e){const t=e==null?void 0:e.trim();return t||void 0}function PB(e){const t=Ga(e);return t&&t!=="default"&&t!=="-"?t:void 0}function KR(e){let t=e.trim();return t.startsWith(Wh)&&(t=t.slice(Wh.length)),t.replace(/\.(jsonl|json)$/i,"")}function RB(e){const r=KR(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,h,f="000"]=r,p=new Date(`${n}-${i}-${o}T${l}:${c}:${h}.${f}Z`);return Number.isNaN(p.getTime())?void 0:p}function mj(e,t){const r=Ga(e);return r?RB(r)?!0:KR(r)===HR(t):!1}function MB(e,t){const r=Ga(e);if(!r)return;const n=r.startsWith(Wh)?r.slice(Wh.length):r,i=n.lastIndexOf("::");if(i!==-1){const o=n.slice(i+2);if(mj(o,t))return Ga(n.slice(0,i))}return n}function DB(e){return[Ga(e.display_name),Ga(e.title),MB(e.filename,e.timestamp)].find(r=>!!r&&!mj(r,e.timestamp))}function kB(e){return`${Math.round(e*100)}%`}function LB(e,t){const r=[t],n=Ga(e.filename),i=Ga(e.display_name),o=Ga(e.title);return n&&n!==t&&r.push(`Run ID: ${n}`),i&&i!==n&&i!==t&&r.push(`Display name: ${i}`),o&&o!==i&&o!==n&&o!==t&&r.push(`Title: ${o}`),r.push(`Timestamp: ${e.timestamp}`),r.join(`
|
|
66
|
-
`)}function pj(e,t={}){const r=HR(e.timestamp),n=PB(e.experiment),i=DB(e),o=n&&!mj(n,e.timestamp)?n:void 0,l=i??o??r,c=t.includePassRate??!0,h=[];l!==r&&h.push(r),e.target&&e.target!==l&&h.push(e.target),n&&n!==l&&h.push(n),c&&h.push(kB(e.pass_rate));const f=h.join(" · "),p=f?`${l} · ${f}`:l;return{primary:l,secondary:f,label:p,title:LB(e,p)}}function yj({appName:e}){return e!==ep?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 IB({suite:e,className:t=""}){const r=TB(e);return r?d.jsx("span",{className:`inline-flex max-w-full shrink-0 items-center rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300 ${t}`,title:r.title,children:d.jsx("span",{className:"truncate",children:r.label})}):null}function qn({children:e}){const{isOpen:t,close:r}=_R(),i=SR().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 ya({projectId:e}){const{data:t}=yt(e),r=(t==null?void 0:t.app_name)??ep;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 GR({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 YR({result:e,passThreshold:t,showSuiteLabel:r}){const n=io(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(IB,{suite:e.suite,className:"mt-1 max-w-full text-[11px] leading-4"}):null]})]})}const oE=[{id:"runs",label:"Recent Runs",description:"Run review"},{id:"experiments",label:"Experiments",description:"Grouped runs"},{id:"analytics",label:"Analytics",description:"Compare scores"},{id:"targets",label:"Targets",description:"Target results"}];function Lv(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 lE({projectId:e}){const t=SR(),{data:r}=pd(),n=(r==null?void 0:r.projects)??[],i=t.search,o=oE.some(c=>c.id===i.tab)?i.tab:"runs",l=!e&&n.length===0;return d.jsxs(qn,{children:[d.jsx(ya,{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:Lv(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:Lv(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"}),oE.map(c=>d.jsxs(Ee,{to:"/",search:{tab:c.id},className:Lv(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 $B(){const e=m6(),t=e({to:"/projects/$projectId/evals/$runId/$evalId",fuzzy:!0}),r=e({to:"/projects/$projectId/runs/$runId",fuzzy:!0}),n=e({to:"/projects/$projectId/experiments/$experimentName",fuzzy:!0}),i=e({to:"/projects/$projectId/runs/$runId/category/$category",fuzzy:!0}),o=e({to:"/projects/$projectId/runs/$runId/suite/$suite",fuzzy:!0}),l=e({to:"/projects/$projectId/jobs/$runId",fuzzy:!0}),c=e({to:"/projects/$projectId",fuzzy:!0});if(t&&typeof t=="object"&&"projectId"in t){const{projectId:v,runId:b,evalId:w}=t;return d.jsx(FB,{projectId:v,runId:b,currentEvalId:w})}if(i&&typeof i=="object"&&"projectId"in i){const{projectId:v,runId:b,category:w}=i;return d.jsx(KB,{projectId:v,runId:b,category:w})}if(o&&typeof o=="object"&&"projectId"in o){const{projectId:v,runId:b,suite:w}=o;return d.jsx(HB,{projectId:v,runId:b,suite:w})}if(r&&typeof r=="object"&&"projectId"in r){const{projectId:v,runId:b}=r;return d.jsx(uE,{projectId:v,currentRunId:b})}if(l&&typeof l=="object"&&"projectId"in l){const{projectId:v}=l;return d.jsx(uE,{projectId:v})}if(n&&typeof n=="object"&&"projectId"in n){const{projectId:v,experimentName:b}=n;return d.jsx(GB,{projectId:v,currentExperiment:b})}if(c&&typeof c=="object"&&"projectId"in c){const{projectId:v}=c;return d.jsx(lE,{projectId:v})}const h=e({to:"/runs/$runId",fuzzy:!0}),f=e({to:"/evals/$runId/$evalId",fuzzy:!0}),p=e({to:"/runs/$runId/category/$category",fuzzy:!0}),y=e({to:"/runs/$runId/suite/$suite",fuzzy:!0}),g=e({to:"/experiments/$experimentName",fuzzy:!0});if(p&&typeof p=="object"&&"runId"in p){const{runId:v,category:b}=p;return d.jsx(qB,{runId:v,category:b})}if(y&&typeof y=="object"&&"runId"in y){const{runId:v,suite:b}=y;return d.jsx(UB,{runId:v,suite:b})}if(f&&typeof f=="object"&&"runId"in f){const{runId:v,evalId:b}=f;return d.jsx(BB,{runId:v,currentEvalId:b})}if(g&&typeof g=="object"&&"experimentName"in g){const{experimentName:v}=g;return d.jsx(YB,{currentExperiment:v})}if(h&&typeof h=="object"&&"runId"in h){const{runId:v}=h;return d.jsx(zB,{currentRunId:v})}return d.jsx(lE,{})}function zB({currentRunId:e}){const{data:t}=H6(),{data:r}=yt(),{data:n}=fj(),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)??ep})}),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=pj(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(GR,{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 BB({runId:e,currentEvalId:t}){const{data:r}=md(e),{data:n}=yt(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,o=FR((r==null?void 0:r.results)??[]);return d.jsxs(qn,{children:[d.jsx(ya,{}),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(l=>{const c=l.testId===t;return d.jsx(Ee,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:l.testId},className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${c?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(YR,{result:l,passThreshold:i,showSuiteLabel:o})},l.testId)})]})]})}function UB({runId:e,suite:t}){const{data:r}=md(e),{data:n}=yt(),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(ya,{}),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=io(l.score,i);return d.jsxs(Ee,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:l.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[d.jsx("span",{className:`text-xs ${c?"text-emerald-400":"text-red-400"}`,children:c?"✓":"✗"}),d.jsx("span",{className:"truncate",children:l.testId})]},l.testId)})]})]})}function qB({runId:e,category:t}){const{data:r}=MR(e,t),n=(r==null?void 0:r.suites)??[];return d.jsxs(qn,{children:[d.jsx(ya,{}),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 uE({projectId:e,currentRunId:t}){const{data:r}=eB(e);return d.jsxs(qn,{children:[d.jsx(ya,{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=pj(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(GR,{display:i})},n.filename)})]})]})}function FB({projectId:e,runId:t,currentEvalId:r}){const{data:n}=yd(e,t),{data:i}=yt(e),o=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,l=FR((n==null?void 0:n.results)??[]);return d.jsxs(qn,{children:[d.jsx(ya,{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(c=>{const h=c.testId===r;return d.jsx(Ee,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},className:`mb-0.5 flex items-start gap-2 rounded-md px-2 py-1.5 text-sm transition-colors ${h?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:d.jsx(YR,{result:c,passThreshold:o,showSuiteLabel:l})},c.testId)})]})]})}function HB({projectId:e,runId:t,suite:r}){const{data:n}=yd(e,t),{data:i}=yt(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(ya,{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 h=io(c.score,o);return d.jsxs(Ee,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:c.testId},className:"mb-0.5 flex items-center gap-2 rounded-md px-2 py-1.5 text-sm text-gray-400 transition-colors hover:bg-gray-800/50 hover:text-gray-200",children:[d.jsx("span",{className:`text-xs ${h?"text-emerald-400":"text-red-400"}`,children:h?"✓":"✗"}),d.jsx("span",{className:"truncate",children:c.testId})]},c.testId)})]})]})}function KB({projectId:e,runId:t,category:r}){const{data:n}=qe(DR(e,t,r)),i=(n==null?void 0:n.suites)??[];return d.jsxs(qn,{children:[d.jsx(ya,{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 GB({projectId:e,currentExperiment:t}){const{data:r}=qe(cj(e)),n=(r==null?void 0:r.experiments)??[];return d.jsxs(qn,{children:[d.jsx(ya,{projectId:e}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(Ee,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),n.map(i=>{const o=i.name===t;return d.jsx(Ee,{to:"/projects/$projectId/experiments/$experimentName",params:{projectId:e,experimentName:i.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:i.name},i.name)})]})]})}function YB({currentExperiment:e}){const{data:t}=RR(),r=(t==null?void 0:t.experiments)??[];return d.jsxs(qn,{children:[d.jsx(ya,{}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(Ee,{to:"/",search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"})}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Experiments"}),r.map(n=>{const i=n.name===e;return d.jsx(Ee,{to:"/experiments/$experimentName",params:{experimentName:n.name},className:`mb-0.5 block truncate rounded-md px-2 py-1.5 text-sm transition-colors ${i?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`,children:n.name},n.name)})]})]})}function VB(){return d.jsx(j6,{children:d.jsx(QB,{})})}function QB(){return d.jsxs("div",{className:"flex h-screen overflow-hidden",children:[d.jsx($B,{}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[d.jsx(NB,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(wR,{})})]})]})}const vr=a6({component:VB}),XB=Cr("/settings")({component:WB});function WB(){const{data:e,isLoading:t}=yt(),r=pa(),[n,i]=S.useState(""),[o,l]=S.useState(!1),[c,h]=S.useState(null),f=(e==null?void 0:e.threshold)??Fc,p=n||String(f),y=(e==null?void 0:e.read_only)===!0,g=(e==null?void 0:e.app_name)??ep,v=async()=>{const b=Number.parseFloat(n||String(f));if(Number.isNaN(b)||b<0||b>1){h({type:"error",text:"Threshold must be a number between 0 and 1"});return}l(!0),h(null);try{await cB({threshold:b}),await r.invalidateQueries({queryKey:["config"]}),i(""),h({type:"success",text:"Settings saved"}),setTimeout(()=>h(null),3e3)}catch{h({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:g})]})]}),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: ",Fc]}),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:y,className:"w-32 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"}),d.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(p)||0)*100),"%)"]})]})]})}),d.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!y&&d.jsx("button",{type:"button",onClick:v,disabled:o,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-cyan-500 disabled:opacity-50",children:o?"Saving...":"Save Settings"}),y&&d.jsx("span",{className:"text-sm text-gray-400",children:"Read-only mode is enabled."}),c&&d.jsx("span",{className:`text-sm ${c.type==="success"?"text-emerald-400":"text-red-400"}`,children:c.text})]})]}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("p",{className:"text-xs text-gray-500",children:["Settings are stored in ",d.jsx("code",{className:"text-gray-400",children:".agentv/config.yaml"})]})})]})}function cE({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 ZB({open:e,onClose:t,onAdded:r}){const n=S.useRef(null),[i,o]=S.useState(null),[l,c]=S.useState(""),[h,f]=S.useState(""),[p,y]=S.useState(null),[g,v]=S.useState(null),[b,w]=S.useState(!1),[N,_]=S.useState(!1),A=S.useCallback(async(M,U={})=>{w(!0),y(null),v(null);try{const k=await X6(M);o(k),c(k.path),f(U.selectCurrent&&k.current.hasAgentv?k.current.path:"")}catch(k){y(k.message)}finally{w(!1)}},[]);S.useEffect(()=>{var M;e&&(o(null),c(""),f(""),y(null),v(null),_(!1),(M=n.current)==null||M.focus(),A(void 0,{selectCurrent:!0}))},[A,e]),S.useEffect(()=>{if(!e)return;function M(U){U.key==="Escape"&&(U.preventDefault(),t())}return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[t,e]);const C=S.useMemo(()=>!i||!h?null:h===i.current.path?i.current:i.entries.find(M=>M.path===h)??null,[i,h]),E=!!(C!=null&&C.hasAgentv)&&!N;function T(M){M.preventDefault(),A(l,{selectCurrent:!0})}async function R(){if(!(!h||!E)){_(!0),v(null);try{const M=await W6(h);r(M),t()}catch(M){v(M.message)}finally{_(!1)}}}if(!e)return null;const D=h?C!=null&&C.hasAgentv?`Ready to add ${C.name}.`:"Selected folder does not contain an .agentv/ directory.":"Select a folder containing an .agentv/ directory.";return d.jsx("dialog",{ref:n,open:!0,"aria-modal":"true","aria-label":"Add project",tabIndex:-1,className:"fixed inset-0 z-50 flex h-full max-h-none w-full max-w-none items-center justify-center bg-black/70 p-4 text-left text-gray-100 backdrop:bg-black/70",children:d.jsxs("div",{className:"flex max-h-[90vh] w-full max-w-4xl flex-col overflow-hidden rounded-lg border border-gray-800 bg-gray-950 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-4 py-3",children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:"Add project"}),d.jsx("button",{type:"button",onClick:t,className:"rounded-md px-2 py-1 text-sm text-gray-400 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:"Close"})]}),d.jsxs("div",{className:"space-y-4 overflow-y-auto p-4",children:[d.jsxs("form",{onSubmit:T,className:"flex flex-col gap-2 sm:flex-row",children:[d.jsx("label",{className:"sr-only",htmlFor:"add-project-path",children:"Folder path"}),d.jsx("input",{id:"add-project-path",value:l,onChange: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 A(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 A(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(cE,{entry:i.current,current:!0,selected:h===i.current.path,onSelect:()=>f(i.current.path),onOpen:()=>void A(i.current.path,{selectCurrent:!0})}),i.entries.map(M=>d.jsx(cE,{entry:M,selected:h===M.path,onSelect:()=>f(M.path),onOpen:()=>void A(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:h||"None"})]}),d.jsx("p",{className:`text-sm ${C!=null&&C.hasAgentv?"text-cyan-300":"text-gray-500"}`,children:D})]})}),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-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:!E,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 VR(e){return e.executionStatus==="execution_error"}function tp(e,t){let r=0,n=0,i=0,o=0;for(const c of e){if(VR(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 Xt(e){return e.execution_error_count??0}function QR(e){return Math.max(0,e.total-Xt(e))}function Kl(e){return e.quality_count??Math.max(0,e.eval_count-Xt(e))}function XR(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=XR(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function We(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=XR(e))&&(n&&(n+=" "),n+=t);return n}var JB=["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 gj(e){if(typeof e!="string")return!1;var t=JB;return t.includes(e)}var e9=["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"],t9=new Set(e9);function WR(e){return typeof e!="string"?!1:t9.has(e)}function ZR(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)&&(WR(r)||ZR(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)&&(WR(r)||ZR(r)||gj(r))&&(t[r]=e[r]);return t}function r9(e){return e==null?null:S.isValidElement(e)?Er(e.props):typeof e=="object"&&!Array.isArray(e)?Er(e):null}var n9=["children","width","height","viewBox","className","style","title","desc"];function Hx(){return Hx=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},Hx.apply(null,arguments)}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 vj=S.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:o,className:l,style:c,title:h,desc:f}=e,p=a9(e,n9),y=o||{width:n,height:i,x:0,y:0},g=We("recharts-surface",l);return S.createElement("svg",Hx({},Er(p),{className:g,width:n,height:i,style:c,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height),ref:t}),S.createElement("title",null,h),S.createElement("desc",null,f),r)}),s9=["children","className"];function Kx(){return Kx=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},Kx.apply(null,arguments)}function o9(e,t){if(e==null)return{};var r,n,i=l9(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 l9(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=o9(e,s9),o=We("recharts-layer",n);return S.createElement("g",Kx({className:o},Er(i),{ref:t}),r)}),JR=S.createContext(null),u9=()=>S.useContext(JR);function st(e){return function(){return e}}const eM=Math.cos,Zh=Math.sin,Fn=Math.sqrt,Jh=Math.PI,rp=2*Jh,Gx=Math.PI,Yx=2*Gx,Rs=1e-6,c9=Yx-Rs;function tM(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function d9(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return tM;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 f9{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?tM:d9(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,h=n-t,f=i-r,p=l-t,y=c-r,g=p*p+y*y;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(g>Rs)if(!(Math.abs(y*h-f*p)>Rs)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let v=n-l,b=i-c,w=h*h+f*f,N=v*v+b*b,_=Math.sqrt(w),A=Math.sqrt(g),C=o*Math.tan((Gx-Math.acos((w+g-N)/(2*_*A)))/2),E=C/A,T=C/_;Math.abs(E-1)>Rs&&this._append`L${t+E*p},${r+E*y}`,this._append`A${o},${o},0,0,${+(y*v>p*b)},${this._x1=t+T*h},${this._y1=r+T*f}`}}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),h=n*Math.sin(i),f=t+c,p=r+h,y=1^l,g=l?i-o:o-i;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>Rs||Math.abs(this._y1-p)>Rs)&&this._append`L${f},${p}`,n&&(g<0&&(g=g%Yx+Yx),g>c9?this._append`A${n},${n},0,1,${y},${t-c},${r-h}A${n},${n},0,1,${y},${this._x1=f},${this._y1=p}`:g>Rs&&this._append`A${n},${n},0,${+(g>=Gx)},${y},${this._x1=t+n*Math.cos(o)},${this._y1=r+n*Math.sin(o)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function xj(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 f9(t)}function bj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rM(e){this._context=e}rM.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 np(e){return new rM(e)}function nM(e){return e[0]}function aM(e){return e[1]}function iM(e,t){var r=st(!0),n=null,i=np,o=null,l=xj(c);e=typeof e=="function"?e:e===void 0?nM:st(e),t=typeof t=="function"?t:t===void 0?aM:st(t);function c(h){var f,p=(h=bj(h)).length,y,g=!1,v;for(n==null&&(o=i(v=l())),f=0;f<=p;++f)!(f<p&&r(y=h[f],f,h))===g&&((g=!g)?o.lineStart():o.lineEnd()),g&&o.point(+e(y,f,h),+t(y,f,h));if(v)return o=null,v+""||null}return c.x=function(h){return arguments.length?(e=typeof h=="function"?h:st(+h),c):e},c.y=function(h){return arguments.length?(t=typeof h=="function"?h:st(+h),c):t},c.defined=function(h){return arguments.length?(r=typeof h=="function"?h:st(!!h),c):r},c.curve=function(h){return arguments.length?(i=h,n!=null&&(o=i(n)),c):i},c.context=function(h){return arguments.length?(h==null?n=o=null:o=i(n=h),c):n},c}function oh(e,t,r){var n=null,i=st(!0),o=null,l=np,c=null,h=xj(f);e=typeof e=="function"?e:e===void 0?nM:st(+e),t=typeof t=="function"?t:st(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?aM:st(+r);function f(y){var g,v,b,w=(y=bj(y)).length,N,_=!1,A,C=new Array(w),E=new Array(w);for(o==null&&(c=l(A=h())),g=0;g<=w;++g){if(!(g<w&&i(N=y[g],g,y))===_)if(_=!_)v=g,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),b=g-1;b>=v;--b)c.point(C[b],E[b]);c.lineEnd(),c.areaEnd()}_&&(C[g]=+e(N,g,y),E[g]=+t(N,g,y),c.point(n?+n(N,g,y):C[g],r?+r(N,g,y):E[g]))}if(A)return c=null,A+""||null}function p(){return iM().defined(i).curve(l).context(o)}return f.x=function(y){return arguments.length?(e=typeof y=="function"?y:st(+y),n=null,f):e},f.x0=function(y){return arguments.length?(e=typeof y=="function"?y:st(+y),f):e},f.x1=function(y){return arguments.length?(n=y==null?null:typeof y=="function"?y:st(+y),f):n},f.y=function(y){return arguments.length?(t=typeof y=="function"?y:st(+y),r=null,f):t},f.y0=function(y){return arguments.length?(t=typeof y=="function"?y:st(+y),f):t},f.y1=function(y){return arguments.length?(r=y==null?null:typeof y=="function"?y:st(+y),f):r},f.lineX0=f.lineY0=function(){return p().x(e).y(t)},f.lineY1=function(){return p().x(e).y(r)},f.lineX1=function(){return p().x(n).y(t)},f.defined=function(y){return arguments.length?(i=typeof y=="function"?y:st(!!y),f):i},f.curve=function(y){return arguments.length?(l=y,o!=null&&(c=l(o)),f):l},f.context=function(y){return arguments.length?(y==null?o=c=null:c=l(o=y),f):o},f}class sM{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 h9(e){return new sM(e,!0)}function m9(e){return new sM(e,!1)}const jj={draw(e,t){const r=Fn(t/Jh);e.moveTo(r,0),e.arc(0,0,r,0,rp)}},p9={draw(e,t){const r=Fn(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()}},oM=Fn(1/3),y9=oM*2,g9={draw(e,t){const r=Fn(t/y9),n=r*oM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},v9={draw(e,t){const r=Fn(t),n=-r/2;e.rect(n,n,r,r)}},x9=.8908130915292852,lM=Zh(Jh/10)/Zh(7*Jh/10),b9=Zh(rp/10)*lM,j9=-eM(rp/10)*lM,w9={draw(e,t){const r=Fn(t*x9),n=b9*r,i=j9*r;e.moveTo(0,-r),e.lineTo(n,i);for(let o=1;o<5;++o){const l=rp*o/5,c=eM(l),h=Zh(l);e.lineTo(h*r,-c*r),e.lineTo(c*n-h*i,h*n+c*i)}e.closePath()}},Iv=Fn(3),S9={draw(e,t){const r=-Fn(t/(Iv*3));e.moveTo(0,r*2),e.lineTo(-Iv*r,-r),e.lineTo(Iv*r,-r),e.closePath()}},xn=-.5,bn=Fn(3)/2,Vx=1/Fn(12),N9=(Vx/2+1)*3,_9={draw(e,t){const r=Fn(t/N9),n=r/2,i=r*Vx,o=n,l=r*Vx+r,c=-o,h=l;e.moveTo(n,i),e.lineTo(o,l),e.lineTo(c,h),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*h,bn*c+xn*h),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*h,xn*h-bn*c),e.closePath()}};function O9(e,t){let r=null,n=xj(i);e=typeof e=="function"?e:st(e||jj),t=typeof t=="function"?t:st(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:st(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:st(+o),i):t},i.context=function(o){return arguments.length?(r=o??null,i):r},i}function em(){}function tm(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 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(){switch(this._point){case 3:tm(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:tm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function E9(e){return new uM(e)}function cM(e){this._context=e}cM.prototype={areaStart:em,areaEnd:em,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:tm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function A9(e){return new cM(e)}function dM(e){this._context=e}dM.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:tm(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function C9(e){return new dM(e)}function fM(e){this._context=e}fM.prototype={areaStart:em,areaEnd:em,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 T9(e){return new fM(e)}function dE(e){return e<0?-1:1}function fE(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(dE(o)+dE(l))*Math.min(Math.abs(o),Math.abs(l),.5*Math.abs(c))||0}function hE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function $v(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 rm(e){this._context=e}rm.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:$v(this,this._t0,hE(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,$v(this,hE(this,r=fE(this,e,t)),r);break;default:$v(this,this._t0,r=fE(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function hM(e){this._context=new mM(e)}(hM.prototype=Object.create(rm.prototype)).point=function(e,t){rm.prototype.point.call(this,t,e)};function mM(e){this._context=e}mM.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 P9(e){return new rm(e)}function R9(e){return new hM(e)}function pM(e){this._context=e}pM.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=mE(e),i=mE(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 mE(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 M9(e){return new pM(e)}function ap(e,t){this._context=e,this._t=t}ap.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 D9(e){return new ap(e,.5)}function k9(e){return new ap(e,0)}function L9(e){return new ap(e,1)}function so(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 Qx(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function I9(e,t){return e[t]}function $9(e){const t=[];return t.key=e,t}function z9(){var e=st([]),t=Qx,r=so,n=I9;function i(o){var l=Array.from(e.apply(this,arguments),$9),c,h=l.length,f=-1,p;for(const y of o)for(c=0,++f;c<h;++c)(l[c][f]=[0,+n(y,l[c].key,f,o)]).data=y;for(c=0,p=bj(t(l));c<h;++c)l[p[c]].index=c;return r(l,p),l}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:st(Array.from(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:st(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?Qx:typeof o=="function"?o:st(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(r=o??so,i):r},i}function B9(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}so(e,t)}}function U9(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}so(e,t)}}function q9(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,h=0,f=0;c<l;++c){for(var p=e[t[c]],y=p[n][1]||0,g=p[n-1][1]||0,v=(y-g)/2,b=0;b<c;++b){var w=e[t[b]],N=w[n][1]||0,_=w[n-1][1]||0;v+=N-_}h+=y,f+=v*y}i[n-1][1]+=i[n-1][0]=r,h&&(r-=f/h)}i[n-1][1]+=i[n-1][0]=r,so(e,t)}}var zv={},Bv={},pE;function F9(){return pE||(pE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Bv)),Bv}var Uv={},yE;function yM(){return yE||(yE=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})(Uv)),Uv}var qv={},gE;function wj(){return gE||(gE=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})(qv)),qv}var Fv={},Hv={},vE;function H9(){return vE||(vE=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})(Hv)),Hv}var xE;function Sj(){return xE||(xE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=H9(),r=wj();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,h="",f="",p=!1;for(i.charCodeAt(0)===46&&(o.push(""),c++);c<l;){const y=i[c];f?y==="\\"&&c+1<l?(c++,h+=i[c]):y===f?f="":h+=y:p?y==='"'||y==="'"?f=y:y==="]"?(p=!1,o.push(h),h=""):h+=y:y==="["?(p=!0,h&&(o.push(h),h="")):y==="."?h&&(o.push(h),h=""):h+=y,c++}return h&&o.push(h),o}e.toPath=n})(Fv)),Fv}var bE;function Nj(){return bE||(bE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=F9(),r=yM(),n=wj(),i=Sj();function o(c,h,f){if(c==null)return f;switch(typeof h){case"string":{if(t.isUnsafeProperty(h))return f;const p=c[h];return p===void 0?r.isDeepKey(h)?o(c,i.toPath(h),f):f:p}case"number":case"symbol":{typeof h=="number"&&(h=n.toKey(h));const p=c[h];return p===void 0?f:p}default:{if(Array.isArray(h))return l(c,h,f);if(Object.is(h==null?void 0:h.valueOf(),-0)?h="-0":h=String(h),t.isUnsafeProperty(h))return f;const p=c[h];return p===void 0?f:p}}}function l(c,h,f){if(h.length===0)return f;let p=c;for(let y=0;y<h.length;y++){if(p==null||t.isUnsafeProperty(h[y]))return f;p=p[h[y]]}return p===void 0?f:p}e.get=o})(zv)),zv}var Kv,jE;function K9(){return jE||(jE=1,Kv=Nj().get),Kv}var G9=K9();const Gl=ss(G9);var Y9=4;function Wi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y9,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function Nt(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+Wi(c)+o:i+o},"")}var qr=e=>e===0?0:e>0?1:-1,ca=e=>typeof e=="number"&&e!=+e,oo=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ge=e=>(typeof e=="number"||e instanceof Number)&&!ca(e),da=e=>ge(e)||typeof e=="string",V9=0,Kc=e=>{var t=++V9;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(oo(t)){if(r==null)return n;var l=t.indexOf("%");o=r*parseFloat(t.slice(0,l))/100}else o=+t;return ca(o)&&(o=n),i&&r!=null&&o>r&&(o=r),o},gM=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 _t(e,t,r){return ge(e)&&ge(t)?Wi(e+r*(t-e)):t}function vM(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Gl(n,t))===r)}var pt=e=>e===null||typeof e>"u",vd=e=>pt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Fr(e){return e!=null}function vo(){}var Q9=["type","size","sizeType"];function Xx(){return Xx=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},Xx.apply(null,arguments)}function wE(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 SE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?wE(Object(r),!0).forEach(function(n){X9(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function X9(e,t,r){return(t=W9(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W9(e){var t=Z9(e,"string");return typeof t=="symbol"?t:t+""}function Z9(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 J9(e,t){if(e==null)return{};var r,n,i=eU(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 eU(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 xM={symbolCircle:jj,symbolCross:p9,symbolDiamond:g9,symbolSquare:v9,symbolStar:w9,symbolTriangle:S9,symbolWye:_9},tU=Math.PI/180,rU=e=>{var t="symbol".concat(vd(e));return xM[t]||jj},nU=(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*tU;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}},aU=(e,t)=>{xM["symbol".concat(vd(e))]=t},_j=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=J9(e,Q9),o=SE(SE({},i),{},{type:t,size:r,sizeType:n}),l="circle";typeof t=="string"&&(l=t);var c=()=>{var g=rU(l),v=O9().type(g).size(nU(r,n,l)),b=v();if(b!==null)return b},{className:h,cx:f,cy:p}=o,y=Er(o);return ge(f)&&ge(p)&&ge(r)?S.createElement("path",Xx({},y,{className:We("recharts-symbols",h),transform:"translate(".concat(f,", ").concat(p,")"),d:c()})):null};_j.registerSymbol=aU;var bM=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Oj=(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=>{gj(i)&&typeof r[i]=="function"&&(n[i]=(o=>r[i](r,o)))}),n},iU=(e,t,r)=>n=>(e(t,r,n),null),ip=(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];gj(i)&&typeof o=="function"&&(n||(n={}),n[i]=iU(o,t,r))}),n};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 sU(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){oU(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 oU(e,t,r){return(t=lU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lU(e){var t=uU(e,"string");return typeof t=="symbol"?t:t+""}function uU(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 dr(e,t){var r=sU({},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 nm(){return nm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nm.apply(null,arguments)}function _E(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 jM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_E(Object(r),!0).forEach(function(n){cU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_E(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cU(e,t,r){return(t=dU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dU(e){var t=fU(e,"string");return typeof t=="symbol"?t:t+""}function fU(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,hU={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function mU(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function pU(e){var{data:t,iconType:r,inactiveColor:n}=e,i=wn/2,o=wn/6,l=wn/3,c=t.inactive?n:t.color,h=r??t.type;if(h==="none")return null;if(h==="plainline")return S.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:mU(t.payload),x1:0,y1:i,x2:wn,y2:i,className:"recharts-legend-icon"});if(h==="line")return S.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,`
|
|
67
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,`
|
|
68
|
-
H`).concat(wn,"M").concat(2*l,",").concat(i,`
|
|
69
|
-
A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(h==="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 f=jM({},t);return delete f.legendIcon,S.cloneElement(t.legendIcon,f)}return S.createElement(_j,{fill:c,cx:i,cy:i,size:wn,sizeType:"diameter",type:h})}function yU(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:o,iconType:l,labelStyle:c}=e,h={x:0,y:0,width:wn,height:wn},f={display:n==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((y,g)=>{var v=y.formatter||i,b=We({"recharts-legend-item":!0,["legend-item-".concat(g)]:!0,inactive:y.inactive});if(y.type==="none")return null;var w=typeof c=="object"?jM({},c):{};w.color=y.inactive?o:w.color||y.color;var N=v?v(y.value,y,g):y.value;return S.createElement("li",nm({className:b,style:f,key:"legend-item-".concat(g)},ip(e,y,g)),S.createElement(vj,{width:r,height:r,viewBox:h,style:p,"aria-label":"".concat(y.value," legend icon")},S.createElement(pU,{data:y,iconType:l,inactiveColor:o})),S.createElement("span",{className:"recharts-legend-item-text",style:w},N))})}var gU=e=>{var t=dr(e,hU),{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(yU,nm({},t,{payload:r})))},Gv={},Yv={},OE;function vU(){return OE||(OE=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})(Yv)),Yv}var Vv={},EE;function xU(){return EE||(EE=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})(Vv)),Vv}var Qv={},AE;function wM(){return AE||(AE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Qv)),Qv}var Xv={},Wv={},Zv={},CE;function bU(){return CE||(CE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Zv)),Zv}var TE;function SM(){return TE||(TE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bU();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Wv)),Wv}var Jv={},PE;function jU(){return PE||(PE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Jv)),Jv}var RE;function wU(){return RE||(RE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SM(),r=jU();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(Xv)),Xv}var e0={},t0={},ME;function SU(){return ME||(ME=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nj();function r(n){return function(i){return t.get(i,n)}}e.property=r})(t0)),t0}var r0={},n0={},a0={},i0={},DE;function NM(){return DE||(DE=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})(i0)),i0}var s0={},kE;function _M(){return kE||(kE=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})(s0)),s0}var o0={},LE;function OM(){return LE||(LE=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})(o0)),o0}var IE;function NU(){return IE||(IE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NM(),r=_M(),n=OM();function i(p,y,g){return typeof g!="function"?i(p,y,()=>{}):o(p,y,function v(b,w,N,_,A,C){const E=g(b,w,N,_,A,C);return E!==void 0?!!E:o(b,w,v,C)},new Map)}function o(p,y,g,v){if(y===p)return!0;switch(typeof y){case"object":return l(p,y,g,v);case"function":return Object.keys(y).length>0?o(p,{...y},g,v):n.isEqualsSameValueZero(p,y);default:return t.isObject(p)?typeof y=="string"?y==="":!0:n.isEqualsSameValueZero(p,y)}}function l(p,y,g,v){if(y==null)return!0;if(Array.isArray(y))return h(p,y,g,v);if(y instanceof Map)return c(p,y,g,v);if(y instanceof Set)return f(p,y,g,v);const b=Object.keys(y);if(p==null||r.isPrimitive(p))return b.length===0;if(b.length===0)return!0;if(v!=null&&v.has(y))return v.get(y)===p;v==null||v.set(y,p);try{for(let w=0;w<b.length;w++){const N=b[w];if(!r.isPrimitive(p)&&!(N in p)||y[N]===void 0&&p[N]!==void 0||y[N]===null&&p[N]!==null||!g(p[N],y[N],N,p,y,v))return!1}return!0}finally{v==null||v.delete(y)}}function c(p,y,g,v){if(y.size===0)return!0;if(!(p instanceof Map))return!1;for(const[b,w]of y.entries()){const N=p.get(b);if(g(N,w,b,p,y,v)===!1)return!1}return!0}function h(p,y,g,v){if(y.length===0)return!0;if(!Array.isArray(p))return!1;const b=new Set;for(let w=0;w<y.length;w++){const N=y[w];let _=!1;for(let A=0;A<p.length;A++){if(b.has(A))continue;const C=p[A];let E=!1;if(g(C,N,w,p,y,v)&&(E=!0),E){b.add(A),_=!0;break}}if(!_)return!1}return!0}function f(p,y,g,v){return y.size===0?!0:p instanceof Set?h([...p],[...y],g,v):!1}e.isMatchWith=i,e.isSetMatch=f})(a0)),a0}var $E;function EM(){return $E||($E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NU();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(n0)),n0}var l0={},u0={},c0={},zE;function _U(){return zE||(zE=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})(c0)),c0}var d0={},BE;function Ej(){return BE||(BE=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})(d0)),d0}var f0={},UE;function AM(){return UE||(UE=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]",h="[object Map]",f="[object Set]",p="[object Array]",y="[object Function]",g="[object ArrayBuffer]",v="[object Object]",b="[object Error]",w="[object DataView]",N="[object Uint8Array]",_="[object Uint8ClampedArray]",A="[object Uint16Array]",C="[object Uint32Array]",E="[object BigUint64Array]",T="[object Int8Array]",R="[object Int16Array]",D="[object Int32Array]",M="[object BigInt64Array]",U="[object Float32Array]",k="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=g,e.arrayTag=p,e.bigInt64ArrayTag=M,e.bigUint64ArrayTag=E,e.booleanTag=i,e.dataViewTag=w,e.dateTag=c,e.errorTag=b,e.float32ArrayTag=U,e.float64ArrayTag=k,e.functionTag=y,e.int16ArrayTag=R,e.int32ArrayTag=D,e.int8ArrayTag=T,e.mapTag=h,e.numberTag=n,e.objectTag=v,e.regexpTag=t,e.setTag=f,e.stringTag=r,e.symbolTag=l,e.uint16ArrayTag=A,e.uint32ArrayTag=C,e.uint8ArrayTag=N,e.uint8ClampedArrayTag=_})(f0)),f0}var h0={},qE;function OU(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(h0)),h0}var FE;function CM(){return FE||(FE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_U(),r=Ej(),n=AM(),i=_M(),o=OU();function l(p,y){return c(p,void 0,p,new Map,y)}function c(p,y,g,v=new Map,b=void 0){const w=b==null?void 0:b(p,y,g,v);if(w!==void 0)return w;if(i.isPrimitive(p))return p;if(v.has(p))return v.get(p);if(Array.isArray(p)){const N=new Array(p.length);v.set(p,N);for(let _=0;_<p.length;_++)N[_]=c(p[_],_,g,v,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;v.set(p,N);for(const[_,A]of p)N.set(_,c(A,_,g,v,b));return N}if(p instanceof Set){const N=new Set;v.set(p,N);for(const _ of p)N.add(c(_,void 0,g,v,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);v.set(p,N);for(let _=0;_<p.length;_++)N[_]=c(p[_],_,g,v,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 v.set(p,N),h(N,p,g,v,b),N}if(typeof File<"u"&&p instanceof File){const N=new File([p],p.name,{type:p.type});return v.set(p,N),h(N,p,g,v,b),N}if(typeof Blob<"u"&&p instanceof Blob){const N=new Blob([p],{type:p.type});return v.set(p,N),h(N,p,g,v,b),N}if(p instanceof Error){const N=structuredClone(p);return v.set(p,N),N.message=p.message,N.name=p.name,N.stack=p.stack,N.cause=p.cause,N.constructor=p.constructor,h(N,p,g,v,b),N}if(p instanceof Boolean){const N=new Boolean(p.valueOf());return v.set(p,N),h(N,p,g,v,b),N}if(p instanceof Number){const N=new Number(p.valueOf());return v.set(p,N),h(N,p,g,v,b),N}if(p instanceof String){const N=new String(p.valueOf());return v.set(p,N),h(N,p,g,v,b),N}if(typeof p=="object"&&f(p)){const N=Object.create(Object.getPrototypeOf(p));return v.set(p,N),h(N,p,g,v,b),N}return p}function h(p,y,g=p,v,b){const w=[...Object.keys(y),...t.getSymbols(y)];for(let N=0;N<w.length;N++){const _=w[N],A=Object.getOwnPropertyDescriptor(p,_);(A==null||A.writable)&&(p[_]=c(y[_],_,g,v,b))}}function f(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=h})(u0)),u0}var HE;function EU(){return HE||(HE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CM();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(l0)),l0}var KE;function AU(){return KE||(KE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EM(),r=EU();function n(i){return i=r.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=n})(r0)),r0}var m0={},p0={},y0={},GE;function CU(){return GE||(GE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CM(),r=Ej(),n=AM();function i(o,l){return t.cloneDeepWith(o,(c,h,f,p)=>{const y=l==null?void 0:l(c,h,f,p);if(y!==void 0)return y;if(typeof o=="object"){if(r.getTag(o)===n.objectTag&&typeof o.constructor!="function"){const g={};return p.set(o,g),t.copyProperties(g,o,f,p),g}switch(Object.prototype.toString.call(o)){case n.numberTag:case n.stringTag:case n.booleanTag:{const g=new o.constructor(o==null?void 0:o.valueOf());return t.copyProperties(g,o),g}case n.argumentsTag:{const g={};return t.copyProperties(g,o),g.length=o.length,g[Symbol.iterator]=o[Symbol.iterator],g}default:return}}})}e.cloneDeepWith=i})(y0)),y0}var YE;function TU(){return YE||(YE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=CU();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(p0)),p0}var g0={},v0={},VE;function TM(){return VE||(VE=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})(v0)),v0}var x0={},QE;function PU(){return QE||(QE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ej();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(x0)),x0}var XE;function RU(){return XE||(XE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yM(),r=TM(),n=PU(),i=Sj();function o(l,c){let h;if(Array.isArray(c)?h=c:typeof c=="string"&&t.isDeepKey(c)&&(l==null?void 0:l[c])==null?h=i.toPath(c):h=[c],h.length===0)return!1;let f=l;for(let p=0;p<h.length;p++){const y=h[p];if((f==null||!Object.hasOwn(f,y))&&!((Array.isArray(f)||n.isArguments(f))&&r.isIndex(y)&&y<f.length))return!1;f=f[y]}return!0}e.has=o})(g0)),g0}var WE;function MU(){return WE||(WE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EM(),r=wj(),n=TU(),i=Nj(),o=RU();function l(c,h){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 h=n.cloneDeep(h),function(f){const p=i.get(f,c);return p===void 0?o.has(f,c):h===void 0?p===void 0:t.isMatch(p,h)}}e.matchesProperty=l})(m0)),m0}var ZE;function DU(){return ZE||(ZE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=wM(),r=SU(),n=AU(),i=MU();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})(e0)),e0}var JE;function kU(){return JE||(JE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=vU(),r=xU(),n=wM(),i=wU(),o=DU();function l(c,h=n.identity){return i.isArrayLikeObject(c)?t.uniqBy(Array.from(c),r.ary(o.iteratee(h),1)):[]}e.uniqBy=l})(Gv)),Gv}var b0,eA;function LU(){return eA||(eA=1,b0=kU().uniqBy),b0}var IU=LU();const tA=ss(IU);function PM(e,t,r){return t===!0?tA(e,r):typeof t=="function"?tA(e,t):e}var Aj=S.createContext(null),$U=e=>e,dt=()=>{var e=S.useContext(Aj);return e?e.store.dispatch:$U},Rh=()=>{},zU=()=>Rh,BU=(e,t)=>e===t;function be(e){var t=S.useContext(Aj),r=S.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Rh,[t,e]);return mR.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:zU,t?t.store.getState:Rh,t?t.store.getState:Rh,r,BU)}function UU(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function qU(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function FU(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 rA=e=>Array.isArray(e)?e:[e];function HU(e){const t=Array.isArray(e[0])?e[0]:e;return FU(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function KU(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var GU=class{constructor(e){this.value=e}deref(){return this.value}},YU=typeof WeakRef<"u"?WeakRef:GU,VU=0,nA=1;function lh(){return{s:VU,v:void 0,o:null,p:null}}function RM(e,t={}){let r=lh();const{resultEqualityCheck:n}=t;let i,o=0;function l(){var y;let c=r;const{length:h}=arguments;for(let g=0,v=h;g<v;g++){const b=arguments[g];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=lh(),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=lh(),w.set(b,c)):c=N}}const f=c;let p;if(c.s===nA)p=c.v;else if(p=e.apply(null,arguments),o++,n){const g=((y=i==null?void 0:i.deref)==null?void 0:y.call(i))??i;g!=null&&n(g,p)&&(p=g,o!==0&&o--),i=typeof p=="object"&&p!==null||typeof p=="function"?new YU(p):p}return f.s=nA,f.v=p,p}return l.clearCache=()=>{r=lh(),l.resetResultsCount()},l.resultsCount=()=>o,l.resetResultsCount=()=>{o=0},l}function QU(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,l=0,c,h={},f=i.pop();typeof f=="object"&&(h=f,f=i.pop()),UU(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const p={...r,...h},{memoize:y,memoizeOptions:g=[],argsMemoize:v=RM,argsMemoizeOptions:b=[]}=p,w=rA(g),N=rA(b),_=HU(i),A=y(function(){return o++,f.apply(null,arguments)},...w),C=v(function(){l++;const T=KU(_,arguments);return c=A.apply(null,T),c},...N);return Object.assign(C,{resultFunc:f,memoizedResultFunc:A,dependencies:_,dependencyRecomputations:()=>l,resetDependencyRecomputations:()=>{l=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:y,argsMemoize:v})};return Object.assign(n,{withTypes:()=>n}),n}var V=QU(RM),XU=Object.assign((e,t=V)=>{qU(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,h)=>(l[r[h]]=c,l),{}))},{withTypes:()=>XU}),j0={},w0={},S0={},aA;function WU(){return aA||(aA=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})(S0)),S0}var N0={},_0={},iA;function MM(){return iA||(iA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(_0)),_0}var sA;function ZU(){return sA||(sA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MM(),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})(N0)),N0}var oA;function JU(){return oA||(oA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WU(),r=ZU(),n=Sj();function i(o,l,c,h){if(o==null)return[];c=h?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(v=>String(v));const f=(v,b)=>{let w=v;for(let N=0;N<b.length&&w!=null;++N)w=w[b[N]];return w},p=(v,b)=>b==null||v==null?b:typeof v=="object"&&"key"in v?Object.hasOwn(b,v.key)?b[v.key]:f(b,v.path):typeof v=="function"?v(b):Array.isArray(v)?f(b,v):typeof b=="object"?b[v]:b,y=l.map(v=>(Array.isArray(v)&&v.length===1&&(v=v[0]),v==null||typeof v=="function"||Array.isArray(v)||r.isKey(v)?v:{key:v,path:n.toPath(v)}));return o.map(v=>({original:v,criteria:y.map(b=>p(b,v))})).slice().sort((v,b)=>{for(let w=0;w<y.length;w++){const N=t.compareValues(v.criteria[w],b.criteria[w],c[w]);if(N!==0)return N}return 0}).map(v=>v.original)}e.orderBy=i})(w0)),w0}var O0={},lA;function eq(){return lA||(lA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],o=Math.floor(n),l=(c,h)=>{for(let f=0;f<c.length;f++){const p=c[f];Array.isArray(p)&&h<o?l(p,h+1):i.push(p)}};return l(r,0),i}e.flatten=t})(O0)),O0}var E0={},uA;function DM(){return uA||(uA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TM(),r=SM(),n=NM(),i=OM();function o(l,c,h){return n.isObject(h)&&(typeof c=="number"&&r.isArrayLike(h)&&t.isIndex(c)&&c<h.length||typeof c=="string"&&c in h)?i.isEqualsSameValueZero(h[c],l):!1}e.isIterateeCall=o})(E0)),E0}var cA;function tq(){return cA||(cA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JU(),r=eq(),n=DM();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})(j0)),j0}var A0,dA;function rq(){return dA||(dA=1,A0=tq().sortBy),A0}var nq=rq();const sp=ss(nq);var kM=e=>e.legend.settings,aq=e=>e.legend.size,iq=e=>e.legend.payload,sq=V([iq,kM],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?sp(n,r):n});function oq(){return be(sq)}var uh=1;function LM(){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)>uh||Math.abs(l.left-t.left)>uh||Math.abs(l.top-t.top)>uh||Math.abs(l.width-t.width)>uh)&&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 or(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 lq=typeof Symbol=="function"&&Symbol.observable||"@@observable",fA=lq,C0=()=>Math.random().toString(36).substring(7).split("").join("."),uq={INIT:`@@redux/INIT${C0()}`,REPLACE:`@@redux/REPLACE${C0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${C0()}`},am=uq;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 IM(e,t,r){if(typeof e!="function")throw new Error(or(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(or(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(or(1));return r(IM)(e,t)}let n=e,i=t,o=new Map,l=o,c=0,h=!1;function f(){l===o&&(l=new Map,o.forEach((N,_)=>{l.set(_,N)}))}function p(){if(h)throw new Error(or(3));return i}function y(N){if(typeof N!="function")throw new Error(or(4));if(h)throw new Error(or(5));let _=!0;f();const A=c++;return l.set(A,N),function(){if(_){if(h)throw new Error(or(6));_=!1,f(),l.delete(A),o=null}}}function g(N){if(!Cj(N))throw new Error(or(7));if(typeof N.type>"u")throw new Error(or(8));if(typeof N.type!="string")throw new Error(or(17));if(h)throw new Error(or(9));try{h=!0,i=n(i,N)}finally{h=!1}return(o=l).forEach(A=>{A()}),N}function v(N){if(typeof N!="function")throw new Error(or(10));n=N,g({type:am.REPLACE})}function b(){const N=y;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(or(11));function A(){const E=_;E.next&&E.next(p())}return A(),{unsubscribe:N(A)}},[fA](){return this}}}return g({type:am.INIT}),{dispatch:g,subscribe:y,getState:p,replaceReducer:v,[fA]:b}}function cq(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:am.INIT})>"u")throw new Error(or(12));if(typeof r(void 0,{type:am.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(or(13))})}function $M(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{cq(r)}catch(o){i=o}return function(l={},c){if(i)throw i;let h=!1;const f={};for(let p=0;p<n.length;p++){const y=n[p],g=r[y],v=l[y],b=g(v,c);if(typeof b>"u")throw c&&c.type,new Error(or(14));f[y]=b,h=h||b!==v}return h=h||n.length!==Object.keys(l).length,h?f:l}}function im(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function dq(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(or(15))};const l={getState:i.getState,dispatch:(h,...f)=>o(h,...f)},c=e.map(h=>h(l));return o=im(...c)(i.dispatch),{...i,dispatch:o}}}function zM(e){return Cj(e)&&"type"in e&&typeof e.type=="string"}var BM=Symbol.for("immer-nothing"),hA=Symbol.for("immer-draftable"),Ar=Symbol.for("immer-state");function kn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object,Yl=rn.getPrototypeOf,sm="constructor",op="prototype",Wx="configurable",om="enumerable",Mh="writable",Gc="value",Xa=e=>!!e&&!!e[Ar];function Un(e){var t;return e?UM(e)||up(e)||!!e[hA]||!!((t=e[sm])!=null&&t[hA])||cp(e)||dp(e):!1}var fq=rn[op][sm].toString(),mA=new WeakMap;function UM(e){if(!e||!Tj(e))return!1;const t=Yl(e);if(t===null||t===rn[op])return!0;const r=rn.hasOwnProperty.call(t,sm)&&t[sm];if(r===Object)return!0;if(!wl(r))return!1;let n=mA.get(r);return n===void 0&&(n=Function.toString.call(r),mA.set(r,n)),n===fq}function lp(e,t,r=!0){xd(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 xd(e){const t=e[Ar];return t?t.type_:up(e)?1:cp(e)?2:dp(e)?3:0}var pA=(e,t,r=xd(e))=>r===2?e.has(t):rn[op].hasOwnProperty.call(e,t),Zx=(e,t,r=xd(e))=>r===2?e.get(t):e[t],lm=(e,t,r,n=xd(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function hq(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var up=Array.isArray,cp=e=>e instanceof Map,dp=e=>e instanceof Set,Tj=e=>typeof e=="object",wl=e=>typeof e=="function",T0=e=>typeof e=="boolean";function mq(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var La=e=>e.copy_||e.base_,Pj=e=>e.modified_?e.copy_:e.base_;function Jx(e,t){if(cp(e))return new Map(e);if(dp(e))return new Set(e);if(up(e))return Array[op].slice.call(e);const r=UM(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[Mh]===!1&&(c[Mh]=!0,c[Wx]=!0),(c.get||c.set)&&(n[l]={[Wx]:!0,[Mh]:!0,[om]:c[om],[Gc]:e[l]})}return rn.create(Yl(e),n)}else{const n=Yl(e);if(n!==null&&r)return{...e};const i=rn.create(n);return rn.assign(i,e)}}function Rj(e,t=!1){return fp(e)||Xa(e)||!Un(e)||(xd(e)>1&&rn.defineProperties(e,{set:ch,add:ch,clear:ch,delete:ch}),rn.freeze(e),t&&lp(e,(r,n)=>{Rj(n,!0)},!1)),e}function pq(){kn(2)}var ch={[Gc]:pq};function fp(e){return e===null||!Tj(e)?!0:rn.isFrozen(e)}var um="MapSet",eb="Patches",yA="ArrayMethods",qM={};function lo(e){const t=qM[e];return t||kn(0,e),t}var gA=e=>!!qM[e],Yc,FM=()=>Yc,yq=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:gA(um)?lo(um):void 0,arrayMethodsPlugin_:gA(yA)?lo(yA):void 0});function vA(e,t){t&&(e.patchPlugin_=lo(eb),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function tb(e){rb(e),e.drafts_.forEach(gq),e.drafts_=null}function rb(e){e===Yc&&(Yc=e.parent_)}var xA=e=>Yc=yq(Yc,e);function gq(e){const t=e[Ar];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function bA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Ar].modified_&&(tb(t),kn(4)),Un(e)&&(e=jA(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Ar].base_,e,t)}else e=jA(t,r);return vq(t,e,!0),tb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==BM?e:void 0}function jA(e,t){if(fp(t))return t;const r=t[Ar];if(!r)return cm(t,e.handledSet_,e);if(!hp(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);GM(r,e)}return r.copy_}function vq(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Rj(t,r)}function HM(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var hp=(e,t)=>e.scope_===t,xq=[];function KM(e,t,r,n){const i=La(e),o=e.type_;if(n!==void 0&&Zx(i,n,o)===t){lm(i,n,r,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;lp(i,(h,f)=>{if(Xa(f)){const p=c.get(f)||[];p.push(h),c.set(f,p)}})}const l=e.draftLocations_.get(t)??xq;for(const c of l)lm(i,c,r,o)}function bq(e,t,r){e.callbacks_.push(function(i){var c;const o=t;if(!o||!hp(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const l=Pj(o);KM(e,o.draft_??o,l,r),GM(o,i)})}function GM(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)}HM(e)}}function jq(e,t,r){const{scope_:n}=e;if(Xa(r)){const i=r[Ar];hp(i,n)&&i.callbacks_.push(function(){Dh(e);const l=Pj(i);KM(e,r,l,t)})}else Un(r)&&e.callbacks_.push(function(){const o=La(e);e.type_===3?o.has(r)&&cm(r,n.handledSet_,n):Zx(o,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&cm(Zx(e.copy_,t,e.type_),n.handledSet_,n)})}function cm(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Xa(e)||t.has(e)||!Un(e)||fp(e)||(t.add(e),lp(e,(n,i)=>{if(Xa(i)){const o=i[Ar];if(hp(o,r)){const l=Pj(o);lm(e,n,l,e.type_),HM(o)}}else Un(i)&&cm(i,t,r)})),e}function wq(e,t){const r=up(e),n={type_:r?1:0,scope_:t?t.scope_:FM(),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=dm;r&&(i=[n],o=Vc);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=l,[c,n]}var dm={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=La(e);if(!pA(i,t,e.type_))return Sq(e,i,t);const o=i[t];if(e.finalized_||!Un(o)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&mq(t))return o;if(o===P0(e.base_,t)){Dh(e);const l=e.type_===1?+t:t,c=ab(e.scope_,o,e,l);return e.copy_[l]=c}return o},has(e,t){return t in La(e)},ownKeys(e){return Reflect.ownKeys(La(e))},set(e,t,r){const n=YM(La(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=P0(La(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(hq(r,i)&&(r!==void 0||pA(e.base_,t,e.type_)))return!0;Dh(e),nb(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),jq(e,t,r)),!0},deleteProperty(e,t){return Dh(e),P0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),nb(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=La(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[Mh]:!0,[Wx]:e.type_!==1||t!=="length",[om]:n[om],[Gc]:r[t]}},defineProperty(){kn(11)},getPrototypeOf(e){return Yl(e.base_)},setPrototypeOf(){kn(12)}},Vc={};for(let e in dm){let t=dm[e];Vc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Vc.deleteProperty=function(e,t){return Vc.set.call(this,e,t,void 0)};Vc.set=function(e,t,r){return dm.set.call(this,e[0],t,r,e[0])};function P0(e,t){const r=e[Ar];return(r?La(r):e)[t]}function Sq(e,t,r){var i;const n=YM(t,r);return n?Gc in n?n[Gc]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function YM(e,t){if(!(t in e))return;let r=Yl(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Yl(r)}}function nb(e){e.modified_||(e.modified_=!0,e.parent_&&nb(e.parent_))}function Dh(e){e.copy_||(e.assigned_=new Map,e.copy_=Jx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Nq=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(wl(r)&&!wl(n)){const l=n;n=r;const c=this;return function(f=l,...p){return c.produce(f,y=>n.call(this,y,...p))}}wl(n)||kn(6),i!==void 0&&!wl(i)&&kn(7);let o;if(Un(r)){const l=xA(this),c=ab(l,r,void 0);let h=!0;try{o=n(c),h=!1}finally{h?tb(l):rb(l)}return vA(l,i),bA(o,l)}else if(!r||!Tj(r)){if(o=n(r),o===void 0&&(o=r),o===BM&&(o=void 0),this.autoFreeze_&&Rj(o,!0),i){const l=[],c=[];lo(eb).generateReplacementPatches_(r,o,{patches_:l,inversePatches_:c}),i(l,c)}return o}else kn(1,r)},this.produceWithPatches=(r,n)=>{if(wl(r))return(c,...h)=>this.produceWithPatches(c,f=>r(f,...h));let i,o;return[this.produce(r,n,(c,h)=>{i=c,o=h}),i,o]},T0(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),T0(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),T0(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){Un(t)||kn(8),Xa(t)&&(t=On(t));const r=xA(this),n=ab(r,t,void 0);return n[Ar].isManual_=!0,rb(r),n}finishDraft(t,r){const n=t&&t[Ar];(!n||!n.isManual_)&&kn(9);const{scope_:i}=n;return vA(i,r),bA(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=lo(eb).applyPatches_;return Xa(t)?i(t,r):this.produce(t,o=>i(o,r))}};function ab(e,t,r,n){const[i,o]=cp(t)?lo(um).proxyMap_(t,r):dp(t)?lo(um).proxySet_(t,r):wq(t,r);return((r==null?void 0:r.scope_)??FM()).drafts_.push(i),o.callbacks_=(r==null?void 0:r.callbacks_)??[],o.key_=n,r&&n!==void 0?bq(r,o,n):o.callbacks_.push(function(h){var p;(p=h.mapSetPlugin_)==null||p.fixSetContents(o);const{patchPlugin_:f}=h;o.modified_&&f&&f.generatePatches_(o,[],h)}),i}function On(e){return Xa(e)||kn(10,e),VM(e)}function VM(e){if(!Un(e)||fp(e))return e;const t=e[Ar];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Jx(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Jx(e,!0);return lp(r,(i,o)=>{lm(r,i,VM(o))},n),t&&(t.finalized_=!1),r}var _q=new Nq,QM=_q.produce;function XM(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var Oq=XM(),Eq=XM,Aq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?im:im.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=>zM(n)&&n.type===e,r}var WM=class Cc extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Cc.prototype)}static get[Symbol.species](){return Cc}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Cc(...t[0].concat(this)):new Cc(...t.concat(this))}};function wA(e){return Un(e)?QM(e,()=>{}):e}function dh(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Cq(e){return typeof e=="boolean"}var Tq=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let l=new WM;return r&&(Cq(r)?l.push(Oq):l.push(Eq(r.extraArgument))),l},ZM="RTK_autoBatch",ut=()=>e=>({payload:e,meta:{[ZM]:!0}}),SA=e=>t=>{setTimeout(t,e)},JM=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,l=!1;const c=new Set,h=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:SA(10):e.type==="callback"?e.queueNotification:SA(e.timeout),f=()=>{l=!1,o&&(o=!1,c.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const y=()=>i&&p(),g=n.subscribe(y);return c.add(p),()=>{g(),c.delete(p)}},dispatch(p){var y;try{return i=!((y=p==null?void 0:p.meta)!=null&&y[ZM]),o=!i,o&&(l||(l=!0,h(f))),n.dispatch(p)}finally{i=!0}}})},Pq=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new WM(e);return n&&i.push(JM(typeof n=="object"?n:void 0)),i};function Rq(e){const t=Tq(),{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=$M(r);else throw new Error(nn(1));let h;typeof n=="function"?h=n(t):h=t();let f=im;i&&(f=Aq({trace:!1,...typeof i=="object"&&i}));const p=dq(...h),y=Pq(p);let g=typeof l=="function"?l(y):y();const v=f(...g);return IM(c,o,v)}function e3(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 Mq(e){return typeof e=="function"}function Dq(e,t){let[r,n,i]=e3(t),o;if(Mq(e))o=()=>wA(e());else{const c=wA(e);o=()=>c}function l(c=o(),h){let f=[r[h.type],...n.filter(({matcher:p})=>p(h)).map(({reducer:p})=>p)];return f.filter(p=>!!p).length===0&&(f=[i]),f.reduce((p,y)=>{if(y)if(Xa(p)){const v=y(p,h);return v===void 0?p:v}else{if(Un(p))return QM(p,g=>y(g,h));{const g=y(p,h);if(g===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return g}}return p},c)}return l.getInitialState=o,l}var kq="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lq=(e=21)=>{let t="",r=e;for(;r--;)t+=kq[Math.random()*64|0];return t},Iq=Symbol.for("rtk-slice-createasyncthunk");function $q(e,t){return`${e}/${t}`}function zq({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Iq];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(Uq()):i.reducers)||{},h=Object.keys(c),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(E,T){const R=typeof E=="string"?E:E.type;if(!R)throw new Error(nn(12));if(R in f.sliceCaseReducersByType)throw new Error(nn(13));return f.sliceCaseReducersByType[R]=T,p},addMatcher(E,T){return f.sliceMatchers.push({matcher:E,reducer:T}),p},exposeAction(E,T){return f.actionCreators[E]=T,p},exposeCaseReducer(E,T){return f.sliceCaseReducersByName[E]=T,p}};h.forEach(E=>{const T=c[E],R={reducerName:E,type:$q(o,E),createNotation:typeof i.reducers=="function"};Fq(T)?Kq(R,T,p,t):qq(R,T,p)});function y(){const[E={},T=[],R=void 0]=typeof i.extraReducers=="function"?e3(i.extraReducers):[i.extraReducers],D={...E,...f.sliceCaseReducersByType};return Dq(i.initialState,M=>{for(let U in D)M.addCase(U,D[U]);for(let U of f.sliceMatchers)M.addMatcher(U.matcher,U.reducer);for(let U of T)M.addMatcher(U.matcher,U.reducer);R&&M.addDefaultCase(R)})}const g=E=>E,v=new Map,b=new WeakMap;let w;function N(E,T){return w||(w=y()),w(E,T)}function _(){return w||(w=y()),w.getInitialState()}function A(E,T=!1){function R(M){let U=M[E];return typeof U>"u"&&T&&(U=dh(b,R,_)),U}function D(M=g){const U=dh(v,T,()=>new WeakMap);return dh(U,M,()=>{const k={};for(const[H,B]of Object.entries(i.selectors??{}))k[H]=Bq(B,M,()=>dh(b,M,_),T);return k})}return{reducerPath:E,getSelectors:D,get selectors(){return D(R)},selectSlice:R}}const C={name:o,reducer:N,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:_,...A(l),injectInto(E,{reducerPath:T,...R}={}){const D=T??l;return E.inject({reducerPath:D,reducer:N},R),{...C,...A(D,!0)}}};return C}}function Bq(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 xr=zq();function Uq(){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 qq({type:e,reducerName:t,createNotation:r},n,i){let o,l;if("reducer"in n){if(r&&!Hq(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 Fq(e){return e._reducerDefinitionType==="asyncThunk"}function Hq(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Kq({type:e,reducerName:t},r,n,i){if(!i)throw new Error(nn(18));const{payloadCreator:o,fulfilled:l,pending:c,rejected:h,settled:f,options:p}=r,y=i(e,o,p);n.exposeAction(t,y),l&&n.addCase(y.fulfilled,l),c&&n.addCase(y.pending,c),h&&n.addCase(y.rejected,h),f&&n.addMatcher(y.settled,f),n.exposeCaseReducer(t,{fulfilled:l||fh,pending:c||fh,rejected:h||fh,settled:f||fh})}function fh(){}var Gq="task",t3="listener",r3="completed",Mj="cancelled",Yq=`task-${Mj}`,Vq=`task-${r3}`,ib=`${t3}-${Mj}`,Qq=`${t3}-${r3}`,mp=class{constructor(e){pv(this,"name","TaskAbortError");pv(this,"message");this.code=e,this.message=`${Gq} ${Mj} (reason: ${e})`}},Dj=(e,t)=>{if(typeof e!="function")throw new TypeError(nn(32))},fm=()=>{},n3=(e,t=fm)=>(e.catch(t),e),a3=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),to=e=>{if(e.aborted)throw new mp(e.reason)};function i3(e,t){let r=fm;return new Promise((n,i)=>{const o=()=>i(new mp(e.reason));if(e.aborted){o();return}r=a3(e,o),t.finally(()=>r()).then(n,i)}).finally(()=>{r=fm})}var Xq=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof mp?"cancelled":"rejected",error:r}}finally{t==null||t()}},hm=e=>t=>n3(i3(e,t).then(r=>(to(e),r))),s3=e=>{const t=hm(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Ol}=Object,NA={},pp="listenerMiddleware",Wq=(e,t)=>{const r=n=>a3(e,()=>n.abort(e.reason));return(n,i)=>{Dj(n);const o=new AbortController;r(o);const l=Xq(async()=>{to(e),to(o.signal);const c=await n({pause:hm(o.signal),delay:s3(o.signal),signal:o.signal});return to(o.signal),c},()=>o.abort(Vq));return i!=null&&i.autoJoin&&t.push(l.catch(fm)),{result:hm(e)(l),cancel(){o.abort(Yq)}}}},Zq=(e,t)=>{const r=async(n,i)=>{to(t);let o=()=>{};const c=[new Promise((h,f)=>{let p=e({predicate:n,effect:(y,g)=>{g.unsubscribe(),h([y,g.getState(),g.getOriginalState()])}});o=()=>{p(),f()}})];i!=null&&c.push(new Promise(h=>setTimeout(h,i,null)));try{const h=await i3(t,Promise.race(c));return to(t),h}finally{o()}};return(n,i)=>n3(r(n,i))},o3=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 Dj(o),{predicate:i,type:t,effect:o}},l3=Ol(e=>{const{type:t,predicate:r,effect:n}=o3(e);return{id:Lq(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(nn(22))}}},{withTypes:()=>l3}),_A=(e,t)=>{const{type:r,effect:n,predicate:i}=o3(t);return Array.from(e.values()).find(o=>(typeof r=="string"?o.type===r:o.predicate===i)&&o.effect===n)},sb=e=>{e.pending.forEach(t=>{t.abort(ib)})},Jq=(e,t)=>()=>{for(const r of t.keys())sb(r);e.clear()},OA=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},u3=Ol(on(`${pp}/add`),{withTypes:()=>u3}),eF=on(`${pp}/removeAll`),c3=Ol(on(`${pp}/remove`),{withTypes:()=>c3}),tF=(...e)=>{console.error(`${pp}/error`,...e)},bd=(e={})=>{const t=new Map,r=new Map,n=v=>{const b=r.get(v)??0;r.set(v,b+1)},i=v=>{const b=r.get(v)??1;b===1?r.delete(v):r.set(v,b-1)},{extra:o,onError:l=tF}=e;Dj(l);const c=v=>(v.unsubscribe=()=>t.delete(v.id),t.set(v.id,v),b=>{v.unsubscribe(),b!=null&&b.cancelActive&&sb(v)}),h=v=>{const b=_A(t,v)??l3(v);return c(b)};Ol(h,{withTypes:()=>h});const f=v=>{const b=_A(t,v);return b&&(b.unsubscribe(),v.cancelActive&&sb(b)),!!b};Ol(f,{withTypes:()=>f});const p=async(v,b,w,N)=>{const _=new AbortController,A=Zq(h,_.signal),C=[];try{v.pending.add(_),n(v),await Promise.resolve(v.effect(b,Ol({},w,{getOriginalState:N,condition:(E,T)=>A(E,T).then(Boolean),take:A,delay:s3(_.signal),pause:hm(_.signal),extra:o,signal:_.signal,fork:Wq(_.signal,C),unsubscribe:v.unsubscribe,subscribe:()=>{t.set(v.id,v)},cancelActiveListeners:()=>{v.pending.forEach((E,T,R)=>{E!==_&&(E.abort(ib),R.delete(E))})},cancel:()=>{_.abort(ib),v.pending.delete(_)},throwIfCancelled:()=>{to(_.signal)}})))}catch(E){E instanceof mp||OA(l,E,{raisedBy:"effect"})}finally{await Promise.all(C),_.abort(Qq),i(v),v.pending.delete(_)}},y=Jq(t,r);return{middleware:v=>b=>w=>{if(!zM(w))return b(w);if(u3.match(w))return h(w.payload);if(eF.match(w)){y();return}if(c3.match(w))return f(w.payload);let N=v.getState();const _=()=>{if(N===NA)throw new Error(nn(23));return N};let A;try{if(A=b(w),t.size>0){const C=v.getState(),E=Array.from(t.values());for(const T of E){let R=!1;try{R=T.predicate(w,C,N)}catch(D){R=!1,OA(l,D,{raisedBy:"predicate"})}R&&p(T,w,v,_)}}}finally{N=NA}return A},startListening:h,stopListening:f,clearListeners:y}};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 rF={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},d3=xr({name:"chartLayout",initialState:rF,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:nF,setLayout:aF,setChartSize:iF,setScale:sF}=d3.actions,oF=d3.reducer;function f3(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Ue(e){return Number.isFinite(e)}function fa(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function EA(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 Sl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?EA(Object(r),!0).forEach(function(n){lF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):EA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lF(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=cF(e,"string");return typeof t=="symbol"?t:t+""}function cF(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 Pt(e,t,r){return pt(e)||pt(t)?r:da(t)?Gl(e,t,r):typeof t=="function"?t(e):r}var dF=(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 Sl(Sl({},e),{},{[o]:e[o]+(n||0)});if((c==="horizontal"||c==="vertical"&&o==="center")&&l!=="middle"&&ge(e[l]))return Sl(Sl({},e),{},{[l]:e[l]+(i||0)})}return e},ei=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",h3=(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},m3=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:o,scale:l,realScaleType:c,isCategorical:h,categoricalDomain:f,tickCount:p,ticks:y,niceTicks:g,axisType:v}=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=v==="angleAxis"&&o&&o.length>=2?qr(o[0]-o[1])*2*w:w,y||g){var N=(y||g||[]).map((_,A)=>{var C=n?n.indexOf(_):_,E=l.map(C);return Ue(E)?{coordinate:E+w,value:_,offset:w,index:A}:null}).filter(Fr);return N}return h&&f?f.map((_,A)=>{var C=l.map(_);return Ue(C)?{coordinate:C+w,value:_,index:A,offset:w}:null}).filter(Fr):l.ticks&&p!=null?l.ticks(p).map((_,A)=>{var C=l.map(_);return Ue(C)?{coordinate:C+w,value:_,index:A,offset:w}:null}).filter(Fr):l.domain().map((_,A)=>{var C=l.map(_);return Ue(C)?{coordinate:C+w,value:n?n[_]:_,index:A,offset:w}:null}).filter(Fr)},fF=(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},hF=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 h=e[c],f=h==null?void 0:h[i];if(f!=null){var p=f[1],y=f[0],g=ca(p)?y:p;g>=0?(f[0]=o,o+=g,f[1]=o):(f[0]=l,l+=g,f[1]=l)}}}},mF=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],h=c==null?void 0:c[i];if(h!=null){var f=ca(h[1])?h[0]:h[1];f>=0?(h[0]=o,o+=f,h[1]=o):(h[0]=0,h[1]=0)}}}},pF={sign:hF,expand:B9,none:so,silhouette:U9,wiggle:q9,positive:mF},yF=(e,t,r)=>{var n,i=(n=pF[r])!==null&&n!==void 0?n:so,o=z9().keys(t).value((c,h)=>Number(Pt(c,h,0))).order(Qx).offset(i),l=o(e);return l.forEach((c,h)=>{c.forEach((f,p)=>{var y=Pt(e[p],t[h],0);Array.isArray(y)&&y.length===2&&ge(y[0])&&ge(y[1])&&(f[0]=y[0],f[1]=y[1])})}),l};function gF(e){return e==null?void 0:String(e)}function AA(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:o,dataKey:l}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!pt(i[t.dataKey])){var c=vM(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[o]?r[o].coordinate+n/2:null}var h=Pt(i,pt(l)?t.dataKey:l),f=t.scale.map(h);return ge(f)?f:null}var CA=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=Pt(o,t.dataKey,t.scale.domain()[l]);if(pt(c))return null;var h=t.scale.map(c);return ge(h)?h-i/2+n:null},vF=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]},xF=e=>{var t=e.flat(2).filter(ge);return[Math.min(...t),Math.max(...t)]},bF=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],jF=(e,t,r)=>{if(e!=null)return bF(Object.keys(e).reduce((n,i)=>{var o=e[i];if(!o)return n;var{stackedData:l}=o,c=l.reduce((h,f)=>{var p=f3(f,t,r),y=xF(p);return!Ue(y[0])||!Ue(y[1])?h:[Math.min(h[0],y[0]),Math.max(h[1],y[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},TA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Vl=(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=sp(t,p=>p.coordinate),o=1/0,l=1,c=i.length;l<c;l++){var h=i[l],f=i[l-1];o=Math.min(((h==null?void 0:h.coordinate)||0)-((f==null?void 0:f.coordinate)||0),o)}return o===1/0?0:o}return r?void 0:0};function RA(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:o}=e;return Sl(Sl({},t),{},{dataKey:r,payload:n,value:i,name:o})}function yp(e,t){if(e)return String(e);if(typeof t=="string")return t}var wF=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},SF=(e,t)=>t==="centric"?e.angle:e.radius,ti=e=>e.layout.width,ri=e=>e.layout.height,NF=e=>e.layout.scale,p3=e=>e.layout.margin,gp=V(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),vp=V(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),_F="data-recharts-item-index",OF="data-recharts-item-id",jd=60;function MA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MA(Object(r),!0).forEach(function(n){EF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function 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=CF(e,"string");return typeof t=="symbol"?t:t+""}function CF(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 TF=e=>e.brush.height;function PF(e){var t=vp(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:jd;return r+i}return r},0)}function RF(e){var t=vp(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:jd;return r+i}return r},0)}function MF(e){var t=gp(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function DF(e){var t=gp(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Wt=V([ti,ri,p3,TF,PF,RF,MF,DF,kM,aq],(e,t,r,n,i,o,l,c,h,f)=>{var p={left:(r.left||0)+i,right:(r.right||0)+o},y={top:(r.top||0)+l,bottom:(r.bottom||0)+c},g=hh(hh({},y),p),v=g.bottom;g.bottom+=n,g=dF(g,h,f);var b=e-g.left-g.right,w=t-g.top-g.bottom;return hh(hh({brushBottom:v},g),{},{width:Math.max(b,0),height:Math.max(w,0)})}),kF=V(Wt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),kj=V(ti,ri,(e,t)=>({x:0,y:0,width:e,height:t})),LF=S.createContext(null),br=()=>S.useContext(LF)!=null,xp=e=>e.brush,bp=V([xp,Wt,p3],(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})),R0={},M0={},D0={},DA;function IF(){return DA||(DA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:o}={}){let l,c=null;const h=o!=null&&o.includes("leading"),f=o==null||o.includes("trailing"),p=()=>{c!==null&&(r.apply(l,c),l=void 0,c=null)},y=()=>{f&&p(),w()};let g=null;const v=()=>{g!=null&&clearTimeout(g),g=setTimeout(()=>{g=null,y()},n)},b=()=>{g!==null&&(clearTimeout(g),g=null)},w=()=>{b(),l=void 0,c=null},N=()=>{p()},_=function(...A){if(i!=null&&i.aborted)return;l=this,c=A;const C=g==null;v(),h&&C&&p()};return _.schedule=v,_.cancel=w,_.flush=N,i==null||i.addEventListener("abort",w,{once:!0}),_}e.debounce=t})(D0)),D0}var kA;function $F(){return kA||(kA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=IF();function r(n,i=0,o={}){typeof o!="object"&&(o={});const{leading:l=!1,trailing:c=!0,maxWait:h}=o,f=Array(2);l&&(f[0]="leading"),c&&(f[1]="trailing");let p,y=null;const g=t.debounce(function(...w){p=n.apply(this,w),y=null},i,{edges:f}),v=function(...w){return h!=null&&(y===null&&(y=Date.now()),Date.now()-y>=h)?(p=n.apply(this,w),y=Date.now(),g.cancel(),g.schedule(),p):(g.apply(this,w),p)},b=()=>(g.flush(),p);return v.cancel=g.cancel,v.flush=b,v}e.debounce=r})(M0)),M0}var LA;function zF(){return LA||(LA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$F();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})(R0)),R0}var k0,IA;function BF(){return IA||(IA=1,k0=zF().throttle),k0}var UF=BF();const qF=ss(UF);var mm=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++]))}},sa={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},y3=(e,t,r)=>{var{width:n=sa.width,height:i=sa.height,aspect:o,maxHeight:l}=r,c=oo(n)?e:Number(n),h=oo(i)?t:Number(i);return o&&o>0&&(c?h=c/o:h&&(c=h*o),l&&h!=null&&h>l&&(h=l)),{calculatedWidth:c,calculatedHeight:h}},FF={width:0,height:0,overflow:"visible"},HF={width:0,overflowX:"visible"},KF={height:0,overflowY:"visible"},GF={},YF=e=>{var{width:t,height:r}=e,n=oo(t),i=oo(r);return n&&i?FF:n?HF:i?KF:GF};function VF(e){var{width:t,height:r,aspect:n}=e,i=t,o=r;return i===void 0&&o===void 0?(i=sa.width,o=sa.height):i===void 0?i=n&&n>0?void 0:sa.width:o===void 0&&(o=n&&n>0?void 0:sa.height),{width:i,height:o}}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 $A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function zA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$A(Object(r),!0).forEach(function(n){QF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$A(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QF(e,t,r){return(t=XF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XF(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 g3=S.createContext(sa.initialDimension);function ZF(e){return fa(e.width)&&fa(e.height)}function v3(e){var{children:t,width:r,height:n}=e,i=S.useMemo(()=>({width:r,height:n}),[r,n]);return ZF(i)?S.createElement(g3.Provider,{value:i},t):null}var Lj=()=>S.useContext(g3),JF=S.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=sa.initialDimension,width:i,height:o,minWidth:l=sa.minWidth,minHeight:c,maxHeight:h,children:f,debounce:p=sa.debounce,id:y,className:g,onResize:v,style:b={}}=e,w=S.useRef(null),N=S.useRef();N.current=v,S.useImperativeHandle(t,()=>w.current);var[_,A]=S.useState({containerWidth:n.width,containerHeight:n.height}),C=S.useCallback((M,U)=>{A(k=>{var H=Math.round(M),B=Math.round(U);return k.containerWidth===H&&k.containerHeight===B?k:{containerWidth:H,containerHeight:B}})},[]);S.useEffect(()=>{if(w.current==null||typeof ResizeObserver>"u")return vo;var M=B=>{var ae,ee=B[0];if(ee!=null){var{width:ne,height:$}=ee.contentRect;C(ne,$),(ae=N.current)===null||ae===void 0||ae.call(N,ne,$)}};p>0&&(M=qF(M,p,{trailing:!0,leading:!1}));var U=new ResizeObserver(M),{width:k,height:H}=w.current.getBoundingClientRect();return C(k,H),U.observe(w.current),()=>{U.disconnect()}},[C,p]);var{containerWidth:E,containerHeight:T}=_;mm(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:R,calculatedHeight:D}=y3(E,T,{width:i,height:o,aspect:r,maxHeight:h});return mm(R!=null&&R>0||D!=null&&D>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
70
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
71
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
72
|
-
height and width.`,R,D,i,o,l,c,r),S.createElement("div",{id:y?"".concat(y):void 0,className:We("recharts-responsive-container",g),style:zA(zA({},b),{},{width:i,height:o,minWidth:l,minHeight:c,maxHeight:h}),ref:w},S.createElement("div",{style:YF({width:i,height:o})},S.createElement(v3,{width:R,height:D},f)))}),Ij=S.forwardRef((e,t)=>{var r=Lj();if(fa(r.width)&&fa(r.height))return e.children;var{width:n,height:i}=VF({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:l}=y3(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return ge(o)&&ge(l)?S.createElement(v3,{width:o,height:l},e.children):S.createElement(JF,ob({},e,{width:n,height:i,ref:t}))});function $j(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 jp=()=>{var e,t=br(),r=be(kF),n=be(bp),i=(e=be(xp))===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}},e7={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},x3=()=>{var e;return(e=be(Wt))!==null&&e!==void 0?e:e7},zj=()=>be(ti),Bj=()=>be(ri),t7=()=>be(e=>e.layout.margin),Ze=e=>e.layout.layoutType,xo=()=>be(Ze),b3=()=>{var e=xo();if(e==="horizontal"||e==="vertical")return e},j3=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},r7=()=>{var e=xo();return e!==void 0},wd=e=>{var t=dt(),r=br(),{width:n,height:i}=e,o=Lj(),l=n,c=i;return o&&(l=o.width>0?o.width:n,c=o.height>0?o.height:i),S.useEffect(()=>{!r&&fa(l)&&fa(c)&&t(iF({width:l,height:c}))},[t,r,l,c]),null},w3=Symbol.for("immer-nothing"),BA=Symbol.for("immer-draftable"),ln=Symbol.for("immer-state");function Ln(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qc=Object.getPrototypeOf;function Ql(e){return!!e&&!!e[ln]}function uo(e){var t;return e?S3(e)||Array.isArray(e)||!!e[BA]||!!((t=e.constructor)!=null&&t[BA])||Sd(e)||Sp(e):!1}var n7=Object.prototype.constructor.toString(),UA=new WeakMap;function S3(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=UA.get(r);return n===void 0&&(n=Function.toString.call(r),UA.set(r,n)),n===n7}function pm(e,t,r=!0){wp(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 wp(e){const t=e[ln];return t?t.type_:Array.isArray(e)?1:Sd(e)?2:Sp(e)?3:0}function lb(e,t){return wp(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function N3(e,t,r){const n=wp(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function a7(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Sd(e){return e instanceof Map}function Sp(e){return e instanceof Set}function Ms(e){return e.copy_||e.base_}function ub(e,t){if(Sd(e))return new Map(e);if(Sp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=S3(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(Qc(e),n)}else{const n=Qc(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Uj(e,t=!1){return Np(e)||Ql(e)||!uo(e)||(wp(e)>1&&Object.defineProperties(e,{set:mh,add:mh,clear:mh,delete:mh}),Object.freeze(e),t&&Object.values(e).forEach(r=>Uj(r,!0))),e}function i7(){Ln(2)}var mh={value:i7};function Np(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var s7={};function co(e){const t=s7[e];return t||Ln(0,e),t}var Xc;function _3(){return Xc}function o7(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qA(e,t){t&&(co("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cb(e){db(e),e.drafts_.forEach(l7),e.drafts_=null}function db(e){e===Xc&&(Xc=e.parent_)}function FA(e){return Xc=o7(Xc,e)}function l7(e){const t=e[ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function HA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[ln].modified_&&(cb(t),Ln(4)),uo(e)&&(e=ym(t,e),t.parent_||gm(t,e)),t.patches_&&co("Patches").generateReplacementPatches_(r[ln].base_,e,t.patches_,t.inversePatches_)):e=ym(t,r,[]),cb(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==w3?e:void 0}function ym(e,t,r){if(Np(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[ln];if(!i)return pm(t,(o,l)=>KA(e,i,t,o,l,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return gm(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),pm(l,(h,f)=>KA(e,i,o,h,f,r,c),n),gm(e,o,!1),r&&e.patches_&&co("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function KA(e,t,r,n,i,o,l){if(i==null||typeof i!="object"&&!l)return;const c=Np(i);if(!(c&&!l)){if(Ql(i)){const h=o&&t&&t.type_!==3&&!lb(t.assigned_,n)?o.concat(n):void 0,f=ym(e,i,h);if(N3(r,n,f),Ql(f))e.canAutoFreeze_=!1;else return}else l&&r.add(i);if(uo(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;ym(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(Sd(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&gm(e,i)}}}function gm(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Uj(t,r)}function u7(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:_3(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=qj;r&&(i=[n],o=Wc);const{revoke:l,proxy:c}=Proxy.revocable(i,o);return n.draft_=c,n.revoke_=l,c}var qj={get(e,t){if(t===ln)return e;const r=Ms(e);if(!lb(r,t))return c7(e,r,t);const n=r[t];return e.finalized_||!uo(n)?n:n===L0(e.base_,t)?(I0(e),e.copy_[t]=hb(n,e)):n},has(e,t){return t in Ms(e)},ownKeys(e){return Reflect.ownKeys(Ms(e))},set(e,t,r){const n=O3(Ms(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=L0(Ms(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(a7(r,i)&&(r!==void 0||lb(e.base_,t)))return!0;I0(e),fb(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 L0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,I0(e),fb(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ms(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ln(11)},getPrototypeOf(e){return Qc(e.base_)},setPrototypeOf(){Ln(12)}},Wc={};pm(qj,(e,t)=>{Wc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Wc.deleteProperty=function(e,t){return Wc.set.call(this,e,t,void 0)};Wc.set=function(e,t,r){return qj.set.call(this,e[0],t,r,e[0])};function L0(e,t){const r=e[ln];return(r?Ms(r):e)[t]}function c7(e,t,r){var i;const n=O3(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function O3(e,t){if(!(t in e))return;let r=Qc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Qc(r)}}function fb(e){e.modified_||(e.modified_=!0,e.parent_&&fb(e.parent_))}function I0(e){e.copy_||(e.copy_=ub(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var d7=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(h=o,...f){return l.produce(h,p=>r.call(this,p,...f))}}typeof r!="function"&&Ln(6),n!==void 0&&typeof n!="function"&&Ln(7);let i;if(uo(t)){const o=FA(this),l=hb(t,void 0);let c=!0;try{i=r(l),c=!1}finally{c?cb(o):db(o)}return qA(o,n),HA(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===w3&&(i=void 0),this.autoFreeze_&&Uj(i,!0),n){const o=[],l=[];co("Patches").generateReplacementPatches_(t,i,o,l),n(o,l)}return i}else Ln(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(l,...c)=>this.produceWithPatches(l,h=>t(h,...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){uo(e)||Ln(8),Ql(e)&&(e=f7(e));const t=FA(this),r=hb(e,void 0);return r[ln].isManual_=!0,db(t),r}finishDraft(e,t){const r=e&&e[ln];(!r||!r.isManual_)&&Ln(9);const{scope_:n}=r;return qA(n,t),HA(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=co("Patches").applyPatches_;return Ql(e)?n(e,t):this.produce(e,i=>n(i,t))}};function hb(e,t){const r=Sd(e)?co("MapSet").proxyMap_(e,t):Sp(e)?co("MapSet").proxySet_(e,t):u7(e,t);return(t?t.scope_:_3()).drafts_.push(r),r}function f7(e){return Ql(e)||Ln(10,e),E3(e)}function E3(e){if(!uo(e)||Np(e))return e;const t=e[ln];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ub(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=ub(e,!0);return pm(r,(i,o)=>{N3(r,i,E3(o))},n),t&&(t.finalized_=!1),r}var h7=new d7;h7.produce;var m7={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},A3=xr({name:"legend",initialState:m7,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:ut()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:ut()},removeLegendPayload:{reducer(e,t){var r=On(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:ut()}}}),{setLegendSize:GA,setLegendSettings:p7,addLegendPayload:y7,replaceLegendPayload:g7,removeLegendPayload:v7}=A3.actions,x7=A3.reducer,$0={exports:{}},z0={};/**
|
|
73
|
-
* @license React
|
|
74
|
-
* use-sync-external-store-with-selector.production.js
|
|
75
|
-
*
|
|
76
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the MIT license found in the
|
|
79
|
-
* LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/var YA;function b7(){if(YA)return z0;YA=1;var e=iu();function t(h,f){return h===f&&(h!==0||1/h===1/f)||h!==h&&f!==f}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 z0.useSyncExternalStoreWithSelector=function(h,f,p,y,g){var v=i(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=l(function(){function N(T){if(!_){if(_=!0,A=T,T=y(T),g!==void 0&&b.hasValue){var R=b.value;if(g(R,T))return C=R}return C=T}if(R=C,r(A,T))return R;var D=y(T);return g!==void 0&&g(R,D)?(A=T,R):(A=T,C=D)}var _=!1,A,C,E=p===void 0?null:p;return[function(){return N(f())},E===null?void 0:function(){return N(E())}]},[f,p,y,g]);var w=n(h,v[0],v[1]);return o(function(){b.hasValue=!0,b.value=w},[w]),c(w),w},z0}var VA;function j7(){return VA||(VA=1,$0.exports=b7()),$0.exports}j7();function w7(e){e()}function S7(){let e=null,t=null;return{clear(){e=null,t=null},notify(){w7(()=>{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 QA={notify(){},get:()=>[]};function N7(e,t){let r,n=QA,i=0,o=!1;function l(w){p();const N=n.subscribe(w);let _=!1;return()=>{_||(_=!0,N(),y())}}function c(){n.notify()}function h(){b.onStateChange&&b.onStateChange()}function f(){return o}function p(){i++,r||(r=e.subscribe(h),n=S7())}function y(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=QA)}function g(){o||(o=!0,p())}function v(){o&&(o=!1,y())}const b={addNestedSub:l,notifyNestedSubs:c,handleChangeWrapper:h,isSubscribed:f,trySubscribe:g,tryUnsubscribe:v,getListeners:()=>n};return b}var _7=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",O7=_7(),E7=()=>typeof navigator<"u"&&navigator.product==="ReactNative",A7=E7(),C7=()=>O7||A7?S.useLayoutEffect:S.useEffect,T7=C7();function XA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function P7(e,t){if(XA(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])||!XA(e[r[i]],t[r[i]]))return!1;return!0}var B0=Symbol.for("react-redux-context"),U0=typeof globalThis<"u"?globalThis:{};function R7(){if(!S.createContext)return{};const e=U0[B0]??(U0[B0]=new Map);let t=e.get(S.createContext);return t||(t=S.createContext(null),e.set(S.createContext,t)),t}var M7=R7();function D7(e){const{children:t,context:r,serverState:n,store:i}=e,o=S.useMemo(()=>{const h=N7(i);return{store:i,subscription:h,getServerState:n?()=>n:void 0}},[i,n]),l=S.useMemo(()=>i.getState(),[i]);T7(()=>{const{subscription:h}=o;return h.onStateChange=h.notifyNestedSubs,h.trySubscribe(),l!==i.getState()&&h.notifyNestedSubs(),()=>{h.tryUnsubscribe(),h.onStateChange=void 0}},[o,l]);const c=r||M7;return S.createElement(c.Provider,{value:o},t)}var k7=D7,L7=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function I7(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function ou(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(L7.has(n)){if(e[n]==null&&t[n]==null)continue;if(!P7(e[n],t[n]))return!1}else if(!I7(e[n],t[n]))return!1;return!0}var $7=["contextPayload"];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 WA(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 Xl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WA(Object(r),!0).forEach(function(n){z7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z7(e,t,r){return(t=B7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B7(e){var t=U7(e,"string");return typeof t=="symbol"?t:t+""}function U7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function q7(e,t){if(e==null)return{};var r,n,i=F7(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 F7(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 H7(e){return e.value}function K7(e){var{contextPayload:t}=e,r=q7(e,$7),n=PM(t,e.payloadUniqBy,H7),i=Xl(Xl({},r),{},{payload:n});return S.isValidElement(e.content)?S.cloneElement(e.content,i):typeof e.content=="function"?S.createElement(e.content,i):S.createElement(gU,i)}function G7(e,t,r,n,i,o){var{layout:l,align:c,verticalAlign:h}=t,f,p;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(c==="center"&&l==="vertical"?f={left:((n||0)-o.width)/2}:f=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))&&(h==="middle"?p={top:((i||0)-o.height)/2}:p=h==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),Xl(Xl({},f),p)}function Y7(e){var t=dt();return S.useEffect(()=>{t(p7(e))},[t,e]),null}function V7(e){var t=dt();return S.useEffect(()=>(t(GA(e)),()=>{t(GA({width:0,height:0}))}),[t,e]),null}function Q7(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var X7={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function W7(e){var t=dr(e,X7),r=oq(),n=u9(),i=t7(),{width:o,height:l,wrapperStyle:c,portal:h}=t,[f,p]=LM([r]),y=zj(),g=Bj();if(y==null||g==null)return null;var v=y-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),b=Q7(t.layout,l,o,v),w=h?c:Xl(Xl({position:"absolute",width:(b==null?void 0:b.width)||o||"auto",height:(b==null?void 0:b.height)||l||"auto"},G7(c,t,i,y,g,f)),c),N=h??n;if(N==null||r==null)return null;var _=S.createElement("div",{className:"recharts-legend-wrapper",style:w,ref:p},S.createElement(Y7,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!h&&S.createElement(V7,{width:f.width,height:f.height}),S.createElement(K7,mb({},t,b,{margin:i,chartWidth:y,chartHeight:g,contextPayload:r})));return Zm.createPortal(_,N)}var C3=S.memo(W7,ou);C3.displayName="Legend";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 ZA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ZA(Object(r),!0).forEach(function(n){Z7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ZA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z7(e,t,r){return(t=J7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J7(e){var t=eH(e,"string");return typeof t=="symbol"?t:t+""}function eH(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 tH(e){return Array.isArray(e)&&da(e[0])&&da(e[1])?e.join(" ~ "):e}var fl={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 rH(e,t){return t==null?e:sp(e,t)}var nH=e=>{var{separator:t=fl.separator,contentStyle:r,itemStyle:n,labelStyle:i=fl.labelStyle,payload:o,formatter:l,itemSorter:c,wrapperClassName:h,labelClassName:f,label:p,labelFormatter:y,accessibilityLayer:g=fl.accessibilityLayer}=e,v=()=>{if(o&&o.length){var T={padding:0,margin:0},R=rH(o,c),D=R.map((M,U)=>{if(!M||M.type==="none")return null;var k=M.formatter||l||tH,{value:H,name:B}=M,ae=H,ee=B;if(k){var ne=k(H,B,M,U,o);if(Array.isArray(ne))[ae,ee]=ne;else if(ne!=null)ae=ne;else return null}var $=yc(yc({},fl.itemStyle),{},{color:M.color||fl.itemStyle.color},n);return S.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(U),style:$},da(ee)?S.createElement("span",{className:"recharts-tooltip-item-name"},ee):null,da(ee)?S.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,S.createElement("span",{className:"recharts-tooltip-item-value"},ae),S.createElement("span",{className:"recharts-tooltip-item-unit"},M.unit||""))});return S.createElement("ul",{className:"recharts-tooltip-item-list",style:T},D)}return null},b=yc(yc({},fl.contentStyle),r),w=yc({margin:0},i),N=!pt(p),_=N?p:"",A=We("recharts-default-tooltip",h),C=We("recharts-tooltip-label",f);N&&y&&o!==void 0&&o!==null&&(_=y(p,o));var E=g?{role:"status","aria-live":"assertive"}:{};return S.createElement("div",pb({className:A,style:b},E),S.createElement("p",{className:C,style:w},S.isValidElement(_)?_:"".concat(_)),v())},gc="recharts-tooltip-wrapper",aH={visibility:"hidden"};function iH(e){var{coordinate:t,translateX:r,translateY:n}=e;return We(gc,{["".concat(gc,"-right")]:ge(r)&&t&&ge(t.x)&&r>=t.x,["".concat(gc,"-left")]:ge(r)&&t&&ge(t.x)&&r<t.x,["".concat(gc,"-bottom")]:ge(n)&&t&&ge(t.y)&&n>=t.y,["".concat(gc,"-top")]:ge(n)&&t&&ge(t.y)&&n<t.y})}function JA(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:o,reverseDirection:l,tooltipDimension:c,viewBox:h,viewBoxDimension:f}=e;if(o&&ge(o[n]))return o[n];var p=r[n]-c-(i>0?i:0),y=r[n]+i;if(t[n])return l[n]?p:y;var g=h[n];if(g==null)return 0;if(l[n]){var v=p,b=g;return v<b?Math.max(y,g):Math.max(p,g)}if(f==null)return 0;var w=y+c,N=g+f;return w>N?Math.max(p,g):Math.max(y,g)}function sH(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 oH(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:o,reverseDirection:l,tooltipBox:c,useTranslate3d:h,viewBox:f}=e,p,y,g;return c.height>0&&c.width>0&&r?(y=JA({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:o,reverseDirection:l,tooltipDimension:c.width,viewBox:f,viewBoxDimension:f.width}),g=JA({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:o,reverseDirection:l,tooltipDimension:c.height,viewBox:f,viewBoxDimension:f.height}),p=sH({translateX:y,translateY:g,useTranslate3d:h})):p=aH,{cssProperties:p,cssClasses:iH({translateX:y,translateY:g,coordinate:r})}}var lH=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Nd={isSsr:lH()};function T3(){var[e,t]=S.useState(()=>Nd.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 eC(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 hl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eC(Object(r),!0).forEach(function(n){uH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function uH(e,t,r){return(t=cH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cH(e){var t=dH(e,"string");return typeof t=="symbol"?t:t+""}function dH(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 fH(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function hH(e){var t,r,n,i,o,l,c=T3(),[h,f]=S.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));S.useEffect(()=>{var b=w=>{if(w.key==="Escape"){var N,_,A,C;f({dismissed:!0,dismissedAtCoordinate:{x:(N=(_=e.coordinate)===null||_===void 0?void 0:_.x)!==null&&N!==void 0?N:0,y:(A=(C=e.coordinate)===null||C===void 0?void 0:C.y)!==null&&A!==void 0?A: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]),h.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==h.dismissedAtCoordinate.x||((o=(l=e.coordinate)===null||l===void 0?void 0:l.y)!==null&&o!==void 0?o:0)!==h.dismissedAtCoordinate.y)&&f(hl(hl({},h),{},{dismissed:!1}));var{cssClasses:p,cssProperties:y}=oH({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}),g=e.hasPortalFromProps?{}:hl(hl({transition:fH({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},y),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),v=hl(hl({},g),{},{visibility:!h.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:v,ref:e.innerRef},e.children)}var mH=S.memo(hH),P3=()=>{var e;return(e=be(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function yb(){return yb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yb.apply(null,arguments)}function tC(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 rC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tC(Object(r),!0).forEach(function(n){pH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function pH(e,t,r){return(t=yH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yH(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)}var nC={curveBasisClosed:A9,curveBasisOpen:C9,curveBasis:E9,curveBumpX:h9,curveBumpY:m9,curveLinearClosed:T9,curveLinear:np,curveMonotoneX:P9,curveMonotoneY:R9,curveNatural:M9,curveStep:D9,curveStepAfter:L9,curveStepBefore:k9},vm=e=>Ue(e.x)&&Ue(e.y),aC=e=>e.base!=null&&vm(e.base)&&vm(e),vc=e=>e.x,xc=e=>e.y,vH=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(vd(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=nC["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return nC[r]||np},iC={connectNulls:!1,type:"linear"},xH=e=>{var{type:t=iC.type,points:r=[],baseLine:n,layout:i,connectNulls:o=iC.connectNulls}=e,l=vH(t,i),c=o?r.filter(vm):r;if(Array.isArray(n)){var h,f=r.map((b,w)=>rC(rC({},b),{},{base:n[w]}));i==="vertical"?h=oh().y(xc).x1(vc).x0(b=>b.base.x):h=oh().x(vc).y1(xc).y0(b=>b.base.y);var p=h.defined(aC).curve(l),y=o?f.filter(aC):f;return p(y)}var g;i==="vertical"&&ge(n)?g=oh().y(xc).x1(vc).x0(n):ge(n)?g=oh().x(vc).y1(xc).y0(n):g=iM().x(vc).y(xc);var v=g.defined(vm).curve(l);return v(c)},R3=e=>{var{className:t,points:r,path:n,pathRef:i}=e,o=xo();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?xH(l):n;return S.createElement("path",yb({},zn(e),Oj(e),{className:We("recharts-curve",t),d:c===null?void 0:c,ref:i}))},bH=["x","y","top","left","width","height","className"];function gb(){return gb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gb.apply(null,arguments)}function sC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jH(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sC(Object(r),!0).forEach(function(n){wH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wH(e,t,r){return(t=SH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function SH(e){var t=NH(e,"string");return typeof t=="symbol"?t:t+""}function NH(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _H(e,t){if(e==null)return{};var r,n,i=OH(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 OH(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 EH=(e,t,r,n,i,o)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(o,",").concat(t,"h").concat(r),AH=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:o=0,height:l=0,className:c}=e,h=_H(e,bH),f=jH({x:t,y:r,top:n,left:i,width:o,height:l},h);return!ge(t)||!ge(r)||!ge(o)||!ge(l)||!ge(n)||!ge(i)?null:S.createElement("path",gb({},Er(f),{className:We("recharts-cross",c),d:EH(t,r,o,l,n,i)}))};function CH(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 oC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?oC(Object(r),!0).forEach(function(n){TH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TH(e,t,r){return(t=PH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PH(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 MH=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),M3=(e,t,r)=>e.map(n=>"".concat(MH(n)," ").concat(t,"ms ").concat(r)).join(","),DH=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Zc=(e,t)=>Object.keys(t).reduce((r,n)=>lC(lC({},r),{},{[n]:e(n,t[n])}),{});function uC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Bt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uC(Object(r),!0).forEach(function(n){kH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kH(e,t,r){return(t=LH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LH(e){var t=IH(e,"string");return typeof t=="symbol"?t:t+""}function IH(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 xm=(e,t,r)=>e+(t-e)*r,vb=e=>{var{from:t,to:r}=e;return t!==r},D3=(e,t,r)=>{var n=Zc((i,o)=>{if(vb(o)){var[l,c]=e(o.from,o.to,o.velocity);return Bt(Bt({},o),{},{from:l,velocity:c})}return o},t);return r<1?Zc((i,o)=>vb(o)&&n[i]!=null?Bt(Bt({},o),{},{velocity:xm(o.velocity,n[i].velocity,r),from:xm(o.from,n[i].from,r)}):o,t):D3(e,n,r-1)};function $H(e,t,r,n,i,o){var l,c=n.reduce((g,v)=>Bt(Bt({},g),{},{[v]:{from:e[v],velocity:0,to:t[v]}}),{}),h=()=>Zc((g,v)=>v.from,c),f=()=>!Object.values(c).filter(vb).length,p=null,y=g=>{l||(l=g);var v=g-l,b=v/r.dt;c=D3(r,c,b),i(Bt(Bt(Bt({},e),t),h())),l=g,f()||(p=o.setTimeout(y))};return()=>(p=o.setTimeout(y),()=>{var g;(g=p)===null||g===void 0||g()})}function zH(e,t,r,n,i,o,l){var c=null,h=i.reduce((y,g)=>{var v=e[g],b=t[g];return v==null||b==null?y:Bt(Bt({},y),{},{[g]:[v,b]})},{}),f,p=y=>{f||(f=y);var g=(y-f)/n,v=Zc((w,N)=>xm(...N,r(g)),h);if(o(Bt(Bt(Bt({},e),t),v)),g<1)c=l.setTimeout(p);else{var b=Zc((w,N)=>xm(...N,r(1)),h);o(Bt(Bt(Bt({},e),t),b))}};return()=>(c=l.setTimeout(p),()=>{var y;(y=c)===null||y===void 0||y()})}const BH=(e,t,r,n,i,o)=>{var l=DH(e,t);return r==null?()=>(i(Bt(Bt({},e),t)),()=>{}):r.isStepper===!0?$H(e,t,r,l,i,o):zH(e,t,r,n,l,i,o)};var bm=1e-4,k3=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],L3=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),cC=(e,t)=>r=>{var n=k3(e,t);return L3(n,r)},UH=(e,t)=>r=>{var n=k3(e,t),i=[...n.map((o,l)=>o*l).slice(1),0];return L3(i,r)},qH=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]]},FH=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=qH(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},HH=(e,t,r,n)=>{var i=cC(e,r),o=cC(t,n),l=UH(e,r),c=f=>f>1?1:f<0?0:f,h=f=>{for(var p=f>1?1:f,y=p,g=0;g<8;++g){var v=i(y)-p,b=l(y);if(Math.abs(v-p)<bm||b<bm)return o(y);y=c(y-v/b)}return o(y)};return h.isStepper=!1,h},dC=function(){return HH(...FH(...arguments))},KH=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,h)=>{var f=-(l-c)*r,p=h*n,y=h+(f-p)*i/1e3,g=h*i/1e3+l;return Math.abs(g-c)<bm&&Math.abs(y)<bm?[c,0]:[g,y]};return o.isStepper=!0,o.dt=i,o},GH=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return dC(e);case"spring":return KH();default:if(e.split("(")[0]==="cubic-bezier")return dC(e)}return typeof e=="function"?e:null};function YH(e){var t,r=()=>null,n=!1,i=null,o=l=>{if(!n){if(Array.isArray(l)){if(!l.length)return;var c=l,[h,...f]=c;if(typeof h=="number"){i=e.setTimeout(o.bind(null,f),h);return}o(h),i=e.setTimeout(o.bind(null,f));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 VH{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 QH(){return YH(new VH)}var XH=S.createContext(QH);function WH(e,t){var r=S.useContext(XH);return S.useMemo(()=>t??r(e),[e,t,r])}var ZH={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},fC={t:0},q0={t:1};function _p(e){var t=dr(e,ZH),{isActive:r,canBegin:n,duration:i,easing:o,begin:l,onAnimationEnd:c,onAnimationStart:h,children:f}=t,p=T3(),y=r==="auto"?!Nd.isSsr&&!p:r,g=WH(t.animationId,t.animationManager),[v,b]=S.useState(y?fC:q0),w=S.useRef(null);return S.useEffect(()=>{y||b(q0)},[y]),S.useEffect(()=>{if(!y||!n)return vo;var N=BH(fC,q0,GH(o),i,b,g.getTimeoutController()),_=()=>{w.current=N()};return g.start([h,l,_,i,c]),()=>{g.stop(),w.current&&w.current(),c()}},[y,n,i,o,l,h,c,g]),f(v.t)}function Op(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=S.useRef(Kc(t)),n=S.useRef(e);return n.current!==e&&(r.current=Kc(t),n.current=e),r.current}var JH=["radius"],eK=["radius"],hC,mC,pC,yC,gC,vC,xC,bC,jC,wC;function SC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function NC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SC(Object(r),!0).forEach(function(n){tK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tK(e,t,r){return(t=rK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rK(e){var t=nK(e,"string");return typeof t=="symbol"?t:t+""}function nK(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 jm(){return jm=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},jm.apply(null,arguments)}function _C(e,t){if(e==null)return{};var r,n,i=aK(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 aK(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 OC=(e,t,r,n,i)=>{var o=Wi(r),l=Wi(n),c=Math.min(Math.abs(o)/2,Math.abs(l)/2),h=l>=0?1:-1,f=o>=0?1:-1,p=l>=0&&o>=0||l<0&&o<0?1:0,y;if(c>0&&Array.isArray(i)){for(var g=[0,0,0,0],v=0,b=4;v<b;v++){var w,N=(w=i[v])!==null&&w!==void 0?w:0;g[v]=N>c?c:N}y=Nt(hC||(hC=Xn(["M",",",""])),e,t+h*g[0]),g[0]>0&&(y+=Nt(mC||(mC=Xn(["A ",",",",0,0,",",",",",""])),g[0],g[0],p,e+f*g[0],t)),y+=Nt(pC||(pC=Xn(["L ",",",""])),e+r-f*g[1],t),g[1]>0&&(y+=Nt(yC||(yC=Xn(["A ",",",",0,0,",`,
|
|
81
|
-
`,",",""])),g[1],g[1],p,e+r,t+h*g[1])),y+=Nt(gC||(gC=Xn(["L ",",",""])),e+r,t+n-h*g[2]),g[2]>0&&(y+=Nt(vC||(vC=Xn(["A ",",",",0,0,",`,
|
|
82
|
-
`,",",""])),g[2],g[2],p,e+r-f*g[2],t+n)),y+=Nt(xC||(xC=Xn(["L ",",",""])),e+f*g[3],t+n),g[3]>0&&(y+=Nt(bC||(bC=Xn(["A ",",",",0,0,",`,
|
|
83
|
-
`,",",""])),g[3],g[3],p,e,t+n-h*g[3])),y+="Z"}else if(c>0&&i===+i&&i>0){var _=Math.min(c,i);y=Nt(jC||(jC=Xn(["M ",",",`
|
|
84
|
-
A `,",",",0,0,",",",",",`
|
|
85
|
-
L `,",",`
|
|
86
|
-
A `,",",",0,0,",",",",",`
|
|
87
|
-
L `,",",`
|
|
88
|
-
A `,",",",0,0,",",",",",`
|
|
89
|
-
L `,",",`
|
|
90
|
-
A `,",",",0,0,",",",","," Z"])),e,t+h*_,_,_,p,e+f*_,t,e+r-f*_,t,_,_,p,e+r,t+h*_,e+r,t+n-h*_,_,_,p,e+r-f*_,t+n,e+f*_,t+n,_,_,p,e,t+n-h*_)}else y=Nt(wC||(wC=Xn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return y},EC={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},I3=e=>{var t=dr(e,EC),r=S.useRef(null),[n,i]=S.useState(-1);S.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var L=r.current.getTotalLength();L&&i(L)}catch{}},[]);var{x:o,y:l,width:c,height:h,radius:f,className:p}=t,{animationEasing:y,animationDuration:g,animationBegin:v,isAnimationActive:b,isUpdateAnimationActive:w}=t,N=S.useRef(c),_=S.useRef(h),A=S.useRef(o),C=S.useRef(l),E=S.useMemo(()=>({x:o,y:l,width:c,height:h,radius:f}),[o,l,c,h,f]),T=Op(E,"rectangle-");if(o!==+o||l!==+l||c!==+c||h!==+h||c===0||h===0)return null;var R=We("recharts-rectangle",p);if(!w){var D=Er(t),{radius:M}=D,U=_C(D,JH);return S.createElement("path",jm({},U,{x:Wi(o),y:Wi(l),width:Wi(c),height:Wi(h),radius:typeof f=="number"?f:void 0,className:R,d:OC(o,l,c,h,f)}))}var k=N.current,H=_.current,B=A.current,ae=C.current,ee="0px ".concat(n===-1?1:n,"px"),ne="".concat(n,"px ").concat(n,"px"),$=M3(["strokeDasharray"],g,typeof y=="string"?y:EC.animationEasing);return S.createElement(_p,{animationId:T,key:T,canBegin:n>0,duration:g,easing:y,isActive:w,begin:v},L=>{var W=_t(k,c,L),te=_t(H,h,L),se=_t(B,o,L),I=_t(ae,l,L);r.current&&(N.current=W,_.current=te,A.current=se,C.current=I);var Q;b?L>0?Q={transition:$,strokeDasharray:ne}:Q={strokeDasharray:ee}:Q={strokeDasharray:ne};var le=Er(t),{radius:oe}=le,fe=_C(le,eK);return S.createElement("path",jm({},fe,{radius:typeof f=="number"?f:void 0,className:R,d:OC(se,I,W,te,f),ref:r,style:NC(NC({},Q),t.style)}))})};function AC(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?AC(Object(r),!0).forEach(function(n){iK(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iK(e,t,r){return(t=sK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sK(e){var t=oK(e,"string");return typeof t=="symbol"?t:t+""}function oK(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 wm=Math.PI/180,lK=e=>e*180/Math.PI,ur=(e,t,r,n)=>({x:e+Math.cos(-wm*n)*r,y:t+Math.sin(-wm*n)*r}),uK=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},cK=(e,t)=>{var{x:r,y:n}=e,{x:i,y:o}=t;return Math.sqrt((r-i)**2+(n-o)**2)},dK=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:o}=t,l=cK({x:r,y:n},{x:i,y:o});if(l<=0)return{radius:l,angle:0};var c=(r-i)/l,h=Math.acos(c);return n>o&&(h=2*Math.PI-h),{radius:l,angle:lK(h),angleInRadian:h}},fK=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}},hK=(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},mK=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:o}=dK({x:r,y:n},t),{innerRadius:l,outerRadius:c}=t;if(i<l||i>c||i===0)return null;var{startAngle:h,endAngle:f}=fK(t),p=o,y;if(h<=f){for(;p>f;)p-=360;for(;p<h;)p+=360;y=p>=h&&p<=f}else{for(;p>h;)p-=360;for(;p<f;)p+=360;y=p>=f&&p<=h}return y?CC(CC({},t),{},{radius:i,angle:hK(p,t)}):null};function $3(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:o}=e,l=ur(t,r,n,i),c=ur(t,r,n,o);return{points:[l,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:o}}var TC,PC,RC,MC,DC,kC,LC;function xb(){return xb=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},xb.apply(null,arguments)}function $s(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var pK=(e,t)=>{var r=qr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},ph=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:o,isExternal:l,cornerRadius:c,cornerIsExternal:h}=e,f=c*(l?1:-1)+n,p=Math.asin(c/f)/wm,y=h?i:i+o*p,g=ur(t,r,f,y),v=ur(t,r,n,y),b=h?i-o*p:i,w=ur(t,r,f*Math.cos(p*wm),b);return{center:g,circleTangency:v,lineTangency:w,theta:p}},z3=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:o,endAngle:l}=e,c=pK(o,l),h=o+c,f=ur(t,r,i,o),p=ur(t,r,i,h),y=Nt(TC||(TC=$s(["M ",",",`
|
|
91
|
-
A `,",",`,0,
|
|
92
|
-
`,",",`,
|
|
93
|
-
`,",",`
|
|
94
|
-
`])),f.x,f.y,i,i,+(Math.abs(c)>180),+(o>h),p.x,p.y);if(n>0){var g=ur(t,r,n,o),v=ur(t,r,n,h);y+=Nt(PC||(PC=$s(["L ",",",`
|
|
95
|
-
A `,",",`,0,
|
|
96
|
-
`,",",`,
|
|
97
|
-
`,","," Z"])),v.x,v.y,n,n,+(Math.abs(c)>180),+(o<=h),g.x,g.y)}else y+=Nt(RC||(RC=$s(["L ",","," Z"])),t,r);return y},yK=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:o,forceCornerRadius:l,cornerIsExternal:c,startAngle:h,endAngle:f}=e,p=qr(f-h),{circleTangency:y,lineTangency:g,theta:v}=ph({cx:t,cy:r,radius:i,angle:h,sign:p,cornerRadius:o,cornerIsExternal:c}),{circleTangency:b,lineTangency:w,theta:N}=ph({cx:t,cy:r,radius:i,angle:f,sign:-p,cornerRadius:o,cornerIsExternal:c}),_=c?Math.abs(h-f):Math.abs(h-f)-v-N;if(_<0)return l?Nt(MC||(MC=$s(["M ",",",`
|
|
98
|
-
a`,",",",0,0,1,",`,0
|
|
99
|
-
a`,",",",0,0,1,",`,0
|
|
100
|
-
`])),g.x,g.y,o,o,o*2,o,o,-o*2):z3({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:h,endAngle:f});var A=Nt(DC||(DC=$s(["M ",",",`
|
|
101
|
-
A`,",",",0,0,",",",",",`
|
|
102
|
-
A`,",",",0,",",",",",",",`
|
|
103
|
-
A`,",",",0,0,",",",",",`
|
|
104
|
-
`])),g.x,g.y,o,o,+(p<0),y.x,y.y,i,i,+(_>180),+(p<0),b.x,b.y,o,o,+(p<0),w.x,w.y);if(n>0){var{circleTangency:C,lineTangency:E,theta:T}=ph({cx:t,cy:r,radius:n,angle:h,sign:p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),{circleTangency:R,lineTangency:D,theta:M}=ph({cx:t,cy:r,radius:n,angle:f,sign:-p,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),U=c?Math.abs(h-f):Math.abs(h-f)-T-M;if(U<0&&o===0)return"".concat(A,"L").concat(t,",").concat(r,"Z");A+=Nt(kC||(kC=$s(["L",",",`
|
|
105
|
-
A`,",",",0,0,",",",",",`
|
|
106
|
-
A`,",",",0,",",",",",",",`
|
|
107
|
-
A`,",",",0,0,",",",",","Z"])),D.x,D.y,o,o,+(p<0),R.x,R.y,n,n,+(U>180),+(p>0),C.x,C.y,o,o,+(p<0),E.x,E.y)}else A+=Nt(LC||(LC=$s(["L",",","Z"])),t,r);return A},gK={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},B3=e=>{var t=dr(e,gK),{cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:l,forceCornerRadius:c,cornerIsExternal:h,startAngle:f,endAngle:p,className:y}=t;if(o<i||f===p)return null;var g=We("recharts-sector",y),v=o-i,b=Bn(l,v,0,!0),w;return b>0&&Math.abs(f-p)<360?w=yK({cx:r,cy:n,innerRadius:i,outerRadius:o,cornerRadius:Math.min(b,v/2),forceCornerRadius:c,cornerIsExternal:h,startAngle:f,endAngle:p}):w=z3({cx:r,cy:n,innerRadius:i,outerRadius:o,startAngle:f,endAngle:p}),S.createElement("path",xb({},Er(t),{className:g,d:w}))};function vK(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(bM(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:o,outerRadius:l,angle:c}=t,h=ur(n,i,o,c),f=ur(n,i,l,c);return[{x:h.x,y:h.y},{x:f.x,y:f.y}]}return $3(t)}}var F0={},H0={},K0={},IC;function xK(){return IC||(IC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MM();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(K0)),K0}var $C;function bK(){return $C||($C=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xK();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})(H0)),H0}var zC;function jK(){return zC||(zC=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DM(),r=bK();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),h=new Array(c);for(let f=0;f<c;f++)h[f]=i,i+=l;return h}e.range=n})(F0)),F0}var G0,BC;function wK(){return BC||(BC=1,G0=jK().range),G0}var SK=wK();const U3=ss(SK);var Hn=e=>e.chartData,Fj=V([Hn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),_d=(e,t,r,n)=>n?Fj(e):Hn(e),NK=(e,t,r)=>r?Fj(e):Hn(e),_K=V([_d],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});V([Fj],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var OK=V([Hn],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function la(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Ue(t)&&Ue(r))return!0}return!1}function UC(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function q3(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,o;if(Ue(r))i=r;else if(typeof r=="function")return;if(Ue(n))o=n;else if(typeof n=="function")return;var l=[i,o];if(la(l))return l}}function EK(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(la(n))return UC(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"&&TA.test(i)){var h=TA.exec(i);if(h==null||h[1]==null||t==null)l=void 0;else{var f=+h[1];l=t[0]-f}}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"&&PA.test(o)){var p=PA.exec(o);if(p==null||p[1]==null||t==null)c=void 0;else{var y=+p[1];c=t[1]+y}}else c=t==null?void 0:t[1];var g=[l,c];if(la(g))return t==null?g:UC(g,t,r)}}}var lu=1e9,AK={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Kj,mt=!0,An="[DecimalError] ",ro=An+"Invalid argument: ",Hj=An+"Exponent out of range: ",uu=Math.floor,Ds=Math.pow,CK=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,tn,Vt=1e7,ct=7,F3=9007199254740991,Sm=uu(F3/ct),pe={};pe.absoluteValue=pe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};pe.comparedTo=pe.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};pe.decimalPlaces=pe.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ct;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};pe.dividedBy=pe.div=function(e){return Ya(this,new this.constructor(e))};pe.dividedToIntegerBy=pe.idiv=function(e){var t=this,r=t.constructor;return at(Ya(t,new r(e),0,1),r.precision)};pe.equals=pe.eq=function(e){return!this.cmp(e)};pe.exponent=function(){return Lt(this)};pe.greaterThan=pe.gt=function(e){return this.cmp(e)>0};pe.greaterThanOrEqualTo=pe.gte=function(e){return this.cmp(e)>=0};pe.isInteger=pe.isint=function(){return this.e>this.d.length-2};pe.isNegative=pe.isneg=function(){return this.s<0};pe.isPositive=pe.ispos=function(){return this.s>0};pe.isZero=function(){return this.s===0};pe.lessThan=pe.lt=function(e){return this.cmp(e)<0};pe.lessThanOrEqualTo=pe.lte=function(e){return this.cmp(e)<1};pe.logarithm=pe.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(An+"NaN");if(r.s<1)throw Error(An+(r.s?"NaN":"-Infinity"));return r.eq(tn)?new n(0):(mt=!1,t=Ya(Jc(r,o),Jc(e,o),o),mt=!0,at(t,i))};pe.minus=pe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?G3(t,e):H3(t,(e.s=-e.s,e))};pe.modulo=pe.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(An+"NaN");return r.s?(mt=!1,t=Ya(r,e,0,1).times(e),mt=!0,r.minus(t)):at(new n(r),i)};pe.naturalExponential=pe.exp=function(){return K3(this)};pe.naturalLogarithm=pe.ln=function(){return Jc(this)};pe.negated=pe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};pe.plus=pe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?H3(t,e):G3(t,(e.s=-e.s,e))};pe.precision=pe.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ro+e);if(t=Lt(i)+1,n=i.d.length-1,r=n*ct+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};pe.squareRoot=pe.sqrt=function(){var e,t,r,n,i,o,l,c=this,h=c.constructor;if(c.s<1){if(!c.s)return new h(0);throw Error(An+"NaN")}for(e=Lt(c),mt=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=oa(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=uu((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 h(t)):n=new h(i.toString()),r=h.precision,i=l=r+3;;)if(o=n,n=o.plus(Ya(c,o,l+2)).times(.5),oa(o.d).slice(0,l)===(t=oa(n.d)).slice(0,l)){if(t=t.slice(l-3,l+1),i==l&&t=="4999"){if(at(o,r+1,0),o.times(o).eq(c)){n=o;break}}else if(t!="9999")break;l+=4}return mt=!0,at(n,r)};pe.times=pe.mul=function(e){var t,r,n,i,o,l,c,h,f,p=this,y=p.constructor,g=p.d,v=(e=new y(e)).d;if(!p.s||!e.s)return new y(0);for(e.s*=p.s,r=p.e+e.e,h=g.length,f=v.length,h<f&&(o=g,g=v,v=o,l=h,h=f,f=l),o=[],l=h+f,n=l;n--;)o.push(0);for(n=f;--n>=0;){for(t=0,i=h+n;i>n;)c=o[i]+v[n]*g[i-n-1]+t,o[i--]=c%Vt|0,t=c/Vt|0;o[i]=(o[i]+t)%Vt|0}for(;!o[--l];)o.pop();return t?++r:o.shift(),e.d=o,e.e=r,mt?at(e,y.precision):e};pe.toDecimalPlaces=pe.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(ha(e,0,lu),t===void 0?t=n.rounding:ha(t,0,8),at(r,e+Lt(r)+1,t))};pe.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=fo(n,!0):(ha(e,0,lu),t===void 0?t=i.rounding:ha(t,0,8),n=at(new i(n),e+1,t),r=fo(n,!0,e+1)),r};pe.toFixed=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?fo(i):(ha(e,0,lu),t===void 0?t=o.rounding:ha(t,0,8),n=at(new o(i),e+Lt(i)+1,t),r=fo(n.abs(),!1,e+Lt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};pe.toInteger=pe.toint=function(){var e=this,t=e.constructor;return at(new t(e),Lt(e)+1,t.rounding)};pe.toNumber=function(){return+this};pe.toPower=pe.pow=function(e){var t,r,n,i,o,l,c=this,h=c.constructor,f=12,p=+(e=new h(e));if(!e.s)return new h(tn);if(c=new h(c),!c.s){if(e.s<1)throw Error(An+"Infinity");return c}if(c.eq(tn))return c;if(n=h.precision,e.eq(tn))return at(c,n);if(t=e.e,r=e.d.length-1,l=t>=r,o=c.s,l){if((r=p<0?-p:p)<=F3){for(i=new h(tn),t=Math.ceil(n/ct+4),mt=!1;r%2&&(i=i.times(c),FC(i.d,t)),r=uu(r/2),r!==0;)c=c.times(c),FC(c.d,t);return mt=!0,e.s<0?new h(tn).div(i):at(i,n)}}else if(o<0)throw Error(An+"NaN");return o=o<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,mt=!1,i=e.times(Jc(c,n+f)),mt=!0,i=K3(i),i.s=o,i};pe.toPrecision=function(e,t){var r,n,i=this,o=i.constructor;return e===void 0?(r=Lt(i),n=fo(i,r<=o.toExpNeg||r>=o.toExpPos)):(ha(e,1,lu),t===void 0?t=o.rounding:ha(t,0,8),i=at(new o(i),e,t),r=Lt(i),n=fo(i,e<=r||r<=o.toExpNeg,e)),n};pe.toSignificantDigits=pe.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(ha(e,1,lu),t===void 0?t=n.rounding:ha(t,0,8)),at(new n(r),e,t)};pe.toString=pe.valueOf=pe.val=pe.toJSON=pe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Lt(e),r=e.constructor;return fo(e,t<=r.toExpNeg||t>=r.toExpPos)};function H3(e,t){var r,n,i,o,l,c,h,f,p=e.constructor,y=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),mt?at(t,y):t;if(h=e.d,f=t.d,l=e.e,i=t.e,h=h.slice(),o=l-i,o){for(o<0?(n=h,o=-o,c=f.length):(n=f,i=l,c=h.length),l=Math.ceil(y/ct),c=l>c?l+1:c+1,o>c&&(o=c,n.length=1),n.reverse();o--;)n.push(0);n.reverse()}for(c=h.length,o=f.length,c-o<0&&(o=c,n=f,f=h,h=n),r=0;o;)r=(h[--o]=h[o]+f[o]+r)/Vt|0,h[o]%=Vt;for(r&&(h.unshift(r),++i),c=h.length;h[--c]==0;)h.pop();return t.d=h,t.e=i,mt?at(t,y):t}function ha(e,t,r){if(e!==~~e||e<t||e>r)throw Error(ro+e)}function oa(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=ct-n.length,r&&(o+=Li(r)),o+=n;l=e[t],n=l+"",r=ct-n.length,r&&(o+=Li(r))}else if(l===0)return"0";for(;l%10===0;)l/=10;return o+l}var Ya=(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%Vt|0,l=o/Vt|0;return l&&n.unshift(l),n}function t(n,i,o,l){var c,h;if(o!=l)h=o>l?1:-1;else for(c=h=0;c<o;c++)if(n[c]!=i[c]){h=n[c]>i[c]?1:-1;break}return h}function r(n,i,o){for(var l=0;o--;)n[o]-=l,l=n[o]<i[o]?1:0,n[o]=l*Vt+n[o]-i[o];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,o,l){var c,h,f,p,y,g,v,b,w,N,_,A,C,E,T,R,D,M,U=n.constructor,k=n.s==i.s?1:-1,H=n.d,B=i.d;if(!n.s)return new U(n);if(!i.s)throw Error(An+"Division by zero");for(h=n.e-i.e,D=B.length,T=H.length,v=new U(k),b=v.d=[],f=0;B[f]==(H[f]||0);)++f;if(B[f]>(H[f]||0)&&--h,o==null?A=o=U.precision:l?A=o+(Lt(n)-Lt(i))+1:A=o,A<0)return new U(0);if(A=A/ct+2|0,f=0,D==1)for(p=0,B=B[0],A++;(f<T||p)&&A--;f++)C=p*Vt+(H[f]||0),b[f]=C/B|0,p=C%B|0;else{for(p=Vt/(B[0]+1)|0,p>1&&(B=e(B,p),H=e(H,p),D=B.length,T=H.length),E=D,w=H.slice(0,D),N=w.length;N<D;)w[N++]=0;M=B.slice(),M.unshift(0),R=B[0],B[1]>=Vt/2&&++R;do p=0,c=t(B,w,D,N),c<0?(_=w[0],D!=N&&(_=_*Vt+(w[1]||0)),p=_/R|0,p>1?(p>=Vt&&(p=Vt-1),y=e(B,p),g=y.length,N=w.length,c=t(y,w,g,N),c==1&&(p--,r(y,D<g?M:B,g))):(p==0&&(c=p=1),y=B.slice()),g=y.length,g<N&&y.unshift(0),r(w,y,N),c==-1&&(N=w.length,c=t(B,w,D,N),c<1&&(p++,r(w,D<N?M:B,N))),N=w.length):c===0&&(p++,w=[0]),b[f++]=p,c&&w[0]?w[N++]=H[E]||0:(w=[H[E]],N=1);while((E++<T||w[0]!==void 0)&&A--)}return b[0]||b.shift(),v.e=h,at(v,l?o+Lt(v)+1:o)}})();function K3(e,t){var r,n,i,o,l,c,h=0,f=0,p=e.constructor,y=p.precision;if(Lt(e)>16)throw Error(Hj+Lt(e));if(!e.s)return new p(tn);for(mt=!1,c=y,l=new p(.03125);e.abs().gte(.1);)e=e.times(l),f+=5;for(n=Math.log(Ds(2,f))/Math.LN10*2+5|0,c+=n,r=i=o=new p(tn),p.precision=c;;){if(i=at(i.times(e),c),r=r.times(++h),l=o.plus(Ya(i,r,c)),oa(l.d).slice(0,c)===oa(o.d).slice(0,c)){for(;f--;)o=at(o.times(o),c);return p.precision=y,t==null?(mt=!0,at(o,y)):o}o=l}}function Lt(e){for(var t=e.e*ct,r=e.d[0];r>=10;r/=10)t++;return t}function Y0(e,t,r){if(t>e.LN10.sd())throw mt=!0,r&&(e.precision=r),Error(An+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function Li(e){for(var t="";e--;)t+="0";return t}function Jc(e,t){var r,n,i,o,l,c,h,f,p,y=1,g=10,v=e,b=v.d,w=v.constructor,N=w.precision;if(v.s<1)throw Error(An+(v.s?"NaN":"-Infinity"));if(v.eq(tn))return new w(0);if(t==null?(mt=!1,f=N):f=t,v.eq(10))return t==null&&(mt=!0),Y0(w,f);if(f+=g,w.precision=f,r=oa(b),n=r.charAt(0),o=Lt(v),Math.abs(o)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)v=v.times(e),r=oa(v.d),n=r.charAt(0),y++;o=Lt(v),n>1?(v=new w("0."+r),o++):v=new w(n+"."+r.slice(1))}else return h=Y0(w,f+2,N).times(o+""),v=Jc(new w(n+"."+r.slice(1)),f-g).plus(h),w.precision=N,t==null?(mt=!0,at(v,N)):v;for(c=l=v=Ya(v.minus(tn),v.plus(tn),f),p=at(v.times(v),f),i=3;;){if(l=at(l.times(p),f),h=c.plus(Ya(l,new w(i),f)),oa(h.d).slice(0,f)===oa(c.d).slice(0,f))return c=c.times(2),o!==0&&(c=c.plus(Y0(w,f+2,N).times(o+""))),c=Ya(c,new w(y),f),w.precision=N,t==null?(mt=!0,at(c,N)):c;c=h,i+=2}}function qC(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=uu(r/ct),e.d=[],n=(r+1)%ct,r<0&&(n+=ct),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ct;n<i;)e.d.push(+t.slice(n,n+=ct));t=t.slice(n),n=ct-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),mt&&(e.e>Sm||e.e<-Sm))throw Error(Hj+r)}else e.s=0,e.e=0,e.d=[0];return e}function at(e,t,r){var n,i,o,l,c,h,f,p,y=e.d;for(l=1,o=y[0];o>=10;o/=10)l++;if(n=t-l,n<0)n+=ct,i=t,f=y[p=0];else{if(p=Math.ceil((n+1)/ct),o=y.length,p>=o)return e;for(f=o=y[p],l=1;o>=10;o/=10)l++;n%=ct,i=n-ct+l}if(r!==void 0&&(o=Ds(10,l-i-1),c=f/o%10|0,h=t<0||y[p+1]!==void 0||f%o,h=r<4?(c||h)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||h||r==6&&(n>0?i>0?f/Ds(10,l-i):0:y[p-1])%10&1||r==(e.s<0?8:7))),t<1||!y[0])return h?(o=Lt(e),y.length=1,t=t-o-1,y[0]=Ds(10,(ct-t%ct)%ct),e.e=uu(-t/ct)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(n==0?(y.length=p,o=1,p--):(y.length=p+1,o=Ds(10,ct-n),y[p]=i>0?(f/Ds(10,l-i)%Ds(10,i)|0)*o:0),h)for(;;)if(p==0){(y[0]+=o)==Vt&&(y[0]=1,++e.e);break}else{if(y[p]+=o,y[p]!=Vt)break;y[p--]=0,o=1}for(n=y.length;y[--n]===0;)y.pop();if(mt&&(e.e>Sm||e.e<-Sm))throw Error(Hj+Lt(e));return e}function G3(e,t){var r,n,i,o,l,c,h,f,p,y,g=e.constructor,v=g.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new g(e),mt?at(t,v):t;if(h=e.d,y=t.d,n=t.e,f=e.e,h=h.slice(),l=f-n,l){for(p=l<0,p?(r=h,l=-l,c=y.length):(r=y,n=f,c=h.length),i=Math.max(Math.ceil(v/ct),c)+2,l>i&&(l=i,r.length=1),r.reverse(),i=l;i--;)r.push(0);r.reverse()}else{for(i=h.length,c=y.length,p=i<c,p&&(c=i),i=0;i<c;i++)if(h[i]!=y[i]){p=h[i]<y[i];break}l=0}for(p&&(r=h,h=y,y=r,t.s=-t.s),c=h.length,i=y.length-c;i>0;--i)h[c++]=0;for(i=y.length;i>l;){if(h[--i]<y[i]){for(o=i;o&&h[--o]===0;)h[o]=Vt-1;--h[o],h[i]+=Vt}h[i]-=y[i]}for(;h[--c]===0;)h.pop();for(;h[0]===0;h.shift())--n;return h[0]?(t.d=h,t.e=n,mt?at(t,v):t):new g(0)}function fo(e,t,r){var n,i=Lt(e),o=oa(e.d),l=o.length;return t?(r&&(n=r-l)>0?o=o.charAt(0)+"."+o.slice(1)+Li(n):l>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Li(-i-1)+o,r&&(n=r-l)>0&&(o+=Li(n))):i>=l?(o+=Li(i+1-l),r&&(n=r-i-1)>0&&(o=o+"."+Li(n))):((n=i+1)<l&&(o=o.slice(0,n)+"."+o.slice(n)),r&&(n=r-l)>0&&(i+1===l&&(o+="."),o+=Li(n))),e.s<0?"-"+o:o}function FC(e,t){if(e.length>t)return e.length=t,!0}function Y3(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(ro+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 qC(l,o.toString())}else if(typeof o!="string")throw Error(ro+o);if(o.charCodeAt(0)===45?(o=o.slice(1),l.s=-1):l.s=1,CK.test(o))qC(l,o);else throw Error(ro+o)}if(i.prototype=pe,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=Y3,i.config=i.set=TK,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 TK(e){if(!e||typeof e!="object")throw Error(An+"Object expected");var t,r,n,i=["precision",1,lu,"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(uu(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(ro+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(ro+r+": "+n);return this}var Kj=Y3(AK);tn=new Kj(1);const Be=Kj;function V3(e){var t;return e===0?t=1:t=Math.floor(new Be(e).abs().log(10).toNumber())+1,t}function Q3(e,t,r){for(var n=new Be(e),i=0,o=[];n.lt(t)&&i<1e5;)o.push(n.toNumber()),n=n.add(r),i++;return o}var X3=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Gj=(e,t,r)=>{if(e.lte(0))return new Be(0);var n=V3(e.toNumber()),i=new Be(10).pow(n),o=e.div(i),l=n!==1?.05:.1,c=new Be(Math.ceil(o.div(l).toNumber())).add(r).mul(l),h=c.mul(i);return t?new Be(h.toNumber()):new Be(Math.ceil(h.toNumber()))},W3=(e,t,r)=>{var n;if(e.lte(0))return new Be(0);var i=[1,2,2.5,5],o=e.toNumber(),l=Math.floor(new Be(o).abs().log(10).toNumber()),c=new Be(10).pow(l),h=e.div(c).toNumber(),f=i.findIndex(v=>v>=h-1e-10);if(f===-1&&(c=c.mul(10),f=0),f+=r,f>=i.length){var p=Math.floor(f/i.length);f%=i.length,c=c.mul(new Be(10).pow(p))}var y=(n=i[f])!==null&&n!==void 0?n:1,g=new Be(y).mul(c);return t?g:new Be(Math.ceil(g.toNumber()))},PK=(e,t,r)=>{var n=new Be(1),i=new Be(e);if(!i.isint()&&r){var o=Math.abs(e);o<1?(n=new Be(10).pow(V3(e)-1),i=new Be(Math.floor(i.div(n).toNumber())).mul(n)):o>1&&(i=new Be(Math.floor(e)))}else e===0?i=new Be(Math.floor((t-1)/2)):r||(i=new Be(Math.floor(e)));for(var l=Math.floor((t-1)/2),c=[],h=0;h<t;h++)c.push(i.add(new Be(h-l).mul(n)).toNumber());return c},Z3=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]:Gj;if(!Number.isFinite((r-t)/(n-1)))return{step:new Be(0),tickMin:new Be(0),tickMax:new Be(0)};var c=l(new Be(r).sub(t).div(n-1),i,o),h;t<=0&&r>=0?h=new Be(0):(h=new Be(t).add(r).div(2),h=h.sub(new Be(h).mod(c)));var f=Math.ceil(h.sub(t).div(c).toNumber()),p=Math.ceil(new Be(r).sub(h).div(c).toNumber()),y=f+p+1;return y>n?Z3(t,r,n,i,o+1,l):(y<n&&(p=r>0?p+(n-y):p,f=r>0?f:f+(n-y)),{step:c,tickMin:h.sub(new Be(f).mul(c)),tickMax:h.add(new Be(p).mul(c))})},HC=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),[h,f]=X3([r,n]);if(h===-1/0||f===1/0){var p=f===1/0?[h,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),f];return r>n?p.reverse():p}if(h===f)return PK(h,i,o);var y=l==="snap125"?W3:Gj,{step:g,tickMin:v,tickMax:b}=Z3(h,f,c,o,0,y),w=Q3(v,b.add(new Be(.1).mul(g)),g);return r>n?w.reverse():w},KC=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,h]=X3([n,i]);if(c===-1/0||h===1/0)return[n,i];if(c===h)return[c];var f=l==="snap125"?W3:Gj,p=Math.max(r,2),y=f(new Be(h).sub(c).div(p-1),o,0),g=[...Q3(new Be(c),new Be(h),y),h];return o===!1&&(g=g.map(v=>Math.round(v))),n>i?g.reverse():g},J3=e=>e.rootProps.maxBarSize,RK=e=>e.rootProps.barGap,e4=e=>e.rootProps.barCategoryGap,MK=e=>e.rootProps.barSize,Ep=e=>e.rootProps.stackOffset,t4=e=>e.rootProps.reverseStackOrder,Yj=e=>e.options.chartName,Vj=e=>e.rootProps.syncId,r4=e=>e.rootProps.syncMethod,Qj=e=>e.options.eventEmitter,Qt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},As={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"},Ap=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Cp(e,t,r){if(r!=="auto")return r;if(e!=null)return ei(e,t)?"category":"number"}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 Nm(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){DK(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 DK(e,t,r){return(t=kK(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kK(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)}var YC={allowDataOverflow:As.allowDataOverflow,allowDecimals:As.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:As.angleAxisId,includeHidden:!1,name:void 0,reversed:As.reversed,scale:As.scale,tick:As.tick,tickCount:void 0,ticks:void 0,type:As.type,unit:void 0,niceTicks:"auto"},VC={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"},IK=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Xj=V([IK,j3],(e,t)=>{var r;if(e!=null)return e;var n=(r=Cp(t,"angleAxis",YC.type))!==null&&r!==void 0?r:"category";return Nm(Nm({},YC),{},{type:n})}),$K=(e,t)=>e.polarAxis.radiusAxis[t],Wj=V([$K,j3],(e,t)=>{var r;if(e!=null)return e;var n=(r=Cp(t,"radiusAxis",VC.type))!==null&&r!==void 0?r:"category";return Nm(Nm({},VC),{},{type:n})}),Tp=e=>e.polarOptions,Zj=V([ti,ri,Wt],uK),n4=V([Tp,Zj],(e,t)=>{if(e!=null)return Bn(e.innerRadius,t,0)}),a4=V([Tp,Zj],(e,t)=>{if(e!=null)return Bn(e.outerRadius,t,t*.8)}),zK=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},i4=V([Tp],zK);V([Xj,i4],Ap);var s4=V([Zj,n4,a4],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});V([Wj,s4],Ap);var o4=V([Ze,Tp,n4,a4,ti,ri],(e,t,r,n,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:l,cy:c,startAngle:h,endAngle:f}=t;return{cx:Bn(l,i,i/2),cy:Bn(c,o,o/2),innerRadius:r,outerRadius:n,startAngle:h,endAngle:f,clockWise:!1}}}),Zt=(e,t)=>t,Pp=(e,t,r)=>r;function Jj(e){return e==null?void 0:e.id}function l4(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=r,l=new Map;return e.forEach(c=>{var h,f=(h=c.data)!==null&&h!==void 0?h:n;if(!(f==null||f.length===0)){var p=Jj(c);f.forEach((y,g)=>{var v=o==null||i?g:String(Pt(y,o,null)),b=Pt(y,c.dataKey,0),w;l.has(v)?w=l.get(v):w={},Object.assign(w,{[p]:b}),l.set(v,w)})}}),Array.from(l.values())}function Rp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Mp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Dp(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function BK(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 Jt=e=>{var t=Ze(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},cu=e=>e.tooltip.settings.axisId;function ew(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 h=e.bandwidth();switch(l.position){case"middle":c+=h/2;break;case"end":c+=h;break}}return c}}}}}var UK=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!la(t)){for(var r,n,i=0;i<t.length;i++){var o=t[i];Ue(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 ts(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function qK(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tw(e){let t,r,n;e.length!==2?(t=ts,r=(c,h)=>ts(e(c),h),n=(c,h)=>e(c)-h):(t=e===ts||e===qK?e:FK,r=e,n=e);function i(c,h,f=0,p=c.length){if(f<p){if(t(h,h)!==0)return p;do{const y=f+p>>>1;r(c[y],h)<0?f=y+1:p=y}while(f<p)}return f}function o(c,h,f=0,p=c.length){if(f<p){if(t(h,h)!==0)return p;do{const y=f+p>>>1;r(c[y],h)<=0?f=y+1:p=y}while(f<p)}return f}function l(c,h,f=0,p=c.length){const y=i(c,h,f,p-1);return y>f&&n(c[y-1],h)>-n(c[y],h)?y-1:y}return{left:i,center:l,right:o}}function FK(){return 0}function u4(e){return e===null?NaN:+e}function*HK(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const KK=tw(ts),Od=KK.right;tw(u4).center;class QC extends Map{constructor(t,r=VK){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(XC(this,t))}has(t){return super.has(XC(this,t))}set(t,r){return super.set(GK(this,t),r)}delete(t){return super.delete(YK(this,t))}}function XC({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function GK({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function YK({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function VK(e){return e!==null&&typeof e=="object"?e.valueOf():e}function QK(e=ts){if(e===ts)return c4;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 c4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const XK=Math.sqrt(50),WK=Math.sqrt(10),ZK=Math.sqrt(2);function _m(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>=XK?10:o>=WK?5:o>=ZK?2:1;let c,h,f;return i<0?(f=Math.pow(10,-i)/l,c=Math.round(e*f),h=Math.round(t*f),c/f<e&&++c,h/f>t&&--h,f=-f):(f=Math.pow(10,i)*l,c=Math.round(e/f),h=Math.round(t/f),c*f<e&&++c,h*f>t&&--h),h<c&&.5<=r&&r<2?_m(e,t,r*2):[c,h,f]}function bb(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?_m(t,e,r):_m(e,t,r);if(!(o>=i))return[];const c=o-i+1,h=new Array(c);if(n)if(l<0)for(let f=0;f<c;++f)h[f]=(o-f)/-l;else for(let f=0;f<c;++f)h[f]=(o-f)*l;else if(l<0)for(let f=0;f<c;++f)h[f]=(i+f)/-l;else for(let f=0;f<c;++f)h[f]=(i+f)*l;return h}function jb(e,t,r){return t=+t,e=+e,r=+r,_m(e,t,r)[2]}function wb(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?jb(t,e,r):jb(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function WC(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function ZC(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function d4(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?c4:QK(i);n>r;){if(n-r>600){const h=n-r+1,f=t-r+1,p=Math.log(h),y=.5*Math.exp(2*p/3),g=.5*Math.sqrt(p*y*(h-y)/h)*(f-h/2<0?-1:1),v=Math.max(r,Math.floor(t-f*y/h+g)),b=Math.min(n,Math.floor(t+(h-f)*y/h+g));d4(e,t,v,b,i)}const o=e[t];let l=r,c=n;for(bc(e,r,t),i(e[n],o)>0&&bc(e,r,n);l<c;){for(bc(e,l,c),++l,--c;i(e[l],o)<0;)++l;for(;i(e[c],o)>0;)--c}i(e[r],o)===0?bc(e,r,c):(++c,bc(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function bc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function JK(e,t,r){if(e=Float64Array.from(HK(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return ZC(e);if(t>=1)return WC(e);var n,i=(n-1)*t,o=Math.floor(i),l=WC(d4(e,o).subarray(0,o+1)),c=ZC(e.subarray(o+1));return l+(c-l)*(i-o)}}function eG(e,t,r=u4){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 tG(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 Cn(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ni(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const Sb=Symbol("implicit");function rw(){var e=new QC,t=[],r=[],n=Sb;function i(o){let l=e.get(o);if(l===void 0){if(n!==Sb)return n;e.set(o,l=t.push(o)-1)}return r[l%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new QC;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 rw(t,r).unknown(n)},Cn.apply(i,arguments),i}function nw(){var e=rw().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,o,l,c=!1,h=0,f=0,p=.5;delete e.unknown;function y(){var g=t().length,v=i<n,b=v?i:n,w=v?n:i;o=(w-b)/Math.max(1,g-h+f*2),c&&(o=Math.floor(o)),b+=(w-b-o*(g-h))*p,l=o*(1-h),c&&(b=Math.round(b),l=Math.round(l));var N=tG(g).map(function(_){return b+o*_});return r(v?N.reverse():N)}return e.domain=function(g){return arguments.length?(t(g),y()):t()},e.range=function(g){return arguments.length?([n,i]=g,n=+n,i=+i,y()):[n,i]},e.rangeRound=function(g){return[n,i]=g,n=+n,i=+i,c=!0,y()},e.bandwidth=function(){return l},e.step=function(){return o},e.round=function(g){return arguments.length?(c=!!g,y()):c},e.padding=function(g){return arguments.length?(h=Math.min(1,f=+g),y()):h},e.paddingInner=function(g){return arguments.length?(h=Math.min(1,g),y()):h},e.paddingOuter=function(g){return arguments.length?(f=+g,y()):f},e.align=function(g){return arguments.length?(p=Math.max(0,Math.min(1,g)),y()):p},e.copy=function(){return nw(t(),[n,i]).round(c).paddingInner(h).paddingOuter(f).align(p)},Cn.apply(y(),arguments)}function f4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return f4(t())},e}function rG(){return f4(nw.apply(null,arguments).paddingInner(1))}function aw(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function h4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ed(){}var ed=.7,Om=1/ed,El="\\s*([+-]?\\d+)\\s*",td="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ua="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",nG=/^#([0-9a-f]{3,8})$/,aG=new RegExp(`^rgb\\(${El},${El},${El}\\)$`),iG=new RegExp(`^rgb\\(${ua},${ua},${ua}\\)$`),sG=new RegExp(`^rgba\\(${El},${El},${El},${td}\\)$`),oG=new RegExp(`^rgba\\(${ua},${ua},${ua},${td}\\)$`),lG=new RegExp(`^hsl\\(${td},${ua},${ua}\\)$`),uG=new RegExp(`^hsla\\(${td},${ua},${ua},${td}\\)$`),JC={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};aw(Ed,rd,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:eT,formatHex:eT,formatHex8:cG,formatHsl:dG,formatRgb:tT,toString:tT});function eT(){return this.rgb().formatHex()}function cG(){return this.rgb().formatHex8()}function dG(){return m4(this).formatHsl()}function tT(){return this.rgb().formatRgb()}function rd(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=nG.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?rT(t):r===3?new Hr(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?yh(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?yh(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=aG.exec(e))?new Hr(t[1],t[2],t[3],1):(t=iG.exec(e))?new Hr(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=sG.exec(e))?yh(t[1],t[2],t[3],t[4]):(t=oG.exec(e))?yh(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=lG.exec(e))?iT(t[1],t[2]/100,t[3]/100,1):(t=uG.exec(e))?iT(t[1],t[2]/100,t[3]/100,t[4]):JC.hasOwnProperty(e)?rT(JC[e]):e==="transparent"?new Hr(NaN,NaN,NaN,0):null}function rT(e){return new Hr(e>>16&255,e>>8&255,e&255,1)}function yh(e,t,r,n){return n<=0&&(e=t=r=NaN),new Hr(e,t,r,n)}function fG(e){return e instanceof Ed||(e=rd(e)),e?(e=e.rgb(),new Hr(e.r,e.g,e.b,e.opacity)):new Hr}function Nb(e,t,r,n){return arguments.length===1?fG(e):new Hr(e,t,r,n??1)}function Hr(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}aw(Hr,Nb,h4(Ed,{brighter(e){return e=e==null?Om:Math.pow(Om,e),new Hr(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ed:Math.pow(ed,e),new Hr(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Hr(no(this.r),no(this.g),no(this.b),Em(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:nT,formatHex:nT,formatHex8:hG,formatRgb:aT,toString:aT}));function nT(){return`#${zs(this.r)}${zs(this.g)}${zs(this.b)}`}function hG(){return`#${zs(this.r)}${zs(this.g)}${zs(this.b)}${zs((isNaN(this.opacity)?1:this.opacity)*255)}`}function aT(){const e=Em(this.opacity);return`${e===1?"rgb(":"rgba("}${no(this.r)}, ${no(this.g)}, ${no(this.b)}${e===1?")":`, ${e})`}`}function Em(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function no(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function zs(e){return e=no(e),(e<16?"0":"")+e.toString(16)}function iT(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new In(e,t,r,n)}function m4(e){if(e instanceof In)return new In(e.h,e.s,e.l,e.opacity);if(e instanceof Ed||(e=rd(e)),!e)return new In;if(e instanceof In)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,h=(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/=h<.5?o+i:2-o-i,l*=60):c=h>0&&h<1?0:l,new In(l,c,h,e.opacity)}function mG(e,t,r,n){return arguments.length===1?m4(e):new In(e,t,r,n??1)}function In(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}aw(In,mG,h4(Ed,{brighter(e){return e=e==null?Om:Math.pow(Om,e),new In(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ed:Math.pow(ed,e),new In(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 Hr(V0(e>=240?e-240:e+120,i,n),V0(e,i,n),V0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new In(sT(this.h),gh(this.s),gh(this.l),Em(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=Em(this.opacity);return`${e===1?"hsl(":"hsla("}${sT(this.h)}, ${gh(this.s)*100}%, ${gh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function sT(e){return e=(e||0)%360,e<0?e+360:e}function gh(e){return Math.max(0,Math.min(1,e||0))}function V0(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 iw=e=>()=>e;function pG(e,t){return function(r){return e+r*t}}function yG(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 gG(e){return(e=+e)==1?p4:function(t,r){return r-t?yG(t,r,e):iw(isNaN(t)?r:t)}}function p4(e,t){var r=t-e;return r?pG(e,r):iw(isNaN(e)?t:e)}const oT=(function e(t){var r=gG(t);function n(i,o){var l=r((i=Nb(i)).r,(o=Nb(o)).r),c=r(i.g,o.g),h=r(i.b,o.b),f=p4(i.opacity,o.opacity);return function(p){return i.r=l(p),i.g=c(p),i.b=h(p),i.opacity=f(p),i+""}}return n.gamma=e,n})(1);function vG(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 xG(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function bG(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]=du(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 jG(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function Am(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function wG(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]=du(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var _b=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Q0=new RegExp(_b.source,"g");function SG(e){return function(){return e}}function NG(e){return function(t){return e(t)+""}}function _G(e,t){var r=_b.lastIndex=Q0.lastIndex=0,n,i,o,l=-1,c=[],h=[];for(e=e+"",t=t+"";(n=_b.exec(e))&&(i=Q0.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,h.push({i:l,x:Am(n,i)})),r=Q0.lastIndex;return r<t.length&&(o=t.slice(r),c[l]?c[l]+=o:c[++l]=o),c.length<2?h[0]?NG(h[0].x):SG(t):(t=h.length,function(f){for(var p=0,y;p<t;++p)c[(y=h[p]).i]=y.x(f);return c.join("")})}function du(e,t){var r=typeof t,n;return t==null||r==="boolean"?iw(t):(r==="number"?Am:r==="string"?(n=rd(t))?(t=n,oT):_G:t instanceof rd?oT:t instanceof Date?jG:xG(t)?vG:Array.isArray(t)?bG:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?wG:Am)(e,t)}function sw(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function OG(e,t){t===void 0&&(t=e,e=du);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 EG(e){return function(){return e}}function Cm(e){return+e}var lT=[0,1];function _r(e){return e}function Ob(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:EG(isNaN(t)?NaN:.5)}function AG(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function CG(e,t,r){var n=e[0],i=e[1],o=t[0],l=t[1];return i<n?(n=Ob(i,n),o=r(l,o)):(n=Ob(n,i),o=r(o,l)),function(c){return o(n(c))}}function TG(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]=Ob(e[l],e[l+1]),o[l]=r(t[l],t[l+1]);return function(c){var h=Od(e,c,1,n)-1;return o[h](i[h](c))}}function Ad(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function kp(){var e=lT,t=lT,r=du,n,i,o,l=_r,c,h,f;function p(){var g=Math.min(e.length,t.length);return l!==_r&&(l=AG(e[0],e[g-1])),c=g>2?TG:CG,h=f=null,y}function y(g){return g==null||isNaN(g=+g)?o:(h||(h=c(e.map(n),t,r)))(n(l(g)))}return y.invert=function(g){return l(i((f||(f=c(t,e.map(n),Am)))(g)))},y.domain=function(g){return arguments.length?(e=Array.from(g,Cm),p()):e.slice()},y.range=function(g){return arguments.length?(t=Array.from(g),p()):t.slice()},y.rangeRound=function(g){return t=Array.from(g),r=sw,p()},y.clamp=function(g){return arguments.length?(l=g?!0:_r,p()):l!==_r},y.interpolate=function(g){return arguments.length?(r=g,p()):r},y.unknown=function(g){return arguments.length?(o=g,y):o},function(g,v){return n=g,i=v,p()}}function ow(){return kp()(_r,_r)}function PG(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Tm(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 Wl(e){return e=Tm(Math.abs(e)),e?e[1]:NaN}function RG(e,t){return function(r,n){for(var i=r.length,o=[],l=0,c=e[0],h=0;i>0&&c>0&&(h+c+1>n&&(c=Math.max(1,n-h)),o.push(r.substring(i-=c,i+c)),!((h+=c+1)>n));)c=e[l=(l+1)%e.length];return o.reverse().join(t)}}function MG(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var DG=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function nd(e){if(!(t=DG.exec(e)))throw new Error("invalid format: "+e);var t;return new lw({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]})}nd.prototype=lw.prototype;function lw(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+""}lw.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 kG(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var Pm;function LG(e,t){var r=Tm(e,t);if(!r)return Pm=void 0,e.toPrecision(t);var n=r[0],i=r[1],o=i-(Pm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,l=n.length;return o===l?n:o>l?n+new Array(o-l+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Tm(e,Math.max(0,t+o-1))[0]}function uT(e,t){var r=Tm(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 cT={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:PG,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)=>uT(e*100,t),r:uT,s:LG,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function dT(e){return e}var fT=Array.prototype.map,hT=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function IG(e){var t=e.grouping===void 0||e.thousands===void 0?dT:RG(fT.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?dT:MG(fT.call(e.numerals,String)),l=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",h=e.nan===void 0?"NaN":e.nan+"";function f(y,g){y=nd(y);var v=y.fill,b=y.align,w=y.sign,N=y.symbol,_=y.zero,A=y.width,C=y.comma,E=y.precision,T=y.trim,R=y.type;R==="n"?(C=!0,R="g"):cT[R]||(E===void 0&&(E=12),T=!0,R="g"),(_||v==="0"&&b==="=")&&(_=!0,v="0",b="=");var D=(g&&g.prefix!==void 0?g.prefix:"")+(N==="$"?r:N==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():""),M=(N==="$"?n:/[%p]/.test(R)?l:"")+(g&&g.suffix!==void 0?g.suffix:""),U=cT[R],k=/[defgprs%]/.test(R);E=E===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function H(B){var ae=D,ee=M,ne,$,L;if(R==="c")ee=U(B)+ee,B="";else{B=+B;var W=B<0||1/B<0;if(B=isNaN(B)?h:U(Math.abs(B),E),T&&(B=kG(B)),W&&+B==0&&w!=="+"&&(W=!1),ae=(W?w==="("?w:c:w==="-"||w==="("?"":w)+ae,ee=(R==="s"&&!isNaN(B)&&Pm!==void 0?hT[8+Pm/3]:"")+ee+(W&&w==="("?")":""),k){for(ne=-1,$=B.length;++ne<$;)if(L=B.charCodeAt(ne),48>L||L>57){ee=(L===46?i+B.slice(ne+1):B.slice(ne))+ee,B=B.slice(0,ne);break}}}C&&!_&&(B=t(B,1/0));var te=ae.length+B.length+ee.length,se=te<A?new Array(A-te+1).join(v):"";switch(C&&_&&(B=t(se+B,se.length?A-ee.length:1/0),se=""),b){case"<":B=ae+B+ee+se;break;case"=":B=ae+se+B+ee;break;case"^":B=se.slice(0,te=se.length>>1)+ae+B+ee+se.slice(te);break;default:B=se+ae+B+ee;break}return o(B)}return H.toString=function(){return y+""},H}function p(y,g){var v=Math.max(-8,Math.min(8,Math.floor(Wl(g)/3)))*3,b=Math.pow(10,-v),w=f((y=nd(y),y.type="f",y),{suffix:hT[8+v/3]});return function(N){return w(b*N)}}return{format:f,formatPrefix:p}}var vh,uw,y4;$G({thousands:",",grouping:[3],currency:["$",""]});function $G(e){return vh=IG(e),uw=vh.format,y4=vh.formatPrefix,vh}function zG(e){return Math.max(0,-Wl(Math.abs(e)))}function BG(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Wl(t)/3)))*3-Wl(Math.abs(e)))}function UG(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Wl(t)-Wl(e))+1}function g4(e,t,r,n){var i=wb(e,t,r),o;switch(n=nd(n??",f"),n.type){case"s":{var l=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=BG(i,l))&&(n.precision=o),y4(n,l)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=UG(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=zG(i))&&(n.precision=o-(n.type==="%")*2);break}}return uw(n)}function os(e){var t=e.domain;return e.ticks=function(r){var n=t();return bb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return g4(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],h,f,p=10;for(c<l&&(f=l,l=c,c=f,f=i,i=o,o=f);p-- >0;){if(f=jb(l,c,r),f===h)return n[i]=l,n[o]=c,t(n);if(f>0)l=Math.floor(l/f)*f,c=Math.ceil(c/f)*f;else if(f<0)l=Math.ceil(l*f)/f,c=Math.floor(c*f)/f;else break;h=f}return e},e}function v4(){var e=ow();return e.copy=function(){return Ad(e,v4())},Cn.apply(e,arguments),os(e)}function x4(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,Cm),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return x4(e).unknown(t)},e=arguments.length?Array.from(e,Cm):[0,1],os(r)}function b4(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 mT(e){return Math.log(e)}function pT(e){return Math.exp(e)}function qG(e){return-Math.log(-e)}function FG(e){return-Math.exp(-e)}function HG(e){return isFinite(e)?+("1e"+e):e<0?0:e}function KG(e){return e===10?HG:e===Math.E?Math.exp:t=>Math.pow(e,t)}function GG(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 yT(e){return(t,r)=>-e(-t,r)}function cw(e){const t=e(mT,pT),r=t.domain;let n=10,i,o;function l(){return i=GG(n),o=KG(n),r()[0]<0?(i=yT(i),o=yT(o),e(qG,FG)):e(mT,pT),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 h=r();let f=h[0],p=h[h.length-1];const y=p<f;y&&([f,p]=[p,f]);let g=i(f),v=i(p),b,w;const N=c==null?10:+c;let _=[];if(!(n%1)&&v-g<N){if(g=Math.floor(g),v=Math.ceil(v),f>0){for(;g<=v;++g)for(b=1;b<n;++b)if(w=g<0?b/o(-g):b*o(g),!(w<f)){if(w>p)break;_.push(w)}}else for(;g<=v;++g)for(b=n-1;b>=1;--b)if(w=g>0?b/o(-g):b*o(g),!(w<f)){if(w>p)break;_.push(w)}_.length*2<N&&(_=bb(f,p,N))}else _=bb(g,v,Math.min(v-g,N)).map(o);return y?_.reverse():_},t.tickFormat=(c,h)=>{if(c==null&&(c=10),h==null&&(h=n===10?"s":","),typeof h!="function"&&(!(n%1)&&(h=nd(h)).precision==null&&(h.trim=!0),h=uw(h)),c===1/0)return h;const f=Math.max(1,n*c/t.ticks().length);return p=>{let y=p/o(Math.round(i(p)));return y*n<n-.5&&(y*=n),y<=f?h(p):""}},t.nice=()=>r(b4(r(),{floor:c=>o(Math.floor(i(c))),ceil:c=>o(Math.ceil(i(c)))})),t}function j4(){const e=cw(kp()).domain([1,10]);return e.copy=()=>Ad(e,j4()).base(e.base()),Cn.apply(e,arguments),e}function gT(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function vT(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function dw(e){var t=1,r=e(gT(t),vT(t));return r.constant=function(n){return arguments.length?e(gT(t=+n),vT(t)):t},os(r)}function w4(){var e=dw(kp());return e.copy=function(){return Ad(e,w4()).constant(e.constant())},Cn.apply(e,arguments)}function xT(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function YG(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function VG(e){return e<0?-e*e:e*e}function fw(e){var t=e(_r,_r),r=1;function n(){return r===1?e(_r,_r):r===.5?e(YG,VG):e(xT(r),xT(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},os(t)}function hw(){var e=fw(kp());return e.copy=function(){return Ad(e,hw()).exponent(e.exponent())},Cn.apply(e,arguments),e}function QG(){return hw.apply(null,arguments).exponent(.5)}function bT(e){return Math.sign(e)*e*e}function XG(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function S4(){var e=ow(),t=[0,1],r=!1,n;function i(o){var l=XG(e(o));return isNaN(l)?n:r?Math.round(l):l}return i.invert=function(o){return e.invert(bT(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,Cm)).map(bT)),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 S4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Cn.apply(i,arguments),os(i)}function N4(){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]=eG(e,l/c);return o}function o(l){return l==null||isNaN(l=+l)?n:t[Od(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(ts),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 N4().domain(e).range(t).unknown(n)},Cn.apply(o,arguments)}function _4(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function l(h){return h!=null&&h<=h?i[Od(n,h,0,r)]:o}function c(){var h=-1;for(n=new Array(r);++h<r;)n[h]=((h+1)*t-(h-r)*e)/(r+1);return l}return l.domain=function(h){return arguments.length?([e,t]=h,e=+e,t=+t,c()):[e,t]},l.range=function(h){return arguments.length?(r=(i=Array.from(h)).length-1,c()):i.slice()},l.invertExtent=function(h){var f=i.indexOf(h);return f<0?[NaN,NaN]:f<1?[e,n[0]]:f>=r?[n[r-1],t]:[n[f-1],n[f]]},l.unknown=function(h){return arguments.length&&(o=h),l},l.thresholds=function(){return n.slice()},l.copy=function(){return _4().domain([e,t]).range(i).unknown(o)},Cn.apply(os(l),arguments)}function O4(){var e=[.5],t=[0,1],r,n=1;function i(o){return o!=null&&o<=o?t[Od(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 O4().domain(e).range(t).unknown(r)},Cn.apply(i,arguments)}const X0=new Date,W0=new Date;function qt(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 h=[];if(o=i.ceil(o),c=c==null?1:Math.floor(c),!(o<l)||!(c>0))return h;let f;do h.push(f=new Date(+o)),t(o,c),e(o);while(f<o&&o<l);return h},i.filter=o=>qt(l=>{if(l>=l)for(;e(l),!o(l);)l.setTime(l-1)},(l,c)=>{if(l>=l)if(c<0)for(;++c<=0;)for(;t(l,-1),!o(l););else for(;--c>=0;)for(;t(l,1),!o(l););}),r&&(i.count=(o,l)=>(X0.setTime(+o),W0.setTime(+l),e(X0),e(W0),Math.floor(r(X0,W0))),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 Rm=qt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Rm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?qt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):Rm);Rm.range;const Fa=1e3,En=Fa*60,Ha=En*60,Wa=Ha*24,mw=Wa*7,jT=Wa*30,Z0=Wa*365,Bs=qt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Fa)},(e,t)=>(t-e)/Fa,e=>e.getUTCSeconds());Bs.range;const pw=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fa)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getMinutes());pw.range;const yw=qt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*En)},(e,t)=>(t-e)/En,e=>e.getUTCMinutes());yw.range;const gw=qt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fa-e.getMinutes()*En)},(e,t)=>{e.setTime(+e+t*Ha)},(e,t)=>(t-e)/Ha,e=>e.getHours());gw.range;const vw=qt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ha)},(e,t)=>(t-e)/Ha,e=>e.getUTCHours());vw.range;const Cd=qt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*En)/Wa,e=>e.getDate()-1);Cd.range;const Lp=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wa,e=>e.getUTCDate()-1);Lp.range;const E4=qt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Wa,e=>Math.floor(e/Wa));E4.range;function bo(e){return qt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*En)/mw)}const Ip=bo(0),Mm=bo(1),WG=bo(2),ZG=bo(3),Zl=bo(4),JG=bo(5),eY=bo(6);Ip.range;Mm.range;WG.range;ZG.range;Zl.range;JG.range;eY.range;function jo(e){return qt(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)/mw)}const $p=jo(0),Dm=jo(1),tY=jo(2),rY=jo(3),Jl=jo(4),nY=jo(5),aY=jo(6);$p.range;Dm.range;tY.range;rY.range;Jl.range;nY.range;aY.range;const xw=qt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());xw.range;const bw=qt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());bw.range;const Za=qt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Za.range;const Ja=qt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:qt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Ja.range;function A4(e,t,r,n,i,o){const l=[[Bs,1,Fa],[Bs,5,5*Fa],[Bs,15,15*Fa],[Bs,30,30*Fa],[o,1,En],[o,5,5*En],[o,15,15*En],[o,30,30*En],[i,1,Ha],[i,3,3*Ha],[i,6,6*Ha],[i,12,12*Ha],[n,1,Wa],[n,2,2*Wa],[r,1,mw],[t,1,jT],[t,3,3*jT],[e,1,Z0]];function c(f,p,y){const g=p<f;g&&([f,p]=[p,f]);const v=y&&typeof y.range=="function"?y:h(f,p,y),b=v?v.range(f,+p+1):[];return g?b.reverse():b}function h(f,p,y){const g=Math.abs(p-f)/y,v=tw(([,,N])=>N).right(l,g);if(v===l.length)return e.every(wb(f/Z0,p/Z0,y));if(v===0)return Rm.every(Math.max(wb(f,p,y),1));const[b,w]=l[g/l[v-1][2]<l[v][2]/g?v-1:v];return b.every(w)}return[c,h]}const[iY,sY]=A4(Ja,bw,$p,E4,vw,yw),[oY,lY]=A4(Za,xw,Ip,Cd,gw,pw);function J0(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 ex(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 jc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function uY(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,l=e.shortDays,c=e.months,h=e.shortMonths,f=wc(i),p=Sc(i),y=wc(o),g=Sc(o),v=wc(l),b=Sc(l),w=wc(c),N=Sc(c),_=wc(h),A=Sc(h),C={a:L,A:W,b:te,B:se,c:null,d:ET,e:ET,f:RY,g:qY,G:HY,H:CY,I:TY,j:PY,L:C4,m:MY,M:DY,p:I,q:Q,Q:TT,s:PT,S:kY,u:LY,U:IY,V:$Y,w:zY,W:BY,x:null,X:null,y:UY,Y:FY,Z:KY,"%":CT},E={a:le,A:oe,b:fe,B:xe,c:null,d:AT,e:AT,f:QY,g:iV,G:oV,H:GY,I:YY,j:VY,L:P4,m:XY,M:WY,p:Se,q:Me,Q:TT,s:PT,S:ZY,u:JY,U:eV,V:tV,w:rV,W:nV,x:null,X:null,y:aV,Y:sV,Z:lV,"%":CT},T={a:k,A:H,b:B,B:ae,c:ee,d:_T,e:_T,f:_Y,g:NT,G:ST,H:OT,I:OT,j:jY,L:NY,m:bY,M:wY,p:U,q:xY,Q:EY,s:AY,S:SY,u:mY,U:pY,V:yY,w:hY,W:gY,x:ne,X:$,y:NT,Y:ST,Z:vY,"%":OY};C.x=R(r,C),C.X=R(n,C),C.c=R(t,C),E.x=R(r,E),E.X=R(n,E),E.c=R(t,E);function R(ce,de){return function(_e){var ue=[],gt=-1,Pe=0,vt=ce.length,xt,Ht,he;for(_e instanceof Date||(_e=new Date(+_e));++gt<vt;)ce.charCodeAt(gt)===37&&(ue.push(ce.slice(Pe,gt)),(Ht=wT[xt=ce.charAt(++gt)])!=null?xt=ce.charAt(++gt):Ht=xt==="e"?" ":"0",(he=de[xt])&&(xt=he(_e,Ht)),ue.push(xt),Pe=gt+1);return ue.push(ce.slice(Pe,gt)),ue.join("")}}function D(ce,de){return function(_e){var ue=jc(1900,void 0,1),gt=M(ue,ce,_e+="",0),Pe,vt;if(gt!=_e.length)return null;if("Q"in ue)return new Date(ue.Q);if("s"in ue)return new Date(ue.s*1e3+("L"in ue?ue.L:0));if(de&&!("Z"in ue)&&(ue.Z=0),"p"in ue&&(ue.H=ue.H%12+ue.p*12),ue.m===void 0&&(ue.m="q"in ue?ue.q:0),"V"in ue){if(ue.V<1||ue.V>53)return null;"w"in ue||(ue.w=1),"Z"in ue?(Pe=ex(jc(ue.y,0,1)),vt=Pe.getUTCDay(),Pe=vt>4||vt===0?Dm.ceil(Pe):Dm(Pe),Pe=Lp.offset(Pe,(ue.V-1)*7),ue.y=Pe.getUTCFullYear(),ue.m=Pe.getUTCMonth(),ue.d=Pe.getUTCDate()+(ue.w+6)%7):(Pe=J0(jc(ue.y,0,1)),vt=Pe.getDay(),Pe=vt>4||vt===0?Mm.ceil(Pe):Mm(Pe),Pe=Cd.offset(Pe,(ue.V-1)*7),ue.y=Pe.getFullYear(),ue.m=Pe.getMonth(),ue.d=Pe.getDate()+(ue.w+6)%7)}else("W"in ue||"U"in ue)&&("w"in ue||(ue.w="u"in ue?ue.u%7:"W"in ue?1:0),vt="Z"in ue?ex(jc(ue.y,0,1)).getUTCDay():J0(jc(ue.y,0,1)).getDay(),ue.m=0,ue.d="W"in ue?(ue.w+6)%7+ue.W*7-(vt+5)%7:ue.w+ue.U*7-(vt+6)%7);return"Z"in ue?(ue.H+=ue.Z/100|0,ue.M+=ue.Z%100,ex(ue)):J0(ue)}}function M(ce,de,_e,ue){for(var gt=0,Pe=de.length,vt=_e.length,xt,Ht;gt<Pe;){if(ue>=vt)return-1;if(xt=de.charCodeAt(gt++),xt===37){if(xt=de.charAt(gt++),Ht=T[xt in wT?de.charAt(gt++):xt],!Ht||(ue=Ht(ce,_e,ue))<0)return-1}else if(xt!=_e.charCodeAt(ue++))return-1}return ue}function U(ce,de,_e){var ue=f.exec(de.slice(_e));return ue?(ce.p=p.get(ue[0].toLowerCase()),_e+ue[0].length):-1}function k(ce,de,_e){var ue=v.exec(de.slice(_e));return ue?(ce.w=b.get(ue[0].toLowerCase()),_e+ue[0].length):-1}function H(ce,de,_e){var ue=y.exec(de.slice(_e));return ue?(ce.w=g.get(ue[0].toLowerCase()),_e+ue[0].length):-1}function B(ce,de,_e){var ue=_.exec(de.slice(_e));return ue?(ce.m=A.get(ue[0].toLowerCase()),_e+ue[0].length):-1}function ae(ce,de,_e){var ue=w.exec(de.slice(_e));return ue?(ce.m=N.get(ue[0].toLowerCase()),_e+ue[0].length):-1}function ee(ce,de,_e){return M(ce,t,de,_e)}function ne(ce,de,_e){return M(ce,r,de,_e)}function $(ce,de,_e){return M(ce,n,de,_e)}function L(ce){return l[ce.getDay()]}function W(ce){return o[ce.getDay()]}function te(ce){return h[ce.getMonth()]}function se(ce){return c[ce.getMonth()]}function I(ce){return i[+(ce.getHours()>=12)]}function Q(ce){return 1+~~(ce.getMonth()/3)}function le(ce){return l[ce.getUTCDay()]}function oe(ce){return o[ce.getUTCDay()]}function fe(ce){return h[ce.getUTCMonth()]}function xe(ce){return c[ce.getUTCMonth()]}function Se(ce){return i[+(ce.getUTCHours()>=12)]}function Me(ce){return 1+~~(ce.getUTCMonth()/3)}return{format:function(ce){var de=R(ce+="",C);return de.toString=function(){return ce},de},parse:function(ce){var de=D(ce+="",!1);return de.toString=function(){return ce},de},utcFormat:function(ce){var de=R(ce+="",E);return de.toString=function(){return ce},de},utcParse:function(ce){var de=D(ce+="",!0);return de.toString=function(){return ce},de}}}var wT={"-":"",_:" ",0:"0"},er=/^\s*\d+/,cY=/^%/,dY=/[\\^$*+?|[\]().{}]/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 fY(e){return e.replace(dY,"\\$&")}function wc(e){return new RegExp("^(?:"+e.map(fY).join("|")+")","i")}function Sc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function hY(e,t,r){var n=er.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function mY(e,t,r){var n=er.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function pY(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function yY(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function gY(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function ST(e,t,r){var n=er.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function NT(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function vY(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 xY(e,t,r){var n=er.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function bY(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function _T(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function jY(e,t,r){var n=er.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function OT(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function wY(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function SY(e,t,r){var n=er.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function NY(e,t,r){var n=er.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function _Y(e,t,r){var n=er.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function OY(e,t,r){var n=cY.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function EY(e,t,r){var n=er.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function AY(e,t,r){var n=er.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function ET(e,t){return Ke(e.getDate(),t,2)}function CY(e,t){return Ke(e.getHours(),t,2)}function TY(e,t){return Ke(e.getHours()%12||12,t,2)}function PY(e,t){return Ke(1+Cd.count(Za(e),e),t,3)}function C4(e,t){return Ke(e.getMilliseconds(),t,3)}function RY(e,t){return C4(e,t)+"000"}function MY(e,t){return Ke(e.getMonth()+1,t,2)}function DY(e,t){return Ke(e.getMinutes(),t,2)}function kY(e,t){return Ke(e.getSeconds(),t,2)}function LY(e){var t=e.getDay();return t===0?7:t}function IY(e,t){return Ke(Ip.count(Za(e)-1,e),t,2)}function T4(e){var t=e.getDay();return t>=4||t===0?Zl(e):Zl.ceil(e)}function $Y(e,t){return e=T4(e),Ke(Zl.count(Za(e),e)+(Za(e).getDay()===4),t,2)}function zY(e){return e.getDay()}function BY(e,t){return Ke(Mm.count(Za(e)-1,e),t,2)}function UY(e,t){return Ke(e.getFullYear()%100,t,2)}function qY(e,t){return e=T4(e),Ke(e.getFullYear()%100,t,2)}function FY(e,t){return Ke(e.getFullYear()%1e4,t,4)}function HY(e,t){var r=e.getDay();return e=r>=4||r===0?Zl(e):Zl.ceil(e),Ke(e.getFullYear()%1e4,t,4)}function KY(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Ke(t/60|0,"0",2)+Ke(t%60,"0",2)}function AT(e,t){return Ke(e.getUTCDate(),t,2)}function GY(e,t){return Ke(e.getUTCHours(),t,2)}function YY(e,t){return Ke(e.getUTCHours()%12||12,t,2)}function VY(e,t){return Ke(1+Lp.count(Ja(e),e),t,3)}function P4(e,t){return Ke(e.getUTCMilliseconds(),t,3)}function QY(e,t){return P4(e,t)+"000"}function XY(e,t){return Ke(e.getUTCMonth()+1,t,2)}function WY(e,t){return Ke(e.getUTCMinutes(),t,2)}function ZY(e,t){return Ke(e.getUTCSeconds(),t,2)}function JY(e){var t=e.getUTCDay();return t===0?7:t}function eV(e,t){return Ke($p.count(Ja(e)-1,e),t,2)}function R4(e){var t=e.getUTCDay();return t>=4||t===0?Jl(e):Jl.ceil(e)}function tV(e,t){return e=R4(e),Ke(Jl.count(Ja(e),e)+(Ja(e).getUTCDay()===4),t,2)}function rV(e){return e.getUTCDay()}function nV(e,t){return Ke(Dm.count(Ja(e)-1,e),t,2)}function aV(e,t){return Ke(e.getUTCFullYear()%100,t,2)}function iV(e,t){return e=R4(e),Ke(e.getUTCFullYear()%100,t,2)}function sV(e,t){return Ke(e.getUTCFullYear()%1e4,t,4)}function oV(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Jl(e):Jl.ceil(e),Ke(e.getUTCFullYear()%1e4,t,4)}function lV(){return"+0000"}function CT(){return"%"}function TT(e){return+e}function PT(e){return Math.floor(+e/1e3)}var ml,M4,D4;uV({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 uV(e){return ml=uY(e),M4=ml.format,ml.parse,D4=ml.utcFormat,ml.utcParse,ml}function cV(e){return new Date(e)}function dV(e){return e instanceof Date?+e:+new Date(+e)}function jw(e,t,r,n,i,o,l,c,h,f){var p=ow(),y=p.invert,g=p.domain,v=f(".%L"),b=f(":%S"),w=f("%I:%M"),N=f("%I %p"),_=f("%a %d"),A=f("%b %d"),C=f("%B"),E=f("%Y");function T(R){return(h(R)<R?v:c(R)<R?b:l(R)<R?w:o(R)<R?N:n(R)<R?i(R)<R?_:A:r(R)<R?C:E)(R)}return p.invert=function(R){return new Date(y(R))},p.domain=function(R){return arguments.length?g(Array.from(R,dV)):g().map(cV)},p.ticks=function(R){var D=g();return e(D[0],D[D.length-1],R??10)},p.tickFormat=function(R,D){return D==null?T:f(D)},p.nice=function(R){var D=g();return(!R||typeof R.range!="function")&&(R=t(D[0],D[D.length-1],R??10)),R?g(b4(D,R)):p},p.copy=function(){return Ad(p,jw(e,t,r,n,i,o,l,c,h,f))},p}function fV(){return Cn.apply(jw(oY,lY,Za,xw,Ip,Cd,gw,pw,Bs,M4).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function hV(){return Cn.apply(jw(iY,sY,Ja,bw,$p,Lp,vw,yw,Bs,D4).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function zp(){var e=0,t=1,r,n,i,o,l=_r,c=!1,h;function f(y){return y==null||isNaN(y=+y)?h:l(i===0?.5:(y=(o(y)-r)*i,c?Math.max(0,Math.min(1,y)):y))}f.domain=function(y){return arguments.length?([e,t]=y,r=o(e=+e),n=o(t=+t),i=r===n?0:1/(n-r),f):[e,t]},f.clamp=function(y){return arguments.length?(c=!!y,f):c},f.interpolator=function(y){return arguments.length?(l=y,f):l};function p(y){return function(g){var v,b;return arguments.length?([v,b]=g,l=y(v,b),f):[l(0),l(1)]}}return f.range=p(du),f.rangeRound=p(sw),f.unknown=function(y){return arguments.length?(h=y,f):h},function(y){return o=y,r=y(e),n=y(t),i=r===n?0:1/(n-r),f}}function ls(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function k4(){var e=os(zp()(_r));return e.copy=function(){return ls(e,k4())},ni.apply(e,arguments)}function L4(){var e=cw(zp()).domain([1,10]);return e.copy=function(){return ls(e,L4()).base(e.base())},ni.apply(e,arguments)}function I4(){var e=dw(zp());return e.copy=function(){return ls(e,I4()).constant(e.constant())},ni.apply(e,arguments)}function ww(){var e=fw(zp());return e.copy=function(){return ls(e,ww()).exponent(e.exponent())},ni.apply(e,arguments)}function mV(){return ww.apply(null,arguments).exponent(.5)}function $4(){var e=[],t=_r;function r(n){if(n!=null&&!isNaN(n=+n))return t((Od(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(ts),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)=>JK(e,o/n))},r.copy=function(){return $4(t).domain(e)},ni.apply(r,arguments)}function Bp(){var e=0,t=.5,r=1,n=1,i,o,l,c,h,f=_r,p,y=!1,g;function v(w){return isNaN(w=+w)?g:(w=.5+((w=+p(w))-o)*(n*w<n*o?c:h),f(y?Math.max(0,Math.min(1,w)):w))}v.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),h=o===l?0:.5/(l-o),n=o<i?-1:1,v):[e,t,r]},v.clamp=function(w){return arguments.length?(y=!!w,v):y},v.interpolator=function(w){return arguments.length?(f=w,v):f};function b(w){return function(N){var _,A,C;return arguments.length?([_,A,C]=N,f=OG(w,[_,A,C]),v):[f(0),f(.5),f(1)]}}return v.range=b(du),v.rangeRound=b(sw),v.unknown=function(w){return arguments.length?(g=w,v):g},function(w){return p=w,i=w(e),o=w(t),l=w(r),c=i===o?0:.5/(o-i),h=o===l?0:.5/(l-o),n=o<i?-1:1,v}}function z4(){var e=os(Bp()(_r));return e.copy=function(){return ls(e,z4())},ni.apply(e,arguments)}function B4(){var e=cw(Bp()).domain([.1,1,10]);return e.copy=function(){return ls(e,B4()).base(e.base())},ni.apply(e,arguments)}function U4(){var e=dw(Bp());return e.copy=function(){return ls(e,U4()).constant(e.constant())},ni.apply(e,arguments)}function Sw(){var e=fw(Bp());return e.copy=function(){return ls(e,Sw()).exponent(e.exponent())},ni.apply(e,arguments)}function pV(){return Sw.apply(null,arguments).exponent(.5)}const q4=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:nw,scaleDiverging:z4,scaleDivergingLog:B4,scaleDivergingPow:Sw,scaleDivergingSqrt:pV,scaleDivergingSymlog:U4,scaleIdentity:x4,scaleImplicit:Sb,scaleLinear:v4,scaleLog:j4,scaleOrdinal:rw,scalePoint:rG,scalePow:hw,scaleQuantile:N4,scaleQuantize:_4,scaleRadial:S4,scaleSequential:k4,scaleSequentialLog:L4,scaleSequentialPow:ww,scaleSequentialQuantile:$4,scaleSequentialSqrt:mV,scaleSequentialSymlog:I4,scaleSqrt:QG,scaleSymlog:w4,scaleThreshold:O4,scaleTime:fV,scaleUtc:hV,tickFormat:g4},Symbol.toStringTag,{value:"Module"}));function yV(e){var t=q4;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(vd(e));if(r in t&&typeof t[r]=="function")return t[r]()}function RT(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=yV(e);if(n!=null)return n.domain(t).range(r),n}}function Nw(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?RT(e.scale,r,n):RT(t,r,n)}function gV(e){return"scale".concat(vd(e))}function vV(e){return gV(e)in q4}var F4=(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 vV(n)?n:"point"}};function xV(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 H4(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,h=xV(n,o);if(h<=0)return r[0];if(h>=r.length)return r[r.length-1];var f=(l=n[h-1])!==null&&l!==void 0?l:0,p=(c=n[h])!==null&&c!==void 0?c:0;return Math.abs(o-f)<=Math.abs(o-p)?r[h-1]:r[h]}}}function bV(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):H4(e,void 0)}function MT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function km(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MT(Object(r),!0).forEach(function(n){jV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jV(e,t,r){return(t=wV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wV(e){var t=SV(e,"string");return typeof t=="symbol"?t:t+""}function SV(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 Eb=[0,"auto"],$t={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"},K4=(e,t)=>e.cartesianAxis.xAxis[t],ai=(e,t)=>{var r=K4(e,t);return r??$t},zt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Eb,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:jd},G4=(e,t)=>e.cartesianAxis.yAxis[t],ii=(e,t)=>{var r=G4(e,t);return r??zt},NV={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:""},_w=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??NV},Tr=(e,t,r)=>{switch(t){case"xAxis":return ai(e,r);case"yAxis":return ii(e,r);case"zAxis":return _w(e,r);case"angleAxis":return Xj(e,r);case"radiusAxis":return Wj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},_V=(e,t,r)=>{switch(t){case"xAxis":return ai(e,r);case"yAxis":return ii(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Td=(e,t,r)=>{switch(t){case"xAxis":return ai(e,r);case"yAxis":return ii(e,r);case"angleAxis":return Xj(e,r);case"radiusAxis":return Wj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Y4=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function V4(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 Up=e=>e.graphicalItems.cartesianItems,OV=V([Zt,Pp],V4),Q4=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),fu=V([Up,Tr,OV],Q4,{memoizeOptions:{resultEqualityCheck:Dp}}),X4=V([fu],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Rp)),W4=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),EV=V([fu],W4),Z4=e=>e.map(t=>t.data).filter(Boolean).flat(1),AV=V([fu],e=>e.some(t=>!t.data)),J4=V([fu],Z4,{memoizeOptions:{resultEqualityCheck:Dp}}),eD=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},Ow=V([J4,_d],eD),CV=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Pt(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Pt(i,n)}))):e.map(n=>({value:n})),tD=(e,t,r,n,i,o)=>{var{chartData:l=[],dataStartIndex:c,dataEndIndex:h}=n,f=CV(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&o.length>0){var p=l.slice(c,h+1),y=p.map(g=>({value:Pt(g,t.dataKey)})).filter(g=>g.value!=null);return[...y,...f]}return f},Pd=V([Ow,Tr,fu,_d,AV,J4],tD);function Al(e){if(da(e)||e instanceof Date){var t=Number(e);if(Ue(t))return t}}function DT(e){if(Array.isArray(e)){var t=[Al(e[0]),Al(e[1])];return la(t)?t:void 0}var r=Al(e);if(r!=null)return[r,r]}function ma(e){return e.map(Al).filter(Fr)}function TV(e,t){var r=Al(e),n=Al(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var PV=V([Pd],e=>e==null?void 0:e.map(t=>t.value).sort(TV));function rD(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function RV(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!ca(t))n=t;else if(Array.isArray(t)){var i=ma(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:ma(r.flatMap(o=>{var l=Pt(e,o.dataKey),c,h;if(Array.isArray(l)?[c,h]=l:c=h=l,!(!Ue(c)||!Ue(h)))return[n-c,n+h]}))}var Ft=e=>{var t=Jt(e),r=cu(e);return Td(e,t,r)},eu=V([Ft],e=>e==null?void 0:e.dataKey),MV=V([X4,_d,Ft],l4),nD=(e,t,r,n)=>{var i={},o=t.reduce((l,c)=>{if(c.stackId==null)return l;var h=l[c.stackId];return h==null&&(h=[]),h.push(c),l[c.stackId]=h,l},i);return Object.fromEntries(Object.entries(o).map(l=>{var[c,h]=l,f=n?[...h].reverse():h,p=f.map(Jj);return[c,{stackedData:yF(e,p,r),graphicalItems:f}]}))},Ab=V([MV,X4,Ep,t4],nD),aD=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:o}=t;if(n==null&&r!=="zAxis"){var l=jF(e,i,o);if(!(l!=null&&l[0]===0&&l[1]===0))return l}},DV=V([Tr],e=>e.allowDataOverflow),Ew=e=>{var t;if(e==null||!("domain"in e))return Eb;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=ma(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:Eb},iD=V([Tr],Ew),sD=V([iD,DV],q3),kV=V([Ab,Hn,Zt,sD],aD,{memoizeOptions:{resultEqualityCheck:Mp}}),Aw=e=>e.errorBars,LV=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>rD(r,n)),Lm=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]}},oD=function(t,r,n,i,o){var l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],c,h;if(n.length>0&&n.forEach(f=>{var p,y=f.data!=null?[...f.data]:l,g=(p=i[f.id])===null||p===void 0?void 0:p.filter(v=>rD(o,v));y.forEach(v=>{var b,w=Pt(v,(b=r.dataKey)!==null&&b!==void 0?b:f.dataKey),N=RV(v,w,g);if(N.length>=2){var _=Math.min(...N),A=Math.max(...N);(c==null||_<c)&&(c=_),(h==null||A>h)&&(h=A)}var C=DT(w);C!=null&&(c=c==null?C[0]:Math.min(c,C[0]),h=h==null?C[1]:Math.max(h,C[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(f=>{var p=DT(Pt(f,r.dataKey));p!=null&&(c=c==null?p[0]:Math.min(c,p[0]),h=h==null?p[1]:Math.max(h,p[1]))}),Ue(c)&&Ue(h))return[c,h]},IV=V([Ow,Tr,EV,Aw,Zt,_K],oD,{memoizeOptions:{resultEqualityCheck:Mp}});function $V(e){var{value:t}=e;if(da(t)||t instanceof Date)return t}var zV=(e,t,r)=>{var n=e.map($V).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&gM(n))?U3(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},lD=e=>e.referenceElements.dots,hu=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),BV=V([lD,Zt,Pp],hu),uD=e=>e.referenceElements.areas,UV=V([uD,Zt,Pp],hu),cD=e=>e.referenceElements.lines,qV=V([cD,Zt,Pp],hu),dD=(e,t)=>{if(e!=null){var r=ma(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},FV=V(BV,Zt,dD),fD=(e,t)=>{if(e!=null){var r=ma(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)]}},HV=V([UV,Zt],fD);function KV(e){var t;if(e.x!=null)return ma([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:ma(r)}function GV(e){var t;if(e.y!=null)return ma([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:ma(r)}var hD=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?KV(n):GV(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},YV=V([qV,Zt],hD),VV=V(FV,YV,HV,(e,t,r)=>Lm(e,r,t)),mD=(e,t,r,n,i,o,l,c)=>{if(r!=null)return r;var h=l==="vertical"&&c==="xAxis"||l==="horizontal"&&c==="yAxis",f=h?Lm(n,o,i):Lm(o,i);return EK(t,f,e.allowDataOverflow)},QV=V([Tr,iD,sD,kV,IV,VV,Ze,Zt],mD,{memoizeOptions:{resultEqualityCheck:Mp}}),XV=[0,1],pD=(e,t,r,n,i,o,l)=>{if(!((e==null||r==null||r.length===0)&&l===void 0)){var{dataKey:c,type:h}=e,f=ei(t,o);if(f&&c==null){var p;return U3(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return h==="category"?zV(n,e,f):i==="expand"&&!f?XV:l}},Cw=V([Tr,Ze,Ow,Pd,Ep,Zt,QV],pD),mu=V([Tr,Y4,Yj],F4),yD=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=Ew(t),o=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&la(e)){if(o)return HC(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return KC(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(o&&la(e))return HC(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&la(e))return KC(e,t.tickCount,t.allowDecimals,"adaptive")}}},Tw=V([Cw,Td,mu],yD),gD=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&la(t)&&Array.isArray(r)&&r.length>0){var i,o,l=t[0],c=(i=r[0])!==null&&i!==void 0?i:0,h=t[1],f=(o=r[r.length-1])!==null&&o!==void 0?o:0;return[Math.min(l,c),Math.max(h,f)]}return t},WV=V([Tr,Cw,Tw,Zt],gD),ZV=V(Pd,Tr,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ma(e.map(y=>y.value))).sort((y,g)=>y-g),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 h=n[c],f=n[c+1];if(!(h==null||f==null)){var p=f-h;r=Math.min(r,p)}}return r/l}}),vD=V(ZV,Ze,e4,Wt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Ue(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}),JV=(e,t,r)=>{var n=ai(e,t);return n==null||typeof n.padding!="string"?0:vD(e,"xAxis",t,r,n.padding)},eQ=(e,t,r)=>{var n=ii(e,t);return n==null||typeof n.padding!="string"?0:vD(e,"yAxis",t,r,n.padding)},tQ=V(ai,JV,(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}}),rQ=V(ii,eQ,(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}}),nQ=V([Wt,tQ,bp,xp,(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]}),aQ=V([Wt,Ze,rQ,bp,xp,(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]}),Rd=(e,t,r,n)=>{var i;switch(t){case"xAxis":return nQ(e,r,n);case"yAxis":return aQ(e,r,n);case"zAxis":return(i=_w(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return i4(e);case"radiusAxis":return s4(e,r);default:return}},xD=V([Tr,Rd],Ap),iQ=V([mu,WV],UK),Pw=V([Tr,mu,iQ,xD],Nw),bD=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:o}=r,l=ei(e,n);if(l&&(i==="number"||o!=="auto"))return t.map(c=>c.value)}},Rw=V([Ze,Pd,Td,Zt],bD),qp=V([Pw],ew);V([Pw],bV);V([Pw,PV],H4);V([fu,Aw,Zt],LV);function jD(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Fp=(e,t)=>t,Hp=(e,t,r)=>r,sQ=V(gp,Fp,Hp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(jD)),oQ=V(vp,Fp,Hp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(jD)),wD=(e,t)=>({width:e.width,height:t.height}),lQ=(e,t)=>{var r=typeof t.width=="number"?t.width:jd;return{width:r,height:e.height}},SD=V(Wt,ai,wD),uQ=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},cQ=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},dQ=V(ri,Wt,sQ,Fp,Hp,(e,t,r,n,i)=>{var o={},l;return r.forEach(c=>{var h=wD(t,c);l==null&&(l=uQ(t,n,e));var f=n==="top"&&!i||n==="bottom"&&i;o[c.id]=l-Number(f)*h.height,l+=(f?-1:1)*h.height}),o}),fQ=V(ti,Wt,oQ,Fp,Hp,(e,t,r,n,i)=>{var o={},l;return r.forEach(c=>{var h=lQ(t,c);l==null&&(l=cQ(t,n,e));var f=n==="left"&&!i||n==="right"&&i;o[c.id]=l-Number(f)*h.width,l+=(f?-1:1)*h.width}),o}),hQ=(e,t)=>{var r=ai(e,t);if(r!=null)return dQ(e,r.orientation,r.mirror)},mQ=V([Wt,ai,hQ,(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}}}),pQ=(e,t)=>{var r=ii(e,t);if(r!=null)return fQ(e,r.orientation,r.mirror)},yQ=V([Wt,ii,pQ,(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}}}),ND=V(Wt,ii,(e,t)=>{var r=typeof t.width=="number"?t.width:jd;return{width:r,height:e.height}}),kT=(e,t,r)=>{switch(t){case"xAxis":return SD(e,r).width;case"yAxis":return ND(e,r).height;default:return}},_D=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:o,dataKey:l}=r,c=ei(e,n),h=t.map(p=>p.value),f=h.filter(p=>p!=null);if(l&&c&&o==="category"&&i&&gM(f))return h}},Mw=V([Ze,Pd,Tr,Zt],_D),LT=V([Ze,_V,mu,qp,Mw,Rw,Rd,Tw,Zt],(e,t,r,n,i,o,l,c,h)=>{if(t!=null){var f=ei(e,h);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:h,categoricalDomain:o,duplicateDomain:i,isCategorical:f,niceTicks:c,range:l,realScaleType:r,scale:n}}}),gQ=(e,t,r,n,i,o,l,c,h)=>{if(!(t==null||n==null)){var f=ei(e,h),{type:p,ticks:y,tickCount:g}=t,v=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,b=p==="category"&&n.bandwidth?n.bandwidth()/v:0;b=h==="angleAxis"&&o!=null&&o.length>=2?qr(o[0]-o[1])*2*b:b;var w=y||i;return w?w.map((N,_)=>{var A=l?l.indexOf(N):N,C=n.map(A);return Ue(C)?{index:_,coordinate:C+b,value:N,offset:b}:null}).filter(Fr):f&&c?c.map((N,_)=>{var A=n.map(N);return Ue(A)?{coordinate:A+b,value:N,index:_,offset:b}:null}).filter(Fr):n.ticks?n.ticks(g).map((N,_)=>{var A=n.map(N);return Ue(A)?{coordinate:A+b,value:N,index:_,offset:b}:null}).filter(Fr):n.domain().map((N,_)=>{var A=n.map(N);return Ue(A)?{coordinate:A+b,value:l?l[N]:N,index:_,offset:b}:null}).filter(Fr)}},OD=V([Ze,Td,mu,qp,Tw,Rd,Mw,Rw,Zt],gQ),vQ=(e,t,r,n,i,o,l)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=ei(e,l),{tickCount:h}=t,f=0;return f=l==="angleAxis"&&(n==null?void 0:n.length)>=2?qr(n[0]-n[1])*2*f:f,c&&o?o.map((p,y)=>{var g=r.map(p);return Ue(g)?{coordinate:g+f,value:p,index:y,offset:f}:null}).filter(Fr):r.ticks?r.ticks(h).map((p,y)=>{var g=r.map(p);return Ue(g)?{coordinate:g+f,value:p,index:y,offset:f}:null}).filter(Fr):r.domain().map((p,y)=>{var g=r.map(p);return Ue(g)?{coordinate:g+f,value:i?i[p]:p,index:y,offset:f}:null}).filter(Fr)}},ns=V([Ze,Td,qp,Rd,Mw,Rw,Zt],vQ),as=V(Tr,qp,(e,t)=>{if(!(e==null||t==null))return km(km({},e),{},{scale:t})}),xQ=V([Tr,mu,Cw,xD],Nw),bQ=V([xQ],ew);V((e,t,r)=>_w(e,r),bQ,(e,t)=>{if(!(e==null||t==null))return km(km({},e),{},{scale:t})});var jQ=V([Ze,gp,vp],(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}}),wQ=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};V([wQ],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var o of e){var l=Math.abs(o.coordinate-t);l<n&&(n=l,i=o)}return(r=i)===null||r===void 0?void 0:r.value}});var ED=e=>e.options.defaultTooltipEventType,AD=e=>e.options.validateTooltipEventTypes;function CD(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Md(e,t){var r=ED(e),n=AD(e);return CD(t,r,n)}function SQ(e){return be(t=>Md(t,e))}var TD=(e,t)=>{var r,n=Number(t);if(!(ca(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},NQ=e=>e.tooltip.settings,zi={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},_Q={itemInteraction:{click:zi,hover:zi},axisInteraction:{click:zi,hover:zi},keyboardInteraction:zi,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}},PD=xr({name:"tooltip",initialState:_Q,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:ut()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:ut()},removeTooltipEntrySettings:{reducer(e,t){var r=On(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:ut()},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:OQ,replaceTooltipEntrySettings:EQ,removeTooltipEntrySettings:AQ,setTooltipSettingsState:CQ,setActiveMouseOverItemIndex:RD,mouseLeaveItem:TQ,mouseLeaveChart:MD,setActiveClickItemIndex:PQ,setMouseOverAxisIndex:DD,setMouseClickAxisIndex:RQ,setSyncInteraction:Tc,setKeyboardInteraction:Im}=PD.actions,MQ=PD.reducer;function IT(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?IT(Object(r),!0).forEach(function(n){DQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):IT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DQ(e,t,r){return(t=kQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kQ(e){var t=LQ(e,"string");return typeof t=="symbol"?t:t+""}function LQ(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 IQ(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function $Q(e){return e.index!=null}var kD=(e,t,r,n)=>{if(t==null)return zi;var i=IQ(e,t,r);if(i==null)return zi;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($Q(i)){if(o)return xh(xh({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return xh(xh({},zi),{},{coordinate:i.coordinate})};function zQ(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 BQ(e,t){var r=zQ(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 UQ(e,t,r){if(r==null||t==null)return!0;var n=Pt(e,t);return n==null||!la(r)?!0:BQ(n,r)}var Rc=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var o=Number(i);if(!Ue(o))return i;var l=0,c=1/0;t.length>0&&(c=t.length-1);var h=Math.max(l,Math.min(o,c)),f=t[h];return f==null||UQ(f,r,n)?String(h):null},LD=(e,t,r,n,i,o,l)=>{if(o!=null){var c=l[0],h=c==null?void 0:c.getPosition(o);if(h!=null)return h;var f=i==null?void 0:i[Number(o)];if(f)switch(r){case"horizontal":return{x:f.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:f.coordinate}}}},ID=(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})},$D=e=>e.options.tooltipPayloadSearcher,pu=e=>e.tooltip;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 zT(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){qQ(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 qQ(e,t,r){return(t=FQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FQ(e){var t=HQ(e,"string");return typeof t=="symbol"?t:t+""}function HQ(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 KQ(e){if(typeof e=="string"||typeof e=="number")return e}function GQ(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function YQ(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function BT(e){if(typeof e=="string")return e}function VQ(e){if(!(e==null||typeof e!="object")){var t="name"in e?KQ(e.name):void 0,r="unit"in e?GQ(e.unit):void 0,n="dataKey"in e?YQ(e.dataKey):void 0,i="payload"in e?e.payload:void 0,o="color"in e?BT(e.color):void 0,l="fill"in e?BT(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:o,fill:l}}}function QQ(e,t){return e??t}var zD=(e,t,r,n,i,o,l)=>{if(!(t==null||o==null)){var{chartData:c,computedData:h,dataStartIndex:f,dataEndIndex:p}=r,y=[];return e.reduce((g,v)=>{var b,{dataDefinedOnItem:w,settings:N}=v,_=QQ(w,c),A=Array.isArray(_)?f3(_,f,p):_,C=(b=N==null?void 0:N.dataKey)!==null&&b!==void 0?b:n,E=N==null?void 0:N.nameKey,T;if(n&&Array.isArray(A)&&!Array.isArray(A[0])&&l==="axis"?T=vM(A,n,i):T=o(A,t,h,E),Array.isArray(T))T.forEach(D=>{var M,U,k=VQ(D),H=k==null?void 0:k.name,B=k==null?void 0:k.dataKey,ae=k==null?void 0:k.payload,ee=zT(zT({},N),{},{name:H,unit:k==null?void 0:k.unit,color:(M=k==null?void 0:k.color)!==null&&M!==void 0?M:N==null?void 0:N.color,fill:(U=k==null?void 0:k.fill)!==null&&U!==void 0?U:N==null?void 0:N.fill});g.push(RA({tooltipEntrySettings:ee,dataKey:B,payload:ae,value:Pt(ae,B),name:H==null?void 0:String(H)}))});else{var R;g.push(RA({tooltipEntrySettings:N,dataKey:C,payload:T,value:Pt(T,C),name:(R=Pt(T,E))!==null&&R!==void 0?R:N==null?void 0:N.name}))}return g},y)}},Dw=V([Ft,Y4,Yj],F4),XQ=V([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),WQ=V([Jt,cu],V4),wo=V([XQ,Ft,WQ],Q4,{memoizeOptions:{resultEqualityCheck:Dp}}),ZQ=V([wo],e=>e.filter(Rp)),BD=V([wo],Z4,{memoizeOptions:{resultEqualityCheck:Dp}}),JQ=V([wo],e=>e.some(t=>!t.data)),ho=V([BD,Hn],eD),eX=V([ZQ,Hn,Ft],l4),kw=V([ho,Ft,wo,Hn,JQ,BD],tD),UD=V([Ft],Ew),tX=V([Ft],e=>e.allowDataOverflow),qD=V([UD,tX],q3),rX=V([wo],e=>e.filter(Rp)),nX=V([eX,rX,Ep,t4],nD),aX=V([nX,Hn,Jt,qD],aD),iX=V([wo],W4),sX=V([ho,Ft,iX,Aw,Jt,OK],oD,{memoizeOptions:{resultEqualityCheck:Mp}}),oX=V([lD,Jt,cu],hu),lX=V([oX,Jt],dD),uX=V([uD,Jt,cu],hu),cX=V([uX,Jt],fD),dX=V([cD,Jt,cu],hu),fX=V([dX,Jt],hD),hX=V([lX,fX,cX],Lm),mX=V([Ft,UD,qD,aX,sX,hX,Ze,Jt],mD),tu=V([Ft,Ze,ho,kw,Ep,Jt,mX],pD),pX=V([tu,Ft,Dw],yD),yX=V([Ft,tu,pX,Jt],gD),FD=e=>{var t=Jt(e),r=cu(e),n=!1;return Rd(e,t,r,n)},HD=V([Ft,FD],Ap),gX=V([Ft,Dw,yX,HD],Nw),KD=V([gX],ew),vX=V([Ze,kw,Ft,Jt],_D),xX=V([Ze,kw,Ft,Jt],bD),bX=(e,t,r,n,i,o,l,c)=>{if(t){var{type:h}=t,f=ei(e,c);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,y=h==="category"&&n.bandwidth?n.bandwidth()/p:0;return y=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?qr(i[0]-i[1])*2*y:y,f&&l?l.map((g,v)=>{var b=n.map(g);return Ue(b)?{coordinate:b+y,value:g,index:v,offset:y}:null}).filter(Fr):n.domain().map((g,v)=>{var b=n.map(g);return Ue(b)?{coordinate:b+y,value:o?o[g]:g,index:v,offset:y}:null}).filter(Fr)}}},si=V([Ze,Ft,Dw,KD,FD,vX,xX,Jt],bX),Lw=V([ED,AD,NQ],(e,t,r)=>CD(r.shared,e,t)),GD=e=>e.tooltip.settings.trigger,Iw=e=>e.tooltip.settings.defaultIndex,Dd=V([pu,Lw,GD,Iw],kD),mo=V([Dd,ho,eu,tu],Rc),YD=V([si,mo],TD),VD=V([Dd],e=>{if(e)return e.dataKey}),jX=V([Dd],e=>{if(e)return e.graphicalItemId}),QD=V([pu,Lw,GD,Iw],ID),wX=V([ti,ri,Ze,Wt,si,Iw,QD],LD),SX=V([Dd,wX],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),NX=V([Dd],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),_X=V([QD,mo,Hn,eu,YD,$D,Lw],zD),OX=V([_X],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});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 qT(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){EX(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 EX(e,t,r){return(t=AX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AX(e){var t=CX(e,"string");return typeof t=="symbol"?t:t+""}function CX(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 TX=()=>be(Ft),PX=()=>{var e=TX(),t=be(si),r=be(KD);return Vl(!e||!r?void 0:qT(qT({},e),{},{scale:r}),t)};function FT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FT(Object(r),!0).forEach(function(n){RX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function 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=(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}},LX=(e,t,r,n)=>{var i=t.find(f=>f&&f.index===r);if(i){if(e==="centric"){var o=i.coordinate,{radius:l}=n;return pl(pl(pl({},n),ur(n.cx,n.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,{angle:h}=n;return pl(pl(pl({},n),ur(n.cx,n.cy,c,h)),{},{angle:h,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 IX(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 XD=(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 h,f,p,y,g,v=c>0?(h=r[c-1])===null||h===void 0?void 0:h.coordinate:(f=r[l-1])===null||f===void 0?void 0:f.coordinate,b=(p=r[c])===null||p===void 0?void 0:p.coordinate,w=c>=l-1?(y=r[0])===null||y===void 0?void 0:y.coordinate:(g=r[c+1])===null||g===void 0?void 0:g.coordinate,N=void 0;if(!(v==null||b==null||w==null))if(qr(b-v)!==qr(w-b)){var _=[];if(qr(w-b)===qr(i[1]-i[0])){N=w;var A=b+i[1]-i[0];_[0]=Math.min(A,(A+v)/2),_[1]=Math.max(A,(A+v)/2)}else{N=v;var C=w+i[1]-i[0];_[0]=Math.min(b,(C+b)/2),_[1]=Math.max(b,(C+b)/2)}var E=[Math.min(b,(N+b)/2),Math.max(b,(N+b)/2)];if(e>E[0]&&e<=E[1]||e>=_[0]&&e<=_[1]){var T;return(T=r[c])===null||T===void 0?void 0:T.index}}else{var R=Math.min(v,w),D=Math.max(v,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 U=0;U<l;U++){var k=t[U];if(k!=null){var H=t[U+1],B=t[U-1];if(U===0&&H!=null&&e<=(k.coordinate+H.coordinate)/2||U===l-1&&B!=null&&e>(k.coordinate+B.coordinate)/2||U>0&&U<l-1&&B!=null&&H!=null&&e>(k.coordinate+B.coordinate)/2&&e<=(k.coordinate+H.coordinate)/2)return k.index}}return-1},$X=()=>be(Yj),$w=(e,t)=>t,WD=(e,t,r)=>r,zw=(e,t,r,n)=>n,zX=V(si,e=>sp(e,t=>t.coordinate)),Bw=V([pu,$w,WD,zw],kD),Uw=V([Bw,ho,eu,tu],Rc),BX=(e,t,r)=>{if(t!=null){var n=pu(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},ZD=V([pu,$w,WD,zw],ID),$m=V([ti,ri,Ze,Wt,si,zw,ZD],LD),UX=V([Bw,$m],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),JD=V([si,Uw],TD),qX=V([ZD,Uw,Hn,eu,JD,$D,$w],zD),FX=V([Bw,Uw],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),HX=(e,t,r,n,i,o,l)=>{if(!(!e||!r||!n||!i)&&IX(e,l)){var c=wF(e,t),h=XD(c,o,i,r,n),f=kX(t,i,h,e);return{activeIndex:String(h),activeCoordinate:f}}},KX=(e,t,r,n,i,o,l)=>{if(!(!e||!n||!i||!o||!r)){var c=mK(e,r);if(c){var h=SF(c,t),f=XD(h,l,o,n,i),p=LX(t,o,f,c);return{activeIndex:String(f),activeCoordinate:p}}}},GX=(e,t,r,n,i,o,l,c)=>{if(!(!e||!t||!n||!i||!o))return t==="horizontal"||t==="vertical"?HX(e,t,n,i,o,l,c):KX(e,t,r,n,i,o,l)},YX=V(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var n=e[t];if(n!=null)return r?n.panoramaElement:n.element}}),VX=V(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Qt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:BK}});function HT(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 KT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?HT(Object(r),!0).forEach(function(n){QX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):HT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QX(e,t,r){return(t=XX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XX(e){var t=WX(e,"string");return typeof t=="symbol"?t:t+""}function WX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZX={},JX={zIndexMap:Object.values(Qt).reduce((e,t)=>KT(KT({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),ZX)},eW=new Set(Object.values(Qt));function tW(e){return eW.has(e)}var ek=xr({name:"zIndex",initialState:JX,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:ut()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!tW(r)&&delete e.zIndexMap[r])},prepare:ut()},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:ut()},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:ut()}}}),{registerZIndexPortal:rW,unregisterZIndexPortal:tx,registerZIndexPortalElement:nW,unregisterZIndexPortalElement:aW}=ek.actions,iW=ek.reducer;function Tn(e){var{zIndex:t,children:r}=e,n=r7(),i=n&&t!==void 0&&t!==0,o=br(),l=S.useRef(void 0),c=S.useRef(new Set),h=dt(),f=be(y=>YX(y,t,o));if(S.useLayoutEffect(()=>{if(!i){var y=c.current;y.forEach(v=>{h(tx({zIndex:v}))}),y.clear(),l.current=void 0;return}if(c.current.has(t)||(h(rW({zIndex:t})),c.current.add(t)),f){l.current=f;var g=c.current;g.forEach(v=>{v!==t&&(h(tx({zIndex:v})),g.delete(v))})}},[h,t,i,f]),S.useLayoutEffect(()=>{var y=c.current;return()=>{y.forEach(g=>{h(tx({zIndex:g}))}),y.clear()}},[h]),!i)return r;var p=f??l.current;return p?Zm.createPortal(r,p):null}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 GT(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 bh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(r),!0).forEach(function(n){sW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):GT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sW(e,t,r){return(t=oW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oW(e){var t=lW(e,"string");return typeof t=="symbol"?t:t+""}function lW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uW(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return S.isValidElement(t)?S.cloneElement(t,n):S.createElement(r,n)}function cW(e){var t,{coordinate:r,payload:n,index:i,offset:o,tooltipAxisBandSize:l,layout:c,cursor:h,tooltipEventType:f,chartName:p}=e,y=r,g=n,v=i;if(!h||!y||p!=="ScatterChart"&&f!=="axis")return null;var b,w,N;if(p==="ScatterChart")b=y,w=AH,N=Qt.cursorLine;else if(p==="BarChart")b=CH(c,y,o,l),w=I3,N=Qt.cursorRectangle;else if(c==="radial"&&bM(y)){var{cx:_,cy:A,radius:C,startAngle:E,endAngle:T}=$3(y);b={cx:_,cy:A,startAngle:E,endAngle:T,innerRadius:C,outerRadius:C},w=B3,N=Qt.cursorLine}else b={points:vK(c,y,o)},w=R3,N=Qt.cursorLine;var R=typeof h=="object"&&"className"in h?h.className:void 0,D=bh(bh(bh(bh({stroke:"#ccc",pointerEvents:"none"},o),b),gd(h)),{},{payload:g,payloadIndex:v,className:We("recharts-tooltip-cursor",R)});return S.createElement(Tn,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:N},S.createElement(uW,{cursor:h,cursorComp:w,cursorProps:D}))}function dW(e){var t=PX(),r=x3(),n=xo(),i=$X();return t==null||r==null||n==null||i==null?null:S.createElement(cW,Cb({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var tk=S.createContext(null),fW=()=>S.useContext(tk),rx={exports:{}},YT;function hW(){return YT||(YT=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(h,f,p){this.fn=h,this.context=f,this.once=p||!1}function o(h,f,p,y,g){if(typeof p!="function")throw new TypeError("The listener must be a function");var v=new i(p,y||h,g),b=r?r+f:f;return h._events[b]?h._events[b].fn?h._events[b]=[h._events[b],v]:h._events[b].push(v):(h._events[b]=v,h._eventsCount++),h}function l(h,f){--h._eventsCount===0?h._events=new n:delete h._events[f]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var f=[],p,y;if(this._eventsCount===0)return f;for(y in p=this._events)t.call(p,y)&&f.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?f.concat(Object.getOwnPropertySymbols(p)):f},c.prototype.listeners=function(f){var p=r?r+f:f,y=this._events[p];if(!y)return[];if(y.fn)return[y.fn];for(var g=0,v=y.length,b=new Array(v);g<v;g++)b[g]=y[g].fn;return b},c.prototype.listenerCount=function(f){var p=r?r+f:f,y=this._events[p];return y?y.fn?1:y.length:0},c.prototype.emit=function(f,p,y,g,v,b){var w=r?r+f:f;if(!this._events[w])return!1;var N=this._events[w],_=arguments.length,A,C;if(N.fn){switch(N.once&&this.removeListener(f,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,y),!0;case 4:return N.fn.call(N.context,p,y,g),!0;case 5:return N.fn.call(N.context,p,y,g,v),!0;case 6:return N.fn.call(N.context,p,y,g,v,b),!0}for(C=1,A=new Array(_-1);C<_;C++)A[C-1]=arguments[C];N.fn.apply(N.context,A)}else{var E=N.length,T;for(C=0;C<E;C++)switch(N[C].once&&this.removeListener(f,N[C].fn,void 0,!0),_){case 1:N[C].fn.call(N[C].context);break;case 2:N[C].fn.call(N[C].context,p);break;case 3:N[C].fn.call(N[C].context,p,y);break;case 4:N[C].fn.call(N[C].context,p,y,g);break;default:if(!A)for(T=1,A=new Array(_-1);T<_;T++)A[T-1]=arguments[T];N[C].fn.apply(N[C].context,A)}}return!0},c.prototype.on=function(f,p,y){return o(this,f,p,y,!1)},c.prototype.once=function(f,p,y){return o(this,f,p,y,!0)},c.prototype.removeListener=function(f,p,y,g){var v=r?r+f:f;if(!this._events[v])return this;if(!p)return l(this,v),this;var b=this._events[v];if(b.fn)b.fn===p&&(!g||b.once)&&(!y||b.context===y)&&l(this,v);else{for(var w=0,N=[],_=b.length;w<_;w++)(b[w].fn!==p||g&&!b[w].once||y&&b[w].context!==y)&&N.push(b[w]);N.length?this._events[v]=N.length===1?N[0]:N:l(this,v)}return this},c.prototype.removeAllListeners=function(f){var p;return f?(p=r?r+f:f,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})(rx)),rx.exports}var mW=hW();const pW=ss(mW);var ad=new pW,Tb="recharts.syncEvent.tooltip",VT="recharts.syncEvent.brush",rk=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!ca(r))return e[r]}},yW={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},nk=xr({name:"options",initialState:yW,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),gW=nk.reducer,{createEventEmitter:vW}=nk.actions;function xW(e){return e.tooltip.syncInteraction}var bW={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},ak=xr({name:"chartData",initialState:bW,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:QT,setDataStartEndIndexes:jW,setComputedData:Ioe}=ak.actions,wW=ak.reducer,SW=["x","y"];function XT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?XT(Object(r),!0).forEach(function(n){NW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):XT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NW(e,t,r){return(t=_W(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _W(e){var t=OW(e,"string");return typeof t=="symbol"?t:t+""}function OW(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 EW(e,t){if(e==null)return{};var r,n,i=AW(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 AW(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 CW(){var e=be(Vj),t=be(Qj),r=dt(),n=be(r4),i=be(si),o=xo(),l=jp(),c=be(h=>h.rootProps.className);S.useEffect(()=>{if(e==null)return vo;var h=(f,p,y)=>{if(t!==y&&e===f){if(p.payload.active===!1){r(Tc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var g;if(l&&p!==null&&p!==void 0&&(g=p.payload)!==null&&g!==void 0&&g.coordinate&&p.payload.sourceViewBox){var v=p.payload.coordinate,{x:b,y:w}=v,N=EW(v,SW),{x:_,y:A,width:C,height:E}=p.payload.sourceViewBox,T=yl(yl({},N),{},{x:l.x+(C?(b-_)/C:0)*l.width,y:l.y+(E?(w-A)/E:0)*l.height});r(yl(yl({},p),{},{payload:yl(yl({},p.payload),{},{coordinate:T})}))}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($=>String($.value)===p.payload.label));var{coordinate:U}=p.payload;if(U==null||l==null){r(Tc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(R==null){r(Tc({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:k,y:H}=U,B=Math.min(k,l.x+l.width),ae=Math.min(H,l.y+l.height),ee={x:o==="horizontal"?R.coordinate:B,y:o==="horizontal"?ae:R.coordinate},ne=Tc({active:p.payload.active,coordinate:ee,dataKey:p.payload.dataKey,index:String(R.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(ne)}}};return ad.on(Tb,h),()=>{ad.off(Tb,h)}},[c,r,t,e,n,i,o,l])}function TW(){var e=be(Vj),t=be(Qj),r=dt();S.useEffect(()=>{if(e==null)return vo;var n=(i,o,l)=>{t!==l&&e===i&&r(jW(o))};return ad.on(VT,n),()=>{ad.off(VT,n)}},[r,t,e])}function PW(){var e=dt();S.useEffect(()=>{e(vW())},[e]),CW(),TW()}function RW(e,t,r,n,i,o){var l=be(b=>BX(b,e,t)),c=be(jX),h=be(Qj),f=be(Vj),p=be(r4),y=be(xW),g=(y==null?void 0:y.sourceViewBox)!=null,v=jp();S.useEffect(()=>{if(!g&&f!=null&&h!=null){var b=Tc({active:o,coordinate:r,dataKey:l,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:v,graphicalItemId:c});ad.emit(Tb,f,b,h)}},[g,r,l,c,i,n,h,f,p,o,v])}function WT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ZT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(r),!0).forEach(function(n){MW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MW(e,t,r){return(t=DW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DW(e){var t=kW(e,"string");return typeof t=="symbol"?t:t+""}function kW(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 LW(e){return e.dataKey}function IW(e,t){return S.isValidElement(e)?S.cloneElement(e,t):typeof e=="function"?S.createElement(e,t):S.createElement(nH,t)}var JT=[],$W={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 qw(e){var t,r,n=dr(e,$W),{active:i,allowEscapeViewBox:o,animationDuration:l,animationEasing:c,content:h,filterNull:f,isAnimationActive:p,offset:y,payloadUniqBy:g,position:v,reverseDirection:b,useTranslate3d:w,wrapperStyle:N,cursor:_,shared:A,trigger:C,defaultIndex:E,portal:T,axisId:R}=n,D=dt(),M=typeof E=="number"?String(E):E;S.useEffect(()=>{D(CQ({shared:A,trigger:C,axisId:R,active:i,defaultIndex:M}))},[D,A,C,R,i,M]);var U=jp(),k=P3(),H=SQ(A),{activeIndex:B,isActive:ae}=(t=be(Me=>FX(Me,H,C,M)))!==null&&t!==void 0?t:{},ee=be(Me=>qX(Me,H,C,M)),ne=be(Me=>JD(Me,H,C,M)),$=be(Me=>UX(Me,H,C,M)),L=ee,W=fW(),te=(r=i??ae)!==null&&r!==void 0?r:!1,[se,I]=LM([L,te]),Q=H==="axis"?ne:void 0;RW(H,C,$,Q,B,te);var le=T??W;if(le==null||U==null||H==null)return null;var oe=L??JT;te||(oe=JT),f&&oe.length&&(oe=PM(oe.filter(Me=>Me.value!=null&&(Me.hide!==!0||n.includeHidden)),g,LW));var fe=oe.length>0,xe=ZT(ZT({},n),{},{payload:oe,label:Q,active:te,activeIndex:B,coordinate:$,accessibilityLayer:k}),Se=S.createElement(mH,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:te,coordinate:$,hasPayload:fe,offset:y,position:v,reverseDirection:b,useTranslate3d:w,viewBox:U,wrapperStyle:N,lastBoundingBox:se,innerRef:I,hasPortalFromProps:!!T},IW(h,xe));return S.createElement(S.Fragment,null,Zm.createPortal(Se,le),te&&S.createElement(dW,{cursor:_,tooltipEventType:H,coordinate:$,payload:oe,index:B}))}var Fw=e=>null;Fw.displayName="Cell";function zW(e,t,r){return(t=BW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BW(e){var t=UW(e,"string");return typeof t=="symbol"?t:t+""}function UW(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class qW{constructor(t){zW(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 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 FW(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){HW(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 HW(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)}var YW={cacheSize:2e3,enableCache:!0},ik=FW({},YW),tP=new qW(ik.cacheSize),VW={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},rP="recharts_measurement_span";function QW(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 nP=(e,t)=>{try{var r=document.getElementById(rP);r||(r=document.createElement("span"),r.setAttribute("id",rP),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,VW,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Mc=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Nd.isSsr)return{width:0,height:0};if(!ik.enableCache)return nP(t,r);var n=QW(t,r),i=tP.get(n);if(i)return i;var o=nP(t,r);return tP.set(n,o),o},sk;function XW(e,t,r){return(t=WW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WW(e){var t=ZW(e,"string");return typeof t=="symbol"?t:t+""}function ZW(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 aP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,iP=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,JW=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,eZ=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,tZ={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},rZ=["cm","mm","pt","pc","in","Q","px"];function nZ(e){return rZ.includes(e)}var Nl="NaN";function aZ(e,t){return e*tZ[t]}class lr{static parse(t){var r,[,n,i]=(r=eZ.exec(t))!==null&&r!==void 0?r:[];return n==null?lr.NaN:new lr(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,ca(t)&&(this.unit=""),r!==""&&!JW.test(r)&&(this.num=NaN,this.unit=""),nZ(r)&&(this.num=aZ(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new lr(NaN,""):new lr(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new lr(NaN,""):new lr(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new lr(NaN,""):new lr(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new lr(NaN,""):new lr(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ca(this.num)}}sk=lr;XW(lr,"NaN",new sk(NaN,""));function ok(e){if(e==null||e.includes(Nl))return Nl;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,o]=(r=aP.exec(t))!==null&&r!==void 0?r:[],l=lr.parse(n??""),c=lr.parse(o??""),h=i==="*"?l.multiply(c):l.divide(c);if(h.isNaN())return Nl;t=t.replace(aP,h.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,[,p,y,g]=(f=iP.exec(t))!==null&&f!==void 0?f:[],v=lr.parse(p??""),b=lr.parse(g??""),w=y==="+"?v.add(b):v.subtract(b);if(w.isNaN())return Nl;t=t.replace(iP,w.toString())}return t}var sP=/\(([^()]*)\)/;function iZ(e){for(var t=e,r;(r=sP.exec(t))!=null;){var[,n]=r;t=t.replace(sP,ok(n))}return t}function sZ(e){var t=e.replace(/\s+/g,"");return t=iZ(t),t=ok(t),t}function oZ(e){try{return sZ(e)}catch{return Nl}}function nx(e){var t=oZ(e.slice(5,-1));return t===Nl?"":t}var lZ=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],uZ=["dx","dy","angle","className","breakAll"];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 oP(e,t){if(e==null)return{};var r,n,i=cZ(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 cZ(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 lk=/[ \f\n\r\t\v\u2028\u2029]+/,uk=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];pt(t)||(r?i=t.toString().split(""):i=t.toString().split(lk));var o=i.map(c=>({word:c,width:Mc(c,n).width})),l=r?0:Mc(" ",n).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}};function ck(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function dZ(e){return pt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var dk=(e,t,r,n)=>e.reduce((i,o)=>{var{word:l,width:c}=o,h=i[i.length-1];if(h&&c!=null&&(t==null||n||h.width+c+r<Number(t)))h.words.push(l),h.width+=c+r;else{var f={words:[l],width:c};i.push(f)}return i},[]),fk=e=>e.reduce((t,r)=>t.width>r.width?t:r),fZ="…",lP=(e,t,r,n,i,o,l,c)=>{var h=e.slice(0,t),f=uk({breakAll:r,style:n,children:h+fZ});if(!f)return[!1,[]];var p=dk(f.wordsWithComputedWidth,o,l,c),y=p.length>i||fk(p).width>Number(o);return[y,p]},hZ=(e,t,r,n,i)=>{var{maxLines:o,children:l,style:c,breakAll:h}=e,f=ge(o),p=String(l),y=dk(t,n,r,i);if(!f||i)return y;var g=y.length>o||fk(y).width>Number(n);if(!g)return y;for(var v=0,b=p.length-1,w=0,N;v<=b&&w<=p.length-1;){var _=Math.floor((v+b)/2),A=_-1,[C,E]=lP(p,A,h,c,o,n,r,i),[T]=lP(p,_,h,c,o,n,r,i);if(!C&&!T&&(v=_+1),C&&T&&(b=_-1),!C&&T){N=E;break}w++}return N||y},uP=e=>{var t=pt(e)?[]:e.toString().split(lk);return[{words:t,width:void 0}]},mZ=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:o,maxLines:l}=e;if((t||r)&&!Nd.isSsr){var c,h,f=uk({breakAll:o,children:n,style:i});if(f){var{wordsWithComputedWidth:p,spaceWidth:y}=f;c=p,h=y}else return uP(n);return hZ({breakAll:o,children:n,maxLines:l,style:i},c,h,t,!!r)}return uP(n)},hk="#808080",pZ={angle:0,breakAll:!1,capHeight:"0.71em",fill:hk,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Hw=S.forwardRef((e,t)=>{var r=dr(e,pZ),{x:n,y:i,lineHeight:o,capHeight:l,fill:c,scaleToFit:h,textAnchor:f,verticalAnchor:p}=r,y=oP(r,lZ),g=S.useMemo(()=>mZ({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:h,style:y.style,width:y.width}),[y.breakAll,y.children,y.maxLines,h,y.style,y.width]),{dx:v,dy:b,angle:w,className:N,breakAll:_}=y,A=oP(y,uZ);if(!da(n)||!da(i)||g.length===0)return null;var C=Number(n)+(ge(v)?v:0),E=Number(i)+(ge(b)?b:0);if(!Ue(C)||!Ue(E))return null;var T;switch(p){case"start":T=nx("calc(".concat(l,")"));break;case"middle":T=nx("calc(".concat((g.length-1)/2," * -").concat(o," + (").concat(l," / 2))"));break;default:T=nx("calc(".concat(g.length-1," * -").concat(o,")"));break}var R=[],D=g[0];if(h&&D!=null){var M=D.width,{width:U}=y;R.push("scale(".concat(ge(U)&&ge(M)?U/M:1,")"))}return w&&R.push("rotate(".concat(w,", ").concat(C,", ").concat(E,")")),R.length&&(A.transform=R.join(" ")),S.createElement("text",Pb({},Er(A),{ref:t,x:C,y:E,className:We("recharts-text",N),textAnchor:f,fill:c.includes("url")?hk:c}),g.map((k,H)=>{var B=k.words.join(_?"":" ");return S.createElement("tspan",{x:C,dy:H===0?T:o,key:"".concat(B,"-").concat(H)},B)}))});Hw.displayName="Text";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 Zn(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){yZ(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 yZ(e,t,r){return(t=gZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gZ(e){var t=vZ(e,"string");return typeof t=="symbol"?t:t+""}function vZ(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 xZ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:o,y:l,height:c,upperWidth:h,lowerWidth:f}=$j(t),p=o,y=o+(h-f)/2,g=(p+y)/2,v=(h+f)/2,b=p+h/2,w=c>=0?1:-1,N=w*n,_=w>0?"end":"start",A=w>0?"start":"end",C=h>=0?1:-1,E=C*n,T=C>0?"end":"start",R=C>0?"start":"end",D=i;if(r==="top"){var M={x:p+h/2,y:l-N,horizontalAnchor:"middle",verticalAnchor:_};return D&&(M.height=Math.max(l-D.y,0),M.width=h),M}if(r==="bottom"){var U={x:y+f/2,y:l+c+N,horizontalAnchor:"middle",verticalAnchor:A};return D&&(U.height=Math.max(D.y+D.height-(l+c),0),U.width=f),U}if(r==="left"){var k={x:g-E,y:l+c/2,horizontalAnchor:T,verticalAnchor:"middle"};return D&&(k.width=Math.max(k.x-D.x,0),k.height=c),k}if(r==="right"){var H={x:g+v+E,y:l+c/2,horizontalAnchor:R,verticalAnchor:"middle"};return D&&(H.width=Math.max(D.x+D.width-H.x,0),H.height=c),H}var B=D?{width:v,height:c}:{};return r==="insideLeft"?Zn({x:g+E,y:l+c/2,horizontalAnchor:R,verticalAnchor:"middle"},B):r==="insideRight"?Zn({x:g+v-E,y:l+c/2,horizontalAnchor:T,verticalAnchor:"middle"},B):r==="insideTop"?Zn({x:p+h/2,y:l+N,horizontalAnchor:"middle",verticalAnchor:A},B):r==="insideBottom"?Zn({x:y+f/2,y:l+c-N,horizontalAnchor:"middle",verticalAnchor:_},B):r==="insideTopLeft"?Zn({x:p+E,y:l+N,horizontalAnchor:R,verticalAnchor:A},B):r==="insideTopRight"?Zn({x:p+h-E,y:l+N,horizontalAnchor:T,verticalAnchor:A},B):r==="insideBottomLeft"?Zn({x:y+E,y:l+c-N,horizontalAnchor:R,verticalAnchor:_},B):r==="insideBottomRight"?Zn({x:y+f-E,y:l+c-N,horizontalAnchor:T,verticalAnchor:_},B):r&&typeof r=="object"&&(ge(r.x)||oo(r.x))&&(ge(r.y)||oo(r.y))?Zn({x:o+Bn(r.x,v),y:l+Bn(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},B):Zn({x:b,y:l+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},B)},bZ=["labelRef"],jZ=["content"];function dP(e,t){if(e==null)return{};var r,n,i=wZ(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 wZ(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 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 Pc(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){SZ(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 SZ(e,t,r){return(t=NZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NZ(e){var t=_Z(e,"string");return typeof t=="symbol"?t:t+""}function _Z(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 Ua(){return Ua=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},Ua.apply(null,arguments)}var mk=S.createContext(null),OZ=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:l,children:c}=e,h=S.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:o,height:l}),[t,r,n,i,o,l]);return S.createElement(mk.Provider,{value:h},c)},pk=()=>{var e=S.useContext(mk),t=jp();return e||(t?$j(t):void 0)},EZ=S.createContext(null),AZ=()=>{var e=S.useContext(EZ),t=be(o4);return e||t},CZ=e=>{var{value:t,formatter:r}=e,n=pt(e.children)?t:e.children;return typeof r=="function"?r(n):n},Kw=e=>e!=null&&typeof e=="function",TZ=(e,t)=>{var r=qr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},PZ=(e,t,r,n,i)=>{var{offset:o,className:l}=e,{cx:c,cy:h,innerRadius:f,outerRadius:p,startAngle:y,endAngle:g,clockWise:v}=i,b=(f+p)/2,w=TZ(y,g),N=w>=0?1:-1,_,A;switch(t){case"insideStart":_=y+N*o,A=v;break;case"insideEnd":_=g-N*o,A=!v;break;case"end":_=g+N*o,A=v;break;default:throw new Error("Unsupported position ".concat(t))}A=w<=0?A:!A;var C=ur(c,h,b,_),E=ur(c,h,b,_+(A?1:-1)*359),T="M".concat(C.x,",").concat(C.y,`
|
|
108
|
-
A`).concat(b,",").concat(b,",0,1,").concat(A?0:1,`,
|
|
109
|
-
`).concat(E.x,",").concat(E.y),R=pt(e.id)?Kc("recharts-radial-line-"):e.id;return S.createElement("text",Ua({},n,{dominantBaseline:"central",className:We("recharts-radial-bar-label",l)}),S.createElement("defs",null,S.createElement("path",{id:R,d:T})),S.createElement("textPath",{xlinkHref:"#".concat(R)},r))},RZ=(e,t,r)=>{var{cx:n,cy:i,innerRadius:o,outerRadius:l,startAngle:c,endAngle:h}=e,f=(c+h)/2;if(r==="outside"){var{x:p,y}=ur(n,i,l+t,f);return{x:p,y,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var g=(o+l)/2,{x:v,y:b}=ur(n,i,g,f);return{x:v,y:b,textAnchor:"middle",verticalAnchor:"middle"}},kh=e=>e!=null&&"cx"in e&&ge(e.cx),MZ={angle:0,offset:5,zIndex:Qt.label,position:"middle",textBreakAll:!1};function DZ(e){if(!kh(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 Ii(e){var t=dr(e,MZ),{viewBox:r,parentViewBox:n,position:i,value:o,children:l,content:c,className:h="",textBreakAll:f,labelRef:p}=t,y=AZ(),g=pk(),v=i==="center"?g:y??g,b,w,N;r==null?b=v:kh(r)?b=r:b=$j(r);var _=DZ(b);if(!b||pt(o)&&pt(l)&&!S.isValidElement(c)&&typeof c!="function")return null;var A=Pc(Pc({},t),{},{viewBox:b});if(S.isValidElement(c)){var{labelRef:C}=A,E=dP(A,bZ);return S.cloneElement(c,E)}if(typeof c=="function"){var{content:T}=A,R=dP(A,jZ);if(w=S.createElement(c,R),S.isValidElement(w))return w}else w=CZ(t);var D=Er(t);if(kh(b)){if(i==="insideStart"||i==="insideEnd"||i==="end")return PZ(t,i,w,D,b);N=RZ(b,t.offset,t.position)}else{if(!_)return null;var M=xZ({viewBox:_,position:i,offset:t.offset,parentViewBox:kh(n)?void 0:n});N=Pc(Pc({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(Hw,Ua({ref:p,className:We("recharts-label",h)},D,N,{textAnchor:ck(D.textAnchor)?D.textAnchor:N.textAnchor,breakAll:f}),w))}Ii.displayName="Label";var kZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?S.createElement(Ii,Ua({key:"label-implicit"},n)):da(e)?S.createElement(Ii,Ua({key:"label-implicit",value:e},n)):S.isValidElement(e)?e.type===Ii?S.cloneElement(e,Pc({key:"label-implicit"},n)):S.createElement(Ii,Ua({key:"label-implicit",content:e},n)):Kw(e)?S.createElement(Ii,Ua({key:"label-implicit",content:e},n)):e&&typeof e=="object"?S.createElement(Ii,Ua({},e,{key:"label-implicit"},n)):null};function LZ(e){var{label:t,labelRef:r}=e,n=pk();return kZ(t,n,r)||null}var IZ=["valueAccessor"],$Z=["dataKey","clockWise","id","textBreakAll","zIndex"];function zm(){return zm=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},zm.apply(null,arguments)}function hP(e,t){if(e==null)return{};var r,n,i=zZ(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 zZ(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 BZ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(dZ(t))return t},yk=S.createContext(void 0),gk=yk.Provider,vk=S.createContext(void 0);vk.Provider;function UZ(){return S.useContext(yk)}function qZ(){return S.useContext(vk)}function Lh(e){var{valueAccessor:t=BZ}=e,r=hP(e,IZ),{dataKey:n,clockWise:i,id:o,textBreakAll:l,zIndex:c}=r,h=hP(r,$Z),f=UZ(),p=qZ(),y=f||p;return!y||!y.length?null:S.createElement(Tn,{zIndex:c??Qt.label},S.createElement(sn,{className:"recharts-label-list"},y.map((g,v)=>{var b,w=pt(n)?t(g,v):Pt(g.payload,n),N=pt(o)?{}:{id:"".concat(o,"-").concat(v)};return S.createElement(Ii,zm({key:"label-".concat(v)},Er(g),h,N,{fill:(b=r.fill)!==null&&b!==void 0?b:g.fill,parentViewBox:g.parentViewBox,value:w,textBreakAll:l,viewBox:g.viewBox,index:v,zIndex:0}))})))}Lh.displayName="LabelList";function xk(e){var{label:t}=e;return t?t===!0?S.createElement(Lh,{key:"labelList-implicit"}):S.isValidElement(t)||Kw(t)?S.createElement(Lh,{key:"labelList-implicit",content:t}):typeof t=="object"?S.createElement(Lh,zm({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}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)}var bk=e=>{var{cx:t,cy:r,r:n,className:i}=e,o=We("recharts-dot",i);return ge(t)&&ge(r)&&ge(n)?S.createElement("circle",Rb({},zn(e),Oj(e),{className:o,cx:t,cy:r,r:n})):null},FZ={radiusAxis:{},angleAxis:{}},jk=xr({name:"polarAxis",initialState:FZ,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:$oe,removeRadiusAxis:zoe,addAngleAxis:Boe,removeAngleAxis:Uoe}=jk.actions,HZ=jk.reducer;function KZ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var ax={exports:{}},rt={};/**
|
|
110
|
-
* @license React
|
|
111
|
-
* react-is.production.js
|
|
112
|
-
*
|
|
113
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the MIT license found in the
|
|
116
|
-
* LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/var mP;function GZ(){if(mP)return rt;mP=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"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.view_transition"),v=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 h:case f:case g:return w;default:switch(w=w&&w.$$typeof,w){case l:case c:case y:case p:return w;case o:return w;default:return N}}case t:return N}}}return rt.ContextConsumer=o,rt.ContextProvider=l,rt.Element=e,rt.ForwardRef=c,rt.Fragment=r,rt.Lazy=y,rt.Memo=p,rt.Portal=t,rt.Profiler=i,rt.StrictMode=n,rt.Suspense=h,rt.SuspenseList=f,rt.isContextConsumer=function(w){return b(w)===o},rt.isContextProvider=function(w){return b(w)===l},rt.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},rt.isForwardRef=function(w){return b(w)===c},rt.isFragment=function(w){return b(w)===r},rt.isLazy=function(w){return b(w)===y},rt.isMemo=function(w){return b(w)===p},rt.isPortal=function(w){return b(w)===t},rt.isProfiler=function(w){return b(w)===i},rt.isStrictMode=function(w){return b(w)===n},rt.isSuspense=function(w){return b(w)===h},rt.isSuspenseList=function(w){return b(w)===f},rt.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===i||w===n||w===h||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===y||w.$$typeof===p||w.$$typeof===l||w.$$typeof===o||w.$$typeof===c||w.$$typeof===v||w.getModuleId!==void 0)},rt.typeOf=b,rt}var pP;function YZ(){return pP||(pP=1,ax.exports=GZ()),ax.exports}var VZ=YZ(),yP=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",gP=null,ix=null,wk=e=>{if(e===gP&&Array.isArray(ix))return ix;var t=[];return S.Children.forEach(e,r=>{pt(r)||(VZ.isFragment(r)?t=t.concat(wk(r.props.children)):t.push(r))}),ix=t,gP=e,t};function QZ(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>yP(i)):n=[yP(t)],wk(e).forEach(i=>{var o=Gl(i,"type.displayName")||Gl(i,"type.name");o&&n.indexOf(o)!==-1&&r.push(i)}),r}var Sk=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,sx={},vP;function XZ(){return vP||(vP=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})(sx)),sx}var ox,xP;function WZ(){return xP||(xP=1,ox=XZ().isPlainObject),ox}var ZZ=WZ();const JZ=ss(ZZ);var bP,jP,wP,SP,NP;function _P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function OP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_P(Object(r),!0).forEach(function(n){eJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_P(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function eJ(e,t,r){return(t=tJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tJ(e){var t=rJ(e,"string");return typeof t=="symbol"?t:t+""}function rJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bm(){return Bm=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},Bm.apply(null,arguments)}function Nc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var EP=(e,t,r,n,i)=>{var o=r-n,l;return l=Nt(bP||(bP=Nc(["M ",",",""])),e,t),l+=Nt(jP||(jP=Nc(["L ",",",""])),e+r,t),l+=Nt(wP||(wP=Nc(["L ",",",""])),e+r-o/2,t+i),l+=Nt(SP||(SP=Nc(["L ",",",""])),e+r-o/2-n,t+i),l+=Nt(NP||(NP=Nc(["L ",","," Z"])),e,t),l},nJ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aJ=e=>{var t=dr(e,nJ),{x:r,y:n,upperWidth:i,lowerWidth:o,height:l,className:c}=t,{animationEasing:h,animationDuration:f,animationBegin:p,isUpdateAnimationActive:y}=t,g=S.useRef(null),[v,b]=S.useState(-1),w=S.useRef(i),N=S.useRef(o),_=S.useRef(l),A=S.useRef(r),C=S.useRef(n),E=Op(e,"trapezoid-");if(S.useEffect(()=>{if(g.current&&g.current.getTotalLength)try{var ee=g.current.getTotalLength();ee&&b(ee)}catch{}},[]),r!==+r||n!==+n||i!==+i||o!==+o||l!==+l||i===0&&o===0||l===0)return null;var T=We("recharts-trapezoid",c);if(!y)return S.createElement("g",null,S.createElement("path",Bm({},Er(t),{className:T,d:EP(r,n,i,o,l)})));var R=w.current,D=N.current,M=_.current,U=A.current,k=C.current,H="0px ".concat(v===-1?1:v,"px"),B="".concat(v,"px ").concat(v,"px"),ae=M3(["strokeDasharray"],f,h);return S.createElement(_p,{animationId:E,key:E,canBegin:v>0,duration:f,easing:h,isActive:y,begin:p},ee=>{var ne=_t(R,i,ee),$=_t(D,o,ee),L=_t(M,l,ee),W=_t(U,r,ee),te=_t(k,n,ee);g.current&&(w.current=ne,N.current=$,_.current=L,A.current=W,C.current=te);var se=ee>0?{transition:ae,strokeDasharray:B}:{strokeDasharray:H};return S.createElement("path",Bm({},Er(t),{className:T,d:EP(W,te,ne,$,L),ref:g,style:OP(OP({},se),t.style)}))})},iJ=["option","shapeType","activeClassName","inActiveClassName"];function sJ(e,t){if(e==null)return{};var r,n,i=oJ(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 oJ(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 AP(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 Um(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AP(Object(r),!0).forEach(function(n){lJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function lJ(e,t,r){return(t=uJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uJ(e){var t=cJ(e,"string");return typeof t=="symbol"?t:t+""}function cJ(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 dJ(e,t){return Um(Um({},t),e)}function fJ(e,t){return e==="symbols"}function CP(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return S.createElement(I3,r);case"trapezoid":return S.createElement(aJ,r);case"sector":return S.createElement(B3,r);case"symbols":if(fJ(t))return S.createElement(_j,r);break;case"curve":return S.createElement(R3,r);default:return null}}function hJ(e){return S.isValidElement(e)?e.props:e}function Nk(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,o=sJ(e,iJ),l;if(S.isValidElement(t))l=S.cloneElement(t,Um(Um({},o),hJ(t)));else if(typeof t=="function")l=t(o,o.index);else if(JZ(t)&&typeof t!="boolean"){var c=dJ(t,o);l=S.createElement(CP,{shapeType:r,elementProps:c})}else{var h=o;l=S.createElement(CP,{shapeType:r,elementProps:h})}return o.isActive?S.createElement(sn,{className:n},l):S.createElement(sn,{className:i},l)}var _k=(e,t,r)=>{var n=dt();return(i,o)=>l=>{e==null||e(i,o,l),n(RD({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},Ok=e=>{var t=dt();return(r,n)=>i=>{e==null||e(r,n,i),t(TQ())}},Ek=(e,t,r)=>{var n=dt();return(i,o)=>l=>{e==null||e(i,o,l),n(PQ({activeIndex:String(o),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function Ak(e){var{tooltipEntrySettings:t}=e,r=dt(),n=br(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(OQ(t)):i.current!==t&&r(EQ({prev:i.current,next:t})),i.current=t)},[t,r,n]),S.useLayoutEffect(()=>()=>{i.current&&(r(AQ(i.current)),i.current=null)},[r]),null}function Ck(e){var{legendPayload:t}=e,r=dt(),n=br(),i=S.useRef(null);return S.useLayoutEffect(()=>{n||(i.current===null?r(y7(t)):i.current!==t&&r(g7({prev:i.current,next:t})),i.current=t)},[r,n,t]),S.useLayoutEffect(()=>()=>{i.current&&(r(v7(i.current)),i.current=null)},[r]),null}var lx,mJ=()=>{var[e]=S.useState(()=>Kc("uid-"));return e},pJ=(lx=I$.useId)!==null&&lx!==void 0?lx:mJ;function yJ(e,t){var r=pJ();return t||(e?"".concat(e,"-").concat(r):r)}var gJ=S.createContext(void 0),Tk=e=>{var{id:t,type:r,children:n}=e,i=yJ("recharts-".concat(r),t);return S.createElement(gJ.Provider,{value:i},n(i))},vJ={cartesianItems:[],polarItems:[]},Pk=xr({name:"graphicalItems",initialState:vJ,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:ut()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:ut()},removeCartesianGraphicalItem:{reducer(e,t){var r=On(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:ut()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:ut()},removePolarGraphicalItem:{reducer(e,t){var r=On(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:ut()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=On(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:ut()}}}),{addCartesianGraphicalItem:xJ,replaceCartesianGraphicalItem:bJ,removeCartesianGraphicalItem:jJ,addPolarGraphicalItem:qoe,removePolarGraphicalItem:Foe,replacePolarGraphicalItem:Hoe}=Pk.actions,wJ=Pk.reducer,SJ=e=>{var t=dt(),r=S.useRef(null);return S.useLayoutEffect(()=>{r.current===null?t(xJ(e)):r.current!==e&&t(bJ({prev:r.current,next:e})),r.current=e},[t,e]),S.useLayoutEffect(()=>()=>{r.current&&(t(jJ(r.current)),r.current=null)},[t]),null},Rk=S.memo(SJ),NJ=["points"];function TP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ux(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TP(Object(r),!0).forEach(function(n){_J(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function _J(e,t,r){return(t=OJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OJ(e){var t=EJ(e,"string");return typeof t=="symbol"?t:t+""}function EJ(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 qm(){return qm=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},qm.apply(null,arguments)}function AJ(e,t){if(e==null)return{};var r,n,i=CJ(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 CJ(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 TJ(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=We(n,typeof t!="boolean"?t.className:""),o=r??{},{points:l}=o,c=AJ(o,NJ);return S.createElement(bk,qm({},c,{className:i}))}function PJ(e,t){return e==null?!1:t?!0:e.length===1}function RJ(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:o,baseProps:l,needClip:c,clipPathId:h,zIndex:f=Qt.scatter}=e;if(!PJ(t,r))return null;var p=Sk(r),y=r9(r),g=t.map((b,w)=>{var N,_,A=ux(ux(ux({r:3},l),y),{},{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(TJ,{key:"dot-".concat(w),option:r,dotProps:A,className:i})}),v={};return c&&h!=null&&(v.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(h,")")),S.createElement(Tn,{zIndex:f},S.createElement(sn,qm({className:n},v),g))}function PP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function RP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PP(Object(r),!0).forEach(function(n){MJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function MJ(e,t,r){return(t=DJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DJ(e){var t=kJ(e,"string");return typeof t=="symbol"?t:t+""}function kJ(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 Mk=0,LJ={xAxis:{},yAxis:{},zAxis:{}},Dk=xr({name:"cartesianAxis",initialState:LJ,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:ut()},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:ut()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:ut()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:ut()},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:ut()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:ut()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:ut()},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:ut()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:ut()},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]=RP(RP({},i),{},{width:n,widthHistory:c})}}}}),{addXAxis:IJ,replaceXAxis:$J,removeXAxis:zJ,addYAxis:BJ,replaceYAxis:UJ,removeYAxis:qJ,addZAxis:Koe,replaceZAxis:Goe,removeZAxis:Yoe,updateYAxisWidth:FJ}=Dk.actions,HJ=Dk.reducer,KJ=V([Wt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),GJ=V([KJ,ti,ri],(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)}}),Gw=()=>be(GJ),YJ=()=>be(OX);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 cx(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){VJ(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 VJ(e,t,r){return(t=QJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QJ(e){var t=XJ(e,"string");return typeof t=="symbol"?t:t+""}function XJ(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 WJ=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},h=cx(cx(cx({},c),gd(i)),Oj(i)),f;return S.isValidElement(i)?f=S.cloneElement(i,h):typeof i=="function"?f=i(h):f=S.createElement(bk,h),S.createElement(sn,{className:"recharts-active-dot",clipPath:l},f)};function ZJ(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:o,zIndex:l=Qt.activeDot}=e,c=be(mo),h=YJ();if(t==null||h==null)return null;var f=t.find(p=>h.includes(p.payload));return pt(f)?null:S.createElement(Tn,{zIndex:l},S.createElement(WJ,{point:f,childIndex:Number(c),mainColor:r,dataKey:i,activeDot:n,clipPath:o}))}var DP=(e,t,r)=>{var n=r??e;if(!pt(n))return Bn(n,t,0)},JJ=(e,t,r)=>{var n={},i=e.filter(Rp),o=e.filter(f=>f.stackId==null),l=i.reduce((f,p)=>{var y=f[p.stackId];return y==null&&(y=[]),y.push(p),f[p.stackId]=y,f},n),c=Object.entries(l).map(f=>{var p,[y,g]=f,v=g.map(w=>w.dataKey),b=DP(t,r,(p=g[0])===null||p===void 0?void 0:p.barSize);return{stackId:y,dataKeys:v,barSize:b}}),h=o.map(f=>{var p=[f.dataKey].filter(g=>g!=null),y=DP(t,r,f.barSize);return{stackId:void 0,dataKeys:p,barSize:y}});return[...c,...h]};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 jh(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){eee(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 eee(e,t,r){return(t=tee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function tee(e){var t=ree(e,"string");return typeof t=="symbol"?t:t+""}function ree(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 nee(e,t,r,n,i){var o,l=n.length;if(!(l<1)){var c=Bn(e,r,0,!0),h,f=[];if(Ue((o=n[0])===null||o===void 0?void 0:o.barSize)){var p=!1,y=r/l,g=n.reduce((A,C)=>A+(C.barSize||0),0);g+=(l-1)*c,g>=r&&(g-=(l-1)*c,c=0),g>=r&&y>0&&(p=!0,y*=.9,g=l*y);var v=(r-g)/2>>0,b={offset:v-c,size:0};h=n.reduce((A,C)=>{var E,T={stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:b.offset+b.size+c,size:p?y:(E=C.barSize)!==null&&E!==void 0?E:0}},R=[...A,T];return b=T.position,R},f)}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 _=Ue(i)?Math.min(N,i):N;h=n.reduce((A,C,E)=>[...A,{stackId:C.stackId,dataKeys:C.dataKeys,position:{offset:w+(N+c)*E+(N-_)/2,size:_}}],f)}return h}}var aee=(e,t,r,n,i,o,l)=>{var c=pt(l)?t:l,h=nee(r,n,i!==o?i:o,e,c);return i!==o&&h!=null&&(h=h.map(f=>jh(jh({},f),{},{position:jh(jh({},f.position),{},{offset:f.position.offset-i/2})}))),h},iee=(e,t)=>{var r=Jj(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)}}}},see=(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 oee(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Ue(e.zIndex)?e.zIndex:t}var lee=e=>{var{chartData:t}=e,r=dt(),n=br();return S.useEffect(()=>n?()=>{}:(r(QT(t)),()=>{r(QT(void 0))}),[t,r,n]),null},LP={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},kk=xr({name:"brush",initialState:LP,reducers:{setBrushSettings(e,t){return t.payload==null?LP:t.payload}}}),{setBrushSettings:Voe}=kk.actions,uee=kk.reducer;function cee(e){return(e%180+180)%180}var dee=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=cee(i),l=o*Math.PI/180,c=Math.atan(n/r),h=l>c&&l<Math.PI-c?n/Math.sin(l):r/Math.cos(l);return Math.abs(h)},fee={dots:[],areas:[],lines:[]},Lk=xr({name:"referenceElements",initialState:fee,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=On(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=On(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=On(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:Qoe,removeDot:Xoe,addArea:Woe,removeArea:Zoe,addLine:Joe,removeLine:ele}=Lk.actions,hee=Lk.reducer,mee=S.createContext(void 0),pee=e=>{var{children:t}=e,[r]=S.useState("".concat(Kc("recharts"),"-clip")),n=Gw();if(n==null)return null;var{x:i,y:o,width:l,height:c}=n;return S.createElement(mee.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 Ik(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 yee(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return dee(n,r)}function gee(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 id(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 vee(e,t){return Ik(e,t+1)}function xee(e,t,r,n,i){for(var o=(n||[]).slice(),{start:l,end:c}=t,h=0,f=1,p=l,y=function(){var b=n==null?void 0:n[h];if(b===void 0)return{v:Ik(n,f)};var w=h,N,_=()=>(N===void 0&&(N=r(b,w)),N),A=b.coordinate,C=h===0||id(e,A,_,p,c);C||(h=0,p=l,f+=1),C&&(p=A+e*(_()/2+i),h+=f)},g;f<=o.length;)if(g=y(),g)return g.v;return[]}function bee(e,t,r,n,i){var o=(n||[]).slice(),l=o.length;if(l===0)return[];for(var{start:c,end:h}=t,f=1;f<=l;f++){for(var p=(l-1)%f,y=c,g=!0,v=function(){var E=n[w];if(E==null)return 0;var T=w,R,D=()=>(R===void 0&&(R=r(E,T)),R),M=E.coordinate,U=w===p||id(e,M,D,y,h);if(!U)return g=!1,1;U&&(y=M+e*(D()/2+i))},b,w=p;w<l&&(b=v(),!(b!==0&&b===1));w+=f);if(g){for(var N=[],_=p;_<l;_+=f){var A=n[_];A!=null&&N.push(A)}return N}}return[]}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 pr(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){jee(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 jee(e,t,r){return(t=wee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wee(e){var t=See(e,"string");return typeof t=="symbol"?t:t+""}function See(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 Nee(e,t,r,n,i){for(var o=(n||[]).slice(),l=o.length,{start:c}=t,{end:h}=t,f=function(g){var v=o[g];if(v==null)return 1;var b=v,w,N=()=>(w===void 0&&(w=r(v,g)),w);if(g===l-1){var _=e*(b.coordinate+e*N()/2-h);o[g]=b=pr(pr({},b),{},{tickCoord:_>0?b.coordinate-_*e:b.coordinate})}else o[g]=b=pr(pr({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var A=id(e,b.tickCoord,N,c,h);A&&(h=b.tickCoord-e*(N()/2+i),o[g]=pr(pr({},b),{},{isShow:!0}))}},p=l-1;p>=0;p--)f(p);return o}function _ee(e,t,r,n,i,o){var l=(n||[]).slice(),c=l.length,{start:h,end:f}=t;if(o){var p=n[c-1];if(p!=null){var y=r(p,c-1),g=e*(p.coordinate+e*y/2-f);if(l[c-1]=p=pr(pr({},p),{},{tickCoord:g>0?p.coordinate-g*e:p.coordinate}),p.tickCoord!=null){var v=id(e,p.tickCoord,()=>y,h,f);v&&(f=p.tickCoord-e*(y/2+i),l[c-1]=pr(pr({},p),{},{isShow:!0}))}}}for(var b=o?c-1:c,w=function(A){var C=l[A];if(C==null)return 1;var E=C,T,R=()=>(T===void 0&&(T=r(C,A)),T);if(A===0){var D=e*(E.coordinate-e*R()/2-h);l[A]=E=pr(pr({},E),{},{tickCoord:D<0?E.coordinate-D*e:E.coordinate})}else l[A]=E=pr(pr({},E),{},{tickCoord:E.coordinate});if(E.tickCoord!=null){var M=id(e,E.tickCoord,R,h,f);M&&(h=E.tickCoord+e*(R()/2+i),l[A]=pr(pr({},E),{},{isShow:!0}))}},N=0;N<b;N++)w(N);return l}function Yw(e,t,r){var{tick:n,ticks:i,viewBox:o,minTickGap:l,orientation:c,interval:h,tickFormatter:f,unit:p,angle:y}=e;if(!i||!i.length||!n)return[];if(ge(h)||Nd.isSsr){var g;return(g=vee(i,ge(h)?h:0))!==null&&g!==void 0?g:[]}var v=[],b=c==="top"||c==="bottom"?"width":"height",w=p&&b==="width"?Mc(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},N=(T,R)=>{var D=typeof f=="function"?f(T.value,R):T.value;return b==="width"?yee(Mc(D,{fontSize:t,letterSpacing:r}),w,y):Mc(D,{fontSize:t,letterSpacing:r})[b]},_=i[0],A=i[1],C=i.length>=2&&_!=null&&A!=null?qr(A.coordinate-_.coordinate):1,E=gee(o,C,b);return h==="equidistantPreserveStart"?xee(C,E,N,i,l):h==="equidistantPreserveEnd"?bee(C,E,N,i,l):(h==="preserveStart"||h==="preserveStartEnd"?v=_ee(C,E,N,i,l,h==="preserveStartEnd"):v=Nee(C,E,N,i,l),v.filter(T=>T.isShow))}var Oee=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:o=0}=e,l=0;if(t){Array.from(t).forEach(p=>{if(p){var y=p.getBoundingClientRect();y.width>l&&(l=y.width)}});var c=r?r.getBoundingClientRect().width:0,h=i+o,f=l+h+c+(r?n:0);return Math.round(f)}return 0},Eee={xAxis:{},yAxis:{}},$k=xr({name:"renderedTicks",initialState:Eee,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:Aee,removeRenderedTicks:Cee}=$k.actions,Tee=$k.reducer,Pee=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function Ree(e,t){if(e==null)return{};var r,n,i=Mee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Mee(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function po(){return po=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},po.apply(null,arguments)}function $P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function St(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$P(Object(r),!0).forEach(function(n){Dee(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$P(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Dee(e,t,r){return(t=kee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kee(e){var t=Lee(e,"string");return typeof t=="symbol"?t:t+""}function Lee(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 Va={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:Qt.axis};function Iee(e){var{x:t,y:r,width:n,height:i,orientation:o,mirror:l,axisLine:c,otherSvgProps:h}=e;if(!c)return null;var f=St(St(St({},h),zn(c)),{},{fill:"none"});if(o==="top"||o==="bottom"){var p=+(o==="top"&&!l||o==="bottom"&&l);f=St(St({},f),{},{x1:t,y1:r+p*i,x2:t+n,y2:r+p*i})}else{var y=+(o==="left"&&!l||o==="right"&&l);f=St(St({},f),{},{x1:t+y*n,y1:r,x2:t+y*n,y2:r+i})}return S.createElement("line",po({},f,{className:We("recharts-cartesian-axis-line",Gl(c,"className"))}))}function $ee(e,t,r,n,i,o,l,c,h){var f,p,y,g,v,b,w=c?-1:1,N=e.tickSize||l,_=ge(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":f=p=e.coordinate,g=r+ +!c*i,y=g-w*N,b=y-w*h,v=_;break;case"left":y=g=e.coordinate,p=t+ +!c*n,f=p-w*N,v=f-w*h,b=_;break;case"right":y=g=e.coordinate,p=t+ +c*n,f=p+w*N,v=f+w*h,b=_;break;default:f=p=e.coordinate,g=r+ +c*i,y=g+w*N,b=y+w*h,v=_;break}return{line:{x1:f,y1:y,x2:p,y2:g},tick:{x:v,y:b}}}function zee(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function Bee(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Uee(e){var{option:t,tickProps:r,value:n}=e,i,o=We(r.className,"recharts-cartesian-axis-tick-value");if(S.isValidElement(t))i=S.cloneElement(t,St(St({},r),{},{className:o}));else if(typeof t=="function")i=t(St(St({},r),{},{className:o}));else{var l="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(l=We(l,KZ(t))),i=S.createElement(Hw,po({},r,{className:l}),n)}return i}function qee(e){var{ticks:t,axisType:r,axisId:n}=e,i=dt();return S.useEffect(()=>{if(n==null||r==null)return vo;var o=t.map(l=>({value:l.value,coordinate:l.coordinate,offset:l.offset,index:l.index}));return i(Aee({ticks:o,axisId:n,axisType:r})),()=>{i(Cee({axisId:n,axisType:r}))}},[i,t,n,r]),null}var Fee=S.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:o,tickFormatter:l,unit:c,padding:h,tickTextProps:f,orientation:p,mirror:y,x:g,y:v,width:b,height:w,tickSize:N,tickMargin:_,fontSize:A,letterSpacing:C,getTicksConfig:E,events:T,axisType:R,axisId:D}=e,M=Yw(St(St({},E),{},{ticks:r}),A,C),U=zn(E),k=gd(n),H=ck(U.textAnchor)?U.textAnchor:zee(p,y),B=Bee(p,y),ae={};typeof i=="object"&&(ae=i);var ee=St(St({},U),{},{fill:"none"},ae),ne=M.map(W=>St({entry:W},$ee(W,g,v,b,w,p,N,y,_))),$=ne.map(W=>{var{entry:te,line:se}=W;return S.createElement(sn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(te.value,"-").concat(te.coordinate,"-").concat(te.tickCoord)},i&&S.createElement("line",po({},ee,se,{className:We("recharts-cartesian-axis-tick-line",Gl(i,"className"))})))}),L=ne.map((W,te)=>{var se,I,{entry:Q,tick:le}=W,oe=St(St(St(St({verticalAnchor:B},U),{},{textAnchor:H,stroke:"none",fill:o},le),{},{index:te,payload:Q,visibleTicksCount:M.length,tickFormatter:l,padding:h},f),{},{angle:(se=(I=f==null?void 0:f.angle)!==null&&I!==void 0?I:U.angle)!==null&&se!==void 0?se:0}),fe=St(St({},oe),k);return S.createElement(sn,po({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(Q.value,"-").concat(Q.coordinate,"-").concat(Q.tickCoord)},ip(T,Q,te)),n&&S.createElement(Uee,{option:n,tickProps:fe,value:"".concat(typeof l=="function"?l(Q.value,te):Q.value).concat(c||"")}))});return S.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(R,"-ticks")},S.createElement(qee,{ticks:M,axisId:D,axisType:R}),L.length>0&&S.createElement(Tn,{zIndex:Qt.label},S.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(R,"-tick-labels"),ref:t},L)),$.length>0&&S.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(R,"-tick-lines")},$))}),Hee=S.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:o,hide:l,ticks:c,axisType:h,axisId:f}=e,p=Ree(e,Pee),[y,g]=S.useState(""),[v,b]=S.useState(""),w=S.useRef(null);S.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var _;return Oee({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 A=_.getElementsByClassName("recharts-cartesian-axis-tick-value");w.current=A;var C=A[0];if(C){var E=window.getComputedStyle(C),T=E.fontSize,R=E.letterSpacing;(T!==y||R!==v)&&(g(T),b(R))}}},[y,v]);return l||n!=null&&n<=0||i!=null&&i<=0?null:S.createElement(Tn,{zIndex:e.zIndex},S.createElement(sn,{className:We("recharts-cartesian-axis",o)},S.createElement(Iee,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:zn(e)}),S.createElement(Fee,{ref:N,axisType:h,events:p,fontSize:y,getTicksConfig:e,height:e.height,letterSpacing:v,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:f}),S.createElement(OZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},S.createElement(LZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),Vw=S.forwardRef((e,t)=>{var r=dr(e,Va);return S.createElement(Hee,po({},r,{ref:t}))});Vw.displayName="CartesianAxis";var Kee=["x1","y1","x2","y2","key"],Gee=["offset"],Yee=["xAxisId","yAxisId"],Vee=["xAxisId","yAxisId"];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){Qee(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 Qee(e,t,r){return(t=Xee(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Xee(e){var t=Wee(e,"string");return typeof t=="symbol"?t:t+""}function Wee(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 Us(){return Us=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},Us.apply(null,arguments)}function Fm(e,t){if(e==null)return{};var r,n,i=Zee(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 Zee(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 Jee=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 zk(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:h,key:f}=r,p=Fm(r,Kee),y=(i=zn(p))!==null&&i!==void 0?i:{},{offset:g}=y,v=Fm(y,Gee);n=S.createElement("line",Us({},v,{x1:o,y1:l,x2:c,y2:h,fill:"none",key:f}))}return n}function ete(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=Fm(e,Yee),h=i.map((f,p)=>{var y=yr(yr({},c),{},{x1:t,y1:f,x2:t+r,y2:f,key:"line-".concat(p),index:p});return S.createElement(zk,{key:"line-".concat(p),option:n,lineItemProps:y})});return S.createElement("g",{className:"recharts-cartesian-grid-horizontal"},h)}function tte(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=Fm(e,Vee),h=i.map((f,p)=>{var y=yr(yr({},c),{},{x1:f,y1:t,x2:f,y2:t+r,key:"line-".concat(p),index:p});return S.createElement(zk,{option:n,lineItemProps:y,key:"line-".concat(p)})});return S.createElement("g",{className:"recharts-cartesian-grid-vertical"},h)}function rte(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:o,height:l,horizontalPoints:c,horizontal:h=!0}=e;if(!h||!t||!t.length||c==null)return null;var f=c.map(y=>Math.round(y+i-i)).sort((y,g)=>y-g);i!==f[0]&&f.unshift(0);var p=f.map((y,g)=>{var v=f[g+1],b=v==null,w=b?i+l-y:v-y;if(w<=0)return null;var N=g%t.length;return S.createElement("rect",{key:"react-".concat(g),y,x:n,height:w,width:o,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function nte(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:o,width:l,height:c,verticalPoints:h}=e;if(!t||!r||!r.length)return null;var f=h.map(y=>Math.round(y+i-i)).sort((y,g)=>y-g);i!==f[0]&&f.unshift(0);var p=f.map((y,g)=>{var v=f[g+1],b=v==null,w=b?i+l-y:v-y;if(w<=0)return null;var N=g%r.length;return S.createElement("rect",{key:"react-".concat(g),x:y,y:o,width:w,height:c,stroke:"none",fill:r[N],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return S.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var ate=(e,t)=>{var{xAxis:r,width:n,height:i,offset:o}=e;return h3(Yw(yr(yr(yr({},Va),r),{},{ticks:m3(r),viewBox:{x:0,y:0,width:n,height:i}})),o.left,o.left+o.width,t)},ite=(e,t)=>{var{yAxis:r,width:n,height:i,offset:o}=e;return h3(Yw(yr(yr(yr({},Va),r),{},{ticks:m3(r),viewBox:{x:0,y:0,width:n,height:i}})),o.top,o.top+o.height,t)},ste={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Qt.grid};function Kp(e){var t=zj(),r=Bj(),n=x3(),i=yr(yr({},dr(e,ste)),{},{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:h,width:f,height:p,syncWithTicks:y,horizontalValues:g,verticalValues:v}=i,b=br(),w=be(U=>LT(U,"xAxis",o,b)),N=be(U=>LT(U,"yAxis",l,b));if(!fa(f)||!fa(p)||!ge(c)||!ge(h))return null;var _=i.verticalCoordinatesGenerator||ate,A=i.horizontalCoordinatesGenerator||ite,{horizontalPoints:C,verticalPoints:E}=i;if((!C||!C.length)&&typeof A=="function"){var T=g&&g.length,R=A({yAxis:N?yr(yr({},N),{},{ticks:T?g:N.ticks}):void 0,width:t??f,height:r??p,offset:n},T?!0:y);mm(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof R,"]")),Array.isArray(R)&&(C=R)}if((!E||!E.length)&&typeof _=="function"){var D=v&&v.length,M=_({xAxis:w?yr(yr({},w),{},{ticks:D?v:w.ticks}):void 0,width:t??f,height:r??p,offset:n},D?!0:y);mm(Array.isArray(M),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(E=M)}return S.createElement(Tn,{zIndex:i.zIndex},S.createElement("g",{className:"recharts-cartesian-grid"},S.createElement(Jee,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),S.createElement(rte,Us({},i,{horizontalPoints:C})),S.createElement(nte,Us({},i,{verticalPoints:E})),S.createElement(ete,Us({},i,{offset:n,horizontalPoints:C,xAxis:w,yAxis:N})),S.createElement(tte,Us({},i,{offset:n,verticalPoints:E,xAxis:w,yAxis:N}))))}Kp.displayName="CartesianGrid";var ote={},Bk=xr({name:"errorBars",initialState:ote,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:tle,replaceErrorBar:rle,removeErrorBar:nle}=Bk.actions,lte=Bk.reducer,ute=["children"];function cte(e,t){if(e==null)return{};var r,n,i=dte(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 dte(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 fte={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},hte=S.createContext(fte);function Uk(e){var{children:t}=e,r=cte(e,ute);return S.createElement(hte.Provider,{value:r},t)}function Qw(e,t){var r,n,i=be(f=>ai(f,e)),o=be(f=>ii(f,t)),l=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:$t.allowDataOverflow,c=(n=o==null?void 0:o.allowDataOverflow)!==null&&n!==void 0?n:zt.allowDataOverflow,h=l||c;return{needClip:h,needClipX:l,needClipY:c}}function qk(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=Gw(),{needClipX:o,needClipY:l,needClip:c}=Qw(t,r);if(!c||!i)return null;var{x:h,y:f,width:p,height:y}=i;return S.createElement("clipPath",{id:"clipPath-".concat(n)},S.createElement("rect",{x:o?h:h-p/2,y:l?f:f-y/2,width:o?p:p*2,height:l?y:y*2}))}var Fk=(e,t,r,n)=>as(e,"xAxis",t,n),Hk=(e,t,r,n)=>ns(e,"xAxis",t,n),Kk=(e,t,r,n)=>as(e,"yAxis",r,n),Gk=(e,t,r,n)=>ns(e,"yAxis",r,n),mte=V([Ze,Fk,Kk,Hk,Gk],(e,t,r,n,i)=>ei(e,"xAxis")?Vl(t,n,!1):Vl(r,i,!1)),pte=(e,t,r,n,i)=>i;function yte(e){return e.type==="line"}var gte=V([Up,pte],(e,t)=>e.filter(yte).find(r=>r.id===t)),vte=V([Ze,Fk,Kk,Hk,Gk,gte,mte,_d],(e,t,r,n,i,o,l,c)=>{var{chartData:h,dataStartIndex:f,dataEndIndex:p}=c;if(!(o==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||l==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:y,data:g}=o,v;if(g!=null&&g.length>0?v=g:v=h==null?void 0:h.slice(f,p+1),v!=null)return zte({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:y,bandSize:l,displayedData:v})}});function xte(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 bte=["id"],jte=["type","layout","connectNulls","needClip","shape"],wte=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function sd(){return sd=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},sd.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 na(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){Ste(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 Ste(e,t,r){return(t=Nte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nte(e){var t=_te(e,"string");return typeof t=="symbol"?t:t+""}function _te(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 Xw(e,t){if(e==null)return{};var r,n,i=Ote(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 Ote(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Ete=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:yp(r,t),payload:e}]},Ate=S.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:o,name:l,hide:c,unit:h,tooltipType:f,id:p}=e,y={dataDefinedOnItem:r,getPosition:vo,settings:{stroke:n,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:yp(l,t),hide:c,type:f,color:n,unit:h,graphicalItemId:p}};return S.createElement(Ak,{tooltipEntrySettings:y})}),Yk=(e,t)=>"".concat(t,"px ").concat(e,"px");function Cte(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var Tte=(e,t,r)=>{var n=r.reduce((g,v)=>g+v,0);if(!n)return Yk(t,e);for(var i=Math.floor(e/n),o=e%n,l=[],c=0,h=0;c<r.length;h+=(f=r[c])!==null&&f!==void 0?f:0,++c){var f,p=r[c];if(p!=null&&h+p>o){l=[...r.slice(0,c),o-h];break}}var y=l.length%2===0?[0,t]:[t];return[...Cte(r,i),...l,...y].map(g=>"".concat(g,"px")).join(", ")};function Pte(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:o,needClip:l}=n,{id:c}=n,h=Xw(n,bte),f=zn(h);return S.createElement(RJ,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:o,baseProps:f,needClip:l,clipPathId:t})}function Rte(e){var{showLabels:t,children:r,points:n}=e,i=S.useMemo(()=>n==null?void 0:n.map(o=>{var l,c,h={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({},h),{},{value:o.value,payload:o.payload,viewBox:h,parentViewBox:void 0,fill:void 0})}),[n]);return S.createElement(gk,{value:t?i:void 0},r)}function UP(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:o}=e,{type:l,layout:c,connectNulls:h,needClip:f,shape:p}=o,y=Xw(o,jte),g=na(na({},Er(y)),{},{fill:"none",className:"recharts-line-curve",clipPath:f?"url(#clipPath-".concat(t,")"):void 0,points:n,type:l,layout:c,connectNulls:h,strokeDasharray:i??o.strokeDasharray});return S.createElement(S.Fragment,null,(n==null?void 0:n.length)>1&&S.createElement(Nk,sd({shapeType:"curve",option:p},g,{pathRef:r})),S.createElement(Pte,{points:n,clipPathId:t,props:o}))}function Mte(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Dte(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:l,strokeDasharray:c,isAnimationActive:h,animationBegin:f,animationDuration:p,animationEasing:y,animateNewValues:g,width:v,height:b,onAnimationEnd:w,onAnimationStart:N}=r,_=i.current,A=Op(l,"recharts-line-"),C=S.useRef(A),[E,T]=S.useState(!1),R=!E,D=S.useCallback(()=>{typeof w=="function"&&w(),T(!1)},[w]),M=S.useCallback(()=>{typeof N=="function"&&N(),T(!0)},[N]),U=Mte(n.current),k=S.useRef(0);C.current!==A&&(k.current=o.current,C.current=A);var H=k.current;return S.createElement(Rte,{points:l,showLabels:R},r.children,S.createElement(_p,{animationId:A,begin:f,duration:p,isActive:h,easing:y,onAnimationEnd:D,onAnimationStart:M,key:A},B=>{var ae=_t(H,U+H,B),ee=Math.min(ae,U),ne;if(h)if(c){var $="".concat(c).split(/[,\s]+/gim).map(te=>parseFloat(te));ne=Tte(ee,U,$)}else ne=Yk(U,ee);else ne=c==null?void 0:String(c);if(B>0&&U>0&&(i.current=l,o.current=Math.max(o.current,ee)),_){var L=_.length/l.length,W=B===1?l:l.map((te,se)=>{var I=Math.floor(se*L);if(_[I]){var Q=_[I];return na(na({},te),{},{x:_t(Q.x,te.x,B),y:_t(Q.y,te.y,B)})}return g?na(na({},te),{},{x:_t(v*2,te.x,B),y:_t(b/2,te.y,B)}):na(na({},te),{},{x:te.x,y:te.y})});return i.current=W,S.createElement(UP,{props:r,points:W,clipPathId:t,pathRef:n,strokeDasharray:ne})}return S.createElement(UP,{props:r,points:l,clipPathId:t,pathRef:n,strokeDasharray:ne})}),S.createElement(xk,{label:r.label}))}function kte(e){var{clipPathId:t,props:r}=e,n=S.useRef(null),i=S.useRef(0),o=S.useRef(null);return S.createElement(Dte,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:o})}var Lte=(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:Pt(e.payload,t)}};class Ite extends S.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:o,yAxisId:l,top:c,left:h,width:f,height:p,id:y,needClip:g,zIndex:v}=this.props;if(t)return null;var b=We("recharts-line",i),w=y,{r:N,strokeWidth:_}=xte(r),A=Sk(r),C=N*2+_,E=g?"url(#clipPath-".concat(A?"":"dots-").concat(w,")"):void 0;return S.createElement(Tn,{zIndex:v},S.createElement(sn,{className:b},g&&S.createElement("defs",null,S.createElement(qk,{clipPathId:w,xAxisId:o,yAxisId:l}),!A&&S.createElement("clipPath",{id:"clipPath-dots-".concat(w)},S.createElement("rect",{x:h-C/2,y:c-C/2,width:f+C,height:p+C}))),S.createElement(Uk,{xAxisId:o,yAxisId:l,data:n,dataPointFormatter:Lte,errorBarOffset:0},S.createElement(kte,{props:this.props,clipPathId:w}))),S.createElement(ZJ,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:E}))}}var Vk={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:Qt.line,type:"linear"};function $te(e){var t=dr(e,Vk),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,connectNulls:c,dot:h,hide:f,isAnimationActive:p,label:y,legendType:g,xAxisId:v,yAxisId:b,id:w}=t,N=Xw(t,wte),{needClip:_}=Qw(v,b),A=Gw(),C=xo(),E=br(),T=be(k=>vte(k,v,b,E,w));if(C!=="horizontal"&&C!=="vertical"||T==null||A==null)return null;var{height:R,width:D,x:M,y:U}=A;return S.createElement(Ite,sd({},N,{id:w,connectNulls:c,dot:h,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:o,animationEasing:l,isAnimationActive:p,hide:f,label:y,legendType:g,xAxisId:v,yAxisId:b,points:T,layout:C,height:R,width:D,left:M,top:U,needClip:_}))}function zte(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,dataKey:l,bandSize:c,displayedData:h}=e;return h.map((f,p)=>{var y=Pt(f,l);if(t==="horizontal"){var g=AA({axis:r,ticks:i,bandSize:c,entry:f,index:p}),v=pt(y)?null:n.scale.map(y);return{x:g,y:v??null,value:y,payload:f}}var b=pt(y)?null:r.scale.map(y),w=AA({axis:n,ticks:o,bandSize:c,entry:f,index:p});return b==null||w==null?null:{x:b,y:w,value:y,payload:f}}).filter(Boolean)}function Bte(e){var t=dr(e,Vk),r=br();return S.createElement(Tk,{id:t.id,type:"line"},n=>S.createElement(S.Fragment,null,S.createElement(Ck,{legendPayload:Ete(t)}),S.createElement(Ate,{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(Rk,{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($te,sd({},t,{id:n}))))}var Qk=S.memo(Bte,ou);Qk.displayName="Line";function So(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:Mk}function No(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:Mk}var Ute="Invariant failed";function qte(e,t){throw new Error(Ute)}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 Ww(e){return S.createElement(Nk,Mb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var Fte=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)||pt(n);return o?t(n,i):(o||qte(),r)}},Hte=(e,t,r)=>r,Kte=(e,t)=>t,kd=V([Up,Kte],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),Gte=V([kd],e=>e==null?void 0:e.maxBarSize),Yte=(e,t,r,n)=>n,Vte=V([Ze,Up,So,No,Hte],(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")),Qte=(e,t,r)=>{var n=Ze(e),i=So(e,t),o=No(e,t);if(!(i==null||o==null))return n==="horizontal"?Ab(e,"yAxis",o,r):Ab(e,"xAxis",i,r)},Xte=(e,t)=>{var r=Ze(e),n=So(e,t),i=No(e,t);if(!(n==null||i==null))return r==="horizontal"?kT(e,"xAxis",n):kT(e,"yAxis",i)},Wte=V([Vte,MK,Xte],JJ),Zte=(e,t,r)=>{var n,i,o=kd(e,t);if(o==null)return 0;var l=So(e,t),c=No(e,t);if(l==null||c==null)return 0;var h=Ze(e),f=J3(e),{maxBarSize:p}=o,y=pt(p)?f:p,g,v;return h==="horizontal"?(g=as(e,"xAxis",l,r),v=ns(e,"xAxis",l,r)):(g=as(e,"yAxis",c,r),v=ns(e,"yAxis",c,r)),(n=(i=Vl(g,v,!0))!==null&&i!==void 0?i:y)!==null&&n!==void 0?n:0},Xk=(e,t,r)=>{var n=Ze(e),i=So(e,t),o=No(e,t);if(!(i==null||o==null)){var l,c;return n==="horizontal"?(l=as(e,"xAxis",i,r),c=ns(e,"xAxis",i,r)):(l=as(e,"yAxis",o,r),c=ns(e,"yAxis",o,r)),Vl(l,c)}},Jte=V([Wte,J3,RK,e4,Zte,Xk,Gte],aee),ere=(e,t,r)=>{var n=So(e,t);if(n!=null)return as(e,"xAxis",n,r)},tre=(e,t,r)=>{var n=No(e,t);if(n!=null)return as(e,"yAxis",n,r)},rre=(e,t,r)=>{var n=So(e,t);if(n!=null)return ns(e,"xAxis",n,r)},nre=(e,t,r)=>{var n=No(e,t);if(n!=null)return ns(e,"yAxis",n,r)},are=V([Jte,kd],see),ire=V([Qte,kd],iee),sre=V([Wt,kj,ere,tre,rre,nre,are,Ze,NK,Xk,ire,kd,Yte],(e,t,r,n,i,o,l,c,h,f,p,y,g)=>{var{chartData:v,dataStartIndex:b,dataEndIndex:w}=h;if(!(y==null||l==null||t==null||c!=="horizontal"&&c!=="vertical"||r==null||n==null||i==null||o==null||f==null)){var{data:N}=y,_;if(N!=null&&N.length>0?_=N:_=v==null?void 0:v.slice(b,w+1),_!=null)return Dre({layout:c,barSettings:y,pos:l,parentViewBox:t,bandSize:f,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:o,stackedData:p,displayedData:_,offset:e,cells:g,dataStartIndex:b})}}),ore=["index"];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 lre(e,t){if(e==null)return{};var r,n,i=ure(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 ure(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 Wk=S.createContext(void 0),cre=e=>{var t=S.useContext(Wk);if(t!=null)return t.stackId;if(e!=null)return gF(e)},dre=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),fre=e=>{var t=S.useContext(Wk);if(t!=null){var{stackId:r}=t;return"url(#".concat(dre(r,e),")")}},Zk=e=>{var{index:t}=e,r=lre(e,ore),n=fre(t);return S.createElement(sn,Db({className:"recharts-bar-stack-layer",clipPath:n},r))},hre=["onMouseEnter","onMouseLeave","onClick"],mre=["value","background","tooltipPosition"],pre=["id"],yre=["onMouseEnter","onClick","onMouseLeave"];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 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 Nr(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){gre(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 gre(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=xre(e,"string");return typeof t=="symbol"?t:t+""}function xre(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 Hm(e,t){if(e==null)return{};var r,n,i=bre(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 bre(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 jre=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:n,value:yp(r,t),payload:e}]},wre=S.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:o,hide:l,unit:c,tooltipType:h,id:f}=e,p={dataDefinedOnItem:void 0,getPosition:vo,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:yp(o,t),hide:l,type:h,color:i,unit:c,graphicalItemId:f}};return S.createElement(Ak,{tooltipEntrySettings:p})});function Sre(e){var t=be(mo),{data:r,dataKey:n,background:i,allOtherBarProps:o}=e,{onMouseEnter:l,onMouseLeave:c,onClick:h}=o,f=Hm(o,hre),p=_k(l,n,o.id),y=Ok(c),g=Ek(h,n,o.id);if(!i||r==null)return null;var v=gd(i);return S.createElement(Tn,{zIndex:oee(i,Qt.barBackground)},r.map((b,w)=>{var{value:N,background:_,tooltipPosition:A}=b,C=Hm(b,mre);if(!_)return null;var E=p(b,w),T=y(b,w),R=g(b,w),D=Nr(Nr(Nr(Nr(Nr({option:i,isActive:String(w)===t},C),{},{fill:"#eee"},_),v),ip(f,b,w)),{},{onMouseEnter:E,onMouseLeave:T,onClick:R,dataKey:n,index:w,className:"recharts-bar-background-rectangle"});return S.createElement(Ww,is({key:"background-bar-".concat(w)},D))}))}function Nre(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(gk,{value:t?i:void 0},r)}function _re(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:o,dataKey:l}=e,c=be(mo),h=be(VD),f=r&&String(i.originalDataIndex)===c&&(h==null||l===h),[p,y]=S.useState(!1),[g,v]=S.useState(!1);S.useEffect(()=>{var C;return f?(y(!0),C=requestAnimationFrame(()=>{v(!0)})):v(!1),()=>{cancelAnimationFrame(C)}},[f]);var b=S.useCallback(()=>{f||y(!1)},[f]),w=f&&g,N=f||p,_;f?r===!0?_=t:_=r:_=t;var A=S.createElement(Ww,is({},n,{name:String(n.name)},i,{isActive:w,option:_,index:o,dataKey:l,onTransitionEnd:b}));return N?S.createElement(Tn,{zIndex:Qt.activeBar},S.createElement(Zk,{index:i.originalDataIndex},A)):A}function Ore(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:o}=e;return S.createElement(Ww,is({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:o}))}function Ere(e){var t,{data:r,props:n}=e,i=(t=zn(n))!==null&&t!==void 0?t:{},{id:o}=i,l=Hm(i,pre),{shape:c,dataKey:h,activeBar:f}=n,{onMouseEnter:p,onClick:y,onMouseLeave:g}=n,v=Hm(n,yre),b=_k(p,h,o),w=Ok(g),N=Ek(y,h,o);return r?S.createElement(S.Fragment,null,r.map((_,A)=>S.createElement(Zk,is({index:_.originalDataIndex,key:"rectangle-".concat(_==null?void 0:_.x,"-").concat(_==null?void 0:_.y,"-").concat(_==null?void 0:_.value,"-").concat(A),className:"recharts-bar-rectangle"},ip(v,_,A),{onMouseEnter:b(_,A),onMouseLeave:w(_,A),onClick:N(_,A)}),f?S.createElement(_re,{shape:c,activeBar:f,baseProps:l,entry:_,index:A,dataKey:h}):S.createElement(Ore,{shape:c,baseProps:l,entry:_,index:A,dataKey:h})))):null}function Are(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:o,animationBegin:l,animationDuration:c,animationEasing:h,onAnimationEnd:f,onAnimationStart:p}=t,y=r.current,g=Op(t,"recharts-bar-"),[v,b]=S.useState(!1),w=!v,N=S.useCallback(()=>{typeof f=="function"&&f(),b(!1)},[f]),_=S.useCallback(()=>{typeof p=="function"&&p(),b(!0)},[p]);return S.createElement(Nre,{showLabels:w,rects:n},S.createElement(_p,{animationId:g,begin:l,duration:c,isActive:o,easing:h,onAnimationEnd:N,onAnimationStart:_,key:g},A=>{var C=A===1?n:n==null?void 0:n.map((E,T)=>{var R=y&&y[T];if(R)return Nr(Nr({},E),{},{x:_t(R.x,E.x,A),y:_t(R.y,E.y,A),width:_t(R.width,E.width,A),height:_t(R.height,E.height,A)});if(i==="horizontal"){var D=_t(0,E.height,A),M=_t(E.stackedBarStart,E.y,A);return Nr(Nr({},E),{},{y:M,height:D})}var U=_t(0,E.width,A),k=_t(E.stackedBarStart,E.x,A);return Nr(Nr({},E),{},{width:U,x:k})});return A>0&&(r.current=C??null),C==null?null:S.createElement(sn,null,S.createElement(Ere,{props:t,data:C}))}),S.createElement(xk,{label:t.label}),t.children)}function Cre(e){var t=S.useRef(null);return S.createElement(Are,{previousRectanglesRef:t,props:e})}var Jk=0,Tre=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Pt(e,t)}};class Pre extends S.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:o,yAxisId:l,needClip:c,background:h,id:f}=this.props;if(t||r==null)return null;var p=We("recharts-bar",i),y=f;return S.createElement(sn,{className:p,id:f},c&&S.createElement("defs",null,S.createElement(qk,{clipPathId:y,xAxisId:o,yAxisId:l})),S.createElement(sn,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(y,")"):void 0},S.createElement(Sre,{data:r,dataKey:n,background:h,allOtherBarProps:this.props}),S.createElement(Cre,this.props)))}}var Rre={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:Jk,xAxisId:0,yAxisId:0,zIndex:Qt.bar};function Mre(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:h,animationEasing:f,isAnimationActive:p}=e,{needClip:y}=Qw(t,r),g=xo(),v=br(),b=QZ(e.children,Fw),w=be(A=>sre(A,e.id,v,b));if(g!=="vertical"&&g!=="horizontal")return null;var N,_=w==null?void 0:w[0];return _==null||_.height==null||_.width==null?N=0:N=g==="vertical"?_.height/2:_.width/2,S.createElement(Uk,{xAxisId:t,yAxisId:r,data:w,dataPointFormatter:Tre,errorBarOffset:N},S.createElement(Pre,is({},e,{layout:g,needClip:y,data:w,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:o,activeBar:l,animationBegin:c,animationDuration:h,animationEasing:f,isAnimationActive:p})))}function Dre(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:o,bandSize:l,xAxis:c,yAxis:h,xAxisTicks:f,yAxisTicks:p,stackedData:y,displayedData:g,offset:v,cells:b,parentViewBox:w,dataStartIndex:N}=e,_=t==="horizontal"?h:c,A=y?_.scale.domain():null,C=vF({numericAxis:_}),E=_.scale.map(C);return g.map((T,R)=>{var D,M,U,k,H,B;if(y){var ae=y[R+N];if(ae==null)return null;D=fF(ae,A)}else D=Pt(T,r),Array.isArray(D)||(D=[C,D]);var ee=Fte(n,Jk)(D[1],R);if(t==="horizontal"){var ne,$=h.scale.map(D[0]),L=h.scale.map(D[1]);if($==null||L==null)return null;M=CA({axis:c,ticks:f,bandSize:l,offset:o.offset,entry:T,index:R}),U=(ne=L??$)!==null&&ne!==void 0?ne:void 0,k=o.size;var W=$-L;if(H=ca(W)?0:W,B={x:M,y:v.top,width:k,height:v.height},Math.abs(ee)>0&&Math.abs(H)<Math.abs(ee)){var te=qr(H||ee)*(Math.abs(ee)-Math.abs(H));U-=te,H+=te}}else{var se=c.scale.map(D[0]),I=c.scale.map(D[1]);if(se==null||I==null)return null;if(M=se,U=CA({axis:h,ticks:p,bandSize:l,offset:o.offset,entry:T,index:R}),k=I-se,H=o.size,B={x:v.left,y:U,width:v.width,height:H},Math.abs(ee)>0&&Math.abs(k)<Math.abs(ee)){var Q=qr(k||ee)*(Math.abs(ee)-Math.abs(k));k+=Q}}if(M==null||U==null||k==null||H==null||!i&&(k===0||H===0))return null;var le=Nr(Nr({},T),{},{stackedBarStart:E,x:M,y:U,width:k,height:H,value:y?D:D[1],payload:T,background:B,tooltipPosition:{x:M+k/2,y:U+H/2},parentViewBox:w,originalDataIndex:R},b&&b[R]&&b[R].props);return le}).filter(Boolean)}function kre(e){var t=dr(e,Rre),r=cre(t.stackId),n=br();return S.createElement(Tk,{id:t.id,type:"bar"},i=>S.createElement(S.Fragment,null,S.createElement(Ck,{legendPayload:jre(t)}),S.createElement(wre,{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(Rk,{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(Mre,is({},t,{id:i})))))}var Zw=S.memo(kre,ou);Zw.displayName="Bar";var Lre=["domain","range"],Ire=["domain","range"];function FP(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}function HP(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 e5(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=FP(e,Lre),{domain:o,range:l}=t,c=FP(t,Ire);return!HP(r,o)||!HP(n,l)?!1:ou(i,c)}var zre=["type"],Bre=["dangerouslySetInnerHTML","ticks","scale"],Ure=["id","scale"];function kb(){return kb=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},kb.apply(null,arguments)}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 GP(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){qre(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 qre(e,t,r){return(t=Fre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fre(e){var t=Hre(e,"string");return typeof t=="symbol"?t:t+""}function Hre(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lb(e,t){if(e==null)return{};var r,n,i=Kre(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Kre(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Gre(e){var t=dt(),r=S.useRef(null),n=b3(),{type:i}=e,o=Lb(e,zre),l=Cp(n,"xAxis",i),c=S.useMemo(()=>{if(l!=null)return GP(GP({},o),{},{type:l})},[o,l]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(IJ(c)):r.current!==c&&t($J({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(zJ(r.current)),r.current=null)},[t]),null}var Yre=e=>{var{xAxisId:t,className:r}=e,n=be(kj),i=br(),o="xAxis",l=be(_=>OD(_,o,t,i)),c=be(_=>SD(_,t)),h=be(_=>mQ(_,t)),f=be(_=>K4(_,t));if(c==null||h==null||f==null)return null;var{dangerouslySetInnerHTML:p,ticks:y,scale:g}=e,v=Lb(e,Bre),{id:b,scale:w}=f,N=Lb(f,Ure);return S.createElement(Vw,kb({},v,N,{x:h.x,y:h.y,width:c.width,height:c.height,className:We("recharts-".concat(o," ").concat(o),r),viewBox:n,ticks:l,axisType:o,axisId:t}))},Vre={allowDataOverflow:$t.allowDataOverflow,allowDecimals:$t.allowDecimals,allowDuplicatedCategory:$t.allowDuplicatedCategory,angle:$t.angle,axisLine:Va.axisLine,height:$t.height,hide:!1,includeHidden:$t.includeHidden,interval:$t.interval,label:!1,minTickGap:$t.minTickGap,mirror:$t.mirror,orientation:$t.orientation,padding:$t.padding,reversed:$t.reversed,scale:$t.scale,tick:$t.tick,tickCount:$t.tickCount,tickLine:Va.tickLine,tickSize:Va.tickSize,type:$t.type,niceTicks:$t.niceTicks,xAxisId:0},Qre=e=>{var t=dr(e,Vre);return S.createElement(S.Fragment,null,S.createElement(Gre,{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(Yre,t))},Gp=S.memo(Qre,e5);Gp.displayName="XAxis";var Xre=["type"],Wre=["dangerouslySetInnerHTML","ticks","scale"],Zre=["id","scale"];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 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){Jre(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 Jre(e,t,r){return(t=ene(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ene(e){var t=tne(e,"string");return typeof t=="symbol"?t:t+""}function tne(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 $b(e,t){if(e==null)return{};var r,n,i=rne(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 rne(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 nne(e){var t=dt(),r=S.useRef(null),n=b3(),{type:i}=e,o=$b(e,Xre),l=Cp(n,"yAxis",i),c=S.useMemo(()=>{if(l!=null)return VP(VP({},o),{},{type:l})},[l,o]);return S.useLayoutEffect(()=>{c!=null&&(r.current===null?t(BJ(c)):r.current!==c&&t(UJ({prev:r.current,next:c})),r.current=c)},[c,t]),S.useLayoutEffect(()=>()=>{r.current&&(t(qJ(r.current)),r.current=null)},[t]),null}function ane(e){var{yAxisId:t,className:r,width:n,label:i}=e,o=S.useRef(null),l=S.useRef(null),c=be(kj),h=br(),f=dt(),p="yAxis",y=be(R=>ND(R,t)),g=be(R=>yQ(R,t)),v=be(R=>OD(R,p,t,h)),b=be(R=>G4(R,t));if(S.useLayoutEffect(()=>{if(!(n!=="auto"||!y||Kw(i)||S.isValidElement(i)||b==null)){var R=o.current;if(R){var D=R.getCalculatedWidth();Math.round(y.width)!==Math.round(D)&&f(FJ({id:t,width:D}))}}},[v,y,f,i,t,n,b]),y==null||g==null||b==null)return null;var{dangerouslySetInnerHTML:w,ticks:N,scale:_}=e,A=$b(e,Wre),{id:C,scale:E}=b,T=$b(b,Zre);return S.createElement(Vw,Ib({},A,T,{ref:o,labelRef:l,x:g.x,y:g.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:y.width,height:y.height,className:We("recharts-".concat(p," ").concat(p),r),viewBox:c,ticks:v,axisType:p,axisId:t}))}var ine={allowDataOverflow:zt.allowDataOverflow,allowDecimals:zt.allowDecimals,allowDuplicatedCategory:zt.allowDuplicatedCategory,angle:zt.angle,axisLine:Va.axisLine,hide:!1,includeHidden:zt.includeHidden,interval:zt.interval,label:!1,minTickGap:zt.minTickGap,mirror:zt.mirror,orientation:zt.orientation,padding:zt.padding,reversed:zt.reversed,scale:zt.scale,tick:zt.tick,tickCount:zt.tickCount,tickLine:Va.tickLine,tickSize:Va.tickSize,type:zt.type,niceTicks:zt.niceTicks,width:zt.width,yAxisId:0},sne=e=>{var t=dr(e,ine);return S.createElement(S.Fragment,null,S.createElement(nne,{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(ane,t))},Yp=S.memo(sne,e5);Yp.displayName="YAxis";var one=(e,t)=>t,Jw=V([one,Ze,o4,Jt,HD,si,zX,Wt],GX);function lne(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function eS(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(lne(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,h)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((h-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>l(c.clientX,c.clientY)):l(e.clientX,e.clientY)}var t5=on("mouseClick"),r5=bd();r5.startListening({actionCreator:t5,effect:(e,t)=>{var r=e.payload,n=Jw(t.getState(),eS(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(RQ({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var zb=on("mouseMove"),n5=bd(),gl=null,Cs=null,dx=null;n5.startListening({actionCreator:zb,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"));gl!==null&&(cancelAnimationFrame(gl),gl=null),Cs!==null&&(typeof i!="number"||!l)&&(clearTimeout(Cs),Cs=null),dx=eS(r);var c=()=>{var h=t.getState(),f=Md(h,h.tooltip.settings.shared);if(!dx){gl=null,Cs=null;return}if(f==="axis"){var p=Jw(h,dx);(p==null?void 0:p.activeIndex)!=null?t.dispatch(DD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(MD())}gl=null,Cs=null};if(!l){c();return}i==="raf"?gl=requestAnimationFrame(c):typeof i=="number"&&Cs===null&&(Cs=setTimeout(c,i))}});function une(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 QP={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},a5=xr({name:"rootProps",initialState:QP,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:QP.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}}}),cne=a5.reducer,{updateOptions:dne}=a5.actions,fne=null,hne={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)},i5=xr({name:"polarOptions",initialState:fne,reducers:hne}),{updatePolarOptions:ale}=i5.actions,mne=i5.reducer,s5=on("keyDown"),o5=on("focus"),l5=on("blur"),Vp=bd(),vl=null,Ts=null,wh=null;Vp.startListening({actionCreator:s5,effect:(e,t)=>{wh=e.payload,vl!==null&&(cancelAnimationFrame(vl),vl=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,o=i==="all"||i.includes("keydown");Ts!==null&&(typeof n!="number"||!o)&&(clearTimeout(Ts),Ts=null);var l=()=>{try{var c=t.getState(),h=c.rootProps.accessibilityLayer!==!1;if(!h)return;var{keyboardInteraction:f}=c.tooltip,p=wh;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var y=Rc(f,ho(c),eu(c),tu(c)),g=y==null?-1:Number(y),v=!Number.isFinite(g)||g<0,b=si(c),w=ho(c),N=Md(c,c.tooltip.settings.shared);if(p==="Enter"){if(v)return;var _=$m(c,N,"hover",String(f.index));t.dispatch(Im({active:!f.active,activeIndex:f.index,activeCoordinate:_}));return}var A=jQ(c),C=A==="left-to-right"?1:-1,E=p==="ArrowRight"?1:-1,T;if(v){var R=eu(c),D=tu(c),M=E*C,U=ee=>({active:!1,index:String(ee),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(T=-1,M>0){for(var k=0;k<w.length;k++)if(Rc(U(k),w,R,D)!=null){T=k;break}}else for(var H=w.length-1;H>=0;H--)if(Rc(U(H),w,R,D)!=null){T=H;break}if(T<0)return}else{T=g+E*C;var B=(b==null?void 0:b.length)||w.length;if(B===0||T>=B||T<0)return}var ae=$m(c,N,"hover",String(T));t.dispatch(Im({active:!0,activeIndex:T.toString(),activeCoordinate:ae}))}finally{vl=null,Ts=null}};if(!o){l();return}n==="raf"?vl=requestAnimationFrame(l):typeof n=="number"&&Ts===null&&(l(),wh=null,Ts=setTimeout(()=>{wh?l():(Ts=null,vl=null)},n))}});Vp.startListening({actionCreator:o5,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=Md(r,r.tooltip.settings.shared),c=$m(r,l,"hover",String(o));t.dispatch(Im({active:!0,activeIndex:o,activeCoordinate:c}))}}}});Vp.startListening({actionCreator:l5,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(Im({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function u5(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"),c5=bd(),Sh=new Map,_c=new Map,fx=new Map;c5.startListening({actionCreator:jn,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,o=u5(n);fx.set(i,{handler:r,reactEvent:o});var l=Sh.get(i);l!==void 0&&(cancelAnimationFrame(l),Sh.delete(i));var c=t.getState(),{throttleDelay:h,throttledEvents:f}=c.eventSettings,p=f,y=p==="all"||(p==null?void 0:p.includes(i)),g=_c.get(i);g!==void 0&&(typeof h!="number"||!y)&&(clearTimeout(g),_c.delete(i));var v=()=>{var N=fx.get(i);try{if(!N)return;var{handler:_,reactEvent:A}=N,C=t.getState(),E={activeCoordinate:SX(C),activeDataKey:VD(C),activeIndex:mo(C),activeLabel:YD(C),activeTooltipIndex:mo(C),isTooltipActive:NX(C)};_&&_(E,A)}finally{Sh.delete(i),_c.delete(i),fx.delete(i)}};if(!y){v();return}if(h==="raf"){var b=requestAnimationFrame(v);Sh.set(i,b)}else if(typeof h=="number"){if(!_c.has(i)){v();var w=setTimeout(v,h);_c.set(i,w)}}else v()}}});var pne=V([pu],e=>e.tooltipItemPayloads),yne=V([pne,(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)}}}),d5=on("touchMove"),f5=bd(),Ps=null,Mi=null,XP=null,Oc=null;f5.startListening({actionCreator:d5,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){Oc=u5(r);var n=t.getState(),{throttleDelay:i,throttledEvents:o}=n.eventSettings,l=o==="all"||o.includes("touchmove");Ps!==null&&(cancelAnimationFrame(Ps),Ps=null),Mi!==null&&(typeof i!="number"||!l)&&(clearTimeout(Mi),Mi=null),XP=Array.from(r.touches).map(h=>eS({clientX:h.clientX,clientY:h.clientY,currentTarget:r.currentTarget}));var c=()=>{if(Oc!=null){var h=t.getState(),f=Md(h,h.tooltip.settings.shared);if(f==="axis"){var p,y=(p=XP)===null||p===void 0?void 0:p[0];if(y==null){Ps=null,Mi=null;return}var g=Jw(h,y);(g==null?void 0:g.activeIndex)!=null&&t.dispatch(DD({activeIndex:g.activeIndex,activeDataKey:void 0,activeCoordinate:g.activeCoordinate}))}else if(f==="item"){var v,b=Oc.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(_F),_=(v=w.getAttribute(OF))!==null&&v!==void 0?v:void 0,A=wo(h).find(T=>T.id===_);if(N==null||A==null||_==null)return;var{dataKey:C}=A,E=yne(h,N,_);t.dispatch(RD({activeDataKey:C,activeIndex:N,activeCoordinate:E,activeGraphicalItemId:_}))}Ps=null,Mi=null}};if(!l){c();return}i==="raf"?Ps=requestAnimationFrame(c):typeof i=="number"&&Mi===null&&(c(),Oc=null,Mi=setTimeout(()=>{Oc?c():(Mi=null,Ps=null)},i))}}});var h5={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},m5=xr({name:"eventSettings",initialState:h5,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:gne}=m5.actions,vne=m5.reducer,xne=$M({brush:uee,cartesianAxis:HJ,chartData:wW,errorBars:lte,eventSettings:vne,graphicalItems:wJ,layout:oF,legend:x7,options:gW,polarAxis:HZ,polarOptions:mne,referenceElements:hee,renderedTicks:Tee,rootProps:cne,tooltip:MQ,zIndex:iW}),bne=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return Rq({reducer:xne,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([r5.middleware,n5.middleware,Vp.middleware,c5.middleware,f5.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(JM({type:"raf"}))},devTools:{serialize:{replacer:une},name:"recharts-".concat(r)}})};function jne(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=br(),o=S.useRef(null);if(i)return r;o.current==null&&(o.current=bne(t,n));var l=Aj;return S.createElement(k7,{context:l,store:o.current},r)}function wne(e){var{layout:t,margin:r}=e,n=dt(),i=br();return S.useEffect(()=>{i||(n(aF(t)),n(nF(r)))},[n,i,t,r]),null}var Sne=S.memo(wne,ou);function Nne(e){var t=dt();return S.useEffect(()=>{t(dne(e))},[t,e]),null}var _ne=e=>{var t=dt();return S.useEffect(()=>{t(gne(e))},[t,e]),null},One=S.memo(_ne,ou);function WP(e){var{zIndex:t,isPanorama:r}=e,n=S.useRef(null),i=dt();return S.useLayoutEffect(()=>(n.current&&i(nW({zIndex:t,element:n.current,isPanorama:r})),()=>{i(aW({zIndex:t,isPanorama:r}))}),[i,t,r]),S.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function ZP(e){var{children:t,isPanorama:r}=e,n=be(VX);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(WP,{key:l,zIndex:l,isPanorama:r})),t,o.map(l=>S.createElement(WP,{key:l,zIndex:l,isPanorama:r})))}var Ene=["children"];function Ane(e,t){if(e==null)return{};var r,n,i=Cne(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 Cne(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 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)}var Tne={width:"100%",height:"100%",display:"block"},Pne=S.forwardRef((e,t)=>{var r=zj(),n=Bj(),i=P3();if(!fa(r)||!fa(n))return null;var{children:o,otherAttributes:l,title:c,desc:h}=e,f,p;return l!=null&&(typeof l.tabIndex=="number"?f=l.tabIndex:f=i?0:void 0,typeof l.role=="string"?p=l.role:p=i?"application":void 0),S.createElement(vj,Km({},l,{title:c,desc:h,role:p,tabIndex:f,width:r,height:n,style:Tne,ref:t}),o)}),Rne=e=>{var{children:t}=e,r=be(bp);if(!r)return null;var{width:n,height:i,y:o,x:l}=r;return S.createElement(vj,{width:n,height:i,x:l,y:o},t)},JP=S.forwardRef((e,t)=>{var{children:r}=e,n=Ane(e,Ene),i=br();return i?S.createElement(Rne,null,S.createElement(ZP,{isPanorama:!0},r)):S.createElement(Pne,Km({ref:t},n),S.createElement(ZP,{isPanorama:!1},r))});function Mne(){var e=dt(),[t,r]=S.useState(null),n=be(NF);return S.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;Ue(o)&&o!==n&&e(sF(o))}},[t,e,n]),r}function e2(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 Dne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?e2(Object(r),!0).forEach(function(n){kne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kne(e,t,r){return(t=Lne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Lne(e){var t=Ine(e,"string");return typeof t=="symbol"?t:t+""}function Ine(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 rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rs.apply(null,arguments)}var $ne=()=>(PW(),null);function Gm(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var zne=S.forwardRef((e,t)=>{var r,n,i=S.useRef(null),[o,l]=S.useState({containerWidth:Gm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Gm((n=e.style)===null||n===void 0?void 0:n.height)}),c=S.useCallback((f,p)=>{l(y=>{var g=Math.round(f),v=Math.round(p);return y.containerWidth===g&&y.containerHeight===v?y:{containerWidth:g,containerHeight:v}})},[]),h=S.useCallback(f=>{if(typeof t=="function"&&t(f),i.current!=null&&(i.current.disconnect(),i.current=null),f!=null&&typeof ResizeObserver<"u"){var{width:p,height:y}=f.getBoundingClientRect();c(p,y);var g=b=>{var w=b[0];if(w!=null){var{width:N,height:_}=w.contentRect;c(N,_)}},v=new ResizeObserver(g);v.observe(f),i.current=v}},[t,c]);return S.useEffect(()=>()=>{var f=i.current;f!=null&&f.disconnect()},[c]),S.createElement(S.Fragment,null,S.createElement(wd,{width:o.containerWidth,height:o.containerHeight}),S.createElement("div",rs({ref:h},e)))}),Bne=S.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,o]=S.useState({containerWidth:Gm(r),containerHeight:Gm(n)}),l=S.useCallback((h,f)=>{o(p=>{var y=Math.round(h),g=Math.round(f);return p.containerWidth===y&&p.containerHeight===g?p:{containerWidth:y,containerHeight:g}})},[]),c=S.useCallback(h=>{if(typeof t=="function"&&t(h),h!=null){var{width:f,height:p}=h.getBoundingClientRect();l(f,p)}},[t,l]);return S.createElement(S.Fragment,null,S.createElement(wd,{width:i.containerWidth,height:i.containerHeight}),S.createElement("div",rs({ref:c},e)))}),Une=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return S.createElement(S.Fragment,null,S.createElement(wd,{width:r,height:n}),S.createElement("div",rs({ref:t},e)))}),qne=S.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?S.createElement(Bne,rs({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?S.createElement(Une,rs({},e,{width:r,height:n,ref:t})):S.createElement(S.Fragment,null,S.createElement(wd,{width:r,height:n}),S.createElement("div",rs({ref:t},e)))});function Fne(e){return e?zne:qne}var Hne=S.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:o,onContextMenu:l,onDoubleClick:c,onMouseDown:h,onMouseEnter:f,onMouseLeave:p,onMouseMove:y,onMouseUp:g,onTouchEnd:v,onTouchMove:b,onTouchStart:w,style:N,width:_,responsive:A,dispatchTouchEvents:C=!0}=e,E=S.useRef(null),T=dt(),[R,D]=S.useState(null),[M,U]=S.useState(null),k=Mne(),H=Lj(),B=(H==null?void 0:H.width)>0?H.width:_,ae=(H==null?void 0:H.height)>0?H.height:i,ee=S.useCallback(de=>{k(de),typeof t=="function"&&t(de),D(de),U(de),de!=null&&(E.current=de)},[k,t,D,U]),ne=S.useCallback(de=>{T(t5(de)),T(jn({handler:o,reactEvent:de}))},[T,o]),$=S.useCallback(de=>{T(zb(de)),T(jn({handler:f,reactEvent:de}))},[T,f]),L=S.useCallback(de=>{T(MD()),T(jn({handler:p,reactEvent:de}))},[T,p]),W=S.useCallback(de=>{T(zb(de)),T(jn({handler:y,reactEvent:de}))},[T,y]),te=S.useCallback(()=>{T(o5())},[T]),se=S.useCallback(()=>{T(l5())},[T]),I=S.useCallback(de=>{T(s5(de.key))},[T]),Q=S.useCallback(de=>{T(jn({handler:l,reactEvent:de}))},[T,l]),le=S.useCallback(de=>{T(jn({handler:c,reactEvent:de}))},[T,c]),oe=S.useCallback(de=>{T(jn({handler:h,reactEvent:de}))},[T,h]),fe=S.useCallback(de=>{T(jn({handler:g,reactEvent:de}))},[T,g]),xe=S.useCallback(de=>{T(jn({handler:w,reactEvent:de}))},[T,w]),Se=S.useCallback(de=>{C&&T(d5(de)),T(jn({handler:b,reactEvent:de}))},[T,C,b]),Me=S.useCallback(de=>{T(jn({handler:v,reactEvent:de}))},[T,v]),ce=Fne(A);return S.createElement(tk.Provider,{value:R},S.createElement(JR.Provider,{value:M},S.createElement(ce,{width:B??(N==null?void 0:N.width),height:ae??(N==null?void 0:N.height),className:We("recharts-wrapper",n),style:Dne({position:"relative",cursor:"default",width:B,height:ae},N),onClick:ne,onContextMenu:Q,onDoubleClick:le,onFocus:te,onBlur:se,onKeyDown:I,onMouseDown:oe,onMouseEnter:$,onMouseLeave:L,onMouseMove:W,onMouseUp:fe,onTouchEnd:Me,onTouchMove:Se,onTouchStart:xe,ref:ee},S.createElement($ne,null),r)))}),Kne=["width","height","responsive","children","className","style","compact","title","desc"];function Gne(e,t){if(e==null)return{};var r,n,i=Yne(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 Yne(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 Vne=S.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:o,className:l,style:c,compact:h,title:f,desc:p}=e,y=Gne(e,Kne),g=zn(y);return h?S.createElement(S.Fragment,null,S.createElement(wd,{width:r,height:n}),S.createElement(JP,{otherAttributes:g,title:f,desc:p},o)):S.createElement(Hne,{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(JP,{otherAttributes:g,title:f,desc:p,ref:t},S.createElement(pee,null,o)))});function Bb(){return Bb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bb.apply(null,arguments)}function t2(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 Qne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?t2(Object(r),!0).forEach(function(n){Xne(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Xne(e,t,r){return(t=Wne(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wne(e){var t=Zne(e,"string");return typeof t=="symbol"?t:t+""}function Zne(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 Jne={top:5,right:5,bottom:5,left:5},eae=Qne({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Jne,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},h5),p5=S.forwardRef(function(t,r){var n,i=dr(t.categoricalChartProps,eae),{chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:h,categoricalChartProps:f}=t,p={chartName:o,defaultTooltipEventType:l,validateTooltipEventTypes:c,tooltipPayloadSearcher:h,eventEmitter:void 0};return S.createElement(jne,{preloadedState:{options:p},reduxStoreName:(n=f.id)!==null&&n!==void 0?n:o},S.createElement(lee,{chartData:f.data}),S.createElement(Sne,{layout:i.layout,margin:i.margin}),S.createElement(One,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),S.createElement(Nne,{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(Vne,Bb({},i,{ref:r})))}),tae=["axis"],rae=S.forwardRef((e,t)=>S.createElement(p5,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:tae,tooltipPayloadSearcher:rk,categoricalChartProps:e,ref:t})),nae=["axis","item"],y5=S.forwardRef((e,t)=>S.createElement(p5,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:nae,tooltipPayloadSearcher:rk,categoricalChartProps:e,ref:t}));const $i="",Ub=[{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}],hx=10;function aae(e,t,r=new Date){const n=iae(e),i=oae(e,n),o=lae(n.flatMap(y=>y.category??[])),l=o.length>0,c=n.some(y=>y.startedAtMs!==void 0),h=Ub.find(y=>y.value===t.timePeriod)??Ub[0],f=h.windowMs===void 0?void 0:r.getTime()-h.windowMs,p=n.filter(y=>t.experiment&&y.experiment!==t.experiment||t.category&&y.category!==t.category?!1:f!==void 0?y.startedAtMs!==void 0&&y.startedAtMs>=f:!0);return{buckets:uae(p.map(y=>y.score)),experimentOptions:i,categoryOptions:o,totalScores:n.length,filteredScores:p.length,categoryAvailable:l,hasTimestampedScores:c}}function iae(e){return e.runs&&e.runs.length>0?e.runs.flatMap(t=>sae(t)):e.cells.flatMap(t=>t.tests.flatMap(r=>{const n=g5(r,t.experiment);return n?[n]:[]}))}function sae(e){const t=dae(e.started_at);return e.tests.flatMap(r=>{const n=g5(r,e.experiment);return n?[{...n,startedAtMs:t}]:[]})}function g5(e,t){if(!Number.isFinite(e.score))return;const r=cae(e.category);return{score:e.score,experiment:t,...r&&{category:r}}}function oae(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 lae(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 uae(e){if(e.length===0)return[];const t=Array.from({length:hx},(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*hx),hx-1);t[i].count++}return t}function cae(e){const t=e==null?void 0:e.trim();return t||void 0}function dae(e){const t=Date.parse(e);return Number.isFinite(t)?t:void 0}const Tt={green:"#34d399",red:"#f87171",gray:"#4b5563",cyan:"#22d3ee",gridLine:"#1f2937",labelText:"#9ca3af"},r2=["#22d3ee","#34d399","#facc15","#f87171","#a78bfa","#fb923c","#f472b6","#60a5fa"];function fae(e){return r2[e%r2.length]}function hae({data:e,projectId:t}){const[r,n]=S.useState(!0),[i,o]=S.useState(""),l=e.targets,c=qe(t?kR(t,i||void 0):L6(i||void 0)),h=i?c.data:void 0,f=S.useMemo(()=>bae(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&&h&&d.jsx(mae,{data:h,baseline:i}),e.runs&&e.runs.length>0&&l.length>1&&d.jsx(pae,{runs:e.runs,targets:l}),i&&h&&d.jsx(yae,{data:h,baseline:i}),d.jsx(gae,{data:e}),f.length>1&&l.length>0&&d.jsx(jae,{data:f,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 tS({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 ru({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 mae({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(ru,{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(ru,{title:"Normalized Gain (g)",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(Ij,{width:"100%",height:Math.max(200,n.length*32),children:d.jsxs(y5,{data:n,layout:"vertical",margin:{left:120,right:20,top:5,bottom:5},children:[d.jsx(Kp,{strokeDasharray:"3 3",stroke:Tt.gridLine,horizontal:!1}),d.jsx(Gp,{type:"number",tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(Yp,{type:"category",dataKey:"name",tick:{fill:Tt.labelText,fontSize:11},width:120,axisLine:{stroke:Tt.gridLine}}),d.jsx(qw,{content:d.jsx(tS,{})}),d.jsx(Zw,{dataKey:"g",name:"Normalized Gain",children:n.map(i=>d.jsx(Fw,{fill:i.isNull?Tt.gray:i.g>0?Tt.green:i.g<0?Tt.red:Tt.gray},i.name))})]})})})})}function pae({runs:e,targets:t}){const{tags:r,grid:n}=S.useMemo(()=>{const i=new Map;for(const c of e)for(const h of c.tags??[]){let f=i.get(h);f||(f=new Map,i.set(h,f));let p=f.get(c.target);p||(p={passed:0,total:0},f.set(c.target,p)),p.passed+=c.passed_count,p.total+=c.eval_count}const o=[...i.keys()].sort(),l=o.map(c=>{const h={tag:c},f=i.get(c);if(!f)return h;for(const p of t){const y=f.get(p);h[p]=y&&y.total>0?y.passed/y.total:-1}return h});return{tags:o,grid:l}},[e,t]);return r.length===0?null:d.jsx(ru,{title:"Pass Rate by Tag × Target",children:d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tag"}),t.map(i=>d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:i},i))]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(i=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:i.tag}),t.map(o=>{const l=i[o];if(l<0)return d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},o);const c=Math.round(l*100),h=l>=.8?"bg-emerald-400/20 text-emerald-400":l>=.5?"bg-yellow-400/20 text-yellow-400":"bg-red-400/20 text-red-400";return d.jsx("td",{className:"px-4 py-3",children:d.jsxs("span",{className:`inline-block rounded px-2 py-0.5 text-xs tabular-nums font-medium ${h}`,children:[c,"%"]})},o)})]},i.tag))})]})})})}function yae({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(ru,{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 n2={experiment:$i,category:$i,timePeriod:"all"};function gae({data:e}){const[t,r]=S.useState(n2),n=S.useMemo(()=>aae(e,t),[e,t]);S.useEffect(()=>{r(f=>{const p=!f.experiment||n.experimentOptions.some(v=>v.value===f.experiment),y=!f.category||n.categoryOptions.some(v=>v.value===f.category),g=f.timePeriod==="all"||n.hasTimestampedScores;return p&&y&&g?f:{experiment:p?f.experiment:$i,category:y?f.category:$i,timePeriod:g?f.timePeriod:"all"}})},[n.experimentOptions,n.categoryOptions,n.hasTimestampedScores]);const i=(f,p)=>{r(y=>({...y,[f]:p}))},o=()=>r(n2),l=t.experiment!==$i||t.category!==$i||t.timePeriod!=="all",c=n.totalScores>0,h=xae(n,t);return d.jsx(ru,{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(mx,{id:"score-distribution-experiment",label:"Experiment",value:t.experiment,onChange:f=>i("experiment",f),disabled:n.experimentOptions.length===0,children:[d.jsx("option",{value:$i,children:"All experiments"}),n.experimentOptions.map(f=>d.jsxs("option",{value:f.value,children:[f.label," (",f.count,")"]},f.value))]}),d.jsxs(mx,{id:"score-distribution-category",label:"Category",value:t.category,onChange:f=>i("category",f),disabled:!n.categoryAvailable,help:n.categoryAvailable||!c?void 0:"Category metadata is not present in these compare results.",children:[d.jsx("option",{value:$i,children:"All categories"}),n.categoryOptions.map(f=>d.jsxs("option",{value:f.value,children:[f.label," (",f.count,")"]},f.value))]}),d.jsx(mx,{id:"score-distribution-time",label:"Time period",value:t.timePeriod,onChange:f=>i("timePeriod",f),disabled:!n.hasTimestampedScores,help:n.hasTimestampedScores||!c?void 0:"Recent windows need run timestamps from compare data.",children:Ub.map(f=>d.jsx("option",{value:f.value,children:f.label},f.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(Ij,{width:"100%",height:200,children:d.jsxs(y5,{data:n.buckets,margin:{left:10,right:10,top:5,bottom:5},children:[d.jsx(Kp,{strokeDasharray:"3 3",stroke:Tt.gridLine,vertical:!1}),d.jsx(Gp,{dataKey:"range",tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(Yp,{tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(qw,{content:d.jsx(tS,{})}),d.jsx(Zw,{dataKey:"count",name:"Tests",fill:Tt.cyan,radius:[2,2,0,0]})]})})}):d.jsx(vae,{message:h})]})})}function mx({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 vae({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 xae(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 bae(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 jae({data:e,targets:t}){return d.jsx(ru,{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(Ij,{width:"100%",height:250,children:d.jsxs(rae,{data:e,margin:{left:10,right:20,top:5,bottom:5},children:[d.jsx(Kp,{strokeDasharray:"3 3",stroke:Tt.gridLine}),d.jsx(Gp,{dataKey:"date",tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(Yp,{domain:[0,1],tick:{fill:Tt.labelText,fontSize:11},axisLine:{stroke:Tt.gridLine}}),d.jsx(qw,{content:d.jsx(tS,{})}),d.jsx(C3,{wrapperStyle:{fontSize:12,color:Tt.labelText}}),t.map((r,n)=>d.jsx(Qk,{type:"monotone",dataKey:r,stroke:fae(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 v5({data:e,isLoading:t,isError:r,error:n,projectId:i,readOnly:o}){var A,C;const[l,c]=S.useState("aggregated"),[h,f]=S.useState([]),{allTags:p,tagCounts:y}=S.useMemo(()=>{const E=new Map;for(const T of(e==null?void 0:e.runs)??[])for(const R of T.tags??[])E.set(R,(E.get(R)??0)+1);return{allTags:[...E.keys()].sort(),tagCounts:E}},[e==null?void 0:e.runs]),g=S.useMemo(()=>{if(!e||h.length===0)return e;const E=new Set(h),T=(e.runs??[]).filter(k=>(k.tags??[]).some(H=>E.has(H))),R=new Map,D=new Set,M=new Set;for(const k of T){D.add(k.experiment),M.add(k.target);const H=`${k.experiment}::${k.target}`,B=R.get(H)??{experiment:k.experiment,target:k.target,eval_count:0,quality_count:0,passed_count:0,execution_error_count:0,score_sum:0,tests:[]},ae=Kl(k);B.eval_count+=k.eval_count,B.quality_count+=ae,B.passed_count+=k.passed_count,B.execution_error_count+=Xt(k),B.score_sum+=k.avg_score*ae;for(const ee of k.tests)B.tests.push(ee);R.set(H,B)}const U=[...R.values()].map(k=>{const H=new Map;for(const B of k.tests)H.set(B.test_id,B);return{experiment:k.experiment,target:k.target,eval_count:k.eval_count,quality_count:k.quality_count,passed_count:k.passed_count,execution_error_count:k.execution_error_count,pass_rate:k.quality_count>0?k.passed_count/k.quality_count:0,avg_score:k.quality_count>0?k.score_sum/k.quality_count:0,tests:[...H.values()].slice(-100)}});return{...e,experiments:[...D].sort(),targets:[...M].sort(),cells:U,runs:T}},[e,h]),v=E=>{f(T=>T.includes(E)?T.filter(R=>R!==E):[...T,E])},b=()=>f([]),w=((A=g==null?void 0:g.runs)==null?void 0:A.length)??0,N=e&&e.cells.length>0,_=h.length>0&&g&&(((C=g.runs)==null?void 0:C.length)??0)===0;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(Sae,{mode:l,onModeChange:c,runsCount:w}),t&&d.jsx($ae,{}),!t&&r&&n&&d.jsx(Lae,{message:`Failed to load comparison data: ${n.message}`}),!t&&!r&&!N&&d.jsx(Iae,{}),!t&&!r&&N&&d.jsxs(d.Fragment,{children:[p.length>0&&d.jsx(wae,{allTags:p,tagCounts:y,selected:h,onToggle:v,onClear:b}),_?d.jsx(Qp,{headline:`No runs match ${h.map(E=>`\`${E}\``).join(" + ")}`,body:"Clear the filter or pick a different tag combination.",action:{label:"Clear filter",onClick:b}}):g&&d.jsxs(d.Fragment,{children:[l==="aggregated"&&d.jsx(_ae,{data:g,projectId:i}),l==="per-run"&&d.jsx(Tae,{data:g,projectId:i,readOnly:o??!1})]})]})]})}function wae({allTags:e,tagCounts:t,selected:r,onToggle:n,onClear:i}){const o=new Set(r),l=r.length>0;return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Filter by tag"}),e.map(c=>{const h=o.has(c),f=t.get(c)??0;return d.jsxs("button",{type:"button",onClick:()=>n(c),"aria-pressed":h,className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors ${h?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300 hover:border-cyan-800/80":"border-gray-700 text-gray-400 hover:border-gray-600 hover:text-gray-200"}`,children:[d.jsx("span",{children:c}),d.jsx("span",{className:`rounded px-1 text-[0.65rem] tabular-nums ${h?"bg-cyan-900/50 text-cyan-200":"bg-gray-800 text-gray-500"}`,children:f})]},c)}),l&&d.jsx("button",{type:"button",onClick:i,className:"ml-1 text-xs text-gray-500 underline-offset-2 transition-colors hover:text-gray-300 hover:underline",children:"Clear"})]}),d.jsxs("p",{className:"mt-2 text-xs text-gray-500",children:["Showing runs with ",d.jsx("span",{className:"text-gray-400",children:"any"})," selected tag."]})]})}function Sae({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(Nae,{mode:e,onChange:t,runsCount:r})]})}function Nae({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(a2,{active:e==="aggregated",onClick:()=>t("aggregated"),children:"Aggregated"}),d.jsxs(a2,{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 a2({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 _ae({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(Qp,{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(kae,{}),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(Oae,{target:l,experiments:r,cellMap:o},l))})]})}),d.jsx(hae,{data:e,projectId:t})]})}function Oae({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(Eae,{cell:i}):d.jsx(Aae,{})},n)})]})}function Eae({cell:e}){const[t,r]=S.useState(!1),n=Math.round(e.avg_score*100),i=Kl(e),o=Xt(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(Cae,{tests:e.tests})]})}function Aae(){return d.jsx("div",{className:"text-center text-gray-600",children:"—"})}function Cae({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 Tae({data:e,projectId:t,readOnly:r}){const n=e.runs??[],[i,o]=S.useState(new Set),[l,c]=S.useState(!1),[h,f]=S.useState(null),p=v=>{o(b=>{const w=new Set(b);return w.has(v)?w.delete(v):w.add(v),w})},y=()=>o(new Set),g=S.useMemo(()=>n.filter(v=>i.has(v.run_id)),[n,i]);return n.length===0?d.jsx(Qp,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):l&&g.length>=2?d.jsx(Mae,{runs:g,onBack:()=>c(!1)}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("div",{className:"flex items-center justify-between text-sm text-gray-400",children:d.jsxs("span",{children:[d.jsx("span",{className:"font-medium text-gray-300",children:n.length})," run",n.length===1?"":"s"," — select two or more to compare side-by-side"]})}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"w-10 px-3 py-3","aria-label":"Select"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Timestamp"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tags"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Tests"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(v=>d.jsx(Pae,{run:v,checked:i.has(v.run_id),onToggle:()=>p(v.run_id),editing:h===v.run_id,onStartEdit:()=>f(v.run_id),onEndEdit:()=>f(null),projectId:t,readOnly:r},v.run_id))})]})}),i.size>0&&d.jsxs("div",{role:"toolbar","aria-label":"Selection actions",className:"sticky bottom-4 z-10 flex items-center justify-between gap-3 rounded-lg border border-cyan-900/50 bg-gray-900/95 px-4 py-3 shadow-xl backdrop-blur",children:[d.jsxs("div",{className:"text-sm text-gray-300",children:[d.jsx("span",{className:"font-semibold tabular-nums text-cyan-400",children:i.size})," ","selected"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:y,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"}),d.jsxs("button",{type:"button",disabled:i.size<2,onClick:()=>c(!0),className:"inline-flex items-center gap-1.5 rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:["Compare ",i.size,d.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})]})}function Pae({run:e,checked:t,onToggle:r,editing:n,onStartEdit:i,onEndEdit:o,projectId:l,readOnly:c}){const h=Math.round(e.avg_score*100),f=Kl(e),p=Xt(e),y=!c,g=S.useRef(null),v=e.tags??[],b=e.metadata_dirty===!0,w=v[0]??e.run_id,N=zae(e.run_id),_=v.length>0?"inline-flex flex-wrap items-center gap-1 rounded-md px-1 py-0.5 transition-colors hover:bg-gray-800/60":b?"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs text-yellow-300 transition-colors hover:border-yellow-700":"rounded-md border border-dashed border-gray-700 px-2 py-0.5 text-xs text-gray-500 transition-colors hover:border-cyan-800 hover:text-cyan-400",A=S.useRef(n);return S.useEffect(()=>{var C;A.current&&!n&&((C=g.current)==null||C.focus()),A.current=n},[n]),d.jsxs(d.Fragment,{children:[d.jsxs("tr",{className:`transition-colors ${t?"bg-cyan-950/20 hover:bg-cyan-950/30":"hover:bg-gray-900/30"}`,children:[d.jsx("td",{className:"px-3 py-3 align-middle",children:d.jsx("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-gray-700 bg-gray-900 text-cyan-500 accent-cyan-500 focus:ring-cyan-500",checked:t,onChange:r,"aria-label":`Select run ${w}`})}),d.jsxs("td",{className:"px-4 py-3 align-middle",title:e.run_id,children:[d.jsx("div",{className:"font-medium text-gray-200 tabular-nums",children:x5(e.started_at)}),N&&d.jsx("div",{className:"text-xs text-gray-500",children:N})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:y?d.jsx("button",{ref:g,type:"button",onClick:C=>{C.stopPropagation(),i()},className:_,"aria-label":v.length>0?"Edit tags":"Add tags",children:v.length>0?d.jsx(i2,{tags:v,dirty:b}):b?d.jsx(d.Fragment,{children:"Pending clear"}):d.jsx(d.Fragment,{children:"+ tags"})}):v.length>0?d.jsx(i2,{tags:v,dirty:b}):d.jsx("span",{className:b?"text-yellow-400":"text-gray-600",children:b?"Pending clear":"—"})}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.experiment}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.target}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[d.jsx("div",{children:f}),p>0&&d.jsxs("div",{className:"text-xs text-amber-400",children:[p," errors"]})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:d.jsx(an,{rate:e.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[h,"%"]})]}),n&&d.jsx("tr",{className:"bg-gray-950/80",children:d.jsx("td",{colSpan:8,className:"px-4 py-3",children:d.jsx(Rae,{runId:e.run_id,currentTags:v,tagRevision:e.tag_revision,source:e.source,projectId:l,onClose:o})})})]})}function i2({tags:e,dirty:t}){return d.jsxs("span",{className:"inline-flex flex-wrap items-center gap-1",children:[e.map(r=>d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:r},r)),t?d.jsx("span",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs font-medium text-yellow-300",children:"Pending sync"}):null]})}function Rae({runId:e,currentTags:t,tagRevision:r,source:n,projectId:i,onClose:o}){const[l,c]=S.useState(t),[h,f]=S.useState(""),[p,y]=S.useState(null),g=pa(),v=S.useRef(null);S.useEffect(()=>{var E;(E=v.current)==null||E.focus()},[]);const b=$x({mutationFn:()=>lB(e,l,i,r),onSuccess:()=>{g.invalidateQueries({queryKey:["compare"]}),g.invalidateQueries({queryKey:["runs"]}),g.invalidateQueries({queryKey:["remote-status",i??""]}),i&&(g.invalidateQueries({queryKey:["projects",i,"compare"]}),g.invalidateQueries({queryKey:["projects",i,"runs"]})),o()},onError:E=>y(E.message)}),w=$x({mutationFn:()=>uB(e,i,r),onSuccess:()=>{g.invalidateQueries({queryKey:["compare"]}),g.invalidateQueries({queryKey:["runs"]}),g.invalidateQueries({queryKey:["remote-status",i??""]}),i&&(g.invalidateQueries({queryKey:["projects",i,"compare"]}),g.invalidateQueries({queryKey:["projects",i,"runs"]})),o()},onError:E=>y(E.message)}),N=b.isPending||w.isPending,_=l.length!==t.length||l.some((E,T)=>E!==t[T]),A=()=>{const E=h.trim();if(E!==""){if(l.includes(E)){f("");return}c([...l,E]),f(""),y(null)}},C=E=>{c(l.filter(T=>T!==E))};return d.jsxs("div",{className:"space-y-2 rounded-md border border-gray-800 bg-gray-900/60 p-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:"Tag run"}),d.jsx("span",{className:"text-xs text-gray-500",children:"Multi-valued. Enter or comma adds; Backspace removes the last chip."})]}),n==="remote"?d.jsx("div",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-3 py-2 text-xs text-yellow-300",children:"Remote tag edits are saved as local metadata. Use Sync Metadata to push them to the results repo."}):null,d.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-gray-700 bg-gray-950 px-2 py-1.5 focus-within:border-cyan-500 focus-within:ring-1 focus-within:ring-cyan-500",children:[l.map(E=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:[E,d.jsx("button",{type:"button",onClick:()=>C(E),disabled:N,className:"text-cyan-500 transition-colors hover:text-cyan-200 disabled:opacity-50","aria-label":`Remove tag ${E}`,children:"×"})]},E)),d.jsx("input",{ref:v,type:"text",className:"flex-1 min-w-[140px] bg-transparent text-sm text-gray-100 placeholder:text-gray-600 focus:outline-none disabled:opacity-50",placeholder:l.length===0?"e.g. baseline, v2-prompt, slow":"Add tag…",value:h,onChange:E=>{y(null),f(E.target.value)},maxLength:60,disabled:N,onKeyDown:E=>{E.key==="Enter"||E.key===","?(E.preventDefault(),A()):E.key==="Backspace"&&h===""&&l.length>0?(E.preventDefault(),c(l.slice(0,-1))):E.key==="Escape"&&o()},onBlur:A})]}),d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx("button",{type:"button",onClick:o,disabled:N,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200 disabled:opacity-50",children:"Cancel"}),t.length>0&&d.jsx("button",{type:"button",onClick:()=>{N||w.mutate()},disabled:N,className:"rounded-md border border-red-900/60 px-3 py-1.5 text-sm text-red-400 transition-colors hover:border-red-800 hover:bg-red-950/30 hover:text-red-300 disabled:opacity-50",children:"Clear all"}),d.jsx("button",{type:"button",disabled:!_||N,onClick:()=>{N||!_||b.mutate()},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:b.isPending?"Saving…":"Save"})]}),p&&d.jsx("div",{className:"rounded-md border border-red-900/60 bg-red-950/30 px-3 py-1.5 text-xs text-red-400",children:p})]})}function Mae({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(Dae,{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),h=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),"%"]})]})})},h):d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},h)})]},i))})]})})]})}function Dae({run:e}){const t=e.tags??[];return d.jsxs("div",{className:"min-w-[140px] space-y-1",children:[d.jsx("div",{className:"text-sm font-medium text-gray-200 tabular-nums",title:e.run_id,children:x5(e.started_at)}),t.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-1.5 py-0.5 text-[0.7rem] font-medium text-cyan-300",children:r},r))}),d.jsxs("div",{className:"text-xs text-gray-500",children:[e.experiment," · ",e.target]})]})}function kae(){return d.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",role:"note",children:[d.jsx(Nh,{className:"bg-emerald-400",label:"80%+"}),d.jsx(Nh,{className:"bg-yellow-400",label:"50–80%"}),d.jsx(Nh,{className:"bg-red-400",label:"< 50%"}),d.jsx(Nh,{className:"bg-gray-700",label:"no data"})]})}function Nh({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 Lae({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 Iae(){return d.jsx(Qp,{headline:"No comparison data yet",body:"Run evaluations with different experiment and target combinations to populate this view."})}function Qp({headline:e,body:t,action:r}){return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:e}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:t}),r&&d.jsx("button",{type:"button",onClick:r.onClick,className:"mt-4 inline-flex items-center rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400",children:r.label})]})}function $ae(){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 x5(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 zae(e){const t=e.split("::");return t.length<2?null:t.slice(0,-1).join(" · ")}function b5({projectId:e}){const{data:t,isLoading:r}=e?qe(cj(e)):RR();if(r)return d.jsx(Bae,{});const n=(t==null?void 0:t.experiments)??[];return n.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No experiments found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Experiments will appear here once evaluations are run with experiment labels."})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[760px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Targets"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Last Run"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(i=>{const o=Kl(i),l=Xt(i);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:e?d.jsx(Ee,{to:"/projects/$projectId/experiments/$experimentName",params:{projectId:e,experimentName:i.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:i.name}):d.jsx(Ee,{to:"/experiments/$experimentName",params:{experimentName:i.name},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:i.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:i.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:i.target_count}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:i.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),o]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:l>0?l:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(an,{rate:i.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:s2(i.last_run).full,children:s2(i.last_run).date})]},i.name)})})]})})}function s2(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 Bae(){return d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("div",{className:"min-w-[760px] animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-24 rounded bg-gray-800"})]},e))]})})}function Uae(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 qae({project:e,canRemove:t=!1,onRemove:r}){const n=Math.round(e.pass_rate*100),i=Xt(e),[o,l]=S.useState(!1),[c,h]=S.useState(!1),[f,p]=S.useState(!1),[y,g]=S.useState(null),v=S.useId(),b=S.useId(),w=S.useRef(null),N=S.useRef(null),_=S.useRef(null);S.useEffect(()=>{if(!o)return;function T(D){var U,k;const M=D.target;(U=w.current)!=null&&U.contains(M)||(k=N.current)!=null&&k.contains(M)||l(!1)}function R(D){var M;D.key==="Escape"&&(l(!1),(M=w.current)==null||M.focus())}return document.addEventListener("pointerdown",T),document.addEventListener("keydown",R),()=>{document.removeEventListener("pointerdown",T),document.removeEventListener("keydown",R)}},[o]),S.useEffect(()=>{var T;c&&((T=_.current)==null||T.focus())},[c]);function A(){l(!1),g(null),h(!0)}async function C(){if(!(!r||f)){p(!0),g(null);try{await r(e)}catch(T){g(T.message),p(!1)}}}function E(){var T;f||(h(!1),g(null),(T=w.current)==null||T.focus())}return d.jsxs("article",{className:"group relative rounded-lg border border-gray-800 bg-gray-900/50 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[d.jsxs(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.name}),d.jsx("p",{className:"mt-1 truncate text-xs text-gray-500",children:e.path})]})}),d.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-3",children:[d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Runs"}),d.jsx("p",{className:"text-lg font-semibold text-white",children:e.run_count})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Pass Rate"}),d.jsx("p",{className:`text-lg font-semibold ${e.run_count===0?"text-gray-500":n>=80?"text-emerald-400":n>=50?"text-yellow-400":"text-red-400"}`,children:e.run_count>0?`${n}%`:"--"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Errors"}),d.jsx("p",{className:`text-lg font-semibold ${i>0?"text-amber-300":"text-gray-500"}`,children:i})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Last Run"}),d.jsx("p",{className:"text-sm text-gray-300",children:Uae(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?v:void 0,"aria-label":`Open ${e.name} project menu`,onClick:()=>l(T=>!T),className:"flex h-8 w-8 items-center justify-center rounded-md text-lg leading-none text-gray-500 transition-colors hover:bg-gray-800 hover:text-gray-200 focus:outline-none focus:ring-1 focus:ring-cyan-500",children:d.jsx("span",{"aria-hidden":"true",children:"..."})}),o?d.jsx("div",{ref:N,id:v,role:"menu","aria-label":`${e.name} actions`,className:"absolute right-0 top-10 w-44 overflow-hidden rounded-md border border-gray-800 bg-gray-950 py-1 shadow-xl",children:d.jsx("button",{type:"button",role:"menuitem",onClick:A,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:T=>{T.key==="Escape"&&(T.preventDefault(),E())},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.name})," from this Dashboard registry."]}),d.jsxs("p",{className:"text-sm text-gray-500",children:["The project folder and files stay on disk at ",e.path,"."]}),y?d.jsx("div",{role:"alert",className:"rounded-lg border border-red-900/60 bg-red-950/30 p-3 text-sm text-red-400",children:y}):null]}),d.jsxs("div",{className:"flex items-center justify-end gap-2 border-t border-gray-800 bg-gray-900/50 px-4 py-3",children:[d.jsx("button",{type:"button",onClick:E,disabled:f,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 C(),disabled:f,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:f?"Removing...":"Remove project"})]})]})}):null]})}function Fae(e){return e.map(t=>({path:t.path,relativePath:t.relative_path,category:t.category}))}function Hae(e){return(e.split(",").at(-1)??"").trim()}function Kae(e,t){const r=Hae(t).toLowerCase();return r?e.filter(n=>n.relativePath.toLowerCase().includes(r)||n.category.toLowerCase().includes(r)):e}function Gae(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 Yae(e,t,r){return t?e:rS(e,r)}function rS(e,t){return e||String(t??Fc)}function Vae({suiteFilter:e,testIds:t,target:r,experiment:n,tags:i,thresholdInput:o,studioThreshold:l,workers:c,dryRun:h}){const f={};e.trim()&&(f.suite_filter=e.trim()),t.length>0&&(f.test_ids=t),r&&(f.target=r),n.trim()&&(f.experiment=n.trim()),i.length>0&&(f.tags=i);const p=rS(o,l);return p&&(f.threshold=Number.parseFloat(p)),c&&(f.workers=Number.parseInt(c,10)),h&&(f.dry_run=!0),f}const px="default";function _o({open:e,onClose:t,projectId:r,prefill:n}){const i=pa(),o=go(),[l,c]=S.useState((n==null?void 0:n.suiteFilter)??""),[h,f]=S.useState(""),[p,y]=S.useState((n==null?void 0:n.testIds)??[]),[g,v]=S.useState((n==null?void 0:n.target)??""),[b,w]=S.useState(px),[N,_]=S.useState(""),[A,C]=S.useState([]),[E,T]=S.useState(""),[R,D]=S.useState(!1),[M,U]=S.useState(""),[k,H]=S.useState(!1),[B,ae]=S.useState(!1),[ee,ne]=S.useState(null),[$,L]=S.useState(null),[W,te]=S.useState(!1),[se,I]=S.useState(null),{data:Q}=fB(r),{data:le}=mB(r),{data:oe}=dj(ee,r),{data:fe}=yt(r),xe=S.useMemo(()=>Fae((Q==null?void 0:Q.eval_files)??[]),[Q]),Se=S.useMemo(()=>Kae(xe,l),[xe,l]),Me=S.useMemo(()=>(le==null?void 0:le.targets)??[],[le]),ce=S.useMemo(()=>rS(E,fe==null?void 0:fe.threshold),[fe==null?void 0:fe.threshold,E]),de=S.useMemo(()=>Yae(E,R,fe==null?void 0:fe.threshold),[fe==null?void 0:fe.threshold,E,R]);S.useEffect(()=>{e&&(c((n==null?void 0:n.suiteFilter)??""),y((n==null?void 0:n.testIds)??[]),v((n==null?void 0:n.target)??""),w(px),_(""),C([]),f(""),T(""),D(!1),U(""),H(!1),ae(!1),ne(null),L(null),te(!1),I(null))},[e,n]),S.useEffect(()=>{((oe==null?void 0:oe.status)==="finished"||(oe==null?void 0:oe.status)==="failed")&&(i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["projects"]}))},[oe==null?void 0:oe.status,i]);const _e=S.useCallback(()=>{const he=l2(A,o2(N));return Vae({suiteFilter:l,testIds:p,target:g,experiment:b,tags:he,thresholdInput:E,studioThreshold:fe==null?void 0:fe.threshold,workers:M,dryRun:k})},[k,b,fe==null?void 0:fe.threshold,l,N,A,g,p,E,M]);S.useEffect(()=>{const he=_e();if(!he.suite_filter&&(!he.test_ids||he.test_ids.length===0)){I(null);return}vB(he,r).then(Ot=>I(Ot.command)).catch(()=>I(null))},[_e,r]);function ue(){const he=h.trim();he&&!p.includes(he)&&y([...p,he]),f("")}function gt(he){y(p.filter(Ot=>Ot!==he))}function Pe(){const he=o2(N);he.length>0&&C(l2(A,he)),_("")}function vt(he){C(A.filter(Ot=>Ot!==he))}async function xt(){L(null),te(!0);try{const he=_e(),Ot=await zR(he,r);ne(Ot.id)}catch(he){L(he.message)}finally{te(!1)}}if(!e)return null;if(ee&&oe){let he=function(){t(),o({to:bB(r)})};return d.jsx(u2,{onClose:t,title:"Eval Run",children:d.jsx(Qae,{status:oe,onClose:t,onRunInBackground:he,runId:ee})})}const Ht=!!(l.trim()||p.length>0);return d.jsx(u2,{onClose:t,title:"Run Eval",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),d.jsx("input",{id:"suite-filter",type:"text",value:l,onChange:he=>c(he.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"}),xe.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:Se.length>0?Se.map(he=>d.jsxs("button",{type:"button",onClick:()=>c(Ot=>Gae(Ot,he.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:he.relativePath}),he.category&&d.jsx("span",{className:"block truncate text-[11px] text-gray-600",children:he.category})]},he.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:h,onChange:he=>f(he.target.value),onKeyDown:he=>{he.key==="Enter"&&(he.preventDefault(),ue())},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:ue,disabled:!h.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(he=>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:[he,d.jsx("button",{type:"button",onClick:()=>gt(he),className:"text-cyan-400 hover:text-white",children:"×"})]},he))})]}),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:g,onChange:he=>v(he.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"}),Me.map(he=>d.jsx("option",{value:he,children:he},he))]})]}),d.jsxs("div",{className:"rounded-md border border-gray-800 bg-gray-950/40 p-3",children:[d.jsxs("div",{className:"grid gap-3 sm:grid-cols-[minmax(0,0.8fr)_minmax(0,1.2fr)]",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:he=>w(he.target.value),placeholder:px,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:"tags-input",className:"mb-1 block text-xs font-medium text-gray-400",children:"Tags"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"tags-input",type:"text",value:N,onChange:he=>_(he.target.value),onKeyDown:he=>{(he.key==="Enter"||he.key===",")&&(he.preventDefault(),Pe())},onBlur:Pe,placeholder:"baseline, prompt-v2",className:"min-w-0 flex-1 rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),d.jsx("button",{type:"button",onClick:Pe,disabled:!N.trim(),className:"rounded-md bg-gray-700 px-3 py-1.5 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]})]})]}),A.length>0&&d.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:A.map(he=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:[he,d.jsx("button",{type:"button",onClick:()=>vt(he),className:"text-cyan-400 hover:text-white","aria-label":`Remove tag ${he}`,children:"×"})]},he))}),d.jsx("p",{className:"mt-2 text-xs text-gray-500",children:"Saved with the new run only; existing runs stay unchanged."})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>ae(!B),className:"text-sm text-gray-400 hover:text-gray-200",children:[B?"▾":"▸"," Advanced Options"]}),B&&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:de,onChange:he=>{D(!0),T(he.target.value)},min:"0",max:"1",step:"0.1",placeholder:ce,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:M,onChange:he=>U(he.target.value),min:"1",max:"50",placeholder:"3",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),d.jsx("div",{className:"col-span-2",children:d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx("input",{type:"checkbox",checked:k,onChange:he=>H(he.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),se&&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:se})]}),$&&d.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:$}),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:xt,disabled:!Ht||W,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:W?"Launching…":"Run Now"})]})]})})}function o2(e){return e.split(",").map(t=>t.trim()).filter(t=>t.length>0)}function l2(e,t){const r=new Set(e),n=[...e];for(const i of t)r.has(i)||(r.add(i),n.push(i));return n}function u2({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 Qae({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 yx(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 Xae(e){return`${e} local run${e===1?"":"s"} selected`}function Wae(e,t){return`Combined ${e} local run${e===1?"":"s"} into ${t}.`}function Zae(e){return`Deleted ${e} local run${e===1?"":"s"}.`}function Jae(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 eie(e,t){const r=Jae(e.timestamp),n=e.status==="starting"||e.status==="running",i=pj(e,{includePassRate:!1}),o=i.label,l=Xt(e),c=Math.max(0,e.test_count-l),h=c>0?e.pass_rate>=t:l===0,f=Math.round(e.pass_rate*c),p=c-f,y=e.metadata_dirty===!0;return{run:e,ts:r,isActive:n,label:o,display:i,errors:l,qualityCount:c,passing:h,passedCount:f,failedCount:p,metadataDirty:y}}function Xp({runs:e,projectId:t,emptyMessage:r,hasNextPage:n=!1,isFetchingNextPage:i=!1,onLoadMore:o,enableCombine:l=!1,remoteBranch:c}){const{data:h}=yt(t),f=pa(),p=(h==null?void 0:h.threshold)??Fc,y=S.useRef(null),g=S.useRef(null),v=S.useRef(!1),[b,w]=S.useState([]),[N,_]=S.useState(null),[A,C]=S.useState(!1),[E,T]=S.useState(!1),R=S.useMemo(()=>e.map($=>eie($,p)),[p,e]),D=S.useMemo(()=>e.filter($=>l&&!yx($)).map($=>$.filename),[l,e]),M=new Set(b),U=S.useMemo(()=>new Map(e.map($=>[$.filename,$])),[e]);S.useEffect(()=>{i||(v.current=!1)},[i]),S.useEffect(()=>{if(!n||!o)return;const $=[];if(y.current&&$.push(y.current),g.current&&$.push(g.current),$.length===0)return;const L=new IntersectionObserver(W=>{W.some(te=>te.isIntersecting)&&!i&&!v.current&&(v.current=!0,o())},{rootMargin:"200px 0px"});for(const W of $)L.observe(W);return()=>L.disconnect()},[n,i,o]),S.useEffect(()=>{const $=new Set(D);w(L=>L.filter(W=>$.has(W)))},[D]);async function k(){if(t){await Promise.all([f.invalidateQueries({queryKey:["projects",t,"runs"]}),f.invalidateQueries({queryKey:["projects",t,"experiments"]}),f.invalidateQueries({queryKey:["projects",t,"compare"]}),f.invalidateQueries({queryKey:["projects",t,"targets"]})]);return}await Promise.all([f.invalidateQueries({queryKey:["runs"]}),f.invalidateQueries({queryKey:["experiments"]}),f.invalidateQueries({queryKey:["compare"]}),f.invalidateQueries({queryKey:["targets"]})])}async function H(){if(b.length<2||A)return;const $=[...b],L=[...new Set($.map(te=>{var se,I;return((I=(se=U.get(te))==null?void 0:se.experiment)==null?void 0:I.trim())||"default"}).filter(Boolean))].sort();let W;if(L.length>1){const te=window.prompt(`Selected runs span experiments (${L.join(", ")}). Enter a new experiment name for the combined run:`);if(te===null)return;if(W=te.trim(),!W){_({kind:"error",message:"Experiment name is required to combine runs from multiple experiments."});return}}_(null),C(!0);try{let te;try{te=await tE($,"error",t,void 0,W)}catch(se){if(!(se instanceof $R)||se.status!==409)throw se;const I=se.duplicates.length;if(!window.confirm(`${I} duplicate (test_id, target) pair${I===1?"":"s"} found. Replace duplicates with the latest timestamp?`))return;te=await tE($,"latest",t,void 0,W)}w([]),_({kind:"success",message:Wae($.length,te.display_name),combinedRunId:te.run_id,sourceRunIds:$}),await k()}catch(te){_({kind:"error",message:te.message})}finally{C(!1)}}async function B(){b.length===0||E||await ee(b,"selected")}async function ae(){const $=(N==null?void 0:N.sourceRunIds)??[];$.length===0||E||await ee($,"combined-sources")}async function ee($,L){const W=$.length,te=W===1?"run":"runs",se=L==="combined-sources"?`Delete the ${W} source local ${te} used for the combined run? The combined run will remain.`:`Delete ${W} local ${te}? This removes the run workspace and artifacts from disk.`;if(window.confirm(se)){_(null),T(!0);try{for(const Q of $)await oB(Q,t);w([]),_({kind:"success",message:Zae(W)}),await k()}catch(Q){_({kind:"error",message:Q.message})}finally{T(!1)}}}function ne($){w(L=>L.includes($)?L.filter(W=>W!==$):[...L,$])}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:Xae(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 ae(),disabled:E||A,className:"font-medium text-red-300 hover:text-red-200 hover:underline disabled:cursor-not-allowed disabled:text-gray-500",children:E?"Deleting sources...":"Delete source runs"}):null]})})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>void B(),disabled:b.length===0||E||A,className:"whitespace-nowrap rounded-md border border-red-900/70 px-3 py-1.5 text-sm font-medium text-red-300 hover:border-red-700 hover:bg-red-950/40 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-500",children:E?"Deleting...":"Delete selected"}),d.jsx("button",{type:"button",onClick:()=>void H(),disabled:b.length<2||A||E,className:"whitespace-nowrap rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-400",children:A?"Combining...":"Combine selected"})]})]}),d.jsxs("div",{className:"space-y-2 sm:hidden",children:[R.map($=>{const{run:L,ts:W,label:te,display:se,errors:I,qualityCount:Q,passedCount:le,failedCount:oe,metadataDirty:fe}=$,xe=yx(L),Se=!xe&&D.includes(L.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(L.filename),disabled:!Se,onChange:()=>ne(L.filename),title:xe,"aria-label":xe?`${te}: ${xe}`:`Select ${te}`,className:"mt-1 h-4 w-4 shrink-0 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"}),d.jsx(h2,{view:$,className:"mt-1 shrink-0"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx(c2,{projectId:t,runId:L.filename,label:se.primary,title:se.title,className:"block truncate text-sm font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),se.secondary?d.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-500",title:se.title,children:se.secondary}):null,d.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[d.jsx(d2,{onRemote:L.on_remote===!0,branch:c}),fe?d.jsx(f2,{}):null,d.jsx("span",{className:"text-xs text-gray-500",title:W.full,children:W.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(xl,{label:"Pass Rate",valueClassName:"text-gray-300",children:d.jsx(an,{rate:L.pass_rate})}),d.jsx(xl,{label:"Total",valueClassName:"text-gray-300",children:Q}),d.jsx(xl,{label:"Passed",valueClassName:"text-emerald-300",children:le}),d.jsx(xl,{label:"Failures",valueClassName:"text-red-400",children:oe>0?oe:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(xl,{label:"Errors",valueClassName:"text-amber-300",children:I>0?I:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(xl,{label:"Remote",valueClassName:"text-gray-400",children:L.on_remote===!0?"On remote":"Local only"})]})]},L.filename)}),(n||i)&&d.jsx("div",{ref:g,className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})]}),d.jsx("div",{className:"hidden max-w-full overflow-x-auto rounded-lg border border-gray-800 sm:block",children:d.jsxs("table",{className:"min-w-[780px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[l&&d.jsx("th",{className:"w-10 px-4 py-3"}),d.jsx("th",{className:"w-8 px-4 py-3"}),d.jsx("th",{className:"w-[22rem] px-4 py-3 font-medium text-gray-400",children:"Run"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"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($=>{const{run:L,ts:W,label:te,display:se,errors:I,qualityCount:Q,passedCount:le,failedCount:oe,metadataDirty:fe}=$,xe=yx(L),Se=!xe&&D.includes(L.filename);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[l&&d.jsx("td",{className:"px-4 py-3",children:d.jsx("input",{type:"checkbox",checked:M.has(L.filename),disabled:!Se,onChange:()=>ne(L.filename),title:xe,"aria-label":xe?`${te}: ${xe}`:`Select ${te}`,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(h2,{view:$})}),d.jsx("td",{className:"w-[22rem] max-w-[22rem] px-4 py-3",children:d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx(c2,{projectId:t,runId:L.filename,label:se.primary,title:se.title,className:"block min-w-0 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),fe?d.jsx(f2,{}):null]}),se.secondary?d.jsx("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:se.title,children:se.secondary}):null]})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(d2,{onRemote:L.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:oe>0?oe:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums",children:I>0?d.jsx("span",{className:"text-amber-300",children:I}):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:Q}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(an,{rate:L.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:W.full,children:W.date})]},L.filename)}),(n||i)&&d.jsx("tr",{ref:y,children:d.jsx("td",{colSpan:l?10:9,className:"px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})})]})]})})]})}function c2({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 d2({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(tie,{}),"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(rie,{}),"Local only"]})}function tie(){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 rie(){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 f2(){return d.jsx("span",{className:"shrink-0 rounded-md border border-yellow-900/60 bg-yellow-950/20 px-1.5 py-0.5 text-xs text-yellow-300",title:"Use Sync Metadata to push this metadata to the results repo.",children:"Pending sync"})}function h2({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 xl({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 j5({remoteStatus:e,syncInFlight:t,onSync:r,projectName:n,syncFeedback:i,onRemoteSummary:o,onConfirmMerge:l,confirmMergeInFlight:c}){var _,A;const h=(e==null?void 0:e.configured)===!0,f=O6(e,t),p=t===!0||!f.canSync,y=f.pendingMerge,g={neutral:"border-gray-700 bg-gray-800/70 text-gray-300",good:"border-emerald-800/70 bg-emerald-950/30 text-emerald-300",info:"border-cyan-800/70 bg-cyan-950/30 text-cyan-300",warn:"border-yellow-800/70 bg-yellow-950/30 text-yellow-300",danger:"border-red-800/70 bg-red-950/30 text-red-300"}[f.tone],v=(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=((A=e==null?void 0:e.conflicted_paths)==null?void 0:A.length)??0,N=N6(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"}),h&&o?d.jsx("p",{className:"mt-0.5 text-xs text-gray-500",children:o}):null]}),h?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 ${g}`,children:f.label}),r?d.jsx("button",{type:"button",onClick:r,disabled:p,title:f.canSync?void 0:f.nextAction,className:"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm font-medium text-cyan-300 transition-colors hover:bg-cyan-900/50 disabled:cursor-not-allowed disabled:opacity-60",children:t?"Syncing...":f.actionLabel}):null]}):null]}),h?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(C=>d.jsx("span",{children:C},C))}),d.jsx("p",{className:f.tone==="danger"?"text-red-300":"text-gray-400",children:f.summary}),f.nextAction?d.jsx("p",{className:"text-xs text-gray-500",children:f.nextAction}):null,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."]}),y?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:y.tempBranch})," ","instead of force-pushing"," ",d.jsx("code",{className:"rounded bg-yellow-950/60 px-1 font-mono text-xs text-yellow-200",children:y.targetBranch}),typeof y.contributedRunCount=="number"?` (${y.contributedRunCount} run${y.contributedRunCount===1?"":"s"})`:"",". Merge it on GitHub, then resync."]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2 pt-0.5",children:[y.compareUrl?d.jsx("a",{href:y.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 ${v}`,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:oj(e)})]}):null,e!=null&&e.git_diff_summary&&f.state!=="clean"?d.jsx("pre",{className:"max-h-32 overflow-auto whitespace-pre-wrap rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2 text-xs text-gray-500",children:e.git_diff_summary}):null]})}const m2="remote::";function nie(e){return e.startsWith(m2)?e.slice(m2.length):e}function Wp(e){const t=new Map;for(const r of e){const n=nie(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 w5({projectId:e}={}){var y,g;const[t,r]=S.useState(null),n=qe(e?iB(e):$6),i=qe(e?uj(e):lj),o=((y=n.data)==null?void 0:y.targets)??[],l=((g=i.data)==null?void 0:g.runs)??[],c=n.error??i.error,h=n.isLoading||i.isLoading,f=S.useMemo(()=>o.find(v=>v.name===t)??null,[t,o]);S.useEffect(()=>{t&&!o.some(v=>v.name===t)&&r(null)},[t,o]);const p=S.useMemo(()=>{if(!f)return[];const v=new Map;for(const b of l){if((b.target??"default")!==f.name)continue;const N=b.experiment??"default",_=v.get(N)??[];_.push(b),v.set(N,_)}return[...v.entries()].map(([b,w])=>aie(b,Wp(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,f]);return h?d.jsx(oie,{}):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."})]}):f?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:f.name}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[f.run_count," run",f.run_count===1?"":"s"," ·"," ",f.experiment_count," experiment",f.experiment_count===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:f.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),Kl(f)," evals passed",Xt(f)>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",Xt(f)," execution errors"]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(an,{rate:f.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(v=>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:iie(v.name)}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[v.runs.length," run",v.runs.length===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:v.passedCount}),d.jsx("span",{className:"text-gray-600",children:" / "}),v.qualityCount," evals passed",v.executionErrorCount>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",v.executionErrorCount," execution errors"]}),v.latestTimestamp&&d.jsxs("span",{className:"ml-2 text-gray-500",children:["· Last run ",sie(v.latestTimestamp)]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(an,{rate:v.passRate})})]}),d.jsx(Xp,{runs:v.runs,projectId:e})]},v.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(v=>{const b=Kl(v),w=Xt(v);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(v.name),className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:v.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:v.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:v.experiment_count}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(an,{rate:v.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:v.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"})})]},v.name)})})]})})}function aie(e,t){let r=0,n=0,i=0,o=0,l=null;for(const c of t){const h=Xt(c),f=Math.max(0,c.test_count-h);r+=c.test_count,n+=f,o+=h,i+=Math.round(c.pass_rate*f),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 iie(e){return e==="default"?"Default experiment":e}function sie(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 oie(){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 p2=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Targets"}],lie=Cr("/")({component:uie});function uie(){const e=go(),n=ij().location.search.tab,{data:i,isLoading:o}=pd(),{data:l,isLoading:c}=yt(),h=(i==null?void 0:i.projects)??[],[f,p]=S.useState(void 0);S.useEffect(()=>{if(o||c)return;const g=l==null?void 0:l.current_project_id;if(!g){p(null);return}const v=xB(g),b=typeof window<"u"&&window.sessionStorage.getItem(v)==="1",w=jB(h.map(N=>N.id),g,b);typeof window<"u"&&w&&window.sessionStorage.setItem(v,"1"),p(w??null)},[l==null?void 0:l.current_project_id,c,h,o]);const y=wB(h.map(g=>g.id),l==null?void 0:l.project_dashboard,f??void 0,n);return S.useEffect(()=>{y.kind==="redirect"&&y.redirectPath&&e({to:y.redirectPath,replace:!0})},[y,e]),o||c||f===void 0?d.jsx(qb,{}):y.kind==="redirect"?d.jsx(qb,{}):y.kind==="dashboard"?d.jsx(cie,{}):d.jsx(die,{})}function cie(){const{data:e}=pd(),{data:t}=yt(),r=pa(),[n,i]=S.useState(!1),[o,l]=S.useState(!1),[c,h]=S.useState(null),f=(e==null?void 0:e.projects)??[],p=(t==null?void 0:t.read_only)===!0;async function y(g){await Z6(g.id),r.setQueryData(["projects"],v=>v&&{projects:v.projects.filter(b=>b.id!==g.id)}),h(`Project removed from Dashboard: ${g.name}. Files were left on disk.`),r.invalidateQueries({queryKey:["projects"]})}return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Projects"}),d.jsx("div",{className:"flex gap-2",children:!p&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"}),d.jsx("button",{type:"button",onClick:()=>{h(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}),f.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-300",children:"No projects registered yet."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Add a project path to start browsing runs, experiments, analytics, and targets."})]}):d.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:f.map(g=>d.jsx(qae,{project:g,canRemove:!p,onRemove:y},g.id))}),!p&&d.jsx(_o,{open:o,onClose:()=>l(!1)}),!p&&d.jsx(ZB,{open:n,onClose:()=>i(!1),onAdded:g=>{h(`Project registered: ${g.name}`),r.invalidateQueries({queryKey:["projects"]})}})]})}function die(){const r=ij().location.search.tab,n=go(),i=pa(),{data:o,isLoading:l,error:c,hasNextPage:h,fetchNextPage:f,isFetchingNextPage:p}=K6(),{data:y}=Jm(),{data:g}=yt(),[v,b]=S.useState(!1),[w,N]=S.useState(!1),[_,A]=S.useState(!1),[C,E]=S.useState(null),T=(g==null?void 0:g.read_only)===!0,R=p2.some(B=>B.id===r)?r:"runs",D=Wp((o==null?void 0:o.runs)??[]),M=D.filter(B=>B.on_remote===!0).length,U=(y==null?void 0:y.configured)===!0?ER(M,D.length,y.branch):void 0;async function k(){N(!0),E(null);try{const B=await LR();i.setQueryData(qc().queryKey,B),E(Yh(B)),Promise.all([i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["experiments"]}),i.invalidateQueries({queryKey:["compare"]}),i.invalidateQueries({queryKey:["targets"]}),i.invalidateQueries({queryKey:["remote-status",""]})]).catch(()=>{})}catch(B){E(Vh(B,y)),i.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{N(!1)}}S.useEffect(()=>{if((C==null?void 0:C.kind)!=="success")return;const B=window.setTimeout(()=>E(null),7e3);return()=>window.clearTimeout(B)},[C]);async function H(){A(!0),E(null);try{const B=await IR();i.setQueryData(qc().queryKey,B),E(Yh(B)),Promise.all([i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["experiments"]}),i.invalidateQueries({queryKey:["compare"]}),i.invalidateQueries({queryKey:["targets"]}),i.invalidateQueries({queryKey:["remote-status",""]})]).catch(()=>{})}catch(B){E(Vh(B,y)),i.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{A(!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"}),(g==null?void 0:g.project_name)&&d.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:g.project_name})]}),!T&&d.jsx("button",{type:"button",onClick:()=>b(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:flex-nowrap",children:p2.map(B=>d.jsx("button",{type:"button",onClick:()=>n({to:"/",search:{tab:B.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${R===B.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:B.label},B.id))})}),R==="runs"&&d.jsx(hie,{runs:D,isLoading:l,error:c,remoteStatus:y,syncInFlight:w,syncFeedback:C,onSyncRemote:k,onConfirmMerge:H,confirmMergeInFlight:_,projectName:g==null?void 0:g.project_name,onRemoteSummary:U,hasNextPage:h,isFetchingNextPage:p,onLoadMore:()=>void f(),readOnly:T}),R==="experiments"&&d.jsx(b5,{}),R==="analytics"&&d.jsx(fie,{readOnly:T}),R==="targets"&&d.jsx(w5,{}),!T&&d.jsx(_o,{open:v,onClose:()=>b(!1)})]})}function fie({readOnly:e}){const{data:t,isLoading:r,isError:n,error:i}=G6();return d.jsx(v5,{data:t,isLoading:r,isError:n,error:i,readOnly:e})}function hie({runs:e,isLoading:t,error:r,remoteStatus:n,syncInFlight:i,syncFeedback:o,onSyncRemote:l,onConfirmMerge:c,confirmMergeInFlight:h,projectName:f,onRemoteSummary:p,hasNextPage:y,isFetchingNextPage:g,onLoadMore:v,readOnly:b}){return t?d.jsx(qb,{}):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(mie,{}),d.jsx(j5,{remoteStatus:n,syncInFlight:i,onSync:l,projectName:f,syncFeedback:o,onRemoteSummary:p,onConfirmMerge:c,confirmMergeInFlight:h}),d.jsx(Xp,{runs:e,enableCombine:!b,remoteBranch:n==null?void 0:n.branch,hasNextPage:y,isFetchingNextPage:g,onLoadMore:v})]})}function mie(){const{data:e}=fj(),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 qb(){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 S5(e){return e==="finished"||e==="failed"}function pie(e,t){return t||!e?!1:!S5(e)}function yie(e,t,r,n){return t||n&&!S5(n)?!1:!!(e.some(i=>i.executionStatus==="execution_error")||r!==void 0&&e.length<r)}function gie(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 N5({results:e,runDir:t,suiteFilter:r,target:n,projectId:i,isReadOnly:o,plannedTestCount:l,runStatus:c}){const h=go(),[f,p]=S.useState(null),[y,g]=S.useState(null);if(!yie(e,o,l,c))return null;const v=!!t&&!!r,b=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)";async function w(N){if(!(!v||!t||!r)){p(N),g(null);try{const _=gie({mode:N,runDir:t,suiteFilter:r,target:n}),A=await zR(_,i);h(i?{to:"/projects/$projectId/jobs/$runId",params:{projectId:i,runId:A.id}}:{to:"/jobs/$runId",params:{runId:A.id}})}catch(_){g(_ instanceof Error?_.message:"Failed to launch resume"),p(null)}}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>w("resume"),disabled:!v||f!==null,title:v?"Skip already-completed tests, run the rest":b,className:"rounded-md bg-amber-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-500 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"resume-run-button",children:f==="resume"?"Resuming…":"↻ Resume run"}),d.jsx("button",{type:"button",onClick:()=>w("rerun"),disabled:!v||f!==null,title:v?"Re-run failed/errored tests, keep passing results":b,className:"rounded-md border border-amber-600/60 bg-transparent px-3 py-1.5 text-sm font-medium text-amber-300 hover:bg-amber-950/40 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"rerun-failed-button",children:f==="rerun"?"Re-running…":"Rerun failed cases"})]}),y&&d.jsx("p",{className:"text-xs text-red-400",children:y})]})}function _5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function O5(e){return typeof e=="string"&&e.trim().length>0?e.trim():void 0}function vie(e){const t=O5(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 xie(e){const t=O5(e.provider);return t===void 0||t.toLowerCase()==="phoenix"}function bie(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 jie(e){const t=e,r=_5(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,bie(r)]}function wie(e){for(const t of e)for(const r of jie(t)){if(!_5(r)||!xie(r))continue;const n=vie(r.ui_url??r.uiUrl??r.url??r.href);if(n)return n}}const E5=[{id:"all",label:"All"},{id:"passing",label:"Passing"},{id:"failing",label:"Failing"},{id:"errors",label:"Errors"},{id:"grader_errors",label:"Grader errors"},{id:"unreviewed",label:"Unreviewed"}],A5="all",C5="all";function $n(e){if(typeof e!="string")return;const t=e.trim();return t||void 0}function y2(e){return[...new Set([...e].filter(t=>t.trim().length>0))].sort((t,r)=>t.localeCompare(r))}function T5(e,t){return $n(e.name)??$n(e.type)??`Grader ${t+1}`}function P5(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=>P5(i,t)))??!1}function R5(e){if(!e||e.length===0)return[];const t=[];return e.forEach((r,n)=>{t.push(T5(r,n),r.type??"",r.verdict??"");for(const i of r.assertions??[])t.push(i.text,i.evidence??"");t.push(...R5(r.scores))}),t.filter(r=>r.length>0)}function Fb(e){return!e||e.length===0?[]:e.flatMap(t=>[...t.assertions??[],...Fb(t.scores)])}function Sie(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 Nie(e){const t=new Map;return e==null||e.forEach((r,n)=>{const i=T5(r,n);t.has(i)||t.set(i,r)}),t}function _ie(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 gx(e){return e.filter(t=>typeof t=="number"&&Number.isFinite(t))}function Ih(e){return e.trials??[]}function Oie(e,t){return e.verdict==="pass"?!0:e.verdict==="fail"?!1:typeof e.score=="number"?e.score>=t:!1}function Eie(e){return[e.metrics_path,e.timing_path,e.grading_path,e.transcript_path,e.answer_path].filter(Boolean).length}function Aie(e){const t=$n(e.model);if(t)return t;const r=e.metadata;if(r)return $n(r.model)??$n(r.model_name)??$n(r.target_model)??$n(r.provider_model)}function Cie(e){const t=$n(e.target)??"default",r=$n(e.targetUsed);return r&&r!==t?`${t} -> ${r}`:t}function Tie(e,t,r,n){var N;const i=VR(e),o=!i&&e.score>=r,l=i?"error":o?"passing":"failing",c=Nie(e.scores),h=[...c.keys()],f=((N=e.scores)==null?void 0:N.some(_=>P5(_,r)))??!1,p=Aie(e),y=Cie(e),g=$n(e.suite),v=$n(e.category),b=_ie(e),w=[e.testId,y,p??"",g??"",v??"",e.executionStatus??"",e.error??"",...R5(e.scores),...(e.assertions??[]).flatMap(_=>[_.text,_.evidence??""])];return{key:`${e.testId}:${e.target??""}:${e.timestamp??""}:${t}`,result:e,index:t,testId:e.testId,status:l,statusLabel:i?"Error":o?"Passing":"Failing",passing:o,executionError:i,graderError:f,reviewed:n.has(e.testId),targetLabel:y,...p&&{modelLabel:p},...g&&{suiteLabel:g},...v&&{categoryLabel:v},...b!==void 0&&{tokenTotal:b},graderNames:h,graderScores:c,searchText:w.join(" ").toLowerCase()}}function Pie(e,t){const r=Ih(e.result).filter(p=>p.run_path||p.verdict);if(r.length<=1)return;const n=r.filter(p=>Oie(p,t)).length,i=gx(r.map(p=>p.duration_ms)),o=gx(r.map(p=>p.score)),l=gx(r.map(p=>p.total_tool_calls)),c=r.reduce((p,y)=>p+Eie(y),0),h=Sie([...e.result.assertions??[],...Fb(e.result.scores),...r.flatMap(p=>[...p.assertions??[],...Fb(p.scores)])]),f=h.filter(p=>p.passed).length;return{row:e,trials:r,trialCount:r.length,passedTrials:n,failedTrials:r.length-n,passRate:r.length>0?n/r.length:0,meanScore:o.length>0?o.reduce((p,y)=>p+y,0)/o.length:e.result.score,assertionCount:h.length,passedAssertions:f,...h.length>0&&{assertionPassRate:f/h.length},...i.length>0&&{meanDurationMs:i.reduce((p,y)=>p+y,0)/i.length},...l.length>0&&{totalToolCalls:l.reduce((p,y)=>p+y,0)},artifactCount:c}}function Rie(e,t){const r=e.some(f=>Ih(f.result).length>1),n=e.some(f=>f.suiteLabel),i=e.some(f=>f.categoryLabel),o=e.some(f=>f.result.durationMs!=null||Ih(f.result).some(p=>p.duration_ms!=null)),l=e.some(f=>f.result.costUsd!=null||f.tokenTotal!=null||Ih(f.result).some(p=>p.cost_usd!=null||p.total_tokens!=null||p.token_usage!=null)),c=e.some(f=>f.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:"suite",label:"Suite",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}]:[],{id:"review",label:"Review",kind:"base",defaultVisible:!1},...c?[{id:"error",label:"Error",kind:"base",defaultVisible:!1}]:[],...t.map(f=>({id:`grader:${f}`,label:f,kind:"grader",defaultVisible:!0}))]}function Mie(e){return e==="scorer_errors"?"grader_errors":E5.some(t=>t.id===e)?e:"all"}function Die(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 kie(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 Lie(e,t,r,n){var p,y;const i=new Set(t.map(g=>g.id)),o=((p=e==null?void 0:e.visibleColumnIds)==null?void 0:p.map(g=>g.startsWith("scorer:")?`grader:${g.slice(7)}`:g).filter(g=>i.has(g)))??[],l=o.length>0?kie(o,t):Die(t),c=e!=null&&e.target&&r.includes(e.target)?e.target:A5,h=(e==null?void 0:e.grader)??(e==null?void 0:e.scorer),f=h&&n.includes(h)?h:C5;return{view:Mie(e==null?void 0:e.view),search:((y=e==null?void 0:e.search)==null?void 0:y.trim())??"",target:c,grader:f,visibleColumnIds:l}}function Iie(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"unreviewed":return!e.reviewed;case"all":return!0}}function $ie(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,unreviewed:e.filter(t=>!t.reviewed).length}}function zie(e){const t=new Set(e.reviewedTestIds??[]),r=e.results.map((v,b)=>Tie(v,b,e.passThreshold,t)),n=y2(r.map(v=>v.targetLabel)),i=y2(r.flatMap(v=>v.graderNames)),o=Rie(r,i),l=Lie(e.state,o,n,i),c=l.search.toLowerCase(),h=new Set(l.visibleColumnIds),f=r.filter(v=>!(!Iie(v,l.view)||l.target!==A5&&v.targetLabel!==l.target||l.grader!==C5&&!v.graderScores.has(l.grader)||c&&!v.searchText.includes(c))),p=r.map(v=>Pie(v,e.passThreshold)).filter(v=>!!v),y=new Set(f.map(v=>v.key)),g=p.filter(v=>y.has(v.row.key));return{rows:r,filteredRows:f,repeatGroups:p,filteredRepeatGroups:g,columns:o,visibleColumns:o.filter(v=>h.has(v.id)),state:l,targetOptions:n,graderOptions:i,viewCounts:$ie(r)}}function Bie(e){return e?`/api/projects/${encodeURIComponent(e)}/feedback`:"/api/feedback"}async function Uie(e,t,r){const n=await fetch(Bie(r),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:e,comment:t}]})});if(!n.ok)throw new Error(`Failed to save feedback: ${n.status}`);return n.json()}function qie({testId:e,projectId:t}){var y;const{data:r}=PR(t),n=pa(),i=(y=r==null?void 0:r.reviews)==null?void 0:y.find(g=>g.test_id===e),[o,l]=S.useState((i==null?void 0:i.comment)??""),[c,h]=S.useState(!1);S.useEffect(()=>{l((i==null?void 0:i.comment)??""),h(!1)},[i==null?void 0:i.comment]);const f=$x({mutationFn:()=>Uie(e,o,t),onSuccess:()=>{n.invalidateQueries({queryKey:["feedback",t??""]}),h(!0),setTimeout(()=>h(!1),2e3)}}),p=S.useCallback(()=>{f.mutate()},[f]);return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-400",children:"Feedback"}),d.jsx("textarea",{value:o,onChange:g=>{l(g.target.value),h(!1)},placeholder:"Add feedback for this test...",className:"w-full rounded-md border border-gray-700 bg-gray-800 p-3 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-400 focus:outline-none",rows:3}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:p,disabled:f.isPending,className:"rounded-md bg-cyan-600 px-4 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:f.isPending?"Saving...":"Save Feedback"}),c&&d.jsx("span",{className:"text-sm text-emerald-400",children:"Saved"}),f.isError&&d.jsx("span",{className:"text-sm text-red-400",children:"Error saving feedback"})]})]})}function Fie(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 Hie(e){if(e.type==="file")return e.storage==="git"&&e.ref?e.ref:e.storage&&e.storage!=="local"?e.storage:void 0}function M5(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),r.children&&t.push(...M5(r.children)));return t}function D5({node:e,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o=0}){const l=e.type==="dir",c=n.has(e.path),h=t===e.path,f=Hie(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 ${h?"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?"📂":"📁":Fie(e.name)}),d.jsx("span",{className:"truncate",children:e.name}),f&&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(`
|
|
118
|
-
`),children:f})]}),l&&c&&e.children&&d.jsx("div",{children:e.children.map(p=>d.jsx(D5,{node:p,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:o+1},p.path))})]})}function Kie({files:e,selectedPath:t,onSelect:r}){const[n,i]=S.useState(()=>new Set(M5(e))),o=l=>{i(c=>{const h=new Set(c);return h.has(l)?h.delete(l):h.add(l),h})};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(D5,{node:l,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:o},l.path))]})}const Gie="modulepreload",Yie=function(e){return"/"+e},g2={},Vie=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let l=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),h=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=l(r.map(f=>{if(f=Yie(f),f in g2)return;g2[f]=!0;const p=f.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${y}`))return;const g=document.createElement("link");if(g.rel=p?"stylesheet":Gie,p||(g.as="script"),g.crossOrigin="",g.href=f,h&&g.setAttribute("nonce",h),document.head.appendChild(g),p)return new Promise((v,b)=>{g.addEventListener("load",v),g.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${f}`)))})}))}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)})},Qie=S.lazy(()=>Vie(()=>import("./index-D5_8DE_B.js"),[]));function Xie({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(Qie,{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 nu({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 Wie={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 Ld(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Zie(e){return!Ld(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 k5(e){const t=[],r=e.split(/\r?\n/);for(let n=0;n<r.length;n+=1){const i=r[n].trim();if(i)try{const o=JSON.parse(i);if(!Zie(o))return{entries:t,error:`Line ${n+1} is not a transcript JSONL row.`};t.push(o)}catch(o){return{entries:t,error:`Line ${n+1} is invalid JSON: ${o.message}`}}}return{entries:t}}function Zp(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function Jie(e){if(typeof e=="number")return`$${e.toFixed(4)}`}function nS(e){if(!e)return;const t=[];return typeof e.input=="number"&&t.push(`${e.input} in`),typeof e.output=="number"&&t.push(`${e.output} out`),typeof e.reasoning=="number"&&t.push(`${e.reasoning} reasoning`),typeof e.cached=="number"&&t.push(`${e.cached} cached`),t.length>0?t.join(" / "):void 0}function L5(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function ese(e){if(Array.isArray(e)){const t=e.map(r=>{if(Ld(r)&&r.type==="text"&&typeof r.text=="string")return r.text}).filter(r=>r!==void 0);if(t.length===e.length&&t.length>0)return t.join(`
|
|
119
|
-
`)}return L5(e)}function Ym(e,t){for(const r of t){const n=e[r];if(typeof n=="string"&&n.trim())return n}}function Hb(e,t){for(const r of t)if(e[r]!==void 0)return e[r]}function I5(e,t){const r=e[t];return Ld(r)?r:void 0}function tse(e,t){const r=I5(e,"function");return Ym(e,["tool","name","tool_name"])??(r?Ym(r,["name"]):void 0)??`Tool ${t+1}`}function rse(e){const t=I5(e,"function");return Hb(e,["input","arguments","args","parameters"])??(t?Hb(t,["arguments"]):void 0)}function nse(e){return Hb(e,["output","result","content"])}function ase(e){return e!=null&&!(typeof e=="string"&&e.length===0)}function qs({label:e,value:t,tone:r="default"}){return ase(t)?d.jsxs("div",{className:"space-y-1",children:[d.jsx("div",{className:r==="error"?"text-xs font-medium text-red-300":"text-xs font-medium text-gray-400",children:e}),d.jsx("pre",{className:"max-h-80 overflow-auto rounded-md border border-gray-800 bg-gray-950 p-3 text-xs text-gray-200",children:d.jsx("code",{children:L5(t)})})]}):null}function Br({children:e}){return d.jsx("span",{className:"rounded-md border border-gray-800 bg-gray-950 px-2 py-0.5 text-xs text-gray-400",children:e})}function vx({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 v2({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 ise({call:e,index:t}){const r=tse(e,t),n=Ym(e,["id","call_id","tool_call_id"]),i=Ym(e,["status"]),o=typeof e.duration_ms=="number"?Zp(e.duration_ms):void 0,l=Ld(e.metadata)?e.metadata:void 0;return d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-950/80 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-gray-200",children:[d.jsx("span",{children:"Tool call"}),d.jsx("span",{className:"ml-2 rounded-md border border-amber-900/60 bg-amber-950/30 px-2 py-0.5 text-xs text-amber-300",children:r}),i&&d.jsx("span",{className:"ml-2 text-xs text-gray-500",children:i}),o&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:o})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&d.jsxs(Br,{children:["id: ",n]}),o&&d.jsxs(Br,{children:["duration: ",o]}),i&&d.jsxs(Br,{children:["status: ",i]})]}),d.jsx(qs,{label:"Arguments",value:rse(e)}),d.jsx(qs,{label:"Result",value:nse(e)}),d.jsx(qs,{label:"Error",value:e.error,tone:"error"}),d.jsx(qs,{label:"Metadata",value:l})]})]})}function sse({line:e}){const t=Zp(e.duration_ms),r=nS(e.token_usage);return d.jsxs("details",{className:"rounded-md border border-amber-900/50 bg-gray-950/60 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-amber-300",children:[e.name?`Tool result · ${e.name}`:"Tool result",t&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:t})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.name&&d.jsxs(Br,{children:["name: ",e.name]}),t&&d.jsxs(Br,{children:["duration: ",t]}),r&&d.jsxs(Br,{children:["tokens: ",r]})]}),d.jsx(qs,{label:"Result",value:e.content}),d.jsx(qs,{label:"Metadata",value:e.metadata})]})]})}function ose({line:e,ordinal:t}){const r=Wie[e.role]??{container:"border-gray-800 bg-gray-900",badge:"border-gray-700 bg-gray-800 text-gray-300",label:e.role,accent:"text-gray-300"},n=ese(e.content),i=Zp(e.duration_ms),o=nS(e.token_usage),l=Array.isArray(e.tool_calls)?e.tool_calls.filter(Ld):[];return d.jsxs("article",{className:`rounded-lg border p-4 ${r.container}`,children:[d.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx("span",{className:`rounded-md border px-2 py-0.5 text-xs font-medium ${r.badge}`,children:r.label}),e.name&&d.jsx("span",{className:`truncate text-sm font-medium ${r.accent}`,children:e.name})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-gray-500",children:[d.jsxs("span",{className:"tabular-nums",children:["#",t+1]}),e.start_time&&d.jsx("span",{children:e.start_time}),i&&d.jsx("span",{className:"tabular-nums",children:i}),o&&d.jsx("span",{children:o})]})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[e.role==="tool"||e.role==="function"?d.jsx(sse,{line:e}):n.trim().length>0?d.jsx("pre",{className:"whitespace-pre-wrap break-words text-sm leading-6 text-gray-200",children:n}):d.jsx("p",{className:"text-sm text-gray-500",children:"No message content recorded."}),l.length>0&&d.jsx("div",{className:"space-y-2",children:l.map((c,h)=>d.jsx(ise,{call:c,index:h},`${e.message_index}-${h}`))}),e.metadata&&e.role!=="tool"&&e.role!=="function"&&d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-950/60 p-3",children:[d.jsx("summary",{className:"cursor-pointer text-xs font-medium text-gray-400",children:"Message metadata"}),d.jsx("div",{className:"mt-3",children:d.jsx(qs,{label:"Metadata",value:e.metadata})})]})]})]})}function lse({entries:e,transcriptPath:t}){var f,p,y;const r=e[0],n=(f=r==null?void 0:r.source)==null?void 0:f.provider,i=(p=r==null?void 0:r.source)==null?void 0:p.model,o=(y=r==null?void 0:r.source)==null?void 0:y.session_id,l=Zp(r==null?void 0:r.transcript_duration_ms),c=nS(r==null?void 0:r.transcript_token_usage),h=Jie(r==null?void 0:r.transcript_cost_usd);return d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsxs(Br,{children:[e.length," messages"]}),n&&d.jsxs(Br,{children:["provider: ",n]}),i&&d.jsxs(Br,{children:["model: ",i]}),o&&d.jsxs(Br,{children:["session: ",o]}),l&&d.jsxs(Br,{children:["duration: ",l]}),c&&d.jsxs(Br,{children:["tokens: ",c]}),h&&d.jsxs(Br,{children:["cost: ",h]}),t&&d.jsx(Br,{children:t})]})}function $5({entries:e,finalAnswer:t,answerPath:r,transcriptPath:n,answerHref:i,transcriptHref:o,transcriptDownloadHref:l,onOpenFile:c}){const h=[...e].sort((p,y)=>p.message_index-y.message_index),f=!!r;return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("section",{className:"rounded-lg border border-emerald-900/50 bg-emerald-950/20 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-sm font-medium text-emerald-300",children:"Final answer"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Highlighted from canonical ",d.jsx("code",{children:"outputs/answer.md"}),"; transcript context stays below."]})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(v2,{path:r,onOpenFile:c,children:"Open answer.md in Files"}),d.jsx(vx,{href:i,children:"Open answer.md"})]})]}),f?d.jsx("pre",{className:"mt-3 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-md border border-emerald-900/40 bg-gray-950/80 p-3 text-sm leading-6 text-gray-100",children:t&&t.trim().length>0?t:"answer.md is empty."}):d.jsxs("p",{className:"mt-3 rounded-md border border-gray-800 bg-gray-950/60 p-3 text-sm text-gray-400",children:["No canonical ",d.jsx("code",{children:"outputs/answer.md"})," artifact was found. The transcript viewer does not fall back to ",d.jsx("code",{children:"response.md"}),"."]})]}),d.jsx("section",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Transcript timeline"}),d.jsx(lse,{entries:h,transcriptPath:n})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(v2,{path:n,onOpenFile:c,children:"Open raw JSONL in Files"}),d.jsx(vx,{href:o,children:"Open raw JSONL"}),d.jsx(vx,{href:l,download:!0,children:"Download JSONL"})]})]})}),d.jsx("div",{className:"space-y-3",children:h.map((p,y)=>d.jsx(ose,{line:p,ordinal:y},`${p.message_index}-${p.role}-${y}`))})]})}function z5(e){for(const t of e){if(t.type==="file")return t.path;if(t.children){const r=z5(t.children);if(r)return r}}return null}function aS(e,t=0){return e.run_path??`run-${e.attempt??t+1}`}function use(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 Dc(e){return e==null||!Number.isFinite(e)?"-":`${Math.round(e*100)}%`}function B5(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 cse(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function dse(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function fse(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 iS({eval:e,runId:t,projectId:r,repeatGroup:n,selectedTrial:i=null,initialTab:o="checks",initialSelectedFilePath:l=null,onSelectTrial:c}){const[h,f]=S.useState(o),[p,y]=S.useState(l),{data:g}=yt(r),v=(g==null?void 0:g.read_only)===!0,b=i?fse(e,i):e,w=n!=null&&i==null;S.useEffect(()=>{f(o),y(l)},[o,l]);const N=[{id:"checks",label:"Checks"},{id:"transcript",label:"Transcript"},{id:"source",label:"Source"},{id:"files",label:"Files"},...v?[]:[{id:"feedback",label:"Feedback"}]],_=A=>{y(A),f("files")};return d.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex gap-1 px-4",children:N.map(A=>d.jsx("button",{type:"button",onClick:()=>f(A.id),className:`px-4 py-2 text-sm font-medium transition-colors ${h===A.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:A.label},A.id))})}),d.jsxs("div",{className:"min-h-0 flex-1 overflow-hidden",children:[h==="checks"&&d.jsx("div",{className:"overflow-auto p-4",children:w?d.jsx(gse,{result:e,group:n,onSelectTrial:c}):i?d.jsx(xse,{result:b,trial:i,runId:t,projectId:r,onOpenFile:_}):d.jsx(q5,{result:b,projectId:r})}),h==="files"&&d.jsx("div",{className:"h-full min-h-0 p-4",children:d.jsx(Sse,{result:b,runId:t,projectId:r,selectedPath:p,onSelectedPathChange:y})}),h==="transcript"&&d.jsx("div",{className:"overflow-auto p-4",children:w?d.jsx(bse,{result:e,group:n,runId:t,projectId:r,onSelectTrial:c}):i?d.jsx(jse,{result:b,trial:i,runId:t,projectId:r,onOpenFile:_}):d.jsx(wse,{result:b,runId:t,projectId:r,onOpenFile:_})}),h==="source"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(pse,{result:b})}),!v&&h==="feedback"&&d.jsx("div",{className:"p-4",children:d.jsx(qie,{testId:b.testId,projectId:r})})]})]})}function hse(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 Nn({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 U5({file:e}){var r,n;const t=hse(e.size_bytes);return d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(Nn,{label:"Path",value:e.display_path}),d.jsx(Nn,{label:"SHA-256",value:e.content_sha256}),d.jsx(Nn,{label:"Size",value:t}),d.jsx(Nn,{label:"Omitted",value:((r=e.omitted)==null?void 0:r.message)??((n=e.omitted)==null?void 0:n.reason)})]})}function kc({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 mse({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(U5,{file:e}),e.command&&e.command.length>0&&d.jsx(kc,{value:JSON.stringify(e.command,null,2),language:"json"}),e.content&&d.jsx(kc,{value:e.content})]})]})}function pse({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(Nn,{label:"Eval file",value:(r=t.eval_file)==null?void 0:r.display_path}),d.jsx(Nn,{label:"Test ID",value:t.test_id??e.testId}),d.jsx(Nn,{label:"Suite",value:e.suite}),d.jsx(Nn,{label:"Category",value:e.category}),d.jsx(Nn,{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(kc,{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(U5,{file:t.eval_file}),d.jsx(kc,{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(Nn,{label:"Weight",value:o.weight}),d.jsx(Nn,{label:"Required",value:o.required}),d.jsx(Nn,{label:"Min score",value:o.min_score})]}),d.jsx(kc,{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(mse,{file:o},`${o.kind}-${o.display_path}-${o.grader_name??""}-${l}`))})]})]})}function Kb({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 q5({result:e,projectId:t}){const{data:r}=yt(t),n=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,i=!io(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??[],h=[];e.error&&h.push(e.error),(e.executionStatus==="error"||e.executionStatus==="failed")&&h.push(`Execution status: ${e.executionStatus}`);const f=l?o.flatMap(p=>p.assertions):c;for(const p of f.filter(y=>!y.passed)){const y=p.evidence?`${p.text}: ${p.evidence}`:p.text;h.push(y)}if(e.scores){for(const p of e.scores)if(!io(p.score,n)&&p.details){const y=typeof p.details=="string"?p.details:JSON.stringify(p.details,null,2);h.push(`[${p.name??p.type??"evaluator"}] ${y}`)}}return d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),d.jsx("div",{className:"flex-1",children:d.jsx(nu,{score:e.score})})]})}),e.scores&&e.scores.length>0&&d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-400",children:"Grader Scores"}),d.jsx("div",{className:"space-y-3",children:e.scores.map((p,y)=>d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"w-40 truncate text-sm text-gray-300",children:p.name??p.type??`Score ${y+1}`}),d.jsx("div",{className:"flex-1",children:d.jsx(nu,{score:p.score})})]},`${p.name??p.type??y}`))})]}),l?d.jsx("div",{className:"space-y-6",children:o.map((p,y)=>{const g=p.name??p.type??`Grader ${y+1}`;return d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:g}),p.assertions.map((v,b)=>d.jsx(Kb,{assertion:v},`${v.text}-${b}`))]},`${p.name??p.type??y}`)})}):c.length>0?d.jsx("div",{className:"space-y-2",children:c.map((p,y)=>d.jsx(Kb,{assertion:p},`${p.text}-${y}`))}):d.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),i&&h.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:h.map(p=>d.jsx("p",{className:"text-sm text-gray-300",children:p},p))})]})]})}function aa({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 yse({trial:e,index:t,onSelectTrial:r}){const n=aS(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.jsx("div",{className:"font-medium text-gray-200",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:[Dc(e.score)," score"]}),d.jsx("span",{children:e.verdict??"unknown"}),e.duration_ms!=null?d.jsx("span",{children:B5(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 gse({result:e,group:t,onSelectTrial:r}){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:"grid gap-3 md:grid-cols-4",children:[d.jsx(aa,{label:"Run success",value:Dc(t.passRate)}),d.jsx(aa,{label:"Mean score",value:Dc(t.meanScore)}),d.jsx(aa,{label:"Passed runs",value:`${t.passedTrials}/${t.trialCount}`}),d.jsx(aa,{label:"Assertions",value:Dc(t.assertionPassRate)})]})}),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(nu,{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:"Runs"}),t.trials.map((n,i)=>d.jsx(yse,{trial:n,index:i,onSelectTrial:r},aS(n,i)))]})]})}function vse(e){if(!e)return null;try{const t=JSON.parse(e),n=(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 xse({result:e,trial:t,runId:r,projectId:n,onOpenFile:i}){const o=t.grading_path,l=e.artifact_dir,c=e.testId,{data:h,isLoading:f}=n&&o?qe(Xh(n,r,c,o,l)):Qh(r,c,o??"",l),p=vse(h==null?void 0:h.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:"Run score"}),d.jsx("div",{className:"flex-1",children:d.jsx(nu,{score:e.score})})]})}),d.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[d.jsx(aa,{label:"Duration",value:B5(t.duration_ms)}),d.jsx(aa,{label:"Cost",value:cse(t.cost_usd)}),d.jsx(aa,{label:"Tokens",value:dse(use(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"})]}),f?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(aa,{label:"Assertion pass rate",value:Dc(p.summary.pass_rate)}),d.jsx(aa,{label:"Passed",value:String(p.summary.passed??0)}),d.jsx(aa,{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((y,g)=>d.jsx(Kb,{assertion:y},`${y.text}-${g}`))}):f?null:d.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded in grading.json."})]}):d.jsx(q5,{result:e,projectId:n})}function F5(e,t){if(!t)return!1;for(const r of e)if(r.type==="file"&&r.path===t||r.children&&F5(r.children,t))return!0;return!1}function bse({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:"Run transcripts"}),t.trials.map((o,l)=>{const c=aS(o,l),h=o.transcript_path,f=h?ia({projectId:n,runId:r,evalId:e.testId,filePath:h,artifactDir:e.artifact_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.jsx("div",{className:"font-medium text-gray-200",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"}),f?d.jsx("a",{href:f,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 jse({result:e,trial:t,runId:r,projectId:n,onOpenFile:i}){const o=e.testId,l=e.artifact_dir,c=t.transcript_path,h=t.answer_path,{data:f,isLoading:p}=n&&c?qe(Xh(n,r,o,c,l)):Qh(r,o,c??"",l),{data:y}=n&&h?qe(Xh(n,r,o,h,l)):Qh(r,o,h??"",l),g=(f==null?void 0:f.content)??"",v=S.useMemo(()=>k5(g),[g]);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 run 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(v.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:v.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(v.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=h?ia({projectId:n,runId:r,evalId:o,filePath:h,artifactDir:l,raw:!0}):void 0,w=ia({projectId:n,runId:r,evalId:o,filePath:c,artifactDir:l,raw:!0}),N=ia({projectId:n,runId:r,evalId:o,filePath:c,artifactDir:l,download:!0});return d.jsx($5,{entries:v.entries,finalAnswer:h?(y==null?void 0:y.content)??e.output:void 0,answerPath:h,transcriptPath:c,answerHref:b,transcriptHref:w,transcriptDownloadHref:N,onOpenFile:i})}function wse({result:e,runId:t,projectId:r,onOpenFile:n}){const i=e.testId,o=e.artifact_dir,{data:l,isLoading:c,error:h}=r?qe(aB(r,t,i,o)):V6(t,i,o),f=l==null?void 0:l.transcript_path,p=l==null?void 0:l.answer_path,y=(l==null?void 0:l.status)==="ok"?l.content??"":"",g=S.useMemo(()=>k5(y),[y]);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(h)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:h.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.jsonl. 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."}),f?d.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:f}):null,l.pointer?d.jsx("p",{className:"mt-2 font-mono text-xs text-gray-500",children:l.pointer}):null]});if(g.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:g.error}),d.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:f?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>n(f),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open raw JSONL in Files"}),d.jsx("a",{href:ia({projectId:r,runId:t,evalId:i,filePath:f,artifactDir: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(g.entries.length===0)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[d.jsx("code",{children:f})," exists but contains no JSONL rows."]})]});const v=p?ia({projectId:r,runId:t,evalId:i,filePath:p,artifactDir:o,raw:!0}):void 0,b=f?ia({projectId:r,runId:t,evalId:i,filePath:f,artifactDir:o,raw:!0}):void 0,w=f?ia({projectId:r,runId:t,evalId:i,filePath:f,artifactDir:o,download:!0}):void 0;return d.jsx($5,{entries:g.entries,finalAnswer:p?l.answer_content??e.output:void 0,answerPath:p,transcriptPath:f,answerHref:v,transcriptHref:b,transcriptDownloadHref:w,onOpenFile:n})}function Sse({result:e,runId:t,projectId:r,selectedPath:n,onSelectedPathChange:i}){const o=e.testId,l=e.artifact_dir,{data:c}=r?qe(nB(r,t,o,l)):Y6(t,o,l),h=(c==null?void 0:c.files)??[],[f,p]=S.useState(null),[y,g]=S.useState(!1),v=n??f,b=F5(h,v)?v:h.length>0?z5(h):null,{data:w,isLoading:N}=r?qe(Xh(r,t,o,b??"",l)):Qh(t,o,b??"",l);if(h.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)??"":"",A=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:`${y?"block":"hidden"} min-h-0 w-full overflow-auto md:block md:w-auto`,children:d.jsx(Kie,{files:h,selectedPath:b,onSelect:C=>{p(C),i(C),g(!1)}})}),d.jsx("div",{className:`${y?"hidden":"block"} h-full min-h-0 min-w-0 flex-1 overflow-hidden md:block`,children:d.jsx(Xie,{value:_,language:A,height:"100%"})}),d.jsx("button",{type:"button",onClick:()=>g(!y),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":y?"Switch to file content viewer":"Switch to file tree",children:y?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 Ct={view:"results_view",search:"results_q",target:"results_target",grader:"results_grader",legacyScorer:"results_scorer",columns:"results_cols",detail:"results_detail"},Nse="✓",_se="✗";function xx(){var t;if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return{view:e.get(Ct.view)??void 0,search:e.get(Ct.search)??void 0,target:e.get(Ct.target)??void 0,grader:e.get(Ct.grader)??e.get(Ct.legacyScorer)??void 0,visibleColumnIds:((t=e.get(Ct.columns))==null?void 0:t.split(",").map(r=>r.trim()).filter(Boolean))??void 0}}function Ose(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e.view==="all"?t.delete(Ct.view):t.set(Ct.view,e.view),e.search?t.set(Ct.search,e.search):t.delete(Ct.search),e.target==="all"?t.delete(Ct.target):t.set(Ct.target,e.target),t.delete(Ct.legacyScorer),e.grader==="all"?t.delete(Ct.grader):t.set(Ct.grader,e.grader),e.visibleColumnIds.length>0?t.set(Ct.columns,e.visibleColumnIds.join(",")):t.delete(Ct.columns);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function x2(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(Ct.detail)}function _h(e){if(typeof window>"u")return;const t=new URLSearchParams(window.location.search);e?t.set(Ct.detail,e):t.delete(Ct.detail);const r=t.toString(),n=`${window.location.pathname}${r?`?${r}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",n)}function $h(e){return`${Math.round(e*100)}%`}function sS(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 H5(e){if(e!=null)return e===0?"$0":e<.01?`$${e.toFixed(5)}`:`$${e.toFixed(4)}`}function K5(e){if(e!=null)return e>=1e6?`${(e/1e6).toFixed(1)}M tok`:e>=1e3?`${(e/1e3).toFixed(1)}k tok`:`${e} tok`}function Ese(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 G5(e){return e.total_tokens??Ese(e.token_usage)}function Vm(e,t=0){return e.run_path??`run-${e.attempt??t+1}`}function Ase(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 Cse(e){return e>=.8?"text-emerald-300":e>=.5?"text-yellow-300":"text-red-300"}function Y5(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(Y5))??!1}function oS({results:e,runId:t,projectId:r,passThreshold:n,title:i="Results",emptyMessage:o}){const[l,c]=S.useState(()=>xx()),[h,f]=S.useState(()=>x2()),[p,y]=S.useState(null),[g,v]=S.useState(null),[b,w]=S.useState("checks"),[N,_]=S.useState(()=>new Set),{data:A}=PR(r),C=S.useMemo(()=>(A==null?void 0:A.reviews.map(L=>L.test_id))??[],[A==null?void 0:A.reviews]),E=S.useMemo(()=>zie({results:e,passThreshold:n,reviewedTestIds:C,state:l}),[n,e,C,l]),T=new Set(E.state.visibleColumnIds),R=h!=null?E.filteredRows.find(L=>L.key===h)??null:null,D=S.useMemo(()=>new Map(E.repeatGroups.map(L=>[L.row.key,L])),[E.repeatGroups]),M=R?D.get(R.key):void 0,U=M&&p?M.trials.find((L,W)=>Vm(L,W)===p)??null:null;S.useEffect(()=>{const L=()=>{c(xx()),f(x2()),y(null),v(null),w("checks")};return window.addEventListener("popstate",L),()=>window.removeEventListener("popstate",L)},[]),S.useEffect(()=>{!h||R||(_h(null),f(null))},[R,h]);function k(L){const W={...E.state,...L};Ose(W),c(xx())}function H(){if(typeof window>"u")return;const L=new URLSearchParams(window.location.search);for(const se of Object.values(Ct))L.delete(se);const W=L.toString(),te=`${window.location.pathname}${W?`?${W}`:""}${window.location.hash}`;window.history.replaceState(window.history.state,"",te),c({}),f(null),y(null),v(null),w("checks")}function B(L){const W=new Set(E.state.visibleColumnIds);W.has(L)?W.delete(L):W.add(L),k({visibleColumnIds:[...W]})}function ae(L){_h(L),f(L),y(null),v(null),w("checks")}function ee(L,W,te="checks"){_h(L),f(L),y(Vm(W)),w(te),v(Rse(W))}function ne(){_h(null),f(null),y(null),v(null),w("checks")}function $(L){_(W=>{const te=new Set(W);return te.has(L)?te.delete(L):te.add(L),te})}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:E5.map(L=>d.jsxs("button",{type:"button",onClick:()=>k({view:L.id}),className:`inline-flex items-center gap-2 rounded-md border px-2.5 py-1.5 text-sm transition-colors ${E.state.view===L.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:L.label}),d.jsx("span",{className:"tabular-nums text-xs text-gray-500",children:E.viewCounts[L.id]})]},L.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:L=>k({search:L.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:L=>k({target:L.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(L=>d.jsx("option",{value:L,children:L},L))]})]}),d.jsxs("label",{children:[d.jsx("span",{className:"sr-only",children:"Filter by grader"}),d.jsxs("select",{value:E.state.grader,onChange:L=>k({grader:L.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(L=>d.jsx("option",{value:L,children:L},L))]})]}),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(L=>d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-300",children:[d.jsx("input",{type:"checkbox",checked:T.has(L.id),onChange:()=>B(L.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:L.label,children:L.label})]},L.id))})]})]}),d.jsx("button",{type:"button",onClick:H,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:R?"grid min-w-0 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(Tse,{rows:E.filteredRows,visibleColumns:E.visibleColumns,passThreshold:n,selectedRowKey:h,selectedTrialPath:p,repeatGroupsByRowKey:D,collapsedRepeatRows:N,onToggleRepeatGroup:$,onOpenDetail:ae,onOpenTrialDetail:ee})}),R&&d.jsx(Hse,{row:R,runId:t,projectId:r,repeatGroup:M,selectedTrial:U,selectedTrialPath:p,initialTab:b,initialFilePath:g,onOpenTrialDetail:(L,W)=>ee(R.key,L,W),onClose:ne})]})]})}function Tse({rows:e,visibleColumns:t,passThreshold:r,selectedRowKey:n,selectedTrialPath:i,repeatGroupsByRowKey:o,collapsedRepeatRows:l,onToggleRepeatGroup:c,onOpenDetail:h,onOpenTrialDetail:f}){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:`${Bse(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:Use(p.id),title:p.label,children:d.jsx("span",{className:zse(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 y=o.get(p.key),g=n===p.key&&!i,v=y?l.has(p.key):!0;return d.jsxs(S.Fragment,{children:[d.jsx("tr",{className:`cursor-pointer transition-colors ${g?"bg-cyan-950/20":"hover:bg-gray-900/30"}`,onClick:()=>h(p.key),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),h(p.key))},tabIndex:0,"aria-selected":g,children:t.map(b=>d.jsx("td",{className:b2(b.id,"py-3"),children:d.jsx(qse,{column:b,row:p,repeatGroup:y,repeatCollapsed:v,passThreshold:r,isSelected:g,onToggleRepeatGroup:c})},`${p.key}:${b.id}`))}),y&&!v?y.trials.map((b,w)=>{const N=Vm(b,w),_=n===p.key&&i===N;return d.jsx("tr",{className:`cursor-pointer bg-gray-950/40 transition-colors ${_?"bg-cyan-950/20":"hover:bg-gray-900/50"}`,onClick:()=>f(p.key,b),onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.preventDefault(),f(p.key,b))},tabIndex:0,"aria-selected":_,children:t.map(A=>d.jsx("td",{className:b2(A.id,"py-2"),children:d.jsx(Mse,{column:A,row:p,trial:b,index:w,passThreshold:r})},`${p.key}:${N}:${A.id}`))},`${p.key}:${N}`)}):null]},p.key)})})]})})}function Pse(e,t){return e.verdict==="pass"?!0:e.verdict==="fail"?!1:typeof e.score=="number"?e.score>=t:!1}function Rse(e){return e.grading_path??e.metrics_path??e.timing_path??e.transcript_path??e.answer_path??null}function Mse({column:e,row:t,trial:r,index:n,passThreshold:i}){const o=Pse(r,i),l=r.execution_status==="execution_error",c=l?"error":o?"passing":"failing",h=l?"Error":o?"Passing":"Failing",f=Vm(r,n);switch(e.id){case"status":return d.jsx(lS,{status:c,label:h});case"expander":return d.jsx("span",{"aria-hidden":"true",className:"block h-5"});case"test":return d.jsx(Dse,{label:f,trial:r});case"target":return d.jsx(Q5,{target:t.targetLabel,tone:"text-gray-500"});case"score":return d.jsx(an,{rate:r.score??0});case"suite":return d.jsx(Cl,{value:t.suiteLabel,tone:"text-gray-500"});case"category":return d.jsx(Cl,{value:t.categoryLabel,tone:"text-gray-500"});case"duration":return d.jsx("span",{className:"text-gray-500",children:sS(r.duration_ms)});case"cost_tokens":return d.jsx(Qse,{trial:r});case"review":return d.jsx("span",{className:"text-gray-700",children:"-"});case"error":return d.jsx(Cl,{value:r.error,tone:"text-red-300"});default:return d.jsx("span",{className:"text-gray-700",children:"-"})}}function Dse({label:e,trial:t}){return d.jsxs("div",{className:"max-w-[24rem] min-w-0 pl-6",children:[d.jsx("div",{className:"truncate font-medium text-gray-300",title:e,children:e}),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:t.total_tool_calls!=null?d.jsxs("span",{children:[t.total_tool_calls," tool calls"]}):null}),t.error?d.jsx("div",{className:"mt-0.5 truncate text-xs text-red-300",title:t.error,children:t.error}):null]})}function lS({status:e,label:t}){const r=e==="passing",n=e==="error"||e==="partial",i=r?Nse:_se,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 kse({group:e,passThreshold:t}){const n=e.passRate>=t?"passing":e.passedTrials>0?"partial":"failing";return d.jsx(lS,{status:n,label:`${e.passedTrials}/${e.trialCount} runs passed`})}function Lse({group:e}){const t=[`${e.trialCount} runs`,`${$h(e.passRate)} run success`,`${$h(e.meanScore)} mean score`,e.assertionPassRate!=null?`${$h(e.assertionPassRate)} assertions (${e.passedAssertions}/${e.assertionCount})`:void 0,e.totalToolCalls!=null?`${e.totalToolCalls} tool calls`:void 0,e.artifactCount>0?`${e.artifactCount} artifacts`:void 0].filter(r=>!!r);return d.jsx("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:t.join(" · "),children:t.join(" · ")})}function Ise({group:e}){return d.jsx(an,{rate:e.meanScore})}function $se({group:e,row:t}){return d.jsx("span",{className:"text-gray-400",children:sS(e.meanDurationMs??t.result.durationMs)})}function V5(e){return["duration","cost_tokens"].includes(e)||e.startsWith("grader:")}function Jp(e){return e==="status"||e==="expander"}function zse(e){return Jp(e)}function Bse(e){const t=e.reduce((r,n)=>r+(Jp(n.id)?44:136),0);return Math.max(760,t)}function Use(e){return Jp(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 ${V5(e)?"text-right":""}`}function b2(e,t){return Jp(e)?`w-11 min-w-11 max-w-11 px-2 ${t} text-center align-middle`:`px-4 ${t} align-middle ${V5(e)?"text-right tabular-nums":""}`}function qse({column:e,row:t,repeatGroup:r,repeatCollapsed:n,passThreshold:i,isSelected:o,onToggleRepeatGroup:l}){if(e.id.startsWith("grader:")){const c=e.id.slice(7);return d.jsx(Xse,{score:t.graderScores.get(c),passThreshold:i})}switch(e.id){case"status":return r?d.jsx(kse,{group:r,passThreshold:i}):d.jsx(lS,{status:t.status,label:t.statusLabel});case"expander":return r?d.jsx(Kse,{row:t,repeatCollapsed:n,onToggleRepeatGroup:l}):d.jsx("span",{"aria-hidden":"true",className:"block h-5"});case"test":return d.jsx(Fse,{row:t,repeatGroup:r,isSelected:o});case"target":return d.jsx(Q5,{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(Ise,{group:r}):d.jsx(an,{rate:t.result.score});case"suite":return d.jsx(Cl,{value:t.suiteLabel});case"category":return d.jsx(Cl,{value:t.categoryLabel});case"duration":return r?d.jsx($se,{group:r,row:t}):d.jsx("span",{className:"text-gray-400",children:sS(t.result.durationMs)});case"cost_tokens":return d.jsx(Vse,{row:t,repeatGroup:r});case"review":return d.jsx("span",{className:t.reviewed?"text-emerald-300":"text-gray-500",children:t.reviewed?"Reviewed":"Unreviewed"});case"error":return d.jsx(Cl,{value:t.result.error,tone:"text-red-300"});default:return d.jsx("span",{className:"text-gray-600",children:"-"})}}function Fse({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(Lse,{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 Hse({row:e,runId:t,projectId:r,repeatGroup:n,selectedTrial:i,selectedTrialPath:o,initialTab:l,initialFilePath:c,onOpenTrialDetail:h,onClose:f}){const p=Gse({projectId:r,runId:t,evalId:e.testId,artifactDir:e.result.artifact_dir}),y=o?`${e.testId} · ${o}`:e.testId,g=n&&!i,v=`${e.key}:${o??""}:${l}`;return d.jsxs("aside",{ref:Yse,className:"min-w-0 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:y,children:y}),d.jsxs("p",{className:"mt-1 truncate text-xs text-gray-500",title:e.targetLabel,children:[e.targetLabel,e.suiteLabel?` · ${e.suiteLabel}`:""]})]}),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:f,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] overflow-hidden xl:h-[calc(100vh-9rem)]",children:d.jsx(iS,{eval:e.result,runId:t,projectId:r,repeatGroup:g?n:void 0,selectedTrial:i,initialTab:l,initialSelectedFilePath:c,onSelectTrial:h},`${e.key}:${o??"aggregate"}:${c??""}`)})]},v)}function Q5({target:e,tone:t="text-gray-300"}){return d.jsx("div",{className:`max-w-[14rem] truncate ${t}`,title:e,children:e})}function Kse({row:e,repeatCollapsed: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?"Expand":"Collapse"} ${e.testId}`,children:t?"+":"-"})}function Gse(e){const t=e.projectId?`/projects/${encodeURIComponent(e.projectId)}/evals/${encodeURIComponent(e.runId)}/${encodeURIComponent(e.evalId)}`:`/evals/${encodeURIComponent(e.runId)}/${encodeURIComponent(e.evalId)}`;return e.artifactDir?`${t}?artifact_dir=${encodeURIComponent(e.artifactDir)}`:t}function Yse(e){e&&window.requestAnimationFrame(()=>{e.scrollIntoView({block:"nearest",inline:"nearest"})})}function Vse({row:e,repeatGroup:t}){const r=(t==null?void 0:t.trials.map(f=>f.cost_usd).filter(f=>typeof f=="number"&&Number.isFinite(f)))??[],n=(t==null?void 0:t.trials.map(G5).filter(f=>typeof f=="number"&&Number.isFinite(f)))??[],i=r.length>0?r.reduce((f,p)=>f+p,0):void 0,o=n.length>0?n.reduce((f,p)=>f+p,0):void 0,l=H5(e.result.costUsd??i),c=K5(e.tokenTotal??o),h=Ase(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:h,children:c}):null]})}function Qse({trial:e}){const t=H5(e.cost_usd),r=K5(G5(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 Xse({score:e,passThreshold:t}){if(!e)return d.jsx("span",{className:"text-gray-600",children:"-"});const r=e.score<t||Y5(e);return d.jsxs("div",{className:"min-w-0 text-right",children:[d.jsx("div",{className:`tabular-nums ${Cse(e.score)}`,children:$h(e.score)}),d.jsx("div",{className:r?"text-xs text-red-300":"text-xs text-gray-500",children:r?"Fail":e.verdict??"Pass"})]})}function Cl({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 au({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(bl,{label:"Pass Rate",value:`${l}%`,accent:c,large:!0}),d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(bl,{label:"Passed",value:String(t),accent:"text-emerald-400"}),d.jsx(bl,{label:"Failures",value:String(r),accent:"text-red-400"}),i>0&&d.jsx(bl,{label:"Execution Errors",value:String(i),accent:"text-amber-400"}),d.jsx(bl,{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(bl,{label:"Cost",value:`$${o.toFixed(4)}`,accent:"text-amber-400"})]})]})}function bl({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 Wse(e,t){const r=new Map;for(const n of e){const i=n.category??"Uncategorized",o=n.suite??"Uncategorized";r.has(i)||r.set(i,new Map);const l=r.get(i),c=l.get(o)??[];c.push(n),l.set(o,c)}return Array.from(r.entries()).map(([n,i])=>{const o=Array.from(i.entries()).map(([v,b])=>{const w=tp(b,t);return{name:v,passed:w.passed,failed:w.failed,executionErrors:w.executionErrors,total:w.total,avgScore:w.avgScore}}).sort((v,b)=>v.name.localeCompare(b.name)),l=o.reduce((v,b)=>v+b.total,0),c=o.reduce((v,b)=>v+b.passed,0),h=o.reduce((v,b)=>v+b.failed,0),f=o.reduce((v,b)=>v+b.executionErrors,0),p=l-f,y=o.reduce((v,b)=>v+b.avgScore*(b.total-b.executionErrors),0),g=AB(n);return{name:n,displayName:g.label,mutedDisplayName:g.mutedLabel,suites:o,total:l,passed:c,failed:h,executionErrors:f,avgScore:p>0?y/p:0}}).sort((n,i)=>n.name.localeCompare(i.name))}function X5({results:e,runId:t,projectId:r}){const{data:n}=yt(r),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,o=wie(e),l=e.length,c=tp(e,i),h=e.reduce((p,y)=>p+(y.costUsd??0),0),f=Wse(e,i);return l===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(au,{total:0,passed:0,failed:0,passRate:0}),d.jsx(j2,{href:o}),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(au,{total:l,passed:c.passed,failed:c.failed,passRate:c.passRate,executionErrors:c.executionErrors,totalCost:h>0?h:void 0}),d.jsx(j2,{href:o}),d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[620px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:f.map(p=>{const y=d.jsxs("span",{className:"flex min-w-0 items-baseline gap-2",children:[d.jsx("span",{className:"truncate",children:p.displayName}),p.mutedDisplayName?d.jsx("span",{className:"truncate text-xs font-normal text-gray-500",title:p.mutedDisplayName,children:p.mutedDisplayName}):null]});return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"w-[18rem] max-w-[18rem] px-4 py-2.5 font-medium text-gray-200",children:r?d.jsx(Ee,{to:"/projects/$projectId/runs/$runId/category/$category",params:{projectId:r,runId:t,category:p.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:p.mutedDisplayName??p.displayName,children:y}):d.jsx(Ee,{to:"/runs/$runId/category/$category",params:{runId:t,category:p.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:p.mutedDisplayName??p.displayName,children:y})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(an,{rate:p.total-p.executionErrors>0?p.passed/(p.total-p.executionErrors):0})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:p.passed}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:p.failed>0?p.failed:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-amber-400",children:p.executionErrors>0?p.executionErrors:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-gray-400",children:p.total})]},p.name)})})]})})]}),d.jsx(oS,{results:e,runId:t,projectId:r,passThreshold:i,title:"All Evals"}),d.jsx(Zse,{runId:t,projectId:r})]})}function j2({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 Zse({runId:e,projectId:t}){const[r,n]=S.useState(!1),{data:i,isLoading:o,error:l}=D6(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 ey({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 ty({runId:e,status:t,isReadOnly:r,projectId:n}){const[i,o]=S.useState(!1),[l,c]=S.useState(null);if(!pie(t,r))return null;async function h(){o(!0),c(null);try{await pB(e,n)}catch(f){c(f instanceof Error?f.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:h,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 W5=Cr("/runs/$runId")({component:Jse});function Jse(){var w;const{runId:e}=W5.useParams(),{data:t,isLoading:r,error:n}=md(e),{data:i}=yt(),{data:o}=Jm(),[l,c]=S.useState(!1),h=(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 f=(w=t==null?void 0:t.results)==null?void 0:w[0],p=f==null?void 0:f.target,y=p?{target:p}:void 0,g=t==null?void 0:t.status,v=g==="starting"||g==="running",b=qR({runId:e,results:(t==null?void 0:t.results)??[],source:t==null?void 0:t.source,sourceLabel:t==null?void 0:t.source_label,remoteRepo:(t==null?void 0:t.source)==="remote"?o==null?void 0:o.repo:void 0,formatTimestamp:N=>new Date(N).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title: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:[!h&&v?d.jsx(ty,{runId:e,status:g,isReadOnly:h}):d.jsx(N5,{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:h,plannedTestCount:t==null?void 0:t.planned_test_count,runStatus:g}),g&&d.jsx(ey,{status:g}),!h&&!v&&d.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run evals"})]})]}),d.jsx(X5,{results:(t==null?void 0:t.results)??[],runId:e}),!h&&d.jsx(_o,{open:l,onClose:()=>c(!1),prefill:y})]})}const bx=[{id:"runs",label:"🏃 Recent Runs",title:"Recent Runs"},{id:"experiments",label:"🧪 Experiments",title:"Experiments"},{id:"analytics",label:"📊 Analytics",title:"Analytics"},{id:"targets",label:"🤖 Targets",title:"Targets"}],Z5=Cr("/projects/$projectId")({component:eoe});function eoe(){var v;const{projectId:e}=Z5.useParams(),n=ij().location.search.tab,i=go(),[o,l]=S.useState(!1),{data:c}=yt(e),{data:h}=pd(),f=(c==null?void 0:c.read_only)===!0,p=BR(e,h==null?void 0:h.projects),y=bx.some(b=>b.id===n)?n:"runs",g=((v=bx.find(b=>b.id===y))==null?void 0:v.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:g}),!f&&d.jsx("button",{type:"button",onClick:()=>l(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),d.jsx("div",{className:"border-b border-gray-800 sm:overflow-x-auto",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:min-w-max sm:flex-nowrap",children:bx.map(b=>d.jsx("button",{type:"button",onClick:()=>i({to:"/projects/$projectId",params:{projectId:e},search:{tab:b.id}}),className:`shrink-0 px-4 py-2 text-sm font-medium transition-colors ${y===b.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:b.label},b.id))})}),y==="runs"&&d.jsx(toe,{projectId:e,projectName:p,readOnly:f}),y==="experiments"&&d.jsx(b5,{projectId:e}),y==="analytics"&&d.jsx(roe,{projectId:e,readOnly:f}),y==="targets"&&d.jsx(w5,{projectId:e}),!f&&d.jsx(_o,{open:o,onClose:()=>l(!1),projectId:e})]})}function toe({projectId:e,projectName:t,readOnly:r}){const n=pa(),{data:i,isLoading:o,error:l,hasNextPage:c,fetchNextPage:h,isFetchingNextPage:f}=tB(e),{data:p}=fj(e),{data:y}=Jm(e),[g,v]=S.useState(!1),[b,w]=S.useState(!1),[N,_]=S.useState(null),A=((p==null?void 0:p.runs)??[]).filter(M=>M.status==="starting"||M.status==="running"),C=Wp((i==null?void 0:i.runs)??[]),E=C.filter(M=>M.on_remote===!0).length,T=(y==null?void 0:y.configured)===!0?ER(E,C.length,y.branch):void 0;async function R(){v(!0),_(null);try{const M=await LR(e);n.setQueryData(qc(e).queryKey,M);const U=Yh(M);_(U),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"experiments"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(M){_(Vh(M,y)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{v(!1)}}async function D(){w(!0),_(null);try{const M=await IR(e);n.setQueryData(qc(e).queryKey,M),_(Yh(M)),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"experiments"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(M){_(Vh(M,y)),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:[A.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:A.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(j5,{remoteStatus:y,syncInFlight:g,onSync:R,projectName:t,syncFeedback:N,onRemoteSummary:T,onConfirmMerge:D,confirmMergeInFlight:b}),d.jsx(Xp,{runs:C,projectId:e,enableCombine:!r,remoteBranch:y==null?void 0:y.branch,hasNextPage:c,isFetchingNextPage:f,onLoadMore:()=>void h()})]})}function roe({projectId:e,readOnly:t}){const{data:r,isLoading:n,isError:i,error:o}=qe(kR(e));return d.jsx(v5,{data:r,isLoading:n,isError:i,error:o,projectId:e,readOnly:t})}const J5=Cr("/jobs/$runId")({component:noe});function noe(){const{runId:e}=J5.useParams(),{data:t,isLoading:r,error:n}=dj(e),{data:i}=yt(),o=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(jx,{}),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(jx,{}),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(jx,{}),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(ty,{runId:e,status:t.status,isReadOnly:o}),d.jsx(ey,{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 jx(){return d.jsx(Ee,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}function eL({experimentName:e,projectId:t}){var g;const{data:r,isLoading:n}=qe(t?cj(t):TR),{data:i,isLoading:o}=qe(t?uj(t):lj);if(n||o)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(v=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});const c=(g=r==null?void 0:r.experiments)==null?void 0:g.find(v=>v.name===e),h=Wp(((i==null?void 0:i.runs)??[]).filter(v=>(v.experiment??"default")===e)),f=(c==null?void 0:c.pass_rate)??0,p=h.length,y=(c==null?void 0:c.target_count)??0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:e}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[p," run",p!==1?"s":""," · ",y," target",y!==1?"s":"",(c==null?void 0:c.last_run)&&d.jsxs("span",{className:"ml-2",children:["· Last run: ",w2(c.last_run)]})]})]}),c&&d.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[d.jsx(Oh,{label:"Runs",value:String(p)}),d.jsx(Oh,{label:"Targets",value:String(y)}),d.jsx(Oh,{label:"Pass Rate",value:`${Math.round(f*100)}%`,accent:"text-cyan-400"}),d.jsx(Oh,{label:"Last Run",value:w2(c.last_run)})]}),d.jsxs("div",{children:[d.jsx("h2",{className:"mb-4 text-lg font-medium text-gray-200",children:"All Runs"}),d.jsx(Xp,{runs:h,projectId:t,emptyMessage:d.jsxs("div",{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found for this experiment."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Runs will appear here once this experiment has execution results."})]})})]})]})}function Oh({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 w2(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 tL=Cr("/experiments/$experimentName")({component:aoe});function aoe(){const{experimentName:e}=tL.useParams();return d.jsx(eL,{experimentName:e})}const rL=Cr("/evals/$runId/$evalId")({component:ioe});function ioe(){const{runId:e,evalId:t}=rL.useParams(),r=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("artifact_dir")??void 0,{data:n,isLoading:i,error:o}=md(e),{data:l}=yt(),[c,h]=S.useState(!1),f=(l==null?void 0:l.read_only)===!0;if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(o)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",o.message]});const p=n==null?void 0:n.results.find(v=>v.testId===t&&(!r||v.artifact_dir===r));if(!p)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:t})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:e}),"."]})});const y=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8,g=io(p.score,y)&&p.executionStatus!=="error"&&p.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",e," / Eval: ",t]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${g?"text-emerald-400":"text-red-400"}`,children:g?"✓":"✗"}),t]})]}),!f&&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(iS,{eval:p,runId:e}),!f&&d.jsx(_o,{open:c,onClose:()=>h(!1),prefill:{testIds:[t],target:p.target}})]})}const nL=Cr("/runs/$runId_/suite/$suite")({component:soe});function soe(){const{runId:e,suite:t}=nL.useParams(),{data:r,isLoading:n,error:i}=md(e),{data:o}=yt(),l=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(y=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const c=((r==null?void 0:r.results)??[]).filter(y=>(y.suite??"Uncategorized")===t),h=c.length,f=tp(c,l),p=c.reduce((y,g)=>y+(g.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(au,{total:h,passed:f.passed,failed:f.failed,passRate:f.passRate,executionErrors:f.executionErrors,totalCost:p>0?p: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(oS,{results:c,runId:e,passThreshold:l,title:"Suite Evals"})]})}const aL=Cr("/runs/$runId_/category/$category")({component:ooe});function ooe(){const{runId:e,category:t}=aL.useParams(),{data:r,isLoading:n,error:i}=MR(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(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 category: ",i.message]});const o=(r==null?void 0:r.suites)??[],l=o.reduce((g,v)=>g+v.total,0),c=o.reduce((g,v)=>g+v.passed,0),h=o.reduce((g,v)=>g+v.failed,0),f=o.reduce((g,v)=>g+Xt(v),0),p=l-f,y=p>0?c/p:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",e]})]}),d.jsx(au,{total:l,passed:c,failed:h,passRate:y,executionErrors:f}),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(g=>d.jsxs(Ee,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:g.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:g.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[g.passed,"/",QR(g)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(nu,{score:g.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[g.passed," passed"]}),g.failed>0&&d.jsxs("span",{className:"text-red-400",children:[g.failed," failed"]}),Xt(g)>0&&d.jsxs("span",{className:"text-amber-400",children:[Xt(g)," execution errors"]})]})]},g.name))})]})]})}const iL=Cr("/projects/$projectId_/runs/$runId")({component:loe});function loe(){var N;const{projectId:e,runId:t}=iL.useParams(),{data:r,isLoading:n,error:i}=yd(e,t),{data:o}=yt(e),{data:l}=Jm(e),[c,h]=S.useState(!1),f=(o==null?void 0:o.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"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],y=p==null?void 0:p.target,g=y?{target:y}:void 0,v=r==null?void 0:r.status,b=v==="starting"||v==="running",w=qR({runId:t,results:(r==null?void 0:r.results)??[],source:r==null?void 0:r.source,sourceLabel:r==null?void 0:r.source_label,remoteRepo:(r==null?void 0:r.source)==="remote"?l==null?void 0:l.repo:void 0,formatTimestamp:_=>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:[!f&&b?d.jsx(ty,{runId:t,status:v,isReadOnly:f,projectId:e}):d.jsx(N5,{results:(r==null?void 0:r.results)??[],runDir:r==null?void 0:r.run_dir,suiteFilter:r==null?void 0:r.suite_filter,target:y??void 0,projectId:e,isReadOnly:f,plannedTestCount:r==null?void 0:r.planned_test_count,runStatus:v}),v&&d.jsx(ey,{status:v}),!f&&!b&&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 evals"})]})]}),d.jsx(X5,{results:(r==null?void 0:r.results)??[],runId:t,projectId:e}),!f&&d.jsx(_o,{open:c,onClose:()=>h(!1),projectId:e,prefill:g})]})}const sL=Cr("/projects/$projectId_/jobs/$runId")({component:uoe});function uoe(){const{projectId:e,runId:t}=sL.useParams(),{data:r,isLoading:n,error:i}=dj(t,e),{data:o}=yt(e),l=(o==null?void 0:o.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(wx,{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(wx,{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(wx,{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(ty,{runId:t,status:r.status,isReadOnly:l,projectId:e}),d.jsx(ey,{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 wx({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 oL=Cr("/projects/$projectId_/experiments/$experimentName")({component:coe});function coe(){const{projectId:e,experimentName:t}=oL.useParams();return d.jsx(eL,{experimentName:t,projectId:e})}const lL=Cr("/projects/$projectId_/evals/$runId/$evalId")({component:doe});function doe(){const{projectId:e,runId:t,evalId:r}=lL.useParams(),n=typeof window>"u"?void 0:new URLSearchParams(window.location.search).get("artifact_dir")??void 0,{data:i,isLoading:o,error:l}=yd(e,t),{data:c}=yt(e),[h,f]=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 y=i==null?void 0:i.results.find(b=>b.testId===r&&(!n||b.artifact_dir===n));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 g=(c==null?void 0:c.threshold)??(c==null?void 0:c.pass_threshold)??.8,v=io(y.score,g)&&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: ",r]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${v?"text-emerald-400":"text-red-400"}`,children:v?"✓":"✗"}),r]})]}),!p&&d.jsx("button",{type:"button",onClick:()=>f(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),d.jsx(iS,{eval:y,runId:t,projectId:e}),!p&&d.jsx(_o,{open:h,onClose:()=>f(!1),projectId:e,prefill:{testIds:[r],target:y.target}})]})}const uL=Cr("/projects/$projectId_/runs/$runId_/suite/$suite")({component:foe});function foe(){const{projectId:e,runId:t,suite:r}=uL.useParams(),{data:n,isLoading:i,error:o}=yd(e,t),{data:l}=yt(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(g=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},g))})]});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 h=((n==null?void 0:n.results)??[]).filter(g=>(g.suite??"Uncategorized")===r),f=h.length,p=tp(h,c),y=h.reduce((g,v)=>g+(v.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",t]})]}),d.jsx(au,{total:f,passed:p.passed,failed:p.failed,passRate:p.passRate,executionErrors:p.executionErrors,totalCost:y>0?y: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(oS,{results:h,runId:t,projectId:e,passThreshold:c,title:"Suite Evals"})]})}const cL=Cr("/projects/$projectId_/runs/$runId_/category/$category")({component:hoe});function hoe(){const{projectId:e,runId:t,category:r}=cL.useParams(),{data:n,isLoading:i,error:o}=qe(DR(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(v=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(o)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",o.message]});const l=(n==null?void 0:n.suites)??[],c=l.reduce((v,b)=>v+b.total,0),h=l.reduce((v,b)=>v+b.passed,0),f=l.reduce((v,b)=>v+b.failed,0),p=l.reduce((v,b)=>v+Xt(b),0),y=c-p,g=y>0?h/y:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",t]})]}),d.jsx(au,{total:c,passed:h,failed:f,passRate:g,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(v=>d.jsxs(Ee,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,suite:v.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:v.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[v.passed,"/",QR(v)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(nu,{score:v.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[v.passed," passed"]}),v.failed>0&&d.jsxs("span",{className:"text-red-400",children:[v.failed," failed"]}),Xt(v)>0&&d.jsxs("span",{className:"text-amber-400",children:[Xt(v)," execution errors"]})]})]},v.name))})]})]})}const moe=XB.update({id:"/settings",path:"/settings",getParentRoute:()=>vr}),poe=lie.update({id:"/",path:"/",getParentRoute:()=>vr}),yoe=W5.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>vr}),goe=Z5.update({id:"/projects/$projectId",path:"/projects/$projectId",getParentRoute:()=>vr}),voe=J5.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>vr}),xoe=tL.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>vr}),boe=rL.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>vr}),joe=nL.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>vr}),woe=aL.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>vr}),Soe=iL.update({id:"/projects/$projectId_/runs/$runId",path:"/projects/$projectId/runs/$runId",getParentRoute:()=>vr}),Noe=sL.update({id:"/projects/$projectId_/jobs/$runId",path:"/projects/$projectId/jobs/$runId",getParentRoute:()=>vr}),_oe=oL.update({id:"/projects/$projectId_/experiments/$experimentName",path:"/projects/$projectId/experiments/$experimentName",getParentRoute:()=>vr}),Ooe=lL.update({id:"/projects/$projectId_/evals/$runId/$evalId",path:"/projects/$projectId/evals/$runId/$evalId",getParentRoute:()=>vr}),Eoe=uL.update({id:"/projects/$projectId_/runs/$runId_/suite/$suite",path:"/projects/$projectId/runs/$runId/suite/$suite",getParentRoute:()=>vr}),Aoe=cL.update({id:"/projects/$projectId_/runs/$runId_/category/$category",path:"/projects/$projectId/runs/$runId/category/$category",getParentRoute:()=>vr}),Coe={IndexRoute:poe,SettingsRoute:moe,ExperimentsExperimentNameRoute:xoe,JobsRunIdRoute:voe,ProjectsProjectIdRoute:goe,RunsRunIdRoute:yoe,EvalsRunIdEvalIdRoute:boe,ProjectsProjectIdExperimentsExperimentNameRoute:_oe,ProjectsProjectIdJobsRunIdRoute:Noe,ProjectsProjectIdRunsRunIdRoute:Soe,RunsRunIdCategoryCategoryRoute:woe,RunsRunIdSuiteSuiteRoute:joe,ProjectsProjectIdEvalsRunIdEvalIdRoute:Ooe,ProjectsProjectIdRunsRunIdCategoryCategoryRoute:Aoe,ProjectsProjectIdRunsRunIdSuiteSuiteRoute:Eoe},Toe=vr._addFileChildren(Coe)._addFileTypes(),Poe=new pz({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),Roe=g6({routeTree:Toe}),dL=document.getElementById("root");if(!dL)throw new Error("Root element not found");F$.createRoot(dL).render(d.jsx(S.StrictMode,{children:d.jsx(yz,{client:Poe,children:d.jsx(b6,{router:Roe})})}));export{ql as W,S as r};
|