agentv 4.37.0-next.1 → 4.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{artifact-writer-GFNKYREE.js → artifact-writer-MK5X5MSO.js} +4 -4
- package/dist/{chunk-P4LSNFZR.js → chunk-3G4BK6Z5.js} +21 -20
- package/dist/{chunk-P4LSNFZR.js.map → chunk-3G4BK6Z5.js.map} +1 -1
- package/dist/{chunk-N6E5XFOM.js → chunk-DKUAETXE.js} +3 -3
- package/dist/{chunk-M7AMFWBZ.js → chunk-EKMMIULD.js} +42 -37
- package/dist/chunk-EKMMIULD.js.map +1 -0
- package/dist/{chunk-OYI35QFW.js → chunk-NLTIK3LV.js} +32 -250
- package/dist/chunk-NLTIK3LV.js.map +1 -0
- package/dist/{chunk-RL4S2FBZ.js → chunk-VBHHZQS6.js} +902 -488
- package/dist/chunk-VBHHZQS6.js.map +1 -0
- package/dist/cli.js +5 -5
- package/dist/dashboard/assets/index-BpnllKET.css +1 -0
- package/dist/dashboard/assets/index-Cm9SUopp.js +118 -0
- package/dist/dashboard/assets/{index-BDRYJsGF.js → index-SIl6NbIJ.js} +1 -1
- package/dist/dashboard/index.html +2 -2
- package/dist/{dist-OY3JSP6Z.js → dist-HVLBDG5F.js} +17 -13
- package/dist/index.js +5 -5
- package/dist/{interactive-CQELHITQ.js → interactive-QFAAM4SI.js} +5 -5
- package/dist/skills/agentv-eval-writer/SKILL.md +28 -36
- package/dist/skills/agentv-eval-writer/references/eval-schema.json +57 -210
- package/dist/{ts-eval-loader-RBTB2HG2-H5TRXZLO.js → ts-eval-loader-TJT6BGFF-DI7XNSO4.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-M7AMFWBZ.js.map +0 -1
- package/dist/chunk-OYI35QFW.js.map +0 -1
- package/dist/chunk-RL4S2FBZ.js.map +0 -1
- package/dist/dashboard/assets/index-9tV-u4HJ.css +0 -1
- package/dist/dashboard/assets/index-DuESU7zZ.js +0 -118
- /package/dist/{artifact-writer-GFNKYREE.js.map → artifact-writer-MK5X5MSO.js.map} +0 -0
- /package/dist/{chunk-N6E5XFOM.js.map → chunk-DKUAETXE.js.map} +0 -0
- /package/dist/{dist-OY3JSP6Z.js.map → dist-HVLBDG5F.js.map} +0 -0
- /package/dist/{interactive-CQELHITQ.js.map → interactive-QFAAM4SI.js.map} +0 -0
- /package/dist/{ts-eval-loader-RBTB2HG2-H5TRXZLO.js.map → ts-eval-loader-TJT6BGFF-DI7XNSO4.js.map} +0 -0
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
var UL=Object.defineProperty;var zO=e=>{throw TypeError(e)};var qL=(e,t,r)=>t in e?UL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ng=(e,t,r)=>qL(e,typeof t!="symbol"?t+"":t,r),ag=(e,t,r)=>t.has(e)||zO("Cannot "+r);var z=(e,t,r)=>(ag(e,t,"read from private field"),r?r.call(e):t.get(e)),xe=(e,t,r)=>t.has(e)?zO("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),fe=(e,t,r,n)=>(ag(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Pe=(e,t,r)=>(ag(e,t,"access private method"),r);var Zf=(e,t,r,n)=>({set _(i){fe(e,t,i,r)},get _(){return z(e,t,n)}});function HL(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 l=Object.getOwnPropertyDescriptor(n,i);l&&Object.defineProperty(e,i,l.get?l:{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 l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function n(i){if(i.ep)return;i.ep=!0;const l=r(i);fetch(i.href,l)}})();function ns(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ig={exports:{}},ic={};/**
|
|
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 BO;function FL(){if(BO)return ic;BO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,i,l){var o=null;if(l!==void 0&&(o=""+l),i.key!==void 0&&(o=""+i.key),"key"in i){l={};for(var c in i)c!=="key"&&(l[c]=i[c])}else l=i;return i=l.ref,{$$typeof:e,type:n,key:o,ref:i!==void 0?i:null,props:l}}return ic.Fragment=t,ic.jsx=r,ic.jsxs=r,ic}var UO;function KL(){return UO||(UO=1,ig.exports=FL()),ig.exports}var d=KL(),sg={exports:{}},_e={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var qO;function GL(){if(qO)return _e;qO=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"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function x(k){return k===null||typeof k!="object"?null:(k=v&&k[v]||k["@@iterator"],typeof k=="function"?k:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,N={};function O(k,W,oe){this.props=k,this.context=W,this.refs=N,this.updater=oe||j}O.prototype.isReactComponent={},O.prototype.setState=function(k,W){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,W,"setState")},O.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function P(){}P.prototype=O.prototype;function E(k,W,oe){this.props=k,this.context=W,this.refs=N,this.updater=oe||j}var A=E.prototype=new P;A.constructor=E,S(A,O.prototype),A.isPureReactComponent=!0;var T=Array.isArray;function M(){}var R={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function $(k,W,oe){var le=oe.ref;return{$$typeof:e,type:k,key:W,ref:le!==void 0?le:null,props:oe}}function D(k,W){return $(k.type,W,k.props)}function H(k){return typeof k=="object"&&k!==null&&k.$$typeof===e}function q(k){var W={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(oe){return W[oe]})}var ae=/\/+/g;function Q(k,W){return typeof k=="object"&&k!==null&&k.key!=null?q(""+k.key):W.toString(36)}function Z(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(M,M):(k.status="pending",k.then(function(W){k.status==="pending"&&(k.status="fulfilled",k.value=W)},function(W){k.status==="pending"&&(k.status="rejected",k.reason=W)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function B(k,W,oe,le,ye){var Ne=typeof k;(Ne==="undefined"||Ne==="boolean")&&(k=null);var Oe=!1;if(k===null)Oe=!0;else switch(Ne){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(k.$$typeof){case e:case t:Oe=!0;break;case p:return Oe=k._init,B(Oe(k._payload),W,oe,le,ye)}}if(Oe)return ye=ye(k),Oe=le===""?"."+Q(k,0):le,T(ye)?(oe="",Oe!=null&&(oe=Oe.replace(ae,"$&/")+"/"),B(ye,W,oe,"",function(te){return te})):ye!=null&&(H(ye)&&(ye=D(ye,oe+(ye.key==null||k&&k.key===ye.key?"":(""+ye.key).replace(ae,"$&/")+"/")+Oe)),W.push(ye)),1;Oe=0;var Ce=le===""?".":le+":";if(T(k))for(var de=0;de<k.length;de++)le=k[de],Ne=Ce+Q(le,de),Oe+=B(le,W,oe,Ne,ye);else if(de=x(k),typeof de=="function")for(k=de.call(k),de=0;!(le=k.next()).done;)le=le.value,Ne=Ce+Q(le,de++),Oe+=B(le,W,oe,Ne,ye);else if(Ne==="object"){if(typeof k.then=="function")return B(Z(k),W,oe,le,ye);throw W=String(k),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function K(k,W,oe){if(k==null)return k;var le=[],ye=0;return B(k,le,"","",function(Ne){return W.call(oe,Ne,ye++)}),le}function ee(k){if(k._status===-1){var W=k._result;W=W(),W.then(function(oe){(k._status===0||k._status===-1)&&(k._status=1,k._result=oe)},function(oe){(k._status===0||k._status===-1)&&(k._status=2,k._result=oe)}),k._status===-1&&(k._status=0,k._result=W)}if(k._status===1)return k._result.default;throw k._result}var se=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},ue={map:K,forEach:function(k,W,oe){K(k,function(){W.apply(this,arguments)},oe)},count:function(k){var W=0;return K(k,function(){W++}),W},toArray:function(k){return K(k,function(W){return W})||[]},only:function(k){if(!H(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return _e.Activity=y,_e.Children=ue,_e.Component=O,_e.Fragment=r,_e.Profiler=i,_e.PureComponent=E,_e.StrictMode=n,_e.Suspense=f,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,_e.__COMPILER_RUNTIME={__proto__:null,c:function(k){return R.H.useMemoCache(k)}},_e.cache=function(k){return function(){return k.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(k,W,oe){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var le=S({},k.props),ye=k.key;if(W!=null)for(Ne in W.key!==void 0&&(ye=""+W.key),W)!I.call(W,Ne)||Ne==="key"||Ne==="__self"||Ne==="__source"||Ne==="ref"&&W.ref===void 0||(le[Ne]=W[Ne]);var Ne=arguments.length-2;if(Ne===1)le.children=oe;else if(1<Ne){for(var Oe=Array(Ne),Ce=0;Ce<Ne;Ce++)Oe[Ce]=arguments[Ce+2];le.children=Oe}return $(k.type,ye,le)},_e.createContext=function(k){return k={$$typeof:o,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:l,_context:k},k},_e.createElement=function(k,W,oe){var le,ye={},Ne=null;if(W!=null)for(le in W.key!==void 0&&(Ne=""+W.key),W)I.call(W,le)&&le!=="key"&&le!=="__self"&&le!=="__source"&&(ye[le]=W[le]);var Oe=arguments.length-2;if(Oe===1)ye.children=oe;else if(1<Oe){for(var Ce=Array(Oe),de=0;de<Oe;de++)Ce[de]=arguments[de+2];ye.children=Ce}if(k&&k.defaultProps)for(le in Oe=k.defaultProps,Oe)ye[le]===void 0&&(ye[le]=Oe[le]);return $(k,Ne,ye)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(k){return{$$typeof:c,render:k}},_e.isValidElement=H,_e.lazy=function(k){return{$$typeof:p,_payload:{_status:-1,_result:k},_init:ee}},_e.memo=function(k,W){return{$$typeof:h,type:k,compare:W===void 0?null:W}},_e.startTransition=function(k){var W=R.T,oe={};R.T=oe;try{var le=k(),ye=R.S;ye!==null&&ye(oe,le),typeof le=="object"&&le!==null&&typeof le.then=="function"&&le.then(M,se)}catch(Ne){se(Ne)}finally{W!==null&&oe.types!==null&&(W.types=oe.types),R.T=W}},_e.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},_e.use=function(k){return R.H.use(k)},_e.useActionState=function(k,W,oe){return R.H.useActionState(k,W,oe)},_e.useCallback=function(k,W){return R.H.useCallback(k,W)},_e.useContext=function(k){return R.H.useContext(k)},_e.useDebugValue=function(){},_e.useDeferredValue=function(k,W){return R.H.useDeferredValue(k,W)},_e.useEffect=function(k,W){return R.H.useEffect(k,W)},_e.useEffectEvent=function(k){return R.H.useEffectEvent(k)},_e.useId=function(){return R.H.useId()},_e.useImperativeHandle=function(k,W,oe){return R.H.useImperativeHandle(k,W,oe)},_e.useInsertionEffect=function(k,W){return R.H.useInsertionEffect(k,W)},_e.useLayoutEffect=function(k,W){return R.H.useLayoutEffect(k,W)},_e.useMemo=function(k,W){return R.H.useMemo(k,W)},_e.useOptimistic=function(k,W){return R.H.useOptimistic(k,W)},_e.useReducer=function(k,W,oe){return R.H.useReducer(k,W,oe)},_e.useRef=function(k){return R.H.useRef(k)},_e.useState=function(k){return R.H.useState(k)},_e.useSyncExternalStore=function(k,W,oe){return R.H.useSyncExternalStore(k,W,oe)},_e.useTransition=function(){return R.H.useTransition()},_e.version="19.2.4",_e}var HO;function eu(){return HO||(HO=1,sg.exports=GL()),sg.exports}var w=eu();const $o=ns(w),YL=HL({__proto__:null,default:$o},[w]);var lg={exports:{}},sc={},og={exports:{}},ug={};/**
|
|
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 FO;function VL(){return FO||(FO=1,(function(e){function t(B,K){var ee=B.length;B.push(K);e:for(;0<ee;){var se=ee-1>>>1,ue=B[se];if(0<i(ue,K))B[se]=K,B[ee]=ue,ee=se;else break e}}function r(B){return B.length===0?null:B[0]}function n(B){if(B.length===0)return null;var K=B[0],ee=B.pop();if(ee!==K){B[0]=ee;e:for(var se=0,ue=B.length,k=ue>>>1;se<k;){var W=2*(se+1)-1,oe=B[W],le=W+1,ye=B[le];if(0>i(oe,ee))le<ue&&0>i(ye,oe)?(B[se]=ye,B[le]=ee,se=le):(B[se]=oe,B[W]=ee,se=W);else if(le<ue&&0>i(ye,ee))B[se]=ye,B[le]=ee,se=le;else break e}}return K}function i(B,K){var ee=B.sortIndex-K.sortIndex;return ee!==0?ee:B.id-K.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var o=Date,c=o.now();e.unstable_now=function(){return o.now()-c}}var f=[],h=[],p=1,y=null,v=3,x=!1,j=!1,S=!1,N=!1,O=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function A(B){for(var K=r(h);K!==null;){if(K.callback===null)n(h);else if(K.startTime<=B)n(h),K.sortIndex=K.expirationTime,t(f,K);else break;K=r(h)}}function T(B){if(S=!1,A(B),!j)if(r(f)!==null)j=!0,M||(M=!0,q());else{var K=r(h);K!==null&&Z(T,K.startTime-B)}}var M=!1,R=-1,I=5,$=-1;function D(){return N?!0:!(e.unstable_now()-$<I)}function H(){if(N=!1,M){var B=e.unstable_now();$=B;var K=!0;try{e:{j=!1,S&&(S=!1,P(R),R=-1),x=!0;var ee=v;try{t:{for(A(B),y=r(f);y!==null&&!(y.expirationTime>B&&D());){var se=y.callback;if(typeof se=="function"){y.callback=null,v=y.priorityLevel;var ue=se(y.expirationTime<=B);if(B=e.unstable_now(),typeof ue=="function"){y.callback=ue,A(B),K=!0;break t}y===r(f)&&n(f),A(B)}else n(f);y=r(f)}if(y!==null)K=!0;else{var k=r(h);k!==null&&Z(T,k.startTime-B),K=!1}}break e}finally{y=null,v=ee,x=!1}K=void 0}}finally{K?q():M=!1}}}var q;if(typeof E=="function")q=function(){E(H)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,Q=ae.port2;ae.port1.onmessage=H,q=function(){Q.postMessage(null)}}else q=function(){O(H,0)};function Z(B,K){R=O(function(){B(e.unstable_now())},K)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(B){switch(v){case 1:case 2:case 3:var K=3;break;default:K=v}var ee=v;v=K;try{return B()}finally{v=ee}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(B,K){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ee=v;v=B;try{return K()}finally{v=ee}},e.unstable_scheduleCallback=function(B,K,ee){var se=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?se+ee:se):ee=se,B){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=ee+ue,B={id:p++,callback:K,priorityLevel:B,startTime:ee,expirationTime:ue,sortIndex:-1},ee>se?(B.sortIndex=ee,t(h,B),r(f)===null&&B===r(h)&&(S?(P(R),R=-1):S=!0,Z(T,ee-se))):(B.sortIndex=ue,t(f,B),j||x||(j=!0,M||(M=!0,q()))),B},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(B){var K=v;return function(){var ee=v;v=K;try{return B.apply(this,arguments)}finally{v=ee}}}})(ug)),ug}var KO;function QL(){return KO||(KO=1,og.exports=VL()),og.exports}var cg={exports:{}},cr={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var GO;function XL(){if(GO)return cr;GO=1;var e=eu();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,h,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:y==null?null:""+y,children:f,containerInfo:h,implementation:p}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return cr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,cr.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return l(f,h,null,p)},cr.flushSync=function(f){var h=o.T,p=n.p;try{if(o.T=null,n.p=2,f)return f()}finally{o.T=h,n.p=p,n.d.f()}},cr.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,n.d.C(f,h))},cr.prefetchDNS=function(f){typeof f=="string"&&n.d.D(f)},cr.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,y=c(p,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?n.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:x}):p==="script"&&n.d.X(f,{crossOrigin:y,integrity:v,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},cr.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=c(h.as,h.crossOrigin);n.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&n.d.M(f)},cr.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,y=c(p,h.crossOrigin);n.d.L(f,p,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},cr.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=c(h.as,h.crossOrigin);n.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else n.d.m(f)},cr.requestFormReset=function(f){n.d.r(f)},cr.unstable_batchedUpdates=function(f,h){return f(h)},cr.useFormState=function(f,h,p){return o.H.useFormState(f,h,p)},cr.useFormStatus=function(){return o.H.useHostTransitionStatus()},cr.version="19.2.4",cr}var YO;function o2(){if(YO)return cg.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(),cg.exports=XL(),cg.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var VO;function ZL(){if(VO)return sc;VO=1;var e=QL(),t=eu(),r=o2();function n(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(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 o(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(l(a)!==a)throw Error(n(188))}function h(a){var s=a.alternate;if(!s){if(s=l(a),s===null)throw Error(n(188));return s!==a?null:a}for(var u=a,m=s;;){var g=u.return;if(g===null)break;var b=g.alternate;if(b===null){if(m=g.return,m!==null){u=m;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===u)return f(g),a;if(b===m)return f(g),s;b=b.sibling}throw Error(n(188))}if(u.return!==m.return)u=g,m=b;else{for(var _=!1,C=g.child;C;){if(C===u){_=!0,u=g,m=b;break}if(C===m){_=!0,m=g,u=b;break}C=C.sibling}if(!_){for(C=b.child;C;){if(C===u){_=!0,u=b,m=g;break}if(C===m){_=!0,m=b,u=g;break}C=C.sibling}if(!_)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,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),E=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function q(a){return a===null||typeof a!="object"?null:(a=H&&a[H]||a["@@iterator"],typeof a=="function"?a:null)}var ae=Symbol.for("react.client.reference");function Q(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===ae?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case O:return"Profiler";case N:return"StrictMode";case T:return"Suspense";case M:return"SuspenseList";case $:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case j:return"Portal";case E:return a.displayName||"Context";case P:return(a._context.displayName||"Context")+".Consumer";case A:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case R:return s=a.displayName||null,s!==null?s:Q(a.type)||"Memo";case I:s=a._payload,a=a._init;try{return Q(a(s))}catch{}}return null}var Z=Array.isArray,B=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},se=[],ue=-1;function k(a){return{current:a}}function W(a){0>ue||(a.current=se[ue],se[ue]=null,ue--)}function oe(a,s){ue++,se[ue]=a.current,a.current=s}var le=k(null),ye=k(null),Ne=k(null),Oe=k(null);function Ce(a,s){switch(oe(Ne,s),oe(ye,a),oe(le,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?oO(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=oO(s),a=uO(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}W(le),oe(le,a)}function de(){W(le),W(ye),W(Ne)}function te(a){a.memoizedState!==null&&oe(Oe,a);var s=le.current,u=uO(s,a.type);s!==u&&(oe(ye,a),oe(le,u))}function Se(a){ye.current===a&&(W(le),W(ye)),Oe.current===a&&(W(Oe),tc._currentValue=ee)}var ce,_t;function De(a){if(ce===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ce=s&&s[1]||"",_t=-1<u.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ce+a+_t}var Et=!1;function At(a,s){if(!a||Et)return"";Et=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var 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(J){var X=J}Reflect.construct(a,[],ie)}else{try{ie.call()}catch(J){X=J}a.call(ie.prototype)}}else{try{throw Error()}catch(J){X=J}(ie=a())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(J){if(J&&X&&typeof J.stack=="string")return[J.stack,X.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=m.DetermineComponentFrameRoot(),_=b[0],C=b[1];if(_&&C){var L=_.split(`
|
|
44
|
-
`),Y=C.split(`
|
|
45
|
-
`);for(g=m=0;m<L.length&&!L[m].includes("DetermineComponentFrameRoot");)m++;for(;g<Y.length&&!Y[g].includes("DetermineComponentFrameRoot");)g++;if(m===L.length||g===Y.length)for(m=L.length-1,g=Y.length-1;1<=m&&0<=g&&L[m]!==Y[g];)g--;for(;1<=m&&0<=g;m--,g--)if(L[m]!==Y[g]){if(m!==1||g!==1)do if(m--,g--,0>g||L[m]!==Y[g]){var re=`
|
|
46
|
-
`+L[m].replace(" at new "," at ");return a.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",a.displayName)),re}while(1<=m&&0<=g);break}}}finally{Et=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?De(u):""}function or(a,s){switch(a.tag){case 26:case 27:case 5:return De(a.type);case 16:return De("Lazy");case 13:return a.child!==s&&s!==null?De("Suspense Fallback"):De("Suspense");case 19:return De("SuspenseList");case 0:case 15:return At(a.type,!1);case 11:return At(a.type.render,!1);case 1:return At(a.type,!0);case 31:return De("Activity");default:return""}}function fa(a){try{var s="",u=null;do s+=or(a,u),u=a,a=a.return;while(a);return s}catch(m){return`
|
|
47
|
-
Error generating stack: `+m.message+`
|
|
48
|
-
`+m.stack}}var An=Object.prototype.hasOwnProperty,fu=e.unstable_scheduleCallback,jl=e.unstable_cancelCallback,Fp=e.unstable_shouldYield,Cd=e.unstable_requestPaint,Te=e.unstable_now,ur=e.unstable_getCurrentPriorityLevel,qn=e.unstable_ImmediatePriority,Md=e.unstable_UserBlockingPriority,Rd=e.unstable_NormalPriority,S5=e.unstable_LowPriority,qS=e.unstable_IdlePriority,w5=e.log,N5=e.unstable_setDisableYieldValue,hu=null,qr=null;function ai(a){if(typeof w5=="function"&&N5(a),qr&&typeof qr.setStrictMode=="function")try{qr.setStrictMode(hu,a)}catch{}}var Hr=Math.clz32?Math.clz32:E5,O5=Math.log,_5=Math.LN2;function E5(a){return a>>>=0,a===0?32:31-(O5(a)/_5|0)|0}var Dd=256,kd=262144,Id=4194304;function ss(a){var s=a&42;if(s!==0)return s;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Ld(a,s,u){var m=a.pendingLanes;if(m===0)return 0;var g=0,b=a.suspendedLanes,_=a.pingedLanes;a=a.warmLanes;var C=m&134217727;return C!==0?(m=C&~b,m!==0?g=ss(m):(_&=C,_!==0?g=ss(_):u||(u=C&~a,u!==0&&(g=ss(u))))):(C=m&~b,C!==0?g=ss(C):_!==0?g=ss(_):u||(u=m&~a,u!==0&&(g=ss(u)))),g===0?0:s!==0&&s!==g&&(s&b)===0&&(b=g&-g,u=s&-s,b>=u||b===32&&(u&4194048)!==0)?s:g}function mu(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function A5(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function HS(){var a=Id;return Id<<=1,(Id&62914560)===0&&(Id=4194304),a}function Kp(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function pu(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function P5(a,s,u,m,g,b){var _=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var C=a.entanglements,L=a.expirationTimes,Y=a.hiddenUpdates;for(u=_&~u;0<u;){var re=31-Hr(u),ie=1<<re;C[re]=0,L[re]=-1;var X=Y[re];if(X!==null)for(Y[re]=null,re=0;re<X.length;re++){var J=X[re];J!==null&&(J.lane&=-536870913)}u&=~ie}m!==0&&FS(a,m,0),b!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=b&~(_&~s))}function FS(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var m=31-Hr(s);a.entangledLanes|=s,a.entanglements[m]=a.entanglements[m]|1073741824|u&261930}function KS(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var m=31-Hr(u),g=1<<m;g&s|a[m]&s&&(a[m]|=s),u&=~g}}function GS(a,s){var u=s&-s;return u=(u&42)!==0?1:Gp(u),(u&(a.suspendedLanes|s))!==0?0:u}function Gp(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 Yp(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function YS(){var a=K.p;return a!==0?a:(a=window.event,a===void 0?32:MO(a.type))}function VS(a,s){var u=K.p;try{return K.p=a,s()}finally{K.p=u}}var ii=Math.random().toString(36).slice(2),Zt="__reactFiber$"+ii,Ar="__reactProps$"+ii,Sl="__reactContainer$"+ii,Vp="__reactEvents$"+ii,T5="__reactListeners$"+ii,C5="__reactHandles$"+ii,QS="__reactResources$"+ii,yu="__reactMarker$"+ii;function Qp(a){delete a[Zt],delete a[Ar],delete a[Vp],delete a[T5],delete a[C5]}function wl(a){var s=a[Zt];if(s)return s;for(var u=a.parentNode;u;){if(s=u[Sl]||u[Zt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=yO(a);a!==null;){if(u=a[Zt])return u;a=yO(a)}return s}a=u,u=a.parentNode}return null}function Nl(a){if(a=a[Zt]||a[Sl]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function vu(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(n(33))}function Ol(a){var s=a[QS];return s||(s=a[QS]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function Ut(a){a[yu]=!0}var XS=new Set,ZS={};function ls(a,s){_l(a,s),_l(a+"Capture",s)}function _l(a,s){for(ZS[a]=s,a=0;a<s.length;a++)XS.add(s[a])}var M5=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),WS={},JS={};function R5(a){return An.call(JS,a)?!0:An.call(WS,a)?!1:M5.test(a)?JS[a]=!0:(WS[a]=!0,!1)}function $d(a,s,u){if(R5(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 zd(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function ha(a,s,u,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 sn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function ew(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function D5(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 g=m.get,b=m.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return g.call(this)},set:function(_){u=""+_,b.call(this,_)}}),Object.defineProperty(a,s,{enumerable:m.enumerable}),{getValue:function(){return u},setValue:function(_){u=""+_},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function Xp(a){if(!a._valueTracker){var s=ew(a)?"checked":"value";a._valueTracker=D5(a,s,""+a[s])}}function tw(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),m="";return a&&(m=ew(a)?a.checked?"true":"false":a.value),a=m,a!==u?(s.setValue(a),!0):!1}function Bd(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 k5=/[\n"\\]/g;function ln(a){return a.replace(k5,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Zp(a,s,u,m,g,b,_,C){a.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?a.type=_:a.removeAttribute("type"),s!=null?_==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+sn(s)):a.value!==""+sn(s)&&(a.value=""+sn(s)):_!=="submit"&&_!=="reset"||a.removeAttribute("value"),s!=null?Wp(a,_,sn(s)):u!=null?Wp(a,_,sn(u)):m!=null&&a.removeAttribute("value"),g==null&&b!=null&&(a.defaultChecked=!!b),g!=null&&(a.checked=g&&typeof g!="function"&&typeof g!="symbol"),C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?a.name=""+sn(C):a.removeAttribute("name")}function rw(a,s,u,m,g,b,_,C){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),s!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||s!=null)){Xp(a);return}u=u!=null?""+sn(u):"",s=s!=null?""+sn(s):u,C||s===a.value||(a.value=s),a.defaultValue=s}m=m??g,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=C?a.checked:!!m,a.defaultChecked=!!m,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(a.name=_),Xp(a)}function Wp(a,s,u){s==="number"&&Bd(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function El(a,s,u,m){if(a=a.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=s.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&m&&(a[u].defaultSelected=!0)}else{for(u=""+sn(u),s=null,g=0;g<a.length;g++){if(a[g].value===u){a[g].selected=!0,m&&(a[g].defaultSelected=!0);return}s!==null||a[g].disabled||(s=a[g])}s!==null&&(s.selected=!0)}}function nw(a,s,u){if(s!=null&&(s=""+sn(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+sn(u):""}function aw(a,s,u,m){if(s==null){if(m!=null){if(u!=null)throw Error(n(92));if(Z(m)){if(1<m.length)throw Error(n(93));m=m[0]}u=m}u==null&&(u=""),s=u}u=sn(s),a.defaultValue=u,m=a.textContent,m===u&&m!==""&&m!==null&&(a.value=m),Xp(a)}function Al(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var I5=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 iw(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||I5.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function sw(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 g in s)m=s[g],s.hasOwnProperty(g)&&u[g]!==m&&iw(a,g,m)}else for(var b in s)s.hasOwnProperty(b)&&iw(a,b,s[b])}function Jp(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 L5=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"]]),$5=/^[\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 Ud(a){return $5.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function ma(){}var ey=null;function ty(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Pl=null,Tl=null;function lw(a){var s=Nl(a);if(s&&(a=s.stateNode)){var u=a[Ar]||null;e:switch(a=s.stateNode,s.type){case"input":if(Zp(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="'+ln(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var m=u[s];if(m!==a&&m.form===a.form){var g=m[Ar]||null;if(!g)throw Error(n(90));Zp(m,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(s=0;s<u.length;s++)m=u[s],m.form===a.form&&tw(m)}break e;case"textarea":nw(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&El(a,!!u.multiple,s,!1)}}}var ry=!1;function ow(a,s,u){if(ry)return a(s,u);ry=!0;try{var m=a(s);return m}finally{if(ry=!1,(Pl!==null||Tl!==null)&&(Pf(),Pl&&(s=Pl,a=Tl,Tl=Pl=null,lw(s),a)))for(s=0;s<a.length;s++)lw(a[s])}}function gu(a,s){var u=a.stateNode;if(u===null)return null;var m=u[Ar]||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 pa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ny=!1;if(pa)try{var xu={};Object.defineProperty(xu,"passive",{get:function(){ny=!0}}),window.addEventListener("test",xu,xu),window.removeEventListener("test",xu,xu)}catch{ny=!1}var si=null,ay=null,qd=null;function uw(){if(qd)return qd;var a,s=ay,u=s.length,m,g="value"in si?si.value:si.textContent,b=g.length;for(a=0;a<u&&s[a]===g[a];a++);var _=u-a;for(m=1;m<=_&&s[u-m]===g[b-m];m++);return qd=g.slice(a,1<m?1-m:void 0)}function Hd(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 Fd(){return!0}function cw(){return!1}function Pr(a){function s(u,m,g,b,_){this._reactName=u,this._targetInst=g,this.type=m,this.nativeEvent=b,this.target=_,this.currentTarget=null;for(var C in a)a.hasOwnProperty(C)&&(u=a[C],this[C]=u?u(b):b[C]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Fd:cw,this.isPropagationStopped=cw,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=Fd)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Fd)},persist:function(){},isPersistent:Fd}),s}var os={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kd=Pr(os),bu=y({},os,{view:0,detail:0}),z5=Pr(bu),iy,sy,ju,Gd=y({},bu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oy,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!==ju&&(ju&&a.type==="mousemove"?(iy=a.screenX-ju.screenX,sy=a.screenY-ju.screenY):sy=iy=0,ju=a),iy)},movementY:function(a){return"movementY"in a?a.movementY:sy}}),dw=Pr(Gd),B5=y({},Gd,{dataTransfer:0}),U5=Pr(B5),q5=y({},bu,{relatedTarget:0}),ly=Pr(q5),H5=y({},os,{animationName:0,elapsedTime:0,pseudoElement:0}),F5=Pr(H5),K5=y({},os,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),G5=Pr(K5),Y5=y({},os,{data:0}),fw=Pr(Y5),V5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q5={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"},X5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z5(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=X5[a])?!!s[a]:!1}function oy(){return Z5}var W5=y({},bu,{key:function(a){if(a.key){var s=V5[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Hd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Q5[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oy,charCode:function(a){return a.type==="keypress"?Hd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Hd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),J5=Pr(W5),eI=y({},Gd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hw=Pr(eI),tI=y({},bu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oy}),rI=Pr(tI),nI=y({},os,{propertyName:0,elapsedTime:0,pseudoElement:0}),aI=Pr(nI),iI=y({},Gd,{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}),sI=Pr(iI),lI=y({},os,{newState:0,oldState:0}),oI=Pr(lI),uI=[9,13,27,32],uy=pa&&"CompositionEvent"in window,Su=null;pa&&"documentMode"in document&&(Su=document.documentMode);var cI=pa&&"TextEvent"in window&&!Su,mw=pa&&(!uy||Su&&8<Su&&11>=Su),pw=" ",yw=!1;function vw(a,s){switch(a){case"keyup":return uI.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gw(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Cl=!1;function dI(a,s){switch(a){case"compositionend":return gw(s);case"keypress":return s.which!==32?null:(yw=!0,pw);case"textInput":return a=s.data,a===pw&&yw?null:a;default:return null}}function fI(a,s){if(Cl)return a==="compositionend"||!uy&&vw(a,s)?(a=uw(),qd=ay=si=null,Cl=!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 mw&&s.locale!=="ko"?null:s.data;default:return null}}var hI={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 xw(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!hI[a.type]:s==="textarea"}function bw(a,s,u,m){Pl?Tl?Tl.push(m):Tl=[m]:Pl=m,s=If(s,"onChange"),0<s.length&&(u=new Kd("onChange","change",null,u,m),a.push({event:u,listeners:s}))}var wu=null,Nu=null;function mI(a){rO(a,0)}function Yd(a){var s=vu(a);if(tw(s))return a}function jw(a,s){if(a==="change")return s}var Sw=!1;if(pa){var cy;if(pa){var dy="oninput"in document;if(!dy){var ww=document.createElement("div");ww.setAttribute("oninput","return;"),dy=typeof ww.oninput=="function"}cy=dy}else cy=!1;Sw=cy&&(!document.documentMode||9<document.documentMode)}function Nw(){wu&&(wu.detachEvent("onpropertychange",Ow),Nu=wu=null)}function Ow(a){if(a.propertyName==="value"&&Yd(Nu)){var s=[];bw(s,Nu,a,ty(a)),ow(mI,s)}}function pI(a,s,u){a==="focusin"?(Nw(),wu=s,Nu=u,wu.attachEvent("onpropertychange",Ow)):a==="focusout"&&Nw()}function yI(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Yd(Nu)}function vI(a,s){if(a==="click")return Yd(s)}function gI(a,s){if(a==="input"||a==="change")return Yd(s)}function xI(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Fr=typeof Object.is=="function"?Object.is:xI;function Ou(a,s){if(Fr(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),m=Object.keys(s);if(u.length!==m.length)return!1;for(m=0;m<u.length;m++){var g=u[m];if(!An.call(s,g)||!Fr(a[g],s[g]))return!1}return!0}function _w(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Ew(a,s){var u=_w(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=_w(u)}}function Aw(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Aw(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function Pw(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Bd(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=Bd(a.document)}return s}function fy(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 bI=pa&&"documentMode"in document&&11>=document.documentMode,Ml=null,hy=null,_u=null,my=!1;function Tw(a,s,u){var m=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;my||Ml==null||Ml!==Bd(m)||(m=Ml,"selectionStart"in m&&fy(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}),_u&&Ou(_u,m)||(_u=m,m=If(hy,"onSelect"),0<m.length&&(s=new Kd("onSelect","select",null,s,u),a.push({event:s,listeners:m}),s.target=Ml)))}function us(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var Rl={animationend:us("Animation","AnimationEnd"),animationiteration:us("Animation","AnimationIteration"),animationstart:us("Animation","AnimationStart"),transitionrun:us("Transition","TransitionRun"),transitionstart:us("Transition","TransitionStart"),transitioncancel:us("Transition","TransitionCancel"),transitionend:us("Transition","TransitionEnd")},py={},Cw={};pa&&(Cw=document.createElement("div").style,"AnimationEvent"in window||(delete Rl.animationend.animation,delete Rl.animationiteration.animation,delete Rl.animationstart.animation),"TransitionEvent"in window||delete Rl.transitionend.transition);function cs(a){if(py[a])return py[a];if(!Rl[a])return a;var s=Rl[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in Cw)return py[a]=s[u];return a}var Mw=cs("animationend"),Rw=cs("animationiteration"),Dw=cs("animationstart"),jI=cs("transitionrun"),SI=cs("transitionstart"),wI=cs("transitioncancel"),kw=cs("transitionend"),Iw=new Map,yy="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(" ");yy.push("scrollEnd");function Pn(a,s){Iw.set(a,s),ls(s,[a])}var Vd=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)},on=[],Dl=0,vy=0;function Qd(){for(var a=Dl,s=vy=Dl=0;s<a;){var u=on[s];on[s++]=null;var m=on[s];on[s++]=null;var g=on[s];on[s++]=null;var b=on[s];if(on[s++]=null,m!==null&&g!==null){var _=m.pending;_===null?g.next=g:(g.next=_.next,_.next=g),m.pending=g}b!==0&&Lw(u,g,b)}}function Xd(a,s,u,m){on[Dl++]=a,on[Dl++]=s,on[Dl++]=u,on[Dl++]=m,vy|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function gy(a,s,u,m){return Xd(a,s,u,m),Zd(a)}function ds(a,s){return Xd(a,null,null,s),Zd(a)}function Lw(a,s,u){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u);for(var g=!1,b=a.return;b!==null;)b.childLanes|=u,m=b.alternate,m!==null&&(m.childLanes|=u),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(g=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,g&&s!==null&&(g=31-Hr(u),a=b.hiddenUpdates,m=a[g],m===null?a[g]=[s]:m.push(s),s.lane=u|536870912),b):null}function Zd(a){if(50<Vu)throw Vu=0,Ev=null,Error(n(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var kl={};function NI(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 Kr(a,s,u,m){return new NI(a,s,u,m)}function xy(a){return a=a.prototype,!(!a||!a.isReactComponent)}function ya(a,s){var u=a.alternate;return u===null?(u=Kr(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function $w(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 Wd(a,s,u,m,g,b){var _=0;if(m=a,typeof a=="function")xy(a)&&(_=1);else if(typeof a=="string")_=PL(a,u,le.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case $:return a=Kr(31,u,s,g),a.elementType=$,a.lanes=b,a;case S:return fs(u.children,g,b,s);case N:_=8,g|=24;break;case O:return a=Kr(12,u,s,g|2),a.elementType=O,a.lanes=b,a;case T:return a=Kr(13,u,s,g),a.elementType=T,a.lanes=b,a;case M:return a=Kr(19,u,s,g),a.elementType=M,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case E:_=10;break e;case P:_=9;break e;case A:_=11;break e;case R:_=14;break e;case I:_=16,m=null;break e}_=29,u=Error(n(130,a===null?"null":typeof a,"")),m=null}return s=Kr(_,u,s,g),s.elementType=a,s.type=m,s.lanes=b,s}function fs(a,s,u,m){return a=Kr(7,a,m,s),a.lanes=u,a}function by(a,s,u){return a=Kr(6,a,null,s),a.lanes=u,a}function zw(a){var s=Kr(18,null,null,0);return s.stateNode=a,s}function jy(a,s,u){return s=Kr(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var Bw=new WeakMap;function un(a,s){if(typeof a=="object"&&a!==null){var u=Bw.get(a);return u!==void 0?u:(s={value:a,source:s,stack:fa(s)},Bw.set(a,s),s)}return{value:a,source:s,stack:fa(s)}}var Il=[],Ll=0,Jd=null,Eu=0,cn=[],dn=0,li=null,Hn=1,Fn="";function va(a,s){Il[Ll++]=Eu,Il[Ll++]=Jd,Jd=a,Eu=s}function Uw(a,s,u){cn[dn++]=Hn,cn[dn++]=Fn,cn[dn++]=li,li=a;var m=Hn;a=Fn;var g=32-Hr(m)-1;m&=~(1<<g),u+=1;var b=32-Hr(s)+g;if(30<b){var _=g-g%5;b=(m&(1<<_)-1).toString(32),m>>=_,g-=_,Hn=1<<32-Hr(s)+g|u<<g|m,Fn=b+a}else Hn=1<<b|u<<g|m,Fn=a}function Sy(a){a.return!==null&&(va(a,1),Uw(a,1,0))}function wy(a){for(;a===Jd;)Jd=Il[--Ll],Il[Ll]=null,Eu=Il[--Ll],Il[Ll]=null;for(;a===li;)li=cn[--dn],cn[dn]=null,Fn=cn[--dn],cn[dn]=null,Hn=cn[--dn],cn[dn]=null}function qw(a,s){cn[dn++]=Hn,cn[dn++]=Fn,cn[dn++]=li,Hn=s.id,Fn=s.overflow,li=a}var Wt=null,it=null,Le=!1,oi=null,fn=!1,Ny=Error(n(519));function ui(a){var s=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Au(un(s,a)),Ny}function Hw(a){var s=a.stateNode,u=a.type,m=a.memoizedProps;switch(s[Zt]=a,s[Ar]=m,u){case"dialog":Re("cancel",s),Re("close",s);break;case"iframe":case"object":case"embed":Re("load",s);break;case"video":case"audio":for(u=0;u<Xu.length;u++)Re(Xu[u],s);break;case"source":Re("error",s);break;case"img":case"image":case"link":Re("error",s),Re("load",s);break;case"details":Re("toggle",s);break;case"input":Re("invalid",s),rw(s,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Re("invalid",s);break;case"textarea":Re("invalid",s),aw(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||sO(s.textContent,u)?(m.popover!=null&&(Re("beforetoggle",s),Re("toggle",s)),m.onScroll!=null&&Re("scroll",s),m.onScrollEnd!=null&&Re("scrollend",s),m.onClick!=null&&(s.onclick=ma),s=!0):s=!1,s||ui(a,!0)}function Fw(a){for(Wt=a.return;Wt;)switch(Wt.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:Wt=Wt.return}}function $l(a){if(a!==Wt)return!1;if(!Le)return Fw(a),Le=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||qv(a.type,a.memoizedProps)),u=!u),u&&it&&ui(a),Fw(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=pO(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(317));it=pO(a)}else s===27?(s=it,wi(a.type)?(a=Yv,Yv=null,it=a):it=s):it=Wt?mn(a.stateNode.nextSibling):null;return!0}function hs(){it=Wt=null,Le=!1}function Oy(){var a=oi;return a!==null&&(Rr===null?Rr=a:Rr.push.apply(Rr,a),oi=null),a}function Au(a){oi===null?oi=[a]:oi.push(a)}var _y=k(null),ms=null,ga=null;function ci(a,s,u){oe(_y,s._currentValue),s._currentValue=u}function xa(a){a._currentValue=_y.current,W(_y)}function Ey(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 Ay(a,s,u,m){var g=a.child;for(g!==null&&(g.return=a);g!==null;){var b=g.dependencies;if(b!==null){var _=g.child;b=b.firstContext;e:for(;b!==null;){var C=b;b=g;for(var L=0;L<s.length;L++)if(C.context===s[L]){b.lanes|=u,C=b.alternate,C!==null&&(C.lanes|=u),Ey(b.return,u,a),m||(_=null);break e}b=C.next}}else if(g.tag===18){if(_=g.return,_===null)throw Error(n(341));_.lanes|=u,b=_.alternate,b!==null&&(b.lanes|=u),Ey(_,u,a),_=null}else _=g.child;if(_!==null)_.return=g;else for(_=g;_!==null;){if(_===a){_=null;break}if(g=_.sibling,g!==null){g.return=_.return,_=g;break}_=_.return}g=_}}function zl(a,s,u,m){a=null;for(var g=s,b=!1;g!==null;){if(!b){if((g.flags&524288)!==0)b=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var _=g.alternate;if(_===null)throw Error(n(387));if(_=_.memoizedProps,_!==null){var C=g.type;Fr(g.pendingProps.value,_.value)||(a!==null?a.push(C):a=[C])}}else if(g===Oe.current){if(_=g.alternate,_===null)throw Error(n(387));_.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(tc):a=[tc])}g=g.return}a!==null&&Ay(s,a,u,m),s.flags|=262144}function ef(a){for(a=a.firstContext;a!==null;){if(!Fr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function ps(a){ms=a,ga=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function Jt(a){return Kw(ms,a)}function tf(a,s){return ms===null&&ps(a),Kw(a,s)}function Kw(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},ga===null){if(a===null)throw Error(n(308));ga=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ga=ga.next=s;return u}var OI=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()})}},_I=e.unstable_scheduleCallback,EI=e.unstable_NormalPriority,Pt={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Py(){return{controller:new OI,data:new Map,refCount:0}}function Pu(a){a.refCount--,a.refCount===0&&_I(EI,function(){a.controller.abort()})}var Tu=null,Ty=0,Bl=0,Ul=null;function AI(a,s){if(Tu===null){var u=Tu=[];Ty=0,Bl=Rv(),Ul={status:"pending",value:void 0,then:function(m){u.push(m)}}}return Ty++,s.then(Gw,Gw),s}function Gw(){if(--Ty===0&&Tu!==null){Ul!==null&&(Ul.status="fulfilled");var a=Tu;Tu=null,Bl=0,Ul=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function PI(a,s){var u=[],m={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return a.then(function(){m.status="fulfilled",m.value=s;for(var g=0;g<u.length;g++)(0,u[g])(s)},function(g){for(m.status="rejected",m.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),m}var Yw=B.S;B.S=function(a,s){TN=Te(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&AI(a,s),Yw!==null&&Yw(a,s)};var ys=k(null);function Cy(){var a=ys.current;return a!==null?a:rt.pooledCache}function rf(a,s){s===null?oe(ys,ys.current):oe(ys,s.pool)}function Vw(){var a=Cy();return a===null?null:{parent:Pt._currentValue,pool:a}}var ql=Error(n(460)),My=Error(n(474)),nf=Error(n(542)),af={then:function(){}};function Qw(a){return a=a.status,a==="fulfilled"||a==="rejected"}function Xw(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then(ma,ma),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,Ww(a),a;default:if(typeof s.status=="string")s.then(ma,ma);else{if(a=rt,a!==null&&100<a.shellSuspendCounter)throw Error(n(482));a=s,a.status="pending",a.then(function(m){if(s.status==="pending"){var g=s;g.status="fulfilled",g.value=m}},function(m){if(s.status==="pending"){var g=s;g.status="rejected",g.reason=m}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,Ww(a),a}throw gs=s,ql}}function vs(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(gs=u,ql):u}}var gs=null;function Zw(){if(gs===null)throw Error(n(459));var a=gs;return gs=null,a}function Ww(a){if(a===ql||a===nf)throw Error(n(483))}var Hl=null,Cu=0;function sf(a){var s=Cu;return Cu+=1,Hl===null&&(Hl=[]),Xw(Hl,a,s)}function Mu(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function lf(a,s){throw s.$$typeof===v?Error(n(525)):(a=Object.prototype.toString.call(s),Error(n(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function Jw(a){function s(F,U){if(a){var G=F.deletions;G===null?(F.deletions=[U],F.flags|=16):G.push(U)}}function u(F,U){if(!a)return null;for(;U!==null;)s(F,U),U=U.sibling;return null}function m(F){for(var U=new Map;F!==null;)F.key!==null?U.set(F.key,F):U.set(F.index,F),F=F.sibling;return U}function g(F,U){return F=ya(F,U),F.index=0,F.sibling=null,F}function b(F,U,G){return F.index=G,a?(G=F.alternate,G!==null?(G=G.index,G<U?(F.flags|=67108866,U):G):(F.flags|=67108866,U)):(F.flags|=1048576,U)}function _(F){return a&&F.alternate===null&&(F.flags|=67108866),F}function C(F,U,G,ne){return U===null||U.tag!==6?(U=by(G,F.mode,ne),U.return=F,U):(U=g(U,G),U.return=F,U)}function L(F,U,G,ne){var be=G.type;return be===S?re(F,U,G.props.children,ne,G.key):U!==null&&(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===I&&vs(be)===U.type)?(U=g(U,G.props),Mu(U,G),U.return=F,U):(U=Wd(G.type,G.key,G.props,null,F.mode,ne),Mu(U,G),U.return=F,U)}function Y(F,U,G,ne){return U===null||U.tag!==4||U.stateNode.containerInfo!==G.containerInfo||U.stateNode.implementation!==G.implementation?(U=jy(G,F.mode,ne),U.return=F,U):(U=g(U,G.children||[]),U.return=F,U)}function re(F,U,G,ne,be){return U===null||U.tag!==7?(U=fs(G,F.mode,ne,be),U.return=F,U):(U=g(U,G),U.return=F,U)}function ie(F,U,G){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=by(""+U,F.mode,G),U.return=F,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return G=Wd(U.type,U.key,U.props,null,F.mode,G),Mu(G,U),G.return=F,G;case j:return U=jy(U,F.mode,G),U.return=F,U;case I:return U=vs(U),ie(F,U,G)}if(Z(U)||q(U))return U=fs(U,F.mode,G,null),U.return=F,U;if(typeof U.then=="function")return ie(F,sf(U),G);if(U.$$typeof===E)return ie(F,tf(F,U),G);lf(F,U)}return null}function X(F,U,G,ne){var be=U!==null?U.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return be!==null?null:C(F,U,""+G,ne);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return G.key===be?L(F,U,G,ne):null;case j:return G.key===be?Y(F,U,G,ne):null;case I:return G=vs(G),X(F,U,G,ne)}if(Z(G)||q(G))return be!==null?null:re(F,U,G,ne,null);if(typeof G.then=="function")return X(F,U,sf(G),ne);if(G.$$typeof===E)return X(F,U,tf(F,G),ne);lf(F,G)}return null}function J(F,U,G,ne,be){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return F=F.get(G)||null,C(U,F,""+ne,be);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case x:return F=F.get(ne.key===null?G:ne.key)||null,L(U,F,ne,be);case j:return F=F.get(ne.key===null?G:ne.key)||null,Y(U,F,ne,be);case I:return ne=vs(ne),J(F,U,G,ne,be)}if(Z(ne)||q(ne))return F=F.get(G)||null,re(U,F,ne,be,null);if(typeof ne.then=="function")return J(F,U,G,sf(ne),be);if(ne.$$typeof===E)return J(F,U,G,tf(U,ne),be);lf(U,ne)}return null}function me(F,U,G,ne){for(var be=null,qe=null,ve=U,Ae=U=0,Ie=null;ve!==null&&Ae<G.length;Ae++){ve.index>Ae?(Ie=ve,ve=null):Ie=ve.sibling;var He=X(F,ve,G[Ae],ne);if(He===null){ve===null&&(ve=Ie);break}a&&ve&&He.alternate===null&&s(F,ve),U=b(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He,ve=Ie}if(Ae===G.length)return u(F,ve),Le&&va(F,Ae),be;if(ve===null){for(;Ae<G.length;Ae++)ve=ie(F,G[Ae],ne),ve!==null&&(U=b(ve,U,Ae),qe===null?be=ve:qe.sibling=ve,qe=ve);return Le&&va(F,Ae),be}for(ve=m(ve);Ae<G.length;Ae++)Ie=J(ve,F,Ae,G[Ae],ne),Ie!==null&&(a&&Ie.alternate!==null&&ve.delete(Ie.key===null?Ae:Ie.key),U=b(Ie,U,Ae),qe===null?be=Ie:qe.sibling=Ie,qe=Ie);return a&&ve.forEach(function(Ai){return s(F,Ai)}),Le&&va(F,Ae),be}function je(F,U,G,ne){if(G==null)throw Error(n(151));for(var be=null,qe=null,ve=U,Ae=U=0,Ie=null,He=G.next();ve!==null&&!He.done;Ae++,He=G.next()){ve.index>Ae?(Ie=ve,ve=null):Ie=ve.sibling;var Ai=X(F,ve,He.value,ne);if(Ai===null){ve===null&&(ve=Ie);break}a&&ve&&Ai.alternate===null&&s(F,ve),U=b(Ai,U,Ae),qe===null?be=Ai:qe.sibling=Ai,qe=Ai,ve=Ie}if(He.done)return u(F,ve),Le&&va(F,Ae),be;if(ve===null){for(;!He.done;Ae++,He=G.next())He=ie(F,He.value,ne),He!==null&&(U=b(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He);return Le&&va(F,Ae),be}for(ve=m(ve);!He.done;Ae++,He=G.next())He=J(ve,F,Ae,He.value,ne),He!==null&&(a&&He.alternate!==null&&ve.delete(He.key===null?Ae:He.key),U=b(He,U,Ae),qe===null?be=He:qe.sibling=He,qe=He);return a&&ve.forEach(function(BL){return s(F,BL)}),Le&&va(F,Ae),be}function et(F,U,G,ne){if(typeof G=="object"&&G!==null&&G.type===S&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case x:e:{for(var be=G.key;U!==null;){if(U.key===be){if(be=G.type,be===S){if(U.tag===7){u(F,U.sibling),ne=g(U,G.props.children),ne.return=F,F=ne;break e}}else if(U.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===I&&vs(be)===U.type){u(F,U.sibling),ne=g(U,G.props),Mu(ne,G),ne.return=F,F=ne;break e}u(F,U);break}else s(F,U);U=U.sibling}G.type===S?(ne=fs(G.props.children,F.mode,ne,G.key),ne.return=F,F=ne):(ne=Wd(G.type,G.key,G.props,null,F.mode,ne),Mu(ne,G),ne.return=F,F=ne)}return _(F);case j:e:{for(be=G.key;U!==null;){if(U.key===be)if(U.tag===4&&U.stateNode.containerInfo===G.containerInfo&&U.stateNode.implementation===G.implementation){u(F,U.sibling),ne=g(U,G.children||[]),ne.return=F,F=ne;break e}else{u(F,U);break}else s(F,U);U=U.sibling}ne=jy(G,F.mode,ne),ne.return=F,F=ne}return _(F);case I:return G=vs(G),et(F,U,G,ne)}if(Z(G))return me(F,U,G,ne);if(q(G)){if(be=q(G),typeof be!="function")throw Error(n(150));return G=be.call(G),je(F,U,G,ne)}if(typeof G.then=="function")return et(F,U,sf(G),ne);if(G.$$typeof===E)return et(F,U,tf(F,G),ne);lf(F,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,U!==null&&U.tag===6?(u(F,U.sibling),ne=g(U,G),ne.return=F,F=ne):(u(F,U),ne=by(G,F.mode,ne),ne.return=F,F=ne),_(F)):u(F,U)}return function(F,U,G,ne){try{Cu=0;var be=et(F,U,G,ne);return Hl=null,be}catch(ve){if(ve===ql||ve===nf)throw ve;var qe=Kr(29,ve,null,F.mode);return qe.lanes=ne,qe.return=F,qe}finally{}}}var xs=Jw(!0),e1=Jw(!1),di=!1;function Ry(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dy(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 fi(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function hi(a,s,u){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(Ke&2)!==0){var g=m.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),m.pending=s,s=Zd(a),Lw(a,null,u),s}return Xd(a,m,s,u),Zd(a)}function Ru(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,KS(a,u)}}function ky(a,s){var u=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,u===m)){var g=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var _={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?g=b=_:b=b.next=_,u=u.next}while(u!==null);b===null?g=b=s:b=b.next=s}else g=b=s;u={baseState:m.baseState,firstBaseUpdate:g,lastBaseUpdate:b,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 Iy=!1;function Du(){if(Iy){var a=Ul;if(a!==null)throw a}}function ku(a,s,u,m){Iy=!1;var g=a.updateQueue;di=!1;var b=g.firstBaseUpdate,_=g.lastBaseUpdate,C=g.shared.pending;if(C!==null){g.shared.pending=null;var L=C,Y=L.next;L.next=null,_===null?b=Y:_.next=Y,_=L;var re=a.alternate;re!==null&&(re=re.updateQueue,C=re.lastBaseUpdate,C!==_&&(C===null?re.firstBaseUpdate=Y:C.next=Y,re.lastBaseUpdate=L))}if(b!==null){var ie=g.baseState;_=0,re=Y=L=null,C=b;do{var X=C.lane&-536870913,J=X!==C.lane;if(J?(ke&X)===X:(m&X)===X){X!==0&&X===Bl&&(Iy=!0),re!==null&&(re=re.next={lane:0,tag:C.tag,payload:C.payload,callback:null,next:null});e:{var me=a,je=C;X=s;var et=u;switch(je.tag){case 1:if(me=je.payload,typeof me=="function"){ie=me.call(et,ie,X);break e}ie=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=je.payload,X=typeof me=="function"?me.call(et,ie,X):me,X==null)break e;ie=y({},ie,X);break e;case 2:di=!0}}X=C.callback,X!==null&&(a.flags|=64,J&&(a.flags|=8192),J=g.callbacks,J===null?g.callbacks=[X]:J.push(X))}else J={lane:X,tag:C.tag,payload:C.payload,callback:C.callback,next:null},re===null?(Y=re=J,L=ie):re=re.next=J,_|=X;if(C=C.next,C===null){if(C=g.shared.pending,C===null)break;J=C,C=J.next,J.next=null,g.lastBaseUpdate=J,g.shared.pending=null}}while(!0);re===null&&(L=ie),g.baseState=L,g.firstBaseUpdate=Y,g.lastBaseUpdate=re,b===null&&(g.shared.lanes=0),gi|=_,a.lanes=_,a.memoizedState=ie}}function t1(a,s){if(typeof a!="function")throw Error(n(191,a));a.call(s)}function r1(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)t1(u[a],s)}var Fl=k(null),of=k(0);function n1(a,s){a=Aa,oe(of,a),oe(Fl,s),Aa=a|s.baseLanes}function Ly(){oe(of,Aa),oe(Fl,Fl.current)}function $y(){Aa=of.current,W(Fl),W(of)}var Gr=k(null),hn=null;function mi(a){var s=a.alternate;oe(St,St.current&1),oe(Gr,a),hn===null&&(s===null||Fl.current!==null||s.memoizedState!==null)&&(hn=a)}function zy(a){oe(St,St.current),oe(Gr,a),hn===null&&(hn=a)}function a1(a){a.tag===22?(oe(St,St.current),oe(Gr,a),hn===null&&(hn=a)):pi()}function pi(){oe(St,St.current),oe(Gr,Gr.current)}function Yr(a){W(Gr),hn===a&&(hn=null),W(St)}var St=k(0);function uf(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Kv(u)||Gv(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var ba=0,Ee=null,We=null,Tt=null,cf=!1,Kl=!1,bs=!1,df=0,Iu=0,Gl=null,TI=0;function yt(){throw Error(n(321))}function By(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Fr(a[u],s[u]))return!1;return!0}function Uy(a,s,u,m,g,b){return ba=b,Ee=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,B.H=a===null||a.memoizedState===null?U1:rv,bs=!1,b=u(m,g),bs=!1,Kl&&(b=s1(s,u,m,g)),i1(a),b}function i1(a){B.H=zu;var s=We!==null&&We.next!==null;if(ba=0,Tt=We=Ee=null,cf=!1,Iu=0,Gl=null,s)throw Error(n(300));a===null||Ct||(a=a.dependencies,a!==null&&ef(a)&&(Ct=!0))}function s1(a,s,u,m){Ee=a;var g=0;do{if(Kl&&(Gl=null),Iu=0,Kl=!1,25<=g)throw Error(n(301));if(g+=1,Tt=We=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}B.H=q1,b=s(u,m)}while(Kl);return b}function CI(){var a=B.H,s=a.useState()[0];return s=typeof s.then=="function"?Lu(s):s,a=a.useState()[0],(We!==null?We.memoizedState:null)!==a&&(Ee.flags|=1024),s}function qy(){var a=df!==0;return df=0,a}function Hy(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function Fy(a){if(cf){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}cf=!1}ba=0,Tt=We=Ee=null,Kl=!1,Iu=df=0,Gl=null}function gr(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Ee.memoizedState=Tt=a:Tt=Tt.next=a,Tt}function wt(){if(We===null){var a=Ee.alternate;a=a!==null?a.memoizedState:null}else a=We.next;var s=Tt===null?Ee.memoizedState:Tt.next;if(s!==null)Tt=s,We=a;else{if(a===null)throw Ee.alternate===null?Error(n(467)):Error(n(310));We=a,a={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},Tt===null?Ee.memoizedState=Tt=a:Tt=Tt.next=a}return Tt}function ff(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lu(a){var s=Iu;return Iu+=1,Gl===null&&(Gl=[]),a=Xw(Gl,a,s),s=Ee,(Tt===null?s.memoizedState:Tt.next)===null&&(s=s.alternate,B.H=s===null||s.memoizedState===null?U1:rv),a}function hf(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Lu(a);if(a.$$typeof===E)return Jt(a)}throw Error(n(438,String(a)))}function Ky(a){var s=null,u=Ee.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var m=Ee.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(s={data:m.data.map(function(g){return g.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=ff(),Ee.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]=D;return s.index++,u}function ja(a,s){return typeof s=="function"?s(a):s}function mf(a){var s=wt();return Gy(s,We,a)}function Gy(a,s,u){var m=a.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=u;var g=a.baseQueue,b=m.pending;if(b!==null){if(g!==null){var _=g.next;g.next=b.next,b.next=_}s.baseQueue=g=b,m.pending=null}if(b=a.baseState,g===null)a.memoizedState=b;else{s=g.next;var C=_=null,L=null,Y=s,re=!1;do{var ie=Y.lane&-536870913;if(ie!==Y.lane?(ke&ie)===ie:(ba&ie)===ie){var X=Y.revertLane;if(X===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),ie===Bl&&(re=!0);else if((ba&X)===X){Y=Y.next,X===Bl&&(re=!0);continue}else ie={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},L===null?(C=L=ie,_=b):L=L.next=ie,Ee.lanes|=X,gi|=X;ie=Y.action,bs&&u(b,ie),b=Y.hasEagerState?Y.eagerState:u(b,ie)}else X={lane:ie,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},L===null?(C=L=X,_=b):L=L.next=X,Ee.lanes|=ie,gi|=ie;Y=Y.next}while(Y!==null&&Y!==s);if(L===null?_=b:L.next=C,!Fr(b,a.memoizedState)&&(Ct=!0,re&&(u=Ul,u!==null)))throw u;a.memoizedState=b,a.baseState=_,a.baseQueue=L,m.lastRenderedState=b}return g===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function Yy(a){var s=wt(),u=s.queue;if(u===null)throw Error(n(311));u.lastRenderedReducer=a;var m=u.dispatch,g=u.pending,b=s.memoizedState;if(g!==null){u.pending=null;var _=g=g.next;do b=a(b,_.action),_=_.next;while(_!==g);Fr(b,s.memoizedState)||(Ct=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),u.lastRenderedState=b}return[b,m]}function l1(a,s,u){var m=Ee,g=wt(),b=Le;if(b){if(u===void 0)throw Error(n(407));u=u()}else u=s();var _=!Fr((We||g).memoizedState,u);if(_&&(g.memoizedState=u,Ct=!0),g=g.queue,Xy(c1.bind(null,m,g,a),[a]),g.getSnapshot!==s||_||Tt!==null&&Tt.memoizedState.tag&1){if(m.flags|=2048,Yl(9,{destroy:void 0},u1.bind(null,m,g,u,s),null),rt===null)throw Error(n(349));b||(ba&127)!==0||o1(m,s,u)}return u}function o1(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Ee.updateQueue,s===null?(s=ff(),Ee.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function u1(a,s,u,m){s.value=u,s.getSnapshot=m,d1(s)&&f1(a)}function c1(a,s,u){return u(function(){d1(s)&&f1(a)})}function d1(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Fr(a,u)}catch{return!0}}function f1(a){var s=ds(a,2);s!==null&&Dr(s,a,2)}function Vy(a){var s=gr();if(typeof a=="function"){var u=a;if(a=u(),bs){ai(!0);try{u()}finally{ai(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:a},s}function h1(a,s,u,m){return a.baseState=u,Gy(a,We,typeof m=="function"?m:ja)}function MI(a,s,u,m,g){if(vf(a))throw Error(n(485));if(a=s.action,a!==null){var b={payload:g,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){b.listeners.push(_)}};B.T!==null?u(!0):b.isTransition=!1,m(b),u=s.pending,u===null?(b.next=s.pending=b,m1(s,b)):(b.next=u.next,s.pending=u.next=b)}}function m1(a,s){var u=s.action,m=s.payload,g=a.state;if(s.isTransition){var b=B.T,_={};B.T=_;try{var C=u(g,m),L=B.S;L!==null&&L(_,C),p1(a,s,C)}catch(Y){Qy(a,s,Y)}finally{b!==null&&_.types!==null&&(b.types=_.types),B.T=b}}else try{b=u(g,m),p1(a,s,b)}catch(Y){Qy(a,s,Y)}}function p1(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(m){y1(a,s,m)},function(m){return Qy(a,s,m)}):y1(a,s,u)}function y1(a,s,u){s.status="fulfilled",s.value=u,v1(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,m1(a,u)))}function Qy(a,s,u){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do s.status="rejected",s.reason=u,v1(s),s=s.next;while(s!==m)}a.action=null}function v1(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function g1(a,s){return s}function x1(a,s){if(Le){var u=rt.formState;if(u!==null){e:{var m=Ee;if(Le){if(it){t:{for(var g=it,b=fn;g.nodeType!==8;){if(!b){g=null;break t}if(g=mn(g.nextSibling),g===null){g=null;break t}}b=g.data,g=b==="F!"||b==="F"?g:null}if(g){it=mn(g.nextSibling),m=g.data==="F!";break e}}ui(m)}m=!1}m&&(s=u[0])}}return u=gr(),u.memoizedState=u.baseState=s,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:g1,lastRenderedState:s},u.queue=m,u=$1.bind(null,Ee,m),m.dispatch=u,m=Vy(!1),b=tv.bind(null,Ee,!1,m.queue),m=gr(),g={state:s,dispatch:null,action:a,pending:null},m.queue=g,u=MI.bind(null,Ee,g,b,u),g.dispatch=u,m.memoizedState=a,[s,u,!1]}function b1(a){var s=wt();return j1(s,We,a)}function j1(a,s,u){if(s=Gy(a,s,g1)[0],a=mf(ja)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var m=Lu(s)}catch(_){throw _===ql?nf:_}else m=s;s=wt();var g=s.queue,b=g.dispatch;return u!==s.memoizedState&&(Ee.flags|=2048,Yl(9,{destroy:void 0},RI.bind(null,g,u),null)),[m,b,a]}function RI(a,s){a.action=s}function S1(a){var s=wt(),u=We;if(u!==null)return j1(s,u,a);wt(),s=s.memoizedState,u=wt();var m=u.queue.dispatch;return u.memoizedState=a,[s,m,!1]}function Yl(a,s,u,m){return a={tag:a,create:u,deps:m,inst:s,next:null},s=Ee.updateQueue,s===null&&(s=ff(),Ee.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 w1(){return wt().memoizedState}function pf(a,s,u,m){var g=gr();Ee.flags|=a,g.memoizedState=Yl(1|s,{destroy:void 0},u,m===void 0?null:m)}function yf(a,s,u,m){var g=wt();m=m===void 0?null:m;var b=g.memoizedState.inst;We!==null&&m!==null&&By(m,We.memoizedState.deps)?g.memoizedState=Yl(s,b,u,m):(Ee.flags|=a,g.memoizedState=Yl(1|s,b,u,m))}function N1(a,s){pf(8390656,8,a,s)}function Xy(a,s){yf(2048,8,a,s)}function DI(a){Ee.flags|=4;var s=Ee.updateQueue;if(s===null)s=ff(),Ee.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function O1(a){var s=wt().memoizedState;return DI({ref:s,nextImpl:a}),function(){if((Ke&2)!==0)throw Error(n(440));return s.impl.apply(void 0,arguments)}}function _1(a,s){return yf(4,2,a,s)}function E1(a,s){return yf(4,4,a,s)}function A1(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 P1(a,s,u){u=u!=null?u.concat([a]):null,yf(4,4,A1.bind(null,s,a),u)}function Zy(){}function T1(a,s){var u=wt();s=s===void 0?null:s;var m=u.memoizedState;return s!==null&&By(s,m[1])?m[0]:(u.memoizedState=[a,s],a)}function C1(a,s){var u=wt();s=s===void 0?null:s;var m=u.memoizedState;if(s!==null&&By(s,m[1]))return m[0];if(m=a(),bs){ai(!0);try{a()}finally{ai(!1)}}return u.memoizedState=[m,s],m}function Wy(a,s,u){return u===void 0||(ba&1073741824)!==0&&(ke&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=MN(),Ee.lanes|=a,gi|=a,u)}function M1(a,s,u,m){return Fr(u,s)?u:Fl.current!==null?(a=Wy(a,u,m),Fr(a,s)||(Ct=!0),a):(ba&42)===0||(ba&1073741824)!==0&&(ke&261930)===0?(Ct=!0,a.memoizedState=u):(a=MN(),Ee.lanes|=a,gi|=a,s)}function R1(a,s,u,m,g){var b=K.p;K.p=b!==0&&8>b?b:8;var _=B.T,C={};B.T=C,tv(a,!1,s,u);try{var L=g(),Y=B.S;if(Y!==null&&Y(C,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=PI(L,m);$u(a,s,re,Xr(a))}else $u(a,s,m,Xr(a))}catch(ie){$u(a,s,{then:function(){},status:"rejected",reason:ie},Xr())}finally{K.p=b,_!==null&&C.types!==null&&(_.types=C.types),B.T=_}}function kI(){}function Jy(a,s,u,m){if(a.tag!==5)throw Error(n(476));var g=D1(a).queue;R1(a,g,s,ee,u===null?kI:function(){return k1(a),u(m)})}function D1(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:ee},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ja,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function k1(a){var s=D1(a);s.next===null&&(s=a.alternate.memoizedState),$u(a,s.next.queue,{},Xr())}function ev(){return Jt(tc)}function I1(){return wt().memoizedState}function L1(){return wt().memoizedState}function II(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Xr();a=fi(u);var m=hi(s,a,u);m!==null&&(Dr(m,s,u),Ru(m,s,u)),s={cache:Py()},a.payload=s;return}s=s.return}}function LI(a,s,u){var m=Xr();u={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},vf(a)?z1(s,u):(u=gy(a,s,u,m),u!==null&&(Dr(u,a,m),B1(u,s,m)))}function $1(a,s,u){var m=Xr();$u(a,s,u,m)}function $u(a,s,u,m){var g={lane:m,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(vf(a))z1(s,g);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var _=s.lastRenderedState,C=b(_,u);if(g.hasEagerState=!0,g.eagerState=C,Fr(C,_))return Xd(a,s,g,0),rt===null&&Qd(),!1}catch{}finally{}if(u=gy(a,s,g,m),u!==null)return Dr(u,a,m),B1(u,s,m),!0}return!1}function tv(a,s,u,m){if(m={lane:2,revertLane:Rv(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},vf(a)){if(s)throw Error(n(479))}else s=gy(a,u,m,2),s!==null&&Dr(s,a,2)}function vf(a){var s=a.alternate;return a===Ee||s!==null&&s===Ee}function z1(a,s){Kl=cf=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function B1(a,s,u){if((u&4194048)!==0){var m=s.lanes;m&=a.pendingLanes,u|=m,s.lanes=u,KS(a,u)}}var zu={readContext:Jt,use:hf,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};zu.useEffectEvent=yt;var U1={readContext:Jt,use:hf,useCallback:function(a,s){return gr().memoizedState=[a,s===void 0?null:s],a},useContext:Jt,useEffect:N1,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,pf(4194308,4,A1.bind(null,s,a),u)},useLayoutEffect:function(a,s){return pf(4194308,4,a,s)},useInsertionEffect:function(a,s){pf(4,2,a,s)},useMemo:function(a,s){var u=gr();s=s===void 0?null:s;var m=a();if(bs){ai(!0);try{a()}finally{ai(!1)}}return u.memoizedState=[m,s],m},useReducer:function(a,s,u){var m=gr();if(u!==void 0){var g=u(s);if(bs){ai(!0);try{u(s)}finally{ai(!1)}}}else g=s;return m.memoizedState=m.baseState=g,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:g},m.queue=a,a=a.dispatch=LI.bind(null,Ee,a),[m.memoizedState,a]},useRef:function(a){var s=gr();return a={current:a},s.memoizedState=a},useState:function(a){a=Vy(a);var s=a.queue,u=$1.bind(null,Ee,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:Zy,useDeferredValue:function(a,s){var u=gr();return Wy(u,a,s)},useTransition:function(){var a=Vy(!1);return a=R1.bind(null,Ee,a.queue,!0,!1),gr().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var m=Ee,g=gr();if(Le){if(u===void 0)throw Error(n(407));u=u()}else{if(u=s(),rt===null)throw Error(n(349));(ke&127)!==0||o1(m,s,u)}g.memoizedState=u;var b={value:u,getSnapshot:s};return g.queue=b,N1(c1.bind(null,m,b,a),[a]),m.flags|=2048,Yl(9,{destroy:void 0},u1.bind(null,m,b,u,s),null),u},useId:function(){var a=gr(),s=rt.identifierPrefix;if(Le){var u=Fn,m=Hn;u=(m&~(1<<32-Hr(m)-1)).toString(32)+u,s="_"+s+"R_"+u,u=df++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=TI++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:ev,useFormState:x1,useActionState:x1,useOptimistic:function(a){var s=gr();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=tv.bind(null,Ee,!0,u),u.dispatch=s,[a,s]},useMemoCache:Ky,useCacheRefresh:function(){return gr().memoizedState=II.bind(null,Ee)},useEffectEvent:function(a){var s=gr(),u={impl:a};return s.memoizedState=u,function(){if((Ke&2)!==0)throw Error(n(440));return u.impl.apply(void 0,arguments)}}},rv={readContext:Jt,use:hf,useCallback:T1,useContext:Jt,useEffect:Xy,useImperativeHandle:P1,useInsertionEffect:_1,useLayoutEffect:E1,useMemo:C1,useReducer:mf,useRef:w1,useState:function(){return mf(ja)},useDebugValue:Zy,useDeferredValue:function(a,s){var u=wt();return M1(u,We.memoizedState,a,s)},useTransition:function(){var a=mf(ja)[0],s=wt().memoizedState;return[typeof a=="boolean"?a:Lu(a),s]},useSyncExternalStore:l1,useId:I1,useHostTransitionStatus:ev,useFormState:b1,useActionState:b1,useOptimistic:function(a,s){var u=wt();return h1(u,We,a,s)},useMemoCache:Ky,useCacheRefresh:L1};rv.useEffectEvent=O1;var q1={readContext:Jt,use:hf,useCallback:T1,useContext:Jt,useEffect:Xy,useImperativeHandle:P1,useInsertionEffect:_1,useLayoutEffect:E1,useMemo:C1,useReducer:Yy,useRef:w1,useState:function(){return Yy(ja)},useDebugValue:Zy,useDeferredValue:function(a,s){var u=wt();return We===null?Wy(u,a,s):M1(u,We.memoizedState,a,s)},useTransition:function(){var a=Yy(ja)[0],s=wt().memoizedState;return[typeof a=="boolean"?a:Lu(a),s]},useSyncExternalStore:l1,useId:I1,useHostTransitionStatus:ev,useFormState:S1,useActionState:S1,useOptimistic:function(a,s){var u=wt();return We!==null?h1(u,We,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:Ky,useCacheRefresh:L1};q1.useEffectEvent=O1;function nv(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 av={enqueueSetState:function(a,s,u){a=a._reactInternals;var m=Xr(),g=fi(m);g.payload=s,u!=null&&(g.callback=u),s=hi(a,g,m),s!==null&&(Dr(s,a,m),Ru(s,a,m))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var m=Xr(),g=fi(m);g.tag=1,g.payload=s,u!=null&&(g.callback=u),s=hi(a,g,m),s!==null&&(Dr(s,a,m),Ru(s,a,m))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Xr(),m=fi(u);m.tag=2,s!=null&&(m.callback=s),s=hi(a,m,u),s!==null&&(Dr(s,a,u),Ru(s,a,u))}};function H1(a,s,u,m,g,b,_){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,b,_):s.prototype&&s.prototype.isPureReactComponent?!Ou(u,m)||!Ou(g,b):!0}function F1(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&&av.enqueueReplaceState(s,s.state,null)}function js(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 g in a)u[g]===void 0&&(u[g]=a[g])}return u}function K1(a){Vd(a)}function G1(a){console.error(a)}function Y1(a){Vd(a)}function gf(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(m){setTimeout(function(){throw m})}}function V1(a,s,u){try{var m=a.onCaughtError;m(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function iv(a,s,u){return u=fi(u),u.tag=3,u.payload={element:null},u.callback=function(){gf(a,s)},u}function Q1(a){return a=fi(a),a.tag=3,a}function X1(a,s,u,m){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var b=m.value;a.payload=function(){return g(b)},a.callback=function(){V1(s,u,m)}}var _=u.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(a.callback=function(){V1(s,u,m),typeof g!="function"&&(xi===null?xi=new Set([this]):xi.add(this));var C=m.stack;this.componentDidCatch(m.value,{componentStack:C!==null?C:""})})}function $I(a,s,u,m,g){if(u.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(s=u.alternate,s!==null&&zl(s,u,g,!0),u=Gr.current,u!==null){switch(u.tag){case 31:case 13:return hn===null?Tf():u.alternate===null&&vt===0&&(vt=3),u.flags&=-257,u.flags|=65536,u.lanes=g,m===af?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([m]):s.add(m),Tv(a,m,g)),!1;case 22:return u.flags|=65536,m===af?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)),Tv(a,m,g)),!1}throw Error(n(435,u.tag))}return Tv(a,m,g),Tf(),!1}if(Le)return s=Gr.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=g,m!==Ny&&(a=Error(n(422),{cause:m}),Au(un(a,u)))):(m!==Ny&&(s=Error(n(423),{cause:m}),Au(un(s,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,m=un(m,u),g=iv(a.stateNode,m,g),ky(a,g),vt!==4&&(vt=2)),!1;var b=Error(n(520),{cause:m});if(b=un(b,u),Yu===null?Yu=[b]:Yu.push(b),vt!==4&&(vt=2),s===null)return!0;m=un(m,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=iv(u.stateNode,m,a),ky(u,a),!1;case 1:if(s=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(xi===null||!xi.has(b))))return u.flags|=65536,g&=-g,u.lanes|=g,g=Q1(g),X1(g,a,u,m),ky(u,g),!1}u=u.return}while(u!==null);return!1}var sv=Error(n(461)),Ct=!1;function er(a,s,u,m){s.child=a===null?e1(s,null,u,m):xs(s,a.child,u,m)}function Z1(a,s,u,m,g){u=u.render;var b=s.ref;if("ref"in m){var _={};for(var C in m)C!=="ref"&&(_[C]=m[C])}else _=m;return ps(s),m=Uy(a,s,u,_,b,g),C=qy(),a!==null&&!Ct?(Hy(a,s,g),Sa(a,s,g)):(Le&&C&&Sy(s),s.flags|=1,er(a,s,m,g),s.child)}function W1(a,s,u,m,g){if(a===null){var b=u.type;return typeof b=="function"&&!xy(b)&&b.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=b,J1(a,s,b,m,g)):(a=Wd(u.type,null,m,s,s.mode,g),a.ref=s.ref,a.return=s,s.child=a)}if(b=a.child,!mv(a,g)){var _=b.memoizedProps;if(u=u.compare,u=u!==null?u:Ou,u(_,m)&&a.ref===s.ref)return Sa(a,s,g)}return s.flags|=1,a=ya(b,m),a.ref=s.ref,a.return=s,s.child=a}function J1(a,s,u,m,g){if(a!==null){var b=a.memoizedProps;if(Ou(b,m)&&a.ref===s.ref)if(Ct=!1,s.pendingProps=m=b,mv(a,g))(a.flags&131072)!==0&&(Ct=!0);else return s.lanes=a.lanes,Sa(a,s,g)}return lv(a,s,u,m,g)}function eN(a,s,u,m){var g=m.children,b=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(b=b!==null?b.baseLanes|u:u,a!==null){for(m=s.child=a.child,g=0;m!==null;)g=g|m.lanes|m.childLanes,m=m.sibling;m=g&~b}else m=0,s.child=null;return tN(a,s,b,u,m)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&rf(s,b!==null?b.cachePool:null),b!==null?n1(s,b):Ly(),a1(s);else return m=s.lanes=536870912,tN(a,s,b!==null?b.baseLanes|u:u,u,m)}else b!==null?(rf(s,b.cachePool),n1(s,b),pi(),s.memoizedState=null):(a!==null&&rf(s,null),Ly(),pi());return er(a,s,g,u),s.child}function Bu(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function tN(a,s,u,m,g){var b=Cy();return b=b===null?null:{parent:Pt._currentValue,pool:b},s.memoizedState={baseLanes:u,cachePool:b},a!==null&&rf(s,null),Ly(),a1(s),a!==null&&zl(a,s,m,!0),s.childLanes=g,null}function xf(a,s){return s=jf({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function rN(a,s,u){return xs(s,a.child,null,u),a=xf(s,s.pendingProps),a.flags|=2,Yr(s),s.memoizedState=null,a}function zI(a,s,u){var m=s.pendingProps,g=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Le){if(m.mode==="hidden")return a=xf(s,m),s.lanes=536870912,Bu(null,a);if(zy(s),(a=it)?(a=mO(a,fn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:li!==null?{id:Hn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},u=zw(a),u.return=s,s.child=u,Wt=s,it=null)):a=null,a===null)throw ui(s);return s.lanes=536870912,null}return xf(s,m)}var b=a.memoizedState;if(b!==null){var _=b.dehydrated;if(zy(s),g)if(s.flags&256)s.flags&=-257,s=rN(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(n(558));else if(Ct||zl(a,s,u,!1),g=(u&a.childLanes)!==0,Ct||g){if(m=rt,m!==null&&(_=GS(m,u),_!==0&&_!==b.retryLane))throw b.retryLane=_,ds(a,_),Dr(m,a,_),sv;Tf(),s=rN(a,s,u)}else a=b.treeContext,it=mn(_.nextSibling),Wt=s,Le=!0,oi=null,fn=!1,a!==null&&qw(s,a),s=xf(s,m),s.flags|=4096;return s}return a=ya(a.child,{mode:m.mode,children:m.children}),a.ref=s.ref,s.child=a,a.return=s,a}function bf(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 lv(a,s,u,m,g){return ps(s),u=Uy(a,s,u,m,void 0,g),m=qy(),a!==null&&!Ct?(Hy(a,s,g),Sa(a,s,g)):(Le&&m&&Sy(s),s.flags|=1,er(a,s,u,g),s.child)}function nN(a,s,u,m,g,b){return ps(s),s.updateQueue=null,u=s1(s,m,u,g),i1(a),m=qy(),a!==null&&!Ct?(Hy(a,s,b),Sa(a,s,b)):(Le&&m&&Sy(s),s.flags|=1,er(a,s,u,b),s.child)}function aN(a,s,u,m,g){if(ps(s),s.stateNode===null){var b=kl,_=u.contextType;typeof _=="object"&&_!==null&&(b=Jt(_)),b=new u(m,b),s.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=av,s.stateNode=b,b._reactInternals=s,b=s.stateNode,b.props=m,b.state=s.memoizedState,b.refs={},Ry(s),_=u.contextType,b.context=typeof _=="object"&&_!==null?Jt(_):kl,b.state=s.memoizedState,_=u.getDerivedStateFromProps,typeof _=="function"&&(nv(s,u,_,m),b.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(_=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),_!==b.state&&av.enqueueReplaceState(b,b.state,null),ku(s,m,b,g),Du(),b.state=s.memoizedState),typeof b.componentDidMount=="function"&&(s.flags|=4194308),m=!0}else if(a===null){b=s.stateNode;var C=s.memoizedProps,L=js(u,C);b.props=L;var Y=b.context,re=u.contextType;_=kl,typeof re=="object"&&re!==null&&(_=Jt(re));var ie=u.getDerivedStateFromProps;re=typeof ie=="function"||typeof b.getSnapshotBeforeUpdate=="function",C=s.pendingProps!==C,re||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C||Y!==_)&&F1(s,b,m,_),di=!1;var X=s.memoizedState;b.state=X,ku(s,m,b,g),Du(),Y=s.memoizedState,C||X!==Y||di?(typeof ie=="function"&&(nv(s,u,ie,m),Y=s.memoizedState),(L=di||H1(s,u,L,m,X,Y,_))?(re||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(s.flags|=4194308)):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=m,s.memoizedState=Y),b.props=m,b.state=Y,b.context=_,m=L):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),m=!1)}else{b=s.stateNode,Dy(a,s),_=s.memoizedProps,re=js(u,_),b.props=re,ie=s.pendingProps,X=b.context,Y=u.contextType,L=kl,typeof Y=="object"&&Y!==null&&(L=Jt(Y)),C=u.getDerivedStateFromProps,(Y=typeof C=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(_!==ie||X!==L)&&F1(s,b,m,L),di=!1,X=s.memoizedState,b.state=X,ku(s,m,b,g),Du();var J=s.memoizedState;_!==ie||X!==J||di||a!==null&&a.dependencies!==null&&ef(a.dependencies)?(typeof C=="function"&&(nv(s,u,C,m),J=s.memoizedState),(re=di||H1(s,u,re,m,X,J,L)||a!==null&&a.dependencies!==null&&ef(a.dependencies))?(Y||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(m,J,L),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(m,J,L)),typeof b.componentDidUpdate=="function"&&(s.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof b.componentDidUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=1024),s.memoizedProps=m,s.memoizedState=J),b.props=m,b.state=J,b.context=L,m=re):(typeof b.componentDidUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||_===a.memoizedProps&&X===a.memoizedState||(s.flags|=1024),m=!1)}return b=m,bf(a,s),m=(s.flags&128)!==0,b||m?(b=s.stateNode,u=m&&typeof u.getDerivedStateFromError!="function"?null:b.render(),s.flags|=1,a!==null&&m?(s.child=xs(s,a.child,null,g),s.child=xs(s,null,u,g)):er(a,s,u,g),s.memoizedState=b.state,a=s.child):a=Sa(a,s,g),a}function iN(a,s,u,m){return hs(),s.flags|=256,er(a,s,u,m),s.child}var ov={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uv(a){return{baseLanes:a,cachePool:Vw()}}function cv(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=Qr),a}function sN(a,s,u){var m=s.pendingProps,g=!1,b=(s.flags&128)!==0,_;if((_=b)||(_=a!==null&&a.memoizedState===null?!1:(St.current&2)!==0),_&&(g=!0,s.flags&=-129),_=(s.flags&32)!==0,s.flags&=-33,a===null){if(Le){if(g?mi(s):pi(),(a=it)?(a=mO(a,fn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:li!==null?{id:Hn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},u=zw(a),u.return=s,s.child=u,Wt=s,it=null)):a=null,a===null)throw ui(s);return Gv(a)?s.lanes=32:s.lanes=536870912,null}var C=m.children;return m=m.fallback,g?(pi(),g=s.mode,C=jf({mode:"hidden",children:C},g),m=fs(m,g,u,null),C.return=s,m.return=s,C.sibling=m,s.child=C,m=s.child,m.memoizedState=uv(u),m.childLanes=cv(a,_,u),s.memoizedState=ov,Bu(null,m)):(mi(s),dv(s,C))}var L=a.memoizedState;if(L!==null&&(C=L.dehydrated,C!==null)){if(b)s.flags&256?(mi(s),s.flags&=-257,s=fv(a,s,u)):s.memoizedState!==null?(pi(),s.child=a.child,s.flags|=128,s=null):(pi(),C=m.fallback,g=s.mode,m=jf({mode:"visible",children:m.children},g),C=fs(C,g,u,null),C.flags|=2,m.return=s,C.return=s,m.sibling=C,s.child=m,xs(s,a.child,null,u),m=s.child,m.memoizedState=uv(u),m.childLanes=cv(a,_,u),s.memoizedState=ov,s=Bu(null,m));else if(mi(s),Gv(C)){if(_=C.nextSibling&&C.nextSibling.dataset,_)var Y=_.dgst;_=Y,m=Error(n(419)),m.stack="",m.digest=_,Au({value:m,source:null,stack:null}),s=fv(a,s,u)}else if(Ct||zl(a,s,u,!1),_=(u&a.childLanes)!==0,Ct||_){if(_=rt,_!==null&&(m=GS(_,u),m!==0&&m!==L.retryLane))throw L.retryLane=m,ds(a,m),Dr(_,a,m),sv;Kv(C)||Tf(),s=fv(a,s,u)}else Kv(C)?(s.flags|=192,s.child=a.child,s=null):(a=L.treeContext,it=mn(C.nextSibling),Wt=s,Le=!0,oi=null,fn=!1,a!==null&&qw(s,a),s=dv(s,m.children),s.flags|=4096);return s}return g?(pi(),C=m.fallback,g=s.mode,L=a.child,Y=L.sibling,m=ya(L,{mode:"hidden",children:m.children}),m.subtreeFlags=L.subtreeFlags&65011712,Y!==null?C=ya(Y,C):(C=fs(C,g,u,null),C.flags|=2),C.return=s,m.return=s,m.sibling=C,s.child=m,Bu(null,m),m=s.child,C=a.child.memoizedState,C===null?C=uv(u):(g=C.cachePool,g!==null?(L=Pt._currentValue,g=g.parent!==L?{parent:L,pool:L}:g):g=Vw(),C={baseLanes:C.baseLanes|u,cachePool:g}),m.memoizedState=C,m.childLanes=cv(a,_,u),s.memoizedState=ov,Bu(a.child,m)):(mi(s),u=a.child,a=u.sibling,u=ya(u,{mode:"visible",children:m.children}),u.return=s,u.sibling=null,a!==null&&(_=s.deletions,_===null?(s.deletions=[a],s.flags|=16):_.push(a)),s.child=u,s.memoizedState=null,u)}function dv(a,s){return s=jf({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function jf(a,s){return a=Kr(22,a,null,s),a.lanes=0,a}function fv(a,s,u){return xs(s,a.child,null,u),a=dv(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function lN(a,s,u){a.lanes|=s;var m=a.alternate;m!==null&&(m.lanes|=s),Ey(a.return,s,u)}function hv(a,s,u,m,g,b){var _=a.memoizedState;_===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:m,tail:u,tailMode:g,treeForkCount:b}:(_.isBackwards=s,_.rendering=null,_.renderingStartTime=0,_.last=m,_.tail=u,_.tailMode=g,_.treeForkCount=b)}function oN(a,s,u){var m=s.pendingProps,g=m.revealOrder,b=m.tail;m=m.children;var _=St.current,C=(_&2)!==0;if(C?(_=_&1|2,s.flags|=128):_&=1,oe(St,_),er(a,s,m,u),m=Le?Eu:0,!C&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&lN(a,u,s);else if(a.tag===19)lN(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(g){case"forwards":for(u=s.child,g=null;u!==null;)a=u.alternate,a!==null&&uf(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),hv(s,!1,g,u,b,m);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(a=g.alternate,a!==null&&uf(a)===null){s.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}hv(s,!0,u,null,b,m);break;case"together":hv(s,!1,null,null,void 0,m);break;default:s.memoizedState=null}return s.child}function Sa(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),gi|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(zl(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(n(153));if(s.child!==null){for(a=s.child,u=ya(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=ya(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function mv(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&ef(a)))}function BI(a,s,u){switch(s.tag){case 3:Ce(s,s.stateNode.containerInfo),ci(s,Pt,a.memoizedState.cache),hs();break;case 27:case 5:te(s);break;case 4:Ce(s,s.stateNode.containerInfo);break;case 10:ci(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,zy(s),null;break;case 13:var m=s.memoizedState;if(m!==null)return m.dehydrated!==null?(mi(s),s.flags|=128,null):(u&s.child.childLanes)!==0?sN(a,s,u):(mi(s),a=Sa(a,s,u),a!==null?a.sibling:null);mi(s);break;case 19:var g=(a.flags&128)!==0;if(m=(u&s.childLanes)!==0,m||(zl(a,s,u,!1),m=(u&s.childLanes)!==0),g){if(m)return oN(a,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),oe(St,St.current),m)break;return null;case 22:return s.lanes=0,eN(a,s,u,s.pendingProps);case 24:ci(s,Pt,a.memoizedState.cache)}return Sa(a,s,u)}function uN(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Ct=!0;else{if(!mv(a,u)&&(s.flags&128)===0)return Ct=!1,BI(a,s,u);Ct=(a.flags&131072)!==0}else Ct=!1,Le&&(s.flags&1048576)!==0&&Uw(s,Eu,s.index);switch(s.lanes=0,s.tag){case 16:e:{var m=s.pendingProps;if(a=vs(s.elementType),s.type=a,typeof a=="function")xy(a)?(m=js(a,m),s.tag=1,s=aN(null,s,a,m,u)):(s.tag=0,s=lv(null,s,a,m,u));else{if(a!=null){var g=a.$$typeof;if(g===A){s.tag=11,s=Z1(null,s,a,m,u);break e}else if(g===R){s.tag=14,s=W1(null,s,a,m,u);break e}}throw s=Q(a)||a,Error(n(306,s,""))}}return s;case 0:return lv(a,s,s.type,s.pendingProps,u);case 1:return m=s.type,g=js(m,s.pendingProps),aN(a,s,m,g,u);case 3:e:{if(Ce(s,s.stateNode.containerInfo),a===null)throw Error(n(387));m=s.pendingProps;var b=s.memoizedState;g=b.element,Dy(a,s),ku(s,m,null,u);var _=s.memoizedState;if(m=_.cache,ci(s,Pt,m),m!==b.cache&&Ay(s,[Pt],u,!0),Du(),m=_.element,b.isDehydrated)if(b={element:m,isDehydrated:!1,cache:_.cache},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){s=iN(a,s,m,u);break e}else if(m!==g){g=un(Error(n(424)),s),Au(g),s=iN(a,s,m,u);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(it=mn(a.firstChild),Wt=s,Le=!0,oi=null,fn=!0,u=e1(s,null,m,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(hs(),m===g){s=Sa(a,s,u);break e}er(a,s,m,u)}s=s.child}return s;case 26:return bf(a,s),a===null?(u=bO(s.type,null,s.pendingProps,null))?s.memoizedState=u:Le||(u=s.type,a=s.pendingProps,m=Lf(Ne.current).createElement(u),m[Zt]=s,m[Ar]=a,tr(m,u,a),Ut(m),s.stateNode=m):s.memoizedState=bO(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return te(s),a===null&&Le&&(m=s.stateNode=vO(s.type,s.pendingProps,Ne.current),Wt=s,fn=!0,g=it,wi(s.type)?(Yv=g,it=mn(m.firstChild)):it=g),er(a,s,s.pendingProps.children,u),bf(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Le&&((g=m=it)&&(m=yL(m,s.type,s.pendingProps,fn),m!==null?(s.stateNode=m,Wt=s,it=mn(m.firstChild),fn=!1,g=!0):g=!1),g||ui(s)),te(s),g=s.type,b=s.pendingProps,_=a!==null?a.memoizedProps:null,m=b.children,qv(g,b)?m=null:_!==null&&qv(g,_)&&(s.flags|=32),s.memoizedState!==null&&(g=Uy(a,s,CI,null,null,u),tc._currentValue=g),bf(a,s),er(a,s,m,u),s.child;case 6:return a===null&&Le&&((a=u=it)&&(u=vL(u,s.pendingProps,fn),u!==null?(s.stateNode=u,Wt=s,it=null,a=!0):a=!1),a||ui(s)),null;case 13:return sN(a,s,u);case 4:return Ce(s,s.stateNode.containerInfo),m=s.pendingProps,a===null?s.child=xs(s,null,m,u):er(a,s,m,u),s.child;case 11:return Z1(a,s,s.type,s.pendingProps,u);case 7:return er(a,s,s.pendingProps,u),s.child;case 8:return er(a,s,s.pendingProps.children,u),s.child;case 12:return er(a,s,s.pendingProps.children,u),s.child;case 10:return m=s.pendingProps,ci(s,s.type,m.value),er(a,s,m.children,u),s.child;case 9:return g=s.type._context,m=s.pendingProps.children,ps(s),g=Jt(g),m=m(g),s.flags|=1,er(a,s,m,u),s.child;case 14:return W1(a,s,s.type,s.pendingProps,u);case 15:return J1(a,s,s.type,s.pendingProps,u);case 19:return oN(a,s,u);case 31:return zI(a,s,u);case 22:return eN(a,s,u,s.pendingProps);case 24:return ps(s),m=Jt(Pt),a===null?(g=Cy(),g===null&&(g=rt,b=Py(),g.pooledCache=b,b.refCount++,b!==null&&(g.pooledCacheLanes|=u),g=b),s.memoizedState={parent:m,cache:g},Ry(s),ci(s,Pt,g)):((a.lanes&u)!==0&&(Dy(a,s),ku(s,null,null,u),Du()),g=a.memoizedState,b=s.memoizedState,g.parent!==m?(g={parent:m,cache:m},s.memoizedState=g,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=g),ci(s,Pt,m)):(m=b.cache,ci(s,Pt,m),m!==g.cache&&Ay(s,[Pt],u,!0))),er(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(n(156,s.tag))}function wa(a){a.flags|=4}function pv(a,s,u,m,g){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(g&335544128)===g)if(a.stateNode.complete)a.flags|=8192;else if(IN())a.flags|=8192;else throw gs=af,My}else a.flags&=-16777217}function cN(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!OO(s))if(IN())a.flags|=8192;else throw gs=af,My}function Sf(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?HS():536870912,a.lanes|=s,Zl|=s)}function Uu(a,s){if(!Le)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var m=null;u!==null;)u.alternate!==null&&(m=u),u=u.sibling;m===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function st(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,m=0;if(s)for(var g=a.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags&65011712,m|=g.flags&65011712,g.return=a,g=g.sibling;else for(g=a.child;g!==null;)u|=g.lanes|g.childLanes,m|=g.subtreeFlags,m|=g.flags,g.return=a,g=g.sibling;return a.subtreeFlags|=m,a.childLanes=u,s}function UI(a,s,u){var m=s.pendingProps;switch(wy(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(s),null;case 1:return st(s),null;case 3:return u=s.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),s.memoizedState.cache!==m&&(s.flags|=2048),xa(Pt),de(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&($l(s)?wa(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Oy())),st(s),null;case 26:var g=s.type,b=s.memoizedState;return a===null?(wa(s),b!==null?(st(s),cN(s,b)):(st(s),pv(s,g,null,m,u))):b?b!==a.memoizedState?(wa(s),st(s),cN(s,b)):(st(s),s.flags&=-16777217):(a=a.memoizedProps,a!==m&&wa(s),st(s),pv(s,g,a,m,u)),null;case 27:if(Se(s),u=Ne.current,g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&wa(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return st(s),null}a=le.current,$l(s)?Hw(s):(a=vO(g,m,u),s.stateNode=a,wa(s))}return st(s),null;case 5:if(Se(s),g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==m&&wa(s);else{if(!m){if(s.stateNode===null)throw Error(n(166));return st(s),null}if(b=le.current,$l(s))Hw(s);else{var _=Lf(Ne.current);switch(b){case 1:b=_.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:b=_.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":b=_.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":b=_.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":b=_.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof m.is=="string"?_.createElement("select",{is:m.is}):_.createElement("select"),m.multiple?b.multiple=!0:m.size&&(b.size=m.size);break;default:b=typeof m.is=="string"?_.createElement(g,{is:m.is}):_.createElement(g)}}b[Zt]=s,b[Ar]=m;e:for(_=s.child;_!==null;){if(_.tag===5||_.tag===6)b.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===s)break e;for(;_.sibling===null;){if(_.return===null||_.return===s)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}s.stateNode=b;e:switch(tr(b,g,m),g){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&wa(s)}}return st(s),pv(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==m&&wa(s);else{if(typeof m!="string"&&s.stateNode===null)throw Error(n(166));if(a=Ne.current,$l(s)){if(a=s.stateNode,u=s.memoizedProps,m=null,g=Wt,g!==null)switch(g.tag){case 27:case 5:m=g.memoizedProps}a[Zt]=s,a=!!(a.nodeValue===u||m!==null&&m.suppressHydrationWarning===!0||sO(a.nodeValue,u)),a||ui(s,!0)}else a=Lf(a).createTextNode(m),a[Zt]=s,s.stateNode=a}return st(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(m=$l(s),u!==null){if(a===null){if(!m)throw Error(n(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(n(557));a[Zt]=s}else hs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),a=!1}else u=Oy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Yr(s),s):(Yr(s),null);if((s.flags&128)!==0)throw Error(n(558))}return st(s),null;case 13:if(m=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=$l(s),m!==null&&m.dehydrated!==null){if(a===null){if(!g)throw Error(n(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(n(317));g[Zt]=s}else hs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;st(s),g=!1}else g=Oy(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return s.flags&256?(Yr(s),s):(Yr(s),null)}return Yr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=m!==null,a=a!==null&&a.memoizedState!==null,u&&(m=s.child,g=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(g=m.alternate.memoizedState.cachePool.pool),b=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(b=m.memoizedState.cachePool.pool),b!==g&&(m.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),Sf(s,s.updateQueue),st(s),null);case 4:return de(),a===null&&Lv(s.stateNode.containerInfo),st(s),null;case 10:return xa(s.type),st(s),null;case 19:if(W(St),m=s.memoizedState,m===null)return st(s),null;if(g=(s.flags&128)!==0,b=m.rendering,b===null)if(g)Uu(m,!1);else{if(vt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(b=uf(a),b!==null){for(s.flags|=128,Uu(m,!1),a=b.updateQueue,s.updateQueue=a,Sf(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)$w(u,a),u=u.sibling;return oe(St,St.current&1|2),Le&&va(s,m.treeForkCount),s.child}a=a.sibling}m.tail!==null&&Te()>Ef&&(s.flags|=128,g=!0,Uu(m,!1),s.lanes=4194304)}else{if(!g)if(a=uf(b),a!==null){if(s.flags|=128,g=!0,a=a.updateQueue,s.updateQueue=a,Sf(s,a),Uu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!b.alternate&&!Le)return st(s),null}else 2*Te()-m.renderingStartTime>Ef&&u!==536870912&&(s.flags|=128,g=!0,Uu(m,!1),s.lanes=4194304);m.isBackwards?(b.sibling=s.child,s.child=b):(a=m.last,a!==null?a.sibling=b:s.child=b,m.last=b)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=Te(),a.sibling=null,u=St.current,oe(St,g?u&1|2:u&1),Le&&va(s,m.treeForkCount),a):(st(s),null);case 22:case 23:return Yr(s),$y(),m=s.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(s.flags|=8192):m&&(s.flags|=8192),m?(u&536870912)!==0&&(s.flags&128)===0&&(st(s),s.subtreeFlags&6&&(s.flags|=8192)):st(s),u=s.updateQueue,u!==null&&Sf(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&&W(ys),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),xa(Pt),st(s),null;case 25:return null;case 30:return null}throw Error(n(156,s.tag))}function qI(a,s){switch(wy(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return xa(Pt),de(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return Se(s),null;case 31:if(s.memoizedState!==null){if(Yr(s),s.alternate===null)throw Error(n(340));hs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Yr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(n(340));hs()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return W(St),null;case 4:return de(),null;case 10:return xa(s.type),null;case 22:case 23:return Yr(s),$y(),a!==null&&W(ys),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return xa(Pt),null;case 25:return null;default:return null}}function dN(a,s){switch(wy(s),s.tag){case 3:xa(Pt),de();break;case 26:case 27:case 5:Se(s);break;case 4:de();break;case 31:s.memoizedState!==null&&Yr(s);break;case 13:Yr(s);break;case 19:W(St);break;case 10:xa(s.type);break;case 22:case 23:Yr(s),$y(),a!==null&&W(ys);break;case 24:xa(Pt)}}function qu(a,s){try{var u=s.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var g=m.next;u=g;do{if((u.tag&a)===a){m=void 0;var b=u.create,_=u.inst;m=b(),_.destroy=m}u=u.next}while(u!==g)}}catch(C){Ve(s,s.return,C)}}function yi(a,s,u){try{var m=s.updateQueue,g=m!==null?m.lastEffect:null;if(g!==null){var b=g.next;m=b;do{if((m.tag&a)===a){var _=m.inst,C=_.destroy;if(C!==void 0){_.destroy=void 0,g=s;var L=u,Y=C;try{Y()}catch(re){Ve(g,L,re)}}}m=m.next}while(m!==b)}}catch(re){Ve(s,s.return,re)}}function fN(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{r1(s,u)}catch(m){Ve(a,a.return,m)}}}function hN(a,s,u){u.props=js(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(m){Ve(a,s,m)}}function Hu(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(g){Ve(a,s,g)}}function Kn(a,s){var u=a.ref,m=a.refCleanup;if(u!==null)if(typeof m=="function")try{m()}catch(g){Ve(a,s,g)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){Ve(a,s,g)}else u.current=null}function mN(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(g){Ve(a,a.return,g)}}function yv(a,s,u){try{var m=a.stateNode;cL(m,a.type,u,s),m[Ar]=s}catch(g){Ve(a,a.return,g)}}function pN(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&wi(a.type)||a.tag===4}function vv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||pN(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&wi(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function gv(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=ma));else if(m!==4&&(m===27&&wi(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(gv(a,s,u),a=a.sibling;a!==null;)gv(a,s,u),a=a.sibling}function wf(a,s,u){var m=a.tag;if(m===5||m===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(m!==4&&(m===27&&wi(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(wf(a,s,u),a=a.sibling;a!==null;)wf(a,s,u),a=a.sibling}function yN(a){var s=a.stateNode,u=a.memoizedProps;try{for(var m=a.type,g=s.attributes;g.length;)s.removeAttributeNode(g[0]);tr(s,m,u),s[Zt]=a,s[Ar]=u}catch(b){Ve(a,a.return,b)}}var Na=!1,Mt=!1,xv=!1,vN=typeof WeakSet=="function"?WeakSet:Set,qt=null;function HI(a,s){if(a=a.containerInfo,Bv=Ff,a=Pw(a),fy(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 g=m.anchorOffset,b=m.focusNode;m=m.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var _=0,C=-1,L=-1,Y=0,re=0,ie=a,X=null;t:for(;;){for(var J;ie!==u||g!==0&&ie.nodeType!==3||(C=_+g),ie!==b||m!==0&&ie.nodeType!==3||(L=_+m),ie.nodeType===3&&(_+=ie.nodeValue.length),(J=ie.firstChild)!==null;)X=ie,ie=J;for(;;){if(ie===a)break t;if(X===u&&++Y===g&&(C=_),X===b&&++re===m&&(L=_),(J=ie.nextSibling)!==null)break;ie=X,X=ie.parentNode}ie=J}u=C===-1||L===-1?null:{start:C,end:L}}else u=null}u=u||{start:0,end:0}}else u=null;for(Uv={focusedElem:a,selectionRange:u},Ff=!1,qt=s;qt!==null;)if(s=qt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,qt=a;else for(;qt!==null;){switch(s=qt,b=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,u=s,g=b.memoizedProps,b=b.memoizedState,m=u.stateNode;try{var me=js(u.type,g);a=m.getSnapshotBeforeUpdate(me,b),m.__reactInternalSnapshotBeforeUpdate=a}catch(je){Ve(u,u.return,je)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)Fv(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Fv(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(n(163))}if(a=s.sibling,a!==null){a.return=s.return,qt=a;break}qt=s.return}}function gN(a,s,u){var m=u.flags;switch(u.tag){case 0:case 11:case 15:_a(a,u),m&4&&qu(5,u);break;case 1:if(_a(a,u),m&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(_){Ve(u,u.return,_)}else{var g=js(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(g,s,a.__reactInternalSnapshotBeforeUpdate)}catch(_){Ve(u,u.return,_)}}m&64&&fN(u),m&512&&Hu(u,u.return);break;case 3:if(_a(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{r1(a,s)}catch(_){Ve(u,u.return,_)}}break;case 27:s===null&&m&4&&yN(u);case 26:case 5:_a(a,u),s===null&&m&4&&mN(u),m&512&&Hu(u,u.return);break;case 12:_a(a,u);break;case 31:_a(a,u),m&4&&jN(a,u);break;case 13:_a(a,u),m&4&&SN(a,u),m&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=WI.bind(null,u),gL(a,u))));break;case 22:if(m=u.memoizedState!==null||Na,!m){s=s!==null&&s.memoizedState!==null||Mt,g=Na;var b=Mt;Na=m,(Mt=s)&&!b?Ea(a,u,(u.subtreeFlags&8772)!==0):_a(a,u),Na=g,Mt=b}break;case 30:break;default:_a(a,u)}}function xN(a){var s=a.alternate;s!==null&&(a.alternate=null,xN(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Qp(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var dt=null,Tr=!1;function Oa(a,s,u){for(u=u.child;u!==null;)bN(a,s,u),u=u.sibling}function bN(a,s,u){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(hu,u)}catch{}switch(u.tag){case 26:Mt||Kn(u,s),Oa(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Mt||Kn(u,s);var m=dt,g=Tr;wi(u.type)&&(dt=u.stateNode,Tr=!1),Oa(a,s,u),Wu(u.stateNode),dt=m,Tr=g;break;case 5:Mt||Kn(u,s);case 6:if(m=dt,g=Tr,dt=null,Oa(a,s,u),dt=m,Tr=g,dt!==null)if(Tr)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(u.stateNode)}catch(b){Ve(u,s,b)}else try{dt.removeChild(u.stateNode)}catch(b){Ve(u,s,b)}break;case 18:dt!==null&&(Tr?(a=dt,fO(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),io(a)):fO(dt,u.stateNode));break;case 4:m=dt,g=Tr,dt=u.stateNode.containerInfo,Tr=!0,Oa(a,s,u),dt=m,Tr=g;break;case 0:case 11:case 14:case 15:yi(2,u,s),Mt||yi(4,u,s),Oa(a,s,u);break;case 1:Mt||(Kn(u,s),m=u.stateNode,typeof m.componentWillUnmount=="function"&&hN(u,s,m)),Oa(a,s,u);break;case 21:Oa(a,s,u);break;case 22:Mt=(m=Mt)||u.memoizedState!==null,Oa(a,s,u),Mt=m;break;default:Oa(a,s,u)}}function jN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{io(a)}catch(u){Ve(s,s.return,u)}}}function SN(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{io(a)}catch(u){Ve(s,s.return,u)}}function FI(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new vN),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new vN),s;default:throw Error(n(435,a.tag))}}function Nf(a,s){var u=FI(a);s.forEach(function(m){if(!u.has(m)){u.add(m);var g=JI.bind(null,a,m);m.then(g,g)}})}function Cr(a,s){var u=s.deletions;if(u!==null)for(var m=0;m<u.length;m++){var g=u[m],b=a,_=s,C=_;e:for(;C!==null;){switch(C.tag){case 27:if(wi(C.type)){dt=C.stateNode,Tr=!1;break e}break;case 5:dt=C.stateNode,Tr=!1;break e;case 3:case 4:dt=C.stateNode.containerInfo,Tr=!0;break e}C=C.return}if(dt===null)throw Error(n(160));bN(b,_,g),dt=null,Tr=!1,b=g.alternate,b!==null&&(b.return=null),g.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)wN(s,a),s=s.sibling}var Tn=null;function wN(a,s){var u=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Cr(s,a),Mr(a),m&4&&(yi(3,a,a.return),qu(3,a),yi(5,a,a.return));break;case 1:Cr(s,a),Mr(a),m&512&&(Mt||u===null||Kn(u,u.return)),m&64&&Na&&(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 g=Tn;if(Cr(s,a),Mr(a),m&512&&(Mt||u===null||Kn(u,u.return)),m&4){var b=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,g=g.ownerDocument||g;t:switch(m){case"title":b=g.getElementsByTagName("title")[0],(!b||b[yu]||b[Zt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=g.createElement(m),g.head.insertBefore(b,g.querySelector("head > title"))),tr(b,m,u),b[Zt]=a,Ut(b),m=b;break e;case"link":var _=wO("link","href",g).get(m+(u.href||""));if(_){for(var C=0;C<_.length;C++)if(b=_[C],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){_.splice(C,1);break t}}b=g.createElement(m),tr(b,m,u),g.head.appendChild(b);break;case"meta":if(_=wO("meta","content",g).get(m+(u.content||""))){for(C=0;C<_.length;C++)if(b=_[C],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){_.splice(C,1);break t}}b=g.createElement(m),tr(b,m,u),g.head.appendChild(b);break;default:throw Error(n(468,m))}b[Zt]=a,Ut(b),m=b}a.stateNode=m}else NO(g,a.type,a.stateNode);else a.stateNode=SO(g,m,a.memoizedProps);else b!==m?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,m===null?NO(g,a.type,a.stateNode):SO(g,m,a.memoizedProps)):m===null&&a.stateNode!==null&&yv(a,a.memoizedProps,u.memoizedProps)}break;case 27:Cr(s,a),Mr(a),m&512&&(Mt||u===null||Kn(u,u.return)),u!==null&&m&4&&yv(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Cr(s,a),Mr(a),m&512&&(Mt||u===null||Kn(u,u.return)),a.flags&32){g=a.stateNode;try{Al(g,"")}catch(me){Ve(a,a.return,me)}}m&4&&a.stateNode!=null&&(g=a.memoizedProps,yv(a,g,u!==null?u.memoizedProps:g)),m&1024&&(xv=!0);break;case 6:if(Cr(s,a),Mr(a),m&4){if(a.stateNode===null)throw Error(n(162));m=a.memoizedProps,u=a.stateNode;try{u.nodeValue=m}catch(me){Ve(a,a.return,me)}}break;case 3:if(Bf=null,g=Tn,Tn=$f(s.containerInfo),Cr(s,a),Tn=g,Mr(a),m&4&&u!==null&&u.memoizedState.isDehydrated)try{io(s.containerInfo)}catch(me){Ve(a,a.return,me)}xv&&(xv=!1,NN(a));break;case 4:m=Tn,Tn=$f(a.stateNode.containerInfo),Cr(s,a),Mr(a),Tn=m;break;case 12:Cr(s,a),Mr(a);break;case 31:Cr(s,a),Mr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Nf(a,m)));break;case 13:Cr(s,a),Mr(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(_f=Te()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Nf(a,m)));break;case 22:g=a.memoizedState!==null;var L=u!==null&&u.memoizedState!==null,Y=Na,re=Mt;if(Na=Y||g,Mt=re||L,Cr(s,a),Mt=re,Na=Y,Mr(a),m&8192)e:for(s=a.stateNode,s._visibility=g?s._visibility&-2:s._visibility|1,g&&(u===null||L||Na||Mt||Ss(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){L=u=s;try{if(b=L.stateNode,g)_=b.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{C=L.stateNode;var ie=L.memoizedProps.style,X=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;C.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(me){Ve(L,L.return,me)}}}else if(s.tag===6){if(u===null){L=s;try{L.stateNode.nodeValue=g?"":L.memoizedProps}catch(me){Ve(L,L.return,me)}}}else if(s.tag===18){if(u===null){L=s;try{var J=L.stateNode;g?hO(J,!0):hO(L.stateNode,!1)}catch(me){Ve(L,L.return,me)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}m&4&&(m=a.updateQueue,m!==null&&(u=m.retryQueue,u!==null&&(m.retryQueue=null,Nf(a,u))));break;case 19:Cr(s,a),Mr(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Nf(a,m)));break;case 30:break;case 21:break;default:Cr(s,a),Mr(a)}}function Mr(a){var s=a.flags;if(s&2){try{for(var u,m=a.return;m!==null;){if(pN(m)){u=m;break}m=m.return}if(u==null)throw Error(n(160));switch(u.tag){case 27:var g=u.stateNode,b=vv(a);wf(a,b,g);break;case 5:var _=u.stateNode;u.flags&32&&(Al(_,""),u.flags&=-33);var C=vv(a);wf(a,C,_);break;case 3:case 4:var L=u.stateNode.containerInfo,Y=vv(a);gv(a,Y,L);break;default:throw Error(n(161))}}catch(re){Ve(a,a.return,re)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function NN(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;NN(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function _a(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)gN(a,s.alternate,s),s=s.sibling}function Ss(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:yi(4,s,s.return),Ss(s);break;case 1:Kn(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&hN(s,s.return,u),Ss(s);break;case 27:Wu(s.stateNode);case 26:case 5:Kn(s,s.return),Ss(s);break;case 22:s.memoizedState===null&&Ss(s);break;case 30:Ss(s);break;default:Ss(s)}a=a.sibling}}function Ea(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var m=s.alternate,g=a,b=s,_=b.flags;switch(b.tag){case 0:case 11:case 15:Ea(g,b,u),qu(4,b);break;case 1:if(Ea(g,b,u),m=b,g=m.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(Y){Ve(m,m.return,Y)}if(m=b,g=m.updateQueue,g!==null){var C=m.stateNode;try{var L=g.shared.hiddenCallbacks;if(L!==null)for(g.shared.hiddenCallbacks=null,g=0;g<L.length;g++)t1(L[g],C)}catch(Y){Ve(m,m.return,Y)}}u&&_&64&&fN(b),Hu(b,b.return);break;case 27:yN(b);case 26:case 5:Ea(g,b,u),u&&m===null&&_&4&&mN(b),Hu(b,b.return);break;case 12:Ea(g,b,u);break;case 31:Ea(g,b,u),u&&_&4&&jN(g,b);break;case 13:Ea(g,b,u),u&&_&4&&SN(g,b);break;case 22:b.memoizedState===null&&Ea(g,b,u),Hu(b,b.return);break;case 30:break;default:Ea(g,b,u)}s=s.sibling}}function bv(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&&Pu(u))}function jv(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Pu(a))}function Cn(a,s,u,m){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)ON(a,s,u,m),s=s.sibling}function ON(a,s,u,m){var g=s.flags;switch(s.tag){case 0:case 11:case 15:Cn(a,s,u,m),g&2048&&qu(9,s);break;case 1:Cn(a,s,u,m);break;case 3:Cn(a,s,u,m),g&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&Pu(a)));break;case 12:if(g&2048){Cn(a,s,u,m),a=s.stateNode;try{var b=s.memoizedProps,_=b.id,C=b.onPostCommit;typeof C=="function"&&C(_,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(L){Ve(s,s.return,L)}}else Cn(a,s,u,m);break;case 31:Cn(a,s,u,m);break;case 13:Cn(a,s,u,m);break;case 23:break;case 22:b=s.stateNode,_=s.alternate,s.memoizedState!==null?b._visibility&2?Cn(a,s,u,m):Fu(a,s):b._visibility&2?Cn(a,s,u,m):(b._visibility|=2,Vl(a,s,u,m,(s.subtreeFlags&10256)!==0||!1)),g&2048&&bv(_,s);break;case 24:Cn(a,s,u,m),g&2048&&jv(s.alternate,s);break;default:Cn(a,s,u,m)}}function Vl(a,s,u,m,g){for(g=g&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var b=a,_=s,C=u,L=m,Y=_.flags;switch(_.tag){case 0:case 11:case 15:Vl(b,_,C,L,g),qu(8,_);break;case 23:break;case 22:var re=_.stateNode;_.memoizedState!==null?re._visibility&2?Vl(b,_,C,L,g):Fu(b,_):(re._visibility|=2,Vl(b,_,C,L,g)),g&&Y&2048&&bv(_.alternate,_);break;case 24:Vl(b,_,C,L,g),g&&Y&2048&&jv(_.alternate,_);break;default:Vl(b,_,C,L,g)}s=s.sibling}}function Fu(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,m=s,g=m.flags;switch(m.tag){case 22:Fu(u,m),g&2048&&bv(m.alternate,m);break;case 24:Fu(u,m),g&2048&&jv(m.alternate,m);break;default:Fu(u,m)}s=s.sibling}}var Ku=8192;function Ql(a,s,u){if(a.subtreeFlags&Ku)for(a=a.child;a!==null;)_N(a,s,u),a=a.sibling}function _N(a,s,u){switch(a.tag){case 26:Ql(a,s,u),a.flags&Ku&&a.memoizedState!==null&&TL(u,Tn,a.memoizedState,a.memoizedProps);break;case 5:Ql(a,s,u);break;case 3:case 4:var m=Tn;Tn=$f(a.stateNode.containerInfo),Ql(a,s,u),Tn=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=Ku,Ku=16777216,Ql(a,s,u),Ku=m):Ql(a,s,u));break;default:Ql(a,s,u)}}function EN(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 Gu(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];qt=m,PN(m,a)}EN(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)AN(a),a=a.sibling}function AN(a){switch(a.tag){case 0:case 11:case 15:Gu(a),a.flags&2048&&yi(9,a,a.return);break;case 3:Gu(a);break;case 12:Gu(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,Of(a)):Gu(a);break;default:Gu(a)}}function Of(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];qt=m,PN(m,a)}EN(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:yi(8,s,s.return),Of(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,Of(s));break;default:Of(s)}a=a.sibling}}function PN(a,s){for(;qt!==null;){var u=qt;switch(u.tag){case 0:case 11:case 15:yi(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:Pu(u.memoizedState.cache)}if(m=u.child,m!==null)m.return=u,qt=m;else e:for(u=a;qt!==null;){m=qt;var g=m.sibling,b=m.return;if(xN(m),m===u){qt=null;break e}if(g!==null){g.return=b,qt=g;break e}qt=b}}}var KI={getCacheForType:function(a){var s=Jt(Pt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return Jt(Pt).controller.signal}},GI=typeof WeakMap=="function"?WeakMap:Map,Ke=0,rt=null,Me=null,ke=0,Ye=0,Vr=null,vi=!1,Xl=!1,Sv=!1,Aa=0,vt=0,gi=0,ws=0,wv=0,Qr=0,Zl=0,Yu=null,Rr=null,Nv=!1,_f=0,TN=0,Ef=1/0,Af=null,xi=null,Dt=0,bi=null,Wl=null,Pa=0,Ov=0,_v=null,CN=null,Vu=0,Ev=null;function Xr(){return(Ke&2)!==0&&ke!==0?ke&-ke:B.T!==null?Rv():YS()}function MN(){if(Qr===0)if((ke&536870912)===0||Le){var a=kd;kd<<=1,(kd&3932160)===0&&(kd=262144),Qr=a}else Qr=536870912;return a=Gr.current,a!==null&&(a.flags|=32),Qr}function Dr(a,s,u){(a===rt&&(Ye===2||Ye===9)||a.cancelPendingCommit!==null)&&(Jl(a,0),ji(a,ke,Qr,!1)),pu(a,u),((Ke&2)===0||a!==rt)&&(a===rt&&((Ke&2)===0&&(ws|=u),vt===4&&ji(a,ke,Qr,!1)),Gn(a))}function RN(a,s,u){if((Ke&6)!==0)throw Error(n(327));var m=!u&&(s&127)===0&&(s&a.expiredLanes)===0||mu(a,s),g=m?QI(a,s):Pv(a,s,!0),b=m;do{if(g===0){Xl&&!m&&ji(a,s,0,!1);break}else{if(u=a.current.alternate,b&&!YI(u)){g=Pv(a,s,!1),b=!1;continue}if(g===2){if(b=s,a.errorRecoveryDisabledLanes&b)var _=0;else _=a.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){s=_;e:{var C=a;g=Yu;var L=C.current.memoizedState.isDehydrated;if(L&&(Jl(C,_).flags|=256),_=Pv(C,_,!1),_!==2){if(Sv&&!L){C.errorRecoveryDisabledLanes|=b,ws|=b,g=4;break e}b=Rr,Rr=g,b!==null&&(Rr===null?Rr=b:Rr.push.apply(Rr,b))}g=_}if(b=!1,g!==2)continue}}if(g===1){Jl(a,0),ji(a,s,0,!0);break}e:{switch(m=a,b=g,b){case 0:case 1:throw Error(n(345));case 4:if((s&4194048)!==s)break;case 6:ji(m,s,Qr,!vi);break e;case 2:Rr=null;break;case 3:case 5:break;default:throw Error(n(329))}if((s&62914560)===s&&(g=_f+300-Te(),10<g)){if(ji(m,s,Qr,!vi),Ld(m,0,!0)!==0)break e;Pa=s,m.timeoutHandle=cO(DN.bind(null,m,u,Rr,Af,Nv,s,Qr,ws,Zl,vi,b,"Throttled",-0,0),g);break e}DN(m,u,Rr,Af,Nv,s,Qr,ws,Zl,vi,b,null,-0,0)}}break}while(!0);Gn(a)}function DN(a,s,u,m,g,b,_,C,L,Y,re,ie,X,J){if(a.timeoutHandle=-1,ie=s.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ma},_N(s,b,ie);var me=(b&62914560)===b?_f-Te():(b&4194048)===b?TN-Te():0;if(me=CL(ie,me),me!==null){Pa=b,a.cancelPendingCommit=me(qN.bind(null,a,s,b,u,m,g,_,C,L,re,ie,null,X,J)),ji(a,b,_,!Y);return}}qN(a,s,b,u,m,g,_,C,L)}function YI(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 g=u[m],b=g.getSnapshot;g=g.value;try{if(!Fr(b(),g))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ji(a,s,u,m){s&=~wv,s&=~ws,a.suspendedLanes|=s,a.pingedLanes&=~s,m&&(a.warmLanes|=s),m=a.expirationTimes;for(var g=s;0<g;){var b=31-Hr(g),_=1<<b;m[b]=-1,g&=~_}u!==0&&FS(a,u,s)}function Pf(){return(Ke&6)===0?(Qu(0),!1):!0}function Av(){if(Me!==null){if(Ye===0)var a=Me.return;else a=Me,ga=ms=null,Fy(a),Hl=null,Cu=0,a=Me;for(;a!==null;)dN(a.alternate,a),a=a.return;Me=null}}function Jl(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,hL(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Pa=0,Av(),rt=a,Me=u=ya(a.current,null),ke=s,Ye=0,Vr=null,vi=!1,Xl=mu(a,s),Sv=!1,Zl=Qr=wv=ws=gi=vt=0,Rr=Yu=null,Nv=!1,(s&8)!==0&&(s|=s&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=s;0<m;){var g=31-Hr(m),b=1<<g;s|=a[g],m&=~b}return Aa=s,Qd(),u}function kN(a,s){Ee=null,B.H=zu,s===ql||s===nf?(s=Zw(),Ye=3):s===My?(s=Zw(),Ye=4):Ye=s===sv?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Vr=s,Me===null&&(vt=1,gf(a,un(s,a.current)))}function IN(){var a=Gr.current;return a===null?!0:(ke&4194048)===ke?hn===null:(ke&62914560)===ke||(ke&536870912)!==0?a===hn:!1}function LN(){var a=B.H;return B.H=zu,a===null?zu:a}function $N(){var a=B.A;return B.A=KI,a}function Tf(){vt=4,vi||(ke&4194048)!==ke&&Gr.current!==null||(Xl=!0),(gi&134217727)===0&&(ws&134217727)===0||rt===null||ji(rt,ke,Qr,!1)}function Pv(a,s,u){var m=Ke;Ke|=2;var g=LN(),b=$N();(rt!==a||ke!==s)&&(Af=null,Jl(a,s)),s=!1;var _=vt;e:do try{if(Ye!==0&&Me!==null){var C=Me,L=Vr;switch(Ye){case 8:Av(),_=6;break e;case 3:case 2:case 9:case 6:Gr.current===null&&(s=!0);var Y=Ye;if(Ye=0,Vr=null,eo(a,C,L,Y),u&&Xl){_=0;break e}break;default:Y=Ye,Ye=0,Vr=null,eo(a,C,L,Y)}}VI(),_=vt;break}catch(re){kN(a,re)}while(!0);return s&&a.shellSuspendCounter++,ga=ms=null,Ke=m,B.H=g,B.A=b,Me===null&&(rt=null,ke=0,Qd()),_}function VI(){for(;Me!==null;)zN(Me)}function QI(a,s){var u=Ke;Ke|=2;var m=LN(),g=$N();rt!==a||ke!==s?(Af=null,Ef=Te()+500,Jl(a,s)):Xl=mu(a,s);e:do try{if(Ye!==0&&Me!==null){s=Me;var b=Vr;t:switch(Ye){case 1:Ye=0,Vr=null,eo(a,s,b,1);break;case 2:case 9:if(Qw(b)){Ye=0,Vr=null,BN(s);break}s=function(){Ye!==2&&Ye!==9||rt!==a||(Ye=7),Gn(a)},b.then(s,s);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:Qw(b)?(Ye=0,Vr=null,BN(s)):(Ye=0,Vr=null,eo(a,s,b,7));break;case 5:var _=null;switch(Me.tag){case 26:_=Me.memoizedState;case 5:case 27:var C=Me;if(_?OO(_):C.stateNode.complete){Ye=0,Vr=null;var L=C.sibling;if(L!==null)Me=L;else{var Y=C.return;Y!==null?(Me=Y,Cf(Y)):Me=null}break t}}Ye=0,Vr=null,eo(a,s,b,5);break;case 6:Ye=0,Vr=null,eo(a,s,b,6);break;case 8:Av(),vt=6;break e;default:throw Error(n(462))}}XI();break}catch(re){kN(a,re)}while(!0);return ga=ms=null,B.H=m,B.A=g,Ke=u,Me!==null?0:(rt=null,ke=0,Qd(),vt)}function XI(){for(;Me!==null&&!Fp();)zN(Me)}function zN(a){var s=uN(a.alternate,a,Aa);a.memoizedProps=a.pendingProps,s===null?Cf(a):Me=s}function BN(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=nN(u,s,s.pendingProps,s.type,void 0,ke);break;case 11:s=nN(u,s,s.pendingProps,s.type.render,s.ref,ke);break;case 5:Fy(s);default:dN(u,s),s=Me=$w(s,Aa),s=uN(u,s,Aa)}a.memoizedProps=a.pendingProps,s===null?Cf(a):Me=s}function eo(a,s,u,m){ga=ms=null,Fy(s),Hl=null,Cu=0;var g=s.return;try{if($I(a,g,s,u,ke)){vt=1,gf(a,un(u,a.current)),Me=null;return}}catch(b){if(g!==null)throw Me=g,b;vt=1,gf(a,un(u,a.current)),Me=null;return}s.flags&32768?(Le||m===1?a=!0:Xl||(ke&536870912)!==0?a=!1:(vi=a=!0,(m===2||m===9||m===3||m===6)&&(m=Gr.current,m!==null&&m.tag===13&&(m.flags|=16384))),UN(s,a)):Cf(s)}function Cf(a){var s=a;do{if((s.flags&32768)!==0){UN(s,vi);return}a=s.return;var u=UI(s.alternate,s,Aa);if(u!==null){Me=u;return}if(s=s.sibling,s!==null){Me=s;return}Me=s=a}while(s!==null);vt===0&&(vt=5)}function UN(a,s){do{var u=qI(a.alternate,a);if(u!==null){u.flags&=32767,Me=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Me=a;return}Me=a=u}while(a!==null);vt=6,Me=null}function qN(a,s,u,m,g,b,_,C,L){a.cancelPendingCommit=null;do Mf();while(Dt!==0);if((Ke&6)!==0)throw Error(n(327));if(s!==null){if(s===a.current)throw Error(n(177));if(b=s.lanes|s.childLanes,b|=vy,P5(a,u,b,_,C,L),a===rt&&(Me=rt=null,ke=0),Wl=s,bi=a,Pa=u,Ov=b,_v=g,CN=m,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,eL(Rd,function(){return YN(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||m){m=B.T,B.T=null,g=K.p,K.p=2,_=Ke,Ke|=4;try{HI(a,s,u)}finally{Ke=_,K.p=g,B.T=m}}Dt=1,HN(),FN(),KN()}}function HN(){if(Dt===1){Dt=0;var a=bi,s=Wl,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=B.T,B.T=null;var m=K.p;K.p=2;var g=Ke;Ke|=4;try{wN(s,a);var b=Uv,_=Pw(a.containerInfo),C=b.focusedElem,L=b.selectionRange;if(_!==C&&C&&C.ownerDocument&&Aw(C.ownerDocument.documentElement,C)){if(L!==null&&fy(C)){var Y=L.start,re=L.end;if(re===void 0&&(re=Y),"selectionStart"in C)C.selectionStart=Y,C.selectionEnd=Math.min(re,C.value.length);else{var ie=C.ownerDocument||document,X=ie&&ie.defaultView||window;if(X.getSelection){var J=X.getSelection(),me=C.textContent.length,je=Math.min(L.start,me),et=L.end===void 0?je:Math.min(L.end,me);!J.extend&&je>et&&(_=et,et=je,je=_);var F=Ew(C,je),U=Ew(C,et);if(F&&U&&(J.rangeCount!==1||J.anchorNode!==F.node||J.anchorOffset!==F.offset||J.focusNode!==U.node||J.focusOffset!==U.offset)){var G=ie.createRange();G.setStart(F.node,F.offset),J.removeAllRanges(),je>et?(J.addRange(G),J.extend(U.node,U.offset)):(G.setEnd(U.node,U.offset),J.addRange(G))}}}}for(ie=[],J=C;J=J.parentNode;)J.nodeType===1&&ie.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof C.focus=="function"&&C.focus(),C=0;C<ie.length;C++){var ne=ie[C];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}Ff=!!Bv,Uv=Bv=null}finally{Ke=g,K.p=m,B.T=u}}a.current=s,Dt=2}}function FN(){if(Dt===2){Dt=0;var a=bi,s=Wl,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=B.T,B.T=null;var m=K.p;K.p=2;var g=Ke;Ke|=4;try{gN(a,s.alternate,s)}finally{Ke=g,K.p=m,B.T=u}}Dt=3}}function KN(){if(Dt===4||Dt===3){Dt=0,Cd();var a=bi,s=Wl,u=Pa,m=CN;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Dt=5:(Dt=0,Wl=bi=null,GN(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(xi=null),Yp(u),s=s.stateNode,qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(hu,s,void 0,(s.current.flags&128)===128)}catch{}if(m!==null){s=B.T,g=K.p,K.p=2,B.T=null;try{for(var b=a.onRecoverableError,_=0;_<m.length;_++){var C=m[_];b(C.value,{componentStack:C.stack})}}finally{B.T=s,K.p=g}}(Pa&3)!==0&&Mf(),Gn(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===Ev?Vu++:(Vu=0,Ev=a):Vu=0,Qu(0)}}function GN(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,Pu(s)))}function Mf(){return HN(),FN(),KN(),YN()}function YN(){if(Dt!==5)return!1;var a=bi,s=Ov;Ov=0;var u=Yp(Pa),m=B.T,g=K.p;try{K.p=32>u?32:u,B.T=null,u=_v,_v=null;var b=bi,_=Pa;if(Dt=0,Wl=bi=null,Pa=0,(Ke&6)!==0)throw Error(n(331));var C=Ke;if(Ke|=4,AN(b.current),ON(b,b.current,_,u),Ke=C,Qu(0,!1),qr&&typeof qr.onPostCommitFiberRoot=="function")try{qr.onPostCommitFiberRoot(hu,b)}catch{}return!0}finally{K.p=g,B.T=m,GN(a,s)}}function VN(a,s,u){s=un(u,s),s=iv(a.stateNode,s,2),a=hi(a,s,2),a!==null&&(pu(a,2),Gn(a))}function Ve(a,s,u){if(a.tag===3)VN(a,a,u);else for(;s!==null;){if(s.tag===3){VN(s,a,u);break}else if(s.tag===1){var m=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(xi===null||!xi.has(m))){a=un(u,a),u=Q1(2),m=hi(s,u,2),m!==null&&(X1(u,m,s,a),pu(m,2),Gn(m));break}}s=s.return}}function Tv(a,s,u){var m=a.pingCache;if(m===null){m=a.pingCache=new GI;var g=new Set;m.set(s,g)}else g=m.get(s),g===void 0&&(g=new Set,m.set(s,g));g.has(u)||(Sv=!0,g.add(u),a=ZI.bind(null,a,s,u),s.then(a,a))}function ZI(a,s,u){var m=a.pingCache;m!==null&&m.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,rt===a&&(ke&u)===u&&(vt===4||vt===3&&(ke&62914560)===ke&&300>Te()-_f?(Ke&2)===0&&Jl(a,0):wv|=u,Zl===ke&&(Zl=0)),Gn(a)}function QN(a,s){s===0&&(s=HS()),a=ds(a,s),a!==null&&(pu(a,s),Gn(a))}function WI(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),QN(a,u)}function JI(a,s){var u=0;switch(a.tag){case 31:case 13:var m=a.stateNode,g=a.memoizedState;g!==null&&(u=g.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),QN(a,u)}function eL(a,s){return fu(a,s)}var Rf=null,to=null,Cv=!1,Df=!1,Mv=!1,Si=0;function Gn(a){a!==to&&a.next===null&&(to===null?Rf=to=a:to=to.next=a),Df=!0,Cv||(Cv=!0,rL())}function Qu(a,s){if(!Mv&&Df){Mv=!0;do for(var u=!1,m=Rf;m!==null;){if(a!==0){var g=m.pendingLanes;if(g===0)var b=0;else{var _=m.suspendedLanes,C=m.pingedLanes;b=(1<<31-Hr(42|a)+1)-1,b&=g&~(_&~C),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,JN(m,b))}else b=ke,b=Ld(m,m===rt?b:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(b&3)===0||mu(m,b)||(u=!0,JN(m,b));m=m.next}while(u);Mv=!1}}function tL(){XN()}function XN(){Df=Cv=!1;var a=0;Si!==0&&fL()&&(a=Si);for(var s=Te(),u=null,m=Rf;m!==null;){var g=m.next,b=ZN(m,s);b===0?(m.next=null,u===null?Rf=g:u.next=g,g===null&&(to=u)):(u=m,(a!==0||(b&3)!==0)&&(Df=!0)),m=g}Dt!==0&&Dt!==5||Qu(a),Si!==0&&(Si=0)}function ZN(a,s){for(var u=a.suspendedLanes,m=a.pingedLanes,g=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var _=31-Hr(b),C=1<<_,L=g[_];L===-1?((C&u)===0||(C&m)!==0)&&(g[_]=A5(C,s)):L<=s&&(a.expiredLanes|=C),b&=~C}if(s=rt,u=ke,u=Ld(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,u===0||a===s&&(Ye===2||Ye===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&jl(m),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||mu(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(m!==null&&jl(m),Yp(u)){case 2:case 8:u=Md;break;case 32:u=Rd;break;case 268435456:u=qS;break;default:u=Rd}return m=WN.bind(null,a),u=fu(u,m),a.callbackPriority=s,a.callbackNode=u,s}return m!==null&&m!==null&&jl(m),a.callbackPriority=2,a.callbackNode=null,2}function WN(a,s){if(Dt!==0&&Dt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(Mf()&&a.callbackNode!==u)return null;var m=ke;return m=Ld(a,a===rt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(RN(a,m,s),ZN(a,Te()),a.callbackNode!=null&&a.callbackNode===u?WN.bind(null,a):null)}function JN(a,s){if(Mf())return null;RN(a,s,!0)}function rL(){mL(function(){(Ke&6)!==0?fu(qn,tL):XN()})}function Rv(){if(Si===0){var a=Bl;a===0&&(a=Dd,Dd<<=1,(Dd&261888)===0&&(Dd=256)),Si=a}return Si}function eO(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Ud(""+a)}function tO(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 nL(a,s,u,m,g){if(s==="submit"&&u&&u.stateNode===g){var b=eO((g[Ar]||null).action),_=m.submitter;_&&(s=(s=_[Ar]||null)?eO(s.formAction):_.getAttribute("formAction"),s!==null&&(b=s,_=null));var C=new Kd("action","action",null,m,g);a.push({event:C,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Si!==0){var L=_?tO(g,_):new FormData(g);Jy(u,{pending:!0,data:L,method:g.method,action:b},null,L)}}else typeof b=="function"&&(C.preventDefault(),L=_?tO(g,_):new FormData(g),Jy(u,{pending:!0,data:L,method:g.method,action:b},b,L))},currentTarget:g}]})}}for(var Dv=0;Dv<yy.length;Dv++){var kv=yy[Dv],aL=kv.toLowerCase(),iL=kv[0].toUpperCase()+kv.slice(1);Pn(aL,"on"+iL)}Pn(Mw,"onAnimationEnd"),Pn(Rw,"onAnimationIteration"),Pn(Dw,"onAnimationStart"),Pn("dblclick","onDoubleClick"),Pn("focusin","onFocus"),Pn("focusout","onBlur"),Pn(jI,"onTransitionRun"),Pn(SI,"onTransitionStart"),Pn(wI,"onTransitionCancel"),Pn(kw,"onTransitionEnd"),_l("onMouseEnter",["mouseout","mouseover"]),_l("onMouseLeave",["mouseout","mouseover"]),_l("onPointerEnter",["pointerout","pointerover"]),_l("onPointerLeave",["pointerout","pointerover"]),ls("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ls("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ls("onBeforeInput",["compositionend","keypress","textInput","paste"]),ls("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ls("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ls("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xu="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(" "),sL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Xu));function rO(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var m=a[u],g=m.event;m=m.listeners;e:{var b=void 0;if(s)for(var _=m.length-1;0<=_;_--){var C=m[_],L=C.instance,Y=C.currentTarget;if(C=C.listener,L!==b&&g.isPropagationStopped())break e;b=C,g.currentTarget=Y;try{b(g)}catch(re){Vd(re)}g.currentTarget=null,b=L}else for(_=0;_<m.length;_++){if(C=m[_],L=C.instance,Y=C.currentTarget,C=C.listener,L!==b&&g.isPropagationStopped())break e;b=C,g.currentTarget=Y;try{b(g)}catch(re){Vd(re)}g.currentTarget=null,b=L}}}}function Re(a,s){var u=s[Vp];u===void 0&&(u=s[Vp]=new Set);var m=a+"__bubble";u.has(m)||(nO(s,a,2,!1),u.add(m))}function Iv(a,s,u){var m=0;s&&(m|=4),nO(u,a,m,s)}var kf="_reactListening"+Math.random().toString(36).slice(2);function Lv(a){if(!a[kf]){a[kf]=!0,XS.forEach(function(u){u!=="selectionchange"&&(sL.has(u)||Iv(u,!1,a),Iv(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[kf]||(s[kf]=!0,Iv("selectionchange",!1,s))}}function nO(a,s,u,m){switch(MO(s)){case 2:var g=DL;break;case 8:g=kL;break;default:g=Wv}u=g.bind(null,s,u,a),g=void 0,!ny||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),m?g!==void 0?a.addEventListener(s,u,{capture:!0,passive:g}):a.addEventListener(s,u,!0):g!==void 0?a.addEventListener(s,u,{passive:g}):a.addEventListener(s,u,!1)}function $v(a,s,u,m,g){var b=m;if((s&1)===0&&(s&2)===0&&m!==null)e:for(;;){if(m===null)return;var _=m.tag;if(_===3||_===4){var C=m.stateNode.containerInfo;if(C===g)break;if(_===4)for(_=m.return;_!==null;){var L=_.tag;if((L===3||L===4)&&_.stateNode.containerInfo===g)return;_=_.return}for(;C!==null;){if(_=wl(C),_===null)return;if(L=_.tag,L===5||L===6||L===26||L===27){m=b=_;continue e}C=C.parentNode}}m=m.return}ow(function(){var Y=b,re=ty(u),ie=[];e:{var X=Iw.get(a);if(X!==void 0){var J=Kd,me=a;switch(a){case"keypress":if(Hd(u)===0)break e;case"keydown":case"keyup":J=J5;break;case"focusin":me="focus",J=ly;break;case"focusout":me="blur",J=ly;break;case"beforeblur":case"afterblur":J=ly;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=dw;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=U5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=rI;break;case Mw:case Rw:case Dw:J=F5;break;case kw:J=aI;break;case"scroll":case"scrollend":J=z5;break;case"wheel":J=sI;break;case"copy":case"cut":case"paste":J=G5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=hw;break;case"toggle":case"beforetoggle":J=oI}var je=(s&4)!==0,et=!je&&(a==="scroll"||a==="scrollend"),F=je?X!==null?X+"Capture":null:X;je=[];for(var U=Y,G;U!==null;){var ne=U;if(G=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||G===null||F===null||(ne=gu(U,F),ne!=null&&je.push(Zu(U,ne,G))),et)break;U=U.return}0<je.length&&(X=new J(X,me,null,u,re),ie.push({event:X,listeners:je}))}}if((s&7)===0){e:{if(X=a==="mouseover"||a==="pointerover",J=a==="mouseout"||a==="pointerout",X&&u!==ey&&(me=u.relatedTarget||u.fromElement)&&(wl(me)||me[Sl]))break e;if((J||X)&&(X=re.window===re?re:(X=re.ownerDocument)?X.defaultView||X.parentWindow:window,J?(me=u.relatedTarget||u.toElement,J=Y,me=me?wl(me):null,me!==null&&(et=l(me),je=me.tag,me!==et||je!==5&&je!==27&&je!==6)&&(me=null)):(J=null,me=Y),J!==me)){if(je=dw,ne="onMouseLeave",F="onMouseEnter",U="mouse",(a==="pointerout"||a==="pointerover")&&(je=hw,ne="onPointerLeave",F="onPointerEnter",U="pointer"),et=J==null?X:vu(J),G=me==null?X:vu(me),X=new je(ne,U+"leave",J,u,re),X.target=et,X.relatedTarget=G,ne=null,wl(re)===Y&&(je=new je(F,U+"enter",me,u,re),je.target=G,je.relatedTarget=et,ne=je),et=ne,J&&me)t:{for(je=lL,F=J,U=me,G=0,ne=F;ne;ne=je(ne))G++;ne=0;for(var be=U;be;be=je(be))ne++;for(;0<G-ne;)F=je(F),G--;for(;0<ne-G;)U=je(U),ne--;for(;G--;){if(F===U||U!==null&&F===U.alternate){je=F;break t}F=je(F),U=je(U)}je=null}else je=null;J!==null&&aO(ie,X,J,je,!1),me!==null&&et!==null&&aO(ie,et,me,je,!0)}}e:{if(X=Y?vu(Y):window,J=X.nodeName&&X.nodeName.toLowerCase(),J==="select"||J==="input"&&X.type==="file")var qe=jw;else if(xw(X))if(Sw)qe=gI;else{qe=yI;var ve=pI}else J=X.nodeName,!J||J.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Y&&Jp(Y.elementType)&&(qe=jw):qe=vI;if(qe&&(qe=qe(a,Y))){bw(ie,qe,u,re);break e}ve&&ve(a,X,Y),a==="focusout"&&Y&&X.type==="number"&&Y.memoizedProps.value!=null&&Wp(X,"number",X.value)}switch(ve=Y?vu(Y):window,a){case"focusin":(xw(ve)||ve.contentEditable==="true")&&(Ml=ve,hy=Y,_u=null);break;case"focusout":_u=hy=Ml=null;break;case"mousedown":my=!0;break;case"contextmenu":case"mouseup":case"dragend":my=!1,Tw(ie,u,re);break;case"selectionchange":if(bI)break;case"keydown":case"keyup":Tw(ie,u,re)}var Ae;if(uy)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 Cl?vw(a,u)&&(Ie="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Ie="onCompositionStart");Ie&&(mw&&u.locale!=="ko"&&(Cl||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Cl&&(Ae=uw()):(si=re,ay="value"in si?si.value:si.textContent,Cl=!0)),ve=If(Y,Ie),0<ve.length&&(Ie=new fw(Ie,a,null,u,re),ie.push({event:Ie,listeners:ve}),Ae?Ie.data=Ae:(Ae=gw(u),Ae!==null&&(Ie.data=Ae)))),(Ae=cI?dI(a,u):fI(a,u))&&(Ie=If(Y,"onBeforeInput"),0<Ie.length&&(ve=new fw("onBeforeInput","beforeinput",null,u,re),ie.push({event:ve,listeners:Ie}),ve.data=Ae)),nL(ie,a,Y,u,re)}rO(ie,s)})}function Zu(a,s,u){return{instance:a,listener:s,currentTarget:u}}function If(a,s){for(var u=s+"Capture",m=[];a!==null;){var g=a,b=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||b===null||(g=gu(a,u),g!=null&&m.unshift(Zu(a,g,b)),g=gu(a,s),g!=null&&m.push(Zu(a,g,b))),a.tag===3)return m;a=a.return}return[]}function lL(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function aO(a,s,u,m,g){for(var b=s._reactName,_=[];u!==null&&u!==m;){var C=u,L=C.alternate,Y=C.stateNode;if(C=C.tag,L!==null&&L===m)break;C!==5&&C!==26&&C!==27||Y===null||(L=Y,g?(Y=gu(u,b),Y!=null&&_.unshift(Zu(u,Y,L))):g||(Y=gu(u,b),Y!=null&&_.push(Zu(u,Y,L)))),u=u.return}_.length!==0&&a.push({event:s,listeners:_})}var oL=/\r\n?/g,uL=/\u0000|\uFFFD/g;function iO(a){return(typeof a=="string"?a:""+a).replace(oL,`
|
|
49
|
-
`).replace(uL,"")}function sO(a,s){return s=iO(s),iO(a)===s}function Je(a,s,u,m,g,b){switch(u){case"children":typeof m=="string"?s==="body"||s==="textarea"&&m===""||Al(a,m):(typeof m=="number"||typeof m=="bigint")&&s!=="body"&&Al(a,""+m);break;case"className":zd(a,"class",m);break;case"tabIndex":zd(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":zd(a,u,m);break;case"style":sw(a,m,b);break;case"data":if(s!=="object"){zd(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=Ud(""+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 b=="function"&&(u==="formAction"?(s!=="input"&&Je(a,s,"name",g.name,g,null),Je(a,s,"formEncType",g.formEncType,g,null),Je(a,s,"formMethod",g.formMethod,g,null),Je(a,s,"formTarget",g.formTarget,g,null)):(Je(a,s,"encType",g.encType,g,null),Je(a,s,"method",g.method,g,null),Je(a,s,"target",g.target,g,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(u);break}m=Ud(""+m),a.setAttribute(u,m);break;case"onClick":m!=null&&(a.onclick=ma);break;case"onScroll":m!=null&&Re("scroll",a);break;case"onScrollEnd":m!=null&&Re("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(g.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=Ud(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""+m):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":m===!0?a.setAttribute(u,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(u,m):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(u,m):a.removeAttribute(u);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(u):a.setAttribute(u,m);break;case"popover":Re("beforetoggle",a),Re("toggle",a),$d(a,"popover",m);break;case"xlinkActuate":ha(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":ha(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":ha(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":ha(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":ha(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":ha(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":ha(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":ha(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":ha(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":$d(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=L5.get(u)||u,$d(a,u,m))}}function zv(a,s,u,m,g,b){switch(u){case"style":sw(a,m,b);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(u=m.__html,u!=null){if(g.children!=null)throw Error(n(60));a.innerHTML=u}}break;case"children":typeof m=="string"?Al(a,m):(typeof m=="number"||typeof m=="bigint")&&Al(a,""+m);break;case"onScroll":m!=null&&Re("scroll",a);break;case"onScrollEnd":m!=null&&Re("scrollend",a);break;case"onClick":m!=null&&(a.onclick=ma);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ZS.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),s=u.slice(2,g?u.length-7:void 0),b=a[Ar]||null,b=b!=null?b[u]:null,typeof b=="function"&&a.removeEventListener(s,b,g),typeof m=="function")){typeof b!="function"&&b!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,m,g);break e}u in a?a[u]=m:m===!0?a.setAttribute(u,""):$d(a,u,m)}}}function tr(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Re("error",a),Re("load",a);var m=!1,g=!1,b;for(b in u)if(u.hasOwnProperty(b)){var _=u[b];if(_!=null)switch(b){case"src":m=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,b,_,u,null)}}g&&Je(a,s,"srcSet",u.srcSet,u,null),m&&Je(a,s,"src",u.src,u,null);return;case"input":Re("invalid",a);var C=b=_=g=null,L=null,Y=null;for(m in u)if(u.hasOwnProperty(m)){var re=u[m];if(re!=null)switch(m){case"name":g=re;break;case"type":_=re;break;case"checked":L=re;break;case"defaultChecked":Y=re;break;case"value":b=re;break;case"defaultValue":C=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(n(137,s));break;default:Je(a,s,m,re,u,null)}}rw(a,b,C,L,Y,_,g,!1);return;case"select":Re("invalid",a),m=_=b=null;for(g in u)if(u.hasOwnProperty(g)&&(C=u[g],C!=null))switch(g){case"value":b=C;break;case"defaultValue":_=C;break;case"multiple":m=C;default:Je(a,s,g,C,u,null)}s=b,u=_,a.multiple=!!m,s!=null?El(a,!!m,s,!1):u!=null&&El(a,!!m,u,!0);return;case"textarea":Re("invalid",a),b=g=m=null;for(_ in u)if(u.hasOwnProperty(_)&&(C=u[_],C!=null))switch(_){case"value":m=C;break;case"defaultValue":g=C;break;case"children":b=C;break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(n(91));break;default:Je(a,s,_,C,u,null)}aw(a,m,g,b);return;case"option":for(L in u)if(u.hasOwnProperty(L)&&(m=u[L],m!=null))switch(L){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:Je(a,s,L,m,u,null)}return;case"dialog":Re("beforetoggle",a),Re("toggle",a),Re("cancel",a),Re("close",a);break;case"iframe":case"object":Re("load",a);break;case"video":case"audio":for(m=0;m<Xu.length;m++)Re(Xu[m],a);break;case"image":Re("error",a),Re("load",a);break;case"details":Re("toggle",a);break;case"embed":case"source":case"link":Re("error",a),Re("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in u)if(u.hasOwnProperty(Y)&&(m=u[Y],m!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,s));default:Je(a,s,Y,m,u,null)}return;default:if(Jp(s)){for(re in u)u.hasOwnProperty(re)&&(m=u[re],m!==void 0&&zv(a,s,re,m,u,void 0));return}}for(C in u)u.hasOwnProperty(C)&&(m=u[C],m!=null&&Je(a,s,C,m,u,null))}function cL(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 g=null,b=null,_=null,C=null,L=null,Y=null,re=null;for(J in u){var ie=u[J];if(u.hasOwnProperty(J)&&ie!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":L=ie;default:m.hasOwnProperty(J)||Je(a,s,J,null,m,ie)}}for(var X in m){var J=m[X];if(ie=u[X],m.hasOwnProperty(X)&&(J!=null||ie!=null))switch(X){case"type":b=J;break;case"name":g=J;break;case"checked":Y=J;break;case"defaultChecked":re=J;break;case"value":_=J;break;case"defaultValue":C=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(n(137,s));break;default:J!==ie&&Je(a,s,X,J,m,ie)}}Zp(a,_,C,L,Y,re,b,g);return;case"select":J=_=C=X=null;for(b in u)if(L=u[b],u.hasOwnProperty(b)&&L!=null)switch(b){case"value":break;case"multiple":J=L;default:m.hasOwnProperty(b)||Je(a,s,b,null,m,L)}for(g in m)if(b=m[g],L=u[g],m.hasOwnProperty(g)&&(b!=null||L!=null))switch(g){case"value":X=b;break;case"defaultValue":C=b;break;case"multiple":_=b;default:b!==L&&Je(a,s,g,b,m,L)}s=C,u=_,m=J,X!=null?El(a,!!u,X,!1):!!m!=!!u&&(s!=null?El(a,!!u,s,!0):El(a,!!u,u?[]:"",!1));return;case"textarea":J=X=null;for(C in u)if(g=u[C],u.hasOwnProperty(C)&&g!=null&&!m.hasOwnProperty(C))switch(C){case"value":break;case"children":break;default:Je(a,s,C,null,m,g)}for(_ in m)if(g=m[_],b=u[_],m.hasOwnProperty(_)&&(g!=null||b!=null))switch(_){case"value":X=g;break;case"defaultValue":J=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(n(91));break;default:g!==b&&Je(a,s,_,g,m,b)}nw(a,X,J);return;case"option":for(var me in u)if(X=u[me],u.hasOwnProperty(me)&&X!=null&&!m.hasOwnProperty(me))switch(me){case"selected":a.selected=!1;break;default:Je(a,s,me,null,m,X)}for(L in m)if(X=m[L],J=u[L],m.hasOwnProperty(L)&&X!==J&&(X!=null||J!=null))switch(L){case"selected":a.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:Je(a,s,L,X,m,J)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in u)X=u[je],u.hasOwnProperty(je)&&X!=null&&!m.hasOwnProperty(je)&&Je(a,s,je,null,m,X);for(Y in m)if(X=m[Y],J=u[Y],m.hasOwnProperty(Y)&&X!==J&&(X!=null||J!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(n(137,s));break;default:Je(a,s,Y,X,m,J)}return;default:if(Jp(s)){for(var et in u)X=u[et],u.hasOwnProperty(et)&&X!==void 0&&!m.hasOwnProperty(et)&&zv(a,s,et,void 0,m,X);for(re in m)X=m[re],J=u[re],!m.hasOwnProperty(re)||X===J||X===void 0&&J===void 0||zv(a,s,re,X,m,J);return}}for(var F in u)X=u[F],u.hasOwnProperty(F)&&X!=null&&!m.hasOwnProperty(F)&&Je(a,s,F,null,m,X);for(ie in m)X=m[ie],J=u[ie],!m.hasOwnProperty(ie)||X===J||X==null&&J==null||Je(a,s,ie,X,m,J)}function lO(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dL(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),m=0;m<u.length;m++){var g=u[m],b=g.transferSize,_=g.initiatorType,C=g.duration;if(b&&C&&lO(_)){for(_=0,C=g.responseEnd,m+=1;m<u.length;m++){var L=u[m],Y=L.startTime;if(Y>C)break;var re=L.transferSize,ie=L.initiatorType;re&&lO(ie)&&(L=L.responseEnd,_+=re*(L<C?1:(C-Y)/(L-Y)))}if(--m,s+=8*(b+_)/(g.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Bv=null,Uv=null;function Lf(a){return a.nodeType===9?a:a.ownerDocument}function oO(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function uO(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 qv(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 Hv=null;function fL(){var a=window.event;return a&&a.type==="popstate"?a===Hv?!1:(Hv=a,!0):(Hv=null,!1)}var cO=typeof setTimeout=="function"?setTimeout:void 0,hL=typeof clearTimeout=="function"?clearTimeout:void 0,dO=typeof Promise=="function"?Promise:void 0,mL=typeof queueMicrotask=="function"?queueMicrotask:typeof dO<"u"?function(a){return dO.resolve(null).then(a).catch(pL)}:cO;function pL(a){setTimeout(function(){throw a})}function wi(a){return a==="head"}function fO(a,s){var u=s,m=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(m===0){a.removeChild(g),io(s);return}m--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")m++;else if(u==="html")Wu(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,Wu(u);for(var b=u.firstChild;b;){var _=b.nextSibling,C=b.nodeName;b[yu]||C==="SCRIPT"||C==="STYLE"||C==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=_}}else u==="body"&&Wu(a.ownerDocument.body);u=g}while(u);io(s)}function hO(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 Fv(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":Fv(u),Qp(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function yL(a,s,u,m){for(;a.nodeType===1;){var g=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[yu])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==g.rel||a.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||a.getAttribute("title")!==(g.title==null?null:g.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(g.src==null?null:g.src)||a.getAttribute("type")!==(g.type==null?null:g.type)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var b=g.name==null?null:""+g.name;if(g.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=mn(a.nextSibling),a===null)break}return null}function vL(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=mn(a.nextSibling),a===null))return null;return a}function mO(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=mn(a.nextSibling),a===null))return null;return a}function Kv(a){return a.data==="$?"||a.data==="$~"}function Gv(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function gL(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 mn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var Yv=null;function pO(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return mn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function yO(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 vO(a,s,u){switch(s=Lf(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 Wu(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Qp(a)}var pn=new Map,gO=new Set;function $f(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ta=K.d;K.d={f:xL,r:bL,D:jL,C:SL,L:wL,m:NL,X:_L,S:OL,M:EL};function xL(){var a=Ta.f(),s=Pf();return a||s}function bL(a){var s=Nl(a);s!==null&&s.tag===5&&s.type==="form"?k1(s):Ta.r(a)}var ro=typeof document>"u"?null:document;function xO(a,s,u){var m=ro;if(m&&typeof s=="string"&&s){var g=ln(s);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),gO.has(g)||(gO.add(g),a={rel:a,crossOrigin:u,href:s},m.querySelector(g)===null&&(s=m.createElement("link"),tr(s,"link",a),Ut(s),m.head.appendChild(s)))}}function jL(a){Ta.D(a),xO("dns-prefetch",a,null)}function SL(a,s){Ta.C(a,s),xO("preconnect",a,s)}function wL(a,s,u){Ta.L(a,s,u);var m=ro;if(m&&a&&s){var g='link[rel="preload"][as="'+ln(s)+'"]';s==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+ln(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+ln(u.imageSizes)+'"]')):g+='[href="'+ln(a)+'"]';var b=g;switch(s){case"style":b=no(a);break;case"script":b=ao(a)}pn.has(b)||(a=y({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),pn.set(b,a),m.querySelector(g)!==null||s==="style"&&m.querySelector(Ju(b))||s==="script"&&m.querySelector(ec(b))||(s=m.createElement("link"),tr(s,"link",a),Ut(s),m.head.appendChild(s)))}}function NL(a,s){Ta.m(a,s);var u=ro;if(u&&a){var m=s&&typeof s.as=="string"?s.as:"script",g='link[rel="modulepreload"][as="'+ln(m)+'"][href="'+ln(a)+'"]',b=g;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=ao(a)}if(!pn.has(b)&&(a=y({rel:"modulepreload",href:a},s),pn.set(b,a),u.querySelector(g)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(ec(b)))return}m=u.createElement("link"),tr(m,"link",a),Ut(m),u.head.appendChild(m)}}}function OL(a,s,u){Ta.S(a,s,u);var m=ro;if(m&&a){var g=Ol(m).hoistableStyles,b=no(a);s=s||"default";var _=g.get(b);if(!_){var C={loading:0,preload:null};if(_=m.querySelector(Ju(b)))C.loading=5;else{a=y({rel:"stylesheet",href:a,"data-precedence":s},u),(u=pn.get(b))&&Vv(a,u);var L=_=m.createElement("link");Ut(L),tr(L,"link",a),L._p=new Promise(function(Y,re){L.onload=Y,L.onerror=re}),L.addEventListener("load",function(){C.loading|=1}),L.addEventListener("error",function(){C.loading|=2}),C.loading|=4,zf(_,s,m)}_={type:"stylesheet",instance:_,count:1,state:C},g.set(b,_)}}}function _L(a,s){Ta.X(a,s);var u=ro;if(u&&a){var m=Ol(u).hoistableScripts,g=ao(a),b=m.get(g);b||(b=u.querySelector(ec(g)),b||(a=y({src:a,async:!0},s),(s=pn.get(g))&&Qv(a,s),b=u.createElement("script"),Ut(b),tr(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function EL(a,s){Ta.M(a,s);var u=ro;if(u&&a){var m=Ol(u).hoistableScripts,g=ao(a),b=m.get(g);b||(b=u.querySelector(ec(g)),b||(a=y({src:a,async:!0,type:"module"},s),(s=pn.get(g))&&Qv(a,s),b=u.createElement("script"),Ut(b),tr(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(g,b))}}function bO(a,s,u,m){var g=(g=Ne.current)?$f(g):null;if(!g)throw Error(n(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=no(u.href),u=Ol(g).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=no(u.href);var b=Ol(g).hoistableStyles,_=b.get(a);if(_||(g=g.ownerDocument||g,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,_),(b=g.querySelector(Ju(a)))&&!b._p&&(_.instance=b,_.state.loading=5),pn.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},pn.set(a,u),b||AL(g,a,u,_.state))),s&&m===null)throw Error(n(528,""));return _}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=ao(u),u=Ol(g).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 no(a){return'href="'+ln(a)+'"'}function Ju(a){return'link[rel="stylesheet"]['+a+"]"}function jO(a){return y({},a,{"data-precedence":a.precedence,precedence:null})}function AL(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}),tr(s,"link",u),Ut(s),a.head.appendChild(s))}function ao(a){return'[src="'+ln(a)+'"]'}function ec(a){return"script[async]"+a}function SO(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var m=a.querySelector('style[data-href~="'+ln(u.href)+'"]');if(m)return s.instance=m,Ut(m),m;var g=y({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),Ut(m),tr(m,"style",g),zf(m,u.precedence,a),s.instance=m;case"stylesheet":g=no(u.href);var b=a.querySelector(Ju(g));if(b)return s.state.loading|=4,s.instance=b,Ut(b),b;m=jO(u),(g=pn.get(g))&&Vv(m,g),b=(a.ownerDocument||a).createElement("link"),Ut(b);var _=b;return _._p=new Promise(function(C,L){_.onload=C,_.onerror=L}),tr(b,"link",m),s.state.loading|=4,zf(b,u.precedence,a),s.instance=b;case"script":return b=ao(u.src),(g=a.querySelector(ec(b)))?(s.instance=g,Ut(g),g):(m=u,(g=pn.get(b))&&(m=y({},u),Qv(m,g)),a=a.ownerDocument||a,g=a.createElement("script"),Ut(g),tr(g,"link",m),a.head.appendChild(g),s.instance=g);case"void":return null;default:throw Error(n(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(m=s.instance,s.state.loading|=4,zf(m,u.precedence,a));return s.instance}function zf(a,s,u){for(var m=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=m.length?m[m.length-1]:null,b=g,_=0;_<m.length;_++){var C=m[_];if(C.dataset.precedence===s)b=C;else if(b!==g)break}b?b.parentNode.insertBefore(a,b.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function Vv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Qv(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var Bf=null;function wO(a,s,u){if(Bf===null){var m=new Map,g=Bf=new Map;g.set(u,m)}else g=Bf,m=g.get(u),m||(m=new Map,g.set(u,m));if(m.has(a))return m;for(m.set(a,null),u=u.getElementsByTagName(a),g=0;g<u.length;g++){var b=u[g];if(!(b[yu]||b[Zt]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var _=b.getAttribute(s)||"";_=a+_;var C=m.get(_);C?C.push(b):m.set(_,[b])}}return m}function NO(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function PL(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 OO(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function TL(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 g=no(m.href),b=s.querySelector(Ju(g));if(b){s=b._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Uf.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=b,Ut(b);return}b=s.ownerDocument||s,m=jO(m),(g=pn.get(g))&&Vv(m,g),b=b.createElement("link"),Ut(b);var _=b;_._p=new Promise(function(C,L){_.onload=C,_.onerror=L}),tr(b,"link",m),u.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Uf.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var Xv=0;function CL(a,s){return a.stylesheets&&a.count===0&&Hf(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var m=setTimeout(function(){if(a.stylesheets&&Hf(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+s);0<a.imgBytes&&Xv===0&&(Xv=62500*dL());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Hf(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>Xv?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(g)}}:null}function Uf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Hf(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var qf=null;function Hf(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,qf=new Map,s.forEach(ML,a),qf=null,Uf.call(a))}function ML(a,s){if(!(s.state.loading&4)){var u=qf.get(a);if(u)var m=u.get(null);else{u=new Map,qf.set(a,u);for(var g=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<g.length;b++){var _=g[b];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(u.set(_.dataset.precedence,_),m=_)}m&&u.set(null,m)}g=s.instance,_=g.getAttribute("data-precedence"),b=u.get(_)||m,b===m&&u.set(null,g),u.set(_,g),this.count++,m=Uf.bind(this),g.addEventListener("load",m),g.addEventListener("error",m),b?b.parentNode.insertBefore(g,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(g,a.firstChild)),s.state.loading|=4}}var tc={$$typeof:E,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function RL(a,s,u,m,g,b,_,C,L){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=Kp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kp(0),this.hiddenUpdates=Kp(null),this.identifierPrefix=m,this.onUncaughtError=g,this.onCaughtError=b,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function _O(a,s,u,m,g,b,_,C,L,Y,re,ie){return a=new RL(a,s,u,_,L,Y,re,ie,C),s=1,b===!0&&(s|=24),b=Kr(3,null,null,s),a.current=b,b.stateNode=a,s=Py(),s.refCount++,a.pooledCache=s,s.refCount++,b.memoizedState={element:m,isDehydrated:u,cache:s},Ry(b),a}function EO(a){return a?(a=kl,a):kl}function AO(a,s,u,m,g,b){g=EO(g),m.context===null?m.context=g:m.pendingContext=g,m=fi(s),m.payload={element:u},b=b===void 0?null:b,b!==null&&(m.callback=b),u=hi(a,m,s),u!==null&&(Dr(u,a,s),Ru(u,a,s))}function PO(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function Zv(a,s){PO(a,s),(a=a.alternate)&&PO(a,s)}function TO(a){if(a.tag===13||a.tag===31){var s=ds(a,67108864);s!==null&&Dr(s,a,67108864),Zv(a,67108864)}}function CO(a){if(a.tag===13||a.tag===31){var s=Xr();s=Gp(s);var u=ds(a,s);u!==null&&Dr(u,a,s),Zv(a,s)}}var Ff=!0;function DL(a,s,u,m){var g=B.T;B.T=null;var b=K.p;try{K.p=2,Wv(a,s,u,m)}finally{K.p=b,B.T=g}}function kL(a,s,u,m){var g=B.T;B.T=null;var b=K.p;try{K.p=8,Wv(a,s,u,m)}finally{K.p=b,B.T=g}}function Wv(a,s,u,m){if(Ff){var g=Jv(m);if(g===null)$v(a,s,m,Kf,u),RO(a,m);else if(LL(g,a,s,u,m))m.stopPropagation();else if(RO(a,m),s&4&&-1<IL.indexOf(a)){for(;g!==null;){var b=Nl(g);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var _=ss(b.pendingLanes);if(_!==0){var C=b;for(C.pendingLanes|=2,C.entangledLanes|=2;_;){var L=1<<31-Hr(_);C.entanglements[1]|=L,_&=~L}Gn(b),(Ke&6)===0&&(Ef=Te()+500,Qu(0))}}break;case 31:case 13:C=ds(b,2),C!==null&&Dr(C,b,2),Pf(),Zv(b,2)}if(b=Jv(m),b===null&&$v(a,s,m,Kf,u),b===g)break;g=b}g!==null&&m.stopPropagation()}else $v(a,s,m,null,u)}}function Jv(a){return a=ty(a),eg(a)}var Kf=null;function eg(a){if(Kf=null,a=wl(a),a!==null){var s=l(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=o(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 Kf=a,null}function MO(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ur()){case qn:return 2;case Md:return 8;case Rd:case S5:return 32;case qS:return 268435456;default:return 32}default:return 32}}var tg=!1,Ni=null,Oi=null,_i=null,rc=new Map,nc=new Map,Ei=[],IL="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 RO(a,s){switch(a){case"focusin":case"focusout":Ni=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":_i=null;break;case"pointerover":case"pointerout":rc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":nc.delete(s.pointerId)}}function ac(a,s,u,m,g,b){return a===null||a.nativeEvent!==b?(a={blockedOn:s,domEventName:u,eventSystemFlags:m,nativeEvent:b,targetContainers:[g]},s!==null&&(s=Nl(s),s!==null&&TO(s)),a):(a.eventSystemFlags|=m,s=a.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),a)}function LL(a,s,u,m,g){switch(s){case"focusin":return Ni=ac(Ni,a,s,u,m,g),!0;case"dragenter":return Oi=ac(Oi,a,s,u,m,g),!0;case"mouseover":return _i=ac(_i,a,s,u,m,g),!0;case"pointerover":var b=g.pointerId;return rc.set(b,ac(rc.get(b)||null,a,s,u,m,g)),!0;case"gotpointercapture":return b=g.pointerId,nc.set(b,ac(nc.get(b)||null,a,s,u,m,g)),!0}return!1}function DO(a){var s=wl(a.target);if(s!==null){var u=l(s);if(u!==null){if(s=u.tag,s===13){if(s=o(u),s!==null){a.blockedOn=s,VS(a.priority,function(){CO(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,VS(a.priority,function(){CO(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 Gf(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=Jv(a.nativeEvent);if(u===null){u=a.nativeEvent;var m=new u.constructor(u.type,u);ey=m,u.target.dispatchEvent(m),ey=null}else return s=Nl(u),s!==null&&TO(s),a.blockedOn=u,!1;s.shift()}return!0}function kO(a,s,u){Gf(a)&&u.delete(s)}function $L(){tg=!1,Ni!==null&&Gf(Ni)&&(Ni=null),Oi!==null&&Gf(Oi)&&(Oi=null),_i!==null&&Gf(_i)&&(_i=null),rc.forEach(kO),nc.forEach(kO)}function Yf(a,s){a.blockedOn===s&&(a.blockedOn=null,tg||(tg=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,$L)))}var Vf=null;function IO(a){Vf!==a&&(Vf=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Vf===a&&(Vf=null);for(var s=0;s<a.length;s+=3){var u=a[s],m=a[s+1],g=a[s+2];if(typeof m!="function"){if(eg(m||u)===null)continue;break}var b=Nl(u);b!==null&&(a.splice(s,3),s-=3,Jy(b,{pending:!0,data:g,method:u.method,action:m},m,g))}}))}function io(a){function s(L){return Yf(L,a)}Ni!==null&&Yf(Ni,a),Oi!==null&&Yf(Oi,a),_i!==null&&Yf(_i,a),rc.forEach(s),nc.forEach(s);for(var u=0;u<Ei.length;u++){var m=Ei[u];m.blockedOn===a&&(m.blockedOn=null)}for(;0<Ei.length&&(u=Ei[0],u.blockedOn===null);)DO(u),u.blockedOn===null&&Ei.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(m=0;m<u.length;m+=3){var g=u[m],b=u[m+1],_=g[Ar]||null;if(typeof b=="function")_||IO(u);else if(_){var C=null;if(b&&b.hasAttribute("formAction")){if(g=b,_=b[Ar]||null)C=_.formAction;else if(eg(g)!==null)continue}else C=_.action;typeof C=="function"?u[m+1]=C:(u.splice(m,3),m-=3),IO(u)}}}function LO(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(_){return g=_})},focusReset:"manual",scroll:"manual"})}function s(){g!==null&&(g(),g=null),m||setTimeout(u,20)}function u(){if(!m&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,g=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),g!==null&&(g(),g=null)}}}function rg(a){this._internalRoot=a}Qf.prototype.render=rg.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(n(409));var u=s.current,m=Xr();AO(u,m,a,s,null,null)},Qf.prototype.unmount=rg.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;AO(a.current,2,null,a,null,null),Pf(),s[Sl]=null}};function Qf(a){this._internalRoot=a}Qf.prototype.unstable_scheduleHydration=function(a){if(a){var s=YS();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Ei.length&&s!==0&&s<Ei[u].priority;u++);Ei.splice(u,0,a),u===0&&DO(a)}};var $O=t.version;if($O!=="19.2.4")throw Error(n(527,$O,"19.2.4"));K.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(n(188)):(a=Object.keys(a).join(","),Error(n(268,a)));return a=h(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var zL={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Xf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xf.isDisabled&&Xf.supportsFiber)try{hu=Xf.inject(zL),qr=Xf}catch{}}return sc.createRoot=function(a,s){if(!i(a))throw Error(n(299));var u=!1,m="",g=K1,b=G1,_=Y1;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(m=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(_=s.onRecoverableError)),s=_O(a,1,!1,null,null,u,m,null,g,b,_,LO),a[Sl]=s.current,Lv(a),new rg(s)},sc.hydrateRoot=function(a,s,u){if(!i(a))throw Error(n(299));var m=!1,g="",b=K1,_=G1,C=Y1,L=null;return u!=null&&(u.unstable_strictMode===!0&&(m=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(_=u.onCaughtError),u.onRecoverableError!==void 0&&(C=u.onRecoverableError),u.formState!==void 0&&(L=u.formState)),s=_O(a,1,!0,s,u??null,m,g,L,b,_,C,LO),s.context=EO(null),u=s.current,m=Xr(),m=Gp(m),g=fi(m),g.callback=null,hi(u,g,m),u=m,s.current.lanes=u,pu(s,u),Gn(s),a[Sl]=s.current,Lv(a),new Qf(s)},sc.version="19.2.4",sc}var QO;function WL(){if(QO)return lg.exports;QO=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(),lg.exports=ZL(),lg.exports}var JL=WL(),tu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Bs,Li,_o,ZC,e$=(ZC=class extends tu{constructor(){super();xe(this,Bs);xe(this,Li);xe(this,_o);fe(this,_o,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,Li)||this.setEventListener(z(this,_o))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,Li))==null||t.call(this),fe(this,Li,void 0))}setEventListener(t){var r;fe(this,_o,t),(r=z(this,Li))==null||r.call(this),fe(this,Li,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){z(this,Bs)!==t&&(fe(this,Bs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof z(this,Bs)=="boolean"?z(this,Bs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Bs=new WeakMap,Li=new WeakMap,_o=new WeakMap,ZC),Mb=new e$,t$={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},$i,Cb,WC,r$=(WC=class{constructor(){xe(this,$i,t$);xe(this,Cb,!1)}setTimeoutProvider(e){fe(this,$i,e)}setTimeout(e,t){return z(this,$i).setTimeout(e,t)}clearTimeout(e){z(this,$i).clearTimeout(e)}setInterval(e,t){return z(this,$i).setInterval(e,t)}clearInterval(e){z(this,$i).clearInterval(e)}},$i=new WeakMap,Cb=new WeakMap,WC),Ms=new r$;function n$(e){setTimeout(e,0)}var a$=typeof window>"u"||"Deno"in globalThis;function br(){}function i$(e,t){return typeof e=="function"?e(t):e}function lx(e){return typeof e=="number"&&e>=0&&e!==1/0}function u2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qi(e,t){return typeof e=="function"?e(t):e}function Sn(e,t){return typeof e=="function"?e(t):e}function XO(e,t){const{type:r="all",exact:n,fetchStatus:i,predicate:l,queryKey:o,stale:c}=e;if(o){if(n){if(t.queryHash!==Rb(o,t.options))return!1}else if(!Mc(t.queryKey,o))return!1}if(r!=="all"){const f=t.isActive();if(r==="active"&&!f||r==="inactive"&&f)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||l&&!l(t))}function ZO(e,t){const{exact:r,status:n,predicate:i,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(r){if(tl(t.options.mutationKey)!==tl(l))return!1}else if(!Mc(t.options.mutationKey,l))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Rb(e,t){return((t==null?void 0:t.queryKeyHashFn)||tl)(e)}function tl(e){return JSON.stringify(e,(t,r)=>ox(r)?Object.keys(r).sort().reduce((n,i)=>(n[i]=r[i],n),{}):r)}function Mc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>Mc(e[r],t[r])):!1}var s$=Object.prototype.hasOwnProperty;function c2(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=WO(e)&&WO(t);if(!n&&!(ox(e)&&ox(t)))return t;const l=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),c=o.length,f=n?new Array(c):{};let h=0;for(let p=0;p<c;p++){const y=n?p:o[p],v=e[y],x=t[y];if(v===x){f[y]=v,(n?p<l:s$.call(e,y))&&h++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){f[y]=x;continue}const j=c2(v,x,r+1);f[y]=j,j===v&&h++}return l===c&&h===l?e:f}function Th(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(e[r]!==t[r])return!1;return!0}function WO(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ox(e){if(!JO(e))return!1;const t=e.constructor;if(t===void 0)return!0;const r=t.prototype;return!(!JO(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function JO(e){return Object.prototype.toString.call(e)==="[object Object]"}function l$(e){return new Promise(t=>{Ms.setTimeout(t,e)})}function ux(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?c2(e,t):t}function o$(e,t,r=0){const n=[...e,t];return r&&n.length>r?n.slice(1):n}function u$(e,t,r=0){const n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var Db=Symbol();function d2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Db?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function kb(e,t){return typeof e=="function"?e(...t):!!e}function c$(e,t,r){let n=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),n||(n=!0,i.aborted?r():i.addEventListener("abort",r,{once:!0})),i)}),e}var Rc=(()=>{let e=()=>a$;return{isServer(){return e()},setIsServer(t){e=t}}})();function cx(){let e,t;const r=new Promise((i,l)=>{e=i,t=l});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 d$=n$;function f$(){let e=[],t=0,r=c=>{c()},n=c=>{c()},i=d$;const l=c=>{t?e.push(c):i(()=>{r(c)})},o=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(f=>{r(f)})})})};return{batch:c=>{let f;t++;try{f=c()}finally{t--,t||o()}return f},batchCalls:c=>(...f)=>{l(()=>{c(...f)})},schedule:l,setNotifyFunction:c=>{r=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var $t=f$(),Eo,zi,Ao,JC,h$=(JC=class extends tu{constructor(){super();xe(this,Eo,!0);xe(this,zi);xe(this,Ao);fe(this,Ao,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){z(this,zi)||this.setEventListener(z(this,Ao))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,zi))==null||t.call(this),fe(this,zi,void 0))}setEventListener(t){var r;fe(this,Ao,t),(r=z(this,zi))==null||r.call(this),fe(this,zi,t(this.setOnline.bind(this)))}setOnline(t){z(this,Eo)!==t&&(fe(this,Eo,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return z(this,Eo)}},Eo=new WeakMap,zi=new WeakMap,Ao=new WeakMap,JC),Ch=new h$;function m$(e){return Math.min(1e3*2**e,3e4)}function f2(e){return(e??"online")==="online"?Ch.isOnline():!0}var dx=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function h2(e){let t=!1,r=0,n;const i=cx(),l=()=>i.status!=="pending",o=S=>{var N;if(!l()){const O=new dx(S);v(O),(N=e.onCancel)==null||N.call(e,O)}},c=()=>{t=!0},f=()=>{t=!1},h=()=>Mb.isFocused()&&(e.networkMode==="always"||Ch.isOnline())&&e.canRun(),p=()=>f2(e.networkMode)&&e.canRun(),y=S=>{l()||(n==null||n(),i.resolve(S))},v=S=>{l()||(n==null||n(),i.reject(S))},x=()=>new Promise(S=>{var N;n=O=>{(l()||h())&&S(O)},(N=e.onPause)==null||N.call(e)}).then(()=>{var S;n=void 0,l()||(S=e.onContinue)==null||S.call(e)}),j=()=>{if(l())return;let S;const N=r===0?e.initialPromise:void 0;try{S=N??e.fn()}catch(O){S=Promise.reject(O)}Promise.resolve(S).then(y).catch(O=>{var M;if(l())return;const P=e.retry??(Rc.isServer()?0:3),E=e.retryDelay??m$,A=typeof E=="function"?E(r,O):E,T=P===!0||typeof P=="number"&&r<P||typeof P=="function"&&P(r,O);if(t||!T){v(O);return}r++,(M=e.onFail)==null||M.call(e,r,O),l$(A).then(()=>h()?void 0:x()).then(()=>{t?v(O):j()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(n==null||n(),i),cancelRetry:c,continueRetry:f,canStart:p,start:()=>(p()?j():x().then(j),i)}}var Us,e2,m2=(e2=class{constructor(){xe(this,Us)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lx(this.gcTime)&&fe(this,Us,Ms.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Rc.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,Us)&&(Ms.clearTimeout(z(this,Us)),fe(this,Us,void 0))}},Us=new WeakMap,e2),qs,Po,bn,Hs,Ht,rd,Fs,Zr,p2,Ca,t2,p$=(t2=class extends m2{constructor(t){super();xe(this,Zr);xe(this,qs);xe(this,Po);xe(this,bn);xe(this,Hs);xe(this,Ht);xe(this,rd);xe(this,Fs);fe(this,Fs,!1),fe(this,rd,t.defaultOptions),this.setOptions(t.options),this.observers=[],fe(this,Hs,t.client),fe(this,bn,z(this,Hs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,fe(this,qs,t_(this.options)),this.state=t.state??z(this,qs),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,Ht))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,rd),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=t_(this.options);r.data!==void 0&&(this.setState(e_(r.data,r.dataUpdatedAt)),fe(this,qs,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,bn).remove(this)}setData(t,r){const n=ux(this.state.data,t,this.options);return Pe(this,Zr,Ca).call(this,{data:n,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),n}setState(t,r){Pe(this,Zr,Ca).call(this,{type:"setState",state:t,setStateOptions:r})}cancel(t){var n,i;const r=(n=z(this,Ht))==null?void 0:n.promise;return(i=z(this,Ht))==null||i.cancel(t),r?r.then(br).catch(br):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,qs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Sn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Db||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Qi(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:!u2(this.state.dataUpdatedAt,t)}onFocus(){var r;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Ht))==null||r.continue()}onOnline(){var r;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(r=z(this,Ht))==null||r.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,bn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(r=>r!==t),this.observers.length||(z(this,Ht)&&(z(this,Fs)||Pe(this,Zr,p2).call(this)?z(this,Ht).cancel({revert:!0}):z(this,Ht).cancelRetry()),this.scheduleGc()),z(this,bn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,Zr,Ca).call(this,{type:"invalidate"})}async fetch(t,r){var f,h,p,y,v,x,j,S,N,O,P,E;if(this.state.fetchStatus!=="idle"&&((f=z(this,Ht))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,Ht))return z(this,Ht).continueRetry(),z(this,Ht).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(T=>T.options.queryFn);A&&this.setOptions(A.options)}const n=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(fe(this,Fs,!0),n.signal)})},l=()=>{const A=d2(this.options,r),M=(()=>{const R={client:z(this,Hs),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return fe(this,Fs,!1),this.options.persister?this.options.persister(A,M,this):A(M)},c=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,Hs),state:this.state,fetchFn:l};return i(A),A})();(h=this.options.behavior)==null||h.onFetch(c,this),fe(this,Po,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=c.fetchOptions)==null?void 0:p.meta))&&Pe(this,Zr,Ca).call(this,{type:"fetch",meta:(y=c.fetchOptions)==null?void 0:y.meta}),fe(this,Ht,h2({initialPromise:r==null?void 0:r.initialPromise,fn:c.fetchFn,onCancel:A=>{A instanceof dx&&A.revert&&this.setState({...z(this,Po),fetchStatus:"idle"}),n.abort()},onFail:(A,T)=>{Pe(this,Zr,Ca).call(this,{type:"failed",failureCount:A,error:T})},onPause:()=>{Pe(this,Zr,Ca).call(this,{type:"pause"})},onContinue:()=>{Pe(this,Zr,Ca).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const A=await z(this,Ht).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(x=(v=z(this,bn).config).onSuccess)==null||x.call(v,A,this),(S=(j=z(this,bn).config).onSettled)==null||S.call(j,A,this.state.error,this),A}catch(A){if(A instanceof dx){if(A.silent)return z(this,Ht).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Pe(this,Zr,Ca).call(this,{type:"error",error:A}),(O=(N=z(this,bn).config).onError)==null||O.call(N,A,this),(E=(P=z(this,bn).config).onSettled)==null||E.call(P,this.state.data,A,this),A}finally{this.scheduleGc()}}},qs=new WeakMap,Po=new WeakMap,bn=new WeakMap,Hs=new WeakMap,Ht=new WeakMap,rd=new WeakMap,Fs=new WeakMap,Zr=new WeakSet,p2=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ca=function(t){const r=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...y2(n.data,this.options),fetchMeta:t.meta??null};case"success":const i={...n,...e_(t.data,t.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Po,t.manual?i:void 0),i;case"error":const l=t.error;return{...n,error:l,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=r(this.state),$t.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),z(this,bn).notify({query:this,type:"updated",action:t})})},t2);function y2(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:f2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function e_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function t_(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,n=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var kr,$e,nd,xr,Ks,To,Ra,Bi,ad,Co,Mo,Gs,Ys,Ui,Ro,Ge,Nc,fx,hx,mx,px,yx,vx,gx,g2,r2,v2=(r2=class extends tu{constructor(t,r){super();xe(this,Ge);xe(this,kr);xe(this,$e);xe(this,nd);xe(this,xr);xe(this,Ks);xe(this,To);xe(this,Ra);xe(this,Bi);xe(this,ad);xe(this,Co);xe(this,Mo);xe(this,Gs);xe(this,Ys);xe(this,Ui);xe(this,Ro,new Set);this.options=r,fe(this,kr,t),fe(this,Bi,null),fe(this,Ra,cx()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,$e).addObserver(this),r_(z(this,$e),this.options)?Pe(this,Ge,Nc).call(this):this.updateResult(),Pe(this,Ge,px).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return xx(z(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return xx(z(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,Ge,yx).call(this),Pe(this,Ge,vx).call(this),z(this,$e).removeObserver(this)}setOptions(t){const r=this.options,n=z(this,$e);if(this.options=z(this,kr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Sn(this.options.enabled,z(this,$e))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,Ge,gx).call(this),z(this,$e).setOptions(this.options),r._defaulted&&!Th(this.options,r)&&z(this,kr).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,$e),observer:this});const i=this.hasListeners();i&&n_(z(this,$e),n,this.options,r)&&Pe(this,Ge,Nc).call(this),this.updateResult(),i&&(z(this,$e)!==n||Sn(this.options.enabled,z(this,$e))!==Sn(r.enabled,z(this,$e))||Qi(this.options.staleTime,z(this,$e))!==Qi(r.staleTime,z(this,$e)))&&Pe(this,Ge,fx).call(this);const l=Pe(this,Ge,hx).call(this);i&&(z(this,$e)!==n||Sn(this.options.enabled,z(this,$e))!==Sn(r.enabled,z(this,$e))||l!==z(this,Ui))&&Pe(this,Ge,mx).call(this,l)}getOptimisticResult(t){const r=z(this,kr).getQueryCache().build(z(this,kr),t),n=this.createResult(r,t);return v$(this,n)&&(fe(this,xr,n),fe(this,To,this.options),fe(this,Ks,z(this,$e).state)),n}getCurrentResult(){return z(this,xr)}trackResult(t,r){return new Proxy(t,{get:(n,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Ra).status==="pending"&&z(this,Ra).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,i))})}trackProp(t){z(this,Ro).add(t)}getCurrentQuery(){return z(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=z(this,kr).defaultQueryOptions(t),n=z(this,kr).getQueryCache().build(z(this,kr),r);return n.fetch().then(()=>this.createResult(n,r))}fetch(t){return Pe(this,Ge,Nc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,xr)))}createResult(t,r){var $;const n=z(this,$e),i=this.options,l=z(this,xr),o=z(this,Ks),c=z(this,To),h=t!==n?t.state:z(this,nd),{state:p}=t;let y={...p},v=!1,x;if(r._optimisticResults){const D=this.hasListeners(),H=!D&&r_(t,r),q=D&&n_(t,n,r,i);(H||q)&&(y={...y,...y2(p.data,t.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:j,errorUpdatedAt:S,status:N}=y;x=y.data;let O=!1;if(r.placeholderData!==void 0&&x===void 0&&N==="pending"){let D;l!=null&&l.isPlaceholderData&&r.placeholderData===(c==null?void 0:c.placeholderData)?(D=l.data,O=!0):D=typeof r.placeholderData=="function"?r.placeholderData(($=z(this,Mo))==null?void 0:$.state.data,z(this,Mo)):r.placeholderData,D!==void 0&&(N="success",x=ux(l==null?void 0:l.data,D,r),v=!0)}if(r.select&&x!==void 0&&!O)if(l&&x===(o==null?void 0:o.data)&&r.select===z(this,ad))x=z(this,Co);else try{fe(this,ad,r.select),x=r.select(x),x=ux(l==null?void 0:l.data,x,r),fe(this,Co,x),fe(this,Bi,null)}catch(D){fe(this,Bi,D)}z(this,Bi)&&(j=z(this,Bi),x=z(this,Co),S=Date.now(),N="error");const P=y.fetchStatus==="fetching",E=N==="pending",A=N==="error",T=E&&P,M=x!==void 0,I={status:N,fetchStatus:y.fetchStatus,isPending:E,isSuccess:N==="success",isError:A,isInitialLoading:T,isLoading:T,data:x,dataUpdatedAt:y.dataUpdatedAt,error:j,errorUpdatedAt:S,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:y.dataUpdateCount>h.dataUpdateCount||y.errorUpdateCount>h.errorUpdateCount,isFetching:P,isRefetching:P&&!E,isLoadingError:A&&!M,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:A&&M,isStale:Ib(t,r),refetch:this.refetch,promise:z(this,Ra),isEnabled:Sn(r.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=I.data!==void 0,H=I.status==="error"&&!D,q=Z=>{H?Z.reject(I.error):D&&Z.resolve(I.data)},ae=()=>{const Z=fe(this,Ra,I.promise=cx());q(Z)},Q=z(this,Ra);switch(Q.status){case"pending":t.queryHash===n.queryHash&&q(Q);break;case"fulfilled":(H||I.data!==Q.value)&&ae();break;case"rejected":(!H||I.error!==Q.reason)&&ae();break}}return I}updateResult(){const t=z(this,xr),r=this.createResult(z(this,$e),this.options);if(fe(this,Ks,z(this,$e).state),fe(this,To,this.options),z(this,Ks).data!==void 0&&fe(this,Mo,z(this,$e)),Th(r,t))return;fe(this,xr,r);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,l=typeof i=="function"?i():i;if(l==="all"||!l&&!z(this,Ro).size)return!0;const o=new Set(l??z(this,Ro));return this.options.throwOnError&&o.add("error"),Object.keys(z(this,xr)).some(c=>{const f=c;return z(this,xr)[f]!==t[f]&&o.has(f)})};Pe(this,Ge,g2).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,Ge,px).call(this)}},kr=new WeakMap,$e=new WeakMap,nd=new WeakMap,xr=new WeakMap,Ks=new WeakMap,To=new WeakMap,Ra=new WeakMap,Bi=new WeakMap,ad=new WeakMap,Co=new WeakMap,Mo=new WeakMap,Gs=new WeakMap,Ys=new WeakMap,Ui=new WeakMap,Ro=new WeakMap,Ge=new WeakSet,Nc=function(t){Pe(this,Ge,gx).call(this);let r=z(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(br)),r},fx=function(){Pe(this,Ge,yx).call(this);const t=Qi(this.options.staleTime,z(this,$e));if(Rc.isServer()||z(this,xr).isStale||!lx(t))return;const n=u2(z(this,xr).dataUpdatedAt,t)+1;fe(this,Gs,Ms.setTimeout(()=>{z(this,xr).isStale||this.updateResult()},n))},hx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,$e)):this.options.refetchInterval)??!1},mx=function(t){Pe(this,Ge,vx).call(this),fe(this,Ui,t),!(Rc.isServer()||Sn(this.options.enabled,z(this,$e))===!1||!lx(z(this,Ui))||z(this,Ui)===0)&&fe(this,Ys,Ms.setInterval(()=>{(this.options.refetchIntervalInBackground||Mb.isFocused())&&Pe(this,Ge,Nc).call(this)},z(this,Ui)))},px=function(){Pe(this,Ge,fx).call(this),Pe(this,Ge,mx).call(this,Pe(this,Ge,hx).call(this))},yx=function(){z(this,Gs)&&(Ms.clearTimeout(z(this,Gs)),fe(this,Gs,void 0))},vx=function(){z(this,Ys)&&(Ms.clearInterval(z(this,Ys)),fe(this,Ys,void 0))},gx=function(){const t=z(this,kr).getQueryCache().build(z(this,kr),this.options);if(t===z(this,$e))return;const r=z(this,$e);fe(this,$e,t),fe(this,nd,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},g2=function(t){$t.batch(()=>{t.listeners&&this.listeners.forEach(r=>{r(z(this,xr))}),z(this,kr).getQueryCache().notify({query:z(this,$e),type:"observerResultsUpdated"})})},r2);function y$(e,t){return Sn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function r_(e,t){return y$(e,t)||e.state.data!==void 0&&xx(e,t,t.refetchOnMount)}function xx(e,t,r){if(Sn(t.enabled,e)!==!1&&Qi(t.staleTime,e)!=="static"){const n=typeof r=="function"?r(e):r;return n==="always"||n!==!1&&Ib(e,t)}return!1}function n_(e,t,r,n){return(e!==t||Sn(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Ib(e,r)}function Ib(e,t){return Sn(t.enabled,e)!==!1&&e.isStaleByTime(Qi(t.staleTime,e))}function v$(e,t){return!Th(e.getCurrentResult(),t)}function Mh(e){return{onFetch:(t,r)=>{var p,y,v,x,j;const n=t.options,i=(v=(y=(p=t.fetchOptions)==null?void 0:p.meta)==null?void 0:y.fetchMore)==null?void 0:v.direction,l=((x=t.state.data)==null?void 0:x.pages)||[],o=((j=t.state.data)==null?void 0:j.pageParams)||[];let c={pages:[],pageParams:[]},f=0;const h=async()=>{let S=!1;const N=E=>{c$(E,()=>t.signal,()=>S=!0)},O=d2(t.options,t.fetchOptions),P=async(E,A,T)=>{if(S)return Promise.reject();if(A==null&&E.pages.length)return Promise.resolve(E);const R=(()=>{const H={client:t.client,queryKey:t.queryKey,pageParam:A,direction:T?"backward":"forward",meta:t.options.meta};return N(H),H})(),I=await O(R),{maxPages:$}=t.options,D=T?u$:o$;return{pages:D(E.pages,I,$),pageParams:D(E.pageParams,A,$)}};if(i&&l.length){const E=i==="backward",A=E?x2:bx,T={pages:l,pageParams:o},M=A(n,T);c=await P(T,M,E)}else{const E=e??l.length;do{const A=f===0?o[0]??n.initialPageParam:bx(n,c);if(f>0&&A==null)break;c=await P(c,A),f++}while(f<E)}return c};t.options.persister?t.fetchFn=()=>{var S,N;return(N=(S=t.options).persister)==null?void 0:N.call(S,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r)}:t.fetchFn=h}}}function bx(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 x2(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 g$(e,t){return t?bx(e,t)!=null:!1}function x$(e,t){return!t||!e.getPreviousPageParam?!1:x2(e,t)!=null}var b$=class extends v2{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:Mh()})}getOptimisticResult(e){return e.behavior=Mh(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var j,S;const{state:r}=e,n=super.createResult(e,t),{isFetching:i,isRefetching:l,isError:o,isRefetchError:c}=n,f=(S=(j=r.fetchMeta)==null?void 0:j.fetchMore)==null?void 0:S.direction,h=o&&f==="forward",p=i&&f==="forward",y=o&&f==="backward",v=i&&f==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:g$(t,r.data),hasPreviousPage:x$(t,r.data),isFetchNextPageError:h,isFetchingNextPage:p,isFetchPreviousPageError:y,isFetchingPreviousPage:v,isRefetchError:c&&!h&&!y,isRefetching:l&&!p&&!v}}},id,Zn,dr,Vs,Wn,Ci,n2,j$=(n2=class extends m2{constructor(t){super();xe(this,Wn);xe(this,id);xe(this,Zn);xe(this,dr);xe(this,Vs);fe(this,id,t.client),this.mutationId=t.mutationId,fe(this,dr,t.mutationCache),fe(this,Zn,[]),this.state=t.state||b2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Zn).includes(t)||(z(this,Zn).push(t),this.clearGcTimeout(),z(this,dr).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){fe(this,Zn,z(this,Zn).filter(r=>r!==t)),this.scheduleGc(),z(this,dr).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Zn).length||(this.state.status==="pending"?this.scheduleGc():z(this,dr).remove(this))}continue(){var t;return((t=z(this,Vs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,c,f,h,p,y,v,x,j,S,N,O,P,E,A,T,M,R;const r=()=>{Pe(this,Wn,Ci).call(this,{type:"continue"})},n={client:z(this,id),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Vs,h2({fn:()=>this.options.mutationFn?this.options.mutationFn(t,n):Promise.reject(new Error("No mutationFn found")),onFail:(I,$)=>{Pe(this,Wn,Ci).call(this,{type:"failed",failureCount:I,error:$})},onPause:()=>{Pe(this,Wn,Ci).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,dr).canRun(this)}));const i=this.state.status==="pending",l=!z(this,Vs).canStart();try{if(i)r();else{Pe(this,Wn,Ci).call(this,{type:"pending",variables:t,isPaused:l}),z(this,dr).config.onMutate&&await z(this,dr).config.onMutate(t,this,n);const $=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t,n));$!==this.state.context&&Pe(this,Wn,Ci).call(this,{type:"pending",context:$,variables:t,isPaused:l})}const I=await z(this,Vs).start();return await((h=(f=z(this,dr).config).onSuccess)==null?void 0:h.call(f,I,t,this.state.context,this,n)),await((y=(p=this.options).onSuccess)==null?void 0:y.call(p,I,t,this.state.context,n)),await((x=(v=z(this,dr).config).onSettled)==null?void 0:x.call(v,I,null,this.state.variables,this.state.context,this,n)),await((S=(j=this.options).onSettled)==null?void 0:S.call(j,I,null,t,this.state.context,n)),Pe(this,Wn,Ci).call(this,{type:"success",data:I}),I}catch(I){try{await((O=(N=z(this,dr).config).onError)==null?void 0:O.call(N,I,t,this.state.context,this,n))}catch($){Promise.reject($)}try{await((E=(P=this.options).onError)==null?void 0:E.call(P,I,t,this.state.context,n))}catch($){Promise.reject($)}try{await((T=(A=z(this,dr).config).onSettled)==null?void 0:T.call(A,void 0,I,this.state.variables,this.state.context,this,n))}catch($){Promise.reject($)}try{await((R=(M=this.options).onSettled)==null?void 0:R.call(M,void 0,I,t,this.state.context,n))}catch($){Promise.reject($)}throw Pe(this,Wn,Ci).call(this,{type:"error",error:I}),I}finally{z(this,dr).runNext(this)}}},id=new WeakMap,Zn=new WeakMap,dr=new WeakMap,Vs=new WeakMap,Wn=new WeakSet,Ci=function(t){const r=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=r(this.state),$t.batch(()=>{z(this,Zn).forEach(n=>{n.onMutationUpdate(t)}),z(this,dr).notify({mutation:this,type:"updated",action:t})})},n2);function b2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Da,Mn,sd,a2,S$=(a2=class extends tu{constructor(t={}){super();xe(this,Da);xe(this,Mn);xe(this,sd);this.config=t,fe(this,Da,new Set),fe(this,Mn,new Map),fe(this,sd,0)}build(t,r,n){const i=new j$({client:t,mutationCache:this,mutationId:++Zf(this,sd)._,options:t.defaultMutationOptions(r),state:n});return this.add(i),i}add(t){z(this,Da).add(t);const r=Wf(t);if(typeof r=="string"){const n=z(this,Mn).get(r);n?n.push(t):z(this,Mn).set(r,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,Da).delete(t)){const r=Wf(t);if(typeof r=="string"){const n=z(this,Mn).get(r);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&z(this,Mn).delete(r)}}this.notify({type:"removed",mutation:t})}canRun(t){const r=Wf(t);if(typeof r=="string"){const n=z(this,Mn).get(r),i=n==null?void 0:n.find(l=>l.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const r=Wf(t);if(typeof r=="string"){const i=(n=z(this,Mn).get(r))==null?void 0:n.find(l=>l!==t&&l.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){$t.batch(()=>{z(this,Da).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,Da).clear(),z(this,Mn).clear()})}getAll(){return Array.from(z(this,Da))}find(t){const r={exact:!0,...t};return this.getAll().find(n=>ZO(r,n))}findAll(t={}){return this.getAll().filter(r=>ZO(t,r))}notify(t){$t.batch(()=>{this.listeners.forEach(r=>{r(t)})})}resumePausedMutations(){const t=this.getAll().filter(r=>r.state.isPaused);return $t.batch(()=>Promise.all(t.map(r=>r.continue().catch(br))))}},Da=new WeakMap,Mn=new WeakMap,sd=new WeakMap,a2);function Wf(e){var t;return(t=e.options.scope)==null?void 0:t.id}var ka,qi,Ir,Ia,Ka,bh,jx,i2,w$=(i2=class extends tu{constructor(r,n){super();xe(this,Ka);xe(this,ka);xe(this,qi);xe(this,Ir);xe(this,Ia);fe(this,ka,r),this.setOptions(n),this.bindMethods(),Pe(this,Ka,bh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const n=this.options;this.options=z(this,ka).defaultMutationOptions(r),Th(this.options,n)||z(this,ka).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,Ir),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&tl(n.mutationKey)!==tl(this.options.mutationKey)?this.reset():((i=z(this,Ir))==null?void 0:i.state.status)==="pending"&&z(this,Ir).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=z(this,Ir))==null||r.removeObserver(this)}onMutationUpdate(r){Pe(this,Ka,bh).call(this),Pe(this,Ka,jx).call(this,r)}getCurrentResult(){return z(this,qi)}reset(){var r;(r=z(this,Ir))==null||r.removeObserver(this),fe(this,Ir,void 0),Pe(this,Ka,bh).call(this),Pe(this,Ka,jx).call(this)}mutate(r,n){var i;return fe(this,Ia,n),(i=z(this,Ir))==null||i.removeObserver(this),fe(this,Ir,z(this,ka).getMutationCache().build(z(this,ka),this.options)),z(this,Ir).addObserver(this),z(this,Ir).execute(r)}},ka=new WeakMap,qi=new WeakMap,Ir=new WeakMap,Ia=new WeakMap,Ka=new WeakSet,bh=function(){var n;const r=((n=z(this,Ir))==null?void 0:n.state)??b2();fe(this,qi,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},jx=function(r){$t.batch(()=>{var n,i,l,o,c,f,h,p;if(z(this,Ia)&&this.hasListeners()){const y=z(this,qi).variables,v=z(this,qi).context,x={client:z(this,ka),meta:this.options.meta,mutationKey:this.options.mutationKey};if((r==null?void 0:r.type)==="success"){try{(i=(n=z(this,Ia)).onSuccess)==null||i.call(n,r.data,y,v,x)}catch(j){Promise.reject(j)}try{(o=(l=z(this,Ia)).onSettled)==null||o.call(l,r.data,null,y,v,x)}catch(j){Promise.reject(j)}}else if((r==null?void 0:r.type)==="error"){try{(f=(c=z(this,Ia)).onError)==null||f.call(c,r.error,y,v,x)}catch(j){Promise.reject(j)}try{(p=(h=z(this,Ia)).onSettled)==null||p.call(h,void 0,r.error,y,v,x)}catch(j){Promise.reject(j)}}}this.listeners.forEach(y=>{y(z(this,qi))})})},i2),Jn,s2,N$=(s2=class extends tu{constructor(t={}){super();xe(this,Jn);this.config=t,fe(this,Jn,new Map)}build(t,r,n){const i=r.queryKey,l=r.queryHash??Rb(i,r);let o=this.get(l);return o||(o=new p$({client:t,queryKey:i,queryHash:l,options:t.defaultQueryOptions(r),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){z(this,Jn).has(t.queryHash)||(z(this,Jn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const r=z(this,Jn).get(t.queryHash);r&&(t.destroy(),r===t&&z(this,Jn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){$t.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Jn).get(t)}getAll(){return[...z(this,Jn).values()]}find(t){const r={exact:!0,...t};return this.getAll().find(n=>XO(r,n))}findAll(t={}){const r=this.getAll();return Object.keys(t).length>0?r.filter(n=>XO(t,n)):r}notify(t){$t.batch(()=>{this.listeners.forEach(r=>{r(t)})})}onFocus(){$t.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){$t.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Jn=new WeakMap,s2),gt,Hi,Fi,Do,ko,Ki,Io,Lo,l2,O$=(l2=class{constructor(e={}){xe(this,gt);xe(this,Hi);xe(this,Fi);xe(this,Do);xe(this,ko);xe(this,Ki);xe(this,Io);xe(this,Lo);fe(this,gt,e.queryCache||new N$),fe(this,Hi,e.mutationCache||new S$),fe(this,Fi,e.defaultOptions||{}),fe(this,Do,new Map),fe(this,ko,new Map),fe(this,Ki,0)}mount(){Zf(this,Ki)._++,z(this,Ki)===1&&(fe(this,Io,Mb.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,gt).onFocus())})),fe(this,Lo,Ch.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,gt).onOnline())})))}unmount(){var e,t;Zf(this,Ki)._--,z(this,Ki)===0&&((e=z(this,Io))==null||e.call(this),fe(this,Io,void 0),(t=z(this,Lo))==null||t.call(this),fe(this,Lo,void 0))}isFetching(e){return z(this,gt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,Hi).findAll({...e,status:"pending"}).length}getQueryData(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,gt).get(t.queryHash))==null?void 0:r.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),r=z(this,gt).build(this,t),n=r.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(Qi(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return z(this,gt).findAll(e).map(({queryKey:t,state:r})=>{const n=r.data;return[t,n]})}setQueryData(e,t,r){const n=this.defaultQueryOptions({queryKey:e}),i=z(this,gt).get(n.queryHash),l=i==null?void 0:i.state.data,o=i$(t,l);if(o!==void 0)return z(this,gt).build(this,n).setData(o,{...r,manual:!0})}setQueriesData(e,t,r){return $t.batch(()=>z(this,gt).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,r)]))}getQueryState(e){var r;const t=this.defaultQueryOptions({queryKey:e});return(r=z(this,gt).get(t.queryHash))==null?void 0:r.state}removeQueries(e){const t=z(this,gt);$t.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){const r=z(this,gt);return $t.batch(()=>(r.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const r={revert:!0,...t},n=$t.batch(()=>z(this,gt).findAll(e).map(i=>i.cancel(r)));return Promise.all(n).then(br).catch(br)}invalidateQueries(e,t={}){return $t.batch(()=>(z(this,gt).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const r={...t,cancelRefetch:t.cancelRefetch??!0},n=$t.batch(()=>z(this,gt).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,r);return r.throwOnError||(l=l.catch(br)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(n).then(br)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const r=z(this,gt).build(this,t);return r.isStaleByTime(Qi(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(br).catch(br)}fetchInfiniteQuery(e){return e.behavior=Mh(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(br).catch(br)}ensureInfiniteQueryData(e){return e.behavior=Mh(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ch.isOnline()?z(this,Hi).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,gt)}getMutationCache(){return z(this,Hi)}getDefaultOptions(){return z(this,Fi)}setDefaultOptions(e){fe(this,Fi,e)}setQueryDefaults(e,t){z(this,Do).set(tl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,Do).values()],r={};return t.forEach(n=>{Mc(e,n.queryKey)&&Object.assign(r,n.defaultOptions)}),r}setMutationDefaults(e,t){z(this,ko).set(tl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,ko).values()],r={};return t.forEach(n=>{Mc(e,n.mutationKey)&&Object.assign(r,n.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,Fi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Rb(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===Db&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,Fi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,gt).clear(),z(this,Hi).clear()}},gt=new WeakMap,Hi=new WeakMap,Fi=new WeakMap,Do=new WeakMap,ko=new WeakMap,Ki=new WeakMap,Io=new WeakMap,Lo=new WeakMap,l2),j2=w.createContext(void 0),ca=e=>{const t=w.useContext(j2);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_$=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(j2.Provider,{value:e,children:t})),S2=w.createContext(!1),E$=()=>w.useContext(S2);S2.Provider;function A$(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var P$=w.createContext(A$()),T$=()=>w.useContext(P$),C$=(e,t,r)=>{const n=r!=null&&r.state.error&&typeof e.throwOnError=="function"?kb(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||n)&&(t.isReset()||(e.retryOnMount=!1))},M$=e=>{w.useEffect(()=>{e.clearReset()},[e])},R$=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||kb(r,[e.error,n])),D$=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))}},k$=(e,t)=>e.isLoading&&e.isFetching&&!t,I$=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,a_=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function w2(e,t,r){var v,x,j,S;const n=E$(),i=T$(),l=ca(),o=l.defaultQueryOptions(e);(x=(v=l.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,o);const c=l.getQueryCache().get(o.queryHash);o._optimisticResults=n?"isRestoring":"optimistic",D$(o),C$(o,i,c),M$(i);const f=!l.getQueryCache().get(o.queryHash),[h]=w.useState(()=>new t(l,o)),p=h.getOptimisticResult(o),y=!n&&e.subscribed!==!1;if(w.useSyncExternalStore(w.useCallback(N=>{const O=y?h.subscribe($t.batchCalls(N)):br;return h.updateResult(),O},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),w.useEffect(()=>{h.setOptions(o)},[o,h]),I$(o,p))throw a_(o,h,i);if(R$({result:p,errorResetBoundary:i,throwOnError:o.throwOnError,query:c,suspense:o.suspense}))throw p.error;if((S=(j=l.getDefaultOptions().queries)==null?void 0:j._experimental_afterQuery)==null||S.call(j,o,p),o.experimental_prefetchInRender&&!Rc.isServer()&&k$(p,n)){const N=f?a_(o,h,i):c==null?void 0:c.promise;N==null||N.catch(br).finally(()=>{h.updateResult()})}return o.notifyOnChangeProps?p:h.trackResult(p)}function Ue(e,t){return w2(e,v2)}function Sx(e,t){const r=ca(),[n]=w.useState(()=>new w$(r,e));w.useEffect(()=>{n.setOptions(e)},[n,e]);const i=w.useSyncExternalStore(w.useCallback(o=>n.subscribe($t.batchCalls(o)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),l=w.useCallback((o,c)=>{n.mutate(o,c).catch(br)},[n]);if(i.error&&kb(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:l,mutateAsync:i.mutate}}function N2(e,t){return w2(e,b$)}var Oc=typeof window<"u"?w.useLayoutEffect:w.useEffect;function dg(e){const t=w.useRef({value:e,prev:null}),r=t.current.value;return e!==r&&(t.current={value:e,prev:r}),t.current.prev}function L$(e,t,r={},n={}){w.useEffect(()=>{if(!e.current||n.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([l])=>{t(l)},r);return i.observe(e.current),()=>{i.disconnect()}},[t,r,n.disabled,e])}function $$(e){const t=w.useRef(null);return w.useImperativeHandle(e,()=>t.current,[]),t}var O2=!1;function Dc(e){return e[e.length-1]}function z$(e){return typeof e=="function"}function Gi(e,t){return z$(e)?e(t):e}var B$=Object.prototype.hasOwnProperty,i_=Object.prototype.propertyIsEnumerable,U$=()=>Object.create(null),Ns=(e,t)=>$a(e,t,U$);function $a(e,t,r=()=>({}),n=0){if(e===t)return e;if(n>500)return t;const i=t,l=o_(e)&&o_(i);if(!l&&!(zo(e)&&zo(i)))return i;const o=l?e:s_(e);if(!o)return i;const c=l?i:s_(i);if(!c)return i;const f=o.length,h=c.length,p=l?new Array(h):r();let y=0;for(let v=0;v<h;v++){const x=l?v:c[v],j=e[x],S=i[x];if(j===S){p[x]=j,(l?v<f:B$.call(e,x))&&y++;continue}if(j===null||S===null||typeof j!="object"||typeof S!="object"){p[x]=S;continue}const N=$a(j,S,r,n+1);p[x]=N,N===j&&y++}return f===h&&y===f?e:p}function s_(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!i_.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(!i_.call(e,i))return!1;n.push(i)}return n}function zo(e){if(!l_(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const r=t.prototype;return!(!l_(r)||!r.hasOwnProperty("isPrototypeOf"))}function l_(e){return Object.prototype.toString.call(e)==="[object Object]"}function o_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Qs(e,t,r){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0,i=e.length;n<i;n++)if(!Qs(e[n],t[n],r))return!1;return!0}if(zo(e)&&zo(t)){const n=(r==null?void 0:r.ignoreUndefined)??!0;if(r!=null&&r.partial){for(const o in t)if((!n||t[o]!==void 0)&&!Qs(e[o],t[o],r))return!1;return!0}let i=0;if(!n)i=Object.keys(e).length;else for(const o in e)e[o]!==void 0&&i++;let l=0;for(const o in t)if((!n||t[o]!==void 0)&&(l++,l>i||!Qs(e[o],t[o],r)))return!1;return i===l}return!1}function Bo(e){let t,r;const n=new Promise((i,l)=>{t=i,r=l});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 kc(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function q$(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function u_(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 q$(t)}var H$=["http:","https:","mailto:","tel:"];function Rh(e,t){if(!e)return!1;try{const r=new URL(e);return!t.has(r.protocol)}catch{return!1}}function lc(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+=u_(e.slice(r,i.index))+i[0],r=t.lastIndex;n=n+u_(r?e.slice(r):e);let l=!1;return n.startsWith("//")&&(l=!0,n="/"+n.replace(/^\/+/,"")),{path:n,handledProtocolRelativeURL:l}}function F$(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function K$(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Ua(){throw new Error("Invariant failed")}function Ic(e){const t=new Map;let r,n;const i=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,n&&(n.next=l,l.prev=n)):(l.next.prev=void 0,r=l.next,l.next=void 0,n&&(l.prev=n,n.next=l)),n=l)};return{get(l){const o=t.get(l);if(o)return i(o),o.value},set(l,o){if(t.size>=e&&r){const f=r;t.delete(f.key),f.next&&(r=f.next,f.next.prev=void 0),f===n&&(n=void 0)}const c=t.get(l);if(c)c.value=o,i(c);else{const f={key:l,value:o,prev:n};n&&(n.next=f),n=f,r||(r=f),t.set(l,f)}},clear(){t.clear(),r=void 0,n=void 0}}}var Rs=4,_2=5;function G$(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 Lb(e,t,r=new Uint16Array(6)){const n=e.indexOf("/",t),i=n===-1?e.length:n,l=e.substring(t,i);if(!l||!l.includes("$"))return r[0]=0,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r;if(l==="$"){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(l.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 o=G$(l);if(o){const[c,f]=o,h=l.charCodeAt(c+1);if(h===45){if(c+2<l.length&&l.charCodeAt(c+2)===36){const p=c+3,y=f;if(p<y)return r[0]=3,r[1]=t+c,r[2]=t+p,r[3]=t+y,r[4]=t+f+1,r[5]=i,r}}else if(h===36){const p=c+1,y=c+2;return y===f?(r[0]=2,r[1]=t+c,r[2]=t+p,r[3]=t+y,r[4]=t+f+1,r[5]=e.length,r):(r[0]=1,r[1]=t+c,r[2]=t+y,r[3]=t+f,r[4]=t+f+1,r[5]=i,r)}}return r[0]=0,r[1]=t,r[2]=t,r[3]=i,r[4]=i,r[5]=i,r}function Im(e,t,r,n,i,l,o){var f,h,p,y,v,x,j,S,N,O,P,E,A;o==null||o(r);let c=n;{const T=r.fullPath??r.from,M=T.length,R=((f=r.options)==null?void 0:f.caseSensitive)??e,I=!!((p=(h=r.options)==null?void 0:h.params)!=null&&p.parse&&((v=(y=r.options)==null?void 0:y.skipRouteOnParseError)!=null&&v.params));for(;c<M;){const D=Lb(T,c,t);let H;const q=c,ae=D[5];switch(c=ae+1,l++,D[0]){case 0:{const Q=T.substring(D[2],D[3]);if(R){const Z=(x=i.static)==null?void 0:x.get(Q);if(Z)H=Z;else{i.static??(i.static=new Map);const B=Ds(r.fullPath??r.from);B.parent=i,B.depth=l,H=B,i.static.set(Q,B)}}else{const Z=Q.toLowerCase(),B=(j=i.staticInsensitive)==null?void 0:j.get(Z);if(B)H=B;else{i.staticInsensitive??(i.staticInsensitive=new Map);const K=Ds(r.fullPath??r.from);K.parent=i,K.depth=l,H=K,i.staticInsensitive.set(Z,K)}}break}case 1:{const Q=T.substring(q,D[1]),Z=T.substring(D[4],ae),B=R&&!!(Q||Z),K=Q?B?Q:Q.toLowerCase():void 0,ee=Z?B?Z:Z.toLowerCase():void 0,se=!I&&((S=i.dynamic)==null?void 0:S.find(ue=>!ue.skipOnParamError&&ue.caseSensitive===B&&ue.prefix===K&&ue.suffix===ee));if(se)H=se;else{const ue=hg(1,r.fullPath??r.from,B,K,ee);H=ue,ue.depth=l,ue.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(ue)}break}case 3:{const Q=T.substring(q,D[1]),Z=T.substring(D[4],ae),B=R&&!!(Q||Z),K=Q?B?Q:Q.toLowerCase():void 0,ee=Z?B?Z:Z.toLowerCase():void 0,se=!I&&((N=i.optional)==null?void 0:N.find(ue=>!ue.skipOnParamError&&ue.caseSensitive===B&&ue.prefix===K&&ue.suffix===ee));if(se)H=se;else{const ue=hg(3,r.fullPath??r.from,B,K,ee);H=ue,ue.parent=i,ue.depth=l,i.optional??(i.optional=[]),i.optional.push(ue)}break}case 2:{const Q=T.substring(q,D[1]),Z=T.substring(D[4],ae),B=R&&!!(Q||Z),K=Q?B?Q:Q.toLowerCase():void 0,ee=Z?B?Z:Z.toLowerCase():void 0,se=hg(2,r.fullPath??r.from,B,K,ee);H=se,se.parent=i,se.depth=l,i.wildcard??(i.wildcard=[]),i.wildcard.push(se)}}i=H}if(I&&r.children&&!r.isRoot&&r.id&&r.id.charCodeAt(r.id.lastIndexOf("/")+1)===95){const D=Ds(r.fullPath??r.from);D.kind=_2,D.parent=i,l++,D.depth=l,i.pathless??(i.pathless=[]),i.pathless.push(D),i=D}const $=(r.path||!r.children)&&!r.isRoot;if($&&T.endsWith("/")){const D=Ds(r.fullPath??r.from);D.kind=Rs,D.parent=i,l++,D.depth=l,i.index=D,i=D}i.parse=((P=(O=r.options)==null?void 0:O.params)==null?void 0:P.parse)??null,i.skipOnParamError=I,i.parsingPriority=((A=(E=r.options)==null?void 0:E.skipRouteOnParseError)==null?void 0:A.priority)??0,$&&!i.route&&(i.route=r,i.fullPath=r.fullPath??r.from)}if(r.children)for(const T of r.children)Im(e,t,T,c,i,l,o)}function fg(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 Mi(e){var t,r,n;if(e.pathless)for(const i of e.pathless)Mi(i);if(e.static)for(const i of e.static.values())Mi(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Mi(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(fg);for(const i of e.dynamic)Mi(i)}if((r=e.optional)!=null&&r.length){e.optional.sort(fg);for(const i of e.optional)Mi(i)}if((n=e.wildcard)!=null&&n.length){e.wildcard.sort(fg);for(const i of e.wildcard)Mi(i)}}function Ds(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function hg(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 Y$(e,t){const r=Ds("/"),n=new Uint16Array(6);for(const i of e)Im(!1,n,i,1,r,0);Mi(r),t.masksTree=r,t.flatCache=Ic(1e3)}function V$(e,t){e||(e="/");const r=t.flatCache.get(e);if(r)return r;const n=$b(e,t.masksTree);return t.flatCache.set(e,n),n}function Q$(e,t,r,n,i){e||(e="/"),n||(n="/");const l=t?`case\0${e}`:e;let o=i.singleCache.get(l);return o||(o=Ds("/"),Im(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(l,o)),$b(n,o,r)}function X$(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 l;try{l=$b(e,t.segmentTree,r)}catch(o){if(o instanceof URIError)l=null;else throw o}return l&&(l.branch=J$(l.route)),t.matchCache.set(n,l),l}function Z$(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function W$(e,t=!1,r){const n=Ds(e.fullPath),i=new Uint16Array(6),l={},o={};let c=0;return Im(t,i,e,1,n,0,f=>{if(r==null||r(f,c),f.id in l&&Ua(),l[f.id]=f,c!==0&&f.path){const h=Z$(f.fullPath);(!o[h]||f.fullPath.endsWith("/"))&&(o[h]=f)}c++}),Mi(n),{processedTree:{segmentTree:n,singleCache:Ic(1e3),matchCache:Ic(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:o}}function $b(e,t,r=!1){const n=e.split("/"),i=tz(e,n,t,r);if(!i)return null;const[l]=E2(e,n,i);return{route:i.node.route,rawParams:l,parsedParams:i.parsedParams}}function E2(e,t,r){var p,y,v,x,j,S,N,O,P,E;const n=ez(r.node);let i=null;const l=Object.create(null);let o=((p=r.extract)==null?void 0:p.part)??0,c=((y=r.extract)==null?void 0:y.node)??0,f=((v=r.extract)==null?void 0:v.path)??0,h=((x=r.extract)==null?void 0:x.segment)??0;for(;c<n.length;o++,c++,f++,h++){const A=n[c];if(A.kind===Rs)break;if(A.kind===_2){h--,o--,f--;continue}const T=t[o],M=f;if(T&&(f+=T.length),A.kind===1){i??(i=r.node.fullPath.split("/"));const R=i[h],I=((j=A.prefix)==null?void 0:j.length)??0;if(R.charCodeAt(I)===123){const $=((S=A.suffix)==null?void 0:S.length)??0,D=R.substring(I+2,R.length-$-1),H=T.substring(I,T.length-$);l[D]=decodeURIComponent(H)}else{const $=R.substring(1);l[$]=decodeURIComponent(T)}}else if(A.kind===3){if(r.skipped&1<<c){o--,f=M-1;continue}i??(i=r.node.fullPath.split("/"));const R=i[h],I=((N=A.prefix)==null?void 0:N.length)??0,$=((O=A.suffix)==null?void 0:O.length)??0,D=R.substring(I+3,R.length-$-1),H=A.suffix||A.prefix?T.substring(I,T.length-$):T;H&&(l[D]=decodeURIComponent(H))}else if(A.kind===2){const R=A,I=e.substring(M+(((P=R.prefix)==null?void 0:P.length)??0),e.length-(((E=R.suffix)==null?void 0:E.length)??0)),$=decodeURIComponent(I);l["*"]=$,l._splat=$;break}}return r.rawParams&&Object.assign(l,r.rawParams),[l,{part:o,node:c,path:f,segment:h}]}function J$(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ez(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function tz(e,t,r,n){if(e==="/"&&r.index)return{node:r.index,skipped:0};const i=!Dc(t),l=i&&e!=="/",o=t.length-(i?1:0),c=[{node:r,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let f=null,h=null,p=null;for(;c.length;){const y=c.pop(),{node:v,index:x,skipped:j,depth:S,statics:N,dynamics:O,optionals:P}=y;let{extract:E,rawParams:A,parsedParams:T}=y;if(v.skipOnParamError){if(!mg(e,t,y))continue;A=y.rawParams,E=y.extract,T=y.parsedParams}n&&v.route&&v.kind!==Rs&&oc(h,y)&&(h=y);const M=x===o;if(M&&(v.route&&!l&&oc(p,y)&&(p=y),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const R=M?void 0:t[x];let I;if(M&&v.index){const $={node:v.index,index:x,skipped:j,depth:S+1,statics:N,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T};let D=!0;if(v.index.skipOnParamError&&(mg(e,t,$)||(D=!1)),D){if(N===o&&!O&&!P&&!j)return $;oc(p,$)&&(p=$)}}if(v.wildcard&&oc(f,y))for(const $ of v.wildcard){const{prefix:D,suffix:H}=$;if(D&&(M||!($.caseSensitive?R:I??(I=R.toLowerCase())).startsWith(D)))continue;if(H){if(M)continue;const ae=t.slice(x).join("/").slice(-H.length);if(($.caseSensitive?ae:ae.toLowerCase())!==H)continue}const q={node:$,index:o,skipped:j,depth:S,statics:N,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T};if(!($.skipOnParamError&&!mg(e,t,q))){f=q;break}}if(v.optional){const $=j|1<<S,D=S+1;for(let H=v.optional.length-1;H>=0;H--){const q=v.optional[H];c.push({node:q,index:x,skipped:$,depth:D,statics:N,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T})}if(!M)for(let H=v.optional.length-1;H>=0;H--){const q=v.optional[H],{prefix:ae,suffix:Q}=q;if(ae||Q){const Z=q.caseSensitive?R:I??(I=R.toLowerCase());if(ae&&!Z.startsWith(ae)||Q&&!Z.endsWith(Q))continue}c.push({node:q,index:x+1,skipped:j,depth:D,statics:N,dynamics:O,optionals:P+1,extract:E,rawParams:A,parsedParams:T})}}if(!M&&v.dynamic&&R)for(let $=v.dynamic.length-1;$>=0;$--){const D=v.dynamic[$],{prefix:H,suffix:q}=D;if(H||q){const ae=D.caseSensitive?R:I??(I=R.toLowerCase());if(H&&!ae.startsWith(H)||q&&!ae.endsWith(q))continue}c.push({node:D,index:x+1,skipped:j,depth:S+1,statics:N,dynamics:O+1,optionals:P,extract:E,rawParams:A,parsedParams:T})}if(!M&&v.staticInsensitive){const $=v.staticInsensitive.get(I??(I=R.toLowerCase()));$&&c.push({node:$,index:x+1,skipped:j,depth:S+1,statics:N+1,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T})}if(!M&&v.static){const $=v.static.get(R);$&&c.push({node:$,index:x+1,skipped:j,depth:S+1,statics:N+1,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T})}if(v.pathless){const $=S+1;for(let D=v.pathless.length-1;D>=0;D--){const H=v.pathless[D];c.push({node:H,index:x,skipped:j,depth:$,statics:N,dynamics:O,optionals:P,extract:E,rawParams:A,parsedParams:T})}}}if(p&&f)return oc(f,p)?p:f;if(p)return p;if(f)return f;if(n&&h){let y=h.index;for(let x=0;x<h.index;x++)y+=t[x].length;const v=y===e.length?"/":e.slice(y);return h.rawParams??(h.rawParams=Object.create(null)),h.rawParams["**"]=decodeURIComponent(v),h}return null}function mg(e,t,r){try{const[n,i]=E2(e,t,r);r.rawParams=n,r.extract=i;const l=r.node.parse(n);return r.parsedParams=Object.assign(Object.create(null),r.parsedParams,l),!0}catch{return null}}function oc(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Rs)>(e.node.kind===Rs)||t.node.kind===Rs==(e.node.kind===Rs)&&t.depth>e.depth))):!0}function jh(e){return zb(e.filter(t=>t!==void 0).join("/"))}function zb(e){return e.replace(/\/{2,}/g,"/")}function A2(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Xi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function P2(e){return Xi(A2(e))}function Dh(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function rz(e,t,r){return Dh(e,r)===Dh(t,r)}function nz({base:e,to:t,trailingSlash:r="never",cache:n}){const i=t.startsWith("/"),l=!i&&t===".";let o;if(n){o=i?t:l?e:e+"\0"+t;const y=n.get(o);if(y)return y}let c;if(l)c=e.split("/");else if(i)c=t.split("/");else{for(c=e.split("/");c.length>1&&Dc(c)==="";)c.pop();const y=t.split("/");for(let v=0,x=y.length;v<x;v++){const j=y[v];j===""?v?v===x-1&&c.push(j):c=[j]:j===".."?c.pop():j==="."||c.push(j)}}c.length>1&&(Dc(c)===""?r==="never"&&c.pop():r==="always"&&c.push(""));let f,h="";for(let y=0;y<c.length;y++){y>0&&(h+="/");const v=c[y];if(!v)continue;f=Lb(v,0,f);const x=f[0];if(x===0){h+=v;continue}const j=f[5],S=v.substring(0,f[1]),N=v.substring(f[4],j),O=v.substring(f[2],f[3]);x===1?h+=S||N?`${S}{$${O}}${N}`:`$${O}`:x===2?h+=S||N?`${S}{$}${N}`:"$":h+=`${S}{-$${O}}${N}`}h=zb(h);const p=h||"/";return o&&n&&n.set(o,p),p}function az(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,l=>t.get(l)??l)}function pg(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=>d_(i,r)).join("/"):d_(n,r)}function c_({path:e,params:t,decoder:r,...n}){let i=!1;const l=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:l,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:l,isMissingParams:i};const o=e.length;let c=0,f,h="";for(;c<o;){const p=c;f=Lb(e,p,f);const y=f[5];if(c=y+1,p===y)continue;const v=f[0];if(v===0){h+="/"+e.substring(p,y);continue}if(v===2){const x=t._splat;l._splat=x,l["*"]=x;const j=e.substring(p,f[1]),S=e.substring(f[4],y);if(!x){i=!0,(j||S)&&(h+="/"+j+S);continue}const N=pg("_splat",t,r);h+="/"+j+N+S;continue}if(v===1){const x=e.substring(f[2],f[3]);!i&&!(x in t)&&(i=!0),l[x]=t[x];const j=e.substring(p,f[1]),S=e.substring(f[4],y),N=pg(x,t,r)??"undefined";h+="/"+j+N+S;continue}if(v===3){const x=e.substring(f[2],f[3]),j=t[x];if(j==null)continue;l[x]=j;const S=e.substring(p,f[1]),N=e.substring(f[4],y),O=pg(x,t,r)??"";h+="/"+S+O+N;continue}}return e.endsWith("/")&&(h+="/"),{usedParams:l,interpolatedPath:h||"/",isMissingParams:i}}function d_(e,t){const r=encodeURIComponent(e);return(t==null?void 0:t(r))??r}function wr(e){return!!(e!=null&&e.isNotFound)}function iz(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var sz="tsr-scroll-restoration-v1_3";function lz(){const e=iz();if(!e)return null;let t={};try{const n=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");zo(n)&&(t=n)}catch{}return{get state(){return t},set:n=>{t=Gi(n,t)||t},persist:()=>{try{e.setItem(sz,JSON.stringify(t))}catch{}}}}var f_=lz(),oz=e=>e.state.__TSR_key||e.href;function uz(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 Jf=!1,uc="window",h_="data-scroll-restoration-id";function cz(e,t){if(!f_)return;const r=f_;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!r)return;e.isScrollRestorationSetup=!0,Jf=!1;const n=e.options.getScrollRestorationKey||oz,i=new Map;window.history.scrollRestoration="manual";const l=c=>{if(!(Jf||!e.isScrollRestoring))if(c.target===document||c.target===window)i.set(uc,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const f=c.target;i.set(f,{scrollX:f.scrollLeft||0,scrollY:f.scrollTop||0})}},o=c=>{var h;if(!e.isScrollRestoring||!c||i.size===0||!r)return;const f=(h=r.state)[c]||(h[c]={});for(const[p,y]of i){let v;if(p===uc)v=uc;else if(p.isConnected){const x=p.getAttribute(h_);v=x?`[${h_}="${x}"]`:uz(p)}v&&(f[v]=y)}};document.addEventListener("scroll",l,!0),e.subscribe("onBeforeLoad",c=>{o(c.fromLocation?n(c.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{o(n(e.stores.resolvedLocation.state??e.stores.location.state)),r.persist()}),e.subscribe("onRendered",c=>{var y;const f=n(c.toLocation),h=e.options.scrollRestorationBehavior,p=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){Jf=!0;try{const v=e.isScrollRestoring?r.state[f]:void 0;let x=!1;if(v)for(const j in v){const S=v[j];if(!zo(S))continue;const{scrollX:N,scrollY:O}=S;if(!(!Number.isFinite(N)||!Number.isFinite(O))){if(j===uc)window.scrollTo({top:O,left:N,behavior:h}),x=!0;else if(j){let P;try{P=document.querySelector(j)}catch{continue}P&&(P.scrollLeft=N,P.scrollTop=O,x=!0)}}}if(!x){const j=e.history.location.hash.slice(1);if(j){const S=((y=window.history.state)==null?void 0:y.__hashScrollIntoViewOptions)??!0;if(S){const N=document.getElementById(j);N&&N.scrollIntoView(S)}}else{const S={top:0,left:0,behavior:h};if(window.scrollTo(S),p)for(const N of p){if(N===uc)continue;const O=typeof N=="function"?N():document.querySelector(N);O&&O.scrollTo(S)}}}}finally{Jf=!1}e.isScrollRestoring&&r.set(v=>(v[f]||(v[f]={}),v))}})}function dz(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 yg(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function fz(e){const t=new URLSearchParams(e),r=Object.create(null);for(const[n,i]of t.entries()){const l=r[n];l==null?r[n]=yg(i):Array.isArray(l)?l.push(yg(i)):r[n]=[l,yg(i)]}return r}var hz=pz(JSON.parse),mz=yz(JSON.stringify,JSON.parse);function pz(e){return t=>{t[0]==="?"&&(t=t.substring(1));const r=fz(t);for(const n in r){const i=r[n];if(typeof i=="string")try{r[n]=e(i)}catch{}}return r}}function yz(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 l=dz(i,n);return l?`?${l}`:""}}var Xs="__root__";function vz(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const r=new Response(null,{status:e.statusCode,headers:t});if(r.options=e,e.throw)throw r;return r}function $r(e){return e instanceof Response&&!!e.options}function gz(e){return{input:({url:t})=>{for(const r of e)t=wx(r,t);return t},output:({url:t})=>{for(let r=e.length-1;r>=0;r--)t=T2(e[r],t);return t}}}function xz(e){const t=P2(e.basepath),r=`/${t}`,n=`${r}/`,i=e.caseSensitive?r:r.toLowerCase(),l=e.caseSensitive?n:n.toLowerCase();return{input:({url:o})=>{const c=e.caseSensitive?o.pathname:o.pathname.toLowerCase();return c===i?o.pathname="/":c.startsWith(l)&&(o.pathname=o.pathname.slice(r.length)),o},output:({url:o})=>(o.pathname=jh(["/",t,o.pathname]),o)}}function wx(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 T2(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 bz(e,t){const{createMutableStore:r,createReadonlyStore:n,batch:i,init:l}=t,o=new Map,c=new Map,f=new Map,h=r(e.status),p=r(e.loadedAt),y=r(e.isLoading),v=r(e.isTransitioning),x=r(e.location),j=r(e.resolvedLocation),S=r(e.statusCode),N=r(e.redirect),O=r([]),P=r([]),E=r([]),A=n(()=>vg(o,O.state)),T=n(()=>vg(c,P.state)),M=n(()=>vg(f,E.state)),R=n(()=>O.state[0]),I=n(()=>O.state.some(K=>{var ee;return((ee=o.get(K))==null?void 0:ee.state.status)==="pending"})),$=n(()=>{var K;return{locationHref:x.state.href,resolvedLocationHref:(K=j.state)==null?void 0:K.href,status:h.state}}),D=n(()=>({status:h.state,loadedAt:p.state,isLoading:y.state,isTransitioning:v.state,matches:A.state,location:x.state,resolvedLocation:j.state,statusCode:S.state,redirect:N.state})),H=Ic(64);function q(K){let ee=H.get(K);return ee||(ee=n(()=>{const se=O.state;for(const ue of se){const k=o.get(ue);if(k&&k.routeId===K)return k.state}}),H.set(K,ee)),ee}const ae={status:h,loadedAt:p,isLoading:y,isTransitioning:v,location:x,resolvedLocation:j,statusCode:S,redirect:N,matchesId:O,pendingMatchesId:P,cachedMatchesId:E,activeMatchesSnapshot:A,pendingMatchesSnapshot:T,cachedMatchesSnapshot:M,firstMatchId:R,hasPendingMatches:I,matchRouteReactivity:$,activeMatchStoresById:o,pendingMatchStoresById:c,cachedMatchStoresById:f,__store:D,getMatchStoreByRouteId:q,setActiveMatches:Q,setPendingMatches:Z,setCachedMatches:B};Q(e.matches),l==null||l(ae);function Q(K){gg(K,o,O,r,i)}function Z(K){gg(K,c,P,r,i)}function B(K){gg(K,f,E,r,i)}return ae}function vg(e,t){const r=[];for(const n of t){const i=e.get(n);i&&r.push(i.state)}return r}function gg(e,t,r,n,i){const l=e.map(c=>c.id),o=new Set(l);i(()=>{for(const c of t.keys())o.has(c)||t.delete(c);for(const c of e){const f=t.get(c.id);if(!f){const h=n(c);h.routeId=c.routeId,t.set(c.id,h);continue}f.routeId=c.routeId,f.state!==c&&f.setState(()=>c)}K$(r.state,l)||r.setState(()=>l)})}var Nx=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},jz=e=>e.stores.matchesId.state.some(t=>{var r;return(r=e.stores.activeMatchStoresById.get(t))==null?void 0:r.state._forcePending}),Lm=(e,t)=>!!(e.preload&&!e.router.stores.activeMatchStoresById.has(t)),Zs=(e,t,r=!0)=>{const n={...e.router.options.context??{}},i=r?t:t-1;for(let l=0;l<=i;l++){const o=e.matches[l];if(!o)continue;const c=e.router.getMatch(o.id);c&&Object.assign(n,c.__routeContext,c.__beforeLoadContext)}return n},m_=(e,t)=>{if(!e.matches.length)return;const r=t.routeId,n=e.matches.findIndex(o=>o.routeId===e.router.routeTree.id),i=n>=0?n:0;let l=r?e.matches.findIndex(o=>o.routeId===r):e.firstBadMatchIndex??e.matches.length-1;l<0&&(l=i);for(let o=l;o>=0;o--){const c=e.matches[o];if(e.router.looseRoutesById[c.routeId].options.notFoundComponent)return o}return r?l:i},Yi=(e,t,r)=>{var n,i,l;if(!(!$r(r)&&!wr(r)))throw $r(r)&&r.redirectHandled&&!r.options.reloadDocument||(t&&((n=t._nonReactive.beforeLoadPromise)==null||n.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=r,e.updateMatch(t.id,o=>({...o,status:$r(r)?"redirected":o.status==="pending"?"success":o.status,context:Zs(e,t.index),isFetching:!1,error:r})),wr(r)&&!r.routeId&&(r.routeId=t.routeId),(l=t._nonReactive.loadPromise)==null||l.resolve()),$r(r)&&(e.rendered=!0,r.options._fromLocation=e.location,r.redirectHandled=!0,r=e.router.resolveRedirect(r))),r},C2=(e,t)=>{const r=e.router.getMatch(t);return!!(!r||r._nonReactive.dehydrated)},p_=(e,t,r)=>{const n=Zs(e,r);e.updateMatch(t,i=>({...i,context:n}))},cc=(e,t,r,n)=>{var c,f;const{id:i,routeId:l}=e.matches[t],o=e.router.looseRoutesById[l];if(r instanceof Promise)throw r;r.routerCode=n,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),Yi(e,e.router.getMatch(i),r);try{(f=(c=o.options).onError)==null||f.call(c,r)}catch(h){r=h,Yi(e,e.router.getMatch(i),r)}e.updateMatch(i,h=>{var p,y;return(p=h._nonReactive.beforeLoadPromise)==null||p.resolve(),h._nonReactive.beforeLoadPromise=void 0,(y=h._nonReactive.loadPromise)==null||y.resolve(),{...h,error:r,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!$r(r)&&!wr(r)&&(e.serialError??(e.serialError=r))},M2=(e,t,r,n)=>{var l;if(n._nonReactive.pendingTimeout!==void 0)return;const i=r.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!Lm(e,t)&&(r.options.loader||r.options.beforeLoad||D2(r))&&typeof i=="number"&&i!==1/0&&(r.options.pendingComponent??((l=e.router.options)==null?void 0:l.defaultPendingComponent))){const o=setTimeout(()=>{Nx(e)},i);n._nonReactive.pendingTimeout=o}},Sz=(e,t,r)=>{const n=e.router.getMatch(t);if(!n._nonReactive.beforeLoadPromise&&!n._nonReactive.loaderPromise)return;M2(e,t,r,n);const i=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&Yi(e,l,l.error)};return n._nonReactive.beforeLoadPromise?n._nonReactive.beforeLoadPromise.then(i):i()},wz=(e,t,r,n)=>{const i=e.router.getMatch(t);let l=i._nonReactive.loadPromise;i._nonReactive.loadPromise=Bo(()=>{l==null||l.resolve(),l=void 0});const{paramsError:o,searchError:c}=i;o&&cc(e,r,o,"PARSE_PARAMS"),c&&cc(e,r,c,"VALIDATE_SEARCH"),M2(e,t,n,i);const f=new AbortController;let h=!1;const p=()=>{h||(h=!0,e.updateMatch(t,A=>({...A,isFetching:"beforeLoad",fetchCount:A.fetchCount+1,abortController:f})))},y=()=>{var A;(A=i._nonReactive.beforeLoadPromise)==null||A.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,T=>({...T,isFetching:!1}))};if(!n.options.beforeLoad){e.router.batch(()=>{p(),y()});return}i._nonReactive.beforeLoadPromise=Bo();const v={...Zs(e,r,!1),...i.__routeContext},{search:x,params:j,cause:S}=i,N=Lm(e,t),O={search:x,abortController:f,params:j,preload:N,context:v,location:e.location,navigate:A=>e.router.navigate({...A,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:N?"preload":S,matches:e.matches,routeId:n.id,...e.router.options.additionalContext},P=A=>{if(A===void 0){e.router.batch(()=>{p(),y()});return}($r(A)||wr(A))&&(p(),cc(e,r,A,"BEFORE_LOAD")),e.router.batch(()=>{p(),e.updateMatch(t,T=>({...T,__beforeLoadContext:A})),y()})};let E;try{if(E=n.options.beforeLoad(O),kc(E))return p(),E.catch(A=>{cc(e,r,A,"BEFORE_LOAD")}).then(P)}catch(A){p(),cc(e,r,A,"BEFORE_LOAD")}P(E)},Nz=(e,t)=>{const{id:r,routeId:n}=e.matches[t],i=e.router.looseRoutesById[n],l=()=>c(),o=()=>wz(e,r,t,i),c=()=>{if(C2(e,r))return;const f=Sz(e,r,i);return kc(f)?f.then(o):o()};return l()},Oz=(e,t,r)=>{var l,o,c,f,h,p;const n=e.router.getMatch(t);if(!n||!r.options.head&&!r.options.scripts&&!r.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:n,params:n.params,loaderData:n.loaderData};return Promise.all([(o=(l=r.options).head)==null?void 0:o.call(l,i),(f=(c=r.options).scripts)==null?void 0:f.call(c,i),(p=(h=r.options).headers)==null?void 0:p.call(h,i)]).then(([y,v,x])=>({meta:y==null?void 0:y.meta,links:y==null?void 0:y.links,headScripts:y==null?void 0:y.scripts,headers:x,scripts:v,styles:y==null?void 0:y.styles}))},R2=(e,t,r,n,i)=>{const l=t[n-1],{params:o,loaderDeps:c,abortController:f,cause:h}=e.router.getMatch(r),p=Zs(e,n),y=Lm(e,r);return{params:o,deps:c,preload:!!y,parentMatchPromise:l,abortController:f,context:p,location:e.location,navigate:v=>e.router.navigate({...v,_fromLocation:e.location}),cause:y?"preload":h,route:i,...e.router.options.additionalContext}},y_=async(e,t,r,n,i)=>{var l,o,c,f,h;try{const p=e.router.getMatch(r);try{(!(O2??e.router.isServer)||p.ssr===!0)&&Lc(i);const y=i.options.loader,v=typeof y=="function"?y:y==null?void 0:y.handler,x=v==null?void 0:v(R2(e,t,r,n,i)),j=!!v&&kc(x);if((j||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||p._nonReactive.minPendingPromise)&&e.updateMatch(r,N=>({...N,isFetching:"loader"})),v){const N=j?await x:x;Yi(e,e.router.getMatch(r),N),N!==void 0&&e.updateMatch(r,O=>({...O,loaderData:N}))}i._lazyPromise&&await i._lazyPromise;const S=p._nonReactive.minPendingPromise;S&&await S,i._componentsPromise&&await i._componentsPromise,e.updateMatch(r,N=>({...N,error:void 0,context:Zs(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(y){let v=y;if((v==null?void 0:v.name)==="AbortError"){if(p.abortController.signal.aborted){(l=p._nonReactive.loaderPromise)==null||l.resolve(),p._nonReactive.loaderPromise=void 0;return}e.updateMatch(r,j=>({...j,status:j.status==="pending"?"success":j.status,isFetching:!1,context:Zs(e,n)}));return}const x=p._nonReactive.minPendingPromise;x&&await x,wr(y)&&await((c=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:c.call(o)),Yi(e,e.router.getMatch(r),y);try{(h=(f=i.options).onError)==null||h.call(f,y)}catch(j){v=j,Yi(e,e.router.getMatch(r),j)}!$r(v)&&!wr(v)&&await Lc(i,["errorComponent"]),e.updateMatch(r,j=>({...j,error:v,context:Zs(e,n),status:"error",isFetching:!1}))}}catch(p){const y=e.router.getMatch(r);y&&(y._nonReactive.loaderPromise=void 0),Yi(e,y,p)}},_z=async(e,t,r)=>{var x,j,S,N;async function n(O,P,E,A,T){const M=Date.now()-P.updatedAt,R=O?T.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:T.options.staleTime??e.router.options.defaultStaleTime??0,I=T.options.shouldReload,$=typeof I=="function"?I(R2(e,t,i,r,T)):I,{status:D,invalid:H}=A,q=M>=R&&(!!e.forceStaleReload||A.cause==="enter"||E!==void 0&&E!==A.id);o=D==="success"&&(H||($??q)),O&&T.options.preload===!1||(o&&!e.sync&&p?(c=!0,(async()=>{var ae,Q;try{await y_(e,t,i,r,T);const Z=e.router.getMatch(i);(ae=Z._nonReactive.loaderPromise)==null||ae.resolve(),(Q=Z._nonReactive.loadPromise)==null||Q.resolve(),Z._nonReactive.loaderPromise=void 0,Z._nonReactive.loadPromise=void 0}catch(Z){$r(Z)&&await e.router.navigate(Z.options)}})()):D!=="success"||o?await y_(e,t,i,r,T):p_(e,i,r))}const{id:i,routeId:l}=e.matches[r];let o=!1,c=!1;const f=e.router.looseRoutesById[l],h=f.options.loader,p=((typeof h=="function"||h==null?void 0:h.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(C2(e,i)){if(!e.router.getMatch(i))return e.matches[r];p_(e,i,r)}else{const O=e.router.getMatch(i),P=e.router.stores.matchesId.state[r],E=((x=P&&e.router.stores.activeMatchStoresById.get(P)||null)==null?void 0:x.routeId)===l?P:(j=e.router.stores.activeMatchesSnapshot.state.find(T=>T.routeId===l))==null?void 0:j.id,A=Lm(e,i);if(O._nonReactive.loaderPromise){if(O.status==="success"&&!e.sync&&!O.preload&&p)return O;await O._nonReactive.loaderPromise;const T=e.router.getMatch(i),M=T._nonReactive.error||T.error;M&&Yi(e,T,M),T.status==="pending"&&await n(A,O,E,T,f)}else{const T=A&&!e.router.stores.activeMatchStoresById.has(i),M=e.router.getMatch(i);M._nonReactive.loaderPromise=Bo(),T!==M.preload&&e.updateMatch(i,R=>({...R,preload:T})),await n(A,O,E,M,f)}}const y=e.router.getMatch(i);c||((S=y._nonReactive.loaderPromise)==null||S.resolve(),(N=y._nonReactive.loadPromise)==null||N.resolve(),y._nonReactive.loadPromise=void 0),clearTimeout(y._nonReactive.pendingTimeout),y._nonReactive.pendingTimeout=void 0,c||(y._nonReactive.loaderPromise=void 0),y._nonReactive.dehydrated=void 0;const v=c?y.isFetching:!1;return v!==y.isFetching||y.invalid!==!1?(e.updateMatch(i,O=>({...O,isFetching:v,invalid:!1})),e.router.getMatch(i)):y};async function v_(e){var v,x;const t=e,r=[];jz(t.router)&&Nx(t);let n;for(let j=0;j<t.matches.length;j++){try{const S=Nz(t,j);kc(S)&&await S}catch(S){if($r(S))throw S;if(wr(S))n=S;else if(!t.preload)throw S;break}if(t.serialError)break}const i=t.firstBadMatchIndex??t.matches.length,l=n&&!t.preload?m_(t,n):void 0,o=n&&t.preload?0:l!==void 0?Math.min(l+1,i):i;let c,f;for(let j=0;j<o;j++)r.push(_z(t,r,j));try{await Promise.all(r)}catch{const j=await Promise.allSettled(r);for(const S of j){if(S.status!=="rejected")continue;const N=S.reason;if($r(N))throw N;wr(N)?c??(c=N):f??(f=N)}if(f!==void 0)throw f}const h=c??(n&&!t.preload?n:void 0);let p=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!h&&n&&t.preload)return t.matches;if(h){const j=m_(t,h);j===void 0&&Ua();const S=t.matches[j],N=t.router.looseRoutesById[S.routeId],O=(v=t.router.options)==null?void 0:v.defaultNotFoundComponent;!N.options.notFoundComponent&&O&&(N.options.notFoundComponent=O),h.routeId=S.routeId;const P=S.routeId===t.router.routeTree.id;t.updateMatch(S.id,E=>({...E,...P?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:h},isFetching:!1})),p=j,await Lc(N,["notFoundComponent"])}else if(!t.preload){const j=t.matches[0];j.globalNotFound||(x=t.router.getMatch(j.id))!=null&&x.globalNotFound&&t.updateMatch(j.id,S=>({...S,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const j=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Lc(j,["errorComponent"])}for(let j=0;j<=p;j++){const{id:S,routeId:N}=t.matches[j],O=t.router.looseRoutesById[N];try{const P=Oz(t,S,O);if(P){const E=await P;t.updateMatch(S,A=>({...A,...E}))}}catch(P){console.error(`Error executing head for route ${N}:`,P)}}const y=Nx(t);if(kc(y)&&await y,h)throw h;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function g_(e,t){const r=t.map(n=>{var i,l;return(l=(i=e.options[n])==null?void 0:i.preload)==null?void 0:l.call(i)}).filter(Boolean);if(r.length!==0)return Promise.all(r)}function Lc(e,t=Sh){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(n=>{const{id:i,...l}=n.options;Object.assign(e.options,l),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const r=()=>e._componentsLoaded?void 0:t===Sh?(()=>{if(e._componentsPromise===void 0){const n=g_(e,Sh);n?e._componentsPromise=n.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():g_(e,t);return e._lazyPromise?e._lazyPromise.then(r):r()}function D2(e){var t;for(const r of Sh)if((t=e.options[r])!=null&&t.preload)return!0;return!1}var Sh=["component","errorComponent","pendingComponent","notFoundComponent"],Zi="__TSR_index",x_="popstate",b_="beforeunload";function Ez(e){let t=e.getLocation();const r=new Set,n=o=>{t=e.getLocation(),r.forEach(c=>c({location:t,action:o}))},i=o=>{e.notifyOnIndexChange??!0?n(o):t=e.getLocation()},l=async({task:o,navigateOpts:c,...f})=>{var y,v;if((c==null?void 0:c.ignoreBlocker)??!1){o();return}const h=((y=e.getBlockers)==null?void 0:y.call(e))??[],p=f.type==="PUSH"||f.type==="REPLACE";if(typeof document<"u"&&h.length&&p)for(const x of h){const j=kh(f.path,f.state);if(await x.blockerFn({currentLocation:t,nextLocation:j,action:f.type})){(v=e.onBlocked)==null||v.call(e);return}}o()};return{get location(){return t},get length(){return e.getLength()},subscribers:r,subscribe:o=>(r.add(o),()=>{r.delete(o)}),push:(o,c,f)=>{const h=t.state[Zi];c=j_(h+1,c),l({task:()=>{e.pushState(o,c),n({type:"PUSH"})},navigateOpts:f,type:"PUSH",path:o,state:c})},replace:(o,c,f)=>{const h=t.state[Zi];c=j_(h,c),l({task:()=>{e.replaceState(o,c),n({type:"REPLACE"})},navigateOpts:f,type:"REPLACE",path:o,state:c})},go:(o,c)=>{l({task:()=>{e.go(o),i({type:"GO",index:o})},navigateOpts:c,type:"GO"})},back:o=>{l({task:()=>{e.back((o==null?void 0:o.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{l({task:()=>{e.forward((o==null?void 0:o.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>t.state[Zi]!==0,createHref:o=>e.createHref(o),block:o=>{var f;if(!e.setBlockers)return()=>{};const c=((f=e.getBlockers)==null?void 0:f.call(e))??[];return e.setBlockers([...c,o]),()=>{var p,y;const h=((p=e.getBlockers)==null?void 0:p.call(e))??[];(y=e.setBlockers)==null||y.call(e,h.filter(v=>v!==o))}},flush:()=>{var o;return(o=e.flush)==null?void 0:o.call(e)},destroy:()=>{var o;return(o=e.destroy)==null?void 0:o.call(e)},notify:n}}function j_(e,t){t||(t={});const r=Bb();return{...t,key:r,__TSR_key:r,[Zi]:e}}function Az(e){var I,$;const t=typeof document<"u"?window:void 0,r=t.history.pushState,n=t.history.replaceState;let i=[];const l=()=>i,o=D=>i=D,c=(D=>D),f=(()=>kh(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!((I=t.history.state)!=null&&I.__TSR_key)&&!(($=t.history.state)!=null&&$.key)){const D=Bb();t.history.replaceState({[Zi]:0,key:D,__TSR_key:D},"")}let h=f(),p,y=!1,v=!1,x=!1,j=!1;const S=()=>h;let N,O;const P=()=>{N&&(R._ignoreSubscribers=!0,(N.isPush?t.history.pushState:t.history.replaceState)(N.state,"",N.href),R._ignoreSubscribers=!1,N=void 0,O=void 0,p=void 0)},E=(D,H,q)=>{const ae=c(H);O||(p=h),h=kh(H,q),N={href:ae,state:q,isPush:(N==null?void 0:N.isPush)||D==="push"},O||(O=Promise.resolve().then(()=>P()))},A=D=>{h=f(),R.notify({type:D})},T=async()=>{if(v){v=!1;return}const D=f(),H=D.state[Zi]-h.state[Zi],q=H===1,ae=H===-1,Q=!q&&!ae||y;y=!1;const Z=Q?"GO":ae?"BACK":"FORWARD",B=Q?{type:"GO",index:H}:{type:ae?"BACK":"FORWARD"};if(x)x=!1;else{const K=l();if(typeof document<"u"&&K.length){for(const ee of K)if(await ee.blockerFn({currentLocation:h,nextLocation:D,action:Z})){v=!0,t.history.go(1),R.notify(B);return}}}h=f(),R.notify(B)},M=D=>{if(j){j=!1;return}let H=!1;const q=l();if(typeof document<"u"&&q.length)for(const ae of q){const Q=ae.enableBeforeUnload??!0;if(Q===!0){H=!0;break}if(typeof Q=="function"&&Q()===!0){H=!0;break}}if(H)return D.preventDefault(),D.returnValue=""},R=Ez({getLocation:S,getLength:()=>t.history.length,pushState:(D,H)=>E("push",D,H),replaceState:(D,H)=>E("replace",D,H),back:D=>(D&&(x=!0),j=!0,t.history.back()),forward:D=>{D&&(x=!0),j=!0,t.history.forward()},go:D=>{y=!0,t.history.go(D)},createHref:D=>c(D),flush:P,destroy:()=>{t.history.pushState=r,t.history.replaceState=n,t.removeEventListener(b_,M,{capture:!0}),t.removeEventListener(x_,T)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(b_,M,{capture:!0}),t.addEventListener(x_,T),t.history.pushState=function(...D){const H=r.apply(t.history,D);return R._ignoreSubscribers||A("PUSH"),H},t.history.replaceState=function(...D){const H=n.apply(t.history,D);return R._ignoreSubscribers||A("REPLACE"),H},R}function Pz(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function kh(e,t){const r=Pz(e),n=r.indexOf("#"),i=r.indexOf("?"),l=Bb();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||{[Zi]:0,key:l,__TSR_key:l}}}function Bb(){return(Math.random()+1).toString(36).substring(7)}function So(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 Tz=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)??"/",l=this.basepath===void 0,o=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=az(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Az()),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=Ic(1e3),y=this.buildRouteTree(),this.setRoutes(y)}if(!this.stores&&this.latestLocation){const y=this.getStoreConfig(this);this.batch=y.batch,this.stores=bz(Mz(this.latestLocation),y),cz(this)}let c=!1;const f=this.options.basepath??"/",h=this.options.rewrite;if(l||i!==f||o!==h){this.basepath=f;const y=[],v=P2(f);v&&v!=="/"&&y.push(xz({basepath:f})),h&&y.push(h),this.rewrite=y.length===0?void 0:y.length===1?y[0]:gz(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=W$(this.routeTree,this.options.caseSensitive,(n,i)=>{n.init({originalIndex:i})});return this.options.routeMasks&&Y$(this.options.routeMasks,r.processedTree),r},this.subscribe=(r,n)=>{const i={eventType:r,fn:n};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=r=>{this.subscribers.forEach(n=>{n.eventType===r.type&&n.fn(r)})},this.parseLocation=(r,n)=>{const i=({pathname:f,search:h,hash:p,href:y,state:v})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(f)){const O=this.options.parseSearch(h),P=this.options.stringifySearch(O);return{href:f+P+p,publicHref:y,pathname:lc(f).path,external:!1,searchStr:P,search:Ns(n==null?void 0:n.search,O),hash:lc(p.slice(1)).path,state:$a(n==null?void 0:n.state,v)}}const x=new URL(y,this.origin),j=wx(this.rewrite,x),S=this.options.parseSearch(j.search),N=this.options.stringifySearch(S);return j.search=N,{href:j.href.replace(j.origin,""),publicHref:y,pathname:lc(j.pathname).path,external:!!this.rewrite&&j.origin!==this.origin,searchStr:N,search:Ns(n==null?void 0:n.search,S),hash:lc(j.hash.slice(1)).path,state:$a(n==null?void 0:n.state,v)}},l=i(r),{__tempLocation:o,__tempKey:c}=l.state;if(o&&(!c||c===this.tempLocationKey)){const f=i(o);return f.state.key=l.state.key,f.state.__TSR_key=l.state.__TSR_key,delete f.state.__tempLocation,{...f,maskedLocation:l}}return l},this.resolvePathWithBase=(r,n)=>nz({base:r,to:zb(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=>Rz({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=(l={})=>{var D,H;const o=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,c=this.matchRoutesLightweight(o);l.from;const f=l.unsafeRelative==="path"?o.pathname:l.from??c.fullPath,h=this.resolvePathWithBase(f,"."),p=c.search,y=Object.assign(Object.create(null),c.params),v=l.to?this.resolvePathWithBase(h,`${l.to}`):this.resolvePathWithBase(h,"."),x=l.params===!1||l.params===null?Object.create(null):(l.params??!0)===!0?y:Object.assign(y,Gi(l.params,y)),j=this.getMatchedRoutes(v);let S=j.matchedRoutes;if((!j.foundRoute||j.foundRoute.path!=="/"&&j.routeParams["**"])&&this.options.notFoundRoute&&(S=[...S,this.options.notFoundRoute]),Object.keys(x).length>0)for(const q of S){const ae=((D=q.options.params)==null?void 0:D.stringify)??q.options.stringifyParams;if(ae)try{Object.assign(x,ae(x))}catch{}}const N=r.leaveParams?v:lc(c_({path:v,params:x,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let O=p;if(r._includeValidateSearch&&((H=this.options.search)!=null&&H.strict)){const q={};S.forEach(ae=>{if(ae.options.validateSearch)try{Object.assign(q,wh(ae.options.validateSearch,{...q,...O}))}catch{}}),O=q}O=Dz({search:O,dest:l,destRoutes:S,_includeValidateSearch:r._includeValidateSearch}),O=Ns(p,O);const P=this.options.stringifySearch(O),E=l.hash===!0?o.hash:l.hash?Gi(l.hash,o.hash):void 0,A=E?`#${E}`:"";let T=l.state===!0?o.state:l.state?Gi(l.state,o.state):{};T=$a(o.state,T);const M=`${N}${P}${A}`;let R,I,$=!1;if(this.rewrite){const q=new URL(M,this.origin),ae=T2(this.rewrite,q);R=q.href.replace(q.origin,""),ae.origin!==this.origin?(I=ae.href,$=!0):I=ae.pathname+ae.search+ae.hash}else R=F$(M),I=R;return{publicHref:I,href:R,pathname:N,search:O,searchStr:P,state:T,hash:E??"",external:$,unmaskOnReload:l.unmaskOnReload}},i=(l={},o)=>{const c=n(l);let f=o?n(o):void 0;if(!f){const h=Object.create(null);if(this.options.routeMasks){const p=V$(c.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:y,params:v,...x}=p.route,j=v===!1||v===null?Object.create(null):(v??!0)===!0?h:Object.assign(h,Gi(v,h));o={from:r.from,...x,params:j},f=n(o)}}}return f&&(c.maskedLocation=f),c};return r.mask?i(r,{from:r.from,...r.mask}):i(r)},this.commitLocation=async({viewTransition:r,ignoreBlocker:n,...i})=>{const l=()=>{const f=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];f.forEach(p=>{i.state[p]=this.latestLocation.state[p]});const h=Qs(i.state,this.latestLocation.state);return f.forEach(p=>{delete i.state[p]}),h},o=Xi(this.latestLocation.href)===Xi(i.href);let c=this.commitLocationPromise;if(this.commitLocationPromise=Bo(()=>{c==null||c.resolve(),c=void 0}),o&&l())this.load();else{let{maskedLocation:f,hashScrollIntoView:h,...p}=i;f&&(p={...f,state:{...f.state,__tempKey:void 0,__tempLocation:{...p,search:p.searchStr,state:{...p.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(p.unmaskOnReload??this.options.unmaskOnReload??!1)&&(p.state.__tempKey=this.tempLocationKey)),p.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=r,this.history[i.replace?"replace":"push"](p.publicHref,p.state,{ignoreBlocker:n})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:r,resetScroll:n,hashScrollIntoView:i,viewTransition:l,ignoreBlocker:o,href:c,...f}={})=>{if(c){const y=this.history.location.state.__TSR_index,v=kh(c,{__TSR_index:r?y:y+1}),x=new URL(v.pathname,this.origin);f.to=wx(this.rewrite,x).pathname,f.search=this.options.parseSearch(v.search),f.hash=v.hash.slice(1)}const h=this.buildLocation({...f,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const p=this.commitLocation({...h,viewTransition:l,replace:r,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:r,reloadDocument:n,href:i,publicHref:l,...o})=>{var f,h;let c=!1;if(i)try{new URL(`${i}`),c=!0}catch{}if(c&&!n&&(n=!0),n){if(r!==void 0||!i){const y=this.buildLocation({to:r,...o});i=i??y.publicHref,l=l??y.publicHref}const p=!c&&l?l:i;if(Rh(p,this.protocolAllowlist))return Promise.resolve();if(!o.ignoreBlocker){const y=((h=(f=this.history).getBlockers)==null?void 0:h.call(f))??[];for(const v of y)if(v!=null&&v.blockerFn&&await v.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return o.replace?window.location.replace(p):window.location.href=p,Promise.resolve()}return this.buildAndCommitLocation({...o,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(l=>l.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,l;const o=this.stores.resolvedLocation.state??this.stores.location.state;for(l=new Promise(f=>{this.startTransition(async()=>{var h;try{this.beforeLoad();const p=this.latestLocation,y=this.stores.resolvedLocation.state,v=So(p,y);this.stores.redirect.state||this.emit({type:"onBeforeNavigate",...v}),this.emit({type:"onBeforeLoad",...v}),await v_({router:this,sync:r==null?void 0:r.sync,forceStaleReload:o.href===p.href,matches:this.stores.pendingMatchesSnapshot.state,location:p,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var O,P;let x=null,j=null,S=null,N=null;this.batch(()=>{const E=this.stores.pendingMatchesSnapshot.state,A=E.length,T=this.stores.activeMatchesSnapshot.state;x=A?T.filter(I=>!this.stores.pendingMatchStoresById.has(I.id)):null;const M=new Set;for(const I of this.stores.pendingMatchStoresById.values())I.routeId&&M.add(I.routeId);const R=new Set;for(const I of this.stores.activeMatchStoresById.values())I.routeId&&R.add(I.routeId);j=A?T.filter(I=>!M.has(I.routeId)):null,S=A?E.filter(I=>!R.has(I.routeId)):null,N=A?E.filter(I=>R.has(I.routeId)):T,this.stores.isLoading.setState(()=>!1),this.stores.loadedAt.setState(()=>Date.now()),A&&(this.stores.setActiveMatches(E),this.stores.setPendingMatches([]),this.stores.setCachedMatches([...this.stores.cachedMatchesSnapshot.state,...x.filter(I=>I.status!=="error"&&I.status!=="notFound"&&I.status!=="redirected")]),this.clearExpiredCache())});for(const[E,A]of[[j,"onLeave"],[S,"onEnter"],[N,"onStay"]])if(E)for(const T of E)(P=(O=this.looseRoutesById[T.routeId].options)[A])==null||P.call(O,T)})})}})}catch(p){$r(p)?(n=p,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):wr(p)&&(i=p);const y=n?n.status:i?404:this.stores.activeMatchesSnapshot.state.some(v=>v.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.setState(()=>y),this.stores.redirect.setState(()=>n)})}this.latestLoadPromise===l&&((h=this.commitLocationPromise)==null||h.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),f()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let c;this.hasNotFoundMatch()?c=404:this.stores.activeMatchesSnapshot.state.some(f=>f.status==="error")&&(c=500),c!==void 0&&this.stores.statusCode.setState(()=>c)},this.startViewTransition=r=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof n=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,o=this.stores.resolvedLocation.state,c=typeof n.types=="function"?n.types(So(l,o)):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 l=this.stores.activeMatchStoresById.get(r);if(l){l.setState(n);return}const o=this.stores.cachedMatchStoresById.get(r);if(o){const c=n(o.state);c.status==="redirected"?this.stores.cachedMatchStoresById.delete(r)&&this.stores.cachedMatchesId.setState(f=>f.filter(h=>h!==r)):o.setState(()=>c)}})},this.getMatch=r=>{var n,i,l;return((n=this.stores.cachedMatchStoresById.get(r))==null?void 0:n.state)??((i=this.stores.pendingMatchStoresById.get(r))==null?void 0:i.state)??((l=this.stores.activeMatchStoresById.get(r))==null?void 0:l.state)},this.invalidate=r=>{const n=i=>{var l;return((l=r==null?void 0:r.filter)==null?void 0:l.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),l=this.getParsedLocationHref(i);r.options.href=l,r.headers.set("Location",l)}else if(n)try{const i=new URL(n);if(this.origin&&i.origin===this.origin){const l=i.pathname+i.search+i.hash;r.options.href=l,r.headers.set("Location",l)}}catch{}if(r.options.href&&!r.options._builtLocation&&Rh(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 l=this.looseRoutesById[i.routeId];if(!l.options.loader)return!0;const o=(i.preload?l.options.preloadGcTime??this.options.defaultPreloadGcTime:l.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:r-i.updatedAt>=o};this.clearCache({filter:n})},this.loadRouteChunk=Lc,this.preloadRoute=async r=>{const n=r._builtLocation??this.buildLocation(r);let i=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:r});const l=new Set([...this.stores.matchesId.state,...this.stores.pendingMatchesId.state]),o=new Set([...l,...this.stores.cachedMatchesId.state]),c=i.filter(f=>!o.has(f.id));if(c.length){const f=this.stores.cachedMatchesSnapshot.state;this.stores.setCachedMatches([...f,...c])}try{return i=await v_({router:this,matches:i,location:n,preload:!0,updateMatch:(f,h)=>{l.has(f)?i=i.map(p=>p.id===f?h(p):p):this.updateMatch(f,h)}}),i}catch(f){if($r(f))return f.options.reloadDocument?void 0:await this.preloadRoute({...f.options,_fromLocation:n});wr(f)||console.error(f);return}},this.matchRoute=(r,n)=>{const i={...r,to:r.to?this.resolvePathWithBase(r.from||"",r.to):void 0,params:r.params||{},leaveParams:!0},l=this.buildLocation(i);if(n!=null&&n.pending&&this.stores.status.state!=="pending")return!1;const o=((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=Q$(l.pathname,(n==null?void 0:n.caseSensitive)??!1,(n==null?void 0:n.fuzzy)??!1,o.pathname,this.processedTree);return!c||r.params&&!Qs(c.rawParams,r.params,{partial:!0})?!1:(n==null?void 0:n.includeSearch)??!0?Qs(o.search,l.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??mz,parseSearch:e.parseSearch??hz,protocolAllowlist:e.protocolAllowlist??H$}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.state}setRoutes({routesById:e,routesByPath:t,processedTree:r}){this.routesById=e,this.routesByPath=t,this.processedTree=r;const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var y,v;const r=this.getMatchedRoutes(e.pathname),{foundRoute:n,routeParams:i,parsedParams:l}=r;let{matchedRoutes:o}=r,c=!1;(n?n.path!=="/"&&i["**"]:Xi(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:c=!0);const f=c?Iz(this.options.notFoundMode,o):void 0,h=new Array(o.length),p=new Map;for(const x of this.stores.activeMatchStoresById.values())x.routeId&&p.set(x.routeId,x.state);for(let x=0;x<o.length;x++){const j=o[x],S=h[x-1];let N,O,P;{const Z=(S==null?void 0:S.search)??e.search,B=(S==null?void 0:S._strictSearch)??void 0;try{const K=wh(j.options.validateSearch,{...Z})??void 0;N={...Z,...K},O={...B,...K},P=void 0}catch(K){let ee=K;if(K instanceof Ih||(ee=new Ih(K.message,{cause:K})),t!=null&&t.throwOnError)throw ee;N=Z,O={},P=ee}}const E=((v=(y=j.options).loaderDeps)==null?void 0:v.call(y,{search:N}))??"",A=E?JSON.stringify(E):"",{interpolatedPath:T,usedParams:M}=c_({path:j.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),R=j.id+T+A,I=this.getMatch(R),$=p.get(j.id),D=(I==null?void 0:I._strictParams)??M;let H;if(!I)try{S_(j,M,l,D)}catch(Z){if(wr(Z)||$r(Z)?H=Z:H=new Cz(Z.message,{cause:Z}),t!=null&&t.throwOnError)throw H}Object.assign(i,D);const q=$?"stay":"enter";let ae;if(I)ae={...I,cause:q,params:($==null?void 0:$.params)??i,_strictParams:D,search:Ns($?$.search:I.search,N),_strictSearch:O};else{const Z=j.options.loader||j.options.beforeLoad||j.lazyFn||D2(j)?"pending":"success";ae={id:R,ssr:j.options.ssr,index:x,routeId:j.id,params:($==null?void 0:$.params)??i,_strictParams:D,pathname:T,updatedAt:Date.now(),search:$?Ns($.search,N):N,_strictSearch:O,searchError:void 0,status:Z,isFetching:!1,error:void 0,paramsError:H,__routeContext:void 0,_nonReactive:{loadPromise:Bo()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:q,loaderDeps:$?$a($.loaderDeps,E):E,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:j.options.staticData||{},fullPath:j.fullPath}}t!=null&&t.preload||(ae.globalNotFound=f===j.id),ae.searchError=P;const Q=this.getParentContext(S);ae.context={...Q,...ae.__routeContext,...ae.__beforeLoadContext},h[x]=ae}for(let x=0;x<h.length;x++){const j=h[x],S=this.looseRoutesById[j.routeId],N=this.getMatch(j.id),O=p.get(j.routeId);if(j.params=O?Ns(O.params,i):i,!N){const P=h[x-1],E=this.getParentContext(P);if(S.options.context){const A={deps:j.loaderDeps,params:j.params,context:E??{},location:e,navigate:T=>this.navigate({...T,_fromLocation:e}),buildLocation:this.buildLocation,cause:j.cause,abortController:j.abortController,preload:!!j.preload,matches:h,routeId:S.id};j.__routeContext=S.options.context(A)??void 0}j.context={...E,...j.__routeContext,...j.__beforeLoadContext}}}return h}matchRoutesLightweight(e){var p;const{matchedRoutes:t,routeParams:r,parsedParams:n}=this.getMatchedRoutes(e.pathname),i=Dc(t),l={...e.search};for(const y of t)try{Object.assign(l,wh(y.options.validateSearch,l))}catch{}const o=Dc(this.stores.matchesId.state),c=o&&((p=this.stores.activeMatchStoresById.get(o))==null?void 0:p.state),f=c&&c.routeId===i.id&&c.pathname===e.pathname;let h;if(f)h=c.params;else{const y=Object.assign(Object.create(null),r);for(const v of t)try{S_(v,r,n??{},y)}catch{}h=y}return{matchedRoutes:t,fullPath:i.fullPath,search:l,params:h}}},Ih=class extends Error{},Cz=class extends Error{};function Mz(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function wh(e,t){if(e==null)return{};if("~standard"in e){const r=e["~standard"].validate(t);if(r instanceof Promise)throw new Ih("Async validation not supported");if(r.issues)throw new Ih(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 Rz({pathname:e,routesById:t,processedTree:r}){const n=Object.create(null),i=Xi(e);let l,o;const c=X$(i,r,!0);return c&&(l=c.route,Object.assign(n,c.rawParams),o=Object.assign(Object.create(null),c.parsedParams)),{matchedRoutes:(c==null?void 0:c.branch)||[t.__root__],routeParams:n,foundRoute:l,parsedParams:o}}function Dz({search:e,dest:t,destRoutes:r,_includeValidateSearch:n}){return kz(r)(e,t,n??!1)}function kz(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const l of e){if("search"in l.options)(i=l.options.search)!=null&&i.middlewares&&t.middlewares.push(...l.options.search.middlewares);else if(l.options.preSearchFilters||l.options.postSearchFilters){const o=({search:c,next:f})=>{let h=c;"preSearchFilters"in l.options&&l.options.preSearchFilters&&(h=l.options.preSearchFilters.reduce((y,v)=>v(y),c));const p=f(h);return"postSearchFilters"in l.options&&l.options.postSearchFilters?l.options.postSearchFilters.reduce((y,v)=>v(y),p):p};t.middlewares.push(o)}if(l.options.validateSearch){const o=({search:c,next:f})=>{const h=f(c);if(!t._includeValidateSearch)return h;try{return{...h,...wh(l.options.validateSearch,h)??void 0}}catch{return h}};t.middlewares.push(o)}}const r=({search:l})=>{const o=t.dest;return o.search?o.search===!0?l:Gi(o.search,l):{}};t.middlewares.push(r);const n=(l,o,c)=>{if(l>=c.length)return o;const f=c[l];return f({search:o,next:p=>n(l+1,p,c)})};return function(o,c,f){return t.dest=c,t._includeValidateSearch=f,n(0,o,t.middlewares)}}function Iz(e,t){if(e!=="root")for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.children)return n.id}return Xs}function S_(e,t,r,n){var l;const i=((l=e.options.params)==null?void 0:l.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const o in t)o in r&&(n[o]=r[o]);else{const o=i(n);Object.assign(n,o)}}var Lz="Error preloading route! ☝️",k2=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var f,h;this.originalIndex=t.originalIndex;const r=this.options,n=!(r!=null&&r.path)&&!(r!=null&&r.id);this.parentRoute=(h=(f=this.options).getParentRoute)==null?void 0:h.call(f),n?this._path=Xs:this.parentRoute||Ua();let i=n?Xs:r==null?void 0:r.path;i&&i!=="/"&&(i=A2(i));const l=(r==null?void 0:r.id)||i;let o=n?Xs:jh([this.parentRoute.id==="__root__"?"":this.parentRoute.id,l]);i==="__root__"&&(i="/"),o!=="__root__"&&(o=jh(["/",o]));const c=o==="__root__"?"/":jh([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=c,this._to=Xi(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=>vz({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.")}},$z=class extends k2{constructor(e){super(e)}};function zz(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 Ub(e){const t=e.errorComponent??qb;return d.jsx(Bz,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:r,reset:n})=>r?w.createElement(t,{error:r,reset:n}):e.children})}var Bz=class extends w.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 qb({error:e}){const[t,r]=w.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 Uz({children:e,fallback:t=null}){return I2()?d.jsx($o.Fragment,{children:e}):d.jsx($o.Fragment,{children:t})}function I2(){return $o.useSyncExternalStore(qz,()=>!0,()=>!1)}function qz(){return()=>{}}var L2=w.createContext(null);function mr(e){return w.useContext(L2)}var $m=w.createContext(void 0),Hz=w.createContext(void 0),ft=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(ft||{});function Fz({update:e,notify:t,unwatched:r}){return{link:n,unlink:i,propagate:l,checkDirty:o,shallowPropagate:c};function n(h,p,y){const v=p.depsTail;if(v!==void 0&&v.dep===h)return;const x=v!==void 0?v.nextDep:p.deps;if(x!==void 0&&x.dep===h){x.version=y,p.depsTail=x;return}const j=h.subsTail;if(j!==void 0&&j.version===y&&j.sub===p)return;const S=p.depsTail=h.subsTail={version:y,dep:h,sub:p,prevDep:v,nextDep:x,prevSub:j,nextSub:void 0};x!==void 0&&(x.prevDep=S),v!==void 0?v.nextDep=S:p.deps=S,j!==void 0?j.nextSub=S:h.subs=S}function i(h,p=h.sub){const y=h.dep,v=h.prevDep,x=h.nextDep,j=h.nextSub,S=h.prevSub;return x!==void 0?x.prevDep=v:p.depsTail=v,v!==void 0?v.nextDep=x:p.deps=x,j!==void 0?j.prevSub=S:y.subsTail=S,S!==void 0?S.nextSub=j:(y.subs=j)===void 0&&r(y),x}function l(h){let p=h.nextSub,y;e:do{const v=h.sub;let x=v.flags;if(x&60?x&12?x&4?!(x&48)&&f(h,v)?(v.flags=x|40,x&=1):x=0:v.flags=x&-9|32:x=0:v.flags=x|32,x&2&&t(v),x&1){const j=v.subs;if(j!==void 0){const S=(h=j).nextSub;S!==void 0&&(y={value:p,prev:y},p=S);continue}}if((h=p)!==void 0){p=h.nextSub;continue}for(;y!==void 0;)if(h=y.value,y=y.prev,h!==void 0){p=h.nextSub;continue e}break}while(!0)}function o(h,p){let y,v=0,x=!1;e:do{const j=h.dep,S=j.flags;if(p.flags&16)x=!0;else if((S&17)===17){if(e(j)){const N=j.subs;N.nextSub!==void 0&&c(N),x=!0}}else if((S&33)===33){(h.nextSub!==void 0||h.prevSub!==void 0)&&(y={value:h,prev:y}),h=j.deps,p=j,++v;continue}if(!x){const N=h.nextDep;if(N!==void 0){h=N;continue}}for(;v--;){const N=p.subs,O=N.nextSub!==void 0;if(O?(h=y.value,y=y.prev):h=N,x){if(e(p)){O&&c(N),p=h.sub;continue}x=!1}else p.flags&=-33;p=h.sub;const P=h.nextDep;if(P!==void 0){h=P;continue e}}return x}while(!0)}function c(h){do{const p=h.sub,y=p.flags;(y&48)===32&&(p.flags=y|16,(y&6)===2&&t(p))}while((h=h.nextSub)!==void 0)}function f(h,p){let y=p.depsTail;for(;y!==void 0;){if(y===h)return!0;y=y.prevDep}return!1}}function Hb(e,t,r){var l,o,c;const n=typeof e=="object",i=n?e:void 0;return{next:(l=n?e.next:e)==null?void 0:l.bind(i),error:(o=n?e.error:t)==null?void 0:o.bind(i),complete:(c=n?e.complete:r)==null?void 0:c.bind(i)}}const Ox=[];let Nh=0;const{link:w_,unlink:Kz,propagate:Gz,checkDirty:$2,shallowPropagate:N_}=Fz({update(e){return e._update()},notify(e){Ox[_x++]=e,e.flags&=~ft.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=ft.Mutable|ft.Dirty,Lh(e))}});let eh=0,_x=0,Xn,Ex=0;function z2(e){try{++Ex,e()}finally{--Ex||B2()}}function Lh(e){const t=e.depsTail;let r=t!==void 0?t.nextDep:e.deps;for(;r!==void 0;)r=Kz(r,e)}function B2(){if(!(Ex>0)){for(;eh<_x;){const e=Ox[eh];Ox[eh++]=void 0,e.notify()}eh=0,_x=0}}function U2(e,t){const r=typeof e=="function",n=e,i={_snapshot:r?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:r?ft.None:ft.Mutable,get(){return Xn!==void 0&&w_(i,Xn,Nh),i._snapshot},subscribe(l){const o=Hb(l),c={current:!1},f=Yz(()=>{var h;i.get(),c.current?(h=o.next)==null||h.call(o,i._snapshot):c.current=!0});return{unsubscribe:()=>{f.stop()}}},_update(l){const o=Xn,c=Object.is;if(r)Xn=i,++Nh,i.depsTail=void 0;else if(l===void 0)return!1;r&&(i.flags=ft.Mutable|ft.RecursedCheck);try{const f=i._snapshot,h=typeof l=="function"?l(f):l===void 0&&r?n(f):l;return f===void 0||!c(f,h)?(i._snapshot=h,!0):!1}finally{Xn=o,r&&(i.flags&=~ft.RecursedCheck),Lh(i)}}};return r?(i.flags=ft.Mutable|ft.Dirty,i.get=function(){const l=i.flags;if(l&ft.Dirty||l&ft.Pending&&$2(i.deps,i)){if(i._update()){const o=i.subs;o!==void 0&&N_(o)}}else l&ft.Pending&&(i.flags=l&~ft.Pending);return Xn!==void 0&&w_(i,Xn,Nh),i._snapshot}):i.set=function(l){if(i._update(l)){const o=i.subs;o!==void 0&&(Gz(o),N_(o),B2())}},i}function Yz(e){const t=()=>{const n=Xn;Xn=r,++Nh,r.depsTail=void 0,r.flags=ft.Watching|ft.RecursedCheck;try{return e()}finally{Xn=n,r.flags&=~ft.RecursedCheck,Lh(r)}},r={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:ft.Watching|ft.RecursedCheck,notify(){const n=this.flags;n&ft.Dirty||n&ft.Pending&&$2(this.deps,this)?t():this.flags=ft.Watching},stop(){this.flags=ft.None,this.depsTail=void 0,Lh(this)}};return t(),r}class Vz{constructor(t){this.atom=U2(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(Hb(t))}}class Qz{constructor(t){this.atom=U2(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(Hb(t))}}function O_(e){return typeof e=="function"?new Qz(e):new Vz(e)}var xg={exports:{}},bg={},jg={exports:{}},Sg={};/**
|
|
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 __;function Xz(){if(__)return Sg;__=1;var e=eu();function t(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,l=e.useLayoutEffect,o=e.useDebugValue;function c(y,v){var x=v(),j=n({inst:{value:x,getSnapshot:v}}),S=j[0].inst,N=j[1];return l(function(){S.value=x,S.getSnapshot=v,f(S)&&N({inst:S})},[y,x,v]),i(function(){return f(S)&&N({inst:S}),y(function(){f(S)&&N({inst:S})})},[y]),o(x),x}function f(y){var v=y.getSnapshot;y=y.value;try{var x=v();return!r(y,x)}catch{return!0}}function h(y,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return Sg.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Sg}var E_;function Zz(){return E_||(E_=1,jg.exports=Xz()),jg.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 A_;function Wz(){if(A_)return bg;A_=1;var e=eu(),t=Zz();function r(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,l=e.useRef,o=e.useEffect,c=e.useMemo,f=e.useDebugValue;return bg.useSyncExternalStoreWithSelector=function(h,p,y,v,x){var j=l(null);if(j.current===null){var S={hasValue:!1,value:null};j.current=S}else S=j.current;j=c(function(){function O(M){if(!P){if(P=!0,E=M,M=v(M),x!==void 0&&S.hasValue){var R=S.value;if(x(R,M))return A=R}return A=M}if(R=A,n(E,M))return R;var I=v(M);return x!==void 0&&x(R,I)?(E=M,R):(E=M,A=I)}var P=!1,E,A,T=y===void 0?null:y;return[function(){return O(p())},T===null?void 0:function(){return O(T())}]},[p,y,v,x]);var N=i(h,j[0],j[1]);return o(function(){S.hasValue=!0,S.value=N},[N]),f(N),N},bg}var P_;function Jz(){return P_||(P_=1,xg.exports=Wz()),xg.exports}var q2=Jz();function e8(e,t){return e===t}function sr(e,t,r=e8){const n=w.useCallback(o=>{if(!e)return()=>{};const{unsubscribe:c}=e.subscribe(o);return c},[e]),i=w.useCallback(()=>e==null?void 0:e.get(),[e]);return q2.useSyncExternalStoreWithSelector(n,i,i,t,r)}var t8={state:void 0,get:()=>{},subscribe:()=>()=>{}};function dl(e){const t=mr(),r=w.useContext(e.from?Hz:$m),n=e.from??r,i=n?e.from?t.stores.getMatchStoreByRouteId(n):t.stores.activeMatchStoresById.get(n):void 0,l=w.useRef(void 0);return sr(i??t8,o=>{if((e.shouldThrow??!0)&&!o&&Ua(),o===void 0)return;const c=e.select?e.select(o):o;if(e.structuralSharing??t.options.defaultStructuralSharing){const f=$a(l.current,c);return l.current=f,f}return c})}function H2(e){return dl({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function F2(e){const{select:t,...r}=e;return dl({...r,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function K2(e){return dl({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 G2(e){return dl({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function fl(e){const t=mr();return w.useCallback(r=>t.navigate({...r,from:r.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function Y2(e){return dl({...e,select:t=>e.select?e.select(t.context):t.context})}var zm=o2();function r8(e,t){const r=mr(),n=$$(t),{activeProps:i,inactiveProps:l,activeOptions:o,to:c,preload:f,preloadDelay:h,hashScrollIntoView:p,replace:y,startTransition:v,resetScroll:x,viewTransition:j,children:S,target:N,disabled:O,style:P,className:E,onClick:A,onBlur:T,onFocus:M,onMouseEnter:R,onMouseLeave:I,onTouchStart:$,ignoreBlocker:D,params:H,search:q,hash:ae,state:Q,mask:Z,reloadDocument:B,unsafeRelative:K,from:ee,_fromLocation:se,...ue}=e,k=I2(),W=w.useMemo(()=>e,[r,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),oe=sr(r.stores.location,Te=>Te,(Te,ur)=>Te.href===ur.href),le=w.useMemo(()=>{const Te={_fromLocation:oe,...W};return r.buildLocation(Te)},[r,oe,W]),ye=le.maskedLocation?le.maskedLocation.publicHref:le.publicHref,Ne=le.maskedLocation?le.maskedLocation.external:le.external,Oe=w.useMemo(()=>o8(ye,Ne,r.history,O),[O,Ne,ye,r.history]),Ce=w.useMemo(()=>{if(Oe!=null&&Oe.external)return Rh(Oe.href,r.protocolAllowlist)?void 0:Oe.href;if(!u8(c)&&!(typeof c!="string"||c.indexOf(":")===-1))try{return new URL(c),Rh(c,r.protocolAllowlist)?void 0:c}catch{}},[c,Oe,r.protocolAllowlist]),de=w.useMemo(()=>{if(Ce)return!1;if(o!=null&&o.exact){if(!rz(oe.pathname,le.pathname,r.basepath))return!1}else{const Te=Dh(oe.pathname,r.basepath),ur=Dh(le.pathname,r.basepath);if(!(Te.startsWith(ur)&&(Te.length===ur.length||Te[ur.length]==="/")))return!1}return((o==null?void 0:o.includeSearch)??!0)&&!Qs(oe.search,le.search,{partial:!(o!=null&&o.exact),ignoreUndefined:!(o!=null&&o.explicitUndefined)})?!1:o!=null&&o.includeHash?k&&oe.hash===le.hash:!0},[o==null?void 0:o.exact,o==null?void 0:o.explicitUndefined,o==null?void 0:o.includeHash,o==null?void 0:o.includeSearch,oe,Ce,k,le.hash,le.pathname,le.search,r.basepath]),te=de?Gi(i,{})??n8:wg,Se=de?wg:Gi(l,{})??wg,ce=[E,te.className,Se.className].filter(Boolean).join(" "),_t=(P||te.style||Se.style)&&{...P,...te.style,...Se.style},[De,Et]=w.useState(!1),At=w.useRef(!1),or=e.reloadDocument||Ce?!1:f??r.options.defaultPreload,fa=h??r.options.defaultPreloadDelay??0,An=w.useCallback(()=>{r.preloadRoute({...W,_builtLocation:le}).catch(Te=>{console.warn(Te),console.warn(Lz)})},[r,W,le]);L$(n,w.useCallback(Te=>{Te!=null&&Te.isIntersecting&&An()},[An]),l8,{disabled:!!O||or!=="viewport"}),w.useEffect(()=>{At.current||!O&&or==="render"&&(An(),At.current=!0)},[O,An,or]);const fu=Te=>{const ur=Te.currentTarget.getAttribute("target"),qn=N!==void 0?N:ur;if(!O&&!c8(Te)&&!Te.defaultPrevented&&(!qn||qn==="_self")&&Te.button===0){Te.preventDefault(),zm.flushSync(()=>{Et(!0)});const Md=r.subscribe("onResolved",()=>{Md(),Et(!1)});r.navigate({...W,replace:y,resetScroll:x,hashScrollIntoView:p,startTransition:v,viewTransition:j,ignoreBlocker:D})}};if(Ce)return{...ue,ref:n,href:Ce,...S&&{children:S},...N&&{target:N},...O&&{disabled:O},...P&&{style:P},...E&&{className:E},...A&&{onClick:A},...T&&{onBlur:T},...M&&{onFocus:M},...R&&{onMouseEnter:R},...I&&{onMouseLeave:I},...$&&{onTouchStart:$}};const jl=Te=>{if(O||or!=="intent")return;if(!fa){An();return}const ur=Te.currentTarget;if(dc.has(ur))return;const qn=setTimeout(()=>{dc.delete(ur),An()},fa);dc.set(ur,qn)},Fp=Te=>{O||or!=="intent"||An()},Cd=Te=>{if(O||!or||!fa)return;const ur=Te.currentTarget,qn=dc.get(ur);qn&&(clearTimeout(qn),dc.delete(ur))};return{...ue,...te,...Se,href:Oe==null?void 0:Oe.href,ref:n,onClick:so([A,fu]),onBlur:so([T,Cd]),onFocus:so([M,jl]),onMouseEnter:so([R,jl]),onMouseLeave:so([I,Cd]),onTouchStart:so([$,Fp]),disabled:!!O,target:N,..._t&&{style:_t},...ce&&{className:ce},...O&&a8,...de&&i8,...k&&De&&s8}}var wg={},n8={className:"active"},a8={role:"link","aria-disabled":!0},i8={"data-status":"active","aria-current":"page"},s8={"data-transitioning":"transitioning"},dc=new WeakMap,l8={rootMargin:"100px"},so=e=>t=>{for(const r of e)if(r){if(t.defaultPrevented)return;r(t)}};function o8(e,t,r,n){if(!n)return t?{href:e,external:!0}:{href:r.createHref(e)||"/",external:!1}}function u8(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var we=w.forwardRef((e,t)=>{const{_asChild:r,...n}=e,{type:i,...l}=r8(n,t),o=typeof n.children=="function"?n.children({isActive:l["data-status"]==="active"}):n.children;if(!r){const{disabled:c,...f}=l;return w.createElement("a",f,o)}return w.createElement(r,l,o)});function c8(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var d8=class extends k2{constructor(t){super(t),this.useMatch=r=>dl({select:r==null?void 0:r.select,from:this.id,structuralSharing:r==null?void 0:r.structuralSharing}),this.useRouteContext=r=>Y2({...r,from:this.id}),this.useSearch=r=>G2({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useParams=r=>K2({select:r==null?void 0:r.select,structuralSharing:r==null?void 0:r.structuralSharing,from:this.id}),this.useLoaderDeps=r=>F2({...r,from:this.id}),this.useLoaderData=r=>H2({...r,from:this.id}),this.useNavigate=()=>fl({from:this.fullPath}),this.Link=$o.forwardRef((r,n)=>d.jsx(we,{ref:n,from:this.fullPath,...r}))}};function f8(e){return new d8(e)}var h8=class extends $z{constructor(e){super(e),this.useMatch=t=>dl({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>Y2({...t,from:this.id}),this.useSearch=t=>G2({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>K2({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>F2({...t,from:this.id}),this.useLoaderData=t=>H2({...t,from:this.id}),this.useNavigate=()=>fl({from:this.fullPath}),this.Link=$o.forwardRef((t,r)=>d.jsx(we,{ref:r,from:this.fullPath,...t}))}};function m8(e){return new h8(e)}function _r(e){return typeof e=="object"?new T_(e,{silent:!0}).createRoute(e):new T_(e,{silent:!0}).createRoute}var T_=class{constructor(e,t){this.path=e,this.createRoute=r=>{const n=f8(r);return n.isRoot=!1,n},this.silent=t==null?void 0:t.silent}};function p8(e){const t=mr(),r=`not-found-${sr(t.stores.location,n=>n.pathname)}-${sr(t.stores.status,n=>n)}`;return d.jsx(Ub,{getResetKey:()=>r,onCatch:(n,i)=>{var l;if(wr(n))(l=e.onCatch)==null||l.call(e,n,i);else throw n},errorComponent:({error:n})=>{var i;if(wr(n))return(i=e.fallback)==null?void 0:i.call(e,n);throw n},children:e.children})}function y8(){return d.jsx("p",{children:"Not Found"})}function vo(e){return d.jsx(d.Fragment,{children:e.children})}function V2(e,t,r){return t.options.notFoundComponent?d.jsx(t.options.notFoundComponent,{...r}):e.options.defaultNotFoundComponent?d.jsx(e.options.defaultNotFoundComponent,{...r}):d.jsx(y8,{})}function v8(e){return null}function g8(){return v8(mr()),null}var Q2=w.memo(function({matchId:t}){const r=mr(),n=r.stores.activeMatchStoresById.get(t);n||Ua();const i=sr(r.stores.loadedAt,o=>o),l=sr(n,o=>o);return d.jsx(x8,{router:r,matchId:t,resetKey:i,matchState:w.useMemo(()=>{var f;const o=l.routeId,c=(f=r.routesById[o].parentRoute)==null?void 0:f.id;return{routeId:o,ssr:l.ssr,_displayPending:l._displayPending,parentRouteId:c}},[l._displayPending,l.routeId,l.ssr,r.routesById])})});function x8({router:e,matchId:t,resetKey:r,matchState:n}){var j,S;const i=e.routesById[n.routeId],l=i.options.pendingComponent??e.options.defaultPendingComponent,o=l?d.jsx(l,{}):null,c=i.options.errorComponent??e.options.defaultErrorComponent,f=i.options.onCatch??e.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??((j=e.options.notFoundRoute)==null?void 0:j.options.component):i.options.notFoundComponent,p=n.ssr===!1||n.ssr==="data-only",y=(!i.isRoot||i.options.wrapInSuspense||p)&&(i.options.wrapInSuspense??l??(((S=i.options.errorComponent)==null?void 0:S.preload)||p))?w.Suspense:vo,v=c?Ub:vo,x=h?p8:vo;return d.jsxs(i.isRoot?i.options.shellComponent??vo:vo,{children:[d.jsx($m.Provider,{value:t,children:d.jsx(y,{fallback:o,children:d.jsx(v,{getResetKey:()=>r,errorComponent:c||qb,onCatch:(N,O)=>{if(wr(N))throw N;f==null||f(N,O)},children:d.jsx(x,{fallback:N=>{if(!h||N.routeId&&N.routeId!==n.routeId||!N.routeId&&!i.isRoot)throw N;return w.createElement(h,N)},children:p||n._displayPending?d.jsx(Uz,{fallback:o,children:d.jsx(C_,{matchId:t})}):d.jsx(C_,{matchId:t})})})})}),n.parentRouteId===Xs?d.jsxs(d.Fragment,{children:[d.jsx(b8,{resetKey:r}),e.options.scrollRestoration&&O2?d.jsx(g8,{}):null]}):null]})}function b8({resetKey:e}){const t=mr(),r=w.useRef(void 0);return Oc(()=>{const n=t.latestLocation.href;(r.current===void 0||r.current!==n)&&(t.emit({type:"onRendered",...So(t.stores.location.state,t.stores.resolvedLocation.state)}),r.current=n)},[t.latestLocation.state.__TSR_key,e,t]),null}var C_=w.memo(function({matchId:t}){var h,p,y,v;const r=mr(),n=r.stores.activeMatchStoresById.get(t);n||Ua();const i=sr(n,x=>x),l=i.routeId,o=r.routesById[l],c=w.useMemo(()=>{var j;const x=(j=r.routesById[l].options.remountDeps??r.options.defaultRemountDeps)==null?void 0:j({routeId:l,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return x?JSON.stringify(x):void 0},[l,i.loaderDeps,i._strictParams,i._strictSearch,r.options.defaultRemountDeps,r.routesById]),f=w.useMemo(()=>{const x=o.options.component??r.options.defaultComponent;return x?d.jsx(x,{},c):d.jsx(X2,{})},[c,o.options.component,r.options.defaultComponent]);if(i._displayPending)throw(h=r.getMatch(i.id))==null?void 0:h._nonReactive.displayPendingPromise;if(i._forcePending)throw(p=r.getMatch(i.id))==null?void 0:p._nonReactive.minPendingPromise;if(i.status==="pending"){const x=o.options.pendingMinMs??r.options.defaultPendingMinMs;if(x){const j=r.getMatch(i.id);if(j&&!j._nonReactive.minPendingPromise){const S=Bo();j._nonReactive.minPendingPromise=S,setTimeout(()=>{S.resolve(),j._nonReactive.minPendingPromise=void 0},x)}}throw(y=r.getMatch(i.id))==null?void 0:y._nonReactive.loadPromise}if(i.status==="notFound")return wr(i.error)||Ua(),V2(r,o,i.error);if(i.status==="redirected")throw $r(i.error)||Ua(),(v=r.getMatch(i.id))==null?void 0:v._nonReactive.loadPromise;if(i.status==="error")throw i.error;return f}),X2=w.memo(function(){const t=mr(),r=w.useContext($m);let n,i=!1,l;{const h=r?t.stores.activeMatchStoresById.get(r):void 0;[n,i]=sr(h,p=>[p==null?void 0:p.routeId,(p==null?void 0:p.globalNotFound)??!1]),l=sr(t.stores.matchesId,p=>p[p.findIndex(y=>y===r)+1])}const o=n?t.routesById[n]:void 0,c=t.options.defaultPendingComponent?d.jsx(t.options.defaultPendingComponent,{}):null;if(i)return o||Ua(),V2(t,o,void 0);if(!l)return null;const f=d.jsx(Q2,{matchId:l});return n===Xs?d.jsx(w.Suspense,{fallback:c,children:f}):f});function j8(){const e=mr(),t=w.useRef({router:e,mounted:!1}),[r,n]=w.useState(!1),i=sr(e.stores.isLoading,y=>y),l=sr(e.stores.hasPendingMatches,y=>y),o=dg(i),c=i||r||l,f=dg(c),h=i||l,p=dg(h);return e.startTransition=y=>{n(!0),w.startTransition(()=>{y(),n(!1)})},w.useEffect(()=>{const y=e.history.subscribe(e.load),v=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Xi(e.latestLocation.publicHref)!==Xi(v.publicHref)&&e.commitLocation({...v,replace:!0}),()=>{y()}},[e,e.history]),Oc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(v){console.error(v)}})()},[e]),Oc(()=>{o&&!i&&e.emit({type:"onLoad",...So(e.stores.location.state,e.stores.resolvedLocation.state)})},[o,e,i]),Oc(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...So(e.stores.location.state,e.stores.resolvedLocation.state)})},[h,p,e]),Oc(()=>{if(f&&!c){const y=So(e.stores.location.state,e.stores.resolvedLocation.state);e.emit({type:"onResolved",...y}),z2(()=>{e.stores.status.setState(()=>"idle"),e.stores.resolvedLocation.setState(()=>e.stores.location.state)}),y.hrefChanged&&zz(e)}},[c,f,e]),null}function S8(){const e=mr(),t=e.routesById[Xs].options.pendingComponent??e.options.defaultPendingComponent,r=t?d.jsx(t,{}):null,n=d.jsxs(typeof document<"u"&&e.ssr?vo:w.Suspense,{fallback:r,children:[d.jsx(j8,{}),d.jsx(w8,{})]});return e.options.InnerWrap?d.jsx(e.options.InnerWrap,{children:n}):n}function w8(){const e=mr(),t=sr(e.stores.firstMatchId,i=>i),r=sr(e.stores.loadedAt,i=>i),n=t?d.jsx(Q2,{matchId:t}):null;return d.jsx($m.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?n:d.jsx(Ub,{getResetKey:()=>r,errorComponent:qb,onCatch:void 0,children:n})})}function N8(){const e=mr();return sr(e.stores.matchRouteReactivity,t=>t),w.useCallback(t=>{const{pending:r,caseSensitive:n,fuzzy:i,includeSearch:l,...o}=t;return e.matchRoute(o,{pending:r,caseSensitive:n,fuzzy:i,includeSearch:l})},[e])}function O8(e){const t=mr(),r=w.useRef(void 0);return sr(t.stores.activeMatchesSnapshot,n=>{const i=n;if(t.options.defaultStructuralSharing){const l=$a(r.current,i);return r.current=l,l}return i})}var _8=e=>({createMutableStore:O_,createReadonlyStore:O_,batch:z2}),E8=e=>new A8(e),A8=class extends Tz{constructor(e){super(e,_8)}};function P8({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(L2.Provider,{value:e,children:t});return e.options.Wrap?d.jsx(e.options.Wrap,{children:n}):n}function T8({router:e,...t}){return d.jsx(P8,{router:e,...t,children:d.jsx(S8,{})})}function Fb(e){const r=mr();return w.useRef(void 0),sr(r.stores.__store,n=>n)}function Z2(e){const t=mr(),r=w.useRef(void 0);return sr(t.stores.location,n=>{const i=n;if(t.options.defaultStructuralSharing){const l=$a(r.current,i);return r.current=l,l}return i})}function W2(e){if(!e)return;const t=new Date(e);if(!Number.isNaN(t.getTime()))return t.toLocaleString()}function C8(e){const t=W2(e);return t?`Last synced ${t}`:"Never synced"}function Kb(e){return typeof e!="number"||!Number.isFinite(e)?"Remote runs unknown":`${e} remote run${e===1?"":"s"}`}function M8(e,t){return(e==null?void 0:e.configured)!==!0?[]:[t?`Project: ${t}`:void 0,Kb(e.run_count),C8(e.last_synced_at),e.repo?`Repo: ${e.repo}`:void 0].filter(r=>r!==void 0)}function R8(e){return(e==null?void 0:e.sync_status)==="syncing"}function D8(e,t=!1){if(t||(e==null?void 0:e.sync_status)==="syncing")return{state:"syncing",label:"Syncing",actionLabel:"Syncing...",tone:"info",summary:"Sync is in progress.",canSync:!1};if((e==null?void 0:e.configured)!==!0)return{state:"unconfigured",label:"Not configured",actionLabel:"Sync Project",tone:"neutral",summary:"Remote results are not configured for this project.",canSync:!1};if(e.available!==!0||e.sync_status==="unavailable")return{state:"unavailable",label:"Unavailable",actionLabel:"Sync Project",tone:"warn",summary:"The remote results cache is not available locally.",nextAction:"Sync Project can clone or refresh the configured results repo.",canSync:!0};const r=e.sync_status??"clean";return r==="conflicted"||r==="diverged"?{state:"conflicted",label:"Conflicted",actionLabel:"Sync Project",tone:"danger",summary:e.block_reason??(r==="diverged"?"Local and remote results histories have diverged.":"The results repo has unresolved conflicts."),nextAction:"Resolve the results repo conflicts manually, then sync the project again.",canSync:!1}:r==="dirty"?{state:"dirty",label:"Dirty",actionLabel:"Sync Metadata",tone:"warn",summary:e.block_reason??"Local result metadata has pending edits.",nextAction:e.auto_push===!0?"Sync Project will commit safe result metadata changes before syncing.":"Review or commit the pending result metadata; no reset will be performed.",canSync:!0}:r==="behind"?{state:"behind",label:"Behind",actionLabel:"Sync Project",tone:"info",summary:`Remote has ${e.behind??0} commit${e.behind===1?"":"s"} to pull.`,nextAction:"Sync Project will fast-forward when possible.",canSync:!0}:r==="ahead"?{state:"ahead",label:"Ahead",actionLabel:"Push Results",tone:"info",summary:`Local results are ${e.ahead??0} commit${e.ahead===1?"":"s"} ahead.`,nextAction:e.auto_push===!0?"Sync Project will push safe result changes.":"Enable auto_push or push the results repo manually.",canSync:!0}:{state:"clean",label:"Clean",actionLabel:"Sync Project",tone:"good",summary:"Local and remote result metadata are in sync.",canSync:!0}}function k8(e){return typeof e!="number"||!Number.isFinite(e)?"remote results":Kb(e)}function M_(e){const t=[`Synced ${k8(e.run_count)}`];e.repo&&t.push(`from ${e.repo}`);const r=W2(e.last_synced_at);return r&&t.push(`at ${r}`),`${t.join(" ")}.`}function I8(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 ${Kb(t)} ${t===1?"remains":"remain"} available.`:"The remote results cache remains available."}function Gb(e){return[I8(e),"Resolve the results repo issue, then sync remote results again."].filter(t=>t!==void 0).join(" ")}function J2(e){if(e.blocked||e.sync_status==="conflicted"||e.sync_status==="diverged"){const r=e.repo?` for ${e.repo}`:"",n=e.block_reason??"Sync stopped before changing the results repo.";return{kind:"warning",message:`Sync stopped${r}: ${n}. ${Gb(e)}`}}const t=[e.commit_created?"committed pending metadata":void 0,e.pull_performed?"pulled remote results":void 0,e.push_performed?"pushed local results":void 0].filter(r=>r!==void 0);return{kind:"success",message:t.length>0?`${M_(e)} Sync completed: ${t.join(", ")}.`:`${M_(e)} Project results were already up to date.`}}function eM(e,t){return{kind:"error",message:`Sync failed: ${e instanceof Error?e.message:String(e)}. ${Gb(t)}`}}async function Qe(e){const t=await fetch(e);if(!t.ok)throw new Error(`API error: ${t.status} ${t.statusText}`);return t.json()}async function L8(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 $8=50;function tM(e,t){const r=new URLSearchParams({limit:String($8)});return t&&r.set("cursor",t),`${e}?${r.toString()}`}function rM(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 R_(e){return e.split("/").filter(t=>t.length>0).map(t=>encodeURIComponent(t)).join("/")}function xo(e){const t=e.projectId?`${pt(e.projectId)}/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${R_(e.filePath)}`:`/api/runs/${encodeURIComponent(e.runId)}/evals/${encodeURIComponent(e.evalId)}/files/${R_(e.filePath)}`,r=new URLSearchParams;e.raw&&r.set("raw","1"),e.download&&r.set("download","1");const n=r.toString();return n?`${t}?${n}`:t}const Yb={queryKey:["runs"],queryFn:()=>Qe("/api/runs"),refetchInterval:5e3},z8={queryKey:["runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:e})=>Qe(tM("/api/runs",e)),getNextPageParam:e=>e.next_cursor,refetchInterval:5e3};function B8(e){return{queryKey:["runs",e],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}`),enabled:!!e}}function U8(e,t){const r=t?`${pt(t)}/runs/${encodeURIComponent(e)}/log`:`/api/runs/${encodeURIComponent(e)}/log`;return{queryKey:["runs",e,"log",t??""],queryFn:()=>L8(r),enabled:!!e,refetchInterval:3e3}}function q8(e,t){return Ue(U8(e,t))}const H8={queryKey:["feedback"],queryFn:()=>Qe("/api/feedback")},nM={queryKey:["experiments"],queryFn:()=>Qe("/api/experiments")};function F8(e){return{queryKey:["compare","baseline",e??""],queryFn:()=>Qe(`/api/compare?baseline=${encodeURIComponent(e??"")}`),enabled:!!e}}const K8={queryKey:["compare"],queryFn:()=>Qe("/api/compare")},G8={queryKey:["targets"],queryFn:()=>Qe("/api/targets")};function Y8(e,t){return{queryKey:["runs",e,"evals",t,"files"],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}/evals/${encodeURIComponent(t)}/files`),enabled:!!e&&!!t}}function V8(e,t,r){return{queryKey:["runs",e,"evals",t,"files",r],queryFn:()=>Qe(xo({runId:e,evalId:t,filePath:r})),enabled:!!e&&!!t&&!!r}}function Q8(e,t){return{queryKey:["runs",e,"categories",t,"suites"],queryFn:()=>Qe(`/api/runs/${encodeURIComponent(e)}/categories/${encodeURIComponent(t)}/suites`),enabled:!!e&&!!t}}const X8={queryKey:["config"],queryFn:()=>Qe("/api/config"),staleTime:5e3};function Vb(e){const t=e?`${pt(e)}/remote/status`:"/api/remote/status";return{queryKey:["remote-status",e??""],queryFn:()=>Qe(t),staleTime:5e3,refetchInterval:r=>R8(r.state.data)?1e3:!1}}function Z8(){return Ue(Yb)}function W8(){var t;const e=N2(z8);return{...e,data:rM((t=e.data)==null?void 0:t.pages)}}function ld(e){return Ue(B8(e))}function J8(){return Ue(H8)}function aM(){return Ue(nM)}function eB(){return Ue(K8)}function iM(e,t){return Ue(Y8(e,t))}function Ax(e,t,r){return Ue(V8(e,t,r))}function sM(e,t){return Ue(Q8(e,t))}function ut(e){return Ue(e?oB(e):X8)}function Bm(e){return Ue(Vb(e))}const $c=.8,od="agentv";function Ga(e,t=$c){return e>=t}const tB={queryKey:["projects"],queryFn:()=>Qe("/api/projects"),refetchInterval:1e4};function ru(){return Ue(tB)}async function rB(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})});if(!t.ok){const r=await t.json();throw new Error(r.error||`Failed to add project: ${t.status}`)}return t.json()}function pt(e){return`/api/projects/${encodeURIComponent(e)}`}function Qb(e){return{queryKey:["projects",e,"runs"],queryFn:()=>Qe(`${pt(e)}/runs`),enabled:!!e,refetchInterval:5e3}}function nB(e){return{queryKey:["projects",e,"runs","infinite"],initialPageParam:void 0,queryFn:({pageParam:t})=>Qe(tM(`${pt(e)}/runs`,t)),getNextPageParam:t=>t.next_cursor,enabled:!!e,refetchInterval:5e3}}function aB(e){return Ue(Qb(e))}function iB(e){var r;const t=N2(nB(e));return{...t,data:rM((r=t.data)==null?void 0:r.pages)}}function sB(e,t){return{queryKey:["projects",e,"runs",t],queryFn:()=>Qe(`${pt(e)}/runs/${encodeURIComponent(t)}`),enabled:!!e&&!!t}}function ud(e,t){return Ue(sB(e,t))}function lM(e,t,r){return{queryKey:["projects",e,"runs",t,"categories",r,"suites"],queryFn:()=>Qe(`${pt(e)}/runs/${encodeURIComponent(t)}/categories/${encodeURIComponent(r)}/suites`),enabled:!!e&&!!t&&!!r}}function oM(e,t,r){return{queryKey:["projects",e,"runs",t,"evals",r,"files"],queryFn:()=>Qe(`${pt(e)}/runs/${encodeURIComponent(t)}/evals/${encodeURIComponent(r)}/files`),enabled:!!e&&!!t&&!!r}}function Px(e,t,r,n){return{queryKey:["projects",e,"runs",t,"evals",r,"files",n],queryFn:()=>Qe(xo({projectId:e,runId:t,evalId:r,filePath:n})),enabled:!!e&&!!t&&!!r&&!!n}}function Xb(e){return{queryKey:["projects",e,"experiments"],queryFn:()=>Qe(`${pt(e)}/experiments`),enabled:!!e}}function uM(e,t){const r=`${pt(e)}/compare`;return t?{queryKey:["projects",e,"compare","baseline",t],queryFn:()=>Qe(`${r}?baseline=${encodeURIComponent(t)}`),enabled:!!e}:{queryKey:["projects",e,"compare"],queryFn:()=>Qe(r),enabled:!!e}}function lB(e){return{queryKey:["projects",e,"targets"],queryFn:()=>Qe(`${pt(e)}/targets`),enabled:!!e}}function oB(e){return{queryKey:["projects",e,"config"],queryFn:()=>Qe(`${pt(e)}/config`),enabled:!!e,staleTime:5e3}}async function cM(e){const t=e?`${pt(e)}/remote/sync`:"/api/remote/sync",r=await fetch(t,{method:"POST"});if(!r.ok){const n=await r.json().catch(()=>({error:r.statusText}));throw new Error(n.error??`Failed to sync remote results: ${r.status}`)}return r.json()}class dM extends Error{constructor(t,r,n=[]){super(t),this.status=r,this.duplicates=n,this.name="CombineRunsApiError"}}async function D_(e,t,r,n){const i=r?`${pt(r)}/runs/combine`:"/api/runs/combine",l=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({run_ids:e,duplicate_policy:t})});if(!l.ok){const o=await l.json().catch(()=>({error:l.statusText}));throw new dM(o.error??`Failed to combine runs: ${l.status}`,l.status,o.duplicates??[])}return l.json()}async function uB(e,t){const r=t?`${pt(t)}/runs/${encodeURIComponent(e)}`:`/api/runs/${encodeURIComponent(e)}`,n=await fetch(r,{method:"DELETE"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed to delete run: ${n.status}`)}}async function cB(e,t,r){const n=r?`${pt(r)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,i=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tags:t})});if(!i.ok){const l=await i.json().catch(()=>({error:i.statusText}));throw new Error(l.error??`Failed to save tags: ${i.status}`)}return i.json()}async function dB(e,t){const r=t?`${pt(t)}/runs/${encodeURIComponent(e)}/tags`:`/api/runs/${encodeURIComponent(e)}/tags`,n=await fetch(r,{method:"DELETE"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed to delete tags: ${n.status}`)}}async function fB(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 hB(e){const t=e?`${pt(e)}/eval/discover`:"/api/eval/discover";return{queryKey:["eval-discover",e??""],queryFn:()=>Qe(t),staleTime:3e4}}function mB(e){return Ue(hB(e))}function pB(e){const t=e?`${pt(e)}/eval/targets`:"/api/eval/targets";return{queryKey:["eval-targets",e??""],queryFn:()=>Qe(t),staleTime:3e4}}function yB(e){return Ue(pB(e))}async function fM(e,t){const r=t?`${pt(t)}/eval/run`:"/api/eval/run",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed: ${n.status}`)}return n.json()}async function vB(e,t){const r=t?`${pt(t)}/eval/run/${e}/stop`:`/api/eval/run/${e}/stop`,n=await fetch(r,{method:"POST"});if(!n.ok){const i=await n.json().catch(()=>({error:n.statusText}));throw new Error(i.error??`Failed: ${n.status}`)}return n.json()}function gB(e,t){const r=t?`${pt(t)}/eval/status/${e}`:`/api/eval/status/${e}`;return{queryKey:["eval-status",t??"",e],queryFn:()=>Qe(r),enabled:!!e,refetchInterval:n=>{var l;const i=(l=n.state.data)==null?void 0:l.status;return i==="finished"||i==="failed"?!1:2e3}}}function Zb(e,t){return Ue(gB(e,t))}function xB(e){const t=e?`${pt(e)}/eval/runs`:"/api/eval/runs";return{queryKey:["eval-runs",e??""],queryFn:()=>Qe(t),refetchInterval:3e3}}function Um(e){return Ue(xB(e))}async function bB(e,t){const r=t?`${pt(t)}/eval/preview`:"/api/eval/preview",n=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!n.ok)throw new Error(`Preview failed: ${n.status}`);return n.json()}const hM=w.createContext({isOpen:!1,toggle:()=>{},close:()=>{}});function jB({children:e}){const[t,r]=w.useState(!1),n=w.useCallback(()=>r(o=>!o),[]),i=w.useCallback(()=>r(!1),[]),l=w.useMemo(()=>({isOpen:t,toggle:n,close:i}),[i,t,n]);return d.jsx(hM.Provider,{value:l,children:e})}function mM(){return w.useContext(hM)}function qm({appName:e}){return e!==od?d.jsx("span",{className:"av-brand-name",children:e}):d.jsxs("span",{className:"av-brand-name","aria-label":"AgentV",children:[d.jsx("span",{className:"text-cyan-400","aria-hidden":"true",children:"A"}),d.jsx("span",{"aria-hidden":"true",children:"GENT"}),d.jsx("span",{className:"text-cyan-400","aria-hidden":"true",children:"V"})]})}function SB(e){return`agentv.studio.initial-project-redirect:${e}`}function Wb(e,t){const r=`/projects/${encodeURIComponent(e)}`;return t?`${r}?tab=${encodeURIComponent(t)}`:r}function Pi(e,t){return t?`/projects/${encodeURIComponent(t)}/runs/${encodeURIComponent(e)}`:`/runs/${encodeURIComponent(e)}`}function k_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`:`/evals/${encodeURIComponent(e)}/${encodeURIComponent(t)}`}function I_(e,t){return t?`/projects/${encodeURIComponent(t)}/experiments/${encodeURIComponent(e)}`:`/experiments/${encodeURIComponent(e)}`}function L_(e,t){return t?`/projects/${encodeURIComponent(t)}/jobs/${encodeURIComponent(e)}`:`/jobs/${encodeURIComponent(e)}`}function $_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/category/${encodeURIComponent(t)}`}function z_(e,t,r){return r?`/projects/${encodeURIComponent(r)}/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`:`/runs/${encodeURIComponent(e)}/suite/${encodeURIComponent(t)}`}function wB(e){return e?Wb(e,"runs"):"/?tab=runs"}function NB(e,t,r=!1){if(!r)return t&&e.includes(t)?t:void 0}function OB(e,t,r,n){return t===!1?{kind:"single-project-home"}:r&&e.includes(r)?{kind:"redirect",redirectPath:Wb(r,n)}:{kind:"dashboard"}}function zc(e,t){var n,i;return((i=(n=t==null?void 0:t.find(l=>l.id===e))==null?void 0:n.name)==null?void 0:i.trim())||e}function rr(e){if(!e)return"Run";const[,t]=e.split("::");return t||e}function _B(e,t=[]){const r=[];for(let n=1;n<e.length;n++){const i=e[n],l=i.routeId??i.id,o=i.params;if(!(l==="/"||l==="/_layout")){if(l.includes("/projects/$projectId")&&o.projectId){const c=zc(o.projectId,t),f=Wb(o.projectId);if(r.some(h=>h.to===f)||r.push({label:c,to:f}),l==="/projects/$projectId")continue}l.includes("/projects/$projectId_/jobs/$runId")?r.some(c=>c.label===rr(o.runId))||r.push({label:rr(o.runId),to:L_(o.runId,o.projectId)}):l.includes("/projects/$projectId_/runs/$runId/category/$category")?(r.some(c=>c.label===rr(o.runId))||r.push({label:rr(o.runId),to:Pi(o.runId,o.projectId)}),r.push({label:o.category??"Category",to:$_(o.runId,o.category??"Category",o.projectId)})):l.includes("/projects/$projectId_/runs/$runId/suite/$suite")?(r.some(c=>c.label===rr(o.runId))||r.push({label:rr(o.runId),to:Pi(o.runId,o.projectId)}),r.push({label:o.suite??"Suite",to:z_(o.runId,o.suite??"Suite",o.projectId)})):l.includes("/projects/$projectId_/runs/$runId")?r.push({label:rr(o.runId),to:Pi(o.runId,o.projectId)}):l.includes("/projects/$projectId_/evals/$runId/$evalId")?(r.some(c=>c.label===rr(o.runId))||r.push({label:rr(o.runId),to:Pi(o.runId,o.projectId)}),r.push({label:o.evalId??"Eval",to:k_(o.runId,o.evalId??"Eval",o.projectId)})):l.includes("/projects/$projectId_/experiments/$experimentName")?r.push({label:o.experimentName??"Experiment",to:I_(o.experimentName??"Experiment",o.projectId)}):l.includes("/runs/$runId/category/$category")?(r.some(c=>c.label===rr(o.runId))||r.push({label:rr(o.runId),to:Pi(o.runId)}),r.push({label:o.category??"Category",to:$_(o.runId,o.category??"Category")})):l.includes("/runs/$runId/suite/$suite")?(r.some(c=>c.label===rr(o.runId))||r.push({label:rr(o.runId),to:Pi(o.runId)}),r.push({label:o.suite??"Suite",to:z_(o.runId,o.suite??"Suite")})):l.includes("/jobs/$runId")?r.push({label:rr(o.runId),to:L_(o.runId)}):l.includes("/runs/$runId")?r.push({label:rr(o.runId),to:Pi(o.runId)}):l.includes("/evals/$runId/$evalId")?(r.some(c=>c.label===rr(o.runId))||r.push({label:rr(o.runId),to:Pi(o.runId)}),r.push({label:o.evalId??"Eval",to:k_(o.runId,o.evalId??"Eval")})):l.includes("/experiments/$experimentName")?r.push({label:o.experimentName??"Experiment",to:I_(o.experimentName??"Experiment")}):(l==="/index"||l==="/")&&r.push({label:"Home",to:"/"})}}return r}function EB(){const e=O8(),{data:t}=ru(),r=_B(e,t==null?void 0:t.projects);return r.length===0?null:d.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 bg-gray-950 px-6 py-2 text-sm",children:[d.jsx(we,{to:"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:"Home"}),r.map((n,i)=>{const l=i===r.length-1;return d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx("span",{className:"text-gray-600",children:">"}),l?d.jsx("span",{className:"text-gray-400",children:n.label}):d.jsx(we,{to:n.to??"/",className:"text-cyan-400 hover:text-cyan-300 hover:underline",children:n.label})]},`${n.label}-${i}`)})]})}const $h="remote::";function pM(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"),l=String(t.getMinutes()).padStart(2,"0");return`${r}/${n} ${i}:${l}`}catch{return e.slice(0,10)}}function qa(e){const t=e==null?void 0:e.trim();return t||void 0}function AB(e){const t=qa(e);return t&&t!=="default"&&t!=="-"?t:void 0}function yM(e){let t=e.trim();return t.startsWith($h)&&(t=t.slice($h.length)),t.replace(/\.(jsonl|json)$/i,"")}function PB(e){const r=yM(e).match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2})[:-](\d{2})[:-](\d{2})(?:[.-](\d{3}))?Z?$/);if(!r)return;const[,n,i,l,o,c,f,h="000"]=r,p=new Date(`${n}-${i}-${l}T${o}:${c}:${f}.${h}Z`);return Number.isNaN(p.getTime())?void 0:p}function Jb(e,t){const r=qa(e);return r?PB(r)?!0:yM(r)===pM(t):!1}function TB(e,t){const r=qa(e);if(!r)return;const n=r.startsWith($h)?r.slice($h.length):r,i=n.lastIndexOf("::");if(i!==-1){const l=n.slice(i+2);if(Jb(l,t))return qa(n.slice(0,i))}return n}function CB(e){return[qa(e.display_name),qa(e.title),TB(e.filename,e.timestamp)].find(r=>!!r&&!Jb(r,e.timestamp))}function MB(e){return`${Math.round(e*100)}%`}function RB(e,t){const r=[t],n=qa(e.filename),i=qa(e.display_name),l=qa(e.title);return n&&n!==t&&r.push(`Run ID: ${n}`),i&&i!==n&&i!==t&&r.push(`Display name: ${i}`),l&&l!==i&&l!==n&&l!==t&&r.push(`Title: ${l}`),r.push(`Timestamp: ${e.timestamp}`),r.join(`
|
|
66
|
-
`)}function ej(e,t={}){const r=pM(e.timestamp),n=AB(e.experiment),i=CB(e),l=n&&!Jb(n,e.timestamp)?n:void 0,o=i??l??r,c=t.includePassRate??!0,f=[];o!==r&&f.push(r),e.target&&e.target!==o&&f.push(e.target),n&&n!==o&&f.push(n),c&&f.push(MB(e.pass_rate));const h=f.join(" · "),p=h?`${o} · ${h}`:o;return{primary:o,secondary:h,label:p,title:RB(e,p)}}function zn({children:e}){const{isOpen:t,close:r}=mM(),i=Z2().href;return w.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:l=>l.key==="Escape"&&r(),role:"button",tabIndex:-1,"aria-label":"Close navigation"}),d.jsx("aside",{className:`fixed inset-y-0 left-0 z-40 flex w-64 flex-col border-r border-gray-800 bg-gray-950 transition-transform duration-200 ease-in-out md:static md:z-auto md:translate-x-0 md:bg-gray-900/50 ${t?"translate-x-0":"-translate-x-full"}`,children:e})]})}function da({projectId:e}){const{data:t}=ut(e),r=(t==null?void 0:t.app_name)??od;return d.jsx("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:d.jsx(we,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(qm,{appName:r})})})}function vM({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 cd(e){const{data:t}=ru();return zc(e,t==null?void 0:t.projects)}const Ng=[{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 fc(e){return`mb-0.5 flex min-h-9 items-center justify-between gap-3 rounded-md px-2 py-1.5 text-sm transition-colors ${e?"bg-gray-800 text-cyan-400":"text-gray-400 hover:bg-gray-800/50 hover:text-gray-200"}`}function B_(e){return e.run_count===0?"No runs":(e.execution_error_count??0)>0?`${Math.round(e.pass_rate*100)}% - ${e.execution_error_count} err`:`${Math.round(e.pass_rate*100)}% - ${e.run_count} runs`}function U_({projectId:e}){const t=Z2(),{data:r}=ru(),{data:n}=Um(e),i=(r==null?void 0:r.projects)??[],l=e?i.find(y=>y.id===e):void 0,o=e?zc(e,i):void 0,c=t.search,f=Ng.some(y=>y.id===c.tab)?c.tab:"runs",h=((n==null?void 0:n.runs)??[]).filter(y=>y.status==="starting"||y.status==="running").length,p=!e&&i.length===0;return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsxs("div",{className:"mb-4",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Navigate"}),d.jsxs(we,{to:"/",className:fc(t.pathname==="/"),children:[d.jsx("span",{className:"truncate",children:"Projects"}),i.length>0?d.jsx("span",{className:"shrink-0 text-xs tabular-nums text-gray-500",children:i.length}):null]}),d.jsx(we,{to:"/settings",className:fc(t.pathname==="/settings"),children:d.jsx("span",{className:"truncate",children:"Settings"})})]}),e?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:"Project"}),d.jsxs("div",{className:"mb-2 rounded-md border border-gray-800 bg-gray-950/30 px-2 py-2",children:[d.jsx("div",{className:"truncate text-sm font-medium text-gray-200",children:o}),d.jsx("div",{className:"mt-1 truncate text-xs text-gray-500",children:l?B_(l):e}),h>0?d.jsxs("div",{className:"mt-2 inline-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"}),h," running"]}):null]}),Ng.map(y=>d.jsxs(we,{to:"/projects/$projectId",params:{projectId:e},search:{tab:y.id},className:fc(f===y.id),title:y.description,children:[d.jsx("span",{className:"truncate",children:y.label}),d.jsx("span",{className:"shrink-0 text-xs text-gray-500",children:y.description})]},y.id))]}):null,p?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"}),Ng.map(y=>d.jsxs(we,{to:"/",search:{tab:y.id},className:fc(f===y.id),title:y.description,children:[d.jsx("span",{className:"truncate",children:y.label}),d.jsx("span",{className:"shrink-0 text-xs text-gray-500",children:y.description})]},y.id))]}):null,!e&&i.length>0?d.jsxs("div",{children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Projects"}),i.map(y=>{const v=t.pathname.startsWith(`/projects/${y.id}`);return d.jsx(we,{to:"/projects/$projectId",params:{projectId:y.id},className:fc(v),title:y.path,children:d.jsxs("span",{className:"min-w-0",children:[d.jsx("span",{className:"block truncate",children:zc(y.id,i)}),d.jsx("span",{className:"block truncate text-xs text-gray-600",children:B_(y)})]})},y.id)})]}):null]})]})}function DB(){const e=N8(),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}),l=e({to:"/projects/$projectId/runs/$runId/suite/$suite",fuzzy:!0}),o=e({to:"/projects/$projectId/jobs/$runId",fuzzy:!0}),c=e({to:"/projects/$projectId",fuzzy:!0});if(t&&typeof t=="object"&&"projectId"in t){const{projectId:x,runId:j,evalId:S}=t;return d.jsx(zB,{projectId:x,runId:j,currentEvalId:S})}if(i&&typeof i=="object"&&"projectId"in i){const{projectId:x,runId:j,category:S}=i;return d.jsx(UB,{projectId:x,runId:j,category:S})}if(l&&typeof l=="object"&&"projectId"in l){const{projectId:x,runId:j,suite:S}=l;return d.jsx(BB,{projectId:x,runId:j,suite:S})}if(r&&typeof r=="object"&&"projectId"in r){const{projectId:x,runId:j}=r;return d.jsx(q_,{projectId:x,currentRunId:j})}if(o&&typeof o=="object"&&"projectId"in o){const{projectId:x}=o;return d.jsx(q_,{projectId:x})}if(n&&typeof n=="object"&&"projectId"in n){const{projectId:x,experimentName:j}=n;return d.jsx(qB,{projectId:x,currentExperiment:j})}if(c&&typeof c=="object"&&"projectId"in c){const{projectId:x}=c;return d.jsx(U_,{projectId:x})}const f=e({to:"/runs/$runId",fuzzy:!0}),h=e({to:"/evals/$runId/$evalId",fuzzy:!0}),p=e({to:"/runs/$runId/category/$category",fuzzy:!0}),y=e({to:"/runs/$runId/suite/$suite",fuzzy:!0}),v=e({to:"/experiments/$experimentName",fuzzy:!0});if(p&&typeof p=="object"&&"runId"in p){const{runId:x,category:j}=p;return d.jsx($B,{runId:x,category:j})}if(y&&typeof y=="object"&&"runId"in y){const{runId:x,suite:j}=y;return d.jsx(LB,{runId:x,suite:j})}if(h&&typeof h=="object"&&"runId"in h){const{runId:x,evalId:j}=h;return d.jsx(IB,{runId:x,currentEvalId:j})}if(v&&typeof v=="object"&&"experimentName"in v){const{experimentName:x}=v;return d.jsx(HB,{currentExperiment:x})}if(f&&typeof f=="object"&&"runId"in f){const{runId:x}=f;return d.jsx(kB,{currentRunId:x})}return d.jsx(U_,{})}function kB({currentRunId:e}){const{data:t}=Z8(),{data:r}=ut(),{data:n}=Um(),i=((n==null?void 0:n.runs)??[]).filter(l=>l.status==="starting"||l.status==="running").length;return d.jsxs(zn,{children:[d.jsxs("div",{className:"flex items-center gap-2 border-b border-gray-800 px-4 py-4",children:[d.jsx(we,{to:"/",className:"truncate text-lg font-semibold text-white hover:text-cyan-400",children:d.jsx(qm,{appName:(r==null?void 0:r.app_name)??od})}),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(l=>{const o=ej(l),c=e===l.filename;return d.jsx(we,{to:"/runs/$runId",params:{runId:l.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:o.title,children:d.jsx(vM,{display:o})},l.filename)})]}),d.jsx("div",{className:"border-t border-gray-800 px-4 py-3",children:d.jsx(we,{to:"/settings",className:"flex items-center gap-2 text-sm text-gray-400 hover:text-cyan-400",children:"Settings"})})]})}function IB({runId:e,currentEvalId:t}){const{data:r}=ld(e),{data:n}=ut(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8;return d.jsxs(zn,{children:[d.jsx(da,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(we,{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 o=l.testId===t,c=Ga(l.score,i);return d.jsxs(we,{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 transition-colors ${o?"bg-gray-800 text-cyan-400":"text-gray-400 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 LB({runId:e,suite:t}){const{data:r}=ld(e),{data:n}=ut(),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=((r==null?void 0:r.results)??[]).filter(o=>(o.suite??"Uncategorized")===t);return d.jsxs(zn,{children:[d.jsx(da,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(we,{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"}),l.map(o=>{const c=Ga(o.score,i);return d.jsxs(we,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:o.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:o.testId})]},o.testId)})]})]})}function $B({runId:e,category:t}){const{data:r}=sM(e,t),n=(r==null?void 0:r.suites)??[];return d.jsxs(zn,{children:[d.jsx(da,{}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(we,{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(we,{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 q_({projectId:e,currentRunId:t}){const{data:r}=aB(e),n=cd(e);return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(we,{to:"/",className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All Projects"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:n}),n!==e?d.jsx("p",{className:"truncate text-xs text-gray-600",children:e}):null]}),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(i=>{const l=ej(i),o=t===i.filename;return d.jsx(we,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:i.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:l.title,children:d.jsx(vM,{display:l})},i.filename)})]})]})}function zB({projectId:e,runId:t,currentEvalId:r}){const{data:n}=ud(e,t),{data:i}=ut(e),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,o=cd(e);return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(we,{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-xs text-gray-500",children:o}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:t})]}),d.jsxs("nav",{className:"flex-1 overflow-y-auto px-2 py-3",children:[d.jsx("div",{className:"mb-2 px-2 text-xs font-medium uppercase tracking-wider text-gray-500",children:"Evaluations"}),n==null?void 0:n.results.map(c=>{const f=c.testId===r,h=Ga(c.score,l);return d.jsxs(we,{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 transition-colors ${f?"bg-gray-800 text-cyan-400":"text-gray-400 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 BB({projectId:e,runId:t,suite:r}){const{data:n}=ud(e,t),{data:i}=ut(e),l=(i==null?void 0:i.threshold)??(i==null?void 0:i.pass_threshold)??.8,o=((n==null?void 0:n.results)??[]).filter(f=>(f.suite??"Uncategorized")===r),c=cd(e);return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(we,{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-xs text-gray-500",children:c}),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"}),o.map(f=>{const h=Ga(f.score,l);return d.jsxs(we,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:f.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:f.testId})]},f.testId)})]})]})}function UB({projectId:e,runId:t,category:r}){const{data:n}=Ue(lM(e,t,r)),i=(n==null?void 0:n.suites)??[],l=cd(e);return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(we,{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-xs text-gray-500",children:l}),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(we,{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 qB({projectId:e,currentExperiment:t}){const{data:r}=Ue(Xb(e)),n=(r==null?void 0:r.experiments)??[],i=cd(e);return d.jsxs(zn,{children:[d.jsx(da,{projectId:e}),d.jsxs("div",{className:"border-b border-gray-800 px-4 py-2",children:[d.jsx(we,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"experiments"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← All experiments"}),d.jsx("p",{className:"mt-1 truncate text-sm font-medium text-gray-300",children:i}),i!==e?d.jsx("p",{className:"truncate text-xs text-gray-600",children:e}):null]}),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(l=>{const o=l.name===t;return d.jsx(we,{to:"/projects/$projectId/experiments/$experimentName",params:{projectId:e,experimentName:l.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:l.name},l.name)})]})]})}function HB({currentExperiment:e}){const{data:t}=aM(),r=(t==null?void 0:t.experiments)??[];return d.jsxs(zn,{children:[d.jsx(da,{}),d.jsx("div",{className:"border-b border-gray-800 px-4 py-2",children:d.jsx(we,{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(we,{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 FB(){return d.jsx(jB,{children:d.jsx(KB,{})})}function KB(){const{toggle:e}=mM(),{data:t}=ut(),r=(t==null?void 0:t.app_name)??od;return d.jsxs("div",{className:"flex h-screen overflow-hidden",children:[d.jsx(DB,{}),d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col overflow-hidden",children:[d.jsxs("header",{className:"flex items-center gap-3 border-b border-gray-800 bg-gray-900/50 px-4 py-3 md:hidden",children:[d.jsx("button",{type:"button",onClick:e,className:"text-gray-400 hover:text-gray-200","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.jsx("span",{className:"text-sm font-semibold text-white",children:d.jsx(qm,{appName:r})})]}),d.jsx(EB,{}),d.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:d.jsx(X2,{})})]})]})}const pr=m8({component:FB}),GB=_r("/settings")({component:YB});function YB(){const{data:e,isLoading:t}=ut(),r=ca(),[n,i]=w.useState(""),[l,o]=w.useState(!1),[c,f]=w.useState(null),h=(e==null?void 0:e.threshold)??$c,p=n||String(h),y=(e==null?void 0:e.read_only)===!0,v=(e==null?void 0:e.app_name)??od,x=async()=>{const j=Number.parseFloat(n||String(h));if(Number.isNaN(j)||j<0||j>1){f({type:"error",text:"Threshold must be a number between 0 and 1"});return}o(!0),f(null);try{await fB({threshold:j}),await r.invalidateQueries({queryKey:["config"]}),i(""),f({type:"success",text:"Settings saved"}),setTimeout(()=>f(null),3e3)}catch{f({type:"error",text:"Failed to save settings"})}finally{o(!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(qm,{appName:v})]})]}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6",children:[d.jsx("h2",{className:"text-lg font-medium text-white",children:"Evaluation"}),d.jsx("p",{className:"mt-1 text-sm text-gray-400",children:"Configure how evaluation results are classified"}),d.jsx("div",{className:"mt-6 space-y-4",children:d.jsxs("div",{children:[d.jsx("label",{htmlFor:"pass-threshold",className:"block text-sm font-medium text-gray-300",children:"Pass Threshold"}),d.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:["Score at or above this value is considered passing. Default: ",$c]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("input",{id:"pass-threshold",type:"number",min:"0",max:"1",step:"0.05",value:p,onChange:j=>i(j.target.value),disabled:y,className:"w-32 rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-500 focus:outline-none focus:ring-1 focus:ring-cyan-500"}),d.jsxs("span",{className:"text-sm text-gray-400",children:["(",Math.round((Number.parseFloat(p)||0)*100),"%)"]})]})]})}),d.jsxs("div",{className:"mt-6 flex items-center gap-3",children:[!y&&d.jsx("button",{type:"button",onClick:x,disabled:l,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:l?"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 Hm(e){return e.executionStatus==="execution_error"}function Fm(e,t){let r=0,n=0,i=0,l=0;for(const c of e){if(Hm(c)){i++;continue}r++,l+=c.score,c.score>=t&&n++}const o=r-n;return{total:e.length,qualityTotal:r,passed:n,failed:o,executionErrors:i,passRate:r>0?n/r:0,avgScore:r>0?l/r:0}}function Gt(e){return e.execution_error_count??0}function gM(e){return Math.max(0,e.total-Gt(e))}function Uo(e){return e.quality_count??Math.max(0,e.eval_count-Gt(e))}function xM(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=xM(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Xe(){for(var e,t,r=0,n="",i=arguments.length;r<i;r++)(e=arguments[r])&&(t=xM(e))&&(n&&(n+=" "),n+=t);return n}var VB=["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 tj(e){if(typeof e!="string")return!1;var t=VB;return t.includes(e)}var QB=["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"],XB=new Set(QB);function bM(e){return typeof e!="string"?!1:XB.has(e)}function jM(e){return typeof e=="string"&&e.startsWith("data-")}function In(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(bM(r)||jM(r))&&(t[r]=e[r]);return t}function dd(e){if(e==null)return null;if(w.isValidElement(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return In(t)}return typeof e=="object"&&!Array.isArray(e)?In(e):null}function Nr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(bM(r)||jM(r)||tj(r))&&(t[r]=e[r]);return t}function ZB(e){return e==null?null:w.isValidElement(e)?Nr(e.props):typeof e=="object"&&!Array.isArray(e)?Nr(e):null}var WB=["children","width","height","viewBox","className","style","title","desc"];function Tx(){return Tx=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},Tx.apply(null,arguments)}function JB(e,t){if(e==null)return{};var r,n,i=e6(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function e6(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 rj=w.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:l,className:o,style:c,title:f,desc:h}=e,p=JB(e,WB),y=l||{width:n,height:i,x:0,y:0},v=Xe("recharts-surface",o);return w.createElement("svg",Tx({},Nr(p),{className:v,width:n,height:i,style:c,viewBox:"".concat(y.x," ").concat(y.y," ").concat(y.width," ").concat(y.height),ref:t}),w.createElement("title",null,f),w.createElement("desc",null,h),r)}),t6=["children","className"];function Cx(){return Cx=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},Cx.apply(null,arguments)}function r6(e,t){if(e==null)return{};var r,n,i=n6(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function n6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var rn=w.forwardRef((e,t)=>{var{children:r,className:n}=e,i=r6(e,t6),l=Xe("recharts-layer",n);return w.createElement("g",Cx({className:l},Nr(i),{ref:t}),r)}),SM=w.createContext(null),a6=()=>w.useContext(SM);function at(e){return function(){return e}}const wM=Math.cos,zh=Math.sin,Bn=Math.sqrt,Bh=Math.PI,Km=2*Bh,Mx=Math.PI,Rx=2*Mx,Ps=1e-6,i6=Rx-Ps;function NM(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function s6(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return NM;const r=10**t;return function(n){this._+=n[0];for(let i=1,l=n.length;i<l;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class l6{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?NM:s6(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,l,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+l},${this._y1=+o}`}arcTo(t,r,n,i,l){if(t=+t,r=+r,n=+n,i=+i,l=+l,l<0)throw new Error(`negative radius: ${l}`);let o=this._x1,c=this._y1,f=n-t,h=i-r,p=o-t,y=c-r,v=p*p+y*y;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(v>Ps)if(!(Math.abs(y*f-h*p)>Ps)||!l)this._append`L${this._x1=t},${this._y1=r}`;else{let x=n-o,j=i-c,S=f*f+h*h,N=x*x+j*j,O=Math.sqrt(S),P=Math.sqrt(v),E=l*Math.tan((Mx-Math.acos((S+v-N)/(2*O*P)))/2),A=E/P,T=E/O;Math.abs(A-1)>Ps&&this._append`L${t+A*p},${r+A*y}`,this._append`A${l},${l},0,0,${+(y*x>p*j)},${this._x1=t+T*f},${this._y1=r+T*h}`}}arc(t,r,n,i,l,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let c=n*Math.cos(i),f=n*Math.sin(i),h=t+c,p=r+f,y=1^o,v=o?i-l:l-i;this._x1===null?this._append`M${h},${p}`:(Math.abs(this._x1-h)>Ps||Math.abs(this._y1-p)>Ps)&&this._append`L${h},${p}`,n&&(v<0&&(v=v%Rx+Rx),v>i6?this._append`A${n},${n},0,1,${y},${t-c},${r-f}A${n},${n},0,1,${y},${this._x1=h},${this._y1=p}`:v>Ps&&this._append`A${n},${n},0,${+(v>=Mx)},${y},${this._x1=t+n*Math.cos(l)},${this._y1=r+n*Math.sin(l)}`)}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 nj(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 l6(t)}function aj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function OM(e){this._context=e}OM.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 Gm(e){return new OM(e)}function _M(e){return e[0]}function EM(e){return e[1]}function AM(e,t){var r=at(!0),n=null,i=Gm,l=null,o=nj(c);e=typeof e=="function"?e:e===void 0?_M:at(e),t=typeof t=="function"?t:t===void 0?EM:at(t);function c(f){var h,p=(f=aj(f)).length,y,v=!1,x;for(n==null&&(l=i(x=o())),h=0;h<=p;++h)!(h<p&&r(y=f[h],h,f))===v&&((v=!v)?l.lineStart():l.lineEnd()),v&&l.point(+e(y,h,f),+t(y,h,f));if(x)return l=null,x+""||null}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:at(+f),c):e},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:at(+f),c):t},c.defined=function(f){return arguments.length?(r=typeof f=="function"?f:at(!!f),c):r},c.curve=function(f){return arguments.length?(i=f,n!=null&&(l=i(n)),c):i},c.context=function(f){return arguments.length?(f==null?n=l=null:l=i(n=f),c):n},c}function th(e,t,r){var n=null,i=at(!0),l=null,o=Gm,c=null,f=nj(h);e=typeof e=="function"?e:e===void 0?_M:at(+e),t=typeof t=="function"?t:at(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?EM:at(+r);function h(y){var v,x,j,S=(y=aj(y)).length,N,O=!1,P,E=new Array(S),A=new Array(S);for(l==null&&(c=o(P=f())),v=0;v<=S;++v){if(!(v<S&&i(N=y[v],v,y))===O)if(O=!O)x=v,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),j=v-1;j>=x;--j)c.point(E[j],A[j]);c.lineEnd(),c.areaEnd()}O&&(E[v]=+e(N,v,y),A[v]=+t(N,v,y),c.point(n?+n(N,v,y):E[v],r?+r(N,v,y):A[v]))}if(P)return c=null,P+""||null}function p(){return AM().defined(i).curve(o).context(l)}return h.x=function(y){return arguments.length?(e=typeof y=="function"?y:at(+y),n=null,h):e},h.x0=function(y){return arguments.length?(e=typeof y=="function"?y:at(+y),h):e},h.x1=function(y){return arguments.length?(n=y==null?null:typeof y=="function"?y:at(+y),h):n},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:at(+y),r=null,h):t},h.y0=function(y){return arguments.length?(t=typeof y=="function"?y:at(+y),h):t},h.y1=function(y){return arguments.length?(r=y==null?null:typeof y=="function"?y:at(+y),h):r},h.lineX0=h.lineY0=function(){return p().x(e).y(t)},h.lineY1=function(){return p().x(e).y(r)},h.lineX1=function(){return p().x(n).y(t)},h.defined=function(y){return arguments.length?(i=typeof y=="function"?y:at(!!y),h):i},h.curve=function(y){return arguments.length?(o=y,l!=null&&(c=o(l)),h):o},h.context=function(y){return arguments.length?(y==null?l=c=null:c=o(l=y),h):l},h}class PM{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 o6(e){return new PM(e,!0)}function u6(e){return new PM(e,!1)}const ij={draw(e,t){const r=Bn(t/Bh);e.moveTo(r,0),e.arc(0,0,r,0,Km)}},c6={draw(e,t){const r=Bn(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},TM=Bn(1/3),d6=TM*2,f6={draw(e,t){const r=Bn(t/d6),n=r*TM;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},h6={draw(e,t){const r=Bn(t),n=-r/2;e.rect(n,n,r,r)}},m6=.8908130915292852,CM=zh(Bh/10)/zh(7*Bh/10),p6=zh(Km/10)*CM,y6=-wM(Km/10)*CM,v6={draw(e,t){const r=Bn(t*m6),n=p6*r,i=y6*r;e.moveTo(0,-r),e.lineTo(n,i);for(let l=1;l<5;++l){const o=Km*l/5,c=wM(o),f=zh(o);e.lineTo(f*r,-c*r),e.lineTo(c*n-f*i,f*n+c*i)}e.closePath()}},Og=Bn(3),g6={draw(e,t){const r=-Bn(t/(Og*3));e.moveTo(0,r*2),e.lineTo(-Og*r,-r),e.lineTo(Og*r,-r),e.closePath()}},yn=-.5,vn=Bn(3)/2,Dx=1/Bn(12),x6=(Dx/2+1)*3,b6={draw(e,t){const r=Bn(t/x6),n=r/2,i=r*Dx,l=n,o=r*Dx+r,c=-l,f=o;e.moveTo(n,i),e.lineTo(l,o),e.lineTo(c,f),e.lineTo(yn*n-vn*i,vn*n+yn*i),e.lineTo(yn*l-vn*o,vn*l+yn*o),e.lineTo(yn*c-vn*f,vn*c+yn*f),e.lineTo(yn*n+vn*i,yn*i-vn*n),e.lineTo(yn*l+vn*o,yn*o-vn*l),e.lineTo(yn*c+vn*f,yn*f-vn*c),e.closePath()}};function j6(e,t){let r=null,n=nj(i);e=typeof e=="function"?e:at(e||ij),t=typeof t=="function"?t:at(t===void 0?64:+t);function i(){let l;if(r||(r=l=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),l)return r=null,l+""||null}return i.type=function(l){return arguments.length?(e=typeof l=="function"?l:at(l),i):e},i.size=function(l){return arguments.length?(t=typeof l=="function"?l:at(+l),i):t},i.context=function(l){return arguments.length?(r=l??null,i):r},i}function Uh(){}function qh(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 MM(e){this._context=e}MM.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:qh(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:qh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function S6(e){return new MM(e)}function RM(e){this._context=e}RM.prototype={areaStart:Uh,areaEnd:Uh,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:qh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function w6(e){return new RM(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:qh(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function N6(e){return new DM(e)}function kM(e){this._context=e}kM.prototype={areaStart:Uh,areaEnd:Uh,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 O6(e){return new kM(e)}function H_(e){return e<0?-1:1}function F_(e,t,r){var n=e._x1-e._x0,i=t-e._x1,l=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),c=(l*i+o*n)/(n+i);return(H_(l)+H_(o))*Math.min(Math.abs(l),Math.abs(o),.5*Math.abs(c))||0}function K_(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function _g(e,t,r){var n=e._x0,i=e._y0,l=e._x1,o=e._y1,c=(l-n)/3;e._context.bezierCurveTo(n+c,i+c*t,l-c,o-c*r,l,o)}function Hh(e){this._context=e}Hh.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:_g(this,this._t0,K_(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,_g(this,K_(this,r=F_(this,e,t)),r);break;default:_g(this,this._t0,r=F_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function IM(e){this._context=new LM(e)}(IM.prototype=Object.create(Hh.prototype)).point=function(e,t){Hh.prototype.point.call(this,t,e)};function LM(e){this._context=e}LM.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,l){this._context.bezierCurveTo(t,e,n,r,l,i)}};function _6(e){return new Hh(e)}function E6(e){return new IM(e)}function $M(e){this._context=e}$M.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=G_(e),i=G_(t),l=0,o=1;o<r;++l,++o)this._context.bezierCurveTo(n[0][l],i[0][l],n[1][l],i[1][l],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function G_(e){var t,r=e.length-1,n,i=new Array(r),l=new Array(r),o=new Array(r);for(i[0]=0,l[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,l[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,l[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/l[t-1],l[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/l[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/l[t];for(l[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)l[t]=2*e[t+1]-i[t+1];return[i,l]}function A6(e){return new $M(e)}function Ym(e,t){this._context=e,this._t=t}Ym.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 P6(e){return new Ym(e,.5)}function T6(e){return new Ym(e,0)}function C6(e){return new Ym(e,1)}function rl(e,t){if((o=e.length)>1)for(var r=1,n,i,l=e[t[0]],o,c=l.length;r<o;++r)for(i=l,l=e[t[r]],n=0;n<c;++n)l[n][1]+=l[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function kx(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function M6(e,t){return e[t]}function R6(e){const t=[];return t.key=e,t}function D6(){var e=at([]),t=kx,r=rl,n=M6;function i(l){var o=Array.from(e.apply(this,arguments),R6),c,f=o.length,h=-1,p;for(const y of l)for(c=0,++h;c<f;++c)(o[c][h]=[0,+n(y,o[c].key,h,l)]).data=y;for(c=0,p=aj(t(o));c<f;++c)o[p[c]].index=c;return r(o,p),o}return i.keys=function(l){return arguments.length?(e=typeof l=="function"?l:at(Array.from(l)),i):e},i.value=function(l){return arguments.length?(n=typeof l=="function"?l:at(+l),i):n},i.order=function(l){return arguments.length?(t=l==null?kx:typeof l=="function"?l:at(Array.from(l)),i):t},i.offset=function(l){return arguments.length?(r=l??rl,i):r},i}function k6(e,t){if((n=e.length)>0){for(var r,n,i=0,l=e[0].length,o;i<l;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}rl(e,t)}}function I6(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,l=n.length;r<l;++r){for(var o=0,c=0;o<i;++o)c+=e[o][r][1]||0;n[r][1]+=n[r][0]=-c/2}rl(e,t)}}function L6(e,t){if(!(!((o=e.length)>0)||!((l=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,l,o;n<l;++n){for(var c=0,f=0,h=0;c<o;++c){for(var p=e[t[c]],y=p[n][1]||0,v=p[n-1][1]||0,x=(y-v)/2,j=0;j<c;++j){var S=e[t[j]],N=S[n][1]||0,O=S[n-1][1]||0;x+=N-O}f+=y,h+=x*y}i[n-1][1]+=i[n-1][0]=r,f&&(r-=h/f)}i[n-1][1]+=i[n-1][0]=r,rl(e,t)}}var Eg={},Ag={},Y_;function $6(){return Y_||(Y_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(Ag)),Ag}var Pg={},V_;function zM(){return V_||(V_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(Pg)),Pg}var Tg={},Q_;function sj(){return Q_||(Q_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var n;return typeof r=="string"||typeof r=="symbol"?r:Object.is((n=r==null?void 0:r.valueOf)==null?void 0:n.call(r),-0)?"-0":String(r)}e.toKey=t})(Tg)),Tg}var Cg={},Mg={},X_;function z6(){return X_||(X_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(t).join(",");const n=String(r);return n==="0"&&Object.is(Number(r),-0)?"-0":n}e.toString=t})(Mg)),Mg}var Z_;function lj(){return Z_||(Z_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=z6(),r=sj();function n(i){if(Array.isArray(i))return i.map(r.toKey);if(typeof i=="symbol")return[i];i=t.toString(i);const l=[],o=i.length;if(o===0)return l;let c=0,f="",h="",p=!1;for(i.charCodeAt(0)===46&&(l.push(""),c++);c<o;){const y=i[c];h?y==="\\"&&c+1<o?(c++,f+=i[c]):y===h?h="":f+=y:p?y==='"'||y==="'"?h=y:y==="]"?(p=!1,l.push(f),f=""):f+=y:y==="["?(p=!0,f&&(l.push(f),f="")):y==="."?f&&(l.push(f),f=""):f+=y,c++}return f&&l.push(f),l}e.toPath=n})(Cg)),Cg}var W_;function oj(){return W_||(W_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$6(),r=zM(),n=sj(),i=lj();function l(c,f,h){if(c==null)return h;switch(typeof f){case"string":{if(t.isUnsafeProperty(f))return h;const p=c[f];return p===void 0?r.isDeepKey(f)?l(c,i.toPath(f),h):h:p}case"number":case"symbol":{typeof f=="number"&&(f=n.toKey(f));const p=c[f];return p===void 0?h:p}default:{if(Array.isArray(f))return o(c,f,h);if(Object.is(f==null?void 0:f.valueOf(),-0)?f="-0":f=String(f),t.isUnsafeProperty(f))return h;const p=c[f];return p===void 0?h:p}}}function o(c,f,h){if(f.length===0)return h;let p=c;for(let y=0;y<f.length;y++){if(p==null||t.isUnsafeProperty(f[y]))return h;p=p[f[y]]}return p===void 0?h:p}e.get=l})(Eg)),Eg}var Rg,J_;function B6(){return J_||(J_=1,Rg=oj().get),Rg}var U6=B6();const qo=ns(U6);var q6=4;function Vi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:q6,r=10**t,n=Math.round(e*r)/r;return Object.is(n,-0)?0:n}function bt(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e.reduce((i,l,o)=>{var c=r[o-1];return typeof c=="string"?i+c+l:c!==void 0?i+Vi(c)+l:i+l},"")}var zr=e=>e===0?0:e>0?1:-1,ia=e=>typeof e=="number"&&e!=+e,nl=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,pe=e=>(typeof e=="number"||e instanceof Number)&&!ia(e),sa=e=>pe(e)||typeof e=="string",H6=0,Bc=e=>{var t=++H6;return"".concat(e||"").concat(t)},Ln=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!pe(t)&&typeof t!="string")return n;var l;if(nl(t)){if(r==null)return n;var o=t.indexOf("%");l=r*parseFloat(t.slice(0,o))/100}else l=+t;return ia(l)&&(l=n),i&&r!=null&&l>r&&(l=r),l},BM=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[String(e[n])])r[String(e[n])]=!0;else return!0;return!1};function jt(e,t,r){return pe(e)&&pe(t)?Vi(e+r*(t-e)):t}function UM(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):qo(n,t))===r)}var mt=e=>e===null||typeof e>"u",fd=e=>mt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function Br(e){return e!=null}function hl(){}var F6=["type","size","sizeType"];function Ix(){return Ix=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},Ix.apply(null,arguments)}function eE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tE(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?eE(Object(r),!0).forEach(function(n){K6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function K6(e,t,r){return(t=G6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G6(e){var t=Y6(e,"string");return typeof t=="symbol"?t:t+""}function Y6(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 V6(e,t){if(e==null)return{};var r,n,i=Q6(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Q6(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 qM={symbolCircle:ij,symbolCross:c6,symbolDiamond:f6,symbolSquare:h6,symbolStar:v6,symbolTriangle:g6,symbolWye:b6},X6=Math.PI/180,Z6=e=>{var t="symbol".concat(fd(e));return qM[t]||ij},W6=(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*X6;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}},J6=(e,t)=>{qM["symbol".concat(fd(e))]=t},uj=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=V6(e,F6),l=tE(tE({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var c=()=>{var v=Z6(o),x=j6().type(v).size(W6(r,n,o)),j=x();if(j!==null)return j},{className:f,cx:h,cy:p}=l,y=Nr(l);return pe(h)&&pe(p)&&pe(r)?w.createElement("path",Ix({},y,{className:Xe("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};uj.registerSymbol=J6;var HM=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,cj=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(w.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{tj(i)&&typeof r[i]=="function"&&(n[i]=(l=>r[i](r,l)))}),n},eU=(e,t,r)=>n=>(e(t,r,n),null),Vm=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var l=e[i];tj(i)&&typeof l=="function"&&(n||(n={}),n[i]=eU(l,t,r))}),n};function rE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rE(Object(r),!0).forEach(function(n){rU(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rE(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rU(e,t,r){return(t=nU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nU(e){var t=aU(e,"string");return typeof t=="symbol"?t:t+""}function aU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lr(e,t){var r=tU({},e),n=t,i=Object.keys(t),l=i.reduce((o,c)=>(o[c]===void 0&&n[c]!==void 0&&(o[c]=n[c]),o),r);return l}function Fh(){return Fh=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},Fh.apply(null,arguments)}function nE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function FM(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){iU(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 iU(e,t,r){return(t=sU(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function sU(e){var t=lU(e,"string");return typeof t=="symbol"?t:t+""}function lU(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xn=32,oU={align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle",labelStyle:{}};function uU(e){if(typeof e=="object"&&e!==null&&"strokeDasharray"in e)return String(e.strokeDasharray)}function cU(e){var{data:t,iconType:r,inactiveColor:n}=e,i=xn/2,l=xn/6,o=xn/3,c=t.inactive?n:t.color,f=r??t.type;if(f==="none")return null;if(f==="plainline")return w.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:uU(t.payload),x1:0,y1:i,x2:xn,y2:i,className:"recharts-legend-icon"});if(f==="line")return w.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(o,`
|
|
67
|
-
A`).concat(l,",").concat(l,",0,1,1,").concat(2*o,",").concat(i,`
|
|
68
|
-
H`).concat(xn,"M").concat(2*o,",").concat(i,`
|
|
69
|
-
A`).concat(l,",").concat(l,",0,1,1,").concat(o,",").concat(i),className:"recharts-legend-icon"});if(f==="rect")return w.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(xn/8,"h").concat(xn,"v").concat(xn*3/4,"h").concat(-xn,"z"),className:"recharts-legend-icon"});if(w.isValidElement(t.legendIcon)){var h=FM({},t);return delete h.legendIcon,w.cloneElement(t.legendIcon,h)}return w.createElement(uj,{fill:c,cx:i,cy:i,size:xn,sizeType:"diameter",type:f})}function dU(e){var{payload:t,iconSize:r,layout:n,formatter:i,inactiveColor:l,iconType:o,labelStyle:c}=e,f={x:0,y:0,width:xn,height:xn},h={display:n==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((y,v)=>{var x=y.formatter||i,j=Xe({"recharts-legend-item":!0,["legend-item-".concat(v)]:!0,inactive:y.inactive});if(y.type==="none")return null;var S=typeof c=="object"?FM({},c):{};S.color=y.inactive?l:S.color||y.color;var N=x?x(y.value,y,v):y.value;return w.createElement("li",Fh({className:j,style:h,key:"legend-item-".concat(v)},Vm(e,y,v)),w.createElement(rj,{width:r,height:r,viewBox:f,style:p,"aria-label":"".concat(y.value," legend icon")},w.createElement(cU,{data:y,iconType:o,inactiveColor:l})),w.createElement("span",{className:"recharts-legend-item-text",style:S},N))})}var fU=e=>{var t=lr(e,oU),{payload:r,layout:n,align:i}=t;if(!r||!r.length)return null;var l={padding:0,margin:0,textAlign:n==="horizontal"?i:"left"};return w.createElement("ul",{className:"recharts-default-legend",style:l},w.createElement(dU,Fh({},t,{payload:r})))},Dg={},kg={},aE;function hU(){return aE||(aE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let l=0;l<r.length;l++){const o=r[l],c=n(o,l,r);i.has(c)||i.set(c,o)}return Array.from(i.values())}e.uniqBy=t})(kg)),kg}var Ig={},iE;function mU(){return iE||(iE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return function(...i){return r.apply(this,i.slice(0,n))}}e.ary=t})(Ig)),Ig}var Lg={},sE;function KM(){return sE||(sE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Lg)),Lg}var $g={},zg={},Bg={},lE;function pU(){return lE||(lE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Bg)),Bg}var oE;function GM(){return oE||(oE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pU();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(zg)),zg}var Ug={},uE;function yU(){return uE||(uE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Ug)),Ug}var cE;function vU(){return cE||(cE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GM(),r=yU();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})($g)),$g}var qg={},Hg={},dE;function gU(){return dE||(dE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=oj();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Hg)),Hg}var Fg={},Kg={},Gg={},Yg={},fE;function YM(){return fE||(fE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Yg)),Yg}var Vg={},hE;function VM(){return hE||(hE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(Vg)),Vg}var Qg={},mE;function QM(){return mE||(mE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.isEqualsSameValueZero=t})(Qg)),Qg}var pE;function xU(){return pE||(pE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YM(),r=VM(),n=QM();function i(p,y,v){return typeof v!="function"?i(p,y,()=>{}):l(p,y,function x(j,S,N,O,P,E){const A=v(j,S,N,O,P,E);return A!==void 0?!!A:l(j,S,x,E)},new Map)}function l(p,y,v,x){if(y===p)return!0;switch(typeof y){case"object":return o(p,y,v,x);case"function":return Object.keys(y).length>0?l(p,{...y},v,x):n.isEqualsSameValueZero(p,y);default:return t.isObject(p)?typeof y=="string"?y==="":!0:n.isEqualsSameValueZero(p,y)}}function o(p,y,v,x){if(y==null)return!0;if(Array.isArray(y))return f(p,y,v,x);if(y instanceof Map)return c(p,y,v,x);if(y instanceof Set)return h(p,y,v,x);const j=Object.keys(y);if(p==null||r.isPrimitive(p))return j.length===0;if(j.length===0)return!0;if(x!=null&&x.has(y))return x.get(y)===p;x==null||x.set(y,p);try{for(let S=0;S<j.length;S++){const N=j[S];if(!r.isPrimitive(p)&&!(N in p)||y[N]===void 0&&p[N]!==void 0||y[N]===null&&p[N]!==null||!v(p[N],y[N],N,p,y,x))return!1}return!0}finally{x==null||x.delete(y)}}function c(p,y,v,x){if(y.size===0)return!0;if(!(p instanceof Map))return!1;for(const[j,S]of y.entries()){const N=p.get(j);if(v(N,S,j,p,y,x)===!1)return!1}return!0}function f(p,y,v,x){if(y.length===0)return!0;if(!Array.isArray(p))return!1;const j=new Set;for(let S=0;S<y.length;S++){const N=y[S];let O=!1;for(let P=0;P<p.length;P++){if(j.has(P))continue;const E=p[P];let A=!1;if(v(E,N,S,p,y,x)&&(A=!0),A){j.add(P),O=!0;break}}if(!O)return!1}return!0}function h(p,y,v,x){return y.size===0?!0:p instanceof Set?f([...p],[...y],v,x):!1}e.isMatchWith=i,e.isSetMatch=h})(Gg)),Gg}var yE;function XM(){return yE||(yE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=xU();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(Kg)),Kg}var Xg={},Zg={},Wg={},vE;function bU(){return vE||(vE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(Wg)),Wg}var Jg={},gE;function dj(){return gE||(gE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Jg)),Jg}var e0={},xE;function ZM(){return xE||(xE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",l="[object Arguments]",o="[object Symbol]",c="[object Date]",f="[object Map]",h="[object Set]",p="[object Array]",y="[object Function]",v="[object ArrayBuffer]",x="[object Object]",j="[object Error]",S="[object DataView]",N="[object Uint8Array]",O="[object Uint8ClampedArray]",P="[object Uint16Array]",E="[object Uint32Array]",A="[object BigUint64Array]",T="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",I="[object BigInt64Array]",$="[object Float32Array]",D="[object Float64Array]";e.argumentsTag=l,e.arrayBufferTag=v,e.arrayTag=p,e.bigInt64ArrayTag=I,e.bigUint64ArrayTag=A,e.booleanTag=i,e.dataViewTag=S,e.dateTag=c,e.errorTag=j,e.float32ArrayTag=$,e.float64ArrayTag=D,e.functionTag=y,e.int16ArrayTag=M,e.int32ArrayTag=R,e.int8ArrayTag=T,e.mapTag=f,e.numberTag=n,e.objectTag=x,e.regexpTag=t,e.setTag=h,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=P,e.uint32ArrayTag=E,e.uint8ArrayTag=N,e.uint8ClampedArrayTag=O})(e0)),e0}var t0={},bE;function jU(){return bE||(bE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(t0)),t0}var jE;function WM(){return jE||(jE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bU(),r=dj(),n=ZM(),i=VM(),l=jU();function o(p,y){return c(p,void 0,p,new Map,y)}function c(p,y,v,x=new Map,j=void 0){const S=j==null?void 0:j(p,y,v,x);if(S!==void 0)return S;if(i.isPrimitive(p))return p;if(x.has(p))return x.get(p);if(Array.isArray(p)){const N=new Array(p.length);x.set(p,N);for(let O=0;O<p.length;O++)N[O]=c(p[O],O,v,x,j);return Object.hasOwn(p,"index")&&(N.index=p.index),Object.hasOwn(p,"input")&&(N.input=p.input),N}if(p instanceof Date)return new Date(p.getTime());if(p instanceof RegExp){const N=new RegExp(p.source,p.flags);return N.lastIndex=p.lastIndex,N}if(p instanceof Map){const N=new Map;x.set(p,N);for(const[O,P]of p)N.set(O,c(P,O,v,x,j));return N}if(p instanceof Set){const N=new Set;x.set(p,N);for(const O of p)N.add(c(O,void 0,v,x,j));return N}if(typeof Buffer<"u"&&Buffer.isBuffer(p))return p.subarray();if(l.isTypedArray(p)){const N=new(Object.getPrototypeOf(p)).constructor(p.length);x.set(p,N);for(let O=0;O<p.length;O++)N[O]=c(p[O],O,v,x,j);return N}if(p instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&p instanceof SharedArrayBuffer)return p.slice(0);if(p instanceof DataView){const N=new DataView(p.buffer.slice(0),p.byteOffset,p.byteLength);return x.set(p,N),f(N,p,v,x,j),N}if(typeof File<"u"&&p instanceof File){const N=new File([p],p.name,{type:p.type});return x.set(p,N),f(N,p,v,x,j),N}if(typeof Blob<"u"&&p instanceof Blob){const N=new Blob([p],{type:p.type});return x.set(p,N),f(N,p,v,x,j),N}if(p instanceof Error){const N=structuredClone(p);return x.set(p,N),N.message=p.message,N.name=p.name,N.stack=p.stack,N.cause=p.cause,N.constructor=p.constructor,f(N,p,v,x,j),N}if(p instanceof Boolean){const N=new Boolean(p.valueOf());return x.set(p,N),f(N,p,v,x,j),N}if(p instanceof Number){const N=new Number(p.valueOf());return x.set(p,N),f(N,p,v,x,j),N}if(p instanceof String){const N=new String(p.valueOf());return x.set(p,N),f(N,p,v,x,j),N}if(typeof p=="object"&&h(p)){const N=Object.create(Object.getPrototypeOf(p));return x.set(p,N),f(N,p,v,x,j),N}return p}function f(p,y,v=p,x,j){const S=[...Object.keys(y),...t.getSymbols(y)];for(let N=0;N<S.length;N++){const O=S[N],P=Object.getOwnPropertyDescriptor(p,O);(P==null||P.writable)&&(p[O]=c(y[O],O,v,x,j))}}function h(p){switch(r.getTag(p)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=c,e.copyProperties=f})(Zg)),Zg}var SE;function SU(){return SE||(SE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WM();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Xg)),Xg}var wE;function wU(){return wE||(wE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XM(),r=SU();function n(i){return i=r.cloneDeep(i),l=>t.isMatch(l,i)}e.matches=n})(Fg)),Fg}var r0={},n0={},a0={},NE;function NU(){return NE||(NE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=WM(),r=dj(),n=ZM();function i(l,o){return t.cloneDeepWith(l,(c,f,h,p)=>{const y=o==null?void 0:o(c,f,h,p);if(y!==void 0)return y;if(typeof l=="object"){if(r.getTag(l)===n.objectTag&&typeof l.constructor!="function"){const v={};return p.set(l,v),t.copyProperties(v,l,h,p),v}switch(Object.prototype.toString.call(l)){case n.numberTag:case n.stringTag:case n.booleanTag:{const v=new l.constructor(l==null?void 0:l.valueOf());return t.copyProperties(v,l),v}case n.argumentsTag:{const v={};return t.copyProperties(v,l),v.length=l.length,v[Symbol.iterator]=l[Symbol.iterator],v}default:return}}})}e.cloneDeepWith=i})(a0)),a0}var OE;function OU(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=NU();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(n0)),n0}var i0={},s0={},_E;function JM(){return _E||(_E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(s0)),s0}var l0={},EE;function _U(){return EE||(EE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dj();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(l0)),l0}var AE;function EU(){return AE||(AE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=zM(),r=JM(),n=_U(),i=lj();function l(o,c){let f;if(Array.isArray(c)?f=c:typeof c=="string"&&t.isDeepKey(c)&&(o==null?void 0:o[c])==null?f=i.toPath(c):f=[c],f.length===0)return!1;let h=o;for(let p=0;p<f.length;p++){const y=f[p];if((h==null||!Object.hasOwn(h,y))&&!((Array.isArray(h)||n.isArguments(h))&&r.isIndex(y)&&y<h.length))return!1;h=h[y]}return!0}e.has=l})(i0)),i0}var PE;function AU(){return PE||(PE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=XM(),r=sj(),n=OU(),i=oj(),l=EU();function o(c,f){switch(typeof c){case"object":{Object.is(c==null?void 0:c.valueOf(),-0)&&(c="-0");break}case"number":{c=r.toKey(c);break}}return f=n.cloneDeep(f),function(h){const p=i.get(h,c);return p===void 0?l.has(h,c):f===void 0?p===void 0:t.isMatch(p,f)}}e.matchesProperty=o})(r0)),r0}var TE;function PU(){return TE||(TE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=KM(),r=gU(),n=wU(),i=AU();function l(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=l})(qg)),qg}var CE;function TU(){return CE||(CE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=hU(),r=mU(),n=KM(),i=vU(),l=PU();function o(c,f=n.identity){return i.isArrayLikeObject(c)?t.uniqBy(Array.from(c),r.ary(l.iteratee(f),1)):[]}e.uniqBy=o})(Dg)),Dg}var o0,ME;function CU(){return ME||(ME=1,o0=TU().uniqBy),o0}var MU=CU();const RE=ns(MU);function eR(e,t,r){return t===!0?RE(e,r):typeof t=="function"?RE(e,t):e}var fj=w.createContext(null),RU=e=>e,ct=()=>{var e=w.useContext(fj);return e?e.store.dispatch:RU},Oh=()=>{},DU=()=>Oh,kU=(e,t)=>e===t;function ge(e){var t=w.useContext(fj),r=w.useMemo(()=>t?n=>{if(n!=null)return e(n)}:Oh,[t,e]);return q2.useSyncExternalStoreWithSelector(t?t.subscription.addNestedSub:DU,t?t.store.getState:Oh,t?t.store.getState:Oh,r,kU)}function IU(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function LU(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function $U(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var DE=e=>Array.isArray(e)?e:[e];function zU(e){const t=Array.isArray(e[0])?e[0]:e;return $U(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function BU(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var UU=class{constructor(e){this.value=e}deref(){return this.value}},qU=typeof WeakRef<"u"?WeakRef:UU,HU=0,kE=1;function rh(){return{s:HU,v:void 0,o:null,p:null}}function tR(e,t={}){let r=rh();const{resultEqualityCheck:n}=t;let i,l=0;function o(){var y;let c=r;const{length:f}=arguments;for(let v=0,x=f;v<x;v++){const j=arguments[v];if(typeof j=="function"||typeof j=="object"&&j!==null){let S=c.o;S===null&&(c.o=S=new WeakMap);const N=S.get(j);N===void 0?(c=rh(),S.set(j,c)):c=N}else{let S=c.p;S===null&&(c.p=S=new Map);const N=S.get(j);N===void 0?(c=rh(),S.set(j,c)):c=N}}const h=c;let p;if(c.s===kE)p=c.v;else if(p=e.apply(null,arguments),l++,n){const v=((y=i==null?void 0:i.deref)==null?void 0:y.call(i))??i;v!=null&&n(v,p)&&(p=v,l!==0&&l--),i=typeof p=="object"&&p!==null||typeof p=="function"?new qU(p):p}return h.s=kE,h.v=p,p}return o.clearCache=()=>{r=rh(),o.resetResultsCount()},o.resultsCount=()=>l,o.resetResultsCount=()=>{l=0},o}function FU(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let l=0,o=0,c,f={},h=i.pop();typeof h=="object"&&(f=h,h=i.pop()),IU(h,`createSelector expects an output function after the inputs, but received: [${typeof h}]`);const p={...r,...f},{memoize:y,memoizeOptions:v=[],argsMemoize:x=tR,argsMemoizeOptions:j=[]}=p,S=DE(v),N=DE(j),O=zU(i),P=y(function(){return l++,h.apply(null,arguments)},...S),E=x(function(){o++;const T=BU(O,arguments);return c=P.apply(null,T),c},...N);return Object.assign(E,{resultFunc:h,memoizedResultFunc:P,dependencies:O,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>c,recomputations:()=>l,resetRecomputations:()=>{l=0},memoize:y,argsMemoize:x})};return Object.assign(n,{withTypes:()=>n}),n}var V=FU(tR),KU=Object.assign((e,t=V)=>{LU(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(l=>e[l]);return t(n,(...l)=>l.reduce((o,c,f)=>(o[r[f]]=c,o),{}))},{withTypes:()=>KU}),u0={},c0={},d0={},IE;function GU(){return IE||(IE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,l)=>{if(n!==i){const o=t(n),c=t(i);if(o===c&&o===0){if(n<i)return l==="desc"?1:-1;if(n>i)return l==="desc"?-1:1}return l==="desc"?c-o:o-c}return 0};e.compareValues=r})(d0)),d0}var f0={},h0={},LE;function rR(){return LE||(LE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(h0)),h0}var $E;function YU(){return $E||($E=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rR(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(l,o){return Array.isArray(l)?!1:typeof l=="number"||typeof l=="boolean"||l==null||t.isSymbol(l)?!0:typeof l=="string"&&(n.test(l)||!r.test(l))||o!=null&&Object.hasOwn(o,l)}e.isKey=i})(f0)),f0}var zE;function VU(){return zE||(zE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=GU(),r=YU(),n=lj();function i(l,o,c,f){if(l==null)return[];c=f?void 0:c,Array.isArray(l)||(l=Object.values(l)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(c)||(c=c==null?[]:[c]),c=c.map(x=>String(x));const h=(x,j)=>{let S=x;for(let N=0;N<j.length&&S!=null;++N)S=S[j[N]];return S},p=(x,j)=>j==null||x==null?j:typeof x=="object"&&"key"in x?Object.hasOwn(j,x.key)?j[x.key]:h(j,x.path):typeof x=="function"?x(j):Array.isArray(x)?h(j,x):typeof j=="object"?j[x]:j,y=o.map(x=>(Array.isArray(x)&&x.length===1&&(x=x[0]),x==null||typeof x=="function"||Array.isArray(x)||r.isKey(x)?x:{key:x,path:n.toPath(x)}));return l.map(x=>({original:x,criteria:y.map(j=>p(j,x))})).slice().sort((x,j)=>{for(let S=0;S<y.length;S++){const N=t.compareValues(x.criteria[S],j.criteria[S],c[S]);if(N!==0)return N}return 0}).map(x=>x.original)}e.orderBy=i})(c0)),c0}var m0={},BE;function QU(){return BE||(BE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],l=Math.floor(n),o=(c,f)=>{for(let h=0;h<c.length;h++){const p=c[h];Array.isArray(p)&&f<l?o(p,f+1):i.push(p)}};return o(r,0),i}e.flatten=t})(m0)),m0}var p0={},UE;function nR(){return UE||(UE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JM(),r=GM(),n=YM(),i=QM();function l(o,c,f){return n.isObject(f)&&(typeof c=="number"&&r.isArrayLike(f)&&t.isIndex(c)&&c<f.length||typeof c=="string"&&c in f)?i.isEqualsSameValueZero(f[c],o):!1}e.isIterateeCall=l})(p0)),p0}var qE;function XU(){return qE||(qE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=VU(),r=QU(),n=nR();function i(l,...o){const c=o.length;return c>1&&n.isIterateeCall(l,o[0],o[1])?o=[]:c>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(l,r.flatten(o),["asc"])}e.sortBy=i})(u0)),u0}var y0,HE;function ZU(){return HE||(HE=1,y0=XU().sortBy),y0}var WU=ZU();const Qm=ns(WU);var aR=e=>e.legend.settings,JU=e=>e.legend.size,e9=e=>e.legend.payload,t9=V([e9,aR],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?Qm(n,r):n});function r9(){return ge(t9)}var nh=1;function iR(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=w.useState({height:0,left:0,top:0,width:0}),n=w.useCallback(i=>{if(i!=null){var l=i.getBoundingClientRect(),o={height:l.height,left:l.left,top:l.top,width:l.width};(Math.abs(o.height-t.height)>nh||Math.abs(o.left-t.left)>nh||Math.abs(o.top-t.top)>nh||Math.abs(o.width-t.width)>nh)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function nr(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var n9=typeof Symbol=="function"&&Symbol.observable||"@@observable",FE=n9,v0=()=>Math.random().toString(36).substring(7).split("").join("."),a9={INIT:`@@redux/INIT${v0()}`,REPLACE:`@@redux/REPLACE${v0()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${v0()}`},Kh=a9;function hj(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 sR(e,t,r){if(typeof e!="function")throw new Error(nr(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(nr(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(nr(1));return r(sR)(e,t)}let n=e,i=t,l=new Map,o=l,c=0,f=!1;function h(){o===l&&(o=new Map,l.forEach((N,O)=>{o.set(O,N)}))}function p(){if(f)throw new Error(nr(3));return i}function y(N){if(typeof N!="function")throw new Error(nr(4));if(f)throw new Error(nr(5));let O=!0;h();const P=c++;return o.set(P,N),function(){if(O){if(f)throw new Error(nr(6));O=!1,h(),o.delete(P),l=null}}}function v(N){if(!hj(N))throw new Error(nr(7));if(typeof N.type>"u")throw new Error(nr(8));if(typeof N.type!="string")throw new Error(nr(17));if(f)throw new Error(nr(9));try{f=!0,i=n(i,N)}finally{f=!1}return(l=o).forEach(P=>{P()}),N}function x(N){if(typeof N!="function")throw new Error(nr(10));n=N,v({type:Kh.REPLACE})}function j(){const N=y;return{subscribe(O){if(typeof O!="object"||O===null)throw new Error(nr(11));function P(){const A=O;A.next&&A.next(p())}return P(),{unsubscribe:N(P)}},[FE](){return this}}}return v({type:Kh.INIT}),{dispatch:v,subscribe:y,getState:p,replaceReducer:x,[FE]:j}}function i9(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:Kh.INIT})>"u")throw new Error(nr(12));if(typeof r(void 0,{type:Kh.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(nr(13))})}function lR(e){const t=Object.keys(e),r={};for(let l=0;l<t.length;l++){const o=t[l];typeof e[o]=="function"&&(r[o]=e[o])}const n=Object.keys(r);let i;try{i9(r)}catch(l){i=l}return function(o={},c){if(i)throw i;let f=!1;const h={};for(let p=0;p<n.length;p++){const y=n[p],v=r[y],x=o[y],j=v(x,c);if(typeof j>"u")throw c&&c.type,new Error(nr(14));h[y]=j,f=f||j!==x}return f=f||n.length!==Object.keys(o).length,f?h:o}}function Gh(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function s9(...e){return t=>(r,n)=>{const i=t(r,n);let l=()=>{throw new Error(nr(15))};const o={getState:i.getState,dispatch:(f,...h)=>l(f,...h)},c=e.map(f=>f(o));return l=Gh(...c)(i.dispatch),{...i,dispatch:l}}}function oR(e){return hj(e)&&"type"in e&&typeof e.type=="string"}var uR=Symbol.for("immer-nothing"),KE=Symbol.for("immer-draftable"),Or=Symbol.for("immer-state");function Rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Jr=Object,Ho=Jr.getPrototypeOf,Yh="constructor",Xm="prototype",Lx="configurable",Vh="enumerable",_h="writable",Uc="value",Ya=e=>!!e&&!!e[Or];function $n(e){var t;return e?cR(e)||Wm(e)||!!e[KE]||!!((t=e[Yh])!=null&&t[KE])||Jm(e)||ep(e):!1}var l9=Jr[Xm][Yh].toString(),GE=new WeakMap;function cR(e){if(!e||!mj(e))return!1;const t=Ho(e);if(t===null||t===Jr[Xm])return!0;const r=Jr.hasOwnProperty.call(t,Yh)&&t[Yh];if(r===Object)return!0;if(!go(r))return!1;let n=GE.get(r);return n===void 0&&(n=Function.toString.call(r),GE.set(r,n)),n===l9}function Zm(e,t,r=!0){hd(e)===0?(r?Reflect.ownKeys(e):Jr.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((n,i)=>t(i,n,e))}function hd(e){const t=e[Or];return t?t.type_:Wm(e)?1:Jm(e)?2:ep(e)?3:0}var YE=(e,t,r=hd(e))=>r===2?e.has(t):Jr[Xm].hasOwnProperty.call(e,t),$x=(e,t,r=hd(e))=>r===2?e.get(t):e[t],Qh=(e,t,r,n=hd(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function o9(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Wm=Array.isArray,Jm=e=>e instanceof Map,ep=e=>e instanceof Set,mj=e=>typeof e=="object",go=e=>typeof e=="function",g0=e=>typeof e=="boolean";function u9(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var Ma=e=>e.copy_||e.base_,pj=e=>e.modified_?e.copy_:e.base_;function zx(e,t){if(Jm(e))return new Map(e);if(ep(e))return new Set(e);if(Wm(e))return Array[Xm].slice.call(e);const r=cR(e);if(t===!0||t==="class_only"&&!r){const n=Jr.getOwnPropertyDescriptors(e);delete n[Or];let i=Reflect.ownKeys(n);for(let l=0;l<i.length;l++){const o=i[l],c=n[o];c[_h]===!1&&(c[_h]=!0,c[Lx]=!0),(c.get||c.set)&&(n[o]={[Lx]:!0,[_h]:!0,[Vh]:c[Vh],[Uc]:e[o]})}return Jr.create(Ho(e),n)}else{const n=Ho(e);if(n!==null&&r)return{...e};const i=Jr.create(n);return Jr.assign(i,e)}}function yj(e,t=!1){return tp(e)||Ya(e)||!$n(e)||(hd(e)>1&&Jr.defineProperties(e,{set:ah,add:ah,clear:ah,delete:ah}),Jr.freeze(e),t&&Zm(e,(r,n)=>{yj(n,!0)},!1)),e}function c9(){Rn(2)}var ah={[Uc]:c9};function tp(e){return e===null||!mj(e)?!0:Jr.isFrozen(e)}var Xh="MapSet",Bx="Patches",VE="ArrayMethods",dR={};function al(e){const t=dR[e];return t||Rn(0,e),t}var QE=e=>!!dR[e],qc,fR=()=>qc,d9=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:QE(Xh)?al(Xh):void 0,arrayMethodsPlugin_:QE(VE)?al(VE):void 0});function XE(e,t){t&&(e.patchPlugin_=al(Bx),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Ux(e){qx(e),e.drafts_.forEach(f9),e.drafts_=null}function qx(e){e===qc&&(qc=e.parent_)}var ZE=e=>qc=d9(qc,e);function f9(e){const t=e[Or];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function WE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];if(e!==void 0&&e!==r){r[Or].modified_&&(Ux(t),Rn(4)),$n(e)&&(e=JE(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(r[Or].base_,e,t)}else e=JE(t,r);return h9(t,e,!0),Ux(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==uR?e:void 0}function JE(e,t){if(tp(t))return t;const r=t[Or];if(!r)return Zh(t,e.handledSet_,e);if(!rp(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);pR(r,e)}return r.copy_}function h9(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&yj(t,r)}function hR(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var rp=(e,t)=>e.scope_===t,m9=[];function mR(e,t,r,n){const i=Ma(e),l=e.type_;if(n!==void 0&&$x(i,n,l)===t){Qh(i,n,r,l);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Zm(i,(f,h)=>{if(Ya(h)){const p=c.get(h)||[];p.push(f),c.set(h,p)}})}const o=e.draftLocations_.get(t)??m9;for(const c of o)Qh(i,c,r,l)}function p9(e,t,r){e.callbacks_.push(function(i){var c;const l=t;if(!l||!rp(l,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(l);const o=pj(l);mR(e,l.draft_??l,o,r),pR(l,i)})}function pR(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 l=i.getPath(e);l&&i.generatePatches_(e,l,t)}hR(e)}}function y9(e,t,r){const{scope_:n}=e;if(Ya(r)){const i=r[Or];rp(i,n)&&i.callbacks_.push(function(){Eh(e);const o=pj(i);mR(e,r,o,t)})}else $n(r)&&e.callbacks_.push(function(){const l=Ma(e);e.type_===3?l.has(r)&&Zh(r,n.handledSet_,n):$x(l,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Zh($x(e.copy_,t,e.type_),n.handledSet_,n)})}function Zh(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||Ya(e)||t.has(e)||!$n(e)||tp(e)||(t.add(e),Zm(e,(n,i)=>{if(Ya(i)){const l=i[Or];if(rp(l,r)){const o=pj(l);Qh(e,n,o,e.type_),hR(l)}}else $n(i)&&Zh(i,t,r)})),e}function v9(e,t){const r=Wm(e),n={type_:r?1:0,scope_:t?t.scope_:fR(),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,l=Wh;r&&(i=[n],l=Hc);const{revoke:o,proxy:c}=Proxy.revocable(i,l);return n.draft_=c,n.revoke_=o,[c,n]}var Wh={get(e,t){if(t===Or)return e;let r=e.scope_.arrayMethodsPlugin_;const n=e.type_===1&&typeof t=="string";if(n&&r!=null&&r.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);const i=Ma(e);if(!YE(i,t,e.type_))return g9(e,i,t);const l=i[t];if(e.finalized_||!$n(l)||n&&e.operationMethod&&(r!=null&&r.isMutatingArrayMethod(e.operationMethod))&&u9(t))return l;if(l===x0(e.base_,t)){Eh(e);const o=e.type_===1?+t:t,c=Fx(e.scope_,l,e,o);return e.copy_[o]=c}return l},has(e,t){return t in Ma(e)},ownKeys(e){return Reflect.ownKeys(Ma(e))},set(e,t,r){const n=yR(Ma(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=x0(Ma(e),t),l=i==null?void 0:i[Or];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(o9(r,i)&&(r!==void 0||YE(e.base_,t,e.type_)))return!0;Eh(e),Hx(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),y9(e,t,r)),!0},deleteProperty(e,t){return Eh(e),x0(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Hx(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ma(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[_h]:!0,[Lx]:e.type_!==1||t!=="length",[Vh]:n[Vh],[Uc]:r[t]}},defineProperty(){Rn(11)},getPrototypeOf(e){return Ho(e.base_)},setPrototypeOf(){Rn(12)}},Hc={};for(let e in Wh){let t=Wh[e];Hc[e]=function(){const r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Hc.deleteProperty=function(e,t){return Hc.set.call(this,e,t,void 0)};Hc.set=function(e,t,r){return Wh.set.call(this,e[0],t,r,e[0])};function x0(e,t){const r=e[Or];return(r?Ma(r):e)[t]}function g9(e,t,r){var i;const n=yR(t,r);return n?Uc in n?n[Uc]:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function yR(e,t){if(!(t in e))return;let r=Ho(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Ho(r)}}function Hx(e){e.modified_||(e.modified_=!0,e.parent_&&Hx(e.parent_))}function Eh(e){e.copy_||(e.assigned_=new Map,e.copy_=zx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var x9=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(r,n,i)=>{if(go(r)&&!go(n)){const o=n;n=r;const c=this;return function(h=o,...p){return c.produce(h,y=>n.call(this,y,...p))}}go(n)||Rn(6),i!==void 0&&!go(i)&&Rn(7);let l;if($n(r)){const o=ZE(this),c=Fx(o,r,void 0);let f=!0;try{l=n(c),f=!1}finally{f?Ux(o):qx(o)}return XE(o,i),WE(l,o)}else if(!r||!mj(r)){if(l=n(r),l===void 0&&(l=r),l===uR&&(l=void 0),this.autoFreeze_&&yj(l,!0),i){const o=[],c=[];al(Bx).generateReplacementPatches_(r,l,{patches_:o,inversePatches_:c}),i(o,c)}return l}else Rn(1,r)},this.produceWithPatches=(r,n)=>{if(go(r))return(c,...f)=>this.produceWithPatches(c,h=>r(h,...f));let i,l;return[this.produce(r,n,(c,f)=>{i=c,l=f}),i,l]},g0(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),g0(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),g0(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){$n(t)||Rn(8),Ya(t)&&(t=wn(t));const r=ZE(this),n=Fx(r,t,void 0);return n[Or].isManual_=!0,qx(r),n}finishDraft(t,r){const n=t&&t[Or];(!n||!n.isManual_)&&Rn(9);const{scope_:i}=n;return XE(i,r),WE(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,r){let n;for(n=r.length-1;n>=0;n--){const l=r[n];if(l.path.length===0&&l.op==="replace"){t=l.value;break}}n>-1&&(r=r.slice(n+1));const i=al(Bx).applyPatches_;return Ya(t)?i(t,r):this.produce(t,l=>i(l,r))}};function Fx(e,t,r,n){const[i,l]=Jm(t)?al(Xh).proxyMap_(t,r):ep(t)?al(Xh).proxySet_(t,r):v9(t,r);return((r==null?void 0:r.scope_)??fR()).drafts_.push(i),l.callbacks_=(r==null?void 0:r.callbacks_)??[],l.key_=n,r&&n!==void 0?p9(r,l,n):l.callbacks_.push(function(f){var p;(p=f.mapSetPlugin_)==null||p.fixSetContents(l);const{patchPlugin_:h}=f;l.modified_&&h&&h.generatePatches_(l,[],f)}),i}function wn(e){return Ya(e)||Rn(10,e),vR(e)}function vR(e){if(!$n(e)||tp(e))return e;const t=e[Or];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=zx(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=zx(e,!0);return Zm(r,(i,l)=>{Qh(r,i,vR(l))},n),t&&(t.finalized_=!1),r}var b9=new x9,gR=b9.produce;function xR(e){return({dispatch:r,getState:n})=>i=>l=>typeof l=="function"?l(r,n,e):i(l)}var j9=xR(),S9=xR,w9=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Gh:Gh.apply(null,arguments)};function nn(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(en(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>oR(n)&&n.type===e,r}var bR=class _c extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,_c.prototype)}static get[Symbol.species](){return _c}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new _c(...t[0].concat(this)):new _c(...t.concat(this))}};function eA(e){return $n(e)?gR(e,()=>{}):e}function ih(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function N9(e){return typeof e=="boolean"}var O9=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:l=!0}=t??{};let o=new bR;return r&&(N9(r)?o.push(j9):o.push(S9(r.extraArgument))),o},jR="RTK_autoBatch",lt=()=>e=>({payload:e,meta:{[jR]:!0}}),tA=e=>t=>{setTimeout(t,e)},SR=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,l=!1,o=!1;const c=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:tA(10):e.type==="callback"?e.queueNotification:tA(e.timeout),h=()=>{o=!1,l&&(l=!1,c.forEach(p=>p()))};return Object.assign({},n,{subscribe(p){const y=()=>i&&p(),v=n.subscribe(y);return c.add(p),()=>{v(),c.delete(p)}},dispatch(p){var y;try{return i=!((y=p==null?void 0:p.meta)!=null&&y[jR]),l=!i,l&&(o||(o=!0,f(h))),n.dispatch(p)}finally{i=!0}}})},_9=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new bR(e);return n&&i.push(SR(typeof n=="object"?n:void 0)),i};function E9(e){const t=O9(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:l=void 0,enhancers:o=void 0}=e||{};let c;if(typeof r=="function")c=r;else if(hj(r))c=lR(r);else throw new Error(en(1));let f;typeof n=="function"?f=n(t):f=t();let h=Gh;i&&(h=w9({trace:!1,...typeof i=="object"&&i}));const p=s9(...f),y=_9(p);let v=typeof o=="function"?o(y):y();const x=h(...v);return sR(c,l,x)}function wR(e){const t={},r=[];let n;const i={addCase(l,o){const c=typeof l=="string"?l:l.type;if(!c)throw new Error(en(28));if(c in t)throw new Error(en(29));return t[c]=o,i},addAsyncThunk(l,o){return o.pending&&(t[l.pending.type]=o.pending),o.rejected&&(t[l.rejected.type]=o.rejected),o.fulfilled&&(t[l.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:l.settled,reducer:o.settled}),i},addMatcher(l,o){return r.push({matcher:l,reducer:o}),i},addDefaultCase(l){return n=l,i}};return e(i),[t,r,n]}function A9(e){return typeof e=="function"}function P9(e,t){let[r,n,i]=wR(t),l;if(A9(e))l=()=>eA(e());else{const c=eA(e);l=()=>c}function o(c=l(),f){let h=[r[f.type],...n.filter(({matcher:p})=>p(f)).map(({reducer:p})=>p)];return h.filter(p=>!!p).length===0&&(h=[i]),h.reduce((p,y)=>{if(y)if(Ya(p)){const x=y(p,f);return x===void 0?p:x}else{if($n(p))return gR(p,v=>y(v,f));{const v=y(p,f);if(v===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}}return p},c)}return o.getInitialState=l,o}var T9="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",C9=(e=21)=>{let t="",r=e;for(;r--;)t+=T9[Math.random()*64|0];return t},M9=Symbol.for("rtk-slice-createasyncthunk");function R9(e,t){return`${e}/${t}`}function D9({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[M9];return function(i){const{name:l,reducerPath:o=l}=i;if(!l)throw new Error(en(11));const c=(typeof i.reducers=="function"?i.reducers(I9()):i.reducers)||{},f=Object.keys(c),h={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(A,T){const M=typeof A=="string"?A:A.type;if(!M)throw new Error(en(12));if(M in h.sliceCaseReducersByType)throw new Error(en(13));return h.sliceCaseReducersByType[M]=T,p},addMatcher(A,T){return h.sliceMatchers.push({matcher:A,reducer:T}),p},exposeAction(A,T){return h.actionCreators[A]=T,p},exposeCaseReducer(A,T){return h.sliceCaseReducersByName[A]=T,p}};f.forEach(A=>{const T=c[A],M={reducerName:A,type:R9(l,A),createNotation:typeof i.reducers=="function"};$9(T)?B9(M,T,p,t):L9(M,T,p)});function y(){const[A={},T=[],M=void 0]=typeof i.extraReducers=="function"?wR(i.extraReducers):[i.extraReducers],R={...A,...h.sliceCaseReducersByType};return P9(i.initialState,I=>{for(let $ in R)I.addCase($,R[$]);for(let $ of h.sliceMatchers)I.addMatcher($.matcher,$.reducer);for(let $ of T)I.addMatcher($.matcher,$.reducer);M&&I.addDefaultCase(M)})}const v=A=>A,x=new Map,j=new WeakMap;let S;function N(A,T){return S||(S=y()),S(A,T)}function O(){return S||(S=y()),S.getInitialState()}function P(A,T=!1){function M(I){let $=I[A];return typeof $>"u"&&T&&($=ih(j,M,O)),$}function R(I=v){const $=ih(x,T,()=>new WeakMap);return ih($,I,()=>{const D={};for(const[H,q]of Object.entries(i.selectors??{}))D[H]=k9(q,I,()=>ih(j,I,O),T);return D})}return{reducerPath:A,getSelectors:R,get selectors(){return R(M)},selectSlice:M}}const E={name:l,reducer:N,actions:h.actionCreators,caseReducers:h.sliceCaseReducersByName,getInitialState:O,...P(o),injectInto(A,{reducerPath:T,...M}={}){const R=T??o;return A.inject({reducerPath:R,reducer:N},M),{...E,...P(R,!0)}}};return E}}function k9(e,t,r,n){function i(l,...o){let c=t(l);return typeof c>"u"&&n&&(c=r()),e(c,...o)}return i.unwrapped=e,i}var yr=D9();function I9(){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 L9({type:e,reducerName:t,createNotation:r},n,i){let l,o;if("reducer"in n){if(r&&!z9(n))throw new Error(en(17));l=n.reducer,o=n.prepare}else l=n;i.addCase(e,l).exposeCaseReducer(t,l).exposeAction(t,o?nn(e,o):nn(e))}function $9(e){return e._reducerDefinitionType==="asyncThunk"}function z9(e){return e._reducerDefinitionType==="reducerWithPrepare"}function B9({type:e,reducerName:t},r,n,i){if(!i)throw new Error(en(18));const{payloadCreator:l,fulfilled:o,pending:c,rejected:f,settled:h,options:p}=r,y=i(e,l,p);n.exposeAction(t,y),o&&n.addCase(y.fulfilled,o),c&&n.addCase(y.pending,c),f&&n.addCase(y.rejected,f),h&&n.addMatcher(y.settled,h),n.exposeCaseReducer(t,{fulfilled:o||sh,pending:c||sh,rejected:f||sh,settled:h||sh})}function sh(){}var U9="task",NR="listener",OR="completed",vj="cancelled",q9=`task-${vj}`,H9=`task-${OR}`,Kx=`${NR}-${vj}`,F9=`${NR}-${OR}`,np=class{constructor(e){ng(this,"name","TaskAbortError");ng(this,"message");this.code=e,this.message=`${U9} ${vj} (reason: ${e})`}},gj=(e,t)=>{if(typeof e!="function")throw new TypeError(en(32))},Jh=()=>{},_R=(e,t=Jh)=>(e.catch(t),e),ER=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ws=e=>{if(e.aborted)throw new np(e.reason)};function AR(e,t){let r=Jh;return new Promise((n,i)=>{const l=()=>i(new np(e.reason));if(e.aborted){l();return}r=ER(e,l),t.finally(()=>r()).then(n,i)}).finally(()=>{r=Jh})}var K9=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof np?"cancelled":"rejected",error:r}}finally{t==null||t()}},em=e=>t=>_R(AR(e,t).then(r=>(Ws(e),r))),PR=e=>{const t=em(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:wo}=Object,rA={},ap="listenerMiddleware",G9=(e,t)=>{const r=n=>ER(e,()=>n.abort(e.reason));return(n,i)=>{gj(n);const l=new AbortController;r(l);const o=K9(async()=>{Ws(e),Ws(l.signal);const c=await n({pause:em(l.signal),delay:PR(l.signal),signal:l.signal});return Ws(l.signal),c},()=>l.abort(H9));return i!=null&&i.autoJoin&&t.push(o.catch(Jh)),{result:em(e)(o),cancel(){l.abort(q9)}}}},Y9=(e,t)=>{const r=async(n,i)=>{Ws(t);let l=()=>{};const c=[new Promise((f,h)=>{let p=e({predicate:n,effect:(y,v)=>{v.unsubscribe(),f([y,v.getState(),v.getOriginalState()])}});l=()=>{p(),h()}})];i!=null&&c.push(new Promise(f=>setTimeout(f,i,null)));try{const f=await AR(t,Promise.race(c));return Ws(t),f}finally{l()}};return(n,i)=>_R(r(n,i))},TR=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:l}=e;if(t)i=nn(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(en(21));return gj(l),{predicate:i,type:t,effect:l}},CR=wo(e=>{const{type:t,predicate:r,effect:n}=TR(e);return{id:C9(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(en(22))}}},{withTypes:()=>CR}),nA=(e,t)=>{const{type:r,effect:n,predicate:i}=TR(t);return Array.from(e.values()).find(l=>(typeof r=="string"?l.type===r:l.predicate===i)&&l.effect===n)},Gx=e=>{e.pending.forEach(t=>{t.abort(Kx)})},V9=(e,t)=>()=>{for(const r of t.keys())Gx(r);e.clear()},aA=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},MR=wo(nn(`${ap}/add`),{withTypes:()=>MR}),Q9=nn(`${ap}/removeAll`),RR=wo(nn(`${ap}/remove`),{withTypes:()=>RR}),X9=(...e)=>{console.error(`${ap}/error`,...e)},md=(e={})=>{const t=new Map,r=new Map,n=x=>{const j=r.get(x)??0;r.set(x,j+1)},i=x=>{const j=r.get(x)??1;j===1?r.delete(x):r.set(x,j-1)},{extra:l,onError:o=X9}=e;gj(o);const c=x=>(x.unsubscribe=()=>t.delete(x.id),t.set(x.id,x),j=>{x.unsubscribe(),j!=null&&j.cancelActive&&Gx(x)}),f=x=>{const j=nA(t,x)??CR(x);return c(j)};wo(f,{withTypes:()=>f});const h=x=>{const j=nA(t,x);return j&&(j.unsubscribe(),x.cancelActive&&Gx(j)),!!j};wo(h,{withTypes:()=>h});const p=async(x,j,S,N)=>{const O=new AbortController,P=Y9(f,O.signal),E=[];try{x.pending.add(O),n(x),await Promise.resolve(x.effect(j,wo({},S,{getOriginalState:N,condition:(A,T)=>P(A,T).then(Boolean),take:P,delay:PR(O.signal),pause:em(O.signal),extra:l,signal:O.signal,fork:G9(O.signal,E),unsubscribe:x.unsubscribe,subscribe:()=>{t.set(x.id,x)},cancelActiveListeners:()=>{x.pending.forEach((A,T,M)=>{A!==O&&(A.abort(Kx),M.delete(A))})},cancel:()=>{O.abort(Kx),x.pending.delete(O)},throwIfCancelled:()=>{Ws(O.signal)}})))}catch(A){A instanceof np||aA(o,A,{raisedBy:"effect"})}finally{await Promise.all(E),O.abort(F9),i(x),x.pending.delete(O)}},y=V9(t,r);return{middleware:x=>j=>S=>{if(!oR(S))return j(S);if(MR.match(S))return f(S.payload);if(Q9.match(S)){y();return}if(RR.match(S))return h(S.payload);let N=x.getState();const O=()=>{if(N===rA)throw new Error(en(23));return N};let P;try{if(P=j(S),t.size>0){const E=x.getState(),A=Array.from(t.values());for(const T of A){let M=!1;try{M=T.predicate(S,E,N)}catch(R){M=!1,aA(o,R,{raisedBy:"predicate"})}M&&p(T,S,x,O)}}}finally{N=rA}return P},startListening:f,stopListening:h,clearListeners:y}};function en(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var Z9={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},DR=yr({name:"chartLayout",initialState:Z9,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,l;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=(l=t.payload.left)!==null&&l!==void 0?l:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:W9,setLayout:J9,setChartSize:eq,setScale:tq}=DR.actions,rq=DR.reducer;function kR(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function Be(e){return Number.isFinite(e)}function la(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function iA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iA(Object(r),!0).forEach(function(n){nq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nq(e,t,r){return(t=aq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aq(e){var t=iq(e,"string");return typeof t=="symbol"?t:t+""}function iq(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ot(e,t,r){return mt(e)||mt(t)?r:sa(t)?qo(e,t,r):typeof t=="function"?t(e):r}var sq=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:l,verticalAlign:o,layout:c}=t;if((c==="vertical"||c==="horizontal"&&o==="middle")&&l!=="center"&&pe(e[l]))return bo(bo({},e),{},{[l]:e[l]+(n||0)});if((c==="horizontal"||c==="vertical"&&l==="center")&&o!=="middle"&&pe(e[o]))return bo(bo({},e),{},{[o]:e[o]+(i||0)})}return e},Za=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",IR=(e,t,r,n)=>{if(n)return e.map(c=>c.coordinate);var i,l,o=e.map(c=>(c.coordinate===t&&(i=!0),c.coordinate===r&&(l=!0),c.coordinate));return i||o.push(t),l||o.push(r),o},LR=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:l,scale:o,realScaleType:c,isCategorical:f,categoricalDomain:h,tickCount:p,ticks:y,niceTicks:v,axisType:x}=e;if(!o)return null;var j=c==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,S=i==="category"&&o.bandwidth?o.bandwidth()/j:0;if(S=x==="angleAxis"&&l&&l.length>=2?zr(l[0]-l[1])*2*S:S,y||v){var N=(y||v||[]).map((O,P)=>{var E=n?n.indexOf(O):O,A=o.map(E);return Be(A)?{coordinate:A+S,value:O,offset:S,index:P}:null}).filter(Br);return N}return f&&h?h.map((O,P)=>{var E=o.map(O);return Be(E)?{coordinate:E+S,value:O,index:P,offset:S}:null}).filter(Br):o.ticks&&p!=null?o.ticks(p).map((O,P)=>{var E=o.map(O);return Be(E)?{coordinate:E+S,value:O,index:P,offset:S}:null}).filter(Br):o.domain().map((O,P)=>{var E=o.map(O);return Be(E)?{coordinate:E+S,value:n?n[O]:O,index:P,offset:S}:null}).filter(Br)},lq=(e,t)=>{if(!t||t.length!==2||!pe(t[0])||!pe(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!pe(e[0])||e[0]<r)&&(i[0]=r),(!pe(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},oq=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 l=0,o=0,c=0;c<r;++c){var f=e[c],h=f==null?void 0:f[i];if(h!=null){var p=h[1],y=h[0],v=ia(p)?y:p;v>=0?(h[0]=l,l+=v,h[1]=l):(h[0]=o,o+=v,h[1]=o)}}}},uq=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 l=0,o=0;o<r;++o){var c=e[o],f=c==null?void 0:c[i];if(f!=null){var h=ia(f[1])?f[0]:f[1];h>=0?(f[0]=l,l+=h,f[1]=l):(f[0]=0,f[1]=0)}}}},cq={sign:oq,expand:k6,none:rl,silhouette:I6,wiggle:L6,positive:uq},dq=(e,t,r)=>{var n,i=(n=cq[r])!==null&&n!==void 0?n:rl,l=D6().keys(t).value((c,f)=>Number(Ot(c,f,0))).order(kx).offset(i),o=l(e);return o.forEach((c,f)=>{c.forEach((h,p)=>{var y=Ot(e[p],t[f],0);Array.isArray(y)&&y.length===2&&pe(y[0])&&pe(y[1])&&(h[0]=y[0],h[1]=y[1])})}),o};function fq(e){return e==null?void 0:String(e)}function sA(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:l,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!mt(i[t.dataKey])){var c=UM(r,"value",i[t.dataKey]);if(c)return c.coordinate+n/2}return r!=null&&r[l]?r[l].coordinate+n/2:null}var f=Ot(i,mt(o)?t.dataKey:o),h=t.scale.map(f);return pe(h)?h:null}var lA=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:l,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var c=Ot(l,t.dataKey,t.scale.domain()[o]);if(mt(c))return null;var f=t.scale.map(c);return pe(f)?f-i/2+n:null},hq=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]},mq=e=>{var t=e.flat(2).filter(pe);return[Math.min(...t),Math.max(...t)]},pq=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],yq=(e,t,r)=>{if(e!=null)return pq(Object.keys(e).reduce((n,i)=>{var l=e[i];if(!l)return n;var{stackedData:o}=l,c=o.reduce((f,h)=>{var p=kR(h,t,r),y=mq(p);return!Be(y[0])||!Be(y[1])?f:[Math.min(f[0],y[0]),Math.max(f[1],y[1])]},[1/0,-1/0]);return[Math.min(c[0],n[0]),Math.max(c[1],n[1])]},[1/0,-1/0]))},oA=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,uA=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Fo=(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=Qm(t,p=>p.coordinate),l=1/0,o=1,c=i.length;o<c;o++){var f=i[o],h=i[o-1];l=Math.min(((f==null?void 0:f.coordinate)||0)-((h==null?void 0:h.coordinate)||0),l)}return l===1/0?0:l}return r?void 0:0};function cA(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:l}=e;return bo(bo({},t),{},{dataKey:r,payload:n,value:i,name:l})}function ip(e,t){if(e)return String(e);if(typeof t=="string")return t}var vq=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},gq=(e,t)=>t==="centric"?e.angle:e.radius,Wa=e=>e.layout.width,Ja=e=>e.layout.height,xq=e=>e.layout.scale,$R=e=>e.layout.margin,sp=V(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),lp=V(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),bq="data-recharts-item-index",jq="data-recharts-item-id",pd=60;function dA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dA(Object(r),!0).forEach(function(n){Sq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Sq(e,t,r){return(t=wq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wq(e){var t=Nq(e,"string");return typeof t=="symbol"?t:t+""}function Nq(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 Oq=e=>e.brush.height;function _q(e){var t=lp(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:pd;return r+i}return r},0)}function Eq(e){var t=lp(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:pd;return r+i}return r},0)}function Aq(e){var t=sp(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function Pq(e){var t=sp(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var Yt=V([Wa,Ja,$R,Oq,_q,Eq,Aq,Pq,aR,JU],(e,t,r,n,i,l,o,c,f,h)=>{var p={left:(r.left||0)+i,right:(r.right||0)+l},y={top:(r.top||0)+o,bottom:(r.bottom||0)+c},v=lh(lh({},y),p),x=v.bottom;v.bottom+=n,v=sq(v,f,h);var j=e-v.left-v.right,S=t-v.top-v.bottom;return lh(lh({brushBottom:x},v),{},{width:Math.max(j,0),height:Math.max(S,0)})}),Tq=V(Yt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),xj=V(Wa,Ja,(e,t)=>({x:0,y:0,width:e,height:t})),Cq=w.createContext(null),vr=()=>w.useContext(Cq)!=null,op=e=>e.brush,up=V([op,Yt,$R],(e,t,r)=>({height:e.height,x:pe(e.x)?e.x:t.left,y:pe(e.y)?e.y:t.top+t.height+t.brushBottom-((r==null?void 0:r.bottom)||0),width:pe(e.width)?e.width:t.width})),b0={},j0={},S0={},fA;function Mq(){return fA||(fA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:l}={}){let o,c=null;const f=l!=null&&l.includes("leading"),h=l==null||l.includes("trailing"),p=()=>{c!==null&&(r.apply(o,c),o=void 0,c=null)},y=()=>{h&&p(),S()};let v=null;const x=()=>{v!=null&&clearTimeout(v),v=setTimeout(()=>{v=null,y()},n)},j=()=>{v!==null&&(clearTimeout(v),v=null)},S=()=>{j(),o=void 0,c=null},N=()=>{p()},O=function(...P){if(i!=null&&i.aborted)return;o=this,c=P;const E=v==null;x(),f&&E&&p()};return O.schedule=x,O.cancel=S,O.flush=N,i==null||i.addEventListener("abort",S,{once:!0}),O}e.debounce=t})(S0)),S0}var hA;function Rq(){return hA||(hA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Mq();function r(n,i=0,l={}){typeof l!="object"&&(l={});const{leading:o=!1,trailing:c=!0,maxWait:f}=l,h=Array(2);o&&(h[0]="leading"),c&&(h[1]="trailing");let p,y=null;const v=t.debounce(function(...S){p=n.apply(this,S),y=null},i,{edges:h}),x=function(...S){return f!=null&&(y===null&&(y=Date.now()),Date.now()-y>=f)?(p=n.apply(this,S),y=Date.now(),v.cancel(),v.schedule(),p):(v.apply(this,S),p)},j=()=>(v.flush(),p);return x.cancel=v.cancel,x.flush=j,x}e.debounce=r})(j0)),j0}var mA;function Dq(){return mA||(mA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rq();function r(n,i=0,l={}){const{leading:o=!0,trailing:c=!0}=l;return t.debounce(n,i,{leading:o,maxWait:i,trailing:c})}e.throttle=r})(b0)),b0}var w0,pA;function kq(){return pA||(pA=1,w0=Dq().throttle),w0}var Iq=kq();const Lq=ns(Iq);var tm=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),l=2;l<n;l++)i[l-2]=arguments[l];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 o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}},ta={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}},zR=(e,t,r)=>{var{width:n=ta.width,height:i=ta.height,aspect:l,maxHeight:o}=r,c=nl(n)?e:Number(n),f=nl(i)?t:Number(i);return l&&l>0&&(c?f=c/l:f&&(c=f*l),o&&f!=null&&f>o&&(f=o)),{calculatedWidth:c,calculatedHeight:f}},$q={width:0,height:0,overflow:"visible"},zq={width:0,overflowX:"visible"},Bq={height:0,overflowY:"visible"},Uq={},qq=e=>{var{width:t,height:r}=e,n=nl(t),i=nl(r);return n&&i?$q:n?zq:i?Bq:Uq};function Hq(e){var{width:t,height:r,aspect:n}=e,i=t,l=r;return i===void 0&&l===void 0?(i=ta.width,l=ta.height):i===void 0?i=n&&n>0?void 0:ta.width:l===void 0&&(l=n&&n>0?void 0:ta.height),{width:i,height:l}}function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Yx.apply(null,arguments)}function yA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yA(Object(r),!0).forEach(function(n){Fq(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Fq(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=Gq(e,"string");return typeof t=="symbol"?t:t+""}function Gq(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 BR=w.createContext(ta.initialDimension);function Yq(e){return la(e.width)&&la(e.height)}function UR(e){var{children:t,width:r,height:n}=e,i=w.useMemo(()=>({width:r,height:n}),[r,n]);return Yq(i)?w.createElement(BR.Provider,{value:i},t):null}var bj=()=>w.useContext(BR),Vq=w.forwardRef((e,t)=>{var{aspect:r,initialDimension:n=ta.initialDimension,width:i,height:l,minWidth:o=ta.minWidth,minHeight:c,maxHeight:f,children:h,debounce:p=ta.debounce,id:y,className:v,onResize:x,style:j={}}=e,S=w.useRef(null),N=w.useRef();N.current=x,w.useImperativeHandle(t,()=>S.current);var[O,P]=w.useState({containerWidth:n.width,containerHeight:n.height}),E=w.useCallback((I,$)=>{P(D=>{var H=Math.round(I),q=Math.round($);return D.containerWidth===H&&D.containerHeight===q?D:{containerWidth:H,containerHeight:q}})},[]);w.useEffect(()=>{if(S.current==null||typeof ResizeObserver>"u")return hl;var I=q=>{var ae,Q=q[0];if(Q!=null){var{width:Z,height:B}=Q.contentRect;E(Z,B),(ae=N.current)===null||ae===void 0||ae.call(N,Z,B)}};p>0&&(I=Lq(I,p,{trailing:!0,leading:!1}));var $=new ResizeObserver(I),{width:D,height:H}=S.current.getBoundingClientRect();return E(D,H),$.observe(S.current),()=>{$.disconnect()}},[E,p]);var{containerWidth:A,containerHeight:T}=O;tm(!r||r>0,"The aspect(%s) must be greater than zero.",r);var{calculatedWidth:M,calculatedHeight:R}=zR(A,T,{width:i,height:l,aspect:r,maxHeight:f});return tm(M!=null&&M>0||R!=null&&R>0,`The width(%s) and height(%s) of chart should be greater than 0,
|
|
70
|
-
please check the style of container, or the props width(%s) and height(%s),
|
|
71
|
-
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
|
72
|
-
height and width.`,M,R,i,l,o,c,r),w.createElement("div",{id:y?"".concat(y):void 0,className:Xe("recharts-responsive-container",v),style:vA(vA({},j),{},{width:i,height:l,minWidth:o,minHeight:c,maxHeight:f}),ref:S},w.createElement("div",{style:qq({width:i,height:l})},w.createElement(UR,{width:M,height:R},h)))}),jj=w.forwardRef((e,t)=>{var r=bj();if(la(r.width)&&la(r.height))return e.children;var{width:n,height:i}=Hq({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:l,calculatedHeight:o}=zR(void 0,void 0,{width:n,height:i,aspect:e.aspect,maxHeight:e.maxHeight});return pe(l)&&pe(o)?w.createElement(UR,{width:l,height:o},e.children):w.createElement(Vq,Yx({},e,{width:n,height:i,ref:t}))});function Sj(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 cp=()=>{var e,t=vr(),r=ge(Tq),n=ge(up),i=(e=ge(op))===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}},Qq={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},qR=()=>{var e;return(e=ge(Yt))!==null&&e!==void 0?e:Qq},wj=()=>ge(Wa),Nj=()=>ge(Ja),Xq=()=>ge(e=>e.layout.margin),Ze=e=>e.layout.layoutType,ml=()=>ge(Ze),HR=()=>{var e=ml();if(e==="horizontal"||e==="vertical")return e},FR=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t},Zq=()=>{var e=ml();return e!==void 0},yd=e=>{var t=ct(),r=vr(),{width:n,height:i}=e,l=bj(),o=n,c=i;return l&&(o=l.width>0?l.width:n,c=l.height>0?l.height:i),w.useEffect(()=>{!r&&la(o)&&la(c)&&t(eq({width:o,height:c}))},[t,r,o,c]),null},KR=Symbol.for("immer-nothing"),gA=Symbol.for("immer-draftable"),an=Symbol.for("immer-state");function Dn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Fc=Object.getPrototypeOf;function Ko(e){return!!e&&!!e[an]}function il(e){var t;return e?GR(e)||Array.isArray(e)||!!e[gA]||!!((t=e.constructor)!=null&&t[gA])||vd(e)||fp(e):!1}var Wq=Object.prototype.constructor.toString(),xA=new WeakMap;function GR(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(r===Object)return!0;if(typeof r!="function")return!1;let n=xA.get(r);return n===void 0&&(n=Function.toString.call(r),xA.set(r,n)),n===Wq}function rm(e,t,r=!0){dp(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 dp(e){const t=e[an];return t?t.type_:Array.isArray(e)?1:vd(e)?2:fp(e)?3:0}function Vx(e,t){return dp(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function YR(e,t,r){const n=dp(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function Jq(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function vd(e){return e instanceof Map}function fp(e){return e instanceof Set}function Ts(e){return e.copy_||e.base_}function Qx(e,t){if(vd(e))return new Map(e);if(fp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=GR(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[an];let i=Reflect.ownKeys(n);for(let l=0;l<i.length;l++){const o=i[l],c=n[o];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(n[o]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[o]})}return Object.create(Fc(e),n)}else{const n=Fc(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Oj(e,t=!1){return hp(e)||Ko(e)||!il(e)||(dp(e)>1&&Object.defineProperties(e,{set:oh,add:oh,clear:oh,delete:oh}),Object.freeze(e),t&&Object.values(e).forEach(r=>Oj(r,!0))),e}function eH(){Dn(2)}var oh={value:eH};function hp(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var tH={};function sl(e){const t=tH[e];return t||Dn(0,e),t}var Kc;function VR(){return Kc}function rH(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function bA(e,t){t&&(sl("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Xx(e){Zx(e),e.drafts_.forEach(nH),e.drafts_=null}function Zx(e){e===Kc&&(Kc=e.parent_)}function jA(e){return Kc=rH(Kc,e)}function nH(e){const t=e[an];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function SA(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[an].modified_&&(Xx(t),Dn(4)),il(e)&&(e=nm(t,e),t.parent_||am(t,e)),t.patches_&&sl("Patches").generateReplacementPatches_(r[an].base_,e,t.patches_,t.inversePatches_)):e=nm(t,r,[]),Xx(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==KR?e:void 0}function nm(e,t,r){if(hp(t))return t;const n=e.immer_.shouldUseStrictIteration(),i=t[an];if(!i)return rm(t,(l,o)=>wA(e,i,t,l,o,r),n),t;if(i.scope_!==e)return t;if(!i.modified_)return am(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const l=i.copy_;let o=l,c=!1;i.type_===3&&(o=new Set(l),l.clear(),c=!0),rm(o,(f,h)=>wA(e,i,l,f,h,r,c),n),am(e,l,!1),r&&e.patches_&&sl("Patches").generatePatches_(i,r,e.patches_,e.inversePatches_)}return i.copy_}function wA(e,t,r,n,i,l,o){if(i==null||typeof i!="object"&&!o)return;const c=hp(i);if(!(c&&!o)){if(Ko(i)){const f=l&&t&&t.type_!==3&&!Vx(t.assigned_,n)?l.concat(n):void 0,h=nm(e,i,f);if(YR(r,n,h),Ko(h))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(il(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[n]===i&&c)return;nm(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(vd(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&am(e,i)}}}function am(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Oj(t,r)}function aH(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:VR(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,l=_j;r&&(i=[n],l=Gc);const{revoke:o,proxy:c}=Proxy.revocable(i,l);return n.draft_=c,n.revoke_=o,c}var _j={get(e,t){if(t===an)return e;const r=Ts(e);if(!Vx(r,t))return iH(e,r,t);const n=r[t];return e.finalized_||!il(n)?n:n===N0(e.base_,t)?(O0(e),e.copy_[t]=Jx(n,e)):n},has(e,t){return t in Ts(e)},ownKeys(e){return Reflect.ownKeys(Ts(e))},set(e,t,r){const n=QR(Ts(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=N0(Ts(e),t),l=i==null?void 0:i[an];if(l&&l.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(Jq(r,i)&&(r!==void 0||Vx(e.base_,t)))return!0;O0(e),Wx(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 N0(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,O0(e),Wx(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=Ts(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Dn(11)},getPrototypeOf(e){return Fc(e.base_)},setPrototypeOf(){Dn(12)}},Gc={};rm(_j,(e,t)=>{Gc[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Gc.deleteProperty=function(e,t){return Gc.set.call(this,e,t,void 0)};Gc.set=function(e,t,r){return _j.set.call(this,e[0],t,r,e[0])};function N0(e,t){const r=e[an];return(r?Ts(r):e)[t]}function iH(e,t,r){var i;const n=QR(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function QR(e,t){if(!(t in e))return;let r=Fc(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Fc(r)}}function Wx(e){e.modified_||(e.modified_=!0,e.parent_&&Wx(e.parent_))}function O0(e){e.copy_||(e.copy_=Qx(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var sH=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 l=r;r=t;const o=this;return function(f=l,...h){return o.produce(f,p=>r.call(this,p,...h))}}typeof r!="function"&&Dn(6),n!==void 0&&typeof n!="function"&&Dn(7);let i;if(il(t)){const l=jA(this),o=Jx(t,void 0);let c=!0;try{i=r(o),c=!1}finally{c?Xx(l):Zx(l)}return bA(l,n),SA(i,l)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===KR&&(i=void 0),this.autoFreeze_&&Oj(i,!0),n){const l=[],o=[];sl("Patches").generateReplacementPatches_(t,i,l,o),n(l,o)}return i}else Dn(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...c)=>this.produceWithPatches(o,f=>t(f,...c));let n,i;return[this.produce(t,r,(o,c)=>{n=o,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){il(e)||Dn(8),Ko(e)&&(e=lH(e));const t=jA(this),r=Jx(e,void 0);return r[an].isManual_=!0,Zx(t),r}finishDraft(e,t){const r=e&&e[an];(!r||!r.isManual_)&&Dn(9);const{scope_:n}=r;return bA(n,t),SA(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=sl("Patches").applyPatches_;return Ko(e)?n(e,t):this.produce(e,i=>n(i,t))}};function Jx(e,t){const r=vd(e)?sl("MapSet").proxyMap_(e,t):fp(e)?sl("MapSet").proxySet_(e,t):aH(e,t);return(t?t.scope_:VR()).drafts_.push(r),r}function lH(e){return Ko(e)||Dn(10,e),XR(e)}function XR(e){if(!il(e)||hp(e))return e;const t=e[an];let r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Qx(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Qx(e,!0);return rm(r,(i,l)=>{YR(r,i,XR(l))},n),t&&(t.finalized_=!1),r}var oH=new sH;oH.produce;var uH={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},ZR=yr({name:"legend",initialState:uH,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:lt()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:n}=t.payload,i=wn(e).payload.indexOf(r);i>-1&&(e.payload[i]=n)},prepare:lt()},removeLegendPayload:{reducer(e,t){var r=wn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:lt()}}}),{setLegendSize:NA,setLegendSettings:cH,addLegendPayload:dH,replaceLegendPayload:fH,removeLegendPayload:hH}=ZR.actions,mH=ZR.reducer,_0={exports:{}},E0={};/**
|
|
73
|
-
* @license React
|
|
74
|
-
* use-sync-external-store-with-selector.production.js
|
|
75
|
-
*
|
|
76
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the MIT license found in the
|
|
79
|
-
* LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/var OA;function pH(){if(OA)return E0;OA=1;var e=eu();function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,l=e.useEffect,o=e.useMemo,c=e.useDebugValue;return E0.useSyncExternalStoreWithSelector=function(f,h,p,y,v){var x=i(null);if(x.current===null){var j={hasValue:!1,value:null};x.current=j}else j=x.current;x=o(function(){function N(T){if(!O){if(O=!0,P=T,T=y(T),v!==void 0&&j.hasValue){var M=j.value;if(v(M,T))return E=M}return E=T}if(M=E,r(P,T))return M;var R=y(T);return v!==void 0&&v(M,R)?(P=T,M):(P=T,E=R)}var O=!1,P,E,A=p===void 0?null:p;return[function(){return N(h())},A===null?void 0:function(){return N(A())}]},[h,p,y,v]);var S=n(f,x[0],x[1]);return l(function(){j.hasValue=!0,j.value=S},[S]),c(S),S},E0}var _A;function yH(){return _A||(_A=1,_0.exports=pH()),_0.exports}yH();function vH(e){e()}function gH(){let e=null,t=null;return{clear(){e=null,t=null},notify(){vH(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var EA={notify(){},get:()=>[]};function xH(e,t){let r,n=EA,i=0,l=!1;function o(S){p();const N=n.subscribe(S);let O=!1;return()=>{O||(O=!0,N(),y())}}function c(){n.notify()}function f(){j.onStateChange&&j.onStateChange()}function h(){return l}function p(){i++,r||(r=e.subscribe(f),n=gH())}function y(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=EA)}function v(){l||(l=!0,p())}function x(){l&&(l=!1,y())}const j={addNestedSub:o,notifyNestedSubs:c,handleChangeWrapper:f,isSubscribed:h,trySubscribe:v,tryUnsubscribe:x,getListeners:()=>n};return j}var bH=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jH=bH(),SH=()=>typeof navigator<"u"&&navigator.product==="ReactNative",wH=SH(),NH=()=>jH||wH?w.useLayoutEffect:w.useEffect,OH=NH();function AA(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function _H(e,t){if(AA(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!AA(e[r[i]],t[r[i]]))return!1;return!0}var A0=Symbol.for("react-redux-context"),P0=typeof globalThis<"u"?globalThis:{};function EH(){if(!w.createContext)return{};const e=P0[A0]??(P0[A0]=new Map);let t=e.get(w.createContext);return t||(t=w.createContext(null),e.set(w.createContext,t)),t}var AH=EH();function PH(e){const{children:t,context:r,serverState:n,store:i}=e,l=w.useMemo(()=>{const f=xH(i);return{store:i,subscription:f,getServerState:n?()=>n:void 0}},[i,n]),o=w.useMemo(()=>i.getState(),[i]);OH(()=>{const{subscription:f}=l;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),o!==i.getState()&&f.notifyNestedSubs(),()=>{f.tryUnsubscribe(),f.onStateChange=void 0}},[l,o]);const c=r||AH;return w.createElement(c.Provider,{value:l},t)}var TH=PH,CH=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function MH(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function nu(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var n of r)if(CH.has(n)){if(e[n]==null&&t[n]==null)continue;if(!_H(e[n],t[n]))return!1}else if(!MH(e[n],t[n]))return!1;return!0}var RH=["contextPayload"];function eb(){return eb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},eb.apply(null,arguments)}function PA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Go(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PA(Object(r),!0).forEach(function(n){DH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DH(e,t,r){return(t=kH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kH(e){var t=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)}function LH(e,t){if(e==null)return{};var r,n,i=$H(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function $H(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 zH(e){return e.value}function BH(e){var{contextPayload:t}=e,r=LH(e,RH),n=eR(t,e.payloadUniqBy,zH),i=Go(Go({},r),{},{payload:n});return w.isValidElement(e.content)?w.cloneElement(e.content,i):typeof e.content=="function"?w.createElement(e.content,i):w.createElement(fU,i)}function UH(e,t,r,n,i,l){var{layout:o,align:c,verticalAlign:f}=t,h,p;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(c==="center"&&o==="vertical"?h={left:((n||0)-l.width)/2}:h=c==="right"?{right:r&&r.right||0}:{left:r&&r.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(f==="middle"?p={top:((i||0)-l.height)/2}:p=f==="bottom"?{bottom:r&&r.bottom||0}:{top:r&&r.top||0}),Go(Go({},h),p)}function qH(e){var t=ct();return w.useEffect(()=>{t(cH(e))},[t,e]),null}function HH(e){var t=ct();return w.useEffect(()=>(t(NA(e)),()=>{t(NA({width:0,height:0}))}),[t,e]),null}function FH(e,t,r,n){return e==="vertical"&&t!=null?{height:t}:e==="horizontal"?{width:r||n}:null}var KH={align:"center",iconSize:14,inactiveColor:"#ccc",itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"};function GH(e){var t=lr(e,KH),r=r9(),n=a6(),i=Xq(),{width:l,height:o,wrapperStyle:c,portal:f}=t,[h,p]=iR([r]),y=wj(),v=Nj();if(y==null||v==null)return null;var x=y-((i==null?void 0:i.left)||0)-((i==null?void 0:i.right)||0),j=FH(t.layout,o,l,x),S=f?c:Go(Go({position:"absolute",width:(j==null?void 0:j.width)||l||"auto",height:(j==null?void 0:j.height)||o||"auto"},UH(c,t,i,y,v,h)),c),N=f??n;if(N==null||r==null)return null;var O=w.createElement("div",{className:"recharts-legend-wrapper",style:S,ref:p},w.createElement(qH,{layout:t.layout,align:t.align,verticalAlign:t.verticalAlign,itemSorter:t.itemSorter}),!f&&w.createElement(HH,{width:h.width,height:h.height}),w.createElement(BH,eb({},t,j,{margin:i,chartWidth:y,chartHeight:v,contextPayload:r})));return zm.createPortal(O,N)}var WR=w.memo(GH,nu);WR.displayName="Legend";function tb(){return tb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tb.apply(null,arguments)}function TA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?TA(Object(r),!0).forEach(function(n){YH(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):TA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function YH(e,t,r){return(t=VH(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function VH(e){var t=QH(e,"string");return typeof t=="symbol"?t:t+""}function QH(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 XH(e){return Array.isArray(e)&&sa(e[0])&&sa(e[1])?e.join(" ~ "):e}var lo={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 ZH(e,t){return t==null?e:Qm(e,t)}var WH=e=>{var{separator:t=lo.separator,contentStyle:r,itemStyle:n,labelStyle:i=lo.labelStyle,payload:l,formatter:o,itemSorter:c,wrapperClassName:f,labelClassName:h,label:p,labelFormatter:y,accessibilityLayer:v=lo.accessibilityLayer}=e,x=()=>{if(l&&l.length){var T={padding:0,margin:0},M=ZH(l,c),R=M.map((I,$)=>{if(!I||I.type==="none")return null;var D=I.formatter||o||XH,{value:H,name:q}=I,ae=H,Q=q;if(D){var Z=D(H,q,I,$,l);if(Array.isArray(Z))[ae,Q]=Z;else if(Z!=null)ae=Z;else return null}var B=hc(hc({},lo.itemStyle),{},{color:I.color||lo.itemStyle.color},n);return w.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat($),style:B},sa(Q)?w.createElement("span",{className:"recharts-tooltip-item-name"},Q):null,sa(Q)?w.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,w.createElement("span",{className:"recharts-tooltip-item-value"},ae),w.createElement("span",{className:"recharts-tooltip-item-unit"},I.unit||""))});return w.createElement("ul",{className:"recharts-tooltip-item-list",style:T},R)}return null},j=hc(hc({},lo.contentStyle),r),S=hc({margin:0},i),N=!mt(p),O=N?p:"",P=Xe("recharts-default-tooltip",f),E=Xe("recharts-tooltip-label",h);N&&y&&l!==void 0&&l!==null&&(O=y(p,l));var A=v?{role:"status","aria-live":"assertive"}:{};return w.createElement("div",tb({className:P,style:j},A),w.createElement("p",{className:E,style:S},w.isValidElement(O)?O:"".concat(O)),x())},mc="recharts-tooltip-wrapper",JH={visibility:"hidden"};function eF(e){var{coordinate:t,translateX:r,translateY:n}=e;return Xe(mc,{["".concat(mc,"-right")]:pe(r)&&t&&pe(t.x)&&r>=t.x,["".concat(mc,"-left")]:pe(r)&&t&&pe(t.x)&&r<t.x,["".concat(mc,"-bottom")]:pe(n)&&t&&pe(t.y)&&n>=t.y,["".concat(mc,"-top")]:pe(n)&&t&&pe(t.y)&&n<t.y})}function CA(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offset:i,position:l,reverseDirection:o,tooltipDimension:c,viewBox:f,viewBoxDimension:h}=e;if(l&&pe(l[n]))return l[n];var p=r[n]-c-(i>0?i:0),y=r[n]+i;if(t[n])return o[n]?p:y;var v=f[n];if(v==null)return 0;if(o[n]){var x=p,j=v;return x<j?Math.max(y,v):Math.max(p,v)}if(h==null)return 0;var S=y+c,N=v+h;return S>N?Math.max(p,v):Math.max(y,v)}function tF(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 rF(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:n,offsetLeft:i,position:l,reverseDirection:o,tooltipBox:c,useTranslate3d:f,viewBox:h}=e,p,y,v;return c.height>0&&c.width>0&&r?(y=CA({allowEscapeViewBox:t,coordinate:r,key:"x",offset:i,position:l,reverseDirection:o,tooltipDimension:c.width,viewBox:h,viewBoxDimension:h.width}),v=CA({allowEscapeViewBox:t,coordinate:r,key:"y",offset:n,position:l,reverseDirection:o,tooltipDimension:c.height,viewBox:h,viewBoxDimension:h.height}),p=tF({translateX:y,translateY:v,useTranslate3d:f})):p=JH,{cssProperties:p,cssClasses:eF({translateX:y,translateY:v,coordinate:r})}}var nF=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),gd={isSsr:nF()};function JR(){var[e,t]=w.useState(()=>gd.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return w.useEffect(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(r.matches)};return r.addEventListener("change",n),()=>{r.removeEventListener("change",n)}}},[]),e}function MA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function oo(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){aF(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 aF(e,t,r){return(t=iF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iF(e){var t=sF(e,"string");return typeof t=="symbol"?t:t+""}function sF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function lF(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function oF(e){var t,r,n,i,l,o,c=JR(),[f,h]=w.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));w.useEffect(()=>{var j=S=>{if(S.key==="Escape"){var N,O,P,E;h({dismissed:!0,dismissedAtCoordinate:{x:(N=(O=e.coordinate)===null||O===void 0?void 0:O.x)!==null&&N!==void 0?N:0,y:(P=(E=e.coordinate)===null||E===void 0?void 0:E.y)!==null&&P!==void 0?P:0}})}};return document.addEventListener("keydown",j),()=>{document.removeEventListener("keydown",j)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),f.dismissed&&(((n=(i=e.coordinate)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)!==f.dismissedAtCoordinate.x||((l=(o=e.coordinate)===null||o===void 0?void 0:o.y)!==null&&l!==void 0?l:0)!==f.dismissedAtCoordinate.y)&&h(oo(oo({},f),{},{dismissed:!1}));var{cssClasses:p,cssProperties:y}=rF({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),v=e.hasPortalFromProps?{}:oo(oo({transition:lF({prefersReducedMotion:c,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},y),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),x=oo(oo({},v),{},{visibility:!f.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return w.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:p,style:x,ref:e.innerRef},e.children)}var uF=w.memo(oF),e4=()=>{var e;return(e=ge(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rb.apply(null,arguments)}function RA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function DA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RA(Object(r),!0).forEach(function(n){cF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cF(e,t,r){return(t=dF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function dF(e){var t=fF(e,"string");return typeof t=="symbol"?t:t+""}function fF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var kA={curveBasisClosed:w6,curveBasisOpen:N6,curveBasis:S6,curveBumpX:o6,curveBumpY:u6,curveLinearClosed:O6,curveLinear:Gm,curveMonotoneX:_6,curveMonotoneY:E6,curveNatural:A6,curveStep:P6,curveStepAfter:C6,curveStepBefore:T6},im=e=>Be(e.x)&&Be(e.y),IA=e=>e.base!=null&&im(e.base)&&im(e),pc=e=>e.x,yc=e=>e.y,hF=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(fd(e));if((r==="curveMonotone"||r==="curveBump")&&t){var n=kA["".concat(r).concat(t==="vertical"?"Y":"X")];if(n)return n}return kA[r]||Gm},LA={connectNulls:!1,type:"linear"},mF=e=>{var{type:t=LA.type,points:r=[],baseLine:n,layout:i,connectNulls:l=LA.connectNulls}=e,o=hF(t,i),c=l?r.filter(im):r;if(Array.isArray(n)){var f,h=r.map((j,S)=>DA(DA({},j),{},{base:n[S]}));i==="vertical"?f=th().y(yc).x1(pc).x0(j=>j.base.x):f=th().x(pc).y1(yc).y0(j=>j.base.y);var p=f.defined(IA).curve(o),y=l?h.filter(IA):h;return p(y)}var v;i==="vertical"&&pe(n)?v=th().y(yc).x1(pc).x0(n):pe(n)?v=th().x(pc).y1(yc).y0(n):v=AM().x(pc).y(yc);var x=v.defined(im).curve(o);return x(c)},t4=e=>{var{className:t,points:r,path:n,pathRef:i}=e,l=ml();if((!r||!r.length)&&!n)return null;var o={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||l,connectNulls:e.connectNulls},c=r&&r.length?mF(o):n;return w.createElement("path",rb({},In(e),cj(e),{className:Xe("recharts-curve",t),d:c===null?void 0:c,ref:i}))},pF=["x","y","top","left","width","height","className"];function nb(){return nb=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},nb.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 yF(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){vF(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 vF(e,t,r){return(t=gF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gF(e){var t=xF(e,"string");return typeof t=="symbol"?t:t+""}function xF(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 bF(e,t){if(e==null)return{};var r,n,i=jF(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jF(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 SF=(e,t,r,n,i,l)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(l,",").concat(t,"h").concat(r),wF=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:l=0,height:o=0,className:c}=e,f=bF(e,pF),h=yF({x:t,y:r,top:n,left:i,width:l,height:o},f);return!pe(t)||!pe(r)||!pe(l)||!pe(o)||!pe(n)||!pe(i)?null:w.createElement("path",nb({},Nr(h),{className:Xe("recharts-cross",c),d:SF(t,r,l,o,n,i)}))};function NF(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function zA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function BA(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zA(Object(r),!0).forEach(function(n){OF(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 OF(e,t,r){return(t=_F(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _F(e){var t=EF(e,"string");return typeof t=="symbol"?t:t+""}function EF(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 AF=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),r4=(e,t,r)=>e.map(n=>"".concat(AF(n)," ").concat(t,"ms ").concat(r)).join(","),PF=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),Yc=(e,t)=>Object.keys(t).reduce((r,n)=>BA(BA({},r),{},{[n]:e(n,t[n])}),{});function UA(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?UA(Object(r),!0).forEach(function(n){TF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):UA(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function TF(e,t,r){return(t=CF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function CF(e){var t=MF(e,"string");return typeof t=="symbol"?t:t+""}function MF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sm=(e,t,r)=>e+(t-e)*r,ab=e=>{var{from:t,to:r}=e;return t!==r},n4=(e,t,r)=>{var n=Yc((i,l)=>{if(ab(l)){var[o,c]=e(l.from,l.to,l.velocity);return Lt(Lt({},l),{},{from:o,velocity:c})}return l},t);return r<1?Yc((i,l)=>ab(l)&&n[i]!=null?Lt(Lt({},l),{},{velocity:sm(l.velocity,n[i].velocity,r),from:sm(l.from,n[i].from,r)}):l,t):n4(e,n,r-1)};function RF(e,t,r,n,i,l){var o,c=n.reduce((v,x)=>Lt(Lt({},v),{},{[x]:{from:e[x],velocity:0,to:t[x]}}),{}),f=()=>Yc((v,x)=>x.from,c),h=()=>!Object.values(c).filter(ab).length,p=null,y=v=>{o||(o=v);var x=v-o,j=x/r.dt;c=n4(r,c,j),i(Lt(Lt(Lt({},e),t),f())),o=v,h()||(p=l.setTimeout(y))};return()=>(p=l.setTimeout(y),()=>{var v;(v=p)===null||v===void 0||v()})}function DF(e,t,r,n,i,l,o){var c=null,f=i.reduce((y,v)=>{var x=e[v],j=t[v];return x==null||j==null?y:Lt(Lt({},y),{},{[v]:[x,j]})},{}),h,p=y=>{h||(h=y);var v=(y-h)/n,x=Yc((S,N)=>sm(...N,r(v)),f);if(l(Lt(Lt(Lt({},e),t),x)),v<1)c=o.setTimeout(p);else{var j=Yc((S,N)=>sm(...N,r(1)),f);l(Lt(Lt(Lt({},e),t),j))}};return()=>(c=o.setTimeout(p),()=>{var y;(y=c)===null||y===void 0||y()})}const kF=(e,t,r,n,i,l)=>{var o=PF(e,t);return r==null?()=>(i(Lt(Lt({},e),t)),()=>{}):r.isStepper===!0?RF(e,t,r,o,i,l):DF(e,t,r,n,o,i,l)};var lm=1e-4,a4=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],i4=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),qA=(e,t)=>r=>{var n=a4(e,t);return i4(n,r)},IF=(e,t)=>r=>{var n=a4(e,t),i=[...n.map((l,o)=>l*o).slice(1),0];return i4(i,r)},LF=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(l=>parseFloat(l));return[i[0],i[1],i[2],i[3]]},$F=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=LF(r[0]);if(i)return i}}return r.length===4?r:[0,0,1,1]},zF=(e,t,r,n)=>{var i=qA(e,r),l=qA(t,n),o=IF(e,r),c=h=>h>1?1:h<0?0:h,f=h=>{for(var p=h>1?1:h,y=p,v=0;v<8;++v){var x=i(y)-p,j=o(y);if(Math.abs(x-p)<lm||j<lm)return l(y);y=c(y-x/j)}return l(y)};return f.isStepper=!1,f},HA=function(){return zF(...$F(...arguments))},BF=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,l=(o,c,f)=>{var h=-(o-c)*r,p=f*n,y=f+(h-p)*i/1e3,v=f*i/1e3+o;return Math.abs(v-c)<lm&&Math.abs(y)<lm?[c,0]:[v,y]};return l.isStepper=!0,l.dt=i,l},UF=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return HA(e);case"spring":return BF();default:if(e.split("(")[0]==="cubic-bezier")return HA(e)}return typeof e=="function"?e:null};function qF(e){var t,r=()=>null,n=!1,i=null,l=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var c=o,[f,...h]=c;if(typeof f=="number"){i=e.setTimeout(l.bind(null,h),f);return}l(f),i=e.setTimeout(l.bind(null,h));return}typeof o=="string"&&(t=o,r(t)),typeof o=="object"&&(t=o,r(t)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,i&&(i(),i=null),l(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>e}}class HF{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,l=o=>{o-n>=r?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(l))};return i=requestAnimationFrame(l),()=>{i!=null&&cancelAnimationFrame(i)}}}function FF(){return qF(new HF)}var KF=w.createContext(FF);function GF(e,t){var r=w.useContext(KF);return w.useMemo(()=>t??r(e),[e,t,r])}var YF={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},FA={t:0},T0={t:1};function mp(e){var t=lr(e,YF),{isActive:r,canBegin:n,duration:i,easing:l,begin:o,onAnimationEnd:c,onAnimationStart:f,children:h}=t,p=JR(),y=r==="auto"?!gd.isSsr&&!p:r,v=GF(t.animationId,t.animationManager),[x,j]=w.useState(y?FA:T0),S=w.useRef(null);return w.useEffect(()=>{y||j(T0)},[y]),w.useEffect(()=>{if(!y||!n)return hl;var N=kF(FA,T0,UF(l),i,j,v.getTimeoutController()),O=()=>{S.current=N()};return v.start([f,o,O,i,c]),()=>{v.stop(),S.current&&S.current(),c()}},[y,n,i,l,o,f,c,v]),h(x.t)}function pp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=w.useRef(Bc(t)),n=w.useRef(e);return n.current!==e&&(r.current=Bc(t),n.current=e),r.current}var VF=["radius"],QF=["radius"],KA,GA,YA,VA,QA,XA,ZA,WA,JA,eP;function tP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function rP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tP(Object(r),!0).forEach(function(n){XF(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 XF(e,t,r){return(t=ZF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZF(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)}function om(){return om=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},om.apply(null,arguments)}function nP(e,t){if(e==null)return{};var r,n,i=JF(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function JF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Yn(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var aP=(e,t,r,n,i)=>{var l=Vi(r),o=Vi(n),c=Math.min(Math.abs(l)/2,Math.abs(o)/2),f=o>=0?1:-1,h=l>=0?1:-1,p=o>=0&&l>=0||o<0&&l<0?1:0,y;if(c>0&&Array.isArray(i)){for(var v=[0,0,0,0],x=0,j=4;x<j;x++){var S,N=(S=i[x])!==null&&S!==void 0?S:0;v[x]=N>c?c:N}y=bt(KA||(KA=Yn(["M",",",""])),e,t+f*v[0]),v[0]>0&&(y+=bt(GA||(GA=Yn(["A ",",",",0,0,",",",",",""])),v[0],v[0],p,e+h*v[0],t)),y+=bt(YA||(YA=Yn(["L ",",",""])),e+r-h*v[1],t),v[1]>0&&(y+=bt(VA||(VA=Yn(["A ",",",",0,0,",`,
|
|
81
|
-
`,",",""])),v[1],v[1],p,e+r,t+f*v[1])),y+=bt(QA||(QA=Yn(["L ",",",""])),e+r,t+n-f*v[2]),v[2]>0&&(y+=bt(XA||(XA=Yn(["A ",",",",0,0,",`,
|
|
82
|
-
`,",",""])),v[2],v[2],p,e+r-h*v[2],t+n)),y+=bt(ZA||(ZA=Yn(["L ",",",""])),e+h*v[3],t+n),v[3]>0&&(y+=bt(WA||(WA=Yn(["A ",",",",0,0,",`,
|
|
83
|
-
`,",",""])),v[3],v[3],p,e,t+n-f*v[3])),y+="Z"}else if(c>0&&i===+i&&i>0){var O=Math.min(c,i);y=bt(JA||(JA=Yn(["M ",",",`
|
|
84
|
-
A `,",",",0,0,",",",",",`
|
|
85
|
-
L `,",",`
|
|
86
|
-
A `,",",",0,0,",",",",",`
|
|
87
|
-
L `,",",`
|
|
88
|
-
A `,",",",0,0,",",",",",`
|
|
89
|
-
L `,",",`
|
|
90
|
-
A `,",",",0,0,",",",","," Z"])),e,t+f*O,O,O,p,e+h*O,t,e+r-h*O,t,O,O,p,e+r,t+f*O,e+r,t+n-f*O,O,O,p,e+r-h*O,t+n,e+h*O,t+n,O,O,p,e,t+n-f*O)}else y=bt(eP||(eP=Yn(["M ",","," h "," v "," h "," Z"])),e,t,r,n,-r);return y},iP={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},s4=e=>{var t=lr(e,iP),r=w.useRef(null),[n,i]=w.useState(-1);w.useEffect(()=>{if(r.current&&r.current.getTotalLength)try{var K=r.current.getTotalLength();K&&i(K)}catch{}},[]);var{x:l,y:o,width:c,height:f,radius:h,className:p}=t,{animationEasing:y,animationDuration:v,animationBegin:x,isAnimationActive:j,isUpdateAnimationActive:S}=t,N=w.useRef(c),O=w.useRef(f),P=w.useRef(l),E=w.useRef(o),A=w.useMemo(()=>({x:l,y:o,width:c,height:f,radius:h}),[l,o,c,f,h]),T=pp(A,"rectangle-");if(l!==+l||o!==+o||c!==+c||f!==+f||c===0||f===0)return null;var M=Xe("recharts-rectangle",p);if(!S){var R=Nr(t),{radius:I}=R,$=nP(R,VF);return w.createElement("path",om({},$,{x:Vi(l),y:Vi(o),width:Vi(c),height:Vi(f),radius:typeof h=="number"?h:void 0,className:M,d:aP(l,o,c,f,h)}))}var D=N.current,H=O.current,q=P.current,ae=E.current,Q="0px ".concat(n===-1?1:n,"px"),Z="".concat(n,"px ").concat(n,"px"),B=r4(["strokeDasharray"],v,typeof y=="string"?y:iP.animationEasing);return w.createElement(mp,{animationId:T,key:T,canBegin:n>0,duration:v,easing:y,isActive:S,begin:x},K=>{var ee=jt(D,c,K),se=jt(H,f,K),ue=jt(q,l,K),k=jt(ae,o,K);r.current&&(N.current=ee,O.current=se,P.current=ue,E.current=k);var W;j?K>0?W={transition:B,strokeDasharray:Z}:W={strokeDasharray:Q}:W={strokeDasharray:Z};var oe=Nr(t),{radius:le}=oe,ye=nP(oe,QF);return w.createElement("path",om({},ye,{radius:typeof h=="number"?h:void 0,className:M,d:aP(ue,k,ee,se,h),ref:r,style:rP(rP({},W),t.style)}))})};function sP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lP(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sP(Object(r),!0).forEach(function(n){e7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e7(e,t,r){return(t=t7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t7(e){var t=r7(e,"string");return typeof t=="symbol"?t:t+""}function r7(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 um=Math.PI/180,n7=e=>e*180/Math.PI,ir=(e,t,r,n)=>({x:e+Math.cos(-um*n)*r,y:t+Math.sin(-um*n)*r}),a7=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},i7=(e,t)=>{var{x:r,y:n}=e,{x:i,y:l}=t;return Math.sqrt((r-i)**2+(n-l)**2)},s7=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:l}=t,o=i7({x:r,y:n},{x:i,y:l});if(o<=0)return{radius:o,angle:0};var c=(r-i)/o,f=Math.acos(c);return n>l&&(f=2*Math.PI-f),{radius:o,angle:n7(f),angleInRadian:f}},l7=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),l=Math.min(n,i);return{startAngle:t-l*360,endAngle:r-l*360}},o7=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),l=Math.floor(n/360),o=Math.min(i,l);return e+o*360},u7=(e,t)=>{var{relativeX:r,relativeY:n}=e,{radius:i,angle:l}=s7({x:r,y:n},t),{innerRadius:o,outerRadius:c}=t;if(i<o||i>c||i===0)return null;var{startAngle:f,endAngle:h}=l7(t),p=l,y;if(f<=h){for(;p>h;)p-=360;for(;p<f;)p+=360;y=p>=f&&p<=h}else{for(;p>f;)p-=360;for(;p<h;)p+=360;y=p>=h&&p<=f}return y?lP(lP({},t),{},{radius:i,angle:o7(p,t)}):null};function l4(e){var{cx:t,cy:r,radius:n,startAngle:i,endAngle:l}=e,o=ir(t,r,n,i),c=ir(t,r,n,l);return{points:[o,c],cx:t,cy:r,radius:n,startAngle:i,endAngle:l}}var oP,uP,cP,dP,fP,hP,mP;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 ks(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var c7=(e,t)=>{var r=zr(t-e),n=Math.min(Math.abs(t-e),359.999);return r*n},uh=e=>{var{cx:t,cy:r,radius:n,angle:i,sign:l,isExternal:o,cornerRadius:c,cornerIsExternal:f}=e,h=c*(o?1:-1)+n,p=Math.asin(c/h)/um,y=f?i:i+l*p,v=ir(t,r,h,y),x=ir(t,r,n,y),j=f?i-l*p:i,S=ir(t,r,h*Math.cos(p*um),j);return{center:v,circleTangency:x,lineTangency:S,theta:p}},o4=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:l,endAngle:o}=e,c=c7(l,o),f=l+c,h=ir(t,r,i,l),p=ir(t,r,i,f),y=bt(oP||(oP=ks(["M ",",",`
|
|
91
|
-
A `,",",`,0,
|
|
92
|
-
`,",",`,
|
|
93
|
-
`,",",`
|
|
94
|
-
`])),h.x,h.y,i,i,+(Math.abs(c)>180),+(l>f),p.x,p.y);if(n>0){var v=ir(t,r,n,l),x=ir(t,r,n,f);y+=bt(uP||(uP=ks(["L ",",",`
|
|
95
|
-
A `,",",`,0,
|
|
96
|
-
`,",",`,
|
|
97
|
-
`,","," Z"])),x.x,x.y,n,n,+(Math.abs(c)>180),+(l<=f),v.x,v.y)}else y+=bt(cP||(cP=ks(["L ",","," Z"])),t,r);return y},d7=e=>{var{cx:t,cy:r,innerRadius:n,outerRadius:i,cornerRadius:l,forceCornerRadius:o,cornerIsExternal:c,startAngle:f,endAngle:h}=e,p=zr(h-f),{circleTangency:y,lineTangency:v,theta:x}=uh({cx:t,cy:r,radius:i,angle:f,sign:p,cornerRadius:l,cornerIsExternal:c}),{circleTangency:j,lineTangency:S,theta:N}=uh({cx:t,cy:r,radius:i,angle:h,sign:-p,cornerRadius:l,cornerIsExternal:c}),O=c?Math.abs(f-h):Math.abs(f-h)-x-N;if(O<0)return o?bt(dP||(dP=ks(["M ",",",`
|
|
98
|
-
a`,",",",0,0,1,",`,0
|
|
99
|
-
a`,",",",0,0,1,",`,0
|
|
100
|
-
`])),v.x,v.y,l,l,l*2,l,l,-l*2):o4({cx:t,cy:r,innerRadius:n,outerRadius:i,startAngle:f,endAngle:h});var P=bt(fP||(fP=ks(["M ",",",`
|
|
101
|
-
A`,",",",0,0,",",",",",`
|
|
102
|
-
A`,",",",0,",",",",",",",`
|
|
103
|
-
A`,",",",0,0,",",",",",`
|
|
104
|
-
`])),v.x,v.y,l,l,+(p<0),y.x,y.y,i,i,+(O>180),+(p<0),j.x,j.y,l,l,+(p<0),S.x,S.y);if(n>0){var{circleTangency:E,lineTangency:A,theta:T}=uh({cx:t,cy:r,radius:n,angle:f,sign:p,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),{circleTangency:M,lineTangency:R,theta:I}=uh({cx:t,cy:r,radius:n,angle:h,sign:-p,isExternal:!0,cornerRadius:l,cornerIsExternal:c}),$=c?Math.abs(f-h):Math.abs(f-h)-T-I;if($<0&&l===0)return"".concat(P,"L").concat(t,",").concat(r,"Z");P+=bt(hP||(hP=ks(["L",",",`
|
|
105
|
-
A`,",",",0,0,",",",",",`
|
|
106
|
-
A`,",",",0,",",",",",",",`
|
|
107
|
-
A`,",",",0,0,",",",",","Z"])),R.x,R.y,l,l,+(p<0),M.x,M.y,n,n,+($>180),+(p>0),E.x,E.y,l,l,+(p<0),A.x,A.y)}else P+=bt(mP||(mP=ks(["L",",","Z"])),t,r);return P},f7={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},u4=e=>{var t=lr(e,f7),{cx:r,cy:n,innerRadius:i,outerRadius:l,cornerRadius:o,forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p,className:y}=t;if(l<i||h===p)return null;var v=Xe("recharts-sector",y),x=l-i,j=Ln(o,x,0,!0),S;return j>0&&Math.abs(h-p)<360?S=d7({cx:r,cy:n,innerRadius:i,outerRadius:l,cornerRadius:Math.min(j,x/2),forceCornerRadius:c,cornerIsExternal:f,startAngle:h,endAngle:p}):S=o4({cx:r,cy:n,innerRadius:i,outerRadius:l,startAngle:h,endAngle:p}),w.createElement("path",ib({},Nr(t),{className:v,d:S}))};function h7(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(HM(t)){if(e==="centric"){var{cx:n,cy:i,innerRadius:l,outerRadius:o,angle:c}=t,f=ir(n,i,l,c),h=ir(n,i,o,c);return[{x:f.x,y:f.y},{x:h.x,y:h.y}]}return l4(t)}}var C0={},M0={},R0={},pP;function m7(){return pP||(pP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rR();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(R0)),R0}var yP;function p7(){return yP||(yP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=m7();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})(M0)),M0}var vP;function y7(){return vP||(vP=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nR(),r=p7();function n(i,l,o){o&&typeof o!="number"&&t.isIterateeCall(i,l,o)&&(l=o=void 0),i=r.toFinite(i),l===void 0?(l=i,i=0):l=r.toFinite(l),o=o===void 0?i<l?1:-1:r.toFinite(o);const c=Math.max(Math.ceil((l-i)/(o||1)),0),f=new Array(c);for(let h=0;h<c;h++)f[h]=i,i+=o;return f}e.range=n})(C0)),C0}var D0,gP;function v7(){return gP||(gP=1,D0=y7().range),D0}var g7=v7();const c4=ns(g7);var Un=e=>e.chartData,Ej=V([Un],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),xd=(e,t,r,n)=>n?Ej(e):Un(e),x7=(e,t,r)=>r?Ej(e):Un(e),b7=V([xd],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});V([Ej],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});var j7=V([Un],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:n}=e;return t!=null?t.slice(r,n+1):[]});function na(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Be(t)&&Be(r))return!0}return!1}function xP(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function d4(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,l;if(Be(r))i=r;else if(typeof r=="function")return;if(Be(n))l=n;else if(typeof n=="function")return;var o=[i,l];if(na(o))return o}}function S7(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(na(n))return xP(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,l]=e,o,c;if(i==="auto")t!=null&&(o=Math.min(...t));else if(pe(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t==null?void 0:t[0]))}catch{}else if(typeof i=="string"&&oA.test(i)){var f=oA.exec(i);if(f==null||f[1]==null||t==null)o=void 0;else{var h=+f[1];o=t[0]-h}}else o=t==null?void 0:t[0];if(l==="auto")t!=null&&(c=Math.max(...t));else if(pe(l))c=l;else if(typeof l=="function")try{t!=null&&(c=l(t==null?void 0:t[1]))}catch{}else if(typeof l=="string"&&uA.test(l)){var p=uA.exec(l);if(p==null||p[1]==null||t==null)c=void 0;else{var y=+p[1];c=t[1]+y}}else c=t==null?void 0:t[1];var v=[o,c];if(na(v))return t==null?v:xP(v,t,r)}}}var au=1e9,w7={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},Pj,ht=!0,On="[DecimalError] ",Js=On+"Invalid argument: ",Aj=On+"Exponent out of range: ",iu=Math.floor,Cs=Math.pow,N7=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Wr,Ft=1e7,ot=7,f4=9007199254740991,cm=iu(f4/ot),he={};he.absoluteValue=he.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};he.comparedTo=he.cmp=function(e){var t,r,n,i,l=this;if(e=new l.constructor(e),l.s!==e.s)return l.s||-e.s;if(l.e!==e.e)return l.e>e.e^l.s<0?1:-1;for(n=l.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(l.d[t]!==e.d[t])return l.d[t]>e.d[t]^l.s<0?1:-1;return n===i?0:n>i^l.s<0?1:-1};he.decimalPlaces=he.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*ot;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};he.dividedBy=he.div=function(e){return Ha(this,new this.constructor(e))};he.dividedToIntegerBy=he.idiv=function(e){var t=this,r=t.constructor;return nt(Ha(t,new r(e),0,1),r.precision)};he.equals=he.eq=function(e){return!this.cmp(e)};he.exponent=function(){return Rt(this)};he.greaterThan=he.gt=function(e){return this.cmp(e)>0};he.greaterThanOrEqualTo=he.gte=function(e){return this.cmp(e)>=0};he.isInteger=he.isint=function(){return this.e>this.d.length-2};he.isNegative=he.isneg=function(){return this.s<0};he.isPositive=he.ispos=function(){return this.s>0};he.isZero=function(){return this.s===0};he.lessThan=he.lt=function(e){return this.cmp(e)<0};he.lessThanOrEqualTo=he.lte=function(e){return this.cmp(e)<1};he.logarithm=he.log=function(e){var t,r=this,n=r.constructor,i=n.precision,l=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Wr))throw Error(On+"NaN");if(r.s<1)throw Error(On+(r.s?"NaN":"-Infinity"));return r.eq(Wr)?new n(0):(ht=!1,t=Ha(Vc(r,l),Vc(e,l),l),ht=!0,nt(t,i))};he.minus=he.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?p4(t,e):h4(t,(e.s=-e.s,e))};he.modulo=he.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(On+"NaN");return r.s?(ht=!1,t=Ha(r,e,0,1).times(e),ht=!0,r.minus(t)):nt(new n(r),i)};he.naturalExponential=he.exp=function(){return m4(this)};he.naturalLogarithm=he.ln=function(){return Vc(this)};he.negated=he.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};he.plus=he.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?h4(t,e):p4(t,(e.s=-e.s,e))};he.precision=he.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Js+e);if(t=Rt(i)+1,n=i.d.length-1,r=n*ot+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r};he.squareRoot=he.sqrt=function(){var e,t,r,n,i,l,o,c=this,f=c.constructor;if(c.s<1){if(!c.s)return new f(0);throw Error(On+"NaN")}for(e=Rt(c),ht=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=ra(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=iu((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new f(t)):n=new f(i.toString()),r=f.precision,i=o=r+3;;)if(l=n,n=l.plus(Ha(c,l,o+2)).times(.5),ra(l.d).slice(0,o)===(t=ra(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(nt(l,r+1,0),l.times(l).eq(c)){n=l;break}}else if(t!="9999")break;o+=4}return ht=!0,nt(n,r)};he.times=he.mul=function(e){var t,r,n,i,l,o,c,f,h,p=this,y=p.constructor,v=p.d,x=(e=new y(e)).d;if(!p.s||!e.s)return new y(0);for(e.s*=p.s,r=p.e+e.e,f=v.length,h=x.length,f<h&&(l=v,v=x,x=l,o=f,f=h,h=o),l=[],o=f+h,n=o;n--;)l.push(0);for(n=h;--n>=0;){for(t=0,i=f+n;i>n;)c=l[i]+x[n]*v[i-n-1]+t,l[i--]=c%Ft|0,t=c/Ft|0;l[i]=(l[i]+t)%Ft|0}for(;!l[--o];)l.pop();return t?++r:l.shift(),e.d=l,e.e=r,ht?nt(e,y.precision):e};he.toDecimalPlaces=he.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(oa(e,0,au),t===void 0?t=n.rounding:oa(t,0,8),nt(r,e+Rt(r)+1,t))};he.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ll(n,!0):(oa(e,0,au),t===void 0?t=i.rounding:oa(t,0,8),n=nt(new i(n),e+1,t),r=ll(n,!0,e+1)),r};he.toFixed=function(e,t){var r,n,i=this,l=i.constructor;return e===void 0?ll(i):(oa(e,0,au),t===void 0?t=l.rounding:oa(t,0,8),n=nt(new l(i),e+Rt(i)+1,t),r=ll(n.abs(),!1,e+Rt(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};he.toInteger=he.toint=function(){var e=this,t=e.constructor;return nt(new t(e),Rt(e)+1,t.rounding)};he.toNumber=function(){return+this};he.toPower=he.pow=function(e){var t,r,n,i,l,o,c=this,f=c.constructor,h=12,p=+(e=new f(e));if(!e.s)return new f(Wr);if(c=new f(c),!c.s){if(e.s<1)throw Error(On+"Infinity");return c}if(c.eq(Wr))return c;if(n=f.precision,e.eq(Wr))return nt(c,n);if(t=e.e,r=e.d.length-1,o=t>=r,l=c.s,o){if((r=p<0?-p:p)<=f4){for(i=new f(Wr),t=Math.ceil(n/ot+4),ht=!1;r%2&&(i=i.times(c),jP(i.d,t)),r=iu(r/2),r!==0;)c=c.times(c),jP(c.d,t);return ht=!0,e.s<0?new f(Wr).div(i):nt(i,n)}}else if(l<0)throw Error(On+"NaN");return l=l<0&&e.d[Math.max(t,r)]&1?-1:1,c.s=1,ht=!1,i=e.times(Vc(c,n+h)),ht=!0,i=m4(i),i.s=l,i};he.toPrecision=function(e,t){var r,n,i=this,l=i.constructor;return e===void 0?(r=Rt(i),n=ll(i,r<=l.toExpNeg||r>=l.toExpPos)):(oa(e,1,au),t===void 0?t=l.rounding:oa(t,0,8),i=nt(new l(i),e,t),r=Rt(i),n=ll(i,e<=r||r<=l.toExpNeg,e)),n};he.toSignificantDigits=he.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(oa(e,1,au),t===void 0?t=n.rounding:oa(t,0,8)),nt(new n(r),e,t)};he.toString=he.valueOf=he.val=he.toJSON=he[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Rt(e),r=e.constructor;return ll(e,t<=r.toExpNeg||t>=r.toExpPos)};function h4(e,t){var r,n,i,l,o,c,f,h,p=e.constructor,y=p.precision;if(!e.s||!t.s)return t.s||(t=new p(e)),ht?nt(t,y):t;if(f=e.d,h=t.d,o=e.e,i=t.e,f=f.slice(),l=o-i,l){for(l<0?(n=f,l=-l,c=h.length):(n=h,i=o,c=f.length),o=Math.ceil(y/ot),c=o>c?o+1:c+1,l>c&&(l=c,n.length=1),n.reverse();l--;)n.push(0);n.reverse()}for(c=f.length,l=h.length,c-l<0&&(l=c,n=h,h=f,f=n),r=0;l;)r=(f[--l]=f[l]+h[l]+r)/Ft|0,f[l]%=Ft;for(r&&(f.unshift(r),++i),c=f.length;f[--c]==0;)f.pop();return t.d=f,t.e=i,ht?nt(t,y):t}function oa(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Js+e)}function ra(e){var t,r,n,i=e.length-1,l="",o=e[0];if(i>0){for(l+=o,t=1;t<i;t++)n=e[t]+"",r=ot-n.length,r&&(l+=Ri(r)),l+=n;o=e[t],n=o+"",r=ot-n.length,r&&(l+=Ri(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return l+o}var Ha=(function(){function e(n,i){var l,o=0,c=n.length;for(n=n.slice();c--;)l=n[c]*i+o,n[c]=l%Ft|0,o=l/Ft|0;return o&&n.unshift(o),n}function t(n,i,l,o){var c,f;if(l!=o)f=l>o?1:-1;else for(c=f=0;c<l;c++)if(n[c]!=i[c]){f=n[c]>i[c]?1:-1;break}return f}function r(n,i,l){for(var o=0;l--;)n[l]-=o,o=n[l]<i[l]?1:0,n[l]=o*Ft+n[l]-i[l];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,l,o){var c,f,h,p,y,v,x,j,S,N,O,P,E,A,T,M,R,I,$=n.constructor,D=n.s==i.s?1:-1,H=n.d,q=i.d;if(!n.s)return new $(n);if(!i.s)throw Error(On+"Division by zero");for(f=n.e-i.e,R=q.length,T=H.length,x=new $(D),j=x.d=[],h=0;q[h]==(H[h]||0);)++h;if(q[h]>(H[h]||0)&&--f,l==null?P=l=$.precision:o?P=l+(Rt(n)-Rt(i))+1:P=l,P<0)return new $(0);if(P=P/ot+2|0,h=0,R==1)for(p=0,q=q[0],P++;(h<T||p)&&P--;h++)E=p*Ft+(H[h]||0),j[h]=E/q|0,p=E%q|0;else{for(p=Ft/(q[0]+1)|0,p>1&&(q=e(q,p),H=e(H,p),R=q.length,T=H.length),A=R,S=H.slice(0,R),N=S.length;N<R;)S[N++]=0;I=q.slice(),I.unshift(0),M=q[0],q[1]>=Ft/2&&++M;do p=0,c=t(q,S,R,N),c<0?(O=S[0],R!=N&&(O=O*Ft+(S[1]||0)),p=O/M|0,p>1?(p>=Ft&&(p=Ft-1),y=e(q,p),v=y.length,N=S.length,c=t(y,S,v,N),c==1&&(p--,r(y,R<v?I:q,v))):(p==0&&(c=p=1),y=q.slice()),v=y.length,v<N&&y.unshift(0),r(S,y,N),c==-1&&(N=S.length,c=t(q,S,R,N),c<1&&(p++,r(S,R<N?I:q,N))),N=S.length):c===0&&(p++,S=[0]),j[h++]=p,c&&S[0]?S[N++]=H[A]||0:(S=[H[A]],N=1);while((A++<T||S[0]!==void 0)&&P--)}return j[0]||j.shift(),x.e=f,nt(x,o?l+Rt(x)+1:l)}})();function m4(e,t){var r,n,i,l,o,c,f=0,h=0,p=e.constructor,y=p.precision;if(Rt(e)>16)throw Error(Aj+Rt(e));if(!e.s)return new p(Wr);for(ht=!1,c=y,o=new p(.03125);e.abs().gte(.1);)e=e.times(o),h+=5;for(n=Math.log(Cs(2,h))/Math.LN10*2+5|0,c+=n,r=i=l=new p(Wr),p.precision=c;;){if(i=nt(i.times(e),c),r=r.times(++f),o=l.plus(Ha(i,r,c)),ra(o.d).slice(0,c)===ra(l.d).slice(0,c)){for(;h--;)l=nt(l.times(l),c);return p.precision=y,t==null?(ht=!0,nt(l,y)):l}l=o}}function Rt(e){for(var t=e.e*ot,r=e.d[0];r>=10;r/=10)t++;return t}function k0(e,t,r){if(t>e.LN10.sd())throw ht=!0,r&&(e.precision=r),Error(On+"LN10 precision limit exceeded");return nt(new e(e.LN10),t)}function Ri(e){for(var t="";e--;)t+="0";return t}function Vc(e,t){var r,n,i,l,o,c,f,h,p,y=1,v=10,x=e,j=x.d,S=x.constructor,N=S.precision;if(x.s<1)throw Error(On+(x.s?"NaN":"-Infinity"));if(x.eq(Wr))return new S(0);if(t==null?(ht=!1,h=N):h=t,x.eq(10))return t==null&&(ht=!0),k0(S,h);if(h+=v,S.precision=h,r=ra(j),n=r.charAt(0),l=Rt(x),Math.abs(l)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)x=x.times(e),r=ra(x.d),n=r.charAt(0),y++;l=Rt(x),n>1?(x=new S("0."+r),l++):x=new S(n+"."+r.slice(1))}else return f=k0(S,h+2,N).times(l+""),x=Vc(new S(n+"."+r.slice(1)),h-v).plus(f),S.precision=N,t==null?(ht=!0,nt(x,N)):x;for(c=o=x=Ha(x.minus(Wr),x.plus(Wr),h),p=nt(x.times(x),h),i=3;;){if(o=nt(o.times(p),h),f=c.plus(Ha(o,new S(i),h)),ra(f.d).slice(0,h)===ra(c.d).slice(0,h))return c=c.times(2),l!==0&&(c=c.plus(k0(S,h+2,N).times(l+""))),c=Ha(c,new S(y),h),S.precision=N,t==null?(ht=!0,nt(c,N)):c;c=f,i+=2}}function bP(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=iu(r/ot),e.d=[],n=(r+1)%ot,r<0&&(n+=ot),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=ot;n<i;)e.d.push(+t.slice(n,n+=ot));t=t.slice(n),n=ot-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),ht&&(e.e>cm||e.e<-cm))throw Error(Aj+r)}else e.s=0,e.e=0,e.d=[0];return e}function nt(e,t,r){var n,i,l,o,c,f,h,p,y=e.d;for(o=1,l=y[0];l>=10;l/=10)o++;if(n=t-o,n<0)n+=ot,i=t,h=y[p=0];else{if(p=Math.ceil((n+1)/ot),l=y.length,p>=l)return e;for(h=l=y[p],o=1;l>=10;l/=10)o++;n%=ot,i=n-ot+o}if(r!==void 0&&(l=Cs(10,o-i-1),c=h/l%10|0,f=t<0||y[p+1]!==void 0||h%l,f=r<4?(c||f)&&(r==0||r==(e.s<0?3:2)):c>5||c==5&&(r==4||f||r==6&&(n>0?i>0?h/Cs(10,o-i):0:y[p-1])%10&1||r==(e.s<0?8:7))),t<1||!y[0])return f?(l=Rt(e),y.length=1,t=t-l-1,y[0]=Cs(10,(ot-t%ot)%ot),e.e=iu(-t/ot)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(n==0?(y.length=p,l=1,p--):(y.length=p+1,l=Cs(10,ot-n),y[p]=i>0?(h/Cs(10,o-i)%Cs(10,i)|0)*l:0),f)for(;;)if(p==0){(y[0]+=l)==Ft&&(y[0]=1,++e.e);break}else{if(y[p]+=l,y[p]!=Ft)break;y[p--]=0,l=1}for(n=y.length;y[--n]===0;)y.pop();if(ht&&(e.e>cm||e.e<-cm))throw Error(Aj+Rt(e));return e}function p4(e,t){var r,n,i,l,o,c,f,h,p,y,v=e.constructor,x=v.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new v(e),ht?nt(t,x):t;if(f=e.d,y=t.d,n=t.e,h=e.e,f=f.slice(),o=h-n,o){for(p=o<0,p?(r=f,o=-o,c=y.length):(r=y,n=h,c=f.length),i=Math.max(Math.ceil(x/ot),c)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=f.length,c=y.length,p=i<c,p&&(c=i),i=0;i<c;i++)if(f[i]!=y[i]){p=f[i]<y[i];break}o=0}for(p&&(r=f,f=y,y=r,t.s=-t.s),c=f.length,i=y.length-c;i>0;--i)f[c++]=0;for(i=y.length;i>o;){if(f[--i]<y[i]){for(l=i;l&&f[--l]===0;)f[l]=Ft-1;--f[l],f[i]+=Ft}f[i]-=y[i]}for(;f[--c]===0;)f.pop();for(;f[0]===0;f.shift())--n;return f[0]?(t.d=f,t.e=n,ht?nt(t,x):t):new v(0)}function ll(e,t,r){var n,i=Rt(e),l=ra(e.d),o=l.length;return t?(r&&(n=r-o)>0?l=l.charAt(0)+"."+l.slice(1)+Ri(n):o>1&&(l=l.charAt(0)+"."+l.slice(1)),l=l+(i<0?"e":"e+")+i):i<0?(l="0."+Ri(-i-1)+l,r&&(n=r-o)>0&&(l+=Ri(n))):i>=o?(l+=Ri(i+1-o),r&&(n=r-i-1)>0&&(l=l+"."+Ri(n))):((n=i+1)<o&&(l=l.slice(0,n)+"."+l.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(l+="."),l+=Ri(n))),e.s<0?"-"+l:l}function jP(e,t){if(e.length>t)return e.length=t,!0}function y4(e){var t,r,n;function i(l){var o=this;if(!(o instanceof i))return new i(l);if(o.constructor=i,l instanceof i){o.s=l.s,o.e=l.e,o.d=(l=l.d)?l.slice():l;return}if(typeof l=="number"){if(l*0!==0)throw Error(Js+l);if(l>0)o.s=1;else if(l<0)l=-l,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(l===~~l&&l<1e7){o.e=0,o.d=[l];return}return bP(o,l.toString())}else if(typeof l!="string")throw Error(Js+l);if(l.charCodeAt(0)===45?(l=l.slice(1),o.s=-1):o.s=1,N7.test(l))bP(o,l);else throw Error(Js+l)}if(i.prototype=he,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=y4,i.config=i.set=O7,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 O7(e){if(!e||typeof e!="object")throw Error(On+"Object expected");var t,r,n,i=["precision",1,au,"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(iu(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Js+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Js+r+": "+n);return this}var Pj=y4(w7);Wr=new Pj(1);const ze=Pj;function v4(e){var t;return e===0?t=1:t=Math.floor(new ze(e).abs().log(10).toNumber())+1,t}function g4(e,t,r){for(var n=new ze(e),i=0,l=[];n.lt(t)&&i<1e5;)l.push(n.toNumber()),n=n.add(r),i++;return l}var x4=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},Tj=(e,t,r)=>{if(e.lte(0))return new ze(0);var n=v4(e.toNumber()),i=new ze(10).pow(n),l=e.div(i),o=n!==1?.05:.1,c=new ze(Math.ceil(l.div(o).toNumber())).add(r).mul(o),f=c.mul(i);return t?new ze(f.toNumber()):new ze(Math.ceil(f.toNumber()))},b4=(e,t,r)=>{var n;if(e.lte(0))return new ze(0);var i=[1,2,2.5,5],l=e.toNumber(),o=Math.floor(new ze(l).abs().log(10).toNumber()),c=new ze(10).pow(o),f=e.div(c).toNumber(),h=i.findIndex(x=>x>=f-1e-10);if(h===-1&&(c=c.mul(10),h=0),h+=r,h>=i.length){var p=Math.floor(h/i.length);h%=i.length,c=c.mul(new ze(10).pow(p))}var y=(n=i[h])!==null&&n!==void 0?n:1,v=new ze(y).mul(c);return t?v:new ze(Math.ceil(v.toNumber()))},_7=(e,t,r)=>{var n=new ze(1),i=new ze(e);if(!i.isint()&&r){var l=Math.abs(e);l<1?(n=new ze(10).pow(v4(e)-1),i=new ze(Math.floor(i.div(n).toNumber())).mul(n)):l>1&&(i=new ze(Math.floor(e)))}else e===0?i=new ze(Math.floor((t-1)/2)):r||(i=new ze(Math.floor(e)));for(var o=Math.floor((t-1)/2),c=[],f=0;f<t;f++)c.push(i.add(new ze(f-o).mul(n)).toNumber());return c},j4=function(t,r,n,i){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:Tj;if(!Number.isFinite((r-t)/(n-1)))return{step:new ze(0),tickMin:new ze(0),tickMax:new ze(0)};var c=o(new ze(r).sub(t).div(n-1),i,l),f;t<=0&&r>=0?f=new ze(0):(f=new ze(t).add(r).div(2),f=f.sub(new ze(f).mod(c)));var h=Math.ceil(f.sub(t).div(c).toNumber()),p=Math.ceil(new ze(r).sub(f).div(c).toNumber()),y=h+p+1;return y>n?j4(t,r,n,i,l+1,o):(y<n&&(p=r>0?p+(n-y):p,h=r>0?h:h+(n-y)),{step:c,tickMin:f.sub(new ze(h).mul(c)),tickMax:f.add(new ze(p).mul(c))})},SP=function(t){var[r,n]=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",c=Math.max(i,2),[f,h]=x4([r,n]);if(f===-1/0||h===1/0){var p=h===1/0?[f,...Array(i-1).fill(1/0)]:[...Array(i-1).fill(-1/0),h];return r>n?p.reverse():p}if(f===h)return _7(f,i,l);var y=o==="snap125"?b4:Tj,{step:v,tickMin:x,tickMax:j}=j4(f,h,c,l,0,y),S=g4(x,j.add(new ze(.1).mul(v)),v);return r>n?S.reverse():S},wP=function(t,r){var[n,i]=t,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[c,f]=x4([n,i]);if(c===-1/0||f===1/0)return[n,i];if(c===f)return[c];var h=o==="snap125"?b4:Tj,p=Math.max(r,2),y=h(new ze(f).sub(c).div(p-1),l,0),v=[...g4(new ze(c),new ze(f),y),f];return l===!1&&(v=v.map(x=>Math.round(x))),n>i?v.reverse():v},S4=e=>e.rootProps.maxBarSize,E7=e=>e.rootProps.barGap,w4=e=>e.rootProps.barCategoryGap,A7=e=>e.rootProps.barSize,yp=e=>e.rootProps.stackOffset,N4=e=>e.rootProps.reverseStackOrder,Cj=e=>e.options.chartName,Mj=e=>e.rootProps.syncId,O4=e=>e.rootProps.syncMethod,Rj=e=>e.options.eventEmitter,Kt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3},Os={allowDecimals:!1,allowDataOverflow:!1,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"auto"},Vn={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,includeHidden:!1,radiusAxisId:0,reversed:!1,scale:"auto",tick:!0,tickCount:5,type:"auto"},vp=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function gp(e,t,r){if(r!=="auto")return r;if(e!=null)return Za(e,t)?"category":"number"}function NP(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function dm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NP(Object(r),!0).forEach(function(n){P7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NP(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P7(e,t,r){return(t=T7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T7(e){var t=C7(e,"string");return typeof t=="symbol"?t:t+""}function C7(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OP={allowDataOverflow:Os.allowDataOverflow,allowDecimals:Os.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Os.angleAxisId,includeHidden:!1,name:void 0,reversed:Os.reversed,scale:Os.scale,tick:Os.tick,tickCount:void 0,ticks:void 0,type:Os.type,unit:void 0,niceTicks:"auto"},_P={allowDataOverflow:Vn.allowDataOverflow,allowDecimals:Vn.allowDecimals,allowDuplicatedCategory:Vn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Vn.radiusAxisId,includeHidden:Vn.includeHidden,name:void 0,reversed:Vn.reversed,scale:Vn.scale,tick:Vn.tick,tickCount:Vn.tickCount,ticks:void 0,type:Vn.type,unit:void 0,niceTicks:"auto"},M7=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},Dj=V([M7,FR],(e,t)=>{var r;if(e!=null)return e;var n=(r=gp(t,"angleAxis",OP.type))!==null&&r!==void 0?r:"category";return dm(dm({},OP),{},{type:n})}),R7=(e,t)=>e.polarAxis.radiusAxis[t],kj=V([R7,FR],(e,t)=>{var r;if(e!=null)return e;var n=(r=gp(t,"radiusAxis",_P.type))!==null&&r!==void 0?r:"category";return dm(dm({},_P),{},{type:n})}),xp=e=>e.polarOptions,Ij=V([Wa,Ja,Yt],a7),_4=V([xp,Ij],(e,t)=>{if(e!=null)return Ln(e.innerRadius,t,0)}),E4=V([xp,Ij],(e,t)=>{if(e!=null)return Ln(e.outerRadius,t,t*.8)}),D7=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},A4=V([xp],D7);V([Dj,A4],vp);var P4=V([Ij,_4,E4],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});V([kj,P4],vp);var T4=V([Ze,xp,_4,E4,Wa,Ja],(e,t,r,n,i,l)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:o,cy:c,startAngle:f,endAngle:h}=t;return{cx:Ln(o,i,i/2),cy:Ln(c,l,l/2),innerRadius:r,outerRadius:n,startAngle:f,endAngle:h,clockWise:!1}}}),Vt=(e,t)=>t,bp=(e,t,r)=>r;function Lj(e){return e==null?void 0:e.id}function C4(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:l}=r,o=new Map;return e.forEach(c=>{var f,h=(f=c.data)!==null&&f!==void 0?f:n;if(!(h==null||h.length===0)){var p=Lj(c);h.forEach((y,v)=>{var x=l==null||i?v:String(Ot(y,l,null)),j=Ot(y,c.dataKey,0),S;o.has(x)?S=o.get(x):S={},Object.assign(S,{[p]:j}),o.set(x,S)})}}),Array.from(o.values())}function jp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var Sp=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function wp(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function k7(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var Qt=e=>{var t=Ze(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},su=e=>e.tooltip.settings.axisId;function $j(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(l){function o(){return l.apply(this,arguments)}return o.toString=function(){return l.toString()},o})(()=>i),rangeMin:()=>i[0],rangeMax:()=>i[1],isInRange(l){var o=i[0],c=i[1];return o<=c?l>=o&&l<=c:l>=c&&l<=o},bandwidth:r?()=>r.call(e):void 0,ticks:t?l=>t.call(e,l):void 0,map:(l,o)=>{var c=e(l);if(c!=null){if(e.bandwidth&&o!==null&&o!==void 0&&o.position){var f=e.bandwidth();switch(o.position){case"middle":c+=f/2;break;case"end":c+=f;break}}return c}}}}}var I7=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!na(t)){for(var r,n,i=0;i<t.length;i++){var l=t[i];Be(l)&&((r===void 0||l<r)&&(r=l),(n===void 0||l>n)&&(n=l))}return r!==void 0&&n!==void 0?[r,n]:void 0}return t}default:return t}};function Wi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function L7(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function zj(e){let t,r,n;e.length!==2?(t=Wi,r=(c,f)=>Wi(e(c),f),n=(c,f)=>e(c)-f):(t=e===Wi||e===L7?e:$7,r=e,n=e);function i(c,f,h=0,p=c.length){if(h<p){if(t(f,f)!==0)return p;do{const y=h+p>>>1;r(c[y],f)<0?h=y+1:p=y}while(h<p)}return h}function l(c,f,h=0,p=c.length){if(h<p){if(t(f,f)!==0)return p;do{const y=h+p>>>1;r(c[y],f)<=0?h=y+1:p=y}while(h<p)}return h}function o(c,f,h=0,p=c.length){const y=i(c,f,h,p-1);return y>h&&n(c[y-1],f)>-n(c[y],f)?y-1:y}return{left:i,center:o,right:l}}function $7(){return 0}function M4(e){return e===null?NaN:+e}function*z7(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const B7=zj(Wi),bd=B7.right;zj(M4).center;class EP extends Map{constructor(t,r=H7){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(AP(this,t))}has(t){return super.has(AP(this,t))}set(t,r){return super.set(U7(this,t),r)}delete(t){return super.delete(q7(this,t))}}function AP({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function U7({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function q7({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function H7(e){return e!==null&&typeof e=="object"?e.valueOf():e}function F7(e=Wi){if(e===Wi)return R4;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 R4(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const K7=Math.sqrt(50),G7=Math.sqrt(10),Y7=Math.sqrt(2);function fm(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),l=n/Math.pow(10,i),o=l>=K7?10:l>=G7?5:l>=Y7?2:1;let c,f,h;return i<0?(h=Math.pow(10,-i)/o,c=Math.round(e*h),f=Math.round(t*h),c/h<e&&++c,f/h>t&&--f,h=-h):(h=Math.pow(10,i)*o,c=Math.round(e/h),f=Math.round(t/h),c*h<e&&++c,f*h>t&&--f),f<c&&.5<=r&&r<2?fm(e,t,r*2):[c,f,h]}function sb(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,l,o]=n?fm(t,e,r):fm(e,t,r);if(!(l>=i))return[];const c=l-i+1,f=new Array(c);if(n)if(o<0)for(let h=0;h<c;++h)f[h]=(l-h)/-o;else for(let h=0;h<c;++h)f[h]=(l-h)*o;else if(o<0)for(let h=0;h<c;++h)f[h]=(i+h)/-o;else for(let h=0;h<c;++h)f[h]=(i+h)*o;return f}function lb(e,t,r){return t=+t,e=+e,r=+r,fm(e,t,r)[2]}function ob(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?lb(t,e,r):lb(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function PP(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function TP(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function 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?R4:F7(i);n>r;){if(n-r>600){const f=n-r+1,h=t-r+1,p=Math.log(f),y=.5*Math.exp(2*p/3),v=.5*Math.sqrt(p*y*(f-y)/f)*(h-f/2<0?-1:1),x=Math.max(r,Math.floor(t-h*y/f+v)),j=Math.min(n,Math.floor(t+(f-h)*y/f+v));D4(e,t,x,j,i)}const l=e[t];let o=r,c=n;for(vc(e,r,t),i(e[n],l)>0&&vc(e,r,n);o<c;){for(vc(e,o,c),++o,--c;i(e[o],l)<0;)++o;for(;i(e[c],l)>0;)--c}i(e[r],l)===0?vc(e,r,c):(++c,vc(e,c,n)),c<=t&&(r=c+1),t<=c&&(n=c-1)}return e}function vc(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function V7(e,t,r){if(e=Float64Array.from(z7(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return TP(e);if(t>=1)return PP(e);var n,i=(n-1)*t,l=Math.floor(i),o=PP(D4(e,l).subarray(0,l+1)),c=TP(e.subarray(l+1));return o+(c-o)*(i-l)}}function Q7(e,t,r=M4){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,l=Math.floor(i),o=+r(e[l],l,e),c=+r(e[l+1],l+1,e);return o+(c-o)*(i-l)}}function X7(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,l=new Array(i);++n<i;)l[n]=e+n*r;return l}function _n(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function ei(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 ub=Symbol("implicit");function Bj(){var e=new EP,t=[],r=[],n=ub;function i(l){let o=e.get(l);if(o===void 0){if(n!==ub)return n;e.set(l,o=t.push(l)-1)}return r[o%r.length]}return i.domain=function(l){if(!arguments.length)return t.slice();t=[],e=new EP;for(const o of l)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(l){return arguments.length?(r=Array.from(l),i):r.slice()},i.unknown=function(l){return arguments.length?(n=l,i):n},i.copy=function(){return Bj(t,r).unknown(n)},_n.apply(i,arguments),i}function Uj(){var e=Bj().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,l,o,c=!1,f=0,h=0,p=.5;delete e.unknown;function y(){var v=t().length,x=i<n,j=x?i:n,S=x?n:i;l=(S-j)/Math.max(1,v-f+h*2),c&&(l=Math.floor(l)),j+=(S-j-l*(v-f))*p,o=l*(1-f),c&&(j=Math.round(j),o=Math.round(o));var N=X7(v).map(function(O){return j+l*O});return r(x?N.reverse():N)}return e.domain=function(v){return arguments.length?(t(v),y()):t()},e.range=function(v){return arguments.length?([n,i]=v,n=+n,i=+i,y()):[n,i]},e.rangeRound=function(v){return[n,i]=v,n=+n,i=+i,c=!0,y()},e.bandwidth=function(){return o},e.step=function(){return l},e.round=function(v){return arguments.length?(c=!!v,y()):c},e.padding=function(v){return arguments.length?(f=Math.min(1,h=+v),y()):f},e.paddingInner=function(v){return arguments.length?(f=Math.min(1,v),y()):f},e.paddingOuter=function(v){return arguments.length?(h=+v,y()):h},e.align=function(v){return arguments.length?(p=Math.max(0,Math.min(1,v)),y()):p},e.copy=function(){return Uj(t(),[n,i]).round(c).paddingInner(f).paddingOuter(h).align(p)},_n.apply(y(),arguments)}function k4(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return k4(t())},e}function Z7(){return k4(Uj.apply(null,arguments).paddingInner(1))}function qj(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function I4(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function jd(){}var Qc=.7,hm=1/Qc,No="\\s*([+-]?\\d+)\\s*",Xc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",aa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W7=/^#([0-9a-f]{3,8})$/,J7=new RegExp(`^rgb\\(${No},${No},${No}\\)$`),eK=new RegExp(`^rgb\\(${aa},${aa},${aa}\\)$`),tK=new RegExp(`^rgba\\(${No},${No},${No},${Xc}\\)$`),rK=new RegExp(`^rgba\\(${aa},${aa},${aa},${Xc}\\)$`),nK=new RegExp(`^hsl\\(${Xc},${aa},${aa}\\)$`),aK=new RegExp(`^hsla\\(${Xc},${aa},${aa},${Xc}\\)$`),CP={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};qj(jd,Zc,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:MP,formatHex:MP,formatHex8:iK,formatHsl:sK,formatRgb:RP,toString:RP});function MP(){return this.rgb().formatHex()}function iK(){return this.rgb().formatHex8()}function sK(){return L4(this).formatHsl()}function RP(){return this.rgb().formatRgb()}function Zc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=W7.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?DP(t):r===3?new Ur(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?ch(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?ch(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=J7.exec(e))?new Ur(t[1],t[2],t[3],1):(t=eK.exec(e))?new Ur(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=tK.exec(e))?ch(t[1],t[2],t[3],t[4]):(t=rK.exec(e))?ch(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=nK.exec(e))?LP(t[1],t[2]/100,t[3]/100,1):(t=aK.exec(e))?LP(t[1],t[2]/100,t[3]/100,t[4]):CP.hasOwnProperty(e)?DP(CP[e]):e==="transparent"?new Ur(NaN,NaN,NaN,0):null}function DP(e){return new Ur(e>>16&255,e>>8&255,e&255,1)}function ch(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ur(e,t,r,n)}function lK(e){return e instanceof jd||(e=Zc(e)),e?(e=e.rgb(),new Ur(e.r,e.g,e.b,e.opacity)):new Ur}function cb(e,t,r,n){return arguments.length===1?lK(e):new Ur(e,t,r,n??1)}function Ur(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}qj(Ur,cb,I4(jd,{brighter(e){return e=e==null?hm:Math.pow(hm,e),new Ur(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qc:Math.pow(Qc,e),new Ur(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ur(el(this.r),el(this.g),el(this.b),mm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kP,formatHex:kP,formatHex8:oK,formatRgb:IP,toString:IP}));function kP(){return`#${Is(this.r)}${Is(this.g)}${Is(this.b)}`}function oK(){return`#${Is(this.r)}${Is(this.g)}${Is(this.b)}${Is((isNaN(this.opacity)?1:this.opacity)*255)}`}function IP(){const e=mm(this.opacity);return`${e===1?"rgb(":"rgba("}${el(this.r)}, ${el(this.g)}, ${el(this.b)}${e===1?")":`, ${e})`}`}function mm(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function el(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Is(e){return e=el(e),(e<16?"0":"")+e.toString(16)}function LP(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new kn(e,t,r,n)}function L4(e){if(e instanceof kn)return new kn(e.h,e.s,e.l,e.opacity);if(e instanceof jd||(e=Zc(e)),!e)return new kn;if(e instanceof kn)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),l=Math.max(t,r,n),o=NaN,c=l-i,f=(l+i)/2;return c?(t===l?o=(r-n)/c+(r<n)*6:r===l?o=(n-t)/c+2:o=(t-r)/c+4,c/=f<.5?l+i:2-l-i,o*=60):c=f>0&&f<1?0:o,new kn(o,c,f,e.opacity)}function uK(e,t,r,n){return arguments.length===1?L4(e):new kn(e,t,r,n??1)}function kn(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}qj(kn,uK,I4(jd,{brighter(e){return e=e==null?hm:Math.pow(hm,e),new kn(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qc:Math.pow(Qc,e),new kn(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ur(I0(e>=240?e-240:e+120,i,n),I0(e,i,n),I0(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new kn($P(this.h),dh(this.s),dh(this.l),mm(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=mm(this.opacity);return`${e===1?"hsl(":"hsla("}${$P(this.h)}, ${dh(this.s)*100}%, ${dh(this.l)*100}%${e===1?")":`, ${e})`}`}}));function $P(e){return e=(e||0)%360,e<0?e+360:e}function dh(e){return Math.max(0,Math.min(1,e||0))}function I0(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 Hj=e=>()=>e;function cK(e,t){return function(r){return e+r*t}}function dK(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 fK(e){return(e=+e)==1?$4:function(t,r){return r-t?dK(t,r,e):Hj(isNaN(t)?r:t)}}function $4(e,t){var r=t-e;return r?cK(e,r):Hj(isNaN(e)?t:e)}const zP=(function e(t){var r=fK(t);function n(i,l){var o=r((i=cb(i)).r,(l=cb(l)).r),c=r(i.g,l.g),f=r(i.b,l.b),h=$4(i.opacity,l.opacity);return function(p){return i.r=o(p),i.g=c(p),i.b=f(p),i.opacity=h(p),i+""}}return n.gamma=e,n})(1);function hK(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(l){for(i=0;i<r;++i)n[i]=e[i]*(1-l)+t[i]*l;return n}}function mK(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function pK(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),l=new Array(r),o;for(o=0;o<n;++o)i[o]=lu(e[o],t[o]);for(;o<r;++o)l[o]=t[o];return function(c){for(o=0;o<n;++o)l[o]=i[o](c);return l}}function yK(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function pm(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function vK(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]=lu(e[i],t[i]):n[i]=t[i];return function(l){for(i in r)n[i]=r[i](l);return n}}var db=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,L0=new RegExp(db.source,"g");function gK(e){return function(){return e}}function xK(e){return function(t){return e(t)+""}}function bK(e,t){var r=db.lastIndex=L0.lastIndex=0,n,i,l,o=-1,c=[],f=[];for(e=e+"",t=t+"";(n=db.exec(e))&&(i=L0.exec(t));)(l=i.index)>r&&(l=t.slice(r,l),c[o]?c[o]+=l:c[++o]=l),(n=n[0])===(i=i[0])?c[o]?c[o]+=i:c[++o]=i:(c[++o]=null,f.push({i:o,x:pm(n,i)})),r=L0.lastIndex;return r<t.length&&(l=t.slice(r),c[o]?c[o]+=l:c[++o]=l),c.length<2?f[0]?xK(f[0].x):gK(t):(t=f.length,function(h){for(var p=0,y;p<t;++p)c[(y=f[p]).i]=y.x(h);return c.join("")})}function lu(e,t){var r=typeof t,n;return t==null||r==="boolean"?Hj(t):(r==="number"?pm:r==="string"?(n=Zc(t))?(t=n,zP):bK:t instanceof Zc?zP:t instanceof Date?yK:mK(t)?hK:Array.isArray(t)?pK:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?vK:pm)(e,t)}function Fj(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function jK(e,t){t===void 0&&(t=e,e=lu);for(var r=0,n=t.length-1,i=t[0],l=new Array(n<0?0:n);r<n;)l[r]=e(i,i=t[++r]);return function(o){var c=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return l[c](o-c)}}function SK(e){return function(){return e}}function ym(e){return+e}var BP=[0,1];function Sr(e){return e}function fb(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:SK(isNaN(t)?NaN:.5)}function wK(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function NK(e,t,r){var n=e[0],i=e[1],l=t[0],o=t[1];return i<n?(n=fb(i,n),l=r(o,l)):(n=fb(n,i),l=r(l,o)),function(c){return l(n(c))}}function OK(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),l=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=fb(e[o],e[o+1]),l[o]=r(t[o],t[o+1]);return function(c){var f=bd(e,c,1,n)-1;return l[f](i[f](c))}}function Sd(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function Np(){var e=BP,t=BP,r=lu,n,i,l,o=Sr,c,f,h;function p(){var v=Math.min(e.length,t.length);return o!==Sr&&(o=wK(e[0],e[v-1])),c=v>2?OK:NK,f=h=null,y}function y(v){return v==null||isNaN(v=+v)?l:(f||(f=c(e.map(n),t,r)))(n(o(v)))}return y.invert=function(v){return o(i((h||(h=c(t,e.map(n),pm)))(v)))},y.domain=function(v){return arguments.length?(e=Array.from(v,ym),p()):e.slice()},y.range=function(v){return arguments.length?(t=Array.from(v),p()):t.slice()},y.rangeRound=function(v){return t=Array.from(v),r=Fj,p()},y.clamp=function(v){return arguments.length?(o=v?!0:Sr,p()):o!==Sr},y.interpolate=function(v){return arguments.length?(r=v,p()):r},y.unknown=function(v){return arguments.length?(l=v,y):l},function(v,x){return n=v,i=x,p()}}function Kj(){return Np()(Sr,Sr)}function _K(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vm(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 Yo(e){return e=vm(Math.abs(e)),e?e[1]:NaN}function EK(e,t){return function(r,n){for(var i=r.length,l=[],o=0,c=e[0],f=0;i>0&&c>0&&(f+c+1>n&&(c=Math.max(1,n-f)),l.push(r.substring(i-=c,i+c)),!((f+=c+1)>n));)c=e[o=(o+1)%e.length];return l.reverse().join(t)}}function AK(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var PK=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wc(e){if(!(t=PK.exec(e)))throw new Error("invalid format: "+e);var t;return new Gj({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]})}Wc.prototype=Gj.prototype;function Gj(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+""}Gj.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 TK(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 gm;function CK(e,t){var r=vm(e,t);if(!r)return gm=void 0,e.toPrecision(t);var n=r[0],i=r[1],l=i-(gm=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return l===o?n:l>o?n+new Array(l-o+1).join("0"):l>0?n.slice(0,l)+"."+n.slice(l):"0."+new Array(1-l).join("0")+vm(e,Math.max(0,t+l-1))[0]}function UP(e,t){var r=vm(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const qP={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:_K,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>UP(e*100,t),r:UP,s:CK,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function HP(e){return e}var FP=Array.prototype.map,KP=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function MK(e){var t=e.grouping===void 0||e.thousands===void 0?HP:EK(FP.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",l=e.numerals===void 0?HP:AK(FP.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",c=e.minus===void 0?"−":e.minus+"",f=e.nan===void 0?"NaN":e.nan+"";function h(y,v){y=Wc(y);var x=y.fill,j=y.align,S=y.sign,N=y.symbol,O=y.zero,P=y.width,E=y.comma,A=y.precision,T=y.trim,M=y.type;M==="n"?(E=!0,M="g"):qP[M]||(A===void 0&&(A=12),T=!0,M="g"),(O||x==="0"&&j==="=")&&(O=!0,x="0",j="=");var R=(v&&v.prefix!==void 0?v.prefix:"")+(N==="$"?r:N==="#"&&/[boxX]/.test(M)?"0"+M.toLowerCase():""),I=(N==="$"?n:/[%p]/.test(M)?o:"")+(v&&v.suffix!==void 0?v.suffix:""),$=qP[M],D=/[defgprs%]/.test(M);A=A===void 0?6:/[gprs]/.test(M)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function H(q){var ae=R,Q=I,Z,B,K;if(M==="c")Q=$(q)+Q,q="";else{q=+q;var ee=q<0||1/q<0;if(q=isNaN(q)?f:$(Math.abs(q),A),T&&(q=TK(q)),ee&&+q==0&&S!=="+"&&(ee=!1),ae=(ee?S==="("?S:c:S==="-"||S==="("?"":S)+ae,Q=(M==="s"&&!isNaN(q)&&gm!==void 0?KP[8+gm/3]:"")+Q+(ee&&S==="("?")":""),D){for(Z=-1,B=q.length;++Z<B;)if(K=q.charCodeAt(Z),48>K||K>57){Q=(K===46?i+q.slice(Z+1):q.slice(Z))+Q,q=q.slice(0,Z);break}}}E&&!O&&(q=t(q,1/0));var se=ae.length+q.length+Q.length,ue=se<P?new Array(P-se+1).join(x):"";switch(E&&O&&(q=t(ue+q,ue.length?P-Q.length:1/0),ue=""),j){case"<":q=ae+q+Q+ue;break;case"=":q=ae+ue+q+Q;break;case"^":q=ue.slice(0,se=ue.length>>1)+ae+q+Q+ue.slice(se);break;default:q=ue+ae+q+Q;break}return l(q)}return H.toString=function(){return y+""},H}function p(y,v){var x=Math.max(-8,Math.min(8,Math.floor(Yo(v)/3)))*3,j=Math.pow(10,-x),S=h((y=Wc(y),y.type="f",y),{suffix:KP[8+x/3]});return function(N){return S(j*N)}}return{format:h,formatPrefix:p}}var fh,Yj,z4;RK({thousands:",",grouping:[3],currency:["$",""]});function RK(e){return fh=MK(e),Yj=fh.format,z4=fh.formatPrefix,fh}function DK(e){return Math.max(0,-Yo(Math.abs(e)))}function kK(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Yo(t)/3)))*3-Yo(Math.abs(e)))}function IK(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yo(t)-Yo(e))+1}function B4(e,t,r,n){var i=ob(e,t,r),l;switch(n=Wc(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(l=kK(i,o))&&(n.precision=l),z4(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(l=IK(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=l-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(l=DK(i))&&(n.precision=l-(n.type==="%")*2);break}}return Yj(n)}function as(e){var t=e.domain;return e.ticks=function(r){var n=t();return sb(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return B4(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,l=n.length-1,o=n[i],c=n[l],f,h,p=10;for(c<o&&(h=o,o=c,c=h,h=i,i=l,l=h);p-- >0;){if(h=lb(o,c,r),h===f)return n[i]=o,n[l]=c,t(n);if(h>0)o=Math.floor(o/h)*h,c=Math.ceil(c/h)*h;else if(h<0)o=Math.ceil(o*h)/h,c=Math.floor(c*h)/h;else break;f=h}return e},e}function U4(){var e=Kj();return e.copy=function(){return Sd(e,U4())},_n.apply(e,arguments),as(e)}function q4(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,ym),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return q4(e).unknown(t)},e=arguments.length?Array.from(e,ym):[0,1],as(r)}function H4(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],l=e[n],o;return l<i&&(o=r,r=n,n=o,o=i,i=l,l=o),e[r]=t.floor(i),e[n]=t.ceil(l),e}function GP(e){return Math.log(e)}function YP(e){return Math.exp(e)}function LK(e){return-Math.log(-e)}function $K(e){return-Math.exp(-e)}function zK(e){return isFinite(e)?+("1e"+e):e<0?0:e}function BK(e){return e===10?zK:e===Math.E?Math.exp:t=>Math.pow(e,t)}function UK(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function VP(e){return(t,r)=>-e(-t,r)}function Vj(e){const t=e(GP,YP),r=t.domain;let n=10,i,l;function o(){return i=UK(n),l=BK(n),r()[0]<0?(i=VP(i),l=VP(l),e(LK,$K)):e(GP,YP),t}return t.base=function(c){return arguments.length?(n=+c,o()):n},t.domain=function(c){return arguments.length?(r(c),o()):r()},t.ticks=c=>{const f=r();let h=f[0],p=f[f.length-1];const y=p<h;y&&([h,p]=[p,h]);let v=i(h),x=i(p),j,S;const N=c==null?10:+c;let O=[];if(!(n%1)&&x-v<N){if(v=Math.floor(v),x=Math.ceil(x),h>0){for(;v<=x;++v)for(j=1;j<n;++j)if(S=v<0?j/l(-v):j*l(v),!(S<h)){if(S>p)break;O.push(S)}}else for(;v<=x;++v)for(j=n-1;j>=1;--j)if(S=v>0?j/l(-v):j*l(v),!(S<h)){if(S>p)break;O.push(S)}O.length*2<N&&(O=sb(h,p,N))}else O=sb(v,x,Math.min(x-v,N)).map(l);return y?O.reverse():O},t.tickFormat=(c,f)=>{if(c==null&&(c=10),f==null&&(f=n===10?"s":","),typeof f!="function"&&(!(n%1)&&(f=Wc(f)).precision==null&&(f.trim=!0),f=Yj(f)),c===1/0)return f;const h=Math.max(1,n*c/t.ticks().length);return p=>{let y=p/l(Math.round(i(p)));return y*n<n-.5&&(y*=n),y<=h?f(p):""}},t.nice=()=>r(H4(r(),{floor:c=>l(Math.floor(i(c))),ceil:c=>l(Math.ceil(i(c)))})),t}function F4(){const e=Vj(Np()).domain([1,10]);return e.copy=()=>Sd(e,F4()).base(e.base()),_n.apply(e,arguments),e}function QP(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function XP(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Qj(e){var t=1,r=e(QP(t),XP(t));return r.constant=function(n){return arguments.length?e(QP(t=+n),XP(t)):t},as(r)}function K4(){var e=Qj(Np());return e.copy=function(){return Sd(e,K4()).constant(e.constant())},_n.apply(e,arguments)}function ZP(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qK(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function HK(e){return e<0?-e*e:e*e}function Xj(e){var t=e(Sr,Sr),r=1;function n(){return r===1?e(Sr,Sr):r===.5?e(qK,HK):e(ZP(r),ZP(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},as(t)}function Zj(){var e=Xj(Np());return e.copy=function(){return Sd(e,Zj()).exponent(e.exponent())},_n.apply(e,arguments),e}function FK(){return Zj.apply(null,arguments).exponent(.5)}function WP(e){return Math.sign(e)*e*e}function KK(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function G4(){var e=Kj(),t=[0,1],r=!1,n;function i(l){var o=KK(e(l));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(l){return e.invert(WP(l))},i.domain=function(l){return arguments.length?(e.domain(l),i):e.domain()},i.range=function(l){return arguments.length?(e.range((t=Array.from(l,ym)).map(WP)),i):t.slice()},i.rangeRound=function(l){return i.range(l).round(!0)},i.round=function(l){return arguments.length?(r=!!l,i):r},i.clamp=function(l){return arguments.length?(e.clamp(l),i):e.clamp()},i.unknown=function(l){return arguments.length?(n=l,i):n},i.copy=function(){return G4(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},_n.apply(i,arguments),as(i)}function Y4(){var e=[],t=[],r=[],n;function i(){var o=0,c=Math.max(1,t.length);for(r=new Array(c-1);++o<c;)r[o-1]=Q7(e,o/c);return l}function l(o){return o==null||isNaN(o=+o)?n:t[bd(r,o)]}return l.invertExtent=function(o){var c=t.indexOf(o);return c<0?[NaN,NaN]:[c>0?r[c-1]:e[0],c<r.length?r[c]:e[e.length-1]]},l.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let c of o)c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(Wi),i()},l.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},l.unknown=function(o){return arguments.length?(n=o,l):n},l.quantiles=function(){return r.slice()},l.copy=function(){return Y4().domain(e).range(t).unknown(n)},_n.apply(l,arguments)}function V4(){var e=0,t=1,r=1,n=[.5],i=[0,1],l;function o(f){return f!=null&&f<=f?i[bd(n,f,0,r)]:l}function c(){var f=-1;for(n=new Array(r);++f<r;)n[f]=((f+1)*t-(f-r)*e)/(r+1);return o}return o.domain=function(f){return arguments.length?([e,t]=f,e=+e,t=+t,c()):[e,t]},o.range=function(f){return arguments.length?(r=(i=Array.from(f)).length-1,c()):i.slice()},o.invertExtent=function(f){var h=i.indexOf(f);return h<0?[NaN,NaN]:h<1?[e,n[0]]:h>=r?[n[r-1],t]:[n[h-1],n[h]]},o.unknown=function(f){return arguments.length&&(l=f),o},o.thresholds=function(){return n.slice()},o.copy=function(){return V4().domain([e,t]).range(i).unknown(l)},_n.apply(as(o),arguments)}function Q4(){var e=[.5],t=[0,1],r,n=1;function i(l){return l!=null&&l<=l?t[bd(e,l,0,n)]:r}return i.domain=function(l){return arguments.length?(e=Array.from(l),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(l){return arguments.length?(t=Array.from(l),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(l){var o=t.indexOf(l);return[e[o-1],e[o]]},i.unknown=function(l){return arguments.length?(r=l,i):r},i.copy=function(){return Q4().domain(e).range(t).unknown(r)},_n.apply(i,arguments)}const $0=new Date,z0=new Date;function zt(e,t,r,n){function i(l){return e(l=arguments.length===0?new Date:new Date(+l)),l}return i.floor=l=>(e(l=new Date(+l)),l),i.ceil=l=>(e(l=new Date(l-1)),t(l,1),e(l),l),i.round=l=>{const o=i(l),c=i.ceil(l);return l-o<c-l?o:c},i.offset=(l,o)=>(t(l=new Date(+l),o==null?1:Math.floor(o)),l),i.range=(l,o,c)=>{const f=[];if(l=i.ceil(l),c=c==null?1:Math.floor(c),!(l<o)||!(c>0))return f;let h;do f.push(h=new Date(+l)),t(l,c),e(l);while(h<l&&l<o);return f},i.filter=l=>zt(o=>{if(o>=o)for(;e(o),!l(o);)o.setTime(o-1)},(o,c)=>{if(o>=o)if(c<0)for(;++c<=0;)for(;t(o,-1),!l(o););else for(;--c>=0;)for(;t(o,1),!l(o););}),r&&(i.count=(l,o)=>($0.setTime(+l),z0.setTime(+o),e($0),e(z0),Math.floor(r($0,z0))),i.every=l=>(l=Math.floor(l),!isFinite(l)||!(l>0)?null:l>1?i.filter(n?o=>n(o)%l===0:o=>i.count(0,o)%l===0):i)),i}const xm=zt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);xm.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?zt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):xm);xm.range;const za=1e3,Nn=za*60,Ba=Nn*60,Va=Ba*24,Wj=Va*7,JP=Va*30,B0=Va*365,Ls=zt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*za)},(e,t)=>(t-e)/za,e=>e.getUTCSeconds());Ls.range;const Jj=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*za)},(e,t)=>{e.setTime(+e+t*Nn)},(e,t)=>(t-e)/Nn,e=>e.getMinutes());Jj.range;const eS=zt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Nn)},(e,t)=>(t-e)/Nn,e=>e.getUTCMinutes());eS.range;const tS=zt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*za-e.getMinutes()*Nn)},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getHours());tS.range;const rS=zt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ba)},(e,t)=>(t-e)/Ba,e=>e.getUTCHours());rS.range;const wd=zt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Nn)/Va,e=>e.getDate()-1);wd.range;const Op=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Va,e=>e.getUTCDate()-1);Op.range;const X4=zt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Va,e=>Math.floor(e/Va));X4.range;function pl(e){return zt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Nn)/Wj)}const _p=pl(0),bm=pl(1),GK=pl(2),YK=pl(3),Vo=pl(4),VK=pl(5),QK=pl(6);_p.range;bm.range;GK.range;YK.range;Vo.range;VK.range;QK.range;function yl(e){return zt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Wj)}const Ep=yl(0),jm=yl(1),XK=yl(2),ZK=yl(3),Qo=yl(4),WK=yl(5),JK=yl(6);Ep.range;jm.range;XK.range;ZK.range;Qo.range;WK.range;JK.range;const nS=zt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());nS.range;const aS=zt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());aS.range;const Qa=zt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Qa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});Qa.range;const Xa=zt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Xa.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:zt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});Xa.range;function Z4(e,t,r,n,i,l){const o=[[Ls,1,za],[Ls,5,5*za],[Ls,15,15*za],[Ls,30,30*za],[l,1,Nn],[l,5,5*Nn],[l,15,15*Nn],[l,30,30*Nn],[i,1,Ba],[i,3,3*Ba],[i,6,6*Ba],[i,12,12*Ba],[n,1,Va],[n,2,2*Va],[r,1,Wj],[t,1,JP],[t,3,3*JP],[e,1,B0]];function c(h,p,y){const v=p<h;v&&([h,p]=[p,h]);const x=y&&typeof y.range=="function"?y:f(h,p,y),j=x?x.range(h,+p+1):[];return v?j.reverse():j}function f(h,p,y){const v=Math.abs(p-h)/y,x=zj(([,,N])=>N).right(o,v);if(x===o.length)return e.every(ob(h/B0,p/B0,y));if(x===0)return xm.every(Math.max(ob(h,p,y),1));const[j,S]=o[v/o[x-1][2]<o[x][2]/v?x-1:x];return j.every(S)}return[c,f]}const[eG,tG]=Z4(Xa,aS,Ep,X4,rS,eS),[rG,nG]=Z4(Qa,nS,_p,wd,tS,Jj);function U0(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 q0(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 gc(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function aG(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,l=e.days,o=e.shortDays,c=e.months,f=e.shortMonths,h=xc(i),p=bc(i),y=xc(l),v=bc(l),x=xc(o),j=bc(o),S=xc(c),N=bc(c),O=xc(f),P=bc(f),E={a:K,A:ee,b:se,B:ue,c:null,d:iT,e:iT,f:EG,g:LG,G:zG,H:NG,I:OG,j:_G,L:W4,m:AG,M:PG,p:k,q:W,Q:oT,s:uT,S:TG,u:CG,U:MG,V:RG,w:DG,W:kG,x:null,X:null,y:IG,Y:$G,Z:BG,"%":lT},A={a:oe,A:le,b:ye,B:Ne,c:null,d:sT,e:sT,f:FG,g:eY,G:rY,H:UG,I:qG,j:HG,L:e3,m:KG,M:GG,p:Oe,q:Ce,Q:oT,s:uT,S:YG,u:VG,U:QG,V:XG,w:ZG,W:WG,x:null,X:null,y:JG,Y:tY,Z:nY,"%":lT},T={a:D,A:H,b:q,B:ae,c:Q,d:nT,e:nT,f:bG,g:rT,G:tT,H:aT,I:aT,j:yG,L:xG,m:pG,M:vG,p:$,q:mG,Q:SG,s:wG,S:gG,u:uG,U:cG,V:dG,w:oG,W:fG,x:Z,X:B,y:rT,Y:tT,Z:hG,"%":jG};E.x=M(r,E),E.X=M(n,E),E.c=M(t,E),A.x=M(r,A),A.X=M(n,A),A.c=M(t,A);function M(de,te){return function(Se){var ce=[],_t=-1,De=0,Et=de.length,At,or,fa;for(Se instanceof Date||(Se=new Date(+Se));++_t<Et;)de.charCodeAt(_t)===37&&(ce.push(de.slice(De,_t)),(or=eT[At=de.charAt(++_t)])!=null?At=de.charAt(++_t):or=At==="e"?" ":"0",(fa=te[At])&&(At=fa(Se,or)),ce.push(At),De=_t+1);return ce.push(de.slice(De,_t)),ce.join("")}}function R(de,te){return function(Se){var ce=gc(1900,void 0,1),_t=I(ce,de,Se+="",0),De,Et;if(_t!=Se.length)return null;if("Q"in ce)return new Date(ce.Q);if("s"in ce)return new Date(ce.s*1e3+("L"in ce?ce.L:0));if(te&&!("Z"in ce)&&(ce.Z=0),"p"in ce&&(ce.H=ce.H%12+ce.p*12),ce.m===void 0&&(ce.m="q"in ce?ce.q:0),"V"in ce){if(ce.V<1||ce.V>53)return null;"w"in ce||(ce.w=1),"Z"in ce?(De=q0(gc(ce.y,0,1)),Et=De.getUTCDay(),De=Et>4||Et===0?jm.ceil(De):jm(De),De=Op.offset(De,(ce.V-1)*7),ce.y=De.getUTCFullYear(),ce.m=De.getUTCMonth(),ce.d=De.getUTCDate()+(ce.w+6)%7):(De=U0(gc(ce.y,0,1)),Et=De.getDay(),De=Et>4||Et===0?bm.ceil(De):bm(De),De=wd.offset(De,(ce.V-1)*7),ce.y=De.getFullYear(),ce.m=De.getMonth(),ce.d=De.getDate()+(ce.w+6)%7)}else("W"in ce||"U"in ce)&&("w"in ce||(ce.w="u"in ce?ce.u%7:"W"in ce?1:0),Et="Z"in ce?q0(gc(ce.y,0,1)).getUTCDay():U0(gc(ce.y,0,1)).getDay(),ce.m=0,ce.d="W"in ce?(ce.w+6)%7+ce.W*7-(Et+5)%7:ce.w+ce.U*7-(Et+6)%7);return"Z"in ce?(ce.H+=ce.Z/100|0,ce.M+=ce.Z%100,q0(ce)):U0(ce)}}function I(de,te,Se,ce){for(var _t=0,De=te.length,Et=Se.length,At,or;_t<De;){if(ce>=Et)return-1;if(At=te.charCodeAt(_t++),At===37){if(At=te.charAt(_t++),or=T[At in eT?te.charAt(_t++):At],!or||(ce=or(de,Se,ce))<0)return-1}else if(At!=Se.charCodeAt(ce++))return-1}return ce}function $(de,te,Se){var ce=h.exec(te.slice(Se));return ce?(de.p=p.get(ce[0].toLowerCase()),Se+ce[0].length):-1}function D(de,te,Se){var ce=x.exec(te.slice(Se));return ce?(de.w=j.get(ce[0].toLowerCase()),Se+ce[0].length):-1}function H(de,te,Se){var ce=y.exec(te.slice(Se));return ce?(de.w=v.get(ce[0].toLowerCase()),Se+ce[0].length):-1}function q(de,te,Se){var ce=O.exec(te.slice(Se));return ce?(de.m=P.get(ce[0].toLowerCase()),Se+ce[0].length):-1}function ae(de,te,Se){var ce=S.exec(te.slice(Se));return ce?(de.m=N.get(ce[0].toLowerCase()),Se+ce[0].length):-1}function Q(de,te,Se){return I(de,t,te,Se)}function Z(de,te,Se){return I(de,r,te,Se)}function B(de,te,Se){return I(de,n,te,Se)}function K(de){return o[de.getDay()]}function ee(de){return l[de.getDay()]}function se(de){return f[de.getMonth()]}function ue(de){return c[de.getMonth()]}function k(de){return i[+(de.getHours()>=12)]}function W(de){return 1+~~(de.getMonth()/3)}function oe(de){return o[de.getUTCDay()]}function le(de){return l[de.getUTCDay()]}function ye(de){return f[de.getUTCMonth()]}function Ne(de){return c[de.getUTCMonth()]}function Oe(de){return i[+(de.getUTCHours()>=12)]}function Ce(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var te=M(de+="",E);return te.toString=function(){return de},te},parse:function(de){var te=R(de+="",!1);return te.toString=function(){return de},te},utcFormat:function(de){var te=M(de+="",A);return te.toString=function(){return de},te},utcParse:function(de){var te=R(de+="",!0);return te.toString=function(){return de},te}}}var eT={"-":"",_:" ",0:"0"},Xt=/^\s*\d+/,iG=/^%/,sG=/[\\^$*+?|[\]().{}]/g;function Fe(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",l=i.length;return n+(l<r?new Array(r-l+1).join(t)+i:i)}function lG(e){return e.replace(sG,"\\$&")}function xc(e){return new RegExp("^(?:"+e.map(lG).join("|")+")","i")}function bc(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function oG(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function uG(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function cG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function dG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function fG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function tT(e,t,r){var n=Xt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function rT(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function hG(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 mG(e,t,r){var n=Xt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function pG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function nT(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function yG(e,t,r){var n=Xt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function aT(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function vG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function gG(e,t,r){var n=Xt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function xG(e,t,r){var n=Xt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function bG(e,t,r){var n=Xt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function jG(e,t,r){var n=iG.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function SG(e,t,r){var n=Xt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function wG(e,t,r){var n=Xt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function iT(e,t){return Fe(e.getDate(),t,2)}function NG(e,t){return Fe(e.getHours(),t,2)}function OG(e,t){return Fe(e.getHours()%12||12,t,2)}function _G(e,t){return Fe(1+wd.count(Qa(e),e),t,3)}function W4(e,t){return Fe(e.getMilliseconds(),t,3)}function EG(e,t){return W4(e,t)+"000"}function AG(e,t){return Fe(e.getMonth()+1,t,2)}function PG(e,t){return Fe(e.getMinutes(),t,2)}function TG(e,t){return Fe(e.getSeconds(),t,2)}function CG(e){var t=e.getDay();return t===0?7:t}function MG(e,t){return Fe(_p.count(Qa(e)-1,e),t,2)}function J4(e){var t=e.getDay();return t>=4||t===0?Vo(e):Vo.ceil(e)}function RG(e,t){return e=J4(e),Fe(Vo.count(Qa(e),e)+(Qa(e).getDay()===4),t,2)}function DG(e){return e.getDay()}function kG(e,t){return Fe(bm.count(Qa(e)-1,e),t,2)}function IG(e,t){return Fe(e.getFullYear()%100,t,2)}function LG(e,t){return e=J4(e),Fe(e.getFullYear()%100,t,2)}function $G(e,t){return Fe(e.getFullYear()%1e4,t,4)}function zG(e,t){var r=e.getDay();return e=r>=4||r===0?Vo(e):Vo.ceil(e),Fe(e.getFullYear()%1e4,t,4)}function BG(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Fe(t/60|0,"0",2)+Fe(t%60,"0",2)}function sT(e,t){return Fe(e.getUTCDate(),t,2)}function UG(e,t){return Fe(e.getUTCHours(),t,2)}function qG(e,t){return Fe(e.getUTCHours()%12||12,t,2)}function HG(e,t){return Fe(1+Op.count(Xa(e),e),t,3)}function e3(e,t){return Fe(e.getUTCMilliseconds(),t,3)}function FG(e,t){return e3(e,t)+"000"}function KG(e,t){return Fe(e.getUTCMonth()+1,t,2)}function GG(e,t){return Fe(e.getUTCMinutes(),t,2)}function YG(e,t){return Fe(e.getUTCSeconds(),t,2)}function VG(e){var t=e.getUTCDay();return t===0?7:t}function QG(e,t){return Fe(Ep.count(Xa(e)-1,e),t,2)}function t3(e){var t=e.getUTCDay();return t>=4||t===0?Qo(e):Qo.ceil(e)}function XG(e,t){return e=t3(e),Fe(Qo.count(Xa(e),e)+(Xa(e).getUTCDay()===4),t,2)}function ZG(e){return e.getUTCDay()}function WG(e,t){return Fe(jm.count(Xa(e)-1,e),t,2)}function JG(e,t){return Fe(e.getUTCFullYear()%100,t,2)}function eY(e,t){return e=t3(e),Fe(e.getUTCFullYear()%100,t,2)}function tY(e,t){return Fe(e.getUTCFullYear()%1e4,t,4)}function rY(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Qo(e):Qo.ceil(e),Fe(e.getUTCFullYear()%1e4,t,4)}function nY(){return"+0000"}function lT(){return"%"}function oT(e){return+e}function uT(e){return Math.floor(+e/1e3)}var uo,r3,n3;aY({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 aY(e){return uo=aG(e),r3=uo.format,uo.parse,n3=uo.utcFormat,uo.utcParse,uo}function iY(e){return new Date(e)}function sY(e){return e instanceof Date?+e:+new Date(+e)}function iS(e,t,r,n,i,l,o,c,f,h){var p=Kj(),y=p.invert,v=p.domain,x=h(".%L"),j=h(":%S"),S=h("%I:%M"),N=h("%I %p"),O=h("%a %d"),P=h("%b %d"),E=h("%B"),A=h("%Y");function T(M){return(f(M)<M?x:c(M)<M?j:o(M)<M?S:l(M)<M?N:n(M)<M?i(M)<M?O:P:r(M)<M?E:A)(M)}return p.invert=function(M){return new Date(y(M))},p.domain=function(M){return arguments.length?v(Array.from(M,sY)):v().map(iY)},p.ticks=function(M){var R=v();return e(R[0],R[R.length-1],M??10)},p.tickFormat=function(M,R){return R==null?T:h(R)},p.nice=function(M){var R=v();return(!M||typeof M.range!="function")&&(M=t(R[0],R[R.length-1],M??10)),M?v(H4(R,M)):p},p.copy=function(){return Sd(p,iS(e,t,r,n,i,l,o,c,f,h))},p}function lY(){return _n.apply(iS(rG,nG,Qa,nS,_p,wd,tS,Jj,Ls,r3).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function oY(){return _n.apply(iS(eG,tG,Xa,aS,Ep,Op,rS,eS,Ls,n3).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Ap(){var e=0,t=1,r,n,i,l,o=Sr,c=!1,f;function h(y){return y==null||isNaN(y=+y)?f:o(i===0?.5:(y=(l(y)-r)*i,c?Math.max(0,Math.min(1,y)):y))}h.domain=function(y){return arguments.length?([e,t]=y,r=l(e=+e),n=l(t=+t),i=r===n?0:1/(n-r),h):[e,t]},h.clamp=function(y){return arguments.length?(c=!!y,h):c},h.interpolator=function(y){return arguments.length?(o=y,h):o};function p(y){return function(v){var x,j;return arguments.length?([x,j]=v,o=y(x,j),h):[o(0),o(1)]}}return h.range=p(lu),h.rangeRound=p(Fj),h.unknown=function(y){return arguments.length?(f=y,h):f},function(y){return l=y,r=y(e),n=y(t),i=r===n?0:1/(n-r),h}}function is(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function a3(){var e=as(Ap()(Sr));return e.copy=function(){return is(e,a3())},ei.apply(e,arguments)}function i3(){var e=Vj(Ap()).domain([1,10]);return e.copy=function(){return is(e,i3()).base(e.base())},ei.apply(e,arguments)}function s3(){var e=Qj(Ap());return e.copy=function(){return is(e,s3()).constant(e.constant())},ei.apply(e,arguments)}function sS(){var e=Xj(Ap());return e.copy=function(){return is(e,sS()).exponent(e.exponent())},ei.apply(e,arguments)}function uY(){return sS.apply(null,arguments).exponent(.5)}function l3(){var e=[],t=Sr;function r(n){if(n!=null&&!isNaN(n=+n))return t((bd(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(Wi),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,l)=>V7(e,l/n))},r.copy=function(){return l3(t).domain(e)},ei.apply(r,arguments)}function Pp(){var e=0,t=.5,r=1,n=1,i,l,o,c,f,h=Sr,p,y=!1,v;function x(S){return isNaN(S=+S)?v:(S=.5+((S=+p(S))-l)*(n*S<n*l?c:f),h(y?Math.max(0,Math.min(1,S)):S))}x.domain=function(S){return arguments.length?([e,t,r]=S,i=p(e=+e),l=p(t=+t),o=p(r=+r),c=i===l?0:.5/(l-i),f=l===o?0:.5/(o-l),n=l<i?-1:1,x):[e,t,r]},x.clamp=function(S){return arguments.length?(y=!!S,x):y},x.interpolator=function(S){return arguments.length?(h=S,x):h};function j(S){return function(N){var O,P,E;return arguments.length?([O,P,E]=N,h=jK(S,[O,P,E]),x):[h(0),h(.5),h(1)]}}return x.range=j(lu),x.rangeRound=j(Fj),x.unknown=function(S){return arguments.length?(v=S,x):v},function(S){return p=S,i=S(e),l=S(t),o=S(r),c=i===l?0:.5/(l-i),f=l===o?0:.5/(o-l),n=l<i?-1:1,x}}function o3(){var e=as(Pp()(Sr));return e.copy=function(){return is(e,o3())},ei.apply(e,arguments)}function u3(){var e=Vj(Pp()).domain([.1,1,10]);return e.copy=function(){return is(e,u3()).base(e.base())},ei.apply(e,arguments)}function c3(){var e=Qj(Pp());return e.copy=function(){return is(e,c3()).constant(e.constant())},ei.apply(e,arguments)}function lS(){var e=Xj(Pp());return e.copy=function(){return is(e,lS()).exponent(e.exponent())},ei.apply(e,arguments)}function cY(){return lS.apply(null,arguments).exponent(.5)}const d3=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Uj,scaleDiverging:o3,scaleDivergingLog:u3,scaleDivergingPow:lS,scaleDivergingSqrt:cY,scaleDivergingSymlog:c3,scaleIdentity:q4,scaleImplicit:ub,scaleLinear:U4,scaleLog:F4,scaleOrdinal:Bj,scalePoint:Z7,scalePow:Zj,scaleQuantile:Y4,scaleQuantize:V4,scaleRadial:G4,scaleSequential:a3,scaleSequentialLog:i3,scaleSequentialPow:sS,scaleSequentialQuantile:l3,scaleSequentialSqrt:uY,scaleSequentialSymlog:s3,scaleSqrt:FK,scaleSymlog:K4,scaleThreshold:Q4,scaleTime:lY,scaleUtc:oY,tickFormat:B4},Symbol.toStringTag,{value:"Module"}));function dY(e){var t=d3;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(fd(e));if(r in t&&typeof t[r]=="function")return t[r]()}function cT(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var n=dY(e);if(n!=null)return n.domain(t).range(r),n}}function oS(e,t,r,n){if(!(r==null||n==null))return typeof e.scale=="function"?cT(e.scale,r,n):cT(t,r,n)}function fY(e){return"scale".concat(fd(e))}function hY(e){return fY(e)in d3}var f3=(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 hY(n)?n:"point"}};function mY(e,t){for(var r=0,n=e.length,i=e[0]<e[e.length-1];r<n;){var l=Math.floor((r+n)/2);(i?e[l]<t:e[l]>t)?r=l+1:n=l}return r}function h3(e,t){if(e){var r=t??e.domain(),n=r.map(l=>{var o;return(o=e(l))!==null&&o!==void 0?o:0}),i=e.range();if(!(r.length===0||i.length<2))return l=>{var o,c,f=mY(n,l);if(f<=0)return r[0];if(f>=r.length)return r[r.length-1];var h=(o=n[f-1])!==null&&o!==void 0?o:0,p=(c=n[f])!==null&&c!==void 0?c:0;return Math.abs(l-h)<=Math.abs(l-p)?r[f-1]:r[f]}}}function pY(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):h3(e,void 0)}function dT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Sm(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dT(Object(r),!0).forEach(function(n){yY(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yY(e,t,r){return(t=vY(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vY(e){var t=gY(e,"string");return typeof t=="symbol"?t:t+""}function gY(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 hb=[0,"auto"],kt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},m3=(e,t)=>e.cartesianAxis.xAxis[t],ti=(e,t)=>{var r=m3(e,t);return r??kt},It={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:hb,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:pd},p3=(e,t)=>e.cartesianAxis.yAxis[t],ri=(e,t)=>{var r=p3(e,t);return r??It},xY={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:""},uS=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??xY},Er=(e,t,r)=>{switch(t){case"xAxis":return ti(e,r);case"yAxis":return ri(e,r);case"zAxis":return uS(e,r);case"angleAxis":return Dj(e,r);case"radiusAxis":return kj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},bY=(e,t,r)=>{switch(t){case"xAxis":return ti(e,r);case"yAxis":return ri(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Nd=(e,t,r)=>{switch(t){case"xAxis":return ti(e,r);case"yAxis":return ri(e,r);case"angleAxis":return Dj(e,r);case"radiusAxis":return kj(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},y3=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function v3(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 Tp=e=>e.graphicalItems.cartesianItems,jY=V([Vt,bp],v3),g3=(e,t,r)=>e.filter(r).filter(n=>(t==null?void 0:t.includeHidden)===!0?!0:!n.hide),ou=V([Tp,Er,jY],g3,{memoizeOptions:{resultEqualityCheck:wp}}),x3=V([ou],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(jp)),b3=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),SY=V([ou],b3),j3=e=>e.map(t=>t.data).filter(Boolean).flat(1),wY=V([ou],e=>e.some(t=>!t.data)),S3=V([ou],j3,{memoizeOptions:{resultEqualityCheck:wp}}),w3=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},cS=V([S3,xd],w3),NY=(e,t,r)=>(t==null?void 0:t.dataKey)!=null?e.map(n=>({value:Ot(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:Ot(i,n)}))):e.map(n=>({value:n})),N3=(e,t,r,n,i,l)=>{var{chartData:o=[],dataStartIndex:c,dataEndIndex:f}=n,h=NY(e,t,r);if(i&&(t==null?void 0:t.dataKey)!=null&&l.length>0){var p=o.slice(c,f+1),y=p.map(v=>({value:Ot(v,t.dataKey)})).filter(v=>v.value!=null);return[...y,...h]}return h},Od=V([cS,Er,ou,xd,wY,S3],N3);function Oo(e){if(sa(e)||e instanceof Date){var t=Number(e);if(Be(t))return t}}function fT(e){if(Array.isArray(e)){var t=[Oo(e[0]),Oo(e[1])];return na(t)?t:void 0}var r=Oo(e);if(r!=null)return[r,r]}function ua(e){return e.map(Oo).filter(Br)}function OY(e,t){var r=Oo(e),n=Oo(t);return r==null&&n==null?0:r==null?-1:n==null?1:r-n}var _Y=V([Od],e=>e==null?void 0:e.map(t=>t.value).sort(OY));function O3(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function EY(e,t,r){if(!r)return[];if(!r.length)return[];var n;if(typeof t=="number"&&!ia(t))n=t;else if(Array.isArray(t)){var i=ua(t);i.length>0&&(n=Math.max(...i))}return n==null?[]:ua(r.flatMap(l=>{var o=Ot(e,l.dataKey),c,f;if(Array.isArray(o)?[c,f]=o:c=f=o,!(!Be(c)||!Be(f)))return[n-c,n+f]}))}var Bt=e=>{var t=Qt(e),r=su(e);return Nd(e,t,r)},Xo=V([Bt],e=>e==null?void 0:e.dataKey),AY=V([x3,xd,Bt],C4),_3=(e,t,r,n)=>{var i={},l=t.reduce((o,c)=>{if(c.stackId==null)return o;var f=o[c.stackId];return f==null&&(f=[]),f.push(c),o[c.stackId]=f,o},i);return Object.fromEntries(Object.entries(l).map(o=>{var[c,f]=o,h=n?[...f].reverse():f,p=h.map(Lj);return[c,{stackedData:dq(e,p,r),graphicalItems:h}]}))},mb=V([AY,x3,yp,N4],_3),E3=(e,t,r,n)=>{var{dataStartIndex:i,dataEndIndex:l}=t;if(n==null&&r!=="zAxis"){var o=yq(e,i,l);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},PY=V([Er],e=>e.allowDataOverflow),dS=e=>{var t;if(e==null||!("domain"in e))return hb;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=ua(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e==null?void 0:e.domain)!==null&&t!==void 0?t:hb},A3=V([Er],dS),P3=V([A3,PY],d4),TY=V([mb,Un,Vt,P3],E3,{memoizeOptions:{resultEqualityCheck:Sp}}),fS=e=>e.errorBars,CY=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>O3(r,n)),wm=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 l=i.flat(),o=Math.min(...l),c=Math.max(...l);return[o,c]}},T3=function(t,r,n,i,l){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],c,f;if(n.length>0&&n.forEach(h=>{var p,y=h.data!=null?[...h.data]:o,v=(p=i[h.id])===null||p===void 0?void 0:p.filter(x=>O3(l,x));y.forEach(x=>{var j,S=Ot(x,(j=r.dataKey)!==null&&j!==void 0?j:h.dataKey),N=EY(x,S,v);if(N.length>=2){var O=Math.min(...N),P=Math.max(...N);(c==null||O<c)&&(c=O),(f==null||P>f)&&(f=P)}var E=fT(S);E!=null&&(c=c==null?E[0]:Math.min(c,E[0]),f=f==null?E[1]:Math.max(f,E[1]))})}),(r==null?void 0:r.dataKey)!=null&&n.length===0&&t.forEach(h=>{var p=fT(Ot(h,r.dataKey));p!=null&&(c=c==null?p[0]:Math.min(c,p[0]),f=f==null?p[1]:Math.max(f,p[1]))}),Be(c)&&Be(f))return[c,f]},MY=V([cS,Er,SY,fS,Vt,b7],T3,{memoizeOptions:{resultEqualityCheck:Sp}});function RY(e){var{value:t}=e;if(sa(t)||t instanceof Date)return t}var DY=(e,t,r)=>{var n=e.map(RY).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&BM(n))?c4(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},C3=e=>e.referenceElements.dots,uu=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),kY=V([C3,Vt,bp],uu),M3=e=>e.referenceElements.areas,IY=V([M3,Vt,bp],uu),R3=e=>e.referenceElements.lines,LY=V([R3,Vt,bp],uu),D3=(e,t)=>{if(e!=null){var r=ua(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},$Y=V(kY,Vt,D3),k3=(e,t)=>{if(e!=null){var r=ua(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},zY=V([IY,Vt],k3);function BY(e){var t;if(e.x!=null)return ua([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.x);return r==null||r.length===0?[]:ua(r)}function UY(e){var t;if(e.y!=null)return ua([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(n=>n.y);return r==null||r.length===0?[]:ua(r)}var I3=(e,t)=>{if(e!=null){var r=e.flatMap(n=>t==="xAxis"?BY(n):UY(n));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},qY=V([LY,Vt],I3),HY=V($Y,qY,zY,(e,t,r)=>wm(e,r,t)),L3=(e,t,r,n,i,l,o,c)=>{if(r!=null)return r;var f=o==="vertical"&&c==="xAxis"||o==="horizontal"&&c==="yAxis",h=f?wm(n,l,i):wm(l,i);return S7(t,h,e.allowDataOverflow)},FY=V([Er,A3,P3,TY,MY,HY,Ze,Vt],L3,{memoizeOptions:{resultEqualityCheck:Sp}}),KY=[0,1],$3=(e,t,r,n,i,l,o)=>{if(!((e==null||r==null||r.length===0)&&o===void 0)){var{dataKey:c,type:f}=e,h=Za(t,l);if(h&&c==null){var p;return c4(0,(p=r==null?void 0:r.length)!==null&&p!==void 0?p:0)}return f==="category"?DY(n,e,h):i==="expand"&&!h?KY:o}},hS=V([Er,Ze,cS,Od,yp,Vt,FY],$3),cu=V([Er,y3,Cj],f3),z3=(e,t,r)=>{var{niceTicks:n}=t;if(n!=="none"){var i=dS(t),l=Array.isArray(i)&&(i[0]==="auto"||i[1]==="auto");if((n==="snap125"||n==="adaptive")&&t!=null&&t.tickCount&&na(e)){if(l)return SP(e,t.tickCount,t.allowDecimals,n);if(t.type==="number")return wP(e,t.tickCount,t.allowDecimals,n)}if(n==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(l&&na(e))return SP(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&na(e))return wP(e,t.tickCount,t.allowDecimals,"adaptive")}}},mS=V([hS,Nd,cu],z3),B3=(e,t,r,n)=>{if(n!=="angleAxis"&&(e==null?void 0:e.type)==="number"&&na(t)&&Array.isArray(r)&&r.length>0){var i,l,o=t[0],c=(i=r[0])!==null&&i!==void 0?i:0,f=t[1],h=(l=r[r.length-1])!==null&&l!==void 0?l:0;return[Math.min(o,c),Math.max(f,h)]}return t},GY=V([Er,hS,mS,Vt],B3),YY=V(Od,Er,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ua(e.map(y=>y.value))).sort((y,v)=>y-v),i=n[0],l=n[n.length-1];if(i==null||l==null)return 1/0;var o=l-i;if(o===0)return 1/0;for(var c=0;c<n.length-1;c++){var f=n[c],h=n[c+1];if(!(f==null||h==null)){var p=h-f;r=Math.min(r,p)}}return r/o}}),U3=V(YY,Ze,w4,Yt,(e,t,r,n,i)=>i,(e,t,r,n,i)=>{if(!Be(e))return 0;var l=t==="vertical"?n.height:n.width;if(i==="gap")return e*l/2;if(i==="no-gap"){var o=Ln(r,e*l),c=e*l/2;return c-o-(c-o)/l*o}return 0}),VY=(e,t,r)=>{var n=ti(e,t);return n==null||typeof n.padding!="string"?0:U3(e,"xAxis",t,r,n.padding)},QY=(e,t,r)=>{var n=ri(e,t);return n==null||typeof n.padding!="string"?0:U3(e,"yAxis",t,r,n.padding)},XY=V(ti,VY,(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}}),ZY=V(ri,QY,(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}}),WY=V([Yt,XY,up,op,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:l}=n;return i?[l.left,r.width-l.right]:[e.left+t.left,e.left+e.width-t.right]}),JY=V([Yt,Ze,ZY,up,op,(e,t,r)=>r],(e,t,r,n,i,l)=>{var{padding:o}=i;return l?[n.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),_d=(e,t,r,n)=>{var i;switch(t){case"xAxis":return WY(e,r,n);case"yAxis":return JY(e,r,n);case"zAxis":return(i=uS(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return A4(e);case"radiusAxis":return P4(e,r);default:return}},q3=V([Er,_d],vp),eV=V([cu,GY],I7),pS=V([Er,cu,eV,q3],oS),H3=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:l}=r,o=Za(e,n);if(o&&(i==="number"||l!=="auto"))return t.map(c=>c.value)}},yS=V([Ze,Od,Nd,Vt],H3),Cp=V([pS],$j);V([pS],pY);V([pS,_Y],h3);V([ou,fS,Vt],CY);function F3(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Mp=(e,t)=>t,Rp=(e,t,r)=>r,tV=V(sp,Mp,Rp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(F3)),rV=V(lp,Mp,Rp,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(F3)),K3=(e,t)=>({width:e.width,height:t.height}),nV=(e,t)=>{var r=typeof t.width=="number"?t.width:pd;return{width:r,height:e.height}},G3=V(Yt,ti,K3),aV=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},iV=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},sV=V(Ja,Yt,tV,Mp,Rp,(e,t,r,n,i)=>{var l={},o;return r.forEach(c=>{var f=K3(t,c);o==null&&(o=aV(t,n,e));var h=n==="top"&&!i||n==="bottom"&&i;l[c.id]=o-Number(h)*f.height,o+=(h?-1:1)*f.height}),l}),lV=V(Wa,Yt,rV,Mp,Rp,(e,t,r,n,i)=>{var l={},o;return r.forEach(c=>{var f=nV(t,c);o==null&&(o=iV(t,n,e));var h=n==="left"&&!i||n==="right"&&i;l[c.id]=o-Number(h)*f.width,o+=(h?-1:1)*f.width}),l}),oV=(e,t)=>{var r=ti(e,t);if(r!=null)return sV(e,r.orientation,r.mirror)},uV=V([Yt,ti,oV,(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}}}),cV=(e,t)=>{var r=ri(e,t);if(r!=null)return lV(e,r.orientation,r.mirror)},dV=V([Yt,ri,cV,(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}}}),Y3=V(Yt,ri,(e,t)=>{var r=typeof t.width=="number"?t.width:pd;return{width:r,height:e.height}}),hT=(e,t,r)=>{switch(t){case"xAxis":return G3(e,r).width;case"yAxis":return Y3(e,r).height;default:return}},V3=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:l,dataKey:o}=r,c=Za(e,n),f=t.map(p=>p.value),h=f.filter(p=>p!=null);if(o&&c&&l==="category"&&i&&BM(h))return f}},vS=V([Ze,Od,Er,Vt],V3),mT=V([Ze,bY,cu,Cp,vS,yS,_d,mS,Vt],(e,t,r,n,i,l,o,c,f)=>{if(t!=null){var h=Za(e,f);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:f,categoricalDomain:l,duplicateDomain:i,isCategorical:h,niceTicks:c,range:o,realScaleType:r,scale:n}}}),fV=(e,t,r,n,i,l,o,c,f)=>{if(!(t==null||n==null)){var h=Za(e,f),{type:p,ticks:y,tickCount:v}=t,x=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,j=p==="category"&&n.bandwidth?n.bandwidth()/x:0;j=f==="angleAxis"&&l!=null&&l.length>=2?zr(l[0]-l[1])*2*j:j;var S=y||i;return S?S.map((N,O)=>{var P=o?o.indexOf(N):N,E=n.map(P);return Be(E)?{index:O,coordinate:E+j,value:N,offset:j}:null}).filter(Br):h&&c?c.map((N,O)=>{var P=n.map(N);return Be(P)?{coordinate:P+j,value:N,index:O,offset:j}:null}).filter(Br):n.ticks?n.ticks(v).map((N,O)=>{var P=n.map(N);return Be(P)?{coordinate:P+j,value:N,index:O,offset:j}:null}).filter(Br):n.domain().map((N,O)=>{var P=n.map(N);return Be(P)?{coordinate:P+j,value:o?o[N]:N,index:O,offset:j}:null}).filter(Br)}},Q3=V([Ze,Nd,cu,Cp,mS,_d,vS,yS,Vt],fV),hV=(e,t,r,n,i,l,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var c=Za(e,o),{tickCount:f}=t,h=0;return h=o==="angleAxis"&&(n==null?void 0:n.length)>=2?zr(n[0]-n[1])*2*h:h,c&&l?l.map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+h,value:p,index:y,offset:h}:null}).filter(Br):r.ticks?r.ticks(f).map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+h,value:p,index:y,offset:h}:null}).filter(Br):r.domain().map((p,y)=>{var v=r.map(p);return Be(v)?{coordinate:v+h,value:i?i[p]:p,index:y,offset:h}:null}).filter(Br)}},es=V([Ze,Nd,Cp,_d,vS,yS,Vt],hV),ts=V(Er,Cp,(e,t)=>{if(!(e==null||t==null))return Sm(Sm({},e),{},{scale:t})}),mV=V([Er,cu,hS,q3],oS),pV=V([mV],$j);V((e,t,r)=>uS(e,r),pV,(e,t)=>{if(!(e==null||t==null))return Sm(Sm({},e),{},{scale:t})});var yV=V([Ze,sp,lp],(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}}),vV=(e,t,r)=>{var n;return(n=e.renderedTicks[t])===null||n===void 0?void 0:n[r]};V([vV],e=>{if(!(!e||e.length===0))return t=>{var r,n=1/0,i=e[0];for(var l of e){var o=Math.abs(l.coordinate-t);o<n&&(n=o,i=l)}return(r=i)===null||r===void 0?void 0:r.value}});var X3=e=>e.options.defaultTooltipEventType,Z3=e=>e.options.validateTooltipEventTypes;function W3(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Ed(e,t){var r=X3(e),n=Z3(e);return W3(t,r,n)}function gV(e){return ge(t=>Ed(t,e))}var J3=(e,t)=>{var r,n=Number(t);if(!(ia(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},xV=e=>e.tooltip.settings,Ii={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},bV={itemInteraction:{click:Ii,hover:Ii},axisInteraction:{click:Ii,hover:Ii},keyboardInteraction:Ii,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}},eD=yr({name:"tooltip",initialState:bV,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:lt()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:n}=t.payload,i=wn(e).tooltipItemPayloads.indexOf(r);i>-1&&(e.tooltipItemPayloads[i]=n)},prepare:lt()},removeTooltipEntrySettings:{reducer(e,t){var r=wn(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:lt()},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:jV,replaceTooltipEntrySettings:SV,removeTooltipEntrySettings:wV,setTooltipSettingsState:NV,setActiveMouseOverItemIndex:tD,mouseLeaveItem:OV,mouseLeaveChart:rD,setActiveClickItemIndex:_V,setMouseOverAxisIndex:nD,setMouseClickAxisIndex:EV,setSyncInteraction:Ec,setKeyboardInteraction:Nm}=eD.actions,AV=eD.reducer;function pT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pT(Object(r),!0).forEach(function(n){PV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PV(e,t,r){return(t=TV(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TV(e){var t=CV(e,"string");return typeof t=="symbol"?t:t+""}function CV(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 MV(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function RV(e){return e.index!=null}var aD=(e,t,r,n)=>{if(t==null)return Ii;var i=MV(e,t,r);if(i==null)return Ii;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var l=e.settings.active===!0;if(RV(i)){if(l)return hh(hh({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n,graphicalItemId:void 0};return hh(hh({},Ii),{},{coordinate:i.coordinate})};function DV(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 kV(e,t){var r=DV(e),n=t[0],i=t[1];if(r===void 0)return!1;var l=Math.min(n,i),o=Math.max(n,i);return r>=l&&r<=o}function IV(e,t,r){if(r==null||t==null)return!0;var n=Ot(e,t);return n==null||!na(r)?!0:kV(n,r)}var Pc=(e,t,r,n)=>{var i=e==null?void 0:e.index;if(i==null)return null;var l=Number(i);if(!Be(l))return i;var o=0,c=1/0;t.length>0&&(c=t.length-1);var f=Math.max(o,Math.min(l,c)),h=t[f];return h==null||IV(h,r,n)?String(f):null},iD=(e,t,r,n,i,l,o)=>{if(l!=null){var c=o[0],f=c==null?void 0:c.getPosition(l);if(f!=null)return f;var h=i==null?void 0:i[Number(l)];if(h)switch(r){case"horizontal":return{x:h.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:h.coordinate}}}},sD=(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 l=e.tooltipItemPayloads[0];return l!=null?[l]:[]}return e.tooltipItemPayloads.filter(o=>{var c;return((c=o.settings)===null||c===void 0?void 0:c.graphicalItemId)===i})},lD=e=>e.options.tooltipPayloadSearcher,du=e=>e.tooltip;function yT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function vT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yT(Object(r),!0).forEach(function(n){LV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LV(e,t,r){return(t=$V(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $V(e){var t=zV(e,"string");return typeof t=="symbol"?t:t+""}function zV(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 BV(e){if(typeof e=="string"||typeof e=="number")return e}function UV(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function qV(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function gT(e){if(typeof e=="string")return e}function HV(e){if(!(e==null||typeof e!="object")){var t="name"in e?BV(e.name):void 0,r="unit"in e?UV(e.unit):void 0,n="dataKey"in e?qV(e.dataKey):void 0,i="payload"in e?e.payload:void 0,l="color"in e?gT(e.color):void 0,o="fill"in e?gT(e.fill):void 0;return{name:t,unit:r,dataKey:n,payload:i,color:l,fill:o}}}function FV(e,t){return e??t}var oD=(e,t,r,n,i,l,o)=>{if(!(t==null||l==null)){var{chartData:c,computedData:f,dataStartIndex:h,dataEndIndex:p}=r,y=[];return e.reduce((v,x)=>{var j,{dataDefinedOnItem:S,settings:N}=x,O=FV(S,c),P=Array.isArray(O)?kR(O,h,p):O,E=(j=N==null?void 0:N.dataKey)!==null&&j!==void 0?j:n,A=N==null?void 0:N.nameKey,T;if(n&&Array.isArray(P)&&!Array.isArray(P[0])&&o==="axis"?T=UM(P,n,i):T=l(P,t,f,A),Array.isArray(T))T.forEach(R=>{var I,$,D=HV(R),H=D==null?void 0:D.name,q=D==null?void 0:D.dataKey,ae=D==null?void 0:D.payload,Q=vT(vT({},N),{},{name:H,unit:D==null?void 0:D.unit,color:(I=D==null?void 0:D.color)!==null&&I!==void 0?I:N==null?void 0:N.color,fill:($=D==null?void 0:D.fill)!==null&&$!==void 0?$:N==null?void 0:N.fill});v.push(cA({tooltipEntrySettings:Q,dataKey:q,payload:ae,value:Ot(ae,q),name:H==null?void 0:String(H)}))});else{var M;v.push(cA({tooltipEntrySettings:N,dataKey:E,payload:T,value:Ot(T,E),name:(M=Ot(T,A))!==null&&M!==void 0?M:N==null?void 0:N.name}))}return v},y)}},gS=V([Bt,y3,Cj],f3),KV=V([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),GV=V([Qt,su],v3),vl=V([KV,Bt,GV],g3,{memoizeOptions:{resultEqualityCheck:wp}}),YV=V([vl],e=>e.filter(jp)),uD=V([vl],j3,{memoizeOptions:{resultEqualityCheck:wp}}),VV=V([vl],e=>e.some(t=>!t.data)),ol=V([uD,Un],w3),QV=V([YV,Un,Bt],C4),xS=V([ol,Bt,vl,Un,VV,uD],N3),cD=V([Bt],dS),XV=V([Bt],e=>e.allowDataOverflow),dD=V([cD,XV],d4),ZV=V([vl],e=>e.filter(jp)),WV=V([QV,ZV,yp,N4],_3),JV=V([WV,Un,Qt,dD],E3),eQ=V([vl],b3),tQ=V([ol,Bt,eQ,fS,Qt,j7],T3,{memoizeOptions:{resultEqualityCheck:Sp}}),rQ=V([C3,Qt,su],uu),nQ=V([rQ,Qt],D3),aQ=V([M3,Qt,su],uu),iQ=V([aQ,Qt],k3),sQ=V([R3,Qt,su],uu),lQ=V([sQ,Qt],I3),oQ=V([nQ,lQ,iQ],wm),uQ=V([Bt,cD,dD,JV,tQ,oQ,Ze,Qt],L3),Zo=V([Bt,Ze,ol,xS,yp,Qt,uQ],$3),cQ=V([Zo,Bt,gS],z3),dQ=V([Bt,Zo,cQ,Qt],B3),fD=e=>{var t=Qt(e),r=su(e),n=!1;return _d(e,t,r,n)},hD=V([Bt,fD],vp),fQ=V([Bt,gS,dQ,hD],oS),mD=V([fQ],$j),hQ=V([Ze,xS,Bt,Qt],V3),mQ=V([Ze,xS,Bt,Qt],H3),pQ=(e,t,r,n,i,l,o,c)=>{if(t){var{type:f}=t,h=Za(e,c);if(n){var p=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,y=f==="category"&&n.bandwidth?n.bandwidth()/p:0;return y=c==="angleAxis"&&i!=null&&(i==null?void 0:i.length)>=2?zr(i[0]-i[1])*2*y:y,h&&o?o.map((v,x)=>{var j=n.map(v);return Be(j)?{coordinate:j+y,value:v,index:x,offset:y}:null}).filter(Br):n.domain().map((v,x)=>{var j=n.map(v);return Be(j)?{coordinate:j+y,value:l?l[v]:v,index:x,offset:y}:null}).filter(Br)}}},ni=V([Ze,Bt,gS,mD,fD,hQ,mQ,Qt],pQ),bS=V([X3,Z3,xV],(e,t,r)=>W3(r.shared,e,t)),pD=e=>e.tooltip.settings.trigger,jS=e=>e.tooltip.settings.defaultIndex,Ad=V([du,bS,pD,jS],aD),ul=V([Ad,ol,Xo,Zo],Pc),yD=V([ni,ul],J3),vD=V([Ad],e=>{if(e)return e.dataKey}),yQ=V([Ad],e=>{if(e)return e.graphicalItemId}),gD=V([du,bS,pD,jS],sD),vQ=V([Wa,Ja,Ze,Yt,ni,jS,gD],iD),gQ=V([Ad,vQ],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),xQ=V([Ad],e=>{var t;return(t=e==null?void 0:e.active)!==null&&t!==void 0?t:!1}),bQ=V([gD,ul,Un,Xo,yD,lD,bS],oD),jQ=V([bQ],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function xT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xT(Object(r),!0).forEach(function(n){SQ(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 SQ(e,t,r){return(t=wQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function wQ(e){var t=NQ(e,"string");return typeof t=="symbol"?t:t+""}function NQ(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 OQ=()=>ge(Bt),_Q=()=>{var e=OQ(),t=ge(ni),r=ge(mD);return Fo(!e||!r?void 0:bT(bT({},e),{},{scale:r}),t)};function jT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jT(Object(r),!0).forEach(function(n){EQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function EQ(e,t,r){return(t=AQ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AQ(e){var t=PQ(e,"string");return typeof t=="symbol"?t:t+""}function PQ(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 TQ=(e,t,r,n)=>{var i=t.find(l=>l&&l.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}},CQ=(e,t,r,n)=>{var i=t.find(h=>h&&h.index===r);if(i){if(e==="centric"){var l=i.coordinate,{radius:o}=n;return co(co(co({},n),ir(n.cx,n.cy,o,l)),{},{angle:l,radius:o})}var c=i.coordinate,{angle:f}=n;return co(co(co({},n),ir(n.cx,n.cy,c,f)),{},{angle:f,radius:c})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function MQ(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 l,o=(l=t==null?void 0:t.length)!==null&&l!==void 0?l:0;if(o<=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<o;c++){var f,h,p,y,v,x=c>0?(f=r[c-1])===null||f===void 0?void 0:f.coordinate:(h=r[o-1])===null||h===void 0?void 0:h.coordinate,j=(p=r[c])===null||p===void 0?void 0:p.coordinate,S=c>=o-1?(y=r[0])===null||y===void 0?void 0:y.coordinate:(v=r[c+1])===null||v===void 0?void 0:v.coordinate,N=void 0;if(!(x==null||j==null||S==null))if(zr(j-x)!==zr(S-j)){var O=[];if(zr(S-j)===zr(i[1]-i[0])){N=S;var P=j+i[1]-i[0];O[0]=Math.min(P,(P+x)/2),O[1]=Math.max(P,(P+x)/2)}else{N=x;var E=S+i[1]-i[0];O[0]=Math.min(j,(E+j)/2),O[1]=Math.max(j,(E+j)/2)}var A=[Math.min(j,(N+j)/2),Math.max(j,(N+j)/2)];if(e>A[0]&&e<=A[1]||e>=O[0]&&e<=O[1]){var T;return(T=r[c])===null||T===void 0?void 0:T.index}}else{var M=Math.min(x,S),R=Math.max(x,S);if(e>(M+j)/2&&e<=(R+j)/2){var I;return(I=r[c])===null||I===void 0?void 0:I.index}}}else if(t)for(var $=0;$<o;$++){var D=t[$];if(D!=null){var H=t[$+1],q=t[$-1];if($===0&&H!=null&&e<=(D.coordinate+H.coordinate)/2||$===o-1&&q!=null&&e>(D.coordinate+q.coordinate)/2||$>0&&$<o-1&&q!=null&&H!=null&&e>(D.coordinate+q.coordinate)/2&&e<=(D.coordinate+H.coordinate)/2)return D.index}}return-1},RQ=()=>ge(Cj),SS=(e,t)=>t,bD=(e,t,r)=>r,wS=(e,t,r,n)=>n,DQ=V(ni,e=>Qm(e,t=>t.coordinate)),NS=V([du,SS,bD,wS],aD),OS=V([NS,ol,Xo,Zo],Pc),kQ=(e,t,r)=>{if(t!=null){var n=du(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},jD=V([du,SS,bD,wS],sD),Om=V([Wa,Ja,Ze,Yt,ni,wS,jD],iD),IQ=V([NS,Om],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),SD=V([ni,OS],J3),LQ=V([jD,OS,Un,Xo,SD,lD,SS],oD),$Q=V([NS,OS],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),zQ=(e,t,r,n,i,l,o)=>{if(!(!e||!r||!n||!i)&&MQ(e,o)){var c=vq(e,t),f=xD(c,l,i,r,n),h=TQ(t,i,f,e);return{activeIndex:String(f),activeCoordinate:h}}},BQ=(e,t,r,n,i,l,o)=>{if(!(!e||!n||!i||!l||!r)){var c=u7(e,r);if(c){var f=gq(c,t),h=xD(f,o,l,n,i),p=CQ(t,l,h,c);return{activeIndex:String(h),activeCoordinate:p}}}},UQ=(e,t,r,n,i,l,o,c)=>{if(!(!e||!t||!n||!i||!l))return t==="horizontal"||t==="vertical"?zQ(e,t,n,i,l,o,c):BQ(e,t,r,n,i,l,o)},qQ=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}}),HQ=V(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(n=>parseInt(n,10)).concat(Object.values(Kt)),r=Array.from(new Set(t));return r.sort((n,i)=>n-i)},{memoizeOptions:{resultEqualityCheck:k7}});function ST(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 wT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ST(Object(r),!0).forEach(function(n){FQ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ST(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FQ(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=GQ(e,"string");return typeof t=="symbol"?t:t+""}function GQ(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 YQ={},VQ={zIndexMap:Object.values(Kt).reduce((e,t)=>wT(wT({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),YQ)},QQ=new Set(Object.values(Kt));function XQ(e){return QQ.has(e)}var wD=yr({name:"zIndex",initialState:VQ,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:lt()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!XQ(r)&&delete e.zIndexMap[r])},prepare:lt()},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:lt()},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:lt()}}}),{registerZIndexPortal:ZQ,unregisterZIndexPortal:H0,registerZIndexPortalElement:WQ,unregisterZIndexPortalElement:JQ}=wD.actions,eX=wD.reducer;function En(e){var{zIndex:t,children:r}=e,n=Zq(),i=n&&t!==void 0&&t!==0,l=vr(),o=w.useRef(void 0),c=w.useRef(new Set),f=ct(),h=ge(y=>qQ(y,t,l));if(w.useLayoutEffect(()=>{if(!i){var y=c.current;y.forEach(x=>{f(H0({zIndex:x}))}),y.clear(),o.current=void 0;return}if(c.current.has(t)||(f(ZQ({zIndex:t})),c.current.add(t)),h){o.current=h;var v=c.current;v.forEach(x=>{x!==t&&(f(H0({zIndex:x})),v.delete(x))})}},[f,t,i,h]),w.useLayoutEffect(()=>{var y=c.current;return()=>{y.forEach(v=>{f(H0({zIndex:v}))}),y.clear()}},[f]),!i)return r;var p=h??o.current;return p?zm.createPortal(r,p):null}function pb(){return pb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pb.apply(null,arguments)}function NT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function mh(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NT(Object(r),!0).forEach(function(n){tX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function tX(e,t,r){return(t=rX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rX(e){var t=nX(e,"string");return typeof t=="symbol"?t:t+""}function nX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function aX(e){var{cursor:t,cursorComp:r,cursorProps:n}=e;return w.isValidElement(t)?w.cloneElement(t,n):w.createElement(r,n)}function iX(e){var t,{coordinate:r,payload:n,index:i,offset:l,tooltipAxisBandSize:o,layout:c,cursor:f,tooltipEventType:h,chartName:p}=e,y=r,v=n,x=i;if(!f||!y||p!=="ScatterChart"&&h!=="axis")return null;var j,S,N;if(p==="ScatterChart")j=y,S=wF,N=Kt.cursorLine;else if(p==="BarChart")j=NF(c,y,l,o),S=s4,N=Kt.cursorRectangle;else if(c==="radial"&&HM(y)){var{cx:O,cy:P,radius:E,startAngle:A,endAngle:T}=l4(y);j={cx:O,cy:P,startAngle:A,endAngle:T,innerRadius:E,outerRadius:E},S=u4,N=Kt.cursorLine}else j={points:h7(c,y,l)},S=t4,N=Kt.cursorLine;var M=typeof f=="object"&&"className"in f?f.className:void 0,R=mh(mh(mh(mh({stroke:"#ccc",pointerEvents:"none"},l),j),dd(f)),{},{payload:v,payloadIndex:x,className:Xe("recharts-tooltip-cursor",M)});return w.createElement(En,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:N},w.createElement(aX,{cursor:f,cursorComp:S,cursorProps:R}))}function sX(e){var t=_Q(),r=qR(),n=ml(),i=RQ();return t==null||r==null||n==null||i==null?null:w.createElement(iX,pb({},e,{offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var ND=w.createContext(null),lX=()=>w.useContext(ND),F0={exports:{}},OT;function oX(){return OT||(OT=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(f,h,p){this.fn=f,this.context=h,this.once=p||!1}function l(f,h,p,y,v){if(typeof p!="function")throw new TypeError("The listener must be a function");var x=new i(p,y||f,v),j=r?r+h:h;return f._events[j]?f._events[j].fn?f._events[j]=[f._events[j],x]:f._events[j].push(x):(f._events[j]=x,f._eventsCount++),f}function o(f,h){--f._eventsCount===0?f._events=new n:delete f._events[h]}function c(){this._events=new n,this._eventsCount=0}c.prototype.eventNames=function(){var h=[],p,y;if(this._eventsCount===0)return h;for(y in p=this._events)t.call(p,y)&&h.push(r?y.slice(1):y);return Object.getOwnPropertySymbols?h.concat(Object.getOwnPropertySymbols(p)):h},c.prototype.listeners=function(h){var p=r?r+h:h,y=this._events[p];if(!y)return[];if(y.fn)return[y.fn];for(var v=0,x=y.length,j=new Array(x);v<x;v++)j[v]=y[v].fn;return j},c.prototype.listenerCount=function(h){var p=r?r+h:h,y=this._events[p];return y?y.fn?1:y.length:0},c.prototype.emit=function(h,p,y,v,x,j){var S=r?r+h:h;if(!this._events[S])return!1;var N=this._events[S],O=arguments.length,P,E;if(N.fn){switch(N.once&&this.removeListener(h,N.fn,void 0,!0),O){case 1:return N.fn.call(N.context),!0;case 2:return N.fn.call(N.context,p),!0;case 3:return N.fn.call(N.context,p,y),!0;case 4:return N.fn.call(N.context,p,y,v),!0;case 5:return N.fn.call(N.context,p,y,v,x),!0;case 6:return N.fn.call(N.context,p,y,v,x,j),!0}for(E=1,P=new Array(O-1);E<O;E++)P[E-1]=arguments[E];N.fn.apply(N.context,P)}else{var A=N.length,T;for(E=0;E<A;E++)switch(N[E].once&&this.removeListener(h,N[E].fn,void 0,!0),O){case 1:N[E].fn.call(N[E].context);break;case 2:N[E].fn.call(N[E].context,p);break;case 3:N[E].fn.call(N[E].context,p,y);break;case 4:N[E].fn.call(N[E].context,p,y,v);break;default:if(!P)for(T=1,P=new Array(O-1);T<O;T++)P[T-1]=arguments[T];N[E].fn.apply(N[E].context,P)}}return!0},c.prototype.on=function(h,p,y){return l(this,h,p,y,!1)},c.prototype.once=function(h,p,y){return l(this,h,p,y,!0)},c.prototype.removeListener=function(h,p,y,v){var x=r?r+h:h;if(!this._events[x])return this;if(!p)return o(this,x),this;var j=this._events[x];if(j.fn)j.fn===p&&(!v||j.once)&&(!y||j.context===y)&&o(this,x);else{for(var S=0,N=[],O=j.length;S<O;S++)(j[S].fn!==p||v&&!j[S].once||y&&j[S].context!==y)&&N.push(j[S]);N.length?this._events[x]=N.length===1?N[0]:N:o(this,x)}return this},c.prototype.removeAllListeners=function(h){var p;return h?(p=r?r+h:h,this._events[p]&&o(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})(F0)),F0.exports}var uX=oX();const cX=ns(uX);var Jc=new cX,yb="recharts.syncEvent.tooltip",_T="recharts.syncEvent.brush",OD=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!ia(r))return e[r]}},dX={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},_D=yr({name:"options",initialState:dX,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),fX=_D.reducer,{createEventEmitter:hX}=_D.actions;function mX(e){return e.tooltip.syncInteraction}var pX={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},ED=yr({name:"chartData",initialState:pX,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:ET,setDataStartEndIndexes:yX,setComputedData:Die}=ED.actions,vX=ED.reducer,gX=["x","y"];function AT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?AT(Object(r),!0).forEach(function(n){xX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):AT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function xX(e,t,r){return(t=bX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function bX(e){var t=jX(e,"string");return typeof t=="symbol"?t:t+""}function jX(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 SX(e,t){if(e==null)return{};var r,n,i=wX(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function wX(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 NX(){var e=ge(Mj),t=ge(Rj),r=ct(),n=ge(O4),i=ge(ni),l=ml(),o=cp(),c=ge(f=>f.rootProps.className);w.useEffect(()=>{if(e==null)return hl;var f=(h,p,y)=>{if(t!==y&&e===h){if(p.payload.active===!1){r(Ec({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(n==="index"){var v;if(o&&p!==null&&p!==void 0&&(v=p.payload)!==null&&v!==void 0&&v.coordinate&&p.payload.sourceViewBox){var x=p.payload.coordinate,{x:j,y:S}=x,N=SX(x,gX),{x:O,y:P,width:E,height:A}=p.payload.sourceViewBox,T=fo(fo({},N),{},{x:o.x+(E?(j-O)/E:0)*o.width,y:o.y+(A?(S-P)/A:0)*o.height});r(fo(fo({},p),{},{payload:fo(fo({},p.payload),{},{coordinate:T})}))}else r(p);return}if(i!=null){var M;if(typeof n=="function"){var R={activeTooltipIndex:p.payload.index==null?void 0:Number(p.payload.index),isTooltipActive:p.payload.active,activeIndex:p.payload.index==null?void 0:Number(p.payload.index),activeLabel:p.payload.label,activeDataKey:p.payload.dataKey,activeCoordinate:p.payload.coordinate},I=n(i,R);M=i[I]}else n==="value"&&(M=i.find(B=>String(B.value)===p.payload.label));var{coordinate:$}=p.payload;if($==null||o==null){r(Ec({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(M==null){r(Ec({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:D,y:H}=$,q=Math.min(D,o.x+o.width),ae=Math.min(H,o.y+o.height),Q={x:l==="horizontal"?M.coordinate:q,y:l==="horizontal"?ae:M.coordinate},Z=Ec({active:p.payload.active,coordinate:Q,dataKey:p.payload.dataKey,index:String(M.index),label:p.payload.label,sourceViewBox:p.payload.sourceViewBox,graphicalItemId:p.payload.graphicalItemId});r(Z)}}};return Jc.on(yb,f),()=>{Jc.off(yb,f)}},[c,r,t,e,n,i,l,o])}function OX(){var e=ge(Mj),t=ge(Rj),r=ct();w.useEffect(()=>{if(e==null)return hl;var n=(i,l,o)=>{t!==o&&e===i&&r(yX(l))};return Jc.on(_T,n),()=>{Jc.off(_T,n)}},[r,t,e])}function _X(){var e=ct();w.useEffect(()=>{e(hX())},[e]),NX(),OX()}function EX(e,t,r,n,i,l){var o=ge(j=>kQ(j,e,t)),c=ge(yQ),f=ge(Rj),h=ge(Mj),p=ge(O4),y=ge(mX),v=(y==null?void 0:y.sourceViewBox)!=null,x=cp();w.useEffect(()=>{if(!v&&h!=null&&f!=null){var j=Ec({active:l,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n,sourceViewBox:x,graphicalItemId:c});Jc.emit(yb,h,j,f)}},[v,r,o,c,i,n,f,h,p,l,x])}function PT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function TT(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(r),!0).forEach(function(n){AX(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function AX(e,t,r){return(t=PX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PX(e){var t=TX(e,"string");return typeof t=="symbol"?t:t+""}function TX(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 CX(e){return e.dataKey}function MX(e,t){return w.isValidElement(e)?w.cloneElement(e,t):typeof e=="function"?w.createElement(e,t):w.createElement(WH,t)}var CT=[],RX={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 _S(e){var t,r,n=lr(e,RX),{active:i,allowEscapeViewBox:l,animationDuration:o,animationEasing:c,content:f,filterNull:h,isAnimationActive:p,offset:y,payloadUniqBy:v,position:x,reverseDirection:j,useTranslate3d:S,wrapperStyle:N,cursor:O,shared:P,trigger:E,defaultIndex:A,portal:T,axisId:M}=n,R=ct(),I=typeof A=="number"?String(A):A;w.useEffect(()=>{R(NV({shared:P,trigger:E,axisId:M,active:i,defaultIndex:I}))},[R,P,E,M,i,I]);var $=cp(),D=e4(),H=gV(P),{activeIndex:q,isActive:ae}=(t=ge(Ce=>$Q(Ce,H,E,I)))!==null&&t!==void 0?t:{},Q=ge(Ce=>LQ(Ce,H,E,I)),Z=ge(Ce=>SD(Ce,H,E,I)),B=ge(Ce=>IQ(Ce,H,E,I)),K=Q,ee=lX(),se=(r=i??ae)!==null&&r!==void 0?r:!1,[ue,k]=iR([K,se]),W=H==="axis"?Z:void 0;EX(H,E,B,W,q,se);var oe=T??ee;if(oe==null||$==null||H==null)return null;var le=K??CT;se||(le=CT),h&&le.length&&(le=eR(le.filter(Ce=>Ce.value!=null&&(Ce.hide!==!0||n.includeHidden)),v,CX));var ye=le.length>0,Ne=TT(TT({},n),{},{payload:le,label:W,active:se,activeIndex:q,coordinate:B,accessibilityLayer:D}),Oe=w.createElement(uF,{allowEscapeViewBox:l,animationDuration:o,animationEasing:c,isAnimationActive:p,active:se,coordinate:B,hasPayload:ye,offset:y,position:x,reverseDirection:j,useTranslate3d:S,viewBox:$,wrapperStyle:N,lastBoundingBox:ue,innerRef:k,hasPortalFromProps:!!T},MX(f,Ne));return w.createElement(w.Fragment,null,zm.createPortal(Oe,oe),se&&w.createElement(sX,{cursor:O,tooltipEventType:H,coordinate:B,payload:le,index:q}))}var ES=e=>null;ES.displayName="Cell";function DX(e,t,r){return(t=kX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kX(e){var t=IX(e,"string");return typeof t=="symbol"?t:t+""}function IX(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 LX{constructor(t){DX(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;n!=null&&this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function MT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $X(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){zX(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 zX(e,t,r){return(t=BX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BX(e){var t=UX(e,"string");return typeof t=="symbol"?t:t+""}function UX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qX={cacheSize:2e3,enableCache:!0},AD=$X({},qX),RT=new LX(AD.cacheSize),HX={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},DT="recharts_measurement_span";function FX(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",l=t.fontStyle||"",o=t.letterSpacing||"",c=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(l,"|").concat(o,"|").concat(c)}var kT=(e,t)=>{try{var r=document.getElementById(DT);r||(r=document.createElement("span"),r.setAttribute("id",DT),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,HX,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},Tc=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||gd.isSsr)return{width:0,height:0};if(!AD.enableCache)return kT(t,r);var n=FX(t,r),i=RT.get(n);if(i)return i;var l=kT(t,r);return RT.set(n,l),l},PD;function KX(e,t,r){return(t=GX(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GX(e){var t=YX(e,"string");return typeof t=="symbol"?t:t+""}function YX(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var IT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,LT=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,VX=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,QX=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,XX={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ZX=["cm","mm","pt","pc","in","Q","px"];function WX(e){return ZX.includes(e)}var jo="NaN";function JX(e,t){return e*XX[t]}class ar{static parse(t){var r,[,n,i]=(r=QX.exec(t))!==null&&r!==void 0?r:[];return n==null?ar.NaN:new ar(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,ia(t)&&(this.unit=""),r!==""&&!VX.test(r)&&(this.num=NaN,this.unit=""),WX(r)&&(this.num=JX(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new ar(NaN,""):new ar(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new ar(NaN,""):new ar(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ar(NaN,""):new ar(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new ar(NaN,""):new ar(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return ia(this.num)}}PD=ar;KX(ar,"NaN",new PD(NaN,""));function TD(e){if(e==null||e.includes(jo))return jo;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,l]=(r=IT.exec(t))!==null&&r!==void 0?r:[],o=ar.parse(n??""),c=ar.parse(l??""),f=i==="*"?o.multiply(c):o.divide(c);if(f.isNaN())return jo;t=t.replace(IT,f.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var h,[,p,y,v]=(h=LT.exec(t))!==null&&h!==void 0?h:[],x=ar.parse(p??""),j=ar.parse(v??""),S=y==="+"?x.add(j):x.subtract(j);if(S.isNaN())return jo;t=t.replace(LT,S.toString())}return t}var $T=/\(([^()]*)\)/;function eZ(e){for(var t=e,r;(r=$T.exec(t))!=null;){var[,n]=r;t=t.replace($T,TD(n))}return t}function tZ(e){var t=e.replace(/\s+/g,"");return t=eZ(t),t=TD(t),t}function rZ(e){try{return tZ(e)}catch{return jo}}function K0(e){var t=rZ(e.slice(5,-1));return t===jo?"":t}var nZ=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],aZ=["dx","dy","angle","className","breakAll"];function vb(){return vb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vb.apply(null,arguments)}function zT(e,t){if(e==null)return{};var r,n,i=iZ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function iZ(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 CD=/[ \f\n\r\t\v\u2028\u2029]+/,MD=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];mt(t)||(r?i=t.toString().split(""):i=t.toString().split(CD));var l=i.map(c=>({word:c,width:Tc(c,n).width})),o=r?0:Tc(" ",n).width;return{wordsWithComputedWidth:l,spaceWidth:o}}catch{return null}};function RD(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function sZ(e){return mt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var DD=(e,t,r,n)=>e.reduce((i,l)=>{var{word:o,width:c}=l,f=i[i.length-1];if(f&&c!=null&&(t==null||n||f.width+c+r<Number(t)))f.words.push(o),f.width+=c+r;else{var h={words:[o],width:c};i.push(h)}return i},[]),kD=e=>e.reduce((t,r)=>t.width>r.width?t:r),lZ="…",BT=(e,t,r,n,i,l,o,c)=>{var f=e.slice(0,t),h=MD({breakAll:r,style:n,children:f+lZ});if(!h)return[!1,[]];var p=DD(h.wordsWithComputedWidth,l,o,c),y=p.length>i||kD(p).width>Number(l);return[y,p]},oZ=(e,t,r,n,i)=>{var{maxLines:l,children:o,style:c,breakAll:f}=e,h=pe(l),p=String(o),y=DD(t,n,r,i);if(!h||i)return y;var v=y.length>l||kD(y).width>Number(n);if(!v)return y;for(var x=0,j=p.length-1,S=0,N;x<=j&&S<=p.length-1;){var O=Math.floor((x+j)/2),P=O-1,[E,A]=BT(p,P,f,c,l,n,r,i),[T]=BT(p,O,f,c,l,n,r,i);if(!E&&!T&&(x=O+1),E&&T&&(j=O-1),!E&&T){N=A;break}S++}return N||y},UT=e=>{var t=mt(e)?[]:e.toString().split(CD);return[{words:t,width:void 0}]},uZ=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:l,maxLines:o}=e;if((t||r)&&!gd.isSsr){var c,f,h=MD({breakAll:l,children:n,style:i});if(h){var{wordsWithComputedWidth:p,spaceWidth:y}=h;c=p,f=y}else return UT(n);return oZ({breakAll:l,children:n,maxLines:o,style:i},c,f,t,!!r)}return UT(n)},ID="#808080",cZ={angle:0,breakAll:!1,capHeight:"0.71em",fill:ID,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},AS=w.forwardRef((e,t)=>{var r=lr(e,cZ),{x:n,y:i,lineHeight:l,capHeight:o,fill:c,scaleToFit:f,textAnchor:h,verticalAnchor:p}=r,y=zT(r,nZ),v=w.useMemo(()=>uZ({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:f,style:y.style,width:y.width}),[y.breakAll,y.children,y.maxLines,f,y.style,y.width]),{dx:x,dy:j,angle:S,className:N,breakAll:O}=y,P=zT(y,aZ);if(!sa(n)||!sa(i)||v.length===0)return null;var E=Number(n)+(pe(x)?x:0),A=Number(i)+(pe(j)?j:0);if(!Be(E)||!Be(A))return null;var T;switch(p){case"start":T=K0("calc(".concat(o,")"));break;case"middle":T=K0("calc(".concat((v.length-1)/2," * -").concat(l," + (").concat(o," / 2))"));break;default:T=K0("calc(".concat(v.length-1," * -").concat(l,")"));break}var M=[],R=v[0];if(f&&R!=null){var I=R.width,{width:$}=y;M.push("scale(".concat(pe($)&&pe(I)?$/I:1,")"))}return S&&M.push("rotate(".concat(S,", ").concat(E,", ").concat(A,")")),M.length&&(P.transform=M.join(" ")),w.createElement("text",vb({},Nr(P),{ref:t,x:E,y:A,className:Xe("recharts-text",N),textAnchor:h,fill:c.includes("url")?ID:c}),v.map((D,H)=>{var q=D.words.join(O?"":" ");return w.createElement("tspan",{x:E,dy:H===0?T:l,key:"".concat(q,"-").concat(H)},q)}))});AS.displayName="Text";function qT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qT(Object(r),!0).forEach(function(n){dZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qT(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dZ(e,t,r){return(t=fZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fZ(e){var t=hZ(e,"string");return typeof t=="symbol"?t:t+""}function hZ(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 mZ=e=>{var{viewBox:t,position:r,offset:n=0,parentViewBox:i}=e,{x:l,y:o,height:c,upperWidth:f,lowerWidth:h}=Sj(t),p=l,y=l+(f-h)/2,v=(p+y)/2,x=(f+h)/2,j=p+f/2,S=c>=0?1:-1,N=S*n,O=S>0?"end":"start",P=S>0?"start":"end",E=f>=0?1:-1,A=E*n,T=E>0?"end":"start",M=E>0?"start":"end",R=i;if(r==="top"){var I={x:p+f/2,y:o-N,horizontalAnchor:"middle",verticalAnchor:O};return R&&(I.height=Math.max(o-R.y,0),I.width=f),I}if(r==="bottom"){var $={x:y+h/2,y:o+c+N,horizontalAnchor:"middle",verticalAnchor:P};return R&&($.height=Math.max(R.y+R.height-(o+c),0),$.width=h),$}if(r==="left"){var D={x:v-A,y:o+c/2,horizontalAnchor:T,verticalAnchor:"middle"};return R&&(D.width=Math.max(D.x-R.x,0),D.height=c),D}if(r==="right"){var H={x:v+x+A,y:o+c/2,horizontalAnchor:M,verticalAnchor:"middle"};return R&&(H.width=Math.max(R.x+R.width-H.x,0),H.height=c),H}var q=R?{width:x,height:c}:{};return r==="insideLeft"?Qn({x:v+A,y:o+c/2,horizontalAnchor:M,verticalAnchor:"middle"},q):r==="insideRight"?Qn({x:v+x-A,y:o+c/2,horizontalAnchor:T,verticalAnchor:"middle"},q):r==="insideTop"?Qn({x:p+f/2,y:o+N,horizontalAnchor:"middle",verticalAnchor:P},q):r==="insideBottom"?Qn({x:y+h/2,y:o+c-N,horizontalAnchor:"middle",verticalAnchor:O},q):r==="insideTopLeft"?Qn({x:p+A,y:o+N,horizontalAnchor:M,verticalAnchor:P},q):r==="insideTopRight"?Qn({x:p+f-A,y:o+N,horizontalAnchor:T,verticalAnchor:P},q):r==="insideBottomLeft"?Qn({x:y+A,y:o+c-N,horizontalAnchor:M,verticalAnchor:O},q):r==="insideBottomRight"?Qn({x:y+h-A,y:o+c-N,horizontalAnchor:T,verticalAnchor:O},q):r&&typeof r=="object"&&(pe(r.x)||nl(r.x))&&(pe(r.y)||nl(r.y))?Qn({x:l+Ln(r.x,x),y:o+Ln(r.y,c),horizontalAnchor:"end",verticalAnchor:"end"},q):Qn({x:j,y:o+c/2,horizontalAnchor:"middle",verticalAnchor:"middle"},q)},pZ=["labelRef"],yZ=["content"];function HT(e,t){if(e==null)return{};var r,n,i=vZ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function vZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function FT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ac(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){gZ(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 gZ(e,t,r){return(t=xZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xZ(e){var t=bZ(e,"string");return typeof t=="symbol"?t:t+""}function bZ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function La(){return La=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},La.apply(null,arguments)}var LD=w.createContext(null),jZ=e=>{var{x:t,y:r,upperWidth:n,lowerWidth:i,width:l,height:o,children:c}=e,f=w.useMemo(()=>({x:t,y:r,upperWidth:n,lowerWidth:i,width:l,height:o}),[t,r,n,i,l,o]);return w.createElement(LD.Provider,{value:f},c)},$D=()=>{var e=w.useContext(LD),t=cp();return e||(t?Sj(t):void 0)},SZ=w.createContext(null),wZ=()=>{var e=w.useContext(SZ),t=ge(T4);return e||t},NZ=e=>{var{value:t,formatter:r}=e,n=mt(e.children)?t:e.children;return typeof r=="function"?r(n):n},PS=e=>e!=null&&typeof e=="function",OZ=(e,t)=>{var r=zr(t-e),n=Math.min(Math.abs(t-e),360);return r*n},_Z=(e,t,r,n,i)=>{var{offset:l,className:o}=e,{cx:c,cy:f,innerRadius:h,outerRadius:p,startAngle:y,endAngle:v,clockWise:x}=i,j=(h+p)/2,S=OZ(y,v),N=S>=0?1:-1,O,P;switch(t){case"insideStart":O=y+N*l,P=x;break;case"insideEnd":O=v-N*l,P=!x;break;case"end":O=v+N*l,P=x;break;default:throw new Error("Unsupported position ".concat(t))}P=S<=0?P:!P;var E=ir(c,f,j,O),A=ir(c,f,j,O+(P?1:-1)*359),T="M".concat(E.x,",").concat(E.y,`
|
|
108
|
-
A`).concat(j,",").concat(j,",0,1,").concat(P?0:1,`,
|
|
109
|
-
`).concat(A.x,",").concat(A.y),M=mt(e.id)?Bc("recharts-radial-line-"):e.id;return w.createElement("text",La({},n,{dominantBaseline:"central",className:Xe("recharts-radial-bar-label",o)}),w.createElement("defs",null,w.createElement("path",{id:M,d:T})),w.createElement("textPath",{xlinkHref:"#".concat(M)},r))},EZ=(e,t,r)=>{var{cx:n,cy:i,innerRadius:l,outerRadius:o,startAngle:c,endAngle:f}=e,h=(c+f)/2;if(r==="outside"){var{x:p,y}=ir(n,i,o+t,h);return{x:p,y,textAnchor:p>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var v=(l+o)/2,{x,y:j}=ir(n,i,v,h);return{x,y:j,textAnchor:"middle",verticalAnchor:"middle"}},Ah=e=>e!=null&&"cx"in e&&pe(e.cx),AZ={angle:0,offset:5,zIndex:Kt.label,position:"middle",textBreakAll:!1};function PZ(e){if(!Ah(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 Di(e){var t=lr(e,AZ),{viewBox:r,parentViewBox:n,position:i,value:l,children:o,content:c,className:f="",textBreakAll:h,labelRef:p}=t,y=wZ(),v=$D(),x=i==="center"?v:y??v,j,S,N;r==null?j=x:Ah(r)?j=r:j=Sj(r);var O=PZ(j);if(!j||mt(l)&&mt(o)&&!w.isValidElement(c)&&typeof c!="function")return null;var P=Ac(Ac({},t),{},{viewBox:j});if(w.isValidElement(c)){var{labelRef:E}=P,A=HT(P,pZ);return w.cloneElement(c,A)}if(typeof c=="function"){var{content:T}=P,M=HT(P,yZ);if(S=w.createElement(c,M),w.isValidElement(S))return S}else S=NZ(t);var R=Nr(t);if(Ah(j)){if(i==="insideStart"||i==="insideEnd"||i==="end")return _Z(t,i,S,R,j);N=EZ(j,t.offset,t.position)}else{if(!O)return null;var I=mZ({viewBox:O,position:i,offset:t.offset,parentViewBox:Ah(n)?void 0:n});N=Ac(Ac({x:I.x,y:I.y,textAnchor:I.horizontalAnchor,verticalAnchor:I.verticalAnchor},I.width!==void 0?{width:I.width}:{}),I.height!==void 0?{height:I.height}:{})}return w.createElement(En,{zIndex:t.zIndex},w.createElement(AS,La({ref:p,className:Xe("recharts-label",f)},R,N,{textAnchor:RD(R.textAnchor)?R.textAnchor:N.textAnchor,breakAll:h}),S))}Di.displayName="Label";var TZ=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?w.createElement(Di,La({key:"label-implicit"},n)):sa(e)?w.createElement(Di,La({key:"label-implicit",value:e},n)):w.isValidElement(e)?e.type===Di?w.cloneElement(e,Ac({key:"label-implicit"},n)):w.createElement(Di,La({key:"label-implicit",content:e},n)):PS(e)?w.createElement(Di,La({key:"label-implicit",content:e},n)):e&&typeof e=="object"?w.createElement(Di,La({},e,{key:"label-implicit"},n)):null};function CZ(e){var{label:t,labelRef:r}=e,n=$D();return TZ(t,n,r)||null}var MZ=["valueAccessor"],RZ=["dataKey","clockWise","id","textBreakAll","zIndex"];function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_m.apply(null,arguments)}function KT(e,t){if(e==null)return{};var r,n,i=DZ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function DZ(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var kZ=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(sZ(t))return t},zD=w.createContext(void 0),BD=zD.Provider,UD=w.createContext(void 0);UD.Provider;function IZ(){return w.useContext(zD)}function LZ(){return w.useContext(UD)}function Ph(e){var{valueAccessor:t=kZ}=e,r=KT(e,MZ),{dataKey:n,clockWise:i,id:l,textBreakAll:o,zIndex:c}=r,f=KT(r,RZ),h=IZ(),p=LZ(),y=h||p;return!y||!y.length?null:w.createElement(En,{zIndex:c??Kt.label},w.createElement(rn,{className:"recharts-label-list"},y.map((v,x)=>{var j,S=mt(n)?t(v,x):Ot(v.payload,n),N=mt(l)?{}:{id:"".concat(l,"-").concat(x)};return w.createElement(Di,_m({key:"label-".concat(x)},Nr(v),f,N,{fill:(j=r.fill)!==null&&j!==void 0?j:v.fill,parentViewBox:v.parentViewBox,value:S,textBreakAll:o,viewBox:v.viewBox,index:x,zIndex:0}))})))}Ph.displayName="LabelList";function qD(e){var{label:t}=e;return t?t===!0?w.createElement(Ph,{key:"labelList-implicit"}):w.isValidElement(t)||PS(t)?w.createElement(Ph,{key:"labelList-implicit",content:t}):typeof t=="object"?w.createElement(Ph,_m({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}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)}var HD=e=>{var{cx:t,cy:r,r:n,className:i}=e,l=Xe("recharts-dot",i);return pe(t)&&pe(r)&&pe(n)?w.createElement("circle",gb({},In(e),cj(e),{className:l,cx:t,cy:r,r:n})):null},$Z={radiusAxis:{},angleAxis:{}},FD=yr({name:"polarAxis",initialState:$Z,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:kie,removeRadiusAxis:Iie,addAngleAxis:Lie,removeAngleAxis:$ie}=FD.actions,zZ=FD.reducer;function BZ(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var G0={exports:{}},tt={};/**
|
|
110
|
-
* @license React
|
|
111
|
-
* react-is.production.js
|
|
112
|
-
*
|
|
113
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the MIT license found in the
|
|
116
|
-
* LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/var GT;function UZ(){if(GT)return tt;GT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function j(S){if(typeof S=="object"&&S!==null){var N=S.$$typeof;switch(N){case e:switch(S=S.type,S){case r:case i:case n:case f:case h:case v:return S;default:switch(S=S&&S.$$typeof,S){case o:case c:case y:case p:return S;case l:return S;default:return N}}case t:return N}}}return tt.ContextConsumer=l,tt.ContextProvider=o,tt.Element=e,tt.ForwardRef=c,tt.Fragment=r,tt.Lazy=y,tt.Memo=p,tt.Portal=t,tt.Profiler=i,tt.StrictMode=n,tt.Suspense=f,tt.SuspenseList=h,tt.isContextConsumer=function(S){return j(S)===l},tt.isContextProvider=function(S){return j(S)===o},tt.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===e},tt.isForwardRef=function(S){return j(S)===c},tt.isFragment=function(S){return j(S)===r},tt.isLazy=function(S){return j(S)===y},tt.isMemo=function(S){return j(S)===p},tt.isPortal=function(S){return j(S)===t},tt.isProfiler=function(S){return j(S)===i},tt.isStrictMode=function(S){return j(S)===n},tt.isSuspense=function(S){return j(S)===f},tt.isSuspenseList=function(S){return j(S)===h},tt.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===r||S===i||S===n||S===f||S===h||typeof S=="object"&&S!==null&&(S.$$typeof===y||S.$$typeof===p||S.$$typeof===o||S.$$typeof===l||S.$$typeof===c||S.$$typeof===x||S.getModuleId!==void 0)},tt.typeOf=j,tt}var YT;function qZ(){return YT||(YT=1,G0.exports=UZ()),G0.exports}var HZ=qZ(),VT=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",QT=null,Y0=null,KD=e=>{if(e===QT&&Array.isArray(Y0))return Y0;var t=[];return w.Children.forEach(e,r=>{mt(r)||(HZ.isFragment(r)?t=t.concat(KD(r.props.children)):t.push(r))}),Y0=t,QT=e,t};function FZ(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>VT(i)):n=[VT(t)],KD(e).forEach(i=>{var l=qo(i,"type.displayName")||qo(i,"type.name");l&&n.indexOf(l)!==-1&&r.push(i)}),r}var GD=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,V0={},XT;function KZ(){return XT||(XT=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){var i;if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const l=r[Symbol.toStringTag];return l==null||!((i=Object.getOwnPropertyDescriptor(r,Symbol.toStringTag))!=null&&i.writable)?!1:r.toString()===`[object ${l}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(V0)),V0}var Q0,ZT;function GZ(){return ZT||(ZT=1,Q0=KZ().isPlainObject),Q0}var YZ=GZ();const VZ=ns(YZ);var WT,JT,eC,tC,rC;function nC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function aC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nC(Object(r),!0).forEach(function(n){QZ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QZ(e,t,r){return(t=XZ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XZ(e){var t=ZZ(e,"string");return typeof t=="symbol"?t:t+""}function ZZ(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 Em(){return Em=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},Em.apply(null,arguments)}function jc(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var iC=(e,t,r,n,i)=>{var l=r-n,o;return o=bt(WT||(WT=jc(["M ",",",""])),e,t),o+=bt(JT||(JT=jc(["L ",",",""])),e+r,t),o+=bt(eC||(eC=jc(["L ",",",""])),e+r-l/2,t+i),o+=bt(tC||(tC=jc(["L ",",",""])),e+r-l/2-n,t+i),o+=bt(rC||(rC=jc(["L ",","," Z"])),e,t),o},WZ={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},JZ=e=>{var t=lr(e,WZ),{x:r,y:n,upperWidth:i,lowerWidth:l,height:o,className:c}=t,{animationEasing:f,animationDuration:h,animationBegin:p,isUpdateAnimationActive:y}=t,v=w.useRef(null),[x,j]=w.useState(-1),S=w.useRef(i),N=w.useRef(l),O=w.useRef(o),P=w.useRef(r),E=w.useRef(n),A=pp(e,"trapezoid-");if(w.useEffect(()=>{if(v.current&&v.current.getTotalLength)try{var Q=v.current.getTotalLength();Q&&j(Q)}catch{}},[]),r!==+r||n!==+n||i!==+i||l!==+l||o!==+o||i===0&&l===0||o===0)return null;var T=Xe("recharts-trapezoid",c);if(!y)return w.createElement("g",null,w.createElement("path",Em({},Nr(t),{className:T,d:iC(r,n,i,l,o)})));var M=S.current,R=N.current,I=O.current,$=P.current,D=E.current,H="0px ".concat(x===-1?1:x,"px"),q="".concat(x,"px ").concat(x,"px"),ae=r4(["strokeDasharray"],h,f);return w.createElement(mp,{animationId:A,key:A,canBegin:x>0,duration:h,easing:f,isActive:y,begin:p},Q=>{var Z=jt(M,i,Q),B=jt(R,l,Q),K=jt(I,o,Q),ee=jt($,r,Q),se=jt(D,n,Q);v.current&&(S.current=Z,N.current=B,O.current=K,P.current=ee,E.current=se);var ue=Q>0?{transition:ae,strokeDasharray:q}:{strokeDasharray:H};return w.createElement("path",Em({},Nr(t),{className:T,d:iC(ee,se,Z,B,K),ref:v,style:aC(aC({},ue),t.style)}))})},eW=["option","shapeType","activeClassName","inActiveClassName"];function tW(e,t){if(e==null)return{};var r,n,i=rW(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function rW(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function sC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Am(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){nW(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 nW(e,t,r){return(t=aW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aW(e){var t=iW(e,"string");return typeof t=="symbol"?t:t+""}function iW(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 sW(e,t){return Am(Am({},t),e)}function lW(e,t){return e==="symbols"}function lC(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return w.createElement(s4,r);case"trapezoid":return w.createElement(JZ,r);case"sector":return w.createElement(u4,r);case"symbols":if(lW(t))return w.createElement(uj,r);break;case"curve":return w.createElement(t4,r);default:return null}}function oW(e){return w.isValidElement(e)?e.props:e}function YD(e){var{option:t,shapeType:r,activeClassName:n="recharts-active-shape",inActiveClassName:i="recharts-shape"}=e,l=tW(e,eW),o;if(w.isValidElement(t))o=w.cloneElement(t,Am(Am({},l),oW(t)));else if(typeof t=="function")o=t(l,l.index);else if(VZ(t)&&typeof t!="boolean"){var c=sW(t,l);o=w.createElement(lC,{shapeType:r,elementProps:c})}else{var f=l;o=w.createElement(lC,{shapeType:r,elementProps:f})}return l.isActive?w.createElement(rn,{className:n},o):w.createElement(rn,{className:i},o)}var VD=(e,t,r)=>{var n=ct();return(i,l)=>o=>{e==null||e(i,l,o),n(tD({activeIndex:String(l),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}},QD=e=>{var t=ct();return(r,n)=>i=>{e==null||e(r,n,i),t(OV())}},XD=(e,t,r)=>{var n=ct();return(i,l)=>o=>{e==null||e(i,l,o),n(_V({activeIndex:String(l),activeDataKey:t,activeCoordinate:i.tooltipPosition,activeGraphicalItemId:r}))}};function ZD(e){var{tooltipEntrySettings:t}=e,r=ct(),n=vr(),i=w.useRef(null);return w.useLayoutEffect(()=>{n||(i.current===null?r(jV(t)):i.current!==t&&r(SV({prev:i.current,next:t})),i.current=t)},[t,r,n]),w.useLayoutEffect(()=>()=>{i.current&&(r(wV(i.current)),i.current=null)},[r]),null}function WD(e){var{legendPayload:t}=e,r=ct(),n=vr(),i=w.useRef(null);return w.useLayoutEffect(()=>{n||(i.current===null?r(dH(t)):i.current!==t&&r(fH({prev:i.current,next:t})),i.current=t)},[r,n,t]),w.useLayoutEffect(()=>()=>{i.current&&(r(hH(i.current)),i.current=null)},[r]),null}var X0,uW=()=>{var[e]=w.useState(()=>Bc("uid-"));return e},cW=(X0=YL.useId)!==null&&X0!==void 0?X0:uW;function dW(e,t){var r=cW();return t||(e?"".concat(e,"-").concat(r):r)}var fW=w.createContext(void 0),JD=e=>{var{id:t,type:r,children:n}=e,i=dW("recharts-".concat(r),t);return w.createElement(fW.Provider,{value:i},n(i))},hW={cartesianItems:[],polarItems:[]},ek=yr({name:"graphicalItems",initialState:hW,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:lt()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=wn(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},prepare:lt()},removeCartesianGraphicalItem:{reducer(e,t){var r=wn(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:lt()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:lt()},removePolarGraphicalItem:{reducer(e,t){var r=wn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:lt()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:n}=t.payload,i=wn(e).polarItems.indexOf(r);i>-1&&(e.polarItems[i]=n)},prepare:lt()}}}),{addCartesianGraphicalItem:mW,replaceCartesianGraphicalItem:pW,removeCartesianGraphicalItem:yW,addPolarGraphicalItem:zie,removePolarGraphicalItem:Bie,replacePolarGraphicalItem:Uie}=ek.actions,vW=ek.reducer,gW=e=>{var t=ct(),r=w.useRef(null);return w.useLayoutEffect(()=>{r.current===null?t(mW(e)):r.current!==e&&t(pW({prev:r.current,next:e})),r.current=e},[t,e]),w.useLayoutEffect(()=>()=>{r.current&&(t(yW(r.current)),r.current=null)},[t]),null},tk=w.memo(gW),xW=["points"];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 Z0(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){bW(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 bW(e,t,r){return(t=jW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jW(e){var t=SW(e,"string");return typeof t=="symbol"?t:t+""}function SW(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 Pm(){return Pm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pm.apply(null,arguments)}function wW(e,t){if(e==null)return{};var r,n,i=NW(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function NW(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 OW(e){var{option:t,dotProps:r,className:n}=e;if(w.isValidElement(t))return w.cloneElement(t,r);if(typeof t=="function")return t(r);var i=Xe(n,typeof t!="boolean"?t.className:""),l=r??{},{points:o}=l,c=wW(l,xW);return w.createElement(HD,Pm({},c,{className:i}))}function _W(e,t){return e==null?!1:t?!0:e.length===1}function EW(e){var{points:t,dot:r,className:n,dotClassName:i,dataKey:l,baseProps:o,needClip:c,clipPathId:f,zIndex:h=Kt.scatter}=e;if(!_W(t,r))return null;var p=GD(r),y=ZB(r),v=t.map((j,S)=>{var N,O,P=Z0(Z0(Z0({r:3},o),y),{},{index:S,cx:(N=j.x)!==null&&N!==void 0?N:void 0,cy:(O=j.y)!==null&&O!==void 0?O:void 0,dataKey:l,value:j.value,payload:j.payload,points:t});return w.createElement(OW,{key:"dot-".concat(S),option:r,dotProps:P,className:i})}),x={};return c&&f!=null&&(x.clipPath="url(#clipPath-".concat(p?"":"dots-").concat(f,")")),w.createElement(En,{zIndex:h},w.createElement(rn,Pm({className:n},x),v))}function uC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function cC(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uC(Object(r),!0).forEach(function(n){AW(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 AW(e,t,r){return(t=PW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PW(e){var t=TW(e,"string");return typeof t=="symbol"?t:t+""}function TW(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 rk=0,CW={xAxis:{},yAxis:{},zAxis:{}},nk=yr({name:"cartesianAxis",initialState:CW,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:lt()},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:lt()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:lt()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:lt()},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:lt()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:lt()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:lt()},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:lt()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:lt()},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload,i=e.yAxis[r];if(i){var l,o=i.widthHistory||[];if(o.length===3&&o[0]===o[2]&&n===o[1]&&n!==i.width&&Math.abs(n-((l=o[0])!==null&&l!==void 0?l:0))<=1)return;var c=[...o,n].slice(-3);e.yAxis[r]=cC(cC({},i),{},{width:n,widthHistory:c})}}}}),{addXAxis:MW,replaceXAxis:RW,removeXAxis:DW,addYAxis:kW,replaceYAxis:IW,removeYAxis:LW,addZAxis:qie,replaceZAxis:Hie,removeZAxis:Fie,updateYAxisWidth:$W}=nk.actions,zW=nk.reducer,BW=V([Yt],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right})),UW=V([BW,Wa,Ja],(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)}}),TS=()=>ge(UW),qW=()=>ge(jQ);function dC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function W0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?dC(Object(r),!0).forEach(function(n){HW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):dC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HW(e,t,r){return(t=FW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function FW(e){var t=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)}var GW=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:l,clipPath:o}=e;if(i===!1||t.x==null||t.y==null)return null;var c={index:r,dataKey:l,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},f=W0(W0(W0({},c),dd(i)),cj(i)),h;return w.isValidElement(i)?h=w.cloneElement(i,f):typeof i=="function"?h=i(f):h=w.createElement(HD,f),w.createElement(rn,{className:"recharts-active-dot",clipPath:o},h)};function YW(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i,clipPath:l,zIndex:o=Kt.activeDot}=e,c=ge(ul),f=qW();if(t==null||f==null)return null;var h=t.find(p=>f.includes(p.payload));return mt(h)?null:w.createElement(En,{zIndex:o},w.createElement(GW,{point:h,childIndex:Number(c),mainColor:r,dataKey:i,activeDot:n,clipPath:l}))}var fC=(e,t,r)=>{var n=r??e;if(!mt(n))return Ln(n,t,0)},VW=(e,t,r)=>{var n={},i=e.filter(jp),l=e.filter(h=>h.stackId==null),o=i.reduce((h,p)=>{var y=h[p.stackId];return y==null&&(y=[]),y.push(p),h[p.stackId]=y,h},n),c=Object.entries(o).map(h=>{var p,[y,v]=h,x=v.map(S=>S.dataKey),j=fC(t,r,(p=v[0])===null||p===void 0?void 0:p.barSize);return{stackId:y,dataKeys:x,barSize:j}}),f=l.map(h=>{var p=[h.dataKey].filter(v=>v!=null),y=fC(t,r,h.barSize);return{stackId:void 0,dataKeys:p,barSize:y}});return[...c,...f]};function hC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ph(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hC(Object(r),!0).forEach(function(n){QW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QW(e,t,r){return(t=XW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function XW(e){var t=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)}function WW(e,t,r,n,i){var l,o=n.length;if(!(o<1)){var c=Ln(e,r,0,!0),f,h=[];if(Be((l=n[0])===null||l===void 0?void 0:l.barSize)){var p=!1,y=r/o,v=n.reduce((P,E)=>P+(E.barSize||0),0);v+=(o-1)*c,v>=r&&(v-=(o-1)*c,c=0),v>=r&&y>0&&(p=!0,y*=.9,v=o*y);var x=(r-v)/2>>0,j={offset:x-c,size:0};f=n.reduce((P,E)=>{var A,T={stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:j.offset+j.size+c,size:p?y:(A=E.barSize)!==null&&A!==void 0?A:0}},M=[...P,T];return j=T.position,M},h)}else{var S=Ln(t,r,0,!0);r-2*S-(o-1)*c<=0&&(c=0);var N=(r-2*S-(o-1)*c)/o;N>1&&(N>>=0);var O=Be(i)?Math.min(N,i):N;f=n.reduce((P,E,A)=>[...P,{stackId:E.stackId,dataKeys:E.dataKeys,position:{offset:S+(N+c)*A+(N-O)/2,size:O}}],h)}return f}}var JW=(e,t,r,n,i,l,o)=>{var c=mt(o)?t:o,f=WW(r,n,i!==l?i:l,e,c);return i!==l&&f!=null&&(f=f.map(h=>ph(ph({},h),{},{position:ph(ph({},h.position),{},{offset:h.position.offset-i/2})}))),f},eJ=(e,t)=>{var r=Lj(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:l}=i;if(l)return l.find(o=>o.key===r)}}}},tJ=(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 rJ(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&Be(e.zIndex)?e.zIndex:t}var nJ=e=>{var{chartData:t}=e,r=ct(),n=vr();return w.useEffect(()=>n?()=>{}:(r(ET(t)),()=>{r(ET(void 0))}),[t,r,n]),null},mC={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},ak=yr({name:"brush",initialState:mC,reducers:{setBrushSettings(e,t){return t.payload==null?mC:t.payload}}}),{setBrushSettings:Kie}=ak.actions,aJ=ak.reducer;function iJ(e){return(e%180+180)%180}var sJ=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,l=iJ(i),o=l*Math.PI/180,c=Math.atan(n/r),f=o>c&&o<Math.PI-c?n/Math.sin(o):r/Math.cos(o);return Math.abs(f)},lJ={dots:[],areas:[],lines:[]},ik=yr({name:"referenceElements",initialState:lJ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=wn(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=wn(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=wn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:Gie,removeDot:Yie,addArea:Vie,removeArea:Qie,addLine:Xie,removeLine:Zie}=ik.actions,oJ=ik.reducer,uJ=w.createContext(void 0),cJ=e=>{var{children:t}=e,[r]=w.useState("".concat(Bc("recharts"),"-clip")),n=TS();if(n==null)return null;var{x:i,y:l,width:o,height:c}=n;return w.createElement(uJ.Provider,{value:r},w.createElement("defs",null,w.createElement("clipPath",{id:r},w.createElement("rect",{x:i,y:l,height:c,width:o}))),t)};function sk(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 dJ(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return sJ(n,r)}function fJ(e,t,r){var n=r==="width",{x:i,y:l,width:o,height:c}=e;return t===1?{start:n?i:l,end:n?i+o:l+c}:{start:n?i+o:l+c,end:n?i:l}}function ed(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var l=r();return e*(t-e*l/2-n)>=0&&e*(t+e*l/2-i)<=0}function hJ(e,t){return sk(e,t+1)}function mJ(e,t,r,n,i){for(var l=(n||[]).slice(),{start:o,end:c}=t,f=0,h=1,p=o,y=function(){var j=n==null?void 0:n[f];if(j===void 0)return{v:sk(n,h)};var S=f,N,O=()=>(N===void 0&&(N=r(j,S)),N),P=j.coordinate,E=f===0||ed(e,P,O,p,c);E||(f=0,p=o,h+=1),E&&(p=P+e*(O()/2+i),f+=h)},v;h<=l.length;)if(v=y(),v)return v.v;return[]}function pJ(e,t,r,n,i){var l=(n||[]).slice(),o=l.length;if(o===0)return[];for(var{start:c,end:f}=t,h=1;h<=o;h++){for(var p=(o-1)%h,y=c,v=!0,x=function(){var A=n[S];if(A==null)return 0;var T=S,M,R=()=>(M===void 0&&(M=r(A,T)),M),I=A.coordinate,$=S===p||ed(e,I,R,y,f);if(!$)return v=!1,1;$&&(y=I+e*(R()/2+i))},j,S=p;S<o&&(j=x(),!(j!==0&&j===1));S+=h);if(v){for(var N=[],O=p;O<o;O+=h){var P=n[O];P!=null&&N.push(P)}return N}}return[]}function pC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pC(Object(r),!0).forEach(function(n){yJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function yJ(e,t,r){return(t=vJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vJ(e){var t=gJ(e,"string");return typeof t=="symbol"?t:t+""}function gJ(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 xJ(e,t,r,n,i){for(var l=(n||[]).slice(),o=l.length,{start:c}=t,{end:f}=t,h=function(v){var x=l[v];if(x==null)return 1;var j=x,S,N=()=>(S===void 0&&(S=r(x,v)),S);if(v===o-1){var O=e*(j.coordinate+e*N()/2-f);l[v]=j=fr(fr({},j),{},{tickCoord:O>0?j.coordinate-O*e:j.coordinate})}else l[v]=j=fr(fr({},j),{},{tickCoord:j.coordinate});if(j.tickCoord!=null){var P=ed(e,j.tickCoord,N,c,f);P&&(f=j.tickCoord-e*(N()/2+i),l[v]=fr(fr({},j),{},{isShow:!0}))}},p=o-1;p>=0;p--)h(p);return l}function bJ(e,t,r,n,i,l){var o=(n||[]).slice(),c=o.length,{start:f,end:h}=t;if(l){var p=n[c-1];if(p!=null){var y=r(p,c-1),v=e*(p.coordinate+e*y/2-h);if(o[c-1]=p=fr(fr({},p),{},{tickCoord:v>0?p.coordinate-v*e:p.coordinate}),p.tickCoord!=null){var x=ed(e,p.tickCoord,()=>y,f,h);x&&(h=p.tickCoord-e*(y/2+i),o[c-1]=fr(fr({},p),{},{isShow:!0}))}}}for(var j=l?c-1:c,S=function(P){var E=o[P];if(E==null)return 1;var A=E,T,M=()=>(T===void 0&&(T=r(E,P)),T);if(P===0){var R=e*(A.coordinate-e*M()/2-f);o[P]=A=fr(fr({},A),{},{tickCoord:R<0?A.coordinate-R*e:A.coordinate})}else o[P]=A=fr(fr({},A),{},{tickCoord:A.coordinate});if(A.tickCoord!=null){var I=ed(e,A.tickCoord,M,f,h);I&&(f=A.tickCoord+e*(M()/2+i),o[P]=fr(fr({},A),{},{isShow:!0}))}},N=0;N<j;N++)S(N);return o}function CS(e,t,r){var{tick:n,ticks:i,viewBox:l,minTickGap:o,orientation:c,interval:f,tickFormatter:h,unit:p,angle:y}=e;if(!i||!i.length||!n)return[];if(pe(f)||gd.isSsr){var v;return(v=hJ(i,pe(f)?f:0))!==null&&v!==void 0?v:[]}var x=[],j=c==="top"||c==="bottom"?"width":"height",S=p&&j==="width"?Tc(p,{fontSize:t,letterSpacing:r}):{width:0,height:0},N=(T,M)=>{var R=typeof h=="function"?h(T.value,M):T.value;return j==="width"?dJ(Tc(R,{fontSize:t,letterSpacing:r}),S,y):Tc(R,{fontSize:t,letterSpacing:r})[j]},O=i[0],P=i[1],E=i.length>=2&&O!=null&&P!=null?zr(P.coordinate-O.coordinate):1,A=fJ(l,E,j);return f==="equidistantPreserveStart"?mJ(E,A,N,i,o):f==="equidistantPreserveEnd"?pJ(E,A,N,i,o):(f==="preserveStart"||f==="preserveStartEnd"?x=bJ(E,A,N,i,o,f==="preserveStartEnd"):x=xJ(E,A,N,i,o),x.filter(T=>T.isShow))}var jJ=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:l=0}=e,o=0;if(t){Array.from(t).forEach(p=>{if(p){var y=p.getBoundingClientRect();y.width>o&&(o=y.width)}});var c=r?r.getBoundingClientRect().width:0,f=i+l,h=o+f+c+(r?n:0);return Math.round(h)}return 0},SJ={xAxis:{},yAxis:{}},lk=yr({name:"renderedTicks",initialState:SJ,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:wJ,removeRenderedTicks:NJ}=lk.actions,OJ=lk.reducer,_J=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function EJ(e,t){if(e==null)return{};var r,n,i=AJ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function AJ(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 cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},cl.apply(null,arguments)}function yC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yC(Object(r),!0).forEach(function(n){PJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function PJ(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=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)}var Fa={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Kt.axis};function MJ(e){var{x:t,y:r,width:n,height:i,orientation:l,mirror:o,axisLine:c,otherSvgProps:f}=e;if(!c)return null;var h=xt(xt(xt({},f),In(c)),{},{fill:"none"});if(l==="top"||l==="bottom"){var p=+(l==="top"&&!o||l==="bottom"&&o);h=xt(xt({},h),{},{x1:t,y1:r+p*i,x2:t+n,y2:r+p*i})}else{var y=+(l==="left"&&!o||l==="right"&&o);h=xt(xt({},h),{},{x1:t+y*n,y1:r,x2:t+y*n,y2:r+i})}return w.createElement("line",cl({},h,{className:Xe("recharts-cartesian-axis-line",qo(c,"className"))}))}function RJ(e,t,r,n,i,l,o,c,f){var h,p,y,v,x,j,S=c?-1:1,N=e.tickSize||o,O=pe(e.tickCoord)?e.tickCoord:e.coordinate;switch(l){case"top":h=p=e.coordinate,v=r+ +!c*i,y=v-S*N,j=y-S*f,x=O;break;case"left":y=v=e.coordinate,p=t+ +!c*n,h=p-S*N,x=h-S*f,j=O;break;case"right":y=v=e.coordinate,p=t+ +c*n,h=p+S*N,x=h+S*f,j=O;break;default:h=p=e.coordinate,v=r+ +c*i,y=v+S*N,j=y+S*f,x=O;break}return{line:{x1:h,y1:y,x2:p,y2:v},tick:{x,y:j}}}function DJ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function kJ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function IJ(e){var{option:t,tickProps:r,value:n}=e,i,l=Xe(r.className,"recharts-cartesian-axis-tick-value");if(w.isValidElement(t))i=w.cloneElement(t,xt(xt({},r),{},{className:l}));else if(typeof t=="function")i=t(xt(xt({},r),{},{className:l}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=Xe(o,BZ(t))),i=w.createElement(AS,cl({},r,{className:o}),n)}return i}function LJ(e){var{ticks:t,axisType:r,axisId:n}=e,i=ct();return w.useEffect(()=>{if(n==null||r==null)return hl;var l=t.map(o=>({value:o.value,coordinate:o.coordinate,offset:o.offset,index:o.index}));return i(wJ({ticks:l,axisId:n,axisType:r})),()=>{i(NJ({axisId:n,axisType:r}))}},[i,t,n,r]),null}var $J=w.forwardRef((e,t)=>{var{ticks:r=[],tick:n,tickLine:i,stroke:l,tickFormatter:o,unit:c,padding:f,tickTextProps:h,orientation:p,mirror:y,x:v,y:x,width:j,height:S,tickSize:N,tickMargin:O,fontSize:P,letterSpacing:E,getTicksConfig:A,events:T,axisType:M,axisId:R}=e,I=CS(xt(xt({},A),{},{ticks:r}),P,E),$=In(A),D=dd(n),H=RD($.textAnchor)?$.textAnchor:DJ(p,y),q=kJ(p,y),ae={};typeof i=="object"&&(ae=i);var Q=xt(xt({},$),{},{fill:"none"},ae),Z=I.map(ee=>xt({entry:ee},RJ(ee,v,x,j,S,p,N,y,O))),B=Z.map(ee=>{var{entry:se,line:ue}=ee;return w.createElement(rn,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(se.value,"-").concat(se.coordinate,"-").concat(se.tickCoord)},i&&w.createElement("line",cl({},Q,ue,{className:Xe("recharts-cartesian-axis-tick-line",qo(i,"className"))})))}),K=Z.map((ee,se)=>{var ue,k,{entry:W,tick:oe}=ee,le=xt(xt(xt(xt({verticalAnchor:q},$),{},{textAnchor:H,stroke:"none",fill:l},oe),{},{index:se,payload:W,visibleTicksCount:I.length,tickFormatter:o,padding:f},h),{},{angle:(ue=(k=h==null?void 0:h.angle)!==null&&k!==void 0?k:$.angle)!==null&&ue!==void 0?ue:0}),ye=xt(xt({},le),D);return w.createElement(rn,cl({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(W.value,"-").concat(W.coordinate,"-").concat(W.tickCoord)},Vm(T,W,se)),n&&w.createElement(IJ,{option:n,tickProps:ye,value:"".concat(typeof o=="function"?o(W.value,se):W.value).concat(c||"")}))});return w.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(M,"-ticks")},w.createElement(LJ,{ticks:I,axisId:R,axisType:M}),K.length>0&&w.createElement(En,{zIndex:Kt.label},w.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(M,"-tick-labels"),ref:t},K)),B.length>0&&w.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(M,"-tick-lines")},B))}),zJ=w.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:l,hide:o,ticks:c,axisType:f,axisId:h}=e,p=EJ(e,_J),[y,v]=w.useState(""),[x,j]=w.useState(""),S=w.useRef(null);w.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var O;return jJ({ticks:S.current,label:(O=e.labelRef)===null||O===void 0?void 0:O.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var N=w.useCallback(O=>{if(O){var P=O.getElementsByClassName("recharts-cartesian-axis-tick-value");S.current=P;var E=P[0];if(E){var A=window.getComputedStyle(E),T=A.fontSize,M=A.letterSpacing;(T!==y||M!==x)&&(v(T),j(M))}}},[y,x]);return o||n!=null&&n<=0||i!=null&&i<=0?null:w.createElement(En,{zIndex:e.zIndex},w.createElement(rn,{className:Xe("recharts-cartesian-axis",l)},w.createElement(MJ,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:In(e)}),w.createElement($J,{ref:N,axisType:f,events:p,fontSize:y,getTicksConfig:e,height:e.height,letterSpacing:x,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:c,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:h}),w.createElement(jZ,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},w.createElement(CZ,{label:e.label,labelRef:e.labelRef}),e.children)))}),MS=w.forwardRef((e,t)=>{var r=lr(e,Fa);return w.createElement(zJ,cl({},r,{ref:t}))});MS.displayName="CartesianAxis";var BJ=["x1","y1","x2","y2","key"],UJ=["offset"],qJ=["xAxisId","yAxisId"],HJ=["xAxisId","yAxisId"];function vC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vC(Object(r),!0).forEach(function(n){FJ(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FJ(e,t,r){return(t=KJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KJ(e){var t=GJ(e,"string");return typeof t=="symbol"?t:t+""}function GJ(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$s.apply(null,arguments)}function Tm(e,t){if(e==null)return{};var r,n,i=YJ(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function YJ(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=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:l,height:o,ry:c}=e;return w.createElement("rect",{x:n,y:i,ry:c,width:l,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function ok(e){var{option:t,lineItemProps:r}=e,n;if(w.isValidElement(t))n=w.cloneElement(t,r);else if(typeof t=="function")n=t(r);else{var i,{x1:l,y1:o,x2:c,y2:f,key:h}=r,p=Tm(r,BJ),y=(i=In(p))!==null&&i!==void 0?i:{},{offset:v}=y,x=Tm(y,UJ);n=w.createElement("line",$s({},x,{x1:l,y1:o,x2:c,y2:f,fill:"none",key:h}))}return n}function QJ(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:l,yAxisId:o}=e,c=Tm(e,qJ),f=i.map((h,p)=>{var y=hr(hr({},c),{},{x1:t,y1:h,x2:t+r,y2:h,key:"line-".concat(p),index:p});return w.createElement(ok,{key:"line-".concat(p),option:n,lineItemProps:y})});return w.createElement("g",{className:"recharts-cartesian-grid-horizontal"},f)}function XJ(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:l,yAxisId:o}=e,c=Tm(e,HJ),f=i.map((h,p)=>{var y=hr(hr({},c),{},{x1:h,y1:t,x2:h,y2:t+r,key:"line-".concat(p),index:p});return w.createElement(ok,{option:n,lineItemProps:y,key:"line-".concat(p)})});return w.createElement("g",{className:"recharts-cartesian-grid-vertical"},f)}function ZJ(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:l,height:o,horizontalPoints:c,horizontal:f=!0}=e;if(!f||!t||!t.length||c==null)return null;var h=c.map(y=>Math.round(y+i-i)).sort((y,v)=>y-v);i!==h[0]&&h.unshift(0);var p=h.map((y,v)=>{var x=h[v+1],j=x==null,S=j?i+o-y:x-y;if(S<=0)return null;var N=v%t.length;return w.createElement("rect",{key:"react-".concat(v),y,x:n,height:S,width:l,stroke:"none",fill:t[N],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return w.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},p)}function WJ(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:l,width:o,height:c,verticalPoints:f}=e;if(!t||!r||!r.length)return null;var h=f.map(y=>Math.round(y+i-i)).sort((y,v)=>y-v);i!==h[0]&&h.unshift(0);var p=h.map((y,v)=>{var x=h[v+1],j=x==null,S=j?i+o-y:x-y;if(S<=0)return null;var N=v%r.length;return w.createElement("rect",{key:"react-".concat(v),x:y,y:l,width:S,height:c,stroke:"none",fill:r[N],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return w.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},p)}var JJ=(e,t)=>{var{xAxis:r,width:n,height:i,offset:l}=e;return IR(CS(hr(hr(hr({},Fa),r),{},{ticks:LR(r),viewBox:{x:0,y:0,width:n,height:i}})),l.left,l.left+l.width,t)},eee=(e,t)=>{var{yAxis:r,width:n,height:i,offset:l}=e;return IR(CS(hr(hr(hr({},Fa),r),{},{ticks:LR(r),viewBox:{x:0,y:0,width:n,height:i}})),l.top,l.top+l.height,t)},tee={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Kt.grid};function Dp(e){var t=wj(),r=Nj(),n=qR(),i=hr(hr({},lr(e,tee)),{},{x:pe(e.x)?e.x:n.left,y:pe(e.y)?e.y:n.top,width:pe(e.width)?e.width:n.width,height:pe(e.height)?e.height:n.height}),{xAxisId:l,yAxisId:o,x:c,y:f,width:h,height:p,syncWithTicks:y,horizontalValues:v,verticalValues:x}=i,j=vr(),S=ge($=>mT($,"xAxis",l,j)),N=ge($=>mT($,"yAxis",o,j));if(!la(h)||!la(p)||!pe(c)||!pe(f))return null;var O=i.verticalCoordinatesGenerator||JJ,P=i.horizontalCoordinatesGenerator||eee,{horizontalPoints:E,verticalPoints:A}=i;if((!E||!E.length)&&typeof P=="function"){var T=v&&v.length,M=P({yAxis:N?hr(hr({},N),{},{ticks:T?v:N.ticks}):void 0,width:t??h,height:r??p,offset:n},T?!0:y);tm(Array.isArray(M),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof M,"]")),Array.isArray(M)&&(E=M)}if((!A||!A.length)&&typeof O=="function"){var R=x&&x.length,I=O({xAxis:S?hr(hr({},S),{},{ticks:R?x:S.ticks}):void 0,width:t??h,height:r??p,offset:n},R?!0:y);tm(Array.isArray(I),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof I,"]")),Array.isArray(I)&&(A=I)}return w.createElement(En,{zIndex:i.zIndex},w.createElement("g",{className:"recharts-cartesian-grid"},w.createElement(VJ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),w.createElement(ZJ,$s({},i,{horizontalPoints:E})),w.createElement(WJ,$s({},i,{verticalPoints:A})),w.createElement(QJ,$s({},i,{offset:n,horizontalPoints:E,xAxis:S,yAxis:N})),w.createElement(XJ,$s({},i,{offset:n,verticalPoints:A,xAxis:S,yAxis:N}))))}Dp.displayName="CartesianGrid";var ree={},uk=yr({name:"errorBars",initialState:ree,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(l=>l.dataKey===n.dataKey&&l.direction===n.direction?i:l))},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:Wie,replaceErrorBar:Jie,removeErrorBar:ese}=uk.actions,nee=uk.reducer,aee=["children"];function iee(e,t){if(e==null)return{};var r,n,i=see(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function see(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 lee={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},oee=w.createContext(lee);function ck(e){var{children:t}=e,r=iee(e,aee);return w.createElement(oee.Provider,{value:r},t)}function RS(e,t){var r,n,i=ge(h=>ti(h,e)),l=ge(h=>ri(h,t)),o=(r=i==null?void 0:i.allowDataOverflow)!==null&&r!==void 0?r:kt.allowDataOverflow,c=(n=l==null?void 0:l.allowDataOverflow)!==null&&n!==void 0?n:It.allowDataOverflow,f=o||c;return{needClip:f,needClipX:o,needClipY:c}}function dk(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=TS(),{needClipX:l,needClipY:o,needClip:c}=RS(t,r);if(!c||!i)return null;var{x:f,y:h,width:p,height:y}=i;return w.createElement("clipPath",{id:"clipPath-".concat(n)},w.createElement("rect",{x:l?f:f-p/2,y:o?h:h-y/2,width:l?p:p*2,height:o?y:y*2}))}var fk=(e,t,r,n)=>ts(e,"xAxis",t,n),hk=(e,t,r,n)=>es(e,"xAxis",t,n),mk=(e,t,r,n)=>ts(e,"yAxis",r,n),pk=(e,t,r,n)=>es(e,"yAxis",r,n),uee=V([Ze,fk,mk,hk,pk],(e,t,r,n,i)=>Za(e,"xAxis")?Fo(t,n,!1):Fo(r,i,!1)),cee=(e,t,r,n,i)=>i;function dee(e){return e.type==="line"}var fee=V([Tp,cee],(e,t)=>e.filter(dee).find(r=>r.id===t)),hee=V([Ze,fk,mk,hk,pk,fee,uee,xd],(e,t,r,n,i,l,o,c)=>{var{chartData:f,dataStartIndex:h,dataEndIndex:p}=c;if(!(l==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||o==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:y,data:v}=l,x;if(v!=null&&v.length>0?x=v:x=f==null?void 0:f.slice(h,p+1),x!=null)return Dee({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:y,bandSize:o,displayedData:x})}});function mee(e){var t=dd(e),r=3,n=2;if(t!=null){var{r:i,strokeWidth:l}=t,o=Number(i),c=Number(l);return(Number.isNaN(o)||o<0)&&(o=r),(Number.isNaN(c)||c<0)&&(c=n),{r:o,strokeWidth:c}}return{r,strokeWidth:n}}var pee=["id"],yee=["type","layout","connectNulls","needClip","shape"],vee=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function td(){return td=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},td.apply(null,arguments)}function gC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ea(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?gC(Object(r),!0).forEach(function(n){gee(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 gee(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=bee(e,"string");return typeof t=="symbol"?t:t+""}function bee(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 DS(e,t){if(e==null)return{};var r,n,i=jee(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function jee(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 See=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:l}=e;return[{inactive:l,dataKey:t,type:i,color:n,value:ip(r,t),payload:e}]},wee=w.memo(e=>{var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:l,name:o,hide:c,unit:f,tooltipType:h,id:p}=e,y={dataDefinedOnItem:r,getPosition:hl,settings:{stroke:n,strokeWidth:i,fill:l,dataKey:t,nameKey:void 0,name:ip(o,t),hide:c,type:h,color:n,unit:f,graphicalItemId:p}};return w.createElement(ZD,{tooltipEntrySettings:y})}),yk=(e,t)=>"".concat(t,"px ").concat(e,"px");function Nee(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n.push(...r);return n}var Oee=(e,t,r)=>{var n=r.reduce((v,x)=>v+x,0);if(!n)return yk(t,e);for(var i=Math.floor(e/n),l=e%n,o=[],c=0,f=0;c<r.length;f+=(h=r[c])!==null&&h!==void 0?h:0,++c){var h,p=r[c];if(p!=null&&f+p>l){o=[...r.slice(0,c),l-f];break}}var y=o.length%2===0?[0,t]:[t];return[...Nee(r,i),...o,...y].map(v=>"".concat(v,"px")).join(", ")};function _ee(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:l,needClip:o}=n,{id:c}=n,f=DS(n,pee),h=In(f);return w.createElement(EW,{points:r,dot:i,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:h,needClip:o,clipPathId:t})}function Eee(e){var{showLabels:t,children:r,points:n}=e,i=w.useMemo(()=>n==null?void 0:n.map(l=>{var o,c,f={x:(o=l.x)!==null&&o!==void 0?o:0,y:(c=l.y)!==null&&c!==void 0?c:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ea(ea({},f),{},{value:l.value,payload:l.payload,viewBox:f,parentViewBox:void 0,fill:void 0})}),[n]);return w.createElement(BD,{value:t?i:void 0},r)}function xC(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:l}=e,{type:o,layout:c,connectNulls:f,needClip:h,shape:p}=l,y=DS(l,yee),v=ea(ea({},Nr(y)),{},{fill:"none",className:"recharts-line-curve",clipPath:h?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:c,connectNulls:f,strokeDasharray:i??l.strokeDasharray});return w.createElement(w.Fragment,null,(n==null?void 0:n.length)>1&&w.createElement(YD,td({shapeType:"curve",option:p},v,{pathRef:r})),w.createElement(_ee,{points:n,clipPathId:t,props:l}))}function Aee(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Pee(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:l}=e,{points:o,strokeDasharray:c,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:y,animateNewValues:v,width:x,height:j,onAnimationEnd:S,onAnimationStart:N}=r,O=i.current,P=pp(o,"recharts-line-"),E=w.useRef(P),[A,T]=w.useState(!1),M=!A,R=w.useCallback(()=>{typeof S=="function"&&S(),T(!1)},[S]),I=w.useCallback(()=>{typeof N=="function"&&N(),T(!0)},[N]),$=Aee(n.current),D=w.useRef(0);E.current!==P&&(D.current=l.current,E.current=P);var H=D.current;return w.createElement(Eee,{points:o,showLabels:M},r.children,w.createElement(mp,{animationId:P,begin:h,duration:p,isActive:f,easing:y,onAnimationEnd:R,onAnimationStart:I,key:P},q=>{var ae=jt(H,$+H,q),Q=Math.min(ae,$),Z;if(f)if(c){var B="".concat(c).split(/[,\s]+/gim).map(se=>parseFloat(se));Z=Oee(Q,$,B)}else Z=yk($,Q);else Z=c==null?void 0:String(c);if(q>0&&$>0&&(i.current=o,l.current=Math.max(l.current,Q)),O){var K=O.length/o.length,ee=q===1?o:o.map((se,ue)=>{var k=Math.floor(ue*K);if(O[k]){var W=O[k];return ea(ea({},se),{},{x:jt(W.x,se.x,q),y:jt(W.y,se.y,q)})}return v?ea(ea({},se),{},{x:jt(x*2,se.x,q),y:jt(j/2,se.y,q)}):ea(ea({},se),{},{x:se.x,y:se.y})});return i.current=ee,w.createElement(xC,{props:r,points:ee,clipPathId:t,pathRef:n,strokeDasharray:Z})}return w.createElement(xC,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:Z})}),w.createElement(qD,{label:r.label}))}function Tee(e){var{clipPathId:t,props:r}=e,n=w.useRef(null),i=w.useRef(0),l=w.useRef(null);return w.createElement(Pee,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:l})}var Cee=(e,t)=>{var r,n;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(n=e.y)!==null&&n!==void 0?n:void 0,value:e.value,errorVal:Ot(e.payload,t)}};class Mee extends w.Component{render(){var{hide:t,dot:r,points:n,className:i,xAxisId:l,yAxisId:o,top:c,left:f,width:h,height:p,id:y,needClip:v,zIndex:x}=this.props;if(t)return null;var j=Xe("recharts-line",i),S=y,{r:N,strokeWidth:O}=mee(r),P=GD(r),E=N*2+O,A=v?"url(#clipPath-".concat(P?"":"dots-").concat(S,")"):void 0;return w.createElement(En,{zIndex:x},w.createElement(rn,{className:j},v&&w.createElement("defs",null,w.createElement(dk,{clipPathId:S,xAxisId:l,yAxisId:o}),!P&&w.createElement("clipPath",{id:"clipPath-dots-".concat(S)},w.createElement("rect",{x:f-E/2,y:c-E/2,width:h+E,height:p+E}))),w.createElement(ck,{xAxisId:l,yAxisId:o,data:n,dataPointFormatter:Cee,errorBarOffset:0},w.createElement(Tee,{props:this.props,clipPathId:S}))),w.createElement(YW,{activeDot:this.props.activeDot,points:n,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:A}))}}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:Kt.line,type:"linear"};function Ree(e){var t=lr(e,vk),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:l,animationEasing:o,connectNulls:c,dot:f,hide:h,isAnimationActive:p,label:y,legendType:v,xAxisId:x,yAxisId:j,id:S}=t,N=DS(t,vee),{needClip:O}=RS(x,j),P=TS(),E=ml(),A=vr(),T=ge(D=>hee(D,x,j,A,S));if(E!=="horizontal"&&E!=="vertical"||T==null||P==null)return null;var{height:M,width:R,x:I,y:$}=P;return w.createElement(Mee,td({},N,{id:S,connectNulls:c,dot:f,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:l,animationEasing:o,isAnimationActive:p,hide:h,label:y,legendType:v,xAxisId:x,yAxisId:j,points:T,layout:E,height:M,width:R,left:I,top:$,needClip:O}))}function Dee(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:l,dataKey:o,bandSize:c,displayedData:f}=e;return f.map((h,p)=>{var y=Ot(h,o);if(t==="horizontal"){var v=sA({axis:r,ticks:i,bandSize:c,entry:h,index:p}),x=mt(y)?null:n.scale.map(y);return{x:v,y:x??null,value:y,payload:h}}var j=mt(y)?null:r.scale.map(y),S=sA({axis:n,ticks:l,bandSize:c,entry:h,index:p});return j==null||S==null?null:{x:j,y:S,value:y,payload:h}}).filter(Boolean)}function kee(e){var t=lr(e,vk),r=vr();return w.createElement(JD,{id:t.id,type:"line"},n=>w.createElement(w.Fragment,null,w.createElement(WD,{legendPayload:See(t)}),w.createElement(wee,{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}),w.createElement(tk,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),w.createElement(Ree,td({},t,{id:n}))))}var gk=w.memo(kee,nu);gk.displayName="Line";function gl(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:rk}function xl(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:rk}var Iee="Invariant failed";function Lee(e,t){throw new Error(Iee)}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 kS(e){return w.createElement(YD,xb({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var $ee=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(pe(t))return t;var l=pe(n)||mt(n);return l?t(n,i):(l||Lee(),r)}},zee=(e,t,r)=>r,Bee=(e,t)=>t,Pd=V([Tp,Bee],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),Uee=V([Pd],e=>e==null?void 0:e.maxBarSize),qee=(e,t,r,n)=>n,Hee=V([Ze,Tp,gl,xl,zee],(e,t,r,n,i)=>t.filter(l=>e==="horizontal"?l.xAxisId===r:l.yAxisId===n).filter(l=>l.isPanorama===i).filter(l=>l.hide===!1).filter(l=>l.type==="bar")),Fee=(e,t,r)=>{var n=Ze(e),i=gl(e,t),l=xl(e,t);if(!(i==null||l==null))return n==="horizontal"?mb(e,"yAxis",l,r):mb(e,"xAxis",i,r)},Kee=(e,t)=>{var r=Ze(e),n=gl(e,t),i=xl(e,t);if(!(n==null||i==null))return r==="horizontal"?hT(e,"xAxis",n):hT(e,"yAxis",i)},Gee=V([Hee,A7,Kee],VW),Yee=(e,t,r)=>{var n,i,l=Pd(e,t);if(l==null)return 0;var o=gl(e,t),c=xl(e,t);if(o==null||c==null)return 0;var f=Ze(e),h=S4(e),{maxBarSize:p}=l,y=mt(p)?h:p,v,x;return f==="horizontal"?(v=ts(e,"xAxis",o,r),x=es(e,"xAxis",o,r)):(v=ts(e,"yAxis",c,r),x=es(e,"yAxis",c,r)),(n=(i=Fo(v,x,!0))!==null&&i!==void 0?i:y)!==null&&n!==void 0?n:0},xk=(e,t,r)=>{var n=Ze(e),i=gl(e,t),l=xl(e,t);if(!(i==null||l==null)){var o,c;return n==="horizontal"?(o=ts(e,"xAxis",i,r),c=es(e,"xAxis",i,r)):(o=ts(e,"yAxis",l,r),c=es(e,"yAxis",l,r)),Fo(o,c)}},Vee=V([Gee,S4,E7,w4,Yee,xk,Uee],JW),Qee=(e,t,r)=>{var n=gl(e,t);if(n!=null)return ts(e,"xAxis",n,r)},Xee=(e,t,r)=>{var n=xl(e,t);if(n!=null)return ts(e,"yAxis",n,r)},Zee=(e,t,r)=>{var n=gl(e,t);if(n!=null)return es(e,"xAxis",n,r)},Wee=(e,t,r)=>{var n=xl(e,t);if(n!=null)return es(e,"yAxis",n,r)},Jee=V([Vee,Pd],tJ),ete=V([Fee,Pd],eJ),tte=V([Yt,xj,Qee,Xee,Zee,Wee,Jee,Ze,x7,xk,ete,Pd,qee],(e,t,r,n,i,l,o,c,f,h,p,y,v)=>{var{chartData:x,dataStartIndex:j,dataEndIndex:S}=f;if(!(y==null||o==null||t==null||c!=="horizontal"&&c!=="vertical"||r==null||n==null||i==null||l==null||h==null)){var{data:N}=y,O;if(N!=null&&N.length>0?O=N:O=x==null?void 0:x.slice(j,S+1),O!=null)return Pte({layout:c,barSettings:y,pos:o,parentViewBox:t,bandSize:h,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:l,stackedData:p,displayedData:O,offset:e,cells:v,dataStartIndex:j})}}),rte=["index"];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 nte(e,t){if(e==null)return{};var r,n,i=ate(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ate(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 bk=w.createContext(void 0),ite=e=>{var t=w.useContext(bk);if(t!=null)return t.stackId;if(e!=null)return fq(e)},ste=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),lte=e=>{var t=w.useContext(bk);if(t!=null){var{stackId:r}=t;return"url(#".concat(ste(r,e),")")}},jk=e=>{var{index:t}=e,r=nte(e,rte),n=lte(t);return w.createElement(rn,bb({className:"recharts-bar-stack-layer",clipPath:n},r))},ote=["onMouseEnter","onMouseLeave","onClick"],ute=["value","background","tooltipPosition"],cte=["id"],dte=["onMouseEnter","onClick","onMouseLeave"];function rs(){return rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rs.apply(null,arguments)}function bC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?bC(Object(r),!0).forEach(function(n){fte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function fte(e,t,r){return(t=hte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hte(e){var t=mte(e,"string");return typeof t=="symbol"?t:t+""}function mte(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 Cm(e,t){if(e==null)return{};var r,n,i=pte(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function pte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var yte=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:l}=e;return[{inactive:l,dataKey:t,type:i,color:n,value:ip(r,t),payload:e}]},vte=w.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:l,hide:o,unit:c,tooltipType:f,id:h}=e,p={dataDefinedOnItem:void 0,getPosition:hl,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:ip(l,t),hide:o,type:f,color:i,unit:c,graphicalItemId:h}};return w.createElement(ZD,{tooltipEntrySettings:p})});function gte(e){var t=ge(ul),{data:r,dataKey:n,background:i,allOtherBarProps:l}=e,{onMouseEnter:o,onMouseLeave:c,onClick:f}=l,h=Cm(l,ote),p=VD(o,n,l.id),y=QD(c),v=XD(f,n,l.id);if(!i||r==null)return null;var x=dd(i);return w.createElement(En,{zIndex:rJ(i,Kt.barBackground)},r.map((j,S)=>{var{value:N,background:O,tooltipPosition:P}=j,E=Cm(j,ute);if(!O)return null;var A=p(j,S),T=y(j,S),M=v(j,S),R=jr(jr(jr(jr(jr({option:i,isActive:String(S)===t},E),{},{fill:"#eee"},O),x),Vm(h,j,S)),{},{onMouseEnter:A,onMouseLeave:T,onClick:M,dataKey:n,index:S,className:"recharts-bar-background-rectangle"});return w.createElement(kS,rs({key:"background-bar-".concat(S)},R))}))}function xte(e){var{showLabels:t,children:r,rects:n}=e,i=n==null?void 0:n.map(l=>{var o={x:l.x,y:l.y,width:l.width,lowerWidth:l.width,upperWidth:l.width,height:l.height};return jr(jr({},o),{},{value:l.value,payload:l.payload,parentViewBox:l.parentViewBox,viewBox:o,fill:l.fill})});return w.createElement(BD,{value:t?i:void 0},r)}function bte(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:l,dataKey:o}=e,c=ge(ul),f=ge(vD),h=r&&String(i.originalDataIndex)===c&&(f==null||o===f),[p,y]=w.useState(!1),[v,x]=w.useState(!1);w.useEffect(()=>{var E;return h?(y(!0),E=requestAnimationFrame(()=>{x(!0)})):x(!1),()=>{cancelAnimationFrame(E)}},[h]);var j=w.useCallback(()=>{h||y(!1)},[h]),S=h&&v,N=h||p,O;h?r===!0?O=t:O=r:O=t;var P=w.createElement(kS,rs({},n,{name:String(n.name)},i,{isActive:S,option:O,index:l,dataKey:o,onTransitionEnd:j}));return N?w.createElement(En,{zIndex:Kt.activeBar},w.createElement(jk,{index:i.originalDataIndex},P)):P}function jte(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:l}=e;return w.createElement(kS,rs({},r,{name:String(r.name)},n,{isActive:!1,option:t,index:i,dataKey:l}))}function Ste(e){var t,{data:r,props:n}=e,i=(t=In(n))!==null&&t!==void 0?t:{},{id:l}=i,o=Cm(i,cte),{shape:c,dataKey:f,activeBar:h}=n,{onMouseEnter:p,onClick:y,onMouseLeave:v}=n,x=Cm(n,dte),j=VD(p,f,l),S=QD(v),N=XD(y,f,l);return r?w.createElement(w.Fragment,null,r.map((O,P)=>w.createElement(jk,rs({index:O.originalDataIndex,key:"rectangle-".concat(O==null?void 0:O.x,"-").concat(O==null?void 0:O.y,"-").concat(O==null?void 0:O.value,"-").concat(P),className:"recharts-bar-rectangle"},Vm(x,O,P),{onMouseEnter:j(O,P),onMouseLeave:S(O,P),onClick:N(O,P)}),h?w.createElement(bte,{shape:c,activeBar:h,baseProps:o,entry:O,index:P,dataKey:f}):w.createElement(jte,{shape:c,baseProps:o,entry:O,index:P,dataKey:f})))):null}function wte(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:l,animationBegin:o,animationDuration:c,animationEasing:f,onAnimationEnd:h,onAnimationStart:p}=t,y=r.current,v=pp(t,"recharts-bar-"),[x,j]=w.useState(!1),S=!x,N=w.useCallback(()=>{typeof h=="function"&&h(),j(!1)},[h]),O=w.useCallback(()=>{typeof p=="function"&&p(),j(!0)},[p]);return w.createElement(xte,{showLabels:S,rects:n},w.createElement(mp,{animationId:v,begin:o,duration:c,isActive:l,easing:f,onAnimationEnd:N,onAnimationStart:O,key:v},P=>{var E=P===1?n:n==null?void 0:n.map((A,T)=>{var M=y&&y[T];if(M)return jr(jr({},A),{},{x:jt(M.x,A.x,P),y:jt(M.y,A.y,P),width:jt(M.width,A.width,P),height:jt(M.height,A.height,P)});if(i==="horizontal"){var R=jt(0,A.height,P),I=jt(A.stackedBarStart,A.y,P);return jr(jr({},A),{},{y:I,height:R})}var $=jt(0,A.width,P),D=jt(A.stackedBarStart,A.x,P);return jr(jr({},A),{},{width:$,x:D})});return P>0&&(r.current=E??null),E==null?null:w.createElement(rn,null,w.createElement(Ste,{props:t,data:E}))}),w.createElement(qD,{label:t.label}),t.children)}function Nte(e){var t=w.useRef(null);return w.createElement(wte,{previousRectanglesRef:t,props:e})}var Sk=0,Ote=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:Ot(e,t)}};class _te extends w.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:l,yAxisId:o,needClip:c,background:f,id:h}=this.props;if(t||r==null)return null;var p=Xe("recharts-bar",i),y=h;return w.createElement(rn,{className:p,id:h},c&&w.createElement("defs",null,w.createElement(dk,{clipPathId:y,xAxisId:l,yAxisId:o})),w.createElement(rn,{className:"recharts-bar-rectangles",clipPath:c?"url(#clipPath-".concat(y,")"):void 0},w.createElement(gte,{data:r,dataKey:n,background:f,allOtherBarProps:this.props}),w.createElement(Nte,this.props)))}}var Ete={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:Sk,xAxisId:0,yAxisId:0,zIndex:Kt.bar};function Ate(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:l,activeBar:o,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:p}=e,{needClip:y}=RS(t,r),v=ml(),x=vr(),j=FZ(e.children,ES),S=ge(P=>tte(P,e.id,x,j));if(v!=="vertical"&&v!=="horizontal")return null;var N,O=S==null?void 0:S[0];return O==null||O.height==null||O.width==null?N=0:N=v==="vertical"?O.height/2:O.width/2,w.createElement(ck,{xAxisId:t,yAxisId:r,data:S,dataPointFormatter:Ote,errorBarOffset:N},w.createElement(_te,rs({},e,{layout:v,needClip:y,data:S,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:l,activeBar:o,animationBegin:c,animationDuration:f,animationEasing:h,isAnimationActive:p})))}function Pte(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n,hasCustomShape:i},pos:l,bandSize:o,xAxis:c,yAxis:f,xAxisTicks:h,yAxisTicks:p,stackedData:y,displayedData:v,offset:x,cells:j,parentViewBox:S,dataStartIndex:N}=e,O=t==="horizontal"?f:c,P=y?O.scale.domain():null,E=hq({numericAxis:O}),A=O.scale.map(E);return v.map((T,M)=>{var R,I,$,D,H,q;if(y){var ae=y[M+N];if(ae==null)return null;R=lq(ae,P)}else R=Ot(T,r),Array.isArray(R)||(R=[E,R]);var Q=$ee(n,Sk)(R[1],M);if(t==="horizontal"){var Z,B=f.scale.map(R[0]),K=f.scale.map(R[1]);if(B==null||K==null)return null;I=lA({axis:c,ticks:h,bandSize:o,offset:l.offset,entry:T,index:M}),$=(Z=K??B)!==null&&Z!==void 0?Z:void 0,D=l.size;var ee=B-K;if(H=ia(ee)?0:ee,q={x:I,y:x.top,width:D,height:x.height},Math.abs(Q)>0&&Math.abs(H)<Math.abs(Q)){var se=zr(H||Q)*(Math.abs(Q)-Math.abs(H));$-=se,H+=se}}else{var ue=c.scale.map(R[0]),k=c.scale.map(R[1]);if(ue==null||k==null)return null;if(I=ue,$=lA({axis:f,ticks:p,bandSize:o,offset:l.offset,entry:T,index:M}),D=k-ue,H=l.size,q={x:x.left,y:$,width:x.width,height:H},Math.abs(Q)>0&&Math.abs(D)<Math.abs(Q)){var W=zr(D||Q)*(Math.abs(Q)-Math.abs(D));D+=W}}if(I==null||$==null||D==null||H==null||!i&&(D===0||H===0))return null;var oe=jr(jr({},T),{},{stackedBarStart:A,x:I,y:$,width:D,height:H,value:y?R:R[1],payload:T,background:q,tooltipPosition:{x:I+D/2,y:$+H/2},parentViewBox:S,originalDataIndex:M},j&&j[M]&&j[M].props);return oe}).filter(Boolean)}function Tte(e){var t=lr(e,Ete),r=ite(t.stackId),n=vr();return w.createElement(JD,{id:t.id,type:"bar"},i=>w.createElement(w.Fragment,null,w.createElement(WD,{legendPayload:yte(t)}),w.createElement(vte,{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}),w.createElement(tk,{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}),w.createElement(En,{zIndex:t.zIndex},w.createElement(Ate,rs({},t,{id:i})))))}var IS=w.memo(Tte,nu);IS.displayName="Bar";var Cte=["domain","range"],Mte=["domain","range"];function jC(e,t){if(e==null)return{};var r,n,i=Rte(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Rte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function SC(e,t){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 wk(e,t){if(e===t)return!0;var{domain:r,range:n}=e,i=jC(e,Cte),{domain:l,range:o}=t,c=jC(t,Mte);return!SC(r,l)||!SC(n,o)?!1:nu(i,c)}var Dte=["type"],kte=["dangerouslySetInnerHTML","ticks","scale"],Ite=["id","scale"];function jb(){return jb=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},jb.apply(null,arguments)}function wC(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?wC(Object(r),!0).forEach(function(n){Lte(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Lte(e,t,r){return(t=$te(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $te(e){var t=zte(e,"string");return typeof t=="symbol"?t:t+""}function zte(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 Sb(e,t){if(e==null)return{};var r,n,i=Bte(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Bte(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 Ute(e){var t=ct(),r=w.useRef(null),n=HR(),{type:i}=e,l=Sb(e,Dte),o=gp(n,"xAxis",i),c=w.useMemo(()=>{if(o!=null)return NC(NC({},l),{},{type:o})},[l,o]);return w.useLayoutEffect(()=>{c!=null&&(r.current===null?t(MW(c)):r.current!==c&&t(RW({prev:r.current,next:c})),r.current=c)},[c,t]),w.useLayoutEffect(()=>()=>{r.current&&(t(DW(r.current)),r.current=null)},[t]),null}var qte=e=>{var{xAxisId:t,className:r}=e,n=ge(xj),i=vr(),l="xAxis",o=ge(O=>Q3(O,l,t,i)),c=ge(O=>G3(O,t)),f=ge(O=>uV(O,t)),h=ge(O=>m3(O,t));if(c==null||f==null||h==null)return null;var{dangerouslySetInnerHTML:p,ticks:y,scale:v}=e,x=Sb(e,kte),{id:j,scale:S}=h,N=Sb(h,Ite);return w.createElement(MS,jb({},x,N,{x:f.x,y:f.y,width:c.width,height:c.height,className:Xe("recharts-".concat(l," ").concat(l),r),viewBox:n,ticks:o,axisType:l,axisId:t}))},Hte={allowDataOverflow:kt.allowDataOverflow,allowDecimals:kt.allowDecimals,allowDuplicatedCategory:kt.allowDuplicatedCategory,angle:kt.angle,axisLine:Fa.axisLine,height:kt.height,hide:!1,includeHidden:kt.includeHidden,interval:kt.interval,label:!1,minTickGap:kt.minTickGap,mirror:kt.mirror,orientation:kt.orientation,padding:kt.padding,reversed:kt.reversed,scale:kt.scale,tick:kt.tick,tickCount:kt.tickCount,tickLine:Fa.tickLine,tickSize:Fa.tickSize,type:kt.type,niceTicks:kt.niceTicks,xAxisId:0},Fte=e=>{var t=lr(e,Hte);return w.createElement(w.Fragment,null,w.createElement(Ute,{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}),w.createElement(qte,t))},kp=w.memo(Fte,wk);kp.displayName="XAxis";var Kte=["type"],Gte=["dangerouslySetInnerHTML","ticks","scale"],Yte=["id","scale"];function wb(){return wb=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},wb.apply(null,arguments)}function OC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function _C(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OC(Object(r),!0).forEach(function(n){Vte(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 Vte(e,t,r){return(t=Qte(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qte(e){var t=Xte(e,"string");return typeof t=="symbol"?t:t+""}function Xte(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Nb(e,t){if(e==null)return{};var r,n,i=Zte(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Zte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Wte(e){var t=ct(),r=w.useRef(null),n=HR(),{type:i}=e,l=Nb(e,Kte),o=gp(n,"yAxis",i),c=w.useMemo(()=>{if(o!=null)return _C(_C({},l),{},{type:o})},[o,l]);return w.useLayoutEffect(()=>{c!=null&&(r.current===null?t(kW(c)):r.current!==c&&t(IW({prev:r.current,next:c})),r.current=c)},[c,t]),w.useLayoutEffect(()=>()=>{r.current&&(t(LW(r.current)),r.current=null)},[t]),null}function Jte(e){var{yAxisId:t,className:r,width:n,label:i}=e,l=w.useRef(null),o=w.useRef(null),c=ge(xj),f=vr(),h=ct(),p="yAxis",y=ge(M=>Y3(M,t)),v=ge(M=>dV(M,t)),x=ge(M=>Q3(M,p,t,f)),j=ge(M=>p3(M,t));if(w.useLayoutEffect(()=>{if(!(n!=="auto"||!y||PS(i)||w.isValidElement(i)||j==null)){var M=l.current;if(M){var R=M.getCalculatedWidth();Math.round(y.width)!==Math.round(R)&&h($W({id:t,width:R}))}}},[x,y,h,i,t,n,j]),y==null||v==null||j==null)return null;var{dangerouslySetInnerHTML:S,ticks:N,scale:O}=e,P=Nb(e,Gte),{id:E,scale:A}=j,T=Nb(j,Yte);return w.createElement(MS,wb({},P,T,{ref:l,labelRef:o,x:v.x,y:v.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:y.width,height:y.height,className:Xe("recharts-".concat(p," ").concat(p),r),viewBox:c,ticks:x,axisType:p,axisId:t}))}var ere={allowDataOverflow:It.allowDataOverflow,allowDecimals:It.allowDecimals,allowDuplicatedCategory:It.allowDuplicatedCategory,angle:It.angle,axisLine:Fa.axisLine,hide:!1,includeHidden:It.includeHidden,interval:It.interval,label:!1,minTickGap:It.minTickGap,mirror:It.mirror,orientation:It.orientation,padding:It.padding,reversed:It.reversed,scale:It.scale,tick:It.tick,tickCount:It.tickCount,tickLine:Fa.tickLine,tickSize:Fa.tickSize,type:It.type,niceTicks:It.niceTicks,width:It.width,yAxisId:0},tre=e=>{var t=lr(e,ere);return w.createElement(w.Fragment,null,w.createElement(Wte,{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}),w.createElement(Jte,t))},Ip=w.memo(tre,wk);Ip.displayName="YAxis";var rre=(e,t)=>t,LS=V([rre,Ze,T4,Qt,hD,ni,DQ,Yt],UQ);function nre(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function $S(e){var t=e.currentTarget.getBoundingClientRect(),r,n;if(nre(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 l=e.currentTarget;r=l.offsetWidth>0?t.width/l.offsetWidth:1,n=l.offsetHeight>0?t.height/l.offsetHeight:1}var o=(c,f)=>({relativeX:Math.round((c-t.left)/r),relativeY:Math.round((f-t.top)/n)});return"touches"in e?Array.from(e.touches).map(c=>o(c.clientX,c.clientY)):o(e.clientX,e.clientY)}var Nk=nn("mouseClick"),Ok=md();Ok.startListening({actionCreator:Nk,effect:(e,t)=>{var r=e.payload,n=LS(t.getState(),$S(r));(n==null?void 0:n.activeIndex)!=null&&t.dispatch(EV({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Ob=nn("mouseMove"),_k=md(),ho=null,_s=null,J0=null;_k.startListening({actionCreator:Ob,effect:(e,t)=>{var r=e.payload,n=t.getState(),{throttleDelay:i,throttledEvents:l}=n.eventSettings,o=l==="all"||(l==null?void 0:l.includes("mousemove"));ho!==null&&(cancelAnimationFrame(ho),ho=null),_s!==null&&(typeof i!="number"||!o)&&(clearTimeout(_s),_s=null),J0=$S(r);var c=()=>{var f=t.getState(),h=Ed(f,f.tooltip.settings.shared);if(!J0){ho=null,_s=null;return}if(h==="axis"){var p=LS(f,J0);(p==null?void 0:p.activeIndex)!=null?t.dispatch(nD({activeIndex:p.activeIndex,activeDataKey:void 0,activeCoordinate:p.activeCoordinate})):t.dispatch(rD())}ho=null,_s=null};if(!o){c();return}i==="raf"?ho=requestAnimationFrame(c):typeof i=="number"&&_s===null&&(_s=setTimeout(c,i))}});function are(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var EC={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},Ek=yr({name:"rootProps",initialState:EC,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:EC.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),ire=Ek.reducer,{updateOptions:sre}=Ek.actions,lre=null,ore={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)},Ak=yr({name:"polarOptions",initialState:lre,reducers:ore}),{updatePolarOptions:tse}=Ak.actions,ure=Ak.reducer,Pk=nn("keyDown"),Tk=nn("focus"),Ck=nn("blur"),Lp=md(),mo=null,Es=null,yh=null;Lp.startListening({actionCreator:Pk,effect:(e,t)=>{yh=e.payload,mo!==null&&(cancelAnimationFrame(mo),mo=null);var r=t.getState(),{throttleDelay:n,throttledEvents:i}=r.eventSettings,l=i==="all"||i.includes("keydown");Es!==null&&(typeof n!="number"||!l)&&(clearTimeout(Es),Es=null);var o=()=>{try{var c=t.getState(),f=c.rootProps.accessibilityLayer!==!1;if(!f)return;var{keyboardInteraction:h}=c.tooltip,p=yh;if(p!=="ArrowRight"&&p!=="ArrowLeft"&&p!=="Enter")return;var y=Pc(h,ol(c),Xo(c),Zo(c)),v=y==null?-1:Number(y),x=!Number.isFinite(v)||v<0,j=ni(c),S=ol(c),N=Ed(c,c.tooltip.settings.shared);if(p==="Enter"){if(x)return;var O=Om(c,N,"hover",String(h.index));t.dispatch(Nm({active:!h.active,activeIndex:h.index,activeCoordinate:O}));return}var P=yV(c),E=P==="left-to-right"?1:-1,A=p==="ArrowRight"?1:-1,T;if(x){var M=Xo(c),R=Zo(c),I=A*E,$=Q=>({active:!1,index:String(Q),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(T=-1,I>0){for(var D=0;D<S.length;D++)if(Pc($(D),S,M,R)!=null){T=D;break}}else for(var H=S.length-1;H>=0;H--)if(Pc($(H),S,M,R)!=null){T=H;break}if(T<0)return}else{T=v+A*E;var q=(j==null?void 0:j.length)||S.length;if(q===0||T>=q||T<0)return}var ae=Om(c,N,"hover",String(T));t.dispatch(Nm({active:!0,activeIndex:T.toString(),activeCoordinate:ae}))}finally{mo=null,Es=null}};if(!l){o();return}n==="raf"?mo=requestAnimationFrame(o):typeof n=="number"&&Es===null&&(o(),yh=null,Es=setTimeout(()=>{yh?o():(Es=null,mo=null)},n))}});Lp.startListening({actionCreator:Tk,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 l="0",o=Ed(r,r.tooltip.settings.shared),c=Om(r,o,"hover",String(l));t.dispatch(Nm({active:!0,activeIndex:l,activeCoordinate:c}))}}}});Lp.startListening({actionCreator:Ck,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;i.active&&t.dispatch(Nm({active:!1,activeIndex:i.index,activeCoordinate:i.coordinate}))}}});function Mk(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,n)=>{if(n==="currentTarget")return t;var i=Reflect.get(r,n);return typeof i=="function"?i.bind(r):i}})}var gn=nn("externalEvent"),Rk=md(),vh=new Map,Sc=new Map,ex=new Map;Rk.startListening({actionCreator:gn,effect:(e,t)=>{var{handler:r,reactEvent:n}=e.payload;if(r!=null){var i=n.type,l=Mk(n);ex.set(i,{handler:r,reactEvent:l});var o=vh.get(i);o!==void 0&&(cancelAnimationFrame(o),vh.delete(i));var c=t.getState(),{throttleDelay:f,throttledEvents:h}=c.eventSettings,p=h,y=p==="all"||(p==null?void 0:p.includes(i)),v=Sc.get(i);v!==void 0&&(typeof f!="number"||!y)&&(clearTimeout(v),Sc.delete(i));var x=()=>{var N=ex.get(i);try{if(!N)return;var{handler:O,reactEvent:P}=N,E=t.getState(),A={activeCoordinate:gQ(E),activeDataKey:vD(E),activeIndex:ul(E),activeLabel:yD(E),activeTooltipIndex:ul(E),isTooltipActive:xQ(E)};O&&O(A,P)}finally{vh.delete(i),Sc.delete(i),ex.delete(i)}};if(!y){x();return}if(f==="raf"){var j=requestAnimationFrame(x);vh.set(i,j)}else if(typeof f=="number"){if(!Sc.has(i)){x();var S=setTimeout(x,f);Sc.set(i,S)}}else x()}}});var cre=V([du],e=>e.tooltipItemPayloads),dre=V([cre,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var n=e.find(l=>l.settings.graphicalItemId===r);if(n!=null){var{getPosition:i}=n;if(i!=null)return i(t)}}}),Dk=nn("touchMove"),kk=md(),As=null,Ti=null,AC=null,wc=null;kk.startListening({actionCreator:Dk,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){wc=Mk(r);var n=t.getState(),{throttleDelay:i,throttledEvents:l}=n.eventSettings,o=l==="all"||l.includes("touchmove");As!==null&&(cancelAnimationFrame(As),As=null),Ti!==null&&(typeof i!="number"||!o)&&(clearTimeout(Ti),Ti=null),AC=Array.from(r.touches).map(f=>$S({clientX:f.clientX,clientY:f.clientY,currentTarget:r.currentTarget}));var c=()=>{if(wc!=null){var f=t.getState(),h=Ed(f,f.tooltip.settings.shared);if(h==="axis"){var p,y=(p=AC)===null||p===void 0?void 0:p[0];if(y==null){As=null,Ti=null;return}var v=LS(f,y);(v==null?void 0:v.activeIndex)!=null&&t.dispatch(nD({activeIndex:v.activeIndex,activeDataKey:void 0,activeCoordinate:v.activeCoordinate}))}else if(h==="item"){var x,j=wc.touches[0];if(document.elementFromPoint==null||j==null)return;var S=document.elementFromPoint(j.clientX,j.clientY);if(!S||!S.getAttribute)return;var N=S.getAttribute(bq),O=(x=S.getAttribute(jq))!==null&&x!==void 0?x:void 0,P=vl(f).find(T=>T.id===O);if(N==null||P==null||O==null)return;var{dataKey:E}=P,A=dre(f,N,O);t.dispatch(tD({activeDataKey:E,activeIndex:N,activeCoordinate:A,activeGraphicalItemId:O}))}As=null,Ti=null}};if(!o){c();return}i==="raf"?As=requestAnimationFrame(c):typeof i=="number"&&Ti===null&&(c(),wc=null,Ti=setTimeout(()=>{wc?c():(Ti=null,As=null)},i))}}});var Ik={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Lk=yr({name:"eventSettings",initialState:Ik,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:fre}=Lk.actions,hre=Lk.reducer,mre=lR({brush:aJ,cartesianAxis:zW,chartData:vX,errorBars:nee,eventSettings:hre,graphicalItems:vW,layout:rq,legend:mH,options:fX,polarAxis:zZ,polarOptions:ure,referenceElements:oJ,renderedTicks:OJ,rootProps:ire,tooltip:AV,zIndex:eX}),pre=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return E9({reducer:mre,preloadedState:t,middleware:n=>{var i;return n({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((i="es6")!==null&&i!==void 0?i:"")}).concat([Ok.middleware,_k.middleware,Lp.middleware,Rk.middleware,kk.middleware])},enhancers:n=>{var i=n;return typeof n=="function"&&(i=n()),i.concat(SR({type:"raf"}))},devTools:{serialize:{replacer:are},name:"recharts-".concat(r)}})};function yre(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=vr(),l=w.useRef(null);if(i)return r;l.current==null&&(l.current=pre(t,n));var o=fj;return w.createElement(TH,{context:o,store:l.current},r)}function vre(e){var{layout:t,margin:r}=e,n=ct(),i=vr();return w.useEffect(()=>{i||(n(J9(t)),n(W9(r)))},[n,i,t,r]),null}var gre=w.memo(vre,nu);function xre(e){var t=ct();return w.useEffect(()=>{t(sre(e))},[t,e]),null}var bre=e=>{var t=ct();return w.useEffect(()=>{t(fre(e))},[t,e]),null},jre=w.memo(bre,nu);function PC(e){var{zIndex:t,isPanorama:r}=e,n=w.useRef(null),i=ct();return w.useLayoutEffect(()=>(n.current&&i(WQ({zIndex:t,element:n.current,isPanorama:r})),()=>{i(JQ({zIndex:t,isPanorama:r}))}),[i,t,r]),w.createElement("g",{tabIndex:-1,ref:n,className:"recharts-zIndex-layer_".concat(t)})}function TC(e){var{children:t,isPanorama:r}=e,n=ge(HQ);if(!n||n.length===0)return t;var i=n.filter(o=>o<0),l=n.filter(o=>o>0);return w.createElement(w.Fragment,null,i.map(o=>w.createElement(PC,{key:o,zIndex:o,isPanorama:r})),t,l.map(o=>w.createElement(PC,{key:o,zIndex:o,isPanorama:r})))}var Sre=["children"];function wre(e,t){if(e==null)return{};var r,n,i=Nre(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Nre(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 Mm(){return Mm=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},Mm.apply(null,arguments)}var Ore={width:"100%",height:"100%",display:"block"},_re=w.forwardRef((e,t)=>{var r=wj(),n=Nj(),i=e4();if(!la(r)||!la(n))return null;var{children:l,otherAttributes:o,title:c,desc:f}=e,h,p;return o!=null&&(typeof o.tabIndex=="number"?h=o.tabIndex:h=i?0:void 0,typeof o.role=="string"?p=o.role:p=i?"application":void 0),w.createElement(rj,Mm({},o,{title:c,desc:f,role:p,tabIndex:h,width:r,height:n,style:Ore,ref:t}),l)}),Ere=e=>{var{children:t}=e,r=ge(up);if(!r)return null;var{width:n,height:i,y:l,x:o}=r;return w.createElement(rj,{width:n,height:i,x:o,y:l},t)},CC=w.forwardRef((e,t)=>{var{children:r}=e,n=wre(e,Sre),i=vr();return i?w.createElement(Ere,null,w.createElement(TC,{isPanorama:!0},r)):w.createElement(_re,Mm({ref:t},n),w.createElement(TC,{isPanorama:!1},r))});function Are(){var e=ct(),[t,r]=w.useState(null),n=ge(xq);return w.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),l=i.width/t.offsetWidth;Be(l)&&l!==n&&e(tq(l))}},[t,e,n]),r}function MC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pre(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?MC(Object(r),!0).forEach(function(n){Tre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):MC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tre(e,t,r){return(t=Cre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Cre(e){var t=Mre(e,"string");return typeof t=="symbol"?t:t+""}function Mre(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 Ji(){return Ji=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},Ji.apply(null,arguments)}var Rre=()=>(_X(),null);function Rm(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var Dre=w.forwardRef((e,t)=>{var r,n,i=w.useRef(null),[l,o]=w.useState({containerWidth:Rm((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:Rm((n=e.style)===null||n===void 0?void 0:n.height)}),c=w.useCallback((h,p)=>{o(y=>{var v=Math.round(h),x=Math.round(p);return y.containerWidth===v&&y.containerHeight===x?y:{containerWidth:v,containerHeight:x}})},[]),f=w.useCallback(h=>{if(typeof t=="function"&&t(h),i.current!=null&&(i.current.disconnect(),i.current=null),h!=null&&typeof ResizeObserver<"u"){var{width:p,height:y}=h.getBoundingClientRect();c(p,y);var v=j=>{var S=j[0];if(S!=null){var{width:N,height:O}=S.contentRect;c(N,O)}},x=new ResizeObserver(v);x.observe(h),i.current=x}},[t,c]);return w.useEffect(()=>()=>{var h=i.current;h!=null&&h.disconnect()},[c]),w.createElement(w.Fragment,null,w.createElement(yd,{width:l.containerWidth,height:l.containerHeight}),w.createElement("div",Ji({ref:f},e)))}),kre=w.forwardRef((e,t)=>{var{width:r,height:n}=e,[i,l]=w.useState({containerWidth:Rm(r),containerHeight:Rm(n)}),o=w.useCallback((f,h)=>{l(p=>{var y=Math.round(f),v=Math.round(h);return p.containerWidth===y&&p.containerHeight===v?p:{containerWidth:y,containerHeight:v}})},[]),c=w.useCallback(f=>{if(typeof t=="function"&&t(f),f!=null){var{width:h,height:p}=f.getBoundingClientRect();o(h,p)}},[t,o]);return w.createElement(w.Fragment,null,w.createElement(yd,{width:i.containerWidth,height:i.containerHeight}),w.createElement("div",Ji({ref:c},e)))}),Ire=w.forwardRef((e,t)=>{var{width:r,height:n}=e;return w.createElement(w.Fragment,null,w.createElement(yd,{width:r,height:n}),w.createElement("div",Ji({ref:t},e)))}),Lre=w.forwardRef((e,t)=>{var{width:r,height:n}=e;return typeof r=="string"||typeof n=="string"?w.createElement(kre,Ji({},e,{ref:t})):typeof r=="number"&&typeof n=="number"?w.createElement(Ire,Ji({},e,{width:r,height:n,ref:t})):w.createElement(w.Fragment,null,w.createElement(yd,{width:r,height:n}),w.createElement("div",Ji({ref:t},e)))});function $re(e){return e?Dre:Lre}var zre=w.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:l,onContextMenu:o,onDoubleClick:c,onMouseDown:f,onMouseEnter:h,onMouseLeave:p,onMouseMove:y,onMouseUp:v,onTouchEnd:x,onTouchMove:j,onTouchStart:S,style:N,width:O,responsive:P,dispatchTouchEvents:E=!0}=e,A=w.useRef(null),T=ct(),[M,R]=w.useState(null),[I,$]=w.useState(null),D=Are(),H=bj(),q=(H==null?void 0:H.width)>0?H.width:O,ae=(H==null?void 0:H.height)>0?H.height:i,Q=w.useCallback(te=>{D(te),typeof t=="function"&&t(te),R(te),$(te),te!=null&&(A.current=te)},[D,t,R,$]),Z=w.useCallback(te=>{T(Nk(te)),T(gn({handler:l,reactEvent:te}))},[T,l]),B=w.useCallback(te=>{T(Ob(te)),T(gn({handler:h,reactEvent:te}))},[T,h]),K=w.useCallback(te=>{T(rD()),T(gn({handler:p,reactEvent:te}))},[T,p]),ee=w.useCallback(te=>{T(Ob(te)),T(gn({handler:y,reactEvent:te}))},[T,y]),se=w.useCallback(()=>{T(Tk())},[T]),ue=w.useCallback(()=>{T(Ck())},[T]),k=w.useCallback(te=>{T(Pk(te.key))},[T]),W=w.useCallback(te=>{T(gn({handler:o,reactEvent:te}))},[T,o]),oe=w.useCallback(te=>{T(gn({handler:c,reactEvent:te}))},[T,c]),le=w.useCallback(te=>{T(gn({handler:f,reactEvent:te}))},[T,f]),ye=w.useCallback(te=>{T(gn({handler:v,reactEvent:te}))},[T,v]),Ne=w.useCallback(te=>{T(gn({handler:S,reactEvent:te}))},[T,S]),Oe=w.useCallback(te=>{E&&T(Dk(te)),T(gn({handler:j,reactEvent:te}))},[T,E,j]),Ce=w.useCallback(te=>{T(gn({handler:x,reactEvent:te}))},[T,x]),de=$re(P);return w.createElement(ND.Provider,{value:M},w.createElement(SM.Provider,{value:I},w.createElement(de,{width:q??(N==null?void 0:N.width),height:ae??(N==null?void 0:N.height),className:Xe("recharts-wrapper",n),style:Pre({position:"relative",cursor:"default",width:q,height:ae},N),onClick:Z,onContextMenu:W,onDoubleClick:oe,onFocus:se,onBlur:ue,onKeyDown:k,onMouseDown:le,onMouseEnter:B,onMouseLeave:K,onMouseMove:ee,onMouseUp:ye,onTouchEnd:Ce,onTouchMove:Oe,onTouchStart:Ne,ref:Q},w.createElement(Rre,null),r)))}),Bre=["width","height","responsive","children","className","style","compact","title","desc"];function Ure(e,t){if(e==null)return{};var r,n,i=qre(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function qre(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 Hre=w.forwardRef((e,t)=>{var{width:r,height:n,responsive:i,children:l,className:o,style:c,compact:f,title:h,desc:p}=e,y=Ure(e,Bre),v=In(y);return f?w.createElement(w.Fragment,null,w.createElement(yd,{width:r,height:n}),w.createElement(CC,{otherAttributes:v,title:h,desc:p},l)):w.createElement(zre,{className:o,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},w.createElement(CC,{otherAttributes:v,title:h,desc:p,ref:t},w.createElement(cJ,null,l)))});function _b(){return _b=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},_b.apply(null,arguments)}function RC(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fre(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?RC(Object(r),!0).forEach(function(n){Kre(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):RC(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Kre(e,t,r){return(t=Gre(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gre(e){var t=Yre(e,"string");return typeof t=="symbol"?t:t+""}function Yre(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 Vre={top:5,right:5,bottom:5,left:5},Qre=Fre({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:Vre,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},Ik),$k=w.forwardRef(function(t,r){var n,i=lr(t.categoricalChartProps,Qre),{chartName:l,defaultTooltipEventType:o,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,categoricalChartProps:h}=t,p={chartName:l,defaultTooltipEventType:o,validateTooltipEventTypes:c,tooltipPayloadSearcher:f,eventEmitter:void 0};return w.createElement(yre,{preloadedState:{options:p},reduxStoreName:(n=h.id)!==null&&n!==void 0?n:l},w.createElement(nJ,{chartData:h.data}),w.createElement(gre,{layout:i.layout,margin:i.margin}),w.createElement(jre,{throttleDelay:i.throttleDelay,throttledEvents:i.throttledEvents}),w.createElement(xre,{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}),w.createElement(Hre,_b({},i,{ref:r})))}),Xre=["axis"],Zre=w.forwardRef((e,t)=>w.createElement($k,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Xre,tooltipPayloadSearcher:OD,categoricalChartProps:e,ref:t})),Wre=["axis","item"],zk=w.forwardRef((e,t)=>w.createElement($k,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Wre,tooltipPayloadSearcher:OD,categoricalChartProps:e,ref:t}));const ki="",Eb=[{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}],tx=10;function Jre(e,t,r=new Date){const n=ene(e),i=rne(e,n),l=nne(n.flatMap(y=>y.category??[])),o=l.length>0,c=n.some(y=>y.startedAtMs!==void 0),f=Eb.find(y=>y.value===t.timePeriod)??Eb[0],h=f.windowMs===void 0?void 0:r.getTime()-f.windowMs,p=n.filter(y=>t.experiment&&y.experiment!==t.experiment||t.category&&y.category!==t.category?!1:h!==void 0?y.startedAtMs!==void 0&&y.startedAtMs>=h:!0);return{buckets:ane(p.map(y=>y.score)),experimentOptions:i,categoryOptions:l,totalScores:n.length,filteredScores:p.length,categoryAvailable:o,hasTimestampedScores:c}}function ene(e){return e.runs&&e.runs.length>0?e.runs.flatMap(t=>tne(t)):e.cells.flatMap(t=>t.tests.flatMap(r=>{const n=Bk(r,t.experiment);return n?[n]:[]}))}function tne(e){const t=sne(e.started_at);return e.tests.flatMap(r=>{const n=Bk(r,e.experiment);return n?[{...n,startedAtMs:t}]:[]})}function Bk(e,t){if(!Number.isFinite(e.score))return;const r=ine(e.category);return{score:e.score,experiment:t,...r&&{category:r}}}function rne(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,l)=>i.localeCompare(l)).map(i=>({value:i,label:i,count:r.get(i)??0}))}function nne(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 ane(e){if(e.length===0)return[];const t=Array.from({length:tx},(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*tx),tx-1);t[i].count++}return t}function ine(e){const t=e==null?void 0:e.trim();return t||void 0}function sne(e){const t=Date.parse(e);return Number.isFinite(t)?t:void 0}const Nt={green:"#34d399",red:"#f87171",gray:"#4b5563",cyan:"#22d3ee",gridLine:"#1f2937",labelText:"#9ca3af"},DC=["#22d3ee","#34d399","#facc15","#f87171","#a78bfa","#fb923c","#f472b6","#60a5fa"];function lne(e){return DC[e%DC.length]}function one({data:e,projectId:t}){const[r,n]=w.useState(!0),[i,l]=w.useState(""),o=e.targets,c=Ue(t?uM(t,i||void 0):F8(i||void 0)),f=i?c.data:void 0,h=w.useMemo(()=>pne(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=>l(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…"}),o.map(p=>d.jsx("option",{value:p,children:p},p))]}),i&&c.isLoading&&d.jsx("span",{className:"text-xs text-gray-500",children:"Loading…"})]}),i&&f&&d.jsx(une,{data:f,baseline:i}),e.runs&&e.runs.length>0&&o.length>1&&d.jsx(cne,{runs:e.runs,targets:o}),i&&f&&d.jsx(dne,{data:f,baseline:i}),d.jsx(fne,{data:e}),h.length>1&&o.length>0&&d.jsx(yne,{data:h,targets:o}),!i&&d.jsx("p",{className:"text-xs text-gray-500",children:"Select a baseline target above to see gain and delta charts."})]})]})}function zS({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 Wo({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 une({data:e,baseline:t}){const r=w.useMemo(()=>{const i=[];for(const l of e.cells)l.target!==t&&l.delta!==void 0&&i.push({experiment:l.experiment,target:l.target,g:l.normalized_gain??null,delta:l.delta});return i.sort((l,o)=>Math.abs(o.g??0)-Math.abs(l.g??0)),i},[e.cells,t]);if(r.length===0)return d.jsx(Wo,{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(Wo,{title:"Normalized Gain (g)",children:d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/30 p-3",children:d.jsx(jj,{width:"100%",height:Math.max(200,n.length*32),children:d.jsxs(zk,{data:n,layout:"vertical",margin:{left:120,right:20,top:5,bottom:5},children:[d.jsx(Dp,{strokeDasharray:"3 3",stroke:Nt.gridLine,horizontal:!1}),d.jsx(kp,{type:"number",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Ip,{type:"category",dataKey:"name",tick:{fill:Nt.labelText,fontSize:11},width:120,axisLine:{stroke:Nt.gridLine}}),d.jsx(_S,{content:d.jsx(zS,{})}),d.jsx(IS,{dataKey:"g",name:"Normalized Gain",children:n.map(i=>d.jsx(ES,{fill:i.isNull?Nt.gray:i.g>0?Nt.green:i.g<0?Nt.red:Nt.gray},i.name))})]})})})})}function cne({runs:e,targets:t}){const{tags:r,grid:n}=w.useMemo(()=>{const i=new Map;for(const c of e)for(const f of c.tags??[]){let h=i.get(f);h||(h=new Map,i.set(f,h));let p=h.get(c.target);p||(p={passed:0,total:0},h.set(c.target,p)),p.passed+=c.passed_count,p.total+=c.eval_count}const l=[...i.keys()].sort(),o=l.map(c=>{const f={tag:c},h=i.get(c);if(!h)return f;for(const p of t){const y=h.get(p);f[p]=y&&y.total>0?y.passed/y.total:-1}return f});return{tags:l,grid:o}},[e,t]);return r.length===0?null:d.jsx(Wo,{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(l=>{const o=i[l];if(o<0)return d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},l);const c=Math.round(o*100),f=o>=.8?"bg-emerald-400/20 text-emerald-400":o>=.5?"bg-yellow-400/20 text-yellow-400":"bg-red-400/20 text-red-400";return d.jsx("td",{className:"px-4 py-3",children:d.jsxs("span",{className:`inline-block rounded px-2 py-0.5 text-xs tabular-nums font-medium ${f}`,children:[c,"%"]})},l)})]},i.tag))})]})})})}function dne({data:e,baseline:t}){const r=w.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(Wo,{title:"Regressions vs. Baseline",children:d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Delta"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"g"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(n=>{var i;return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 font-medium text-gray-200",children:n.experiment}),d.jsx("td",{className:"px-4 py-3 text-gray-300",children:n.target}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[Math.round(n.avg_score*100),"%"]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:(i=n.delta)==null?void 0:i.toFixed(3)}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:n.normalized_gain!==void 0&&n.normalized_gain!==null?n.normalized_gain.toFixed(3):"—"})]},`${n.experiment}::${n.target}`)})})]})})})}const kC={experiment:ki,category:ki,timePeriod:"all"};function fne({data:e}){const[t,r]=w.useState(kC),n=w.useMemo(()=>Jre(e,t),[e,t]);w.useEffect(()=>{r(h=>{const p=!h.experiment||n.experimentOptions.some(x=>x.value===h.experiment),y=!h.category||n.categoryOptions.some(x=>x.value===h.category),v=h.timePeriod==="all"||n.hasTimestampedScores;return p&&y&&v?h:{experiment:p?h.experiment:ki,category:y?h.category:ki,timePeriod:v?h.timePeriod:"all"}})},[n.experimentOptions,n.categoryOptions,n.hasTimestampedScores]);const i=(h,p)=>{r(y=>({...y,[h]:p}))},l=()=>r(kC),o=t.experiment!==ki||t.category!==ki||t.timePeriod!=="all",c=n.totalScores>0,f=mne(n,t);return d.jsx(Wo,{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(rx,{id:"score-distribution-experiment",label:"Experiment",value:t.experiment,onChange:h=>i("experiment",h),disabled:n.experimentOptions.length===0,children:[d.jsx("option",{value:ki,children:"All experiments"}),n.experimentOptions.map(h=>d.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),d.jsxs(rx,{id:"score-distribution-category",label:"Category",value:t.category,onChange:h=>i("category",h),disabled:!n.categoryAvailable,help:n.categoryAvailable||!c?void 0:"Category metadata is not present in these compare results.",children:[d.jsx("option",{value:ki,children:"All categories"}),n.categoryOptions.map(h=>d.jsxs("option",{value:h.value,children:[h.label," (",h.count,")"]},h.value))]}),d.jsx(rx,{id:"score-distribution-time",label:"Time period",value:t.timePeriod,onChange:h=>i("timePeriod",h),disabled:!n.hasTimestampedScores,help:n.hasTimestampedScores||!c?void 0:"Recent windows need run timestamps from compare data.",children:Eb.map(h=>d.jsx("option",{value:h.value,children:h.label},h.value))})]}),d.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-2 border-t border-gray-800/70 pt-3 text-xs",children:[d.jsxs("span",{className:"tabular-nums text-gray-400",children:["Showing ",d.jsx("span",{className:"text-gray-200",children:n.filteredScores})," of"," ",d.jsx("span",{className:"text-gray-200",children:n.totalScores})," scores"]}),o&&d.jsx("button",{type:"button",onClick:l,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(jj,{width:"100%",height:200,children:d.jsxs(zk,{data:n.buckets,margin:{left:10,right:10,top:5,bottom:5},children:[d.jsx(Dp,{strokeDasharray:"3 3",stroke:Nt.gridLine,vertical:!1}),d.jsx(kp,{dataKey:"range",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Ip,{tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(_S,{content:d.jsx(zS,{})}),d.jsx(IS,{dataKey:"count",name:"Tests",fill:Nt.cyan,radius:[2,2,0,0]})]})})}):d.jsx(hne,{message:f})]})})}function rx({id:e,label:t,value:r,onChange:n,disabled:i,help:l,children:o}){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:o}),l&&d.jsx("p",{className:"text-xs leading-5 text-gray-500",children:l})]})}function hne({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 mne(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 pne(e){if(e.length===0)return[];const t=new Map;for(const n of e){const i=n.started_at.slice(0,10);let l=t.get(i);l||(l=new Map,t.set(i,l));let o=l.get(n.target);o||(o={scoreSum:0,count:0},l.set(n.target,o)),o.scoreSum+=n.avg_score,o.count++}return[...t.keys()].sort().map(n=>{const i={date:n},l=t.get(n);if(!l)return i;for(const[o,c]of l)i[o]=Math.round(c.scoreSum/c.count*1e3)/1e3;return i})}function yne({data:e,targets:t}){return d.jsx(Wo,{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(jj,{width:"100%",height:250,children:d.jsxs(Zre,{data:e,margin:{left:10,right:20,top:5,bottom:5},children:[d.jsx(Dp,{strokeDasharray:"3 3",stroke:Nt.gridLine}),d.jsx(kp,{dataKey:"date",tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(Ip,{domain:[0,1],tick:{fill:Nt.labelText,fontSize:11},axisLine:{stroke:Nt.gridLine}}),d.jsx(_S,{content:d.jsx(zS,{})}),d.jsx(WR,{wrapperStyle:{fontSize:12,color:Nt.labelText}}),t.map((r,n)=>d.jsx(gk,{type:"monotone",dataKey:r,stroke:lne(n),strokeWidth:2,dot:{r:3},connectNulls:!0},r))]})})})})}function tn({rate:e}){const t=Math.round(e*100);return d.jsxs("div",{className:"relative h-5 w-20 overflow-hidden rounded-full bg-gray-800",children:[d.jsx("div",{className:"absolute inset-y-0 left-0 bg-gradient-to-r from-blue-400 to-blue-600",style:{width:`${t}%`}}),d.jsxs("span",{className:"absolute inset-0 flex items-center justify-center text-xs font-semibold tabular-nums text-white",children:[t,"%"]})]})}function Uk({data:e,isLoading:t,isError:r,error:n,projectId:i,readOnly:l}){var P,E;const[o,c]=w.useState("aggregated"),[f,h]=w.useState([]),{allTags:p,tagCounts:y}=w.useMemo(()=>{const A=new Map;for(const T of(e==null?void 0:e.runs)??[])for(const M of T.tags??[])A.set(M,(A.get(M)??0)+1);return{allTags:[...A.keys()].sort(),tagCounts:A}},[e==null?void 0:e.runs]),v=w.useMemo(()=>{if(!e||f.length===0)return e;const A=new Set(f),T=(e.runs??[]).filter(D=>(D.tags??[]).some(H=>A.has(H))),M=new Map,R=new Set,I=new Set;for(const D of T){R.add(D.experiment),I.add(D.target);const H=`${D.experiment}::${D.target}`,q=M.get(H)??{experiment:D.experiment,target:D.target,eval_count:0,quality_count:0,passed_count:0,execution_error_count:0,score_sum:0,tests:[]},ae=Uo(D);q.eval_count+=D.eval_count,q.quality_count+=ae,q.passed_count+=D.passed_count,q.execution_error_count+=Gt(D),q.score_sum+=D.avg_score*ae;for(const Q of D.tests)q.tests.push(Q);M.set(H,q)}const $=[...M.values()].map(D=>{const H=new Map;for(const q of D.tests)H.set(q.test_id,q);return{experiment:D.experiment,target:D.target,eval_count:D.eval_count,quality_count:D.quality_count,passed_count:D.passed_count,execution_error_count:D.execution_error_count,pass_rate:D.quality_count>0?D.passed_count/D.quality_count:0,avg_score:D.quality_count>0?D.score_sum/D.quality_count:0,tests:[...H.values()].slice(-100)}});return{...e,experiments:[...R].sort(),targets:[...I].sort(),cells:$,runs:T}},[e,f]),x=A=>{h(T=>T.includes(A)?T.filter(M=>M!==A):[...T,A])},j=()=>h([]),S=((P=v==null?void 0:v.runs)==null?void 0:P.length)??0,N=e&&e.cells.length>0,O=f.length>0&&v&&(((E=v.runs)==null?void 0:E.length)??0)===0;return d.jsxs("div",{className:"space-y-4",children:[d.jsx(gne,{mode:o,onModeChange:c,runsCount:S}),t&&d.jsx(Rne,{}),!t&&r&&n&&d.jsx(Cne,{message:`Failed to load comparison data: ${n.message}`}),!t&&!r&&!N&&d.jsx(Mne,{}),!t&&!r&&N&&d.jsxs(d.Fragment,{children:[p.length>0&&d.jsx(vne,{allTags:p,tagCounts:y,selected:f,onToggle:x,onClear:j}),O?d.jsx($p,{headline:`No runs match ${f.map(A=>`\`${A}\``).join(" + ")}`,body:"Clear the filter or pick a different tag combination.",action:{label:"Clear filter",onClick:j}}):v&&d.jsxs(d.Fragment,{children:[o==="aggregated"&&d.jsx(bne,{data:v,projectId:i}),o==="per-run"&&d.jsx(One,{data:v,projectId:i,readOnly:l??!1})]})]})]})}function vne({allTags:e,tagCounts:t,selected:r,onToggle:n,onClear:i}){const l=new Set(r),o=r.length>0;return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-500",children:"Filter by tag"}),e.map(c=>{const f=l.has(c),h=t.get(c)??0;return d.jsxs("button",{type:"button",onClick:()=>n(c),"aria-pressed":f,className:`inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium transition-colors ${f?"border-cyan-900/60 bg-cyan-950/30 text-cyan-300 hover:border-cyan-800/80":"border-gray-700 text-gray-400 hover:border-gray-600 hover:text-gray-200"}`,children:[d.jsx("span",{children:c}),d.jsx("span",{className:`rounded px-1 text-[0.65rem] tabular-nums ${f?"bg-cyan-900/50 text-cyan-200":"bg-gray-800 text-gray-500"}`,children:h})]},c)}),o&&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 gne({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(xne,{mode:e,onChange:t,runsCount:r})]})}function xne({mode:e,onChange:t,runsCount:r}){const n=r===0;return d.jsxs("div",{role:"tablist","aria-label":"Comparison view mode",className:"inline-flex items-center rounded-lg border border-gray-800 bg-gray-900/50 p-1",children:[d.jsx(IC,{active:e==="aggregated",onClick:()=>t("aggregated"),children:"Aggregated"}),d.jsxs(IC,{active:e==="per-run",onClick:()=>t("per-run"),disabled:n,title:n?"No runs available":void 0,children:["Per run",r>0&&d.jsx("span",{className:"ml-1.5 rounded bg-gray-800 px-1.5 py-0.5 text-xs tabular-nums text-gray-400",children:r})]})]})}function IC({active:e,onClick:t,disabled:r,title:n,children:i}){return d.jsx("button",{type:"button",role:"tab","aria-selected":e,onClick:t,disabled:r,title:n,className:`rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${e?"bg-gray-800 text-cyan-400 shadow-sm":"text-gray-400 hover:text-gray-200 disabled:text-gray-600 disabled:hover:text-gray-600"}`,children:i})}function bne({data:e,projectId:t}){const{experiments:r,targets:n,cells:i}=e,l=w.useMemo(()=>{const o=new Map;for(const c of i)o.set(`${c.experiment}::${c.target}`,c);return o},[i]);return r.length<=1&&n.length<=1?d.jsx($p,{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(Tne,{}),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(o=>d.jsx("th",{className:"px-4 py-3 font-medium text-gray-300",children:o},o))]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(o=>d.jsx(jne,{target:o,experiments:r,cellMap:l},o))})]})}),d.jsx(one,{data:e,projectId:t})]})}function jne({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(Sne,{cell:i}):d.jsx(wne,{})},n)})]})}function Sne({cell:e}){const[t,r]=w.useState(!1),n=Math.round(e.avg_score*100),i=Uo(e),l=Gt(e);return d.jsxs("div",{className:"space-y-2",children:[d.jsxs("button",{type:"button",className:"group flex w-full flex-col gap-1 rounded-md border border-gray-800 bg-gray-900/40 px-3 py-2 text-left transition-colors hover:border-gray-700 hover:bg-gray-900/70",onClick:()=>r(o=>!o),"aria-expanded":t,children:[d.jsx(tn,{rate:e.pass_rate}),d.jsxs("div",{className:"flex items-center gap-2 text-xs tabular-nums text-gray-500",children:[d.jsxs("span",{children:[d.jsx("span",{className:"text-emerald-400",children:e.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:i})]}),d.jsx("span",{className:"text-gray-700",children:"·"}),d.jsxs("span",{children:["avg ",n,"%"]}),l>0&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-gray-700",children:"·"}),d.jsxs("span",{className:"text-amber-400",children:[l," errors"]})]})]})]}),t&&d.jsx(Nne,{tests:e.tests})]})}function wne(){return d.jsx("div",{className:"text-center text-gray-600",children:"—"})}function Nne({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 One({data:e,projectId:t,readOnly:r}){const n=e.runs??[],[i,l]=w.useState(new Set),[o,c]=w.useState(!1),[f,h]=w.useState(null),p=x=>{l(j=>{const S=new Set(j);return S.has(x)?S.delete(x):S.add(x),S})},y=()=>l(new Set),v=w.useMemo(()=>n.filter(x=>i.has(x.run_id)),[n,i]);return n.length===0?d.jsx($p,{headline:"No runs yet",body:"Run an evaluation to populate the per-run view."}):o&&v.length>=2?d.jsx(Ane,{runs:v,onBack:()=>c(!1)}):d.jsxs("div",{className:"space-y-3",children:[d.jsx("div",{className:"flex items-center justify-between text-sm text-gray-400",children:d.jsxs("span",{children:[d.jsx("span",{className:"font-medium text-gray-300",children:n.length})," run",n.length===1?"":"s"," — select two or more to compare side-by-side"]})}),d.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"w-10 px-3 py-3","aria-label":"Select"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Timestamp"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Tags"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Experiment"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Tests"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Avg"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:n.map(x=>d.jsx(_ne,{run:x,checked:i.has(x.run_id),onToggle:()=>p(x.run_id),editing:f===x.run_id,onStartEdit:()=>h(x.run_id),onEndEdit:()=>h(null),projectId:t,readOnly:r},x.run_id))})]})}),i.size>0&&d.jsxs("div",{role:"toolbar","aria-label":"Selection actions",className:"sticky bottom-4 z-10 flex items-center justify-between gap-3 rounded-lg border border-cyan-900/50 bg-gray-900/95 px-4 py-3 shadow-xl backdrop-blur",children:[d.jsxs("div",{className:"text-sm text-gray-300",children:[d.jsx("span",{className:"font-semibold tabular-nums text-cyan-400",children:i.size})," ","selected"]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:y,className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"Clear"}),d.jsxs("button",{type:"button",disabled:i.size<2,onClick:()=>c(!0),className:"inline-flex items-center gap-1.5 rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:["Compare ",i.size,d.jsx("span",{"aria-hidden":!0,children:"→"})]})]})]})]})}function _ne({run:e,checked:t,onToggle:r,editing:n,onStartEdit:i,onEndEdit:l,projectId:o,readOnly:c}){const f=Math.round(e.avg_score*100),h=Uo(e),p=Gt(e),y=!c,v=w.useRef(null),x=e.tags??[],j=e.metadata_dirty===!0,S=x[0]??e.run_id,N=Dne(e.run_id),O=x.length>0?"inline-flex flex-wrap items-center gap-1 rounded-md px-1 py-0.5 transition-colors hover:bg-gray-800/60":j?"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs text-yellow-300 transition-colors hover:border-yellow-700":"rounded-md border border-dashed border-gray-700 px-2 py-0.5 text-xs text-gray-500 transition-colors hover:border-cyan-800 hover:text-cyan-400",P=w.useRef(n);return w.useEffect(()=>{var E;P.current&&!n&&((E=v.current)==null||E.focus()),P.current=n},[n]),d.jsxs(d.Fragment,{children:[d.jsxs("tr",{className:`transition-colors ${t?"bg-cyan-950/20 hover:bg-cyan-950/30":"hover:bg-gray-900/30"}`,children:[d.jsx("td",{className:"px-3 py-3 align-middle",children:d.jsx("input",{type:"checkbox",className:"h-4 w-4 cursor-pointer rounded border-gray-700 bg-gray-900 text-cyan-500 accent-cyan-500 focus:ring-cyan-500",checked:t,onChange:r,"aria-label":`Select run ${S}`})}),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:qk(e.started_at)}),N&&d.jsx("div",{className:"text-xs text-gray-500",children:N})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:y?d.jsx("button",{ref:v,type:"button",onClick:E=>{E.stopPropagation(),i()},className:O,"aria-label":x.length>0?"Edit tags":"Add tags",children:x.length>0?d.jsx(LC,{tags:x,dirty:j}):j?d.jsx(d.Fragment,{children:"Pending clear"}):d.jsx(d.Fragment,{children:"+ tags"})}):x.length>0?d.jsx(LC,{tags:x,dirty:j}):d.jsx("span",{className:j?"text-yellow-400":"text-gray-600",children:j?"Pending clear":"—"})}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.experiment}),d.jsx("td",{className:"px-4 py-3 align-middle text-gray-300",children:e.target}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[d.jsx("div",{children:h}),p>0&&d.jsxs("div",{className:"text-xs text-amber-400",children:[p," errors"]})]}),d.jsx("td",{className:"px-4 py-3 align-middle",children:d.jsx(tn,{rate:e.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 align-middle text-right tabular-nums text-gray-400",children:[f,"%"]})]}),n&&d.jsx("tr",{className:"bg-gray-950/80",children:d.jsx("td",{colSpan:8,className:"px-4 py-3",children:d.jsx(Ene,{runId:e.run_id,currentTags:x,source:e.source,projectId:o,onClose:l})})})]})}function LC({tags:e,dirty:t}){return d.jsxs("span",{className:"inline-flex flex-wrap items-center gap-1",children:[e.map(r=>d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/30 px-2 py-0.5 text-xs font-medium text-cyan-300",children:r},r)),t?d.jsx("span",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-xs font-medium text-yellow-300",children:"Pending sync"}):null]})}function Ene({runId:e,currentTags:t,source:r,projectId:n,onClose:i}){const[l,o]=w.useState(t),[c,f]=w.useState(""),[h,p]=w.useState(null),y=ca(),v=w.useRef(null);w.useEffect(()=>{var E;(E=v.current)==null||E.focus()},[]);const x=Sx({mutationFn:()=>cB(e,l,n),onSuccess:()=>{y.invalidateQueries({queryKey:["compare"]}),y.invalidateQueries({queryKey:["runs"]}),y.invalidateQueries({queryKey:["remote-status",n??""]}),n&&(y.invalidateQueries({queryKey:["projects",n,"compare"]}),y.invalidateQueries({queryKey:["projects",n,"runs"]})),i()},onError:E=>p(E.message)}),j=Sx({mutationFn:()=>dB(e,n),onSuccess:()=>{y.invalidateQueries({queryKey:["compare"]}),y.invalidateQueries({queryKey:["runs"]}),y.invalidateQueries({queryKey:["remote-status",n??""]}),n&&(y.invalidateQueries({queryKey:["projects",n,"compare"]}),y.invalidateQueries({queryKey:["projects",n,"runs"]})),i()},onError:E=>p(E.message)}),S=x.isPending||j.isPending,N=l.length!==t.length||l.some((E,A)=>E!==t[A]),O=()=>{const E=c.trim();if(E!==""){if(l.includes(E)){f("");return}o([...l,E]),f(""),p(null)}},P=E=>{o(l.filter(A=>A!==E))};return d.jsxs("div",{className:"space-y-2 rounded-md border border-gray-800 bg-gray-900/60 p-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:"Tag run"}),d.jsx("span",{className:"text-xs text-gray-500",children:"Multi-valued. Enter or comma adds; Backspace removes the last chip."})]}),r==="remote"?d.jsx("div",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-3 py-2 text-xs text-yellow-300",children:"Remote tag edits are saved as local metadata. Use Sync Metadata to push them to the results repo."}):null,d.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md border border-gray-700 bg-gray-950 px-2 py-1.5 focus-within:border-cyan-500 focus-within:ring-1 focus-within:ring-cyan-500",children:[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:()=>P(E),disabled:S,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:c,onChange:E=>{p(null),f(E.target.value)},maxLength:60,disabled:S,onKeyDown:E=>{E.key==="Enter"||E.key===","?(E.preventDefault(),O()):E.key==="Backspace"&&c===""&&l.length>0?(E.preventDefault(),o(l.slice(0,-1))):E.key==="Escape"&&i()},onBlur:O})]}),d.jsxs("div",{className:"flex items-center justify-end gap-2",children:[d.jsx("button",{type:"button",onClick:i,disabled:S,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:()=>{S||j.mutate()},disabled:S,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||S,onClick:()=>{S||!N||x.mutate()},className:"rounded-md bg-cyan-500 px-3 py-1.5 text-sm font-medium text-gray-950 transition-colors hover:bg-cyan-400 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-500",children:x.isPending?"Saving…":"Save"})]}),h&&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:h})]})}function Ane({runs:e,onBack:t}){const r=w.useMemo(()=>{const i=new Set,l=[];for(const o of e)for(const c of o.tests)i.has(c.test_id)||(i.add(c.test_id),l.push(c.test_id));return l},[e]),n=w.useMemo(()=>e.map(i=>{const l=new Map;for(const o of i.tests)l.set(o.test_id,o);return l}),[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(Pne,{run:i})},i.run_id))]}),d.jsxs("tr",{className:"border-t border-gray-800/50 bg-gray-900/30",children:[d.jsx("th",{className:"sticky left-0 z-10 bg-gray-900/80 px-4 py-2 text-xs font-medium uppercase tracking-wider text-gray-500 backdrop-blur",children:"Pass rate"}),e.map(i=>d.jsx("th",{className:"px-4 py-2",children:d.jsx(tn,{rate:i.pass_rate})},i.run_id))]})]}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:r.map(i=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"sticky left-0 z-10 bg-gray-950/70 px-4 py-3 font-medium text-gray-200 backdrop-blur",children:i}),n.map((l,o)=>{const c=l.get(i),f=e[o].run_id;return c?d.jsx("td",{className:"px-4 py-3",children:d.jsx("div",{className:"flex items-center gap-2",children:c.execution_status==="execution_error"?d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":!0,className:"h-1.5 w-1.5 rounded-full bg-amber-400"}),d.jsx("span",{className:"tabular-nums text-amber-400",children:"error"})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":!0,className:`h-1.5 w-1.5 rounded-full ${c.passed?"bg-emerald-400":"bg-red-400"}`}),d.jsxs("span",{className:`tabular-nums ${c.passed?"text-emerald-400":"text-red-400"}`,children:[Math.round(c.score*100),"%"]})]})})},f):d.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:"—"},f)})]},i))})]})})]})}function Pne({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:qk(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 Tne(){return d.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",role:"note",children:[d.jsx(gh,{className:"bg-emerald-400",label:"80%+"}),d.jsx(gh,{className:"bg-yellow-400",label:"50–80%"}),d.jsx(gh,{className:"bg-red-400",label:"< 50%"}),d.jsx(gh,{className:"bg-gray-700",label:"no data"})]})}function gh({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 Cne({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 Mne(){return d.jsx($p,{headline:"No comparison data yet",body:"Run evaluations with different experiment and target combinations to populate this view."})}function $p({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 Rne(){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 qk(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"),l=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0");return`${r}-${n}-${i} ${l}:${o}`}catch{return e}}function Dne(e){const t=e.split("::");return t.length<2?null:t.slice(0,-1).join(" · ")}function Hk({projectId:e}){const{data:t,isLoading:r}=e?Ue(Xb(e)):aM();if(r)return d.jsx(kne,{});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 l=Uo(i),o=Gt(i);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:e?d.jsx(we,{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(we,{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:" / "}),l]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:o>0?o:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(tn,{rate:i.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:$C(i.last_run).full,children:$C(i.last_run).date})]},i.name)})})]})})}function $C(e){if(!e)return{date:"N/A",full:"N/A"};try{const t=new Date(e);if(Number.isNaN(t.getTime()))return{date:"N/A",full:"N/A"};const r=t.toLocaleString(),n=Date.now()-t.getTime(),i=Math.floor(n/6e4),l=Math.floor(n/36e5);let o;return i<1?o="just now":i<60?o=`${i} min ago`:l<24?o=`${l} hour${l===1?"":"s"} ago`:o=t.toLocaleDateString(),{date:o,full:r}}catch{return{date:"N/A",full:"N/A"}}}function kne(){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 Ine(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 Lne({project:e}){const t=Math.round(e.pass_rate*100),r=Gt(e);return d.jsxs(we,{to:"/projects/$projectId",params:{projectId:e.id},className:"group block rounded-lg border border-gray-800 bg-gray-900/50 p-5 transition-colors hover:border-cyan-800 hover:bg-gray-900",children:[d.jsx("div",{className:"flex items-start justify-between",children:d.jsxs("div",{className:"min-w-0 flex-1",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":t>=80?"text-emerald-400":t>=50?"text-yellow-400":"text-red-400"}`,children:e.run_count>0?`${t}%`:"--"})]}),d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-gray-500",children:"Errors"}),d.jsx("p",{className:`text-lg font-semibold ${r>0?"text-amber-300":"text-gray-500"}`,children:r})]}),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:Ine(e.last_run)})]})]})]})}function $ne(e){return e.map(t=>({path:t.path,relativePath:t.relative_path,category:t.category}))}function zne(e){return(e.split(",").at(-1)??"").trim()}function Bne(e,t){const r=zne(t).toLowerCase();return r?e.filter(n=>n.relativePath.toLowerCase().includes(r)||n.category.toLowerCase().includes(r)):e}function Une(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 qne(e,t,r){return t?e:BS(e,r)}function BS(e,t){return e||String(t??$c)}function Hne({suiteFilter:e,testIds:t,target:r,thresholdInput:n,studioThreshold:i,workers:l,dryRun:o}){const c={};e.trim()&&(c.suite_filter=e.trim()),t.length>0&&(c.test_ids=t),r&&(c.target=r);const f=BS(n,i);return f&&(c.threshold=Number.parseFloat(f)),l&&(c.workers=Number.parseInt(l,10)),o&&(c.dry_run=!0),c}function bl({open:e,onClose:t,projectId:r,prefill:n}){const i=ca(),l=fl(),[o,c]=w.useState((n==null?void 0:n.suiteFilter)??""),[f,h]=w.useState(""),[p,y]=w.useState((n==null?void 0:n.testIds)??[]),[v,x]=w.useState((n==null?void 0:n.target)??""),[j,S]=w.useState(""),[N,O]=w.useState(!1),[P,E]=w.useState(""),[A,T]=w.useState(!1),[M,R]=w.useState(!1),[I,$]=w.useState(null),[D,H]=w.useState(null),[q,ae]=w.useState(!1),[Q,Z]=w.useState(null),{data:B}=mB(r),{data:K}=yB(r),{data:ee}=Zb(I,r),{data:se}=ut(r),ue=w.useMemo(()=>$ne((B==null?void 0:B.eval_files)??[]),[B]),k=w.useMemo(()=>Bne(ue,o),[ue,o]),W=w.useMemo(()=>(K==null?void 0:K.targets)??[],[K]),oe=w.useMemo(()=>BS(j,se==null?void 0:se.threshold),[se==null?void 0:se.threshold,j]),le=w.useMemo(()=>qne(j,N,se==null?void 0:se.threshold),[se==null?void 0:se.threshold,j,N]);w.useEffect(()=>{e&&(c((n==null?void 0:n.suiteFilter)??""),y((n==null?void 0:n.testIds)??[]),x((n==null?void 0:n.target)??""),h(""),S(""),O(!1),E(""),T(!1),R(!1),$(null),H(null),ae(!1),Z(null))},[e,n]),w.useEffect(()=>{((ee==null?void 0:ee.status)==="finished"||(ee==null?void 0:ee.status)==="failed")&&(i.invalidateQueries({queryKey:["runs"]}),i.invalidateQueries({queryKey:["projects"]}))},[ee==null?void 0:ee.status,i]);const ye=w.useCallback(()=>Hne({suiteFilter:o,testIds:p,target:v,thresholdInput:j,studioThreshold:se==null?void 0:se.threshold,workers:P,dryRun:A}),[A,se==null?void 0:se.threshold,o,v,p,j,P]);w.useEffect(()=>{const te=ye();if(!te.suite_filter&&(!te.test_ids||te.test_ids.length===0)){Z(null);return}bB(te,r).then(Se=>Z(Se.command)).catch(()=>Z(null))},[ye,r]);function Ne(){const te=f.trim();te&&!p.includes(te)&&y([...p,te]),h("")}function Oe(te){y(p.filter(Se=>Se!==te))}async function Ce(){H(null),ae(!0);try{const te=ye(),Se=await fM(te,r);$(Se.id)}catch(te){H(te.message)}finally{ae(!1)}}if(!e)return null;if(I&&ee){let te=function(){t(),l({to:wB(r)})};return d.jsx(zC,{onClose:t,title:"Eval Run",children:d.jsx(Fne,{status:ee,onClose:t,onRunInBackground:te,runId:I})})}const de=!!(o.trim()||p.length>0);return d.jsx(zC,{onClose:t,title:"Run Eval",children:d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"suite-filter",className:"mb-1 block text-sm font-medium text-gray-300",children:"Suite Filter"}),d.jsx("input",{id:"suite-filter",type:"text",value:o,onChange:te=>c(te.target.value),placeholder:"evals/**/*.eval.yaml",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"}),ue.length>0&&d.jsx("div",{className:"mt-1.5 max-h-44 overflow-y-auto rounded-md border border-gray-800 bg-gray-950/60 p-1",children:k.length>0?k.map(te=>d.jsxs("button",{type:"button",onClick:()=>c(Se=>Une(Se,te.relativePath)),className:"block w-full rounded px-2 py-1 text-left text-xs text-gray-400 hover:bg-gray-800 hover:text-gray-200",children:[d.jsx("span",{className:"block truncate",children:te.relativePath}),te.category&&d.jsx("span",{className:"block truncate text-[11px] text-gray-600",children:te.category})]},te.relativePath)):d.jsx("div",{className:"px-2 py-1 text-xs text-gray-500",children:"No matching eval files"})})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"test-id-input",className:"mb-1 block text-sm font-medium text-gray-300",children:"Test ID Filter"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"test-id-input",type:"text",value:f,onChange:te=>h(te.target.value),onKeyDown:te=>{te.key==="Enter"&&(te.preventDefault(),Ne())},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:Ne,disabled:!f.trim(),className:"rounded-md bg-gray-700 px-3 py-2 text-sm text-white hover:bg-gray-600 disabled:opacity-50",children:"Add"})]}),p.length>0&&d.jsx("div",{className:"mt-1.5 flex flex-wrap gap-1",children:p.map(te=>d.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-cyan-900/40 px-2.5 py-0.5 text-xs text-cyan-300",children:[te,d.jsx("button",{type:"button",onClick:()=>Oe(te),className:"text-cyan-400 hover:text-white",children:"×"})]},te))})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"target-override",className:"mb-1 block text-sm font-medium text-gray-300",children:"Target Override"}),d.jsxs("select",{id:"target-override",value:v,onChange:te=>x(te.target.value),className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-2 text-sm text-white focus:border-cyan-600 focus:outline-none",children:[d.jsx("option",{value:"",children:"Use eval's configured target"}),W.map(te=>d.jsx("option",{value:te,children:te},te))]})]}),d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>R(!M),className:"text-sm text-gray-400 hover:text-gray-200",children:[M?"▾":"▸"," Advanced Options"]}),M&&d.jsxs("div",{className:"mt-2 grid grid-cols-2 gap-3",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"threshold-input",className:"mb-1 block text-xs text-gray-400",children:"Threshold (0–1)"}),d.jsx("input",{id:"threshold-input",type:"number",value:le,onChange:te=>{O(!0),S(te.target.value)},min:"0",max:"1",step:"0.1",placeholder:oe,className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"workers-input",className:"mb-1 block text-xs text-gray-400",children:"Workers"}),d.jsx("input",{id:"workers-input",type:"number",value:P,onChange:te=>E(te.target.value),min:"1",max:"50",placeholder:"3",className:"w-full rounded-md border border-gray-700 bg-gray-800 px-3 py-1.5 text-sm text-white placeholder-gray-500 focus:border-cyan-600 focus:outline-none"})]}),d.jsx("div",{className:"col-span-2",children:d.jsxs("label",{className:"flex items-center gap-2 text-sm text-gray-400",children:[d.jsx("input",{type:"checkbox",checked:A,onChange:te=>T(te.target.checked),className:"rounded border-gray-600 bg-gray-800"}),"Dry run (mock provider responses)"]})})]})]}),Q&&d.jsxs("div",{className:"rounded-md border border-gray-700 bg-gray-950 p-3",children:[d.jsx("div",{className:"mb-1 text-xs text-gray-500",children:"CLI Preview"}),d.jsx("code",{className:"block break-all text-xs text-cyan-300",children:Q})]}),D&&d.jsx("div",{className:"rounded-md border border-red-900/50 bg-red-950/20 p-2 text-sm text-red-400",children:D}),d.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[d.jsx("button",{type:"button",onClick:t,className:"rounded-md bg-gray-700 px-4 py-2 text-sm text-white hover:bg-gray-600",children:"Cancel"}),d.jsx("button",{type:"button",onClick:Ce,disabled:!de||q,className:"rounded-md bg-cyan-600 px-4 py-2 text-sm font-medium text-white hover:bg-cyan-500 disabled:opacity-50",children:q?"Launching…":"Run Now"})]})]})})}function zC({children:e,onClose:t,title:r}){return d.jsx("div",{className:"fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[10vh]",children:d.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-gray-700 bg-gray-900 shadow-xl",children:[d.jsxs("div",{className:"flex items-center justify-between border-b border-gray-800 px-5 py-3",children:[d.jsx("h2",{className:"text-lg font-semibold text-white",children:r}),d.jsx("button",{type:"button",onClick:t,className:"text-gray-400 hover:text-white",children:"✕"})]}),d.jsx("div",{className:"px-5 py-4",children:e})]})})}function Fne({status:e,onClose:t,onRunInBackground:r,runId:n}){const i=e.status==="finished"||e.status==="failed",l={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 ${l[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 nx(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 Kne(e){return`${e} local run${e===1?"":"s"} selected`}function Gne(e,t){return`Combined ${e} local run${e===1?"":"s"} into ${t}.`}function Yne(e){return`Deleted ${e} local run${e===1?"":"s"}.`}function Vne(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),l=Math.floor(n/36e5);let o;return i<1?o="just now":i<60?o=`${i} min ago`:l<24?o=`${l} hour${l===1?"":"s"} ago`:o=t.toLocaleDateString(),{date:o,full:r}}catch{return{date:"N/A",full:"N/A"}}}function Qne(e,t){const r=Vne(e.timestamp),n=e.status==="starting"||e.status==="running",i=ej(e,{includePassRate:!1}),l=i.label,o=Gt(e),c=Math.max(0,e.test_count-o),f=c>0?e.pass_rate>=t:o===0,h=Math.round(e.pass_rate*c),p=c-h,y=e.metadata_dirty===!0;return{run:e,ts:r,isActive:n,label:l,display:i,errors:o,qualityCount:c,passing:f,passedCount:h,failedCount:p,metadataDirty:y}}function zp({runs:e,projectId:t,emptyMessage:r,hasNextPage:n=!1,isFetchingNextPage:i=!1,onLoadMore:l,enableCombine:o=!1}){const{data:c}=ut(t),f=ca(),h=(c==null?void 0:c.threshold)??$c,p=w.useRef(null),y=w.useRef(null),v=w.useRef(!1),[x,j]=w.useState([]),[S,N]=w.useState(null),[O,P]=w.useState(!1),[E,A]=w.useState(!1),T=w.useMemo(()=>e.map(Q=>Qne(Q,h)),[h,e]),M=w.useMemo(()=>e.filter(Q=>o&&!nx(Q)).map(Q=>Q.filename),[o,e]),R=new Set(x);w.useEffect(()=>{i||(v.current=!1)},[i]),w.useEffect(()=>{if(!n||!l)return;const Q=[];if(p.current&&Q.push(p.current),y.current&&Q.push(y.current),Q.length===0)return;const Z=new IntersectionObserver(B=>{B.some(K=>K.isIntersecting)&&!i&&!v.current&&(v.current=!0,l())},{rootMargin:"200px 0px"});for(const B of Q)Z.observe(B);return()=>Z.disconnect()},[n,i,l]),w.useEffect(()=>{const Q=new Set(M);j(Z=>Z.filter(B=>Q.has(B)))},[M]);async function I(){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 $(){if(x.length<2||O)return;const Q=[...x];N(null),P(!0);try{let Z;try{Z=await D_(Q,"error",t)}catch(B){if(!(B instanceof dM)||B.status!==409)throw B;const K=B.duplicates.length;if(!window.confirm(`${K} duplicate (test_id, target) pair${K===1?"":"s"} found. Replace duplicates with the latest timestamp?`))return;Z=await D_(Q,"latest",t)}j([]),N({kind:"success",message:Gne(Q.length,Z.display_name),combinedRunId:Z.run_id,sourceRunIds:Q}),await I()}catch(Z){N({kind:"error",message:Z.message})}finally{P(!1)}}async function D(){x.length===0||E||await q(x,"selected")}async function H(){const Q=(S==null?void 0:S.sourceRunIds)??[];Q.length===0||E||await q(Q,"combined-sources")}async function q(Q,Z){const B=Q.length,K=B===1?"run":"runs",ee=Z==="combined-sources"?`Delete the ${B} source local ${K} used for the combined run? The combined run will remain.`:`Delete ${B} local ${K}? This removes the run workspace and artifacts from disk.`;if(window.confirm(ee)){N(null),A(!0);try{for(const ue of Q)await uB(ue,t);j([]),N({kind:"success",message:Yne(B)}),await I()}catch(ue){N({kind:"error",message:ue.message})}finally{A(!1)}}}function ae(Q){j(Z=>Z.includes(Q)?Z.filter(B=>B!==Q):[...Z,Q])}return e.length===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:r??d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found."}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Run an evaluation first:"," ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"agentv eval <eval-file>"})]})]})}):d.jsxs("div",{className:"space-y-3",children:[o&&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:Kne(x.length)}),d.jsx("p",{className:"text-xs text-gray-500",children:"Select completed local runs to combine or delete. Remote runs stay read-only here."}),S&&d.jsx("div",{className:`mt-2 rounded-md border px-3 py-2 text-sm ${S.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:S.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:S.message}),S.combinedRunId?t?d.jsx(we,{to:"/projects/$projectId/runs/$runId",params:{projectId:t,runId:S.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):d.jsx(we,{to:"/runs/$runId",params:{runId:S.combinedRunId},className:"font-medium text-cyan-300 hover:text-cyan-200 hover:underline",children:"Open combined run"}):null,S.sourceRunIds&&S.sourceRunIds.length>0?d.jsx("button",{type:"button",onClick:()=>void H(),disabled:E||O,className:"font-medium text-red-300 hover:text-red-200 hover:underline disabled:cursor-not-allowed disabled:text-gray-500",children:E?"Deleting sources...":"Delete source runs"}):null]})})]}),d.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>void D(),disabled:x.length===0||E||O,className:"whitespace-nowrap rounded-md border border-red-900/70 px-3 py-1.5 text-sm font-medium text-red-300 hover:border-red-700 hover:bg-red-950/40 disabled:cursor-not-allowed disabled:border-gray-800 disabled:text-gray-500",children:E?"Deleting...":"Delete selected"}),d.jsx("button",{type:"button",onClick:()=>void $(),disabled:x.length<2||O||E,className:"whitespace-nowrap rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500 disabled:cursor-not-allowed disabled:bg-gray-700 disabled:text-gray-400",children:O?"Combining...":"Combine selected"})]})]}),d.jsxs("div",{className:"space-y-2 sm:hidden",children:[T.map(Q=>{const{run:Z,ts:B,label:K,display:ee,errors:se,qualityCount:ue,passedCount:k,failedCount:W,metadataDirty:oe}=Q,le=nx(Z),ye=!le&&M.includes(Z.filename);return d.jsxs("article",{className:"rounded-lg border border-gray-800 bg-gray-900/40 px-3 py-3",children:[d.jsxs("div",{className:"flex items-start gap-3",children:[o&&d.jsx("input",{type:"checkbox",checked:R.has(Z.filename),disabled:!ye,onChange:()=>ae(Z.filename),title:le,"aria-label":le?`${K}: ${le}`:`Select ${K}`,className:"mt-1 h-4 w-4 shrink-0 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"}),d.jsx(HC,{view:Q,className:"mt-1 shrink-0"}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx(BC,{projectId:t,runId:Z.filename,label:ee.primary,title:ee.title,className:"block truncate text-sm font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),ee.secondary?d.jsx("p",{className:"mt-0.5 truncate text-xs text-gray-500",title:ee.title,children:ee.secondary}):null,d.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[d.jsx(UC,{source:Z.source}),oe?d.jsx(qC,{}):null,d.jsx("span",{className:"text-xs text-gray-500",title:B.full,children:B.date})]})]})]}),d.jsxs("dl",{className:"mt-3 grid grid-cols-2 gap-x-3 gap-y-2 border-t border-gray-800/70 pt-3",children:[d.jsx(po,{label:"Pass Rate",valueClassName:"text-gray-300",children:d.jsx(tn,{rate:Z.pass_rate})}),d.jsx(po,{label:"Total",valueClassName:"text-gray-300",children:ue}),d.jsx(po,{label:"Passed",valueClassName:"text-emerald-300",children:k}),d.jsx(po,{label:"Failures",valueClassName:"text-red-400",children:W>0?W:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(po,{label:"Errors",valueClassName:"text-amber-300",children:se>0?se:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx(po,{label:"Source",valueClassName:"text-gray-400",children:Z.source==="remote"?"Remote":"Local"})]})]},Z.filename)}),(n||i)&&d.jsx("div",{ref:y,className:"rounded-lg border border-gray-800 bg-gray-900/40 px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})]}),d.jsx("div",{className:"hidden max-w-full overflow-x-auto rounded-lg border border-gray-800 sm:block",children:d.jsxs("table",{className:"min-w-[780px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[o&&d.jsx("th",{className:"w-10 px-4 py-3"}),d.jsx("th",{className:"w-8 px-4 py-3"}),d.jsx("th",{className:"w-[22rem] px-4 py-3 font-medium text-gray-400",children:"Run"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Source"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Errors"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Total"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"When"})]})}),d.jsxs("tbody",{className:"divide-y divide-gray-800/50",children:[T.map(Q=>{const{run:Z,ts:B,label:K,display:ee,errors:se,qualityCount:ue,passedCount:k,failedCount:W,metadataDirty:oe}=Q,le=nx(Z),ye=!le&&M.includes(Z.filename);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[o&&d.jsx("td",{className:"px-4 py-3",children:d.jsx("input",{type:"checkbox",checked:R.has(Z.filename),disabled:!ye,onChange:()=>ae(Z.filename),title:le,"aria-label":le?`${K}: ${le}`:`Select ${K}`,className:"h-4 w-4 rounded border-gray-700 bg-gray-900 text-cyan-500 disabled:opacity-30"})}),d.jsx("td",{className:"px-4 py-3 text-center",children:d.jsx(HC,{view:Q})}),d.jsx("td",{className:"w-[22rem] max-w-[22rem] px-4 py-3",children:d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[d.jsx(BC,{projectId:t,runId:Z.filename,label:ee.primary,title:ee.title,className:"block min-w-0 truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline"}),oe?d.jsx(qC,{}):null]}),ee.secondary?d.jsx("div",{className:"mt-0.5 truncate text-xs text-gray-500",title:ee.title,children:ee.secondary}):null]})}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(UC,{source:Z.source})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-emerald-300",children:k}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-red-400",children:W>0?W:d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums",children:se>0?d.jsx("span",{className:"text-amber-300",children:se}):d.jsx("span",{className:"text-gray-600",children:"0"})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:ue}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(tn,{rate:Z.pass_rate})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",title:B.full,children:B.date})]},Z.filename)}),(n||i)&&d.jsx("tr",{ref:p,children:d.jsx("td",{colSpan:o?10:9,className:"px-4 py-3 text-center text-xs text-gray-500",children:i?"Loading more runs...":"Scroll to load more..."})})]})]})})]})}function BC({projectId:e,runId:t,label:r,title:n,className:i}){return e?d.jsx(we,{to:"/projects/$projectId/runs/$runId",params:{projectId:e,runId:t},className:i,title:n,children:r}):d.jsx(we,{to:"/runs/$runId",params:{runId:t},className:i,title:n,children:r})}function UC({source:e}){return d.jsx("span",{className:`inline-flex rounded-md border px-2 py-0.5 text-xs font-medium ${e==="remote"?"border-cyan-900/60 bg-cyan-950/20 text-cyan-300":"border-gray-800 bg-gray-900/70 text-gray-400"}`,children:e==="remote"?"Remote":"Local"})}function qC(){return d.jsx("span",{className:"shrink-0 rounded-md border border-yellow-900/60 bg-yellow-950/20 px-1.5 py-0.5 text-xs text-yellow-300",title:"Use Sync Metadata to push this metadata to the results repo.",children:"Pending sync"})}function HC({view:e,className:t=""}){return e.isActive?d.jsx("span",{className:`inline-block h-2 w-2 animate-pulse rounded-full bg-cyan-400 ${t}`,title:e.run.status==="starting"?"Starting...":"Running...","aria-label":e.run.status==="starting"?"Starting":"Running"}):e.qualityCount===0&&e.errors>0?d.jsx("span",{className:`text-base font-bold text-amber-300 ${t}`,title:"Execution errors",children:"!"}):d.jsx("span",{className:`text-base font-bold ${e.passing?"text-emerald-400":"text-red-400"} ${t}`,children:e.passing?"✓":"✗"})}function po({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 Fk({filter:e,onFilterChange:t,remoteStatus:r,syncInFlight:n,onSync:i,projectName:l,syncFeedback:o}){var S,N;const c=(r==null?void 0:r.configured)===!0,f=D8(r,n),h=n===!0||!f.canSync,p={neutral:"border-gray-700 bg-gray-800/70 text-gray-300",good:"border-emerald-800/70 bg-emerald-950/30 text-emerald-300",info:"border-cyan-800/70 bg-cyan-950/30 text-cyan-300",warn:"border-yellow-800/70 bg-yellow-950/30 text-yellow-300",danger:"border-red-800/70 bg-red-950/30 text-red-300"}[f.tone],y=(o==null?void 0:o.kind)==="success"?"border-emerald-900/60 bg-emerald-950/20 text-emerald-300":(o==null?void 0:o.kind)==="warning"?"border-yellow-900/60 bg-yellow-950/20 text-yellow-300":"border-red-900/60 bg-red-950/20 text-red-300",v=((S=r==null?void 0:r.dirty_paths)==null?void 0:S.length)??0,x=((N=r==null?void 0:r.conflicted_paths)==null?void 0:N.length)??0,j=M8(r,l);return d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-2",children:["all","local","remote"].map(O=>{const P=O==="remote"&&!c;return d.jsx("button",{type:"button",onClick:()=>t(O),title:P?"Remote results are not configured":void 0,className:`rounded-full px-3 py-1 text-sm font-medium transition-colors ${e===O?"bg-cyan-500/20 text-cyan-300":P?"bg-gray-800 text-gray-600":"bg-gray-800 text-gray-400 hover:text-gray-200"}`,children:O==="all"?"All Sources":O==="local"?"Local Only":"Remote Only"},O)})}),c?d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx("span",{className:`inline-flex items-center rounded-full border px-2.5 py-1 text-xs font-medium ${p}`,children:f.label}),i?d.jsx("button",{type:"button",onClick:i,disabled:h,title:f.canSync?void 0:f.nextAction,className:"rounded-md border border-cyan-800 bg-cyan-950/40 px-3 py-1.5 text-sm font-medium text-cyan-300 transition-colors hover:bg-cyan-900/50 disabled:cursor-not-allowed disabled:opacity-60",children:n?"Syncing...":f.actionLabel}):null]}):null]}),c?d.jsxs("div",{className:"space-y-2 text-sm",children:[d.jsx("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-gray-400",children:j.map(O=>d.jsx("span",{children:O},O))}),d.jsx("p",{className:f.tone==="danger"?"text-red-300":"text-gray-400",children:f.summary}),f.nextAction?d.jsx("p",{className:"text-xs text-gray-500",children:f.nextAction}):null,v>0||x>0?d.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[v>0?d.jsxs("span",{className:"rounded-md border border-yellow-900/60 bg-yellow-950/20 px-2 py-0.5 text-yellow-300",children:[v," dirty path",v===1?"":"s"]}):null,x>0?d.jsxs("span",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-2 py-0.5 text-red-300",children:[x," conflicted path",x===1?"":"s"]}):null]}):null]}):e==="all"?d.jsxs("p",{className:"text-sm text-gray-500",children:["Remote results are not configured. Add"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:"results"})," to"," ",d.jsx("code",{className:"rounded bg-gray-800 px-1 text-gray-400",children:".agentv/config.yaml"})," to enable."]}):null,o?d.jsx("div",{className:`rounded-md border px-3 py-2 text-sm ${y}`,role:o.kind==="error"?"alert":"status",children:o.message}):null,r!=null&&r.last_error?d.jsxs("div",{className:"rounded-md border border-red-900/60 bg-red-950/20 px-3 py-2 text-sm text-red-300",role:"alert",children:[d.jsx("p",{className:"font-medium",children:"Remote sync error"}),d.jsx("p",{children:r.last_error}),d.jsx("p",{className:"mt-1 text-xs text-red-200/80",children:Gb(r)})]}):null,r!=null&&r.git_diff_summary&&f.state!=="clean"?d.jsx("pre",{className:"max-h-32 overflow-auto whitespace-pre-wrap rounded-md border border-gray-800 bg-gray-950/60 px-3 py-2 text-xs text-gray-500",children:r.git_diff_summary}):null]})}const FC="remote::";function Xne(e){return e.startsWith(FC)?e.slice(FC.length):e}function Bp(e){const t=new Map;for(const r of e){const n=Xne(r.filename),i=t.get(n);(!i||i.source==="remote"&&r.source==="local")&&t.set(n,r)}return[...t.values()]}function Kk({projectId:e}={}){var y,v;const[t,r]=w.useState(null),n=Ue(e?lB(e):G8),i=Ue(e?Qb(e):Yb),l=((y=n.data)==null?void 0:y.targets)??[],o=((v=i.data)==null?void 0:v.runs)??[],c=n.error??i.error,f=n.isLoading||i.isLoading,h=w.useMemo(()=>l.find(x=>x.name===t)??null,[t,l]);w.useEffect(()=>{t&&!l.some(x=>x.name===t)&&r(null)},[t,l]);const p=w.useMemo(()=>{if(!h)return[];const x=new Map;for(const j of o){if((j.target??"default")!==h.name)continue;const N=j.experiment??"default",O=x.get(N)??[];O.push(j),x.set(N,O)}return[...x.entries()].map(([j,S])=>Zne(j,Bp(S))).sort((j,S)=>j.latestTimestamp&&S.latestTimestamp&&j.latestTimestamp!==S.latestTimestamp?S.latestTimestamp.localeCompare(j.latestTimestamp):j.latestTimestamp?-1:S.latestTimestamp?1:j.name.localeCompare(S.name))},[o,h]);return f?d.jsx(eae,{}):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]}):l.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No targets found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Targets will appear here once evaluations are run with target labels."})]}):h?d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"space-y-3",children:[d.jsx("button",{type:"button",onClick:()=>r(null),className:"rounded-md px-3 py-1.5 text-sm text-gray-400 transition-colors hover:text-gray-200",children:"← Back to targets"}),d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-xl font-semibold text-white",children:h.name}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[h.run_count," run",h.run_count===1?"":"s"," ·"," ",h.experiment_count," experiment",h.experiment_count===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:h.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),Uo(h)," evals passed",Gt(h)>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",Gt(h)," execution errors"]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(tn,{rate:h.pass_rate})})]})})]}),p.length===0?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No runs found for this target"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This target summary exists, but there are no matching runs to group by experiment."})]}):d.jsx("div",{className:"space-y-6",children:p.map(x=>d.jsxs("section",{className:"space-y-3",children:[d.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-gray-800 bg-gray-900/40 p-4 sm:flex-row sm:items-center sm:justify-between",children:[d.jsxs("div",{children:[d.jsx("h3",{className:"text-lg font-medium text-gray-200",children:Wne(x.name)}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[x.runs.length," run",x.runs.length===1?"":"s"," ·"," ",d.jsx("span",{className:"text-emerald-400",children:x.passedCount}),d.jsx("span",{className:"text-gray-600",children:" / "}),x.qualityCount," evals passed",x.executionErrorCount>0&&d.jsxs("span",{className:"ml-2 text-amber-400",children:["· ",x.executionErrorCount," execution errors"]}),x.latestTimestamp&&d.jsxs("span",{className:"ml-2 text-gray-500",children:["· Last run ",Jne(x.latestTimestamp)]})]})]}),d.jsx("div",{className:"w-full max-w-52",children:d.jsx(tn,{rate:x.passRate})})]}),d.jsx(zp,{runs:x.runs,projectId:e})]},x.name))})]}):d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[720px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Runs"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Experiments"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Evals"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Execution Errors"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:l.map(x=>{const j=Uo(x),S=Gt(x);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsx("button",{type:"button",onClick:()=>r(x.name),className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:x.name})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.run_count}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:x.experiment_count}),d.jsx("td",{className:"px-4 py-3",children:d.jsx(tn,{rate:x.pass_rate})}),d.jsxs("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:[d.jsx("span",{className:"text-emerald-400",children:x.passed_count}),d.jsx("span",{className:"text-gray-600",children:" / "}),d.jsx("span",{children:j})]}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-amber-400",children:S>0?S:d.jsx("span",{className:"text-gray-600",children:"0"})})]},x.name)})})]})})}function Zne(e,t){let r=0,n=0,i=0,l=0,o=null;for(const c of t){const f=Gt(c),h=Math.max(0,c.test_count-f);r+=c.test_count,n+=h,l+=f,i+=Math.round(c.pass_rate*h),c.timestamp&&(!o||c.timestamp>o)&&(o=c.timestamp)}return{name:e,runs:t,latestTimestamp:o,evalCount:r,qualityCount:n,passedCount:i,executionErrorCount:l,passRate:n>0?i/n:0}}function Wne(e){return e==="default"?"Default experiment":e}function Jne(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 eae(){return d.jsxs("div",{className:"space-y-4",children:[d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:[d.jsx("div",{className:"h-6 w-40 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"mt-3 h-4 w-72 animate-pulse rounded bg-gray-800"})]}),d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("div",{className:"animate-pulse",children:[d.jsx("div",{className:"border-b border-gray-800 bg-gray-900/50 px-4 py-3",children:d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"})}),["sk-1","sk-2","sk-3","sk-4","sk-5"].map(e=>d.jsxs("div",{className:"flex gap-4 border-b border-gray-800/50 px-4 py-3",children:[d.jsx("div",{className:"h-4 w-32 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-12 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-48 rounded bg-gray-800"}),d.jsx("div",{className:"h-4 w-20 rounded bg-gray-800"})]},e))]})}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900/40 p-4",children:[d.jsx("div",{className:"h-5 w-48 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"mt-3 h-4 w-56 animate-pulse rounded bg-gray-800"})]})]})}const KC=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Targets"}],tae=_r("/")({component:rae});function rae(){const e=fl(),n=Fb().location.search.tab,{data:i,isLoading:l}=ru(),{data:o,isLoading:c}=ut(),f=(i==null?void 0:i.projects)??[],[h,p]=w.useState(void 0);w.useEffect(()=>{if(l||c)return;const v=o==null?void 0:o.current_project_id;if(!v){p(null);return}const x=SB(v),j=typeof window<"u"&&window.sessionStorage.getItem(x)==="1",S=NB(f.map(N=>N.id),v,j);typeof window<"u"&&S&&window.sessionStorage.setItem(x,"1"),p(S??null)},[o==null?void 0:o.current_project_id,c,f,l]);const y=OB(f.map(v=>v.id),o==null?void 0:o.project_dashboard,h??void 0,n);return w.useEffect(()=>{y.kind==="redirect"&&y.redirectPath&&e({to:y.redirectPath,replace:!0})},[y,e]),l||c||h===void 0?d.jsx(Ab,{}):y.kind==="redirect"?d.jsx(Ab,{}):y.kind==="dashboard"?d.jsx(nae,{}):d.jsx(aae,{})}function nae(){const{data:e}=ru(),{data:t}=ut(),r=ca(),[n,i]=w.useState(""),[l,o]=w.useState(null),[c,f]=w.useState(!1),[h,p]=w.useState(!1),y=(e==null?void 0:e.projects)??[],v=(t==null?void 0:t.read_only)===!0;async function x(j){if(j.preventDefault(),!!n.trim()){o(null);try{await rB(n.trim()),i(""),f(!1),r.invalidateQueries({queryKey:["projects"]})}catch(S){o(S.message)}}}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:!v&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:()=>p(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"}),d.jsx("button",{type:"button",onClick:()=>f(!c),className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:c?"Cancel":"Add Project"})]})})]}),l&&d.jsx("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-3 text-sm text-red-400",children:l}),!v&&c&&d.jsx("div",{className:"space-y-3 rounded-lg border border-gray-800 bg-gray-900/50 p-4",children:d.jsxs("form",{onSubmit:x,className:"flex gap-2",children:[d.jsx("input",{type:"text",value:n,onChange:j=>i(j.target.value),placeholder:"Project path (e.g., /home/user/projects/my-evals)",className:"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:"submit",className:"rounded-md bg-cyan-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-cyan-500",children:"Add"})]})}),y.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:y.map(j=>d.jsx(Lne,{project:j},j.id))}),!v&&d.jsx(bl,{open:h,onClose:()=>p(!1)})]})}function aae(){const r=Fb().location.search.tab,n=fl(),i=ca(),{data:l,isLoading:o,error:c,hasNextPage:f,fetchNextPage:h,isFetchingNextPage:p}=W8(),{data:y}=Bm(),{data:v}=ut(),[x,j]=w.useState(!1),[S,N]=w.useState("all"),[O,P]=w.useState(!1),[E,A]=w.useState(null),T=(v==null?void 0:v.read_only)===!0,M=KC.some($=>$.id===r)?r:"runs",R=S==="all"?Bp((l==null?void 0:l.runs)??[]):((l==null?void 0:l.runs)??[]).filter($=>$.source===S);async function I(){P(!0),A(null);try{const $=await cM();i.setQueryData(Vb().queryKey,$),A(J2($)),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($){A(eM($,y)),i.invalidateQueries({queryKey:["remote-status",""]}).catch(()=>{})}finally{P(!1)}}return w.useEffect(()=>{if((E==null?void 0:E.kind)!=="success")return;const $=window.setTimeout(()=>A(null),7e3);return()=>window.clearTimeout($)},[E]),d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:"Evaluation Runs"}),(v==null?void 0:v.project_name)&&d.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:v.project_name})]}),!T&&d.jsx("button",{type:"button",onClick:()=>j(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run Eval"})]}),d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex flex-wrap gap-1 sm:flex-nowrap",children:KC.map($=>d.jsx("button",{type:"button",onClick:()=>n({to:"/",search:{tab:$.id}}),className:`px-4 py-2 text-sm font-medium transition-colors ${M===$.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:$.label},$.id))})}),M==="runs"&&d.jsx(sae,{runs:R,isLoading:o,error:c,sourceFilter:S,onSourceFilterChange:N,remoteStatus:y,syncInFlight:O,syncFeedback:E,onSyncRemote:I,projectName:v==null?void 0:v.project_name,hasNextPage:f,isFetchingNextPage:p,onLoadMore:()=>void h(),readOnly:T}),M==="experiments"&&d.jsx(Hk,{}),M==="analytics"&&d.jsx(iae,{readOnly:T}),M==="targets"&&d.jsx(Kk,{}),!T&&d.jsx(bl,{open:x,onClose:()=>j(!1)})]})}function iae({readOnly:e}){const{data:t,isLoading:r,isError:n,error:i}=eB();return d.jsx(Uk,{data:t,isLoading:r,isError:n,error:i,readOnly:e})}function sae({runs:e,isLoading:t,error:r,sourceFilter:n,onSourceFilterChange:i,remoteStatus:l,syncInFlight:o,syncFeedback:c,onSyncRemote:f,projectName:h,hasNextPage:p,isFetchingNextPage:y,onLoadMore:v,readOnly:x}){return t?d.jsx(Ab,{}):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(lae,{}),d.jsx(Fk,{filter:n,onFilterChange:i,remoteStatus:l,syncInFlight:o,onSync:f,projectName:h,syncFeedback:c}),d.jsx(zp,{runs:e,enableCombine:!x,hasNextPage:p,isFetchingNextPage:y,onLoadMore:v,emptyMessage:n==="remote"?l!=null&&l.configured?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No remote runs found."}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Sync remote results or run an eval with"," ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"sync.auto_push: true"})," ","in your config."]})]}):d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"Remote results are not configured."}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["Add ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:"results"})," ","to"," ",d.jsx("code",{className:"rounded bg-gray-800 px-2 py-1 text-cyan-400",children:".agentv/config.yaml"})," ","to enable remote result syncing."]})]}):void 0})]})}function lae(){const{data:e}=Um(),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(we,{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 Ab(){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 Gk(e){return e==="finished"||e==="failed"}function oae(e,t){return t||!e?!1:!Gk(e)}function uae(e,t,r,n){return t||n&&!Gk(n)?!1:!!(e.some(i=>i.executionStatus==="execution_error")||r!==void 0&&e.length<r)}function cae(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 Yk({results:e,runDir:t,suiteFilter:r,target:n,projectId:i,isReadOnly:l,plannedTestCount:o,runStatus:c}){const f=fl(),[h,p]=w.useState(null),[y,v]=w.useState(null);if(!uae(e,l,o,c))return null;const x=!!t&&!!r,j=t?r?"":"Original eval file path missing from benchmark.json — cannot determine what to resume":"Run directory unavailable (remote run cannot be resumed in place)";async function S(N){if(!(!x||!t||!r)){p(N),v(null);try{const O=cae({mode:N,runDir:t,suiteFilter:r,target:n}),P=await fM(O,i);f(i?{to:"/projects/$projectId/jobs/$runId",params:{projectId:i,runId:P.id}}:{to:"/jobs/$runId",params:{runId:P.id}})}catch(O){v(O instanceof Error?O.message:"Failed to launch resume"),p(null)}}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>S("resume"),disabled:!x||h!==null,title:x?"Skip already-completed tests, run the rest":j,className:"rounded-md bg-amber-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-amber-500 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"resume-run-button",children:h==="resume"?"Resuming…":"↻ Resume run"}),d.jsx("button",{type:"button",onClick:()=>S("rerun"),disabled:!x||h!==null,title:x?"Re-run failed/errored tests, keep passing results":j,className:"rounded-md border border-amber-600/60 bg-transparent px-3 py-1.5 text-sm font-medium text-amber-300 hover:bg-amber-950/40 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"rerun-failed-button",children:h==="rerun"?"Re-running…":"Rerun failed cases"})]}),y&&d.jsx("p",{className:"text-xs text-red-400",children:y})]})}function Vk(e){return e&&e!=="default"?e:void 0}function dae(e,t){const r=[Vk(t==null?void 0:t.experiment),t==null?void 0:t.target].filter(n=>!!n);return r.length>0?r.join(" · "):e}function Pb(e){const t=e==null?void 0:e.trim();return t||void 0}function Qk(e){const t=e.results[0],r=Pb(e.sourceLabel),n=e.source==="remote",i=n&&r?r:dae(e.runId,t),l=t!=null&&t.timestamp&&e.formatTimestamp?e.formatTimestamp(t.timestamp):t==null?void 0:t.timestamp,o=[t==null?void 0:t.target,Vk(t==null?void 0:t.experiment),l,n?void 0:e.source].filter(h=>!!h),c=Pb(e.remoteRepo),f=[];return n&&(r&&r!==i&&f.push({label:"Source",value:r}),c&&f.push({label:"Repo",value:c})),{heading:i,meta:o.join(" · "),...n&&{sourceBadge:"Remote"},...r&&{sourceLabel:r},sourceContext:f}}function fae(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 hae(e){var r;return((r=e.split(/[\\/]+/).filter(n=>n&&n!=="."&&n!=="..").at(-1))==null?void 0:r.trim())||void 0}function mae(e){const t=Pb(e)??"Uncategorized";return fae(t)?{label:hae(t)??"Uncategorized",mutedLabel:t}:{label:t}}function Jo({total:e,passed:t,failed:r,passRate:n,executionErrors:i=0,totalCost:l}){const o=Math.round(n*100),c=o>=80?"text-cyan-400":o>=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(yo,{label:"Pass Rate",value:`${o}%`,accent:c,large:!0}),d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(yo,{label:"Passed",value:String(t),accent:"text-emerald-400"}),d.jsx(yo,{label:"Failures",value:String(r),accent:"text-red-400"}),i>0&&d.jsx(yo,{label:"Execution Errors",value:String(i),accent:"text-amber-400"}),d.jsx(yo,{label:"Total",value:String(e)}),l!==void 0&&d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"h-6 w-px bg-gray-700"}),d.jsx(yo,{label:"Cost",value:`$${l.toFixed(4)}`,accent:"text-amber-400"})]})]})}function yo({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 pae(e,t){const r=new Map;for(const n of e){const i=n.category??"Uncategorized",l=n.suite??"Uncategorized";r.has(i)||r.set(i,new Map);const o=r.get(i),c=o.get(l)??[];c.push(n),o.set(l,c)}return Array.from(r.entries()).map(([n,i])=>{const l=Array.from(i.entries()).map(([x,j])=>{const S=Fm(j,t);return{name:x,passed:S.passed,failed:S.failed,executionErrors:S.executionErrors,total:S.total,avgScore:S.avgScore}}).sort((x,j)=>x.name.localeCompare(j.name)),o=l.reduce((x,j)=>x+j.total,0),c=l.reduce((x,j)=>x+j.passed,0),f=l.reduce((x,j)=>x+j.failed,0),h=l.reduce((x,j)=>x+j.executionErrors,0),p=o-h,y=l.reduce((x,j)=>x+j.avgScore*(j.total-j.executionErrors),0),v=mae(n);return{name:n,displayName:v.label,mutedDisplayName:v.mutedLabel,suites:l,total:o,passed:c,failed:f,executionErrors:h,avgScore:p>0?y/p:0}}).sort((n,i)=>n.name.localeCompare(i.name))}function Xk({results:e,runId:t,projectId:r}){const{data:n}=ut(r),i=(n==null?void 0:n.threshold)??(n==null?void 0:n.pass_threshold)??.8,l=e.length,o=Fm(e,i),c=e.reduce((h,p)=>h+(p.costUsd??0),0),f=pae(e,i);return l===0?d.jsxs("div",{className:"space-y-6",children:[d.jsx(Jo,{total:0,passed:0,failed:0,passRate:0}),d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations found"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"This run has no results yet."})]})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsx(Jo,{total:l,passed:o.passed,failed:o.failed,passRate:o.passRate,executionErrors:o.executionErrors,totalCost:c>0?c:void 0}),d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"Category Breakdown"}),d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[620px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Category"}),d.jsx("th",{className:"px-4 py-2.5 font-medium text-gray-400",children:"Pass Rate"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Passed"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Failures"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Execution Errors"}),d.jsx("th",{className:"px-4 py-2.5 text-right font-medium text-gray-400",children:"Total"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:f.map(h=>{const p=d.jsxs("span",{className:"flex min-w-0 items-baseline gap-2",children:[d.jsx("span",{className:"truncate",children:h.displayName}),h.mutedDisplayName?d.jsx("span",{className:"truncate text-xs font-normal text-gray-500",title:h.mutedDisplayName,children:h.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(we,{to:"/projects/$projectId/runs/$runId/category/$category",params:{projectId:r,runId:t,category:h.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:h.mutedDisplayName??h.displayName,children:p}):d.jsx(we,{to:"/runs/$runId/category/$category",params:{runId:t,category:h.name},className:"flex min-w-0 text-cyan-400 hover:text-cyan-300 hover:underline",title:h.mutedDisplayName??h.displayName,children:p})}),d.jsx("td",{className:"px-4 py-2.5",children:d.jsx(tn,{rate:h.total-h.executionErrors>0?h.passed/(h.total-h.executionErrors):0})}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-emerald-400",children:h.passed}),d.jsx("td",{className:"px-4 py-2.5 text-right tabular-nums text-red-400",children:h.failed>0?h.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:h.executionErrors>0?h.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:h.total})]},h.name)})})]})})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"mb-3 text-sm font-medium text-gray-400",children:"All Evals"}),d.jsx("div",{className:"max-w-full overflow-x-auto rounded-lg border border-gray-800",children:d.jsxs("table",{className:"min-w-[760px] w-full whitespace-nowrap text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"w-8 px-4 py-3"}),d.jsx("th",{className:"w-[24rem] px-4 py-3 font-medium text-gray-400",children:"Test ID"}),d.jsx("th",{className:"w-[12rem] px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:e.map((h,p)=>{const y=Hm(h),v=Ga(h.score,i);return d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3 text-center",children:y?d.jsx("span",{className:"text-base font-bold text-amber-400",children:"!"}):d.jsx("span",{className:`text-base font-bold ${v?"text-emerald-400":"text-red-400"}`,children:v?"✓":"✗"})}),d.jsx("td",{className:"w-[24rem] max-w-[24rem] px-4 py-3",children:r?d.jsx(we,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:r,runId:t,evalId:h.testId},className:"block truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline",title:h.testId,children:h.testId}):d.jsx(we,{to:"/evals/$runId/$evalId",params:{runId:t,evalId:h.testId},className:"block truncate font-medium text-cyan-400 hover:text-cyan-300 hover:underline",title:h.testId,children:h.testId})}),d.jsx("td",{className:"w-[12rem] max-w-[12rem] truncate px-4 py-3 text-gray-400",title:h.target??void 0,children:h.target??"-"}),d.jsx("td",{className:"px-4 py-3",children:y?d.jsx("span",{className:"inline-flex rounded-full bg-amber-900/40 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):d.jsx(tn,{rate:h.score})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:h.durationMs!=null?`${(h.durationMs/1e3).toFixed(1)}s`:"-"}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:h.costUsd!=null?`$${h.costUsd.toFixed(4)}`:"-"})]},`${h.testId}-${p}`)})})]})})]}),d.jsx(yae,{runId:t,projectId:r})]})}function yae({runId:e,projectId:t}){const[r,n]=w.useState(!1),{data:i,isLoading:l,error:o}=q8(e,t);return!l&&!o&&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:l?"Loading…":o?"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:o?d.jsxs("div",{className:"p-4 text-sm text-red-400",children:["Failed to load run log: ",o.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 Up({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 qp({runId:e,status:t,isReadOnly:r,projectId:n}){const[i,l]=w.useState(!1),[o,c]=w.useState(null);if(!oae(t,r))return null;async function f(){l(!0),c(null);try{await vB(e,n)}catch(h){c(h instanceof Error?h.message:"Failed to stop run"),l(!1)}}return d.jsxs("div",{className:"flex flex-col items-end gap-1",children:[d.jsx("button",{type:"button",onClick:f,disabled:i,className:"inline-flex items-center gap-2 rounded-md border border-gray-700 bg-transparent px-3 py-1.5 text-sm font-medium text-gray-300 hover:bg-gray-800 disabled:cursor-not-allowed disabled:opacity-50","data-testid":"stop-run-button",children:i?"Stopping…":d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":"true",className:"inline-block h-2.5 w-2.5 rounded-[1px] bg-current"}),"Stop"]})}),o&&d.jsx("p",{className:"text-xs text-red-400",children:o})]})}const Zk=_r("/runs/$runId")({component:vae});function vae(){var S;const{runId:e}=Zk.useParams(),{data:t,isLoading:r,error:n}=ld(e),{data:i}=ut(),{data:l}=Bm(),[o,c]=w.useState(!1),f=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(N=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},N))})]});if(n)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",n.message]});const h=(S=t==null?void 0:t.results)==null?void 0:S[0],p=h==null?void 0:h.target,y=p?{target:p}:void 0,v=t==null?void 0:t.status,x=v==="starting"||v==="running",j=Qk({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"?l==null?void 0:l.repo:void 0,formatTimestamp:N=>new Date(N).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:j.heading,children:j.heading}),j.sourceBadge?d.jsx("span",{className:"rounded-md border border-cyan-900/60 bg-cyan-950/20 px-2 py-0.5 text-xs font-medium text-cyan-300",children:j.sourceBadge}):null]}),j.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:j.meta}):null,j.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:j.sourceContext.map(N=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[N.label,":"]})," ",N.value]},`${N.label}:${N.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!f&&x?d.jsx(qp,{runId:e,status:v,isReadOnly:f}):d.jsx(Yk,{results:(t==null?void 0:t.results)??[],runDir:t==null?void 0:t.run_dir,suiteFilter:t==null?void 0:t.suite_filter,target:p??void 0,isReadOnly:f,plannedTestCount:t==null?void 0:t.planned_test_count,runStatus:v}),v&&d.jsx(Up,{status:v}),!f&&!x&&d.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run evals"})]})]}),d.jsx(Xk,{results:(t==null?void 0:t.results)??[],runId:e}),!f&&d.jsx(bl,{open:o,onClose:()=>c(!1),prefill:y})]})}function gae({projectId:e,displayName:t}){return d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),t!==e?d.jsx("p",{className:"mt-0.5 text-sm text-gray-500",children:e}):null]})}const GC=[{id:"runs",label:"🏃 Recent Runs"},{id:"experiments",label:"🧪 Experiments"},{id:"analytics",label:"📊 Analytics"},{id:"targets",label:"🤖 Targets"}],Wk=_r("/projects/$projectId")({component:xae});function xae(){const{projectId:e}=Wk.useParams(),n=Fb().location.search.tab,i=fl(),[l,o]=w.useState(!1),{data:c}=ut(e),{data:f}=ru(),h=(c==null?void 0:c.read_only)===!0,p=zc(e,f==null?void 0:f.projects),y=GC.some(v=>v.id===n)?n:"runs";return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx(gae,{projectId:e,displayName:p}),!h&&d.jsx("button",{type:"button",onClick:()=>o(!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:GC.map(v=>d.jsx("button",{type:"button",onClick:()=>i({to:"/projects/$projectId",params:{projectId:e},search:{tab:v.id}}),className:`shrink-0 px-4 py-2 text-sm font-medium transition-colors ${y===v.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:v.label},v.id))})}),y==="runs"&&d.jsx(bae,{projectId:e,projectName:p,readOnly:h}),y==="experiments"&&d.jsx(Hk,{projectId:e}),y==="analytics"&&d.jsx(jae,{projectId:e,readOnly:h}),y==="targets"&&d.jsx(Kk,{projectId:e}),!h&&d.jsx(bl,{open:l,onClose:()=>o(!1),projectId:e})]})}function bae({projectId:e,projectName:t,readOnly:r}){const n=ca(),{data:i,isLoading:l,error:o,hasNextPage:c,fetchNextPage:f,isFetchingNextPage:h}=iB(e),{data:p}=Um(e),{data:y}=Bm(e),[v,x]=w.useState("all"),[j,S]=w.useState(!1),[N,O]=w.useState(null),P=((p==null?void 0:p.runs)??[]).filter(T=>T.status==="starting"||T.status==="running"),E=v==="all"?Bp((i==null?void 0:i.runs)??[]):((i==null?void 0:i.runs)??[]).filter(T=>T.source===v);async function A(){S(!0),O(null);try{const T=await cM(e);n.setQueryData(Vb(e).queryKey,T);const M=J2(T);O(M),Promise.all([n.invalidateQueries({queryKey:["projects",e,"runs"]}),n.invalidateQueries({queryKey:["projects",e,"experiments"]}),n.invalidateQueries({queryKey:["projects",e,"compare"]}),n.invalidateQueries({queryKey:["projects",e,"targets"]}),n.invalidateQueries({queryKey:["remote-status",e]})]).catch(()=>{})}catch(T){O(eM(T,y)),n.invalidateQueries({queryKey:["remote-status",e]}).catch(()=>{})}finally{S(!1)}}return w.useEffect(()=>{if((N==null?void 0:N.kind)!=="success")return;const T=window.setTimeout(()=>O(null),7e3);return()=>window.clearTimeout(T)},[N]),l?d.jsx("div",{className:"space-y-2",children:["s1","s2","s3"].map(T=>d.jsx("div",{className:"h-12 animate-pulse rounded-lg bg-gray-900"},T))}):o?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: ",o.message]}):d.jsxs("div",{className:"space-y-4",children:[P.length>0&&d.jsxs("div",{className:"rounded-lg border border-cyan-900/40 bg-cyan-950/10",children:[d.jsx("div",{className:"border-b border-cyan-900/30 px-4 py-2.5",children:d.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-cyan-400",children:"Active"})}),d.jsx("ul",{className:"divide-y divide-gray-800/50",children:P.map(T=>d.jsxs("li",{className:"flex items-center justify-between gap-4 px-4 py-3",children:[d.jsxs("div",{className:"min-w-0 flex items-center gap-3",children:[d.jsx("span",{className:"inline-block h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-cyan-400"}),d.jsx("span",{className:"truncate font-mono text-sm text-gray-300",children:T.id}),d.jsx("span",{className:"flex-shrink-0 text-xs text-gray-500",children:new Date(T.started_at).toLocaleTimeString()})]}),d.jsx(we,{to:"/projects/$projectId/jobs/$runId",params:{projectId:e,runId:T.id},className:"flex-shrink-0 text-xs text-cyan-400 hover:text-cyan-300",children:"View Log →"})]},T.id))})]}),d.jsx(Fk,{filter:v,onFilterChange:x,remoteStatus:y,syncInFlight:j,onSync:A,projectName:t,syncFeedback:N}),d.jsx(zp,{runs:E,projectId:e,enableCombine:!r,hasNextPage:c,isFetchingNextPage:h,onLoadMore:()=>void f()})]})}function jae({projectId:e,readOnly:t}){const{data:r,isLoading:n,isError:i,error:l}=Ue(uM(e));return d.jsx(Uk,{data:r,isLoading:n,isError:i,error:l,projectId:e,readOnly:t})}const Jk=_r("/jobs/$runId")({component:Sae});function Sae(){const{runId:e}=Jk.useParams(),{data:t,isLoading:r,error:n}=Zb(e),{data:i}=ut(),l=(i==null?void 0:i.read_only)===!0;if(r)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(ax,{}),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(ax,{}),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 o=t.status==="finished"||t.status==="failed";return d.jsxs("div",{className:"space-y-4",children:[d.jsx(ax,{}),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(qp,{runId:e,status:t.status,isReadOnly:l}),d.jsx(Up,{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})})]}):!o&&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})})]}),o&&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 ax(){return d.jsx(we,{to:"/",search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}function e5({experimentName:e,projectId:t}){var v;const{data:r,isLoading:n}=Ue(t?Xb(t):nM),{data:i,isLoading:l}=Ue(t?Qb(t):Yb);if(n||l)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-4 gap-4",children:["s1","s2","s3","s4"].map(x=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});const c=(v=r==null?void 0:r.experiments)==null?void 0:v.find(x=>x.name===e),f=Bp(((i==null?void 0:i.runs)??[]).filter(x=>(x.experiment??"default")===e)),h=(c==null?void 0:c.pass_rate)??0,p=f.length,y=(c==null?void 0:c.target_count)??0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:e}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:[p," run",p!==1?"s":""," · ",y," target",y!==1?"s":"",(c==null?void 0:c.last_run)&&d.jsxs("span",{className:"ml-2",children:["· Last run: ",YC(c.last_run)]})]})]}),c&&d.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-4",children:[d.jsx(xh,{label:"Runs",value:String(p)}),d.jsx(xh,{label:"Targets",value:String(y)}),d.jsx(xh,{label:"Pass Rate",value:`${Math.round(h*100)}%`,accent:"text-cyan-400"}),d.jsx(xh,{label:"Last Run",value:YC(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(zp,{runs:f,projectId:t,emptyMessage:d.jsxs("div",{children:[d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluation runs found for this experiment."}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:"Runs will appear here once this experiment has execution results."})]})})]})]})}function xh({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 YC(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 t5=_r("/experiments/$experimentName")({component:wae});function wae(){const{experimentName:e}=t5.useParams();return d.jsx(e5,{experimentName:e})}async function Nae(e,t){const r=await fetch("/api/feedback",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviews:[{test_id:e,comment:t}]})});if(!r.ok)throw new Error(`Failed to save feedback: ${r.status}`);return r.json()}function Oae({testId:e}){var p;const{data:t}=J8(),r=ca(),n=(p=t==null?void 0:t.reviews)==null?void 0:p.find(y=>y.test_id===e),[i,l]=w.useState((n==null?void 0:n.comment)??""),[o,c]=w.useState(!1);w.useEffect(()=>{l((n==null?void 0:n.comment)??""),c(!1)},[n==null?void 0:n.comment]);const f=Sx({mutationFn:()=>Nae(e,i),onSuccess:()=>{r.invalidateQueries({queryKey:["feedback"]}),c(!0),setTimeout(()=>c(!1),2e3)}}),h=w.useCallback(()=>{f.mutate()},[f]);return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-gray-400",children:"Feedback"}),d.jsx("textarea",{value:i,onChange:y=>{l(y.target.value),c(!1)},placeholder:"Add feedback for this test...",className:"w-full rounded-md border border-gray-700 bg-gray-800 p-3 text-sm text-gray-200 placeholder-gray-500 focus:border-cyan-400 focus:outline-none",rows:3}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[d.jsx("button",{type:"button",onClick:h,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"}),o&&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 _ae(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 r5(e){const t=[];for(const r of e)r.type==="dir"&&(t.push(r.path),r.children&&t.push(...r5(r.children)));return t}function n5({node:e,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:l=0}){const o=e.type==="dir",c=n.has(e.path),f=t===e.path;return d.jsxs("div",{children:[d.jsxs("button",{type:"button",onClick:()=>{o?i(e.path):r(e.path)},className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-sm transition-colors ${f?"bg-cyan-400/20 text-cyan-400":"text-gray-300 hover:bg-gray-800/50 hover:text-gray-200"}`,style:{paddingLeft:`${l*16+8}px`},children:[d.jsx("span",{className:"flex-shrink-0 text-xs",children:o?c?"📂":"📁":_ae(e.name)}),d.jsx("span",{className:"truncate",children:e.name})]}),o&&c&&e.children&&d.jsx("div",{children:e.children.map(h=>d.jsx(n5,{node:h,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:i,depth:l+1},h.path))})]})}function Eae({files:e,selectedPath:t,onSelect:r}){const[n,i]=w.useState(()=>new Set(r5(e))),l=o=>{i(c=>{const f=new Set(c);return f.has(o)?f.delete(o):f.add(o),f})};return d.jsxs("div",{className:"w-full md:w-64 overflow-y-auto rounded-lg border border-gray-800 bg-gray-900 py-2",children:[e.length===0&&d.jsx("p",{className:"px-4 py-2 text-sm text-gray-500",children:"No files."}),e.map(o=>d.jsx(n5,{node:o,selectedPath:t,onSelect:r,openFolders:n,toggleFolder:l},o.path))]})}const Aae="modulepreload",Pae=function(e){return"/"+e},VC={},Tae=function(t,r,n){let i=Promise.resolve();if(r&&r.length>0){let o=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(r.map(h=>{if(h=Pae(h),h in VC)return;VC[h]=!0;const p=h.endsWith(".css"),y=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${y}`))return;const v=document.createElement("link");if(v.rel=p?"stylesheet":Aae,p||(v.as="script"),v.crossOrigin="",v.href=h,f&&v.setAttribute("nonce",f),document.head.appendChild(v),p)return new Promise((x,j)=>{v.addEventListener("load",x),v.addEventListener("error",()=>j(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return i.then(o=>{for(const c of o||[])c.status==="rejected"&&l(c.reason);return t().catch(l)})},Cae=w.lazy(()=>Tae(()=>import("./index-BDRYJsGF.js"),[]));function Mae({value:e,language:t="json",height:r="400px"}){return d.jsx(w.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(Cae,{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 Dm({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 Rae={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 Td(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Dae(e){return!Td(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 kae(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 l=JSON.parse(i);if(!Dae(l))return{entries:t,error:`Line ${n+1} is not a transcript JSONL row.`};t.push(l)}catch(l){return{entries:t,error:`Line ${n+1} is invalid JSON: ${l.message}`}}}return{entries:t}}function a5(e){const t=[];for(const r of e)r.type==="file"?t.push(r):r.children&&t.push(...a5(r.children));return t}function Iae(e){return e.replace(/\\/g,"/")}function i5(e,t){const r=a5(e);for(const n of t){const i=r.find(l=>{const o=Iae(l.path);return o===n||o.endsWith(`/${n}`)});if(i)return i.path}}function Lae(e){return i5(e,["outputs/transcript.jsonl"])}function $ae(e){return i5(e,["outputs/answer.md"])}function Hp(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function zae(e){if(typeof e=="number")return`$${e.toFixed(4)}`}function US(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 s5(e){if(e===void 0)return"";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Bae(e){if(Array.isArray(e)){const t=e.map(r=>{if(Td(r)&&r.type==="text"&&typeof r.text=="string")return r.text}).filter(r=>r!==void 0);if(t.length===e.length&&t.length>0)return t.join(`
|
|
118
|
-
`)}return s5(e)}function km(e,t){for(const r of t){const n=e[r];if(typeof n=="string"&&n.trim())return n}}function Tb(e,t){for(const r of t)if(e[r]!==void 0)return e[r]}function l5(e,t){const r=e[t];return Td(r)?r:void 0}function Uae(e,t){const r=l5(e,"function");return km(e,["tool","name","tool_name"])??(r?km(r,["name"]):void 0)??`Tool ${t+1}`}function qae(e){const t=l5(e,"function");return Tb(e,["input","arguments","args","parameters"])??(t?Tb(t,["arguments"]):void 0)}function Hae(e){return Tb(e,["output","result","content"])}function Fae(e){return e!=null&&!(typeof e=="string"&&e.length===0)}function zs({label:e,value:t,tone:r="default"}){return Fae(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:s5(t)})})]}):null}function Lr({children:e}){return d.jsx("span",{className:"rounded-md border border-gray-800 bg-gray-950 px-2 py-0.5 text-xs text-gray-400",children:e})}function ix({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 QC({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 Kae({call:e,index:t}){const r=Uae(e,t),n=km(e,["id","call_id","tool_call_id"]),i=km(e,["status"]),l=typeof e.duration_ms=="number"?Hp(e.duration_ms):void 0,o=Td(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}),l&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:l})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[n&&d.jsxs(Lr,{children:["id: ",n]}),l&&d.jsxs(Lr,{children:["duration: ",l]}),i&&d.jsxs(Lr,{children:["status: ",i]})]}),d.jsx(zs,{label:"Arguments",value:qae(e)}),d.jsx(zs,{label:"Result",value:Hae(e)}),d.jsx(zs,{label:"Error",value:e.error,tone:"error"}),d.jsx(zs,{label:"Metadata",value:o})]})]})}function Gae({line:e}){const t=Hp(e.duration_ms),r=US(e.token_usage);return d.jsxs("details",{className:"rounded-md border border-amber-900/50 bg-gray-950/60 p-3",children:[d.jsxs("summary",{className:"cursor-pointer text-sm font-medium text-amber-300",children:[e.name?`Tool result · ${e.name}`:"Tool result",t&&d.jsx("span",{className:"ml-2 tabular-nums text-xs text-gray-500",children:t})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.name&&d.jsxs(Lr,{children:["name: ",e.name]}),t&&d.jsxs(Lr,{children:["duration: ",t]}),r&&d.jsxs(Lr,{children:["tokens: ",r]})]}),d.jsx(zs,{label:"Result",value:e.content}),d.jsx(zs,{label:"Metadata",value:e.metadata})]})]})}function Yae({line:e,ordinal:t}){const r=Rae[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=Bae(e.content),i=Hp(e.duration_ms),l=US(e.token_usage),o=Array.isArray(e.tool_calls)?e.tool_calls.filter(Td):[];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}),l&&d.jsx("span",{children:l})]})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[e.role==="tool"||e.role==="function"?d.jsx(Gae,{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."}),o.length>0&&d.jsx("div",{className:"space-y-2",children:o.map((c,f)=>d.jsx(Kae,{call:c,index:f},`${e.message_index}-${f}`))}),e.metadata&&e.role!=="tool"&&e.role!=="function"&&d.jsxs("details",{className:"rounded-md border border-gray-800 bg-gray-950/60 p-3",children:[d.jsx("summary",{className:"cursor-pointer text-xs font-medium text-gray-400",children:"Message metadata"}),d.jsx("div",{className:"mt-3",children:d.jsx(zs,{label:"Metadata",value:e.metadata})})]})]})]})}function Vae({entries:e,transcriptPath:t}){var h,p,y;const r=e[0],n=(h=r==null?void 0:r.source)==null?void 0:h.provider,i=(p=r==null?void 0:r.source)==null?void 0:p.model,l=(y=r==null?void 0:r.source)==null?void 0:y.session_id,o=Hp(r==null?void 0:r.transcript_duration_ms),c=US(r==null?void 0:r.transcript_token_usage),f=zae(r==null?void 0:r.transcript_cost_usd);return d.jsxs("div",{className:"flex flex-wrap gap-2",children:[d.jsxs(Lr,{children:[e.length," messages"]}),n&&d.jsxs(Lr,{children:["provider: ",n]}),i&&d.jsxs(Lr,{children:["model: ",i]}),l&&d.jsxs(Lr,{children:["session: ",l]}),o&&d.jsxs(Lr,{children:["duration: ",o]}),c&&d.jsxs(Lr,{children:["tokens: ",c]}),f&&d.jsxs(Lr,{children:["cost: ",f]}),t&&d.jsx(Lr,{children:t})]})}function Qae({entries:e,finalAnswer:t,answerPath:r,transcriptPath:n,answerHref:i,transcriptHref:l,transcriptDownloadHref:o,onOpenFile:c}){const f=[...e].sort((p,y)=>p.message_index-y.message_index),h=!!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(QC,{path:r,onOpenFile:c,children:"Open answer.md in Files"}),d.jsx(ix,{href:i,children:"Open answer.md"})]})]}),h?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(Vae,{entries:f,transcriptPath:n})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.jsx(QC,{path:n,onOpenFile:c,children:"Open raw JSONL in Files"}),d.jsx(ix,{href:l,children:"Open raw JSONL"}),d.jsx(ix,{href:o,download:!0,children:"Download JSONL"})]})]})}),d.jsx("div",{className:"space-y-3",children:f.map((p,y)=>d.jsx(Yae,{line:p,ordinal:y},`${p.message_index}-${p.role}-${y}`))})]})}function o5(e){for(const t of e){if(t.type==="file")return t.path;if(t.children){const r=o5(t.children);if(r)return r}}return null}function u5({eval:e,runId:t,projectId:r}){const[n,i]=w.useState("checks"),[l,o]=w.useState(null),{data:c}=ut(r),f=(c==null?void 0:c.read_only)===!0,h=[{id:"checks",label:"Checks"},{id:"transcript",label:"Transcript"},{id:"source",label:"Source"},{id:"files",label:"Files"},...f?[]:[{id:"feedback",label:"Feedback"}]],p=y=>{o(y),i("files")};return d.jsxs("div",{className:"flex min-h-full flex-col",children:[d.jsx("div",{className:"border-b border-gray-800",children:d.jsx("div",{className:"flex gap-1 px-4",children:h.map(y=>d.jsx("button",{type:"button",onClick:()=>i(y.id),className:`px-4 py-2 text-sm font-medium transition-colors ${n===y.id?"border-b-2 border-cyan-400 text-cyan-400":"text-gray-400 hover:text-gray-300"}`,children:y.label},y.id))})}),d.jsxs("div",{className:"min-h-0 flex-1",children:[n==="checks"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(Jae,{result:e,projectId:r})}),n==="files"&&d.jsx("div",{className:"h-full p-4",children:d.jsx(tie,{result:e,runId:t,projectId:r,selectedPath:l,onSelectedPathChange:o})}),n==="transcript"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(eie,{result:e,runId:t,projectId:r,onOpenFile:p})}),n==="source"&&d.jsx("div",{className:"overflow-auto p-4",children:d.jsx(Wae,{result:e})}),!f&&n==="feedback"&&d.jsx("div",{className:"p-4",children:d.jsx(Oae,{testId:e.testId})})]})]})}function Xae(e){if(e!==void 0)return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function jn({label:e,value:t}){return t===void 0||t===""?null:d.jsxs("div",{className:"min-w-0",children:[d.jsx("dt",{className:"text-xs font-medium uppercase text-gray-500",children:e}),d.jsx("dd",{className:"mt-1 break-words font-mono text-sm text-gray-200",children:String(t)})]})}function c5({file:e}){var r,n;const t=Xae(e.size_bytes);return d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(jn,{label:"Path",value:e.display_path}),d.jsx(jn,{label:"SHA-256",value:e.content_sha256}),d.jsx(jn,{label:"Size",value:t}),d.jsx(jn,{label:"Omitted",value:((r=e.omitted)==null?void 0:r.message)??((n=e.omitted)==null?void 0:n.reason)})]})}function Cc({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 Zae({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(c5,{file:e}),e.command&&e.command.length>0&&d.jsx(Cc,{value:JSON.stringify(e.command,null,2),language:"json"}),e.content&&d.jsx(Cc,{value:e.content})]})]})}function Wae({result:e}){var r,n,i;const t=e.source_traceability;return!t||t.status!=="captured"?d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source metadata"}),d.jsx("p",{className:"mt-2 text-sm text-gray-500",children:(t==null?void 0:t.message)??"Source metadata was not captured for this run."})]}):d.jsxs("div",{className:"space-y-6",children:[d.jsxs("section",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h4",{className:"mb-3 text-sm font-medium text-gray-300",children:"Traceability"}),d.jsxs("dl",{className:"grid gap-3 md:grid-cols-2",children:[d.jsx(jn,{label:"Eval file",value:(r=t.eval_file)==null?void 0:r.display_path}),d.jsx(jn,{label:"Test ID",value:t.test_id??e.testId}),d.jsx(jn,{label:"Suite",value:e.suite}),d.jsx(jn,{label:"Category",value:e.category}),d.jsx(jn,{label:"Target",value:e.target})]})]}),((n=t.source_test)==null?void 0:n.yaml)&&d.jsxs("section",{className:"space-y-3",children:[d.jsx("h4",{className:"text-sm font-medium text-gray-300",children:"Source Test"}),d.jsx(Cc,{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(c5,{file:t.eval_file}),d.jsx(Cc,{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(l=>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:[l.name,d.jsx("span",{className:"ml-3 font-mono text-xs text-gray-500",children:l.type})]}),d.jsxs("div",{className:"mt-3 space-y-3",children:[d.jsxs("dl",{className:"grid gap-3 md:grid-cols-3",children:[d.jsx(jn,{label:"Weight",value:l.weight}),d.jsx(jn,{label:"Required",value:l.required}),d.jsx(jn,{label:"Min score",value:l.min_score})]}),d.jsx(Cc,{value:JSON.stringify(l.definition,null,2),language:"json"})]})]},`${l.name}-${l.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((l,o)=>d.jsx(Zae,{file:l},`${l.kind}-${l.display_path}-${l.grader_name??""}-${o}`))})]})]})}function XC({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 Jae({result:e,projectId:t}){const{data:r}=ut(t),n=(r==null?void 0:r.threshold)??(r==null?void 0:r.pass_threshold)??.8,i=!Ga(e.score,n)||e.executionStatus==="error"||e.executionStatus==="failed",l=(e.scores??[]).filter(p=>Array.isArray(p.assertions)&&p.assertions.length>0),o=l.length>0,c=e.assertions??[],f=[];e.error&&f.push(e.error),(e.executionStatus==="error"||e.executionStatus==="failed")&&f.push(`Execution status: ${e.executionStatus}`);const h=o?l.flatMap(p=>p.assertions):c;for(const p of h.filter(y=>!y.passed)){const y=p.evidence?`${p.text}: ${p.evidence}`:p.text;f.push(y)}if(e.scores){for(const p of e.scores)if(!Ga(p.score,n)&&p.details){const y=typeof p.details=="string"?p.details:JSON.stringify(p.details,null,2);f.push(`[${p.name??p.type??"evaluator"}] ${y}`)}}return d.jsxs("div",{className:"space-y-6",children:[d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:d.jsxs("div",{className:"flex items-center gap-4",children:[d.jsx("span",{className:"text-sm font-medium text-gray-400",children:"Overall score"}),d.jsx("div",{className:"flex-1",children:d.jsx(Dm,{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(Dm,{score:p.score})})]},`${p.name??p.type??y}`))})]}),o?d.jsx("div",{className:"space-y-6",children:l.map((p,y)=>{const v=p.name??p.type??`Grader ${y+1}`;return d.jsxs("div",{className:"space-y-2",children:[d.jsx("h4",{className:"text-xs font-semibold uppercase tracking-wider text-gray-300",children:v}),p.assertions.map((x,j)=>d.jsx(XC,{assertion:x},`${x.text}-${j}`))]},`${p.name??p.type??y}`)})}):c.length>0?d.jsx("div",{className:"space-y-2",children:c.map((p,y)=>d.jsx(XC,{assertion:p},`${p.text}-${y}`))}):d.jsx("p",{className:"text-sm text-gray-500",children:"No assertion steps recorded."}),i&&f.length>0&&d.jsxs("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 p-4",children:[d.jsx("h4",{className:"mb-2 text-sm font-medium text-red-400",children:"Failure Reason"}),d.jsx("div",{className:"space-y-2",children:f.map(p=>d.jsx("p",{className:"text-sm text-gray-300",children:p},p))})]})]})}function d5(e,t){if(!t)return!1;for(const r of e)if(r.type==="file"&&r.path===t||r.children&&d5(r.children,t))return!0;return!1}function eie({result:e,runId:t,projectId:r,onOpenFile:n}){const i=e.testId,{data:l,isLoading:o}=r?Ue(oM(r,t,i)):iM(t,i),c=(l==null?void 0:l.files)??[],f=Lae(c),h=$ae(c),{data:p,isLoading:y}=r?Ue(Px(r,t,i,f??"")):Ax(t,i,f??""),{data:v}=r?Ue(Px(r,t,i,h??"")):Ax(t,i,h??""),x=w.useMemo(()=>kae((p==null?void 0:p.content)??""),[p==null?void 0:p.content]);if(o)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:"Loading transcript artifacts..."});if(!f)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"No structured transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:["This run does not include canonical ",d.jsx("code",{children:"outputs/transcript.jsonl"}),". Dashboard does not parse ",d.jsx("code",{children:"response.md"})," or markdown transcripts for this view."]})]});if(y)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4 text-sm text-gray-500",children:["Loading ",d.jsx("code",{children:f}),"..."]});if(x.error)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-red-300",children:"Transcript could not be parsed"}),d.jsx("p",{className:"mt-2 text-sm text-gray-300",children:x.error}),d.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[d.jsx("button",{type:"button",onClick:()=>n(f),className:"rounded-md border border-gray-700 px-3 py-1.5 text-sm text-gray-300 transition-colors hover:border-cyan-900/60 hover:text-cyan-300",children:"Open raw JSONL in Files"}),d.jsx("a",{href:xo({projectId:r,runId:t,evalId:i,filePath:f,raw:!0}),target:"_blank",rel:"noreferrer",className:"rounded-md px-3 py-1.5 text-sm text-cyan-400 transition-colors hover:text-cyan-300 hover:underline",children:"Open raw JSONL"})]})]});if(x.entries.length===0)return d.jsxs("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-4",children:[d.jsx("h3",{className:"text-sm font-medium text-gray-300",children:"Empty transcript"}),d.jsxs("p",{className:"mt-2 text-sm text-gray-500",children:[d.jsx("code",{children:f})," exists but contains no JSONL rows."]})]});const j=h?xo({projectId:r,runId:t,evalId:i,filePath:h,raw:!0}):void 0,S=xo({projectId:r,runId:t,evalId:i,filePath:f,raw:!0}),N=xo({projectId:r,runId:t,evalId:i,filePath:f,download:!0});return d.jsx(Qae,{entries:x.entries,finalAnswer:h?(v==null?void 0:v.content)??e.output:void 0,answerPath:h,transcriptPath:f,answerHref:j,transcriptHref:S,transcriptDownloadHref:N,onOpenFile:n})}function tie({result:e,runId:t,projectId:r,selectedPath:n,onSelectedPathChange:i}){const l=e.testId,{data:o}=r?Ue(oM(r,t,l)):iM(t,l),c=(o==null?void 0:o.files)??[],[f,h]=w.useState(null),[p,y]=w.useState(!1),v=n??f,x=d5(c,v)?v:c.length>0?o5(c):null,{data:j,isLoading:S}=r?Ue(Px(r,t,l,x??"")):Ax(t,l,x??"");if(c.length===0)return d.jsx("p",{className:"text-sm text-gray-500",children:"No artifact files available."});const N=x?S?"Loading...":(j==null?void 0:j.content)??"":"",O=x?(j==null?void 0:j.language)??"plaintext":"plaintext";return d.jsxs("div",{className:"relative flex h-full min-h-[400px] gap-4",children:[d.jsx("div",{className:`${p?"block":"hidden"} md:block w-full md:w-auto`,children:d.jsx(Eae,{files:c,selectedPath:x,onSelect:P=>{h(P),i(P),y(!1)}})}),d.jsx("div",{className:`${p?"hidden":"block"} md:block flex-1 h-full`,children:d.jsx(Mae,{value:N,language:O,height:"100%"})}),d.jsx("button",{type:"button",onClick:()=>y(!p),className:"md:hidden fixed bottom-4 right-4 z-50 flex items-center gap-2 rounded-full bg-gray-800 px-4 py-2.5 text-sm font-medium text-gray-200 shadow-lg border border-gray-700 hover:bg-gray-700 active:bg-gray-600 transition-colors","aria-label":p?"Switch to file content viewer":"Switch to file tree",children:p?d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"📄"}),d.jsx("span",{children:"Content"})]}):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:"📁"}),d.jsx("span",{children:"Files"})]})})]})}const f5=_r("/evals/$runId/$evalId")({component:rie});function rie(){const{runId:e,evalId:t}=f5.useParams(),{data:r,isLoading:n,error:i}=ld(e),{data:l}=ut(),[o,c]=w.useState(!1),f=(l==null?void 0:l.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-gray-900"})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load eval: ",i.message]});const h=r==null?void 0:r.results.find(v=>v.testId===t);if(!h)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:t})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:e}),"."]})});const p=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8,y=Ga(h.score,p)&&h.executionStatus!=="error"&&h.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",e," / Eval: ",t]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${y?"text-emerald-400":"text-red-400"}`,children:y?"✓":"✗"}),t]})]}),!f&&d.jsx("button",{type:"button",onClick:()=>c(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run this Test"})]}),d.jsx(u5,{eval:h,runId:e}),!f&&d.jsx(bl,{open:o,onClose:()=>c(!1),prefill:{testIds:[t],target:h.target}})]})}const h5=_r("/runs/$runId_/suite/$suite")({component:nie});function nie(){const{runId:e,suite:t}=h5.useParams(),{data:r,isLoading:n,error:i}=ld(e),{data:l}=ut(),o=(l==null?void 0:l.threshold)??(l==null?void 0:l.pass_threshold)??.8;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(y=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},y))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const c=((r==null?void 0:r.results)??[]).filter(y=>(y.suite??"Uncategorized")===t),f=c.length,h=Fm(c,o),p=c.reduce((y,v)=>y+(v.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:t}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",e]})]}),d.jsx(Jo,{total:f,passed:h.passed,failed:h.failed,passRate:h.passRate,executionErrors:h.executionErrors,totalCost:p>0?p:void 0}),f===0?d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-8 text-center",children:d.jsx("p",{className:"text-lg text-gray-400",children:"No evaluations in this suite"})}):d.jsx("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:c.map((y,v)=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsx(we,{to:"/evals/$runId/$evalId",params:{runId:e,evalId:y.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:y.testId})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",children:y.target??"-"}),d.jsx("td",{className:"px-4 py-3",children:Hm(y)?d.jsx("span",{className:"inline-flex rounded-full bg-amber-900/40 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):d.jsx(tn,{rate:y.score})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:y.durationMs!=null?`${(y.durationMs/1e3).toFixed(1)}s`:"-"}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:y.costUsd!=null?`$${y.costUsd.toFixed(4)}`:"-"})]},`${y.testId}-${v}`))})]})})]})}const m5=_r("/runs/$runId_/category/$category")({component:aie});function aie(){const{runId:e,category:t}=m5.useParams(),{data:r,isLoading:n,error:i}=sM(e,t);if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load category: ",i.message]});const l=(r==null?void 0:r.suites)??[],o=l.reduce((v,x)=>v+x.total,0),c=l.reduce((v,x)=>v+x.passed,0),f=l.reduce((v,x)=>v+x.failed,0),h=l.reduce((v,x)=>v+Gt(x),0),p=o-h,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(Jo,{total:o,passed:c,failed:f,passRate:y,executionErrors:h}),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(we,{to:"/runs/$runId/suite/$suite",params:{runId:e,suite:v.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"text-sm font-medium text-gray-200 truncate",children:v.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[v.passed,"/",gM(v)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Dm,{score:v.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[v.passed," passed"]}),v.failed>0&&d.jsxs("span",{className:"text-red-400",children:[v.failed," failed"]}),Gt(v)>0&&d.jsxs("span",{className:"text-amber-400",children:[Gt(v)," execution errors"]})]})]},v.name))})]})]})}const p5=_r("/projects/$projectId_/runs/$runId")({component:iie});function iie(){var N;const{projectId:e,runId:t}=p5.useParams(),{data:r,isLoading:n,error:i}=ud(e,t),{data:l}=ut(e),{data:o}=Bm(e),[c,f]=w.useState(!1),h=(l==null?void 0:l.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(O=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},O))})]});if(i)return d.jsxs("div",{className:"rounded-lg border border-red-900/50 bg-red-950/20 p-6 text-red-400",children:["Failed to load run: ",i.message]});const p=(N=r==null?void 0:r.results)==null?void 0:N[0],y=p==null?void 0:p.target,v=y?{target:y}:void 0,x=r==null?void 0:r.status,j=x==="starting"||x==="running",S=Qk({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"?o==null?void 0:o.repo:void 0,formatTimestamp:O=>new Date(O).toLocaleString()});return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[d.jsx("h1",{className:"min-w-0 truncate text-xl font-semibold text-white sm:text-2xl",title:S.heading,children:S.heading}),S.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:S.sourceBadge}):null]}),S.meta?d.jsx("p",{className:"mt-1 text-sm text-gray-500",children:S.meta}):null,S.sourceContext.length>0?d.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-gray-500",children:S.sourceContext.map(O=>d.jsxs("span",{children:[d.jsxs("span",{className:"text-gray-600",children:[O.label,":"]})," ",O.value]},`${O.label}:${O.value}`))}):null]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-3 sm:justify-end",children:[!h&&j?d.jsx(qp,{runId:t,status:x,isReadOnly:h,projectId:e}):d.jsx(Yk,{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:h,plannedTestCount:r==null?void 0:r.planned_test_count,runStatus:x}),x&&d.jsx(Up,{status:x}),!h&&!j&&d.jsx("button",{type:"button",onClick:()=>f(!0),className:"rounded-md bg-emerald-600 px-3 py-1.5 text-sm font-medium text-white hover:bg-emerald-500",children:"▶ Run evals"})]})]}),d.jsx(Xk,{results:(r==null?void 0:r.results)??[],runId:t,projectId:e}),!h&&d.jsx(bl,{open:c,onClose:()=>f(!1),projectId:e,prefill:v})]})}const y5=_r("/projects/$projectId_/jobs/$runId")({component:sie});function sie(){const{projectId:e,runId:t}=y5.useParams(),{data:r,isLoading:n,error:i}=Zb(t,e),{data:l}=ut(e),o=(l==null?void 0:l.read_only)===!0;if(n)return d.jsxs("div",{className:"space-y-4",children:[d.jsx(sx,{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(sx,{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(sx,{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(qp,{runId:t,status:r.status,isReadOnly:o,projectId:e}),d.jsx(Up,{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 sx({projectId:e}){return d.jsx(we,{to:"/projects/$projectId",params:{projectId:e},search:{tab:"runs"},className:"text-xs text-gray-400 hover:text-cyan-400",children:"← Back to Runs"})}const v5=_r("/projects/$projectId_/experiments/$experimentName")({component:lie});function lie(){const{projectId:e,experimentName:t}=v5.useParams();return d.jsx(e5,{experimentName:t,projectId:e})}const g5=_r("/projects/$projectId_/evals/$runId/$evalId")({component:oie});function oie(){const{projectId:e,runId:t,evalId:r}=g5.useParams(),{data:n,isLoading:i,error:l}=ud(e,t),{data:o}=ut(e),[c,f]=w.useState(!1),h=(o==null?void 0:o.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(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 p=n==null?void 0:n.results.find(x=>x.testId===r);if(!p)return d.jsx("div",{className:"rounded-lg border border-gray-800 bg-gray-900 p-6 text-center",children:d.jsxs("p",{className:"text-gray-400",children:["Eval ",d.jsx("code",{className:"text-cyan-400",children:r})," not found in run"," ",d.jsx("code",{className:"text-cyan-400",children:t}),"."]})});const y=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8,v=Ga(p.score,y)&&p.executionStatus!=="error"&&p.executionStatus!=="failed";return d.jsxs("div",{className:"flex h-full flex-col gap-6",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsxs("p",{className:"text-sm text-gray-400",children:["Run: ",t," / Eval: ",r]}),d.jsxs("h1",{className:"flex items-center gap-2 text-2xl font-semibold text-white",children:[d.jsx("span",{className:`text-2xl font-bold leading-none ${v?"text-emerald-400":"text-red-400"}`,children:v?"✓":"✗"}),r]})]}),!h&&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(u5,{eval:p,runId:t,projectId:e}),!h&&d.jsx(bl,{open:c,onClose:()=>f(!1),projectId:e,prefill:{testIds:[r],target:p.target}})]})}const x5=_r("/projects/$projectId_/runs/$runId_/suite/$suite")({component:uie});function uie(){const{projectId:e,runId:t,suite:r}=x5.useParams(),{data:n,isLoading:i,error:l}=ud(e,t),{data:o}=ut(e),c=(o==null?void 0:o.threshold)??(o==null?void 0:o.pass_threshold)??.8;if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(v=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},v))})]});if(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 run: ",l.message]});const f=((n==null?void 0:n.results)??[]).filter(v=>(v.suite??"Uncategorized")===r),h=f.length,p=Fm(f,c),y=f.reduce((v,x)=>v+(x.costUsd??0),0);return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Suite in run: ",t]})]}),d.jsx(Jo,{total:h,passed:p.passed,failed:p.failed,passRate:p.passRate,executionErrors:p.executionErrors,totalCost:y>0?y: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("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:d.jsxs("table",{className:"w-full text-left text-sm",children:[d.jsx("thead",{className:"border-b border-gray-800 bg-gray-900/50",children:d.jsxs("tr",{children:[d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Test ID"}),d.jsx("th",{className:"px-4 py-3 font-medium text-gray-400",children:"Target"}),d.jsx("th",{className:"w-48 px-4 py-3 font-medium text-gray-400",children:"Score"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Duration"}),d.jsx("th",{className:"px-4 py-3 text-right font-medium text-gray-400",children:"Cost"})]})}),d.jsx("tbody",{className:"divide-y divide-gray-800/50",children:f.map((v,x)=>d.jsxs("tr",{className:"transition-colors hover:bg-gray-900/30",children:[d.jsx("td",{className:"px-4 py-3",children:d.jsx(we,{to:"/projects/$projectId/evals/$runId/$evalId",params:{projectId:e,runId:t,evalId:v.testId},className:"font-medium text-cyan-400 hover:text-cyan-300 hover:underline",children:v.testId})}),d.jsx("td",{className:"px-4 py-3 text-gray-400",children:v.target??"-"}),d.jsx("td",{className:"px-4 py-3",children:Hm(v)?d.jsx("span",{className:"inline-flex rounded-full bg-amber-900/40 px-2 py-0.5 text-xs font-medium text-amber-300",children:"Execution error"}):d.jsx(tn,{rate:v.score})}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:v.durationMs!=null?`${(v.durationMs/1e3).toFixed(1)}s`:"-"}),d.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-gray-400",children:v.costUsd!=null?`$${v.costUsd.toFixed(4)}`:"-"})]},`${v.testId}-${x}`))})]})})]})}const b5=_r("/projects/$projectId_/runs/$runId_/category/$category")({component:cie});function cie(){const{projectId:e,runId:t,category:r}=b5.useParams(),{data:n,isLoading:i,error:l}=Ue(lM(e,t,r));if(i)return d.jsxs("div",{className:"space-y-4",children:[d.jsx("div",{className:"h-8 w-64 animate-pulse rounded bg-gray-800"}),d.jsx("div",{className:"grid grid-cols-5 gap-4",children:["s1","s2","s3","s4","s5"].map(x=>d.jsx("div",{className:"h-20 animate-pulse rounded-lg bg-gray-900"},x))})]});if(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 category: ",l.message]});const o=(n==null?void 0:n.suites)??[],c=o.reduce((x,j)=>x+j.total,0),f=o.reduce((x,j)=>x+j.passed,0),h=o.reduce((x,j)=>x+j.failed,0),p=o.reduce((x,j)=>x+Gt(j),0),y=c-p,v=y>0?f/y:0;return d.jsxs("div",{className:"space-y-6",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"text-2xl font-semibold text-white",children:r}),d.jsxs("p",{className:"mt-1 text-sm text-gray-400",children:["Category in run: ",t]})]}),d.jsx(Jo,{total:c,passed:f,failed:h,passRate:v,executionErrors:p}),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(x=>d.jsxs(we,{to:"/projects/$projectId/runs/$runId/suite/$suite",params:{projectId:e,runId:t,suite:x.name},className:"rounded-lg border border-gray-800 bg-gray-900 p-3 text-left transition-colors hover:border-gray-700",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("span",{className:"truncate text-sm font-medium text-gray-200",children:x.name}),d.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[x.passed,"/",gM(x)]})]}),d.jsx("div",{className:"mt-2",children:d.jsx(Dm,{score:x.avg_score})}),d.jsxs("div",{className:"mt-1 flex gap-3 text-xs",children:[d.jsxs("span",{className:"text-emerald-400",children:[x.passed," passed"]}),x.failed>0&&d.jsxs("span",{className:"text-red-400",children:[x.failed," failed"]}),Gt(x)>0&&d.jsxs("span",{className:"text-amber-400",children:[Gt(x)," execution errors"]})]})]},x.name))})]})]})}const die=GB.update({id:"/settings",path:"/settings",getParentRoute:()=>pr}),fie=tae.update({id:"/",path:"/",getParentRoute:()=>pr}),hie=Zk.update({id:"/runs/$runId",path:"/runs/$runId",getParentRoute:()=>pr}),mie=Wk.update({id:"/projects/$projectId",path:"/projects/$projectId",getParentRoute:()=>pr}),pie=Jk.update({id:"/jobs/$runId",path:"/jobs/$runId",getParentRoute:()=>pr}),yie=t5.update({id:"/experiments/$experimentName",path:"/experiments/$experimentName",getParentRoute:()=>pr}),vie=f5.update({id:"/evals/$runId/$evalId",path:"/evals/$runId/$evalId",getParentRoute:()=>pr}),gie=h5.update({id:"/runs/$runId_/suite/$suite",path:"/runs/$runId/suite/$suite",getParentRoute:()=>pr}),xie=m5.update({id:"/runs/$runId_/category/$category",path:"/runs/$runId/category/$category",getParentRoute:()=>pr}),bie=p5.update({id:"/projects/$projectId_/runs/$runId",path:"/projects/$projectId/runs/$runId",getParentRoute:()=>pr}),jie=y5.update({id:"/projects/$projectId_/jobs/$runId",path:"/projects/$projectId/jobs/$runId",getParentRoute:()=>pr}),Sie=v5.update({id:"/projects/$projectId_/experiments/$experimentName",path:"/projects/$projectId/experiments/$experimentName",getParentRoute:()=>pr}),wie=g5.update({id:"/projects/$projectId_/evals/$runId/$evalId",path:"/projects/$projectId/evals/$runId/$evalId",getParentRoute:()=>pr}),Nie=x5.update({id:"/projects/$projectId_/runs/$runId_/suite/$suite",path:"/projects/$projectId/runs/$runId/suite/$suite",getParentRoute:()=>pr}),Oie=b5.update({id:"/projects/$projectId_/runs/$runId_/category/$category",path:"/projects/$projectId/runs/$runId/category/$category",getParentRoute:()=>pr}),_ie={IndexRoute:fie,SettingsRoute:die,ExperimentsExperimentNameRoute:yie,JobsRunIdRoute:pie,ProjectsProjectIdRoute:mie,RunsRunIdRoute:hie,EvalsRunIdEvalIdRoute:vie,ProjectsProjectIdExperimentsExperimentNameRoute:Sie,ProjectsProjectIdJobsRunIdRoute:jie,ProjectsProjectIdRunsRunIdRoute:bie,RunsRunIdCategoryCategoryRoute:xie,RunsRunIdSuiteSuiteRoute:gie,ProjectsProjectIdEvalsRunIdEvalIdRoute:wie,ProjectsProjectIdRunsRunIdCategoryCategoryRoute:Oie,ProjectsProjectIdRunsRunIdSuiteSuiteRoute:Nie},Eie=pr._addFileChildren(_ie)._addFileTypes(),Aie=new O$({defaultOptions:{queries:{staleTime:5e3,refetchOnWindowFocus:!0}}}),Pie=E8({routeTree:Eie}),j5=document.getElementById("root");if(!j5)throw new Error("Root element not found");JL.createRoot(j5).render(d.jsx(w.StrictMode,{children:d.jsx(_$,{client:Aie,children:d.jsx(T8,{router:Pie})})}));export{$o as W,w as r};
|